public inbox for
help / color / mirror / Atom feed
* [newlib-cygwin] Use hardware timestamps to report packet timestamps
@ 2018-08-24 13:10 Sebastian Huber
  0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2018-08-24 13:10 UTC (permalink / raw)
  To: newlib-cvs;h=91e828be4fc1dbf7a1c1966ff6d3e9e3fbe9647f

commit 91e828be4fc1dbf7a1c1966ff6d3e9e3fbe9647f
Author: kib <>
Date:   Tue Nov 7 09:46:26 2017 +0000

    Use hardware timestamps to report packet timestamps
    for SO_TIMESTAMP and other similar socket options.
    Provide new control message SCM_TIME_INFO to supply information about
    timestamp.  Currently it indicates that the timestamp was
    hardware-assisted and high-precision, for software timestamps the
    message is not returned.  Reserved fields are added to ABI to report
    additional info about it, it is expected that raw hardware clock value
    might be useful for some applications.
    Reviewed by:	gallatin (previous version), hselasky
    Sponsored by:	Mellanox Technologies
    MFC after:	2 weeks
    X-Differential revision:

 newlib/libc/sys/rtems/include/sys/socket.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/newlib/libc/sys/rtems/include/sys/socket.h b/newlib/libc/sys/rtems/include/sys/socket.h
index 87d0f33..7c42eb5 100644
--- a/newlib/libc/sys/rtems/include/sys/socket.h
+++ b/newlib/libc/sys/rtems/include/sys/socket.h
@@ -563,6 +563,17 @@ struct sockcred {
 #define	SCM_BINTIME	0x04		/* timestamp (struct bintime) */
 #define	SCM_REALTIME	0x05		/* timestamp (struct timespec) */
 #define	SCM_MONOTONIC	0x06		/* timestamp (struct timespec) */
+#define	SCM_TIME_INFO	0x07		/* timestamp info */
+struct sock_timestamp_info {
+	__uint32_t	st_info_flags;
+	__uint32_t	st_info_pad0;
+	__uint64_t	st_info_rsv[7];
+#define	ST_INFO_HW		0x0001		/* SCM_TIMESTAMP was hw */
+#define	ST_INFO_HW_HPREC	0x0002		/* SCM_TIMESTAMP was hw-assisted
+						   on entrance */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-24 13:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-24 13:10 [newlib-cygwin] Use hardware timestamps to report packet timestamps Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).