I just want to inject another viewpoint to this Unix-centric
discussion. I'm trying to specify how the IPv6 affects the socket API
in EPOC OS, and this is how it works (to bind a server socket):

   RSocketServ iSS; // Socket server handle (EPOC specific)
   RSocket iSocket; // Socket (roughly same as Unix)
   ...

   // Open Socket to be used for TCP
   TInt err = 
     iSocket.Open(
       iSS,              // socket server handle
       KAfInet,          // Protocol Family = INET
       KSockStream,      // Stream Socket
       KProtocolInetTcp  // TCP protocol
       );
   ... 
   TInetAddr addr;       // declare equivalent of sock_addr
   addr.SetPort(80);     // define port of the address

   // addr.SetAddress(KInetAddrAny);   // Listen only IPv4
   // addr.SetAddress(Kinet6AddrNone); // Listen only IPv6
   // addr.SetFamily(0); // default, listen IPv4 and IPv6

   err = iSocket.Bind(addr);
   ...
   err = iSocket.Listen(100);

For the rest of the code, it really doesn't matter whether bind was
IPv4 only, IPv6 only or allow both. (Except that with the first
variant, returned addresses are of KAfInet family, and for latter two,
address family is KAfInet6 and IPv4 is represented as IPv4-mapped.)

The key difference to the Unix is that, the existing address class
(TInetAddr) that is being used by IPv4 applications, is large enough
to hold also IPv6 addresses. Thus, with some reservations, existing
IPv4 application binaries have high probability of working as is also
with IPv6 connections (WEB browser being one example of such
applications).

IPv4 (as IPv4 mapped) is a subset of IPv6. As to issues like
src="::ffff:10.255.255.255", you have to handle this in IPv4 only
world, the same applies to IPv6. If your application doesn't want to
do these checks and if they are required, then it can refuse to anser
to all IPv4 or set this IPv6ONLY flag?





--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page:                      http://playground.sun.com/ipng
FTP archive:                      ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to