- add framework for mesh2 mutipeer tests
[oweals/gnunet.git] / src / mesh / mesh2_protocol.h
index 2a312eff7138da8cc885d99cf2dd84923119c575..07c5734fd462fa33e6f4aead4174375b9e64292a 100644 (file)
@@ -45,12 +45,12 @@ extern "C"
 GNUNET_NETWORK_STRUCT_BEGIN
 
 /**
- * Message for mesh path management
+ * Message for mesh path creation.
  */
-struct GNUNET_MESH_ManipulatePath
+struct GNUNET_MESH_CreateTunnel
 {
     /**
-     * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_[CREATE|CHANGE|ADD|DESTROY]
+     * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE
      *
      * Size: sizeof(struct GNUNET_MESH_ManipulatePath) +
      *       path_length * sizeof (struct GNUNET_PeerIdentity)
@@ -69,17 +69,38 @@ struct GNUNET_MESH_ManipulatePath
   uint32_t opt GNUNET_PACKED;
 
     /**
-     * 64 bit alignment padding.
+     * Destination port.
      */
-  uint32_t reserved GNUNET_PACKED;
+  uint32_t port GNUNET_PACKED;
 
     /**
+     * FIXME do not add the first hop
      * path_length structs defining the *whole* path from the origin [0] to the
      * final destination [path_length-1].
      */
   /* struct GNUNET_PeerIdentity peers[path_length]; */
 };
 
+/**
+ * Message for mesh path destruction.
+ */
+struct GNUNET_MESH_DestroyTunnel
+{
+  /**
+   * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_DESTROY
+   *
+   * Size: sizeof(struct GNUNET_MESH_ManipulatePath) +
+   *       path_length * sizeof (struct GNUNET_PeerIdentity)
+   */
+  struct GNUNET_MessageHeader header;
+  
+  /**
+   * Global id of the tunnel this path belongs to,
+   * unique in conjunction with the origin.
+   */
+  uint32_t tid GNUNET_PACKED;
+};
+
 
 /**
  * Message for mesh data traffic to a particular destination from origin.
@@ -226,6 +247,11 @@ struct GNUNET_MESH_PathACK
      */
   struct GNUNET_PeerIdentity peer_id;
 
+    /**
+     * Initial ACK value for payload.
+     */
+  uint32_t ack GNUNET_PACKED;
+
   /* TODO: signature */
 };