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 _LINUX_IP_H
20#define _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
25#define IPTOS_TOS(tos) ((tos)&IPTOS_TOS_MASK)
26#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
32#define IPTOS_PREC(tos) ((tos)&IPTOS_PREC_MASK)
33/* 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
47#define IPOPT_COPIED(o) ((o)&IPOPT_COPY)
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define IPOPT_CLASS(o) ((o)&IPOPT_CLASS_MASK)
50#define IPOPT_NUMBER(o) ((o)&IPOPT_NUMBER_MASK)
51#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
56#define IPOPT_END (0 |IPOPT_CONTROL)
57#define IPOPT_NOOP (1 |IPOPT_CONTROL)
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#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_RR (7 |IPOPT_CONTROL)
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define IPOPT_SID (8 |IPOPT_CONTROL|IPOPT_COPY)
65#define IPOPT_SSRR (9 |IPOPT_CONTROL|IPOPT_COPY)
66#define IPOPT_RA (20|IPOPT_CONTROL|IPOPT_COPY)
67#define IPVERSION 4
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define MAXTTL 255
70#define IPDEFTTL 64
71#define IPOPT_OPTVAL 0
72#define IPOPT_OLEN 1
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define IPOPT_OFFSET 2
75#define IPOPT_MINOFF 4
76#define MAX_IPOPTLEN 40
77#define IPOPT_NOP IPOPT_NOOP
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define IPOPT_EOL IPOPT_END
80#define IPOPT_TS IPOPT_TIMESTAMP
81#define IPOPT_TS_TSONLY 0
82#define IPOPT_TS_TSANDADDR 1
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define IPOPT_TS_PRESPEC 3
85struct iphdr {
86#ifdef __LITTLE_ENDIAN_BITFIELD
87 __u8 ihl:4,
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 version:4;
90#elif defined (__BIG_ENDIAN_BITFIELD)
91 __u8 version:4,
92 ihl:4;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#else
95#error "Please fix <asm/byteorder.h>"
96#endif
97 __u8 tos;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 __be16 tot_len;
100 __be16 id;
101 __be16 frag_off;
102 __u8 ttl;
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 __u8 protocol;
105 __u16 check;
106 __be32 saddr;
107 __be32 daddr;
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109};
110struct ip_auth_hdr {
111 __u8 nexthdr;
112 __u8 hdrlen;
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 __u16 reserved;
115 __u32 spi;
116 __u32 seq_no;
117 __u8 auth_data[0];
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119};
120struct ip_esp_hdr {
121 __u32 spi;
122 __u32 seq_no;
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 __u8 enc_data[0];
125};
126struct ip_comp_hdr {
127 __u8 nexthdr;
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 __u8 flags;
130 __u16 cpi;
131};
132#endif
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134