On 07/11/07 18:52, Templin, Fred L wrote: >> > > > > + eui[0] = 0; >> > > > > + >> > > > > + /* Check for RFC3330 global address ranges */ >> > > > > + 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; >> I don't understand. >> >> For example, 1.0.0.11 is valid IPv4 global address. >> In little-endian, this is not in the range of >> 0x00000001 <= addr <= 0x0000000a (addr is 0x0b000001). > > Maybe it is I who did not understand. Can you suggest a clean solution?
((ipv4 & htonl(0xFF000000)) == htonl(0x0A000000)) etc.? -- Simon Arlott - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html