OMAP3: PM: CPUfreq support for OMAP3EVM board
[linux-ginger.git] / include / net / ipip.h
blob87acf8f3a15527cd0446e1dd6f75bdd60a636ba4
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 err_count; /* Number of arrived ICMP errors */
16 unsigned long err_time; /* Time when the last ICMP error arrived */
18 /* These four fields used only by GRE */
19 __u32 i_seqno; /* The last seen seqno */
20 __u32 o_seqno; /* The last output seqno */
21 int hlen; /* Precalculated GRE header length */
22 int mlink;
24 struct ip_tunnel_parm parms;
26 struct ip_tunnel_prl_entry *prl; /* potential router list */
27 unsigned int prl_count; /* # of entries in PRL */
30 struct ip_tunnel_prl_entry
32 struct ip_tunnel_prl_entry *next;
33 __be32 addr;
34 u16 flags;
37 #define IPTUNNEL_XMIT() do { \
38 int err; \
39 int pkt_len = skb->len - skb_transport_offset(skb); \
41 skb->ip_summed = CHECKSUM_NONE; \
42 ip_select_ident(iph, &rt->u.dst, NULL); \
44 err = ip_local_out(skb); \
45 if (net_xmit_eval(err) == 0) { \
46 stats->tx_bytes += pkt_len; \
47 stats->tx_packets++; \
48 } else { \
49 stats->tx_errors++; \
50 stats->tx_aborted_errors++; \
51 } \
52 } while (0)
54 #endif