[PATCH v2 7/8] netlink: add a basic socket diag parser of AF_SMC messages
Dmitry V. Levin
ldv at altlinux.org
Fri Jun 16 01:06:25 UTC 2017
On Thu, Jun 15, 2017 at 12:30:53PM +0800, JingPiao Chen wrote:
> * linux/smc_diag.h: New file.
> * Makefile.am (EXTRA_DIST): Add it.
> * netlink_sock_diag.c: Include <linux/smc_diag.h>,
> "xlat/smc_diag_extended_flags.h" and "xlat/smc_states.h".
> (decode_smc_diag_req, decode_smc_diag_msg): New functions.
> (diag_decoders): Add AF_SMC.
> * xlat/smc_diag_extended_flags.in: New file.
> * xlat/smc_states.in: Likewise.
Thanks, applied with the following changes:
> + printflags(smc_diag_extended_flags, req.diag_ext,
> + "1<<(SMC_DIAG_\?\?\?-1)");
Changed "1<<(SMC_DIAG_\?\?\?-1)" to "1<<SMC_DIAG_???-1".
> diff --git a/xlat/smc_diag_extended_flags.in b/xlat/smc_diag_extended_flags.in
> new file mode 100644
> index 0000000..8084f1c
> --- /dev/null
> +++ b/xlat/smc_diag_extended_flags.in
> @@ -0,0 +1,2 @@
> +{ 1<<(SMC_DIAG_CONNINFO-1) , "(1<<(SMC_DIAG_CONNINFO-1))" },
> +{ 1<<(SMC_DIAG_LGRINFO-1) , "(1<<(SMC_DIAG_LGRINFO-1))" },
Rewritten using a simpler syntax.
--
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/20170616/747a796c/attachment.bin>
More information about the Strace-devel
mailing list