diff options
author | Bart Polot <bart@net.in.tum.de> | 2011-06-09 17:05:42 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2011-06-09 17:05:42 +0000 |
commit | d137ef455b759490dfc4c658054fdbe3bc8708e7 (patch) | |
tree | ab0b0faf030517d9b2022dcf5ed660ec314bbeb5 /src/mesh/mesh.h | |
parent | 7827837df0b1a254080fb1e4d1f4163ebfddebc7 (diff) | |
download | gnunet-d137ef455b759490dfc4c658054fdbe3bc8708e7.tar.gz gnunet-d137ef455b759490dfc4c658054fdbe3bc8708e7.zip |
WiP (service rewrite)
Diffstat (limited to 'src/mesh/mesh.h')
-rw-r--r-- | src/mesh/mesh.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h index 8f9f8a84a..bbfad3225 100644 --- a/src/mesh/mesh.h +++ b/src/mesh/mesh.h | |||
@@ -64,6 +64,17 @@ | |||
64 | * peer disconnects from a tunnel GNUNET_MESH_PeerControl | 64 | * peer disconnects from a tunnel GNUNET_MESH_PeerControl |
65 | */ | 65 | */ |
66 | 66 | ||
67 | /******************************************************************************/ | ||
68 | /************************** CONSTANTS ******************************/ | ||
69 | /******************************************************************************/ | ||
70 | |||
71 | #define GNUNET_MESH_LOCAL_TUNNEL_ID_MARK 0x80000000 | ||
72 | |||
73 | |||
74 | /******************************************************************************/ | ||
75 | /************************** MESSAGES ******************************/ | ||
76 | /******************************************************************************/ | ||
77 | |||
67 | /** | 78 | /** |
68 | * Message for a client to register to the service | 79 | * Message for a client to register to the service |
69 | */ | 80 | */ |
@@ -88,7 +99,7 @@ struct GNUNET_MESH_ClientConnect { | |||
88 | * - Local tunnel numbers are >= 0x80000000 | 99 | * - Local tunnel numbers are >= 0x80000000 |
89 | * - Global tunnel numbers are < 0x80000000 | 100 | * - Global tunnel numbers are < 0x80000000 |
90 | */ | 101 | */ |
91 | typedef uint32_t MESH_TunnelID; | 102 | typedef uint32_t MESH_TunnelNumber; |
92 | 103 | ||
93 | /** | 104 | /** |
94 | * Message for a client to create and destroy tunnels. | 105 | * Message for a client to create and destroy tunnels. |
@@ -104,7 +115,7 @@ struct GNUNET_MESH_TunnelMessage { | |||
104 | /** | 115 | /** |
105 | * ID of a tunnel controlled by this client. | 116 | * ID of a tunnel controlled by this client. |
106 | */ | 117 | */ |
107 | MESH_TunnelID tunnel_id GNUNET_PACKED; | 118 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
108 | }; | 119 | }; |
109 | 120 | ||
110 | /** | 121 | /** |
@@ -130,7 +141,7 @@ struct GNUNET_MESH_PeerControl { | |||
130 | /** | 141 | /** |
131 | * ID of a tunnel controlled by this client. | 142 | * ID of a tunnel controlled by this client. |
132 | */ | 143 | */ |
133 | MESH_TunnelID tunnel_id GNUNET_PACKED; | 144 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
134 | 145 | ||
135 | /** | 146 | /** |
136 | * Peer to connect/disconnect. | 147 | * Peer to connect/disconnect. |
@@ -151,7 +162,7 @@ struct GNUNET_MESH_ConnectPeerByType { | |||
151 | /** | 162 | /** |
152 | * ID of a tunnel controlled by this client. | 163 | * ID of a tunnel controlled by this client. |
153 | */ | 164 | */ |
154 | MESH_TunnelID tunnel_id GNUNET_PACKED; | 165 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
155 | 166 | ||
156 | /** | 167 | /** |
157 | * Type specification | 168 | * Type specification |
@@ -174,7 +185,7 @@ struct GNUNET_MESH_TransmitReady { | |||
174 | /** | 185 | /** |
175 | * ID of a tunnel controlled by this client. | 186 | * ID of a tunnel controlled by this client. |
176 | */ | 187 | */ |
177 | MESH_TunnelID tunnel_id GNUNET_PACKED; | 188 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
178 | 189 | ||
179 | /** | 190 | /** |
180 | * Size of message we would like to transmit to this tunnel | 191 | * Size of message we would like to transmit to this tunnel |
@@ -197,7 +208,7 @@ struct GNUNET_MESH_Data { | |||
197 | /** | 208 | /** |
198 | * ID of a tunnel controlled by this client. | 209 | * ID of a tunnel controlled by this client. |
199 | */ | 210 | */ |
200 | MESH_TunnelID tunnel_id GNUNET_PACKED; | 211 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
201 | 212 | ||
202 | /** | 213 | /** |
203 | * Source or destination of the message (depending on direction). | 214 | * Source or destination of the message (depending on direction). |
@@ -221,7 +232,7 @@ struct GNUNET_MESH_DataBroadcast { | |||
221 | /** | 232 | /** |
222 | * ID of a tunnel controlled by this client. | 233 | * ID of a tunnel controlled by this client. |
223 | */ | 234 | */ |
224 | MESH_TunnelID tunnel_id GNUNET_PACKED; | 235 | MESH_TunnelNumber tunnel_id GNUNET_PACKED; |
225 | 236 | ||
226 | /* uint8_t data[] */ | 237 | /* uint8_t data[] */ |
227 | }; | 238 | }; |