Dave Hart wrote:
> On Tue, Jan 6, 2009 at 7:19 PM, Danny Mayer <[email protected]> wrote
> to [email protected] and me:
> 
>> Not yet. It's on my list of things to complete in the near future. There
>> are two pieces that need to be changed and one of them may be tricky
>> though I seem to remember that Martin had put something together to help
>> with this since we need to support people without IPv6 support and don't
>> have getaddrinfo() and friends available. getaddinfo() is necessary for
>> IPv6 support. Now's the time to get that in.
> 
> It sounds like late-binding the required syscalls/APIs with LoadModule
> and GetProcAddress is in order.  One way to minimize the source
> disturbance when late-binding is to provide your own wrapper
> implementations for each function and use a macro to redirect ntp's
> calls to the conditionally-available functions through the
> corresponding runtime-binding wrappers.  In this case Microsoft has
> already done the legwork, including support for the Windows 2000 IPv6
> download (which implements these in a different DLL than WinXP and
> later).  Quoting from their getaddrinfo documentation at
> http://msdn.microsoft.com/en-us/library/ms738520(VS.85).aspx
> 
> ---------------- begin quote
> The getaddrinfo function was added to the Ws2_32.dll on Windows XP and
> later. To execute an application that uses this function on earlier
> versions of Windows (Windows 2000, Windows NT, and Windows Me/98/95),
> then you need to include the Ws2tcpip.h and Wspiapi.h files. 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.
> The IPv6 protocol is supported on Windows 2000 when the IPv6
> Technology Preview for Windows 2000 is installed. Otherwise
> getaddrinfo support on versions of Windows earlier than Windows XP is
> limited to handling IPv4 name resolution.
> ---------------- end quote

Back in 2005 I had already made the changes which import getaddrinfo() and
friends from the DLL if available, or use NTP's built-in functions
otherwise. That code is in the xmas version for Windows but has never made
it into the official code base.

Unfortunately there have been many changes to the official code base in the
mean time so that much of the former work will have to be done once more.

Martin
-- 
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany

_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.org/mailman/listinfo/questions

Reply via email to