aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-nat-server.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-08-20 14:03:17 +0000
committerChristian Grothoff <christian@grothoff.org>2010-08-20 14:03:17 +0000
commit4981e720cb71b9bf5e51dd90b5a9abacf21665ca (patch)
treef7bd39bdb2c18e7c4ae285dca9b37188af0ca88c /src/transport/gnunet-nat-server.c
parent0b5afd796960ffa15d5c6783335653604c9dfb4a (diff)
downloadgnunet-4981e720cb71b9bf5e51dd90b5a9abacf21665ca.tar.gz
gnunet-4981e720cb71b9bf5e51dd90b5a9abacf21665ca.zip
more code cleanup
Diffstat (limited to 'src/transport/gnunet-nat-server.c')
-rw-r--r--src/transport/gnunet-nat-server.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/transport/gnunet-nat-server.c b/src/transport/gnunet-nat-server.c
index fb88874d3..e9cbee47c 100644
--- a/src/transport/gnunet-nat-server.c
+++ b/src/transport/gnunet-nat-server.c
@@ -40,10 +40,11 @@
40 * - Christian Grothoff 40 * - Christian Grothoff
41 * - Nathan Evans 41 * - Nathan Evans
42 */ 42 */
43#define _GNU_SOURCE
44#if HAVE_CONFIG_H 43#if HAVE_CONFIG_H
45/* Just needed for HAVE_SOCKADDR_IN_SIN_LEN test macro! */ 44/* Just needed for HAVE_SOCKADDR_IN_SIN_LEN test macro! */
46#include "gnunet_config.h" 45#include "gnunet_config.h"
46#else
47#define _GNU_SOURCE
47#endif 48#endif
48#include <sys/types.h> 49#include <sys/types.h>
49#include <sys/socket.h> 50#include <sys/socket.h>
@@ -237,9 +238,6 @@ send_icmp_echo (const struct in_addr *my_ip)
237 icmp_echo.checksum = 0; 238 icmp_echo.checksum = 0;
238 icmp_echo.checksum = htons(calc_checksum((uint16_t*)&icmp_echo, 239 icmp_echo.checksum = htons(calc_checksum((uint16_t*)&icmp_echo,
239 sizeof (struct icmp_packet))); 240 sizeof (struct icmp_packet)));
240
241 make_echo (my_ip, &icmp_echo);
242
243 memcpy (&packet[off], &icmp_echo, sizeof (icmp_echo)); 241 memcpy (&packet[off], &icmp_echo, sizeof (icmp_echo));
244 off += sizeof (icmp_echo); 242 off += sizeof (icmp_echo);
245 243