client_manager: add API for async operations
[oweals/gnunet.git] / src / include / gnunet_constants.h
index 1d2e65581b2fa7ef2a267d025bfb9832edf1b9eb..d010f7ec0f9395a4bc00848f40d0d07592f5c207 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2009 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -121,18 +121,20 @@ 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:
+ * + sizeof (struct GNUNET_CADET_Encrypted)
+ * + sizeof (struct GNUNET_CADET_Data)
+ * + sizeof (struct GNUNET_CADET_ACK))
+ *
+ * Checked for correcteness in gnunet-service-cadet_tunnel.c: GCT_init().
  */
-#define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD (sizeof (struct GNUNET_CADET_Encrypted) + sizeof (struct GNUNET_CADET_Data))
+#define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD 132
 
 /**
- * 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.