Coda File System

Re: A Christmas Present: RPC2 over IPv6

From: Rod Van Meter <Rod.VanMeter_at_nokia.com>
Date: 06 Jan 2003 10:33:20 -0800
On Mon, 2002-12-23 at 06:27, ext Jan Harkes wrote:
> On Fri, Dec 20, 2002 at 02:35:36PM -0800, Rod Van Meter wrote:

> That should be no problem. Although we might just go for the newer
> getaddrinfo and inet_ntop all the way. In fact I am sort of using them
> in the Coda source already, I just force the family to PF_IPV4 and am
> using wrapper functions that try to give close to identical
> functionality when the real getaddrinfo is not available.

> > + * There are too many places with #ifdef CODA_IPV6...#else...This is
> > +   fragile code.
> 
> Using inet_ntop and getaddrinfo even when we only have IPv4 will
> probably remove a lot of these. 
> 

Yes, although I put this is #ifdef CODA_IPV6, the code as written should
work nicely for both v4 & v6.  It'll be a long time inet_ntoa goes away
everywhere in the world, but even v4- specific code can shift.

Really, the name ought to be

#ifdef
CODA_ARE_NEW_IPV6_APIS_PRESENT_WHETHER_OR_NOT_YOU_INTEND_TO_USE_V6_ITSELF

but that seemed a little unwieldy :-).

When Coda stops compiling on older versions of OSes, that don't support
the newer APIs, you can just drop the #ifdef and use the newer code,
regardless of whether or not you're interested in v6.

		--Rod
Received on 2003-01-06 13:43:34