diff options
author | Gabor X Toth <*@tg-x.net> | 2014-05-26 22:16:05 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2014-05-26 22:16:05 +0000 |
commit | 83495695331fcfa8824d7a6d407b82cfcfc8b13c (patch) | |
tree | 2d2a7717d81890f5142da9561bccf9e164b1deee /src/multicast/multicast.h | |
parent | 1cfab01aaea932539c39dcb2118ec4d6c6d44381 (diff) |
psyc, multicast: join decision, tests
Diffstat (limited to 'src/multicast/multicast.h')
-rw-r--r-- | src/multicast/multicast.h | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/src/multicast/multicast.h b/src/multicast/multicast.h index 85c5714e6e..76492e868e 100644 --- a/src/multicast/multicast.h +++ b/src/multicast/multicast.h @@ -77,7 +77,7 @@ struct MulticastJoinRequestMessage /** - * Header of a join decision sent to a remote peer. + * Header of a join decision message sent to a peer requesting join. */ struct MulticastJoinDecisionMessage { @@ -87,19 +87,28 @@ struct MulticastJoinDecisionMessage struct GNUNET_MessageHeader header; /** - * #GNUNET_YES if the peer was admitted. + * #GNUNET_YES if the peer was admitted + * #GNUNET_NO if entry was refused, + * #GNUNET_SYSERR if the request could not be answered. */ - uint8_t is_admitted; + int32_t is_admitted; + + /** + * Number of relays given. + */ + uint32_t relay_count; + + /* Followed by relay_count peer identities */ /* Followed by the join response message */ }; /** - * Message sent from the client to the service to notify the service - * about a join decision. + * Header added to a struct MulticastJoinDecisionMessage + * when sent between the client and service. */ -struct MulticastClientJoinDecisionMessage +struct MulticastJoinDecisionMessageHeader { /** * Type: GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION @@ -107,29 +116,18 @@ struct MulticastClientJoinDecisionMessage struct GNUNET_MessageHeader header; /** - * Number of relays given. + * C->S: Peer to send the join decision to. + * S->C: Peer we received the join decision from. */ - uint32_t relay_count; + struct GNUNET_PeerIdentity peer; /** - * Public key of the joining member. + * C->S: Public key of the member requesting join. + * S->C: Unused. */ struct GNUNET_CRYPTO_EddsaPublicKey member_key; - /** - * Peer identity of the joining member. - */ - struct GNUNET_PeerIdentity member_peer; - - /** - * #GNUNET_YES if the peer was admitted. - */ - uint8_t is_admitted; - - /* Followed by relay_count peer identities */ - - /* Followed by the join response message */ - + /* Followed by struct MulticastJoinDecisionMessage */ }; @@ -139,7 +137,6 @@ struct MulticastClientJoinDecisionMessage */ struct MulticastMembershipTestResultMessage { - /** * Type: GNUNET_MESSAGE_TYPE_MULTICAST_MEMBERSHIP_TEST_RESULT */ @@ -151,11 +148,11 @@ struct MulticastMembershipTestResultMessage uint32_t uid; /** - * #GNUNET_YES if the peer is a member, #GNUNET_NO if peer was not a member, - * #GNUNET_SYSERR if we cannot answer the test. + * #GNUNET_YES if the peer is a member + * #GNUNET_NO if peer is not a member, + * #GNUNET_SYSERR if the test could not be answered. */ int32_t is_admitted; - }; |