diff options
Diffstat (limited to 'src/nat/nat_auto.c')
-rw-r--r-- | src/nat/nat_auto.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/nat/nat_auto.c b/src/nat/nat_auto.c index 68689243e..3d0040a04 100644 --- a/src/nat/nat_auto.c +++ b/src/nat/nat_auto.c | |||
@@ -86,7 +86,7 @@ enum AutoPhase | |||
86 | * Last phase, we're done. | 86 | * Last phase, we're done. |
87 | */ | 87 | */ |
88 | AUTO_DONE | 88 | AUTO_DONE |
89 | 89 | ||
90 | }; | 90 | }; |
91 | 91 | ||
92 | 92 | ||
@@ -105,12 +105,12 @@ struct GNUNET_NAT_AutoHandle | |||
105 | * Function to call when done. | 105 | * Function to call when done. |
106 | */ | 106 | */ |
107 | GNUNET_NAT_AutoResultCallback fin_cb; | 107 | GNUNET_NAT_AutoResultCallback fin_cb; |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * Closure for 'fin_cb'. | 110 | * Closure for 'fin_cb'. |
111 | */ | 111 | */ |
112 | void *fin_cb_cls; | 112 | void *fin_cb_cls; |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * Handle for active 'GNUNET_NAT_mini_get_external_ipv4'-operation. | 115 | * Handle for active 'GNUNET_NAT_mini_get_external_ipv4'-operation. |
116 | */ | 116 | */ |
@@ -171,7 +171,7 @@ fail_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
171 | ah->task = GNUNET_SCHEDULER_NO_TASK; | 171 | ah->task = GNUNET_SCHEDULER_NO_TASK; |
172 | GNUNET_NAT_test_stop (ah->tst); | 172 | GNUNET_NAT_test_stop (ah->tst); |
173 | ah->tst = NULL; | 173 | ah->tst = NULL; |
174 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", | 174 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", |
175 | "ENABLE_ICMP_SERVER", | 175 | "ENABLE_ICMP_SERVER", |
176 | "NO"); | 176 | "NO"); |
177 | next_phase (ah); | 177 | next_phase (ah); |
@@ -195,10 +195,10 @@ result_callback (void *cls, int success) | |||
195 | GNUNET_NAT_test_stop (ah->tst); | 195 | GNUNET_NAT_test_stop (ah->tst); |
196 | ah->tst = NULL; | 196 | ah->tst = NULL; |
197 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 197 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
198 | success | 198 | success |
199 | ? _("NAT traversal with ICMP Server succeeded.\n") | 199 | ? _("NAT traversal with ICMP Server succeeded.\n") |
200 | : _("NAT traversal with ICMP Server failed.\n")); | 200 | : _("NAT traversal with ICMP Server failed.\n")); |
201 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", "ENABLE_ICMP_SERVER", | 201 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", "ENABLE_ICMP_SERVER", |
202 | success ? "YES": "NO"); | 202 | success ? "YES": "NO"); |
203 | next_phase (ah); | 203 | next_phase (ah); |
204 | } | 204 | } |
@@ -352,7 +352,7 @@ nipo (void *cls, const char *name, int isDefault, const struct sockaddr *addr, | |||
352 | 352 | ||
353 | 353 | ||
354 | /** | 354 | /** |
355 | * Determine our local IP addresses; detect internal IP & IPv6-support | 355 | * Determine our local IP addresses; detect internal IP & IPv6-support |
356 | * | 356 | * |
357 | * @param ah auto setup context | 357 | * @param ah auto setup context |
358 | */ | 358 | */ |
@@ -361,7 +361,7 @@ test_local_ip (struct GNUNET_NAT_AutoHandle *ah) | |||
361 | { | 361 | { |
362 | ah->have_v6 = GNUNET_NO; | 362 | ah->have_v6 = GNUNET_NO; |
363 | GNUNET_OS_network_interfaces_list (&nipo, ah); | 363 | GNUNET_OS_network_interfaces_list (&nipo, ah); |
364 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", "DISABLEV6", | 364 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", "DISABLEV6", |
365 | (GNUNET_YES == ah->have_v6) ? "NO" : "YES"); | 365 | (GNUNET_YES == ah->have_v6) ? "NO" : "YES"); |
366 | next_phase (ah); | 366 | next_phase (ah); |
367 | } | 367 | } |
@@ -396,10 +396,10 @@ test_upnpc (struct GNUNET_NAT_AutoHandle *ah) | |||
396 | /* FIXME: test if upnpc is actually working, that is, if transports | 396 | /* FIXME: test if upnpc is actually working, that is, if transports |
397 | start to work once we use UPnP */ | 397 | start to work once we use UPnP */ |
398 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 398 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
399 | (have_upnpc) | 399 | (have_upnpc) |
400 | ? _("upnpc found, enabling its use\n") | 400 | ? _("upnpc found, enabling its use\n") |
401 | : _("upnpc not found\n")); | 401 | : _("upnpc not found\n")); |
402 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", "ENABLE_UPNP", | 402 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", "ENABLE_UPNP", |
403 | (GNUNET_YES == have_upnpc) ? "YES" : "NO"); | 403 | (GNUNET_YES == have_upnpc) ? "YES" : "NO"); |
404 | next_phase (ah); | 404 | next_phase (ah); |
405 | } | 405 | } |
@@ -430,7 +430,7 @@ test_icmp_server (struct GNUNET_NAT_AutoHandle *ah) | |||
430 | GNUNET_free_non_null (tmp); | 430 | GNUNET_free_non_null (tmp); |
431 | GNUNET_free (binary); | 431 | GNUNET_free (binary); |
432 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 432 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
433 | (hns) | 433 | (hns) |
434 | ? _("gnunet-helper-nat-server found, testing it\n") | 434 | ? _("gnunet-helper-nat-server found, testing it\n") |
435 | : _("No working gnunet-helper-nat-server found\n")); | 435 | : _("No working gnunet-helper-nat-server found\n")); |
436 | if (hns) | 436 | if (hns) |
@@ -465,7 +465,7 @@ test_icmp_client (struct GNUNET_NAT_AutoHandle *ah) | |||
465 | GNUNET_free_non_null (tmp); | 465 | GNUNET_free_non_null (tmp); |
466 | GNUNET_free (binary); | 466 | GNUNET_free (binary); |
467 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 467 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
468 | (hnc) | 468 | (hnc) |
469 | ? _("gnunet-helper-nat-client found, enabling it\n") | 469 | ? _("gnunet-helper-nat-client found, enabling it\n") |
470 | : _("gnunet-helper-nat-client not found or behind NAT, disabling it\n")); | 470 | : _("gnunet-helper-nat-client not found or behind NAT, disabling it\n")); |
471 | next_phase (ah); | 471 | next_phase (ah); |
@@ -543,14 +543,14 @@ GNUNET_NAT_autoconfig_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
543 | ah->initial_cfg = GNUNET_CONFIGURATION_dup (cfg); | 543 | ah->initial_cfg = GNUNET_CONFIGURATION_dup (cfg); |
544 | 544 | ||
545 | /* never use loopback addresses if user wanted autoconfiguration */ | 545 | /* never use loopback addresses if user wanted autoconfiguration */ |
546 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", | 546 | GNUNET_CONFIGURATION_set_value_string (ah->cfg, "nat", |
547 | "USE_LOCALADDR", | 547 | "USE_LOCALADDR", |
548 | "NO"); | 548 | "NO"); |
549 | next_phase (ah); | 549 | next_phase (ah); |
550 | return ah; | 550 | return ah; |
551 | } | 551 | } |
552 | 552 | ||
553 | 553 | ||
554 | /** | 554 | /** |
555 | * Abort autoconfiguration. | 555 | * Abort autoconfiguration. |
556 | * | 556 | * |