blob: a5ce0f325745f8e7fd5233c54b42ae49bcb8d8f6 [file] [log] [blame]
Pavel Emelyanov22931d32011-12-15 02:44:35 +00001#ifndef __UNIX_DIAG_H__
2#define __UNIX_DIAG_H__
3
Pavel Emelyanov288461e2011-12-30 00:52:51 +00004#include <linux/types.h>
5
Pavel Emelyanov22931d32011-12-15 02:44:35 +00006struct 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 Emelyanovf5248b42011-12-15 02:45:24 +000016#define UDIAG_SHOW_NAME 0x00000001 /* show name (not path) */
Pavel Emelyanov5f7b0562011-12-15 02:45:43 +000017#define UDIAG_SHOW_VFS 0x00000002 /* show VFS inode info */
Pavel Emelyanovac02be82011-12-15 02:45:58 +000018#define UDIAG_SHOW_PEER 0x00000004 /* show peer socket info */
Pavel Emelyanov2aac7a22011-12-15 02:46:14 +000019#define UDIAG_SHOW_ICONS 0x00000008 /* show pending connections */
Pavel Emelyanovcbf39192011-12-15 02:46:31 +000020#define UDIAG_SHOW_RQLEN 0x00000010 /* show skb receive queue len */
Pavel Emelyanovf5248b42011-12-15 02:45:24 +000021
Pavel Emelyanov22931d32011-12-15 02:44:35 +000022struct unix_diag_msg {
23 __u8 udiag_family;
24 __u8 udiag_type;
25 __u8 udiag_state;
26 __u8 pad;
27
28 __u32 udiag_ino;
29 __u32 udiag_cookie[2];
30};
31
Pavel Emelyanovf5248b42011-12-15 02:45:24 +000032enum {
33 UNIX_DIAG_NAME,
Pavel Emelyanov5f7b0562011-12-15 02:45:43 +000034 UNIX_DIAG_VFS,
Pavel Emelyanovac02be82011-12-15 02:45:58 +000035 UNIX_DIAG_PEER,
Pavel Emelyanov2aac7a22011-12-15 02:46:14 +000036 UNIX_DIAG_ICONS,
Pavel Emelyanovcbf39192011-12-15 02:46:31 +000037 UNIX_DIAG_RQLEN,
Pavel Emelyanovf5248b42011-12-15 02:45:24 +000038
39 UNIX_DIAG_MAX,
40};
41
Pavel Emelyanov5f7b0562011-12-15 02:45:43 +000042struct unix_diag_vfs {
43 __u32 udiag_vfs_ino;
44 __u32 udiag_vfs_dev;
45};
46
Pavel Emelyanov22931d32011-12-15 02:44:35 +000047#endif