4 #include <linux/if_tunnel.h>
7 /* Keep error state on tunnel for 30 sec */
8 #define IPTUNNEL_ERR_TIMEO (30*HZ)
12 struct ip_tunnel
*next
;
13 struct net_device
*dev
;
14 struct net_device_stats stat
;
16 int recursion
; /* Depth of hard_start_xmit recursion */
17 int err_count
; /* Number of arrived ICMP errors */
18 unsigned long err_time
; /* Time when the last ICMP error arrived */
20 /* These four fields used only by GRE */
21 __u32 i_seqno
; /* The last seen seqno */
22 __u32 o_seqno
; /* The last output seqno */
23 int hlen
; /* Precalculated GRE header length */
26 struct ip_tunnel_parm parms
;
28 struct ip_tunnel_prl_entry
*prl
; /* potential router list */
29 unsigned int prl_count
; /* # of entries in PRL */
32 struct ip_tunnel_prl_entry
34 struct ip_tunnel_prl_entry
*next
;
39 #define IPTUNNEL_XMIT() do { \
41 int pkt_len = skb->len; \
43 skb->ip_summed = CHECKSUM_NONE; \
44 ip_select_ident(iph, &rt->u.dst, NULL); \
46 err = ip_local_out(skb); \
47 if (net_xmit_eval(err) == 0) { \
48 stats->tx_bytes += pkt_len; \
49 stats->tx_packets++; \
52 stats->tx_aborted_errors++; \