1 #ifndef _UAPI_IF_TUNNEL_H_
2 #define _UAPI_IF_TUNNEL_H_
4 #include <linux/types.h>
8 #include <asm/byteorder.h>
11 #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
12 #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
13 #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2)
14 #define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3)
15 #define SIOCGETPRL (SIOCDEVPRIVATE + 4)
16 #define SIOCADDPRL (SIOCDEVPRIVATE + 5)
17 #define SIOCDELPRL (SIOCDEVPRIVATE + 6)
18 #define SIOCCHGPRL (SIOCDEVPRIVATE + 7)
19 #define SIOCGET6RD (SIOCDEVPRIVATE + 8)
20 #define SIOCADD6RD (SIOCDEVPRIVATE + 9)
21 #define SIOCDEL6RD (SIOCDEVPRIVATE + 10)
22 #define SIOCCHG6RD (SIOCDEVPRIVATE + 11)
24 #define GRE_CSUM __cpu_to_be16(0x8000)
25 #define GRE_ROUTING __cpu_to_be16(0x4000)
26 #define GRE_KEY __cpu_to_be16(0x2000)
27 #define GRE_SEQ __cpu_to_be16(0x1000)
28 #define GRE_STRICT __cpu_to_be16(0x0800)
29 #define GRE_REC __cpu_to_be16(0x0700)
30 #define GRE_FLAGS __cpu_to_be16(0x00F8)
31 #define GRE_VERSION __cpu_to_be16(0x0007)
33 struct ip_tunnel_parm
{
50 IFLA_IPTUN_ENCAP_LIMIT
,
55 IFLA_IPTUN_6RD_PREFIX
,
56 IFLA_IPTUN_6RD_RELAY_PREFIX
,
57 IFLA_IPTUN_6RD_PREFIXLEN
,
58 IFLA_IPTUN_6RD_RELAY_PREFIXLEN
,
59 IFLA_IPTUN_ENCAP_TYPE
,
60 IFLA_IPTUN_ENCAP_FLAGS
,
61 IFLA_IPTUN_ENCAP_SPORT
,
62 IFLA_IPTUN_ENCAP_DPORT
,
65 #define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1)
67 enum tunnel_encap_types
{
73 #define TUNNEL_ENCAP_FLAG_CSUM (1<<0)
74 #define TUNNEL_ENCAP_FLAG_CSUM6 (1<<1)
75 #define TUNNEL_ENCAP_FLAG_REMCSUM (1<<2)
77 /* SIT-mode i_flags */
78 #define SIT_ISATAP 0x0001
80 struct ip_tunnel_prl
{
90 #define PRL_DEFAULT 0x0001
92 struct ip_tunnel_6rd
{
93 struct in6_addr prefix
;
96 __u16 relay_prefixlen
;
111 IFLA_GRE_ENCAP_LIMIT
,
115 IFLA_GRE_ENCAP_FLAGS
,
116 IFLA_GRE_ENCAP_SPORT
,
117 IFLA_GRE_ENCAP_DPORT
,
118 IFLA_GRE_COLLECT_METADATA
,
123 #define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1)
125 /* VTI-mode i_flags */
126 #define VTI_ISVTI ((__force __be16)0x0001)
138 #define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1)
139 #endif /* _UAPI_IF_TUNNEL_H_ */