aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-08-23 12:36:40 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-08-23 12:36:40 +0000
commit50a26de548ec58000ad6232a949dee62be521177 (patch)
treee1f0d2817e19b8131b89da7dec2c8587dea1421b /src/transport
parentcbfa5727ef857862d8c79d99cbaf60e504d8c2a0 (diff)
downloadgnunet-50a26de548ec58000ad6232a949dee62be521177.tar.gz
gnunet-50a26de548ec58000ad6232a949dee62be521177.zip
fixing little stuff that made this not work
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-nat-server-windows.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/transport/gnunet-nat-server-windows.c b/src/transport/gnunet-nat-server-windows.c
index a507c9427..8cfad2ff2 100644
--- a/src/transport/gnunet-nat-server-windows.c
+++ b/src/transport/gnunet-nat-server-windows.c
@@ -66,6 +66,11 @@
66#define DUMMY_IP "192.0.2.86" 66#define DUMMY_IP "192.0.2.86"
67 67
68/** 68/**
69 * Default Port
70 */
71#define NAT_TRAV_PORT 22225
72
73/**
69 * TTL to use for our outgoing messages. 74 * TTL to use for our outgoing messages.
70 */ 75 */
71#define IPDEFTTL 64 76#define IPDEFTTL 64
@@ -256,7 +261,7 @@ static void
256send_icmp_echo (const struct in_addr *my_ip) 261send_icmp_echo (const struct in_addr *my_ip)
257{ 262{
258 char packet[sizeof (struct ip_header) + sizeof (struct icmp_echo_header)]; 263 char packet[sizeof (struct ip_header) + sizeof (struct icmp_echo_header)];
259 struct icmp_ttl_exceeded_header icmp_echo; 264 struct icmp_echo_header icmp_echo;
260 struct ip_header ip_pkt; 265 struct ip_header ip_pkt;
261 struct sockaddr_in dst; 266 struct sockaddr_in dst;
262 size_t off; 267 size_t off;
@@ -355,7 +360,7 @@ process_icmp_response ()
355 ssize_t have; 360 ssize_t have;
356 struct in_addr source_ip; 361 struct in_addr source_ip;
357 struct ip_header ip_pkt; 362 struct ip_header ip_pkt;
358 struct icmp_ttl_exceeded_header icmp_pkt; 363 struct icmp_ttl_exceeded_header icmp_ttl;
359 struct icmp_echo_header icmp_echo; 364 struct icmp_echo_header icmp_echo;
360 struct udp_header udp_pkt; 365 struct udp_header udp_pkt;
361 size_t off; 366 size_t off;
@@ -370,7 +375,6 @@ process_icmp_response ()
370 strerror (errno)); 375 strerror (errno));
371 return; 376 return;
372 } 377 }
373 have_port = 0;
374#if VERBOSE 378#if VERBOSE
375 fprintf (stderr, 379 fprintf (stderr,
376 "Received message of %u bytes\n", 380 "Received message of %u bytes\n",
@@ -552,7 +556,7 @@ make_udp_socket (const struct in_addr *my_ip)
552 addr.sin_addr = *my_ip; 556 addr.sin_addr = *my_ip;
553 addr.sin_port = htons (NAT_TRAV_PORT); 557 addr.sin_port = htons (NAT_TRAV_PORT);
554 if (0 != bind (ret, 558 if (0 != bind (ret,
555 &addr, 559 (struct sockaddr *)&addr,
556 sizeof(addr))) 560 sizeof(addr)))
557 { 561 {
558 fprintf (stderr, 562 fprintf (stderr,
@@ -575,6 +579,7 @@ main (int argc,
575 WSADATA wsaData; 579 WSADATA wsaData;
576 unsigned int alt; 580 unsigned int alt;
577 581
582 alt = 0;
578 if (2 != argc) 583 if (2 != argc)
579 { 584 {
580 fprintf (stderr, 585 fprintf (stderr,