1 #ifndef __NET_IP_TUNNELS_WRAPPER_H
2 #define __NET_IP_TUNNELS_WRAPPER_H 1
4 #include <linux/version.h>
5 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
6 #include_next <net/ip_tunnels.h>
8 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
9 static inline int rpl_iptunnel_xmit(struct sock *sk, struct rtable *rt,
10 struct sk_buff *skb, __be32 src,
11 __be32 dst, __u8 proto, __u8 tos,
12 __u8 ttl, __be16 df, bool xnet)
14 return iptunnel_xmit(rt, skb, src, dst, proto, tos, ttl, df, xnet);
16 #define iptunnel_xmit rpl_iptunnel_xmit
21 #include <linux/if_tunnel.h>
22 #include <linux/netdevice.h>
23 #include <linux/skbuff.h>
24 #include <linux/types.h>
25 #include <net/dsfield.h>
27 #include <net/inet_ecn.h>
29 #include <net/rtnetlink.h>
31 #define TUNNEL_CSUM __cpu_to_be16(0x01)
32 #define TUNNEL_ROUTING __cpu_to_be16(0x02)
33 #define TUNNEL_KEY __cpu_to_be16(0x04)
34 #define TUNNEL_SEQ __cpu_to_be16(0x08)
35 #define TUNNEL_STRICT __cpu_to_be16(0x10)
36 #define TUNNEL_REC __cpu_to_be16(0x20)
37 #define TUNNEL_VERSION __cpu_to_be16(0x40)
38 #define TUNNEL_NO_KEY __cpu_to_be16(0x80)
39 #define TUNNEL_DONT_FRAGMENT __cpu_to_be16(0x0100)
49 #define PACKET_REJECT 1
51 int iptunnel_xmit(struct sock *sk, struct rtable *rt,
53 __be32 src, __be32 dst, __u8 proto,
54 __u8 tos, __u8 ttl, __be16 df, bool xnet);
56 int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto);
60 /* Not yet upstream */
61 #define TUNNEL_OAM __cpu_to_be16(0x0200)
62 #define TUNNEL_CRIT_OPT __cpu_to_be16(0x0400)
63 #define TUNNEL_OPTIONS_PRESENT __cpu_to_be16(0x0800)
65 #endif /* __NET_IP_TUNNELS_H */