iPXE
Data Fields
ll_protocol Struct Reference

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...
 

Detailed Description

A link-layer protocol.

Definition at line 114 of file netdevice.h.

Field Documentation

◆ name

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().

◆ push

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.

Parameters
netdevNetwork device
iobufI/O buffer
ll_destLink-layer destination address
ll_sourceSource link-layer address
net_protoNetwork-layer protocol, in network-byte order
Return values
rcReturn 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().

◆ pull

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.

Parameters
netdevNetwork device
iobufI/O buffer
Return values
ll_destLink-layer destination address
ll_sourceSource link-layer address
net_protoNetwork-layer protocol, in network-byte order
flagsPacket flags
rcReturn status code

Definition at line 141 of file netdevice.h.

Referenced by efi_snp_receive(), net_poll(), pxenv_undi_isr(), and vlan_transmit().

◆ init_addr

void( * ll_protocol::init_addr) (const void *hw_addr, void *ll_addr)

Initialise link-layer address.

Parameters
hw_addrHardware address
ll_addrLink-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().

◆ ntoa

const char*( * ll_protocol::ntoa) (const void *ll_addr)

Transcribe link-layer address.

Parameters
ll_addrLink-layer address
Return values
stringHuman-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().

◆ mc_hash

int( * ll_protocol::mc_hash) (unsigned int af, const void *net_addr, void *ll_addr)

Hash multicast address.

Parameters
afAddress family
net_addrNetwork-layer address
ll_addrLink-layer address to fill in
Return values
rcReturn 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().

◆ eth_addr

int( * ll_protocol::eth_addr) (const void *ll_addr, void *eth_addr)

Generate Ethernet-compatible compressed link-layer address.

Parameters
ll_addrLink-layer address
eth_addrEthernet-compatible address to fill in
Return values
rcReturn status code

Definition at line 181 of file netdevice.h.

Referenced by ibft_fill_nic().

◆ eui64

int( * ll_protocol::eui64) (const void *ll_addr, void *eui64)

Generate EUI-64 address.

Parameters
ll_addrLink-layer address
eui64EUI-64 address to fill in
Return values
rcReturn status code

Definition at line 189 of file netdevice.h.

Referenced by ipv6_eui64().

◆ ll_proto

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().

◆ hw_addr_len

uint8_t ll_protocol::hw_addr_len

◆ ll_addr_len

uint8_t ll_protocol::ll_addr_len

◆ ll_header_len

uint8_t ll_protocol::ll_header_len

◆ flags

unsigned int ll_protocol::flags

Flags.

Definition at line 202 of file netdevice.h.

Referenced by dhcp_create_packet().


The documentation for this struct was generated from the following file: