iPXE
Data Fields
ll_protocol Struct Reference

A link-layer protocol. More...

#include <netdevice.h>

Data Fields

const char * name
 Protocol name.
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.
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.
void(* init_addr )(const void *hw_addr, void *ll_addr)
 Initialise link-layer address.
const char *(* ntoa )(const void *ll_addr)
 Transcribe link-layer address.
int(* mc_hash )(unsigned int af, const void *net_addr, void *ll_addr)
 Hash multicast address.
int(* eth_addr )(const void *ll_addr, void *eth_addr)
 Generate Ethernet-compatible compressed link-layer address.
int(* eui64 )(const void *ll_addr, void *eui64)
 Generate EUI-64 address.
uint16_t ll_proto
 Link-layer protocol.
uint8_t hw_addr_len
 Hardware address length.
uint8_t ll_addr_len
 Link-layer address length.
uint8_t ll_header_len
 Link-layer header length.
unsigned int flags
 Flags.

Detailed Description

A link-layer protocol.

Definition at line 114 of file netdevice.h.


Field Documentation

const char* ll_protocol::name

Protocol name.

Definition at line 116 of file netdevice.h.

Referenced by arp_rx(), neighbour_discovered(), 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.

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

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

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

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(), dhcp_deliver(), efi_snp_station_address(), efi_snp_transmit(), ifconf(), legacy_probe(), 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.

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

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

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

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(), efi_snp_probe(), efi_snp_set_mode(), efi_undi_get_init_info(), fcoe_probe(), and pxenv_undi_get_information().

Hardware address length.

Definition at line 196 of file netdevice.h.

Referenced by efi_undi_station_address(), netdev_fetch_hwaddr(), nii_get_init_info(), nii_get_station_address(), and snpnet_start().

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: