From 955cc506139b87d9794513747dc05a3e0cf6ca85 Mon Sep 17 00:00:00 2001 From: JingPiao Chen Date: Tue, 13 Jun 2017 13:38:27 +0800 Subject: netlink: add a basic socket diag parser of AF_SMC messages * linux/smc_diag.h: New file. * Makefile.am (EXTRA_DIST): Add it. * netlink_sock_diag.c: Include , "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. --- linux/smc_diag.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 linux/smc_diag.h (limited to 'linux/smc_diag.h') diff --git a/linux/smc_diag.h b/linux/smc_diag.h new file mode 100644 index 000000000..aea7d3209 --- /dev/null +++ b/linux/smc_diag.h @@ -0,0 +1,33 @@ +#ifndef STRACE_LINUX_SMC_DIAG_H +#define STRACE_LINUX_SMC_DIAG_H + +#include + +/* Request structure */ +struct smc_diag_req { + uint8_t diag_family; + uint8_t pad[2]; + uint8_t diag_ext; /* Query extended information */ + struct inet_diag_sockid id; +}; + +struct smc_diag_msg { + uint8_t diag_family; + uint8_t diag_state; + uint8_t diag_fallback; + uint8_t diag_shutdown; + struct inet_diag_sockid id; + + uint32_t diag_uid; + uint64_t diag_inode; +}; + +/* Extensions */ +enum { + SMC_DIAG_NONE, + SMC_DIAG_CONNINFO, + SMC_DIAG_LGRINFO, + SMC_DIAG_SHUTDOWN, +}; + +#endif /* !STRACE_LINUX_SMC_DIAG_H */ -- cgit v1.2.1