blob: d57ad0ce44d995d04690d4aa850967e93a5a50ed [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 {
26 __be16 source;
27 __be16 dest;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 __be32 seq;
30 __be32 ack_seq;
31#ifdef __LITTLE_ENDIAN_BITFIELD
32 __u16 res1:4,
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 doff:4,
35 fin:1,
36 syn:1,
37 rst:1,
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 psh:1,
40 ack:1,
41 urg:1,
42 ece:1,
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 cwr:1;
45#elif defined(__BIG_ENDIAN_BITFIELD)
46 __u16 doff:4,
47 res1:4,
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 cwr:1,
50 ece:1,
51 urg:1,
52 ack:1,
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 psh:1,
55 rst:1,
56 syn:1,
57 fin:1;
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#else
60#error "Adjust your <asm/byteorder.h> defines"
61#endif
62 __be16 window;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 __sum16 check;
65 __be16 urg_ptr;
66};
67union tcp_word_hdr {
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 struct tcphdr hdr;
70 __be32 words[5];
71};
72#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3])
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74enum {
75 TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000),
76 TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000),
77 TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000),
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 TCP_FLAG_ACK = __constant_cpu_to_be32(0x00100000),
80 TCP_FLAG_PSH = __constant_cpu_to_be32(0x00080000),
81 TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000),
82 TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000),
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000),
85 TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000),
86 TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000)
87};
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define TCP_MSS_DEFAULT 536U
90#define TCP_MSS_DESIRED 1220U
91#define TCP_NODELAY 1
92#define TCP_MAXSEG 2
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define TCP_CORK 3
95#define TCP_KEEPIDLE 4
96#define TCP_KEEPINTVL 5
97#define TCP_KEEPCNT 6
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#define TCP_SYNCNT 7
100#define TCP_LINGER2 8
101#define TCP_DEFER_ACCEPT 9
102#define TCP_WINDOW_CLAMP 10
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#define TCP_INFO 11
105#define TCP_QUICKACK 12
106#define TCP_CONGESTION 13
107#define TCP_MD5SIG 14
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#define TCP_THIN_LINEAR_TIMEOUTS 16
110#define TCP_THIN_DUPACK 17
111#define TCP_USER_TIMEOUT 18
112#define TCP_REPAIR 19
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define TCP_REPAIR_QUEUE 20
115#define TCP_QUEUE_SEQ 21
116#define TCP_REPAIR_OPTIONS 22
117#define TCP_FASTOPEN 23
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119#define TCP_TIMESTAMP 24
Christopher Ferris38062f92014-07-09 15:33:25 -0700120#define TCP_NOTSENT_LOWAT 25
Ben Cheng655a7c02013-10-16 16:09:24 -0700121struct tcp_repair_opt {
122 __u32 opt_code;
Ben Cheng655a7c02013-10-16 16:09:24 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700124 __u32 opt_val;
Ben Cheng655a7c02013-10-16 16:09:24 -0700125};
126enum {
127 TCP_NO_QUEUE,
Ben Cheng655a7c02013-10-16 16:09:24 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700129 TCP_RECV_QUEUE,
Ben Cheng655a7c02013-10-16 16:09:24 -0700130 TCP_SEND_QUEUE,
131 TCP_QUEUES_NR,
132};
Ben Cheng655a7c02013-10-16 16:09:24 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700134#define TCPI_OPT_TIMESTAMPS 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700135#define TCPI_OPT_SACK 2
136#define TCPI_OPT_WSCALE 4
137#define TCPI_OPT_ECN 8
Ben Cheng655a7c02013-10-16 16:09:24 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700139#define TCPI_OPT_ECN_SEEN 16
Ben Cheng655a7c02013-10-16 16:09:24 -0700140#define TCPI_OPT_SYN_DATA 32
141enum tcp_ca_state {
142 TCP_CA_Open = 0,
Ben Cheng655a7c02013-10-16 16:09:24 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700144#define TCPF_CA_Open (1<<TCP_CA_Open)
Ben Cheng655a7c02013-10-16 16:09:24 -0700145 TCP_CA_Disorder = 1,
146#define TCPF_CA_Disorder (1<<TCP_CA_Disorder)
147 TCP_CA_CWR = 2,
Ben Cheng655a7c02013-10-16 16:09:24 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700149#define TCPF_CA_CWR (1<<TCP_CA_CWR)
Ben Cheng655a7c02013-10-16 16:09:24 -0700150 TCP_CA_Recovery = 3,
151#define TCPF_CA_Recovery (1<<TCP_CA_Recovery)
152 TCP_CA_Loss = 4
Ben Cheng655a7c02013-10-16 16:09:24 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700154#define TCPF_CA_Loss (1<<TCP_CA_Loss)
Ben Cheng655a7c02013-10-16 16:09:24 -0700155};
156struct tcp_info {
157 __u8 tcpi_state;
Ben Cheng655a7c02013-10-16 16:09:24 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700159 __u8 tcpi_ca_state;
Ben Cheng655a7c02013-10-16 16:09:24 -0700160 __u8 tcpi_retransmits;
161 __u8 tcpi_probes;
162 __u8 tcpi_backoff;
Ben Cheng655a7c02013-10-16 16:09:24 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700164 __u8 tcpi_options;
Ben Cheng655a7c02013-10-16 16:09:24 -0700165 __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
166 __u32 tcpi_rto;
167 __u32 tcpi_ato;
Ben Cheng655a7c02013-10-16 16:09:24 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700169 __u32 tcpi_snd_mss;
Ben Cheng655a7c02013-10-16 16:09:24 -0700170 __u32 tcpi_rcv_mss;
171 __u32 tcpi_unacked;
172 __u32 tcpi_sacked;
Ben Cheng655a7c02013-10-16 16:09:24 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700174 __u32 tcpi_lost;
Ben Cheng655a7c02013-10-16 16:09:24 -0700175 __u32 tcpi_retrans;
176 __u32 tcpi_fackets;
177 __u32 tcpi_last_data_sent;
Ben Cheng655a7c02013-10-16 16:09:24 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700179 __u32 tcpi_last_ack_sent;
Ben Cheng655a7c02013-10-16 16:09:24 -0700180 __u32 tcpi_last_data_recv;
181 __u32 tcpi_last_ack_recv;
182 __u32 tcpi_pmtu;
Ben Cheng655a7c02013-10-16 16:09:24 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700184 __u32 tcpi_rcv_ssthresh;
Ben Cheng655a7c02013-10-16 16:09:24 -0700185 __u32 tcpi_rtt;
186 __u32 tcpi_rttvar;
187 __u32 tcpi_snd_ssthresh;
Ben Cheng655a7c02013-10-16 16:09:24 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700189 __u32 tcpi_snd_cwnd;
Ben Cheng655a7c02013-10-16 16:09:24 -0700190 __u32 tcpi_advmss;
191 __u32 tcpi_reordering;
192 __u32 tcpi_rcv_rtt;
Ben Cheng655a7c02013-10-16 16:09:24 -0700193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris38062f92014-07-09 15:33:25 -0700194 __u32 tcpi_rcv_space;
Ben Cheng655a7c02013-10-16 16:09:24 -0700195 __u32 tcpi_total_retrans;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700196 __u64 tcpi_pacing_rate;
197 __u64 tcpi_max_pacing_rate;
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700199};
200#define TCP_MD5SIG_MAXKEYLEN 80
Christopher Ferris38062f92014-07-09 15:33:25 -0700201struct tcp_md5sig {
Ben Cheng655a7c02013-10-16 16:09:24 -0700202 struct __kernel_sockaddr_storage tcpm_addr;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700204 __u16 __tcpm_pad1;
205 __u16 tcpm_keylen;
Christopher Ferris38062f92014-07-09 15:33:25 -0700206 __u32 __tcpm_pad2;
Ben Cheng655a7c02013-10-16 16:09:24 -0700207 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN];
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Ben Cheng655a7c02013-10-16 16:09:24 -0700209};
210#endif