windoze suckssss
[oweals/gnunet.git] / src / transport / gnunet-nat-client-windows.c
index 5b35de4da068e7122229208cedb9fad76ca42dcf..febe33193d9e54bae903c6ef10c603d84ed80987 100644 (file)
@@ -201,7 +201,6 @@ static void
 send_icmp_echo (const struct in_addr *my_ip)
 {
   struct icmp_packet icmp_echo;
-  struct icmp_echo_packet icmp_echo_pkt;
   struct sockaddr_in dst;
   size_t off;
   int err;
@@ -224,9 +223,9 @@ send_icmp_echo (const struct in_addr *my_ip)
   ip_pkt.checksum = htons(calc_checksum((uint16_t*)&ip_pkt, sizeof (ip_pkt)));
   memcpy (packet, &ip_pkt, sizeof (ip_pkt));
   off += sizeof (ip_pkt);
-  make_echo (my_ip, &icmp_echo_pkt, port);
-  memcpy (&packet[off], &icmp_echo_pkt, sizeof (icmp_echo_pkt));
-  off += sizeof (icmp_echo_pkt);
+  make_echo2 (my_ip, &icmp_echo);
+  memcpy (&packet[off], &icmp_echo, sizeof (icmp_echo));
+  off += sizeof (icmp_echo);
 
   memset (&dst, 0, sizeof (dst));
   dst.sin_family = AF_INET;
@@ -388,6 +387,7 @@ send_icmp (const struct in_addr *my_ip,
   ip_pkt.src_ip = my_ip->s_addr;
   ip_pkt.dst_ip = other->s_addr;
   ip_pkt.checksum = htons(calc_checksum((uint16_t*)&ip_pkt, sizeof (struct ip_packet)));
+
   memcpy (packet, &ip_pkt, sizeof (struct ip_packet));
   off += sizeof (ip_pkt);
   /* icmp reply: time exceeded */
@@ -526,7 +526,7 @@ main (int argc, char *const *argv)
                strerror (errno));
       abort ();
     }
-  fprintf(stderr, "Sending icmp echo message.\n");
+  fprintf(stderr, "Sending icmp message.\n");
   send_icmp_echo(&target);
   fprintf(stderr, "Sending icmp message.\n");
   send_icmp (&external,