aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_constants.h
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-12-11 03:42:38 +0000
committerBart Polot <bart@net.in.tum.de>2014-12-11 03:42:38 +0000
commit1cc94f2fc2d5378d71c4e740271b0ae99e6c554e (patch)
tree8d992094daf59814dc37be0e4061517c881c7b21 /src/include/gnunet_constants.h
parentc969aad2bb74e7dfbffa8b55bd1b6b7fbd0b2bcb (diff)
downloadgnunet-1cc94f2fc2d5378d71c4e740271b0ae99e6c554e.tar.gz
gnunet-1cc94f2fc2d5378d71c4e740271b0ae99e6c554e.zip
Add maximum message size
Diffstat (limited to 'src/include/gnunet_constants.h')
-rw-r--r--src/include/gnunet_constants.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h
index 705809186..1d2e65581 100644
--- a/src/include/gnunet_constants.h
+++ b/src/include/gnunet_constants.h
@@ -121,6 +121,20 @@ 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
125 * - sizeof(GNUNET_CADET_Encrypted) // FIXME use GNUNET_CADET_EncryptedAck when available
126 * - sizeof(GNUNET_CADET_Data)
127
128 */
129#define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD (sizeof (struct GNUNET_CADET_Encrypted) + sizeof (struct GNUNET_CADET_Data))
130
131/**
132 * Same as core, the conservative value would be:
133 * GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE - GNUNET_CONSTANTS_CADET_P2P_OVERHEAD
134 */
135#define GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE (62 * 1024)
136
137/**
124 * Largest block that can be stored in the DHT. 138 * Largest block that can be stored in the DHT.
125 */ 139 */
126#define GNUNET_CONSTANTS_MAX_BLOCK_SIZE (62 * 1024) 140#define GNUNET_CONSTANTS_MAX_BLOCK_SIZE (62 * 1024)