[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34621 - in gnunet/src: cadet include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34621 - in gnunet/src: cadet include |
Date: |
Mon, 15 Dec 2014 08:30:46 +0100 |
Author: bartpolot
Date: 2014-12-15 08:30:46 +0100 (Mon, 15 Dec 2014)
New Revision: 34621
Modified:
gnunet/src/cadet/gnunet-service-cadet_tunnel.c
gnunet/src/include/gnunet_constants.h
Log:
- fix cadet's overhead
Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2014-12-15 07:18:32 UTC
(rev 34620)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2014-12-15 07:30:46 UTC
(rev 34621)
@@ -2184,8 +2184,10 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, "init\n");
- expected_overhead =
- sizeof (struct GNUNET_CADET_Encrypted) + sizeof (struct GNUNET_CADET_Data);
+ expected_overhead = 0;
+ expected_overhead += sizeof (struct GNUNET_CADET_Encrypted);
+ expected_overhead += sizeof (struct GNUNET_CADET_Data);
+ expected_overhead += sizeof (struct GNUNET_CADET_ACK);
GNUNET_assert (GNUNET_CONSTANTS_CADET_P2P_OVERHEAD == expected_overhead);
if (GNUNET_OK !=
Modified: gnunet/src/include/gnunet_constants.h
===================================================================
--- gnunet/src/include/gnunet_constants.h 2014-12-15 07:18:32 UTC (rev
34620)
+++ gnunet/src/include/gnunet_constants.h 2014-12-15 07:30:46 UTC (rev
34621)
@@ -121,10 +121,14 @@
#define GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE (63 * 1024)
/**
- * Size of the CADET message overhead.
- * See gnunet-service-cadet_tunnel.c: GCT_init for more info.
+ * 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 92
+#define GNUNET_CONSTANTS_CADET_P2P_OVERHEAD 132
/**
* Maximum message size that can be sent on CADET.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34621 - in gnunet/src: cadet include,
gnunet <=