aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/gnunet_os_lib.h8
-rw-r--r--src/nat/nat.c8
-rw-r--r--src/nat/test_nat.c8
-rw-r--r--src/transport/plugin_transport_tcp.c2
-rw-r--r--src/util/os_network.c20
-rw-r--r--src/util/test_os_network.c6
6 files changed, 40 insertions, 12 deletions
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h
index 31062bd40..12ec3a54e 100644
--- a/src/include/gnunet_os_lib.h
+++ b/src/include/gnunet_os_lib.h
@@ -146,13 +146,17 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind);
146 * @param name name of the interface (can be NULL for unknown) 146 * @param name name of the interface (can be NULL for unknown)
147 * @param isDefault is this presumably the default interface 147 * @param isDefault is this presumably the default interface
148 * @param addr address of this interface (can be NULL for unknown or unassigned) 148 * @param addr address of this interface (can be NULL for unknown or unassigned)
149 * @param broadcast_addr the broadcast address (can be NULL for unknown or unassigned)
150 * @param netmask the network mask (can be NULL for unknown or unassigned))
149 * @param addrlen length of the address 151 * @param addrlen length of the address
150 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort 152 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
151 */ 153 */
152typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls, const char *name, 154typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls, const char *name,
153 int isDefault, 155 int isDefault,
154 const struct sockaddr * 156 const struct sockaddr * addr,
155 addr, socklen_t addrlen); 157 const struct sockaddr * broadcast_addr,
158 const struct sockaddr * netmask,
159 socklen_t addrlen);
156 160
157 161
158/** 162/**
diff --git a/src/nat/nat.c b/src/nat/nat.c
index 0a1f4c4b5..c0f9daa32 100644
--- a/src/nat/nat.c
+++ b/src/nat/nat.c
@@ -633,8 +633,12 @@ process_hostname_ip (void *cls, const struct sockaddr *addr, socklen_t addrlen)
633 * @return GNUNET_OK to continue iterating 633 * @return GNUNET_OK to continue iterating
634 */ 634 */
635static int 635static int
636process_interfaces (void *cls, const char *name, int isDefault, 636process_interfaces(void *cls, const char *name,
637 const struct sockaddr *addr, socklen_t addrlen) 637 int isDefault,
638 const struct sockaddr * addr,
639 const struct sockaddr * broadcast_addr,
640 const struct sockaddr * netmask,
641 socklen_t addrlen)
638{ 642{
639 struct GNUNET_NAT_Handle *h = cls; 643 struct GNUNET_NAT_Handle *h = cls;
640 const struct sockaddr_in *s4; 644 const struct sockaddr_in *s4;
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c
index 19631af08..f7f64ce03 100644
--- a/src/nat/test_nat.c
+++ b/src/nat/test_nat.c
@@ -97,8 +97,12 @@ struct addr_cls
97 * @return GNUNET_OK to continue iterating 97 * @return GNUNET_OK to continue iterating
98 */ 98 */
99static int 99static int
100process_if (void *cls, const char *name, int isDefault, 100process_if (void *cls, const char *name,
101 const struct sockaddr *addr, socklen_t addrlen) 101 int isDefault,
102 const struct sockaddr * addr,
103 const struct sockaddr * broadcast_addr,
104 const struct sockaddr * netmask,
105 socklen_t addrlen)
102{ 106{
103 struct addr_cls *data = cls; 107 struct addr_cls *data = cls;
104 108
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 1f5327c93..41ecb178d 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -428,7 +428,7 @@ tcp_nat_port_map_callback (void *cls, int add_remove,
428 void *arg; 428 void *arg;
429 size_t args; 429 size_t args;
430 430
431 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "tcp", 431 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "tcp",
432 "NPMC called with %d for address `%s'\n", add_remove, 432 "NPMC called with %d for address `%s'\n", add_remove,
433 GNUNET_a2s (addr, addrlen)); 433 GNUNET_a2s (addr, addrlen));
434 /* convert 'addr' to our internal format */ 434 /* convert 'addr' to our internal format */
diff --git a/src/util/os_network.c b/src/util/os_network.c
index 70d143ba1..1fd55ff04 100644
--- a/src/util/os_network.c
+++ b/src/util/os_network.c
@@ -157,7 +157,10 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
157 if (GNUNET_OK != 157 if (GNUNET_OK !=
158 proc (proc_cls, szEntry, 158 proc (proc_cls, szEntry,
159 pTable->table[dwIfIdx].dwIndex == dwExternalNIC, 159 pTable->table[dwIfIdx].dwIndex == dwExternalNIC,
160 (const struct sockaddr *) &sa, sizeof (sa))) 160 (const struct sockaddr *) &sa,
161 NULL,
162 NULL,
163 sizeof (sa)))
161 break; 164 break;
162 } 165 }
163 } 166 }
@@ -190,7 +193,10 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
190 if (GNUNET_OK != 193 if (GNUNET_OK !=
191 proc (proc_cls, ifa_ptr->ifa_name, 194 proc (proc_cls, ifa_ptr->ifa_name,
192 0 == strcmp (ifa_ptr->ifa_name, GNUNET_DEFAULT_INTERFACE), 195 0 == strcmp (ifa_ptr->ifa_name, GNUNET_DEFAULT_INTERFACE),
193 ifa_ptr->ifa_addr, alen)) 196 ifa_ptr->ifa_addr,
197 NULL,
198 NULL,
199 alen))
194 break; 200 break;
195 } 201 }
196 } 202 }
@@ -262,7 +268,10 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
262 a4.sin_addr = v4; 268 a4.sin_addr = v4;
263 if (GNUNET_OK != 269 if (GNUNET_OK !=
264 proc (proc_cls, ifc, 0 == strcmp (ifc, GNUNET_DEFAULT_INTERFACE), 270 proc (proc_cls, ifc, 0 == strcmp (ifc, GNUNET_DEFAULT_INTERFACE),
265 (const struct sockaddr *) &a4, sizeof (a4))) 271 (const struct sockaddr *) &a4,
272 NULL,
273 NULL,
274 sizeof (a4)))
266 break; 275 break;
267 continue; 276 continue;
268 } 277 }
@@ -277,7 +286,10 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
277 a6.sin6_addr = v6; 286 a6.sin6_addr = v6;
278 if (GNUNET_OK != 287 if (GNUNET_OK !=
279 proc (proc_cls, ifc, 0 == strcmp (ifc, GNUNET_DEFAULT_INTERFACE), 288 proc (proc_cls, ifc, 0 == strcmp (ifc, GNUNET_DEFAULT_INTERFACE),
280 (const struct sockaddr *) &a6, sizeof (a6))) 289 (const struct sockaddr *) &a6,
290 NULL,
291 NULL,
292 sizeof (a6)))
281 break; 293 break;
282 continue; 294 continue;
283 } 295 }
diff --git a/src/util/test_os_network.c b/src/util/test_os_network.c
index 315f97d97..ab39e5eda 100644
--- a/src/util/test_os_network.c
+++ b/src/util/test_os_network.c
@@ -34,7 +34,11 @@
34 * (success). 34 * (success).
35 */ 35 */
36static int 36static int
37proc (void *cls, const char *name, int isDefault, const struct sockaddr *addr, 37proc (void *cls, const char *name,
38 int isDefault,
39 const struct sockaddr * addr,
40 const struct sockaddr * broadcast_addr,
41 const struct sockaddr * netmask,
38 socklen_t addrlen) 42 socklen_t addrlen)
39{ 43{
40 int *ok = cls; 44 int *ok = cls;