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_
33 /* keep Emacsens' auto-indent happy */
38 /******************************************************************************/
39 /******************** MESH NETWORK MESSAGES **************************/
40 /******************************************************************************/
43 * Message for mesh path management
45 struct GNUNET_MESH_ManipulatePath
48 * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_[CREATE|CHANGE|ADD|DEL]
50 * Size: sizeof(struct GNUNET_MESH_ManipulatePath) +
51 * path_length * sizeof (struct GNUNET_PeerIdentity)
53 struct GNUNET_MessageHeader header;
56 * Global id of the tunnel this path belongs to,
57 * unique in conjunction with the origin.
59 uint32_t tid GNUNET_PACKED;
62 * path_length structs defining the *whole* path from the origin [0] to the
63 * final destination [path_length-1].
65 /* struct GNUNET_PeerIdentity peers[path_length]; */
69 * Message for mesh data traffic to all tunnel targets.
71 struct GNUNET_MESH_Multicast
74 * Type: GNUNET_MESSAGE_TYPE_MESH_MULTICAST
76 struct GNUNET_MessageHeader header;
81 uint32_t tid GNUNET_PACKED;
84 * Number of hops to live
86 uint32_t ttl GNUNET_PACKED;
89 * Unique ID of the packet
91 uint32_t mid GNUNET_PACKED;
96 struct GNUNET_PeerIdentity oid;
105 * Message for mesh data traffic to a particular destination from origin.
107 struct GNUNET_MESH_Unicast
110 * Type: GNUNET_MESSAGE_TYPE_MESH_UNICAST
112 struct GNUNET_MessageHeader header;
117 uint32_t tid GNUNET_PACKED;
122 struct GNUNET_PeerIdentity oid;
127 struct GNUNET_PeerIdentity destination;
136 * Message for mesh data traffic from a tunnel participant to origin.
138 struct GNUNET_MESH_ToOrigin
141 * Type: GNUNET_MESSAGE_TYPE_MESH_TO_ORIGIN
143 struct GNUNET_MessageHeader header;
148 uint32_t tid GNUNET_PACKED;
153 struct GNUNET_PeerIdentity oid;
156 * Sender of the message.
158 struct GNUNET_PeerIdentity sender;
167 * Message for ack'ing a path
169 struct GNUNET_MESH_PathACK
172 * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_ACK
174 struct GNUNET_MessageHeader header;
179 uint32_t tid GNUNET_PACKED;
184 struct GNUNET_PeerIdentity oid;
189 struct GNUNET_PeerIdentity peer_id;
191 /* TODO: signature */
196 * Message for notifying a disconnection in a path
198 struct GNUNET_MESH_PathBroken
201 * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_BROKEN
203 struct GNUNET_MessageHeader header;
208 uint32_t tid GNUNET_PACKED;
213 struct GNUNET_PeerIdentity oid;
218 struct GNUNET_PeerIdentity peer1;
223 struct GNUNET_PeerIdentity peer2;
225 /* TODO: signature */
230 * Message to destroy a tunnel
232 struct GNUNET_MESH_TunnelDestroy
235 * Type: GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY
237 struct GNUNET_MessageHeader header;
242 uint32_t tid GNUNET_PACKED;
247 struct GNUNET_PeerIdentity oid;
249 /* TODO: signature */
254 * Message for mesh flow control
256 struct GNUNET_MESH_SpeedNotify
259 * Type: GNUNET_MESSAGE_TYPE_DATA_SPEED_NOTIFY
261 struct GNUNET_MessageHeader header;
266 uint32_t tid GNUNET_PACKED;
271 struct GNUNET_PeerIdentity oid;
274 * Slowest link down the path (above minimum speed requirement).
280 #if 0 /* keep Emacsens' auto-indent happy */
287 /* ifndef MES_PROTOCOL_H */
289 /* end of mesh_protocol.h */