Pavel Emelyanov | 22931d3 | 2011-12-15 02:44:35 +0000 | [diff] [blame] | 1 | #ifndef __UNIX_DIAG_H__ |
| 2 | #define __UNIX_DIAG_H__ |
| 3 | |
Pavel Emelyanov | 288461e | 2011-12-30 00:52:51 +0000 | [diff] [blame] | 4 | #include <linux/types.h> |
| 5 | |
Pavel Emelyanov | 22931d3 | 2011-12-15 02:44:35 +0000 | [diff] [blame] | 6 | struct unix_diag_req { |
| 7 | __u8 sdiag_family; |
| 8 | __u8 sdiag_protocol; |
| 9 | __u16 pad; |
| 10 | __u32 udiag_states; |
| 11 | __u32 udiag_ino; |
| 12 | __u32 udiag_show; |
| 13 | __u32 udiag_cookie[2]; |
| 14 | }; |
| 15 | |
Pavel Emelyanov | f5248b4 | 2011-12-15 02:45:24 +0000 | [diff] [blame] | 16 | #define UDIAG_SHOW_NAME 0x00000001 /* show name (not path) */ |
Pavel Emelyanov | 5f7b056 | 2011-12-15 02:45:43 +0000 | [diff] [blame] | 17 | #define UDIAG_SHOW_VFS 0x00000002 /* show VFS inode info */ |
Pavel Emelyanov | ac02be8 | 2011-12-15 02:45:58 +0000 | [diff] [blame] | 18 | #define UDIAG_SHOW_PEER 0x00000004 /* show peer socket info */ |
Pavel Emelyanov | 2aac7a2 | 2011-12-15 02:46:14 +0000 | [diff] [blame] | 19 | #define UDIAG_SHOW_ICONS 0x00000008 /* show pending connections */ |
Pavel Emelyanov | cbf3919 | 2011-12-15 02:46:31 +0000 | [diff] [blame] | 20 | #define UDIAG_SHOW_RQLEN 0x00000010 /* show skb receive queue len */ |
Pavel Emelyanov | 257b529 | 2011-12-30 09:27:43 +0000 | [diff] [blame] | 21 | #define UDIAG_SHOW_MEMINFO 0x00000020 /* show memory info of a socket */ |
Pavel Emelyanov | f5248b4 | 2011-12-15 02:45:24 +0000 | [diff] [blame] | 22 | |
Pavel Emelyanov | 22931d3 | 2011-12-15 02:44:35 +0000 | [diff] [blame] | 23 | struct unix_diag_msg { |
| 24 | __u8 udiag_family; |
| 25 | __u8 udiag_type; |
| 26 | __u8 udiag_state; |
| 27 | __u8 pad; |
| 28 | |
| 29 | __u32 udiag_ino; |
| 30 | __u32 udiag_cookie[2]; |
| 31 | }; |
| 32 | |
Pavel Emelyanov | f5248b4 | 2011-12-15 02:45:24 +0000 | [diff] [blame] | 33 | enum { |
Nicolas Dichtel | 31e20ba | 2013-11-28 18:31:05 +0100 | [diff] [blame^] | 34 | /* UNIX_DIAG_NONE, standard nl API requires this attribute! */ |
Pavel Emelyanov | f5248b4 | 2011-12-15 02:45:24 +0000 | [diff] [blame] | 35 | UNIX_DIAG_NAME, |
Pavel Emelyanov | 5f7b056 | 2011-12-15 02:45:43 +0000 | [diff] [blame] | 36 | UNIX_DIAG_VFS, |
Pavel Emelyanov | ac02be8 | 2011-12-15 02:45:58 +0000 | [diff] [blame] | 37 | UNIX_DIAG_PEER, |
Pavel Emelyanov | 2aac7a2 | 2011-12-15 02:46:14 +0000 | [diff] [blame] | 38 | UNIX_DIAG_ICONS, |
Pavel Emelyanov | cbf3919 | 2011-12-15 02:46:31 +0000 | [diff] [blame] | 39 | UNIX_DIAG_RQLEN, |
Pavel Emelyanov | 257b529 | 2011-12-30 09:27:43 +0000 | [diff] [blame] | 40 | UNIX_DIAG_MEMINFO, |
Pavel Emelyanov | e4e541a | 2012-10-23 22:29:56 +0400 | [diff] [blame] | 41 | UNIX_DIAG_SHUTDOWN, |
Pavel Emelyanov | f5248b4 | 2011-12-15 02:45:24 +0000 | [diff] [blame] | 42 | |
Andrey Vagin | ae5fc98 | 2013-03-21 20:33:46 +0400 | [diff] [blame] | 43 | __UNIX_DIAG_MAX, |
Pavel Emelyanov | f5248b4 | 2011-12-15 02:45:24 +0000 | [diff] [blame] | 44 | }; |
| 45 | |
Andrey Vagin | ae5fc98 | 2013-03-21 20:33:46 +0400 | [diff] [blame] | 46 | #define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1) |
| 47 | |
Pavel Emelyanov | 5f7b056 | 2011-12-15 02:45:43 +0000 | [diff] [blame] | 48 | struct unix_diag_vfs { |
| 49 | __u32 udiag_vfs_ino; |
| 50 | __u32 udiag_vfs_dev; |
| 51 | }; |
| 52 | |
Pavel Emelyanov | c9da99e | 2011-12-30 00:54:39 +0000 | [diff] [blame] | 53 | struct unix_diag_rqlen { |
| 54 | __u32 udiag_rqueue; |
| 55 | __u32 udiag_wqueue; |
| 56 | }; |
| 57 | |
Pavel Emelyanov | 22931d3 | 2011-12-15 02:44:35 +0000 | [diff] [blame] | 58 | #endif |