diff options
author | Bart Polot <bart@net.in.tum.de> | 2014-05-14 16:50:28 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2014-05-14 16:50:28 +0000 |
commit | 9aaa554470dbff968c6cab7a2850a15318c1f15b (patch) | |
tree | 2375634ba53d0dd0bd7bbc674bb3b1eb28f42742 /src/cadet/gnunet-service-cadet_peer.h | |
parent | a8a95437e8782ef509fb64e1975a8c1ddd08eee0 (diff) | |
download | gnunet-9aaa554470dbff968c6cab7a2850a15318c1f15b.tar.gz gnunet-9aaa554470dbff968c6cab7a2850a15318c1f15b.zip |
- change GM (Gnunet Mesh) function prefixes for GC (Gnunet Cadet)
Diffstat (limited to 'src/cadet/gnunet-service-cadet_peer.h')
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.h | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.h b/src/cadet/gnunet-service-cadet_peer.h index 9f1146e9f..e9668305b 100644 --- a/src/cadet/gnunet-service-cadet_peer.h +++ b/src/cadet/gnunet-service-cadet_peer.h | |||
@@ -64,7 +64,7 @@ struct CadetPeerQueue; | |||
64 | * @param size Size of the message. | 64 | * @param size Size of the message. |
65 | * @param wait Time spent waiting for core (only the time for THIS message) | 65 | * @param wait Time spent waiting for core (only the time for THIS message) |
66 | */ | 66 | */ |
67 | typedef void (*GMP_sent) (void *cls, | 67 | typedef void (*GCP_sent) (void *cls, |
68 | struct CadetConnection *c, int sent, | 68 | struct CadetConnection *c, int sent, |
69 | uint16_t type, uint32_t pid, int fwd, size_t size, | 69 | uint16_t type, uint32_t pid, int fwd, size_t size, |
70 | struct GNUNET_TIME_Relative wait); | 70 | struct GNUNET_TIME_Relative wait); |
@@ -79,13 +79,13 @@ typedef void (*GMP_sent) (void *cls, | |||
79 | * @param c Configuration. | 79 | * @param c Configuration. |
80 | */ | 80 | */ |
81 | void | 81 | void |
82 | GMP_init (const struct GNUNET_CONFIGURATION_Handle *c); | 82 | GCP_init (const struct GNUNET_CONFIGURATION_Handle *c); |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * Shut down the peer subsystem. | 85 | * Shut down the peer subsystem. |
86 | */ | 86 | */ |
87 | void | 87 | void |
88 | GMP_shutdown (void); | 88 | GCP_shutdown (void); |
89 | 89 | ||
90 | 90 | ||
91 | /** | 91 | /** |
@@ -97,7 +97,7 @@ GMP_shutdown (void); | |||
97 | * @return Existing or newly created peer structure. | 97 | * @return Existing or newly created peer structure. |
98 | */ | 98 | */ |
99 | struct CadetPeer * | 99 | struct CadetPeer * |
100 | GMP_get (const struct GNUNET_PeerIdentity *peer_id); | 100 | GCP_get (const struct GNUNET_PeerIdentity *peer_id); |
101 | 101 | ||
102 | 102 | ||
103 | /** | 103 | /** |
@@ -109,7 +109,7 @@ GMP_get (const struct GNUNET_PeerIdentity *peer_id); | |||
109 | * @return Existing or newly created peer structure. | 109 | * @return Existing or newly created peer structure. |
110 | */ | 110 | */ |
111 | struct CadetPeer * | 111 | struct CadetPeer * |
112 | GMP_get_short (const GNUNET_PEER_Id peer); | 112 | GCP_get_short (const GNUNET_PEER_Id peer); |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * Try to establish a new connection to this peer (in its tunnel). | 115 | * Try to establish a new connection to this peer (in its tunnel). |
@@ -119,7 +119,7 @@ GMP_get_short (const GNUNET_PEER_Id peer); | |||
119 | * @param peer Peer to connect to. | 119 | * @param peer Peer to connect to. |
120 | */ | 120 | */ |
121 | void | 121 | void |
122 | GMP_connect (struct CadetPeer *peer); | 122 | GCP_connect (struct CadetPeer *peer); |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * Free a transmission that was already queued with all resources | 125 | * Free a transmission that was already queued with all resources |
@@ -131,7 +131,7 @@ GMP_connect (struct CadetPeer *peer); | |||
131 | * @param pid PID, if relevant (was sent and was a payload message). | 131 | * @param pid PID, if relevant (was sent and was a payload message). |
132 | */ | 132 | */ |
133 | void | 133 | void |
134 | GMP_queue_destroy (struct CadetPeerQueue *queue, int clear_cls, | 134 | GCP_queue_destroy (struct CadetPeerQueue *queue, int clear_cls, |
135 | int sent, uint32_t pid); | 135 | int sent, uint32_t pid); |
136 | 136 | ||
137 | /** | 137 | /** |
@@ -151,10 +151,10 @@ GMP_queue_destroy (struct CadetPeerQueue *queue, int clear_cls, | |||
151 | * message has been sent and therefore the handle is no longer valid. | 151 | * message has been sent and therefore the handle is no longer valid. |
152 | */ | 152 | */ |
153 | struct CadetPeerQueue * | 153 | struct CadetPeerQueue * |
154 | GMP_queue_add (struct CadetPeer *peer, void *cls, uint16_t type, | 154 | GCP_queue_add (struct CadetPeer *peer, void *cls, uint16_t type, |
155 | uint16_t payload_type, uint32_t payload_id, | 155 | uint16_t payload_type, uint32_t payload_id, |
156 | size_t size, struct CadetConnection *c, int fwd, | 156 | size_t size, struct CadetConnection *c, int fwd, |
157 | GMP_sent cont, void *cont_cls); | 157 | GCP_sent cont, void *cont_cls); |
158 | 158 | ||
159 | /** | 159 | /** |
160 | * Cancel all queued messages to a peer that belong to a certain connection. | 160 | * Cancel all queued messages to a peer that belong to a certain connection. |
@@ -164,7 +164,7 @@ GMP_queue_add (struct CadetPeer *peer, void *cls, uint16_t type, | |||
164 | * the sent continuation call. | 164 | * the sent continuation call. |
165 | */ | 165 | */ |
166 | void | 166 | void |
167 | GMP_queue_cancel (struct CadetPeer *peer, struct CadetConnection *c); | 167 | GCP_queue_cancel (struct CadetPeer *peer, struct CadetConnection *c); |
168 | 168 | ||
169 | /** | 169 | /** |
170 | * Get the first message for a connection and unqueue it. | 170 | * Get the first message for a connection and unqueue it. |
@@ -175,10 +175,10 @@ GMP_queue_cancel (struct CadetPeer *peer, struct CadetConnection *c); | |||
175 | * @return First message for this connection. | 175 | * @return First message for this connection. |
176 | */ | 176 | */ |
177 | struct GNUNET_MessageHeader * | 177 | struct GNUNET_MessageHeader * |
178 | GMP_connection_pop (struct CadetPeer *peer, struct CadetConnection *c); | 178 | GCP_connection_pop (struct CadetPeer *peer, struct CadetConnection *c); |
179 | 179 | ||
180 | void | 180 | void |
181 | GMP_queue_unlock (struct CadetPeer *peer, struct CadetConnection *c); | 181 | GCP_queue_unlock (struct CadetPeer *peer, struct CadetConnection *c); |
182 | 182 | ||
183 | /** | 183 | /** |
184 | * Set tunnel. | 184 | * Set tunnel. |
@@ -187,7 +187,7 @@ GMP_queue_unlock (struct CadetPeer *peer, struct CadetConnection *c); | |||
187 | * @param t Tunnel. | 187 | * @param t Tunnel. |
188 | */ | 188 | */ |
189 | void | 189 | void |
190 | GMP_set_tunnel (struct CadetPeer *peer, struct CadetTunnel3 *t); | 190 | GCP_set_tunnel (struct CadetPeer *peer, struct CadetTunnel3 *t); |
191 | 191 | ||
192 | /** | 192 | /** |
193 | * Check whether there is a direct (core level) connection to peer. | 193 | * Check whether there is a direct (core level) connection to peer. |
@@ -197,7 +197,7 @@ GMP_set_tunnel (struct CadetPeer *peer, struct CadetTunnel3 *t); | |||
197 | * @return #GNUNET_YES if there is a direct connection. | 197 | * @return #GNUNET_YES if there is a direct connection. |
198 | */ | 198 | */ |
199 | int | 199 | int |
200 | GMP_is_neighbor (const struct CadetPeer *peer); | 200 | GCP_is_neighbor (const struct CadetPeer *peer); |
201 | 201 | ||
202 | /** | 202 | /** |
203 | * Create and initialize a new tunnel towards a peer, in case it has none. | 203 | * Create and initialize a new tunnel towards a peer, in case it has none. |
@@ -207,7 +207,7 @@ GMP_is_neighbor (const struct CadetPeer *peer); | |||
207 | * @param peer Peer towards which to create the tunnel. | 207 | * @param peer Peer towards which to create the tunnel. |
208 | */ | 208 | */ |
209 | void | 209 | void |
210 | GMP_add_tunnel (struct CadetPeer *peer); | 210 | GCP_add_tunnel (struct CadetPeer *peer); |
211 | 211 | ||
212 | /** | 212 | /** |
213 | * Add a connection to a neighboring peer. | 213 | * Add a connection to a neighboring peer. |
@@ -222,7 +222,7 @@ GMP_add_tunnel (struct CadetPeer *peer); | |||
222 | * @return GNUNET_OK on success. | 222 | * @return GNUNET_OK on success. |
223 | */ | 223 | */ |
224 | int | 224 | int |
225 | GMP_add_connection (struct CadetPeer *peer, struct CadetConnection *c); | 225 | GCP_add_connection (struct CadetPeer *peer, struct CadetConnection *c); |
226 | 226 | ||
227 | /** | 227 | /** |
228 | * Add the path to the peer and update the path used to reach it in case this | 228 | * Add the path to the peer and update the path used to reach it in case this |
@@ -237,7 +237,7 @@ GMP_add_connection (struct CadetPeer *peer, struct CadetConnection *c); | |||
237 | * NULL on error. | 237 | * NULL on error. |
238 | */ | 238 | */ |
239 | struct CadetPeerPath * | 239 | struct CadetPeerPath * |
240 | GMP_add_path (struct CadetPeer *peer, struct CadetPeerPath *p, int trusted); | 240 | GCP_add_path (struct CadetPeer *peer, struct CadetPeerPath *p, int trusted); |
241 | 241 | ||
242 | /** | 242 | /** |
243 | * Add the path to the origin peer and update the path used to reach it in case | 243 | * Add the path to the origin peer and update the path used to reach it in case |
@@ -254,7 +254,7 @@ GMP_add_path (struct CadetPeer *peer, struct CadetPeerPath *p, int trusted); | |||
254 | * NULL on error. | 254 | * NULL on error. |
255 | */ | 255 | */ |
256 | struct CadetPeerPath * | 256 | struct CadetPeerPath * |
257 | GMP_add_path_to_origin (struct CadetPeer *peer, | 257 | GCP_add_path_to_origin (struct CadetPeer *peer, |
258 | struct CadetPeerPath *path, | 258 | struct CadetPeerPath *path, |
259 | int trusted); | 259 | int trusted); |
260 | 260 | ||
@@ -265,7 +265,7 @@ GMP_add_path_to_origin (struct CadetPeer *peer, | |||
265 | * @param confirmed Whether we know if the path works or not. | 265 | * @param confirmed Whether we know if the path works or not. |
266 | */ | 266 | */ |
267 | void | 267 | void |
268 | GMP_add_path_to_all (const struct CadetPeerPath *p, int confirmed); | 268 | GCP_add_path_to_all (const struct CadetPeerPath *p, int confirmed); |
269 | 269 | ||
270 | /** | 270 | /** |
271 | * Remove any path to the peer that has the extact same peers as the one given. | 271 | * Remove any path to the peer that has the extact same peers as the one given. |
@@ -274,7 +274,7 @@ GMP_add_path_to_all (const struct CadetPeerPath *p, int confirmed); | |||
274 | * @param path Path to remove. Is always destroyed . | 274 | * @param path Path to remove. Is always destroyed . |
275 | */ | 275 | */ |
276 | void | 276 | void |
277 | GMP_remove_path (struct CadetPeer *peer, struct CadetPeerPath *path); | 277 | GCP_remove_path (struct CadetPeer *peer, struct CadetPeerPath *path); |
278 | 278 | ||
279 | /** | 279 | /** |
280 | * Remove a connection from a neighboring peer. | 280 | * Remove a connection from a neighboring peer. |
@@ -285,7 +285,7 @@ GMP_remove_path (struct CadetPeer *peer, struct CadetPeerPath *path); | |||
285 | * @return GNUNET_OK on success. | 285 | * @return GNUNET_OK on success. |
286 | */ | 286 | */ |
287 | int | 287 | int |
288 | GMP_remove_connection (struct CadetPeer *peer, const struct CadetConnection *c); | 288 | GCP_remove_connection (struct CadetPeer *peer, const struct CadetConnection *c); |
289 | 289 | ||
290 | /** | 290 | /** |
291 | * Start the DHT search for new paths towards the peer: we don't have | 291 | * Start the DHT search for new paths towards the peer: we don't have |
@@ -294,7 +294,7 @@ GMP_remove_connection (struct CadetPeer *peer, const struct CadetConnection *c); | |||
294 | * @param peer Destination peer. | 294 | * @param peer Destination peer. |
295 | */ | 295 | */ |
296 | void | 296 | void |
297 | GMP_start_search (struct CadetPeer *peer); | 297 | GCP_start_search (struct CadetPeer *peer); |
298 | 298 | ||
299 | /** | 299 | /** |
300 | * Stop the DHT search for new paths towards the peer: we already have | 300 | * Stop the DHT search for new paths towards the peer: we already have |
@@ -303,7 +303,7 @@ GMP_start_search (struct CadetPeer *peer); | |||
303 | * @param peer Destination peer. | 303 | * @param peer Destination peer. |
304 | */ | 304 | */ |
305 | void | 305 | void |
306 | GMP_stop_search (struct CadetPeer *peer); | 306 | GCP_stop_search (struct CadetPeer *peer); |
307 | 307 | ||
308 | /** | 308 | /** |
309 | * Get the Full ID of a peer. | 309 | * Get the Full ID of a peer. |
@@ -313,7 +313,7 @@ GMP_stop_search (struct CadetPeer *peer); | |||
313 | * @return Full ID of peer. | 313 | * @return Full ID of peer. |
314 | */ | 314 | */ |
315 | const struct GNUNET_PeerIdentity * | 315 | const struct GNUNET_PeerIdentity * |
316 | GMP_get_id (const struct CadetPeer *peer); | 316 | GCP_get_id (const struct CadetPeer *peer); |
317 | 317 | ||
318 | /** | 318 | /** |
319 | * Get the Short ID of a peer. | 319 | * Get the Short ID of a peer. |
@@ -323,7 +323,7 @@ GMP_get_id (const struct CadetPeer *peer); | |||
323 | * @return Short ID of peer. | 323 | * @return Short ID of peer. |
324 | */ | 324 | */ |
325 | GNUNET_PEER_Id | 325 | GNUNET_PEER_Id |
326 | GMP_get_short_id (const struct CadetPeer *peer); | 326 | GCP_get_short_id (const struct CadetPeer *peer); |
327 | 327 | ||
328 | /** | 328 | /** |
329 | * Get the tunnel towards a peer. | 329 | * Get the tunnel towards a peer. |
@@ -333,7 +333,7 @@ GMP_get_short_id (const struct CadetPeer *peer); | |||
333 | * @return Tunnel towards peer. | 333 | * @return Tunnel towards peer. |
334 | */ | 334 | */ |
335 | struct CadetTunnel3 * | 335 | struct CadetTunnel3 * |
336 | GMP_get_tunnel (const struct CadetPeer *peer); | 336 | GCP_get_tunnel (const struct CadetPeer *peer); |
337 | 337 | ||
338 | /** | 338 | /** |
339 | * Set the hello message. | 339 | * Set the hello message. |
@@ -342,7 +342,7 @@ GMP_get_tunnel (const struct CadetPeer *peer); | |||
342 | * @param hello Hello message. | 342 | * @param hello Hello message. |
343 | */ | 343 | */ |
344 | void | 344 | void |
345 | GMP_set_hello (struct CadetPeer *peer, const struct GNUNET_HELLO_Message *hello); | 345 | GCP_set_hello (struct CadetPeer *peer, const struct GNUNET_HELLO_Message *hello); |
346 | 346 | ||
347 | /** | 347 | /** |
348 | * Get the hello message. | 348 | * Get the hello message. |
@@ -352,7 +352,7 @@ GMP_set_hello (struct CadetPeer *peer, const struct GNUNET_HELLO_Message *hello) | |||
352 | * @return Hello message. | 352 | * @return Hello message. |
353 | */ | 353 | */ |
354 | struct GNUNET_HELLO_Message * | 354 | struct GNUNET_HELLO_Message * |
355 | GMP_get_hello (struct CadetPeer *peer); | 355 | GCP_get_hello (struct CadetPeer *peer); |
356 | 356 | ||
357 | 357 | ||
358 | /** | 358 | /** |
@@ -361,7 +361,7 @@ GMP_get_hello (struct CadetPeer *peer); | |||
361 | * @param peer Peer to whom to connect. | 361 | * @param peer Peer to whom to connect. |
362 | */ | 362 | */ |
363 | void | 363 | void |
364 | GMP_try_connect (struct CadetPeer *peer); | 364 | GCP_try_connect (struct CadetPeer *peer); |
365 | 365 | ||
366 | /** | 366 | /** |
367 | * Notify a peer that a link between two other peers is broken. If any path | 367 | * Notify a peer that a link between two other peers is broken. If any path |
@@ -372,7 +372,7 @@ GMP_try_connect (struct CadetPeer *peer); | |||
372 | * @param peer2 Peer whose link is broken. | 372 | * @param peer2 Peer whose link is broken. |
373 | */ | 373 | */ |
374 | void | 374 | void |
375 | GMP_notify_broken_link (struct CadetPeer *peer, | 375 | GCP_notify_broken_link (struct CadetPeer *peer, |
376 | struct GNUNET_PeerIdentity *peer1, | 376 | struct GNUNET_PeerIdentity *peer1, |
377 | struct GNUNET_PeerIdentity *peer2); | 377 | struct GNUNET_PeerIdentity *peer2); |
378 | 378 | ||
@@ -384,7 +384,7 @@ GMP_notify_broken_link (struct CadetPeer *peer, | |||
384 | * @return Number of known paths. | 384 | * @return Number of known paths. |
385 | */ | 385 | */ |
386 | unsigned int | 386 | unsigned int |
387 | GMP_count_paths (const struct CadetPeer *peer); | 387 | GCP_count_paths (const struct CadetPeer *peer); |
388 | 388 | ||
389 | /** | 389 | /** |
390 | * Iterate all known peers. | 390 | * Iterate all known peers. |
@@ -393,7 +393,7 @@ GMP_count_paths (const struct CadetPeer *peer); | |||
393 | * @param cls Closure for @c iter. | 393 | * @param cls Closure for @c iter. |
394 | */ | 394 | */ |
395 | void | 395 | void |
396 | GMP_iterate_all (GNUNET_CONTAINER_PeerMapIterator iter, void *cls); | 396 | GCP_iterate_all (GNUNET_CONTAINER_PeerMapIterator iter, void *cls); |
397 | 397 | ||
398 | /** | 398 | /** |
399 | * Get the static string for a peer ID. | 399 | * Get the static string for a peer ID. |
@@ -403,7 +403,7 @@ GMP_iterate_all (GNUNET_CONTAINER_PeerMapIterator iter, void *cls); | |||
403 | * @return Static string for it's ID. | 403 | * @return Static string for it's ID. |
404 | */ | 404 | */ |
405 | const char * | 405 | const char * |
406 | GMP_2s (const struct CadetPeer *peer); | 406 | GCP_2s (const struct CadetPeer *peer); |
407 | 407 | ||
408 | 408 | ||
409 | #if 0 /* keep Emacsens' auto-indent happy */ | 409 | #if 0 /* keep Emacsens' auto-indent happy */ |