#include "platform.h"
#include "gnunet_util_lib.h"
+#include "mesh_enc.h"
#ifdef __cplusplus
struct GNUNET_MessageHeader header;
/**
- * ID of the connection for that tunnel.
- */
- uint32_t cid GNUNET_PACKED;
-
- /**
- * ID of the tunnel
+ * ID of the connection
*/
- struct GNUNET_HashCode tid;
+ struct GNUNET_HashCode cid;
/**
* path_length structs defining the *whole* path from the origin [0] to the
struct GNUNET_MessageHeader header;
/**
- * ID of the connection
+ * Always 0.
*/
- uint32_t cid GNUNET_PACKED;
+ uint32_t reserved GNUNET_PACKED;
/**
- * ID of the tunnel
+ * ID of the connection.
*/
- struct GNUNET_HashCode tid;
+ struct GNUNET_HashCode cid;
/* TODO: signature */
};
struct GNUNET_MessageHeader header;
/**
- * ID of the connection.
+ * ID of the packet (hop by hop).
*/
- uint32_t cid GNUNET_PACKED;
+ uint32_t pid GNUNET_PACKED;
/**
- * ID of the tunnel.
+ * ID of the connection.
*/
- struct GNUNET_HashCode tid;
+ struct GNUNET_HashCode cid;
/**
- * ID of the packet (hop by hop).
+ * Initialization Vector for payload encryption.
*/
- uint32_t pid GNUNET_PACKED;
+ uint64_t iv GNUNET_PACKED;
/**
* Number of hops to live.
uint32_t ttl GNUNET_PACKED;
/**
- * Initialization Vector for payload encryption.
+ * Always 0.
*/
- uint64_t iv;
+ uint32_t reserved GNUNET_PACKED;
/**
* Encrypted content follows.
/**
* ID of the channel
*/
- uint32_t chid GNUNET_PACKED;
+ MESH_ChannelNumber chid GNUNET_PACKED;
+
+ /**
+ * Destination port.
+ */
+ uint32_t port GNUNET_PACKED;
/**
* Channel options.
uint32_t opt GNUNET_PACKED;
};
-struct GNUNET_MESH_ChannelDestroy
+struct GNUNET_MESH_ChannelManage
{
/**
- * Type: GNUNET_MESSAGE_TYPE_MESH_CHANNEL_DESTROY
+ * Type: GNUNET_MESSAGE_TYPE_MESH_CHANNEL_{ACK|DESTROY}
*/
struct GNUNET_MessageHeader header;
/**
* ID of the channel
*/
- uint32_t chid GNUNET_PACKED;
+ MESH_ChannelNumber chid GNUNET_PACKED;
};
/**
/**
* ID of the channel
*/
- uint32_t chid GNUNET_PACKED;
+ MESH_ChannelNumber chid GNUNET_PACKED;
/**
* Payload follows
/**
* ID of the channel
*/
- uint32_t chid GNUNET_PACKED;
+ MESH_ChannelNumber chid GNUNET_PACKED;
/**
* Bitfield of already-received newer messages
/**
- * Message to acknowledge mesh data traffic.
+ * Message to acknowledge mesh encrypted traffic.
*/
struct GNUNET_MESH_ACK
{
* Maximum packet ID authorized.
*/
uint32_t ack GNUNET_PACKED;
+
+ /**
+ * ID of the connection.
+ */
+ struct GNUNET_HashCode cid;
};
* Last packet sent.
*/
uint32_t pid GNUNET_PACKED;
+
+ /**
+ * ID of the connection.
+ */
+ struct GNUNET_HashCode cid;
+
};
struct GNUNET_MessageHeader header;
/**
- * ID of the connection.
+ * Always 0.
*/
- uint32_t cid GNUNET_PACKED;
+ uint32_t reserved GNUNET_PACKED;
/**
- * ID of the tunnel
+ * ID of the connection.
*/
- struct GNUNET_HashCode tid;
+ struct GNUNET_HashCode cid;
/**
* ID of the endpoint
struct GNUNET_MessageHeader header;
/**
- * ID of the connection.
+ * Always 0.
*/
- uint32_t cid GNUNET_PACKED;
+ uint32_t reserved GNUNET_PACKED;
/**
- * ID of the tunnel
+ * ID of the connection.
*/
- struct GNUNET_HashCode tid;
+ struct GNUNET_HashCode cid;
/* TODO: signature */
};
struct GNUNET_MessageHeader header;
/**
- * ID of the connection
+ * Always 0.
*/
- uint32_t cid GNUNET_PACKED;
+ uint32_t reserved GNUNET_PACKED;
/**
- * ID of the tunnel
+ * ID of the connection.
*/
- struct GNUNET_HashCode tid;
+ struct GNUNET_HashCode cid;
};