.. | .. |
---|
127 | 127 | |
---|
128 | 128 | #define TCP_CM_INQ TCP_INQ |
---|
129 | 129 | |
---|
| 130 | +#define TCP_TX_DELAY 37 /* delay outgoing packets by XX usec */ |
---|
| 131 | + |
---|
| 132 | + |
---|
130 | 133 | #define TCP_REPAIR_ON 1 |
---|
131 | 134 | #define TCP_REPAIR_OFF 0 |
---|
132 | 135 | #define TCP_REPAIR_OFF_NO_WP -1 /* Turn off without window probes */ |
---|
.. | .. |
---|
152 | 155 | TCP_QUEUES_NR, |
---|
153 | 156 | }; |
---|
154 | 157 | |
---|
| 158 | +/* why fastopen failed from client perspective */ |
---|
| 159 | +enum tcp_fastopen_client_fail { |
---|
| 160 | + TFO_STATUS_UNSPEC, /* catch-all */ |
---|
| 161 | + TFO_COOKIE_UNAVAILABLE, /* if not in TFO_CLIENT_NO_COOKIE mode */ |
---|
| 162 | + TFO_DATA_NOT_ACKED, /* SYN-ACK did not ack SYN data */ |
---|
| 163 | + TFO_SYN_RETRANSMITTED, /* SYN-ACK did not ack SYN data after timeout */ |
---|
| 164 | +}; |
---|
| 165 | + |
---|
155 | 166 | /* for TCP_INFO socket option */ |
---|
156 | 167 | #define TCPI_OPT_TIMESTAMPS 1 |
---|
157 | 168 | #define TCPI_OPT_SACK 2 |
---|
.. | .. |
---|
160 | 171 | #define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ |
---|
161 | 172 | #define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */ |
---|
162 | 173 | |
---|
| 174 | +/* |
---|
| 175 | + * Sender's congestion state indicating normal or abnormal situations |
---|
| 176 | + * in the last round of packets sent. The state is driven by the ACK |
---|
| 177 | + * information and timer events. |
---|
| 178 | + */ |
---|
163 | 179 | enum tcp_ca_state { |
---|
| 180 | + /* |
---|
| 181 | + * Nothing bad has been observed recently. |
---|
| 182 | + * No apparent reordering, packet loss, or ECN marks. |
---|
| 183 | + */ |
---|
164 | 184 | TCP_CA_Open = 0, |
---|
165 | 185 | #define TCPF_CA_Open (1<<TCP_CA_Open) |
---|
| 186 | + /* |
---|
| 187 | + * The sender enters disordered state when it has received DUPACKs or |
---|
| 188 | + * SACKs in the last round of packets sent. This could be due to packet |
---|
| 189 | + * loss or reordering but needs further information to confirm packets |
---|
| 190 | + * have been lost. |
---|
| 191 | + */ |
---|
166 | 192 | TCP_CA_Disorder = 1, |
---|
167 | 193 | #define TCPF_CA_Disorder (1<<TCP_CA_Disorder) |
---|
| 194 | + /* |
---|
| 195 | + * The sender enters Congestion Window Reduction (CWR) state when it |
---|
| 196 | + * has received ACKs with ECN-ECE marks, or has experienced congestion |
---|
| 197 | + * or packet discard on the sender host (e.g. qdisc). |
---|
| 198 | + */ |
---|
168 | 199 | TCP_CA_CWR = 2, |
---|
169 | 200 | #define TCPF_CA_CWR (1<<TCP_CA_CWR) |
---|
| 201 | + /* |
---|
| 202 | + * The sender is in fast recovery and retransmitting lost packets, |
---|
| 203 | + * typically triggered by ACK events. |
---|
| 204 | + */ |
---|
170 | 205 | TCP_CA_Recovery = 3, |
---|
171 | 206 | #define TCPF_CA_Recovery (1<<TCP_CA_Recovery) |
---|
| 207 | + /* |
---|
| 208 | + * The sender is in loss recovery triggered by retransmission timeout. |
---|
| 209 | + */ |
---|
172 | 210 | TCP_CA_Loss = 4 |
---|
173 | 211 | #define TCPF_CA_Loss (1<<TCP_CA_Loss) |
---|
174 | 212 | }; |
---|
.. | .. |
---|
181 | 219 | __u8 tcpi_backoff; |
---|
182 | 220 | __u8 tcpi_options; |
---|
183 | 221 | __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; |
---|
184 | | - __u8 tcpi_delivery_rate_app_limited:1; |
---|
| 222 | + __u8 tcpi_delivery_rate_app_limited:1, tcpi_fastopen_client_fail:2; |
---|
185 | 223 | |
---|
186 | 224 | __u32 tcpi_rto; |
---|
187 | 225 | __u32 tcpi_ato; |
---|
.. | .. |
---|
240 | 278 | __u64 tcpi_bytes_retrans; /* RFC4898 tcpEStatsPerfOctetsRetrans */ |
---|
241 | 279 | __u32 tcpi_dsack_dups; /* RFC4898 tcpEStatsStackDSACKDups */ |
---|
242 | 280 | __u32 tcpi_reord_seen; /* reordering events seen */ |
---|
| 281 | + |
---|
| 282 | + __u32 tcpi_rcv_ooopack; /* Out-of-order packets received */ |
---|
| 283 | + |
---|
| 284 | + __u32 tcpi_snd_wnd; /* peer's advertised receive window after |
---|
| 285 | + * scaling (bytes) |
---|
| 286 | + */ |
---|
243 | 287 | }; |
---|
244 | 288 | |
---|
245 | 289 | /* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */ |
---|
.. | .. |
---|
266 | 310 | TCP_NLA_BYTES_RETRANS, /* Data bytes retransmitted */ |
---|
267 | 311 | TCP_NLA_DSACK_DUPS, /* DSACK blocks received */ |
---|
268 | 312 | TCP_NLA_REORD_SEEN, /* reordering events seen */ |
---|
| 313 | + TCP_NLA_SRTT, /* smoothed RTT in usecs */ |
---|
| 314 | + TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */ |
---|
| 315 | + TCP_NLA_BYTES_NOTSENT, /* Bytes in write queue not yet sent */ |
---|
| 316 | + TCP_NLA_EDT, /* Earliest departure time (CLOCK_MONOTONIC) */ |
---|
269 | 317 | }; |
---|
270 | 318 | |
---|
271 | 319 | /* for TCP_MD5SIG socket option */ |
---|
272 | 320 | #define TCP_MD5SIG_MAXKEYLEN 80 |
---|
273 | 321 | |
---|
274 | 322 | /* tcp_md5sig extension flags for TCP_MD5SIG_EXT */ |
---|
275 | | -#define TCP_MD5SIG_FLAG_PREFIX 1 /* address prefix length */ |
---|
| 323 | +#define TCP_MD5SIG_FLAG_PREFIX 0x1 /* address prefix length */ |
---|
| 324 | +#define TCP_MD5SIG_FLAG_IFINDEX 0x2 /* ifindex set */ |
---|
276 | 325 | |
---|
277 | 326 | struct tcp_md5sig { |
---|
278 | 327 | struct __kernel_sockaddr_storage tcpm_addr; /* address associated */ |
---|
279 | 328 | __u8 tcpm_flags; /* extension flags */ |
---|
280 | 329 | __u8 tcpm_prefixlen; /* address prefix */ |
---|
281 | 330 | __u16 tcpm_keylen; /* key length */ |
---|
282 | | - __u32 __tcpm_pad; /* zero */ |
---|
| 331 | + int tcpm_ifindex; /* device index for scope */ |
---|
283 | 332 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ |
---|
284 | 333 | }; |
---|
285 | 334 | |
---|
.. | .. |
---|
298 | 347 | __u64 address; /* in: address of mapping */ |
---|
299 | 348 | __u32 length; /* in/out: number of bytes to map/mapped */ |
---|
300 | 349 | __u32 recv_skip_hint; /* out: amount of bytes to skip */ |
---|
| 350 | + __u32 inq; /* out: amount of bytes in read queue */ |
---|
| 351 | + __s32 err; /* out: socket error */ |
---|
| 352 | + __u64 copybuf_address; /* in: copybuf address (small reads) */ |
---|
| 353 | + __s32 copybuf_len; /* in/out: copybuf bytes avail/used or error */ |
---|
301 | 354 | }; |
---|
302 | 355 | #endif /* _UAPI_LINUX_TCP_H */ |
---|