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 GNUNET_MULTICAST_JoinRequest
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 request body. */
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
190 struct GNUNET_MessageHeader header;
198 * Private, non-ephemeral key for the mutlicast group.
200 struct GNUNET_CRYPTO_EddsaPrivateKey group_key;
203 * Last fragment ID, used to continue counting fragments if we resume operating
206 uint64_t last_fragment_id;
212 * Message sent from the client to the service to broadcast to all group
215 struct MulticastBroadcastMessage
221 struct GNUNET_MessageHeader header;
224 * #GNUNET_OK normally, #GNUNET_SYSERR if the origin aborted the
237 uint64_t group_generation;
240 * Total message size.
248 * Message sent from the client to the service to join a multicast group.
250 struct MulticastJoinMessage
256 struct GNUNET_MessageHeader header;
259 * Number of relays we (think) we already know about.
261 uint32_t relay_count;
264 * Public non-ephemeral key of the mutlicast group.
266 struct GNUNET_CRYPTO_EddsaPublicKey group_key;
269 * Our private key for the group.
271 struct GNUNET_CRYPTO_EddsaPrivateKey member_key;
273 /* followed by 'relay_count' `struct GNUNET_PeerIdentity`s */
280 * Message sent from the client to the service OR the service to the
281 * client asking for a message fragment to be replayed.
283 struct MulticastReplayRequestMessage
287 * The message type can be either
288 * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST or
289 * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL.
291 struct GNUNET_MessageHeader header;
299 * ID of the message that is being requested.
304 * Offset of the fragment that is being requested.
306 uint64_t fragment_offset;
309 * Additional flags for the request.
318 * Message sent from the client to the service to unicast to the group origin.
320 struct MulticastUnicastToOriginMessage
326 struct GNUNET_MessageHeader header;
329 * Reserved (always 0).
339 * Total message size.
343 /* followed by payload */
349 * Message sent from the client to the service to
350 * cancel unicast to the group origin.
352 struct MulticastUnicastToOriginCancelMessage
358 struct GNUNET_MessageHeader header;
361 * Reserved (always 0).
373 GNUNET_NETWORK_STRUCT_END
376 /* end of multicast.h */