Nmap Development mailing list archives
Re: Missing getaddrinfo on Windows 2000--almost solved
From: David Fifield <david () 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
Attachment:
inet_decls.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Help please thanks Alejandro Arias (Jul 03)
- RE: Help please thanks Rob Nicholls (Jul 04)
- Re: Help please thanks Fyodor (Jul 30)
- Re: Help please thanks Rob Nicholls (Jul 31)
- Missing getaddrinfo on Windows 2000--almost solved David Fifield (Aug 17)
- Re: Missing getaddrinfo on Windows 2000--almost solved Kris Katterjohn (Aug 19)
- Re: Missing getaddrinfo on Windows 2000--almost solved Rob Nicholls (Aug 20)
- Re: Missing getaddrinfo on Windows 2000--almost solved David Fifield (Aug 20)
- Re: Missing getaddrinfo on Windows 2000--almost solved Kris Katterjohn (Aug 20)
- Re: Help please thanks Fyodor (Jul 30)
- RE: Help please thanks Rob Nicholls (Jul 04)