* Improvements
* Added C-SKY architecture support.
+ * Implemented decoding of SO_TIMESTAMP*_NEW control messages.
* Wired up clock_gettime64, clock_settime64, clock_adjtime64,
clock_getres_time64, clock_nanosleep_time64, timer_gettime64,
timer_settime64, timerfd_gettime64, timerfd_settime64, utimensat_time64,
extern const char *sprint_timespec64(struct tcb *, kernel_ulong_t);
extern int print_timespec64_utime_pair(struct tcb *, kernel_ulong_t);
extern int print_itimerspec64(struct tcb *, kernel_ulong_t);
+
+extern bool print_timeval64_data_size(const void *arg, size_t size);
+
extern int print_timex64(struct tcb *, kernel_ulong_t);
# ifdef SPARC64
print_struct_timespec_array_data_size(cmsg_data, 3, data_len);
}
+static void
+print_scm_timestamp_new(struct tcb *tcp, const void *cmsg_data,
+ const unsigned int data_len)
+{
+ print_timeval64_data_size(cmsg_data, data_len);
+}
+
+static void
+print_scm_timestampns_new(struct tcb *tcp, const void *cmsg_data,
+ const unsigned int data_len)
+{
+ print_timespec64_data_size(cmsg_data, data_len);
+}
+
+static void
+print_scm_timestamping_new(struct tcb *tcp, const void *cmsg_data,
+ const unsigned int data_len)
+{
+ print_timespec64_array_data_size(cmsg_data, 3, data_len);
+}
+
static void
print_cmsg_ip_pktinfo(struct tcb *tcp, const void *cmsg_data,
const unsigned int data_len)
[SCM_SECURITY] = { print_scm_security, 1 },
[SO_TIMESTAMP_OLD] = { print_scm_timestamp_old, 1 },
[SO_TIMESTAMPNS_OLD] = { print_scm_timestampns_old, 1 },
- [SO_TIMESTAMPING_OLD] = { print_scm_timestamping_old, 1 }
+ [SO_TIMESTAMPING_OLD] = { print_scm_timestamping_old, 1 },
+ [SO_TIMESTAMP_NEW] = { print_scm_timestamp_new, 1 },
+ [SO_TIMESTAMPNS_NEW] = { print_scm_timestampns_new, 1 },
+ [SO_TIMESTAMPING_NEW] = { print_scm_timestamping_new, 1 }
}, cmsg_ip_printers[] = {
[IP_PKTINFO] = { print_cmsg_ip_pktinfo, sizeof(struct in_pktinfo) },
[IP_TTL] = { print_cmsg_uint, sizeof(unsigned int) },
--- /dev/null
+/*
+ * Copyright (c) 2019 Dmitry V. Levin <ldv@altlinux.org>
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#include "defs.h"
+
+#define TIMESPEC_T kernel_timeval64_t
+#define TIMESPEC_NSEC tv_usec
+#define PRINT_TIMESPEC_DATA_SIZE print_timeval64_data_size
+
+#include "kernel_timeval.h"
+#include "print_timespec.h"