The xip command expects and enforces that Ethernet addresses are 6 bytes long. While there's no immediate demand to support different sizes, Ethernet addresses can have different sizes. The Ethernet principal in the XIA kernel already handles variable-size Ethernet addresses, so if one patches the xip command to do the same, the code will be ready for any address that is not 6 bytes long.
The key function to change is form_ether_xid() in xip/xipether.c. Once form_ether_xid() and its callers have been patched, one must drop the constant ETHER_ADDR_SIZE throughout the code, let the kernel identify when the address is of the wrong size, and, when an error related to a wrongly-sized address happens, friendly report it to the user.
The xip command expects and enforces that Ethernet addresses are 6 bytes long. While there's no immediate demand to support different sizes, Ethernet addresses can have different sizes. The Ethernet principal in the XIA kernel already handles variable-size Ethernet addresses, so if one patches the xip command to do the same, the code will be ready for any address that is not 6 bytes long.
The key function to change is
form_ether_xid()inxip/xipether.c. Onceform_ether_xid()and its callers have been patched, one must drop the constantETHER_ADDR_SIZEthroughout the code, let the kernel identify when the address is of the wrong size, and, when an error related to a wrongly-sized address happens, friendly report it to the user.