diff options
author | Gabor X Toth <*@tg-x.net> | 2013-09-27 10:13:36 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-09-27 10:13:36 +0000 |
commit | 7bbbb8a1f5725497b1edf68cba59529d95fe585d (patch) | |
tree | 339f5f6797c3eeb58c6abeda6e13005270dcbd44 /src/include/gnunet_multicast_service.h | |
parent | bcdae74167d2e1f9d8dd9b01fb368bf8bcc2287d (diff) | |
download | gnunet-7bbbb8a1f5725497b1edf68cba59529d95fe585d.tar.gz gnunet-7bbbb8a1f5725497b1edf68cba59529d95fe585d.zip |
multicast: simplistic origin_to_all() code to be able to test the psyc service
Diffstat (limited to 'src/include/gnunet_multicast_service.h')
-rw-r--r-- | src/include/gnunet_multicast_service.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h index d8d2866a7..ec446a906 100644 --- a/src/include/gnunet_multicast_service.h +++ b/src/include/gnunet_multicast_service.h | |||
@@ -476,10 +476,10 @@ GNUNET_MULTICAST_replay_response2 (struct GNUNET_MULTICAST_ReplayHandle *rh, | |||
476 | * @param cfg Configuration to use. | 476 | * @param cfg Configuration to use. |
477 | * @param priv_key ECC key that will be used to sign messages for this | 477 | * @param priv_key ECC key that will be used to sign messages for this |
478 | * multicast session; public key is used to identify the multicast group; | 478 | * multicast session; public key is used to identify the multicast group; |
479 | * @param last_fragment_id Last fragment ID to continue counting fragments from | 479 | * @param next_fragment_id Next fragment ID to continue counting fragments from |
480 | * when restarting the origin. 0 for a new group. | 480 | * when restarting the origin. 1 for a new group. |
481 | * @param join_cb Function called to approve / disapprove joining of a peer. | 481 | * @param join_cb Function called to approve / disapprove joining of a peer. |
482 | * @param test_cb Function multicast can use to test group membership. | 482 | * @param mem_test_cb Function multicast can use to test group membership. |
483 | * @param replay_frag_cb Function that can be called to replay a message fragment. | 483 | * @param replay_frag_cb Function that can be called to replay a message fragment. |
484 | * @param replay_msg_cb Function that can be called to replay a message. | 484 | * @param replay_msg_cb Function that can be called to replay a message. |
485 | * @param request_cb Function called with message fragments from group members. | 485 | * @param request_cb Function called with message fragments from group members. |
@@ -492,16 +492,16 @@ GNUNET_MULTICAST_replay_response2 (struct GNUNET_MULTICAST_ReplayHandle *rh, | |||
492 | struct GNUNET_MULTICAST_Origin * | 492 | struct GNUNET_MULTICAST_Origin * |
493 | GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | 493 | GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
494 | const struct GNUNET_CRYPTO_EccPrivateKey *priv_key, | 494 | const struct GNUNET_CRYPTO_EccPrivateKey *priv_key, |
495 | uint64_t last_fragment_id, | 495 | uint64_t next_fragment_id, |
496 | GNUNET_MULTICAST_JoinCallback join_cb, | 496 | GNUNET_MULTICAST_JoinCallback join_cb, |
497 | GNUNET_MULTICAST_MembershipTestCallback test_cb, | 497 | GNUNET_MULTICAST_MembershipTestCallback mem_test_cb, |
498 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb, | 498 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb, |
499 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb, | 499 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb, |
500 | GNUNET_MULTICAST_RequestCallback request_cb, | 500 | GNUNET_MULTICAST_RequestCallback request_cb, |
501 | GNUNET_MULTICAST_MessageCallback message_cb, | 501 | GNUNET_MULTICAST_MessageCallback message_cb, |
502 | void *cls); | 502 | void *cls); |
503 | 503 | ||
504 | /** | 504 | /** |
505 | * Function called to provide data for a transmission from the origin to all | 505 | * Function called to provide data for a transmission from the origin to all |
506 | * members. | 506 | * members. |
507 | * | 507 | * |
@@ -509,8 +509,6 @@ GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
509 | * invalidates the respective transmission handle. | 509 | * invalidates the respective transmission handle. |
510 | * | 510 | * |
511 | * @param cls Closure. | 511 | * @param cls Closure. |
512 | * @param fragment_id Set to the unique fragment ID that was generated for | ||
513 | * this message. | ||
514 | * @param[in,out] data_size Initially set to the number of bytes available in | 512 | * @param[in,out] data_size Initially set to the number of bytes available in |
515 | * @a data, should be set to the number of bytes written to data. | 513 | * @a data, should be set to the number of bytes written to data. |
516 | * @param[out] data Where to write the body of the message to give to the | 514 | * @param[out] data Where to write the body of the message to give to the |
@@ -524,7 +522,6 @@ GNUNET_MULTICAST_origin_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
524 | */ | 522 | */ |
525 | typedef int | 523 | typedef int |
526 | (*GNUNET_MULTICAST_OriginTransmitNotify) (void *cls, | 524 | (*GNUNET_MULTICAST_OriginTransmitNotify) (void *cls, |
527 | uint64_t fragment_id, | ||
528 | size_t *data_size, | 525 | size_t *data_size, |
529 | void *data); | 526 | void *data); |
530 | 527 | ||
@@ -591,7 +588,7 @@ GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin); | |||
591 | * @a message_cb is invoked with a (failure) response and then with NULL. If | 588 | * @a message_cb is invoked with a (failure) response and then with NULL. If |
592 | * the join succeeds, outstanding (state) messages and ongoing multicast | 589 | * the join succeeds, outstanding (state) messages and ongoing multicast |
593 | * messages will be given to the @a message_cb until the member decides to part | 590 | * messages will be given to the @a message_cb until the member decides to part |
594 | * the group. The @a test_cb and @a replay_cb functions may be called at | 591 | * the group. The @a mem_test_cb and @a replay_cb functions may be called at |
595 | * anytime by the multicast service to support relaying messages to other | 592 | * anytime by the multicast service to support relaying messages to other |
596 | * members of the group. | 593 | * members of the group. |
597 | * | 594 | * |
@@ -611,7 +608,7 @@ GNUNET_MULTICAST_origin_stop (struct GNUNET_MULTICAST_Origin *origin); | |||
611 | * identity/pseudonym to peer identity, application-level message to | 608 | * identity/pseudonym to peer identity, application-level message to |
612 | * origin, etc.). | 609 | * origin, etc.). |
613 | * @param join_cb Function called to approve / disapprove joining of a peer. | 610 | * @param join_cb Function called to approve / disapprove joining of a peer. |
614 | * @param test_cb Function multicast can use to test group membership. | 611 | * @param mem_test_cb Function multicast can use to test group membership. |
615 | * @param replay_frag_cb Function that can be called to replay message fragments | 612 | * @param replay_frag_cb Function that can be called to replay message fragments |
616 | * this peer already knows from this group. NULL if this | 613 | * this peer already knows from this group. NULL if this |
617 | * client is unable to support replay. | 614 | * client is unable to support replay. |
@@ -633,7 +630,7 @@ GNUNET_MULTICAST_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
633 | const struct GNUNET_PeerIdentity *relays, | 630 | const struct GNUNET_PeerIdentity *relays, |
634 | const struct GNUNET_MessageHeader *join_request, | 631 | const struct GNUNET_MessageHeader *join_request, |
635 | GNUNET_MULTICAST_JoinCallback join_cb, | 632 | GNUNET_MULTICAST_JoinCallback join_cb, |
636 | GNUNET_MULTICAST_MembershipTestCallback test_cb, | 633 | GNUNET_MULTICAST_MembershipTestCallback mem_test_cb, |
637 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb, | 634 | GNUNET_MULTICAST_ReplayFragmentCallback replay_frag_cb, |
638 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb, | 635 | GNUNET_MULTICAST_ReplayMessageCallback replay_msg_cb, |
639 | GNUNET_MULTICAST_MessageCallback message_cb, | 636 | GNUNET_MULTICAST_MessageCallback message_cb, |
@@ -719,8 +716,6 @@ GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *member); | |||
719 | * invalidates the respective transmission handle. | 716 | * invalidates the respective transmission handle. |
720 | * | 717 | * |
721 | * @param cls Closure. | 718 | * @param cls Closure. |
722 | * @param fragment_id Set to the unique fragment ID that was generated for | ||
723 | * this message. | ||
724 | * @param[in,out] data_size Initially set to the number of bytes available in | 719 | * @param[in,out] data_size Initially set to the number of bytes available in |
725 | * @a data, should be set to the number of bytes written to data. | 720 | * @a data, should be set to the number of bytes written to data. |
726 | * @param[out] data Where to write the body of the message to give to the | 721 | * @param[out] data Where to write the body of the message to give to the |
@@ -734,7 +729,6 @@ GNUNET_MULTICAST_member_part (struct GNUNET_MULTICAST_Member *member); | |||
734 | */ | 729 | */ |
735 | typedef int | 730 | typedef int |
736 | (*GNUNET_MULTICAST_MemberTransmitNotify) (void *cls, | 731 | (*GNUNET_MULTICAST_MemberTransmitNotify) (void *cls, |
737 | uint64_t fragment_id, | ||
738 | size_t *data_size, | 732 | size_t *data_size, |
739 | void *data); | 733 | void *data); |
740 | 734 | ||