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.
char name [8]
 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.
size_t max_pkt_len
 Maximum packet length.
struct list_head tx_queue
 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.


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


Field Documentation

struct refcnt net_device::refcnt [read]

Reference counter.

Definition at line 264 of file netdevice.h.

Referenced by alloc_netdev(), falcon_probe_spi(), net80211_alloc(), phantom_probe(), and rtl_init_eeprom().

struct list_head net_device::list [read]

List of network devices.

Definition at line 266 of file netdevice.h.

Referenced by find_netdev(), find_netdev_by_location(), register_netdev(), and unregister_netdev().

List of open network devices.

Definition at line 268 of file netdevice.h.

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

struct device* net_device::dev [read]

Network device operations.

Definition at line 275 of file netdevice.h.

Referenced by netdev_close(), netdev_init(), netdev_irq(), netdev_nullify(), netdev_open(), netdev_poll(), and netdev_tx().

uint8_t net_device::hw_addr[MAX_HW_ADDR_LEN]

uint8_t net_device::ll_addr[MAX_LL_ADDR_LEN]

unsigned int net_device::state

Current device state.

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

Definition at line 301 of file netdevice.h.

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

Link status code.

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

Definition at line 307 of file netdevice.h.

Referenced by alloc_netdev(), iflinkwait(), ifstat(), and netdev_link_down().

Maximum packet length.

This length includes any link-layer headers.

Definition at line 312 of file netdevice.h.

Referenced by alloc_etherdev(), alloc_ipoibdev(), efi_snp_set_mode(), and net80211_alloc().

RX packet queue.

Definition at line 316 of file netdevice.h.

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

Configuration settings applicable to this device.

Definition at line 323 of file netdevice.h.

Referenced by dhcp_create_request().


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

Generated on Tue Apr 6 20:02:07 2010 for gPXE by  doxygen 1.5.7.1