Closed pabigot closed 11 years ago
For consistency with IPv6 IIDs and 6lowpan, use 0xFFFE as the inserted word when converting from EUI-48 to EUI-64, and use a default OUI of all zeros when creating EUI-48s. This is correct since we are not supporting MAC-48s, so 0xFFFF would not be appropriate.
Since these are intended as EUIs not as IIDs, for any value inferred from sources that are not guaranteed to be unique the universal/local bit should follow EUI standard, not the inverted policy of RFC4291; therefore it should be 1. It would be 0 only if the value was explicitly assigned. The individual/group bit should be 0 regardless of EUI origin.
Linux uses NET_ADDR_PERM = 0 for permanent addresses, NET_ADDR_RANDOM = 1 for randomly assigned ones, and NET_ADDR_STOLEN = 2 for stolen ones. Use 0 if address is derived from a known unique value, RANDOM if purely random, STOLEN if inferred from probably chip-specific information. Negative values indicate errors.
There should be a generic interface supporting an instance-specific EUI48 or EUI64 for platforms. In many cases a default one can be derived from TLV information such as die position; in other cases the platform may be able to derive one from a peripheral like a DS18B20; or there may be one stored in information memory. Reference Linux policies for automatically creating MAC addresses when providing metadata (e.g. that the number was randomly assigned so conflicts could occur).