if_tunnel.h revision 6a9755d20a995756487bb1aafb7e954f4fd868a7
1/**************************************************************************** 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> 22#include <linux/if.h> 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#include <linux/ip.h> 25#include <linux/in6.h> 26#include <asm/byteorder.h> 27#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) 30#define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2) 31#define SIOCCHGTUNNEL (SIOCDEVPRIVATE + 3) 32#define SIOCGETPRL (SIOCDEVPRIVATE + 4) 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34#define SIOCADDPRL (SIOCDEVPRIVATE + 5) 35#define SIOCDELPRL (SIOCDEVPRIVATE + 6) 36#define SIOCCHGPRL (SIOCDEVPRIVATE + 7) 37#define SIOCGET6RD (SIOCDEVPRIVATE + 8) 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39#define SIOCADD6RD (SIOCDEVPRIVATE + 9) 40#define SIOCDEL6RD (SIOCDEVPRIVATE + 10) 41#define SIOCCHG6RD (SIOCDEVPRIVATE + 11) 42#define GRE_CSUM __cpu_to_be16(0x8000) 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44#define GRE_ROUTING __cpu_to_be16(0x4000) 45#define GRE_KEY __cpu_to_be16(0x2000) 46#define GRE_SEQ __cpu_to_be16(0x1000) 47#define GRE_STRICT __cpu_to_be16(0x0800) 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49#define GRE_REC __cpu_to_be16(0x0700) 50#define GRE_ACK __cpu_to_be16(0x0080) 51#define GRE_FLAGS __cpu_to_be16(0x0078) 52#define GRE_VERSION __cpu_to_be16(0x0007) 53/* 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) 67struct ip_tunnel_parm { 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 char name[IFNAMSIZ]; 70 int link; 71 __be16 i_flags; 72 __be16 o_flags; 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 __be32 i_key; 75 __be32 o_key; 76 struct iphdr iph; 77}; 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79enum { 80 IFLA_IPTUN_UNSPEC, 81 IFLA_IPTUN_LINK, 82 IFLA_IPTUN_LOCAL, 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 IFLA_IPTUN_REMOTE, 85 IFLA_IPTUN_TTL, 86 IFLA_IPTUN_TOS, 87 IFLA_IPTUN_ENCAP_LIMIT, 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 IFLA_IPTUN_FLOWINFO, 90 IFLA_IPTUN_FLAGS, 91 IFLA_IPTUN_PROTO, 92 IFLA_IPTUN_PMTUDISC, 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 IFLA_IPTUN_6RD_PREFIX, 95 IFLA_IPTUN_6RD_RELAY_PREFIX, 96 IFLA_IPTUN_6RD_PREFIXLEN, 97 IFLA_IPTUN_6RD_RELAY_PREFIXLEN, 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 IFLA_IPTUN_ENCAP_TYPE, 100 IFLA_IPTUN_ENCAP_FLAGS, 101 IFLA_IPTUN_ENCAP_SPORT, 102 IFLA_IPTUN_ENCAP_DPORT, 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 IFLA_IPTUN_COLLECT_METADATA, 105 __IFLA_IPTUN_MAX, 106}; 107#define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1) 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109enum tunnel_encap_types { 110 TUNNEL_ENCAP_NONE, 111 TUNNEL_ENCAP_FOU, 112 TUNNEL_ENCAP_GUE, 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114}; 115#define TUNNEL_ENCAP_FLAG_CSUM (1 << 0) 116#define TUNNEL_ENCAP_FLAG_CSUM6 (1 << 1) 117#define TUNNEL_ENCAP_FLAG_REMCSUM (1 << 2) 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119#define SIT_ISATAP 0x0001 120struct ip_tunnel_prl { 121 __be32 addr; 122 __u16 flags; 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 __u16 __reserved; 125 __u32 datalen; 126 __u32 __reserved2; 127}; 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129#define PRL_DEFAULT 0x0001 130struct ip_tunnel_6rd { 131 struct in6_addr prefix; 132 __be32 relay_prefix; 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 __u16 prefixlen; 135 __u16 relay_prefixlen; 136}; 137enum { 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 IFLA_GRE_UNSPEC, 140 IFLA_GRE_LINK, 141 IFLA_GRE_IFLAGS, 142 IFLA_GRE_OFLAGS, 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 IFLA_GRE_IKEY, 145 IFLA_GRE_OKEY, 146 IFLA_GRE_LOCAL, 147 IFLA_GRE_REMOTE, 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 IFLA_GRE_TTL, 150 IFLA_GRE_TOS, 151 IFLA_GRE_PMTUDISC, 152 IFLA_GRE_ENCAP_LIMIT, 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 IFLA_GRE_FLOWINFO, 155 IFLA_GRE_FLAGS, 156 IFLA_GRE_ENCAP_TYPE, 157 IFLA_GRE_ENCAP_FLAGS, 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 IFLA_GRE_ENCAP_SPORT, 160 IFLA_GRE_ENCAP_DPORT, 161 IFLA_GRE_COLLECT_METADATA, 162 IFLA_GRE_IGNORE_DF, 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 __IFLA_GRE_MAX, 165}; 166#define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1) 167#define VTI_ISVTI ((__force __be16) 0x0001) 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169enum { 170 IFLA_VTI_UNSPEC, 171 IFLA_VTI_LINK, 172 IFLA_VTI_IKEY, 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 IFLA_VTI_OKEY, 175 IFLA_VTI_LOCAL, 176 IFLA_VTI_REMOTE, 177 __IFLA_VTI_MAX, 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179}; 180#define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1) 181#endif 182