aboutsummaryrefslogtreecommitdiff
path: root/src/multicast
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-21 10:22:37 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-21 10:22:37 +0000
commitcf4e6f6646619f854cab70c117452d44e3355fb6 (patch)
tree8ec23ca6f76b123742b2f6b553b5a02164f49b8a /src/multicast
parent34ce99c24a0b09f119da24df01caefe387f36b80 (diff)
downloadgnunet-cf4e6f6646619f854cab70c117452d44e3355fb6.tar.gz
gnunet-cf4e6f6646619f854cab70c117452d44e3355fb6.zip
-more issues with multicast API
Diffstat (limited to 'src/multicast')
-rw-r--r--src/multicast/multicast.h67
-rw-r--r--src/multicast/multicast_api.c3
2 files changed, 65 insertions, 5 deletions
diff --git a/src/multicast/multicast.h b/src/multicast/multicast.h
index 5a18af461..95c989707 100644
--- a/src/multicast/multicast.h
+++ b/src/multicast/multicast.h
@@ -243,7 +243,9 @@ struct MulticastReplayRequestMessage
243{ 243{
244 244
245 /** 245 /**
246 * 246 * The message type can be either
247 * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST or
248 * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL.
247 */ 249 */
248 struct GNUNET_MessageHeader header; 250 struct GNUNET_MessageHeader header;
249 251
@@ -253,17 +255,17 @@ struct MulticastReplayRequestMessage
253 uint32_t uid; 255 uint32_t uid;
254 256
255 /** 257 /**
256 * 258 * ID of the message that is being requested.
257 */ 259 */
258 uint64_t message_id; 260 uint64_t message_id;
259 261
260 /** 262 /**
261 * 263 * Offset of the fragment that is being requested.
262 */ 264 */
263 uint64_t fragment_offset; 265 uint64_t fragment_offset;
264 266
265 /** 267 /**
266 * 268 * Additional flags for the request.
267 */ 269 */
268 uint64_t flags; 270 uint64_t flags;
269 271
@@ -271,6 +273,63 @@ struct MulticastReplayRequestMessage
271 273
272 274
273 275
276/**
277 * Message sent from the client to the service to unicast to the group origin.
278 */
279struct MulticastUnicastToOriginMessage
280{
281
282 /**
283 *
284 */
285 struct GNUNET_MessageHeader header;
286
287 /**
288 * Reserved (always 0).
289 */
290 uint32_t reserved;
291
292 /**
293 * Message ID.
294 */
295 uint64_t message_id;
296
297 /**
298 * Total message size.
299 */
300 uint64_t total_size;
301
302 /* followed by payload */
303
304};
305
306
307/**
308 * Message sent from the client to the service to
309 * cancel unicast to the group origin.
310 */
311struct MulticastUnicastToOriginCancelMessage
312{
313
314 /**
315 *
316 */
317 struct GNUNET_MessageHeader header;
318
319 /**
320 * Reserved (always 0).
321 */
322 uint32_t reserved;
323
324 /**
325 * Message ID.
326 */
327 uint64_t message_id;
328
329};
330
331
332
274 333
275 334
276GNUNET_NETWORK_STRUCT_END 335GNUNET_NETWORK_STRUCT_END
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c
index b8ee42cb3..cc2554c7d 100644
--- a/src/multicast/multicast_api.c
+++ b/src/multicast/multicast_api.c
@@ -515,7 +515,8 @@ struct GNUNET_MULTICAST_MemberRequestHandle
515 * 515 *
516 * @param member Membership handle. 516 * @param member Membership handle.
517 * @param message_id Application layer ID for the message. Opaque to multicast. 517 * @param message_id Application layer ID for the message. Opaque to multicast.
518 * @param size Number of bytes we want to send to origin. 518 * @param size Number of bytes we want to send to origin.
519 * FIXME: this should probably be a uint64_t?
519 * @param notify Callback to call to get the message. 520 * @param notify Callback to call to get the message.
520 * @param notify_cls Closure for @a notify. 521 * @param notify_cls Closure for @a notify.
521 * @return Handle to cancel request, NULL on error (i.e. request already pending). 522 * @return Handle to cancel request, NULL on error (i.e. request already pending).