Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Nmap Development: Re: Missing getaddrinfo on Windows 2000--almost solved

Re: Missing getaddrinfo on Windows 2000--almost solved

From: David Fifield <david_at_bamsoftware.com>
Date: Wed, 20 Aug 2008 09:54:02 -0600

On Wed, Aug 20, 2008 at 10:04:23AM +0100, Rob Nicholls wrote:
> > 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?
>
> I tried your patch on a Windows 2000 Server host and unfortunately got the
> error message:
>
> The procedure entry point inet_ntop could not be located in the dynamic
> link library WS2_32.dll
>
> This was after including the header file wspiapi.h after ws2tcpip.h in
> nbase/nbase_winunix.h (and I even added it to
> libdnet-stripped/src/ip-win32.c just in case).
>
> On a slightly more positive note, after making these modifications it
> still worked okay on Vista.

I don't have a WIndows box handy to test on, so Rob could you try this
patch? Visual Studio 2008 declares inet_ntop and inet_pton, but those
functions are only actually available on Windows Vista and later. This
patch allows testing for the declaration separately from the definition,
so we declare the functions only if necessary and then always compile
nbase's versions.

Another potential source of incompatibility is that Windows declares the
string parameters to the functions as PTSTR, which is a pointer to
either char or wchar_t. If the patch doesn't work, please try again
after adding the line

#undef UNICODE

above #include <ws2tcpip.h>

David Fifield

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

Received on Aug 20 2008
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
edgeos