Subject: Developing IP version-independent Applications

From: [email-masked]
Date: Sat, 15 May 2004 09:54:03 +0800

Hi,

I have some questions about  the article, "Application Aspects of IPv6 
Transition".

In this draft, it mentions the importance about developing IP 
version-independent applications.
It also considers the applications supporting both IPv4 and IPv6 in an" 
IPv4-only node."
Under these considerations, the authors recommend using 
version-independent socket API in section 6.

However, in an IPv4-only node, it's most likely that RFC 3493, "Basic 
Socket Interface Extensions for IPv6",
is not supported on the platform. Applications written as 
"version-independent" convention could have a problem.
For example, "getaddrinfo" or "getnameinfo" might not be supported on the 
node. I wonder if we still need
conditional compilation for applications to separate the code for 
"dual-stack" and "ipv4-only" node respectively.

Regards,
Jason Lin

---

From: Pekka Savola <[email-masked]>
Date: Sat, 15 May 2004 07:27:47 +0300 (EEST)

Hi,

Thanks for the comment!

On Sat, 15 May 2004 [email-masked] wrote:
> However, in an IPv4-only node, it's most likely that RFC 3493,
> "Basic Socket Interface Extensions for IPv6", is not supported on
> the platform. Applications written as "version-independent"
> convention could have a problem. For example, "getaddrinfo" or
> "getnameinfo" might not be supported on the node. I wonder if we
> still need conditional compilation for applications to separate the
> code for "dual-stack" and "ipv4-only" node respectively.

This may sound like a contradiction, but I don't think it is one in
practice.  I mean, getaddrinfo/getnameinfo are generic functions which
are supported by many vendors even before they appropriately support
IPv6, and the functions work even if IPv6 is disabled.  It is also
possible for the applications to include a version of
getaddrinfo/getnameinfo for those systems which do not support it or
the support is broken (actually, many apps already do that).

This allows eliminating the compile-time special casing from the code, 
making the code simpler.

Further, the IPv4-only operation is most important in practice for 
nodes which already would be able to support IPv6, but the support is 
turned off.  The applications should continue to work under those 
circumstances.

Maybe the justification for this should be clarified a bit?  Would you
have ideas how to do that?

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings