Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
macvlan.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/rculist.h>
#include <linux/notifier.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/if_arp.h>
#include <linux/if_vlan.h>
#include <linux/if_link.h>
#include <linux/if_macvlan.h>
#include <net/rtnetlink.h>
#include <net/xfrm.h>

Go to the source code of this file.

Data Structures

struct  macvlan_port
 

Macros

#define MACVLAN_HASH_SIZE   (1 << BITS_PER_BYTE)
 
#define macvlan_port_get_rcu(dev)   ((struct macvlan_port *) rcu_dereference(dev->rx_handler_data))
 
#define macvlan_port_get(dev)   ((struct macvlan_port *) dev->rx_handler_data)
 
#define macvlan_port_exists(dev)   (dev->priv_flags & IFF_MACVLAN_PORT)
 
#define MACVLAN_FEATURES
 
#define MACVLAN_STATE_MASK   ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT))
 

Functions

netdev_tx_t macvlan_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
 EXPORT_SYMBOL_GPL (macvlan_start_xmit)
 
void macvlan_common_setup (struct net_device *dev)
 
 EXPORT_SYMBOL_GPL (macvlan_common_setup)
 
int macvlan_common_newlink (struct net *src_net, struct net_device *dev, struct nlattr *tb[], struct nlattr *data[], int(*receive)(struct sk_buff *skb), int(*forward)(struct net_device *dev, struct sk_buff *skb))
 
 EXPORT_SYMBOL_GPL (macvlan_common_newlink)
 
void macvlan_dellink (struct net_device *dev, struct list_head *head)
 
 EXPORT_SYMBOL_GPL (macvlan_dellink)
 
int macvlan_link_register (struct rtnl_link_ops *ops)
 
 EXPORT_SYMBOL_GPL (macvlan_link_register)
 
 module_init (macvlan_init_module)
 
 module_exit (macvlan_cleanup_module)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Patrick McHardy <[email protected]>")
 
 MODULE_DESCRIPTION ("Driver for MAC address based VLANs")
 
 MODULE_ALIAS_RTNL_LINK ("macvlan")
 

Macro Definition Documentation

#define MACVLAN_FEATURES
Value:
NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_GRO | NETIF_F_RXCSUM | \
NETIF_F_HW_VLAN_FILTER)

Definition at line 431 of file macvlan.c.

#define MACVLAN_HASH_SIZE   (1 << BITS_PER_BYTE)

Definition at line 35 of file macvlan.c.

#define macvlan_port_exists (   dev)    (dev->priv_flags & IFF_MACVLAN_PORT)

Definition at line 51 of file macvlan.c.

#define macvlan_port_get (   dev)    ((struct macvlan_port *) dev->rx_handler_data)

Definition at line 50 of file macvlan.c.

#define macvlan_port_get_rcu (   dev)    ((struct macvlan_port *) rcu_dereference(dev->rx_handler_data))

Definition at line 48 of file macvlan.c.

#define MACVLAN_STATE_MASK   ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT))

Definition at line 437 of file macvlan.c.

Function Documentation

EXPORT_SYMBOL_GPL ( macvlan_start_xmit  )
EXPORT_SYMBOL_GPL ( macvlan_common_setup  )
EXPORT_SYMBOL_GPL ( macvlan_common_newlink  )
EXPORT_SYMBOL_GPL ( macvlan_dellink  )
EXPORT_SYMBOL_GPL ( macvlan_link_register  )
int macvlan_common_newlink ( struct net src_net,
struct net_device dev,
struct nlattr tb[],
struct nlattr data[],
int(*)(struct sk_buff *skb receive,
int(*)(struct net_device *dev, struct sk_buff *skb forward 
)

Definition at line 703 of file macvlan.c.

void macvlan_common_setup ( struct net_device dev)

Definition at line 626 of file macvlan.c.

void macvlan_dellink ( struct net_device dev,
struct list_head head 
)

Definition at line 795 of file macvlan.c.

int macvlan_link_register ( struct rtnl_link_ops ops)

Definition at line 848 of file macvlan.c.

netdev_tx_t macvlan_start_xmit ( struct sk_buff skb,
struct net_device dev 
)

Definition at line 265 of file macvlan.c.

MODULE_ALIAS_RTNL_LINK ( "macvlan"  )
MODULE_AUTHOR ( "Patrick McHardy <[email protected]>"  )
MODULE_DESCRIPTION ( "Driver for MAC address based VLANs"  )
module_exit ( macvlan_cleanup_module  )
module_init ( macvlan_init_module  )
MODULE_LICENSE ( "GPL"  )