X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fmesh%2Fmesh.h;h=bbfad3225f56c9e26fd5ca8885b45e5b7cd246d8;hb=89c9cb7c978a7a79776d940cadf13740c315b632;hp=d317e805402948ae16bfccbd5a48a4db266110f5;hpb=bb0f1a9c37476ebe08b2de7b6fb7f8b2ed0514b5;p=oweals%2Fgnunet.git diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h index d317e8054..bbfad3225 100644 --- a/src/mesh/mesh.h +++ b/src/mesh/mesh.h @@ -57,13 +57,24 @@ * EVENT MESSAGE USED * ----- ------------ * notify_transmit_ready reply GNUNET_MESH_TransmitReady - * notify_transmit_ready data GNUNET_MESH_Data or + * notify_transmit_ready data GNUNET_MESH_Data OR * GNUNET_MESH_DataBroadcast * new incoming tunnel GNUNET_MESH_PeerControl * peer connects to a tunnel GNUNET_MESH_PeerControl * peer disconnects from a tunnel GNUNET_MESH_PeerControl */ +/******************************************************************************/ +/************************** CONSTANTS ******************************/ +/******************************************************************************/ + +#define GNUNET_MESH_LOCAL_TUNNEL_ID_MARK 0x80000000 + + +/******************************************************************************/ +/************************** MESSAGES ******************************/ +/******************************************************************************/ + /** * Message for a client to register to the service */ @@ -78,6 +89,8 @@ struct GNUNET_MESH_ClientConnect { struct GNUNET_MessageHeader header; uint16_t types GNUNET_PACKED; uint16_t applications GNUNET_PACKED; + /* uint16_t list_types[types] */ + /* uint16_t list_apps[applications] */ }; @@ -86,7 +99,7 @@ struct GNUNET_MESH_ClientConnect { * - Local tunnel numbers are >= 0x80000000 * - Global tunnel numbers are < 0x80000000 */ -typedef uint32_t MESH_TunnelID; +typedef uint32_t MESH_TunnelNumber; /** * Message for a client to create and destroy tunnels. @@ -102,7 +115,7 @@ struct GNUNET_MESH_TunnelMessage { /** * ID of a tunnel controlled by this client. */ - MESH_TunnelID tunnel_id GNUNET_PACKED; + MESH_TunnelNumber tunnel_id GNUNET_PACKED; }; /** @@ -128,7 +141,7 @@ struct GNUNET_MESH_PeerControl { /** * ID of a tunnel controlled by this client. */ - MESH_TunnelID tunnel_id GNUNET_PACKED; + MESH_TunnelNumber tunnel_id GNUNET_PACKED; /** * Peer to connect/disconnect. @@ -149,7 +162,7 @@ struct GNUNET_MESH_ConnectPeerByType { /** * ID of a tunnel controlled by this client. */ - MESH_TunnelID tunnel_id GNUNET_PACKED; + MESH_TunnelNumber tunnel_id GNUNET_PACKED; /** * Type specification @@ -172,7 +185,7 @@ struct GNUNET_MESH_TransmitReady { /** * ID of a tunnel controlled by this client. */ - MESH_TunnelID tunnel_id GNUNET_PACKED; + MESH_TunnelNumber tunnel_id GNUNET_PACKED; /** * Size of message we would like to transmit to this tunnel @@ -195,7 +208,7 @@ struct GNUNET_MESH_Data { /** * ID of a tunnel controlled by this client. */ - MESH_TunnelID tunnel_id GNUNET_PACKED; + MESH_TunnelNumber tunnel_id GNUNET_PACKED; /** * Source or destination of the message (depending on direction). @@ -219,7 +232,7 @@ struct GNUNET_MESH_DataBroadcast { /** * ID of a tunnel controlled by this client. */ - MESH_TunnelID tunnel_id GNUNET_PACKED; + MESH_TunnelNumber tunnel_id GNUNET_PACKED; /* uint8_t data[] */ };