2 #define _INET_DIAG_H_ 1
4 /* Just some random number */
5 #define TCPDIAG_GETSOCK 18
6 #define DCCPDIAG_GETSOCK 19
8 #define INET_DIAG_GETSOCK_MAX 24
11 struct inet_diag_sockid {
17 __u32 idiag_cookie[2];
18 #define INET_DIAG_NOCOOKIE (~0U)
21 /* Request structure */
23 struct inet_diag_req {
24 __u8 idiag_family; /* Family of addresses. */
27 __u8 idiag_ext; /* Query extended information */
29 struct inet_diag_sockid id;
31 __u32 idiag_states; /* States to dump */
32 __u32 idiag_dbs; /* Tables to dump (NI) */
37 INET_DIAG_REQ_BYTECODE,
40 #define INET_DIAG_REQ_MAX INET_DIAG_REQ_BYTECODE
42 /* Bytecode is sequence of 4 byte commands followed by variable arguments.
43 * All the commands identified by "code" are conditional jumps forward:
44 * to offset cc+"yes" or to offset cc+"no". "yes" is supposed to be
45 * length of the command and its arguments.
48 struct inet_diag_bc_op {
66 struct inet_diag_hostcond {
73 /* Base info structure. It contains socket identity (addrs/ports/cookie)
74 * and, alas, the information shown by netstat. */
75 struct inet_diag_msg {
81 struct inet_diag_sockid id;
100 #define INET_DIAG_MAX INET_DIAG_CONG
105 struct inet_diag_meminfo {
112 /* INET_DIAG_VEGASINFO */
114 struct tcpvegas_info {
123 struct inet_hashinfo;
125 struct inet_diag_handler {
126 struct inet_hashinfo *idiag_hashinfo;
127 void (*idiag_get_info)(struct sock *sk,
128 struct inet_diag_msg *r,
130 __u16 idiag_info_size;
134 extern int inet_diag_register(const struct inet_diag_handler *handler);
135 extern void inet_diag_unregister(const struct inet_diag_handler *handler);
136 #endif /* __KERNEL__ */
138 #endif /* _INET_DIAG_H_ */