blob: 707a85b8fc567e96d7126c1e28f484f3270a431e [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_IF_TUNNEL_H_
20#define _UAPI_IF_TUNNEL_H_
21#include <linux/types.h>
Christopher Ferris49f525c2016-12-12 14:55:36 -080022#include <linux/if.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris49f525c2016-12-12 14:55:36 -080024#include <linux/ip.h>
25#include <linux/in6.h>
26#include <asm/byteorder.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
Christopher Ferris49f525c2016-12-12 14:55:36 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070029#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
30#define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2)
31#define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3)
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define SIOCGETPRL (SIOCDEVPRIVATE + 4)
Christopher Ferris49f525c2016-12-12 14:55:36 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070034#define SIOCADDPRL (SIOCDEVPRIVATE + 5)
35#define SIOCDELPRL (SIOCDEVPRIVATE + 6)
36#define SIOCCHGPRL (SIOCDEVPRIVATE + 7)
Ben Cheng655a7c02013-10-16 16:09:24 -070037#define SIOCGET6RD (SIOCDEVPRIVATE + 8)
Christopher Ferris49f525c2016-12-12 14:55:36 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define SIOCADD6RD (SIOCDEVPRIVATE + 9)
40#define SIOCDEL6RD (SIOCDEVPRIVATE + 10)
41#define SIOCCHG6RD (SIOCDEVPRIVATE + 11)
Ben Cheng655a7c02013-10-16 16:09:24 -070042#define GRE_CSUM __cpu_to_be16(0x8000)
Christopher Ferris49f525c2016-12-12 14:55:36 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070044#define GRE_ROUTING __cpu_to_be16(0x4000)
45#define GRE_KEY __cpu_to_be16(0x2000)
46#define GRE_SEQ __cpu_to_be16(0x1000)
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define GRE_STRICT __cpu_to_be16(0x0800)
Christopher Ferris49f525c2016-12-12 14:55:36 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define GRE_REC __cpu_to_be16(0x0700)
Christopher Ferris6a9755d2017-01-13 14:09:31 -080050#define GRE_ACK __cpu_to_be16(0x0080)
51#define GRE_FLAGS __cpu_to_be16(0x0078)
Ben Cheng655a7c02013-10-16 16:09:24 -070052#define GRE_VERSION __cpu_to_be16(0x0007)
Christopher Ferris6a9755d2017-01-13 14:09:31 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define GRE_IS_CSUM(f) ((f) & GRE_CSUM)
55#define GRE_IS_ROUTING(f) ((f) & GRE_ROUTING)
56#define GRE_IS_KEY(f) ((f) & GRE_KEY)
57#define GRE_IS_SEQ(f) ((f) & GRE_SEQ)
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define GRE_IS_STRICT(f) ((f) & GRE_STRICT)
60#define GRE_IS_REC(f) ((f) & GRE_REC)
61#define GRE_IS_ACK(f) ((f) & GRE_ACK)
62#define GRE_VERSION_0 __cpu_to_be16(0x0000)
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define GRE_VERSION_1 __cpu_to_be16(0x0001)
65#define GRE_PROTO_PPP __cpu_to_be16(0x880b)
66#define GRE_PPTP_KEY_MASK __cpu_to_be32(0xffff)
Ben Cheng655a7c02013-10-16 16:09:24 -070067struct ip_tunnel_parm {
Christopher Ferris49f525c2016-12-12 14:55:36 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080069 char name[IFNAMSIZ];
70 int link;
71 __be16 i_flags;
Tao Baod7db5942015-01-28 10:07:51 -080072 __be16 o_flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 __be32 i_key;
75 __be32 o_key;
76 struct iphdr iph;
Ben Cheng655a7c02013-10-16 16:09:24 -070077};
Christopher Ferris49f525c2016-12-12 14:55:36 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070079enum {
Tao Baod7db5942015-01-28 10:07:51 -080080 IFLA_IPTUN_UNSPEC,
81 IFLA_IPTUN_LINK,
Tao Baod7db5942015-01-28 10:07:51 -080082 IFLA_IPTUN_LOCAL,
Christopher Ferris49f525c2016-12-12 14:55:36 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080084 IFLA_IPTUN_REMOTE,
85 IFLA_IPTUN_TTL,
86 IFLA_IPTUN_TOS,
Tao Baod7db5942015-01-28 10:07:51 -080087 IFLA_IPTUN_ENCAP_LIMIT,
Christopher Ferris49f525c2016-12-12 14:55:36 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 IFLA_IPTUN_FLOWINFO,
90 IFLA_IPTUN_FLAGS,
91 IFLA_IPTUN_PROTO,
Tao Baod7db5942015-01-28 10:07:51 -080092 IFLA_IPTUN_PMTUDISC,
Christopher Ferris49f525c2016-12-12 14:55:36 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 IFLA_IPTUN_6RD_PREFIX,
95 IFLA_IPTUN_6RD_RELAY_PREFIX,
96 IFLA_IPTUN_6RD_PREFIXLEN,
Tao Baod7db5942015-01-28 10:07:51 -080097 IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
Christopher Ferris49f525c2016-12-12 14:55:36 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 IFLA_IPTUN_ENCAP_TYPE,
100 IFLA_IPTUN_ENCAP_FLAGS,
101 IFLA_IPTUN_ENCAP_SPORT,
Tao Baod7db5942015-01-28 10:07:51 -0800102 IFLA_IPTUN_ENCAP_DPORT,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800104 IFLA_IPTUN_COLLECT_METADATA,
Tao Baod7db5942015-01-28 10:07:51 -0800105 __IFLA_IPTUN_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700106};
107#define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800109enum tunnel_encap_types {
Tao Baod7db5942015-01-28 10:07:51 -0800110 TUNNEL_ENCAP_NONE,
111 TUNNEL_ENCAP_FOU,
112 TUNNEL_ENCAP_GUE,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800114};
Tao Baod7db5942015-01-28 10:07:51 -0800115#define TUNNEL_ENCAP_FLAG_CSUM (1 << 0)
116#define TUNNEL_ENCAP_FLAG_CSUM6 (1 << 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800117#define TUNNEL_ENCAP_FLAG_REMCSUM (1 << 2)
Christopher Ferris49f525c2016-12-12 14:55:36 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800119#define SIT_ISATAP 0x0001
Ben Cheng655a7c02013-10-16 16:09:24 -0700120struct ip_tunnel_prl {
Tao Baod7db5942015-01-28 10:07:51 -0800121 __be32 addr;
122 __u16 flags;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800124 __u16 __reserved;
Tao Baod7db5942015-01-28 10:07:51 -0800125 __u32 datalen;
126 __u32 __reserved2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700127};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800129#define PRL_DEFAULT 0x0001
Ben Cheng655a7c02013-10-16 16:09:24 -0700130struct ip_tunnel_6rd {
Tao Baod7db5942015-01-28 10:07:51 -0800131 struct in6_addr prefix;
132 __be32 relay_prefix;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800134 __u16 prefixlen;
Tao Baod7db5942015-01-28 10:07:51 -0800135 __u16 relay_prefixlen;
Ben Cheng655a7c02013-10-16 16:09:24 -0700136};
137enum {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800139 IFLA_GRE_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -0800140 IFLA_GRE_LINK,
141 IFLA_GRE_IFLAGS,
142 IFLA_GRE_OFLAGS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800144 IFLA_GRE_IKEY,
Tao Baod7db5942015-01-28 10:07:51 -0800145 IFLA_GRE_OKEY,
146 IFLA_GRE_LOCAL,
147 IFLA_GRE_REMOTE,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800149 IFLA_GRE_TTL,
Tao Baod7db5942015-01-28 10:07:51 -0800150 IFLA_GRE_TOS,
151 IFLA_GRE_PMTUDISC,
152 IFLA_GRE_ENCAP_LIMIT,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800154 IFLA_GRE_FLOWINFO,
Tao Baod7db5942015-01-28 10:07:51 -0800155 IFLA_GRE_FLAGS,
156 IFLA_GRE_ENCAP_TYPE,
157 IFLA_GRE_ENCAP_FLAGS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800159 IFLA_GRE_ENCAP_SPORT,
Tao Baod7db5942015-01-28 10:07:51 -0800160 IFLA_GRE_ENCAP_DPORT,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800161 IFLA_GRE_COLLECT_METADATA,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800162 IFLA_GRE_IGNORE_DF,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800164 __IFLA_GRE_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700165};
Ben Cheng655a7c02013-10-16 16:09:24 -0700166#define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1)
Tao Baod7db5942015-01-28 10:07:51 -0800167#define VTI_ISVTI ((__force __be16) 0x0001)
Christopher Ferris05d08e92016-02-04 13:16:38 -0800168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800169enum {
Tao Baod7db5942015-01-28 10:07:51 -0800170 IFLA_VTI_UNSPEC,
171 IFLA_VTI_LINK,
Tao Baod7db5942015-01-28 10:07:51 -0800172 IFLA_VTI_IKEY,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800174 IFLA_VTI_OKEY,
Tao Baod7db5942015-01-28 10:07:51 -0800175 IFLA_VTI_LOCAL,
176 IFLA_VTI_REMOTE,
Tao Baod7db5942015-01-28 10:07:51 -0800177 __IFLA_VTI_MAX,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800179};
Ben Cheng655a7c02013-10-16 16:09:24 -0700180#define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700181#endif