55#include <linux/netdevice.h>
66#include <linux/ip6_tunnel.h>
77
8+ #define IP6TUNNEL_ERR_TIMEO (30*HZ)
9+
810/* capable of sending packets */
911#define IP6_TNL_F_CAP_XMIT 0x10000
1012/* capable of receiving packets */
1113#define IP6_TNL_F_CAP_RCV 0x20000
1214/* determine capability on a per-packet basis */
1315#define IP6_TNL_F_CAP_PER_PACKET 0x40000
1416
15- /* IPv6 tunnel */
17+ struct __ip6_tnl_parm {
18+ char name [IFNAMSIZ ]; /* name of tunnel device */
19+ int link ; /* ifindex of underlying L2 interface */
20+ __u8 proto ; /* tunnel protocol */
21+ __u8 encap_limit ; /* encapsulation limit for tunnel */
22+ __u8 hop_limit ; /* hop limit for tunnel */
23+ __be32 flowinfo ; /* traffic class and flowlabel for tunnel */
24+ __u32 flags ; /* tunnel flags */
25+ struct in6_addr laddr ; /* local tunnel end-point address */
26+ struct in6_addr raddr ; /* remote tunnel end-point address */
27+
28+ __be16 i_flags ;
29+ __be16 o_flags ;
30+ __be32 i_key ;
31+ __be32 o_key ;
32+ };
1633
34+ /* IPv6 tunnel */
1735struct ip6_tnl {
1836 struct ip6_tnl __rcu * next ; /* next tunnel in list */
1937 struct net_device * dev ; /* virtual device associated with tunnel */
20- struct ip6_tnl_parm parms ; /* tunnel configuration parameters */
38+ struct __ip6_tnl_parm parms ; /* tunnel configuration parameters */
2139 struct flowi fl ; /* flowi template for xmit */
2240 struct dst_entry * dst_cache ; /* cached dst */
2341 u32 dst_cookie ;
42+
43+ int err_count ;
44+ unsigned long err_time ;
45+
46+ /* These fields used only by GRE */
47+ __u32 i_seqno ; /* The last seen seqno */
48+ __u32 o_seqno ; /* The last output seqno */
49+ int hlen ; /* Precalculated GRE header length */
50+ int mlink ;
2451};
2552
2653/* Tunnel encapsulation limit destination sub-option */
@@ -31,4 +58,14 @@ struct ipv6_tlv_tnl_enc_lim {
3158 __u8 encap_limit ; /* tunnel encapsulation limit */
3259} __packed ;
3360
61+ struct dst_entry * ip6_tnl_dst_check (struct ip6_tnl * t );
62+ void ip6_tnl_dst_reset (struct ip6_tnl * t );
63+ void ip6_tnl_dst_store (struct ip6_tnl * t , struct dst_entry * dst );
64+ int ip6_tnl_rcv_ctl (struct ip6_tnl * t , const struct in6_addr * laddr ,
65+ const struct in6_addr * raddr );
66+ int ip6_tnl_xmit_ctl (struct ip6_tnl * t );
67+ __u16 ip6_tnl_parse_tlv_enc_lim (struct sk_buff * skb , __u8 * raw );
68+ __u32 ip6_tnl_get_cap (struct ip6_tnl * t , const struct in6_addr * laddr ,
69+ const struct in6_addr * raddr );
70+
3471#endif
0 commit comments