1 #ifndef _IPXE_ETHERNET_H 2 #define _IPXE_ETHERNET_H 25 return ( ! ( addr_bytes[0] | addr_bytes[1] | addr_bytes[2] |
26 addr_bytes[3] | addr_bytes[4] | addr_bytes[5] ) );
40 return ( addr_bytes[0] & 0x01 );
52 return ( addr_bytes[0] & 0x02 );
64 return ( ( addr_bytes[0] & addr_bytes[1] & addr_bytes[2] &
65 addr_bytes[3] & addr_bytes[4] & addr_bytes[5] ) == 0xff );
86 const void *ll_dest,
const void *ll_source,
89 const void **ll_dest,
const void **ll_source,
91 extern void eth_init_addr (
const void *hw_addr,
void *ll_addr );
93 extern const char *
eth_ntoa (
const void *ll_addr );
94 extern int eth_mc_hash (
unsigned int af,
const void *net_addr,
void eth_random_addr(void *hw_addr)
Generate random Ethernet address.
struct net_device * alloc_etherdev(size_t priv_size)
Allocate Ethernet device.
void eth_init_addr(const void *hw_addr, void *ll_addr)
Initialise Ethernet address.
int eth_eth_addr(const void *ll_addr, void *eth_addr)
Generate Ethernet-compatible compressed link-layer address.
struct ll_protocol ethernet_protocol __ll_protocol
Ethernet protocol.
int eth_pull(struct net_device *netdev, struct io_buffer *iobuf, const void **ll_dest, const void **ll_source, uint16_t *net_proto, unsigned int *flags)
int eth_mc_hash(unsigned int af, const void *net_addr, void *ll_addr)
Hash multicast address.
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
int eth_eui64(const void *ll_addr, void *eui64)
Generate EUI-64 address.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static int is_zero_ether_addr(const void *addr)
Check if Ethernet address is all zeroes.
static struct net_device * netdev
static int is_multicast_ether_addr(const void *addr)
Check if Ethernet address is a multicast address.
uint8_t eth_broadcast[]
Ethernet broadcast MAC address.
int(* eui64)(const void *ll_addr, void *eui64)
Generate EUI-64 address.
int eth_push(struct net_device *netdev, struct io_buffer *iobuf, const void *ll_dest, const void *ll_source, uint16_t net_proto)
static int is_valid_ether_addr(const void *addr)
Check if Ethernet address is valid.
Network device management.
static int is_local_ether_addr(const void *addr)
Check if Ethernet address is locally assigned.
static int is_broadcast_ether_addr(const void *addr)
Check if Ethernet address is the broadcast address.
int(* eth_addr)(const void *ll_addr, void *eth_addr)
Generate Ethernet-compatible compressed link-layer address.