1607ca46eSDavid Howells #ifndef __UNIX_DIAG_H__ 2607ca46eSDavid Howells #define __UNIX_DIAG_H__ 3607ca46eSDavid Howells 4607ca46eSDavid Howells #include <linux/types.h> 5607ca46eSDavid Howells 6607ca46eSDavid Howells struct unix_diag_req { 7607ca46eSDavid Howells __u8 sdiag_family; 8607ca46eSDavid Howells __u8 sdiag_protocol; 9607ca46eSDavid Howells __u16 pad; 10607ca46eSDavid Howells __u32 udiag_states; 11607ca46eSDavid Howells __u32 udiag_ino; 12607ca46eSDavid Howells __u32 udiag_show; 13607ca46eSDavid Howells __u32 udiag_cookie[2]; 14607ca46eSDavid Howells }; 15607ca46eSDavid Howells 16607ca46eSDavid Howells #define UDIAG_SHOW_NAME 0x00000001 /* show name (not path) */ 17607ca46eSDavid Howells #define UDIAG_SHOW_VFS 0x00000002 /* show VFS inode info */ 18607ca46eSDavid Howells #define UDIAG_SHOW_PEER 0x00000004 /* show peer socket info */ 19607ca46eSDavid Howells #define UDIAG_SHOW_ICONS 0x00000008 /* show pending connections */ 20607ca46eSDavid Howells #define UDIAG_SHOW_RQLEN 0x00000010 /* show skb receive queue len */ 21607ca46eSDavid Howells #define UDIAG_SHOW_MEMINFO 0x00000020 /* show memory info of a socket */ 22607ca46eSDavid Howells 23607ca46eSDavid Howells struct unix_diag_msg { 24607ca46eSDavid Howells __u8 udiag_family; 25607ca46eSDavid Howells __u8 udiag_type; 26607ca46eSDavid Howells __u8 udiag_state; 27607ca46eSDavid Howells __u8 pad; 28607ca46eSDavid Howells 29607ca46eSDavid Howells __u32 udiag_ino; 30607ca46eSDavid Howells __u32 udiag_cookie[2]; 31607ca46eSDavid Howells }; 32607ca46eSDavid Howells 33607ca46eSDavid Howells enum { 34607ca46eSDavid Howells UNIX_DIAG_NAME, 35607ca46eSDavid Howells UNIX_DIAG_VFS, 36607ca46eSDavid Howells UNIX_DIAG_PEER, 37607ca46eSDavid Howells UNIX_DIAG_ICONS, 38607ca46eSDavid Howells UNIX_DIAG_RQLEN, 39607ca46eSDavid Howells UNIX_DIAG_MEMINFO, 40*e4e541a8SPavel Emelyanov UNIX_DIAG_SHUTDOWN, 41607ca46eSDavid Howells 42607ca46eSDavid Howells UNIX_DIAG_MAX, 43607ca46eSDavid Howells }; 44607ca46eSDavid Howells 45607ca46eSDavid Howells struct unix_diag_vfs { 46607ca46eSDavid Howells __u32 udiag_vfs_ino; 47607ca46eSDavid Howells __u32 udiag_vfs_dev; 48607ca46eSDavid Howells }; 49607ca46eSDavid Howells 50607ca46eSDavid Howells struct unix_diag_rqlen { 51607ca46eSDavid Howells __u32 udiag_rqueue; 52607ca46eSDavid Howells __u32 udiag_wqueue; 53607ca46eSDavid Howells }; 54607ca46eSDavid Howells 55607ca46eSDavid Howells #endif 56