summaryrefslogtreecommitdiffstats
path: root/src/methods/null/null.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-09-08 20:30:44 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-09-08 20:30:44 +0200
commit80b1412c65a7a7e209c66684cf78e2ab13cfd5e6 (patch)
treea148c84c7eb41d25a9a1e709b47a84b43f26805c /src/methods/null/null.c
parent58b8518100c8b306d5b6a3d87b4a83a1ae383a09 (diff)
downloadfastd-80b1412c65a7a7e209c66684cf78e2ab13cfd5e6.tar
fastd-80b1412c65a7a7e209c66684cf78e2ab13cfd5e6.zip
Make stats of reordered packets
Diffstat (limited to 'src/methods/null/null.c')
-rw-r--r--src/methods/null/null.c12
1 files changed, 9 insertions, 3 deletions
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,
};