xref: /linux/include/uapi/linux/sock_diag.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI__SOCK_DIAG_H__
3 #define _UAPI__SOCK_DIAG_H__
4 
5 #include <linux/types.h>
6 
7 #define SOCK_DIAG_BY_FAMILY 20
8 #define SOCK_DESTROY 21
9 
10 struct sock_diag_req {
11 	__u8	sdiag_family;
12 	__u8	sdiag_protocol;
13 };
14 
15 enum {
16 	SK_MEMINFO_RMEM_ALLOC,
17 	SK_MEMINFO_RCVBUF,
18 	SK_MEMINFO_WMEM_ALLOC,
19 	SK_MEMINFO_SNDBUF,
20 	SK_MEMINFO_FWD_ALLOC,
21 	SK_MEMINFO_WMEM_QUEUED,
22 	SK_MEMINFO_OPTMEM,
23 	SK_MEMINFO_BACKLOG,
24 	SK_MEMINFO_DROPS,
25 
26 	SK_MEMINFO_VARS,
27 };
28 
29 enum sknetlink_groups {
30 	SKNLGRP_NONE,
31 	SKNLGRP_INET_TCP_DESTROY,
32 	SKNLGRP_INET_UDP_DESTROY,
33 	SKNLGRP_INET6_TCP_DESTROY,
34 	SKNLGRP_INET6_UDP_DESTROY,
35 	__SKNLGRP_MAX,
36 };
37 #define SKNLGRP_MAX	(__SKNLGRP_MAX - 1)
38 
39 enum {
40 	SK_DIAG_BPF_STORAGE_REQ_NONE,
41 	SK_DIAG_BPF_STORAGE_REQ_MAP_FD,
42 	__SK_DIAG_BPF_STORAGE_REQ_MAX,
43 };
44 
45 #define SK_DIAG_BPF_STORAGE_REQ_MAX	(__SK_DIAG_BPF_STORAGE_REQ_MAX - 1)
46 
47 enum {
48 	SK_DIAG_BPF_STORAGE_REP_NONE,
49 	SK_DIAG_BPF_STORAGE,
50 	__SK_DIAG_BPF_STORAGE_REP_MAX,
51 };
52 
53 #define SK_DIAB_BPF_STORAGE_REP_MAX	(__SK_DIAG_BPF_STORAGE_REP_MAX - 1)
54 
55 enum {
56 	SK_DIAG_BPF_STORAGE_NONE,
57 	SK_DIAG_BPF_STORAGE_PAD,
58 	SK_DIAG_BPF_STORAGE_MAP_ID,
59 	SK_DIAG_BPF_STORAGE_MAP_VALUE,
60 	__SK_DIAG_BPF_STORAGE_MAX,
61 };
62 
63 #define SK_DIAG_BPF_STORAGE_MAX        (__SK_DIAG_BPF_STORAGE_MAX - 1)
64 
65 #endif /* _UAPI__SOCK_DIAG_H__ */
66