diff options
Diffstat (limited to 'src/nat/gnunet-helper-nat-client-windows.c')
-rw-r--r-- | src/nat/gnunet-helper-nat-client-windows.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nat/gnunet-helper-nat-client-windows.c b/src/nat/gnunet-helper-nat-client-windows.c index 9121e7943..b949374f3 100644 --- a/src/nat/gnunet-helper-nat-client-windows.c +++ b/src/nat/gnunet-helper-nat-client-windows.c | |||
@@ -168,7 +168,7 @@ struct udp_header | |||
168 | }; | 168 | }; |
169 | 169 | ||
170 | /** | 170 | /** |
171 | * Will this binary be run in permissions testing mode? | 171 | * Will this binary be run in permissions testing mode? |
172 | */ | 172 | */ |
173 | static boolean privilege_testing = FALSE; | 173 | static boolean privilege_testing = FALSE; |
174 | 174 | ||
@@ -468,10 +468,10 @@ main (int argc, char *const *argv) | |||
468 | struct in_addr target; | 468 | struct in_addr target; |
469 | WSADATA wsaData; | 469 | WSADATA wsaData; |
470 | unsigned int p; | 470 | unsigned int p; |
471 | 471 | ||
472 | if (argc > 1 && 0 != strcmp (argv[1], "-d")){ | 472 | if (argc > 1 && 0 != strcmp (argv[1], "-d")){ |
473 | privilege_testing = TRUE; | 473 | privilege_testing = TRUE; |
474 | fprintf (stderr, | 474 | fprintf (stderr, |
475 | "%s", | 475 | "%s", |
476 | "DEBUG: Running binary in privilege testing mode."); | 476 | "DEBUG: Running binary in privilege testing mode."); |
477 | argv++; | 477 | argv++; |
@@ -489,14 +489,14 @@ main (int argc, char *const *argv) | |||
489 | (1 != inet_pton (AF_INET, argv[2], &target))) | 489 | (1 != inet_pton (AF_INET, argv[2], &target))) |
490 | { | 490 | { |
491 | fprintf (stderr, | 491 | fprintf (stderr, |
492 | "Error parsing IPv4 address: %s\n", | 492 | "Error parsing IPv4 address: %s\n", |
493 | strerror (errno)); | 493 | strerror (errno)); |
494 | return 1; | 494 | return 1; |
495 | } | 495 | } |
496 | if ((1 != sscanf (argv[3], "%u", &p)) || (0 == p) || (0xFFFF < p)) | 496 | if ((1 != sscanf (argv[3], "%u", &p)) || (0 == p) || (0xFFFF < p)) |
497 | { | 497 | { |
498 | fprintf (stderr, | 498 | fprintf (stderr, |
499 | "Error parsing port value `%s'\n", | 499 | "Error parsing port value `%s'\n", |
500 | argv[3]); | 500 | argv[3]); |
501 | return 1; | 501 | return 1; |
502 | } | 502 | } |
@@ -504,14 +504,14 @@ main (int argc, char *const *argv) | |||
504 | 504 | ||
505 | if (0 != WSAStartup (MAKEWORD (2, 1), &wsaData)) | 505 | if (0 != WSAStartup (MAKEWORD (2, 1), &wsaData)) |
506 | { | 506 | { |
507 | fprintf (stderr, | 507 | fprintf (stderr, |
508 | "%s", | 508 | "%s", |
509 | "Failed to find Winsock 2.1 or better.\n"); | 509 | "Failed to find Winsock 2.1 or better.\n"); |
510 | return 2; | 510 | return 2; |
511 | } | 511 | } |
512 | if (1 != inet_pton (AF_INET, DUMMY_IP, &dummy)) | 512 | if (1 != inet_pton (AF_INET, DUMMY_IP, &dummy)) |
513 | { | 513 | { |
514 | fprintf (stderr, | 514 | fprintf (stderr, |
515 | "%s", | 515 | "%s", |
516 | "Internal error converting dummy IP to binary.\n"); | 516 | "Internal error converting dummy IP to binary.\n"); |
517 | return 2; | 517 | return 2; |
@@ -522,7 +522,7 @@ main (int argc, char *const *argv) | |||
522 | send_icmp (&external, &target); | 522 | send_icmp (&external, &target); |
523 | send_icmp_udp (&external, &target); | 523 | send_icmp_udp (&external, &target); |
524 | } | 524 | } |
525 | closesocket (rawsock); | 525 | closesocket (rawsock); |
526 | WSACleanup (); | 526 | WSACleanup (); |
527 | return 0; | 527 | return 0; |
528 | } | 528 | } |