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
29 GNUNET_NETWORK_STRUCT_BEGIN
33 * Message sent from the client to the service to notify the service
34 * about a join decision.
36 struct MulticastJoinDecisionMessage
42 struct GNUNET_MessageHeader header;
45 * Unique ID that identifies the associated join test.
50 * #GNUNET_YES if the peer was admitted.
55 * Number of relays given.
59 /* followed by 'relay_count' peer identities */
61 /* followed by the join response message */
67 * Message sent from the client to the service to notify the service
68 * about the result of a membership test.
70 struct MulticastMembershipTestResponseMessage
76 struct GNUNET_MessageHeader header;
79 * Unique ID that identifies the associated membership test.
84 * #GNUNET_YES if the peer is a member, #GNUNET_NO if peer was not a member,
85 * #GNUNET_SYSERR if we cannot answer the test.
93 * Message sent from the client to the service to give the service
96 struct MulticastReplayResponseMessage
102 struct GNUNET_MessageHeader header;
105 * Unique ID that identifies the associated replay session.
110 * An `enum GNUNET_MULTICAST_ReplayErrorCode` identifying issues (in NBO).
114 /* followed by replayed message */
120 * Message sent from the client to the service to notify the service
121 * about the end of a replay session.
123 struct MulticastReplayEndMessage
129 struct GNUNET_MessageHeader header;
132 * Unique ID that identifies the associated replay session.
140 * Message sent from the client to the service to notify the service
141 * about the starting of a multicast group with this peers as its origin.
143 struct MulticastOriginStartMessage
149 struct GNUNET_MessageHeader header;
157 * Private, non-ephemeral key for the mutlicast group.
159 struct GNUNET_CRYPTO_EddsaPrivateKey group_key;
162 * Last fragment ID, used to continue counting fragments if we resume operating
165 uint64_t last_fragment_id;
171 * Message sent from the client to the service to broadcast to all group
174 struct MulticastBroadcastMessage
180 struct GNUNET_MessageHeader header;
183 * #GNUNET_OK normally, #GNUNET_SYSERR if the origin aborted the
196 uint64_t group_generation;
199 * Total message size.
207 * Message sent from the client to the service to join a multicast group.
209 struct MulticastJoinMessage
215 struct GNUNET_MessageHeader header;
218 * Number of relays we (think) we already know about.
220 uint32_t relay_count;
223 * Public non-ephemeral key of the mutlicast group.
225 struct GNUNET_CRYPTO_EddsaPublicKey group_key;
228 * Our private key for the group.
230 struct GNUNET_CRYPTO_EddsaPrivateKey member_key;
232 /* followed by 'relay_count' `struct GNUNET_PeerIdentity`s */
239 * Message sent from the client to the service OR the service to the
240 * client asking for a message fragment to be replayed.
242 struct MulticastReplayRequestMessage
246 * The message type can be either
247 * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST or
248 * #GNUNET_MESSAGE_TYPE_MULTICAST_REPLAY_REQUEST_CANCEL.
250 struct GNUNET_MessageHeader header;
258 * ID of the message that is being requested.
263 * Offset of the fragment that is being requested.
265 uint64_t fragment_offset;
268 * Additional flags for the request.
277 * Message sent from the client to the service to unicast to the group origin.
279 struct MulticastUnicastToOriginMessage
285 struct GNUNET_MessageHeader header;
288 * Reserved (always 0).
298 * Total message size.
302 /* followed by payload */
308 * Message sent from the client to the service to
309 * cancel unicast to the group origin.
311 struct MulticastUnicastToOriginCancelMessage
317 struct GNUNET_MessageHeader header;
320 * Reserved (always 0).
335 GNUNET_NETWORK_STRUCT_END
338 /* end of multicast.h */