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
That sounds pretty darned painless, I hope it is indeed that easy for
you. Now, ask me why I care about IPv6 when it'll apparently be years
before my IPv6 service isn't tunnelled over IPv4 using one lovely hack
or another guaranteed to add overhead and latency. I don't have a
good answer. I just want to break and enter into a few ipmasq and NAT
pioneers' homes and disable every telephone ringer.
Dave Hart
_______________________________________________
questions mailing list
[email protected]
https://lists.ntp.org/mailman/listinfo/questions