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

Re: Developing IP version-independent Applications



Hi Pekka,

Thanks for your information. Please refer to my opinion as follows.

Regards,
Jason.



                                                                                                                               
                      Pekka Savola                                                                                             
                      <pekkas@netcore.f        To:       js.jason.lin@foxconn.com                                              
                      i>                       cc:       v6ops@ops.ietf.org                                                    
                                               Subject:  Re: Developing IP version-independent Applications                    
                      2004/05/15 12:27                                                                                         
                      PM                                                                                                       
                                                                                                                               
                                                                                                                               




Hi,

Thanks for the comment!

On Sat, 15 May 2004 js.jason.lin@foxconn.com 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.

      <jason>
      I am not sure whether most IPv4-only really support such getaddrinfo
or getnameinfo
      API. But I am afraid to add a version of getaddrinfo/getnameinfo into
applications can be much
      complicated than using conditional compilation.
      <>



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.

      <jason>
      I think this is really a good reason for "version-independent"
programming.
      In embedded system, whether to activate IPv6 or not is usually
determined in compilation time.
      However, for PC, IPv6 really can be changed dynamically.
      <>

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

      <jason>
      IMHO, the key value of "version-independent" API is for the
situations where IPv6 can
      be DYNAMICALLY disabled. And before we claim the application written
in "version-independent" API
      can run in IPv4-only platform, we'd better make sure these
"version-independent" API is supported in
      those legacy IPv4-only platform in advance.


      Finally, I have one more related question:
      If my platform supported IPv4-mapped IPv6 address and the IPv6 won't
be disabled forever.
      Then for TCP server application, do you think it is enough to create
one IPv6 socket to
      server IPv4 and IPv6 TCP client? Or we still need to create two
sockets, one for each version,
      like the sample code described in Sec 6.3.1?
      <>



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