aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/gnunet-service-mesh.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-05-05 11:49:31 +0000
committerBart Polot <bart@net.in.tum.de>2011-05-05 11:49:31 +0000
commitd44e24bc22b673d5caa13451e733be3d9a392226 (patch)
treef90cbeefc59c6fe1cbc3096eb61d82381289420b /src/mesh/gnunet-service-mesh.c
parent7c683b2ac68ff0dbe186f82376a1e277254553f8 (diff)
downloadgnunet-d44e24bc22b673d5caa13451e733be3d9a392226.tar.gz
gnunet-d44e24bc22b673d5caa13451e733be3d9a392226.zip
Separated structs used in network protocol into new file, as recommended in HACKING file
Diffstat (limited to 'src/mesh/gnunet-service-mesh.c')
-rw-r--r--src/mesh/gnunet-service-mesh.c156
1 files changed, 1 insertions, 155 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 14b74905a..faed1ac01 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -24,7 +24,6 @@
24 * @author Bartlomiej Polot 24 * @author Bartlomiej Polot
25 * 25 *
26 * STRUCTURE: 26 * STRUCTURE:
27 * - MESH NETWORK MESSAGES
28 * - DATA STRUCTURES 27 * - DATA STRUCTURES
29 * - GLOBAL VARIABLES 28 * - GLOBAL VARIABLES
30 * - MESH NETWORK HANDLES 29 * - MESH NETWORK HANDLES
@@ -47,162 +46,9 @@
47#include "gnunet_protocols.h" 46#include "gnunet_protocols.h"
48 47
49#include "mesh.h" 48#include "mesh.h"
49#include "mesh_protocol.h"
50#include "gnunet_dht_service.h" 50#include "gnunet_dht_service.h"
51 51
52/******************************************************************************/
53/******************** MESH NETWORK MESSAGES **************************/
54/******************************************************************************/
55
56/**
57 * Message for mesh path management
58 */
59struct GNUNET_MESH_ManipulatePath
60{
61 /**
62 * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_[CREATE|CHANGE|ADD|DEL]
63 *
64 * Size: sizeof(struct GNUNET_MESH_ManipulatePath) +
65 * path_length * sizeof (struct GNUNET_PeerIdentity)
66 */
67 struct GNUNET_MessageHeader header;
68
69 /**
70 * Global id of the tunnel this path belongs to,
71 * unique in conjunction with the origin.
72 */
73 uint32_t tid GNUNET_PACKED;
74
75 /**
76 * Information about speed requirements. If the tunnel cannot sustain the
77 * minimum bandwidth, packets are to be dropped.
78 */
79 uint32_t speed_min GNUNET_PACKED;
80
81 /**
82 * 64-bit alignment.
83 */
84 uint32_t reserved GNUNET_PACKED;
85
86 /**
87 * path_length structs defining the *whole* path from the origin [0] to the
88 * final destination [path_length-1].
89 */
90 /* struct GNUNET_PeerIdentity peers[path_length]; */
91};
92
93/**
94 * Message for mesh data traffic to all tunnel targets.
95 */
96struct GNUNET_MESH_OriginMulticast
97{
98 /**
99 * Type: GNUNET_MESSAGE_TYPE_DATA_MULTICAST
100 */
101 struct GNUNET_MessageHeader header;
102
103 /**
104 * TID of the tunnel
105 */
106 uint32_t tid GNUNET_PACKED;
107
108 /**
109 * OID of the tunnel
110 */
111 struct GNUNET_PeerIdentity oid;
112
113 /**
114 * Payload follows
115 */
116};
117
118
119/**
120 * Message for mesh data traffic to a particular destination from origin.
121 */
122struct GNUNET_MESH_DataMessageFromOrigin
123{
124 /**
125 * Type: GNUNET_MESSAGE_TYPE_DATA_MESSAGE_FROM_ORIGIN
126 */
127 struct GNUNET_MessageHeader header;
128
129 /**
130 * TID of the tunnel
131 */
132 uint32_t tid GNUNET_PACKED;
133
134 /**
135 * OID of the tunnel
136 */
137 struct GNUNET_PeerIdentity oid;
138
139 /**
140 * Destination.
141 */
142 struct GNUNET_PeerIdentity destination;
143
144 /**
145 * Payload follows
146 */
147};
148
149
150/**
151 * Message for mesh data traffic from a tunnel participant to origin.
152 */
153struct GNUNET_MESH_DataMessageToOrigin
154{
155 /**
156 * Type: GNUNET_MESSAGE_TYPE_DATA_MESSAGE_TO_ORIGIN
157 */
158 struct GNUNET_MessageHeader header;
159
160 /**
161 * TID of the tunnel
162 */
163 uint32_t tid GNUNET_PACKED;
164
165 /**
166 * OID of the tunnel
167 */
168 struct GNUNET_PeerIdentity oid;
169
170 /**
171 * Sender of the message.
172 */
173 struct GNUNET_PeerIdentity sender;
174
175 /**
176 * Payload follows
177 */
178};
179
180/**
181 * Message for mesh flow control
182 */
183struct GNUNET_MESH_SpeedNotify
184{
185 /**
186 * Type: GNUNET_MESSAGE_TYPE_DATA_SPEED_NOTIFY
187 */
188 struct GNUNET_MessageHeader header;
189
190 /**
191 * TID of the tunnel
192 */
193 uint32_t tid GNUNET_PACKED;
194
195 /**
196 * OID of the tunnel
197 */
198 struct GNUNET_PeerIdentity oid;
199
200 /**
201 * Slowest link down the path (above minimum speed requirement).
202 */
203 uint32_t speed_min;
204
205};
206 52
207/******************************************************************************/ 53/******************************************************************************/
208/************************ DATA STRUCTURES ****************************/ 54/************************ DATA STRUCTURES ****************************/