Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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_INET_DIAG_H_ |
| 20 | #define _UAPI_INET_DIAG_H_ |
| 21 | #include <linux/types.h> |
| 22 | #define TCPDIAG_GETSOCK 18 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define DCCPDIAG_GETSOCK 19 |
| 24 | #define INET_DIAG_GETSOCK_MAX 24 |
| 25 | struct inet_diag_sockid { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 26 | __be16 idiag_sport; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __be16 idiag_dport; |
| 28 | __be32 idiag_src[4]; |
| 29 | __be32 idiag_dst[4]; |
| 30 | __u32 idiag_if; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | __u32 idiag_cookie[2]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 32 | #define INET_DIAG_NOCOOKIE (~0U) |
| 33 | }; |
| 34 | struct inet_diag_req { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u8 idiag_family; |
| 36 | __u8 idiag_src_len; |
| 37 | __u8 idiag_dst_len; |
| 38 | __u8 idiag_ext; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | struct inet_diag_sockid id; |
| 40 | __u32 idiag_states; |
| 41 | __u32 idiag_dbs; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | struct inet_diag_req_v2 { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 44 | __u8 sdiag_family; |
| 45 | __u8 sdiag_protocol; |
| 46 | __u8 idiag_ext; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __u8 pad; |
| 48 | __u32 idiag_states; |
| 49 | struct inet_diag_sockid id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 50 | }; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 51 | struct inet_diag_req_raw { |
| 52 | __u8 sdiag_family; |
| 53 | __u8 sdiag_protocol; |
| 54 | __u8 idiag_ext; |
Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 55 | __u8 sdiag_raw_protocol; |
| 56 | __u32 idiag_states; |
| 57 | struct inet_diag_sockid id; |
| 58 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 | INET_DIAG_REQ_NONE, |
| 61 | INET_DIAG_REQ_BYTECODE, |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame^] | 62 | INET_DIAG_REQ_SK_BPF_STORAGES, |
| 63 | __INET_DIAG_REQ_MAX, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | }; |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame^] | 65 | #define INET_DIAG_REQ_MAX (__INET_DIAG_REQ_MAX - 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 66 | struct inet_diag_bc_op { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | unsigned char code; |
| 68 | unsigned char yes; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 69 | unsigned short no; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 70 | }; |
| 71 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 72 | INET_DIAG_BC_NOP, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 73 | INET_DIAG_BC_JMP, |
| 74 | INET_DIAG_BC_S_GE, |
| 75 | INET_DIAG_BC_S_LE, |
| 76 | INET_DIAG_BC_D_GE, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 77 | INET_DIAG_BC_D_LE, |
| 78 | INET_DIAG_BC_AUTO, |
| 79 | INET_DIAG_BC_S_COND, |
| 80 | INET_DIAG_BC_D_COND, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 81 | INET_DIAG_BC_DEV_COND, |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 82 | INET_DIAG_BC_MARK_COND, |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 83 | INET_DIAG_BC_S_EQ, |
| 84 | INET_DIAG_BC_D_EQ, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 85 | }; |
| 86 | struct inet_diag_hostcond { |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 87 | __u8 family; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 88 | __u8 prefix_len; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 89 | int port; |
| 90 | __be32 addr[0]; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 91 | }; |
| 92 | struct inet_diag_markcond { |
| 93 | __u32 mark; |
| 94 | __u32 mask; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 95 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 96 | struct inet_diag_msg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 97 | __u8 idiag_family; |
| 98 | __u8 idiag_state; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 99 | __u8 idiag_timer; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 100 | __u8 idiag_retrans; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 101 | struct inet_diag_sockid id; |
| 102 | __u32 idiag_expires; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 103 | __u32 idiag_rqueue; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 104 | __u32 idiag_wqueue; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 105 | __u32 idiag_uid; |
| 106 | __u32 idiag_inode; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 107 | }; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 108 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 109 | INET_DIAG_NONE, |
| 110 | INET_DIAG_MEMINFO, |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 111 | INET_DIAG_INFO, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 112 | INET_DIAG_VEGASINFO, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 113 | INET_DIAG_CONG, |
| 114 | INET_DIAG_TOS, |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 115 | INET_DIAG_TCLASS, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 116 | INET_DIAG_SKMEMINFO, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 117 | INET_DIAG_SHUTDOWN, |
| 118 | INET_DIAG_DCTCPINFO, |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 119 | INET_DIAG_PROTOCOL, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 120 | INET_DIAG_SKV6ONLY, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 121 | INET_DIAG_LOCALS, |
| 122 | INET_DIAG_PEERS, |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 123 | INET_DIAG_PAD, |
| 124 | INET_DIAG_MARK, |
| 125 | INET_DIAG_BBRINFO, |
Christopher Ferris | 1308ad3 | 2017-11-14 17:32:13 -0800 | [diff] [blame] | 126 | INET_DIAG_CLASS_ID, |
| 127 | INET_DIAG_MD5SIG, |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 128 | INET_DIAG_ULP_INFO, |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame^] | 129 | INET_DIAG_SK_BPF_STORAGES, |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 130 | __INET_DIAG_MAX, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 131 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 132 | #define INET_DIAG_MAX (__INET_DIAG_MAX - 1) |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 133 | enum { |
| 134 | INET_ULP_INFO_UNSPEC, |
| 135 | INET_ULP_INFO_NAME, |
| 136 | INET_ULP_INFO_TLS, |
Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame^] | 137 | INET_ULP_INFO_MPTCP, |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 138 | __INET_ULP_INFO_MAX, |
| 139 | }; |
| 140 | #define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1) |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 141 | struct inet_diag_meminfo { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 142 | __u32 idiag_rmem; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 143 | __u32 idiag_wmem; |
| 144 | __u32 idiag_fmem; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 145 | __u32 idiag_tmem; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 146 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 147 | struct tcpvegas_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 148 | __u32 tcpv_enabled; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 149 | __u32 tcpv_rttcnt; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 150 | __u32 tcpv_rtt; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 151 | __u32 tcpv_minrtt; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 152 | }; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 153 | struct tcp_dctcp_info { |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 154 | __u16 dctcp_enabled; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 155 | __u16 dctcp_ce_state; |
| 156 | __u32 dctcp_alpha; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 157 | __u32 dctcp_ab_ecn; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 158 | __u32 dctcp_ab_tot; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 159 | }; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 160 | struct tcp_bbr_info { |
| 161 | __u32 bbr_bw_lo; |
| 162 | __u32 bbr_bw_hi; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 163 | __u32 bbr_min_rtt; |
| 164 | __u32 bbr_pacing_gain; |
| 165 | __u32 bbr_cwnd_gain; |
| 166 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 167 | union tcp_cc_info { |
| 168 | struct tcpvegas_info vegas; |
Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 169 | struct tcp_dctcp_info dctcp; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 170 | struct tcp_bbr_info bbr; |
Christopher Ferris | 82d7504 | 2015-01-26 10:57:07 -0800 | [diff] [blame] | 171 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 172 | #endif |