diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-12-11 19:01:29 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-12-11 19:01:29 +0000 |
commit | dcc098d1fdefcb74bed0a6ff6f81347500367ab6 (patch) | |
tree | c4926c57ab59ab84b42deef8bd2005aab0c6a747 /src/include | |
parent | 7fdfc20de5ff3021c8e4055672ccfc3a8bd2ed50 (diff) | |
download | gnunet-dcc098d1fdefcb74bed0a6ff6f81347500367ab6.tar.gz gnunet-dcc098d1fdefcb74bed0a6ff6f81347500367ab6.zip |
- proper CADET overhead
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_constants.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index 1d2e65581..9ef500388 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h | |||
@@ -121,18 +121,16 @@ extern "C" | |||
121 | #define GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE (63 * 1024) | 121 | #define GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE (63 * 1024) |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * Size of the CADET message overhead | 124 | * Size of the CADET message overhead. |
125 | * - sizeof(GNUNET_CADET_Encrypted) // FIXME use GNUNET_CADET_EncryptedAck when available | 125 | * See gnunet-service-cadet_tunnel.c: GCT_init for more info. |
126 | * - sizeof(GNUNET_CADET_Data) | ||
127 | |||
128 | */ | 126 | */ |
129 | #define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD (sizeof (struct GNUNET_CADET_Encrypted) + sizeof (struct GNUNET_CADET_Data)) | 127 | #define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD 92 |
130 | 128 | ||
131 | /** | 129 | /** |
132 | * Same as core, the conservative value would be: | 130 | * Maximum message size that can be sent on CADET. |
133 | * GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE - GNUNET_CONSTANTS_CADET_P2P_OVERHEAD | ||
134 | */ | 131 | */ |
135 | #define GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE (62 * 1024) | 132 | #define GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE \ |
133 | (GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE - GNUNET_CONSTANTS_CADET_P2P_OVERHEAD) | ||
136 | 134 | ||
137 | /** | 135 | /** |
138 | * Largest block that can be stored in the DHT. | 136 | * Largest block that can be stored in the DHT. |