aboutsummaryrefslogtreecommitdiff
path: root/src/set/gnunet-service-set_protocol.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-11-27 20:17:24 +0000
committerChristian Grothoff <christian@grothoff.org>2014-11-27 20:17:24 +0000
commitf23525cfc0c0a8931db0b20b35c1aabbfbc5ac4e (patch)
tree3ef89bce9f65613c8f697c04b4280e14091d1ace /src/set/gnunet-service-set_protocol.h
parent1dc3a88ad71d1ca99bed5d38977d69f88de3d253 (diff)
downloadgnunet-f23525cfc0c0a8931db0b20b35c1aabbfbc5ac4e.tar.gz
gnunet-f23525cfc0c0a8931db0b20b35c1aabbfbc5ac4e.zip
use separate struct for just sending #elements in set, and check message size before casting
Diffstat (limited to 'src/set/gnunet-service-set_protocol.h')
-rw-r--r--src/set/gnunet-service-set_protocol.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/set/gnunet-service-set_protocol.h b/src/set/gnunet-service-set_protocol.h
index 73332b4c3..f02c61718 100644
--- a/src/set/gnunet-service-set_protocol.h
+++ b/src/set/gnunet-service-set_protocol.h
@@ -95,6 +95,29 @@ struct IBFMessage
95}; 95};
96 96
97 97
98/**
99 * During intersection, the first (and possibly second) message
100 * send it the number of elements in the set, to allow the peers
101 * to decide who should start with the Bloom filter.
102 */
103struct IntersectionElementInfoMessage
104{
105 /**
106 * Type: #GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_ELEMENT_INFO
107 */
108 struct GNUNET_MessageHeader header;
109
110 /**
111 * mutator used with this bloomfilter.
112 */
113 uint32_t sender_element_count GNUNET_PACKED;
114
115};
116
117
118/**
119 * Bloom filter messages exchanged for set intersection calculation.
120 */
98struct BFMessage 121struct BFMessage
99{ 122{
100 /** 123 /**