summaryrefslogtreecommitdiff
path: root/src/ats-tool/gnunet-ats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats-tool/gnunet-ats.c')
-rw-r--r--src/ats-tool/gnunet-ats.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c
index 0f6609365..766f2fe2a 100644
--- a/src/ats-tool/gnunet-ats.c
+++ b/src/ats-tool/gnunet-ats.c
@@ -284,13 +284,31 @@ transport_addr_to_str_cb (void *cls,
284} 284}
285 285
286 286
287/**
288 * Closure for #find_address_it().
289 */
287struct AddressFindCtx 290struct AddressFindCtx
288{ 291{
292 /**
293 * Address we are looking for.
294 */
289 const struct GNUNET_HELLO_Address *src; 295 const struct GNUNET_HELLO_Address *src;
296
297 /**
298 * Where to write the `struct ATSAddress` if we found one that matches.
299 */
290 struct ATSAddress *res; 300 struct ATSAddress *res;
291}; 301};
292 302
293 303
304/**
305 * Find address corresponding to a given peer.
306 *
307 * @param cls the `struct AddressFindCtx`
308 * @param key peer identity
309 * @param value the `struct ATSAddress *` for an existing address
310 * @return #GNUNET_NO if we found a match, #GNUNET_YES if not
311 */
294static int 312static int
295find_address_it (void *cls, 313find_address_it (void *cls,
296 const struct GNUNET_PeerIdentity *key, 314 const struct GNUNET_PeerIdentity *key,