gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r15504 - in gnunet/src: include nat transport


From: gnunet
Subject: [GNUnet-SVN] r15504 - in gnunet/src: include nat transport
Date: Thu, 9 Jun 2011 23:11:43 +0200

Author: grothoff
Date: 2011-06-09 23:11:42 +0200 (Thu, 09 Jun 2011)
New Revision: 15504

Modified:
   gnunet/src/include/gnunet_nat_lib.h
   gnunet/src/nat/nat.c
   gnunet/src/transport/plugin_transport_tcp.c
Log:
pass cfg to nat

Modified: gnunet/src/include/gnunet_nat_lib.h
===================================================================
--- gnunet/src/include/gnunet_nat_lib.h 2011-06-09 21:03:18 UTC (rev 15503)
+++ gnunet/src/include/gnunet_nat_lib.h 2011-06-09 21:11:42 UTC (rev 15504)
@@ -57,6 +57,7 @@
  * 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
@@ -64,7 +65,8 @@
  * @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);

Modified: gnunet/src/nat/nat.c
===================================================================
--- gnunet/src/nat/nat.c        2011-06-09 21:03:18 UTC (rev 15503)
+++ gnunet/src/nat/nat.c        2011-06-09 21:11:42 UTC (rev 15504)
@@ -366,6 +366,7 @@
  * 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
@@ -373,7 +374,8 @@
  * @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)
 {

Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2011-06-09 21:03:18 UTC (rev 
15503)
+++ gnunet/src/transport/plugin_transport_tcp.c 2011-06-09 21:11:42 UTC (rev 
15504)
@@ -641,7 +641,8 @@
     }
   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);
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]