iPXE
Data Fields
net_device Struct Reference

A network device. More...

#include <netdevice.h>

Data Fields

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

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 352 of file netdevice.h.

Field Documentation

◆ refcnt

struct refcnt net_device::refcnt

◆ list

struct list_head net_device::list

◆ open_list

struct list_head net_device::open_list

List of open network devices.

Definition at line 358 of file netdevice.h.

Referenced by last_opened_netdev(), netdev_close(), and netdev_open().

◆ index

unsigned int net_device::index

◆ name

char net_device::name[NETDEV_NAME_LEN]

Name of this network device.

Definition at line 362 of file netdevice.h.

Referenced by __vxge_hw_vpath_alarm_process(), add_ipv4_miniroute(), aoedev_name(), apply_netdev_settings(), arp_rx(), arp_tx_request(), atl1e_check_link(), atl1e_clean_rx_irq(), atl1e_probe(), atl1e_setup_ring_resources(), bcom_check_link(), bcom_phy_intr(), cachedhcp_apply(), del_ipv4_miniroute(), dhcpv6_rx(), dhcpv6_set_state(), dhcpv6_tx(), eap_rx(), eap_rx_failure(), eap_rx_request(), eap_rx_request_identity(), eap_rx_success(), eapol_eap_rx(), eapol_rx(), efi_pxe_install(), efi_snp_initialize(), efi_snp_notify(), efi_snp_probe(), efi_snp_remove(), efi_snp_reset(), eoib_create(), eoib_open(), eth_slow_lacp_dump(), eth_slow_lacp_rx(), eth_slow_marker_dump(), eth_slow_rx(), exanic_check_link(), exanic_expired(), exanic_poll_rx(), exanic_poll_tx(), exanic_probe_port(), exanic_transmit(), fcoe_deliver(), fcoe_expired(), fcoe_fip_parse(), fcoe_fip_rx(), fcoe_fip_rx_advertisement(), fcoe_fip_rx_els_response(), fcoe_fip_rx_vlan(), fcoe_fip_tx_keepalive(), fcoe_fip_tx_solicitation(), fcoe_fip_tx_vlan(), fcoe_notify(), fcoe_probe(), fcoe_remove(), fcoe_reset(), fcoe_rx(), find_netdev(), flexboot_nodnic_eth_open(), genesis_mac_init(), guestinfo_net_probe(), guestinfo_net_remove(), hermon_eth_open(), hunt_open(), ibft_fill_nic(), ibft_fill_target_nic_association(), ifconf(), iflinkwait(), ifopen(), ifstat(), ipoib_open(), ipv4_gratuitous_arp(), ipv4_tx(), ipv6_create_routes(), ipv6_dump_miniroute(), ipv6_sock_ntoa(), ipv6_tx(), ipv6conf_expired(), ipv6conf_rx_router_advertisement(), iwlist(), loopback_test(), ndp_fetch(), ndp_prefix_fetch_ip6(), ndp_rx_neighbour_advertisement_ll_target(), ndp_rx_neighbour_solicitation_ll_source(), ndp_rx_options(), ndp_rx_router_advertisement_ll_source(), ndp_rx_router_advertisement_prefix(), ndp_tx_ll_addr(), neighbour_create(), neighbour_destroy(), neighbour_discover(), neighbour_discovered(), neighbour_expired(), neighbour_tx(), net_poll(), net_rx(), netdev_close(), netdev_config_close(), netdev_configure(), netdev_fetch_ifname(), netdev_link_block(), netdev_link_block_expired(), netdev_link_err(), netdev_link_unblock(), netdev_open(), netdev_rx(), netdev_rx_err(), netdev_tx(), netdev_tx_err(), nii_start(), nstat(), peerdisc_socket_tx(), pxe_start_nbp(), pxebs(), pxebs_exec(), pxenv_start_undi(), pxenv_udp_open(), pxenv_undi_open(), pxenv_undi_reset_adapter(), register_netdev(), route_ipv4_print(), route_ipv6_print(), rtl818x_init_hw(), rtl818x_init_rx_ring(), rtl818x_init_tx_ring(), rtl818x_start(), skge_down(), skge_link_down(), skge_link_up(), skge_up(), skge_xmit_frame(), sky2_autoneg_done(), sky2_down(), sky2_le_error(), sky2_link_down(), sky2_link_up(), sky2_phy_intr(), sky2_receive(), sky2_rx_stop(), sky2_tx_complete(), sky2_up(), sky2_xmit_frame(), snpnet_close(), snpnet_dump_mode(), snpnet_open(), snpnet_poll_rx(), snpnet_poll_tx(), snpnet_rx_filters(), snpnet_start(), snpnet_transmit(), start_dhcpv6(), stp_rx(), txnic_lmac_probe(), unregister_netdev(), vlan_create(), vlan_destroy(), vlan_rx(), vlan_transmit(), vxge_close(), vxge_hw_device_begin_irq(), vxge_hw_vpath_poll_rx(), vxge_open(), vxge_open_vpaths(), vxge_xmit(), vxge_xmit_compl(), xm_check_link(), and yukon_phy_intr().

◆ dev

struct device* net_device::dev

Underlying hardware device.

Definition at line 364 of file netdevice.h.

Referenced by a3c90x_probe(), acm_probe(), aoedev_identify_device(), ath5k_probe(), ath_pci_probe(), atl1e_init_netdev(), axge_probe(), b44_probe(), bcom_check_link(), bnxt_get_device_address(), bnxt_init_one(), dm96xx_probe(), ecm_probe(), efab_probe(), efi_netdev_path(), efi_snp_hii_package_list(), efi_snp_probe(), efx_probe(), ena_probe(), eoib_create(), exanic_probe_port(), fcoe_identify_device(), find_netdev_by_location(), flexboot_nodnic_register_netdev(), forcedeth_probe(), genesis_mac_init(), hermon_probe(), hunt_probe(), ibft_fill_nic(), ice_probe(), icplus_probe(), ifec_pci_probe(), ifstat(), igbvf_probe(), intel_probe(), intelx_probe(), intelxl_probe(), intelxlvf_probe(), intelxvf_probe(), iphone_probe(), ipoib_probe(), is_autoboot_busloc(), jme_probe(), lan78xx_probe(), legacy_probe(), myri10ge_net_irq(), myri10ge_net_open(), myri10ge_pci_probe(), myri10ge_pcidev(), myson_probe(), natsemi_probe(), ncm_probe(), net80211_add_channels(), net80211_alloc(), net80211_filter_hw_channels(), net80211_free(), net80211_register(), net80211_set_state(), net80211_unregister(), netdev_fetch_busid(), netdev_fetch_busloc(), netdev_fetch_bustype(), netdev_fetch_chip(), netfront_probe(), netvsc_probe(), nii_start(), nv_setup_mac_addr(), pcnet32_probe(), phantom_probe(), pnic_probe(), pxe_exec(), pxenv_undi_get_information(), pxenv_undi_get_nic_type(), rdc_probe(), realtek_probe(), register_netdev(), rhine_probe(), rndis_describe(), rtl818x_probe(), sis190_init_board(), sis190_phy_task(), sis190_probe(), sis190_remove(), skeleton_probe(), skge_devinit(), skge_phyirq(), skge_probe(), skge_show_addr(), sky2_hw_error(), sky2_init_netdev(), sky2_le_error(), sky2_mac_intr(), sky2_phy_intr(), sky2_probe(), sky2_show_addr(), sky2_status_intr(), sky2_tx_complete(), smsc75xx_probe(), smsc95xx_probe(), snpnet_start(), tg3_get_device_address(), tg3_init_one(), txnic_alloc(), undinet_probe(), velocity_probe(), virtnet_probe_legacy(), virtnet_probe_modern(), vlan_create(), vmxnet3_probe(), vxge_device_register(), xm_link_down(), and xm_link_timer().

◆ dma

struct dma_device* net_device::dma

◆ op

struct net_device_operations* net_device::op

◆ ll_protocol

struct ll_protocol* net_device::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 381 of file netdevice.h.

Referenced by a3c90x_probe(), atl1e_probe(), axge_probe(), cachedhcp_apply(), dm96xx_probe(), ecm_fetch_mac(), efab_probe(), efi_snp_set_mode(), efi_undi_station_address(), ena_get_device_attributes(), eoib_create(), eoib_find(), exanic_probe_port(), fdt_mac(), flexboot_nodnic_register_netdev(), hermon_register_netdev(), ice_admin_mac_read(), icplus_probe(), ifec_pci_probe(), igbvf_probe(), igbvf_reset(), intel_probe(), intelx_probe(), intelxl_admin_mac_read(), intelxlvf_admin_get_resources(), intelxvf_probe(), iphone_probe(), ipoib_probe(), jme_load_macaddr(), lan78xx_fetch_mac(), legacy_probe(), myri10ge_pci_probe(), myson_probe(), natsemi_probe(), netdev_fetch_hwaddr(), netdev_store_mac(), netfront_probe(), nii_get_station_address(), pcnet32_probe(), phantom_probe(), pnic_probe(), pxenv_undi_get_information(), rdc_probe(), realtek_probe(), register_netdev(), rhine_probe(), rndis_rx_query_oid(), sis190_get_mac_addr_from_apc(), sis190_get_mac_addr_from_eeprom(), smsc95xx_fetch_mac(), smsc95xx_vm3_fetch_mac(), smscusb_eeprom_fetch_mac(), smscusb_fdt_fetch_mac(), smscusb_otp_fetch_mac(), snpnet_start(), txnic_lmac_probe(), undinet_probe(), velocity_probe(), virtnet_probe_legacy(), virtnet_probe_modern(), vlan_create(), vmxnet3_probe(), and vxge_device_register().

◆ ll_addr

uint8_t net_device::ll_addr[MAX_LL_ADDR_LEN]

Link-layer address.

This is the current link-layer address assigned to the device. It can be changed at runtime.

Definition at line 387 of file netdevice.h.

Referenced by a3c90x_hw_start(), abft_install(), aoecmd_tx(), arp_rx(), arp_tx_request(), ath5k_start(), atl1e_probe(), atl1e_up(), axge_open(), b44_probe(), cachedhcp_apply(), dhcp_create_packet(), dhcp_create_request(), dhcp_deliver(), dm96xx_open(), ecm_fetch_mac(), efi_netdev_path(), efi_snp_set_mode(), efi_snp_station_address(), efi_undi_station_address(), eth_slow_lacp_rx(), eth_slow_marker_rx(), fcoe_deliver(), fcoe_fip_rx(), fcoe_fip_tx_keepalive(), fcoe_fip_tx_solicitation(), fcoe_fip_tx_vlan(), fcoe_probe(), fcoe_reset(), find_netdev_by_ll_addr(), gdbudp_recv(), gdbudp_send(), genesis_mac_init(), hunt_probe(), hunt_set_mac(), ibft_fill_nic(), ice_admin_mac_write(), ifconf(), ifec_net_open(), igbvf_open(), intel_open(), intelx_open(), intelxl_admin_mac_write(), intelxvf_open(), ipoib_complete_recv(), ipoib_probe(), ipoib_translate_rx_arp(), ipv4_tx(), ipv6_eui64(), ipv6_tx(), is_autoboot_ll_addr(), jme_set_custom_macaddr(), loopback_test(), myri10ge_net_open(), myson_open(), natsemi_open(), ncm_open(), ndp_tx_ll_addr(), neighbour_discovered(), net80211_tx_mgmt(), netdev_addr(), netdev_fetch_mac(), netdev_has_ll_addr(), netdev_store_mac(), nii_get_station_address(), nii_set_station_address(), phantom_close(), phantom_open(), pxenv_undi_get_information(), pxenv_undi_set_station_address(), pxenv_undi_transmit(), register_netdev(), rndis_rx_query_oid(), rtl818x_start(), sis190_init_rxfilter(), smscusb_set_address(), smscusb_set_filter(), snpnet_open(), snpnet_start(), start_dhcpv6(), undinet_open(), undinet_probe(), vlan_create(), and vmxnet3_open().

◆ ll_broadcast

const uint8_t* net_device::ll_broadcast

◆ state

unsigned int net_device::state

Current device state.

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

Definition at line 395 of file netdevice.h.

Referenced by efx_hunt_irq(), hunt_probe(), netdev_close(), netdev_irq(), netdev_irq_enabled(), netdev_irq_supported(), netdev_is_open(), netdev_open(), netdev_poll(), netdev_rx_freeze(), netdev_rx_frozen(), netdev_rx_unfreeze(), netdev_tx(), and vlan_create().

◆ 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 401 of file netdevice.h.

Referenced by alloc_netdev(), iflinkwait_progress(), ifstat(), iphone_check_link(), netdev_link_down(), netdev_link_err(), netdev_link_ok(), and vlan_sync().

◆ link_block

struct retry_timer net_device::link_block

◆ max_pkt_len

size_t net_device::max_pkt_len

◆ 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 415 of file netdevice.h.

Referenced by alloc_etherdev(), apply_netdev_settings(), efi_snp_set_mode(), ena_get_device_attributes(), ice_open(), intelxl_open(), intelxlvf_open(), register_netdev(), tcpip_mtu(), virtnet_probe_legacy(), and xve_update_mtu().

◆ tx_queue

struct list_head net_device::tx_queue

◆ tx_deferred

struct list_head net_device::tx_deferred

Deferred TX packet queue.

Definition at line 419 of file netdevice.h.

Referenced by alloc_netdev(), net_discard(), netdev_tx_complete_err(), netdev_tx_defer(), and netdev_tx_flush().

◆ rx_queue

struct list_head net_device::rx_queue

RX packet queue.

Definition at line 421 of file netdevice.h.

Referenced by alloc_netdev(), netdev_rx(), and netdev_rx_dequeue().

◆ tx_stats

struct net_device_stats net_device::tx_stats

◆ rx_stats

struct net_device_stats net_device::rx_stats

◆ settings

struct generic_settings net_device::settings

Configuration settings applicable to this device.

Definition at line 428 of file netdevice.h.

Referenced by netdev_redirect(), netdev_settings(), and netdev_settings_init().

◆ priv

void* net_device::priv

Driver private data.

Definition at line 431 of file netdevice.h.

Referenced by alloc_netdev(), alloc_rndis(), axge_close(), axge_open(), axge_poll(), axge_probe(), axge_transmit(), dm96xx_close(), dm96xx_open(), dm96xx_poll(), dm96xx_probe(), dm96xx_transmit(), ecm_close(), ecm_open(), ecm_poll(), ecm_probe(), ecm_transmit(), ena_close(), ena_get_device_attributes(), ena_open(), ena_poll_rx(), ena_poll_tx(), ena_probe(), ena_refill_rx(), ena_remove(), ena_transmit(), eoib_close(), eoib_create(), eoib_discard(), eoib_open(), eoib_poll(), eoib_transmit(), exanic_check_link(), exanic_close(), exanic_open(), exanic_poll_rx(), exanic_poll_tx(), exanic_probe_port(), exanic_transmit(), flexboot_nodnic_eth_close(), flexboot_nodnic_eth_irq(), flexboot_nodnic_eth_open(), flexboot_nodnic_eth_poll(), flexboot_nodnic_eth_transmit(), flexboot_nodnic_register_netdev(), forcedeth_remove(), hermon_eth_close(), hermon_eth_open(), hermon_eth_poll(), hermon_eth_transmit(), hermon_probe(), ice_admin_event(), ice_admin_link(), ice_admin_mac_read(), ice_admin_mac_write(), ice_close(), ice_open(), ice_probe(), ice_remove(), icplus_check_link(), icplus_close(), icplus_irq(), icplus_open(), icplus_poll(), icplus_poll_rx(), icplus_poll_tx(), icplus_probe(), icplus_remove(), icplus_transmit(), ifec_check_ru_status(), ifec_get_rx_desc(), ifec_init_eeprom(), ifec_mdio_read(), ifec_mdio_setup(), ifec_mdio_write(), ifec_net_close(), ifec_net_irq(), ifec_net_open(), ifec_net_poll(), ifec_net_transmit(), ifec_pci_probe(), ifec_refill_rx_ring(), ifec_reprime_ru(), ifec_reset(), ifec_rx_process(), ifec_rx_setup(), ifec_scb_cmd(), ifec_scb_cmd_wait(), ifec_tx_process(), ifec_tx_setup(), ifec_tx_wake(), intel_check_link(), intel_close(), intel_irq(), intel_open(), intel_poll(), intel_poll_rx(), intel_poll_tx(), intel_probe(), intel_remove(), intel_transmit(), intelx_check_link(), intelx_close(), intelx_irq(), intelx_open(), intelx_poll(), intelx_probe(), intelx_remove(), intelxl_admin_event(), intelxl_admin_link(), intelxl_admin_mac_read(), intelxl_admin_mac_write(), intelxl_close(), intelxl_open(), intelxl_poll(), intelxl_poll_admin(), intelxl_poll_rx(), intelxl_poll_tx(), intelxl_probe(), intelxl_remove(), intelxl_transmit(), intelxlvf_admin_command(), intelxlvf_admin_configure(), intelxlvf_admin_event(), intelxlvf_admin_get_resources(), intelxlvf_admin_irq_map(), intelxlvf_admin_link(), intelxlvf_admin_promisc(), intelxlvf_admin_queues(), intelxlvf_admin_request_qps(), intelxlvf_admin_stats(), intelxlvf_admin_status(), intelxlvf_admin_version(), intelxlvf_close(), intelxlvf_open(), intelxlvf_probe(), intelxlvf_remove(), intelxvf_check_link(), intelxvf_close(), intelxvf_irq(), intelxvf_open(), intelxvf_poll(), intelxvf_probe(), intelxvf_remove(), iphone_check_link(), iphone_close(), iphone_open(), iphone_poll(), iphone_probe(), iphone_transmit(), ipoib_close(), ipoib_discard_remac(), ipoib_open(), ipoib_poll(), ipoib_probe(), ipoib_translate_rx_arp(), ipoib_translate_tx_arp(), ipoib_transmit(), jme_check_link(), jme_close(), jme_irq(), jme_link_change(), jme_mdio_read(), jme_mdio_write(), jme_open(), jme_poll(), jme_probe(), jme_remove(), jme_set_custom_macaddr(), jme_transmit(), lan78xx_close(), lan78xx_open(), lan78xx_probe(), legacy_irq(), legacy_poll(), legacy_probe(), legacy_remove(), legacy_transmit(), myson_close(), myson_irq(), myson_open(), myson_poll(), myson_poll_rx(), myson_poll_tx(), myson_probe(), myson_refill_rx(), myson_remove(), myson_transmit(), natsemi_check_link(), natsemi_close(), natsemi_irq(), natsemi_open(), natsemi_poll(), natsemi_poll_rx(), natsemi_poll_tx(), natsemi_probe(), natsemi_refill_rx(), natsemi_remove(), natsemi_transmit(), ncm_close(), ncm_open(), ncm_poll(), ncm_probe(), ncm_transmit(), net80211_alloc(), net80211_get(), net80211_ll_pull(), net80211_ll_push(), net80211_netdev_close(), net80211_netdev_irq(), net80211_netdev_open(), net80211_netdev_poll(), net80211_netdev_transmit(), netdev_priv(), netfront_close(), netfront_open(), netfront_poll_rx(), netfront_poll_tx(), netfront_probe(), netfront_refill_rx(), netfront_remove(), netfront_transmit(), nii_close(), nii_open(), nii_poll(), nii_poll_rx(), nii_poll_tx(), nii_start(), nii_stop(), nii_transmit(), pcnet32_mdio_read(), pcnet32_mdio_write(), pnic_irq(), pnic_poll(), pnic_probe(), pnic_remove(), pnic_transmit(), rdc_check_link(), rdc_close(), rdc_irq(), rdc_open(), rdc_poll(), rdc_poll_rx(), rdc_poll_tx(), rdc_probe(), rdc_remove(), rdc_transmit(), realtek_check_link(), realtek_close(), realtek_init_eeprom(), realtek_irq(), realtek_legacy_poll_rx(), realtek_open(), realtek_poll(), realtek_poll_rx(), realtek_poll_tx(), realtek_probe(), realtek_remove(), realtek_transmit(), rhine_check_link(), rhine_close(), rhine_irq(), rhine_open(), rhine_poll(), rhine_poll_rx(), rhine_poll_tx(), rhine_probe(), rhine_remove(), rhine_transmit(), rndis_close(), rndis_open(), rndis_poll(), rndis_transmit(), sis190_remove(), skeleton_check_link(), skeleton_close(), skeleton_irq(), skeleton_open(), skeleton_poll(), skeleton_probe(), skeleton_remove(), skeleton_transmit(), smsc75xx_close(), smsc75xx_open(), smsc75xx_poll(), smsc75xx_probe(), smsc75xx_transmit(), smsc95xx_close(), smsc95xx_open(), smsc95xx_poll(), smsc95xx_probe(), smsc95xx_transmit(), snpnet_close(), snpnet_open(), snpnet_poll_rx(), snpnet_poll_tx(), snpnet_rx_filters(), snpnet_start(), snpnet_stop(), txnic_alloc(), txnic_lmac_close(), txnic_lmac_open(), txnic_lmac_poll(), txnic_lmac_probe(), txnic_lmac_transmit(), undinet_close(), undinet_irq(), undinet_open(), undinet_poll(), undinet_probe(), undinet_remove(), undinet_transmit(), velocity_check_link(), velocity_close(), velocity_irq(), velocity_open(), velocity_poll(), velocity_probe(), velocity_remove(), velocity_transmit(), virtnet_close(), virtnet_enqueue_iob(), virtnet_free_virtqueues(), virtnet_irq(), virtnet_open(), virtnet_open_legacy(), virtnet_open_modern(), virtnet_poll(), virtnet_probe_legacy(), virtnet_probe_modern(), virtnet_process_rx_packets(), virtnet_process_tx_packets(), virtnet_refill_rx_virtqueue(), virtnet_remove(), vlan_close(), vlan_create(), vlan_destroy(), vlan_find(), vlan_irq(), vlan_notify(), vlan_open(), vlan_poll(), vlan_remove_first(), vlan_sync(), vlan_tag(), and vlan_transmit().

◆ configs

struct net_device_configuration net_device::configs[0]

Network device configurations (variable length)

Definition at line 434 of file netdevice.h.

Referenced by alloc_netdev(), netdev_close(), netdev_configuration(), and netdev_has_configuration_rc().


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