10 #define TCP_KEEPINTVL 5
14 #define TCP_DEFER_ACCEPT 9
15 #define TCP_WINDOW_CLAMP 10
17 #define TCP_QUICKACK 12
18 #define TCP_CONGESTION 13
20 #define TCP_THIN_LINEAR_TIMEOUTS 16
21 #define TCP_THIN_DUPACK 17
22 #define TCP_USER_TIMEOUT 18
24 #define TCP_REPAIR_QUEUE 20
25 #define TCP_QUEUE_SEQ 21
26 #define TCP_REPAIR_OPTIONS 22
27 #define TCP_FASTOPEN 23
28 #define TCP_TIMESTAMP 24
29 #define TCP_NOTSENT_LOWAT 25
30 #define TCP_CC_INFO 26
31 #define TCP_SAVE_SYN 27
32 #define TCP_SAVED_SYN 28
33 #define TCP_REPAIR_WINDOW 29
35 #define TCP_ESTABLISHED 1
36 #define TCP_SYN_SENT 2
37 #define TCP_SYN_RECV 3
38 #define TCP_FIN_WAIT1 4
39 #define TCP_FIN_WAIT2 5
40 #define TCP_TIME_WAIT 6
42 #define TCP_CLOSE_WAIT 8
43 #define TCP_LAST_ACK 9
45 #define TCP_CLOSING 11
51 TCP_NLA_SNDBUF_LIMITED,
54 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
57 #define TCPOPT_MAXSEG 2
58 #define TCPOPT_WINDOW 3
59 #define TCPOPT_SACK_PERMITTED 4
61 #define TCPOPT_TIMESTAMP 8
62 #define TCPOLEN_SACK_PERMITTED 2
63 #define TCPOLEN_WINDOW 3
64 #define TCPOLEN_MAXSEG 4
65 #define TCPOLEN_TIMESTAMP 10
69 #include <sys/types.h>
70 #include <sys/socket.h>
74 typedef uint32_t tcp_seq;
94 #if __BYTE_ORDER == __LITTLE_ENDIAN
126 #if __BYTE_ORDER == __LITTLE_ENDIAN
145 #define TCPI_OPT_TIMESTAMPS 1
146 #define TCPI_OPT_SACK 2
147 #define TCPI_OPT_WSCALE 4
148 #define TCPI_OPT_ECN 8
150 #define TCP_CA_Open 0
151 #define TCP_CA_Disorder 1
153 #define TCP_CA_Recovery 3
154 #define TCP_CA_Loss 4
158 uint8_t tcpi_ca_state;
159 uint8_t tcpi_retransmits;
161 uint8_t tcpi_backoff;
162 uint8_t tcpi_options;
163 uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
164 uint8_t tcpi_delivery_rate_app_limited : 1;
167 uint32_t tcpi_snd_mss;
168 uint32_t tcpi_rcv_mss;
169 uint32_t tcpi_unacked;
170 uint32_t tcpi_sacked;
172 uint32_t tcpi_retrans;
173 uint32_t tcpi_fackets;
174 uint32_t tcpi_last_data_sent;
175 uint32_t tcpi_last_ack_sent;
176 uint32_t tcpi_last_data_recv;
177 uint32_t tcpi_last_ack_recv;
179 uint32_t tcpi_rcv_ssthresh;
181 uint32_t tcpi_rttvar;
182 uint32_t tcpi_snd_ssthresh;
183 uint32_t tcpi_snd_cwnd;
184 uint32_t tcpi_advmss;
185 uint32_t tcpi_reordering;
186 uint32_t tcpi_rcv_rtt;
187 uint32_t tcpi_rcv_space;
188 uint32_t tcpi_total_retrans;
189 uint64_t tcpi_pacing_rate;
190 uint64_t tcpi_max_pacing_rate;
191 uint64_t tcpi_bytes_acked;
192 uint64_t tcpi_bytes_received;
193 uint32_t tcpi_segs_out;
194 uint32_t tcpi_segs_in;
195 uint32_t tcpi_notsent_bytes;
196 uint32_t tcpi_min_rtt;
197 uint32_t tcpi_data_segs_in;
198 uint32_t tcpi_data_segs_out;
199 uint64_t tcpi_delivery_rate;
200 uint64_t tcpi_busy_time;
201 uint64_t tcpi_rwnd_limited;
202 uint64_t tcpi_sndbuf_limited;
205 #define TCP_MD5SIG_MAXKEYLEN 80
208 struct sockaddr_storage tcpm_addr;
209 uint16_t __tcpm_pad1;
210 uint16_t tcpm_keylen;
211 uint32_t __tcpm_pad2;
212 uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN];
215 struct tcp_repair_window {