• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>
25  struct 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  };
45  union 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])
51  enum {
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 */
99  #define TCP_CC_INFO 26
100  #define TCP_SAVE_SYN 27
101  #define TCP_SAVED_SYN 28
102  struct tcp_repair_opt {
103  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104    __u32 opt_code;
105    __u32 opt_val;
106  };
107  enum {
108  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109    TCP_NO_QUEUE,
110    TCP_RECV_QUEUE,
111    TCP_SEND_QUEUE,
112    TCP_QUEUES_NR,
113  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  };
115  #define TCPI_OPT_TIMESTAMPS 1
116  #define TCPI_OPT_SACK 2
117  #define TCPI_OPT_WSCALE 4
118  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  #define TCPI_OPT_ECN 8
120  #define TCPI_OPT_ECN_SEEN 16
121  #define TCPI_OPT_SYN_DATA 32
122  enum tcp_ca_state {
123  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124    TCP_CA_Open = 0,
125  #define TCPF_CA_Open (1 << TCP_CA_Open)
126    TCP_CA_Disorder = 1,
127  #define TCPF_CA_Disorder (1 << TCP_CA_Disorder)
128  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129    TCP_CA_CWR = 2,
130  #define TCPF_CA_CWR (1 << TCP_CA_CWR)
131    TCP_CA_Recovery = 3,
132  #define TCPF_CA_Recovery (1 << TCP_CA_Recovery)
133  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134    TCP_CA_Loss = 4
135  #define TCPF_CA_Loss (1 << TCP_CA_Loss)
136  };
137  struct tcp_info {
138  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139    __u8 tcpi_state;
140    __u8 tcpi_ca_state;
141    __u8 tcpi_retransmits;
142    __u8 tcpi_probes;
143  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144    __u8 tcpi_backoff;
145    __u8 tcpi_options;
146    __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
147    __u32 tcpi_rto;
148  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149    __u32 tcpi_ato;
150    __u32 tcpi_snd_mss;
151    __u32 tcpi_rcv_mss;
152    __u32 tcpi_unacked;
153  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154    __u32 tcpi_sacked;
155    __u32 tcpi_lost;
156    __u32 tcpi_retrans;
157    __u32 tcpi_fackets;
158  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159    __u32 tcpi_last_data_sent;
160    __u32 tcpi_last_ack_sent;
161    __u32 tcpi_last_data_recv;
162    __u32 tcpi_last_ack_recv;
163  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164    __u32 tcpi_pmtu;
165    __u32 tcpi_rcv_ssthresh;
166    __u32 tcpi_rtt;
167    __u32 tcpi_rttvar;
168  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169    __u32 tcpi_snd_ssthresh;
170    __u32 tcpi_snd_cwnd;
171    __u32 tcpi_advmss;
172    __u32 tcpi_reordering;
173  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174    __u32 tcpi_rcv_rtt;
175    __u32 tcpi_rcv_space;
176    __u32 tcpi_total_retrans;
177    __u64 tcpi_pacing_rate;
178  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179    __u64 tcpi_max_pacing_rate;
180    __u64 tcpi_bytes_acked;
181    __u64 tcpi_bytes_received;
182    __u32 tcpi_segs_out;
183  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184    __u32 tcpi_segs_in;
185  };
186  #define TCP_MD5SIG_MAXKEYLEN 80
187  struct tcp_md5sig {
188  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189    struct __kernel_sockaddr_storage tcpm_addr;
190    __u16 __tcpm_pad1;
191    __u16 tcpm_keylen;
192    __u32 __tcpm_pad2;
193  /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194    __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN];
195  };
196  #endif
197