diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-26 03:06:03 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-26 03:06:03 +0200 |
commit | a02fb0711ba496877c111b118b78d404151a8b8d (patch) | |
tree | 7537bd38a88e0f46751f93871bb44f66829d23af /src/protocol_null.c | |
parent | 44742f8aadb7a8a969f11d9b1d50c8be2573a576 (diff) | |
download | fastd-a02fb0711ba496877c111b118b78d404151a8b8d.tar fastd-a02fb0711ba496877c111b118b78d404151a8b8d.zip |
Initial implementation of the FHMQV-C handshake
Diffstat (limited to 'src/protocol_null.c')
-rw-r--r-- | src/protocol_null.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/protocol_null.c b/src/protocol_null.c index 410d848..ffe6ad1 100644 --- a/src/protocol_null.c +++ b/src/protocol_null.c @@ -34,16 +34,9 @@ #include <arpa/inet.h> -static bool protocol_check_config(fastd_context *ctx, const fastd_config *conf) { - if (conf->n_floating > 1) { - pr_error(ctx, "with protocol `null' use can't define more than one floating peer"); - return false; - } - - return true; -} - static void protocol_init(fastd_context *ctx) { + if (ctx->conf->n_floating > 1) + exit_error(ctx, "with protocol `null' use can't define more than one floating peer"); } static size_t protocol_max_packet_size(fastd_context *ctx) { @@ -121,15 +114,13 @@ static void protocol_send(fastd_context *ctx, fastd_peer *peer, fastd_buffer buf fastd_task_put_send(ctx, peer, buffer); } -static void protocol_free_peer_private(fastd_context *ctx, fastd_peer *peer) { +static void protocol_free_peer_state(fastd_context *ctx, fastd_peer *peer) { } const fastd_protocol fastd_protocol_null = { .name = "null", - .check_config = protocol_check_config, - .init = protocol_init, .max_packet_size = protocol_max_packet_size, @@ -140,5 +131,5 @@ const fastd_protocol fastd_protocol_null = { .handle_recv = protocol_handle_recv, .send = protocol_send, - .free_peer_private = protocol_free_peer_private, + .free_peer_state = protocol_free_peer_state, }; |