blob: 48af63c9a48d25f5f6d9e2681e6eeeec5a4fef8c [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _IP6_TUNNEL_H
2#define _IP6_TUNNEL_H
3
Jaswinder Singh Rajput217a2292009-01-30 21:44:19 +05304#include <linux/types.h>
5
Linus Torvalds1da177e2005-04-16 15:20:36 -07006#define IPV6_TLV_TNL_ENCAP_LIMIT 4
7#define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4
8
9/* don't add encapsulation limit if one isn't present in inner packet */
10#define IP6_TNL_F_IGN_ENCAP_LIMIT 0x1
11/* copy the traffic class field from the inner packet */
12#define IP6_TNL_F_USE_ORIG_TCLASS 0x2
13/* copy the flowlabel from the inner packet */
14#define IP6_TNL_F_USE_ORIG_FLOWLABEL 0x4
15/* being used for Mobile IPv6 */
16#define IP6_TNL_F_MIP6_DEV 0x8
17/* copy DSCP from the outer packet */
18#define IP6_TNL_F_RCV_DSCP_COPY 0x10
Eric Dumazetd24f22f2011-09-20 14:50:00 -040019/* copy fwmark from inner packet */
20#define IP6_TNL_F_USE_ORIG_FWMARK 0x20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021
22struct ip6_tnl_parm {
23 char name[IFNAMSIZ]; /* name of tunnel device */
24 int link; /* ifindex of underlying L2 interface */
25 __u8 proto; /* tunnel protocol */
26 __u8 encap_limit; /* encapsulation limit for tunnel */
27 __u8 hop_limit; /* hop limit for tunnel */
Al Viro90bcaf72006-11-08 00:25:17 -080028 __be32 flowinfo; /* traffic class and flowlabel for tunnel */
Linus Torvalds1da177e2005-04-16 15:20:36 -070029 __u32 flags; /* tunnel flags */
30 struct in6_addr laddr; /* local tunnel end-point address */
31 struct in6_addr raddr; /* remote tunnel end-point address */
32};
33
xeb@mail.ruc12b3952012-08-10 00:51:50 +000034struct ip6_tnl_parm2 {
35 char name[IFNAMSIZ]; /* name of tunnel device */
36 int link; /* ifindex of underlying L2 interface */
37 __u8 proto; /* tunnel protocol */
38 __u8 encap_limit; /* encapsulation limit for tunnel */
39 __u8 hop_limit; /* hop limit for tunnel */
40 __be32 flowinfo; /* traffic class and flowlabel for tunnel */
41 __u32 flags; /* tunnel flags */
42 struct in6_addr laddr; /* local tunnel end-point address */
43 struct in6_addr raddr; /* remote tunnel end-point address */
44
45 __be16 i_flags;
46 __be16 o_flags;
47 __be32 i_key;
48 __be32 o_key;
49};
50
Linus Torvalds1da177e2005-04-16 15:20:36 -070051#endif