From 80b1412c65a7a7e209c66684cf78e2ab13cfd5e6 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 8 Sep 2014 20:30:44 +0200 Subject: Make stats of reordered packets --- src/methods/null/null.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/methods/null/null.c') diff --git a/src/methods/null/null.c b/src/methods/null/null.c index f84cf6c..4897ec2 100644 --- a/src/methods/null/null.c +++ b/src/methods/null/null.c @@ -99,7 +99,13 @@ static void method_session_free(fastd_method_session_state_t *session) { } /** Just returns the input buffer as the output */ -static bool method_passthrough(UNUSED fastd_peer_t *peer, UNUSED fastd_method_session_state_t *session, fastd_buffer_t *out, fastd_buffer_t in) { +static bool method_encrypt(UNUSED fastd_peer_t *peer, UNUSED fastd_method_session_state_t *session, fastd_buffer_t *out, fastd_buffer_t in) { + *out = in; + return true; +} + +/** Just returns the input buffer as the output */ +static bool method_decrypt(UNUSED fastd_peer_t *peer, UNUSED fastd_method_session_state_t *session, fastd_buffer_t *out, fastd_buffer_t in, UNUSED bool *reordered) { *out = in; return true; } @@ -126,6 +132,6 @@ const fastd_method_provider_t fastd_method_null = { .session_superseded = method_session_superseded, .session_free = method_session_free, - .encrypt = method_passthrough, - .decrypt = method_passthrough, + .encrypt = method_encrypt, + .decrypt = method_decrypt, }; -- cgit v1.2.3