From a02fb0711ba496877c111b118b78d404151a8b8d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 26 Mar 2012 03:06:03 +0200 Subject: Initial implementation of the FHMQV-C handshake --- src/protocol_null.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/protocol_null.c') 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 -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, }; -- cgit v1.2.3