diff options
author | Gabor X Toth <*@tg-x.net> | 2013-08-12 17:45:22 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-08-12 17:45:22 +0000 |
commit | d734cfd6677de174aa51a07437b0e0cae4c870be (patch) | |
tree | de71c19dafb8dcc078c2b2efd971bfeb62d50b80 | |
parent | 544201a6bb7ec4480619f576f388d84883895de0 (diff) | |
download | gnunet-d734cfd6677de174aa51a07437b0e0cae4c870be.tar.gz gnunet-d734cfd6677de174aa51a07437b0e0cae4c870be.zip |
psyc/social: transmit/announcement flags; multicast: re-added sig. purpose
-rw-r--r-- | src/include/gnunet_multicast_service.h | 15 | ||||
-rw-r--r-- | src/include/gnunet_psyc_service.h | 29 | ||||
-rw-r--r-- | src/include/gnunet_social_service.h | 20 |
3 files changed, 54 insertions, 10 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h index 418afd34b..b4f9bc099 100644 --- a/src/include/gnunet_multicast_service.h +++ b/src/include/gnunet_multicast_service.h | |||
@@ -171,6 +171,11 @@ struct GNUNET_MULTICAST_MessageHeader | |||
171 | struct GNUNET_CRYPTO_EccSignature signature; | 171 | struct GNUNET_CRYPTO_EccSignature signature; |
172 | 172 | ||
173 | /** | 173 | /** |
174 | * Purpose for the signature and size of the signed data. | ||
175 | */ | ||
176 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; | ||
177 | |||
178 | /** | ||
174 | * Number of the message fragment, monotonically increasing. | 179 | * Number of the message fragment, monotonically increasing. |
175 | */ | 180 | */ |
176 | uint64_t fragment_id GNUNET_PACKED; | 181 | uint64_t fragment_id GNUNET_PACKED; |
@@ -244,6 +249,11 @@ struct GNUNET_MULTICAST_RequestHeader | |||
244 | struct GNUNET_CRYPTO_EccSignature signature; | 249 | struct GNUNET_CRYPTO_EccSignature signature; |
245 | 250 | ||
246 | /** | 251 | /** |
252 | * Purpose for the signature and size of the signed data. | ||
253 | */ | ||
254 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; | ||
255 | |||
256 | /** | ||
247 | * Number of the request fragment, monotonically increasing. | 257 | * Number of the request fragment, monotonically increasing. |
248 | */ | 258 | */ |
249 | uint64_t fragment_id GNUNET_PACKED; | 259 | uint64_t fragment_id GNUNET_PACKED; |
@@ -291,6 +301,11 @@ struct GNUNET_MULTICAST_JoinRequest { | |||
291 | */ | 301 | */ |
292 | struct GNUNET_CRYPTO_EccSignature signature; | 302 | struct GNUNET_CRYPTO_EccSignature signature; |
293 | 303 | ||
304 | /** | ||
305 | * Purpose for the signature and size of the signed data. | ||
306 | */ | ||
307 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; | ||
308 | |||
294 | /** | 309 | /** |
295 | * Public key of the target group. | 310 | * Public key of the target group. |
296 | */ | 311 | */ |
diff --git a/src/include/gnunet_psyc_service.h b/src/include/gnunet_psyc_service.h index 3c01ab480..ceb8290c2 100644 --- a/src/include/gnunet_psyc_service.h +++ b/src/include/gnunet_psyc_service.h | |||
@@ -287,6 +287,26 @@ typedef int | |||
287 | void *data); | 287 | void *data); |
288 | 288 | ||
289 | 289 | ||
290 | |||
291 | /** | ||
292 | * Flags for transmitting messages to a channel by the master. | ||
293 | */ | ||
294 | enum GNUNET_PSYC_MasterTransmitFlags | ||
295 | { | ||
296 | /** | ||
297 | * Whether this message should reset the channel state, | ||
298 | * i.e. remove all previously stored state variables. | ||
299 | */ | ||
300 | GNUNET_PSYC_MASTER_TRANSMIT_RESET_STATE = 1 << 0, | ||
301 | |||
302 | /** | ||
303 | * Whether we need to increment the group generation counter after | ||
304 | * transmitting this message. | ||
305 | */ | ||
306 | GNUNET_PSYC_MASTER_TRANSMIT_INC_GROUP_GEN = 1 << 1, | ||
307 | }; | ||
308 | |||
309 | |||
290 | /** | 310 | /** |
291 | * Handle for a pending PSYC transmission operation. | 311 | * Handle for a pending PSYC transmission operation. |
292 | */ | 312 | */ |
@@ -302,11 +322,7 @@ struct GNUNET_PSYC_MasterTransmitHandle; | |||
302 | * for the message, or NULL. | 322 | * for the message, or NULL. |
303 | * @param notify Function to call to obtain the arguments. | 323 | * @param notify Function to call to obtain the arguments. |
304 | * @param notify_cls Closure for @a notify. | 324 | * @param notify_cls Closure for @a notify. |
305 | * @param reset_state #GNUNET_YES if this message should reset the channel | 325 | * @param flags Flags for the message being transmitted. |
306 | * state, i.e. remove all previously stored state variables. | ||
307 | * #GNUNET_NO to keep the state as is. | ||
308 | * @param increment_group_generation #GNUNET_YES if we need to increment | ||
309 | * the group generation counter after transmitting this message. | ||
310 | * @return Transmission handle, NULL on error (i.e. more than one request queued). | 326 | * @return Transmission handle, NULL on error (i.e. more than one request queued). |
311 | */ | 327 | */ |
312 | struct GNUNET_PSYC_MasterTransmitHandle * | 328 | struct GNUNET_PSYC_MasterTransmitHandle * |
@@ -315,8 +331,7 @@ GNUNET_PSYC_master_transmit (struct GNUNET_PSYC_Master *master, | |||
315 | const struct GNUNET_ENV_Environment *env, | 331 | const struct GNUNET_ENV_Environment *env, |
316 | GNUNET_PSYC_MasterReadyNotify notify, | 332 | GNUNET_PSYC_MasterReadyNotify notify, |
317 | void *notify_cls, | 333 | void *notify_cls, |
318 | int reset_state, | 334 | enum GNUNET_PSYC_TransmitFlags flags); |
319 | int increment_group_generation); | ||
320 | 335 | ||
321 | 336 | ||
322 | /** | 337 | /** |
diff --git a/src/include/gnunet_social_service.h b/src/include/gnunet_social_service.h index 079290a3a..8a7e1362d 100644 --- a/src/include/gnunet_social_service.h +++ b/src/include/gnunet_social_service.h | |||
@@ -331,6 +331,21 @@ GNUNET_SOCIAL_home_advertise (struct GNUNET_SOCIAL_Home *home, | |||
331 | GNUNET_TIME_Relative expiration_time); | 331 | GNUNET_TIME_Relative expiration_time); |
332 | 332 | ||
333 | 333 | ||
334 | /** | ||
335 | * Flags for announcements in a home. | ||
336 | */ | ||
337 | enum GNUNET_PSYC_AnnouncementFlags | ||
338 | { | ||
339 | /** | ||
340 | * Whether this announcement removes all objects from the home. | ||
341 | * | ||
342 | * New objects can be still added to the now empty home using the @e env | ||
343 | * parameter of the same announcement. | ||
344 | */ | ||
345 | GNUNET_SOCIAL_ANNOUNCEMENT_CLEAR_OBJECTS = 1 << 0, | ||
346 | }; | ||
347 | |||
348 | |||
334 | /** | 349 | /** |
335 | * Handle for an announcement request. | 350 | * Handle for an announcement request. |
336 | */ | 351 | */ |
@@ -349,8 +364,7 @@ struct GNUNET_SOCIAL_Announcement; | |||
349 | * objects of the home, or NULL. | 364 | * objects of the home, or NULL. |
350 | * @param notify Function to call to get the payload of the announcement. | 365 | * @param notify Function to call to get the payload of the announcement. |
351 | * @param notify_cls Closure for @a notify. | 366 | * @param notify_cls Closure for @a notify. |
352 | * @param clear_objects #GNUNET_YES to remove all objects from the home, #GNUNET_NO otherwise. | 367 | * @param flags Flags for this announcement. |
353 | * New objects can be added to the now empty home using the @a env parameter. | ||
354 | * @return NULL on error (announcement already in progress?). | 368 | * @return NULL on error (announcement already in progress?). |
355 | */ | 369 | */ |
356 | struct GNUNET_SOCIAL_Announcement * | 370 | struct GNUNET_SOCIAL_Announcement * |
@@ -359,7 +373,7 @@ GNUNET_SOCIAL_home_announce (struct GNUNET_SOCIAL_Home *home, | |||
359 | const struct GNUNET_ENV_Environment *env, | 373 | const struct GNUNET_ENV_Environment *env, |
360 | GNUNET_CONNECTION_TransmitReadyNotify notify, | 374 | GNUNET_CONNECTION_TransmitReadyNotify notify, |
361 | void *notify_cls, | 375 | void *notify_cls, |
362 | int clear_objects); | 376 | GNUNET_SOCIAL_AnnouncementFlags flags); |
363 | 377 | ||
364 | 378 | ||
365 | /** | 379 | /** |