diff options
Diffstat (limited to 'src/setu/gnunet-service-setu_protocol.h')
-rw-r--r-- | src/setu/gnunet-service-setu_protocol.h | 77 |
1 files changed, 53 insertions, 24 deletions
diff --git a/src/setu/gnunet-service-setu_protocol.h b/src/setu/gnunet-service-setu_protocol.h index a2803ee47..d8f34f69c 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,10 +79,22 @@ 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 lenght of the counter | ||
86 | */ | ||
87 | uint16_t ibf_counter_bit_length; | ||
100 | /* rest: buckets */ | 88 | /* rest: buckets */ |
101 | }; | 89 | }; |
90 | /** | ||
91 | estimate_best_mode_of_operation (uint64_t avg_element_size, | ||
92 | uint64_t local_set_size, | ||
93 | uint64_t remote_set_size, | ||
94 | uint64_t est_set_diff_remote, | ||
95 | uint64_t est_set_diff_local,) | ||
96 | **/ | ||
97 | |||
102 | 98 | ||
103 | 99 | ||
104 | struct InquiryMessage | 100 | struct InquiryMessage |
@@ -113,11 +109,6 @@ struct InquiryMessage | |||
113 | */ | 109 | */ |
114 | uint32_t salt GNUNET_PACKED; | 110 | uint32_t salt GNUNET_PACKED; |
115 | 111 | ||
116 | /** | ||
117 | * Reserved, set to 0. | ||
118 | */ | ||
119 | uint32_t reserved GNUNET_PACKED; | ||
120 | |||
121 | /* rest: inquiry IBF keys */ | 112 | /* rest: inquiry IBF keys */ |
122 | }; | 113 | }; |
123 | 114 | ||
@@ -218,9 +209,47 @@ struct StrataEstimatorMessage | |||
218 | */ | 209 | */ |
219 | struct GNUNET_MessageHeader header; | 210 | struct GNUNET_MessageHeader header; |
220 | 211 | ||
212 | /** | ||
213 | * The number of ses transmitted | ||
214 | */ | ||
215 | uint8_t se_count; | ||
216 | |||
217 | /** | ||
218 | * Size of the local set | ||
219 | */ | ||
221 | uint64_t set_size; | 220 | uint64_t set_size; |
222 | }; | 221 | }; |
223 | 222 | ||
223 | |||
224 | /** | ||
225 | * Message which signals to other peer that we are sending full set | ||
226 | * | ||
227 | */ | ||
228 | struct TransmitFullMessage | ||
229 | { | ||
230 | /** | ||
231 | * Type: #GNUNET_MESSAGE_TYPE_SETU_P2P_SEND_FULL | ||
232 | */ | ||
233 | struct GNUNET_MessageHeader header; | ||
234 | |||
235 | /** | ||
236 | * Remote set difference calculated with strata estimator | ||
237 | */ | ||
238 | uint32_t remote_set_difference; | ||
239 | |||
240 | /** | ||
241 | * Total remote set size | ||
242 | */ | ||
243 | uint32_t remote_set_size; | ||
244 | |||
245 | /** | ||
246 | * Local set difference calculated with strata estimator | ||
247 | */ | ||
248 | uint32_t local_set_difference; | ||
249 | |||
250 | }; | ||
251 | |||
252 | |||
224 | GNUNET_NETWORK_STRUCT_END | 253 | GNUNET_NETWORK_STRUCT_END |
225 | 254 | ||
226 | #endif | 255 | #endif |