diff options
Diffstat (limited to 'src/include/gnunet_set_service.h')
-rw-r--r-- | src/include/gnunet_set_service.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/include/gnunet_set_service.h b/src/include/gnunet_set_service.h index 52613ad59..f9b477f47 100644 --- a/src/include/gnunet_set_service.h +++ b/src/include/gnunet_set_service.h | |||
@@ -153,6 +153,7 @@ enum GNUNET_SET_Status | |||
153 | }; | 153 | }; |
154 | 154 | ||
155 | 155 | ||
156 | |||
156 | /** | 157 | /** |
157 | * The way results are given to the client. | 158 | * The way results are given to the client. |
158 | */ | 159 | */ |
@@ -212,6 +213,54 @@ struct GNUNET_SET_Element | |||
212 | 213 | ||
213 | 214 | ||
214 | /** | 215 | /** |
216 | * Possible options to pass to a set operation. | ||
217 | * | ||
218 | * Used as tag for struct #GNUNET_SET_Option. | ||
219 | */ | ||
220 | enum GNUNET_SET_OptionType | ||
221 | { | ||
222 | /** | ||
223 | * Fail set operations when the other peer shows weird behavior | ||
224 | * that might by a Byzantine fault. | ||
225 | * | ||
226 | * For set union, 'v.num' is a lower bound on elements | ||
227 | * that the other peer must have in common with us. | ||
228 | */ | ||
229 | GNUNET_SET_OPTION_BYZANTINE=1, | ||
230 | /** | ||
231 | * Do not use the optimized set operation, but send full sets. | ||
232 | * Might trigger Byzantine fault detection. | ||
233 | */ | ||
234 | GNUNET_SET_OPTION_FORCE_FULL=2, | ||
235 | /** | ||
236 | * Only use optimized set operations, even though for this | ||
237 | * particular set operation they might be much slower. | ||
238 | * Might trigger Byzantine fault detection. | ||
239 | */ | ||
240 | GNUNET_SET_OPTION_FORCE_DELTA=4, | ||
241 | }; | ||
242 | |||
243 | |||
244 | /** | ||
245 | * Option for set operations. | ||
246 | */ | ||
247 | struct GNUNET_SET_Option | ||
248 | { | ||
249 | /** | ||
250 | * Type of the option. | ||
251 | */ | ||
252 | enum GNUNET_SET_OptionType type; | ||
253 | |||
254 | /** | ||
255 | * Value for the option, only used with some options. | ||
256 | */ | ||
257 | union { | ||
258 | uint64_t num; | ||
259 | } v; | ||
260 | }; | ||
261 | |||
262 | |||
263 | /** | ||
215 | * Continuation used for some of the set operations | 264 | * Continuation used for some of the set operations |
216 | * | 265 | * |
217 | * @param cls closure | 266 | * @param cls closure |
@@ -367,6 +416,7 @@ GNUNET_SET_prepare (const struct GNUNET_PeerIdentity *other_peer, | |||
367 | const struct GNUNET_HashCode *app_id, | 416 | const struct GNUNET_HashCode *app_id, |
368 | const struct GNUNET_MessageHeader *context_msg, | 417 | const struct GNUNET_MessageHeader *context_msg, |
369 | enum GNUNET_SET_ResultMode result_mode, | 418 | enum GNUNET_SET_ResultMode result_mode, |
419 | struct GNUNET_SET_Option options[], | ||
370 | GNUNET_SET_ResultIterator result_cb, | 420 | GNUNET_SET_ResultIterator result_cb, |
371 | void *result_cls); | 421 | void *result_cls); |
372 | 422 | ||
@@ -420,6 +470,7 @@ GNUNET_SET_listen_cancel (struct GNUNET_SET_ListenHandle *lh); | |||
420 | struct GNUNET_SET_OperationHandle * | 470 | struct GNUNET_SET_OperationHandle * |
421 | GNUNET_SET_accept (struct GNUNET_SET_Request *request, | 471 | GNUNET_SET_accept (struct GNUNET_SET_Request *request, |
422 | enum GNUNET_SET_ResultMode result_mode, | 472 | enum GNUNET_SET_ResultMode result_mode, |
473 | struct GNUNET_SET_Option options[], | ||
423 | GNUNET_SET_ResultIterator result_cb, | 474 | GNUNET_SET_ResultIterator result_cb, |
424 | void *result_cls); | 475 | void *result_cls); |
425 | 476 | ||