summaryrefslogtreecommitdiff
path: root/ntpshm.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-25 14:46:19 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-25 14:46:19 -0500
commit38c3e0b290b0f289b9276c60abcef7b68b97f36d (patch)
tree3aa1c8354f63c19a08a2428b1b6136f65104d290 /ntpshm.h
parent92105366a01e1cda5af5249b4c0d1fdaf4bdec8a (diff)
downloadgpsd-38c3e0b290b0f289b9276c60abcef7b68b97f36d.tar.gz
Document obscure fields in the NTP shared-memory segment.
Diffstat (limited to 'ntpshm.h')
-rw-r--r--ntpshm.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/ntpshm.h b/ntpshm.h
index 60580c24..7ea8ad0c 100644
--- a/ntpshm.h
+++ b/ntpshm.h
@@ -17,6 +17,16 @@
/*
* How to read and write fields in an NTP shared segment.
* This definition of shmTime is from ntpd source ntpd/refclock_shm.c
+ *
+ * The fields aren't documented there. It appears the only use of nsamples
+ * is internal to the EES M201 receiver refclock. The precision field
+ * is nominally log(2) of the jitter in seconds:
+ * -1 is about 100mSec jitter
+ * -10 is about 1 mSec jitter (GR-601W or other USB with 1ms poll interval)
+ * -13 is about 100 uSec
+ * -20 is about 1 nSec (typical for serial PPS)
+ * The precision field is not used in ntpd 4.2.8 and probably not in other
+ * recent versions either.
*/
struct shmTime
@@ -34,9 +44,9 @@ struct shmTime
int clockTimeStampUSec;
time_t receiveTimeStampSec;
int receiveTimeStampUSec;
- int leap;
- int precision;
- int nsamples;
+ int leap; /* not leapsecond offset, a notification code */
+ int precision; /* not used */
+ int nsamples; /* not used */
volatile int valid;
unsigned clockTimeStampNSec; /* Unsigned ns timestamps */
unsigned receiveTimeStampNSec; /* Unsigned ns timestamps */