iPXE
Data Fields
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 index
 Index of this network device.
char name [NETDEV_NAME_LEN]
 Name of this network device.
struct devicedev
 Underlying hardware 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 348 of file netdevice.h.


Field Documentation

Reference counter.

Definition at line 350 of file netdevice.h.

Referenced by alloc_netdev(), exanic_probe_port(), net80211_alloc(), phantom_probe(), and realtek_init_eeprom().

List of open network devices.

Definition at line 354 of file netdevice.h.

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

unsigned int net_device::index

Name of this network device.

Definition at line 358 of file netdevice.h.

Referenced by __gm_phy_read(), add_ipv4_miniroute(), aoedev_name(), apply_netdev_settings(), arp_rx(), arp_tx_request(), atl1e_check_link(), atl1e_clean_rx_irq(), bcom_check_link(), bcom_phy_intr(), cachedhcp_probe(), del_ipv4_miniroute(), dhcpv6_rx(), dhcpv6_set_state(), dhcpv6_tx(), 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(), gm_phy_read(), gm_phy_write(), 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_rx_router_advertisement(), iwlist(), loopback_test(), ndp_fetch(), 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_show_addr(), skge_up(), skge_xmit_frame(), sky2_autoneg_done(), sky2_down(), sky2_hw_error(), sky2_le_error(), sky2_link_down(), sky2_link_up(), sky2_mac_intr(), sky2_phy_intr(), sky2_receive(), sky2_rx_stop(), sky2_show_addr(), 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_open(), vxge_xmit(), vxge_xmit_compl(), xm_check_link(), xm_phy_read(), and yukon_phy_intr().

Underlying hardware device.

Definition at line 360 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(), dm96xx_probe(), ecm_probe(), efab_probe(), 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(), icplus_probe(), ifec_pci_probe(), ifstat(), igbvf_probe(), intel_probe(), intelx_probe(), intelxl_probe(), intelxlvf_probe(), intelxvf_probe(), ipoib_probe(), is_autoboot_busloc(), jme_alloc_and_feed_iob(), jme_probe(), jme_process_receive(), jme_tx_clean(), lan78xx_probe(), legacy_probe(), myri10ge_net_irq(), myri10ge_net_open(), myri10ge_pci_probe(), myri10ge_pcidev(), myson_probe(), natsemi_probe(), ncm_probe(), net80211_alloc(), 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(), 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(), sky2_hw_error(), sky2_init_netdev(), sky2_le_error(), sky2_mac_intr(), sky2_phy_intr(), sky2_probe(), 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().

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

Referenced by a3c90x_probe(), atl1e_probe(), axge_probe(), dm96xx_probe(), ecm_probe(), 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(), icplus_probe(), ifec_pci_probe(), igbvf_probe(), igbvf_reset(), intel_probe(), intelx_probe(), intelxl_fetch_mac(), intelxlvf_admin_get_resources(), intelxvf_probe(), ipoib_probe(), jme_load_macaddr(), lan78xx_fetch_mac(), legacy_probe(), myri10ge_pci_probe(), myson_probe(), natsemi_probe(), ncm_probe(), net80211_register(), netdev_fetch_hwaddr(), netdev_store_mac(), netfront_probe(), nii_get_station_address(), nv_setup_mac_addr(), pcnet32_probe(), phantom_probe(), pnic_probe(), pxenv_undi_get_information(), realtek_probe(), register_netdev(), rhine_probe(), rndis_rx_query_oid(), sis190_get_mac_addr_from_apc(), sis190_get_mac_addr_from_eeprom(), skge_devinit(), sky2_init_netdev(), smsc95xx_fetch_mac(), smsc95xx_vm3_fetch_mac(), smscusb_eeprom_fetch_mac(), smscusb_fdt_fetch_mac(), smscusb_otp_fetch_mac(), snpnet_start(), tg3_get_device_address(), txnic_lmac_probe(), undinet_probe(), velocity_probe(), virtnet_probe_legacy(), virtnet_probe_modern(), vlan_create(), vmxnet3_probe(), and vxge_device_register().

Link-layer address.

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

Definition at line 381 of file netdevice.h.

Referenced by __tg3_set_mac_addr(), a3c90x_hw_start(), abft_install(), aoecmd_tx(), arp_rx(), arp_tx_request(), ath5k_start(), atl1e_probe(), atl1e_up(), axge_open(), b44_probe(), cachedhcp_probe(), dhcp_create_packet(), dhcp_create_request(), dhcp_deliver(), dm96xx_open(), efi_snp_probe(), 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(), ifconf(), ifec_net_open(), igbvf_open(), intel_open(), intelx_open(), intelxl_open(), 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(), sky2_mac_init(), smscusb_set_address(), smscusb_set_filter(), snpnet_open(), snpnet_start(), start_dhcpv6(), undinet_open(), undinet_probe(), vlan_create(), vmxnet3_open(), wpa_derive_ptk(), wpa_send_eapol(), and yukon_mac_init().

unsigned int net_device::state

Current device state.

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

Definition at line 389 of file netdevice.h.

Referenced by efx_hunt_irq(), hunt_probe(), net80211_register(), netdev_close(), netdev_irq(), netdev_open(), netdev_rx_freeze(), netdev_rx_unfreeze(), and vlan_create().

Link status code.

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

Definition at line 395 of file netdevice.h.

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

Maximum transmission unit length.

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

Definition at line 409 of file netdevice.h.

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

Deferred TX packet queue.

Definition at line 413 of file netdevice.h.

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

RX packet queue.

Definition at line 415 of file netdevice.h.

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

Configuration settings applicable to this device.

Definition at line 422 of file netdevice.h.

Referenced by netdev_redirect().

Driver private data.

Definition at line 425 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(), 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_link(), 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_status(), intelxlvf_close(), intelxlvf_open(), intelxlvf_probe(), intelxlvf_remove(), intelxvf_check_link(), intelxvf_close(), intelxvf_irq(), intelxvf_open(), intelxvf_poll(), intelxvf_probe(), intelxvf_remove(), 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(), 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(), 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().

Network device configurations (variable length)

Definition at line 428 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: