* netlink_sock_diag.c: Include "xlat/smc_diag_attrs.h".
(decode_smc_diag_msg): Use decode_nlattr.
* xlat/smc_diag_attrs.in: New file.
---
netlink_sock_diag.c | 7 +++++++
xlat/smc_diag_attrs.in | 5 +++++
2 files changed, 12 insertions(+)
create mode 100644 xlat/smc_diag_attrs.in
diff --git a/netlink_sock_diag.c b/netlink_sock_diag.c
index 5e232fe..f0e2f30 100644
--- a/netlink_sock_diag.c
+++ b/netlink_sock_diag.c
@@ -55,6 +55,7 @@
#include "xlat/packet_diag_show.h"
#ifdef AF_SMC
+# include "xlat/smc_diag_attrs.h"
# include "xlat/smc_diag_extended_flags.h"
# include "xlat/smc_states.h"
#endif
@@ -543,6 +544,12 @@ decode_smc_diag_msg(struct tcb *const tcp,
tprints("...");
tprints("}");
+ if (len > NLA_ALIGN(sizeof(msg))) {
+ tprints(", ");
+ decode_nlattr(tcp, addr + NLA_ALIGN(sizeof(msg)),
+ len - NLA_ALIGN(sizeof(msg)),
+ smc_diag_attrs, "SMC_DIAG_???");
+ }
}
#endif
diff --git a/xlat/smc_diag_attrs.in b/xlat/smc_diag_attrs.in
new file mode 100644
index 0000000..cd6179b
--- /dev/null
+++ b/xlat/smc_diag_attrs.in
@@ -0,0 +1,5 @@
+#unconditional
+SMC_DIAG_NONE
+SMC_DIAG_CONNINFO
+SMC_DIAG_LGRINFO
+SMC_DIAG_SHUTDOWN
--
2.7.4
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel