summaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet-new_paths.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-16 19:31:31 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-16 19:31:40 +0100
commite66a9b07d76995c00dab4c62ef22c73d2a3d7aaf (patch)
tree669832e718b17f957c596b9fb0ccfc6e232ef7d1 /src/cadet/gnunet-service-cadet-new_paths.h
parent64ae3fa79fb69de77eee7497922af2f79cbf7de4 (diff)
downloadgnunet-e66a9b07d76995c00dab4c62ef22c73d2a3d7aaf.tar.gz
gnunet-e66a9b07d76995c00dab4c62ef22c73d2a3d7aaf.zip
finish logic to maintain paths
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_paths.h')
-rw-r--r--src/cadet/gnunet-service-cadet-new_paths.h40
1 files changed, 8 insertions, 32 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_paths.h b/src/cadet/gnunet-service-cadet-new_paths.h
index 4b47784a0..f08d4a705 100644
--- a/src/cadet/gnunet-service-cadet-new_paths.h
+++ b/src/cadet/gnunet-service-cadet-new_paths.h
@@ -32,30 +32,21 @@
32#include "gnunet-service-cadet-new.h" 32#include "gnunet-service-cadet-new.h"
33 33
34/** 34/**
35 * Create a peer path based on the result of a DHT lookup. 35 * Create a peer path based on the result of a DHT lookup. If we
36 * If we already know this path, or one that is longer, 36 * already know this path, or one that is longer, simply return NULL.
37 * simply return NULL. 37 * Otherwise, we try to extend an existing path, or create a new one
38 * if applicable.
38 * 39 *
39 * @param get_path path of the get request 40 * @param get_path path of the get request
40 * @param get_path_length lenght of @a get_path 41 * @param get_path_length lenght of @a get_path
41 * @param put_path path of the put request 42 * @param put_path path of the put request
42 * @param put_path_length length of the @a put_path 43 * @param put_path_length length of the @a put_path
43 * @return a path through the network
44 */
45struct CadetPeerPath *
46GCPP_path_from_dht (const struct GNUNET_PeerIdentity *get_path,
47 unsigned int get_path_length,
48 const struct GNUNET_PeerIdentity *put_path,
49 unsigned int put_path_length);
50
51
52/**
53 * Destroy a path, we no longer need it.
54 *
55 * @param path path to destroy.
56 */ 44 */
57void 45void
58GCPP_path_destroy (struct CadetPeerPath *path); 46GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path,
47 unsigned int get_path_length,
48 const struct GNUNET_PeerIdentity *put_path,
49 unsigned int put_path_length);
59 50
60 51
61/** 52/**
@@ -149,21 +140,6 @@ GCPP_get_desirability (const struct CadetPeerPath *path);
149 * the path desirable). 140 * the path desirable).
150 * 141 *
151 * @param path the path that is being released 142 * @param path the path that is being released
152 * @param node entry in the heap of @a cp where this path is anchored
153 * should be used for updates to the desirability of this path
154 */
155void
156GCPP_acquire (struct CadetPeerPath *path,
157 struct GNUNET_CONTAINER_HeapNode *node);
158
159
160/**
161 * The given peer @a cp used to own this @a path. However, it is no
162 * longer interested in maintaining it, so the path should be
163 * discarded or shortened (in case a previous peer on the path finds
164 * the path desirable).
165 *
166 * @param path the path that is being released
167 */ 143 */
168void 144void
169GCPP_release (struct CadetPeerPath *path); 145GCPP_release (struct CadetPeerPath *path);