~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/inet_diag.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/inet_diag.h (Architecture ppc) and /include/uapi/linux/inet_diag.h (Architecture sparc64)


  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux      1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _UAPI_INET_DIAG_H_                          2 #ifndef _UAPI_INET_DIAG_H_
  3 #define _UAPI_INET_DIAG_H_                          3 #define _UAPI_INET_DIAG_H_
  4                                                     4 
  5 #include <linux/types.h>                            5 #include <linux/types.h>
  6                                                     6 
  7 /* Just some random number */                       7 /* Just some random number */
  8 #define TCPDIAG_GETSOCK 18                          8 #define TCPDIAG_GETSOCK 18
  9 #define DCCPDIAG_GETSOCK 19                         9 #define DCCPDIAG_GETSOCK 19
 10                                                    10 
 11 #define INET_DIAG_GETSOCK_MAX 24                   11 #define INET_DIAG_GETSOCK_MAX 24
 12                                                    12 
 13 /* Socket identity */                              13 /* Socket identity */
 14 struct inet_diag_sockid {                          14 struct inet_diag_sockid {
 15         __be16  idiag_sport;                       15         __be16  idiag_sport;
 16         __be16  idiag_dport;                       16         __be16  idiag_dport;
 17         __be32  idiag_src[4];                      17         __be32  idiag_src[4];
 18         __be32  idiag_dst[4];                      18         __be32  idiag_dst[4];
 19         __u32   idiag_if;                          19         __u32   idiag_if;
 20         __u32   idiag_cookie[2];                   20         __u32   idiag_cookie[2];
 21 #define INET_DIAG_NOCOOKIE (~0U)                   21 #define INET_DIAG_NOCOOKIE (~0U)
 22 };                                                 22 };
 23                                                    23 
 24 /* Request structure */                            24 /* Request structure */
 25                                                    25 
 26 struct inet_diag_req {                             26 struct inet_diag_req {
 27         __u8    idiag_family;           /* Fam     27         __u8    idiag_family;           /* Family of addresses. */
 28         __u8    idiag_src_len;                     28         __u8    idiag_src_len;
 29         __u8    idiag_dst_len;                     29         __u8    idiag_dst_len;
 30         __u8    idiag_ext;              /* Que     30         __u8    idiag_ext;              /* Query extended information */
 31                                                    31 
 32         struct inet_diag_sockid id;                32         struct inet_diag_sockid id;
 33                                                    33 
 34         __u32   idiag_states;           /* Sta     34         __u32   idiag_states;           /* States to dump */
 35         __u32   idiag_dbs;              /* Tab     35         __u32   idiag_dbs;              /* Tables to dump (NI) */
 36 };                                                 36 };
 37                                                    37 
 38 struct inet_diag_req_v2 {                          38 struct inet_diag_req_v2 {
 39         __u8    sdiag_family;                      39         __u8    sdiag_family;
 40         __u8    sdiag_protocol;                    40         __u8    sdiag_protocol;
 41         __u8    idiag_ext;                         41         __u8    idiag_ext;
 42         __u8    pad;                               42         __u8    pad;
 43         __u32   idiag_states;                      43         __u32   idiag_states;
 44         struct inet_diag_sockid id;                44         struct inet_diag_sockid id;
 45 };                                                 45 };
 46                                                    46 
 47 /*                                                 47 /*
 48  * SOCK_RAW sockets require the underlied prot     48  * SOCK_RAW sockets require the underlied protocol to be
 49  * additionally specified so we can use @pad m     49  * additionally specified so we can use @pad member for
 50  * this, but we can't rename it because usersp     50  * this, but we can't rename it because userspace programs
 51  * still may depend on this name. Instead lets     51  * still may depend on this name. Instead lets use another
 52  * structure definition as an alias for struct     52  * structure definition as an alias for struct
 53  * @inet_diag_req_v2.                              53  * @inet_diag_req_v2.
 54  */                                                54  */
 55 struct inet_diag_req_raw {                         55 struct inet_diag_req_raw {
 56         __u8    sdiag_family;                      56         __u8    sdiag_family;
 57         __u8    sdiag_protocol;                    57         __u8    sdiag_protocol;
 58         __u8    idiag_ext;                         58         __u8    idiag_ext;
 59         __u8    sdiag_raw_protocol;                59         __u8    sdiag_raw_protocol;
 60         __u32   idiag_states;                      60         __u32   idiag_states;
 61         struct inet_diag_sockid id;                61         struct inet_diag_sockid id;
 62 };                                                 62 };
 63                                                    63 
 64 enum {                                             64 enum {
 65         INET_DIAG_REQ_NONE,                        65         INET_DIAG_REQ_NONE,
 66         INET_DIAG_REQ_BYTECODE,                    66         INET_DIAG_REQ_BYTECODE,
 67         INET_DIAG_REQ_SK_BPF_STORAGES,             67         INET_DIAG_REQ_SK_BPF_STORAGES,
 68         INET_DIAG_REQ_PROTOCOL,                    68         INET_DIAG_REQ_PROTOCOL,
 69         __INET_DIAG_REQ_MAX,                       69         __INET_DIAG_REQ_MAX,
 70 };                                                 70 };
 71                                                    71 
 72 #define INET_DIAG_REQ_MAX (__INET_DIAG_REQ_MAX     72 #define INET_DIAG_REQ_MAX (__INET_DIAG_REQ_MAX - 1)
 73                                                    73 
 74 /* Bytecode is sequence of 4 byte commands fol     74 /* Bytecode is sequence of 4 byte commands followed by variable arguments.
 75  * All the commands identified by "code" are c     75  * All the commands identified by "code" are conditional jumps forward:
 76  * to offset cc+"yes" or to offset cc+"no". "y     76  * to offset cc+"yes" or to offset cc+"no". "yes" is supposed to be
 77  * length of the command and its arguments.        77  * length of the command and its arguments.
 78  */                                                78  */
 79                                                    79  
 80 struct inet_diag_bc_op {                           80 struct inet_diag_bc_op {
 81         unsigned char   code;                      81         unsigned char   code;
 82         unsigned char   yes;                       82         unsigned char   yes;
 83         unsigned short  no;                        83         unsigned short  no;
 84 };                                                 84 };
 85                                                    85 
 86 enum {                                             86 enum {
 87         INET_DIAG_BC_NOP,                          87         INET_DIAG_BC_NOP,
 88         INET_DIAG_BC_JMP,                          88         INET_DIAG_BC_JMP,
 89         INET_DIAG_BC_S_GE,                         89         INET_DIAG_BC_S_GE,
 90         INET_DIAG_BC_S_LE,                         90         INET_DIAG_BC_S_LE,
 91         INET_DIAG_BC_D_GE,                         91         INET_DIAG_BC_D_GE,
 92         INET_DIAG_BC_D_LE,                         92         INET_DIAG_BC_D_LE,
 93         INET_DIAG_BC_AUTO,                         93         INET_DIAG_BC_AUTO,
 94         INET_DIAG_BC_S_COND,                       94         INET_DIAG_BC_S_COND,
 95         INET_DIAG_BC_D_COND,                       95         INET_DIAG_BC_D_COND,
 96         INET_DIAG_BC_DEV_COND,   /* u32 ifinde     96         INET_DIAG_BC_DEV_COND,   /* u32 ifindex */
 97         INET_DIAG_BC_MARK_COND,                    97         INET_DIAG_BC_MARK_COND,
 98         INET_DIAG_BC_S_EQ,                         98         INET_DIAG_BC_S_EQ,
 99         INET_DIAG_BC_D_EQ,                         99         INET_DIAG_BC_D_EQ,
100         INET_DIAG_BC_CGROUP_COND,   /* u64 cgr    100         INET_DIAG_BC_CGROUP_COND,   /* u64 cgroup v2 ID */
101 };                                                101 };
102                                                   102 
103 struct inet_diag_hostcond {                       103 struct inet_diag_hostcond {
104         __u8    family;                           104         __u8    family;
105         __u8    prefix_len;                       105         __u8    prefix_len;
106         int     port;                             106         int     port;
107         __be32  addr[];                           107         __be32  addr[];
108 };                                                108 };
109                                                   109 
110 struct inet_diag_markcond {                       110 struct inet_diag_markcond {
111         __u32 mark;                               111         __u32 mark;
112         __u32 mask;                               112         __u32 mask;
113 };                                                113 };
114                                                   114 
115 /* Base info structure. It contains socket ide    115 /* Base info structure. It contains socket identity (addrs/ports/cookie)
116  * and, alas, the information shown by netstat    116  * and, alas, the information shown by netstat. */
117 struct inet_diag_msg {                            117 struct inet_diag_msg {
118         __u8    idiag_family;                     118         __u8    idiag_family;
119         __u8    idiag_state;                      119         __u8    idiag_state;
120         __u8    idiag_timer;                      120         __u8    idiag_timer;
121         __u8    idiag_retrans;                    121         __u8    idiag_retrans;
122                                                   122 
123         struct inet_diag_sockid id;               123         struct inet_diag_sockid id;
124                                                   124 
125         __u32   idiag_expires;                    125         __u32   idiag_expires;
126         __u32   idiag_rqueue;                     126         __u32   idiag_rqueue;
127         __u32   idiag_wqueue;                     127         __u32   idiag_wqueue;
128         __u32   idiag_uid;                        128         __u32   idiag_uid;
129         __u32   idiag_inode;                      129         __u32   idiag_inode;
130 };                                                130 };
131                                                   131 
132 /* Extensions */                                  132 /* Extensions */
133                                                   133 
134 enum {                                            134 enum {
135         INET_DIAG_NONE,                           135         INET_DIAG_NONE,
136         INET_DIAG_MEMINFO,                        136         INET_DIAG_MEMINFO,
137         INET_DIAG_INFO,                           137         INET_DIAG_INFO,
138         INET_DIAG_VEGASINFO,                      138         INET_DIAG_VEGASINFO,
139         INET_DIAG_CONG,                           139         INET_DIAG_CONG,
140         INET_DIAG_TOS,                            140         INET_DIAG_TOS,
141         INET_DIAG_TCLASS,                         141         INET_DIAG_TCLASS,
142         INET_DIAG_SKMEMINFO,                      142         INET_DIAG_SKMEMINFO,
143         INET_DIAG_SHUTDOWN,                       143         INET_DIAG_SHUTDOWN,
144                                                   144 
145         /*                                        145         /*
146          * Next extensions cannot be requested    146          * Next extensions cannot be requested in struct inet_diag_req_v2:
147          * its field idiag_ext has only 8 bits    147          * its field idiag_ext has only 8 bits.
148          */                                       148          */
149                                                   149 
150         INET_DIAG_DCTCPINFO,    /* request as     150         INET_DIAG_DCTCPINFO,    /* request as INET_DIAG_VEGASINFO */
151         INET_DIAG_PROTOCOL,     /* response at    151         INET_DIAG_PROTOCOL,     /* response attribute only */
152         INET_DIAG_SKV6ONLY,                       152         INET_DIAG_SKV6ONLY,
153         INET_DIAG_LOCALS,                         153         INET_DIAG_LOCALS,
154         INET_DIAG_PEERS,                          154         INET_DIAG_PEERS,
155         INET_DIAG_PAD,                            155         INET_DIAG_PAD,
156         INET_DIAG_MARK,         /* only with C    156         INET_DIAG_MARK,         /* only with CAP_NET_ADMIN */
157         INET_DIAG_BBRINFO,      /* request as     157         INET_DIAG_BBRINFO,      /* request as INET_DIAG_VEGASINFO */
158         INET_DIAG_CLASS_ID,     /* request as     158         INET_DIAG_CLASS_ID,     /* request as INET_DIAG_TCLASS */
159         INET_DIAG_MD5SIG,                         159         INET_DIAG_MD5SIG,
160         INET_DIAG_ULP_INFO,                       160         INET_DIAG_ULP_INFO,
161         INET_DIAG_SK_BPF_STORAGES,                161         INET_DIAG_SK_BPF_STORAGES,
162         INET_DIAG_CGROUP_ID,                      162         INET_DIAG_CGROUP_ID,
163         INET_DIAG_SOCKOPT,                        163         INET_DIAG_SOCKOPT,
164         __INET_DIAG_MAX,                          164         __INET_DIAG_MAX,
165 };                                                165 };
166                                                   166 
167 #define INET_DIAG_MAX (__INET_DIAG_MAX - 1)       167 #define INET_DIAG_MAX (__INET_DIAG_MAX - 1)
168                                                   168 
169 enum {                                            169 enum {
170         INET_ULP_INFO_UNSPEC,                     170         INET_ULP_INFO_UNSPEC,
171         INET_ULP_INFO_NAME,                       171         INET_ULP_INFO_NAME,
172         INET_ULP_INFO_TLS,                        172         INET_ULP_INFO_TLS,
173         INET_ULP_INFO_MPTCP,                      173         INET_ULP_INFO_MPTCP,
174         __INET_ULP_INFO_MAX,                      174         __INET_ULP_INFO_MAX,
175 };                                                175 };
176 #define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX    176 #define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1)
177                                                   177 
178 /* INET_DIAG_MEM */                               178 /* INET_DIAG_MEM */
179                                                   179 
180 struct inet_diag_meminfo {                        180 struct inet_diag_meminfo {
181         __u32   idiag_rmem;                       181         __u32   idiag_rmem;
182         __u32   idiag_wmem;                       182         __u32   idiag_wmem;
183         __u32   idiag_fmem;                       183         __u32   idiag_fmem;
184         __u32   idiag_tmem;                       184         __u32   idiag_tmem;
185 };                                                185 };
186                                                   186 
187 /* INET_DIAG_SOCKOPT */                           187 /* INET_DIAG_SOCKOPT */
188                                                   188 
189 struct inet_diag_sockopt {                        189 struct inet_diag_sockopt {
190         __u8    recverr:1,                        190         __u8    recverr:1,
191                 is_icsk:1,                        191                 is_icsk:1,
192                 freebind:1,                       192                 freebind:1,
193                 hdrincl:1,                        193                 hdrincl:1,
194                 mc_loop:1,                        194                 mc_loop:1,
195                 transparent:1,                    195                 transparent:1,
196                 mc_all:1,                         196                 mc_all:1,
197                 nodefrag:1;                       197                 nodefrag:1;
198         __u8    bind_address_no_port:1,           198         __u8    bind_address_no_port:1,
199                 recverr_rfc4884:1,                199                 recverr_rfc4884:1,
200                 defer_connect:1,                  200                 defer_connect:1,
201                 unused:5;                         201                 unused:5;
202 };                                                202 };
203                                                   203 
204 /* INET_DIAG_VEGASINFO */                         204 /* INET_DIAG_VEGASINFO */
205                                                   205 
206 struct tcpvegas_info {                            206 struct tcpvegas_info {
207         __u32   tcpv_enabled;                     207         __u32   tcpv_enabled;
208         __u32   tcpv_rttcnt;                      208         __u32   tcpv_rttcnt;
209         __u32   tcpv_rtt;                         209         __u32   tcpv_rtt;
210         __u32   tcpv_minrtt;                      210         __u32   tcpv_minrtt;
211 };                                                211 };
212                                                   212 
213 /* INET_DIAG_DCTCPINFO */                         213 /* INET_DIAG_DCTCPINFO */
214                                                   214 
215 struct tcp_dctcp_info {                           215 struct tcp_dctcp_info {
216         __u16   dctcp_enabled;                    216         __u16   dctcp_enabled;
217         __u16   dctcp_ce_state;                   217         __u16   dctcp_ce_state;
218         __u32   dctcp_alpha;                      218         __u32   dctcp_alpha;
219         __u32   dctcp_ab_ecn;                     219         __u32   dctcp_ab_ecn;
220         __u32   dctcp_ab_tot;                     220         __u32   dctcp_ab_tot;
221 };                                                221 };
222                                                   222 
223 /* INET_DIAG_BBRINFO */                           223 /* INET_DIAG_BBRINFO */
224                                                   224 
225 struct tcp_bbr_info {                             225 struct tcp_bbr_info {
226         /* u64 bw: max-filtered BW (app throug    226         /* u64 bw: max-filtered BW (app throughput) estimate in Byte per sec: */
227         __u32   bbr_bw_lo;              /* low    227         __u32   bbr_bw_lo;              /* lower 32 bits of bw */
228         __u32   bbr_bw_hi;              /* upp    228         __u32   bbr_bw_hi;              /* upper 32 bits of bw */
229         __u32   bbr_min_rtt;            /* min    229         __u32   bbr_min_rtt;            /* min-filtered RTT in uSec */
230         __u32   bbr_pacing_gain;        /* pac    230         __u32   bbr_pacing_gain;        /* pacing gain shifted left 8 bits */
231         __u32   bbr_cwnd_gain;          /* cwn    231         __u32   bbr_cwnd_gain;          /* cwnd gain shifted left 8 bits */
232 };                                                232 };
233                                                   233 
234 union tcp_cc_info {                               234 union tcp_cc_info {
235         struct tcpvegas_info    vegas;            235         struct tcpvegas_info    vegas;
236         struct tcp_dctcp_info   dctcp;            236         struct tcp_dctcp_info   dctcp;
237         struct tcp_bbr_info     bbr;              237         struct tcp_bbr_info     bbr;
238 };                                                238 };
239 #endif /* _UAPI_INET_DIAG_H_ */                   239 #endif /* _UAPI_INET_DIAG_H_ */
240                                                   240 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php