Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _IP6_TUNNEL_H |
| 2 | #define _IP6_TUNNEL_H |
| 3 | |
Jaswinder Singh Rajput | 217a229 | 2009-01-30 21:44:19 +0530 | [diff] [blame] | 4 | #include <linux/types.h> |
Dmitry V. Levin | 557d7ac | 2017-02-23 01:38:03 +0300 | [diff] [blame] | 5 | #include <linux/if.h> /* For IFNAMSIZ. */ |
| 6 | #include <linux/in6.h> /* For struct in6_addr. */ |
Jaswinder Singh Rajput | 217a229 | 2009-01-30 21:44:19 +0530 | [diff] [blame] | 7 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | #define IPV6_TLV_TNL_ENCAP_LIMIT 4 |
| 9 | #define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4 |
| 10 | |
| 11 | /* don't add encapsulation limit if one isn't present in inner packet */ |
| 12 | #define IP6_TNL_F_IGN_ENCAP_LIMIT 0x1 |
| 13 | /* copy the traffic class field from the inner packet */ |
| 14 | #define IP6_TNL_F_USE_ORIG_TCLASS 0x2 |
| 15 | /* copy the flowlabel from the inner packet */ |
| 16 | #define IP6_TNL_F_USE_ORIG_FLOWLABEL 0x4 |
| 17 | /* being used for Mobile IPv6 */ |
| 18 | #define IP6_TNL_F_MIP6_DEV 0x8 |
| 19 | /* copy DSCP from the outer packet */ |
| 20 | #define IP6_TNL_F_RCV_DSCP_COPY 0x10 |
Eric Dumazet | d24f22f | 2011-09-20 14:50:00 -0400 | [diff] [blame] | 21 | /* copy fwmark from inner packet */ |
| 22 | #define IP6_TNL_F_USE_ORIG_FWMARK 0x20 |
Shmulik Ladkani | 908d140 | 2017-10-21 00:25:15 +0300 | [diff] [blame^] | 23 | /* allow remote endpoint on the local node */ |
| 24 | #define IP6_TNL_F_ALLOW_LOCAL_REMOTE 0x40 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | |
| 26 | struct ip6_tnl_parm { |
| 27 | char name[IFNAMSIZ]; /* name of tunnel device */ |
| 28 | int link; /* ifindex of underlying L2 interface */ |
| 29 | __u8 proto; /* tunnel protocol */ |
| 30 | __u8 encap_limit; /* encapsulation limit for tunnel */ |
| 31 | __u8 hop_limit; /* hop limit for tunnel */ |
Al Viro | 90bcaf7 | 2006-11-08 00:25:17 -0800 | [diff] [blame] | 32 | __be32 flowinfo; /* traffic class and flowlabel for tunnel */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | __u32 flags; /* tunnel flags */ |
| 34 | struct in6_addr laddr; /* local tunnel end-point address */ |
| 35 | struct in6_addr raddr; /* remote tunnel end-point address */ |
| 36 | }; |
| 37 | |
xeb@mail.ru | c12b395 | 2012-08-10 00:51:50 +0000 | [diff] [blame] | 38 | struct ip6_tnl_parm2 { |
| 39 | char name[IFNAMSIZ]; /* name of tunnel device */ |
| 40 | int link; /* ifindex of underlying L2 interface */ |
| 41 | __u8 proto; /* tunnel protocol */ |
| 42 | __u8 encap_limit; /* encapsulation limit for tunnel */ |
| 43 | __u8 hop_limit; /* hop limit for tunnel */ |
| 44 | __be32 flowinfo; /* traffic class and flowlabel for tunnel */ |
| 45 | __u32 flags; /* tunnel flags */ |
| 46 | struct in6_addr laddr; /* local tunnel end-point address */ |
| 47 | struct in6_addr raddr; /* remote tunnel end-point address */ |
| 48 | |
| 49 | __be16 i_flags; |
| 50 | __be16 o_flags; |
| 51 | __be32 i_key; |
| 52 | __be32 o_key; |
| 53 | }; |
| 54 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | #endif |