diff options
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_peer.h')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_peer.h | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_peer.h b/src/cadet/gnunet-service-cadet-new_peer.h index e1c8476d1..780640674 100644 --- a/src/cadet/gnunet-service-cadet-new_peer.h +++ b/src/cadet/gnunet-service-cadet-new_peer.h | |||
@@ -120,6 +120,23 @@ GCP_iterate_paths (struct CadetPeer *cp, | |||
120 | 120 | ||
121 | 121 | ||
122 | /** | 122 | /** |
123 | * Iterate over the paths to @a peer where | ||
124 | * @a peer is at distance @a dist from us. | ||
125 | * | ||
126 | * @param peer Peer to get path info. | ||
127 | * @param dist desired distance of @a peer to us on the path | ||
128 | * @param callback Function to call for every path. | ||
129 | * @param callback_cls Closure for @a callback. | ||
130 | * @return Number of iterated paths. | ||
131 | */ | ||
132 | unsigned int | ||
133 | GCP_iterate_paths_at (struct CadetPeer *peer, | ||
134 | unsigned int dist, | ||
135 | GCP_PathIterator callback, | ||
136 | void *callback_cls); | ||
137 | |||
138 | |||
139 | /** | ||
123 | * Remove an entry from the DLL of all of the paths that this peer is on. | 140 | * Remove an entry from the DLL of all of the paths that this peer is on. |
124 | * | 141 | * |
125 | * @param cp peer to modify | 142 | * @param cp peer to modify |
@@ -174,13 +191,30 @@ GCP_drop_tunnel (struct CadetPeer *cp, | |||
174 | * has plenty of paths, return NULL. | 191 | * has plenty of paths, return NULL. |
175 | * | 192 | * |
176 | * @param cp peer to which the @a path leads to | 193 | * @param cp peer to which the @a path leads to |
177 | * @param path a path looking for an owner | 194 | * @param path a path looking for an owner; may not be fully initialized yet! |
195 | * @param off offset of @a cp in @a path | ||
178 | * @return NULL if this peer does not care to become a new owner, | 196 | * @return NULL if this peer does not care to become a new owner, |
179 | * otherwise the node in the peer's path heap for the @a path. | 197 | * otherwise the node in the peer's path heap for the @a path. |
180 | */ | 198 | */ |
181 | struct GNUNET_CONTAINER_HeapNode * | 199 | struct GNUNET_CONTAINER_HeapNode * |
182 | GCP_attach_path (struct CadetPeer *cp, | 200 | GCP_attach_path (struct CadetPeer *cp, |
183 | struct CadetPeerPath *path); | 201 | struct CadetPeerPath *path, |
202 | unsigned int off); | ||
203 | |||
204 | |||
205 | /** | ||
206 | * This peer can no longer own @a path as the path | ||
207 | * has been extended and a peer further down the line | ||
208 | * is now the new owner. | ||
209 | * | ||
210 | * @param cp old owner of the @a path | ||
211 | * @param path path where the ownership is lost | ||
212 | * @param hn note in @a cp's path heap that must be deleted | ||
213 | */ | ||
214 | void | ||
215 | GCP_detach_path (struct CadetPeer *cp, | ||
216 | struct CadetPeerPath *path, | ||
217 | struct GNUNET_CONTAINER_HeapNode *hn); | ||
184 | 218 | ||
185 | 219 | ||
186 | /** | 220 | /** |