diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-01-05 21:23:02 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-01-05 21:23:02 +0100 |
commit | 1b7f6eea0a06abab9b75b30f021aa6313fccfcd4 (patch) | |
tree | 0d726dbd6650997c22a7c17ce833ce53c23bde9e /src/nat/gnunet-nat.c | |
parent | 07d7291d64688ecf9ef0bf2b663b10a168d5fff2 (diff) | |
download | gnunet-1b7f6eea0a06abab9b75b30f021aa6313fccfcd4.tar.gz gnunet-1b7f6eea0a06abab9b75b30f021aa6313fccfcd4.zip |
pass section name instead of specific option via IPC
Diffstat (limited to 'src/nat/gnunet-nat.c')
-rw-r--r-- | src/nat/gnunet-nat.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c index 81e4549b5..4171babf9 100644 --- a/src/nat/gnunet-nat.c +++ b/src/nat/gnunet-nat.c | |||
@@ -39,10 +39,10 @@ static int global_ret; | |||
39 | static struct GNUNET_NAT_AutoHandle *ah; | 39 | static struct GNUNET_NAT_AutoHandle *ah; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * External hostname and port, if user manually punched | 42 | * Name of section in configuration file to use for |
43 | * the NAT. | 43 | * additional options. |
44 | */ | 44 | */ |
45 | static char *hole_external; | 45 | static char *section_name; |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Flag set to 1 if we use IPPROTO_UDP. | 48 | * Flag set to 1 if we use IPPROTO_UDP. |
@@ -568,8 +568,8 @@ run (void *cls, | |||
568 | if (NULL != local_addr) | 568 | if (NULL != local_addr) |
569 | { | 569 | { |
570 | nh = GNUNET_NAT_register (c, | 570 | nh = GNUNET_NAT_register (c, |
571 | section_name, | ||
571 | proto, | 572 | proto, |
572 | hole_external, | ||
573 | 1, | 573 | 1, |
574 | (const struct sockaddr **) &local_sa, | 574 | (const struct sockaddr **) &local_sa, |
575 | &local_len, | 575 | &local_len, |
@@ -698,9 +698,9 @@ main (int argc, | |||
698 | {'r', "remote", "ADDRESS", | 698 | {'r', "remote", "ADDRESS", |
699 | gettext_noop ("which remote IP and port should be asked for connection reversal"), | 699 | gettext_noop ("which remote IP and port should be asked for connection reversal"), |
700 | GNUNET_YES, &GNUNET_GETOPT_set_string, &remote_addr }, | 700 | GNUNET_YES, &GNUNET_GETOPT_set_string, &remote_addr }, |
701 | {'p', "punched", NULL, | 701 | {'S', "section", NULL, |
702 | gettext_noop ("external hostname and port of NAT, if punched manually; use AUTO for hostname for automatic determination of the external IP"), | 702 | gettext_noop ("name of configuration section to find additional options, such as manual host punching data"), |
703 | GNUNET_YES, &GNUNET_GETOPT_set_string, &hole_external }, | 703 | GNUNET_YES, &GNUNET_GETOPT_set_string, §ion_name }, |
704 | {'s', "stun", NULL, | 704 | {'s', "stun", NULL, |
705 | gettext_noop ("enable STUN processing"), | 705 | gettext_noop ("enable STUN processing"), |
706 | GNUNET_NO, &GNUNET_GETOPT_set_one, &do_stun }, | 706 | GNUNET_NO, &GNUNET_GETOPT_set_one, &do_stun }, |