Re: broken IPv6 code
On/Dnia Mon, Jan 08, 2001 at 09:26:09AM +1100, Craig Small wrote/napisał(a)
> > > > 1. getaddrinfo should not return IPv4 addresses if an IPv6 address exist,
> > > > since using the IPv6 address implies usage of the IPv4 address.
this idea is sick :) getaddrinfo() should return all possible addresses
and then you can filter out ipv6 addresses if you want. Thing about situations
where on ipv4-only kernel you use getaddrinfo(host,...) where host has A and AAAA
records in DNS. You won't be able to connect to such host if your getaddrinfo()
will return only v6 address.
> > > Why not use getipnodebyname()? You got a whole bunch of flags you can
> > > set to determine what sort of address you are after.
> > because getipnodebyname() is obsolete function. It's not supported in glibc 2.2
> > and afaik XNET specs treat it as obsolete, too.
>
> XNET? I don't know what that is.
XNET spec was merged with opengroup/austingroup draft.
> RFC 2553 describes this function. It used to be the gethostbyname3.
yes, I know. Support for it was in cvs glibc but before release 2.2 it was removed.
> So that means the "right" way of doing hostname->IP lookups is with
> getaddrinfo() with all the lack of functionality as mentioned?
yes, also draft rfc2553bis adds more functionality to it.
> - Craig
--
Arkadiusz Miśkiewicz, AM2-6BONE [ PLD GNU/Linux IPv6 ]
http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/ [ enabled ]
Reply to: