1 #ifndef __NET_IPIP_WRAPPER_H
2 #define __NET_IPIP_WRAPPER_H 1
4 #include <linux/version.h>
6 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
8 #include <linux/if_tunnel.h>
11 /* Keep error state on tunnel for 30 sec */
12 #define IPTUNNEL_ERR_TIMEO (30*HZ)
16 struct ip_tunnel *next;
17 struct net_device *dev;
18 #ifndef HAVE_NETDEV_STATS
19 struct net_device_stats stat;
22 int err_count; /* Number of arrived ICMP errors */
23 unsigned long err_time; /* Time when the last ICMP error arrived */
25 /* These four fields used only by GRE */
26 __u32 i_seqno; /* The last seen seqno */
27 __u32 o_seqno; /* The last output seqno */
28 int hlen; /* Precalculated GRE header length */
31 struct ip_tunnel_parm parms;
33 struct ip_tunnel_prl_entry *prl; /* potential router list */
34 unsigned int prl_count; /* # of entries in PRL */
37 /* ISATAP: default interval between RS in secondy */
38 #define IPTUNNEL_RS_DEFAULT_DELAY (900)
40 struct ip_tunnel_prl_entry
42 struct ip_tunnel_prl_entry *next;
45 unsigned long rs_delay;
46 struct timer_list rs_timer;
47 struct ip_tunnel *tunnel;
51 #define IPTUNNEL_XMIT() do { \
53 int pkt_len = skb->len - skb_transport_offset(skb); \
55 skb->ip_summed = CHECKSUM_NONE; \
56 ip_select_ident(iph, &rt->u.dst, NULL); \
58 err = ip_local_out(skb); \
59 if (net_xmit_eval(err) == 0) { \
60 stats->tx_bytes += pkt_len; \
61 stats->tx_packets++; \
64 stats->tx_aborted_errors++; \
69 #include_next <net/ipip.h>
70 #endif /* kernel < 2.6.32 */
72 #endif /* net/ipip.h wrapper */