blob: 1c3c12821ab7b5ed297814b4dc78da2a5652571b [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 Cheng655a7c02013-10-16 16:09:24 -070023#define DCCPDIAG_GETSOCK 19
24#define INET_DIAG_GETSOCK_MAX 24
25struct inet_diag_sockid {
Tao Baod7db5942015-01-28 10:07:51 -080026 __be16 idiag_sport;
Tao Baod7db5942015-01-28 10:07:51 -080027 __be16 idiag_dport;
28 __be32 idiag_src[4];
29 __be32 idiag_dst[4];
30 __u32 idiag_if;
Tao Baod7db5942015-01-28 10:07:51 -080031 __u32 idiag_cookie[2];
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define INET_DIAG_NOCOOKIE (~0U)
33};
34struct inet_diag_req {
Tao Baod7db5942015-01-28 10:07:51 -080035 __u8 idiag_family;
36 __u8 idiag_src_len;
37 __u8 idiag_dst_len;
38 __u8 idiag_ext;
Tao Baod7db5942015-01-28 10:07:51 -080039 struct inet_diag_sockid id;
40 __u32 idiag_states;
41 __u32 idiag_dbs;
Ben Cheng655a7c02013-10-16 16:09:24 -070042};
Ben Cheng655a7c02013-10-16 16:09:24 -070043struct inet_diag_req_v2 {
Tao Baod7db5942015-01-28 10:07:51 -080044 __u8 sdiag_family;
45 __u8 sdiag_protocol;
46 __u8 idiag_ext;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u8 pad;
48 __u32 idiag_states;
49 struct inet_diag_sockid id;
Ben Cheng655a7c02013-10-16 16:09:24 -070050};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080051struct inet_diag_req_raw {
52 __u8 sdiag_family;
53 __u8 sdiag_protocol;
54 __u8 idiag_ext;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080055 __u8 sdiag_raw_protocol;
56 __u32 idiag_states;
57 struct inet_diag_sockid id;
58};
Ben Cheng655a7c02013-10-16 16:09:24 -070059enum {
Tao Baod7db5942015-01-28 10:07:51 -080060 INET_DIAG_REQ_NONE,
61 INET_DIAG_REQ_BYTECODE,
Christopher Ferrisaf09c702020-06-01 20:29:29 -070062 INET_DIAG_REQ_SK_BPF_STORAGES,
63 __INET_DIAG_REQ_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -070064};
Christopher Ferrisaf09c702020-06-01 20:29:29 -070065#define INET_DIAG_REQ_MAX (__INET_DIAG_REQ_MAX - 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070066struct inet_diag_bc_op {
Tao Baod7db5942015-01-28 10:07:51 -080067 unsigned char code;
68 unsigned char yes;
Tao Baod7db5942015-01-28 10:07:51 -080069 unsigned short no;
Ben Cheng655a7c02013-10-16 16:09:24 -070070};
71enum {
Tao Baod7db5942015-01-28 10:07:51 -080072 INET_DIAG_BC_NOP,
Tao Baod7db5942015-01-28 10:07:51 -080073 INET_DIAG_BC_JMP,
74 INET_DIAG_BC_S_GE,
75 INET_DIAG_BC_S_LE,
76 INET_DIAG_BC_D_GE,
Tao Baod7db5942015-01-28 10:07:51 -080077 INET_DIAG_BC_D_LE,
78 INET_DIAG_BC_AUTO,
79 INET_DIAG_BC_S_COND,
80 INET_DIAG_BC_D_COND,
Christopher Ferris49f525c2016-12-12 14:55:36 -080081 INET_DIAG_BC_DEV_COND,
Christopher Ferris6a9755d2017-01-13 14:09:31 -080082 INET_DIAG_BC_MARK_COND,
Christopher Ferris76a1d452018-06-27 14:12:29 -070083 INET_DIAG_BC_S_EQ,
84 INET_DIAG_BC_D_EQ,
Christopher Ferris8177cdf2020-08-03 11:53:55 -070085 INET_DIAG_BC_CGROUP_COND,
Ben Cheng655a7c02013-10-16 16:09:24 -070086};
87struct inet_diag_hostcond {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080088 __u8 family;
Christopher Ferris49f525c2016-12-12 14:55:36 -080089 __u8 prefix_len;
Tao Baod7db5942015-01-28 10:07:51 -080090 int port;
91 __be32 addr[0];
Christopher Ferris6a9755d2017-01-13 14:09:31 -080092};
93struct inet_diag_markcond {
94 __u32 mark;
95 __u32 mask;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080096};
Christopher Ferris49f525c2016-12-12 14:55:36 -080097struct inet_diag_msg {
Tao Baod7db5942015-01-28 10:07:51 -080098 __u8 idiag_family;
99 __u8 idiag_state;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800100 __u8 idiag_timer;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800101 __u8 idiag_retrans;
Tao Baod7db5942015-01-28 10:07:51 -0800102 struct inet_diag_sockid id;
103 __u32 idiag_expires;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800104 __u32 idiag_rqueue;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800105 __u32 idiag_wqueue;
Tao Baod7db5942015-01-28 10:07:51 -0800106 __u32 idiag_uid;
107 __u32 idiag_inode;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800108};
Christopher Ferris49f525c2016-12-12 14:55:36 -0800109enum {
Tao Baod7db5942015-01-28 10:07:51 -0800110 INET_DIAG_NONE,
111 INET_DIAG_MEMINFO,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800112 INET_DIAG_INFO,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800113 INET_DIAG_VEGASINFO,
Tao Baod7db5942015-01-28 10:07:51 -0800114 INET_DIAG_CONG,
115 INET_DIAG_TOS,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800116 INET_DIAG_TCLASS,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800117 INET_DIAG_SKMEMINFO,
Tao Baod7db5942015-01-28 10:07:51 -0800118 INET_DIAG_SHUTDOWN,
119 INET_DIAG_DCTCPINFO,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800120 INET_DIAG_PROTOCOL,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800121 INET_DIAG_SKV6ONLY,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700122 INET_DIAG_LOCALS,
123 INET_DIAG_PEERS,
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800124 INET_DIAG_PAD,
125 INET_DIAG_MARK,
126 INET_DIAG_BBRINFO,
Christopher Ferris1308ad32017-11-14 17:32:13 -0800127 INET_DIAG_CLASS_ID,
128 INET_DIAG_MD5SIG,
Christopher Ferris9584fa42019-12-09 15:36:13 -0800129 INET_DIAG_ULP_INFO,
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700130 INET_DIAG_SK_BPF_STORAGES,
Christopher Ferris8177cdf2020-08-03 11:53:55 -0700131 INET_DIAG_CGROUP_ID,
Christopher Ferris49f525c2016-12-12 14:55:36 -0800132 __INET_DIAG_MAX,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800133};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700134#define INET_DIAG_MAX (__INET_DIAG_MAX - 1)
Christopher Ferris9584fa42019-12-09 15:36:13 -0800135enum {
136 INET_ULP_INFO_UNSPEC,
137 INET_ULP_INFO_NAME,
138 INET_ULP_INFO_TLS,
Christopher Ferrisaf09c702020-06-01 20:29:29 -0700139 INET_ULP_INFO_MPTCP,
Christopher Ferris9584fa42019-12-09 15:36:13 -0800140 __INET_ULP_INFO_MAX,
141};
142#define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1)
Christopher Ferris82d75042015-01-26 10:57:07 -0800143struct inet_diag_meminfo {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800144 __u32 idiag_rmem;
Tao Baod7db5942015-01-28 10:07:51 -0800145 __u32 idiag_wmem;
146 __u32 idiag_fmem;
Tao Baod7db5942015-01-28 10:07:51 -0800147 __u32 idiag_tmem;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800148};
Ben Cheng655a7c02013-10-16 16:09:24 -0700149struct tcpvegas_info {
Tao Baod7db5942015-01-28 10:07:51 -0800150 __u32 tcpv_enabled;
Tao Baod7db5942015-01-28 10:07:51 -0800151 __u32 tcpv_rttcnt;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800152 __u32 tcpv_rtt;
Tao Baod7db5942015-01-28 10:07:51 -0800153 __u32 tcpv_minrtt;
Ben Cheng655a7c02013-10-16 16:09:24 -0700154};
Christopher Ferris82d75042015-01-26 10:57:07 -0800155struct tcp_dctcp_info {
Christopher Ferris49f525c2016-12-12 14:55:36 -0800156 __u16 dctcp_enabled;
Tao Baod7db5942015-01-28 10:07:51 -0800157 __u16 dctcp_ce_state;
158 __u32 dctcp_alpha;
Tao Baod7db5942015-01-28 10:07:51 -0800159 __u32 dctcp_ab_ecn;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800160 __u32 dctcp_ab_tot;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800161};
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800162struct tcp_bbr_info {
163 __u32 bbr_bw_lo;
164 __u32 bbr_bw_hi;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800165 __u32 bbr_min_rtt;
166 __u32 bbr_pacing_gain;
167 __u32 bbr_cwnd_gain;
168};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800169union tcp_cc_info {
170 struct tcpvegas_info vegas;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800171 struct tcp_dctcp_info dctcp;
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800172 struct tcp_bbr_info bbr;
Christopher Ferris82d75042015-01-26 10:57:07 -0800173};
Ben Cheng655a7c02013-10-16 16:09:24 -0700174#endif