diff options
Diffstat (limited to 'src/mesh/gnunet-service-mesh_tunnel.h')
-rw-r--r-- | src/mesh/gnunet-service-mesh_tunnel.h | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/src/mesh/gnunet-service-mesh_tunnel.h b/src/mesh/gnunet-service-mesh_tunnel.h index 59f9b6657..16616de59 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.h +++ b/src/mesh/gnunet-service-mesh_tunnel.h | |||
@@ -19,15 +19,15 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file mesh/gnunet-service-mesh_tunnel.h | 22 | * @file cadet/gnunet-service-cadet_tunnel.h |
23 | * @brief mesh service; dealing with tunnels and crypto | 23 | * @brief cadet service; dealing with tunnels and crypto |
24 | * @author Bartlomiej Polot | 24 | * @author Bartlomiej Polot |
25 | * | 25 | * |
26 | * All functions in this file should use the prefix GMT (Gnunet Mesh Tunnel) | 26 | * All functions in this file should use the prefix GMT (Gnunet Cadet Tunnel) |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef GNUNET_SERVICE_MESH_TUNNEL_H | 29 | #ifndef GNUNET_SERVICE_CADET_TUNNEL_H |
30 | #define GNUNET_SERVICE_MESH_TUNNEL_H | 30 | #define GNUNET_SERVICE_CADET_TUNNEL_H |
31 | 31 | ||
32 | #ifdef __cplusplus | 32 | #ifdef __cplusplus |
33 | extern "C" | 33 | extern "C" |
@@ -43,77 +43,77 @@ extern "C" | |||
43 | /** | 43 | /** |
44 | * All the connectivity states a tunnel can be in. | 44 | * All the connectivity states a tunnel can be in. |
45 | */ | 45 | */ |
46 | enum MeshTunnel3CState | 46 | enum CadetTunnel3CState |
47 | { | 47 | { |
48 | /** | 48 | /** |
49 | * Uninitialized status, should never appear in operation. | 49 | * Uninitialized status, should never appear in operation. |
50 | */ | 50 | */ |
51 | MESH_TUNNEL3_NEW, | 51 | CADET_TUNNEL3_NEW, |
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Path to the peer not known yet. | 54 | * Path to the peer not known yet. |
55 | */ | 55 | */ |
56 | MESH_TUNNEL3_SEARCHING, | 56 | CADET_TUNNEL3_SEARCHING, |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * Request sent, not yet answered. | 59 | * Request sent, not yet answered. |
60 | */ | 60 | */ |
61 | MESH_TUNNEL3_WAITING, | 61 | CADET_TUNNEL3_WAITING, |
62 | 62 | ||
63 | /** | 63 | /** |
64 | * Peer connected and ready to accept data. | 64 | * Peer connected and ready to accept data. |
65 | */ | 65 | */ |
66 | MESH_TUNNEL3_READY, | 66 | CADET_TUNNEL3_READY, |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * Tunnel being shut down, don't try to keep it alive. | 69 | * Tunnel being shut down, don't try to keep it alive. |
70 | */ | 70 | */ |
71 | MESH_TUNNEL3_SHUTDOWN | 71 | CADET_TUNNEL3_SHUTDOWN |
72 | }; | 72 | }; |
73 | 73 | ||
74 | 74 | ||
75 | /** | 75 | /** |
76 | * All the encryption states a tunnel can be in. | 76 | * All the encryption states a tunnel can be in. |
77 | */ | 77 | */ |
78 | enum MeshTunnel3EState | 78 | enum CadetTunnel3EState |
79 | { | 79 | { |
80 | /** | 80 | /** |
81 | * Uninitialized status, should never appear in operation. | 81 | * Uninitialized status, should never appear in operation. |
82 | */ | 82 | */ |
83 | MESH_TUNNEL3_KEY_UNINITIALIZED, | 83 | CADET_TUNNEL3_KEY_UNINITIALIZED, |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * Ephemeral key sent, waiting for peer's key. | 86 | * Ephemeral key sent, waiting for peer's key. |
87 | */ | 87 | */ |
88 | MESH_TUNNEL3_KEY_SENT, | 88 | CADET_TUNNEL3_KEY_SENT, |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * New ephemeral key and ping sent, waiting for pong. | 91 | * New ephemeral key and ping sent, waiting for pong. |
92 | * This means that we DO have the peer's ephemeral key, otherwise the | 92 | * This means that we DO have the peer's ephemeral key, otherwise the |
93 | * state would be KEY_SENT. | 93 | * state would be KEY_SENT. |
94 | */ | 94 | */ |
95 | MESH_TUNNEL3_KEY_PING, | 95 | CADET_TUNNEL3_KEY_PING, |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * Handshake completed: session key available. | 98 | * Handshake completed: session key available. |
99 | */ | 99 | */ |
100 | MESH_TUNNEL3_KEY_OK, | 100 | CADET_TUNNEL3_KEY_OK, |
101 | }; | 101 | }; |
102 | 102 | ||
103 | /** | 103 | /** |
104 | * Struct containing all information regarding a given peer | 104 | * Struct containing all information regarding a given peer |
105 | */ | 105 | */ |
106 | struct MeshTunnel3; | 106 | struct CadetTunnel3; |
107 | 107 | ||
108 | 108 | ||
109 | #include "gnunet-service-mesh_channel.h" | 109 | #include "gnunet-service-cadet_channel.h" |
110 | #include "gnunet-service-mesh_connection.h" | 110 | #include "gnunet-service-cadet_connection.h" |
111 | #include "gnunet-service-mesh_peer.h" | 111 | #include "gnunet-service-cadet_peer.h" |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * Handle for messages queued but not yet sent. | 114 | * Handle for messages queued but not yet sent. |
115 | */ | 115 | */ |
116 | struct MeshTunnel3Queue; | 116 | struct CadetTunnel3Queue; |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Callback called when a queued message is sent. | 119 | * Callback called when a queued message is sent. |
@@ -124,12 +124,12 @@ struct MeshTunnel3Queue; | |||
124 | * @param size Size of the message. | 124 | * @param size Size of the message. |
125 | */ | 125 | */ |
126 | typedef void (*GMT_sent) (void *cls, | 126 | typedef void (*GMT_sent) (void *cls, |
127 | struct MeshTunnel3 *t, | 127 | struct CadetTunnel3 *t, |
128 | struct MeshTunnel3Queue *q, | 128 | struct CadetTunnel3Queue *q, |
129 | uint16_t type, size_t size); | 129 | uint16_t type, size_t size); |
130 | 130 | ||
131 | typedef void (*GMT_conn_iter) (void *cls, struct MeshConnection *c); | 131 | typedef void (*GMT_conn_iter) (void *cls, struct CadetConnection *c); |
132 | typedef void (*GMT_chan_iter) (void *cls, struct MeshChannel *ch); | 132 | typedef void (*GMT_chan_iter) (void *cls, struct CadetChannel *ch); |
133 | 133 | ||
134 | 134 | ||
135 | /******************************************************************************/ | 135 | /******************************************************************************/ |
@@ -157,8 +157,8 @@ GMT_shutdown (void); | |||
157 | * | 157 | * |
158 | * @param destination Peer this tunnel is towards. | 158 | * @param destination Peer this tunnel is towards. |
159 | */ | 159 | */ |
160 | struct MeshTunnel3 * | 160 | struct CadetTunnel3 * |
161 | GMT_new (struct MeshPeer *destination); | 161 | GMT_new (struct CadetPeer *destination); |
162 | 162 | ||
163 | /** | 163 | /** |
164 | * Tunnel is empty: destroy it. | 164 | * Tunnel is empty: destroy it. |
@@ -168,7 +168,7 @@ GMT_new (struct MeshPeer *destination); | |||
168 | * @param t Tunnel to destroy. | 168 | * @param t Tunnel to destroy. |
169 | */ | 169 | */ |
170 | void | 170 | void |
171 | GMT_destroy_empty (struct MeshTunnel3 *t); | 171 | GMT_destroy_empty (struct CadetTunnel3 *t); |
172 | 172 | ||
173 | /** | 173 | /** |
174 | * Destroy tunnel if empty (no more channels). | 174 | * Destroy tunnel if empty (no more channels). |
@@ -176,7 +176,7 @@ GMT_destroy_empty (struct MeshTunnel3 *t); | |||
176 | * @param t Tunnel to destroy if empty. | 176 | * @param t Tunnel to destroy if empty. |
177 | */ | 177 | */ |
178 | void | 178 | void |
179 | GMT_destroy_if_empty (struct MeshTunnel3 *t); | 179 | GMT_destroy_if_empty (struct CadetTunnel3 *t); |
180 | 180 | ||
181 | /** | 181 | /** |
182 | * Destroy the tunnel. | 182 | * Destroy the tunnel. |
@@ -190,7 +190,7 @@ GMT_destroy_if_empty (struct MeshTunnel3 *t); | |||
190 | * @param t The tunnel to destroy. | 190 | * @param t The tunnel to destroy. |
191 | */ | 191 | */ |
192 | void | 192 | void |
193 | GMT_destroy (struct MeshTunnel3 *t); | 193 | GMT_destroy (struct CadetTunnel3 *t); |
194 | 194 | ||
195 | 195 | ||
196 | /** | 196 | /** |
@@ -200,7 +200,7 @@ GMT_destroy (struct MeshTunnel3 *t); | |||
200 | * @param cstate New connection state. | 200 | * @param cstate New connection state. |
201 | */ | 201 | */ |
202 | void | 202 | void |
203 | GMT_change_cstate (struct MeshTunnel3* t, enum MeshTunnel3CState cstate); | 203 | GMT_change_cstate (struct CadetTunnel3* t, enum CadetTunnel3CState cstate); |
204 | 204 | ||
205 | 205 | ||
206 | /** | 206 | /** |
@@ -210,7 +210,7 @@ GMT_change_cstate (struct MeshTunnel3* t, enum MeshTunnel3CState cstate); | |||
210 | * @param state New encryption state. | 210 | * @param state New encryption state. |
211 | */ | 211 | */ |
212 | void | 212 | void |
213 | GMT_change_estate (struct MeshTunnel3* t, enum MeshTunnel3EState state); | 213 | GMT_change_estate (struct CadetTunnel3* t, enum CadetTunnel3EState state); |
214 | 214 | ||
215 | /** | 215 | /** |
216 | * Add a connection to a tunnel. | 216 | * Add a connection to a tunnel. |
@@ -219,7 +219,7 @@ GMT_change_estate (struct MeshTunnel3* t, enum MeshTunnel3EState state); | |||
219 | * @param c Connection. | 219 | * @param c Connection. |
220 | */ | 220 | */ |
221 | void | 221 | void |
222 | GMT_add_connection (struct MeshTunnel3 *t, struct MeshConnection *c); | 222 | GMT_add_connection (struct CadetTunnel3 *t, struct CadetConnection *c); |
223 | 223 | ||
224 | /** | 224 | /** |
225 | * Mark a path as no longer valid for this tunnel: has been tried and failed. | 225 | * Mark a path as no longer valid for this tunnel: has been tried and failed. |
@@ -228,7 +228,7 @@ GMT_add_connection (struct MeshTunnel3 *t, struct MeshConnection *c); | |||
228 | * @param path Invalid path to remove. Is destroyed after removal. | 228 | * @param path Invalid path to remove. Is destroyed after removal. |
229 | */ | 229 | */ |
230 | void | 230 | void |
231 | GMT_remove_path (struct MeshTunnel3 *t, struct MeshPeerPath *path); | 231 | GMT_remove_path (struct CadetTunnel3 *t, struct CadetPeerPath *path); |
232 | 232 | ||
233 | /** | 233 | /** |
234 | * Remove a connection from a tunnel. | 234 | * Remove a connection from a tunnel. |
@@ -237,7 +237,7 @@ GMT_remove_path (struct MeshTunnel3 *t, struct MeshPeerPath *path); | |||
237 | * @param c Connection. | 237 | * @param c Connection. |
238 | */ | 238 | */ |
239 | void | 239 | void |
240 | GMT_remove_connection (struct MeshTunnel3 *t, struct MeshConnection *c); | 240 | GMT_remove_connection (struct CadetTunnel3 *t, struct CadetConnection *c); |
241 | 241 | ||
242 | /** | 242 | /** |
243 | * Add a channel to a tunnel. | 243 | * Add a channel to a tunnel. |
@@ -246,7 +246,7 @@ GMT_remove_connection (struct MeshTunnel3 *t, struct MeshConnection *c); | |||
246 | * @param ch Channel. | 246 | * @param ch Channel. |
247 | */ | 247 | */ |
248 | void | 248 | void |
249 | GMT_add_channel (struct MeshTunnel3 *t, struct MeshChannel *ch); | 249 | GMT_add_channel (struct CadetTunnel3 *t, struct CadetChannel *ch); |
250 | 250 | ||
251 | /** | 251 | /** |
252 | * Remove a channel from a tunnel. | 252 | * Remove a channel from a tunnel. |
@@ -255,7 +255,7 @@ GMT_add_channel (struct MeshTunnel3 *t, struct MeshChannel *ch); | |||
255 | * @param ch Channel. | 255 | * @param ch Channel. |
256 | */ | 256 | */ |
257 | void | 257 | void |
258 | GMT_remove_channel (struct MeshTunnel3 *t, struct MeshChannel *ch); | 258 | GMT_remove_channel (struct CadetTunnel3 *t, struct CadetChannel *ch); |
259 | 259 | ||
260 | /** | 260 | /** |
261 | * Search for a channel by global ID. | 261 | * Search for a channel by global ID. |
@@ -265,8 +265,8 @@ GMT_remove_channel (struct MeshTunnel3 *t, struct MeshChannel *ch); | |||
265 | * | 265 | * |
266 | * @return channel handler, NULL if doesn't exist | 266 | * @return channel handler, NULL if doesn't exist |
267 | */ | 267 | */ |
268 | struct MeshChannel * | 268 | struct CadetChannel * |
269 | GMT_get_channel (struct MeshTunnel3 *t, MESH_ChannelNumber chid); | 269 | GMT_get_channel (struct CadetTunnel3 *t, CADET_ChannelNumber chid); |
270 | 270 | ||
271 | /** | 271 | /** |
272 | * Decrypt and demultiplex by message type. Call appropriate handler | 272 | * Decrypt and demultiplex by message type. Call appropriate handler |
@@ -277,8 +277,8 @@ GMT_get_channel (struct MeshTunnel3 *t, MESH_ChannelNumber chid); | |||
277 | * @param msg Message header. | 277 | * @param msg Message header. |
278 | */ | 278 | */ |
279 | void | 279 | void |
280 | GMT_handle_encrypted (struct MeshTunnel3 *t, | 280 | GMT_handle_encrypted (struct CadetTunnel3 *t, |
281 | const struct GNUNET_MESH_Encrypted *msg); | 281 | const struct GNUNET_CADET_Encrypted *msg); |
282 | 282 | ||
283 | /** | 283 | /** |
284 | * Demultiplex an encapsulated KX message by message type. | 284 | * Demultiplex an encapsulated KX message by message type. |
@@ -287,7 +287,7 @@ GMT_handle_encrypted (struct MeshTunnel3 *t, | |||
287 | * @param message KX message itself. | 287 | * @param message KX message itself. |
288 | */ | 288 | */ |
289 | void | 289 | void |
290 | GMT_handle_kx (struct MeshTunnel3 *t, | 290 | GMT_handle_kx (struct CadetTunnel3 *t, |
291 | const struct GNUNET_MessageHeader *message); | 291 | const struct GNUNET_MessageHeader *message); |
292 | 292 | ||
293 | /** | 293 | /** |
@@ -300,8 +300,8 @@ GMT_handle_kx (struct MeshTunnel3 *t, | |||
300 | * | 300 | * |
301 | * @return Connection created. | 301 | * @return Connection created. |
302 | */ | 302 | */ |
303 | struct MeshConnection * | 303 | struct CadetConnection * |
304 | GMT_use_path (struct MeshTunnel3 *t, struct MeshPeerPath *p); | 304 | GMT_use_path (struct CadetTunnel3 *t, struct CadetPeerPath *p); |
305 | 305 | ||
306 | /** | 306 | /** |
307 | * Count established (ready) connections of a tunnel. | 307 | * Count established (ready) connections of a tunnel. |
@@ -311,7 +311,7 @@ GMT_use_path (struct MeshTunnel3 *t, struct MeshPeerPath *p); | |||
311 | * @return Number of connections. | 311 | * @return Number of connections. |
312 | */ | 312 | */ |
313 | unsigned int | 313 | unsigned int |
314 | GMT_count_connections (struct MeshTunnel3 *t); | 314 | GMT_count_connections (struct CadetTunnel3 *t); |
315 | 315 | ||
316 | /** | 316 | /** |
317 | * Count channels of a tunnel. | 317 | * Count channels of a tunnel. |
@@ -321,7 +321,7 @@ GMT_count_connections (struct MeshTunnel3 *t); | |||
321 | * @return Number of channels. | 321 | * @return Number of channels. |
322 | */ | 322 | */ |
323 | unsigned int | 323 | unsigned int |
324 | GMT_count_channels (struct MeshTunnel3 *t); | 324 | GMT_count_channels (struct CadetTunnel3 *t); |
325 | 325 | ||
326 | /** | 326 | /** |
327 | * Get the connectivity state of a tunnel. | 327 | * Get the connectivity state of a tunnel. |
@@ -330,8 +330,8 @@ GMT_count_channels (struct MeshTunnel3 *t); | |||
330 | * | 330 | * |
331 | * @return Tunnel's connectivity state. | 331 | * @return Tunnel's connectivity state. |
332 | */ | 332 | */ |
333 | enum MeshTunnel3CState | 333 | enum CadetTunnel3CState |
334 | GMT_get_cstate (struct MeshTunnel3 *t); | 334 | GMT_get_cstate (struct CadetTunnel3 *t); |
335 | 335 | ||
336 | /** | 336 | /** |
337 | * Get the encryption state of a tunnel. | 337 | * Get the encryption state of a tunnel. |
@@ -340,8 +340,8 @@ GMT_get_cstate (struct MeshTunnel3 *t); | |||
340 | * | 340 | * |
341 | * @return Tunnel's encryption state. | 341 | * @return Tunnel's encryption state. |
342 | */ | 342 | */ |
343 | enum MeshTunnel3EState | 343 | enum CadetTunnel3EState |
344 | GMT_get_estate (struct MeshTunnel3 *t); | 344 | GMT_get_estate (struct CadetTunnel3 *t); |
345 | 345 | ||
346 | /** | 346 | /** |
347 | * Get the maximum buffer space for a tunnel towards a local client. | 347 | * Get the maximum buffer space for a tunnel towards a local client. |
@@ -351,7 +351,7 @@ GMT_get_estate (struct MeshTunnel3 *t); | |||
351 | * @return Biggest buffer space offered by any channel in the tunnel. | 351 | * @return Biggest buffer space offered by any channel in the tunnel. |
352 | */ | 352 | */ |
353 | unsigned int | 353 | unsigned int |
354 | GMT_get_channels_buffer (struct MeshTunnel3 *t); | 354 | GMT_get_channels_buffer (struct CadetTunnel3 *t); |
355 | 355 | ||
356 | /** | 356 | /** |
357 | * Get the total buffer space for a tunnel for P2P traffic. | 357 | * Get the total buffer space for a tunnel for P2P traffic. |
@@ -361,7 +361,7 @@ GMT_get_channels_buffer (struct MeshTunnel3 *t); | |||
361 | * @return Buffer space offered by all connections in the tunnel. | 361 | * @return Buffer space offered by all connections in the tunnel. |
362 | */ | 362 | */ |
363 | unsigned int | 363 | unsigned int |
364 | GMT_get_connections_buffer (struct MeshTunnel3 *t); | 364 | GMT_get_connections_buffer (struct CadetTunnel3 *t); |
365 | 365 | ||
366 | /** | 366 | /** |
367 | * Get the tunnel's destination. | 367 | * Get the tunnel's destination. |
@@ -371,7 +371,7 @@ GMT_get_connections_buffer (struct MeshTunnel3 *t); | |||
371 | * @return ID of the destination peer. | 371 | * @return ID of the destination peer. |
372 | */ | 372 | */ |
373 | const struct GNUNET_PeerIdentity * | 373 | const struct GNUNET_PeerIdentity * |
374 | GMT_get_destination (struct MeshTunnel3 *t); | 374 | GMT_get_destination (struct CadetTunnel3 *t); |
375 | 375 | ||
376 | /** | 376 | /** |
377 | * Get the tunnel's next free Channel ID. | 377 | * Get the tunnel's next free Channel ID. |
@@ -380,8 +380,8 @@ GMT_get_destination (struct MeshTunnel3 *t); | |||
380 | * | 380 | * |
381 | * @return ID of a channel free to use. | 381 | * @return ID of a channel free to use. |
382 | */ | 382 | */ |
383 | MESH_ChannelNumber | 383 | CADET_ChannelNumber |
384 | GMT_get_next_chid (struct MeshTunnel3 *t); | 384 | GMT_get_next_chid (struct CadetTunnel3 *t); |
385 | 385 | ||
386 | /** | 386 | /** |
387 | * Send ACK on one or more channels due to buffer in connections. | 387 | * Send ACK on one or more channels due to buffer in connections. |
@@ -389,7 +389,7 @@ GMT_get_next_chid (struct MeshTunnel3 *t); | |||
389 | * @param t Channel which has some free buffer space. | 389 | * @param t Channel which has some free buffer space. |
390 | */ | 390 | */ |
391 | void | 391 | void |
392 | GMT_unchoke_channels (struct MeshTunnel3 *t); | 392 | GMT_unchoke_channels (struct CadetTunnel3 *t); |
393 | 393 | ||
394 | /** | 394 | /** |
395 | * Send ACK on one or more connections due to buffer space to the client. | 395 | * Send ACK on one or more connections due to buffer space to the client. |
@@ -399,7 +399,7 @@ GMT_unchoke_channels (struct MeshTunnel3 *t); | |||
399 | * @param t Tunnel which has some free buffer space. | 399 | * @param t Tunnel which has some free buffer space. |
400 | */ | 400 | */ |
401 | void | 401 | void |
402 | GMT_send_connection_acks (struct MeshTunnel3 *t); | 402 | GMT_send_connection_acks (struct CadetTunnel3 *t); |
403 | 403 | ||
404 | /** | 404 | /** |
405 | * Cancel a previously sent message while it's in the queue. | 405 | * Cancel a previously sent message while it's in the queue. |
@@ -411,7 +411,7 @@ GMT_send_connection_acks (struct MeshTunnel3 *t); | |||
411 | * @param q Handle to the queue. | 411 | * @param q Handle to the queue. |
412 | */ | 412 | */ |
413 | void | 413 | void |
414 | GMT_cancel (struct MeshTunnel3Queue *q); | 414 | GMT_cancel (struct CadetTunnel3Queue *q); |
415 | 415 | ||
416 | /** | 416 | /** |
417 | * Sends an already built message on a tunnel, encrypting it and | 417 | * Sends an already built message on a tunnel, encrypting it and |
@@ -426,9 +426,9 @@ GMT_cancel (struct MeshTunnel3Queue *q); | |||
426 | * | 426 | * |
427 | * @return Handle to cancel message. NULL if @c cont is NULL. | 427 | * @return Handle to cancel message. NULL if @c cont is NULL. |
428 | */ | 428 | */ |
429 | struct MeshTunnel3Queue * | 429 | struct CadetTunnel3Queue * |
430 | GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | 430 | GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message, |
431 | struct MeshTunnel3 *t, struct MeshConnection *c, | 431 | struct CadetTunnel3 *t, struct CadetConnection *c, |
432 | int force, GMT_sent cont, void *cont_cls); | 432 | int force, GMT_sent cont, void *cont_cls); |
433 | 433 | ||
434 | /** | 434 | /** |
@@ -439,7 +439,7 @@ GMT_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
439 | * @return #GNUNET_YES if it is loopback. | 439 | * @return #GNUNET_YES if it is loopback. |
440 | */ | 440 | */ |
441 | int | 441 | int |
442 | GMT_is_loopback (const struct MeshTunnel3 *t); | 442 | GMT_is_loopback (const struct CadetTunnel3 *t); |
443 | 443 | ||
444 | /** | 444 | /** |
445 | * Is the tunnel using this path already? | 445 | * Is the tunnel using this path already? |
@@ -450,7 +450,7 @@ GMT_is_loopback (const struct MeshTunnel3 *t); | |||
450 | * @return #GNUNET_YES a connection uses this path. | 450 | * @return #GNUNET_YES a connection uses this path. |
451 | */ | 451 | */ |
452 | int | 452 | int |
453 | GMT_is_path_used (const struct MeshTunnel3 *t, const struct MeshPeerPath *p); | 453 | GMT_is_path_used (const struct CadetTunnel3 *t, const struct CadetPeerPath *p); |
454 | 454 | ||
455 | /** | 455 | /** |
456 | * Get a cost of a path for a tunnel considering existing connections. | 456 | * Get a cost of a path for a tunnel considering existing connections. |
@@ -461,8 +461,8 @@ GMT_is_path_used (const struct MeshTunnel3 *t, const struct MeshPeerPath *p); | |||
461 | * @return Cost of the path (path length + number of overlapping nodes) | 461 | * @return Cost of the path (path length + number of overlapping nodes) |
462 | */ | 462 | */ |
463 | unsigned int | 463 | unsigned int |
464 | GMT_get_path_cost (const struct MeshTunnel3 *t, | 464 | GMT_get_path_cost (const struct CadetTunnel3 *t, |
465 | const struct MeshPeerPath *path); | 465 | const struct CadetPeerPath *path); |
466 | 466 | ||
467 | /** | 467 | /** |
468 | * Get the static string for the peer this tunnel is directed. | 468 | * Get the static string for the peer this tunnel is directed. |
@@ -472,7 +472,7 @@ GMT_get_path_cost (const struct MeshTunnel3 *t, | |||
472 | * @return Static string the destination peer's ID. | 472 | * @return Static string the destination peer's ID. |
473 | */ | 473 | */ |
474 | const char * | 474 | const char * |
475 | GMT_2s (const struct MeshTunnel3 *t); | 475 | GMT_2s (const struct CadetTunnel3 *t); |
476 | 476 | ||
477 | /** | 477 | /** |
478 | * Log all possible info about the tunnel state. | 478 | * Log all possible info about the tunnel state. |
@@ -480,7 +480,7 @@ GMT_2s (const struct MeshTunnel3 *t); | |||
480 | * @param t Tunnel to debug. | 480 | * @param t Tunnel to debug. |
481 | */ | 481 | */ |
482 | void | 482 | void |
483 | GMT_debug (const struct MeshTunnel3 *t); | 483 | GMT_debug (const struct CadetTunnel3 *t); |
484 | 484 | ||
485 | /** | 485 | /** |
486 | * Iterate all tunnels. | 486 | * Iterate all tunnels. |
@@ -507,7 +507,7 @@ GMT_count_all (void); | |||
507 | * @param cls Closure for @c iter. | 507 | * @param cls Closure for @c iter. |
508 | */ | 508 | */ |
509 | void | 509 | void |
510 | GMT_iterate_connections (struct MeshTunnel3 *t, GMT_conn_iter iter, void *cls); | 510 | GMT_iterate_connections (struct CadetTunnel3 *t, GMT_conn_iter iter, void *cls); |
511 | 511 | ||
512 | /** | 512 | /** |
513 | * Iterate all channels of a tunnel. | 513 | * Iterate all channels of a tunnel. |
@@ -517,7 +517,7 @@ GMT_iterate_connections (struct MeshTunnel3 *t, GMT_conn_iter iter, void *cls); | |||
517 | * @param cls Closure for @c iter. | 517 | * @param cls Closure for @c iter. |
518 | */ | 518 | */ |
519 | void | 519 | void |
520 | GMT_iterate_channels (struct MeshTunnel3 *t, GMT_chan_iter iter, void *cls); | 520 | GMT_iterate_channels (struct CadetTunnel3 *t, GMT_chan_iter iter, void *cls); |
521 | 521 | ||
522 | #if 0 /* keep Emacsens' auto-indent happy */ | 522 | #if 0 /* keep Emacsens' auto-indent happy */ |
523 | { | 523 | { |
@@ -526,6 +526,6 @@ GMT_iterate_channels (struct MeshTunnel3 *t, GMT_chan_iter iter, void *cls); | |||
526 | } | 526 | } |
527 | #endif | 527 | #endif |
528 | 528 | ||
529 | /* ifndef GNUNET_MESH_SERVICE_TUNNEL_H */ | 529 | /* ifndef GNUNET_CADET_SERVICE_TUNNEL_H */ |
530 | #endif | 530 | #endif |
531 | /* end of gnunet-mesh-service_tunnel.h */ | 531 | /* end of gnunet-cadet-service_tunnel.h */ |