Nmap Development mailing list archives

Re: IPV6_CHECKSUM and nping


From: "Luis MartinGarcia." <luis.mgarc () gmail com>
Date: Mon, 05 Apr 2010 19:09:30 +0200

Hi Gisle,

Thank you for reporting this issue. It's weird because I have just built
the latest version of Nping on a Windows XP with no problems. I'm
running XP SP3. Which Windows XP are you running? Home or Pro? Which
Service Pack?

Anyway, I've applied the patch, since it does no harm at all.

BTW, another weird thing is that IPV6_CHECKSUM is completely
undocumented in MSDN. There are many documented flags for setsockopt()
but none of them is related to checksums
[http://msdn.microsoft.com/en-us/library/ms738574%28v=VS.85%29.aspx]

Luis MartinGarcia.








On 04/05/2010 04:17 PM, Gisle Vanem wrote:
The option IPV6_CHECKSUM isn't available on Win-XP (and I'm sure older
Win-boxes).
So here is a small patch to make nping build on those OS'es:

--- SVN-Latest\nping\nping.cc   Mon Apr 05 16:14:49 2010
+++ nping\nping.cc      Mon Apr 05 16:09:56 2010
@@ -861,6 +861,7 @@
    if( setsockopt(rawfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (char
*)&hoplimit, sizeof(hoplimit)) != 0 )
        outError(QT_2, "doIPv6ThroughSocket(): setsockopt() for
Multicast Hop Limit on IPv6 socket failed");

+#ifdef IPV6_CHECKSUM  /* This is not available on Win-XP at least */
    /* Transport layer checksum */
    /* This is totally crazy. We have to tell the kernel EXPLICITLY
that we
     * want it to set the TCP/UDP checksum for us. Why the hell is
this the
@@ -878,6 +879,7 @@
                outError(QT_2, "doIPv6ThroughSocket(): failed to set
IPV6_CHECKSUM option on IPv6 s
ocket. ");
        }
    }
+#endif

    /* Bind IPv6 socket to a specific network interface */
    if ( o.issetDevice() )  {

--------------

--gv
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: