Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _NET_IP6_TUNNEL_H |
| 2 | #define _NET_IP6_TUNNEL_H |
| 3 | |
| 4 | #include <linux/ipv6.h> |
| 5 | #include <linux/netdevice.h> |
| 6 | #include <linux/ip6_tunnel.h> |
| 7 | |
| 8 | /* capable of sending packets */ |
| 9 | #define IP6_TNL_F_CAP_XMIT 0x10000 |
| 10 | /* capable of receiving packets */ |
| 11 | #define IP6_TNL_F_CAP_RCV 0x20000 |
Ville Nuorvala | d0087b2 | 2012-06-28 18:15:52 +0000 | [diff] [blame] | 12 | /* determine capability on a per-packet basis */ |
| 13 | #define IP6_TNL_F_CAP_PER_PACKET 0x40000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | /* IPv6 tunnel */ |
| 16 | |
| 17 | struct ip6_tnl { |
Eric Dumazet | 6f0bcf1 | 2010-10-24 21:33:16 +0000 | [diff] [blame] | 18 | struct ip6_tnl __rcu *next; /* next tunnel in list */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | struct net_device *dev; /* virtual device associated with tunnel */ |
Joe Perches | f4ab2f72 | 2007-12-20 13:56:32 -0800 | [diff] [blame] | 20 | struct ip6_tnl_parm parms; /* tunnel configuration parameters */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | struct flowi fl; /* flowi template for xmit */ |
| 22 | struct dst_entry *dst_cache; /* cached dst */ |
| 23 | u32 dst_cookie; |
| 24 | }; |
| 25 | |
| 26 | /* Tunnel encapsulation limit destination sub-option */ |
| 27 | |
| 28 | struct ipv6_tlv_tnl_enc_lim { |
| 29 | __u8 type; /* type-code for option */ |
| 30 | __u8 length; /* option length */ |
| 31 | __u8 encap_limit; /* tunnel encapsulation limit */ |
Eric Dumazet | bc10502 | 2010-06-03 03:21:52 -0700 | [diff] [blame] | 32 | } __packed; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | |
| 34 | #endif |