1#ifndef _IPXE_ETHERNET_H
2#define _IPXE_ETHERNET_H
26 return ( ! ( addr_bytes[0] | addr_bytes[1] | addr_bytes[2] |
27 addr_bytes[3] | addr_bytes[4] | addr_bytes[5] ) );
41 return ( addr_bytes[0] & 0x01 );
53 return ( addr_bytes[0] & 0x02 );
65 return ( ( addr_bytes[0] & addr_bytes[1] & addr_bytes[2] &
66 addr_bytes[3] & addr_bytes[4] & addr_bytes[5] ) == 0xff );
87 const void *ll_dest,
const void *ll_source,
90 const void **ll_dest,
const void **ll_source,
92extern void eth_init_addr (
const void *hw_addr,
void *ll_addr );
94extern const char *
eth_ntoa (
const void *ll_addr );
95extern int eth_mc_hash (
unsigned int af,
const void *net_addr,
uint32_t addr
Buffer address.
uint8_t eth_broadcast[ETH_ALEN]
Ethernet broadcast MAC address.
int eth_mc_hash(unsigned int af, const void *net_addr, void *ll_addr)
Hash multicast address.
static int is_local_ether_addr(const void *addr)
Check if Ethernet address is locally assigned.
static int is_valid_ether_addr(const void *addr)
Check if Ethernet address is valid.
static int is_multicast_ether_addr(const void *addr)
Check if Ethernet address is a multicast address.
void eth_init_addr(const void *hw_addr, void *ll_addr)
Initialise Ethernet address.
int eth_eui64(const void *ll_addr, void *eui64)
Generate EUI-64 address.
static int is_zero_ether_addr(const void *addr)
Check if Ethernet address is all zeroes.
struct net_device * alloc_etherdev(size_t priv_size)
Allocate Ethernet device.
const char * eth_ntoa(const void *ll_addr)
Transcribe Ethernet address.
void eth_random_addr(void *hw_addr)
Generate random Ethernet address.
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)
static int is_broadcast_ether_addr(const void *addr)
Check if Ethernet address is the broadcast address.
int eth_eth_addr(const void *ll_addr, void *eth_addr)
Generate Ethernet-compatible compressed link-layer 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 struct net_device * netdev
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Network device management.
#define __ll_protocol
Declare a link-layer protocol.
int(* eui64)(const void *ll_addr, void *eui64)
Generate EUI-64 address.
int(* eth_addr)(const void *ll_addr, void *eth_addr)
Generate Ethernet-compatible compressed link-layer address.