|
| DEFINE_RWLOCK (dev_base_lock) |
|
| EXPORT_SYMBOL (dev_base_lock) |
|
| DEFINE_PER_CPU_ALIGNED (struct softnet_data, softnet_data) |
|
| EXPORT_PER_CPU_SYMBOL (softnet_data) |
|
void | dev_add_pack (struct packet_type *pt) |
|
| EXPORT_SYMBOL (dev_add_pack) |
|
void | __dev_remove_pack (struct packet_type *pt) |
|
| EXPORT_SYMBOL (__dev_remove_pack) |
|
void | dev_remove_pack (struct packet_type *pt) |
|
| EXPORT_SYMBOL (dev_remove_pack) |
|
|
netdev_boot_setup_add - add new setup entry
: configured settings for the device
Adds new setup entry to the dev_boot_setup list. The function returns 0 on error and 1 on success. This is a generic routine to all netdevices.
|
int | netdev_boot_setup_check (struct net_device *dev) |
|
| EXPORT_SYMBOL (netdev_boot_setup_check) |
|
unsigned long | netdev_boot_base (const char *prefix, int unit) |
|
int __init | netdev_boot_setup (char *str) |
|
| __setup ("netdev=", netdev_boot_setup) |
|
|
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) |
|
| EXPORT_SYMBOL (__dev_get_by_name) |
|
struct net_device * | dev_get_by_name_rcu (struct net *net, const char *name) |
|
| EXPORT_SYMBOL (dev_get_by_name_rcu) |
|
struct net_device * | dev_get_by_name (struct net *net, const char *name) |
|
| EXPORT_SYMBOL (dev_get_by_name) |
|
struct net_device * | __dev_get_by_index (struct net *net, int ifindex) |
|
| EXPORT_SYMBOL (__dev_get_by_index) |
|
struct net_device * | dev_get_by_index_rcu (struct net *net, int ifindex) |
|
| EXPORT_SYMBOL (dev_get_by_index_rcu) |
|
struct net_device * | dev_get_by_index (struct net *net, int ifindex) |
|
| EXPORT_SYMBOL (dev_get_by_index) |
|
struct net_device * | dev_getbyhwaddr_rcu (struct net *net, unsigned short type, const char *ha) |
|
| EXPORT_SYMBOL (dev_getbyhwaddr_rcu) |
|
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_rcu (struct net *net, unsigned short if_flags, unsigned short mask) |
|
| EXPORT_SYMBOL (dev_get_by_flags_rcu) |
|
|
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.
|
bool | dev_valid_name (const char *name) |
|
| EXPORT_SYMBOL (dev_valid_name) |
|
|
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) |
|
| EXPORT_SYMBOL (dev_alloc_name) |
|
int | dev_change_name (struct net_device *dev, const char *newname) |
|
int | dev_set_alias (struct net_device *dev, const char *alias, size_t len) |
|
void | netdev_features_change (struct net_device *dev) |
|
| EXPORT_SYMBOL (netdev_features_change) |
|
void | netdev_state_change (struct net_device *dev) |
|
| EXPORT_SYMBOL (netdev_state_change) |
|
void | netdev_notify_peers (struct net_device *dev) |
|
| EXPORT_SYMBOL (netdev_notify_peers) |
|
|
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 | net_timestamp_check(COND, SKB) |
|
#define | DEV_GSO_CB(skb) ((struct dev_gso_cb *)(skb)->cb) |
|
#define | skb_update_prio(skb) |
|
#define | RECURSION_LIMIT 10 |
|
#define | dev_proc_init() 0 |
|
void | dev_load (struct net *net, const char *name) |
|
| EXPORT_SYMBOL (dev_load) |
|
int | dev_open (struct net_device *dev) |
|
| EXPORT_SYMBOL (dev_open) |
|
int | dev_close (struct net_device *dev) |
|
| EXPORT_SYMBOL (dev_close) |
|
void | dev_disable_lro (struct net_device *dev) |
|
| EXPORT_SYMBOL (dev_disable_lro) |
|
int | register_netdevice_notifier (struct notifier_block *nb) |
|
| EXPORT_SYMBOL (register_netdevice_notifier) |
|
int | unregister_netdevice_notifier (struct notifier_block *nb) |
|
| EXPORT_SYMBOL (unregister_netdevice_notifier) |
|
int | call_netdevice_notifiers (unsigned long val, struct net_device *dev) |
|
| EXPORT_SYMBOL (call_netdevice_notifiers) |
|
void | net_enable_timestamp (void) |
|
| EXPORT_SYMBOL (net_enable_timestamp) |
|
void | net_disable_timestamp (void) |
|
| EXPORT_SYMBOL (net_disable_timestamp) |
|
int | dev_forward_skb (struct net_device *dev, struct sk_buff *skb) |
|
| EXPORT_SYMBOL_GPL (dev_forward_skb) |
|
int | netif_set_real_num_tx_queues (struct net_device *dev, unsigned int txq) |
|
| EXPORT_SYMBOL (netif_set_real_num_tx_queues) |
|
int | netif_get_num_default_rss_queues (void) |
|
| EXPORT_SYMBOL (netif_get_num_default_rss_queues) |
|
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) |
|
| EXPORT_SYMBOL (netif_device_detach) |
|
void | netif_device_attach (struct net_device *dev) |
|
| EXPORT_SYMBOL (netif_device_attach) |
|
int | skb_checksum_help (struct sk_buff *skb) |
|
| EXPORT_SYMBOL (skb_checksum_help) |
|
struct sk_buff * | skb_gso_segment (struct sk_buff *skb, netdev_features_t features) |
|
| EXPORT_SYMBOL (skb_gso_segment) |
|
netdev_features_t | netif_skb_features (struct sk_buff *skb) |
|
| EXPORT_SYMBOL (netif_skb_features) |
|
int | dev_hard_start_xmit (struct sk_buff *skb, struct net_device *dev, struct netdev_queue *txq) |
|
u16 | __skb_tx_hash (const struct net_device *dev, const struct sk_buff *skb, unsigned int num_tx_queues) |
|
| EXPORT_SYMBOL (__skb_tx_hash) |
|
struct netdev_queue * | netdev_pick_tx (struct net_device *dev, struct sk_buff *skb) |
|
int | dev_loopback_xmit (struct sk_buff *skb) |
|
| EXPORT_SYMBOL (dev_loopback_xmit) |
|
int | dev_queue_xmit (struct sk_buff *skb) |
|
| EXPORT_SYMBOL (dev_queue_xmit) |
|
| EXPORT_SYMBOL (netdev_max_backlog) |
|
void | __skb_get_rxhash (struct sk_buff *skb) |
|
| EXPORT_SYMBOL (__skb_get_rxhash) |
|
int | netif_rx (struct sk_buff *skb) |
|
| EXPORT_SYMBOL (netif_rx) |
|
int | netif_rx_ni (struct sk_buff *skb) |
|
| EXPORT_SYMBOL (netif_rx_ni) |
|
int | netdev_rx_handler_register (struct net_device *dev, rx_handler_func_t *rx_handler, void *rx_handler_data) |
|
| EXPORT_SYMBOL_GPL (netdev_rx_handler_register) |
|
void | netdev_rx_handler_unregister (struct net_device *dev) |
|
| EXPORT_SYMBOL_GPL (netdev_rx_handler_unregister) |
|
int | netif_receive_skb (struct sk_buff *skb) |
|
| EXPORT_SYMBOL (netif_receive_skb) |
|
void | napi_gro_flush (struct napi_struct *napi, bool flush_old) |
|
| EXPORT_SYMBOL (napi_gro_flush) |
|
enum gro_result | dev_gro_receive (struct napi_struct *napi, struct sk_buff *skb) |
|
| EXPORT_SYMBOL (dev_gro_receive) |
|
gro_result_t | napi_skb_finish (gro_result_t ret, struct sk_buff *skb) |
|
| EXPORT_SYMBOL (napi_skb_finish) |
|
gro_result_t | napi_gro_receive (struct napi_struct *napi, struct sk_buff *skb) |
|
| EXPORT_SYMBOL (napi_gro_receive) |
|
struct sk_buff * | napi_get_frags (struct napi_struct *napi) |
|
| EXPORT_SYMBOL (napi_get_frags) |
|
gro_result_t | napi_frags_finish (struct napi_struct *napi, struct sk_buff *skb, gro_result_t ret) |
|
| EXPORT_SYMBOL (napi_frags_finish) |
|
gro_result_t | napi_gro_frags (struct napi_struct *napi) |
|
| EXPORT_SYMBOL (napi_gro_frags) |
|
void | __napi_schedule (struct napi_struct *n) |
|
| 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) |
|
int | register_gifconf (unsigned int family, gifconf_func_t *gifconf) |
|
| EXPORT_SYMBOL (register_gifconf) |
|
int | netdev_set_master (struct net_device *slave, struct net_device *master) |
|
| EXPORT_SYMBOL (netdev_set_master) |
|
int | netdev_set_bond_master (struct net_device *slave, struct net_device *master) |
|
| EXPORT_SYMBOL (netdev_set_bond_master) |
|
int | dev_set_promiscuity (struct net_device *dev, int inc) |
|
| EXPORT_SYMBOL (dev_set_promiscuity) |
|
int | dev_set_allmulti (struct net_device *dev, int inc) |
|
| EXPORT_SYMBOL (dev_set_allmulti) |
|
void | __dev_set_rx_mode (struct net_device *dev) |
|
void | dev_set_rx_mode (struct net_device *dev) |
|
unsigned int | dev_get_flags (const struct net_device *dev) |
|
| EXPORT_SYMBOL (dev_get_flags) |
|
int | __dev_change_flags (struct net_device *dev, unsigned int flags) |
|
void | __dev_notify_flags (struct net_device *dev, unsigned int old_flags) |
|
int | dev_change_flags (struct net_device *dev, unsigned int flags) |
|
| EXPORT_SYMBOL (dev_change_flags) |
|
int | dev_set_mtu (struct net_device *dev, int new_mtu) |
|
| EXPORT_SYMBOL (dev_set_mtu) |
|
void | dev_set_group (struct net_device *dev, int new_group) |
|
| EXPORT_SYMBOL (dev_set_group) |
|
int | dev_set_mac_address (struct net_device *dev, struct sockaddr *sa) |
|
| EXPORT_SYMBOL (dev_set_mac_address) |
|
int | dev_ioctl (struct net *net, unsigned int cmd, void __user *arg) |
|
int | __netdev_update_features (struct net_device *dev) |
|
void | netdev_update_features (struct net_device *dev) |
|
| EXPORT_SYMBOL (netdev_update_features) |
|
void | netdev_change_features (struct net_device *dev) |
|
| EXPORT_SYMBOL (netdev_change_features) |
|
void | netif_stacked_transfer_operstate (const struct net_device *rootdev, struct net_device *dev) |
|
| EXPORT_SYMBOL (netif_stacked_transfer_operstate) |
|
int | register_netdevice (struct net_device *dev) |
|
| EXPORT_SYMBOL (register_netdevice) |
|
int | init_dummy_netdev (struct net_device *dev) |
|
| EXPORT_SYMBOL_GPL (init_dummy_netdev) |
|
int | register_netdev (struct net_device *dev) |
|
| EXPORT_SYMBOL (register_netdev) |
|
int | netdev_refcnt_read (const struct net_device *dev) |
|
| EXPORT_SYMBOL (netdev_refcnt_read) |
|
void | netdev_run_todo (void) |
|
void | netdev_stats_to_stats64 (struct rtnl_link_stats64 *stats64, const struct net_device_stats *netdev_stats) |
|
| EXPORT_SYMBOL (netdev_stats_to_stats64) |
|
struct rtnl_link_stats64 * | dev_get_stats (struct net_device *dev, struct rtnl_link_stats64 *storage) |
|
| EXPORT_SYMBOL (dev_get_stats) |
|
struct netdev_queue * | dev_ingress_queue_create (struct net_device *dev) |
|
|
alloc_netdev_mqs - allocate network device : size of private data to allocate space for
: callback to initialize device : the number of TX subqueues to allocate : the number of RX 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.
|
#define | define_netdev_printk_level(func, level) |
|
struct net_device * | alloc_netdev_mqs (int sizeof_priv, const char *name, void(*setup)(struct net_device *), unsigned int txqs, unsigned int rxqs) |
|
| EXPORT_SYMBOL (alloc_netdev_mqs) |
|
void | free_netdev (struct net_device *dev) |
|
| EXPORT_SYMBOL (free_netdev) |
|
void | synchronize_net (void) |
|
| EXPORT_SYMBOL (synchronize_net) |
|
void | unregister_netdevice_queue (struct net_device *dev, struct list_head *head) |
|
| EXPORT_SYMBOL (unregister_netdevice_queue) |
|
void | unregister_netdevice_many (struct list_head *head) |
|
| EXPORT_SYMBOL (unregister_netdevice_many) |
|
void | unregister_netdev (struct net_device *dev) |
|
| EXPORT_SYMBOL (unregister_netdev) |
|
int | dev_change_net_namespace (struct net_device *dev, struct net *net, const char *pat) |
|
| EXPORT_SYMBOL_GPL (dev_change_net_namespace) |
|
netdev_features_t | netdev_increment_features (netdev_features_t all, netdev_features_t one, netdev_features_t mask) |
|
| EXPORT_SYMBOL (netdev_increment_features) |
|
const char * | netdev_drivername (const struct net_device *dev) |
|
int | netdev_printk (const char *level, const struct net_device *dev, const char *format,...) |
|
| EXPORT_SYMBOL (netdev_printk) |
|
| define_netdev_printk_level (netdev_emerg, KERN_EMERG) |
|
| define_netdev_printk_level (netdev_alert, KERN_ALERT) |
|
| define_netdev_printk_level (netdev_crit, KERN_CRIT) |
|
| define_netdev_printk_level (netdev_err, KERN_ERR) |
|
| define_netdev_printk_level (netdev_warn, KERN_WARNING) |
|
| define_netdev_printk_level (netdev_notice, KERN_NOTICE) |
|
| define_netdev_printk_level (netdev_info, KERN_INFO) |
|
| subsys_initcall (net_dev_init) |
|
| late_initcall_sync (initialize_hashrnd) |
|
__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.
Definition at line 433 of file dev.c.
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.
Definition at line 6259 of file dev.c.
dev_forward_skb - loopback an skb to another netif
: destination network device : buffer to forward
return values: NET_RX_SUCCESS (no congestion) NET_RX_DROP (packet was dropped, but freed)
dev_forward_skb can be used for injecting an skb from the start_xmit function of one device into the receive queue of another device.
The receiving device may be in another namespace, so we have to clear all information in the skb that could impact namespace isolation.
Definition at line 1626 of file dev.c.
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.
Definition at line 1220 of file dev.c.
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
Definition at line 2561 of file dev.c.
netdev_rx_handler_register - register receive handler : device to register a handler for : receive handler to register : data pointer that is used by rx handler
Register a receive hander for a device. This handler will then be called from __netif_receive_skb. A negative errno code is returned on a failure.
The caller must hold the rtnl_mutex.
For a general description of rx_handler, see enum rx_handler_result.
Definition at line 3173 of file dev.c.
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
Definition at line 3391 of file dev.c.
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.
Definition at line 5788 of file dev.c.
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.
Definition at line 5621 of file dev.c.
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.
Definition at line 1378 of file dev.c.