genirq: fix devres.o build for GENERIC_HARDIRQS=n
[linux-2.6/verdex.git] / include / net / ipip.h
blobfdf9bd7437057e26b0f9cd3bdadb8c70ed8a09f6
1 #ifndef __NET_IPIP_H
2 #define __NET_IPIP_H 1
4 #include <linux/if_tunnel.h>
5 #include <net/ip.h>
7 /* Keep error state on tunnel for 30 sec */
8 #define IPTUNNEL_ERR_TIMEO (30*HZ)
10 struct ip_tunnel
12 struct ip_tunnel *next;
13 struct net_device *dev;
15 int recursion; /* Depth of hard_start_xmit recursion */
16 int err_count; /* Number of arrived ICMP errors */
17 unsigned long err_time; /* Time when the last ICMP error arrived */
19 /* These four fields used only by GRE */
20 __u32 i_seqno; /* The last seen seqno */
21 __u32 o_seqno; /* The last output seqno */
22 int hlen; /* Precalculated GRE header length */
23 int mlink;
25 struct ip_tunnel_parm parms;
27 struct ip_tunnel_prl_entry *prl; /* potential router list */
28 unsigned int prl_count; /* # of entries in PRL */
31 struct ip_tunnel_prl_entry
33 struct ip_tunnel_prl_entry *next;
34 __be32 addr;
35 u16 flags;
38 #define IPTUNNEL_XMIT() do { \
39 int err; \
40 int pkt_len = skb->len - skb_transport_offset(skb); \
42 skb->ip_summed = CHECKSUM_NONE; \
43 ip_select_ident(iph, &rt->u.dst, NULL); \
45 err = ip_local_out(skb); \
46 if (net_xmit_eval(err) == 0) { \
47 stats->tx_bytes += pkt_len; \
48 stats->tx_packets++; \
49 } else { \
50 stats->tx_errors++; \
51 stats->tx_aborted_errors++; \
52 } \
53 } while (0)
55 #endif