a786aa99d804c0aa505b54ffa933371d1d5af21d
[sliver-openvswitch.git] / datapath / linux / compat / include / net / ip_tunnels.h
1 #ifndef __NET_IP_TUNNELS_WRAPPER_H
2 #define __NET_IP_TUNNELS_WRAPPER_H 1
3
4 #include <linux/if_tunnel.h>
5 #include <linux/netdevice.h>
6 #include <linux/skbuff.h>
7 #include <linux/types.h>
8 #include <net/dsfield.h>
9 #include <net/flow.h>
10 #include <net/inet_ecn.h>
11 #include <net/ip.h>
12 #include <net/rtnetlink.h>
13
14 #define TUNNEL_CSUM     __cpu_to_be16(0x01)
15 #define TUNNEL_ROUTING  __cpu_to_be16(0x02)
16 #define TUNNEL_KEY      __cpu_to_be16(0x04)
17 #define TUNNEL_SEQ      __cpu_to_be16(0x08)
18 #define TUNNEL_STRICT   __cpu_to_be16(0x10)
19 #define TUNNEL_REC      __cpu_to_be16(0x20)
20 #define TUNNEL_VERSION  __cpu_to_be16(0x40)
21 #define TUNNEL_NO_KEY   __cpu_to_be16(0x80)
22 #define TUNNEL_DONT_FRAGMENT    __cpu_to_be16(0x0100)
23
24 struct tnl_ptk_info {
25         __be16 flags;
26         __be16 proto;
27         __be32 key;
28         __be32 seq;
29 };
30
31 #define PACKET_RCVD     0
32 #define PACKET_REJECT   1
33
34 int iptunnel_xmit(struct rtable *rt,
35                   struct sk_buff *skb,
36                   __be32 src, __be32 dst, __u8 proto,
37                   __u8 tos, __u8 ttl, __be16 df);
38
39 int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto);
40 #endif /* __NET_IP_TUNNELS_H */