From 5f8301275181a3349e2df231d7e3c530d6c4d8e9 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 28 Jan 2019 13:50:12 +0100 Subject: improve NAT API: allow client to store associated data with address --- src/nat/gnunet-nat.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nat/gnunet-nat.c') diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c index 31b6a7268..275553203 100644 --- a/src/nat/gnunet-nat.c +++ b/src/nat/gnunet-nat.c @@ -110,6 +110,8 @@ test_finished () * a function to call whenever our set of 'valid' addresses changes. * * @param cls closure, NULL + * @param app_ctx[in,out] location where the app can store stuff + * on add and retrieve it on remove * @param add_remove #GNUNET_YES to add a new public IP address, * #GNUNET_NO to remove a previous (now invalid) one * @param ac address class the address belongs to @@ -118,11 +120,15 @@ test_finished () */ static void address_cb (void *cls, + void **app_ctx, int add_remove, enum GNUNET_NAT_AddressClass ac, const struct sockaddr *addr, socklen_t addrlen) { + (void) cls; + (void) app_ctx; + fprintf (stdout, "%s %s (%d)\n", add_remove ? "+" : "-", -- cgit v1.2.3