4 #include <linux/if_tunnel.h>
7 /* Keep error state on tunnel for 30 sec */
8 #define IPTUNNEL_ERR_TIMEO (30*HZ)
10 /* 6rd prefix/relay information */
11 struct ip_tunnel_6rd_parm
13 struct in6_addr prefix
;
21 struct ip_tunnel
*next
;
22 struct net_device
*dev
;
23 struct net_device_stats stat
;
25 int recursion
; /* Depth of hard_start_xmit recursion */
26 int err_count
; /* Number of arrived ICMP errors */
27 unsigned long err_time
; /* Time when the last ICMP error arrived */
29 /* These four fields used only by GRE */
30 __u32 i_seqno
; /* The last seen seqno */
31 __u32 o_seqno
; /* The last output seqno */
32 int hlen
; /* Precalculated GRE header length */
35 struct ip_tunnel_parm parms
;
38 #ifdef CONFIG_IPV6_SIT_6RD
39 struct ip_tunnel_6rd_parm ip6rd
;
43 #define IPTUNNEL_XMIT() do { \
45 int pkt_len = skb->len; \
47 skb->ip_summed = CHECKSUM_NONE; \
48 ip_select_ident(iph, &rt->u.dst, NULL); \
50 err = ip_local_out(skb); \
51 if (net_xmit_eval(err) == 0) { \
52 stats->tx_bytes += pkt_len; \
53 stats->tx_packets++; \
56 stats->tx_aborted_errors++; \