diff options
Diffstat (limited to 'src/nat/nat_api.c')
-rw-r--r-- | src/nat/nat_api.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nat/nat_api.c b/src/nat/nat_api.c index 6ae689b63..04fa366aa 100644 --- a/src/nat/nat_api.c +++ b/src/nat/nat_api.c | |||
@@ -49,6 +49,12 @@ struct AddrEntry | |||
49 | struct AddrEntry *prev; | 49 | struct AddrEntry *prev; |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * Place where the application can store data (on add, | ||
53 | * and retrieve on remove). | ||
54 | */ | ||
55 | void *app_ctx; | ||
56 | |||
57 | /** | ||
52 | * Address class of the address. | 58 | * Address class of the address. |
53 | */ | 59 | */ |
54 | enum GNUNET_NAT_AddressClass ac; | 60 | enum GNUNET_NAT_AddressClass ac; |
@@ -148,6 +154,7 @@ reconnect (struct GNUNET_NAT_Handle *nh) | |||
148 | nh->ae_tail, | 154 | nh->ae_tail, |
149 | ae); | 155 | ae); |
150 | nh->address_callback (nh->callback_cls, | 156 | nh->address_callback (nh->callback_cls, |
157 | &ae->app_ctx, | ||
151 | GNUNET_NO, | 158 | GNUNET_NO, |
152 | ae->ac, | 159 | ae->ac, |
153 | (const struct sockaddr *) &ae[1], | 160 | (const struct sockaddr *) &ae[1], |
@@ -299,6 +306,7 @@ handle_address_change_notification (void *cls, | |||
299 | GNUNET_free (ae); | 306 | GNUNET_free (ae); |
300 | } | 307 | } |
301 | nh->address_callback (nh->callback_cls, | 308 | nh->address_callback (nh->callback_cls, |
309 | &ae->app_ctx, | ||
302 | ntohl (acn->add_remove), | 310 | ntohl (acn->add_remove), |
303 | ac, | 311 | ac, |
304 | sa, | 312 | sa, |