From ba25fb1bccfbe9b0e459ffa5db1137cd735a13ab Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Fri, 18 Dec 2015 12:43:28 +0100 Subject: [PATCH] refclock: describe fields in SOCK sample --- refclock_sock.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/refclock_sock.c b/refclock_sock.c index 97f740b..8ab4d52 100644 --- a/refclock_sock.c +++ b/refclock_sock.c @@ -37,11 +37,23 @@ #define SOCK_MAGIC 0x534f434b struct sock_sample { + /* Time of the measurement (system time) */ struct timeval tv; + + /* Offset between the true time and the system time (in seconds) */ double offset; + + /* Non-zero if the sample is from a PPS signal, i.e. another source + is needed to obtain seconds */ int pulse; + + /* 0 - normal, 1 - insert leap second, 2 - delete leap second */ int leap; + + /* Padding, ignored */ int _pad; + + /* Protocol identifier (0x534f434b) */ int magic; };