Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville...
[safe/jmp/linux-2.6] / include / linux / if_tun.h
index 915ba57..404abe0 100644 (file)
@@ -62,6 +62,7 @@
 #define TUN_F_TSO4     0x02    /* I can handle TSO for IPv4 packets */
 #define TUN_F_TSO6     0x04    /* I can handle TSO for IPv6 packets */
 #define TUN_F_TSO_ECN  0x08    /* I can handle TSO with ECN bits. */
+#define TUN_F_UFO      0x10    /* I can handle UFO packets */
 
 /* Protocol info prepended to the packets (when IFF_NO_PI is not set) */
 #define TUN_PKT_STRIP  0x0001
@@ -85,4 +86,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 */