Add functions for dumping iovecs in mmsghdr used in sendmmsg and recvmmsg
This patch is similar to what I did in commit
02f9f6b386741a52f58e1b31ad4e7fff60781ef8.
That commit was for sendmsg and recvmsg system calls.
This one is for sendmmsg and recvmmsg system calls.
* defs.h (dumpiov_in_mmsghdr): New declaration.
* net.c (extractmmsghdr): New function derived from printmmsghdr.
(printmmsghdr): Use it.
(dumpiov_in_mmsghdr): New function.
* syscall.c (dumpio) [HAVE_SENDMSG]: Call dumpiov_in_mmsghdr
for recvmmsg and sendmmsg syscalls.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
diff --git a/syscall.c b/syscall.c
index fa761a9..091626c 100644
--- a/syscall.c
+++ b/syscall.c
@@ -2500,6 +2500,8 @@
#if HAVE_SENDMSG
else if (func == sys_recvmsg)
dumpiov_in_msghdr(tcp, tcp->u_arg[1]);
+ else if (func == sys_recvmmsg)
+ dumpiov_in_mmsghdr(tcp, tcp->u_arg[1]);
#endif
return;
}
@@ -2514,6 +2516,8 @@
#if HAVE_SENDMSG
else if (func == sys_sendmsg)
dumpiov_in_msghdr(tcp, tcp->u_arg[1]);
+ else if (func == sys_sendmmsg)
+ dumpiov_in_mmsghdr(tcp, tcp->u_arg[1]);
#endif
return;
}