On Wednesday 15 of October 2003 12:11, Thomas Lussnig wrote:

> Ok this is clear, but than why become the aplication an binary IPv6
> enabled one
> if the PC have no IPv6 support ?
Because I'm using packages provided by Linux distribution which needs ipv6 
because some users are using it.

> I thought the configure script checked
> if the pc
> have IPv6 support. and yes both of the sugested workarounds would do it.
Checking at configure time if host on which I'm compiling does support 
socket(AF_INET6, ...) is stupid. It should only check if it's able to use 
getaddrinfo(), genameinfo() and so on while the code should be written in 
family independent way.

I always can compile on one host and use it on a other. Also in future there 
will be way to unload ipv6 module from Linux kernel. What then?

> But there are two problems with them.
>
> 1. If you try to create an IPv6 socket only to check the IPv6 support i
> think this is
> like try and error that is not one of the best choice.
Yes, best choice is to write app in family independent way.

> 2. DNS can support IPv6 even if the OS is not IPv6 aware. So the use of
> the DNS
> and try thorugh is also try and error, wich is acceptable since it is
> defined that you
> can try the next Adress if one does not work. But it does not check the
> return value.
What I wrote was pseudo code not real code - only to show the idea. Of course 
errors should be checked and if error && res->ai_next != NULL then try 
ai_next.

> So it retry each time if one version work or not.
There is also AI_ADDRCONFIG option which causes that getaddrinfo() returns 
only these families which are supported by the system.

> 3. The major problem is that on such IPv4 only system. Even the parser
> should complain
> about an unsupported Adress in the url if there an IPv6 is specified.
No. On such system connection to ipv6 host is not possible and that is what 
should be in error message. ,,Familly not supported'' and try ai->next then.

The keyword for ipv6 things is ,,family independent'' rather than ,,ipv6 
ready''.

> Cu Thomas

-- 
Arkadiusz Miśkiewicz    CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux

Reply via email to