From 644907f75bc0e24b1294f7cf39416b0e4216bcb3 Mon Sep 17 00:00:00 2001 From: Christian Fuchs Date: Mon, 7 Oct 2013 14:49:05 +0000 Subject: towards multipart messages --- src/scalarproduct/scalarproduct.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/scalarproduct/scalarproduct.h') diff --git a/src/scalarproduct/scalarproduct.h b/src/scalarproduct/scalarproduct.h index 18e782ac0..d476ae8ff 100644 --- a/src/scalarproduct/scalarproduct.h +++ b/src/scalarproduct/scalarproduct.h @@ -48,6 +48,11 @@ extern "C" */ #define PAILLIER_ELEMENT_LENGTH (2*KEYBITS/8 +1) +/** + * Maximum count of elements we can put into a multipart message + */ +#define MULTIPART_ELEMENT_CAPACITY ((GNUNET_SERVER_MAX_MESSAGE_SIZE - 1 - sizeof (struct GNUNET_SCALARPRODUCT_multipart_message)) / PAILLIER_ELEMENT_LENGTH) + /** * Log an error message at log-level 'level' that indicates * a failure of the command 'cmd' with the message given -- cgit v1.2.3