aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_multicast_service.h
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2013-08-15 10:09:33 +0000
committerGabor X Toth <*@tg-x.net>2013-08-15 10:09:33 +0000
commit9b731d2b45c2ddc2ea24de7a0c87a672a6856f3a (patch)
tree70d1ad32b0500fb38af21e6916665c509090f269 /src/include/gnunet_multicast_service.h
parent5e7b0418545ff38967a2d2edc0ebab8e8030f336 (diff)
downloadgnunet-9b731d2b45c2ddc2ea24de7a0c87a672a6856f3a.tar.gz
gnunet-9b731d2b45c2ddc2ea24de7a0c87a672a6856f3a.zip
psycstore: added state_hash_update() and counters_get(); psyc: async state_get*(); multicast: membership test & replay params
Diffstat (limited to 'src/include/gnunet_multicast_service.h')
-rw-r--r--src/include/gnunet_multicast_service.h37
1 files changed, 31 insertions, 6 deletions
diff --git a/src/include/gnunet_multicast_service.h b/src/include/gnunet_multicast_service.h
index b4f9bc099..23d871a39 100644
--- a/src/include/gnunet_multicast_service.h
+++ b/src/include/gnunet_multicast_service.h
@@ -394,7 +394,7 @@ struct GNUNET_MULTICAST_MembershipTestHandle;
394 394
395 395
396/** 396/**
397 * Call informing multicast about the decision taken for membership test. 397 * Call informing multicast about the decision taken for a membership test.
398 * 398 *
399 * @param mth Handle that was given for the query. 399 * @param mth Handle that was given for the query.
400 * @param result #GNUNET_YES if peer was a member, #GNUNET_NO if peer was not a member, 400 * @param result #GNUNET_YES if peer was a member, #GNUNET_NO if peer was not a member,
@@ -412,14 +412,18 @@ GNUNET_MULTICAST_membership_test_result (struct GNUNET_MULTICAST_MembershipTestH
412 * message can be replayed. 412 * message can be replayed.
413 * 413 *
414 * @param cls Closure. 414 * @param cls Closure.
415 * @param member_id Identity of the member that we want to test. 415 * @param member_key Identity of the member that we want to test.
416 * @param fragment_id Message fragment ID for which we want to do the test. 416 * @param message_id Message ID for which to perform the test.
417 * @param group_generation Group generation of the message. It has relevance if
418 * the message consists of multiple fragments with different group
419 * generations.
417 * @param mth Handle to give to GNUNET_MULTICAST_membership_test_answer(). 420 * @param mth Handle to give to GNUNET_MULTICAST_membership_test_answer().
418 */ 421 */
419typedef void 422typedef void
420(*GNUNET_MULTICAST_MembershipTestCallback) (void *cls, 423(*GNUNET_MULTICAST_MembershipTestCallback) (void *cls,
421 const struct GNUNET_CRYPTO_EccPublicKey *member_key, 424 const struct GNUNET_CRYPTO_EccPublicKey *member_key,
422 uint64_t fragment_id, 425 uint64_t message_id,
426 uint64_t group_generation,
423 struct GNUNET_MULTICAST_MembershipTestHandle *mth); 427 struct GNUNET_MULTICAST_MembershipTestHandle *mth);
424 428
425 429
@@ -472,13 +476,17 @@ struct GNUNET_MULTICAST_ReplayHandle;
472 * group is left, the replay handle must no longer be used. 476 * group is left, the replay handle must no longer be used.
473 * 477 *
474 * @param cls Closure (set from GNUNET_MULTICAST_origin_start() 478 * @param cls Closure (set from GNUNET_MULTICAST_origin_start()
475 * or GNUNET_MULTICAST_member_join()). 479 * or GNUNET_MULTICAST_member_join()).
476 * @param fragment_id Which message fragment should be replayed. 480 * @param fragment_id Which message fragment should be replayed.
481 * @param message_id Which message should be replayed.
482 * @param flags Flags for the replay.
477 * @param rh Handle to pass to message transmit function. 483 * @param rh Handle to pass to message transmit function.
478 */ 484 */
479typedef void 485typedef void
480(*GNUNET_MULTICAST_ReplayCallback) (void *cls, 486(*GNUNET_MULTICAST_ReplayCallback) (void *cls,
481 uint64_t fragment_id, 487 uint64_t fragment_id,
488 uint64_t message_id,
489 uint64_t flags,
482 struct GNUNET_MULTICAST_ReplayHandle *rh); 490 struct GNUNET_MULTICAST_ReplayHandle *rh);
483 491
484 492
@@ -517,6 +525,9 @@ enum GNUNET_MULTICAST_ReplayErrorCode
517/** 525/**
518 * Replay a message from the multicast group. 526 * Replay a message from the multicast group.
519 * 527 *
528 * FIXME: use notify callbacks here too (or in a replay2() function),
529 * to be able to use the replay functionality for state sync as well.
530 *
520 * @param rh Replay handle identifying which replay operation was requested. 531 * @param rh Replay handle identifying which replay operation was requested.
521 * @param msg Replayed message fragment, NULL if unknown/error. 532 * @param msg Replayed message fragment, NULL if unknown/error.
522 * @param ec Error code. 533 * @param ec Error code.
@@ -545,6 +556,9 @@ GNUNET_MULTICAST_replay (struct GNUNET_MULTICAST_ReplayHandle *rh,
545 * FIXME: we'll likely want to use NOT the p521 curve here, but a cheaper 556 * FIXME: we'll likely want to use NOT the p521 curve here, but a cheaper
546 * one in the future. 557 * one in the future.
547 * @param policy Group policy specifying join and history restrictions. 558 * @param policy Group policy specifying join and history restrictions.
559 * FIXME: needed? Ít would be enough to have this on the PSYC layer, as
560 * access control to enforce the policy is done by the membership test
561 * and join request callbacks of the API.
548 * @param last_fragment_id Last fragment ID to continue counting fragments from 562 * @param last_fragment_id Last fragment ID to continue counting fragments from
549 * when restarting the origin. 0 for a new group. 563 * when restarting the origin. 0 for a new group.
550 * @param join_cb Function called to approve / disapprove joining of a peer. 564 * @param join_cb Function called to approve / disapprove joining of a peer.
@@ -689,14 +703,25 @@ struct GNUNET_MULTICAST_MemberReplayHandle;
689 * needed and not known to the client. 703 * needed and not known to the client.
690 * 704 *
691 * @param member Membership handle. 705 * @param member Membership handle.
692 * @param message_id ID of a message that this client would like to see replayed. 706 * @param fragment_id ID of a message fragment that this client would like to
707 see replayed.
708 * @param message_id ID of a message that this client would like to see
709 * replayed. Typically only one of the @a fragment_id and @a message_id
710 * is given. Specifying a @a message_id would return the last fragment
711 * of the message, which allows requesting the preceding fragments of the
712 * message by looking at the @e fragment_delta header field.
713 * @param flags Additional flags for the replay request. It is used & defined
714 * by the replay callback. E.g. the PSYC service would use this to
715 * implement state synchronization.
693 * @param message_cb Function to be called for the replayed message. 716 * @param message_cb Function to be called for the replayed message.
694 * @param message_cb_cls Closure for @a message_cb. 717 * @param message_cb_cls Closure for @a message_cb.
695 * @return Replay request handle, NULL on error. 718 * @return Replay request handle, NULL on error.
696 */ 719 */
697struct GNUNET_MULTICAST_MemberReplayHandle * 720struct GNUNET_MULTICAST_MemberReplayHandle *
698GNUNET_MULTICAST_member_request_replay (struct GNUNET_MULTICAST_Member *member, 721GNUNET_MULTICAST_member_request_replay (struct GNUNET_MULTICAST_Member *member,
722 uint64_t fragment_id,
699 uint64_t message_id, 723 uint64_t message_id,
724 uint64_t flags,
700 GNUNET_MULTICAST_MessageCallback message_cb, 725 GNUNET_MULTICAST_MessageCallback message_cb,
701 void *message_cb_cls); 726 void *message_cb_cls);
702 727