blob: 8567d24992fc2a4d1fb1b892569f9a12b92ec014 [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_LINUX_IP_H
20#define _UAPI_LINUX_IP_H
21#include <linux/types.h>
22#include <asm/byteorder.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define IPTOS_TOS_MASK 0x1E
Tao Baod7db5942015-01-28 10:07:51 -080025#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
Ben Cheng655a7c02013-10-16 16:09:24 -070026#define IPTOS_LOWDELAY 0x10
27#define IPTOS_THROUGHPUT 0x08
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define IPTOS_RELIABILITY 0x04
30#define IPTOS_MINCOST 0x02
31#define IPTOS_PREC_MASK 0xE0
Tao Baod7db5942015-01-28 10:07:51 -080032#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define IPTOS_PREC_NETCONTROL 0xe0
35#define IPTOS_PREC_INTERNETCONTROL 0xc0
36#define IPTOS_PREC_CRITIC_ECP 0xa0
37#define IPTOS_PREC_FLASHOVERRIDE 0x80
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define IPTOS_PREC_FLASH 0x60
40#define IPTOS_PREC_IMMEDIATE 0x40
41#define IPTOS_PREC_PRIORITY 0x20
42#define IPTOS_PREC_ROUTINE 0x00
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define IPOPT_COPY 0x80
45#define IPOPT_CLASS_MASK 0x60
46#define IPOPT_NUMBER_MASK 0x1f
Tao Baod7db5942015-01-28 10:07:51 -080047#define IPOPT_COPIED(o) ((o) & IPOPT_COPY)
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080049#define IPOPT_CLASS(o) ((o) & IPOPT_CLASS_MASK)
50#define IPOPT_NUMBER(o) ((o) & IPOPT_NUMBER_MASK)
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define IPOPT_CONTROL 0x00
52#define IPOPT_RESERVED1 0x20
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define IPOPT_MEASUREMENT 0x40
55#define IPOPT_RESERVED2 0x60
Tao Baod7db5942015-01-28 10:07:51 -080056#define IPOPT_END (0 | IPOPT_CONTROL)
57#define IPOPT_NOOP (1 | IPOPT_CONTROL)
Ben Cheng655a7c02013-10-16 16:09:24 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080059#define IPOPT_SEC (2 | IPOPT_CONTROL | IPOPT_COPY)
60#define IPOPT_LSRR (3 | IPOPT_CONTROL | IPOPT_COPY)
61#define IPOPT_TIMESTAMP (4 | IPOPT_MEASUREMENT)
62#define IPOPT_CIPSO (6 | IPOPT_CONTROL | IPOPT_COPY)
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064#define IPOPT_RR (7 | IPOPT_CONTROL)
65#define IPOPT_SID (8 | IPOPT_CONTROL | IPOPT_COPY)
66#define IPOPT_SSRR (9 | IPOPT_CONTROL | IPOPT_COPY)
67#define IPOPT_RA (20 | IPOPT_CONTROL | IPOPT_COPY)
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define IPVERSION 4
70#define MAXTTL 255
71#define IPDEFTTL 64
72#define IPOPT_OPTVAL 0
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define IPOPT_OLEN 1
75#define IPOPT_OFFSET 2
76#define IPOPT_MINOFF 4
77#define MAX_IPOPTLEN 40
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define IPOPT_NOP IPOPT_NOOP
80#define IPOPT_EOL IPOPT_END
81#define IPOPT_TS IPOPT_TIMESTAMP
82#define IPOPT_TS_TSONLY 0
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define IPOPT_TS_TSANDADDR 1
85#define IPOPT_TS_PRESPEC 3
86#define IPV4_BEET_PHMAXLEN 8
87struct iphdr {
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#ifdef __LITTLE_ENDIAN_BITFIELD
Tao Baod7db5942015-01-28 10:07:51 -080090 __u8 ihl : 4, version : 4;
91#elif defined(__BIG_ENDIAN_BITFIELD)
92 __u8 version : 4, ihl : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070094#else
95#error "Please fix <asm/byteorder.h>"
Ben Cheng655a7c02013-10-16 16:09:24 -070096#endif
Tao Baod7db5942015-01-28 10:07:51 -080097 __u8 tos;
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080099 __be16 tot_len;
100 __be16 id;
101 __be16 frag_off;
102 __u8 ttl;
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104 __u8 protocol;
105 __sum16 check;
106 __be32 saddr;
107 __be32 daddr;
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700109};
110struct ip_auth_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800111 __u8 nexthdr;
112 __u8 hdrlen;
Ben Cheng655a7c02013-10-16 16:09:24 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800114 __be16 reserved;
115 __be32 spi;
116 __be32 seq_no;
117 __u8 auth_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700119};
120struct ip_esp_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800121 __be32 spi;
122 __be32 seq_no;
Ben Cheng655a7c02013-10-16 16:09:24 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800124 __u8 enc_data[0];
Ben Cheng655a7c02013-10-16 16:09:24 -0700125};
Ben Cheng655a7c02013-10-16 16:09:24 -0700126struct ip_comp_hdr {
Tao Baod7db5942015-01-28 10:07:51 -0800127 __u8 nexthdr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800129 __u8 flags;
130 __be16 cpi;
Ben Cheng655a7c02013-10-16 16:09:24 -0700131};
132struct ip_beet_phdr {
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800134 __u8 nexthdr;
135 __u8 hdrlen;
136 __u8 padlen;
137 __u8 reserved;
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700139};
Tao Baod7db5942015-01-28 10:07:51 -0800140enum {
141 IPV4_DEVCONF_FORWARDING = 1,
142 IPV4_DEVCONF_MC_FORWARDING,
Elliott Hughes8cb52b02013-11-21 13:43:23 -0800143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144 IPV4_DEVCONF_PROXY_ARP,
145 IPV4_DEVCONF_ACCEPT_REDIRECTS,
146 IPV4_DEVCONF_SECURE_REDIRECTS,
147 IPV4_DEVCONF_SEND_REDIRECTS,
Christopher Ferris38062f92014-07-09 15:33:25 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800149 IPV4_DEVCONF_SHARED_MEDIA,
150 IPV4_DEVCONF_RP_FILTER,
151 IPV4_DEVCONF_ACCEPT_SOURCE_ROUTE,
152 IPV4_DEVCONF_BOOTP_RELAY,
Christopher Ferris38062f92014-07-09 15:33:25 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 IPV4_DEVCONF_LOG_MARTIANS,
155 IPV4_DEVCONF_TAG,
156 IPV4_DEVCONF_ARPFILTER,
157 IPV4_DEVCONF_MEDIUM_ID,
Christopher Ferris38062f92014-07-09 15:33:25 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159 IPV4_DEVCONF_NOXFRM,
160 IPV4_DEVCONF_NOPOLICY,
161 IPV4_DEVCONF_FORCE_IGMP_VERSION,
162 IPV4_DEVCONF_ARP_ANNOUNCE,
Christopher Ferris38062f92014-07-09 15:33:25 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800164 IPV4_DEVCONF_ARP_IGNORE,
165 IPV4_DEVCONF_PROMOTE_SECONDARIES,
166 IPV4_DEVCONF_ARP_ACCEPT,
167 IPV4_DEVCONF_ARP_NOTIFY,
Christopher Ferris38062f92014-07-09 15:33:25 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800169 IPV4_DEVCONF_ACCEPT_LOCAL,
170 IPV4_DEVCONF_SRC_VMARK,
171 IPV4_DEVCONF_PROXY_ARP_PVLAN,
172 IPV4_DEVCONF_ROUTE_LOCALNET,
Christopher Ferris38062f92014-07-09 15:33:25 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800174 IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL,
175 IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL,
176 __IPV4_DEVCONF_MAX
Christopher Ferris38062f92014-07-09 15:33:25 -0700177};
Tao Baod7db5942015-01-28 10:07:51 -0800178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700179#define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1)
Christopher Ferris38062f92014-07-09 15:33:25 -0700180#endif