Subject: (IPng 7281) Re: Ipv6 Migration

From: David Borman <[email-masked]>
Date: Fri, 5 Mar 1999 11:23:47 -0600 (CST)

> Date: Fri, 5 Mar 1999 11:36:18 -0500 (EST)
> From: Shane Kerr <[email-masked]>
> Subject: (IPng 7280) Re: Ipv6 Migration 
> ...
> Well, if I want to connect to an IPv6 address, I need to create a socket
> with the PF_INET6 flag, and pack sockaddr_in6 structures to define
> addresses.  If I want an application that connects to both IPv4 and IPv6
> platforms, there's going to be seperate code paths, with one using
> PF_INET and sockaddr_in rather than the IPv6 definitions.  Really,
> building in a translation layer is merely hiding the details of the
> operation inside of an API.

If you properly rewrite the host lookup to use getaddrinfo(), then
your application can work with both IPv4 and IPv6 addresses, without
having to have seperate  code paths for each.  That's one of the main
features of it, it returns all the data needed to do socket()/connect()
or socket()/bind()/accept() without having to worry about whether the
returned address is IPv4 or IPv6.

Of course, if the application itself is aware of IP addresses (like
the FTP protocol), it needs other changes as well.

			-David Borman, [email-masked]
--------------------------------------------------------------------
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-masked]
--------------------------------------------------------------------

---

From: Shane Kerr <[email-masked]>
Date: Fri, 5 Mar 1999 13:24:33 -0500 (EST)

> the FTP protocol), it needs other changes as well.

Well, isn't my face red!?!?  I guess I should read the IPv6 socket API
spec one of these days.  :)  

This is cool, and makes for convient IPv6 programming.  Although the
translation idea still has merit for applications, since they can just be
re-linked - no recompile necessary.  Neither the Solaris 2.6 nor the
RedHat Linux system I have easy access to here has the getaddrinfo()
function, so it is unlikely any existing programs support it.   

Not to keep harping on performance or anything, but also note that the
getaddrinfo() function is going to have to do significant processing to
handle its arguments and return the data properly, far greater than any
processing required to handle a simple address translation lookup.  Just a
thought.  :P

--
Shane Kerr <[email-masked]>
Software Engineer
American Registry for Internet Numbers

---

From: Jim Bound <[email-masked]>
Date: Fri, 05 Mar 1999 14:33:52 -0500

shane,

I hate getaddrinfo ... so I did not mention it or want it proliferated.

/jim