Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_TCP_H |
| 8 | #define _UAPI_LINUX_TCP_H |
Elliott Hughes | b4a9b17 | 2023-11-28 15:41:54 -0800 | [diff] [blame] | 9 | #include <bits/tcphdr.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 10 | #include <linux/types.h> |
| 11 | #include <asm/byteorder.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 12 | #include <linux/socket.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 13 | union tcp_word_hdr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 14 | struct tcphdr hdr; |
| 15 | __be32 words[5]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 16 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 17 | #define tcp_flag_word(tp) (((union tcp_word_hdr *) (tp))->words[3]) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 18 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000), |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 20 | TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000), |
| 21 | TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000), |
| 22 | TCP_FLAG_ACK = __constant_cpu_to_be32(0x00100000), |
| 23 | TCP_FLAG_PSH = __constant_cpu_to_be32(0x00080000), |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 | TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000), |
| 25 | TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000), |
| 26 | TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000), |
| 27 | TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000), |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 28 | TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 29 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | #define TCP_MSS_DEFAULT 536U |
| 31 | #define TCP_MSS_DESIRED 1220U |
| 32 | #define TCP_NODELAY 1 |
| 33 | #define TCP_MAXSEG 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | #define TCP_CORK 3 |
| 35 | #define TCP_KEEPIDLE 4 |
| 36 | #define TCP_KEEPINTVL 5 |
| 37 | #define TCP_KEEPCNT 6 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | #define TCP_SYNCNT 7 |
| 39 | #define TCP_LINGER2 8 |
| 40 | #define TCP_DEFER_ACCEPT 9 |
| 41 | #define TCP_WINDOW_CLAMP 10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | #define TCP_INFO 11 |
| 43 | #define TCP_QUICKACK 12 |
| 44 | #define TCP_CONGESTION 13 |
| 45 | #define TCP_MD5SIG 14 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | #define TCP_THIN_LINEAR_TIMEOUTS 16 |
| 47 | #define TCP_THIN_DUPACK 17 |
| 48 | #define TCP_USER_TIMEOUT 18 |
| 49 | #define TCP_REPAIR 19 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 50 | #define TCP_REPAIR_QUEUE 20 |
| 51 | #define TCP_QUEUE_SEQ 21 |
| 52 | #define TCP_REPAIR_OPTIONS 22 |
| 53 | #define TCP_FASTOPEN 23 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 54 | #define TCP_TIMESTAMP 24 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 55 | #define TCP_NOTSENT_LOWAT 25 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 56 | #define TCP_CC_INFO 26 |
| 57 | #define TCP_SAVE_SYN 27 |
| 58 | #define TCP_SAVED_SYN 28 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 59 | #define TCP_REPAIR_WINDOW 29 |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 60 | #define TCP_FASTOPEN_CONNECT 30 |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 61 | #define TCP_ULP 31 |
| 62 | #define TCP_MD5SIG_EXT 32 |
Christopher Ferris | 934ec94 | 2018-01-31 15:29:16 -0800 | [diff] [blame] | 63 | #define TCP_FASTOPEN_KEY 33 |
| 64 | #define TCP_FASTOPEN_NO_COOKIE 34 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 65 | #define TCP_ZEROCOPY_RECEIVE 35 |
| 66 | #define TCP_INQ 36 |
| 67 | #define TCP_CM_INQ TCP_INQ |
Christopher Ferris | b8a95e2 | 2019-10-02 18:29:20 -0700 | [diff] [blame] | 68 | #define TCP_TX_DELAY 37 |
Christopher Ferris | 0f79521 | 2024-01-17 14:17:28 -0800 | [diff] [blame] | 69 | #define TCP_AO_ADD_KEY 38 |
| 70 | #define TCP_AO_DEL_KEY 39 |
| 71 | #define TCP_AO_INFO 40 |
| 72 | #define TCP_AO_GET_KEYS 41 |
| 73 | #define TCP_AO_REPAIR 42 |
Christopher Ferris | 7ac54f5 | 2024-08-07 21:07:12 +0000 | [diff] [blame] | 74 | #define TCP_IS_MPTCP 43 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 75 | #define TCP_REPAIR_ON 1 |
| 76 | #define TCP_REPAIR_OFF 0 |
| 77 | #define TCP_REPAIR_OFF_NO_WP - 1 |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 78 | struct tcp_repair_opt { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | __u32 opt_code; |
| 80 | __u32 opt_val; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 81 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 82 | struct tcp_repair_window { |
| 83 | __u32 snd_wl1; |
| 84 | __u32 snd_wnd; |
| 85 | __u32 max_window; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 86 | __u32 rcv_wnd; |
| 87 | __u32 rcv_wup; |
| 88 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 89 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 90 | TCP_NO_QUEUE, |
| 91 | TCP_RECV_QUEUE, |
| 92 | TCP_SEND_QUEUE, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 93 | TCP_QUEUES_NR, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 94 | }; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 95 | enum tcp_fastopen_client_fail { |
| 96 | TFO_STATUS_UNSPEC, |
| 97 | TFO_COOKIE_UNAVAILABLE, |
| 98 | TFO_DATA_NOT_ACKED, |
| 99 | TFO_SYN_RETRANSMITTED, |
| 100 | }; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 101 | #define TCPI_OPT_TIMESTAMPS 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 102 | #define TCPI_OPT_SACK 2 |
| 103 | #define TCPI_OPT_WSCALE 4 |
| 104 | #define TCPI_OPT_ECN 8 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 105 | #define TCPI_OPT_ECN_SEEN 16 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 106 | #define TCPI_OPT_SYN_DATA 32 |
Christopher Ferris | 0f79521 | 2024-01-17 14:17:28 -0800 | [diff] [blame] | 107 | #define TCPI_OPT_USEC_TS 64 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 108 | enum tcp_ca_state { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 109 | TCP_CA_Open = 0, |
| 110 | #define TCPF_CA_Open (1 << TCP_CA_Open) |
| 111 | TCP_CA_Disorder = 1, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 112 | #define TCPF_CA_Disorder (1 << TCP_CA_Disorder) |
| 113 | TCP_CA_CWR = 2, |
| 114 | #define TCPF_CA_CWR (1 << TCP_CA_CWR) |
| 115 | TCP_CA_Recovery = 3, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 116 | #define TCPF_CA_Recovery (1 << TCP_CA_Recovery) |
| 117 | TCP_CA_Loss = 4 |
| 118 | #define TCPF_CA_Loss (1 << TCP_CA_Loss) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 119 | }; |
| 120 | struct tcp_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 121 | __u8 tcpi_state; |
| 122 | __u8 tcpi_ca_state; |
| 123 | __u8 tcpi_retransmits; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 124 | __u8 tcpi_probes; |
| 125 | __u8 tcpi_backoff; |
| 126 | __u8 tcpi_options; |
| 127 | __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 128 | __u8 tcpi_delivery_rate_app_limited : 1, tcpi_fastopen_client_fail : 2; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 129 | __u32 tcpi_rto; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 130 | __u32 tcpi_ato; |
| 131 | __u32 tcpi_snd_mss; |
| 132 | __u32 tcpi_rcv_mss; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 133 | __u32 tcpi_unacked; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 134 | __u32 tcpi_sacked; |
| 135 | __u32 tcpi_lost; |
| 136 | __u32 tcpi_retrans; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 137 | __u32 tcpi_fackets; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 138 | __u32 tcpi_last_data_sent; |
| 139 | __u32 tcpi_last_ack_sent; |
| 140 | __u32 tcpi_last_data_recv; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 141 | __u32 tcpi_last_ack_recv; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 142 | __u32 tcpi_pmtu; |
| 143 | __u32 tcpi_rcv_ssthresh; |
| 144 | __u32 tcpi_rtt; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 145 | __u32 tcpi_rttvar; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 146 | __u32 tcpi_snd_ssthresh; |
| 147 | __u32 tcpi_snd_cwnd; |
| 148 | __u32 tcpi_advmss; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 149 | __u32 tcpi_reordering; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 150 | __u32 tcpi_rcv_rtt; |
| 151 | __u32 tcpi_rcv_space; |
| 152 | __u32 tcpi_total_retrans; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 153 | __u64 tcpi_pacing_rate; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 154 | __u64 tcpi_max_pacing_rate; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 155 | __u64 tcpi_bytes_acked; |
| 156 | __u64 tcpi_bytes_received; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 157 | __u32 tcpi_segs_out; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 158 | __u32 tcpi_segs_in; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 159 | __u32 tcpi_notsent_bytes; |
| 160 | __u32 tcpi_min_rtt; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 161 | __u32 tcpi_data_segs_in; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 162 | __u32 tcpi_data_segs_out; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 163 | __u64 tcpi_delivery_rate; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 164 | __u64 tcpi_busy_time; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 165 | __u64 tcpi_rwnd_limited; |
| 166 | __u64 tcpi_sndbuf_limited; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 167 | __u32 tcpi_delivered; |
| 168 | __u32 tcpi_delivered_ce; |
| 169 | __u64 tcpi_bytes_sent; |
| 170 | __u64 tcpi_bytes_retrans; |
| 171 | __u32 tcpi_dsack_dups; |
| 172 | __u32 tcpi_reord_seen; |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 173 | __u32 tcpi_rcv_ooopack; |
| 174 | __u32 tcpi_snd_wnd; |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 175 | __u32 tcpi_rcv_wnd; |
| 176 | __u32 tcpi_rehash; |
Christopher Ferris | 0f79521 | 2024-01-17 14:17:28 -0800 | [diff] [blame] | 177 | __u16 tcpi_total_rto; |
| 178 | __u16 tcpi_total_rto_recoveries; |
| 179 | __u32 tcpi_total_rto_time; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 180 | }; |
| 181 | enum { |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 182 | TCP_NLA_PAD, |
| 183 | TCP_NLA_BUSY, |
| 184 | TCP_NLA_RWND_LIMITED, |
| 185 | TCP_NLA_SNDBUF_LIMITED, |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 186 | TCP_NLA_DATA_SEGS_OUT, |
| 187 | TCP_NLA_TOTAL_RETRANS, |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 188 | TCP_NLA_PACING_RATE, |
| 189 | TCP_NLA_DELIVERY_RATE, |
| 190 | TCP_NLA_SND_CWND, |
| 191 | TCP_NLA_REORDERING, |
| 192 | TCP_NLA_MIN_RTT, |
| 193 | TCP_NLA_RECUR_RETRANS, |
| 194 | TCP_NLA_DELIVERY_RATE_APP_LMT, |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 195 | TCP_NLA_SNDQ_SIZE, |
| 196 | TCP_NLA_CA_STATE, |
| 197 | TCP_NLA_SND_SSTHRESH, |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 198 | TCP_NLA_DELIVERED, |
| 199 | TCP_NLA_DELIVERED_CE, |
| 200 | TCP_NLA_BYTES_SENT, |
| 201 | TCP_NLA_BYTES_RETRANS, |
| 202 | TCP_NLA_DSACK_DUPS, |
| 203 | TCP_NLA_REORD_SEEN, |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 204 | TCP_NLA_SRTT, |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 205 | TCP_NLA_TIMEOUT_REHASH, |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 206 | TCP_NLA_BYTES_NOTSENT, |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 207 | TCP_NLA_EDT, |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 208 | TCP_NLA_TTL, |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 209 | TCP_NLA_REHASH, |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 210 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 211 | #define TCP_MD5SIG_MAXKEYLEN 80 |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 212 | #define TCP_MD5SIG_FLAG_PREFIX 0x1 |
| 213 | #define TCP_MD5SIG_FLAG_IFINDEX 0x2 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 214 | struct tcp_md5sig { |
Elliott Hughes | 5850f6f | 2023-11-29 11:18:49 -0800 | [diff] [blame] | 215 | struct sockaddr_storage tcpm_addr; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 216 | __u8 tcpm_flags; |
| 217 | __u8 tcpm_prefixlen; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 218 | __u16 tcpm_keylen; |
Christopher Ferris | bb9fcb4 | 2020-04-06 11:38:04 -0700 | [diff] [blame] | 219 | int tcpm_ifindex; |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 220 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; |
| 221 | }; |
| 222 | struct tcp_diag_md5sig { |
| 223 | __u8 tcpm_family; |
| 224 | __u8 tcpm_prefixlen; |
| 225 | __u16 tcpm_keylen; |
| 226 | __be32 tcpm_addr[4]; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 227 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 228 | }; |
Christopher Ferris | 0f79521 | 2024-01-17 14:17:28 -0800 | [diff] [blame] | 229 | #define TCP_AO_MAXKEYLEN 80 |
| 230 | #define TCP_AO_KEYF_IFINDEX (1 << 0) |
| 231 | #define TCP_AO_KEYF_EXCLUDE_OPT (1 << 1) |
| 232 | struct tcp_ao_add { |
| 233 | struct sockaddr_storage addr; |
| 234 | char alg_name[64]; |
| 235 | __s32 ifindex; |
| 236 | __u32 set_current : 1, set_rnext : 1, reserved : 30; |
| 237 | __u16 reserved2; |
| 238 | __u8 prefix; |
| 239 | __u8 sndid; |
| 240 | __u8 rcvid; |
| 241 | __u8 maclen; |
| 242 | __u8 keyflags; |
| 243 | __u8 keylen; |
| 244 | __u8 key[TCP_AO_MAXKEYLEN]; |
| 245 | } __attribute__((aligned(8))); |
| 246 | struct tcp_ao_del { |
| 247 | struct sockaddr_storage addr; |
| 248 | __s32 ifindex; |
| 249 | __u32 set_current : 1, set_rnext : 1, del_async : 1, reserved : 29; |
| 250 | __u16 reserved2; |
| 251 | __u8 prefix; |
| 252 | __u8 sndid; |
| 253 | __u8 rcvid; |
| 254 | __u8 current_key; |
| 255 | __u8 rnext; |
| 256 | __u8 keyflags; |
| 257 | } __attribute__((aligned(8))); |
| 258 | struct tcp_ao_info_opt { |
| 259 | __u32 set_current : 1, set_rnext : 1, ao_required : 1, set_counters : 1, accept_icmps : 1, reserved : 27; |
| 260 | __u16 reserved2; |
| 261 | __u8 current_key; |
| 262 | __u8 rnext; |
| 263 | __u64 pkt_good; |
| 264 | __u64 pkt_bad; |
| 265 | __u64 pkt_key_not_found; |
| 266 | __u64 pkt_ao_required; |
| 267 | __u64 pkt_dropped_icmp; |
| 268 | } __attribute__((aligned(8))); |
| 269 | struct tcp_ao_getsockopt { |
| 270 | struct sockaddr_storage addr; |
| 271 | char alg_name[64]; |
| 272 | __u8 key[TCP_AO_MAXKEYLEN]; |
| 273 | __u32 nkeys; |
| 274 | __u16 is_current : 1, is_rnext : 1, get_all : 1, reserved : 13; |
| 275 | __u8 sndid; |
| 276 | __u8 rcvid; |
| 277 | __u8 prefix; |
| 278 | __u8 maclen; |
| 279 | __u8 keyflags; |
| 280 | __u8 keylen; |
| 281 | __s32 ifindex; |
| 282 | __u64 pkt_good; |
| 283 | __u64 pkt_bad; |
| 284 | } __attribute__((aligned(8))); |
| 285 | struct tcp_ao_repair { |
| 286 | __be32 snt_isn; |
| 287 | __be32 rcv_isn; |
| 288 | __u32 snd_sne; |
| 289 | __u32 rcv_sne; |
| 290 | } __attribute__((aligned(8))); |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 291 | #define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT 0x1 |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 292 | struct tcp_zerocopy_receive { |
| 293 | __u64 address; |
| 294 | __u32 length; |
| 295 | __u32 recv_skip_hint; |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 296 | __u32 inq; |
| 297 | __s32 err; |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 298 | __u64 copybuf_address; |
| 299 | __s32 copybuf_len; |
| 300 | __u32 flags; |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 301 | __u64 msg_control; |
| 302 | __u64 msg_controllen; |
| 303 | __u32 msg_flags; |
| 304 | __u32 reserved; |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 305 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 306 | #endif |