[netdevice] Add method for generating EUI-64 address from link-layer address

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-08-30 19:05:03 +01:00
parent d5f69e9388
commit 0b65c8cad6
5 changed files with 28 additions and 0 deletions

View File

@@ -91,6 +91,7 @@ extern const char * eth_ntoa ( const void *ll_addr );
extern int eth_mc_hash ( unsigned int af, const void *net_addr,
void *ll_addr );
extern int eth_eth_addr ( const void *ll_addr, void *eth_addr );
extern int eth_eui64 ( const void *ll_addr, void *eui64 );
extern struct net_device * alloc_etherdev ( size_t priv_size );
#endif /* _IPXE_ETHERNET_H */

View File

@@ -175,8 +175,17 @@ struct ll_protocol {
*
* @v ll_addr Link-layer address
* @v eth_addr Ethernet-compatible address to fill in
* @ret rc Return status code
*/
int ( * eth_addr ) ( const void *ll_addr, void *eth_addr );
/**
* Generate EUI-64 address
*
* @v ll_addr Link-layer address
* @v eui64 EUI-64 address to fill in
* @ret rc Return status code
*/
int ( * eui64 ) ( const void *ll_addr, void *eui64 );
/** Link-layer protocol
*
* This is an ARPHRD_XXX constant, in network byte order.