On 8 Jan 2001, Brian May wrote: > >>>>> "Arkadiusz" == Arkadiusz Miskiewicz <[EMAIL PROTECTED]> writes:
> Arkadiusz> this idea is sick :) getaddrinfo() should return all > Arkadiusz> possible addresses and then you can filter out ipv6 > Arkadiusz> addresses if you want. Thing about situations where on > Arkadiusz> ipv4-only kernel you use getaddrinfo(host,...) where > Arkadiusz> host has A and AAAA records in DNS. You won't be able > Arkadiusz> to connect to such host if your getaddrinfo() will > Arkadiusz> return only v6 address. > > How is the application meant to know if it is has to filter out > IPv4 addresses though? Are you talking about the AI_PASSIVE with a wildcard address situation? If so then I agree, on linux glibc should return a single AI_INET* that will bind to both IPv4 and IPv6 ports. On systems that have seperate stacks it should return a pair of addresses, one for IPv4 and one for IPv6. Otherwise, returning all available addresses is IMHO the correct and worthwhile thing to do. > [2] I assume if a program is smart enough to use getaddrinfo, it will > also be IPv6 compatable. Is this a safe assumption? It has a chance.. I don't think it is necessarily true in all cases though. Jason

