iPXE
net_device Struct Reference

A network device. More...

#include <netdevice.h>

Data Fields

struct refcnt refcnt
 Reference counter.
struct list_head list
 List of network devices.
struct list_head open_list
 List of open network devices.
unsigned int scope_id
 Scope ID.
char name [NETDEV_NAME_LEN]
 Name of this network device.
struct devicedev
 Underlying hardware device.
struct dma_devicedma
 DMA device.
struct net_device_operationsop
 Network device operations.
struct ll_protocolll_protocol
 Link-layer protocol.
uint8_t hw_addr [MAX_HW_ADDR_LEN]
 Hardware address.
uint8_t ll_addr [MAX_LL_ADDR_LEN]
 Link-layer address.
const uint8_tll_broadcast
 Link-layer broadcast address.
unsigned int state
 Current device state.
int link_rc
 Link status code.
struct retry_timer link_block
 Link block timer.
size_t max_pkt_len
 Maximum packet length.
size_t mtu
 Maximum transmission unit length.
struct list_head tx_queue
 TX packet queue.
struct list_head tx_deferred
 Deferred TX packet queue.
struct list_head rx_queue
 RX packet queue.
struct net_device_stats tx_stats
 TX statistics.
struct net_device_stats rx_stats
 RX statistics.
struct generic_settings settings
 Configuration settings applicable to this device.
void * priv
 Driver private data.
struct net_device_configuration configs [0]
 Network device configurations (variable length)

Detailed Description

A network device.

This structure represents a piece of networking hardware. It has properties such as a link-layer address and methods for transmitting and receiving raw packets.

Note that this structure must represent a generic network device, not just an Ethernet device.

Definition at line 353 of file netdevice.h.

Field Documentation

◆ refcnt

struct refcnt net_device::refcnt

Reference counter.

Definition at line 355 of file netdevice.h.

Referenced by falcon_probe_spi().

◆ list

struct list_head net_device::list

List of network devices.

Definition at line 357 of file netdevice.h.

Referenced by find_netdev(), find_netdev_by_location(), find_netdev_by_scope_id(), and ipoib_remove().

◆ open_list

struct list_head net_device::open_list

List of open network devices.

Definition at line 359 of file netdevice.h.

Referenced by last_opened_netdev().

◆ scope_id

unsigned int net_device::scope_id

Scope ID.

Definition at line 361 of file netdevice.h.

Referenced by efi_pxe_ip_sockaddr(), efi_undi_ifnum(), find_netdev_by_scope_id(), ipv4_route(), and ipv6_route().

◆ name

◆ dev

◆ dma

struct dma_device* net_device::dma

DMA device.

Definition at line 367 of file netdevice.h.

◆ op

struct net_device_operations* net_device::op

Network device operations.

Definition at line 370 of file netdevice.h.

Referenced by vlan_can_be_trunk().

◆ ll_protocol

◆ hw_addr

uint8_t net_device::hw_addr[MAX_HW_ADDR_LEN]

Hardware address.

This is an address which is an intrinsic property of the hardware, e.g. an address held in EEPROM.

Note that the hardware address may not be the same length as the link-layer address.

Definition at line 382 of file netdevice.h.

Referenced by eoib_find(), netfront_net_probe(), sis190_get_mac_addr_from_apc(), sis190_get_mac_addr_from_eeprom(), and vxge_device_register().

◆ ll_addr

uint8_t net_device::ll_addr[MAX_LL_ADDR_LEN]

◆ ll_broadcast

const uint8_t* net_device::ll_broadcast

Link-layer broadcast address.

Definition at line 390 of file netdevice.h.

◆ state

unsigned int net_device::state

Current device state.

This is the bitwise-OR of zero or more NETDEV_XXX constants.

Definition at line 396 of file netdevice.h.

Referenced by efx_hunt_irq().

◆ link_rc

int net_device::link_rc

Link status code.

Zero indicates that the link is up; any other value indicates the error preventing link-up.

Definition at line 402 of file netdevice.h.

Referenced by vlan_sync().

◆ link_block

struct retry_timer net_device::link_block

Link block timer.

Definition at line 404 of file netdevice.h.

Referenced by netdev_link_block_expired().

◆ max_pkt_len

size_t net_device::max_pkt_len

Maximum packet length.

This is the maximum packet length (including any link-layer headers) supported by the hardware.

Definition at line 410 of file netdevice.h.

◆ mtu

size_t net_device::mtu

Maximum transmission unit length.

This is the maximum transmission unit length (excluding any link-layer headers) configured for the link.

Definition at line 416 of file netdevice.h.

◆ tx_queue

struct list_head net_device::tx_queue

TX packet queue.

Definition at line 418 of file netdevice.h.

◆ tx_deferred

struct list_head net_device::tx_deferred

Deferred TX packet queue.

Definition at line 420 of file netdevice.h.

◆ rx_queue

struct list_head net_device::rx_queue

RX packet queue.

Definition at line 422 of file netdevice.h.

◆ tx_stats

struct net_device_stats net_device::tx_stats

TX statistics.

Definition at line 424 of file netdevice.h.

Referenced by efi_snp_statistics().

◆ rx_stats

struct net_device_stats net_device::rx_stats

RX statistics.

Definition at line 426 of file netdevice.h.

Referenced by efi_snp_statistics().

◆ settings

struct generic_settings net_device::settings

Configuration settings applicable to this device.

Definition at line 429 of file netdevice.h.

◆ priv

◆ configs

struct net_device_configuration net_device::configs[0]

Network device configurations (variable length)

Definition at line 435 of file netdevice.h.


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