[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: broken IPv6 code



Brian May wrote:
> [1] I am not sure of the getaddrinfo API, but in my code the first
> parameter is set to NULL. I assume this gets all the addresses of the
> configured interfaces on the local machine, and doesn't need to do any
> DNS lookups.
This is correct.
 
> [2] I assume if a program is smart enough to use getaddrinfo, it will
> also be IPv6 compatable. Is this a safe assumption?
Yes, it should be. You can have a look at my code I posted earlier on this list,
It uses getaddrinfo to obtain a list of adresses to bind to and works (at least
under Linux) perfectly well with IPv4 and IPv6. The only protocol-dependant code
ist the check if the IPv4-bind() fails......

best greets,
Rene



Reply to: