1 #ifndef _IP6_TUNNEL_H 2 #define _IP6_TUNNEL_H 3 4 #include <linux/types.h> 5 #include <linux/if.h> /* For IFNAMSIZ. */ 6 #include <linux/in6.h> /* For struct in6_addr. */ 7 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 21 /* copy fwmark from inner packet */ 22 #define IP6_TNL_F_USE_ORIG_FWMARK 0x20 23 24 struct ip6_tnl_parm { 25 char name[IFNAMSIZ]; /* name of tunnel device */ 26 int link; /* ifindex of underlying L2 interface */ 27 __u8 proto; /* tunnel protocol */ 28 __u8 encap_limit; /* encapsulation limit for tunnel */ 29 __u8 hop_limit; /* hop limit for tunnel */ 30 __be32 flowinfo; /* traffic class and flowlabel for tunnel */ 31 __u32 flags; /* tunnel flags */ 32 struct in6_addr laddr; /* local tunnel end-point address */ 33 struct in6_addr raddr; /* remote tunnel end-point address */ 34 }; 35 36 struct ip6_tnl_parm2 { 37 char name[IFNAMSIZ]; /* name of tunnel device */ 38 int link; /* ifindex of underlying L2 interface */ 39 __u8 proto; /* tunnel protocol */ 40 __u8 encap_limit; /* encapsulation limit for tunnel */ 41 __u8 hop_limit; /* hop limit for tunnel */ 42 __be32 flowinfo; /* traffic class and flowlabel for tunnel */ 43 __u32 flags; /* tunnel flags */ 44 struct in6_addr laddr; /* local tunnel end-point address */ 45 struct in6_addr raddr; /* remote tunnel end-point address */ 46 47 __be16 i_flags; 48 __be16 o_flags; 49 __be32 i_key; 50 __be32 o_key; 51 }; 52 53 #endif 54