diff options
Diffstat (limited to 'src/methods/null/null.c')
-rw-r--r-- | src/methods/null/null.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/methods/null/null.c b/src/methods/null/null.c index f49d94a..cba7931 100644 --- a/src/methods/null/null.c +++ b/src/methods/null/null.c @@ -33,6 +33,10 @@ struct fastd_method_session_state { }; +static bool method_provides(fastd_context_t *ctx UNUSED, const char *name) { + return !strcmp(name, "null"); +} + static size_t method_max_packet_size(fastd_context_t *ctx) { return fastd_max_packet_size(ctx); } @@ -45,7 +49,7 @@ static size_t method_key_length(fastd_context_t *ctx UNUSED) { return 0; } -static fastd_method_session_state_t* method_session_init(fastd_context_t *ctx UNUSED, const uint8_t *secret UNUSED, bool initiator) { +static fastd_method_session_state_t* method_session_init(fastd_context_t *ctx UNUSED, const char *name UNUSED, const uint8_t *secret UNUSED, bool initiator) { fastd_method_session_state_t *session = malloc(sizeof(fastd_method_session_state_t)); session->valid = true; @@ -54,8 +58,8 @@ static fastd_method_session_state_t* method_session_init(fastd_context_t *ctx UN return session; } -static fastd_method_session_state_t* method_session_init_compat(fastd_context_t *ctx, const uint8_t *secret, size_t length UNUSED, bool initiator) { - return method_session_init(ctx, secret, initiator); +static fastd_method_session_state_t* method_session_init_compat(fastd_context_t *ctx, const char *name, const uint8_t *secret, size_t length UNUSED, bool initiator) { + return method_session_init(ctx, name, secret, initiator); } static bool method_session_is_valid(fastd_context_t *ctx UNUSED, fastd_method_session_state_t *session) { @@ -84,7 +88,7 @@ static bool method_passthrough(fastd_context_t *ctx UNUSED, fastd_peer_t *peer U } const fastd_method_t fastd_method_null = { - .name = "null", + .provides = method_provides, .max_packet_size = method_max_packet_size, .min_encrypt_head_space = method_min_head_tail_space, |