Subject: Re: [PATCH 02/05] ipv6: RFC4214 Support

From: Ingo Oeser <[email-masked]>
Date: Fri, 9 Nov 2007 19:12:02 +0100

YOSHIFUJI Hideaki / 吉藤英明 schrieb:
> In article <[email-masked]> (at Wed, 7 Nov 2007 10:52:47 -0800), "Templin, Fred L" <[email-masked]> says:
> 
> > > > > > > +	if (((ipv4 >= 0x01000000) && (ipv4 < 0x0a000000)) ||
> > > > > > > +	    ((ipv4 >= 0x0b000000) && (ipv4 < 0x7f000000)) ||
> > > > > > > +	    ((ipv4 >= 0x80000000) && (ipv4 < 0xa9fe0000)) ||
> > > > > > > +	    ((ipv4 >= 0xa9ff0000) && (ipv4 < 0xac100000)) ||
> > > > > > > +	    ((ipv4 >= 0xac200000) && (ipv4 < 0xc0a80000)) ||
> > > > > > > +	    ((ipv4 >= 0xc0a90000) && (ipv4 < 0xc6120000)) ||
> > > > > > > +	    ((ipv4 >= 0xc6140000) && (ipv4 < 
> > > 0xe0000000))) eui[0] |=
> > > > > > > 0x2;
> 
> > Maybe it is I who did not understand. Can you suggest a clean solution?
> 
> You could write each element as LOOPBACK(), MULTICAST()
> etc.
> 	eui[0] = (!ZERONETO(a) &&
> 	          !PRIVATE_10(a) &&
> 		  !LINKLOCAL(a) &&
> 		  !PRIVATE_172(a) &&
> 		  !PRIVATE_192(a) &&
> 		  !NETICDEVBENCH(a) &&
> 		  !MULTICAST(a)) ? 2 : 0;

Oh, yes that's great! Now even *I* can read what this is all about 
without reading any RFC :-)

Please Fred, try to do it that way.

Best Regards

Ingo Oeser