tcp.h revision 38062f954c637861348dd8078cefb73554e6f12c
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_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
120#define TCP_NOTSENT_LOWAT 25
121struct tcp_repair_opt {
122 __u32 opt_code;
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 __u32 opt_val;
125};
126enum {
127 TCP_NO_QUEUE,
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 TCP_RECV_QUEUE,
130 TCP_SEND_QUEUE,
131 TCP_QUEUES_NR,
132};
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134#define TCPI_OPT_TIMESTAMPS 1
135#define TCPI_OPT_SACK 2
136#define TCPI_OPT_WSCALE 4
137#define TCPI_OPT_ECN 8
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#define TCPI_OPT_ECN_SEEN 16
140#define TCPI_OPT_SYN_DATA 32
141enum tcp_ca_state {
142 TCP_CA_Open = 0,
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144#define TCPF_CA_Open (1<<TCP_CA_Open)
145 TCP_CA_Disorder = 1,
146#define TCPF_CA_Disorder (1<<TCP_CA_Disorder)
147 TCP_CA_CWR = 2,
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149#define TCPF_CA_CWR (1<<TCP_CA_CWR)
150 TCP_CA_Recovery = 3,
151#define TCPF_CA_Recovery (1<<TCP_CA_Recovery)
152 TCP_CA_Loss = 4
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154#define TCPF_CA_Loss (1<<TCP_CA_Loss)
155};
156struct tcp_info {
157 __u8 tcpi_state;
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 __u8 tcpi_ca_state;
160 __u8 tcpi_retransmits;
161 __u8 tcpi_probes;
162 __u8 tcpi_backoff;
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 __u8 tcpi_options;
165 __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
166 __u32 tcpi_rto;
167 __u32 tcpi_ato;
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 __u32 tcpi_snd_mss;
170 __u32 tcpi_rcv_mss;
171 __u32 tcpi_unacked;
172 __u32 tcpi_sacked;
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 __u32 tcpi_lost;
175 __u32 tcpi_retrans;
176 __u32 tcpi_fackets;
177 __u32 tcpi_last_data_sent;
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 __u32 tcpi_last_ack_sent;
180 __u32 tcpi_last_data_recv;
181 __u32 tcpi_last_ack_recv;
182 __u32 tcpi_pmtu;
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 __u32 tcpi_rcv_ssthresh;
185 __u32 tcpi_rtt;
186 __u32 tcpi_rttvar;
187 __u32 tcpi_snd_ssthresh;
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 __u32 tcpi_snd_cwnd;
190 __u32 tcpi_advmss;
191 __u32 tcpi_reordering;
192 __u32 tcpi_rcv_rtt;
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 __u32 tcpi_rcv_space;
195 __u32 tcpi_total_retrans;
196};
197#define TCP_MD5SIG_MAXKEYLEN 80
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199struct tcp_md5sig {
200 struct __kernel_sockaddr_storage tcpm_addr;
201 __u16 __tcpm_pad1;
202 __u16 tcpm_keylen;
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 __u32 __tcpm_pad2;
205 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN];
206};
207#endif
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209