unix_diag: Unix socket name NLA

Report the sun_path when requested as NLA. With leading '\0' if
present but without the leading AF_UNIX bits.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Pavel Emelyanov 2011-12-15 02:45:24 +00:00 committed by David S. Miller
commit f5248b48a6
2 changed files with 28 additions and 0 deletions

View file

@ -11,6 +11,8 @@ struct unix_diag_req {
__u32 udiag_cookie[2];
};
#define UDIAG_SHOW_NAME 0x00000001 /* show name (not path) */
struct unix_diag_msg {
__u8 udiag_family;
__u8 udiag_type;
@ -21,4 +23,10 @@ struct unix_diag_msg {
__u32 udiag_cookie[2];
};
enum {
UNIX_DIAG_NAME,
UNIX_DIAG_MAX,
};
#endif