]> granicus.if.org Git - strace/commit
msghdr: print SCM_TIMESTAMP* control messages
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 15 Jun 2017 14:02:40 +0000 (16:02 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 15 Jun 2017 23:52:48 +0000 (23:52 +0000)
commitc0a127d16341ed7fd574d2367761b721a1c91aca
treea80b254848b6ee7751b6e179c78271ee03c0cee7
parent97d771159b366921337617ffbec1f262c1b08613
msghdr: print SCM_TIMESTAMP* control messages

Add support for printing control messages containing software and/or
hardware timestamps, which are typically enabled by NTP and PTP
implementations.

* print_timeval.c (print_struct_timeval_data_size): New mpers printer.
* print_timespec.c (print_struct_timespec_data_size,
print_struct_timespec_array_data_size): Likewise.
* msghdr.c (print_scm_timestamp, print_scm_timestampns,
print_scm_timestamping): New functions.
(cmsg_socket_printers): Add them.
* NEWS: Mention this change.
* tests/msg_control.c: Include "xlat.h" and "xlat/scmvals.h".
(test_scm_timestamp, test_scm_timestampns, test_scm_timestamping):
New functions.
(test_sol_socket): Use them.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
NEWS
msghdr.c
print_timespec.c
print_timeval.c
tests/msg_control.c