From 18e5334afd65b4a8e6f8d49ed10c81953a4a3cbd Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Thu, 19 Aug 2010 08:44:47 +0000 Subject: [PATCH] windoze suckssss --- src/transport/gnunet-nat-server-windows.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/transport/gnunet-nat-server-windows.c b/src/transport/gnunet-nat-server-windows.c index c5f96414b..a4a7145a8 100644 --- a/src/transport/gnunet-nat-server-windows.c +++ b/src/transport/gnunet-nat-server-windows.c @@ -406,13 +406,13 @@ make_raw_socket () const int one = 1; #ifdef WIN32 - BOOL bOptVal = FALSE; - int bOptLen = sizeof(BOOL); + int bOptVal = TRUE; + int bOptLen = sizeof(bOptVal); int iOptVal; - int iOptLen = sizeof(int); + int iOptLen = sizeof(iOptLen); #endif - rawsock = socket (AF_INET, SOCK_RAW, IPPROTO_RAW); + rawsock = socket (AF_INET, SOCK_RAW, IPPROTO_ICMP); if (-1 == rawsock) { fprintf (stderr, @@ -425,6 +425,10 @@ make_raw_socket () { fprintf(stderr, "Set SO_BROADCAST: ON\n"); } + else + { + fprintf(stderr, "Error setting IP_HDRINCL: ON\n"); + } if (setsockopt(rawsock, IPPROTO_IP, IP_HDRINCL, (char*)&bOptVal, bOptLen) != SOCKET_ERROR) { fprintf(stderr, "Set IP_HDRINCL: ON\n"); -- 2.25.1