blob: a2dfd9063a6c3bb2cfe1e47dd044495a8fab872a [file] [log] [blame]
Sainath Grandhi635b8c82017-02-10 16:03:47 -08001#ifndef _LINUX_IF_TAP_H_
2#define _LINUX_IF_TAP_H_
3
4#if IS_ENABLED(CONFIG_MACVTAP)
5struct socket *tap_get_socket(struct file *);
6#else
7#include <linux/err.h>
8#include <linux/errno.h>
9struct file;
10struct socket;
11static inline struct socket *tap_get_socket(struct file *f)
12{
13 return ERR_PTR(-EINVAL);
14}
15#endif /* CONFIG_MACVTAP */
16
17rx_handler_result_t tap_handle_frame(struct sk_buff **pskb);
18void tap_del_queues(struct net_device *dev);
19int tap_get_minor(struct macvlan_dev *vlan);
20void tap_free_minor(struct macvlan_dev *vlan);
21int tap_queue_resize(struct macvlan_dev *vlan);
Sainath Grandhiebc05ba2017-02-10 16:03:48 -080022int tap_create_cdev(struct cdev *tap_cdev,
23 dev_t *tap_major, const char *device_name);
24void tap_destroy_cdev(dev_t major, struct cdev *tap_cdev);
Sainath Grandhi635b8c82017-02-10 16:03:47 -080025
26#endif /*_LINUX_IF_TAP_H_*/