diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-01-28 13:50:12 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-01-28 13:50:12 +0100 |
commit | 5f8301275181a3349e2df231d7e3c530d6c4d8e9 (patch) | |
tree | 0ab115475baa1af9af1765eb670a2f415ba25e5a /src/nat-auto | |
parent | 0157a38006025eecbed40d04153817a5df0d0e6a (diff) | |
download | gnunet-5f8301275181a3349e2df231d7e3c530d6c4d8e9.tar.gz gnunet-5f8301275181a3349e2df231d7e3c530d6c4d8e9.zip |
improve NAT API: allow client to store associated data with address
Diffstat (limited to 'src/nat-auto')
-rw-r--r-- | src/nat-auto/nat_auto_api_test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nat-auto/nat_auto_api_test.c b/src/nat-auto/nat_auto_api_test.c index 42ce08721..1511d91ba 100644 --- a/src/nat-auto/nat_auto_api_test.c +++ b/src/nat-auto/nat_auto_api_test.c | |||
@@ -357,6 +357,8 @@ mq_error_handler (void *cls, | |||
357 | * Address-callback, used to send message to gnunet-nat-server. | 357 | * Address-callback, used to send message to gnunet-nat-server. |
358 | * | 358 | * |
359 | * @param cls closure | 359 | * @param cls closure |
360 | * @param app_ctx[in,out] location where the app can store stuff | ||
361 | * on add and retrieve it on remove | ||
360 | * @param add_remove #GNUNET_YES to mean the new public IP address, #GNUNET_NO to mean | 362 | * @param add_remove #GNUNET_YES to mean the new public IP address, #GNUNET_NO to mean |
361 | * the previous (now invalid) one | 363 | * the previous (now invalid) one |
362 | * @param ac address class the address belongs to | 364 | * @param ac address class the address belongs to |
@@ -365,6 +367,7 @@ mq_error_handler (void *cls, | |||
365 | */ | 367 | */ |
366 | static void | 368 | static void |
367 | addr_cb (void *cls, | 369 | addr_cb (void *cls, |
370 | void **app_ctx, | ||
368 | int add_remove, | 371 | int add_remove, |
369 | enum GNUNET_NAT_AddressClass ac, | 372 | enum GNUNET_NAT_AddressClass ac, |
370 | const struct sockaddr *addr, | 373 | const struct sockaddr *addr, |
@@ -376,6 +379,7 @@ addr_cb (void *cls, | |||
376 | struct GNUNET_NAT_AUTO_TestMessage *msg; | 379 | struct GNUNET_NAT_AUTO_TestMessage *msg; |
377 | const struct sockaddr_in *sa; | 380 | const struct sockaddr_in *sa; |
378 | 381 | ||
382 | (void) app_ctx; | ||
379 | if (GNUNET_YES != add_remove) | 383 | if (GNUNET_YES != add_remove) |
380 | return; | 384 | return; |
381 | if (addrlen != sizeof (struct sockaddr_in)) | 385 | if (addrlen != sizeof (struct sockaddr_in)) |