[Git][NTPsec/ntpsec][master] 2 commits: Fully update the documentation for the refclock directive.

Eric S. Raymond gitlab at mg.gitlab.com
Wed Jun 29 13:21:23 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
62ca9f7b by Eric S. Raymond at 2016-06-29T09:05:31-04:00
Fully update the documentation for the refclock directive.

- - - - -
29b1912e by Eric S. Raymond at 2016-06-29T09:20:03-04:00
Eliminare a magic-address assumption in a comment.

- - - - -


2 changed files:

- docs/includes/clock-options.txt
- ntpd/ntp_refclock.c


Changes:

=====================================
docs/includes/clock-options.txt
=====================================
--- a/docs/includes/clock-options.txt
+++ b/docs/includes/clock-options.txt
@@ -1,28 +1,29 @@
 // Options for refclocks.  Included twice.
-//
-// This can't be merged with the master description of association
-// options because the cited options have different
-// and more specific semantics when used with refclocks.
 
-+refclock+ _drivername_ +unit+ _u_ [+prefer+] [+mode+ _int_] [+minpoll+ _int_]
-[+maxpoll+ _int_] [+time1+ _sec_] [+time2+ _sec_] [+stratum+ _int_] [+refid+ _string_] [+mode+ _int_] [+flag1+ +0+ | +1+] [+flag2+ +0+ | +1+] [+flag3+ +0+ | +1+] [+flag4+ +0+ | +1+]::
-  This command can be used to configure reference clocks in special
-  ways. The required _drivername_ argument is the shortname of a driver type
++refclock+ _drivername_ [+unit+ _u_] [+prefer+] [+subtype+ _int_] [+mode+ _int_] [+minpoll+ _int_] [+maxpoll+ _int_] [+time1+ _sec_] [+time2+ _sec_] [+stratum+ _int_] [+refid+ _string_] [+flag1+ {+0+ | +1+}] [+flag2+ {+0+ | +1+}] [+flag3+ {+0+ | +1+}] [+flag4+ {+0+ | +1+}]::
+  This command is used to configure reference clocks.
+  The required _drivername_ argument is the shortname of a driver type
   (e.g. +shm+, +nmea+, +generic+; see the "Reference Clock Drivers"
   page for a full list. The options are interpreted as follows:
 
   +unit+;;
     The 0-origin unit number of the device. Modifies the devicename.
+    If not specified, defaults to zero.
   +prefer+;;
     Marks the reference clock as preferred. All other things being
     equal, this host will be chosen for synchronization among a set of
-    correctly operating hosts. See the "Mitigation Rules and the prefer
-    Keyword" page (available as part of the HTML documentation provided
-    in +/usr/share/doc/{ntp}+) for further information.
+    correctly operating hosts and clocks. See the "Mitigation Rules
+    and the prefer Keyword" page (available as part of the HTML
+    documentation provided in +/usr/share/doc/{ntp}+) for further
+    information.
+  +subtype+ _int_;;
+    Some drivers (notably the generic and jjy drivers) support
+    multiple device types.  This option selects among them in
+    a driver-dependent way.
   +mode+ _int_;;
     Specifies a mode number which is interpreted in a device-specific
     fashion. For instance, it selects a dialing protocol in the ACTS
-    driver and a device subtype in the parse drivers.
+    driver and a sentence mix in the nmea driver.
   +minpoll+ _int_; +maxpoll+ _int_;;
     These options specify the minimum and maximum polling interval for
     reference clock messages, as a power of 2 in seconds. For most
@@ -60,10 +61,6 @@
     defines the reference identifier used by the driver. This string
     overrides the default identifier ordinarily assigned by the driver
     itself.
-  +mode+ _int_;;
-    Specifies a mode number which is interpreted in a device-specific
-    fashion. For instance, it selects a dialing protocol in the ACTS
-    driver and a device subtype in the parse drivers.
   +flag1+ +{0 | 1}+; +flag2+ +{0 | 1}+; +flag3+ +{0 | 1}+; +flag4+ +{0 | 1}+;;
     These four flags are used for customizing the clock driver. The
     interpretation of these values, and whether they are used at all, is


=====================================
ntpd/ntp_refclock.c
=====================================
--- a/ntpd/ntp_refclock.c
+++ b/ntpd/ntp_refclock.c
@@ -54,8 +54,7 @@
  * which is used for all peer-specific processing and contains a
  * pointer to the refclockproc structure, which in turn contains a
  * pointer to the unit structure, if used.  The peer structure is 
- * identified by an interface address in the dotted quad form 
- * 127.127.t.u, where t is the clock type and u the unit.
+ * identified as a refclock by having a non-NULL procptr member. 
  */
 #define FUDGEFAC	.1	/* fudge correction factor */
 #define LF		0x0a	/* ASCII LF */



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/c66208b53af71684e0c44f7cc547fde30860b63e...29b1912e521fbd2edadf03369166fe85694b2e61
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160629/7c700ad4/attachment.html>


More information about the vc mailing list