[PATCH] Add a function for dumping iovec in msghdr used in sendmsg and recvmsg
Dmitry V. Levin
ldv at altlinux.org
Sat Nov 1 01:50:45 UTC 2014
Hi,
On Wed, Oct 15, 2014 at 10:11:43PM +0900, Masatake YAMATO wrote:
> * syscall.c (dumpio): Call dumpiov_in_msghdr if
> the target function is recvmsg or sendmsg.
>
> * net.c (extractmsghdr): New function derived from
> `printmsghdr'.
> (printmsghdr): Use `extractmsghdr'.
> (dumpiov_in_msghdr): New function.
>
> * defs.h: Add a declaration for `dumpiov_in_msghdr'.
>
> Here is an example session:
>
> $ ./strace -e write=all ip link change dev enp0s25 mtu 1501 > /dev/null
> sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"(...
> * 40 bytes in buffer 0
> | 00000 28 00 00 00 10 00 05 00 d0 d9 aa 53 00 00 00 00 (..........S.... |
> | 00010 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ................ |
> | 00020 08 00 04 00 dd 05 00 00 ........ |
> ...
>
> $ ./strace -e read=all ip link show > /dev/null
> recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"...
> * 8192 bytes in buffer 0
> | 00000 34 00 00 00 02 00 00 00 00 00 00 00 ff 23 00 00 4............#.. |
> | 00010 ff ff ff ff 20 00 00 00 10 00 05 00 00 00 00 00 .... ........... |
> ...
Thanks, applied with minor changes.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20141101/0098e354/attachment.bin>
More information about the Strace-devel
mailing list