aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/mesh.h
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2011-08-05 11:06:30 +0000
committerBart Polot <bart@net.in.tum.de>2011-08-05 11:06:30 +0000
commitbcec6624666bad99ee43625b0e5aa989f44bff5e (patch)
tree66354bc2a2aaa3becbbe0e51341fcb593867ff9e /src/mesh/mesh.h
parent8ec4debc3cfe6130234575e6d0816d2939d7fe95 (diff)
downloadgnunet-bcec6624666bad99ee43625b0e5aa989f44bff5e.tar.gz
gnunet-bcec6624666bad99ee43625b0e5aa989f44bff5e.zip
Change client <-> service traffic
Diffstat (limited to 'src/mesh/mesh.h')
-rw-r--r--src/mesh/mesh.h73
1 files changed, 2 insertions, 71 deletions
diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h
index 38f0486fb..00032f21b 100644
--- a/src/mesh/mesh.h
+++ b/src/mesh/mesh.h
@@ -49,15 +49,14 @@
49 * peer_request_connect_del GNUNET_MESH_PeerControl 49 * peer_request_connect_del GNUNET_MESH_PeerControl
50 * peer_request_connect_by_type GNUNET_MESH_ConnectPeerByType 50 * peer_request_connect_by_type GNUNET_MESH_ConnectPeerByType
51 * 51 *
52 * notify_transmit_ready GNUNET_MESH_TransmitReady 52 * notify_transmit_ready *GNUNET_MESH_TransmitReady?*
53 * notify_transmit_ready_cancel None (clear of internal data structures) 53 * notify_transmit_ready_cancel None (clear of internal data structures)
54 * 54 *
55 * 55 *
56 * 56 *
57 * EVENT MESSAGE USED 57 * EVENT MESSAGE USED
58 * ----- ------------ 58 * ----- ------------
59 * notify_transmit_ready reply GNUNET_MESH_TransmitReady 59 * data GNUNET_MESH_Data OR
60 * notify_transmit_ready data GNUNET_MESH_Data OR
61 * GNUNET_MESH_DataBroadcast 60 * GNUNET_MESH_DataBroadcast
62 * new incoming tunnel GNUNET_MESH_PeerControl 61 * new incoming tunnel GNUNET_MESH_PeerControl
63 * peer connects to a tunnel GNUNET_MESH_PeerControl 62 * peer connects to a tunnel GNUNET_MESH_PeerControl
@@ -170,72 +169,4 @@ struct GNUNET_MESH_ConnectPeerByType {
170 GNUNET_MESH_ApplicationType type GNUNET_PACKED; 169 GNUNET_MESH_ApplicationType type GNUNET_PACKED;
171}; 170};
172 171
173
174/**
175 * Message for notifying the service that the client wants to send data or
176 * notifying a client that the service is ready to accept data.
177 */
178struct GNUNET_MESH_TransmitReady {
179 /**
180 * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_REQUEST_TRANSMIT_READY
181 * GNUNET_MESSAGE_TYPE_MESH_LOCAL_NOTIFY_TRANSMIT_READY
182 */
183 struct GNUNET_MessageHeader header;
184
185 /**
186 * ID of a tunnel controlled by this client.
187 */
188 MESH_TunnelNumber tunnel_id GNUNET_PACKED;
189
190 /**
191 * Size of message we would like to transmit to this tunnel
192 */
193 uint32_t msg_size GNUNET_PACKED;
194};
195
196
197/**
198 * Message to encapsulate data transmitted to/from the service
199 */
200struct GNUNET_MESH_Data {
201 /**
202 * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA
203 * (client to service, or service to client)
204 * Size: sizeof(struct GNUNET_MESH_Data) + sizeof (data)
205 */
206 struct GNUNET_MessageHeader header;
207
208 /**
209 * ID of a tunnel in which this client participates.
210 */
211 MESH_TunnelNumber tunnel_id GNUNET_PACKED;
212
213 /**
214 * Source or destination of the message (depending on direction).
215 */
216 struct GNUNET_PeerIdentity peer_id;
217
218 /* uint8_t data[] */
219};
220
221/**
222 * Message to encapsulate broadcast data transmitted to the service
223 */
224struct GNUNET_MESH_DataBroadcast {
225 /**
226 * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA_BROADCAST
227 * (client to service only, client created tunnel)
228 * Size: sizeof(struct GNUNET_MESH_DataBroadcast) + sizeof (data)
229 */
230 struct GNUNET_MessageHeader header;
231
232 /**
233 * ID of a tunnel controlled by this client.
234 */
235 MESH_TunnelNumber tunnel_id GNUNET_PACKED;
236
237 /* uint8_t data[] */
238};
239
240
241#endif 172#endif