blob: 3347bc1ff1c8755bf50d0dc49ad6c536db7e2d33 [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_TCP_H
20#define _UAPI_LINUX_TCP_H
21#include <linux/types.h>
22#include <asm/byteorder.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <linux/socket.h>
25struct tcphdr {
Tao Baod7db5942015-01-28 10:07:51 -080026 __be16 source;
27 __be16 dest;
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 __be32 seq;
30 __be32 ack_seq;
Ben Cheng655a7c02013-10-16 16:09:24 -070031#ifdef __LITTLE_ENDIAN_BITFIELD
Tao Baod7db5942015-01-28 10:07:51 -080032 __u16 res1 : 4, doff : 4, fin : 1, syn : 1, rst : 1, psh : 1, ack : 1, urg : 1, ece : 1, cwr : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070034#elif defined(__BIG_ENDIAN_BITFIELD)
Tao Baod7db5942015-01-28 10:07:51 -080035 __u16 doff : 4, res1 : 4, cwr : 1, ece : 1, urg : 1, ack : 1, psh : 1, rst : 1, syn : 1, fin : 1;
Ben Cheng655a7c02013-10-16 16:09:24 -070036#else
37#error "Adjust your <asm/byteorder.h> defines"
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039#endif
40 __be16 window;
41 __sum16 check;
42 __be16 urg_ptr;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070044};
45union tcp_word_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080046 struct tcphdr hdr;
47 __be32 words[5];
Ben Cheng655a7c02013-10-16 16:09:24 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070049};
Tao Baod7db5942015-01-28 10:07:51 -080050#define tcp_flag_word(tp) (((union tcp_word_hdr *) (tp))->words[3])
Ben Cheng655a7c02013-10-16 16:09:24 -070051enum {
Tao Baod7db5942015-01-28 10:07:51 -080052 TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000),
Ben Cheng655a7c02013-10-16 16:09:24 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080054 TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000),
55 TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000),
56 TCP_FLAG_ACK = __constant_cpu_to_be32(0x00100000),
57 TCP_FLAG_PSH = __constant_cpu_to_be32(0x00080000),
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 TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000),
60 TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000),
61 TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000),
62 TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000),
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000)
Ben Cheng655a7c02013-10-16 16:09:24 -070065};
Ben Cheng655a7c02013-10-16 16:09:24 -070066#define TCP_MSS_DEFAULT 536U
67#define TCP_MSS_DESIRED 1220U
Tao Baod7db5942015-01-28 10:07:51 -080068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070069#define TCP_NODELAY 1
70#define TCP_MAXSEG 2
Ben Cheng655a7c02013-10-16 16:09:24 -070071#define TCP_CORK 3
72#define TCP_KEEPIDLE 4
Tao Baod7db5942015-01-28 10:07:51 -080073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070074#define TCP_KEEPINTVL 5
75#define TCP_KEEPCNT 6
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define TCP_SYNCNT 7
77#define TCP_LINGER2 8
Tao Baod7db5942015-01-28 10:07:51 -080078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070079#define TCP_DEFER_ACCEPT 9
80#define TCP_WINDOW_CLAMP 10
Ben Cheng655a7c02013-10-16 16:09:24 -070081#define TCP_INFO 11
82#define TCP_QUICKACK 12
Tao Baod7db5942015-01-28 10:07:51 -080083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070084#define TCP_CONGESTION 13
85#define TCP_MD5SIG 14
Ben Cheng655a7c02013-10-16 16:09:24 -070086#define TCP_THIN_LINEAR_TIMEOUTS 16
87#define TCP_THIN_DUPACK 17
Tao Baod7db5942015-01-28 10:07:51 -080088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070089#define TCP_USER_TIMEOUT 18
90#define TCP_REPAIR 19
Ben Cheng655a7c02013-10-16 16:09:24 -070091#define TCP_REPAIR_QUEUE 20
92#define TCP_QUEUE_SEQ 21
Tao Baod7db5942015-01-28 10:07:51 -080093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define TCP_REPAIR_OPTIONS 22
95#define TCP_FASTOPEN 23
Ben Cheng655a7c02013-10-16 16:09:24 -070096#define TCP_TIMESTAMP 24
Christopher Ferris38062f92014-07-09 15:33:25 -070097#define TCP_NOTSENT_LOWAT 25
Tao Baod7db5942015-01-28 10:07:51 -080098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -070099struct tcp_repair_opt {
Tao Baod7db5942015-01-28 10:07:51 -0800100 __u32 opt_code;
101 __u32 opt_val;
Ben Cheng655a7c02013-10-16 16:09:24 -0700102};
Tao Baod7db5942015-01-28 10:07:51 -0800103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700104enum {
Tao Baod7db5942015-01-28 10:07:51 -0800105 TCP_NO_QUEUE,
106 TCP_RECV_QUEUE,
107 TCP_SEND_QUEUE,
Ben Cheng655a7c02013-10-16 16:09:24 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800109 TCP_QUEUES_NR,
Ben Cheng655a7c02013-10-16 16:09:24 -0700110};
Christopher Ferris38062f92014-07-09 15:33:25 -0700111#define TCPI_OPT_TIMESTAMPS 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700112#define TCPI_OPT_SACK 2
Tao Baod7db5942015-01-28 10:07:51 -0800113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define TCPI_OPT_WSCALE 4
115#define TCPI_OPT_ECN 8
Christopher Ferris38062f92014-07-09 15:33:25 -0700116#define TCPI_OPT_ECN_SEEN 16
Ben Cheng655a7c02013-10-16 16:09:24 -0700117#define TCPI_OPT_SYN_DATA 32
Tao Baod7db5942015-01-28 10:07:51 -0800118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700119enum tcp_ca_state {
Tao Baod7db5942015-01-28 10:07:51 -0800120 TCP_CA_Open = 0,
121#define TCPF_CA_Open (1 << TCP_CA_Open)
122 TCP_CA_Disorder = 1,
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#define TCPF_CA_Disorder (1 << TCP_CA_Disorder)
125 TCP_CA_CWR = 2,
126#define TCPF_CA_CWR (1 << TCP_CA_CWR)
127 TCP_CA_Recovery = 3,
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#define TCPF_CA_Recovery (1 << TCP_CA_Recovery)
130 TCP_CA_Loss = 4
131#define TCPF_CA_Loss (1 << TCP_CA_Loss)
Ben Cheng655a7c02013-10-16 16:09:24 -0700132};
Tao Baod7db5942015-01-28 10:07:51 -0800133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700134struct tcp_info {
Tao Baod7db5942015-01-28 10:07:51 -0800135 __u8 tcpi_state;
136 __u8 tcpi_ca_state;
137 __u8 tcpi_retransmits;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800139 __u8 tcpi_probes;
140 __u8 tcpi_backoff;
141 __u8 tcpi_options;
142 __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
Ben Cheng655a7c02013-10-16 16:09:24 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800144 __u32 tcpi_rto;
145 __u32 tcpi_ato;
146 __u32 tcpi_snd_mss;
147 __u32 tcpi_rcv_mss;
Ben Cheng655a7c02013-10-16 16:09:24 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800149 __u32 tcpi_unacked;
150 __u32 tcpi_sacked;
151 __u32 tcpi_lost;
152 __u32 tcpi_retrans;
Ben Cheng655a7c02013-10-16 16:09:24 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800154 __u32 tcpi_fackets;
155 __u32 tcpi_last_data_sent;
156 __u32 tcpi_last_ack_sent;
157 __u32 tcpi_last_data_recv;
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800159 __u32 tcpi_last_ack_recv;
160 __u32 tcpi_pmtu;
161 __u32 tcpi_rcv_ssthresh;
162 __u32 tcpi_rtt;
Ben Cheng655a7c02013-10-16 16:09:24 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800164 __u32 tcpi_rttvar;
165 __u32 tcpi_snd_ssthresh;
166 __u32 tcpi_snd_cwnd;
167 __u32 tcpi_advmss;
Ben Cheng655a7c02013-10-16 16:09:24 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800169 __u32 tcpi_reordering;
170 __u32 tcpi_rcv_rtt;
171 __u32 tcpi_rcv_space;
172 __u32 tcpi_total_retrans;
Ben Cheng655a7c02013-10-16 16:09:24 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800174 __u64 tcpi_pacing_rate;
175 __u64 tcpi_max_pacing_rate;
Ben Cheng655a7c02013-10-16 16:09:24 -0700176};
177#define TCP_MD5SIG_MAXKEYLEN 80
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 -0700179struct tcp_md5sig {
Tao Baod7db5942015-01-28 10:07:51 -0800180 struct __kernel_sockaddr_storage tcpm_addr;
181 __u16 __tcpm_pad1;
182 __u16 tcpm_keylen;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800184 __u32 __tcpm_pad2;
185 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN];
Ben Cheng655a7c02013-10-16 16:09:24 -0700186};
187#endif
Tao Baod7db5942015-01-28 10:07:51 -0800188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */