Simplified notification messages
authorBart Polot <bart@net.in.tum.de>
Thu, 7 Apr 2011 16:29:58 +0000 (16:29 +0000)
committerBart Polot <bart@net.in.tum.de>
Thu, 7 Apr 2011 16:29:58 +0000 (16:29 +0000)
src/mesh/mesh.h

index 32d9c4ee577e5b24522682e883e7c752b6322c9d..551694c272efefbfb1bd8739c099bd70fc4c7297 100644 (file)
  * 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;