From e5ecc9359f0c3d48dec74f21a324fb696297a807 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Thu, 7 Apr 2011 16:29:58 +0000 Subject: [PATCH] Simplified notification messages --- src/mesh/mesh.h | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h index 32d9c4ee5..551694c27 100644 --- a/src/mesh/mesh.h +++ b/src/mesh/mesh.h @@ -49,14 +49,14 @@ * peer_request_connect_del GNUNET_MESH_PeerControl * peer_request_connect_by_type GNUNET_MESH_ConnectPeerByType * - * notify_transmit_ready GNUNET_MESH_RequestTransmitReady + * notify_transmit_ready GNUNET_MESH_TransmitReady * notify_transmit_ready_cancel None (clear of internal data structures) * * * * EVENT MESSAGE USED * ----- ------------ - * notify_transmit_ready reply GNUNET_MESH_NotifyTransmitReady + * notify_transmit_ready reply GNUNET_MESH_TransmitReady * notify_transmit_ready data GNUNET_MESH_Data or * GNUNET_MESH_DataBroadcast * new incoming tunnel GNUNET_MESH_PeerControl @@ -157,11 +157,13 @@ struct GNUNET_MESH_ConnectPeerByType { /** - * Message for notifying the service that the client wants to send data. + * Message for notifying the service that the client wants to send data or + * notifying a client that the service is ready to accept data. */ -struct GNUNET_MESH_RequestTransmitReady { +struct GNUNET_MESH_TransmitReady { /** * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_REQUEST_TRANSMIT_READY + * GNUNET_MESSAGE_TYPE_MESH_LOCAL_NOTIFY_TRANSMIT_READY */ struct GNUNET_MessageHeader header; @@ -177,34 +179,13 @@ struct GNUNET_MESH_RequestTransmitReady { }; -/** - * Message for letting a client know that the service is ready to accept data - * for transmission. - */ -struct GNUNET_MESH_NotifyTransmitReady { - /** - * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_NOTIFY_TRANSMIT_READY - */ - struct GNUNET_MessageHeader header; - - /** - * ID of a tunnel controlled by this client. - */ - MESH_TunnelID tunnel_id GNUNET_PACKED; - - /** - * Size of message we can now transmit to this tunnel - */ - uint32_t msg_size GNUNET_PACKED; -}; - - /** * Message to encapsulate data transmitted to/from the service */ struct GNUNET_MESH_Data { /** - * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA (client to service, or service to client) + * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA + * (client to service, or service to client) * Size: sizeof(struct GNUNET_MESH_Data) + sizeof (data) */ struct GNUNET_MessageHeader header; @@ -227,7 +208,8 @@ struct GNUNET_MESH_Data { */ struct GNUNET_MESH_DataBroadcast { /** - * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA_BROADCAST (client to service only, client created tunnel) + * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA_BROADCAST + * (client to service only, client created tunnel) * Size: sizeof(struct GNUNET_MESH_DataBroadcast) + sizeof (data) */ struct GNUNET_MessageHeader header; -- 2.25.1