diff options
author | Gabor X Toth <*@tg-x.net> | 2013-07-25 13:45:59 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-07-25 13:45:59 +0000 |
commit | 355a2417dd8c39be10217b662fee68b6bf4fa7b3 (patch) | |
tree | 5f9ba5536402b67b9480441cd68ac9400667124d /src/include/gnunet_multicast_service.h | |
parent | 49f7cc3810db46c500de524e3227d04b47adc8e3 (diff) | |
download | gnunet-355a2417dd8c39be10217b662fee68b6bf4fa7b3.tar.gz gnunet-355a2417dd8c39be10217b662fee68b6bf4fa7b3.zip |
multicast: message_cb and last_fragment_id for origin_start(); env lib: indicating state reset
Diffstat (limited to 'src/include/gnunet_multicast_service.h')
-rw-r--r-- | src/include/gnunet_multicast_service.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h index 202d2f26b..a5d7411c3 100644 --- a/src/include/gnunet_multicast_service.h +++ b/src/include/gnunet_multicast_service.h | |||
@@ -163,9 +163,15 @@ struct GNUNET_MULTICAST_MessageHeader | |||
163 | uint64_t message_id GNUNET_PACKED; | 163 | uint64_t message_id GNUNET_PACKED; |
164 | 164 | ||
165 | /** | 165 | /** |
166 | * Byte offset of this @e fragment of the @e message. | 166 | * Number of fragments before the current one that has the same @a message_id. |
167 | * | 167 | * |
168 | * FIXME: needed? | 168 | * 0 for the first fragment of a message. |
169 | * This allows replaying a message with all of its fragments. | ||
170 | */ | ||
171 | uint64_t fragment_delta GNUNET_PACKED; | ||
172 | |||
173 | /** | ||
174 | * Byte offset of this @e fragment of the @e message. | ||
169 | */ | 175 | */ |
170 | uint64_t fragment_offset GNUNET_PACKED; | 176 | uint64_t fragment_offset GNUNET_PACKED; |
171 | 177 | ||
@@ -473,10 +479,15 @@ GNUNET_MULTICAST_replay (struct GNUNET_MULTICAST_ReplayHandle *rh, | |||
473 | * multicast group; FIXME: we'll likely want to use | 479 | * multicast group; FIXME: we'll likely want to use |
474 | * NOT the p521 curve here, but a cheaper one in the future. | 480 | * NOT the p521 curve here, but a cheaper one in the future. |
475 | * @param join_policy What is the membership policy of the group? | 481 | * @param join_policy What is the membership policy of the group? |
482 | * @param last_fragment_id Last fragment ID to continue counting fragments from | ||
483 | * when restarting the origin. 0 for a new group. | ||
476 | * @param replay_cb Function that can be called to replay a message. | 484 | * @param replay_cb Function that can be called to replay a message. |
477 | * @param test_cb Function multicast can use to test group membership. | 485 | * @param test_cb Function multicast can use to test group membership. |
478 | * @param join_cb Function called to approve / disapprove joining of a peer. | 486 | * @param join_cb Function called to approve / disapprove joining of a peer. |
479 | * @param request_cb Function called with messages from group members. | 487 | * @param request_cb Function called with message fragments from group members. |
488 | * @param message_cb Function called with the message fragments sent to the | ||
489 | * network by GNUNET_MULTICAST_origin_to_all(). These message | ||
490 | * fragments should be stored for answering replay requests later. | ||
480 | * @return Handle for the origin, NULL on error. | 491 | * @return Handle for the origin, NULL on error. |
481 | */ | 492 | */ |
482 | struct GNUNET_MULTICAST_Origin * | 493 | struct GNUNET_MULTICAST_Origin * |
@@ -484,10 +495,12 @@ GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
484 | void *cls, | 495 | void *cls, |
485 | const struct GNUNET_CRYPTO_EccPrivateKey *priv_key, | 496 | const struct GNUNET_CRYPTO_EccPrivateKey *priv_key, |
486 | enum GNUNET_MULTICAST_JoinPolicy join_policy, | 497 | enum GNUNET_MULTICAST_JoinPolicy join_policy, |
498 | uint64_t last_fragment_id, | ||
487 | GNUNET_MULITCAST_ReplayCallback replay_cb, | 499 | GNUNET_MULITCAST_ReplayCallback replay_cb, |
488 | GNUNET_MULITCAST_MembershipTestCallback test_cb, | 500 | GNUNET_MULITCAST_MembershipTestCallback test_cb, |
489 | GNUNET_MULTICAST_JoinCallback join_cb, | 501 | GNUNET_MULTICAST_JoinCallback join_cb, |
490 | GNUNET_MULTICAST_RequestCallback request_cb); | 502 | GNUNET_MULTICAST_RequestCallback request_cb, |
503 | GNUNET_MULTICAST_MessageCallback message_cb); | ||
491 | 504 | ||
492 | 505 | ||
493 | /** | 506 | /** |
@@ -595,14 +608,14 @@ struct GNUNET_MULTICAST_MemberReplayHandle; | |||
595 | * needed and not known to the client. | 608 | * needed and not known to the client. |
596 | * | 609 | * |
597 | * @param member Membership handle. | 610 | * @param member Membership handle. |
598 | * @param fragment_id ID of a message fragment that this client would like to see replayed. | 611 | * @param message_id ID of a message that this client would like to see replayed. |
599 | * @param message_cb Function to be called for the replayed message. | 612 | * @param message_cb Function to be called for the replayed message. |
600 | * @param message_cb_cls Closure for @a message_cb. | 613 | * @param message_cb_cls Closure for @a message_cb. |
601 | * @return Replay request handle, NULL on error. | 614 | * @return Replay request handle, NULL on error. |
602 | */ | 615 | */ |
603 | struct GNUNET_MULTICAST_MemberReplayHandle * | 616 | struct GNUNET_MULTICAST_MemberReplayHandle * |
604 | GNUNET_MULTICAST_member_request_replay (struct GNUNET_MULTICAST_Member *member, | 617 | GNUNET_MULTICAST_member_request_replay (struct GNUNET_MULTICAST_Member *member, |
605 | uint64_t fragment_id, | 618 | uint64_t message_id, |
606 | GNUNET_MULTICAST_MessageCallback message_cb, | 619 | GNUNET_MULTICAST_MessageCallback message_cb, |
607 | void *message_cb_cls); | 620 | void *message_cb_cls); |
608 | 621 | ||