#endif
#endif
-#define MESH_TUNNEL_OPT_SPEED_MIN 0x1
#define MESH_TUNNEL_OPT_NOBUFFER 0x2
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)
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].
*/
};
/**
- * Message for mesh data traffic to all tunnel targets.
+ * Message for mesh path destruction.
*/
-struct GNUNET_MESH_Multicast
+struct GNUNET_MESH_DestroyTunnel
{
- /**
- * Type: GNUNET_MESSAGE_TYPE_MESH_MULTICAST
- */
+ /**
+ * Type: GNUNET_MESSAGE_TYPE_MESH_PATH_DESTROY
+ *
+ * Size: sizeof(struct GNUNET_MESH_ManipulatePath) +
+ * path_length * sizeof (struct GNUNET_PeerIdentity)
+ */
struct GNUNET_MessageHeader header;
-
- /**
- * TID of the tunnel
- */
+
+ /**
+ * Global id of the tunnel this path belongs to,
+ * unique in conjunction with the origin.
+ */
uint32_t tid GNUNET_PACKED;
-
- /**
- * Number of hops to live
- */
- uint32_t ttl GNUNET_PACKED;
-
- /**
- * Unique ID of the packet
- */
- uint32_t pid GNUNET_PACKED;
-
- /**
- * OID of the tunnel
- */
- struct GNUNET_PeerIdentity oid;
-
- /**
- * Payload follows
- */
};
*/
struct GNUNET_PeerIdentity oid;
- /**
- * Destination.
- */
- struct GNUNET_PeerIdentity destination;
-
/**
* Payload follows
*/
*/
struct GNUNET_PeerIdentity oid;
- /**
- * Sender of the message.
- */
- struct GNUNET_PeerIdentity sender;
-
/**
* Payload follows
*/
* OID of the tunnel
*/
struct GNUNET_PeerIdentity oid;
-
- /**
- * Last ACK received.
- */
- uint32_t last_ack;
};
/**
*/
struct GNUNET_PeerIdentity peer_id;
+ /**
+ * Initial ACK value for payload.
+ */
+ uint32_t ack GNUNET_PACKED;
+
/* TODO: signature */
};