aboutsummaryrefslogtreecommitdiff
path: root/src/nat
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
committerChristian Grothoff <christian@grothoff.org>2019-10-31 13:03:48 +0100
commit7e3cf5f461eb4fbb7581672bf0835da07c378136 (patch)
treebdc3874b7894242b095b892f1ed3e81a4d4f06c0 /src/nat
parent01b480d6d026e0c537dc284a7e7df2c0320a3528 (diff)
downloadgnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.tar.gz
gnunet-7e3cf5f461eb4fbb7581672bf0835da07c378136.zip
tighten formatting rules
Diffstat (limited to 'src/nat')
-rw-r--r--src/nat/gnunet-helper-nat-client.c1
-rw-r--r--src/nat/gnunet-service-nat.c5
-rw-r--r--src/nat/gnunet-service-nat_externalip.c1
-rw-r--r--src/nat/gnunet-service-nat_mini.c6
-rw-r--r--src/nat/gnunet-service-nat_stun.c1
-rw-r--r--src/nat/nat.h1
-rw-r--r--src/nat/test_nat.c1
-rw-r--r--src/nat/test_nat_mini.c2
-rw-r--r--src/nat/test_nat_test.c1
-rw-r--r--src/nat/test_stun.c2
10 files changed, 13 insertions, 8 deletions
diff --git a/src/nat/gnunet-helper-nat-client.c b/src/nat/gnunet-helper-nat-client.c
index 5d12092e7..12abfd2df 100644
--- a/src/nat/gnunet-helper-nat-client.c
+++ b/src/nat/gnunet-helper-nat-client.c
@@ -541,4 +541,5 @@ cleanup:
541 return global_ret; 541 return global_ret;
542} 542}
543 543
544
544/* end of gnunet-helper-nat-client.c */ 545/* end of gnunet-helper-nat-client.c */
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c
index 59a340324..9a70622c4 100644
--- a/src/nat/gnunet-service-nat.c
+++ b/src/nat/gnunet-service-nat.c
@@ -1732,8 +1732,7 @@ handle_stun (void *cls,
1732 removed again. The timeout frequency should be configurable 1732 removed again. The timeout frequency should be configurable
1733 (with a sane default), so that the UDP plugin can tell how 1733 (with a sane default), so that the UDP plugin can tell how
1734 often to re-request STUN. 1734 often to re-request STUN.
1735 */ 1735 */struct StunExternalIP *se;
1736 struct StunExternalIP *se;
1737 1736
1738 /* Check if we had a prior response from this STUN server */ 1737 /* Check if we had a prior response from this STUN server */
1739 for (se = se_head; NULL != se; se = se->next) 1738 for (se = se_head; NULL != se; se = se->next)
@@ -2077,6 +2076,8 @@ GNUNET_ARM_memory_init ()
2077 mallopt (M_TOP_PAD, 1 * 1024); 2076 mallopt (M_TOP_PAD, 1 * 1024);
2078 malloc_trim (0); 2077 malloc_trim (0);
2079} 2078}
2079
2080
2080#endif 2081#endif
2081 2082
2082/* end of gnunet-service-nat.c */ 2083/* end of gnunet-service-nat.c */
diff --git a/src/nat/gnunet-service-nat_externalip.c b/src/nat/gnunet-service-nat_externalip.c
index 0a251bdb2..c2625be2d 100644
--- a/src/nat/gnunet-service-nat_externalip.c
+++ b/src/nat/gnunet-service-nat_externalip.c
@@ -312,4 +312,5 @@ GN_external_ipv4_monitor_stop (struct GN_ExternalIPMonitor *mon)
312 GNUNET_free (mon); 312 GNUNET_free (mon);
313} 313}
314 314
315
315/* end of gnunet-service-nat_externalip.c */ 316/* end of gnunet-service-nat_externalip.c */
diff --git a/src/nat/gnunet-service-nat_mini.c b/src/nat/gnunet-service-nat_mini.c
index 1382010bd..ae94e3f5b 100644
--- a/src/nat/gnunet-service-nat_mini.c
+++ b/src/nat/gnunet-service-nat_mini.c
@@ -443,8 +443,7 @@ process_refresh_output (void *cls, const char *line)
443 * 443 *
444 * "%s TCP PORT->STRING:OURPORT *" or 444 * "%s TCP PORT->STRING:OURPORT *" or
445 * "%s UDP PORT->STRING:OURPORT *" 445 * "%s UDP PORT->STRING:OURPORT *"
446 */ 446 */GNUNET_snprintf (pstr, sizeof(pstr), ":%u ", mini->port);
447 GNUNET_snprintf (pstr, sizeof(pstr), ":%u ", mini->port);
448 if (NULL == (s = strstr (line, "->"))) 447 if (NULL == (s = strstr (line, "->")))
449 return; /* skip */ 448 return; /* skip */
450 if (NULL == strstr (s, pstr)) 449 if (NULL == strstr (s, pstr))
@@ -554,8 +553,7 @@ process_map_output (void *cls, const char *line)
554 * The upnpc output we're after looks like this: 553 * The upnpc output we're after looks like this:
555 * 554 *
556 * "external 87.123.42.204:3000 TCP is redirected to internal 192.168.2.150:3000" 555 * "external 87.123.42.204:3000 TCP is redirected to internal 192.168.2.150:3000"
557 */ 556 */if ((NULL == (ipaddr = strstr (line, " "))) ||
558 if ((NULL == (ipaddr = strstr (line, " "))) ||
559 (NULL == (pstr = strstr (ipaddr, ":"))) || 557 (NULL == (pstr = strstr (ipaddr, ":"))) ||
560 (1 != sscanf (pstr + 1, "%u", &port))) 558 (1 != sscanf (pstr + 1, "%u", &port)))
561 { 559 {
diff --git a/src/nat/gnunet-service-nat_stun.c b/src/nat/gnunet-service-nat_stun.c
index 8a5311254..203728ebf 100644
--- a/src/nat/gnunet-service-nat_stun.c
+++ b/src/nat/gnunet-service-nat_stun.c
@@ -211,4 +211,5 @@ GNUNET_NAT_stun_handle_packet_ (const void *data,
211 return ret; 211 return ret;
212} 212}
213 213
214
214/* end of gnunet-service-nat_stun.c */ 215/* end of gnunet-service-nat_stun.c */
diff --git a/src/nat/nat.h b/src/nat/nat.h
index aac8db64c..1d8648aaf 100644
--- a/src/nat/nat.h
+++ b/src/nat/nat.h
@@ -29,7 +29,6 @@
29#include "gnunet_util_lib.h" 29#include "gnunet_util_lib.h"
30 30
31 31
32
33GNUNET_NETWORK_STRUCT_BEGIN 32GNUNET_NETWORK_STRUCT_BEGIN
34 33
35/** 34/**
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c
index f04cf5669..69a2f4218 100644
--- a/src/nat/test_nat.c
+++ b/src/nat/test_nat.c
@@ -188,4 +188,5 @@ main (int argc, char *const argv[])
188 return 0; 188 return 0;
189} 189}
190 190
191
191/* end of test_nat.c */ 192/* end of test_nat.c */
diff --git a/src/nat/test_nat_mini.c b/src/nat/test_nat_mini.c
index 49c801571..8cbd4131d 100644
--- a/src/nat/test_nat_mini.c
+++ b/src/nat/test_nat_mini.c
@@ -75,6 +75,7 @@ stop (void *cls)
75 GNUNET_NAT_mini_map_stop (mini); 75 GNUNET_NAT_mini_map_stop (mini);
76} 76}
77 77
78
78#define PORT 10000 79#define PORT 10000
79 80
80/** 81/**
@@ -129,4 +130,5 @@ main (int argc, char *const argv[])
129 return 0; 130 return 0;
130} 131}
131 132
133
132/* end of test_nat_mini.c */ 134/* end of test_nat_mini.c */
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c
index 1eabab50c..43998c97c 100644
--- a/src/nat/test_nat_test.c
+++ b/src/nat/test_nat_test.c
@@ -138,4 +138,5 @@ main (int argc, char *const argv[])
138 return ret; 138 return ret;
139} 139}
140 140
141
141/* end of test_nat_test.c */ 142/* end of test_nat_test.c */
diff --git a/src/nat/test_stun.c b/src/nat/test_stun.c
index 41e962ea0..a41734af1 100644
--- a/src/nat/test_stun.c
+++ b/src/nat/test_stun.c
@@ -35,7 +35,6 @@
35#include "gnunet_nat_lib.h" 35#include "gnunet_nat_lib.h"
36 36
37 37
38
39#define LOG(kind, ...) GNUNET_log_from (kind, "test-stun", __VA_ARGS__) 38#define LOG(kind, ...) GNUNET_log_from (kind, "test-stun", __VA_ARGS__)
40 39
41/** 40/**
@@ -310,4 +309,5 @@ main (int argc, char *const argv[])
310 return ret; 309 return ret;
311} 310}
312 311
312
313/* end of test_stun.c */ 313/* end of test_stun.c */