#include <linux/etherdevice.h>
#include <linux/if_macvlan.h>
#include <linux/if_tap.h>
#include <linux/if_vlan.h>
#include <linux/interrupt.h>
#include <linux/nsproxy.h>
#include <linux/compat.h>
#include <linux/if_tun.h>
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/cache.h>
#include <linux/sched/signal.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/wait.h>
#include <linux/cdev.h>
#include <linux/idr.h>
#include <linux/fs.h>
#include <linux/uio.h>
#include <net/net_namespace.h>
#include <net/rtnetlink.h>
#include <net/sock.h>
#include <linux/virtio_net.h>
#include <linux/skb_array.h>
struct macvtap_dev { … };
static dev_t macvtap_major;
static const void *macvtap_net_namespace(const struct device *d)
{ … }
static struct class macvtap_class = …;
static struct cdev macvtap_cdev;
#define TUN_OFFLOADS …
static void macvtap_count_tx_dropped(struct tap_dev *tap)
{ … }
static void macvtap_count_rx_dropped(struct tap_dev *tap)
{ … }
static void macvtap_update_features(struct tap_dev *tap,
netdev_features_t features)
{ … }
static int macvtap_newlink(struct net *src_net, struct net_device *dev,
struct nlattr *tb[], struct nlattr *data[],
struct netlink_ext_ack *extack)
{ … }
static void macvtap_dellink(struct net_device *dev,
struct list_head *head)
{ … }
static void macvtap_setup(struct net_device *dev)
{ … }
static struct net *macvtap_link_net(const struct net_device *dev)
{ … }
static struct rtnl_link_ops macvtap_link_ops __read_mostly = …;
static int macvtap_device_event(struct notifier_block *unused,
unsigned long event, void *ptr)
{ … }
static struct notifier_block macvtap_notifier_block __read_mostly = …;
static int __init macvtap_init(void)
{ … }
module_init(…) …;
static void __exit macvtap_exit(void)
{ … }
module_exit(macvtap_exit);
MODULE_ALIAS_RTNL_LINK(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;