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) | |
download | gnunet-83495695331fcfa8824d7a6d407b82cfcfc8b13c.tar.gz gnunet-83495695331fcfa8824d7a6d407b82cfcfc8b13c.zip |
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 85c5714e6..76492e868 100644 --- a/src/multicast/multicast.h +++ b/src/multicast/multicast.h | |||
@@ -77,7 +77,7 @@ struct MulticastJoinRequestMessage | |||
77 | 77 | ||
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Header of a join decision sent to a remote peer. | 80 | * Header of a join decision message sent to a peer requesting join. |
81 | */ | 81 | */ |
82 | struct MulticastJoinDecisionMessage | 82 | struct MulticastJoinDecisionMessage |
83 | { | 83 | { |
@@ -87,19 +87,28 @@ struct MulticastJoinDecisionMessage | |||
87 | struct GNUNET_MessageHeader header; | 87 | struct GNUNET_MessageHeader header; |
88 | 88 | ||
89 | /** | 89 | /** |
90 | * #GNUNET_YES if the peer was admitted. | 90 | * #GNUNET_YES if the peer was admitted |
91 | * #GNUNET_NO if entry was refused, | ||
92 | * #GNUNET_SYSERR if the request could not be answered. | ||
91 | */ | 93 | */ |
92 | uint8_t is_admitted; | 94 | int32_t is_admitted; |
95 | |||
96 | /** | ||
97 | * Number of relays given. | ||
98 | */ | ||
99 | uint32_t relay_count; | ||
100 | |||
101 | /* Followed by relay_count peer identities */ | ||
93 | 102 | ||
94 | /* Followed by the join response message */ | 103 | /* Followed by the join response message */ |
95 | }; | 104 | }; |
96 | 105 | ||
97 | 106 | ||
98 | /** | 107 | /** |
99 | * Message sent from the client to the service to notify the service | 108 | * Header added to a struct MulticastJoinDecisionMessage |
100 | * about a join decision. | 109 | * when sent between the client and service. |
101 | */ | 110 | */ |
102 | struct MulticastClientJoinDecisionMessage | 111 | struct MulticastJoinDecisionMessageHeader |
103 | { | 112 | { |
104 | /** | 113 | /** |
105 | * Type: GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION | 114 | * Type: GNUNET_MESSAGE_TYPE_MULTICAST_JOIN_DECISION |
@@ -107,29 +116,18 @@ struct MulticastClientJoinDecisionMessage | |||
107 | struct GNUNET_MessageHeader header; | 116 | struct GNUNET_MessageHeader header; |
108 | 117 | ||
109 | /** | 118 | /** |
110 | * Number of relays given. | 119 | * C->S: Peer to send the join decision to. |
120 | * S->C: Peer we received the join decision from. | ||
111 | */ | 121 | */ |
112 | uint32_t relay_count; | 122 | struct GNUNET_PeerIdentity peer; |
113 | 123 | ||
114 | /** | 124 | /** |
115 | * Public key of the joining member. | 125 | * C->S: Public key of the member requesting join. |
126 | * S->C: Unused. | ||
116 | */ | 127 | */ |
117 | struct GNUNET_CRYPTO_EddsaPublicKey member_key; | 128 | struct GNUNET_CRYPTO_EddsaPublicKey member_key; |
118 | 129 | ||
119 | /** | 130 | /* Followed by struct MulticastJoinDecisionMessage */ |
120 | * Peer identity of the joining member. | ||
121 | */ | ||
122 | struct GNUNET_PeerIdentity member_peer; | ||
123 | |||
124 | /** | ||
125 | * #GNUNET_YES if the peer was admitted. | ||
126 | */ | ||
127 | uint8_t is_admitted; | ||
128 | |||
129 | /* Followed by relay_count peer identities */ | ||
130 | |||
131 | /* Followed by the join response message */ | ||
132 | |||
133 | }; | 131 | }; |
134 | 132 | ||
135 | 133 | ||
@@ -139,7 +137,6 @@ struct MulticastClientJoinDecisionMessage | |||
139 | */ | 137 | */ |
140 | struct MulticastMembershipTestResultMessage | 138 | struct MulticastMembershipTestResultMessage |
141 | { | 139 | { |
142 | |||
143 | /** | 140 | /** |
144 | * Type: GNUNET_MESSAGE_TYPE_MULTICAST_MEMBERSHIP_TEST_RESULT | 141 | * Type: GNUNET_MESSAGE_TYPE_MULTICAST_MEMBERSHIP_TEST_RESULT |
145 | */ | 142 | */ |
@@ -151,11 +148,11 @@ struct MulticastMembershipTestResultMessage | |||
151 | uint32_t uid; | 148 | uint32_t uid; |
152 | 149 | ||
153 | /** | 150 | /** |
154 | * #GNUNET_YES if the peer is a member, #GNUNET_NO if peer was not a member, | 151 | * #GNUNET_YES if the peer is a member |
155 | * #GNUNET_SYSERR if we cannot answer the test. | 152 | * #GNUNET_NO if peer is not a member, |
153 | * #GNUNET_SYSERR if the test could not be answered. | ||
156 | */ | 154 | */ |
157 | int32_t is_admitted; | 155 | int32_t is_admitted; |
158 | |||
159 | }; | 156 | }; |
160 | 157 | ||
161 | 158 | ||