• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef STRACE_LINUX_NETLINK_DIAG_H
2 #define STRACE_LINUX_NETLINK_DIAG_H
3 
4 struct netlink_diag_req {
5 	uint8_t sdiag_family;
6 	uint8_t sdiag_protocol;
7 	uint16_t pad;
8 	uint32_t ndiag_ino;
9 	uint32_t ndiag_show;
10 	uint32_t ndiag_cookie[2];
11 };
12 
13 struct netlink_diag_msg {
14 	uint8_t ndiag_family;
15 	uint8_t ndiag_type;
16 	uint8_t ndiag_protocol;
17 	uint8_t ndiag_state;
18 
19 	uint32_t ndiag_portid;
20 	uint32_t ndiag_dst_portid;
21 	uint32_t ndiag_dst_group;
22 	uint32_t ndiag_ino;
23 	uint32_t ndiag_cookie[2];
24 };
25 
26 struct netlink_diag_ring {
27 	uint32_t ndr_block_size;
28 	uint32_t ndr_block_nr;
29 	uint32_t ndr_frame_size;
30 	uint32_t ndr_frame_nr;
31 };
32 
33 enum {
34 	NETLINK_DIAG_MEMINFO,
35 	NETLINK_DIAG_GROUPS,
36 	NETLINK_DIAG_RX_RING,
37 	NETLINK_DIAG_TX_RING,
38 	NETLINK_DIAG_FLAGS,
39 };
40 
41 #define NDIAG_SHOW_MEMINFO		0x00000001
42 #define NDIAG_SHOW_GROUPS		0x00000002
43 #define NDIAG_SHOW_RING_CFG		0x00000004 /* deprecated since 4.6 */
44 #define NDIAG_SHOW_FLAGS		0x00000008
45 #define NDIAG_PROTO_ALL			((uint8_t) ~0)
46 
47 /* flags */
48 #define NDIAG_FLAG_CB_RUNNING		0x00000001
49 #define NDIAG_FLAG_PKTINFO		0x00000002
50 #define NDIAG_FLAG_BROADCAST_ERROR	0x00000004
51 #define NDIAG_FLAG_NO_ENOBUFS		0x00000008
52 #define NDIAG_FLAG_LISTEN_ALL_NSID	0x00000010
53 #define NDIAG_FLAG_CAP_ACK		0x00000020
54 
55 #endif /* !STRACE_LINUX_NETLINK_DIAG_H */
56