On Fri, Jul 04, 2008 at 01:13:03PM +0100, Rob Nicholls wrote:
>
> http://msdn.microsoft.com/en-us/library/ms738520.aspx
>
> I quickly tried including wspiapi.h after the two occasions where ws2tcpip.h
> appear, but that didn't appear to stop the error message from occurring,
> possibly because there seems to be some other code in Nmap that tries to
> address the lack of getaddrinfo.
>
> For reference, I had to install the following on Windows 2000:
>
> Service Pack 4 so I could install...
> Windows Installer 3.1. Then I had to install...
> Windows2000-KB835732-x86-ENU.EXE (MS04-011) so I could finally install...
> Visual C++ 2008 Redistributable Package (x86) and know for certain that the
> error message was Nmap's fault.
Hi Rob. Did one of these fix the problem of getaddrinfo() mising from
Win2K's ws2_32.dll? According to the page you linked:
"The getaddrinfo function was added to the Ws2_32.dll on Windows XP
and later. If you want to execute an application using this
function on earlier versions of Windows (Windows 2000, Windows NT,
and Windows Me/98/95), then you need to include the Ws2tcpip.h file
and also include the Wspiapi.h file. When the Wspiapi.h include
file is added, the getaddrinfo function is defined to the
WspiapiGetAddrInfo inline function in the Wspiapi.h file. At
runtime, the WspiapiGetAddrInfo function is implemented in such a
way that if the Ws2_32.dll or the Wship6.dll (the file containing
getaddrinfo in the IPv6 Technology Preview for Windows 2000) does
not include getaddrinfo, then a version of getaddrinfo is
implemented inline based on code in the Wspiapi.h header file. This
inline code will be used on older Windows platforms that do not
natively support the getaddrinfo function."
But it sounds like you tried this header file approach and recompiled,
and it did not help? Did installing SP4 or one of your other patches
fix the problem? It sounds like you did get Nmap working for you
somehow? What does your ws2_32.dll look like (size and timestamp)?
One option might be to detect Win2K (surely there is some define we
can use?) and then undef HAVE_IPV6 in that case. It seems like Win2K
is still widely used.
Cheers,
-F
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
Received on Jul 30 2008