Nmap Development mailing list archives

Re: Missing getaddrinfo on Windows 2000--almost solved


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

On Mon, Aug 18, 2008 at 11:42 AM, David Fifield <david () bamsoftware com> wrote:
So the summary is: undefining NTTDI_VERSION seems wrong. Including
wspiapi.h after ws2tcpip.h in nbase/nbase_winconfig.h will make
getaddrinfo work on Windows 2000. What remains is to find an alternative
solution to the inet_ntop/inet_pton problem. Does someone ahve an idea
or want to experiment? It might be as simple as making some arguments to
inet_ntop and inet_pton non-const.


Hey David,

Sorry, I would've replied sooner but my DSL crapped out before I
finished testing this stuff out.  Luckily it came on sooner than they
said it would (it was an area outage).

Anyway, I've attached a patch that works for me on XP and still
compiles fine on Linux.  Can you try it out with your header reorder
and see if it works on 2000, and any other Windows machines you can
test on?

You had the right idea about changing the constness of the arguments.
The only other thing needed was to set it up to use the
inet_ntop()/inet_pton() Windows provides.  Hopefully this will work on
other Windows machines as well.

David Fifield


Thanks,
Kris Katterjohn

Attachment: ntddi.patch
Description:


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

Current thread: