aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_tunnel.c6
-rw-r--r--src/include/gnunet_constants.h10
2 files changed, 11 insertions, 5 deletions
diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c
index 7c420843e..f1cbad63c 100644
--- a/src/cadet/gnunet-service-cadet_tunnel.c
+++ b/src/cadet/gnunet-service-cadet_tunnel.c
@@ -2184,8 +2184,10 @@ GCT_init (const struct GNUNET_CONFIGURATION_Handle *c,
2184 2184
2185 LOG (GNUNET_ERROR_TYPE_DEBUG, "init\n"); 2185 LOG (GNUNET_ERROR_TYPE_DEBUG, "init\n");
2186 2186
2187 expected_overhead = 2187 expected_overhead = 0;
2188 sizeof (struct GNUNET_CADET_Encrypted) + sizeof (struct GNUNET_CADET_Data); 2188 expected_overhead += sizeof (struct GNUNET_CADET_Encrypted);
2189 expected_overhead += sizeof (struct GNUNET_CADET_Data);
2190 expected_overhead += sizeof (struct GNUNET_CADET_ACK);
2189 GNUNET_assert (GNUNET_CONSTANTS_CADET_P2P_OVERHEAD == expected_overhead); 2191 GNUNET_assert (GNUNET_CONSTANTS_CADET_P2P_OVERHEAD == expected_overhead);
2190 2192
2191 if (GNUNET_OK != 2193 if (GNUNET_OK !=
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h
index 9ef500388..36fa72bd0 100644
--- a/src/include/gnunet_constants.h
+++ b/src/include/gnunet_constants.h
@@ -121,10 +121,14 @@ 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 * See gnunet-service-cadet_tunnel.c: GCT_init for more info. 125 * + sizeof (struct GNUNET_CADET_Encrypted)
126 * + sizeof (struct GNUNET_CADET_Data)
127 * + sizeof (struct GNUNET_CADET_ACK))
128 *
129 * Checked for correcteness in gnunet-service-cadet_tunnel.c: GCT_init().
126 */ 130 */
127#define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD 92 131#define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD 132
128 132
129/** 133/**
130 * Maximum message size that can be sent on CADET. 134 * Maximum message size that can be sent on CADET.