diff options
Diffstat (limited to 'include/linux/if_tun.h')
-rw-r--r-- | include/linux/if_tun.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 3f5fd523b49d..1350a246893a 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h @@ -18,6 +18,7 @@ #include <linux/types.h> #include <linux/if_ether.h> +#include <linux/filter.h> /* Read queue size */ #define TUN_READQ_SIZE 500 @@ -48,6 +49,8 @@ #define TUNGETIFF _IOR('T', 210, unsigned int) #define TUNGETSNDBUF _IOR('T', 211, int) #define TUNSETSNDBUF _IOW('T', 212, int) +#define TUNATTACHFILTER _IOW('T', 213, struct sock_fprog) +#define TUNDETACHFILTER _IOW('T', 214, struct sock_fprog) /* TUNSETIFF ifr flags */ #define IFF_TUN 0x0001 @@ -86,4 +89,18 @@ struct tun_filter { __u8 addr[0][ETH_ALEN]; }; +#ifdef __KERNEL__ +#if defined(CONFIG_TUN) || defined(CONFIG_TUN_MODULE) +struct socket *tun_get_socket(struct file *); +#else +#include <linux/err.h> +#include <linux/errno.h> +struct file; +struct socket; +static inline struct socket *tun_get_socket(struct file *f) +{ + return ERR_PTR(-EINVAL); +} +#endif /* CONFIG_TUN */ +#endif /* __KERNEL__ */ #endif /* __IF_TUN_H */ |