[ntp:questions] ntp client ipv6 support

John Hasler jhasler at newsguy.com
Sat Jun 18 00:44:28 UTC 2011


Rick Jones wrote:
> Netperf has been passing IPs to getaddrinfo() without setting any
> special flags.

Chuck Swiger writes:
> Maybe there are broken implementations of getaddrinfo() floating
> around?

On Linux you must set a flag to tell it not to consider the possibility
that what you are passing it is not a numeric address:

       node specifies either a numerical network address (for IPv4,
       numbers-and-dots notation as supported by inet_aton(3); for IPv6,
       hexadecimal string format as supported by inet_pton(3)), or a
       network hostname, whose network addresses are looked up and
       resolved.  If hints.ai_flags contains the AI_NUMERICHOST flag
       then node must be a numerical network address.  The
       AI_NUMERICHOST flag suppresses any potentially lengthy network
       host address lookups.

       CONFORMING TO
       POSIX.1-2001.  The getaddrinfo() function is documented in RFC 2553.

-- 
John Hasler 
jhasler at newsguy.com
Dancing Horse Hill
Elmwood, WI USA




More information about the questions mailing list