diff options
Diffstat (limited to 'src/setu/gnunet-service-setu_protocol.h')
-rw-r--r-- | src/setu/gnunet-service-setu_protocol.h | 78 |
1 files changed, 54 insertions, 24 deletions
diff --git a/src/setu/gnunet-service-setu_protocol.h b/src/setu/gnunet-service-setu_protocol.h index a2803ee47..c2a166e60 100644 --- a/src/setu/gnunet-service-setu_protocol.h +++ b/src/setu/gnunet-service-setu_protocol.h | |||
@@ -40,11 +40,6 @@ struct OperationRequestMessage | |||
40 | struct GNUNET_MessageHeader header; | 40 | struct GNUNET_MessageHeader header; |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * Operation to request, values from `enum GNUNET_SET_OperationType` | ||
44 | */ | ||
45 | uint32_t operation GNUNET_PACKED; | ||
46 | |||
47 | /** | ||
48 | * For Intersection: my element count | 43 | * For Intersection: my element count |
49 | */ | 44 | */ |
50 | uint32_t element_count GNUNET_PACKED; | 45 | uint32_t element_count GNUNET_PACKED; |
@@ -72,20 +67,9 @@ struct IBFMessage | |||
72 | struct GNUNET_MessageHeader header; | 67 | struct GNUNET_MessageHeader header; |
73 | 68 | ||
74 | /** | 69 | /** |
75 | * Order of the whole ibf, where | 70 | * Size of the whole ibf (number of buckets) |
76 | * num_buckets = 2^order | ||
77 | */ | ||
78 | uint8_t order; | ||
79 | |||
80 | /** | ||
81 | * Padding, must be 0. | ||
82 | */ | 71 | */ |
83 | uint8_t reserved1; | 72 | uint32_t ibf_size; |
84 | |||
85 | /** | ||
86 | * Padding, must be 0. | ||
87 | */ | ||
88 | uint16_t reserved2 GNUNET_PACKED; | ||
89 | 73 | ||
90 | /** | 74 | /** |
91 | * Offset of the strata in the rest of the message | 75 | * Offset of the strata in the rest of the message |
@@ -95,12 +79,25 @@ struct IBFMessage | |||
95 | /** | 79 | /** |
96 | * Salt used when hashing elements for this IBF. | 80 | * Salt used when hashing elements for this IBF. |
97 | */ | 81 | */ |
98 | uint32_t salt GNUNET_PACKED; | 82 | uint16_t salt GNUNET_PACKED; |
99 | 83 | ||
84 | /** | ||
85 | * The bit length of the counter | ||
86 | */ | ||
87 | uint16_t ibf_counter_bit_length; | ||
100 | /* rest: buckets */ | 88 | /* rest: buckets */ |
101 | }; | 89 | }; |
102 | 90 | ||
103 | 91 | ||
92 | /** | ||
93 | estimate_best_mode_of_operation (uint64_t avg_element_size, | ||
94 | uint64_t local_set_size, | ||
95 | uint64_t remote_set_size, | ||
96 | uint64_t est_set_diff_remote, | ||
97 | uint64_t est_set_diff_local,) | ||
98 | **/ | ||
99 | |||
100 | |||
104 | struct InquiryMessage | 101 | struct InquiryMessage |
105 | { | 102 | { |
106 | /** | 103 | /** |
@@ -113,11 +110,6 @@ struct InquiryMessage | |||
113 | */ | 110 | */ |
114 | uint32_t salt GNUNET_PACKED; | 111 | uint32_t salt GNUNET_PACKED; |
115 | 112 | ||
116 | /** | ||
117 | * Reserved, set to 0. | ||
118 | */ | ||
119 | uint32_t reserved GNUNET_PACKED; | ||
120 | |||
121 | /* rest: inquiry IBF keys */ | 113 | /* rest: inquiry IBF keys */ |
122 | }; | 114 | }; |
123 | 115 | ||
@@ -218,9 +210,47 @@ struct StrataEstimatorMessage | |||
218 | */ | 210 | */ |
219 | struct GNUNET_MessageHeader header; | 211 | struct GNUNET_MessageHeader header; |
220 | 212 | ||
213 | /** | ||
214 | * The number of ses transmitted | ||
215 | */ | ||
216 | uint8_t se_count; | ||
217 | |||
218 | /** | ||
219 | * Size of the local set | ||
220 | */ | ||
221 | uint64_t set_size; | 221 | uint64_t set_size; |
222 | }; | 222 | }; |
223 | 223 | ||
224 | |||
225 | /** | ||
226 | * Message which signals to other peer that we are sending full set | ||
227 | * | ||
228 | */ | ||
229 | struct TransmitFullMessage | ||
230 | { | ||
231 | /** | ||
232 | * Type: #GNUNET_MESSAGE_TYPE_SETU_P2P_SEND_FULL | ||
233 | */ | ||
234 | struct GNUNET_MessageHeader header; | ||
235 | |||
236 | /** | ||
237 | * Remote set difference calculated with strata estimator | ||
238 | */ | ||
239 | uint32_t remote_set_difference; | ||
240 | |||
241 | /** | ||
242 | * Total remote set size | ||
243 | */ | ||
244 | uint32_t remote_set_size; | ||
245 | |||
246 | /** | ||
247 | * Local set difference calculated with strata estimator | ||
248 | */ | ||
249 | uint32_t local_set_difference; | ||
250 | |||
251 | }; | ||
252 | |||
253 | |||
224 | GNUNET_NETWORK_STRUCT_END | 254 | GNUNET_NETWORK_STRUCT_END |
225 | 255 | ||
226 | #endif | 256 | #endif |