gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r12720 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r12720 - gnunet/src/transport
Date: Mon, 23 Aug 2010 14:36:40 +0200

Author: wachs
Date: 2010-08-23 14:36:40 +0200 (Mon, 23 Aug 2010)
New Revision: 12720

Modified:
   gnunet/src/transport/gnunet-nat-server-windows.c
Log:
fixing little stuff that made this not work

Modified: gnunet/src/transport/gnunet-nat-server-windows.c
===================================================================
--- gnunet/src/transport/gnunet-nat-server-windows.c    2010-08-23 12:28:24 UTC 
(rev 12719)
+++ gnunet/src/transport/gnunet-nat-server-windows.c    2010-08-23 12:36:40 UTC 
(rev 12720)
@@ -66,6 +66,11 @@
 #define DUMMY_IP "192.0.2.86"
 
 /**
+ * Default Port
+ */
+#define NAT_TRAV_PORT 22225
+
+/**
  * TTL to use for our outgoing messages.
  */
 #define IPDEFTTL 64
@@ -256,7 +261,7 @@
 send_icmp_echo (const struct in_addr *my_ip)
 {
   char packet[sizeof (struct ip_header) + sizeof (struct icmp_echo_header)];
-  struct icmp_ttl_exceeded_header icmp_echo;
+  struct icmp_echo_header icmp_echo;
   struct ip_header ip_pkt;
   struct sockaddr_in dst;
   size_t off;
@@ -355,7 +360,7 @@
   ssize_t have;
   struct in_addr source_ip;
   struct ip_header ip_pkt;
-  struct icmp_ttl_exceeded_header icmp_pkt;
+  struct icmp_ttl_exceeded_header icmp_ttl;
   struct icmp_echo_header icmp_echo;
   struct udp_header udp_pkt;
   size_t off;
@@ -370,7 +375,6 @@
               strerror (errno));
       return;
     }
-  have_port = 0;
 #if VERBOSE
   fprintf (stderr,
            "Received message of %u bytes\n",
@@ -552,7 +556,7 @@
   addr.sin_addr = *my_ip;
   addr.sin_port = htons (NAT_TRAV_PORT);
   if (0 != bind (ret,
-                &addr,
+                (struct sockaddr *)&addr,
                 sizeof(addr)))
     {
       fprintf (stderr,
@@ -575,6 +579,7 @@
   WSADATA wsaData;
   unsigned int alt;
 
+  alt = 0;
   if (2 != argc)
     {
       fprintf (stderr,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]