2 This file is part of GNUnet.
3 (C) 2012, 2013 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file multicast/multicast.h
23 * @brief multicast IPC messages
24 * @author Christian Grothoff
25 * @author Gabor X Toth
30 GNUNET_NETWORK_STRUCT_BEGIN
34 * Header of a join request sent to the origin or another member.
36 struct MulticastJoinRequestMessage
39 * Header for the join request.
41 struct GNUNET_MessageHeader header;
44 * ECC signature of the rest of the fields of the join request.
46 * Signature must match the public key of the joining member.
48 struct GNUNET_CRYPTO_EddsaSignature signature;
51 * Purpose for the signature and size of the signed data.
53 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
56 * Public key of the target group.
58 struct GNUNET_CRYPTO_EddsaPublicKey group_key;
61 * Public key of the joining member.
63 struct GNUNET_CRYPTO_EddsaPublicKey member_key;
66 * Peer identity of the joining member.
68 struct GNUNET_PeerIdentity member_peer;
70 /* Followed by struct GNUNET_MessageHeader join_request */
75 * Message sent from the client to the service to notify the service
76 * about a join decision.
78 struct MulticastJoinDecisionMessage
83 struct GNUNET_MessageHeader header;
86 * Unique ID that identifies the associated join test.
91 * #GNUNET_YES if the peer was admitted.
96 * Number of relays given.
100 /* Followed by relay_count peer identities */
102 /* Followed by the join response message */
108 * Message sent from the client to the service to notify the service
109 * about the result of a membership test.
111 struct MulticastMembershipTestResponseMessage
117 struct GNUNET_MessageHeader header;
120 * Unique ID that identifies the associated membership test.
125 * #GNUNET_YES if the peer is a member, #GNUNET_NO if peer was not a member,
126 * #GNUNET_SYSERR if we cannot answer the test.
134 * Message sent from the client to the service to give the service
135 * a replayed message.
137 struct MulticastReplayResponseMessage
143 struct GNUNET_MessageHeader header;
146 * Unique ID that identifies the associated replay session.
151 * An `enum GNUNET_MULTICAST_ReplayErrorCode` identifying issues (in NBO).
155 /* followed by replayed message */
161 * Message sent from the client to the service to notify the service
162 * about the end of a replay session.
164 struct MulticastReplayEndMessage
170 struct GNUNET_MessageHeader header;
173 * Unique ID that identifies the associated replay session.
181 * Message sent from the client to the service to notify the service
182 * about the starting of a multicast group with this peers as its origin.
184 struct MulticastOriginStartMessage
187 * Type: GNUNET_MESSAGE_TYPE_MULTICAST_ORIGIN_START
189 struct GNUNET_MessageHeader header;
197 * Private, non-ephemeral key for the multicast group.
199 struct GNUNET_CRYPTO_EddsaPrivateKey group_key;
202 * Last fragment ID sent to the group, used to continue counting fragments if
203 * we resume operating * a group.
205 uint64_t max_fragment_id;
210 struct MulticastMemberJoinMessage
213 * Type: GNUNET_MESSAGE_TYPE_MULTICAST_MEMBER_JOIN
215 struct GNUNET_MessageHeader header;
217 uint32_t relay_count GNUNET_PACKED;
219 struct GNUNET_CRYPTO_EddsaPublicKey group_key;
221 struct GNUNET_CRYPTO_EddsaPrivateKey member_key;
223 struct GNUNET_PeerIdentity origin;
225 /* Followed by struct GNUNET_PeerIdentity relays[relay_count] */
226 /* Followed by struct GNUNET_MessageHeader join_request */
231 * Message sent from the client to the service to broadcast to all group
234 struct MulticastBroadcastMessage
240 struct GNUNET_MessageHeader header;
243 * #GNUNET_OK normally, #GNUNET_SYSERR if the origin aborted the
256 uint64_t group_generation;
259 * Total message size.
267 * Message sent from the client to the service to join a multicast group.
269 struct MulticastJoinMessage
275 struct GNUNET_MessageHeader header;
278 * Number of relays we (think) we already know about.
280 uint32_t relay_count;
283 * Public non-ephemeral key of the mutlicast group.
285 struct GNUNET_CRYPTO_EddsaPublicKey group_key;
288 * Our private key for the group.
290 struct GNUNET_CRYPTO_EddsaPrivateKey member_key;
292 /* followed by 'relay_count' `struct GNUNET_PeerIdentity`s */
299 * Message sent from the client to the service OR the service to the
300 * client asking for a message fragment to be replayed.
302 struct MulticastReplayRequestMessage
306 * The message type can be either
307 * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST or
308 * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL.
310 struct GNUNET_MessageHeader header;
318 * ID of the message that is being requested.
323 * Offset of the fragment that is being requested.
325 uint64_t fragment_offset;
328 * Additional flags for the request.
337 * Message sent from the client to the service to unicast to the group origin.
339 struct MulticastUnicastToOriginMessage
345 struct GNUNET_MessageHeader header;
348 * Reserved (always 0).
358 * Total message size.
362 /* followed by payload */
368 * Message sent from the client to the service to
369 * cancel unicast to the group origin.
371 struct MulticastUnicastToOriginCancelMessage
377 struct GNUNET_MessageHeader header;
380 * Reserved (always 0).
392 GNUNET_NETWORK_STRUCT_END
395 /* end of multicast.h */