diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2020-06-18 21:56:45 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2020-06-18 21:56:45 +0200 |
commit | 9f743e36909ba5509edaacd3f0e0edee625a72f5 (patch) | |
tree | 73e598b8d7d9642ef2503110ad39a8eca122f6c9 /protocol.h | |
parent | 44b764cff8f8bcfd10751760d4e304f0a19398a2 (diff) |
* capture, prettify and print recv/sent bytes
* error and disconnect if server or client have different WINDOW_SIZE's
* removed additional WINDOW_SIZE pre-processor checks which are not required anymore
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'protocol.h')
-rw-r--r-- | protocol.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -12,7 +12,7 @@ #define PROTOCOL_VERSION 0xDEADCAFE #define PROTOCOL_TIME_STRLEN 32 #define WINDOW_SIZE (65535*2) -#if WINDOW_SIZE > (65535*2) +#if WINDOW_SIZE > (UINT_MAX) #error "Window size is limited by sizeof(header.body_size)" #endif @@ -142,6 +142,9 @@ struct connection { double latency_usec; + uint64_t total_bytes_recv; + uint64_t total_bytes_sent; + /* generated symmetric session keys used by server and client */ struct session_keys * session_keys; @@ -158,6 +161,7 @@ enum recv_return { RECV_FATAL, RECV_FATAL_UNAUTH, RECV_FATAL_CRYPTO_ERROR, + RECV_FATAL_REMOTE_WINDOW_SIZE, RECV_CORRUPT_PACKET, RECV_BUFFER_NEED_MORE_DATA, RECV_CALLBACK_NOT_IMPLEMENTED |