Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
[deliverable/linux.git] / include / net / ipip.h
CommitLineData
1da177e4
LT
1#ifndef __NET_IPIP_H
2#define __NET_IPIP_H 1
3
4#include <linux/if_tunnel.h>
c439cb2e 5#include <net/ip.h>
1da177e4
LT
6
7/* Keep error state on tunnel for 30 sec */
8#define IPTUNNEL_ERR_TIMEO (30*HZ)
9
10struct ip_tunnel
11{
12 struct ip_tunnel *next;
13 struct net_device *dev;
1da177e4
LT
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;
300aaeea 26
fadf6bf0 27 struct ip_tunnel_prl_entry *prl; /* potential router list */
300aaeea 28 unsigned int prl_count; /* # of entries in PRL */
fadf6bf0
TF
29};
30
64506929
SH
31/* ISATAP: default interval between RS in secondy */
32#define IPTUNNEL_RS_DEFAULT_DELAY (900)
33
fadf6bf0
TF
34struct ip_tunnel_prl_entry
35{
36 struct ip_tunnel_prl_entry *next;
300aaeea
YH
37 __be32 addr;
38 u16 flags;
64506929
SH
39 unsigned long rs_delay;
40 struct timer_list rs_timer;
41 struct ip_tunnel *tunnel;
42 spinlock_t lock;
1da177e4
LT
43};
44
45#define IPTUNNEL_XMIT() do { \
46 int err; \
64194c31 47 int pkt_len = skb->len - skb_transport_offset(skb); \
1da177e4
LT
48 \
49 skb->ip_summed = CHECKSUM_NONE; \
1da177e4 50 ip_select_ident(iph, &rt->u.dst, NULL); \
1da177e4 51 \
c439cb2e 52 err = ip_local_out(skb); \
b9df3cb8 53 if (net_xmit_eval(err) == 0) { \
1da177e4
LT
54 stats->tx_bytes += pkt_len; \
55 stats->tx_packets++; \
56 } else { \
57 stats->tx_errors++; \
58 stats->tx_aborted_errors++; \
59 } \
60} while (0)
61
1da177e4 62#endif
This page took 0.427348 seconds and 5 git commands to generate.