strace/linux/sock_diag.h
Dmitry V. Levin 8700030e48 netlink: implement generic nlmsg_type decoding
Implement a pluggable mechanism of nlmsg_type decoding.
Add decoding of NETLINK_SOCK_DIAG types.

* linux/sock_diag.h (SOCK_DESTROY): New macro.
* xlat/nl_sock_diag_types.in: New file.
* netlink.c: Include xlat/nl_sock_diag_types.h.
(get_fd_nl_family, decode_nlmsg_type): New functions.
(print_nlmsghdr): Use them for nlmsg_type decoding.

Co-authored-by: Fabien Siron <fabien.siron@epita.fr>
2017-06-05 11:52:11 +00:00

13 lines
237 B
C

#ifndef STRACE_LINUX_SOCK_DIAG_H
#define STRACE_LINUX_SOCK_DIAG_H
#define SOCK_DIAG_BY_FAMILY 20
#define SOCK_DESTROY 21
struct sock_diag_req {
uint8_t sdiag_family;
uint8_t sdiag_protocol;
};
#endif /* !STRACE_LINUX_SOCK_DIAG_H */