Nmap Development mailing list archives

Re: Missing getaddrinfo on Windows 2000--almost solved


From: "Kris Katterjohn" <katterjohn () gmail com>
Date: Wed, 27 Aug 2008 09:27:35 +0530

Hey David,

On Sun, Aug 24, 2008 at 9:57 PM, David Fifield <david () bamsoftware com> wrote:
On Sun, Aug 24, 2008 at 09:56:06AM +0200, Vlatko Kosturjak wrote:
Thanks for testing.
I worked on this some more today and committed what I think is a
solution. Recall that it was the NTDDI_VERSION preprecessor symbol,
defined in Visual Studio 2008, that was causing the trouble. It brought
in non-standard declarations of inet_ntop and inet_pton.
I don't have access to Windows 2000 to test it, but it compiles and I
can verify that the replacement getaddrinfo function is being used by
looking at the preprocessor output. I'd like someone with Windows 2000
to give r9700 a try.

I've tested r9700 under W2K SP4 and I can confirm it works.

Great, thanks to everyone for testing. I assume that IPv6 scanning
doesn't work on Windows 2000, but does work on Windows XP (using the
same binary)?


This has caused me a couple of problems with Ncat.  I fixed the first
which was simple (#undef _WIN32_WINNT before defining it), but the
second seems a bit bigger.

You mention IPv6 I assume because with NTDDI_VERSION set to the Win2K
stuff for this fix, a lot of IPv6 macros and address structure
definitions are withheld and other IPv6 functionality may be limited
as well.  This is causing me a problem because I use in6addr_any, but
it's only available when NTDDI_VERSION >= NTDDI_WIN2KSP1.

So, does _WIN32_WINNT *have* to be set to _WIN32_WINNT_WIN2K, or can
it be something slightly newer, like maybe _WIN32_WINNT_WIN2KSP1?

Of course I could hack a little in6addr_any for Ncat, but if Nmap or
anything else using Nbase wants any of these really common IPv6
definitions, this will be a problem.

David Fifield


Thanks,
Kris Katterjohn

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


Current thread: