Go to the source code of this file.
Classes | |
| struct | dev_gso_cb |
: name of interface | |
| dev_load - load a network module : the applicable net namespace If a network interface is not present and the process has suitable privileges this function loads the module.
If module loading is not available in this kernel then it becomes a nop. | |
| #define | DEV_GSO_CB(skb) ((struct dev_gso_cb *)(skb)->cb) |
| #define | handle_bridge(skb, pt_prev, ret, orig_dev) (skb) |
| #define | handle_macvlan(skb, pt_prev, ret, orig_dev) (skb) |
| #define | dev_proc_init() 0 |
| static struct list_head ptype_base[PTYPE_HASH_SIZE] | __read_mostly = 1000 |
| static int | dev_boot_phase = 1 |
| static atomic_t | netstamp_needed = ATOMIC_INIT(0) |
| static u32 | simple_tx_hashrnd |
| static int | simple_tx_hashrnd_initialized = 0 |
| static gifconf_func_t * | gifconf_list [NPROTO] |
| void | dev_load (struct net *net, const char *name) |
| int | dev_open (struct net_device *dev) |
| dev_open - prepare an interface for use. | |
| int | dev_close (struct net_device *dev) |
| dev_close - shutdown an interface. | |
| void | dev_disable_lro (struct net_device *dev) |
| dev_disable_lro - disable Large Receive Offload on a device : device | |
| EXPORT_SYMBOL (dev_disable_lro) | |
| int | register_netdevice_notifier (struct notifier_block *nb) |
| register_netdevice_notifier - register a network notifier block : notifier | |
| int | unregister_netdevice_notifier (struct notifier_block *nb) |
| unregister_netdevice_notifier - unregister a network notifier block : notifier | |
| int | call_netdevice_notifiers (unsigned long val, struct net_device *dev) |
| call_netdevice_notifiers - call all network notifier blocks : value passed unmodified to notifier function : net_device pointer passed unmodified to notifier function | |
| void | net_enable_timestamp (void) |
| void | net_disable_timestamp (void) |
| static void | net_timestamp (struct sk_buff *skb) |
| static void | dev_queue_xmit_nit (struct sk_buff *skb, struct net_device *dev) |
| static void | __netif_reschedule (struct Qdisc *q) |
| void | __netif_schedule (struct Qdisc *q) |
| EXPORT_SYMBOL (__netif_schedule) | |
| void | dev_kfree_skb_irq (struct sk_buff *skb) |
| EXPORT_SYMBOL (dev_kfree_skb_irq) | |
| void | dev_kfree_skb_any (struct sk_buff *skb) |
| EXPORT_SYMBOL (dev_kfree_skb_any) | |
| void | netif_device_detach (struct net_device *dev) |
| netif_device_detach - mark device as removed : network device | |
| EXPORT_SYMBOL (netif_device_detach) | |
| void | netif_device_attach (struct net_device *dev) |
| netif_device_attach - mark device as attached : network device | |
| EXPORT_SYMBOL (netif_device_attach) | |
| static bool | can_checksum_protocol (unsigned long features, __be16 protocol) |
| static bool | dev_can_checksum (struct net_device *dev, struct sk_buff *skb) |
| int | skb_checksum_help (struct sk_buff *skb) |
| struct sk_buff * | skb_gso_segment (struct sk_buff *skb, int features) |
| skb_gso_segment - Perform segmentation on skb. | |
| EXPORT_SYMBOL (skb_gso_segment) | |
| static int | illegal_highdma (struct net_device *dev, struct sk_buff *skb) |
| static void | dev_gso_skb_destructor (struct sk_buff *skb) |
| static int | dev_gso_segment (struct sk_buff *skb) |
| dev_gso_segment - Perform emulated hardware segmentation on skb. | |
| int | dev_hard_start_xmit (struct sk_buff *skb, struct net_device *dev, struct netdev_queue *txq) |
| static u16 | simple_tx_hash (struct net_device *dev, struct sk_buff *skb) |
| static struct netdev_queue * | dev_pick_tx (struct net_device *dev, struct sk_buff *skb) |
| int | dev_queue_xmit (struct sk_buff *skb) |
| dev_queue_xmit - transmit a buffer : buffer to transmit | |
| DEFINE_PER_CPU (struct netif_rx_stats, netdev_rx_stat) | |
| int | netif_rx (struct sk_buff *skb) |
| netif_rx - post buffer to the network code : buffer to post | |
| int | netif_rx_ni (struct sk_buff *skb) |
| EXPORT_SYMBOL (netif_rx_ni) | |
| static void | net_tx_action (struct softirq_action *h) |
| static int | deliver_skb (struct sk_buff *skb, struct packet_type *pt_prev, struct net_device *orig_dev) |
| void | netif_nit_deliver (struct sk_buff *skb) |
| int | netif_receive_skb (struct sk_buff *skb) |
| netif_receive_skb - process receive buffer from network : buffer to process | |
| static void | flush_backlog (void *arg) |
| static int | napi_gro_complete (struct sk_buff *skb) |
| void | napi_gro_flush (struct napi_struct *napi) |
| EXPORT_SYMBOL (napi_gro_flush) | |
| int | dev_gro_receive (struct napi_struct *napi, struct sk_buff *skb) |
| EXPORT_SYMBOL (dev_gro_receive) | |
| static int | __napi_gro_receive (struct napi_struct *napi, struct sk_buff *skb) |
| int | napi_gro_receive (struct napi_struct *napi, struct sk_buff *skb) |
| EXPORT_SYMBOL (napi_gro_receive) | |
| void | napi_reuse_skb (struct napi_struct *napi, struct sk_buff *skb) |
| EXPORT_SYMBOL (napi_reuse_skb) | |
| struct sk_buff * | napi_fraginfo_skb (struct napi_struct *napi, struct napi_gro_fraginfo *info) |
| EXPORT_SYMBOL (napi_fraginfo_skb) | |
| int | napi_gro_frags (struct napi_struct *napi, struct napi_gro_fraginfo *info) |
| EXPORT_SYMBOL (napi_gro_frags) | |
| static int | process_backlog (struct napi_struct *napi, int quota) |
| void | __napi_schedule (struct napi_struct *n) |
| __napi_schedule - schedule for receive : entry to schedule | |
| EXPORT_SYMBOL (__napi_schedule) | |
| void | __napi_complete (struct napi_struct *n) |
| EXPORT_SYMBOL (__napi_complete) | |
| void | napi_complete (struct napi_struct *n) |
| EXPORT_SYMBOL (napi_complete) | |
| void | netif_napi_add (struct net_device *dev, struct napi_struct *napi, int(*poll)(struct napi_struct *, int), int weight) |
| EXPORT_SYMBOL (netif_napi_add) | |
| void | netif_napi_del (struct napi_struct *napi) |
| EXPORT_SYMBOL (netif_napi_del) | |
| static void | net_rx_action (struct softirq_action *h) |
| int | register_gifconf (unsigned int family, gifconf_func_t *gifconf) |
| register_gifconf - register a SIOCGIF handler : Address family : Function handler | |
| static int | dev_ifname (struct net *net, struct ifreq __user *arg) |
| static int | dev_ifconf (struct net *net, char __user *arg) |
| int | netdev_set_master (struct net_device *slave, struct net_device *master) |
| netdev_set_master - set up master/slave pair : slave device : new master device | |
| static void | dev_change_rx_flags (struct net_device *dev, int flags) |
| static int | __dev_set_promiscuity (struct net_device *dev, int inc) |
| int | dev_set_promiscuity (struct net_device *dev, int inc) |
| dev_set_promiscuity - update promiscuity count on a device : device : modifier | |
| int | dev_set_allmulti (struct net_device *dev, int inc) |
| dev_set_allmulti - update allmulti count on a device : device : modifier | |
| void | __dev_set_rx_mode (struct net_device *dev) |
| void | dev_set_rx_mode (struct net_device *dev) |
| int | __dev_addr_delete (struct dev_addr_list **list, int *count, void *addr, int alen, int glbl) |
| int | __dev_addr_add (struct dev_addr_list **list, int *count, void *addr, int alen, int glbl) |
| int | dev_unicast_delete (struct net_device *dev, void *addr, int alen) |
| dev_unicast_delete - Release secondary unicast address. | |
| EXPORT_SYMBOL (dev_unicast_delete) | |
| int | dev_unicast_add (struct net_device *dev, void *addr, int alen) |
| dev_unicast_add - add a secondary unicast address : device : address to add : length of | |
| EXPORT_SYMBOL (dev_unicast_add) | |
| int | __dev_addr_sync (struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count) |
| void | __dev_addr_unsync (struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count) |
| int | dev_unicast_sync (struct net_device *to, struct net_device *from) |
| dev_unicast_sync - Synchronize device's unicast list to another device : destination device : source device | |
| EXPORT_SYMBOL (dev_unicast_sync) | |
| void | dev_unicast_unsync (struct net_device *to, struct net_device *from) |
| dev_unicast_unsync - Remove synchronized addresses from the destination device : destination device : source device | |
| EXPORT_SYMBOL (dev_unicast_unsync) | |
| static void | __dev_addr_discard (struct dev_addr_list **list) |
| static void | dev_addr_discard (struct net_device *dev) |
| unsigned | dev_get_flags (const struct net_device *dev) |
| dev_get_flags - get flags reported to userspace : device | |
| int | dev_change_flags (struct net_device *dev, unsigned flags) |
| dev_change_flags - change device settings : device : device state flags | |
| int | dev_set_mtu (struct net_device *dev, int new_mtu) |
| dev_set_mtu - Change maximum transfer unit : device : new transfer unit | |
| int | dev_set_mac_address (struct net_device *dev, struct sockaddr *sa) |
| dev_set_mac_address - Change Media Access Control Address : device | |
| static int | dev_ifsioc_locked (struct net *net, struct ifreq *ifr, unsigned int cmd) |
| static int | dev_ifsioc (struct net *net, struct ifreq *ifr, unsigned int cmd) |
| int | dev_ioctl (struct net *net, unsigned int cmd, void __user *arg) |
| dev_ioctl - network device ioctl : the applicable net namespace : command to issue | |
| static int | dev_new_index (struct net *net) |
| dev_new_index - allocate an ifindex : the applicable net namespace | |
| static | LIST_HEAD (net_todo_list) |
| static void | net_set_todo (struct net_device *dev) |
| static void | rollback_registered (struct net_device *dev) |
| static void | __netdev_init_queue_locks_one (struct net_device *dev, struct netdev_queue *dev_queue, void *_unused) |
| static void | netdev_init_queue_locks (struct net_device *dev) |
| unsigned long | netdev_fix_features (unsigned long features, const char *name) |
| EXPORT_SYMBOL (netdev_fix_features) | |
| void | netdev_resync_ops (struct net_device *dev) |
| EXPORT_SYMBOL (netdev_resync_ops) | |
| int | register_netdevice (struct net_device *dev) |
| register_netdevice - register a network device : device to register | |
| int | init_dummy_netdev (struct net_device *dev) |
| init_dummy_netdev - init a dummy network device for NAPI : device to init | |
| EXPORT_SYMBOL_GPL (init_dummy_netdev) | |
| int | register_netdev (struct net_device *dev) |
| register_netdev - register a network device : device to register | |
| EXPORT_SYMBOL (register_netdev) | |
| static void | netdev_wait_allrefs (struct net_device *dev) |
| void | netdev_run_todo (void) |
| struct net_device_stats * | dev_get_stats (struct net_device *dev) |
| dev_get_stats - get network device statistics : device to get statistics from | |
| EXPORT_SYMBOL (dev_get_stats) | |
| static void | netdev_init_one_queue (struct net_device *dev, struct netdev_queue *queue, void *_unused) |
| static void | netdev_init_queues (struct net_device *dev) |
: device name format string | |
| alloc_netdev_mq - allocate network device : size of private data to allocate space for : callback to initialize device : the number of subqueues to allocate
Allocates a struct net_device with private data area for driver use and performs basic initialization. Also allocates subquue structs for each queue on the device at the end of the netdevice. | |
| static struct pernet_operations __net_initdata | netdev_net_ops |
| static struct pernet_operations __net_initdata | default_device_ops |
| struct net_device * | alloc_netdev_mq (int sizeof_priv, const char *name, void(*setup)(struct net_device *), unsigned int queue_count) |
| EXPORT_SYMBOL (alloc_netdev_mq) | |
| void | free_netdev (struct net_device *dev) |
| free_netdev - free network device : device | |
| void | synchronize_net (void) |
| synchronize_net - Synchronize with packet receive processing | |
| void | unregister_netdevice (struct net_device *dev) |
| unregister_netdevice - remove device from the kernel : device | |
| void | unregister_netdev (struct net_device *dev) |
| unregister_netdev - remove device from the kernel : device | |
| EXPORT_SYMBOL (unregister_netdev) | |
| int | dev_change_net_namespace (struct net_device *dev, struct net *net, const char *pat) |
| dev_change_net_namespace - move device to different nethost namespace : device : network namespace : If not NULL name pattern to try if the current device name is already taken in the destination network namespace. | |
| static int | dev_cpu_callback (struct notifier_block *nfb, unsigned long action, void *ocpu) |
| unsigned long | netdev_increment_features (unsigned long all, unsigned long one, unsigned long mask) |
| netdev_increment_features - increment feature set by one : current feature set : new feature set : mask feature set | |
| EXPORT_SYMBOL (netdev_increment_features) | |
| static struct hlist_head * | netdev_create_hash (void) |
| static int __net_init | netdev_init (struct net *net) |
| char * | netdev_drivername (const struct net_device *dev, char *buffer, int len) |
| netdev_drivername - network driver for the device : network device : buffer for resulting name : size of buffer | |
| static void __net_exit | netdev_exit (struct net *net) |
| static void __net_exit | default_device_exit (struct net *net) |
| static int __init | net_dev_init (void) |
| subsys_initcall (net_dev_init) | |
| EXPORT_SYMBOL (__dev_get_by_index) | |
| EXPORT_SYMBOL (__dev_get_by_name) | |
| EXPORT_SYMBOL (__dev_remove_pack) | |
| EXPORT_SYMBOL (dev_valid_name) | |
| EXPORT_SYMBOL (dev_add_pack) | |
| EXPORT_SYMBOL (dev_alloc_name) | |
| EXPORT_SYMBOL (dev_close) | |
| EXPORT_SYMBOL (dev_get_by_flags) | |
| EXPORT_SYMBOL (dev_get_by_index) | |
| EXPORT_SYMBOL (dev_get_by_name) | |
| EXPORT_SYMBOL (dev_open) | |
| EXPORT_SYMBOL (dev_queue_xmit) | |
| EXPORT_SYMBOL (dev_remove_pack) | |
| EXPORT_SYMBOL (dev_set_allmulti) | |
| EXPORT_SYMBOL (dev_set_promiscuity) | |
| EXPORT_SYMBOL (dev_change_flags) | |
| EXPORT_SYMBOL (dev_set_mtu) | |
| EXPORT_SYMBOL (dev_set_mac_address) | |
| EXPORT_SYMBOL (free_netdev) | |
| EXPORT_SYMBOL (netdev_boot_setup_check) | |
| EXPORT_SYMBOL (netdev_set_master) | |
| EXPORT_SYMBOL (netdev_state_change) | |
| EXPORT_SYMBOL (netif_receive_skb) | |
| EXPORT_SYMBOL (netif_rx) | |
| EXPORT_SYMBOL (register_gifconf) | |
| EXPORT_SYMBOL (register_netdevice) | |
| EXPORT_SYMBOL (register_netdevice_notifier) | |
| EXPORT_SYMBOL (skb_checksum_help) | |
| EXPORT_SYMBOL (synchronize_net) | |
| EXPORT_SYMBOL (unregister_netdevice) | |
| EXPORT_SYMBOL (unregister_netdevice_notifier) | |
| EXPORT_SYMBOL (net_enable_timestamp) | |
| EXPORT_SYMBOL (net_disable_timestamp) | |
| EXPORT_SYMBOL (dev_get_flags) | |
| EXPORT_PER_CPU_SYMBOL (softnet_data) | |
Defines | |
| #define | MAX_GRO_SKBS 8 |
| #define | GRO_MAX_HEAD (MAX_HEADER + 128) |
| #define | PTYPE_HASH_SIZE (16) |
| #define | PTYPE_HASH_MASK (PTYPE_HASH_SIZE - 1) |
| #define | NETDEV_HASHBITS 8 |
| #define | NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS) |
Functions | |
| static | DEFINE_SPINLOCK (ptype_lock) |
| DEFINE_RWLOCK (dev_base_lock) | |
| EXPORT_SYMBOL (dev_base_lock) | |
| static struct hlist_head * | dev_name_hash (struct net *net, const char *name) |
| static struct hlist_head * | dev_index_hash (struct net *net, int ifindex) |
| static int | list_netdevice (struct net_device *dev) |
| static void | unlist_netdevice (struct net_device *dev) |
| static | RAW_NOTIFIER_HEAD (netdev_chain) |
| DEFINE_PER_CPU (struct softnet_data, softnet_data) | |
| static void | netdev_set_xmit_lockdep_class (spinlock_t *lock, unsigned short dev_type) |
| static void | netdev_set_addr_lockdep_class (struct net_device *dev) |
| void | dev_add_pack (struct packet_type *pt) |
| dev_add_pack - add packet handler : packet type declaration | |
| void | __dev_remove_pack (struct packet_type *pt) |
| __dev_remove_pack - remove packet handler : packet type declaration | |
| void | dev_remove_pack (struct packet_type *pt) |
| dev_remove_pack - remove packet handler : packet type declaration | |
: name of the device | |
| static int | netdev_boot_setup_add (char *name, struct ifmap *map) |
| int | netdev_boot_setup_check (struct net_device *dev) |
| netdev_boot_setup_check - check boot time settings : the netdevice | |
| unsigned long | netdev_boot_base (const char *prefix, int unit) |
| netdev_boot_base - get address from boot time settings : prefix for network device : id for network device | |
| int __init | netdev_boot_setup (char *str) |
| __setup ("netdev=", netdev_boot_setup) | |
: name to find | |
__dev_get_by_name - find a device by its name : the applicable net namespace Find an interface by name.
Must be called under RTNL semaphore or . If the name is found a pointer to the device is returned. If the name is not found then NULL is returned. The reference counters are not incremented so the caller must be careful with locks. | |
| struct net_device * | __dev_get_by_name (struct net *net, const char *name) |
: name to find | |
dev_get_by_name - find a device by its name : the applicable net namespace Find an interface by name.
This can be called from any context and does its own locking. The returned handle has the usage count incremented and the caller must use dev_put() to release it when it is no longer needed. NULL is returned if no matching device is found. | |
| struct net_device * | dev_get_by_name (struct net *net, const char *name) |
| struct net_device * | __dev_get_by_index (struct net *net, int ifindex) |
| __dev_get_by_index - find a device by its ifindex : the applicable net namespace : index of device | |
| struct net_device * | dev_get_by_index (struct net *net, int ifindex) |
| dev_get_by_index - find a device by its ifindex : the applicable net namespace : index of device | |
| struct net_device * | dev_getbyhwaddr (struct net *net, unsigned short type, char *ha) |
| dev_getbyhwaddr - find a device by its hardware address : the applicable net namespace : media type of device : hardware address | |
| EXPORT_SYMBOL (dev_getbyhwaddr) | |
| struct net_device * | __dev_getfirstbyhwtype (struct net *net, unsigned short type) |
| EXPORT_SYMBOL (__dev_getfirstbyhwtype) | |
| struct net_device * | dev_getfirstbyhwtype (struct net *net, unsigned short type) |
| EXPORT_SYMBOL (dev_getfirstbyhwtype) | |
| struct net_device * | dev_get_by_flags (struct net *net, unsigned short if_flags, unsigned short mask) |
| dev_get_by_flags - find any device with given flags : the applicable net namespace : IFF_* values : bitmask of bits in if_flags to check | |
: name string | |
dev_valid_name - check if name is okay for network device Network device names need to be valid file names to to allow sysfs to work.
We also disallow any kind of whitespace. | |
| int | dev_valid_name (const char *name) |
: name format string | |
__dev_alloc_name - allocate a name for a device : network namespace to allocate the device name in : scratch buffer and result name string
Passed a format string - eg "lt%d" it will try and find a suitable id. It scans list of devices to build up a free map, then chooses the first empty slot. The caller must hold the dev_base or rtnl lock while allocating the name and adding the device in order to avoid duplicates. Limited to bits_per_byte * page size devices (ie 32K on most platforms). Returns the number of the unit assigned or a negative errno code. | |
| static int | __dev_alloc_name (struct net *net, const char *name, char *buf) |
: name format string | |
dev_alloc_name - allocate a name for a device : device Passed a format string - eg "lt%d" it will try and find a suitable id.
It scans list of devices to build up a free map, then chooses the first empty slot. The caller must hold the dev_base or rtnl lock while allocating the name and adding the device in order to avoid duplicates. Limited to bits_per_byte * page size devices (ie 32K on most platforms). Returns the number of the unit assigned or a negative errno code. | |
| int | dev_alloc_name (struct net_device *dev, const char *name) |
| int | dev_change_name (struct net_device *dev, const char *newname) |
| dev_change_name - change name of a device : device : name (or format string) must be at least IFNAMSIZ | |
| int | dev_set_alias (struct net_device *dev, const char *alias, size_t len) |
| dev_set_alias - change ifalias of a device : device : name up to IFALIASZ : limit of bytes to copy from info | |
| void | netdev_features_change (struct net_device *dev) |
| netdev_features_change - device changes features : device to cause notification | |
| EXPORT_SYMBOL (netdev_features_change) | |
| void | netdev_state_change (struct net_device *dev) |
| netdev_state_change - device changes state : device to cause notification | |
| void | netdev_bonding_change (struct net_device *dev) |
| EXPORT_SYMBOL (netdev_bonding_change) | |
Variables | |
| static struct netdev_boot_setup | dev_boot_setup [NETDEV_BOOT_SETUP_MAX] |
| #define DEV_GSO_CB | ( | skb | ) | ((struct dev_gso_cb *)(skb)->cb) |
| int __dev_addr_add | ( | struct dev_addr_list ** | list, | |
| int * | count, | |||
| void * | addr, | |||
| int | alen, | |||
| int | glbl | |||
| ) |
| int __dev_addr_delete | ( | struct dev_addr_list ** | list, | |
| int * | count, | |||
| void * | addr, | |||
| int | alen, | |||
| int | glbl | |||
| ) |
| static void __dev_addr_discard | ( | struct dev_addr_list ** | list | ) | [static] |
| int __dev_addr_sync | ( | struct dev_addr_list ** | to, | |
| int * | to_count, | |||
| struct dev_addr_list ** | from, | |||
| int * | from_count | |||
| ) |
| void __dev_addr_unsync | ( | struct dev_addr_list ** | to, | |
| int * | to_count, | |||
| struct dev_addr_list ** | from, | |||
| int * | from_count | |||
| ) |
| static int __dev_alloc_name | ( | struct net * | net, | |
| const char * | name, | |||
| char * | buf | |||
| ) | [static] |
| struct net_device* __dev_get_by_index | ( | struct net * | net, | |
| int | ifindex | |||
| ) | [read] |
__dev_get_by_index - find a device by its ifindex : the applicable net namespace : index of device
Search for an interface by index. Returns NULL if the device is not found or a pointer to the device. The device has not had its reference counter increased so the caller must be careful about locking. The caller must hold either the RTNL semaphore or .
| struct net_device* __dev_get_by_name | ( | struct net * | net, | |
| const char * | name | |||
| ) | [read] |
| struct net_device* __dev_getfirstbyhwtype | ( | struct net * | net, | |
| unsigned short | type | |||
| ) | [read] |
| void __dev_remove_pack | ( | struct packet_type * | pt | ) |
__dev_remove_pack - remove packet handler : packet type declaration
Remove a protocol handler that was previously added to the kernel protocol handlers by dev_add_pack(). The passed &packet_type is removed from the kernel lists and can be freed or reused once this function returns.
The packet type might still be in use by receivers and must not be freed until after all the CPU's have gone through a quiescent state.
| static int __dev_set_promiscuity | ( | struct net_device * | dev, | |
| int | inc | |||
| ) | [static] |
| static int __napi_gro_receive | ( | struct napi_struct * | napi, | |
| struct sk_buff * | skb | |||
| ) | [static] |
| void __napi_schedule | ( | struct napi_struct * | n | ) |
| static void __netdev_init_queue_locks_one | ( | struct net_device * | dev, | |
| struct netdev_queue * | dev_queue, | |||
| void * | _unused | |||
| ) | [static] |
| static void __netif_reschedule | ( | struct Qdisc * | q | ) | [inline, static] |
| __setup | ( | ) |
| struct net_device* alloc_netdev_mq | ( | int | sizeof_priv, | |
| const char * | name, | |||
| void(*)(struct net_device *) | setup, | |||
| unsigned int | queue_count | |||
| ) | [read] |
| int call_netdevice_notifiers | ( | unsigned long | val, | |
| struct net_device * | dev | |||
| ) |
call_netdevice_notifiers - call all network notifier blocks : value passed unmodified to notifier function : net_device pointer passed unmodified to notifier function
Call all network notifier blocks. Parameters and return value are as for raw_notifier_call_chain().
| static bool can_checksum_protocol | ( | unsigned long | features, | |
| __be16 | protocol | |||
| ) | [static] |
| static void __net_exit default_device_exit | ( | struct net * | net | ) | [static] |
| DEFINE_PER_CPU | ( | struct | netif_rx_stats, | |
| netdev_rx_stat | ||||
| ) |
| DEFINE_PER_CPU | ( | struct | softnet_data, | |
| softnet_data | ||||
| ) |
| DEFINE_RWLOCK | ( | dev_base_lock | ) |
| static DEFINE_SPINLOCK | ( | ptype_lock | ) | [static] |
| static int deliver_skb | ( | struct sk_buff * | skb, | |
| struct packet_type * | pt_prev, | |||
| struct net_device * | orig_dev | |||
| ) | [inline, static] |
| void dev_add_pack | ( | struct packet_type * | pt | ) |
dev_add_pack - add packet handler : packet type declaration
Add a protocol handler to the networking stack. The passed &packet_type is linked into kernel lists and may not be freed until it has been removed from the kernel lists.
This call does not sleep therefore it can not guarantee all CPU's that are in middle of receiving packets will see the new packet type (until the next received packet).
| static void dev_addr_discard | ( | struct net_device * | dev | ) | [static] |
| int dev_alloc_name | ( | struct net_device * | dev, | |
| const char * | name | |||
| ) |
| static bool dev_can_checksum | ( | struct net_device * | dev, | |
| struct sk_buff * | skb | |||
| ) | [static] |
| int dev_change_flags | ( | struct net_device * | dev, | |
| unsigned | flags | |||
| ) |
| int dev_change_name | ( | struct net_device * | dev, | |
| const char * | newname | |||
| ) |
| int dev_change_net_namespace | ( | struct net_device * | dev, | |
| struct net * | net, | |||
| const char * | pat | |||
| ) |
dev_change_net_namespace - move device to different nethost namespace : device : network namespace : If not NULL name pattern to try if the current device name is already taken in the destination network namespace.
This function shuts down a device interface and moves it to a new network namespace. On success 0 is returned, on a failure a netagive errno code is returned.
Callers must hold the rtnl semaphore.
| static void dev_change_rx_flags | ( | struct net_device * | dev, | |
| int | flags | |||
| ) | [static] |
| int dev_close | ( | struct net_device * | dev | ) |
| static int dev_cpu_callback | ( | struct notifier_block * | nfb, | |
| unsigned long | action, | |||
| void * | ocpu | |||
| ) | [static] |
| void dev_disable_lro | ( | struct net_device * | dev | ) |
| struct net_device* dev_get_by_flags | ( | struct net * | net, | |
| unsigned short | if_flags, | |||
| unsigned short | mask | |||
| ) | [read] |
dev_get_by_flags - find any device with given flags : the applicable net namespace : IFF_* values : bitmask of bits in if_flags to check
Search for any interface with the given flags. Returns NULL if a device is not found or a pointer to the device. The device returned has had a reference added and the pointer is safe until the user calls dev_put to indicate they have finished with it.
| struct net_device* dev_get_by_index | ( | struct net * | net, | |
| int | ifindex | |||
| ) | [read] |
dev_get_by_index - find a device by its ifindex : the applicable net namespace : index of device
Search for an interface by index. Returns NULL if the device is not found or a pointer to the device. The device returned has had a reference added and the pointer is safe until the user calls dev_put to indicate they have finished with it.
| struct net_device* dev_get_by_name | ( | struct net * | net, | |
| const char * | name | |||
| ) | [read] |
| unsigned dev_get_flags | ( | const struct net_device * | dev | ) |
| struct net_device_stats* dev_get_stats | ( | struct net_device * | dev | ) | [read] |
| struct net_device* dev_getbyhwaddr | ( | struct net * | net, | |
| unsigned short | type, | |||
| char * | ha | |||
| ) | [read] |
dev_getbyhwaddr - find a device by its hardware address : the applicable net namespace : media type of device : hardware address
Search for an interface by MAC address. Returns NULL if the device is not found or a pointer to the device. The caller must hold the rtnl semaphore. The returned device has not had its ref count increased and the caller must therefore be careful about locking
BUGS: If the API was consistent this would be __dev_get_by_hwaddr
| struct net_device* dev_getfirstbyhwtype | ( | struct net * | net, | |
| unsigned short | type | |||
| ) | [read] |
| int dev_gro_receive | ( | struct napi_struct * | napi, | |
| struct sk_buff * | skb | |||
| ) |
| static int dev_gso_segment | ( | struct sk_buff * | skb | ) | [static] |
| static void dev_gso_skb_destructor | ( | struct sk_buff * | skb | ) | [static] |
| int dev_hard_start_xmit | ( | struct sk_buff * | skb, | |
| struct net_device * | dev, | |||
| struct netdev_queue * | txq | |||
| ) |
| static int dev_ifconf | ( | struct net * | net, | |
| char __user * | arg | |||
| ) | [static] |
| static int dev_ifname | ( | struct net * | net, | |
| struct ifreq __user * | arg | |||
| ) | [static] |
| static int dev_ifsioc | ( | struct net * | net, | |
| struct ifreq * | ifr, | |||
| unsigned int | cmd | |||
| ) | [static] |
| static int dev_ifsioc_locked | ( | struct net * | net, | |
| struct ifreq * | ifr, | |||
| unsigned int | cmd | |||
| ) | [static] |
| static struct hlist_head* dev_index_hash | ( | struct net * | net, | |
| int | ifindex | |||
| ) | [static, read] |
| int dev_ioctl | ( | struct net * | net, | |
| unsigned int | cmd, | |||
| void __user * | arg | |||
| ) |
dev_ioctl - network device ioctl : the applicable net namespace : command to issue
| static struct hlist_head* dev_name_hash | ( | struct net * | net, | |
| const char * | name | |||
| ) | [static, read] |
| static int dev_new_index | ( | struct net * | net | ) | [static] |
| int dev_open | ( | struct net_device * | dev | ) |
dev_open - prepare an interface for use.
: device to open
Takes a device from down to up state. The device's private open function is invoked and then the multicast lists are loaded. Finally the device is moved into the up state and a NETDEV_UP message is sent to the netdev notifier chain.
Calling this function on an active interface is a nop. On a failure a negative errno code is returned.
| static struct netdev_queue* dev_pick_tx | ( | struct net_device * | dev, | |
| struct sk_buff * | skb | |||
| ) | [static, read] |
| int dev_queue_xmit | ( | struct sk_buff * | skb | ) |
dev_queue_xmit - transmit a buffer : buffer to transmit
Queue a buffer for transmission to a network device. The caller must have set the device and priority and built the buffer before calling this function. The function can be called from an interrupt.
A negative errno code is returned on a failure. A success does not guarantee the frame will be transmitted as it may be dropped due to congestion or traffic shaping.
----------------------------------------------------------------------------------- I notice this method can also return errors from the queue disciplines, including NET_XMIT_DROP, which is a positive value. So, errors can also be positive.
Regardless of the return value, the skb is consumed, so it is currently difficult to retry a send to this method. (You can bump the ref count before sending to hold a reference for retry if you are careful.)
When calling this method, interrupts MUST be enabled. This is because the BH enable code must have IRQs enabled so that it will not deadlock. --BLG
| static void dev_queue_xmit_nit | ( | struct sk_buff * | skb, | |
| struct net_device * | dev | |||
| ) | [static] |
| void dev_remove_pack | ( | struct packet_type * | pt | ) |
dev_remove_pack - remove packet handler : packet type declaration
Remove a protocol handler that was previously added to the kernel protocol handlers by dev_add_pack(). The passed &packet_type is removed from the kernel lists and can be freed or reused once this function returns.
This call sleeps to guarantee that no CPU is looking at the packet type after return.
| int dev_set_alias | ( | struct net_device * | dev, | |
| const char * | alias, | |||
| size_t | len | |||
| ) |
| int dev_set_allmulti | ( | struct net_device * | dev, | |
| int | inc | |||
| ) |
dev_set_allmulti - update allmulti count on a device : device : modifier
Add or remove reception of all multicast frames to a device. While the count in the device remains above zero the interface remains listening to all interfaces. Once it hits zero the device reverts back to normal filtering operation. A negative value is used to drop the counter when releasing a resource needing all multicasts. Return 0 if successful or a negative errno code on error.
| int dev_set_mac_address | ( | struct net_device * | dev, | |
| struct sockaddr * | sa | |||
| ) |
| int dev_set_mtu | ( | struct net_device * | dev, | |
| int | new_mtu | |||
| ) |
| int dev_set_promiscuity | ( | struct net_device * | dev, | |
| int | inc | |||
| ) |
dev_set_promiscuity - update promiscuity count on a device : device : modifier
Add or remove promiscuity from a device. While the count in the device remains above zero the interface remains promiscuous. Once it hits zero the device reverts back to normal filtering operation. A negative inc value is used to drop promiscuity on the device. Return 0 if successful or a negative errno code on error.
| int dev_unicast_add | ( | struct net_device * | dev, | |
| void * | addr, | |||
| int | alen | |||
| ) |
| int dev_unicast_delete | ( | struct net_device * | dev, | |
| void * | addr, | |||
| int | alen | |||
| ) |
| int dev_unicast_sync | ( | struct net_device * | to, | |
| struct net_device * | from | |||
| ) |
dev_unicast_sync - Synchronize device's unicast list to another device : destination device : source device
Add newly added addresses to the destination device and release addresses that have no users left. The source device must be locked by netif_addr_lock_bh.
This function is intended to be called from the dev->set_rx_mode function of layered software devices.
| void dev_unicast_unsync | ( | struct net_device * | to, | |
| struct net_device * | from | |||
| ) |
dev_unicast_unsync - Remove synchronized addresses from the destination device : destination device : source device
Remove all addresses that were added to the destination device by dev_unicast_sync(). This function is intended to be called from the dev->stop function of layered software devices.
| EXPORT_PER_CPU_SYMBOL | ( | softnet_data | ) |
| EXPORT_SYMBOL | ( | dev_get_flags | ) |
| EXPORT_SYMBOL | ( | net_disable_timestamp | ) |
| EXPORT_SYMBOL | ( | net_enable_timestamp | ) |
| EXPORT_SYMBOL | ( | unregister_netdevice_notifier | ) |
| EXPORT_SYMBOL | ( | unregister_netdevice | ) |
| EXPORT_SYMBOL | ( | synchronize_net | ) |
| EXPORT_SYMBOL | ( | skb_checksum_help | ) |
| EXPORT_SYMBOL | ( | register_netdevice_notifier | ) |
| EXPORT_SYMBOL | ( | register_netdevice | ) |
| EXPORT_SYMBOL | ( | register_gifconf | ) |
| EXPORT_SYMBOL | ( | netif_rx | ) |
| EXPORT_SYMBOL | ( | netif_receive_skb | ) |
| EXPORT_SYMBOL | ( | netdev_state_change | ) |
| EXPORT_SYMBOL | ( | netdev_set_master | ) |
| EXPORT_SYMBOL | ( | netdev_boot_setup_check | ) |
| EXPORT_SYMBOL | ( | free_netdev | ) |
| EXPORT_SYMBOL | ( | dev_set_mac_address | ) |
| EXPORT_SYMBOL | ( | dev_set_mtu | ) |
| EXPORT_SYMBOL | ( | dev_change_flags | ) |
| EXPORT_SYMBOL | ( | dev_set_promiscuity | ) |
| EXPORT_SYMBOL | ( | dev_set_allmulti | ) |
| EXPORT_SYMBOL | ( | dev_remove_pack | ) |
| EXPORT_SYMBOL | ( | dev_queue_xmit | ) |
| EXPORT_SYMBOL | ( | dev_open | ) |
| EXPORT_SYMBOL | ( | dev_get_by_name | ) |
| EXPORT_SYMBOL | ( | dev_get_by_index | ) |
| EXPORT_SYMBOL | ( | dev_get_by_flags | ) |
| EXPORT_SYMBOL | ( | dev_close | ) |
| EXPORT_SYMBOL | ( | dev_alloc_name | ) |
| EXPORT_SYMBOL | ( | dev_add_pack | ) |
| EXPORT_SYMBOL | ( | dev_valid_name | ) |
| EXPORT_SYMBOL | ( | __dev_remove_pack | ) |
| EXPORT_SYMBOL | ( | __dev_get_by_name | ) |
| EXPORT_SYMBOL | ( | __dev_get_by_index | ) |
| EXPORT_SYMBOL | ( | netdev_increment_features | ) |
| EXPORT_SYMBOL | ( | unregister_netdev | ) |
| EXPORT_SYMBOL | ( | alloc_netdev_mq | ) |
| EXPORT_SYMBOL | ( | dev_get_stats | ) |
| EXPORT_SYMBOL | ( | register_netdev | ) |
| EXPORT_SYMBOL | ( | netdev_resync_ops | ) |
| EXPORT_SYMBOL | ( | netdev_fix_features | ) |
| EXPORT_SYMBOL | ( | dev_unicast_unsync | ) |
| EXPORT_SYMBOL | ( | dev_unicast_sync | ) |
| EXPORT_SYMBOL | ( | dev_unicast_add | ) |
| EXPORT_SYMBOL | ( | dev_unicast_delete | ) |
| EXPORT_SYMBOL | ( | netif_napi_del | ) |
| EXPORT_SYMBOL | ( | netif_napi_add | ) |
| EXPORT_SYMBOL | ( | napi_complete | ) |
| EXPORT_SYMBOL | ( | __napi_complete | ) |
| EXPORT_SYMBOL | ( | __napi_schedule | ) |
| EXPORT_SYMBOL | ( | napi_gro_frags | ) |
| EXPORT_SYMBOL | ( | napi_fraginfo_skb | ) |
| EXPORT_SYMBOL | ( | napi_reuse_skb | ) |
| EXPORT_SYMBOL | ( | napi_gro_receive | ) |
| EXPORT_SYMBOL | ( | dev_gro_receive | ) |
| EXPORT_SYMBOL | ( | napi_gro_flush | ) |
| EXPORT_SYMBOL | ( | netif_rx_ni | ) |
| EXPORT_SYMBOL | ( | skb_gso_segment | ) |
| EXPORT_SYMBOL | ( | netif_device_attach | ) |
| EXPORT_SYMBOL | ( | netif_device_detach | ) |
| EXPORT_SYMBOL | ( | dev_kfree_skb_any | ) |
| EXPORT_SYMBOL | ( | dev_kfree_skb_irq | ) |
| EXPORT_SYMBOL | ( | __netif_schedule | ) |
| EXPORT_SYMBOL | ( | dev_disable_lro | ) |
| EXPORT_SYMBOL | ( | netdev_bonding_change | ) |
| EXPORT_SYMBOL | ( | netdev_features_change | ) |
| EXPORT_SYMBOL | ( | dev_getfirstbyhwtype | ) |
| EXPORT_SYMBOL | ( | __dev_getfirstbyhwtype | ) |
| EXPORT_SYMBOL | ( | dev_getbyhwaddr | ) |
| EXPORT_SYMBOL | ( | dev_base_lock | ) |
| EXPORT_SYMBOL_GPL | ( | init_dummy_netdev | ) |
| void free_netdev | ( | struct net_device * | dev | ) |
| static int illegal_highdma | ( | struct net_device * | dev, | |
| struct sk_buff * | skb | |||
| ) | [inline, static] |
| int init_dummy_netdev | ( | struct net_device * | dev | ) |
init_dummy_netdev - init a dummy network device for NAPI : device to init
This takes a network device structure and initialize the minimum amount of fields so it can be used to schedule NAPI polls without registering a full blown interface. This is to be used by drivers that need to tie several hardware interfaces to a single NAPI poll scheduler due to HW limitations.
| static LIST_HEAD | ( | net_todo_list | ) | [static] |
| static int list_netdevice | ( | struct net_device * | dev | ) | [static] |
| struct sk_buff* napi_fraginfo_skb | ( | struct napi_struct * | napi, | |
| struct napi_gro_fraginfo * | info | |||
| ) | [read] |
| static int napi_gro_complete | ( | struct sk_buff * | skb | ) | [static] |
| int napi_gro_frags | ( | struct napi_struct * | napi, | |
| struct napi_gro_fraginfo * | info | |||
| ) |
| int napi_gro_receive | ( | struct napi_struct * | napi, | |
| struct sk_buff * | skb | |||
| ) |
| void napi_reuse_skb | ( | struct napi_struct * | napi, | |
| struct sk_buff * | skb | |||
| ) |
| static void net_rx_action | ( | struct softirq_action * | h | ) | [static] |
| static void net_set_todo | ( | struct net_device * | dev | ) | [static] |
| static void net_timestamp | ( | struct sk_buff * | skb | ) | [inline, static] |
| static void net_tx_action | ( | struct softirq_action * | h | ) | [static] |
| unsigned long netdev_boot_base | ( | const char * | prefix, | |
| int | unit | |||
| ) |
| static int netdev_boot_setup_add | ( | char * | name, | |
| struct ifmap * | map | |||
| ) | [static] |
| int netdev_boot_setup_check | ( | struct net_device * | dev | ) |
| static struct hlist_head* netdev_create_hash | ( | void | ) | [static, read] |
| char* netdev_drivername | ( | const struct net_device * | dev, | |
| char * | buffer, | |||
| int | len | |||
| ) |
| static void __net_exit netdev_exit | ( | struct net * | net | ) | [static] |
| void netdev_features_change | ( | struct net_device * | dev | ) |
| unsigned long netdev_fix_features | ( | unsigned long | features, | |
| const char * | name | |||
| ) |
| unsigned long netdev_increment_features | ( | unsigned long | all, | |
| unsigned long | one, | |||
| unsigned long | mask | |||
| ) |
netdev_increment_features - increment feature set by one : current feature set : new feature set : mask feature set
Computes a new feature set after adding a device with feature set to the master device with current feature set . Will not enable anything that is off in . Returns the new feature set.
| static int __net_init netdev_init | ( | struct net * | net | ) | [static] |
| static void netdev_init_one_queue | ( | struct net_device * | dev, | |
| struct netdev_queue * | queue, | |||
| void * | _unused | |||
| ) | [static] |
| static void netdev_init_queue_locks | ( | struct net_device * | dev | ) | [static] |
| static void netdev_init_queues | ( | struct net_device * | dev | ) | [static] |
| static void netdev_set_addr_lockdep_class | ( | struct net_device * | dev | ) | [inline, static] |
| int netdev_set_master | ( | struct net_device * | slave, | |
| struct net_device * | master | |||
| ) |
netdev_set_master - set up master/slave pair : slave device : new master device
Changes the master device of the slave. Pass NULL to break the bonding. The caller must hold the RTNL semaphore. On a failure a negative errno code is returned. On success the reference counts are adjusted, RTM_NEWLINK is sent to the routing socket and the function returns zero.
| static void netdev_set_xmit_lockdep_class | ( | spinlock_t * | lock, | |
| unsigned short | dev_type | |||
| ) | [inline, static] |
| void netdev_state_change | ( | struct net_device * | dev | ) |
| static void netdev_wait_allrefs | ( | struct net_device * | dev | ) | [static] |
| void netif_device_attach | ( | struct net_device * | dev | ) |
| void netif_device_detach | ( | struct net_device * | dev | ) |
| void netif_napi_add | ( | struct net_device * | dev, | |
| struct napi_struct * | napi, | |||
| int(*)(struct napi_struct *, int) | poll, | |||
| int | weight | |||
| ) |
| int netif_receive_skb | ( | struct sk_buff * | skb | ) |
netif_receive_skb - process receive buffer from network : buffer to process
netif_receive_skb() is the main receive data processing function. It always succeeds. The buffer may be dropped during processing for congestion control or by the protocol layers.
This function may only be called from softirq context and interrupts should be enabled.
Return values (usually ignored): NET_RX_SUCCESS: no congestion NET_RX_DROP: packet was dropped
| int netif_rx | ( | struct sk_buff * | skb | ) |
netif_rx - post buffer to the network code : buffer to post
This function receives a packet from a device driver and queues it for the upper (protocol) levels to process. It always succeeds. The buffer may be dropped during processing for congestion control or by the protocol layers.
return values: NET_RX_SUCCESS (no congestion) NET_RX_DROP (packet was dropped)
| static int process_backlog | ( | struct napi_struct * | napi, | |
| int | quota | |||
| ) | [static] |
| static RAW_NOTIFIER_HEAD | ( | netdev_chain | ) | [static] |
| int register_gifconf | ( | unsigned int | family, | |
| gifconf_func_t * | gifconf | |||
| ) |
| int register_netdev | ( | struct net_device * | dev | ) |
register_netdev - register a network device : device to register
Take a completed network device structure and add it to the kernel interfaces. A NETDEV_REGISTER message is sent to the netdev notifier chain. 0 is returned on success. A negative errno code is returned on a failure to set up the device, or if the name is a duplicate.
This is a wrapper around register_netdevice that takes the rtnl semaphore and expands the device name if you passed a format string to alloc_netdev.
| int register_netdevice | ( | struct net_device * | dev | ) |
register_netdevice - register a network device : device to register
Take a completed network device structure and add it to the kernel interfaces. A NETDEV_REGISTER message is sent to the netdev notifier chain. 0 is returned on success. A negative errno code is returned on a failure to set up the device, or if the name is a duplicate.
Callers must hold the rtnl semaphore. You may want register_netdev() instead of this.
BUGS: The locking appears insufficient to guarantee two parallel registers will not get the same name.
| int register_netdevice_notifier | ( | struct notifier_block * | nb | ) |
register_netdevice_notifier - register a network notifier block : notifier
Register a notifier to be called when network device events occur. The notifier passed is linked into the kernel structures and must not be reused until it has been unregistered. A negative errno code is returned on a failure.
When registered all registration and up events are replayed to the new notifier to allow device to have a race free view of the network device list.
| static void rollback_registered | ( | struct net_device * | dev | ) | [static] |
| static u16 simple_tx_hash | ( | struct net_device * | dev, | |
| struct sk_buff * | skb | |||
| ) | [static] |
| struct sk_buff* skb_gso_segment | ( | struct sk_buff * | skb, | |
| int | features | |||
| ) | [read] |
skb_gso_segment - Perform segmentation on skb.
: buffer to segment : features for the output path (see dev->features)
This function segments the given skb and returns a list of segments.
It may return NULL if the skb requires no segmentation. This is only possible when GSO is used for verifying header integrity.
| subsys_initcall | ( | net_dev_init | ) |
| void synchronize_net | ( | void | ) |
| static void unlist_netdevice | ( | struct net_device * | dev | ) | [static] |
| void unregister_netdev | ( | struct net_device * | dev | ) |
| void unregister_netdevice | ( | struct net_device * | dev | ) |
| int unregister_netdevice_notifier | ( | struct notifier_block * | nb | ) |
unregister_netdevice_notifier - unregister a network notifier block : notifier
Unregister a notifier previously registered by register_netdevice_notifier(). The notifier is unlinked into the kernel structures and may then be reused. A negative errno code is returned on a failure.
int weight_p __read_mostly = 1000 [static, read] |
struct pernet_operations __net_initdata default_device_ops [static] |
int dev_boot_phase = 1 [static] |
struct netdev_boot_setup dev_boot_setup[NETDEV_BOOT_SETUP_MAX] [static] |
gifconf_func_t* gifconf_list[NPROTO] [static] |
struct pernet_operations __net_initdata netdev_net_ops [static] |
atomic_t netstamp_needed = ATOMIC_INIT(0) [static] |
u32 simple_tx_hashrnd [static] |
int simple_tx_hashrnd_initialized = 0 [static] |
1.5.6