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_TCP_H
20#define _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 */
24struct tcphdr {
25 __u16 source;
26 __u16 dest;
27 __u32 seq;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 __u32 ack_seq;
30#ifdef __LITTLE_ENDIAN_BITFIELD
31 __u16 res1:4,
32 doff:4,
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 fin:1,
35 syn:1,
36 rst:1,
37 psh:1,
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 ack:1,
40 urg:1,
41 ece:1,
42 cwr:1;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#elif defined(__BIG_ENDIAN_BITFIELD)
45 __u16 doff:4,
46 res1:4,
47 cwr:1,
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 ece:1,
50 urg:1,
51 ack:1,
52 psh:1,
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 rst:1,
55 syn:1,
56 fin:1;
57#else
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#error "Adjust your <asm/byteorder.h> defines"
60#endif
61 __u16 window;
62 __u16 check;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 __u16 urg_ptr;
65};
66union tcp_word_hdr {
67 struct tcphdr hdr;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 __u32 words[5];
70};
71#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3])
72enum {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 TCP_FLAG_CWR = __constant_htonl(0x00800000),
75 TCP_FLAG_ECE = __constant_htonl(0x00400000),
76 TCP_FLAG_URG = __constant_htonl(0x00200000),
77 TCP_FLAG_ACK = __constant_htonl(0x00100000),
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 TCP_FLAG_PSH = __constant_htonl(0x00080000),
80 TCP_FLAG_RST = __constant_htonl(0x00040000),
81 TCP_FLAG_SYN = __constant_htonl(0x00020000),
82 TCP_FLAG_FIN = __constant_htonl(0x00010000),
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 TCP_RESERVED_BITS = __constant_htonl(0x0F000000),
85 TCP_DATA_OFFSET = __constant_htonl(0xF0000000)
86};
87#define TCP_NODELAY 1
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define TCP_MAXSEG 2
90#define TCP_CORK 3
91#define TCP_KEEPIDLE 4
92#define TCP_KEEPINTVL 5
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#define TCP_KEEPCNT 6
95#define TCP_SYNCNT 7
96#define TCP_LINGER2 8
97#define TCP_DEFER_ACCEPT 9
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#define TCP_WINDOW_CLAMP 10
100#define TCP_INFO 11
101#define TCP_QUICKACK 12
102#define TCP_CONGESTION 13
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#define TCPI_OPT_TIMESTAMPS 1
105#define TCPI_OPT_SACK 2
106#define TCPI_OPT_WSCALE 4
107#define TCPI_OPT_ECN 8
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109enum tcp_ca_state
110{
111 TCP_CA_Open = 0,
112#define TCPF_CA_Open (1<<TCP_CA_Open)
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 TCP_CA_Disorder = 1,
115#define TCPF_CA_Disorder (1<<TCP_CA_Disorder)
116 TCP_CA_CWR = 2,
117#define TCPF_CA_CWR (1<<TCP_CA_CWR)
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 TCP_CA_Recovery = 3,
120#define TCPF_CA_Recovery (1<<TCP_CA_Recovery)
121 TCP_CA_Loss = 4
122#define TCPF_CA_Loss (1<<TCP_CA_Loss)
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124};
125struct tcp_info
126{
127 __u8 tcpi_state;
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 __u8 tcpi_ca_state;
130 __u8 tcpi_retransmits;
131 __u8 tcpi_probes;
132 __u8 tcpi_backoff;
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 __u8 tcpi_options;
135 __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
136 __u32 tcpi_rto;
137 __u32 tcpi_ato;
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 __u32 tcpi_snd_mss;
140 __u32 tcpi_rcv_mss;
141 __u32 tcpi_unacked;
142 __u32 tcpi_sacked;
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 __u32 tcpi_lost;
145 __u32 tcpi_retrans;
146 __u32 tcpi_fackets;
147 __u32 tcpi_last_data_sent;
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 __u32 tcpi_last_ack_sent;
150 __u32 tcpi_last_data_recv;
151 __u32 tcpi_last_ack_recv;
152 __u32 tcpi_pmtu;
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 __u32 tcpi_rcv_ssthresh;
155 __u32 tcpi_rtt;
156 __u32 tcpi_rttvar;
157 __u32 tcpi_snd_ssthresh;
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 __u32 tcpi_snd_cwnd;
160 __u32 tcpi_advmss;
161 __u32 tcpi_reordering;
162 __u32 tcpi_rcv_rtt;
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164 __u32 tcpi_rcv_space;
165 __u32 tcpi_total_retrans;
166};
167#endif
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169