aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_peer.h
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-05-14 16:50:28 +0000
committerBart Polot <bart@net.in.tum.de>2014-05-14 16:50:28 +0000
commit9aaa554470dbff968c6cab7a2850a15318c1f15b (patch)
tree2375634ba53d0dd0bd7bbc674bb3b1eb28f42742 /src/cadet/gnunet-service-cadet_peer.h
parenta8a95437e8782ef509fb64e1975a8c1ddd08eee0 (diff)
downloadgnunet-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.h66
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 */
67typedef void (*GMP_sent) (void *cls, 67typedef 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 */
81void 81void
82GMP_init (const struct GNUNET_CONFIGURATION_Handle *c); 82GCP_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 */
87void 87void
88GMP_shutdown (void); 88GCP_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 */
99struct CadetPeer * 99struct CadetPeer *
100GMP_get (const struct GNUNET_PeerIdentity *peer_id); 100GCP_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 */
111struct CadetPeer * 111struct CadetPeer *
112GMP_get_short (const GNUNET_PEER_Id peer); 112GCP_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 */
121void 121void
122GMP_connect (struct CadetPeer *peer); 122GCP_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 */
133void 133void
134GMP_queue_destroy (struct CadetPeerQueue *queue, int clear_cls, 134GCP_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 */
153struct CadetPeerQueue * 153struct CadetPeerQueue *
154GMP_queue_add (struct CadetPeer *peer, void *cls, uint16_t type, 154GCP_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 */
166void 166void
167GMP_queue_cancel (struct CadetPeer *peer, struct CadetConnection *c); 167GCP_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 */
177struct GNUNET_MessageHeader * 177struct GNUNET_MessageHeader *
178GMP_connection_pop (struct CadetPeer *peer, struct CadetConnection *c); 178GCP_connection_pop (struct CadetPeer *peer, struct CadetConnection *c);
179 179
180void 180void
181GMP_queue_unlock (struct CadetPeer *peer, struct CadetConnection *c); 181GCP_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 */
189void 189void
190GMP_set_tunnel (struct CadetPeer *peer, struct CadetTunnel3 *t); 190GCP_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 */
199int 199int
200GMP_is_neighbor (const struct CadetPeer *peer); 200GCP_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 */
209void 209void
210GMP_add_tunnel (struct CadetPeer *peer); 210GCP_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 */
224int 224int
225GMP_add_connection (struct CadetPeer *peer, struct CadetConnection *c); 225GCP_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 */
239struct CadetPeerPath * 239struct CadetPeerPath *
240GMP_add_path (struct CadetPeer *peer, struct CadetPeerPath *p, int trusted); 240GCP_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 */
256struct CadetPeerPath * 256struct CadetPeerPath *
257GMP_add_path_to_origin (struct CadetPeer *peer, 257GCP_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 */
267void 267void
268GMP_add_path_to_all (const struct CadetPeerPath *p, int confirmed); 268GCP_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 */
276void 276void
277GMP_remove_path (struct CadetPeer *peer, struct CadetPeerPath *path); 277GCP_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 */
287int 287int
288GMP_remove_connection (struct CadetPeer *peer, const struct CadetConnection *c); 288GCP_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 */
296void 296void
297GMP_start_search (struct CadetPeer *peer); 297GCP_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 */
305void 305void
306GMP_stop_search (struct CadetPeer *peer); 306GCP_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 */
315const struct GNUNET_PeerIdentity * 315const struct GNUNET_PeerIdentity *
316GMP_get_id (const struct CadetPeer *peer); 316GCP_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 */
325GNUNET_PEER_Id 325GNUNET_PEER_Id
326GMP_get_short_id (const struct CadetPeer *peer); 326GCP_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 */
335struct CadetTunnel3 * 335struct CadetTunnel3 *
336GMP_get_tunnel (const struct CadetPeer *peer); 336GCP_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 */
344void 344void
345GMP_set_hello (struct CadetPeer *peer, const struct GNUNET_HELLO_Message *hello); 345GCP_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 */
354struct GNUNET_HELLO_Message * 354struct GNUNET_HELLO_Message *
355GMP_get_hello (struct CadetPeer *peer); 355GCP_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 */
363void 363void
364GMP_try_connect (struct CadetPeer *peer); 364GCP_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 */
374void 374void
375GMP_notify_broken_link (struct CadetPeer *peer, 375GCP_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 */
386unsigned int 386unsigned int
387GMP_count_paths (const struct CadetPeer *peer); 387GCP_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 */
395void 395void
396GMP_iterate_all (GNUNET_CONTAINER_PeerMapIterator iter, void *cls); 396GCP_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 */
405const char * 405const char *
406GMP_2s (const struct CadetPeer *peer); 406GCP_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 */