2 This file is part of GNUnet.
3 (C) 2001 - 2011 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 * @author Bartlomiej Polot
23 * @file mesh/mesh_protocol.h
26 #ifndef MESH_PROTOCOL_H_
27 #define MESH_PROTOCOL_H_
32 #if 0 /* keep Emacsens' auto-indent happy */
37 /******************************************************************************/
38 /******************** MESH NETWORK MESSAGES **************************/
39 /******************************************************************************/
42 * Message for mesh path management
44 struct GNUNET_MESH_ManipulatePath
47 * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_[CREATE|CHANGE|ADD|DEL]
49 * Size: sizeof(struct GNUNET_MESH_ManipulatePath) +
50 * path_length * sizeof (struct GNUNET_PeerIdentity)
52 struct GNUNET_MessageHeader header;
55 * Global id of the tunnel this path belongs to,
56 * unique in conjunction with the origin.
58 uint32_t tid GNUNET_PACKED;
61 * path_length structs defining the *whole* path from the origin [0] to the
62 * final destination [path_length-1].
64 /* struct GNUNET_PeerIdentity peers[path_length]; */
68 * Message for mesh data traffic to all tunnel targets.
70 struct GNUNET_MESH_Multicast
73 * Type: GNUNET_MESSAGE_TYPE_MESH_MULTICAST
75 struct GNUNET_MessageHeader header;
80 uint32_t tid GNUNET_PACKED;
85 struct GNUNET_PeerIdentity oid;
94 * Message for mesh data traffic to a particular destination from origin.
96 struct GNUNET_MESH_Unicast
99 * Type: GNUNET_MESSAGE_TYPE_MESH_UNICAST
101 struct GNUNET_MessageHeader header;
106 uint32_t tid GNUNET_PACKED;
111 struct GNUNET_PeerIdentity oid;
116 struct GNUNET_PeerIdentity destination;
125 * Message for mesh data traffic from a tunnel participant to origin.
127 struct GNUNET_MESH_ToOrigin
130 * Type: GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN
132 struct GNUNET_MessageHeader header;
137 uint32_t tid GNUNET_PACKED;
142 struct GNUNET_PeerIdentity oid;
145 * Sender of the message.
147 struct GNUNET_PeerIdentity sender;
156 * Message for ack'ing a path
158 struct GNUNET_MESH_PathACK
161 * Type: GNUNET_MESSAGE_TYPE_PATH_ACK
163 struct GNUNET_MessageHeader header;
168 uint32_t tid GNUNET_PACKED;
173 struct GNUNET_PeerIdentity oid;
178 struct GNUNET_PeerIdentity peer_id;
180 /* TODO: signature */
185 * Message for mesh flow control
187 struct GNUNET_MESH_SpeedNotify
190 * Type: GNUNET_MESSAGE_TYPE_DATA_SPEED_NOTIFY
192 struct GNUNET_MessageHeader header;
197 uint32_t tid GNUNET_PACKED;
202 struct GNUNET_PeerIdentity oid;
205 * Slowest link down the path (above minimum speed requirement).
211 #if 0 /* keep Emacsens' auto-indent happy */
218 /* ifndef MES_PROTOCOL_H */
220 /* end of mesh_protocol.h */