/* * This is the first field of the "visible" part of this structure * (i.e. as seen by users in the "Space.c" file). It is the name * the interface. */ charname[IFNAMSIZ]; /* device name hash chain */ structhlist_nodename_hlist; /* snmp alias */ char*ifalias;
/* *I/O specific fields *FIXME: Merge these and struct ifmap into one */ unsignedlongmem_end;/* shared mem end*/ unsignedlongmem_start;/* shared mem start*/ unsignedlongbase_addr;/* device I/O address*/ unsignedintirq;/* device IRQ number*/
/* *Some hardware also needs these fields, but they are not *part of the usual set specified in Space.c. */
/* Net device features */ unsignedlongfeatures; #defineNETIF_F_SG1/* Scatter/gather IO. */ #defineNETIF_F_IP_CSUM2/* Can checksum TCP/UDP over IPv4. */ #defineNETIF_F_NO_CSUM4/* Does not require checksum. F.e. loopack. */ #defineNETIF_F_HW_CSUM8/* Can checksum all the packets. */ #defineNETIF_F_IPV6_CSUM16/* Can checksum TCP/UDP over IPV6 */ #defineNETIF_F_HIGHDMA32/* Can DMA to high memory. */ #defineNETIF_F_FRAGLIST64/* Scatter/gather IO. */ #defineNETIF_F_HW_VLAN_TX128/* Transmit VLAN hw acceleration */ #defineNETIF_F_HW_VLAN_RX256/* Receive VLAN hw acceleration */ #defineNETIF_F_HW_VLAN_FILTER512/* Receive filtering on VLAN */ #defineNETIF_F_VLAN_CHALLENGED1024/* Device cannot handle VLAN packets */ #defineNETIF_F_GSO2048/* Enable software GSO. */ #defineNETIF_F_LLTX4096/* LockLess TX - deprecated. Please */ /* do not use LLTX in new drivers */ #defineNETIF_F_NETNS_LOCAL8192/* Does not change network namespaces */ #defineNETIF_F_GRO16384/* Generic receive offload */ #defineNETIF_F_LRO32768/* large receive offload */
/* the GSO_MASK reserves bits 16 through 23 */ #defineNETIF_F_FCOE_CRC(1<<24)/* FCoE CRC32 */ #defineNETIF_F_SCTP_CSUM(1<<25)/* SCTP checksum offload */
/* * If one device supports one of these features, then enable them * for all in netdev_increment_features. */ #defineNETIF_F_ONE_FOR_ALL(NETIF_F_GSO_SOFTWARE|NETIF_F_GSO_ROBUST|/ NETIF_F_SG|NETIF_F_HIGHDMA|/ NETIF_F_FRAGLIST)
#ifdefCONFIG_WIRELESS_EXT /* List of functions to handle Wireless Extensions (instead of ioctl). * See <net/iw_handler.h> for details. Jean II */ conststructiw_handler_def*wireless_handlers; /* Instance data managed by the core of Wireless Extensions. */ structiw_public_data*wireless_data; #endif /* Management operations */ conststructnet_device_ops*netdev_ops; conststructethtool_ops*ethtool_ops;
unsignedintflags;/* interface flags (a la BSD)*/ unsignedshortgflags; unsignedshortpriv_flags;/* Like 'flags' but invisible to userspace. */ unsignedshortpadded;/* How much padding added by alloc_netdev() */
unsignedcharoperstate;/* RFC2863 operstate */ unsignedcharlink_mode;/* mapping policy to operstate */
/* extra head- and tailroom the hardware may need, but not in all cases * can this be guaranteed, especially tailroom. Some cases also use * LL_MAX_HEADER instead to allocate the skb. */ unsignedshortneeded_headroom; unsignedshortneeded_tailroom;
structnet_device*master;/* Pointer to master device of a group, * which this device is member of. */
structnetdev_hw_addr_listuc;/* Secondary unicast mac addresses */ intuc_promisc; spinlock_taddr_list_lock; structdev_addr_list*mc_list;/* Multicast mac addresses*/ intmc_count;/* Number of installed mcasts*/ unsignedintpromiscuity; unsignedintallmulti;
/* Protocol specific pointers */
#ifdefCONFIG_NET_DSA void*dsa_ptr;/* dsa specific data */ #endif void*atalk_ptr;/* AppleTalk link */ void*ip_ptr;/* IPv4 specific data*/ void*dn_ptr;/* DECnet specific data */ void*ip6_ptr;/* IPv6 specific data */ void*ec_ptr;/* Econet specific data*/ void*ax25_ptr;/* AX.25 specific data */ structwireless_dev*ieee80211_ptr;/* IEEE 802.11 specific data, assign before registering */
/* * Cache line mostly used on receive path (including eth_type_trans()) */ unsignedlonglast_rx;/* Time of last Rx*/ /* Interface address info used in eth_type_trans() */ unsignedchar*dev_addr;/* hw address, (before bcast because most packets are unicast) */
structnetdev_hw_addr_listdev_addrs;/* list of device hw addresses */
/* Number of TX queues allocated at alloc_netdev_mq() time */ unsignedintnum_tx_queues;
/* Number of TX queues currently active in device */ unsignedintreal_num_tx_queues;
unsignedlongtx_queue_len;/* Max frames per queue allowed */ spinlock_ttx_global_lock; /* * One part is mostly used on xmit path (device) */ /* These may be needed for future network-power-down code. */
/* * trans_start here is expensive for high speed devices on SMP, * please use netdev_queue->trans_start instead. */ unsignedlongtrans_start;/* Time (in jiffies) of last Tx*/
intwatchdog_timeo;/* used by dev_watchdog() */ structtimer_listwatchdog_timer;
/* Number of references to this device */ atomic_trefcnt ____cacheline_aligned_in_smp;