1
#ifndef __NET_IP_TUNNELS_WRAPPER_H
2
#define __NET_IP_TUNNELS_WRAPPER_H 1
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>
10
#include <net/inet_ecn.h>
12
#include <net/rtnetlink.h>
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)
32
#define PACKET_REJECT 1
34
static inline void tunnel_ip_select_ident(struct sk_buff *skb,
35
const struct iphdr *old_iph,
36
struct dst_entry *dst)
38
struct iphdr *iph = ip_hdr(skb);
40
/* Use inner packet iph-id if possible. */
41
if (skb->protocol == htons(ETH_P_IP) && old_iph->id)
42
iph->id = old_iph->id;
44
__ip_select_ident(iph, dst,
45
(skb_shinfo(skb)->gso_segs ?: 1) - 1);
48
int iptunnel_xmit(struct net *net, struct rtable *rt,
50
__be32 src, __be32 dst, __u8 proto,
51
__u8 tos, __u8 ttl, __be16 df);
53
int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto);
54
#endif /* __NET_IP_TUNNELS_H */