-bump name to 97
[oweals/gnunet.git] / src / mesh / mesh.h
index 90502b00b11aa8a152d971777d019fa6e4a1352a..dc515b4732fe9eeadf7e56bade8dad6412ee0ecd 100644 (file)
@@ -39,9 +39,7 @@ extern "C"
 #define MESH_DEBUG              GNUNET_YES
 
 #include "platform.h"
-#include "gnunet_common.h"
 #include "gnunet_util_lib.h"
-#include "gnunet_peer_lib.h"
 #include "gnunet_core_service.h"
 #include "gnunet_protocols.h"
 #include <gnunet_mesh_service.h>
@@ -65,14 +63,14 @@ extern "C"
  * notify_transmit_ready                None (queue / GNUNET_CLIENT_ntf_tmt_rdy)
  * notify_transmit_ready_cancel         None (clear of internal data structures)
  *
- * 
+ *
  * EVENT                                MESSAGE USED
  * -----                                ------------
  * data                                 GNUNET_MESH_Unicast OR
  *                                      GNUNET_MESH_Multicast OR
  *                                      GNUNET_MESH_ToOrigin
  * data ack                             GNUNET_MESH_LocalAck
- * 
+ *
  * new incoming tunnel                  GNUNET_MESH_PeerControl
  * peer connects to a tunnel            FIXME
  * peer disconnects from a tunnel       FIXME
@@ -88,12 +86,6 @@ extern "C"
 #define HIGH_PID                                0xFFFF0000
 #define LOW_PID                                 0x0000FFFF
 
-/**
- * Value in tunnel info: *int (GNUNET_YES/GNUNET_NO)
- */
-#define GNUNET_MESH_OPTION_NOBUFFER             0x1
-#define GNUNET_MESH_OPTION_RELIABLE             0x2
-
 #define PID_OVERFLOW(pid, max) (pid > HIGH_PID && max < LOW_PID)
 
 /******************************************************************************/
@@ -158,41 +150,28 @@ struct GNUNET_MESH_TunnelMessage
     /**
      * Options.
      */
-  int32_t options GNUNET_PACKED;
+  uint32_t opt GNUNET_PACKED;
 };
 
 
 /**
- * Message for the service to let a client know about created tunnels.
+ * Message for mesh data traffic.
  */
-struct GNUNET_MESH_TunnelNotification
+struct GNUNET_MESH_LocalData
 {
     /**
-     * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE
-     *
-     * Size: sizeof(struct GNUNET_MESH_TunnelMessage)
+     * Type: GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA
      */
   struct GNUNET_MessageHeader header;
 
     /**
-     * ID of a tunnel controlled by this client.
+     * TID of the tunnel
      */
-  MESH_TunnelNumber tunnel_id GNUNET_PACKED;
+  uint32_t tid GNUNET_PACKED;
 
     /**
-     * Peer at the other end.
+     * Payload follows
      */
-  struct GNUNET_PeerIdentity peer;
-
-    /**
-     * Port for this tunnel
-     */
-  uint32_t port GNUNET_PACKED;
-
-    /**
-     * Tunnel options (speed, buffering)
-     */
-  uint32_t opt GNUNET_PACKED;
 };
 
 
@@ -212,10 +191,6 @@ struct GNUNET_MESH_LocalAck
      */
   MESH_TunnelNumber tunnel_id GNUNET_PACKED;
 
-    /**
-     * ID of the last packet allowed.
-     */
-  uint32_t ack GNUNET_PACKED;
 };
 
 
@@ -330,9 +305,9 @@ GMC_min_pid (uint32_t a, uint32_t b);
  * Generated with:
  * FIND:        "#define ([^ ]+)[ ]*([0-9]+)"
  * REPLACE:     "    case \2: return "\1"; break;"
- * 
+ *
  * @param m Message type.
- * 
+ *
  * @return Human readable string description.
  */
 const char *