aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_macvlan.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-01-30 07:24:26 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-03 23:20:33 -0500
commit20d29d7a916a47bf533b5709437fe735b6b5b79e (patch)
tree8dbe4178b90915a18e83f97a3e71cdcd39892da1 /include/linux/if_macvlan.h
parentfc0663d6b5e6d8e9b57f872a644c0aafd82361b7 (diff)
net: macvtap driver
In order to use macvlan with qemu and other tools that require a tap file descriptor, the macvtap driver adds a small backend with a character device with the same interface as the tun driver, with a minimum set of features. Macvtap interfaces are created in the same way as macvlan interfaces using ip link, but the netif is just used as a handle for configuration and accounting, while the data goes through the chardev. Each macvtap interface has its own character device, simplifying permission management significantly over the generic tun/tap driver. Cc: Patrick McHardy <kaber@trash.net> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: David S. Miller" <davem@davemloft.net> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Or Gerlitz <ogerlitz@voltaire.com> Cc: netdev@vger.kernel.org Cc: bridge@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_macvlan.h')
-rw-r--r--include/linux/if_macvlan.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
index 9a11544bb0b1..51f1512045e9 100644
--- a/include/linux/if_macvlan.h
+++ b/include/linux/if_macvlan.h
@@ -34,6 +34,7 @@ struct macvlan_dev {
34 enum macvlan_mode mode; 34 enum macvlan_mode mode;
35 int (*receive)(struct sk_buff *skb); 35 int (*receive)(struct sk_buff *skb);
36 int (*forward)(struct net_device *dev, struct sk_buff *skb); 36 int (*forward)(struct net_device *dev, struct sk_buff *skb);
37 struct macvtap_queue *tap;
37}; 38};
38 39
39static inline void macvlan_count_rx(const struct macvlan_dev *vlan, 40static inline void macvlan_count_rx(const struct macvlan_dev *vlan,