From dcc098d1fdefcb74bed0a6ff6f81347500367ab6 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 11 Dec 2014 19:01:29 +0000 Subject: - proper CADET overhead --- src/include/gnunet_constants.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/include/gnunet_constants.h') 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" #define GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE (63 * 1024) /** - * Size of the CADET message overhead - * - sizeof(GNUNET_CADET_Encrypted) // FIXME use GNUNET_CADET_EncryptedAck when available - * - sizeof(GNUNET_CADET_Data) - + * Size of the CADET message overhead. + * See gnunet-service-cadet_tunnel.c: GCT_init for more info. */ -#define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD (sizeof (struct GNUNET_CADET_Encrypted) + sizeof (struct GNUNET_CADET_Data)) +#define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD 92 /** - * Same as core, the conservative value would be: - * GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE - GNUNET_CONSTANTS_CADET_P2P_OVERHEAD + * Maximum message size that can be sent on CADET. */ -#define GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE (62 * 1024) +#define GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE \ +(GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE - GNUNET_CONSTANTS_CADET_P2P_OVERHEAD) /** * Largest block that can be stored in the DHT. -- cgit v1.2.3