[PATCH 1/8] netlink: add a basic socket diag parser of AF_NETLINK messages
Dmitry V. Levin
ldv at altlinux.org
Tue Jun 13 20:13:56 UTC 2017
On Tue, Jun 13, 2017 at 10:13:18PM +0800, JingPiao Chen wrote:
> * linux/netlink_diag.h (NDIAG_SHOW_GROUPS)
> (NDIAG_SHOW_RING_CFG): New macros.
> * netlink_sock_diag.c: Include <linux/netlink_diag.h>,
> "xlat/netlink_diag_show.h" and "xlat/netlink_states.h".
> (decode_netlink_diag_req, decode_netlink_diag_msg): New functions.
> (diag_decoders): Add AF_NETLINK.
> * xlat/netlink_diag_show.in: New file.
> * xlat/netlink_states.in: Likewise.
>
> Co-authored-by: Fabien Siron <fabien.siron at epita.fr>
> ---
> linux/netlink_diag.h | 3 +++
> netlink_sock_diag.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++
> xlat/netlink_diag_show.in | 3 +++
> xlat/netlink_states.in | 2 ++
> 4 files changed, 68 insertions(+)
> create mode 100644 xlat/netlink_diag_show.in
> create mode 100644 xlat/netlink_states.in
>
> diff --git a/linux/netlink_diag.h b/linux/netlink_diag.h
> index a52507c..234748c 100644
> --- a/linux/netlink_diag.h
> +++ b/linux/netlink_diag.h
> @@ -24,6 +24,9 @@ struct netlink_diag_msg {
> };
>
> #define NDIAG_SHOW_MEMINFO 0x00000001
> +#define NDIAG_SHOW_GROUPS 0x00000002
Here is a tab symbol followed by spaces. Please be consistent and either
use tabs or spaces between macro names and their values in this file.
> +/* deprecated since 4.6 */
Do we really need this comment?
> +#define NDIAG_SHOW_RING_CFG 0x00000004
> #define NDIAG_PROTO_ALL ((uint8_t) ~0)
>
> #endif /* !STRACE_LINUX_NETLINK_DIAG_H */
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170613/e593e87d/attachment.bin>
More information about the Strace-devel
mailing list