tcp.h revision d7db594b8d1dab36b711bd887a9dd21675c87243
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, doff : 4, fin : 1, syn : 1, rst : 1, psh : 1, ack : 1, urg : 1, ece : 1, cwr : 1;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#elif defined(__BIG_ENDIAN_BITFIELD)
35  __u16 doff : 4, res1 : 4, cwr : 1, ece : 1, urg : 1, ack : 1, psh : 1, rst : 1, syn : 1, fin : 1;
36#else
37#error "Adjust your <asm/byteorder.h> defines"
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#endif
40  __be16 window;
41  __sum16 check;
42  __be16 urg_ptr;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44};
45union tcp_word_hdr {
46  struct tcphdr hdr;
47  __be32 words[5];
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49};
50#define tcp_flag_word(tp) (((union tcp_word_hdr *) (tp))->words[3])
51enum {
52  TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000),
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  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),
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  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)
65};
66#define TCP_MSS_DEFAULT 536U
67#define TCP_MSS_DESIRED 1220U
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define TCP_NODELAY 1
70#define TCP_MAXSEG 2
71#define TCP_CORK 3
72#define TCP_KEEPIDLE 4
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define TCP_KEEPINTVL 5
75#define TCP_KEEPCNT 6
76#define TCP_SYNCNT 7
77#define TCP_LINGER2 8
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define TCP_DEFER_ACCEPT 9
80#define TCP_WINDOW_CLAMP 10
81#define TCP_INFO 11
82#define TCP_QUICKACK 12
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define TCP_CONGESTION 13
85#define TCP_MD5SIG 14
86#define TCP_THIN_LINEAR_TIMEOUTS 16
87#define TCP_THIN_DUPACK 17
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define TCP_USER_TIMEOUT 18
90#define TCP_REPAIR 19
91#define TCP_REPAIR_QUEUE 20
92#define TCP_QUEUE_SEQ 21
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define TCP_REPAIR_OPTIONS 22
95#define TCP_FASTOPEN 23
96#define TCP_TIMESTAMP 24
97#define TCP_NOTSENT_LOWAT 25
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99struct tcp_repair_opt {
100  __u32 opt_code;
101  __u32 opt_val;
102};
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104enum {
105  TCP_NO_QUEUE,
106  TCP_RECV_QUEUE,
107  TCP_SEND_QUEUE,
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  TCP_QUEUES_NR,
110};
111#define TCPI_OPT_TIMESTAMPS 1
112#define TCPI_OPT_SACK 2
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define TCPI_OPT_WSCALE 4
115#define TCPI_OPT_ECN 8
116#define TCPI_OPT_ECN_SEEN 16
117#define TCPI_OPT_SYN_DATA 32
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119enum tcp_ca_state {
120  TCP_CA_Open = 0,
121#define TCPF_CA_Open (1 << TCP_CA_Open)
122  TCP_CA_Disorder = 1,
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124#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,
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129#define TCPF_CA_Recovery (1 << TCP_CA_Recovery)
130  TCP_CA_Loss = 4
131#define TCPF_CA_Loss (1 << TCP_CA_Loss)
132};
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134struct tcp_info {
135  __u8 tcpi_state;
136  __u8 tcpi_ca_state;
137  __u8 tcpi_retransmits;
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  __u8 tcpi_probes;
140  __u8 tcpi_backoff;
141  __u8 tcpi_options;
142  __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  __u32 tcpi_rto;
145  __u32 tcpi_ato;
146  __u32 tcpi_snd_mss;
147  __u32 tcpi_rcv_mss;
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  __u32 tcpi_unacked;
150  __u32 tcpi_sacked;
151  __u32 tcpi_lost;
152  __u32 tcpi_retrans;
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154  __u32 tcpi_fackets;
155  __u32 tcpi_last_data_sent;
156  __u32 tcpi_last_ack_sent;
157  __u32 tcpi_last_data_recv;
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  __u32 tcpi_last_ack_recv;
160  __u32 tcpi_pmtu;
161  __u32 tcpi_rcv_ssthresh;
162  __u32 tcpi_rtt;
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164  __u32 tcpi_rttvar;
165  __u32 tcpi_snd_ssthresh;
166  __u32 tcpi_snd_cwnd;
167  __u32 tcpi_advmss;
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169  __u32 tcpi_reordering;
170  __u32 tcpi_rcv_rtt;
171  __u32 tcpi_rcv_space;
172  __u32 tcpi_total_retrans;
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  __u64 tcpi_pacing_rate;
175  __u64 tcpi_max_pacing_rate;
176};
177#define TCP_MD5SIG_MAXKEYLEN 80
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179struct tcp_md5sig {
180  struct __kernel_sockaddr_storage tcpm_addr;
181  __u16 __tcpm_pad1;
182  __u16 tcpm_keylen;
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184  __u32 __tcpm_pad2;
185  __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN];
186};
187#endif
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189