diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/net/ipip.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/net/ipip.h')
-rw-r--r-- | include/net/ipip.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/net/ipip.h b/include/net/ipip.h new file mode 100644 index 000000000000..f490c3cbe377 --- /dev/null +++ b/include/net/ipip.h | |||
@@ -0,0 +1,51 @@ | |||
1 | #ifndef __NET_IPIP_H | ||
2 | #define __NET_IPIP_H 1 | ||
3 | |||
4 | #include <linux/if_tunnel.h> | ||
5 | |||
6 | /* Keep error state on tunnel for 30 sec */ | ||
7 | #define IPTUNNEL_ERR_TIMEO (30*HZ) | ||
8 | |||
9 | struct ip_tunnel | ||
10 | { | ||
11 | struct ip_tunnel *next; | ||
12 | struct net_device *dev; | ||
13 | struct net_device_stats stat; | ||
14 | |||
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 */ | ||
18 | |||
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; | ||
24 | |||
25 | struct ip_tunnel_parm parms; | ||
26 | }; | ||
27 | |||
28 | #define IPTUNNEL_XMIT() do { \ | ||
29 | int err; \ | ||
30 | int pkt_len = skb->len; \ | ||
31 | \ | ||
32 | skb->ip_summed = CHECKSUM_NONE; \ | ||
33 | iph->tot_len = htons(skb->len); \ | ||
34 | ip_select_ident(iph, &rt->u.dst, NULL); \ | ||
35 | ip_send_check(iph); \ | ||
36 | \ | ||
37 | err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, dst_output);\ | ||
38 | if (err == NET_XMIT_SUCCESS || err == NET_XMIT_CN) { \ | ||
39 | stats->tx_bytes += pkt_len; \ | ||
40 | stats->tx_packets++; \ | ||
41 | } else { \ | ||
42 | stats->tx_errors++; \ | ||
43 | stats->tx_aborted_errors++; \ | ||
44 | } \ | ||
45 | } while (0) | ||
46 | |||
47 | |||
48 | extern int sit_init(void); | ||
49 | extern void sit_cleanup(void); | ||
50 | |||
51 | #endif | ||