[ntp:questions] ntpd IPv6 support on Windows?

Danny Mayer mayer at ntp.isc.org
Sun Jan 11 03:02:43 UTC 2009


Dave Hart wrote:
> On Jan 10, 7:03 am, ma... at ntp.isc.org (Danny Mayer) wrote:
> 
>> We want to use the API's where they are available but use the emulations
>> where they are not. You can't do that with Microsoft's source code, you
>> would only get that emulation. We build once and deploy many and you
>> want to take advantage of the API in the MS DLL's where available.
> 
> I am pretty sure you misunderstand.  The whole point of the header
> file machinations I quoted earlier is to solve exactly the problem ntp
> has, which is to use the system getaddrinfo and friends when available
> while allowing the binaries to load and run successfully on older
> versions of Windows lacking those new-for-IPv6 system APIs.  I can
> find no information to indicate Microsoft's getaddrinfo inline code
> emulation would be used when there is an OS getaddrinfo available.
> 
> Please read this quote carefully:
> 
> ----------- begin MSDN quote
> 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.
> ----------- end MSDN quote
> 
> http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx

I'm very careful to avoid the WSP* functions. I don't think many people
know about the WSP* functions but I am very careful to avoid them as far
as possible especially as there are potential security implications.
Otherwise I would be using WSP* functions everywhere and avoid the extra
overhead of the WSA* functions.

Let's not go there.

Danny



More information about the questions mailing list