* of the local host's addresses should the external port be mapped. The port
* is taken from the corresponding sockaddr_in[6] field.
*
+ * @param cfg configuration to use
* @param addr the local address packets should be redirected to
* @param addrlen actual lenght of the address
* @param callback function to call everytime the public IP address changes
* @return NULL on error, otherwise handle that can be used to unregister
*/
struct GNUNET_NAT_Handle *
-GNUNET_NAT_register (const struct sockaddr *addr,
+GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct sockaddr *addr,
socklen_t addrlen,
GNUNET_NAT_AddressCallback callback,
void *callback_cls);
* of the local host's addresses should the external port be mapped. The port
* is taken from the corresponding sockaddr_in[6] field.
*
+ * @param cfg configuration to use
* @param addr the local address packets should be redirected to
* @param addrlen actual lenght of the address
* @param callback function to call everytime the public IP address changes
* @return NULL on error, otherwise handle that can be used to unregister
*/
struct GNUNET_NAT_Handle *
-GNUNET_NAT_register (const struct sockaddr *addr,
+GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct sockaddr *addr,
socklen_t addrlen,
GNUNET_NAT_AddressCallback callback, void *callback_cls)
{
}
if ( (plugin->behind_nat == GNUNET_YES) &&
(plugin->enable_upnp == GNUNET_YES) )
- lal->nat = GNUNET_NAT_register (sa, salen,
+ lal->nat = GNUNET_NAT_register (plugin->env->cfg,
+ sa, salen,
&nat_port_map_callback,
lal);
}