iPXE
|
A link-layer protocol. More...
#include <netdevice.h>
Data Fields | |
const char * | name |
Protocol name. More... | |
int(* | push )(struct net_device *netdev, struct io_buffer *iobuf, const void *ll_dest, const void *ll_source, uint16_t net_proto) |
Add link-layer header. More... | |
int(* | pull )(struct net_device *netdev, struct io_buffer *iobuf, const void **ll_dest, const void **ll_source, uint16_t *net_proto, unsigned int *flags) |
Remove link-layer header. More... | |
void(* | init_addr )(const void *hw_addr, void *ll_addr) |
Initialise link-layer address. More... | |
const char *(* | ntoa )(const void *ll_addr) |
Transcribe link-layer address. More... | |
int(* | mc_hash )(unsigned int af, const void *net_addr, void *ll_addr) |
Hash multicast address. More... | |
int(* | eth_addr )(const void *ll_addr, void *eth_addr) |
Generate Ethernet-compatible compressed link-layer address. More... | |
int(* | eui64 )(const void *ll_addr, void *eui64) |
Generate EUI-64 address. More... | |
uint16_t | ll_proto |
Link-layer protocol. More... | |
uint8_t | hw_addr_len |
Hardware address length. More... | |
uint8_t | ll_addr_len |
Link-layer address length. More... | |
uint8_t | ll_header_len |
Link-layer header length. More... | |
unsigned int | flags |
Flags. More... | |
A link-layer protocol.
Definition at line 114 of file netdevice.h.
const char* ll_protocol::name |
Protocol name.
Definition at line 116 of file netdevice.h.
Referenced by arp_rx(), ifstat(), neighbour_discovered(), netdev_fetch_linktype(), nstat(), and pxenv_undi_get_information().
int( * ll_protocol::push) (struct net_device *netdev, struct io_buffer *iobuf, const void *ll_dest, const void *ll_source, uint16_t net_proto) |
Add link-layer header.
netdev | Network device |
iobuf | I/O buffer |
ll_dest | Link-layer destination address |
ll_source | Source link-layer address |
net_proto | Network-layer protocol, in network-byte order |
rc | Return status code |
Definition at line 127 of file netdevice.h.
Referenced by efi_snp_transmit(), efi_undi_fill_header(), net_tx(), pxenv_undi_transmit(), and vlan_rx().
int( * ll_protocol::pull) (struct net_device *netdev, struct io_buffer *iobuf, const void **ll_dest, const void **ll_source, uint16_t *net_proto, unsigned int *flags) |
Remove link-layer header.
netdev | Network device |
iobuf | I/O buffer |
ll_dest | Link-layer destination address |
ll_source | Source link-layer address |
net_proto | Network-layer protocol, in network-byte order |
flags | Packet flags |
rc | Return status code |
Definition at line 141 of file netdevice.h.
Referenced by efi_snp_receive(), net_poll(), pxenv_undi_isr(), and vlan_transmit().
void( * ll_protocol::init_addr) (const void *hw_addr, void *ll_addr) |
Initialise link-layer address.
hw_addr | Hardware address |
ll_addr | Link-layer address to fill in |
Definition at line 150 of file netdevice.h.
Referenced by efi_snp_set_mode(), netdev_store_mac(), pxenv_undi_get_information(), and register_netdev().
const char*( * ll_protocol::ntoa) (const void *ll_addr) |
Transcribe link-layer address.
ll_addr | Link-layer address |
string | Human-readable transcription of address |
This method should convert the link-layer address into a human-readable format.
The buffer used to hold the transcription is statically allocated.
Definition at line 163 of file netdevice.h.
Referenced by aoecmd_cfg_rsp(), arp_rx(), cachedhcp_apply(), dhcp_deliver(), efi_snp_station_address(), efi_snp_transmit(), ifconf(), legacy_probe(), lldp_rx(), ndp_rx_neighbour_advertisement_ll_target(), ndp_rx_neighbour_solicitation_ll_source(), ndp_rx_router_advertisement_ll_source(), neighbour_discovered(), netdev_addr(), nstat(), pxe_dump_mcast_list(), pxenv_undi_get_information(), pxenv_undi_get_mcast_address(), pxenv_undi_set_station_address(), and pxenv_undi_transmit().
int( * ll_protocol::mc_hash) (unsigned int af, const void *net_addr, void *ll_addr) |
Hash multicast address.
af | Address family |
net_addr | Network-layer address |
ll_addr | Link-layer address to fill in |
rc | Return status code |
Definition at line 172 of file netdevice.h.
Referenced by efi_snp_mcast_ip_to_mac(), ipv4_tx(), ipv6_tx(), and pxenv_undi_get_mcast_address().
int( * ll_protocol::eth_addr) (const void *ll_addr, void *eth_addr) |
Generate Ethernet-compatible compressed link-layer address.
ll_addr | Link-layer address |
eth_addr | Ethernet-compatible address to fill in |
rc | Return status code |
Definition at line 181 of file netdevice.h.
Referenced by ibft_fill_nic().
int( * ll_protocol::eui64) (const void *ll_addr, void *eui64) |
Generate EUI-64 address.
ll_addr | Link-layer address |
eui64 | EUI-64 address to fill in |
rc | Return status code |
Definition at line 189 of file netdevice.h.
Referenced by ipv6_eui64().
uint16_t ll_protocol::ll_proto |
Link-layer protocol.
This is an ARPHRD_XXX constant, in network byte order.
Definition at line 194 of file netdevice.h.
Referenced by arp_rx(), arp_tx_request(), dhcp_create_packet(), dhcp_create_request(), eapol_probe(), efi_netdev_path(), efi_snp_set_mode(), efi_undi_get_init_info(), fcoe_probe(), and pxenv_undi_get_information().
uint8_t ll_protocol::hw_addr_len |
Hardware address length.
Definition at line 196 of file netdevice.h.
Referenced by efi_undi_station_address(), fdt_mac(), mnpnet_start(), netdev_fetch_hwaddr(), nii_get_init_info(), nii_get_station_address(), and snpnet_start().
uint8_t ll_protocol::ll_addr_len |
Link-layer address length.
Definition at line 198 of file netdevice.h.
Referenced by aoecmd_cfg_rsp(), aoedev_open(), arp_rx(), arp_tx_request(), cachedhcp_apply(), dhcp_create_packet(), dhcp_create_request(), dhcp_deliver(), efi_netdev_path(), efi_path_net_probe(), efi_snp_probe(), efi_snp_receive(), efi_snp_receive_filters(), efi_snp_set_mode(), efi_snp_station_address(), efi_undi_get_init_info(), efi_undi_receive(), efi_undi_station_address(), is_autoboot_ll_addr(), mnpnet_start(), ncm_open(), ndp_rx_neighbour_advertisement_ll_target(), ndp_rx_neighbour_solicitation_ll_source(), ndp_rx_router_advertisement_ll_source(), ndp_tx_ll_addr(), neighbour_discovered(), netdev_fetch_mac(), netdev_store_mac(), netfront_net_probe(), nii_get_init_info(), nii_get_station_address(), nii_set_station_address(), pxenv_undi_get_information(), pxenv_undi_set_station_address(), pxenv_undi_transmit(), register_netdev(), snpnet_start(), start_dhcpv6(), and vlan_can_be_trunk().
uint8_t ll_protocol::ll_header_len |
Link-layer header length.
Definition at line 200 of file netdevice.h.
Referenced by apply_netdev_settings(), efi_snp_receive(), efi_snp_set_mode(), efi_snp_transmit(), efi_undi_fill_header(), efi_undi_get_init_info(), efi_undi_receive(), mnpnet_transmit(), nii_get_init_info(), and register_netdev().
unsigned int ll_protocol::flags |