df57a9b108
msghdr.c: reorganize struct cmsghdr handler
...
* msghdr.c (sock_ee): New structure.
(print_scm_rights, print_scm_creds, print_scm_security,
print_cmsg_ip_pktinfo, print_cmsg_uint, print_cmsg_ip_opts,
print_cmsg_ip_recverr, print_cmsg_ip_origdstaddr): Remove data_len
argument validity check, don't print ", cmsg_data=" prefix here.
(print_cmsg_ip_tos): Likewise. Rename to print_cmsg_uint8_t.
(cmsg_printer): New type.
(cmsg_socket_printers, cmsg_ip_printers): New arrays.
(print_cmsg_type_data): Use them to handle struct cmsghdr
and its cmsg_data.
2016-06-30 22:49:36 +00:00
b7937bd72e
msghdr.c: merge print_cmsg_ip_ttl and print_cmsg_ip_checksum
...
* msghdr.c (print_cmsg_ip_ttl): Rename to print_cmsg_uint.
(print_cmsg_ip_checksum): Remove.
(print_cmsg_type_data): Replace print_cmsg_ip_ttl
and print_cmsg_ip_checksum with print_cmsg_uint.
2016-06-30 22:45:56 +00:00
1d53210514
msghdr.c: enhance representation of unprintable part of msg_control array
...
* msghdr.c (decode_msg_control): When msg_control array has an
unprintable part, print its address.
2016-06-30 22:34:27 +00:00
dfeea6958a
msghdr.c: apply a sane limit to the length of IP_ORIGDSTADDR address
...
* msghdr.c (print_cmsg_ip_origdstaddr): Limit address length to the size
of struct sockaddr_storage.
2016-06-30 22:26:35 +00:00
029d979767
msghdr.c: fix printing SCM_RIGHTS array
...
* msghdr.c (print_scm_rights): Do not print array elements outside
bounds defined by struct cmsghdr.cmsg_len.
2016-06-30 22:23:38 +00:00
6c30aecaf3
msghdr.c: print unrecognized struct cmsghdr.cmsg_type in hex
...
* msghdr.c (print_cmsg_type_data): Use %#x format when printing
struct cmsghdr.cmsg_type as an integer.
2016-06-30 22:14:51 +00:00
db0e6e17b3
msghdr.c: fix printing of struct in_pktinfo
...
* msghdr.c (print_cmsg_ip_pktinfo): Fix printing
of struct in_pktinfo.ipi_addr.
2016-06-30 22:10:31 +00:00
2a897372db
msghdr.c: fix representation of struct cmsghdr.cmsg_data integer arrays
...
* msghdr.c (print_cmsg_ip_opts): Print struct cmsghdr.cmsg_data
as an array of hexadecimal integers.
* tests/inet-cmsg.c (print_opts): Update expected output.
2016-06-30 22:10:31 +00:00
17e624cf96
msghdr.c: fix representation of integer struct cmsghdr.cmsg_data values
...
* msghdr.c (print_cmsg_ip_ttl, print_cmsg_ip_tos,
print_cmsg_ip_checksum): Print struct cmsghdr.cmsg_data value as an
array element.
* tests/inet-cmsg.c (print_ttl, print_tos): Update expected output.
2016-06-30 22:10:28 +00:00
08c0960ad5
msghdr.c: when printing struct struct cmsghdr.cmsg_data, also print its name
...
* msghdr.c (print_scm_rights, print_scm_creds, print_scm_security,
print_cmsg_ip_pktinfo, print_cmsg_ip_ttl, print_cmsg_ip_tos,
print_cmsg_ip_checksum, print_cmsg_ip_opts, print_cmsg_ip_recverr,
print_cmsg_ip_origdstaddr): Print "cmsg_data=" before its contents.
* tests/inet-cmsg.c (print_pktinfo, print_ttl, print_tos, print_opts,
print_origdstaddr): Update expected output.
* tests/scm_rights-fd.test: Likewise.
2016-06-30 22:02:09 +00:00
a50ec34945
msghdr.c: print struct mmsghdr as a regular structure
...
* msghdr.c (decode_mmsghdr): Print names of msg_hdr and msg_len fields.
* tests/mmsg.c (main): Update expected output.
2016-06-27 00:14:34 +00:00
95cce4f9a6
net.c: move all msghdr and mmsghdr parsers to a separate file
...
* defs.h (msg_flags, socketlayers, decode_msghdr, decode_mmsg):
New prototypes.
* msghdr.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* net.c: Move all msghdr and mmsghdr parsers to msghdr.c.
2016-06-27 00:10:58 +00:00