summaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-12-02 09:01:21 +0000
committer <>2014-12-04 16:11:25 +0000
commitbdab5265fcbf3f472545073a23f8999749a9f2b9 (patch)
treec6018dd03dea906f8f1fb5f105f05b71a7dc250a /html
downloadntp-bdab5265fcbf3f472545073a23f8999749a9f2b9.tar.gz
Imported from /home/lorry/working-area/delta_ntp/ntp-dev-4.2.7p482.tar.gz.ntp-dev-4.2.7p482
Diffstat (limited to 'html')
-rw-r--r--html/access.html50
-rw-r--r--html/accopt.html91
-rw-r--r--html/assoc.html81
-rw-r--r--html/audio.html180
-rw-r--r--html/authentic.html65
-rw-r--r--html/authopt.html95
-rw-r--r--html/autokey.html215
-rw-r--r--html/bugs.html27
-rw-r--r--html/build.html57
-rw-r--r--html/clock.html65
-rw-r--r--html/clockopt.html59
-rw-r--r--html/cluster.html32
-rw-r--r--html/comdex.html29
-rw-r--r--html/config.html40
-rw-r--r--html/confopt.html103
-rw-r--r--html/copyright.html102
-rw-r--r--html/debug.html93
-rw-r--r--html/decode.html692
-rw-r--r--html/discipline.html49
-rw-r--r--html/discover.html75
-rw-r--r--html/drivers/driver1.html50
-rw-r--r--html/drivers/driver10.html53
-rw-r--r--html/drivers/driver11.html85
-rw-r--r--html/drivers/driver12.html49
-rw-r--r--html/drivers/driver16.html34
-rw-r--r--html/drivers/driver18.html82
-rw-r--r--html/drivers/driver19.html59
-rw-r--r--html/drivers/driver20.html432
-rw-r--r--html/drivers/driver22.html98
-rw-r--r--html/drivers/driver26.html56
-rw-r--r--html/drivers/driver27.html248
-rw-r--r--html/drivers/driver28.html147
-rw-r--r--html/drivers/driver29.html1093
-rw-r--r--html/drivers/driver3.html76
-rw-r--r--html/drivers/driver30.html86
-rw-r--r--html/drivers/driver31.html61
-rw-r--r--html/drivers/driver32.html40
-rw-r--r--html/drivers/driver33.html36
-rw-r--r--html/drivers/driver34.html82
-rw-r--r--html/drivers/driver35.html51
-rw-r--r--html/drivers/driver36.html150
-rw-r--r--html/drivers/driver37.html54
-rw-r--r--html/drivers/driver38.html133
-rw-r--r--html/drivers/driver39.html115
-rw-r--r--html/drivers/driver4.html76
-rw-r--r--html/drivers/driver40.html264
-rw-r--r--html/drivers/driver42.html33
-rw-r--r--html/drivers/driver43.html68
-rw-r--r--html/drivers/driver44.html91
-rw-r--r--html/drivers/driver45.html32
-rw-r--r--html/drivers/driver46.html184
-rw-r--r--html/drivers/driver5.html83
-rw-r--r--html/drivers/driver6.html80
-rw-r--r--html/drivers/driver7.html144
-rw-r--r--html/drivers/driver8.html278
-rw-r--r--html/drivers/driver9.html60
-rw-r--r--html/drivers/icons/home.gifbin0 -> 983 bytes
-rw-r--r--html/drivers/icons/mail2.gifbin0 -> 287 bytes
-rw-r--r--html/drivers/mx4200data.html1077
-rw-r--r--html/drivers/oncore-shmem.html164
-rw-r--r--html/drivers/scripts/footer.txt9
-rw-r--r--html/drivers/scripts/style.css64
-rw-r--r--html/drivers/tf582_4.html74
-rw-r--r--html/extern.html48
-rw-r--r--html/filter.html34
-rw-r--r--html/hints.html22
-rw-r--r--html/hints/a-ux195
-rw-r--r--html/hints/aix76
-rw-r--r--html/hints/bsdi65
-rw-r--r--html/hints/changes13
-rw-r--r--html/hints/decosf140
-rw-r--r--html/hints/decosf254
-rw-r--r--html/hints/freebsd15
-rw-r--r--html/hints/hpux158
-rw-r--r--html/hints/linux5
-rw-r--r--html/hints/mpeix50
-rw-r--r--html/hints/notes-xntp-v3119
-rw-r--r--html/hints/parse105
-rw-r--r--html/hints/refclocks35
-rw-r--r--html/hints/rs600056
-rw-r--r--html/hints/sco.html29
-rw-r--r--html/hints/sgi74
-rw-r--r--html/hints/solaris-dosynctodr.html321
-rw-r--r--html/hints/solaris.html236
-rw-r--r--html/hints/solaris.xtra.402311836
-rw-r--r--html/hints/solaris.xtra.409584974
-rw-r--r--html/hints/solaris.xtra.S99ntpd21
-rw-r--r--html/hints/solaris.xtra.patchfreq85
-rw-r--r--html/hints/sun415
-rw-r--r--html/hints/svr4-dell8
-rw-r--r--html/hints/svr4_package33
-rw-r--r--html/hints/todo4
-rw-r--r--html/hints/vxworks.html88
-rw-r--r--html/hints/winnt.html90
-rw-r--r--html/history.html74
-rw-r--r--html/howto.html109
-rw-r--r--html/huffpuff.html31
-rw-r--r--html/icons/home.gifbin0 -> 983 bytes
-rw-r--r--html/icons/mail2.gifbin0 -> 287 bytes
-rw-r--r--html/icons/sitemap.pngbin0 -> 2825 bytes
-rw-r--r--html/index.html73
-rw-r--r--html/kern.html32
-rw-r--r--html/kernpps.html49
-rw-r--r--html/keygen.html116
-rw-r--r--html/leap.html24
-rw-r--r--html/miscopt.html177
-rw-r--r--html/monopt.html566
-rw-r--r--html/msyslog.html129
-rw-r--r--html/ntp-wait.html33
-rw-r--r--html/ntp_conf.html174
-rw-r--r--html/ntpd.html176
-rw-r--r--html/ntpdate.html81
-rw-r--r--html/ntpdc.html178
-rw-r--r--html/ntpdsim.html71
-rw-r--r--html/ntpdsim_new.html110
-rw-r--r--html/ntpq.html654
-rw-r--r--html/ntptime.html46
-rw-r--r--html/ntptrace.html42
-rw-r--r--html/orphan.html42
-rw-r--r--html/parsedata.html352
-rw-r--r--html/parsenew.html199
-rw-r--r--html/pic/9400n.jpgbin0 -> 5736 bytes
-rw-r--r--html/pic/alice11.gifbin0 -> 18003 bytes
-rw-r--r--html/pic/alice13.gifbin0 -> 11516 bytes
-rw-r--r--html/pic/alice15.gifbin0 -> 26328 bytes
-rw-r--r--html/pic/alice23.gifbin0 -> 7753 bytes
-rw-r--r--html/pic/alice31.gifbin0 -> 13824 bytes
-rw-r--r--html/pic/alice32.gifbin0 -> 17168 bytes
-rw-r--r--html/pic/alice35.gifbin0 -> 8968 bytes
-rw-r--r--html/pic/alice38.gifbin0 -> 10296 bytes
-rw-r--r--html/pic/alice44.gifbin0 -> 19897 bytes
-rw-r--r--html/pic/alice47.gifbin0 -> 10771 bytes
-rw-r--r--html/pic/alice51.gifbin0 -> 12403 bytes
-rw-r--r--html/pic/alice61.gifbin0 -> 11269 bytes
-rw-r--r--html/pic/barnstable.gifbin0 -> 2946 bytes
-rw-r--r--html/pic/beaver.gifbin0 -> 2831 bytes
-rw-r--r--html/pic/boom3.gifbin0 -> 11042 bytes
-rw-r--r--html/pic/boom3a.gifbin0 -> 18300 bytes
-rw-r--r--html/pic/boom4.gifbin0 -> 16157 bytes
-rw-r--r--html/pic/broad.gifbin0 -> 5728 bytes
-rw-r--r--html/pic/bustardfly.gifbin0 -> 8476 bytes
-rw-r--r--html/pic/c51.jpgbin0 -> 16429 bytes
-rw-r--r--html/pic/description.jpgbin0 -> 34170 bytes
-rw-r--r--html/pic/discipline.gifbin0 -> 6836 bytes
-rw-r--r--html/pic/dogsnake.gifbin0 -> 5445 bytes
-rw-r--r--html/pic/driver29.gifbin0 -> 11723 bytes
-rw-r--r--html/pic/driver43_1.gifbin0 -> 38818 bytes
-rw-r--r--html/pic/driver43_2.jpgbin0 -> 6576 bytes
-rw-r--r--html/pic/fg6021.gifbin0 -> 21593 bytes
-rw-r--r--html/pic/fg6039.jpgbin0 -> 7383 bytes
-rw-r--r--html/pic/fig_3_1.gifbin0 -> 10428 bytes
-rw-r--r--html/pic/flatheads.gifbin0 -> 13085 bytes
-rw-r--r--html/pic/flt1.gifbin0 -> 9045 bytes
-rw-r--r--html/pic/flt2.gifbin0 -> 3148 bytes
-rw-r--r--html/pic/flt3.gifbin0 -> 1847 bytes
-rw-r--r--html/pic/flt4.gifbin0 -> 3876 bytes
-rw-r--r--html/pic/flt5.gifbin0 -> 10609 bytes
-rw-r--r--html/pic/flt6.gifbin0 -> 15563 bytes
-rw-r--r--html/pic/flt7.gifbin0 -> 7848 bytes
-rw-r--r--html/pic/flt8.gifbin0 -> 5969 bytes
-rw-r--r--html/pic/flt9.gifbin0 -> 8948 bytes
-rw-r--r--html/pic/freq1211.gifbin0 -> 11428 bytes
-rw-r--r--html/pic/gadget.jpgbin0 -> 26341 bytes
-rw-r--r--html/pic/gps167.jpgbin0 -> 15589 bytes
-rw-r--r--html/pic/group.gifbin0 -> 2756 bytes
-rw-r--r--html/pic/hornraba.gifbin0 -> 8790 bytes
-rw-r--r--html/pic/igclock.gifbin0 -> 8985 bytes
-rwxr-xr-xhtml/pic/neoclock4x.gifbin0 -> 14977 bytes
-rw-r--r--html/pic/offset1211.gifbin0 -> 25493 bytes
-rw-r--r--html/pic/oncore_evalbig.gifbin0 -> 7904 bytes
-rw-r--r--html/pic/oncore_remoteant.jpgbin0 -> 4828 bytes
-rw-r--r--html/pic/oncore_utplusbig.gifbin0 -> 10117 bytes
-rw-r--r--html/pic/oz2.gifbin0 -> 8225 bytes
-rw-r--r--html/pic/panda.gifbin0 -> 1660 bytes
-rw-r--r--html/pic/pd_om006.gifbin0 -> 16704 bytes
-rw-r--r--html/pic/pd_om011.gifbin0 -> 12848 bytes
-rw-r--r--html/pic/peer.gifbin0 -> 4936 bytes
-rw-r--r--html/pic/pogo.gifbin0 -> 1918 bytes
-rw-r--r--html/pic/pogo1a.gifbin0 -> 18769 bytes
-rw-r--r--html/pic/pogo3a.gifbin0 -> 3657 bytes
-rw-r--r--html/pic/pogo4.gifbin0 -> 3213 bytes
-rw-r--r--html/pic/pogo5.gifbin0 -> 5819 bytes
-rw-r--r--html/pic/pogo6.gifbin0 -> 5902 bytes
-rw-r--r--html/pic/pogo7.gifbin0 -> 13817 bytes
-rw-r--r--html/pic/pogo8.gifbin0 -> 7820 bytes
-rw-r--r--html/pic/pzf509.jpgbin0 -> 13011 bytes
-rw-r--r--html/pic/pzf511.jpgbin0 -> 20370 bytes
-rw-r--r--html/pic/rabbit.gifbin0 -> 3342 bytes
-rw-r--r--html/pic/radio2.jpgbin0 -> 17006 bytes
-rw-r--r--html/pic/sheepb.jpgbin0 -> 20295 bytes
-rw-r--r--html/pic/stack1a.jpgbin0 -> 29655 bytes
-rw-r--r--html/pic/stats.gifbin0 -> 12168 bytes
-rw-r--r--html/pic/sx5.gifbin0 -> 20470 bytes
-rw-r--r--html/pic/thunderbolt.jpgbin0 -> 38718 bytes
-rw-r--r--html/pic/time1.gifbin0 -> 4507 bytes
-rw-r--r--html/pic/tonea.gifbin0 -> 12002 bytes
-rw-r--r--html/pic/tribeb.gifbin0 -> 30287 bytes
-rw-r--r--html/pic/wingdorothy.gifbin0 -> 10849 bytes
-rw-r--r--html/poll.html26
-rw-r--r--html/pps.html47
-rw-r--r--html/prefer.html93
-rw-r--r--html/quick.html45
-rw-r--r--html/rate.html67
-rw-r--r--html/rdebug.html29
-rw-r--r--html/refclock.html93
-rw-r--r--html/release.html72
-rw-r--r--html/scripts/accopt.txt5
-rw-r--r--html/scripts/audio.txt7
-rw-r--r--html/scripts/authopt.txt12
-rw-r--r--html/scripts/clockopt.txt5
-rw-r--r--html/scripts/command.txt7
-rw-r--r--html/scripts/config.txt5
-rw-r--r--html/scripts/confopt.txt12
-rw-r--r--html/scripts/external.txt19
-rw-r--r--html/scripts/footer.txt9
-rw-r--r--html/scripts/hand.txt11
-rw-r--r--html/scripts/install.txt10
-rw-r--r--html/scripts/manual.txt13
-rw-r--r--html/scripts/misc.txt9
-rw-r--r--html/scripts/miscopt.txt21
-rw-r--r--html/scripts/monopt.txt6
-rw-r--r--html/scripts/refclock.txt7
-rw-r--r--html/scripts/special.txt17
-rw-r--r--html/scripts/style.css64
-rw-r--r--html/select.html41
-rw-r--r--html/sitemap.html33
-rw-r--r--html/sntp.html78
-rw-r--r--html/stats.html70
-rw-r--r--html/tickadj.html45
-rw-r--r--html/warp.html60
-rw-r--r--html/xleave.html30
231 files changed, 15161 insertions, 0 deletions
diff --git a/html/access.html b/html/access.html
new file mode 100644
index 0000000..3489f8f
--- /dev/null
+++ b/html/access.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Access Control Support</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+<style1 {
+color: #FF0000;
+ font-weight: bold;
+}
+-->
+</style>
+</head>
+<body>
+<h3>Access Control Support</h3>
+<p><img src="pic/pogo6.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a></p>
+<p>The skunk watches for intruders and sprays.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:53<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/accopt.txt"></script>
+<hr>
+<h4>Access Control Support</h4>
+<p>The <tt>ntpd</tt> daemon implements a general purpose access control list (ACL) containing address/match entries sorted first by increasing address values and then by increasing mask values. A match occurs when the bitwise AND of the mask and the packet source address is equal to the bitwise AND of the mask and address in the list. The list is searched in order with the last match found defining the restriction flags associated with the entry.</p>
+<p>The ACL is specified as a list of <tt>restrict</tt> commands in the following format:</p>
+<p><tt>restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt></p>
+<p>The <tt><i>address</i></tt> argument expressed in dotted-quad form is the address of a host or network. Alternatively, the <tt><i>address</i></tt> argument can be a valid host DNS name. The <tt><i>mask</i></tt> argument expressed in IPv4 or IPv6 numeric address form defaults to all mask bits on, meaning that the <tt><i>address</i></tt> is treated as the address of an individual host. A default entry (address 0.0.0.0, mask 0.0.0.0 for IPv4 and address :: mask :: for IPv6) is always the first entry in the list. <tt>restrict default</tt>, with no mask option, modifies both IPv4 and IPv6 default entries. <tt>restrict source</tt> configures a template restriction automatically added at runtime for each association, whether configured, ephemeral, or preemptable, and removed when the association is demobilized.</p>
+<p>Some flags have the effect to deny service, some have the effect to enable service and some are conditioned by other flags. The flags. are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags that deny service are classed in two categories, those that restrict time service and those that restrict informational queries and attempts to do run-time reconfiguration of the server.</p>
+<p>An example may clarify how it works. Our campus has two class-B networks, 128.4 for the ECE and CIS departments and 128.175 for the rest of campus. Let's assume (not true!) that subnet 128.4.1 homes critical services like class rosters and spread sheets. A suitable ACL might look like this:</p>
+<pre>
+restrict default nopeer # deny new associations
+restrict 128.175.0.0 mask 255.255.0.0 # allow campus access
+restrict 128.4.0.0 mask 255.255.0.0 none # allow ECE and CIS access
+restrict 128.4.1.0 mask 255.255.255.0 notrust # require authentication on subnet 1
+restrict time.nist.gov # allow access
+</pre>
+<p>While this facility may be useful for keeping unwanted, broken or malicious clients from congesting innocent servers, it should not be considered an alternative to the NTP authentication facilities. Source address based restrictions are easily circumvented by a determined cracker.</p>
+<p>Default restriction list entries with the flags <tt>ignore, ntpport</tt>, for each of the local host's interface addresses are inserted into the table at startup to prevent the server from attempting to synchronize to its own time. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted).</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
+</html>
diff --git a/html/accopt.html b/html/accopt.html
new file mode 100644
index 0000000..6caff48
--- /dev/null
+++ b/html/accopt.html
@@ -0,0 +1,91 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Access Control Commands and Options</title>
+<!-- Changed by: Harlan &, 13-Nov-2014 -->
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+<style1 {
+color: #FF0000;
+ font-weight: bold;
+}
+-->
+</style>
+</head>
+<body>
+<h3>Access Control Commands and Options</h3>
+<img src="pic/pogo6.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>The skunk watches for intruders and sprays.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->13-Nov-2014 03:00<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/accopt.txt"></script>
+<hr>
+<h4>Commands and Options</h4>
+<p>Unless noted otherwise, further information about these ccommands is on the <a href="accopt.html">Access Control Support</a> page.</p>
+<dl>
+ <dt id="discard"><tt>discard [ average <i>avg</i> ][ minimum <i>min</i> ] [ monitor <i>prob</i> ]</tt></dt>
+ <dd>Set the parameters of the rate control facility which protects the server from client abuse. If the <tt>limited</tt> flag is present in the ACL, packets that violate these limits are discarded. If, in addition, the <tt>kod</tt> flag is present, a kiss-o'-death packet is returned. See the <a href="rate.html">Rate Management</a> page for further information. The options are:
+ <dl>
+ <dt><tt>average <i>avg</i></tt></dt>
+ <dd>Specify the minimum average interpacket spacing (minimum average headway
+ time) in log<sub>2</sub> s with default 3.</dd>
+ <dt><tt>minimum <i>min</i></tt></dt>
+ <dd>Specify the minimum interpacket spacing (guard time) in seconds with default 2.</dd>
+ <dt><tt>monitor</tt></dt>
+ <dd>Specify the probability of being recorded for packets that overflow the MRU list size limit set by <tt>mru maxmem</tt> or <tt>mru maxdepth</tt>. This is a performance optimization for servers with aggregate arrivals of 1000 packets per second or more.</dd>
+ </dl>
+ </dd>
+ <dt id="restrict"><tt>restrict default [<i>flag</i>][...]<br>
+ restrict source [<i>flag</i>][...]<br>
+ restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt></dt>
+ <dd>The <tt><i>address</i></tt> argument expressed in dotted-quad form is the address of a host or network. Alternatively, the <tt><i>address</i></tt> argument can be a valid host DNS name. The <tt><i>mask</i></tt> argument expressed in IPv4 or IPv6 numeric address form defaults to all mask bits on, meaning that the <tt><i>address</i></tt> is treated as the address of an individual host. A default entry (address 0.0.0.0, mask 0.0.0.0 for IPv4 and address :: mask :: for IPv6) is always the first entry in the list. <tt>restrict default</tt>, with no mask option, modifies both IPv4 and IPv6 default entries. <tt>restrict source</tt> configures a template restriction automatically added at runtime for each association, whether configured, ephemeral, or preemptible, and removed when the association is demobilized.</dd>
+ <dd>Some flags have the effect to deny service, some have the effect to enable service and some are conditioned by other flags. The flags. are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags that deny service are classed in two categories, those that restrict time service and those that restrict informational queries and attempts to do run-time reconfiguration of the server. One or more of the following flags may be specified:</dd>
+ <dd>
+ <dl>
+ <dt><tt>flake</tt></dt>
+ <dd>Discard received NTP packets with probability 0.1; that is, on average drop one packet in ten. This is for testing and amusement. The name comes from Bob Braden's <i>flakeway</i>, which once did a similar thing for early Internet testing.</dd>
+ <dt><tt>ignore</tt></dt>
+ <dd>Deny packets of all kinds, including <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</dd>
+ <dt><tt>kod</tt></dt>
+ <dd>Send a kiss-o'-death (KoD) packet if the <tt>limited</tt> flag is present and a packet violates the rate limits established by the <tt>discard</tt> command. KoD packets are themselves rate limited for each source address separately. If the <tt>kod</tt> flag is used in a restriction which does not have the <tt>limited</tt> flag, no KoD responses will result.</dd>
+ <dt id="limited"><tt>limited</tt></dt>
+ <dd>Deny time service if the packet violates the rate limits established by the <tt>discard</tt> command. This does not apply to <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</dd>
+ <dt><tt>lowpriotrap</tt></dt>
+ <dd>Declare traps set by matching hosts to be low priority. The number of traps a server can maintain is limited (the current limit is 3). Traps are usually assigned on a first come, first served basis, with later trap requestors being denied service. This flag modifies the assignment algorithm by allowing low priority traps to be overridden by later requests for normal priority traps.</dd>
+ <dt><tt>mssntp</tt></dt>
+ <dd>Enable Microsoft Windows MS-SNTP authentication using Active Directory services. <span class="style1"><b>Note: Potential users should be aware that these services involve a TCP connection to another process that could potentially block, denying services to other users. Therefore, this flag should be used only for a dedicated server with no clients other than MS-SNTP.</b></span></dd>
+ <dt><tt>nomodify</tt></dt>
+ <dd>Deny <tt>ntpq</tt> and <tt>ntpdc</tt> queries which attempt to modify the state of the server (i.e., run time reconfiguration). Queries which return information are permitted.</dd>
+ <dt><tt>noquery</tt></dt>
+ <dd>Deny <tt>ntpq</tt> and <tt>ntpdc</tt> queries. Time service is not affected.</dd>
+ <dt><tt>nopeer</tt></dt>
+ <dd>Deny packets that might mobilize an association unless authenticated. This includes broadcast, symmetric-active and manycast server packets when a configured association does not exist. It also includes <tt>pool</tt> associations, so if you want to use servers from a <tt>pool</tt> directive and also want to use <tt>nopeer</tt> by default, you'll want a <tt>"restrict source ..."</tt> line as well that does <i>not</i> include the <tt>nopeer</tt> directive. Note that this flag does not apply to packets that do not attempt to mobilize an association. </dd>
+ <dt><tt>noserve</tt></dt>
+ <dd>Deny all packets except <tt>ntpq</tt> and <tt>ntpdc</tt> queries.</dd>
+ <dt><tt>notrap</tt></dt>
+ <dd>Decline to provide mode 6 control message trap service to matching hosts. The trap service is a subsystem of the <tt>ntpdc</tt> control message protocol which is intended for use by remote event logging programs.</dd>
+ <dt><tt>notrust</tt></dt>
+ <dd>Deny packets that are not cryptographically authenticated. Note carefully how this flag interacts with the <tt>auth</tt> option of the <tt>enable</tt> and <tt>disable</tt> commands. If <tt>auth</tt> is enabled, which is the default, authentication is required for all packets that might mobilize an association. If <tt>auth</tt> is disabled, but the <tt>notrust</tt> flag is not present, an association can be mobilized whether or not authenticated. If <tt>auth</tt> is disabled, but the <tt>notrust</tt> flag is present, authentication is required only for the specified address/mask range. </dd>
+ <dt><tt>ntpport</tt></dt>
+ <dd>This is actually a match algorithm modifier, rather than a restriction
+ flag. Its presence causes the restriction entry to be matched only if the
+ source port in the packet is the standard NTP UDP port (123). A restrict line
+ containing <tt>ntpport</tt> is considered more specific than one with the
+ same address and mask, but lacking <tt>ntpport</tt>.</dd>
+ <dt><tt>version</tt></dt>
+ <dd>Deny packets that do not match the current NTP version.</dd>
+ </dl>
+ </dd>
+ <dd>Default restriction list entries with the flags <tt>ignore, ntpport</tt>, for each of the local host's interface addresses are inserted into the table at startup to prevent the server from attempting to synchronize to its own time. A default entry is also always present, though if it is otherwise unconfigured; no flags are associated with the default entry (i.e., everything besides your own NTP server is unrestricted).</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/assoc.html b/html/assoc.html
new file mode 100644
index 0000000..8dc0b1b
--- /dev/null
+++ b/html/assoc.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Association Management</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Association Management</h3>
+<img src="pic/alice51.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>Make sure who your friends are.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#modes">Association Modes</a></li>
+ <li class="inline"><a href="#client">Client/Server Mode</a></li>
+ <li class="inline"><a href="#symact">Symmetric Active/Passive Mode</a></li>
+ <li class="inline"><a href="#broad">Broadcast/Multicast Modes</a></li>
+ <li class="inline"><a href="#many">Manycast Mode</a></li>
+ <li class="inline"><a href="#poll">Poll Interval Management</a></li>
+ <li class="inline"><a href="#burst">Burst Options</a></li>
+</ul>
+<hr>
+<h4 id="modes">Association Modes</h4>
+<p>This page describes the various modes of operation provided in NTPv4. There are three types of associations in NTP: <em>persistent</em>, <em>preemptable</em> and <em>ephemeral</em>. Persistent associations are mobilized by a configuration command and never demobilized. Preemptable associations, which are new to NTPv4, are mobilized by a configuration command which includes the <tt>preempt</tt> option or upon arrival of an automatic server discovery packet. They are are demobilized by timeout or when preempted by a &quot;better&quot; server, as described on the <a href="discover.html">Automatic Server Discovery Schemes</a> page. Ephemeral associations are mobilized upon arrival of broadcast or multicast server packets and demobilized by timeout.</p>
+<p>Ordinarily, successful mobilization of ephemeral associations requires the server to be cryptographically authenticated to the client. This can be done using either symmetric key or Autokey public key cryptography, as described on the <a href="authentic.html">Authentication Support</a> page.</p>
+<p>There are three principal modes of operation in NTP: client/server, symmetric active/passive and broadcast/multicast. There are three automatic server discovery schemes in NTP: broadcast/multicast, manycast and pool described on the <a href="discover.html">Automatic Server Discovery Schemes</a> page. In addition, the <a href="#burst">burst options</a> and <a href="orphan.html">orphan mode</a> can be used in appropriate cases.</p>
+<p>Following is a summary of the operations in each mode. Note that reference to option applies to the commands described on the <a href="confopt.html">Server Commands and Options</a> page. See that page for applicability and defaults.</p>
+<h4 id="client">Client/Server Mode</h4>
+<p>Client/server mode is the most common configuration in the Internet today. It operates in the classic remote-procedure-call (RPC) paradigm with stateless servers and stateful clients. In this mode a host sends a client (mode 3) request to the specified server and expects a server (mode 4) reply at some future time. In some contexts this would be described as a &quot;pull&quot; operation, in that the host pulls the time and related values from the server.</p>
+<p>A host is configured in client mode using the <tt>server</tt> (sic) command and specifying the server DNS&nbsp;name or IPv4 or IPv6 address; the server requires no prior configuration. The <tt>iburst</tt> option described later on this page is recommended for clients, as this speeds up initial synchronization from several minutes to several seconds. The <tt>burst</tt> option described later on this page can be useful to reduce jitter on very noisy dial-up or ISDN network links.</p>
+<p>Ordinarily, the program automatically manages the poll interval between the default minimum and maximum values. The <tt>minpoll</tt> and <tt>maxpoll</tt> options can be used to bracket the range. Unless noted otherwise, these options should not be used with reference clock drivers.</p>
+<h4 id="symact">Symmetric Active/Passive Mode</h4>
+<p>Symmetric active/passive mode is intended for configurations where a clique
+ of low-stratum peers operate as mutual backups for each other. Each peer operates
+ with one or more primary reference sources, such as a reference clock, or a set
+ of secondary (stratum, 2) servers known to be reliable and authentic. Should
+ one of the peers lose all reference sources or simply cease operation, the
+ other peers will automatically reconfigure so that time and related values
+ can flow from the surviving peers to all hosts in the subnet. In some contexts
+ this would be described as a &quot;push-pull&quot; operation, in that the
+ peer either pulls or pushes the time and related values depending on the particular
+ configuration.</p>
+<p>A symmetric active peer sends a symmetric active (mode 1) message to a designated peer. If a matching configured symmetric active association is found, the designated peer returns a symmetric active message. If no matching association is found, the designated peer mobilizes a ephemeral symmetric passive association and returns a symmetric passive (mode 2) message. Since an intruder can impersonate a symmetric active peer and cause a spurious symmetric passive association to be mobilized, symmetric passive mode should always be cryptographically validated.</p>
+<p>A peer is configured in symmetric active mode using the <tt>peer</tt> command and specifying the other peer DNS name or IPv4 or IPv6 address. The <tt>burst</tt> and <tt>iburst</tt> options should not be used in symmetric modes, as this can upset the intended symmetry of the protocol and result in spurious duplicate or dropped messages.</p>
+<p>As symmetric modes are most often used as root servers for moderate to large subnets where rapid response is required, it is generally best to set the minimum and maximum poll intervals of each root server to the same value using the <tt>minpoll</tt> and <tt>maxpoll</tt> options.</p>
+<h4 id="broad">Broadcast/Multicast Modes</h4>
+<p>NTP broadcast and multicast modes are intended for configurations involving one or a few servers and a possibly very large client population. Broadcast mode can be used with Ethernet, FDDI and WiFi spans interconnected by hubs or switches. Ordinarily, broadcast packets do not extend beyond a level-3 router. Where service is intended beyond a level-3 router, multicast mode can be used. Additional information is on the <a href="discover.html">Automatic NTP Configuration Options</a> page.</p>
+<p>A server is configured to send broadcast or multicast messages using the <tt>broadcast</tt> command and specifying the subnet address for broadcast or the multicast group address for multicast. A broadcast client is enabled using the <a href="confopt.html#broadcastclient"><tt>broadcastclient</tt></a> command, while a multicast client is enabled using the <a href="confopt.html#multicastclient"><tt>multicastclient</tt></a> command and specifying the multicast group address. Multiple commands of either type can be used. However, the association is not mobilized until the first broadcast or multicast message is actually received.</p>
+<h4 id="many">Manycast and Pool Modes</h4>
+<p>Manycast and pool modes are automatic discovery and configuration paradigms new to NTPv4. They are intended as a means for a client to troll the nearby network neighborhood to find cooperating willing servers, validate them using cryptographic means and evaluate their time values with respect to other servers that might be lurking in the vicinity. The intended result is that each client mobilizes ephemeral client associations with some number of the &quot;best&quot; of the nearby servers, yet automatically reconfigures to sustain this number of servers should one or another fail. Additional information is on the <a href="discover.html">Automatic Server Discovery Schemes</a> page.</p>
+<h4 id="poll">Poll Interval Management</h4>
+<p>NTP uses an intricate heuristic algorithm to automatically control the poll interval for maximum accuracy consistent with minimum network overhead. The algorithm measures the incidental offset and jitter to determine the best poll interval. When <tt>ntpd</tt> starts, the interval is the default minimum 64 s. Under normal conditions when the clock discipline has stabilized, the interval increases in steps to the default maximum 1024 s. In addition, should a server become unreachable after some time, the interval increases in steps to the maximum in order to reduce network overhead. Additional information about the algorithm is on the <a href="poll.html">Poll Program</a> page.</p>
+<p>The default poll interval range is suitable for most conditions, but can be changed using options on the <a href="confopt.html">Server Commands and Options</a> and <a href="miscopt.html">Miscellaneous Options</a> pages. However, when using maximum intervals much larger than the default, the residual clock frequency error must be small enough for the discipline loop to capture and correct. The capture range is 500 PPM with a 64-s interval decreasing by a factor of two for each interval doubling. At a 36-hr interval, for example, the capture range is only 0.24 PPM.</p>
+<p>In the NTPv4 specification and reference implementation, the poll interval is expressed in log<sub>2</sub> units, properly called the <em>poll exponent.</em> It is constrained by the lower limit <tt>minpoll</tt> and upper limit <tt>maxpoll</tt> options of the <a href="confopt.html"><tt>server</tt></a> command. The limits default to 6 (64 s) and 10 (1024 s), respectively, which are appropriate for the vast majority of cases.</p>
+<p>As a rule of thumb, the expected errors increase by a factor of two as the poll interval increases by a factor of four. The poll interval algorithm slowly increases the poll interval when jitter dominates the error budget, but quickly reduces the interval when wander dominates it. More information about this algorithm is on the <a href="warp.html">How NTP Works</a> page.</p>
+<p>There is normally no need to change the poll limits, as the poll interval is managed automatically as a function of prevailing jitter and wander. The most common exceptions are the following.</p>
+<ul>
+ <li>With fast, lightly loaded LANs and modern processors, the nominal Allan intercept is about 500 s. In these cases the expected errors can be further reduced using a poll exponent of 4 (16 s). In the case of the pulse-per-second (PPS) driver, this is the recommended value.</li>
+ <li>With symmetric modes the most stable behavior results when both peers are configured in symmetric active mode with matching poll intervals of 6 (64 s).</li>
+ <li>The poll interval should not be modified for reference clocks, with the single exception the ACTS telephone modem driver. In this case the recommended minimum and maximum intervals are 12 (1.1 hr) and 17 (36 hr), respectively.</li>
+</ul>
+<h4 id="burst">Burst Options</h4>
+<p>Occasionally it is necessary to send packets temporarily at intervals less than the poll interval. For instance, with the <tt>burst</tt> and <tt>iburst</tt> options of the <a href="confopt.html"><tt>server</tt></a> command, the poll program sends a burst of several packets at 2-s intervals. In either case the poll program avoids sending needless packets if the server is not responding. The client begins a burst with a single packet. When the first packet is received from the server, the client continues with the remaining packets in the burst. If the first packet is not received within 64 s, it will be sent again for two additional retries before beginning backoff. The result is to minimize network load if the server is not responding. Additional details are on the <a href="poll.html">Poll Program</a> page.</p>
+<p>There are two burst options where a single poll event triggers a burst. They should be used only with the <tt>server</tt> and <tt>pool</tt> commands, but not with reference clock drivers nor symmetric mode peers. In both modes, received server packets update the clock filter, which selects the best (most accurate) time values. When the last packet in the burst is sent, the next received packet updates the system variables and adjusts the system clock as if only a single packet exchange had occurred.</p>
+<p>The <tt>iburst</tt> option is useful where the system clock must be set quickly or when the network attachment requires an initial calling or training sequence, as in PPP or ISDN services. In general, this option is recommended for <tt>server</tt> and <tt>pool</tt> commands. A burst is sent only when the server is unreachable; in particular, when first starting up. Ordinarily, the clock is set within a few seconds after the first received packet. See the <a href="clock.html">Clock State Machine</a> page for further details about the startup behavior.</p>
+<p>The <tt>burst</tt> option is useful in cases of severe network
+ jitter or when the network attachment requires an initial calling or training
+ sequence. This option is recommended when the minimum poll exponent is larger than 10 (1024 s). A burst is sent only when the server is reachable. The number of packets in the burst is determined by the poll interval
+ so that the average interval between packets (headway) is no less than the minimum poll interval for the association.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/audio.html b/html/audio.html
new file mode 100644
index 0000000..908cac8
--- /dev/null
+++ b/html/audio.html
@@ -0,0 +1,180 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Reference Clock Audio Drivers</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Reference Clock Audio Drivers</h3>
+<img src="pic/radio2.jpg" alt="jpg" align="left">ICOM R-72 shortwave receiver and Sure audio mixer
+<p>Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#sound">Sound Card Drivers</a></li>
+ <li class="inline"><a href="#short">Shortwave Radio Drivers</a></li>
+ <li class="inline"><a href="#setup">Setup and Debugging Aids</a></li>
+</ul>
+<hr>
+<h4 id="sound">Sound Card Drivers</h4>
+<p>There are some applications in which the computer time can be disciplined to an audio signal, rather than a serial timecode and communications port or special purpose bus peripheral. This is useful in such cases where the audio signal is sent over a telephone circuit, for example, or received directly from a shortwave receiver. In such cases the audio signal can be connected via an ordinary sound card or baseboard audio codec. The suite of NTP reference clock drivers currently includes three drivers suitable for these applications. They include a driver for the Inter Range Instrumentation Group (IRIG) signals produced by many radio clocks and timing devices, another for the Canadian time/frequency radio station CHU and a third for the NIST time/frequency radio stations WWV and WWVH. The radio drivers are designed to work with ordinary inexpensive shortwave radios and may be one of the least expensive ways to build a good primary time server.</p>
+<p>All three drivers make ample use of sophisticated digital signal processing
+ algorithms designed to efficiently extract timing signals from noise and interference.
+ The radio station drivers in particular implement optimum linear demodulation
+ and decoding techniques, including maximum-likelihood and soft-decision methods.
+ The documentation page for each driver contains an in-depth discussion on
+ the algorithms and performance expectations. In some cases the algorithms
+ are further analyzed, modeled and evaluated in a technical report.</p>
+<p>Currently, the audio drivers work with with Sun operating systems and audio codecs, including SunOS 4.1.3 and Solaris from 2.6 and probably all others in between. They also work with FreeBSD from 4.1 with compatible sound card. In fact, the interface is quite generic and support for other systems, in particular the various Unix generics, should not be difficult. Volunteers are solicited.</p>
+<p>The audio drivers include a number of common features designed to groom input signals, suppress spikes and normalize signal levels. An automatic gain control (AGC) feature provides protection against overdriven or underdriven input signals. It is designed to maintain adequate demodulator signal amplitude while avoiding occasional noise spikes. In order to assure reliable operation, the signal level must be in the range where the audio gain control is effective. In general, this means the input signal level must be such as to cause the AGC to set the gain somewhere in the middle of the range from 0 to 255, as indicated in the timecode displayed by the <tt>ntpq</tt> program.</p>
+<p>The IRIG&nbsp;and WWV drivers operate by disciplining a logical clock based on the codec sample clock to the audio signal as received. This is done by stuffing or slipping samples as required to maintain exact frequency to the order of 0.1 PPM. In order for the driver to reliably lock on the audio signal, the sample clock frequency tolerance must be less than 250 PPM (.025 percent) for the IRIG driver and half that for the WWV driver. The largest error observed so far is about 60 PPM, but it is possible some sound cards or codecs may exceed that value. In any case, the configuration file command <tt>tinker codec</tt> command can be used to change the systematic offset in units of 125 PPM.</p>
+<p>The drivers include provisions to select the input port and to monitor the input signal. The <tt>fudge flag 2</tt> command selects the microphone port if set to zero or the line-in port if set to one. It does not seem useful to specify the compact disc player port. The <tt>fudge flag 3</tt> command enables the input signal monitor using the previously selected output port and output gain. Both of these flags can be set in the configuration file or remotely using the <tt>ntpdc</tt> utility program.</p>
+<h4 id="short">Shortwave Radio Drivers</h4>
+<p>The WWV/H and CHU audio drivers require an external shortwave radio with the radio output - speaker or headphone jack - connected to either the microphone or line-in port on the computer. There is some degree of art in setting up the radio and antenna and getting the setup to work. While the drivers are highly sophisticated and efficient in extracting timing signals from noise and interference, it always helps to have as clear a signal as possible.</p>
+<p>The most important factor affecting the radio signal is the antenna. It need not be long - even 15 feet is enough if it is located outside of a metal frame building, preferably on the roof, and away from metallic objects. An ordinary CB whip mounted on a PVC pipe and wooden X-frame on the roof should work well with most portable radios, as they are optimized for small antennas.</p>
+<p>The radio need not be located near the computer; in fact, it generally works better if the radio is outside the near field of computers and other electromagnetic noisemakers. It can be in the elevator penthouse connected by house wiring, which can also be used to power the radio. A couple of center-tapped audio transformers will minimize noise pickup and provide phantom power to the radio with return via the building ground.</p>
+<p>The WWV/H and CHU transmitters operate on several frequencies simultaneously, so that in most parts of North America at least one frequency supports propagation to the receiver location at any given hour. While both drivers support the ICOM CI-V radio interface and can tune the radio automatically, computer-tunable radios are expensive and probably not cost effective compared to a GPS receiver. So, the radio frequency must usually be fixed and chosen by compromise.</p>
+<p>Shortwave (3-30 MHz) radio propagation phenomena are well known to shortwave enthusiasts. The phenomena generally obey the following rules:</p>
+<ul>
+ <li>The optimum frequency is higher in daytime than nighttime, stays high longer on summer days and low longer on winter nights.</li>
+ <li>Transitions between daytime and nighttime conditions generally occur somewhat
+ after sunrise and sunset at the midpoint of the path from transmitter to
+ receiver.</li>
+ <li>Ambient noise (static) on the lower frequencies follows the thunderstorm season, so is higher on summer afternoons and evenings.</li>
+ <li>The lower frequency bands are best for shorter distances, while the higher bands are best for longer distances.</li>
+ <li>The optimum frequencies are higher at the peak of the 11-year sunspot cycle and lower at the trough. The current sunspot cycle began at the minimum in late 2006 and should reach its peak in 2012.</li>
+</ul>
+<p>The best way to choose a frequency is to listen at various times over the day and determine the highest (daytime) and lowest (nighttime) frequencies that work well. Choose the frequency that works for the most number of hours in the day, usually the highest frequency. For instance, on the east coast the best compromise CHU frequency is 7335 kHz and the best WWV frequency is 15 MHz.</p>
+<h4>Autotune Modes</h4>
+<p>The shortwave drivers include support for an optional autotune function compatible with ICOM&nbsp;receivers and transceivers. The <tt>mode</tt> keyword of the <tt>server</tt> configuration command specifies the ICOM ID select code in decimal. A missing or zero argument disables the CI-V interface. Since all ICOM select codes are less than 128, the high order bit of the code is used by the driver to specify the baud rate. If this bit is not set, the rate is 9600 bps for the newer radios; if set, the rate is 1200 bps for the older radios. Following are the ID select codes for the known radios.</p>
+<table width="100%" cols="6">
+ <tr>
+ <td>Radio</td>
+ <td>Hex</td>
+ <td>Decimal</td>
+ <td>Radio</td>
+ <td>Hex</td>
+ <td>Decimal</td>
+ </tr>
+ <tr>
+ <td>706</td>
+ <td>0x4e</td>
+ <td>78</td>
+ <td>775</td>
+ <td>0x46</td>
+ <td>70</td>
+ </tr>
+ <tr>
+ <td>706MKIIG</td>
+ <td>0x58</td>
+ <td>88</td>
+ <td>781</td>
+ <td>0x26</td>
+ <td>38</td>
+ </tr>
+ <tr>
+ <td>725</td>
+ <td>0x28</td>
+ <td>40</td>
+ <td>970</td>
+ <td>0x2e</td>
+ <td>46</td>
+ </tr>
+ <tr>
+ <td>726</td>
+ <td>0x30</td>
+ <td>48</td>
+ <td>7000</td>
+ <td>0x70</td>
+ <td>113</td>
+ </tr>
+ <tr>
+ <td>735</td>
+ <td>0x04</td>
+ <td>4</td>
+ <td>R71</td>
+ <td>0x1A</td>
+ <td>26</td>
+ </tr>
+ <tr>
+ <td>746</td>
+ <td>0x66</td>
+ <td>102</td>
+ <td>R72</td>
+ <td>0x32</td>
+ <td>50</td>
+ </tr>
+ <tr>
+ <td>751</td>
+ <td>0x1c</td>
+ <td>28</td>
+ <td>R75</td>
+ <td>0x5a</td>
+ <td>90</td>
+ </tr>
+ <tr>
+ <td>756PROII</td>
+ <td>0x64</td>
+ <td>100</td>
+ <td>R7000</td>
+ <td>0x08</td>
+ <td>8</td>
+ </tr>
+ <tr>
+ <td>761</td>
+ <td>0x1e</td>
+ <td>30</td>
+ <td>R7100</td>
+ <td>0x34</td>
+ <td>52</td>
+ </tr>
+ <tr>
+ <td>765</td>
+ <td>0x2c</td>
+ <td>44</td>
+ <td>R8500</td>
+ <td>0x4a</td>
+ <td>74</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>R9000</td>
+ <td>0x2a</td>
+ <td>42</td>
+ </tr>
+</table>
+<h4 id="setup">Setup and Debugging Aids</h4>
+<p>The audio drivers include extensive setup and debugging support to help hook up the audio signals and monitor the driver operations. The documentation page for each driver describes the various messages that can be produced either in real time or written to the <tt>clockstats</tt> file for later analysis. Of particular help in verifying signal connections and compatibility is a provision to monitor the signal via headphones or speaker.</p>
+<p>Connecting radios and IRIG devices to the computer and verifying correct
+ configuration is somewhat of a black art. The signals have to be connected
+ to the correct ports and the signal level maintained within tolerances. Some
+ radios have recorder outputs which produce a microphone-level signal not affected
+ by the volume control. These signals can be connected to the microphone port
+ on the computer. If the radio does not have a recorder output, connect the
+ headphone or speaker output to the line-in port and adjust the volume control
+ so the driver indicates comfortably above the minimum specified and the AGC
+ level somewhere in the middle of the range 0-255. IRIG signals are usually
+ much larger than radio outputs, usually in the range to several volts and
+ may even overload the line-in port. In such cases the signal is designed to
+ drive a cable terminated with a 50-ohm resistor, which results in a level
+ the line-in port can handle..</p>
+<p>It is very easy to underdriven or overdrive the audio codec, in which case
+ the drivers will not synchronize to the signal. The drivers use <tt>fudge
+ flag2</tt> to enable audio monitoring of the input signal. This is useful
+ during setup to confirm the signal is actually reaching the audio
+ codec and generally free of noise and interference. Note that the monitor
+ volume must be set before the driver is started.</p>
+<p>The drivers write a synthesized timecode to the <tt>clockstats</tt> file each time the clock is set or verified and at other times if verbose monitoring is enabled. The format includes several fixed-length fields defining the UTC time to the millisecond, together with additional variable-length fields specific to each driver. The data include the intervals since the clock was last set or verified, the audio gain and various state variables and counters specific to each driver.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/authentic.html b/html/authentic.html
new file mode 100644
index 0000000..ecfb466
--- /dev/null
+++ b/html/authentic.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Authentication Support</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+<style1 {
+color: #FF0000;
+ font-weight: bold;
+}
+.style1 {color: #FF0000}
+-->
+</style>
+</head>
+<body>
+<h3>Authentication Support</h3>
+<img src="pic/alice44.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>Our resident cryptographer; now you see him, now you don't.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->1-Dec-2012 04:44<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/authopt.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#auth">Introduction</a></li>
+ <li class="inline"><a href="#symm">Symmetric Key Cryptography</a></li>
+ <li class="inline"><a href="#windows">Microsoft Windows Authentication</a></li>
+ <li class="inline"><a href="#pub">Public Key Cryptography</a></li>
+</ul>
+<hr>
+<h4 id="auth">Introduction</h4>
+<p>This page describes the various cryptographic authentication provisions in NTPv4. Authentication support allows the NTP client to verify that servers are in fact known and trusted and not intruders intending accidentally or intentionally to masquerade as a legitimate server. A detailed discussion of the NTP multi-layer security model and vulnerability analysis is in the white paper <a href="http://www.eecis.udel.edu/~mills/security.html">NTP Security Analysis</a>.</p>
+<p> The NTPv3 specification (RFC-1305) defined an authentication scheme properly described as <em>symmetric key cryptography</em>. It used the Data Encryption Standard (DES) algorithm operating in cipher-block chaining (CBC) mode. Subsequently, this algorithm was replaced by the RSA Message Digest 5 (MD5) algorithm commonly called keyed-MD5. Either algorithm computes a message digest or one-way hash which can be used to verify the client has the same message digest as the server. The MD5 message digest algorithm is included in the distribution, so without further cryptographic support, the distribution can be freely exported.</p>
+<p>If the OpenSSL cryptographic library is installed prior to building the distribution, all message digest algorithms included in the library may be used, including SHA and SHA1. However, if conformance to FIPS 140-2 is required, only a limited subset of these algorithms can be used. This library is available from <a href="http://www.openssl.org">http://www.openssl.org</a> and can be installed using the procedures outlined in the <a href="build.html">Building and Installing the Distribution</a> page. Once installed, the configure and build process automatically detects the library and links the library routines
+required.</p>
+<p>In addition to the symmetric key algorithms, this distribution includes support for the Autokey public key algorithms and protocol specified in RFC-5906 &quot;Network Time Protocol Version 4: Autokey Specification&quot;. This support is available only if the OpenSSL library has been installed and the <tt>--enable-autokey</tt> option is used when the distribution is built.</p>
+<p> Public key cryptography is generally considered more secure than symmetric key cryptography, since the security is based on private and public values which are generated by each participant and where the private value is never revealed. Autokey uses X.509 public certificates, which can be produced by commercial services, the OpenSSL application program, or the <a href="keygen.html"><tt>ntp-keygen</tt></a> utility program in the NTP software distribution.</p>
+<p>Note that according to US law, NTP binaries including OpenSSL library components, including the OpenSSL library itself, cannot be exported outside the US without license from the US Department of Commerce. Builders outside the US are advised to obtain the OpenSSL library directly from OpenSSL, which is outside the US, and build outside the US.</p>
+<p>Authentication is configured separately for each association using the <tt>key</tt> or <tt>autokey</tt> option of the <tt>server</tt> configuration command, as described in the <a href="confopt.html">Server Options</a> page. The <a href="keygen.html">ntp-keygen</a> page describes the files required for the various authentication schemes. Further details are in the briefings, papers and reports at the NTP project page linked from <a href="http://www.ntp.org">www.ntp.org</a>.</p>
+<p>By default, the client sends non-authenticated packets and the server responds with non-authenticated packets. If the client sends authenticated packets, the server responds with authenticated packets if correct, or a crypto-NAK packet if not.. In the case of unsolicited packets which might consume significant resources, such as broadcast or symmetric mode packets, , authentication is required, unless overridden by a <tt>disable auth</tt> command. In the current climate of targeted broadcast or &quot;letterbomb&quot; attacks, defeating this requirement would be decidedly dangerous. In any case, the <tt>notrust </tt>flag, described on the <a href="authopt.html">Access Control Options</a> page, can be used to disable access to all but correctly authenticated clients..</p>
+<h4 id="symm">Symmetric Key Cryptography</h4>
+<p>The original NTPv3 specification (RFC-1305), as well as the current NTPv4 specification (RFC-5905), allows any one of possibly 65,534 message digest keys (excluding zero), each distinguished by a 32-bit key ID, to authenticate an association. The servers and clients involved must agree on the key ID, key type and key to authenticate NTP packets.</p>
+<p>The message digest is a cryptographic hash computed by an algorithm such as MD5 or SHA. When authentication is specified, a message authentication code (MAC) is appended to the NTP packet header. The MAC consists of a 32-bit key identifier (key ID) followed by a 128- or 160-bit message digest. The algorithm computes the digest as the hash of a 128- or 160- bit message digest key concatenated with the NTP packet header fields with the exception of the MAC. On transmit, the message digest is computed and inserted in the MAC. On receive, the message digest is computed and compared with the MAC. The packet is accepted only if the two MACs are identical. If a discrepancy is found by the client, the client ignores the packet, but raises an alarm. If this happens at the server, the server returns a special message called a <em>crypto-NAK</em>. Since the crypto-NAK is protected by the loopback test, an intruder cannot disrupt the protocol by sending a bogus crypto-NAK.</p>
+<p>Keys and related information are specified in a keys file, which must be distributed and stored using secure means beyond the scope of the NTP protocol itself. Besides the keys used for ordinary NTP associations, additional keys can be used as passwords for the <tt><a href="ntpq.html">ntpq</a></tt> and <tt><a href="ntpdc.html">ntpdc</a></tt> utility programs. Ordinarily, the <tt>ntp.keys</tt> file is generated by the <tt><a href="keygen.html">ntp-keygen</a></tt> program, but it can be constructed and edited using an ordinary text editor.</p>
+<p> Each line of the keys file consists of three fields: a key ID in the range 1 to 65,534, inclusive, a key type, and a message digest key consisting of a printable ASCII string less than 40 characters, or a 40-character hex digit string. If the OpenSSL library is installed, the key type can be any message digest algorithm supported by the library. If the OpenSSL library is not installed, the only permitted key type is MD5.</p>
+<div align="center">
+ <p><img src="pic/sx5.gif" alt="gif"></p>
+ <p>Figure 1. Typical Symmetric Key File</p>
+</div>
+<p>Figure 1 shows a typical keys file used by the reference implementation when the OpenSSL library is installed. In this figure, for key IDs in he range 1-10, the key is interpreted as a printable ASCII string. For key IDs in the range 11-20, the key is a 40-character hex digit string. The key is truncated or zero-filled internally to either 128 or 160 bits, depending on the key type. The line can be edited later or new lines can be added to change any field. The key can be change to a password, such as <tt>2late4Me</tt> for key ID 10. Note that two or more keys files can be combined in any order as long as the key IDs are distinct.</p>
+<p>When <tt>ntpd</tt> is started, it reads the keys file specified by the <tt>keys</tt> command and installs the keys in the key cache. However, individual keys must be activated with the <tt>trustedkey</tt> configuration command before use. This allows, for instance, the installation of possibly several batches of keys and then activating a key remotely using <tt>ntpq</tt> or <tt>ntpdc</tt>. The <tt>requestkey</tt> command selects the key ID used as the password for the <tt>ntpdc</tt> utility, while the <tt>controlkey</tt> command selects the key ID used as the password for the <tt>ntpq</tt> utility.</p>
+<h4 id="windows">Microsoft Windows Authentication</h4>
+<p>In addition to the above means, <tt>ntpd</tt> now supports Microsoft Windows MS-SNTP authentication using Active Directory services. This support was contributed by the Samba Team and is still in development. It is enabled using the <tt>mssntp</tt> flag of the <tt>restrict</tt> command described on the <a href="accopt.html#restrict">Access Control Options</a> page. <span class="style1">Note: Potential users should be aware that these services involve a TCP connection to another process that could potentially block, denying services to other users. Therefore, this flag should be used only for a dedicated server with no clients other than MS-SNTP.</span></p>
+<h4 id="pub">Public Key Cryptography</h4>
+<p>See the <a href="autokey.html">Autokey Public-Key Authentication</a> page.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/authopt.html b/html/authopt.html
new file mode 100644
index 0000000..9504deb
--- /dev/null
+++ b/html/authopt.html
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Authentication Commands and Options</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+.style1 {
+ color: #FF0000;
+ font-weight: bold;
+}
+</style>
+</head>
+<body>
+<h3>Authentication Commands and Options</h3>
+<img src="pic/alice44.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>Our resident cryptographer; now you see him, now you don't.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->15-Oct-2011 01:00<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/authopt.txt"></script>
+<hr>
+<h4>Commands and Options</h4>
+<p>Unless noted otherwise, further information about these commands is on the <a href="authentic.html">Authentication Support</a> page.</p>
+<dl>
+ <dt id=automax><tt>automax [<i>logsec</i>]</tt></dt>
+ <dd>Specifies the interval between regenerations of the session key list used with the Autokey protocol, as a power of 2 in seconds. Note that the size of the key list for each association depends on this interval and the current poll interval. The default interval is 12 (about 1.1 hr). For poll intervals above the specified interval, a session key list with a single entry will be regenerated for every message sent. See the <a href="autokey.html">Autokey Public Key Authentication</a> page for further information.</dd>
+ <dt id="controlkey"><tt>controlkey <i>keyid</i></tt></dt>
+ <dd>Specifies the key ID for the <a
+ href="ntpq.html"><tt>ntpq</tt></a> utility, which uses the
+ standard protocol defined in RFC-1305. The <tt><i>keyid</i></tt> argument is the key ID for a <a href="#trustedkey">trusted
+ key</a>, where the value can be in the range 1 to 65534,
+ inclusive.</dd>
+ <dt id="crypto"><tt>crypto [digest</tt> <em><tt>digest</tt></em><tt>]</tt> <tt>[host <i>name</i>] [ident <i>name</i>] [pw <i>password</i>] [randfile <i>file</i>]</tt></dt>
+ <dd>This command activates the Autokey public key cryptography
+ and loads the required host keys and certificate. If one or more files
+ are unspecified, the default names are used. Unless
+ the complete path and name of the file are specified, the location of a file
+ is relative to the keys directory specified in the <tt>keysdir</tt> configuration
+ command with default <tt>/usr/local/etc</tt>. See the <a href="autokey.html">Autokey Public Key Authentication</a> page for further information. Following are the options.</dd>
+ <dd>
+ <dl>
+ <dt><tt>digest</tt> <em><tt>digest</tt></em></dt>
+ <dd>&nbsp;</dd>
+ <dd>Specify the message digest algorithm, with default MD5. If the OpenSSL library
+ is installed, <tt><i>digest</i></tt> can be be any message digest algorithm supported
+ by the library. The current selections are: <tt>MD2</tt>, <tt>MD4</tt>, <tt>MD5,</tt> <tt>MDC2</tt>, <tt>RIPEMD160</tt>, <tt>SHA</tt> and <tt>SHA1</tt>. All
+ participants in an Autokey subnet must use the same algorithm. The Autokey message digest algorithm is separate and distinct from the symmetric
+ key message digest algorithm. Note: If compliance with FIPS 140-2 is required,
+ the algorithm must be ether <tt>SHA</tt> or <tt>SHA1</tt>.</dd>
+ <dt><tt>host <i>name</i></tt></dt>
+ <dd>Specify the cryptographic media names for the host, sign and certificate files. If this option is not specified, the default name is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
+ <dd><span class="style1">Note: In the latest Autokey version, this option has no effect other than to change the cryptographic media file names.</span></dd>
+ <dt><tt>ident <i>group</i></tt></dt>
+ <dd>Specify the cryptographic media names for the identity scheme files. If this option is not specified, the default name is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
+ <dd><span class="style1">Note: In the latest Autokey version, this option has no effect other than to change the cryptographic media file names.</span></dd>
+ <dt><tt>pw <i>password</i></tt></dt>
+ <dd>Specifies the password to decrypt files previously encrypted by the <tt>ntp-keygen</tt> program with the <tt>-p</tt> option. If this option is not specified, the default password is the string returned by the Unix <tt>gethostname()</tt> routine. </dd>
+ <dt><tt>randfile <i>file</i></tt></dt>
+ <dd>Specifies the location of the random seed file used by the OpenSSL library. The defaults are described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>.</dd>
+ </dl>
+ </dd>
+ <dt id="ident"><tt>ident <i>group</i></tt></dt>
+ <dd>Specifies the group name for ephemeral associations mobilized by broadcast and symmetric passive modes. See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
+ <dt id="keys"><tt>keys <i>path</i></tt></dt>
+ <dd>Specifies the complete directory path for the key file containing the key IDs, key types and keys used by <tt>ntpd</tt>, <tt>ntpq</tt> and <tt>ntpdc</tt> when operating with symmetric key cryptography. The format of the keyfile is described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>. This is the same operation as the <tt>-k</tt> command line option. Note that the directory path for Autokey cryptographic media is specified by the <tt>keysdir</tt> command.</dd>
+ <dt id="keysdir"><tt>keysdir <i>path</i></tt></dt>
+ <dd>Specifies the complete directory path for the Autokey cryptographic keys, parameters and certificates. The default is <tt>/usr/local/etc/</tt>. Note that the path for the symmetric keys file is specified by the <tt>keys</tt> command.</dd>
+ <dt id="requestkey"><tt>requestkey <i>keyid</i></tt></dt>
+ <dd>Specifies the key ID for the <a href="ntpdc.html"><tt>ntpdc</tt></a> utility program, which
+ uses a proprietary protocol specific to this implementation of <tt>ntpd</tt>. The <tt><i>keyid</i></tt> argument is a key ID
+ for a <a href="#trustedkey">trusted key</a>, in the range 1 to
+ 65534, inclusive.</dd>
+ <dt id="revoke"><tt>revoke [<i>logsec</i>]</tt></dt>
+ <dd>Specifies the interval between re-randomization of certain cryptographic values used by the Autokey scheme, as a power of 2 in seconds, with default 17 (36 hr). See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
+ <dt id="trustedkey"><tt>trustedkey [<i>keyid</i> | (<i>lowid</i> ... <i>highid</i>)] [...]</tt></dt>
+ <dd>Specifies the key ID(s) which are trusted for the purposes of
+ authenticating peers with symmetric key cryptography. Key IDs
+ used to authenticate <tt>ntpq</tt> and <tt>ntpdc</tt> operations
+ must be listed here and additionally be enabled with <a href="#controlkey">controlkey</a> and/or <a href="#requestkey">requestkey</a>. The authentication
+ procedure for time transfer requires that both the local and
+ remote NTP servers employ the same key ID and secret for this
+ purpose, although different keys IDs may be used with different
+ servers. Ranges of trusted key IDs may be specified: <tt>trustedkey (1 ... 19) 1000 (100 ... 199)</tt> enables the
+ lowest 120 key IDs which start with the digit 1. The spaces
+ surrounding the ellipsis are required when specifying a range.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/autokey.html b/html/autokey.html
new file mode 100644
index 0000000..ba220e6
--- /dev/null
+++ b/html/autokey.html
@@ -0,0 +1,215 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Autokey Public-Key Authentication</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+.style1 {
+ color: #FF0000
+}
+-->
+</style>
+</head>
+<body>
+<h3>Autokey Public-Key Authentication</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->3-Oct-2011 21:51<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#subnet">Autokey Subnets</a></li>
+ <li class="inline"><a href="#names">Subnet Group Names's</a></li>
+ <li class="inline"><a href="#secure">Secure Groups</a></li>
+ <li class="inline"><a href="#cfg">Configuration - Authentication Schemes</a></li>
+ <li class="inline"><a href="#scfg">Configuration - Identity Schemes</a></li>
+ <li class="inline"><a href="#ident">Identity Schemes and Cryptotypes</a></li>
+ <li class="inline"><a href="#files">Files</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>This distribution includes support for the Autokey public key algorithms and protocol specified in RFC-5906 &quot;Network Time Protocol Version 4: Autokey Specification&quot;. This support is available only if the OpenSSL library has been installed and the <tt>--enable-autokey</tt> option is specified when the distribution is built.</p>
+<p> Public key cryptography is generally considered more secure than symmetric key cryptography. Symmetric key cryptography is based on a shared secret key which must be distributed by secure means to all participants. Public key cryptography is based on a private secret key known only to the originator and a public key known to all participants. A recipient can verify the originator has the correct private key using the public key and any of several digital signature algorithms.</p>
+<p>The Autokey Version 2 protocol described on the <a href="http://www.eecis.udel.edu/%7emills/proto.html">Autokey Protocol</a> page verifies packet integrity using message digest algorithms, such as MD5 or SHA, and verifies the source using digital signature schemes, such as RSA or DSA. As used in Autokey, message digests are exceptionally difficult to cryptanalyze, as the keys are used only once.</p>
+<p> Optional identity schemes described on the <a href="http://www.eecis.udel.edu/~mills/ident.html">Autokey Identity Schemes</a> page are based on cryptographic challenge/response exchanges. Optional identity schemes provide strong security against masquerade and most forms of clogging attacks. These schemes are exceptionally difficult to cryptanalyze, as the challenge/response exchange data are used only once. They are described along with an executive summary, current status, briefing slides and reading list on the <a href="http://www.eecis.udel.edu/~mills/autokey.html">Autonomous Authentication</a> page.</p>
+<p>Autokey authenticates individual packets using cookies bound to the IP source and destination addresses. The cookies must have the same IP addresses at both the server and client. For this reason operation with network address translation schemes is not possible. This reflects the intended robust security model where government and corporate NTP servers and clients are operated outside firewall perimeters.</p>
+<p>Autokey is designed to authenticate servers to clients, not the other way around as in SSH. An Autokey server can support an authentication scheme such as the Trusted Certificate (TC) scheme described in RFC 5906, while a client is free to choose between the various options. It is important to understand that these provisions are optional and that selection of which option is at the discretion of the client. If the client does not require authentication, it is free to ignore it, even if some other client of the same server elects to participate in either symmetric key or public key cryptography.</p>
+<p> Autokey uses industry standard X.509 public certificates, which can be produced by commercial services, utility programs in the OpenSSL software library, and the <a href="keygen.html"><tt>ntp-keygen</tt></a> utility program in the NTP software distribution. A certificate includes the subject name of the client, the issuer name of the server, the public key of the client and the time period over which the the public and private keys are valid. All Autokey hosts have a self-signed certificate with the Autokey name as both the subject and issuer. During the protocol, additional certificates are produced with the Autokey host name as subject and the host that signs the certificate as issuer.</p>
+<p>There are two timeouts associated with the Autokey scheme. The <em>key list timeout</em> is set by the <tt>automax</tt> command, which specifies the interval between generating new key lists by the client or server. The default timeout of about 1.1 hr is appropriate for the majority of configurations and ordinarily should not be changed. The <em>revoke timeout</em> is set by the <tt>revoke</tt> command, which specifies the interval between generating new server private values. It is intended to reduce the vulnerability to cryptanalysis; however, new values require the server to encrypt each client cookie separately. The default timeout of about 36 hr is appropriate for most servers, but might be too short for national time servers.</p>
+<h4 id="subnet">Autokey Subnets</h4>
+<p> An Autokey subnet consists of a collection of hosts configured as an acyclic, directed tree with roots one or more trusted hosts (THs) operating at the lowest stratum of the subnet. Note that the requirement that the NTP subnet be acyclic means that, if two hosts are configured with each other in symmetric modes, each must be a TH. The THs are synchronized directly or indirectly to national time services via trusted means, such as radio, satellite or telephone modem, or one or more trusted agents (TAs) of a parent subnet. NTP subnets can be nested, with the THs of a child subnet configured for one or more TAs of a parent subnet. The TAs can serve one or more child subnets, each with its own security policy and set of THs.</p>
+<p>A certificate trail is a sequence of certificates, each signed by a host one step closer to the THs and terminating at the self-signed certificate of a TH. The requirement that the subnet be acyclic means certificate trails can never loop. NTP servers operate as certificate authorities (CAs) to sign certificates provided by their clients. The CAs include the TAs of the parent subnet and those subnet servers with dependent clients.</p>
+<p> In order for the signature to succeed, the client certificate valid period must begin within the valid period of the server certificate. If the server period begins later than the client period, the client certificate has expired; if the client period begins later than the server period, the server certificate has expired.</p>
+<p>The Autokey protocol runs for each association separately, During the protocol, the client recursively obtains the certificates on the trail to a TH, saving each in a cache ordered from most recent to oldest. If an expired certificate is found, it is invalidated and marked for later replacement. As the client certificate itself is not involved in the certificate trail, it can only be declared valid or expired when the server signs it. </p>
+<p>The certificates derived from each association are combined in the cache with duplicates suppressed. If it happens that two different associations contribute certificates to the cache, a certificate on the trail from one association could expire before any on another trail. In this case the remaining trails will survive until the expired certificate is replaced. Once saved in the cache, a certificate remains valid until it expires or is replaced by a new one.</p>
+<p> It is important to note that the certificate trail is validated only at startup when an association is mobilized. Once validated in this way, the server remains valid until it is demobilized, even if certificates on the trail to the THs expire. While the certificate trail authenticates each host on the trail to the THs, it does not validate the time values themselves. Ultimately, this is determined by the NTP on-wire protocol.</p>
+<p>Example</p>
+<div align="center"><img src="pic/flt8.gif" alt="gif">
+ <p>Figure 1. Example Configuration</p>
+</div>
+<p>Figure 1 shows an example configuration with three NTP subnets, Alice, Helen and Carol. Alice and Helen are parent groups for Carol with TA C belonging to Alice and TA S belonging to Helen. Hosts A and B are THs of Alice, host R is the TH of Helen and host X is the TH of Carol. Assume that all associations are client/server, child subnet TH X has two mobilized associations, one to Alice TA host C and the other to Carol TA host S. While not shown in the figure, Alice hosts A and B could configure symmetric mode associations between them for redundancy and backup.</p>
+<p>Note that host D certificate trail is D&rarr;C&rarr;A or D&rarr;C&rarr;B, depending on the particular order the trails are built. Host Y certificate trail is only Y&rarr;X, since X is a TH. Host X has two certificate trails X&rarr;C&rarr;A or X&rarr;C&rarr;B, and X&rarr;S&rarr;R.</p>
+<h4 id="names">Subnet Group Names</h4>
+<p>In some configurations where more than one subnet shares an Ethernet or when multiple subnets exist in a manycast or pool configuration, it is useful to isolate one subnet from another. In Autokey this can be done using group names. An Autokey host name is specified by the <tt>-s</tt><tt><em> host</em>@<em>group</em></tt> option of the <tt>ntp-keygen</tt> program, where <em><tt>host</tt></em> is the host name and <em><tt>group</tt></em> is the group name. If <em><tt>host</tt></em> is omitted, the name defaults to the string returned by the Unix <tt>gethostname()</tt> routine, ordinarily the DNS name of the host. Thus, for host <tt>beauregard.udel.edu</tt> the option <tt>-s @red</tt> specifies the Autokey host name <tt>beauegard.udel.edu@red</tt>.</p>
+<p>A subnet host with a given group name will discard ASSOC packets from all subnets with a different group name. This effectively disables the Autokey protocol without additional packet overhead. For instance, one or more manycast or pool servers will not respond to ASSOC packets from subnets with difference group names. Groups sharing an Ethernet will be filtered in the same way.</p>
+<p>However, as shown in Figure 1, there are configurations where a TH of one group needs to listen to a TA of a different group. This is accomplished using the <tt>ident <em>group</em></tt> option of the <tt>crypto</tt> command and/or the <tt>ident <em>group</em></tt> option of the <tt>server</tt> command. The former case applies to all hosts sharing a common broadcast, manycast or symmetric passive modes, while the latter case applies to each individual client/server or symmetric active mode association. In either case the host listens to the specified group name in addition to the group name specified in the <tt>-s</tt> option of the <tt>ntp-keygen</tt> program.</p>
+<h4 id="secure">Secure Groups</h4>
+<p>NTP security groups are an extension of the NTP subnets described in the previous section. They include in addition to certificate trails one or another identity schemes described on the <a href="http://www.eecis.udel.edu/~mills/ident.html">Autokey Identity Schemes</a> page. NTP secure groups are used to define cryptographic compartments and security
+ hierarchies. The identity scheme insures that the server is authentic and not victim of masquerade by an intruder acting as a middleman.</p>
+<p> An NTP secure group is an NTP subnet configured as an acyclic tree rooted on the THs. The THs are at the lowest stratum of the secure group. They run an identity exchange with the TAs of parent subnets All group hosts construct an unbroken certificate trail from each host, possibly via intermediate hosts, and ending at a TH of that group. The TH verifies authenticity with the TA of the parent subnet using an identity exchange.</p>
+<div align="center"><img src="pic/flt9.gif" alt="gif">
+ <p>Figure 2. Identify Scheme</p>
+</div>
+<p>The identity exchange is run between a TA acting as a server and a TH acting as a client. As shown in Figure 2, the identity exchange involves a challenge-response protocol where a client generates a nonce and sends it to the server. The server performs a mathematical operation involving a second nonce and the secret group key, and sends the result along with a hash to the client. The client performs a another mathematical operation and verifies the result with the hash.</p>
+<p> Since each exchange involves two nonces, even after repeated observations of many exchanges, an intruder cannot learn the secret group key. It is this quality that allows the secret group key to persist long after the longest period of certificate validity. In the Schnorr (Identify Friend or Foe - IFF) scheme, the secret group key is not divulged to the clients, so they cannot conspire to prove identity to other hosts.</p>
+<p>As described on the <a href="http://www.eecis.udel.edu/~mills/ident.html">Autokey Identity Schemes</a> page, there are five identity schemes, three of which - IFF, GQ and MV - require identity files specific to each scheme. There are two types of files for each scheme, an encrypted server keys file and a nonencrypted client keys file, also called the parameters file, which usually contains a subset of the keys file.</p>
+<p> Figure 2 shows how keys and parameters are distributed to servers and clients. A TA constructs the encrypted keys file and the nonencrypted parameters file. Hosts with no dependent clients can retrieve client parameter files from an
+ archive or web page. The <tt>ntp-keygen</tt> program can export parameter files using the <tt>-e</tt> option. By convention, the file name is the name of the secure group and must match the <tt>ident</tt> option of the <tt>crypto</tt> command or the <tt>ident</tt> option of the <tt>server</tt> command.</p>
+<p> When more than one TH Is involved in the secure group, it is convenient for the TAs and THs to use the same encrypted key files. To do this, one of the parent TAs includes the <tt>-i <em>group</em></tt> option on the <tt>ntp-keygen</tt> command line, where <em><tt>group</tt></em> is the name of the child secure group. The <tt>ntp-keygen</tt> program can export server keys files using the <tt>-q</tt> option and a chosen remote password. The files are installed on the TAs and then renamed using the name given as the first line in the file, but without the filestamp. The secure group name must match the <tt>ident</tt> option for all TAs.</p>
+<dl>
+ <dd><span class="style1">In the latest Autokey version, the host name and group name are independent of each other and the <tt>host</tt> option of the <tt>crypto</tt> command is deprecated. When compatibility with older versions is required, specify the same name for both the <tt>-s</tt> and <tt>-i</tt> options.</span></dd>
+</dl>
+<p>In special circumstances the Autokey message digest algorithm can be changed using the <tt>digest</tt> option of the <tt>crypto</tt> command. The digest algorithm is separate and distinct from the symmetric
+ key message digest algorithm. If compliance with FIPS 140-2 is required,
+ the algorithm must be ether <tt>SHA</tt> or <tt>SHA1</tt>. The Autokey message digest algorithm must be the same for all participants in the NTP subnet.</p>
+<p>Example</p>
+<p>Returning to the example of Figure 1, Alice, Helen and Carol run run the Trusted Certificate (TC) scheme, internally, as the environment is secure and without threat from external attack, in particular a middleman masquerade. However, TH X of Carol is vulnerable to masquerade on the links between X and C and between X and S. Therefore, both parent subnet TAs C and S run an identity exchange with child subnet TH X. Both have the same encrypted keys file and X the common parameters file.</p>
+<h4 id="cfg">Configuration - Authentication Schemes</h4>
+<p>Autokey has an intimidating number of options, most of which are not necessary in typical scenarios. However, the Trusted Certificate (TC) scheme is recommended for national NTP time services, such as those operated by NIST and USNO. Configuration for TC is very simple.</p>
+<p> Referring to Figure 1, for each TH, A, B, R and X, as root:</p>
+<p><tt># cd /usr/local/etc<br>
+ # ntp-keygen -T</tt></p>
+<p>and for the other hosts the same commands without the <tt>-T</tt> option. This generates an RSA private/public host key file and a self-signed certificate file for the RSA digital signature algorithm with the MD5 message digest algorithm. For the THs a trusted certificate is generated; for the others a nontreusted certificate is generated. Include in the <tt>ntp.conf</tt> configuration file for all hosts other than the primary servers, A, B and R, something like</p>
+<p><tt> # server <em>host</em> autokey<br>
+ # crypto<br>
+ # driftfile /etc/ntp.drift</tt></p>
+<p>where <em><tt>host</tt></em> is the selected server name as shown in the figure. Servers A, B and R are configured for local reference clocks or trusted remoter servers as required.</p>
+<p>In the above configuration examples, the default host name is the string returned by the Unix <tt>gethostname()</tt> routine, ordinarily the DNS name of the host. This name is used as the subject and issuer names on the certificate, as well as the default password for the encrypted keys file. The host name can be changed using the <tt>-s</tt> option of the <tt>ntp-keygen</tt> program. The default password can be changed using the <tt>-p</tt> option of the <tt>ntp-keygen</tt> program and the <tt>pw</tt> option of the <tt>crypto</tt> configuration command.</p>
+<p>Group names can be added to this configuration by including the <tt>-s <em>host</em>@<em>group</em></tt> option with the <tt>ntp-keygen</tt> program. For the purpose of illustration, the <tt><em>host</em></tt> string is empty, signifying the default host name. For example, @<tt>yellow</tt> can be used for the Alice group, @<tt>orange</tt> for the Helen group and @<tt>blue</tt> for the Carol group. In addition, for TH X the <tt>ident yellow</tt> option should be added to the <tt>server</tt> command for the Alice group and the <tt>ident orange</tt> option should be added to the <tt>server</tt> command for the Helen group.</p>
+<h4 id="scfg">Configuration - Identity Schemes</h4>
+<p> The example in this section uses the IFF identity scheme, but others, including GQ and MV, can be used as well. It's best to start with a functioning TC configuration and add commands as necessary. We start with the subnets of Figure 1 configured as in the previous section. Recall that the parent subnet TA for Alice is C and for Helen is S. Each of the TAs generates an encrypted server keys file and nonencrypted client parameters file for the IFF identity scheme using the <tt>-I</tt> option of the <tt>ntp-keygen</tt> program. Note the TAs are not necessarily trusted hosts, so may not need the <tt>-T</tt> option.</p>
+<p>The nonencrypted client parameters can be exported using the command</p>
+<p><tt>ntp-keygen -e &gt;<i>file</i></tt>,</p>
+<p>where the <tt>-e</tt> option redirects the client parameters to <em><tt>file</tt></em> via the standard output stream for a mail application or stored locally for later distribution to one or more THs. In a similar fashion the encrypted keys file can be exported using the command</p>
+<p><tt>ntp-keygen -q <em>passw2</em> &gt;<i>file</i></tt>,</p>
+<p>where <em><tt>passwd2</tt></em> is the read password for another TA. We won't need this file here.</p>
+<p> While the file names used for the exported files are arbitrary, it is common practice to use the name given as the first line in the file with the filestamp suppressed. Thus, the nonencryted parameters file from each TA is copied to X with this name.</p>
+<p>To complete the configuration, the TH includes the client parameters file name in the <tt>ident</tt> option of the the <tt>server</tt> command for the TA association</p>
+<p><tt>server 1.2.3.4 ident <em>group</em>,</tt></p>
+<p> where <em><tt>group</tt></em> is the file name given above. </p>
+<h4 id="ident">Identity Schemes and Cryptotypes</h4>
+<p>A specific combination of authentication and identity schemes is called a <em>cryptotype</em>, which applies to clients and servers separately. A group can be configured using more than one cryptotype combination, although not all combinations are interoperable. Note however that some cryptotype combinations may successfully intemperate with each other, but may not represent good security practice. The server and client cryptotypes are defined by the the following codes.</p>
+<dl>
+ <dt>NONE</dt>
+ <dd>A client or server is type NONE if authentication is not available or not configured. Packets exchanged between client and server have no MAC.</dd>
+ <dt>AUTH</dt>
+ <dd>A client or server is type AUTH&nbsp;if the <tt>key</tt> option is specified with the <tt>server</tt> configuration command and the client and server keys are compatible. Packets exchanged between clients and servers have a MAC.</dd>
+ <dt>PC</dt>
+ <dd>A client or server is type PC if the <tt>autokey</tt> option is specified with the <tt>server</tt> configuration command and compatible host key and private certificate files are present. Packets exchanged between clients and servers have a MAC.</dd>
+ <dt>TC</dt>
+ <dd>A client or server is type TC if the <tt>autokey</tt> option is specified with the <tt>server</tt> configuration command and compatible host key and public certificate files are present. Packets exchanged between clients and servers have a MAC.</dd>
+ <dt>IDENT</dt>
+ <dd>A client or server is type IDENT if the <tt>autokey</tt> option is specified with the <tt>server</tt> configuration command and compatible host key, public certificate and identity scheme files are present. Packets exchanged between clients and servers have a MAC.</dd>
+</dl>
+<p>The compatible cryptotypes for clients and servers are listed in the following table.</p>
+<table width="100%" border="1" cellpadding="4">
+ <tr>
+ <td rowspan="2" align="center">Client</td>
+ <td colspan="5" align="center">Server</td>
+ </tr>
+ <tr>
+ <td align="center">NONE</td>
+ <td align="center">AUTH</td>
+ <td align="center">PC</td>
+ <td align="center">TC</td>
+ <td align="center">IDENT</td>
+ </tr>
+ <tr>
+ <td align="center">NONE</td>
+ <td align="center">yes</td>
+ <td align="center">yes*</td>
+ <td align="center">yes*</td>
+ <td align="center">yes*</td>
+ <td align="center">yes*</td>
+ </tr>
+ <tr>
+ <td align="center">AUTH</td>
+ <td align="center">no</td>
+ <td align="center">yes</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ </tr>
+ <tr>
+ <td align="center">PC</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">yes</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ </tr>
+ <tr>
+ <td align="center">TC</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">yes</td>
+ <td align="center">yes</td>
+ </tr>
+ <tr>
+ <td align="center">IDENT</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">no</td>
+ <td align="center">yes</td>
+ </tr>
+</table>
+<p>* These combinations are not valid if the restriction list includes the <tt>notrust</tt> option.</p>
+<h4 id="err">Error Codes</h4>
+<p>Errors can occur due to mismatched configurations, unexpected protocol restarts, expired certificates and unfriendly people. In most cases the protocol state machine recovers automatically by retransmission, timeout and restart, where necessary. Some errors are due to mismatched keys, digest schemes or identity schemes and must be corrected by installing the correct media and/or correcting the configuration file. One of the most common errors is expired certificates, which must be regenerated and signed at least once per year using the <a href="keygen.html"><tt>ntp-keygen</tt> - generate public and private keys</a> program.</p>
+<p>The following error codes are reported via the NTP control and monitoring protocol trap mechanism and to the <tt>cryptostats</tt> monitoring file if configured.</p>
+<dl>
+ <dt>101 bad field format or length</dt>
+ <dd>The packet has invalid version, length or format.</dd>
+ <dt>102 bad timestamp</dt>
+ <dd>The packet timestamp is the same or older than the most recent received. This could be due to a replay or a server clock time step.</dd>
+ <dt>103 bad filestamp</dt>
+ <dd>The packet filestamp is the same or older than the most recent received. This could be due to a replay or a key file generation error.</dd>
+ <dt>104 bad or missing public key</dt>
+ <dd>The public key is missing, has incorrect format or is an unsupported type.</dd>
+ <dt>105 unsupported digest type</dt>
+ <dd>The server requires an unsupported digest/signature scheme.</dd>
+ <dt>106 unsupported identity type</dt>
+ <dd>The client or server has requested an identity scheme the other does not support.</dd>
+ <dt>107 bad signature length</dt>
+ <dd>The signature length does not match the current public key.</dd>
+ <dt>108 signature not verified</dt>
+ <dd>The message fails the signature check. It could be bogus or signed by a different private key.</dd>
+ <dt>109 certificate not verified</dt>
+ <dd>The certificate is invalid or signed with the wrong key.</dd>
+ <dt>110 host certificate expired</dt>
+ <dd>The old server certificate has expired.</dd>
+ <dt>111 bad or missing cookie</dt>
+ <dd>The cookie is missing, corrupted or bogus.</dd>
+ <dt>112 bad or missing leapseconds table</dt>
+ <dd>The leapseconds table is missing, corrupted or bogus.</dd>
+ <dt>113 bad or missing certificate</dt>
+ <dd>The certificate is missing, corrupted or bogus.</dd>
+ <dt>114 bad or missing group key</dt>
+ <dd>The identity key is missing, corrupt or bogus.</dd>
+ <dt>115 protocol error</dt>
+ <dd>The protocol state machine has wedged due to unexpected restart.</dd>
+</dl>
+<h4 id="files">Files</h4>
+<p>See the <a href="keygen.html"><tt>ntp-keygen</tt></a> page. Note that provisions to load leap second values from the NIST files have been removed. These provisions are now available whether or not the OpenSSL library is available. However, the functions that can download these values from servers remains available.</p>
+<hr>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</p>
+</body>
+</html>
diff --git a/html/bugs.html b/html/bugs.html
new file mode 100644
index 0000000..7be6a4c
--- /dev/null
+++ b/html/bugs.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>NTP Bug Reporting Procedures</title>
+<!-- Changed by: Harlan &, 23-Aug-2014 -->
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>NTP Bug Reporting Procedures</h3>
+<img src="pic/hornraba.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>The rabbit toots to make sure you read this.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->23-Aug-2014 05:32<!-- #EndDate -->
+UTC</p>
+.<br clear="left">
+<hr>
+<h4> Security Bug Reporting Procedures</h4>
+<p>If you find or suspect a security related program bug in this distribution, please send a report to <a href="mailto:security@ntp.org">security@ntp.org</a>. Please do not contact developers directly.</p>
+<h4>Non-Security Bug Reporting Procedures</h4>
+<p>If you find or suspect a non-security related program or documentation bug in this distribution, please send a report to the NTP Public Service Project Bug Tracking System (Bugzilla) at <a href="http://bugs.ntp.org/">http://bugs.ntp.org/</a>. Bugs reported this way are immediately forwarded to the developers. Please do not contact the developers directly.</p>
+<p>If you wish to send a report via electronic mail, please remember that your report will be held until one of our volunteers enters it in Bugzilla. The email address for these reports is <a href="mailto:bugs@ntp.org">bugs@ntp.org</a>. You will need to register at <a href="http://bugs.ntp.org/">http://bugs.ntp.org/</a> to participate directly in any e-mail discussion regarding your report. If you don't register and we have questions for you we won't be able to make progress on fixing your problem. Please directly register on and use our Bugzilla instance to report issues.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/build.html b/html/build.html
new file mode 100644
index 0000000..9683b29
--- /dev/null
+++ b/html/build.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=windows-1252">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Building and Installing the Distribution</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Building and Installing the Distribution</h3>
+<img src="pic/beaver.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>For putting out compiler fires.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Mar-2014 05:39<!-- #EndDate -->
+</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#build">Building and Installing the Distribution</a></li>
+ <li class="inline"><a href="#unix">Building and Installing for Unix</a></li>
+ <li class="inline"><a href="#win">Building and Installing for Windows</a></li>
+ <li class="inline"><a href="#conf">Configuration</a></li>
+ <li class="inline"><a href="#prob">If You Have Problems</a></li>
+ <li class="inline"><a href="#make">Additional <tt>make</tt> Commands</a></li>
+</ul>
+<hr>
+<h4 id="build">Building and Installing the Distribution</h4>
+<p>It is not possible in a software distribution such as this to support every individual computer and operating system with a common executable, even with the same system but different versions and options. Therefore, it is necessary to configure, build and install for each system and version. In almost all cases, these procedures are completely automatic, The user types <tt>./configure</tt>, <tt>make</tt> and <tt>install</tt> in that order and the autoconfigure system does the rest. There are some exceptions, as noted below and on the <a href="hints.html">Hints and Kinks</a> pages.</p>
+<p>If available, the OpenSSL library from <a href="http://www.openssl.org">http://www.openssl.org</a> is used to support public key cryptography. The library must be built and installed prior to building NTP. The procedures for doing that are included in the OpenSSL documentation. The library is found during the normal NTP configure phase and the interface routines compiled automatically. Only the <tt>libcrypto.a</tt> library file and <tt>openssl</tt> header files are needed. If the library is not available or disabled, this step is not required.</p>
+<p>The <a href="config.html">Build Options</a> page describes a number of options that determine whether debug support is included, whether and which reference clock drivers are included and the locations of the executables and library files, if not the default. By default debugging options and all reference clock drivers are included.</p>
+<h4 id="unix">Building and Installing for Unix</h4>
+<p>This distribution uses common compilers and tools that come with most Unix distributions. Not all of these tools exist in the standard distribution of modern Unix versions (compilers are likely to be an add-on product). If this is the case, consider using the GNU tools and <tt>gcc</tt> compiler included as freeware in some systems. For a successful build, all of these tools should be accessible via the current path.</p>
+<p>The first thing to do is uncompress the distribution and extract the source tree. In the distribution base directory use the <tt>./configure </tt>command to perform an automatic configuration procedure. This command inspects the hardware and software environment and configures the build process accordingly. Use the <tt>make</tt> command to compile and link the distribution and the <tt>install</tt> command to install the executables by default in <tt>/usr/local/bin</tt>.</p>
+<p>If your site supports multiple architectures and uses NFS to share files, you can use a single source tree to build executables for multiple architectures. While running on a particular architecture, change to the base directory and create a subdirectory using a command like <tt>mkdir A.machine, </tt>which will create an architecture-specific directory, then change to this directory and mumble <tt>../configure</tt>. The remaining steps are the same whether building in the base directory or in the subdirectory.</p>
+<h4 id="win">Building and Installing for Windows</h4>
+<p>NTP supports Windows 2000 and later. See the <a href="hints/winnt.html">NTP 4.x for Windows NT</a> page for directions to compile the sources and install the executables. A precompiled executable is available.</p>
+<h4 id="conf">Configuration</h4>
+<p>You are now ready to configure the daemon. You will need to create a NTP configuration file by default in <tt>/etc/ntp.conf.</tt> Newbies should see the <a href="quick.html">Quick Start</a> page for orientation. Seasoned veterans can start with the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a> page and move on to the specific configuration option pages from there.</p>
+<h4 id="prob">If You Have Problems</h4>
+<p>If you have problems with your hardware and software environment (e.g. operating system-specific issues), browse the <a href="hints.html">Hints and Kinks</a> pages. For other problems a tutorial on debugging technique is in the <a href="debug.html">NTP Debugging Technique</a> page. A list of important system log messages is on the <a href="msyslog.html"><tt>ntpd</tt> System Log Messages</a> page.</p>
+<p>The first line of general assistance is the NTP web site <a href="http://www.ntp.org">www.ntp.org</a> and the helpful documents resident there. Requests for assistance of a general nature and of interest to other timekeepers should be sent to the NTP newsgroup comp.protocols.time.ntp.</p>
+<p>Users are invited to report bugs and offer suggestions via the <a href="bugs.html">NTP Bug Reporting Procedures</a> page.</p>
+<h4 id="make">Additional <tt>make</tt> commands</h4>
+<dl>
+ <dt><tt>make clean</tt></dt>
+ <dd>Cleans out object files, programs and temporary files.</dd>
+ <dt><tt>make distclean</tt></dt>
+ <dd>Does the work of <tt>clean</tt>, but cleans out all directories in preparation for a new distribution release.</dd>
+ <dt><tt>make dist</tt></dt>
+ <dd>Does the work of <tt>make distclean</tt>, but constructs compressed tar files for distribution. You must have GNU automake to perform this function.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/clock.html b/html/clock.html
new file mode 100644
index 0000000..32f3ed8
--- /dev/null
+++ b/html/clock.html
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Clock State Machine</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Clock State Machine</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->4-Aug-2011 23:40<!-- #EndDate -->
+ UTC</p>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">General Overview</a></li>
+ <li class="inline"><a href="#panic">Panic Threshold</a></li>
+ <li class="inline"><a href="#step">Step and Stepout Thresholds</a></li>
+ <li class="inline"><a href="#hold">Hold Timer</a></li>
+ <li class="inline"><a href="#inter">Operating Intervals</a></li>
+ <li class="inline"><a href="#state">State Transition Function</a></li>
+</ul>
+<hr>
+<h4 id="intro">General Overview</h4>
+<p>In the NTPv4 specification and reference implementation a state machine is used to manage the system clock under exceptional conditions, as when the daemon is first started or when encountering severe network congestion. This page describes the design and operation of the state machine in detail.</p>
+<p> The state machine is activated upon receipt of an update by the clock discipline algorithm. its primary purpose is to determines whether the clock is slewed or stepped and how the initial time and frequency are determined using three thresholds: <em>panic</em>, <em>step</em> and <em>stepout</em>, and one timer: <em>hold</em>.</p>
+<h4 id="panic">Panic Threshold</h4>
+<p>Most computers today incorporate a time-of-year (TOY) chip to maintain the time when the power is off. When the computer is restarted, the chip is used to initialize the operating system time. In case there is no TOY chip or the TOY&nbsp;time is different from NTP time by more than the panic threshold, the daemon <tt></tt> assumes something must be terribly wrong, so exits with a message to the system operator to set the time manually. With the <tt>-g</tt> option on the command line, the daemon sets the clock to NTP time at the first update, but exits if the offset exceeds the panic threshold at subsequent updates. The panic threshold default is 1000 s, but it can be changed with the <tt>panic</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
+<h4 id="step"> Step and Stepout Thresholds</h4>
+<p>Under ordinary conditions, the clock discipline gradually slews the clock to the correct time, so that the time is effectively continuous and never stepped forward or backward. If, due to extreme network congestion, an offset spike exceeds the step threshold, by default 128 ms, the spike is discarded. However, if offset spikes greater than the step threshold persist for an interval more than the stepout threshold, by default 300 s, the system clock is stepped to the correct time.</p>
+<p> In practice, the need for a step has been extremely rare and almost always the result of a hardware failure or operator error. The step threshold and stepout threshold can be changed using the <tt>step</tt> and <tt>stepout</tt> options of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command, respectively. If the step threshold is set to zero, the step function is entirely disabled and the clock is always slewed. The daemon sets the step threshold to 600 s using the <tt>-x</tt> option on the command line. If the <tt>-g</tt> option is used or the step threshold is set greater than 0.5 s, the precision time kernel support is disabled.</p>
+<p>Historically, the most important application of the step function was when a leap second was inserted in the Coordinated Universal Time (UTC) timescale and the kernel precision time support was not available. This also happened with older reference clocks that indicated an impending leap second, but the radio itself did not respond until it resynchronized some minutes later. Further details are on the <a href="leap.html">Leap Second Processing</a> page.</p>
+<p>In some applications the clock can never be set backward, even it accidentally set forward a week by some evil means. The issues should be carefully considered before using these options. The slew rate is fixed at 500 parts-per-million (PPM) by the Unix kernel. As a result, the clock can take 33 minutes to amortize each second the clock is outside the acceptable range. During this interval the clock will not be consistent with any other network clock and the system cannot be used for distributed applications that require correctly synchronized network time.</p>
+<h4 id="hold">Hold Timer</h4>
+<p>When the daemon is started after a considerable downtime, it could be the TOY chip clock has drifted significantly from NTP time. This can cause a transient at system startup. In the past, this has produced a phase transient and resulted in a frequency surge that could take some time, even hours, to subside. When the highest accuracy is required, some means is necessary to manage the startup process so that the the clock is quickly set correctly and the frequency is undisturbed. The hold timer is used to suppress frequency adjustments during the training and startup intervals described below. At the beginning of the interval the hold timer is set to the stepout threshold and decrements at one second intervals until reaching zero. However, the hold timer is forced to zero if the residual clock offset is less than 0.5 ms. When nonzero, the discipline algorithm uses a small time constant (equivalent to a poll exponent of 2), but does not adjust the frequency. Assuming that the frequency has been set to within 1 PPM, either from the frequency file or by the training interval described later, the clock is set to within 0.5 ms in less than 300 s.</p>
+<h4 id="inter">Operating Intervals</h4>
+<p>The state machine operates in one of four nonoverlapping intervals.</p>
+<dl>
+ <dt>Training interval</dt>
+ <dd>This interval is used at startup when the frequency file is nor present at startup. It begins when the first update is received by the discipline algorithm and ends when an update is received following the stepout threshold. The clock phase is steered to the offset presented at the beginning of the interval, but without affecting the frequency. During the interval further updates are ignored. At the end of the interval the frequency is calculated as the phase change during the interval divided by the length of the interval. This generally results in a frequency error less than 0.5 PPM. Note that, if the intrinsic oscillator frequency error is large, the offset will in general have significant error. This is corrected during the subsequent startup interval.</dd>
+ <dt>Startup interval</dt>
+ <dd> This interval is used at startup to amortize the residual offset while not affecting the frequency. If the frequency file is present, it begins when the first update is received by the discipline. If not, it begins after the training interval. It ends when the hold timer decrements to zero or when the residual offset falls below 0.5 ms.</dd>
+ <dt>Step interval</dt>
+ <dd>This interval is used as a spike blanker during periods when the offsets exceed the step threshold. The interval continues as long as offsets are received that are greater than the step threshold, but ends when either an offset is received less than the step threshold or until the time since the last valid update exceeds the stepout threshold.</dd>
+ <dt>Sync Interval</dt>
+ <dd> This interval is implicit; that is, it is used when none of the above intervals are used.</dd>
+</dl>
+<h4 id="state">State Transition Function</h4>
+<p>The state machine consists of five states. An event is created when an update is received by the discipline algorithm. Depending on the state and the the offset magnitude, the machine performs some actions and transitions to the same or another state. Following is a short description of the states.</p>
+<dl>
+ <dt>FSET - The frequency file is present</dt>
+ <dd> Load the frequency file, initialize the hold timer and continue in SYNC state.</dd>
+ <dt>NSET - The frequency file is not present</dt>
+ <dd>Initialize the hold timer and continue in FREQ state.</dd>
+ <dt>FREQ - Frequency training state</dt>
+ <dd>Disable the clock discipline until the time since the last update exceeds the stepout threshold. When this happens, calculate the frequency, initialize the hold counter and transition to SYNC state.</dd>
+ <dt>SPIK - Spike state</dt>
+ <dd>A update greater than the step threshold has occurred. Ignore the update and continue in this state as long as updates greater than the step threshold occur. If a valid update is received, continue in SYNC state. When the time since the last valid update was received exceeds the stepout threshold, step the system clock and continue in SYNC state. </dd>
+ <dt>SYNC - Ordinary clock discipline state</dt>
+ <dd>Discipline the system clock time and frequency using the hybrid phase/frequency feedback loop. However, do not discipline the frequency if the hold timer is nonzero.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/clockopt.html b/html/clockopt.html
new file mode 100644
index 0000000..0fe4c24
--- /dev/null
+++ b/html/clockopt.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Reference Clock Commands and Options</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Reference Clock Commands and Options</h3>
+<img src="pic/stack1a.jpg" alt="gif" align="left">Master Time Facility at the <a href="http://www.eecis.udel.edu/%7emills/lab.html">UDel Internet Research Laboratory</a>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/clockopt.txt"></script>
+<hr>
+<h4 id="addrs">Reference Clock Adddresses</h4>
+<p>Unless noted otherwise, further information about these ccommands is on the <a href="refclock.html">Reference Clock Support</a> page.</p><p>Reference clocks are identified by a syntactically correct but invalid IP address, in order to distinguish them from ordinary NTP peers. These addresses are of the form 127.127.<em>t</em>.<em>u</em>, where <em>t</em> is an integer denoting the clock type and <em>u</em> indicates the unit number in the range 0-3. While it may seem overkill, it is in fact sometimes useful to configure multiple reference clocks of the same type, in which case the unit numbers must be unique.</p>
+<h4 id="cmd"> Commands and Options</h4>
+<dl>
+ <dt id="server"><tt>server 127.127.<i>t.u</i> [prefer] [mode <i>int</i>] [minpoll <i>int</i>] [maxpoll <i>int</i>]</tt></dt>
+ <dd>This command can be used to configure reference clocks in special ways. The options are interpreted as follows:
+ <dl>
+ <dt><tt>prefer</tt></dt>
+ <dd>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 <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page for further information.</dd>
+ <dt><tt>mode <i>int</i></tt></dt>
+ <dd>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 <tt>parse</tt> drivers.</dd>
+ <dt><tt>minpoll <i>int</i></tt><br>
+ <tt>maxpoll <i>int</i></tt></dt>
+ <dd>These options specify the minimum and maximum polling interval for reference clock messages in log<sub>2</sub> seconds. For most directly connected reference clocks, both <tt>minpoll</tt> and <tt>maxpoll</tt> default to 6 (64 s). For modem reference clocks, <tt>minpoll</tt> is ordinarily set to 10 (about 17 m) and <tt>maxpoll</tt> to 15 (about 9 h). The allowable range is 4 (16 s) to 17 (36 h) inclusive.</dd>
+ </dl>
+ </dd>
+ <dt id="fudge"><tt>fudge 127.127.<i>t.u</i> [time1 <i>sec</i>] [time2 <i>sec</i>]
+ [stratum <i>int</i>] [refid <i>string</i>] [flag1 0|1]
+ [flag2 0|1] [flag3 0|1] [flag4 0|1]</tt></dt>
+ <dd>This command can be used to configure reference clocks in special ways. It must immediately follow the <tt>server</tt> command which configures the driver. Note that the same capability is possible at run time using the <tt><a href="ntpdc.html">ntpdc</a></tt> program. The options are interpreted as follows:
+ <dl>
+ <dt><tt>time1 <i>sec</i></tt></dt>
+ <dd>Specifies a constant to be added to the time offset produced by the driver, a fixed-point decimal number in seconds. This is used as a calibration constant to adjust the nominal time offset of a particular clock to agree with an external standard, such as a precision PPS signal. It also provides a way to correct a systematic error or bias due to serial port or operating system latencies, different cable lengths or receiver internal delay. The specified offset is in addition to the propagation delay provided by other means, such as internal DIPswitches. Where a calibration for an individual system and driver is available, an approximate correction is noted in the driver documentation pages.</dd>
+ <dd>Note: in order to facilitate calibration when more than one radio clock or PPS signal is supported, a special calibration feature is available. It takes the form of an argument to the <tt>enable</tt> command described in the <a href="miscopt.html">Miscellaneous Options</a> page and operates as described in the <a href="refclock.html">Reference Clock Support</a> page.</dd>
+ <dt><tt>time2 <i>secs</i></tt></dt>
+ <dd>Specifies a fixed-point decimal number in seconds, which is interpreted in a driver-dependent way. See the descriptions of specific drivers in the <a href="refclock.html">Reference Clock Support</a> page.</dd>
+ <dt><tt>stratum <i>int</i></tt></dt>
+ <dd>Specifies the stratum number assigned to the driver in the range 0 to 15, inclusive. This number overrides the default stratum number ordinarily assigned by the driver itself, usually zero.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies an ASCII string of from one to four characters which defines the reference identifier used by the driver. This string overrides the default identifier ordinarily assigned by the driver itself.</dd>
+ <dt><tt>flag1 flag2 flag3 flag4</tt></dt>
+ <dd>These four flags are used for customizing the clock driver. The interpretation of these values, and whether they are used at all, is a function of the particular driver. However, by convention <tt>flag4</tt> is used to enable recording monitoring data to the <tt>clockstats</tt> file configured with the <tt>filegen</tt> command. Additional information on the <tt>filegen</tt> command is on the <a href="monopt.html">Monitoring Options</a> page.</dd>
+ </dl>
+ </dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/cluster.html b/html/cluster.html
new file mode 100644
index 0000000..3132a46
--- /dev/null
+++ b/html/cluster.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Clock Cluster Algorithm</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<em></em>
+<h3>Clock Cluster Algorithm</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->15-Nov-2012 06:02<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>The clock cluster algorithm processes the truechimers produced by the clock select algorithm to produce a list of <em>survivors</em>. These survivors are used by the mitigation algorithms to discipline the system clock. The cluster algorithm operates in a series of rounds, where at each round the truechimer furthest from the offset centroid is pruned from the population. The rounds are continued until a specified termination condition is met. This page discusses the algorithm in detail.</p>
+<p>First, the truechimer associations are saved on an unordered list with each candidate entry identified with index <em>i</em> (<em>i </em>= 1, ..., <em>n)</em>, where <em>n</em> is the number of candidates. Let &theta;(<em>i</em>), be the offset and &lambda;(<em>i</em>) be the root distance of the <em>i</em>th entry. Recall that the root distance is equal to the root dispersion plus half the root delay. For the <em>i</em>th candidate on the list, a statistic called the <em>select jitter</em> relative to the <em>i</em>th candidate is calculated as follows. Let</p>
+<div align="center">
+ <p><em>d<sub>i</sub></em>(<em>j</em>) = |&theta;(<em>j</em>) &minus; &theta;(<em>i</em>)| &lambda;(<em>i</em>),</p>
+</div>
+<p> where &theta;(<em>i)</em> is the peer offset of the <em>i</em>th entry and &theta;(<em>j</em>) is the peer offset of the <em>j</em>th entry, both produced by the clock filter algorithm. The metric used by the cluster algorithm is the select jitter &phi;<sub>S</sub>(<em>i</em>) computed as the root mean square (RMS) of the <em>d<sub>i</sub></em>(<em>j</em>) as <em>j</em> ranges from 1 to <em>n</em>. <em> </em>For the purpose of notation in the example to follow, let &phi;<sub>R</sub>(<em>i</em>) be the peer jitter computed by the clock filter algorithm for the <em>i</em>th candidate.</p>
+<p>The object at each round is to prune the entry with the largest metric until the termination condition is met. Note that the select jitter must be recomputed at each round, but the peer jitter does not change. At each round the remaining entries on the list represent the survivors of that round. If the candidate to be pruned is preemptable and the number of candidates is greater than the <em>maxclock threshold</em>, the association is demobilized. This is useful in the schemes described on the <a href="discover.html">Automatic Server Discovery Schemes</a> page. The maxclock threshold default is 10, but it can be changed using the <tt>maxclock</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. Further pruning is subject to the following termination conditions, but no associations will be automatically demobilized.</p>
+<p>The termination condition has two parts. First, if the number of survivors is not greater than the<em> </em><em>minclock threshold</em> set by the <tt>minclock</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command, the pruning process terminates. The<tt> minclock</tt> default is 3, but can be changed to fit special conditions, as described on the <a href="prefer.html">Mitigation Rules and the prefer Keyword</a> page.</p>
+<div align="center"><img src="pic/flt7.gif" alt="gif">
+ <p>Figure 1. Cluster Algorithm</p>
+</div>
+<p>The second termination condition is more intricate. Figure 1 shows a round where a candidate of (a) is pruned to yield the candidates of (b). Let &phi;<sub><em>max</em></sub> be the maximum select jitter and &phi;<sub><em>min</em></sub> be the minimum peer jitter over all candidates on the list. In (a), candidate 1 has the highest select jitter, so &phi;<sub><em>max</em></sub> = &phi;<sub>S</sub>(1). Candidate 4 has the lowest peer jitter, so &phi;<sub><em>min</em></sub> = &phi;<sub>R</sub>(4). Since &phi;<sub><em>max</em></sub> &gt; &phi;<sub><em>min</em></sub>, select jitter dominates peer jitter,the algorithm prunes candidate 1.&#13; In (b), &phi;<sub><em>max</em></sub> = &phi;<sub>S</sub>(3) and &phi;<sub><em>min </em></sub>=&phi;<sub>R</sub>(4). Since &phi;<sub><em>max</em></sub> &lt; &phi;<sub><em>min</em></sub>, pruning additional candidates does not reduce select jitter, the algorithm terminates with candidates 2, 3 and 4 as survivors.</p>
+<p>The survivor list is passed on to the the mitigation algorithms, which combine the survivors, select a system peer, and compute the system statistics passed on to dependent clients. Note the use of root distance &lambda; as a weight factor at each round in the clock cluster algorithm. This is to favor the survivors with the lowest root distance and thus the smallest maximum error.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/comdex.html b/html/comdex.html
new file mode 100644
index 0000000..0d632f1
--- /dev/null
+++ b/html/comdex.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Command Index</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Command Index</h3>
+<img src="pic/alice38.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carrol</a>
+<p>The Mad Hatter says &quot;Bring it on&quot;.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/accopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/authopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/confopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/monopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/clockopt.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/miscopt.txt"></script>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+<!-- <hr> -->
+<!-- <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script> -->
+</body>
+</html>
diff --git a/html/config.html b/html/config.html
new file mode 100644
index 0000000..ae68c89
--- /dev/null
+++ b/html/config.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=windows-1252">
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>Build Options</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Build Options</h3>
+ <img src="pic/pogo3a.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+ <p>Gnu autoconfigure tools are in the backpack.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 04:59<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+ <hr>
+ <p>Most modern software distributions include an autoconfigure utility which
+ customizes the build and install configuration according to the specific
+ hardware, operating system and file system conventions. For NTP this
+ utility is called <tt>configure</tt>, which is run before building and installing
+ the program components. For most installations no additional actions
+ are required other than running <tt>configure</tt> with no options.
+ However, it is possible to customize the build and install configuration
+ through the use of <tt>configure</tt> options.</p>
+ <p>The available options, together with
+ a concise description, can be displayed by running <tt>configure</tt> with
+ the <tt>--help</tt> option. Various options can be used to reduce the memory
+ footprint, adjust the scheduling priority, enable or disable debugging
+ support or reference clock driver support. The options can be used
+ to specify where to install the program components or where to find
+ various libraries if they are not in the default place.</p>
+<hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/confopt.html b/html/confopt.html
new file mode 100644
index 0000000..8c8ae37
--- /dev/null
+++ b/html/confopt.html
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Server Commands and Options</title>
+<!-- Changed by: Harlan &, 31-Jan-2014 -->
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Server Commands and Options</h3>
+<img src="pic/boom3a.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>,
+Walt Kelly</a>
+<p>The chicken is getting configuration advice.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:01<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/confopt.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#address">Server and Peer Addresses</a></li>
+ <li class="inline"><a href="#command">Server Commands</a></li>
+ <li class="inline"><a href="#option">Server Command Options</a></li>
+</ul>
+<hr>
+<h4 id="address">Server and Peer Addresses</h4>
+<p>Following is a description of the server configuration commands in NTPv4. There are two classes of commands, configuration commands that configure an association with a remote server, peer or reference clock, and auxiliary commands that specify environment variables that control various related operations. </p>
+<p>The various modes described on the <a href="assoc.html">Association Management</a> page are determined by the command keyword and the DNS name or IP address. Addresses are classed by type as (s) a remote server or peer (IPv4 class A, B and C or IPv6), (b) the IPv4 broadcast address of a local interface, (m) a multicast address (IPv4 class D or IPv6), or (r) a reference clock address (127.127.x.x). For type m addresses the IANA has assigned the multicast group address IPv4 224.0.1.1 and IPv6 ff05::101 (site local) exclusively to NTP, but other nonconflicting addresses can be used. </p>
+<p>If the Basic Socket Interface Extensions for IPv6 (RFC-2553) is detected,
+ support for the IPv6 address family is generated in addition to the default IPv4 address family. IPv6 addresses can be identified by the presence of colons &quot;:&quot; in the address field. IPv6 addresses can be used almost everywhere where IPv4 addresses can be used, with the exception of reference clock addresses, which are always IPv4. Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
+<h4 id="command">Server Commands</h4>
+<p>Unless noted otherwise, further information about these commands is on the <a href="assoc.html">Association Management</a> page.</p><dl>
+ <dt id="server"><tt>server <i>address</i> [options ...]</tt><br>
+ <tt>peer <i>address</i> [options ...]</tt><br>
+ <tt>broadcast <i>address</i> [options ...]</tt><br>
+ <tt>manycastclient <i>address</i> [options ...]</tt><br>
+ <tt>pool <i>address</i> [options ...]</tt><br>
+ <tt>unpeer [<i>address</i> | <i>associd</i>]</tt></dt>
+ <dd>These commands specify the remote server name or address to be used and the mode in which to operate. The <i>address</i> can be either a DNS name or a IPv4 or IPv6 address in standard notation. In general, multiple commands of each type can be used for different server and peer addresses or multicast groups.
+ <dl>
+ <dt><tt>server</tt></dt>
+ <dd>For type s and r addresses (only), this command mobilizes a persistent client mode association with the specified remote server or local reference clock. If the <tt>preempt</tt> flag is specified, a preemptable client mode association is mobilized instead.</dd>
+ <dt id="peer"><tt>peer</tt></dt>
+ <dd>For type s addresses (only), this command mobilizes a persistent symmetric-active mode association with the specified remote peer.</dd>
+ <dt id="broadcast"><tt>broadcast</tt></dt>
+ <dd>For type b and m addressees (only), this command mobilizes a broadcast or multicast server mode association. Note that type b messages go only to the interface specified, but type m messages go to all interfaces.</dd>
+ <dt id="manycastclient"><tt>manycastclient</tt></dt>
+ <dd>For type m addresses (only), this command mobilizes a preemptable manycast client mode association for the multicast group address specified. In this mode the address must match the address specified on the <tt>manycastserver</tt> command of one or more designated manycast servers. Additional information about this command is on the <a href="discover.html#mcst">Automatic Server Discovery</a> page.</dd>
+ <dt id="pool"><tt>pool</tt></dt>
+ <dd>For type s addresses (only) this command mobilizes a preemptable pool client mode association for the DNS name specified. The DNS name must resolve to one or more IPv4 or IPv6 addresses. Additional information about this command is on the <a href="discover.html#pool">Automatic Server Discovery</a> page. The <a href="http://www.pool.ntp.org/">www.pool.ntp.org</a> page describes a compatible pool of public NTP servers.</dd>
+ <dt id="unpeer"><tt>unpeer</tt></dt>
+ <dd>This command removes a previously configured association. An address or association ID can be used to identify the association. Either an IP address or DNS name can be used. This command is most useful when supplied via <tt><a href="ntpq.html">ntpq</a></tt> runtime configuration commands <tt>:config</tt> and <tt>config-from-file</tt>.</dd>
+ </dl></dd>
+</dl>
+<h4 id="option">Server Command Options</h4>
+<dl>
+ <dt><tt>autokey</tt></dt>
+ <dd>Send and receive packets authenticated by the Autokey scheme described
+ on the <a href="autokey.html">Autokey Public Key Authentication</a> page. This option is mutually exclusive with the <tt>key</tt> option.</dd>
+ <dt id="burst"><tt>burst</tt></dt>
+ <dd>When the server is reachable, send a burst of packets instead of the usual one. This option is valid only with the <tt>server</tt> command and type s addresses. It is a recommended option when the <tt>maxpoll</tt> option is greater than 10 (1024 s). Additional information about this option is on the <a href="poll.html">Poll Program</a> page.</dd>
+ <dt><tt>iburst</tt></dt>
+ <dd>When the server is unreachable, send a burst of packets instead of the usual one. This option is valid only with the <tt>server</tt> command and type <tt>s</tt> addresses. It is a recommended option with this command. Additional information about this option is on the <a href="poll.html">Poll Program</a> page.</dd>
+ <dt><tt>ident</tt> <em><tt>group</tt></em></dt>
+ <dd>Specify the group name for the association. See the <a href="autokey.html">Autokey Public-Key Authentication</a> page for further information.</dd>
+ <dt><tt>key</tt> <i><tt>key</tt></i></dt>
+ <dd>Send and receive packets authenticated by the symmetric key scheme described in the <a href="authentic.html">Authentication Support</a> page. The <i><tt>key</tt></i> specifies the key identifier with values from 1 to 65534, inclusive. This option is mutually exclusive with the <tt>autokey</tt> option.</dd> <dt><tt>minpoll <i>minpoll<br>
+ </i></tt><tt>maxpoll <i>maxpoll</i></tt></dt>
+ <dd>These options specify the minimum and maximum poll intervals for NTP messages, in seconds as a power of two. The maximum poll interval defaults to 10 (1024 s), but can be increased by the <tt>maxpoll</tt> option to an upper limit of 17 (36 hr). The minimum poll interval defaults to 6 (64 s), but can be decreased by the <tt>minpoll</tt> option to a lower limit of 3 (8 s). Additional information about this option is on the <a href="poll.html">Poll Program</a> page.</dd>
+ <dt><tt>mode <i>option</i></tt></dt>
+ <dd>Pass the <tt><i>option</i></tt> to a reference clock driver, where <tt><i>option</i></tt> is an integer in the range from 0 to 255, inclusive. This option is valid only with type r addresses.</dd>
+ <dt><tt>noselect</tt></dt>
+ <dd>Marks the server or peer to be ignored by the selection algorithm as unreachable, but visible to the monitoring program. This option is valid only with the <tt>server</tt> and <tt>peer</tt> commands.</dd>
+ <dt><tt>preempt</tt></dt>
+ <dd>Specifies the association as preemptable rather than the default persistent. This option is ignored with the <tt>broadcast</tt> command and is most useful with the <tt>manycastclient</tt> and <tt>pool</tt> commands.</dd>
+ <dt><tt>prefer</tt></dt>
+ <dd>Mark the server as preferred. All other things being equal, this host will be chosen for synchronization among a set of correctly operating hosts. See the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page for further information. This option is valid only with the <tt>server</tt> and <tt>peer</tt> commands.</dd>
+ <dt><tt>true</tt></dt>
+ <dd>Mark the association to assume truechimer status; that is, always survive the selection and clustering algorithms. This option can be used with any association, but is most useful for reference clocks with large jitter on the serial port and precision pulse-per-second (PPS) signals. Caution: this option defeats the algorithms designed to cast out falsetickers and can allow these sources to set the system clock. This option is valid only with the <tt>server</tt> and <tt>peer</tt> commands.</dd>
+ <dt><tt>ttl <i>ttl</i></tt></dt>
+ <dd>This option specifies the time-to-live <i><tt>ttl</tt></i> for the <tt>broadcast</tt> command and the maximum <i><tt>ttl</tt></i> for the expanding ring search used by the <tt>manycastclient</tt> command. Selection of the proper value, which defaults to 127, is something of a black art and should be coordinated with the network administrator. This option is invalid with type r addresses.</dd>
+ <dt><tt>version <i>version</i></tt></dt>
+ <dd>Specifies the version number to be used for
+outgoing NTP packets. Versions 1-4 are the choices, with version 4 the default.</dd>
+ <dt><tt>xleave</tt></dt>
+ <dd>Operate in interleaved mode (symmetric and broadcast modes only). Further information is on the <a href="xleave.html">NTP Interleaved Modes</a> page.</dd>
+</dl>
+<h4 id="aux">Auxiliary Commands</h4>
+<dl>
+ <dt id="broadcastclient"><tt>broadcastclient</tt></dt>
+ <dd>Enable reception of broadcast server messages to any local interface (type b address). Ordinarily, upon receiving a broadcast message for the first time, the broadcast client measures the nominal server propagation delay using a brief client/server exchange, after which it continues in listen-only mode. If a nonzero value is specified in the <tt>broadcastdelay</tt> command, the value becomes the delay and the volley is not executed. Note: the <tt>novolley</tt> option has been deprecated for future enhancements. Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric key or public key authentication as described in the <a href="authopt.html">Authentication Options</a> page. Note that the volley is required with public key authentication in order to run the Autokey protocol..</dd>
+ <dt id="manycastserver"><tt>manycastserver <i>address</i> [...]</tt></dt>
+ <dd>Enable reception of manycast client messages (type m) to the multicasts group address(es) (type m) specified. At least one address is required. Note that, in order to avoid accidental or malicious disruption, both the server and client should operate using symmetric key or public key authentication as described in the <a href="authopt.html">Authentication Options</a> page.</dd>
+ <dt id="multicastclient"><tt>multicastclient <i>address</i> [...]</tt></dt>
+ <dd>Enable reception of multicast server messages to the multicast group address(es) (type m) specified. Upon receiving a message for the first time, the multicast client measures the nominal server propagation delay using a brief client/server exchange with the server, then enters the broadcast client mode, in which it synchronizes to succeeding multicast messages. Note that, in order to avoid accidental or malicious disruption in this mode, both the server and client should operate using symmetric key or public key authentication as described in the <a href="authopt.html">Authentication Options</a> page.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/copyright.html b/html/copyright.html
new file mode 100644
index 0000000..08272d4
--- /dev/null
+++ b/html/copyright.html
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>Copyright Notice</title>
+<!-- Changed by: Harlan Stenn, 10-Mar-2014 -->
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Copyright Notice</h3>
+<img src="pic/sheepb.jpg" alt="jpg" align="left"> "Clone me," says Dolly sheepishly.
+<p>Last update:
+ <!-- #BeginDate format:En2m -->9-Aug-2014 07:56<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+</p>
+<hr>
+<p>The following copyright notice applies to all files collectively called the Network Time Protocol Version 4 Distribution. Unless specifically declared otherwise in an individual file, this notice applies as if the text was explicitly included in the file.</p>
+<pre>
+***********************************************************************
+* *
+* Copyright (c) University of Delaware 1992-2014 *
+* *
+* Permission to use, copy, modify, and distribute this software and *
+* its documentation for any purpose with or without fee is hereby *
+* granted, provided that the above copyright notice appears in all *
+* copies and that both the copyright notice and this permission *
+* notice appear in supporting documentation, and that the name *
+* University of Delaware not be used in advertising or publicity *
+* pertaining to distribution of the software without specific, *
+* written prior permission. The University of Delaware makes no *
+* representations about the suitability this software for any *
+* purpose. It is provided &quot;as is&quot; without express or implied *
+* warranty. *
+* *
+***********************************************************************
+</pre>
+<p>The following individuals contributed in part to the Network Time Protocol Distribution Version 4 and are acknowledged as authors of this work.</p>
+<ol>
+ <li><a href="mailto:%20takao_abe@xurb.jp">Takao Abe &lt;takao_abe@xurb.jp&gt;</a> Clock driver for JJY receivers</li>
+ <li><a href="mailto:%20mark_andrews@isc.org">Mark Andrews &lt;mark_andrews@isc.org&gt;</a> Leitch atomic clock controller</li>
+ <li><a href="mailto:%20altmeier@atlsoft.de">Bernd Altmeier &lt;altmeier@atlsoft.de&gt;</a> hopf Elektronik serial line and PCI-bus devices</li>
+ <li><a href="mailto:%20vbais@mailman1.intel.co">Viraj Bais &lt;vbais@mailman1.intel.com&gt;</a> and <a href="mailto:%20kirkwood@striderfm.intel.com">Clayton Kirkwood &lt;kirkwood@striderfm.intel.com&gt;</a> port to WindowsNT 3.5</li>
+ <li><a href="mailto:%20michael.barone@lmco.com">Michael Barone &lt;michael,barone@lmco.com&gt;</a> GPSVME fixes</li>
+ <li><a href="mailto:%20karl@owl.HQ.ileaf.com">Karl Berry &lt;karl@owl.HQ.ileaf.com&gt;</a> syslog to file option</li>
+ <li><a href="mailto:%20greg.brackley@bigfoot.com">Greg Brackley &lt;greg.brackley@bigfoot.com&gt;</a> Major rework of WINNT port. Clean up recvbuf and iosignal code into separate modules.</li>
+ <li><a href="mailto:%20Marc.Brett@westgeo.com">Marc Brett &lt;Marc.Brett@westgeo.com&gt;</a> Magnavox GPS clock driver</li>
+ <li><a href="mailto:%20Piete.Brooks@cl.cam.ac.uk">Piete Brooks &lt;Piete.Brooks@cl.cam.ac.uk&gt;</a> MSF clock driver, Trimble PARSE support</li>
+ <li><a href="mailto:%20nelson@bolyard.me">Nelson B Bolyard &lt;nelson@bolyard.me&gt;</a> update and complete broadcast and crypto features in sntp</li>
+ <li><a href="mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca">Jean-Francois Boudreault &lt;Jean-Francois.Boudreault@viagenie.qc.ca&gt;</a> IPv6 support</li>
+ <li><a href="mailto:%20reg@dwf.com">Reg Clemens &lt;reg@dwf.com&gt;</a> Oncore driver (Current maintainer)</li>
+ <li><a href="mailto:%20clift@ml.csiro.au">Steve Clift &lt;clift@ml.csiro.au&gt;</a> OMEGA clock driver</li>
+ <li><a href="mailto:%20casey@csc.co.za">Casey Crellin &lt;casey@csc.co.za&gt;</a> vxWorks (Tornado) port and help with target configuration</li>
+ <li><a href="mailto:%20Sven_Dietrich@trimble.COM">Sven Dietrich &lt;sven_dietrich@trimble.com&gt;</a> Palisade reference clock driver, NT adj. residuals, integrated Greg's Winnt port.</li>
+ <li><a href="mailto:%20dundas@salt.jpl.nasa.gov">John A. Dundas III &lt;dundas@salt.jpl.nasa.gov&gt;</a> Apple A/UX port</li>
+ <li><a href="mailto:%20duwe@immd4.informatik.uni-erlangen.de">Torsten Duwe &lt;duwe@immd4.informatik.uni-erlangen.de&gt;</a> Linux port</li>
+ <li><a href="mailto:%20dennis@mrbill.canet.ca">Dennis Ferguson &lt;dennis@mrbill.canet.ca&gt;</a> foundation code for NTP Version 2 as specified in RFC-1119</li>
+ <li><a href="mailto:%20jhay@icomtek.csir.co.za">John Hay &lt;jhay@icomtek.csir.co.za&gt;</a> IPv6 support and testing</li>
+ <li><a href="mailto:%20davehart@davehart.com">Dave Hart &lt;davehart@davehart.com&gt;</a> General maintenance, Windows port interpolation rewrite</li>
+ <li><a href="mailto:%20neoclock4x@linum.com">Claas Hilbrecht &lt;neoclock4x@linum.com&gt;</a> NeoClock4X clock driver</li>
+ <li><a href="mailto:%20glenn@herald.usask.ca">Glenn Hollinger &lt;glenn@herald.usask.ca&gt;</a> GOES clock driver</li>
+ <li><a href="mailto:%20iglesias@uci.edu">Mike Iglesias &lt;iglesias@uci.edu&gt;</a> DEC Alpha port</li>
+ <li><a href="mailto:%20jagubox.gsfc.nasa.gov">Jim Jagielski &lt;jim@jagubox.gsfc.nasa.gov&gt;</a> A/UX port</li>
+ <li><a href="mailto:%20jbj@chatham.usdesign.com">Jeff Johnson &lt;jbj@chatham.usdesign.com&gt;</a> massive prototyping overhaul</li>
+ <li><a href="mailto:%20Hans.Lambermont@nl.origin-it.com">Hans Lambermont &lt;Hans.Lambermont@nl.origin-it.com&gt;</a> or <a href="mailto:H.Lambermont@chello.nl">&lt;H.Lambermont@chello.nl&gt;</a> ntpsweep</li>
+ <li><a href="mailto:%20phk@FreeBSD.ORG">Poul-Henning Kamp &lt;phk@FreeBSD.ORG&gt;</a> Oncore driver (Original author)</li>
+ <li><a href="http://www4.informatik.uni-erlangen.de/%7ekardel">Frank Kardel</a> <a href="mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org">&lt;kardel (at) ntp (dot) org&gt;</a> PARSE &lt;GENERIC&gt; (driver 14 reference clocks), STREAMS modules for PARSE, support scripts, syslog cleanup, dynamic interface handling</li>
+ <li><a href="mailto:kuehn@ntp.org">Johannes Maximilian Kuehn &lt;kuehn@ntp.org&gt;</a> Rewrote <tt>sntp</tt> to comply with NTPv4 specification, <tt>ntpq saveconfig</tt></li>
+ <li><a href="mailto:%20jones@hermes.chpc.utexas.edu">William L. Jones &lt;jones@hermes.chpc.utexas.edu&gt;</a> RS/6000 AIX modifications, HPUX modifications</li>
+ <li><a href="mailto:%20dkatz@cisco.com">Dave Katz &lt;dkatz@cisco.com&gt;</a> RS/6000 AIX port</li>
+ <li><a href="mailto:%20leres@ee.lbl.gov">Craig Leres &lt;leres@ee.lbl.gov&gt;</a> 4.4BSD port, ppsclock, Magnavox GPS clock driver</li>
+ <li><a href="mailto:%20lindholm@ucs.ubc.ca">George Lindholm &lt;lindholm@ucs.ubc.ca&gt;</a> SunOS 5.1 port</li>
+ <li><a href="mailto:%20louie@ni.umd.edu">Louis A. Mamakos &lt;louie@ni.umd.edu&gt;</a> MD5-based authentication</li>
+ <li><a href="mailto:%20thorinn@diku.dk">Lars H. Mathiesen &lt;thorinn@diku.dk&gt;</a> adaptation of foundation code for Version 3 as specified in RFC-1305</li>
+ <li><a href="mailto:%20mayer@ntp.org">Danny Mayer &lt;mayer@ntp.org&gt;</a>Network I/O, Windows Port, Code Maintenance</li>
+ <li><a href="mailto:%20mills@udel.edu">David L. Mills &lt;mills@udel.edu&gt;</a> Version 4 foundation, precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19, 22, 36</li>
+ <li><a href="mailto:%20moeller@gwdgv1.dnet.gwdg.de">Wolfgang Moeller &lt;moeller@gwdgv1.dnet.gwdg.de&gt;</a> VMS port</li>
+ <li><a href="mailto:%20mogul@pa.dec.com">Jeffrey Mogul &lt;mogul@pa.dec.com&gt;</a> ntptrace utility</li>
+ <li><a href="mailto:%20tmoore@fievel.daytonoh.ncr.com">Tom Moore &lt;tmoore@fievel.daytonoh.ncr.com&gt;</a> i386 svr4 port</li>
+ <li><a href="mailto:%20kamal@whence.com">Kamal A Mostafa &lt;kamal@whence.com&gt;</a> SCO OpenServer port</li>
+ <li><a href="mailto:%20derek@toybox.demon.co.uk">Derek Mulcahy &lt;derek@toybox.demon.co.uk&gt;</a> and <a href="mailto:%20d@hd.org">Damon Hart-Davis &lt;d@hd.org&gt;</a> ARCRON MSF clock driver</li>
+ <li><a href="mailto:%20neal@ntp.org">Rob Neal &lt;neal@ntp.org&gt;</a> Bancomm refclock and config/parse code maintenance</li>
+ <li><a href="mailto:%20Rainer.Pruy@informatik.uni-erlangen.de">Rainer Pruy &lt;Rainer.Pruy@informatik.uni-erlangen.de&gt;</a> monitoring/trap scripts, statistics file handling</li>
+ <li><a href="mailto:%20dirce@zk3.dec.com">Dirce Richards &lt;dirce@zk3.dec.com&gt;</a> Digital UNIX V4.0 port</li>
+ <li><a href="mailto:%20wsanchez@apple.com">Wilfredo S&aacute;nchez &lt;wsanchez@apple.com&gt;</a> added support for NetInfo</li>
+ <li><a href="mailto:%20mrapple@quack.kfu.com">Nick Sayer &lt;mrapple@quack.kfu.com&gt;</a> SunOS streams modules</li>
+ <li><a href="mailto:%20jack@innovativeinternet.com">Jack Sasportas &lt;jack@innovativeinternet.com&gt;</a> Saved a Lot of space on the stuff in the html/pic/ subdirectory</li>
+ <li><a href="mailto:%20schnitz@unipress.com">Ray Schnitzler &lt;schnitz@unipress.com&gt;</a> Unixware1 port</li>
+ <li><a href="mailto:%20shields@tembel.org">Michael Shields &lt;shields@tembel.org&gt;</a> USNO clock driver</li>
+ <li><a href="mailto:%20pebbles.jpl.nasa.gov">Jeff Steinman &lt;jss@pebbles.jpl.nasa.gov&gt;</a> Datum PTS clock driver</li>
+ <li><a href="mailto:%20harlan@pfcs.com">Harlan Stenn &lt;harlan@pfcs.com&gt;</a> GNU automake/autoconfigure makeover, various other bits (see the ChangeLog)</li>
+ <li><a href="mailto:%20ken@sdd.hp.com">Kenneth Stone &lt;ken@sdd.hp.com&gt;</a> HP-UX port</li>
+ <li><a href="mailto:%20ajit@ee.udel.edu">Ajit Thyagarajan &lt;ajit@ee.udel.edu&gt;</a>IP multicast/anycast support</li>
+ <li><a href="mailto:%20tsuruoka@nc.fukuoka-u.ac.jp">Tomoaki TSURUOKA &lt;tsuruoka@nc.fukuoka-u.ac.jp&gt;</a>TRAK clock driver</li>
+ <li><a href="mailto:%20brian.utterback@oracle.com">Brian Utterback &lt;brian.utterback@oracle.com&gt;</a> General codebase, Solaris issues</li>
+ <li><a href="mailto:%20loganaden@gmail.com">Loganaden Velvindron &lt;loganaden@gmail.com&gt;</a> Sandboxing (libseccomp) support</li>
+ <li><a href="mailto:%20vixie@vix.com">Paul A Vixie &lt;vixie@vix.com&gt;</a> TrueTime GPS driver, generic TrueTime clock driver</li>
+ <li><a href="mailto:%20Ulrich.Windl@rz.uni-regensburg.de">Ulrich Windl &lt;Ulrich.Windl@rz.uni-regensburg.de&gt;</a> corrected and validated HTML documents according to the HTML DTD</li>
+</ol>
+<hr>
+</body>
+</html>
diff --git a/html/debug.html b/html/debug.html
new file mode 100644
index 0000000..1a4981a
--- /dev/null
+++ b/html/debug.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>NTP Debugging Techniques</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>NTP Debugging Techniques</h3>
+<img src="pic/pogo.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>We make house calls and bring our own bugs.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->16-Jul-2014 08:38<!-- #EndDate -->
+ UTC</p>
+ <br clear="left">
+ <h4>More Help</h4>
+<script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+<hr>
+<h4>Initial Startup</h4>
+<p>This page discusses <tt>ntpd</tt> program monitoring and debugging techniques using the <a href="ntpq.html"><tt>ntpq</tt> - standard NTP query program</a>, either on the local server or from a remote machine. In special circumstances the <a href="ntpdc.html"><tt>ntpdc</tt> - special NTP query program</a>, can be useful, but its use is not covered here. The <tt>ntpq</tt> program implements the management functions specified in the NTP specification <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1305/rfc1305c.ps">RFC-1305, Appendix A</a>. It is used to read and write the variables defined in the NTP Version 4 specification now navigating the standards process. In addition, the program can be used to send remote configuration commands to the server.</p>
+<p>The <tt>ntpd</tt> daemon can operate in two modes, depending on the presence of the <tt>-d</tt> command-line option. Without the option the daemon detaches from the controlling terminal and proceeds autonomously. With one or more <tt>-d</tt> options the daemon does not detach and generates special trace output useful for debugging. In general, interpretation of this output requires reference to the sources. However, a single <tt>-d</tt> does produce only mildly cryptic output and can be very useful in finding problems with configuration and network troubles.</p>
+<p>Some problems are immediately apparent when the daemon first starts running. The most common of these are the lack of a UDP port for NTP (123) in the Unix <tt>/etc/services</tt> file (or equivalent in some systems). <b>Note that NTP does not use TCP in any form. Also note that NTP requires port 123 for both source and destination ports.</b> These facts should be pointed out to firewall administrators.</p>
+<p>Other problems are apparent in the system log, which ordinarily shows the startup banner, some cryptic initialization data and the computed precision value. Event messages at startup and during regular operation are sent to the optional <tt>protostats</tt> monitor file, as described on the <a href="decode.html">Event Messages and Status Words</a> page. These and other error messages are sent to the system log, as described on the <a href="msyslog.html"><tt>ntpd</tt> System Log Messages</a> page. In real emergencies the daemon will sent a terminal error message to the system log and then cease operation.</p>
+<p>The next most common problem is incorrect DNS names. Check that each DNS name used in the configuration file exists and that the address responds to the Unix <tt>ping</tt> command. The Unix <tt>traceroute</tt> or Windows <tt>tracert</tt> utility can be used to verify a partial or complete path exists. Most problems reported to the NTP newsgroup are not NTP problems, but problems with the network or firewall configuration.</p>
+<h4>Verifying Correct Operation</h4>
+<p>Unless using the <tt>iburst</tt> option, the client normally takes a few
+ minutes to synchronize to a server. If the client time at startup happens
+ to be more than 1000 s distant from NTP time, the daemon exits with a message
+ to the system log directing the operator to manually set the time within 1000
+ s and restart. If the time is less than 1000 s but more than 128 s distant,
+ a step correction occurs and the daemon restarts automatically.</p>
+<p>When started for the first time and a frequency file is not present, the
+ daemon enters a special mode in order to calibrate the frequency. This takes
+ 900 s during which the time is not disciplined. When calibration is complete,
+ the daemon creates the frequency file and enters normal mode to amortize whatever
+ residual offset remains.</p>
+<p>The <tt>ntpq</tt> commands <tt>pe</tt>, <tt>as</tt> and <tt>rv</tt> are
+ normally sufficient to verify correct operation and assess nominal performance.
+ The <a href="ntpq.html#pe"><tt>pe</tt></a> command displays a list showing
+ the DNS name or IP address for each association along with selected status
+ and statistics variables. The first character in each line is the tally code,
+ which shows which associations are candidates to set the system clock and
+ of these which one is the system peer. The encoding is shown in the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a>.</p>
+<p>The <a href="ntpq.html#as"><tt>as</tt></a> command displays a list of associations and association identifiers. Note the <tt>condition</tt> column, which reflects the tally code. The <a href="ntpq.html#pe"><tt>rv</tt></a> command displays the <a href="ntpq.html#system">system variables</a> billboard, including the <a href="decode.html#sys">system status word</a>. The <a href="ntpq.html#rv"><tt>rv <i>assocID</i></tt></a> command, where <tt><i>assocID</i></tt> is the association ID, displays the <a href="ntpq.html#peer">peer variables</a> billboard, including the <a href="decode.html#peer">peer status word</a>. Note that, except for explicit calendar dates, times are in milliseconds and frequencies are in parts-per-million (PPM).</p>
+<p>A detailed explanation of the system, peer and clock variables in the billboards is beyond the scope of this page; however, a comprehensive explanation for each one is in the NTPv4 protocol specification. The following observations will be useful in debugging and monitoring.</p>
+<ol>
+ <li>The server has successfully synchronized to its sources if the <tt>leap</tt> peer
+ variable has value other than 3 (11b) The client has successfully synchronized
+ to the server when the <tt>leap</tt> system variable has value other than
+ 3.</li>
+ <li>The <tt>reach</tt> peer variable is an 8-bit shift register displayed in octal format. When a valid packet is received, the rightmost bit is lit. When a packet is sent, the register is shifted left one bit with 0 replacing the rightmost bit. If the <tt>reach</tt> value is nonzero, the server is reachable; otherwise, it is unreachable. Note that, even if all servers become unreachable, the system continues to show valid time to dependent applications.</li>
+ <li>A useful indicator of miscellaneous problems is the <tt>flash</tt> peer variable, which shows the result of 13 sanity tests. It contains the <a href="decode.html#flash">flash status word</a> bits, commonly called flashers, which displays the current errors for the association. These bits should all be zero for a valid server.</li>
+ <li>The three peer variables <tt>filtdelay</tt>, <tt>filtoffset</tt> and <tt>filtdisp</tt> show the delay, offset and jitter statistics for each of the last eight measurement rounds. These statistics and their trends are valuable performance indicators for the server, client and the network. For instance, large fluctuations in delay and jitter suggest network congestion. Missing clock filter stages suggest packet losses in the network.</li>
+ <li>The synchronization distance, defined as one-half the delay plus the dispersion, represents the maximum error statistic. The jitter represents the expected error statistic. The maximum error and expected error calculated from the peer variables represents the quality metric for the server. The maximum error and expected error calculated from the system variables represents the quality metric for the client. If the root synchronization distance for any server exceeds 1.5 s, called the select threshold, the server is considered invalid.</li>
+</ol>
+<h4>Large Frequency Errors</h4>
+<p>The frequency tolerance of computer clock oscillators varies widely, sometimes above 500 PPM. While the daemon can handle frequency errors up to 500 PPM, or 43 seconds per day, values much above 100 PPM reduce the headroom, especially at the lowest poll intervals. To determine the particular oscillator frequency, start <tt>ntpd</tt> using the <tt>noselect</tt> option with the <tt>server</tt> configuration command.</p>
+<p>Record the time of day and offset displayed by the <tt>ntpq</tt> <a href="ntpq.html#pe"><tt>pe</tt></a> command. Wait for an hour or so and record the time of day and offset. Calculate the frequency as the offset difference divided by the time difference. If the frequency is much above 100 PPM, the <a href="tickadj.html">tickadj</a> program might be useful to adjust the kernel clock frequency below that value. For systems that do not support this program, this might be one using a command in the system startup file.</p>
+<h4>Access Controls</h4>
+<p>Provisions are included in <tt>ntpd</tt> for access controls which deflect unwanted traffic from selected hosts or networks. The controls described on the <a href="accopt.html">Access Control Options</a> include detailed packet filter operations based on source address and address mask. Normally, filtered packets are dropped without notice other than to increment tally counters. However, the server can be configured to send a &quot;kiss-o'-death&quot; (KoD) packet to the client either when explicitly configured or when cryptographic authentication fails for some reason. The client association is permanently disabled, the access denied bit (TEST4) is set in the flash variable and a message is sent to the system log.</p>
+<p>The access control provisions include a limit on the packet rate from a
+ host or network. If an incoming packet exceeds the limit, it is dropped and
+ a KoD sent to the source. If this occurs after the client association has
+ synchronized, the association is not disabled, but a message is sent to the
+ system log. See the <a href="accopt.html">Access Control Options</a> page
+ for further information.</p>
+<h4>Large Delay Variations</h4>
+<p>In some reported scenarios an access line may show low to moderate network delays during some period of the day and moderate to high delays during other periods. Often the delay on one direction of transmission dominates, which can result in large time offset errors, sometimes in the range up to a few seconds. It is not usually convenient to run <tt>ntpd</tt> throughout the day in such scenarios, since this could result in several time steps, especially if the condition persists for greater than the stepout threshold.</p>
+<p>Specific provisions have been built into <tt>ntpd</tt> to cope with these problems. The scheme is called &quot;huff-'n-puff and is described on the <a href="miscopt.html">Miscellaneous Options</a> page. An alternative approach in such scenarios is first to calibrate the local clock frequency error by running <tt>ntpd</tt> in continuous mode during the quiet interval and let it write the frequency to the <tt>ntp.drift</tt> file. Then, run <tt>ntpd -q</tt> from a cron job each day at some time in the quiet interval. In systems with the nanokernel or microkernel performance enhancements, including Solaris, Tru64, Linux and FreeBSD, the kernel continuously disciplines the frequency so that the residual correction produced by <tt>ntpd</tt> is usually less than a few milliseconds.</p>
+<h4>Cryptographic Authentication</h4>
+<p>Reliable source authentication requires the use of symmetric key or public key cryptography, as described on the <a href="authopt.html">Authentication Options</a> page. In symmetric key cryptography servers and clients share session keys contained in a secret key file In public key cryptography, which requires the OpenSSL software library, the server has a private key, never shared, and a public key with unrestricted distribution. The cryptographic media required are produced by the <a href="keygen.html"><tt>ntp-keygen</tt></a> program.</p>
+<p>Problems with symmetric key authentication are usually due to mismatched keys or improper use of the <tt>trustedkey</tt> command. A simple way to check for problems is to use the trace facility, which is enabled using the <tt>ntpd -d</tt> command line. As each packet is received a trace line is displayed which shows the authentication status in the <tt>auth</tt> field. A status of 1 indicates the packet was successful authenticated; otherwise it has failed.</p>
+<p>A common misconception is the implication of the <tt>auth</tt> bit in the <tt>enable</tt> and <tt>disable</tt> commands. <b>This bit does not affect authentication in any way other than to enable or disable mobilization of a new persistent association in broadcast/multicast client, manycast client or symmetric passive modes.</b> If enabled, which is the default, these associations require authentication; if not, an association is mobilized even if not authenticated. Users are cautioned that running with authentication disabled is very dangerous, since an intruder can easily strike up an association and inject false time values.</p>
+<p>Public key cryptography is supported in NTPv4 using the Autokey protocol, which is described in briefings on the NTP Project page linked from www.ntp.org. Development of this protocol is mature and the <tt>ntpd</tt> implementation is basically complete. Autokey version 2, which is the latest and current version, includes provisions to hike certificate trails, operate as certificate authorities and verify identity using challenge/response identification schemes. Further details of the protocol are on the <a href="authopt.html">Authentication Options</a> page. Common problems with configuration and key generation are mismatched key files, broken links and missing or broken random seed file.</p>
+<p>As in the symmetric key cryptography case, the trace facility is a good way to verify correct operation. A statistics file <tt>cryptostats</tt> records protocol transactions and error messages. The daemon requires a random seed file, public/private key file and a valid certificate file; otherwise it exits immediately with a message to the system log. As each file is loaded a trace message appears with its filestamp. There are a number of checks to insure that only consistent data are used and that the certificate is valid. When the protocol is in operation a number of checks are done to verify the server has the expected credentials and its filestamps and timestamps are consistent. Errors found are reported using NTP control and monitoring protocol traps with extended trap codes shown in the Authentication Options page.</p>
+<p>To assist debugging every NTP extension field is displayed in the trace along with the Autokey operation code. Every extension field carrying a verified signature is identified and displayed along with filestamp and timestamp where meaningful. In all except broadcast/multicast client mode, correct operation of the protocol is confirmed by the absence of extension fields and an <tt>auth</tt> value of one. It is normal in broadcast/multicast client mode that the broadcast server use one extension field to show the host name, status word and association ID.</p>
+<h4>Debugging Checklist</h4>
+<p>If the <tt>ntpq</tt> or <tt>ntpdc</tt> programs do not show that messages are being received by the daemon or that received messages do not result in correct synchronization, verify the following:</p>
+<ol>
+ <li>Verify the <tt>/etc/services</tt> file host machine is configured to accept UDP packets on the NTP port 123. NTP is specifically designed to use UDP and does not respond to TCP.</li>
+ <li>Check the system log for <tt>ntpd</tt> messages about configuration errors, name-lookup failures or initialization problems. Common system log messages are summarized on the <a href="msyslog.html"><tt>ntpd</tt> System Log Messages</a> page. Check to be sure that only one copy of <tt>ntpd</tt> is running.</li>
+ <li>Verify using <tt>ping</tt> or other utility that packets actually do make the round trip between the client and server. Verify using <tt>nslookup</tt> or other utility that the DNS server names do exist and resolve to valid Internet addresses.</li>
+ <li>Check that the remote NTP server is up and running. The usual evidence that it is not is a <tt>Connection refused</tt> message.</li>
+ <li>Using the <tt>ntpdc</tt> program, verify that the packets received and packets sent counters are incrementing. If the sent counter does not increment and the configuration file includes configured servers, something may be wrong in the host network or interface configuration. If this counter does increment, but the received counter does not increment, something may be wrong in the network or the server NTP daemon may not be running or the server itself may be down or not responding.</li>
+ <li>If both the sent and received counters do increment, but the <tt>reach</tt> values in the <tt>pe</tt> billboard with <tt>ntpq</tt> continues to show zero, received packets are probably being discarded for some reason. If this is the case, the cause should be evident from the <tt>flash</tt> variable as discussed above and on the <tt>ntpq</tt> page. It could be that the server has disabled access for the client address, in which case the <tt>refid</tt> field in the <tt>ntpq pe</tt> billboard will show a kiss code. See earlier on this page for a list of kiss codes and their meaning.</li>
+ <li>If the <tt>reach</tt> values in the <tt>pe</tt> billboard show the servers are alive and responding, note the tattletale symbols at the left margin, which indicate the status of each server resulting from the various grooming and mitigation algorithms. The interpretation of these symbols is discussed on the <tt>ntpq</tt> page. After a few minutes of operation, one or another of the reachable server candidates should show a * tattletale symbol. If this doesn't happen, the intersection algorithm, which classifies the servers as truechimers or falsetickers, may be unable to find a majority of truechimers among the server population.</li>
+ <li>If all else fails, see the FAQ and/or the discussion and briefings at the NTP Project page.</li>
+</ol>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/decode.html b/html/decode.html
new file mode 100644
index 0000000..51603ad
--- /dev/null
+++ b/html/decode.html
@@ -0,0 +1,692 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Event Messages and Status Words</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Event Messages and Status Words</h3>
+<img src="pic/alice47.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>Caterpillar knows all the error codes, which is more than most of us do.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->16-Jul-2014 04:48<!-- #EndDate -->
+ UTC</p>
+</p>
+<br clear="left">
+<h4>Related Links</h4>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+</p>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#sys">System Status Word</a></li>
+ <li class="inline"><a href="#peer">Peer Status Word</a></li>
+ <li class="inline"><a href="#clock">Clock Status Word</a></li>
+ <li class="inline"><a href="#flash">Flash Status Word</a></li>
+ <li class="inline"><a href="#kiss">Kiss Codes</a></li>
+ <li class="inline"><a href="#crypto">Crypto Messages</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>This page lists the status words, event messages and error codes used for <tt>ntpd</tt> reporting and monitoring. Status words are used to display the current status of the running program. There is one system status word and a peer status word for each association. There is a clock status word for each association that supports a reference clock. There is a flash code for each association which shows errors found in the last packet received (pkt) and during protocol processing (peer). These are commonly viewed using the <tt>ntpq</tt> program.</p>
+<p>Significant changes in program state are reported as events. There is one
+ set of system events and a set of peer events for each association. In addition,
+ there is a set of clock events for each association that supports a reference
+ clock. Events are normally reported to the <tt>protostats</tt> monitoring file
+ and optionally to the system log. In addition, if the trap facility is configured,
+ events can be reported to a remote program that can page an administrator.</p>
+<p>This page also includes a description of the error messages produced by the Autokey protocol. These messages are normally sent to the <tt>cryptostats</tt> monitoring file.</p>
+<p>In the following tables the Event Field is the status or event code assigned and the Message Field a short string used for display and event reporting. The Description field contains a longer explanation of the status or event. Some messages include additional information useful for error diagnosis and performance assessment.</p>
+<h4 id="sys">System Status Word</h4>
+<p>The system status word consists of four fields LI (0-1), Source (2-7), Count (8-11) and Event (12-15). It is reported in the first line of the <tt>rv</tt> display produced by the <tt>ntpq</tt> program.</p>
+<table width="50%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td><div align="center">Leap</div></td>
+ <td><div align="center">Source</div></td>
+ <td><div align="center">Count</div></td>
+ <td><div align="center">Event</div></td>
+ </tr>
+</table>
+<p>The Leap Field displays the system leap indicator bits coded as follows:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td><tt>leap_none</tt></td>
+ <td>normal synchronized state</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td><tt>leap_add_sec</tt></td>
+ <td>insert second after 23:59:59 of the current day</td>
+ </tr>
+ <tr>
+ <td><tt>2</tt></td>
+ <td><tt>leap_del_sec</tt></td>
+ <td>delete second 23:59:59 of the current day</td>
+ </tr>
+ <tr>
+ <td><tt>3</tt></td>
+ <td><tt>leap_alarm</tt></td>
+ <td>never synchronized</td>
+ </tr>
+</table>
+<p>The Source Field displays the current synchronization source coded as follows:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td><tt>sync_unspec</tt></td>
+ <td>not yet synchronized</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td><tt>sync_pps</tt></td>
+ <td>pulse-per-second signal (Cs, Ru, GPS, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>2</tt></td>
+ <td><tt>sync_lf_radio</tt></td>
+ <td>VLF/LF radio (WWVB, DCF77, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>3</tt></td>
+ <td><tt>sync_hf_radio</tt></td>
+ <td>MF/HF radio (WWV, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td><tt>sync_uhf_radio</tt></td>
+ <td>VHF/UHF radio/satellite (GPS, Galileo, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>5</tt></td>
+ <td><tt>sync_local</tt></td>
+ <td>local timecode (IRIG, LOCAL driver, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>6</tt></td>
+ <td><tt>sync_ntp</tt></td>
+ <td>NTP</td>
+ </tr>
+ <tr>
+ <td><tt>7</tt></td>
+ <td><tt>sync_other</tt></td>
+ <td>other (IEEE 1588, openntp, crony, etc.)</td>
+ </tr>
+ <tr>
+ <td><tt>8</tt></td>
+ <td><tt>sync_wristwatch</tt></td>
+ <td>eyeball and wristwatch</td>
+ </tr>
+ <tr>
+ <td><tt>9</tt></td>
+ <td><tt>sync_telephone</tt></td>
+ <td>telephone modem (ACTS, PTB, etc.)</td>
+ </tr>
+</table>
+<p>The Count Field displays the number of events since the last time the code changed. Upon reaching 15, subsequent events with the same code are ignored.</p>
+<p>The Event Field displays the most recent event message coded as follows:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>00</tt></td>
+ <td><tt>unspecified</tt></td>
+ <td>unspecified</td>
+ </tr>
+ <tr>
+ <td><tt>01</tt></td>
+ <td><tt>freq_not_set</tt></td>
+ <td>frequency file not available</td>
+ </tr>
+ <tr>
+ <td><tt>02</tt></td>
+ <td><tt>freq_set</tt></td>
+ <td>frequency set from frequency file</td>
+ </tr>
+ <tr>
+ <td><tt>03</tt></td>
+ <td><tt>spike_detect</tt></td>
+ <td>spike detected</td>
+ </tr>
+ <tr>
+ <td><tt>04</tt></td>
+ <td><tt>freq_mode</tt></td>
+ <td>initial frequency training mode</td>
+ </tr>
+ <tr>
+ <td><tt>05</tt></td>
+ <td><tt>clock_sync</tt></td>
+ <td>clock synchronized</td>
+ </tr>
+ <tr>
+ <td><tt>06</tt></td>
+ <td><tt>restart</tt></td>
+ <td>program restart</td>
+ </tr>
+ <tr>
+ <td><tt>07</tt></td>
+ <td><tt>panic_stop</tt></td>
+ <td>clock error more than 600 s</td>
+ </tr>
+ <tr>
+ <td><tt>08</tt></td>
+ <td><tt>no_system_peer</tt></td>
+ <td>no system peer</td>
+ </tr>
+ <tr>
+ <td><tt>09</tt></td>
+ <td><tt>leap_armed</tt></td>
+ <td>leap second armed from file or Autokey</td>
+ </tr>
+ <tr>
+ <td><tt>0a</tt></td>
+ <td><tt>leap_disarmed</tt></td>
+ <td>leap second disarmed</td>
+ </tr>
+ <tr>
+ <td><tt>0b</tt></td>
+ <td><tt>leap_event</tt></td>
+ <td>leap event</td>
+ </tr>
+ <tr>
+ <td><tt>0c</tt></td>
+ <td><tt>clock_step</tt></td>
+ <td>clock stepped</td>
+ </tr>
+ <tr>
+ <td><tt>0d</tt></td>
+ <td><tt>kern</tt></td>
+ <td>kernel information message</td>
+ </tr>
+ <tr>
+ <td><tt>0e</tt></td>
+ <td><tt>TAI...</tt></td>
+ <td>leapsecond values update from file</td>
+ </tr>
+ <tr>
+ <td><tt>0f</tt></td>
+ <td><tt>stale leapsecond values</tt></td>
+ <td>new NIST leapseconds file needed</td>
+ </tr>
+</table>
+<h4 id="peer">Peer Status Word</h4>
+<p>The peer status word consists of four fields: Status (0-4), Select (5-7), Count (8-11) and Code (12-15). It is reported in the first line of the <tt>rv <i>associd</i></tt> display produced by the <tt>ntpq</tt> program.</p>
+<table width="50%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td><div align="center">Status</div></td>
+ <td><div align="center">Select</div></td>
+ <td><div align="center">Count</div></td>
+ <td><div align="center">Code</div></td>
+ </tr>
+</table>
+<p>The Status Field displays the peer status code bits in hexadecimal; each bit is an independent flag. (Note this field is 5 bits wide, and combines with the the 3-bit-wide Select Field to create the first full byte of the peer status word.) The meaning of each bit in the Status Field is listed in the following table:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>08</tt></td>
+ <td><tt>bcst</tt></td>
+ <td>broadcast association</td>
+ </tr>
+ <tr>
+ <td><tt>10</tt></td>
+ <td><tt>reach</tt></td>
+ <td>host reachable</td>
+ </tr>
+ <tr>
+ <td><tt>20</tt></td>
+ <td><tt>auth</tt></td>
+ <td>authentication ok</td>
+ </tr>
+ <tr>
+ <td><tt>40</tt></td>
+ <td><tt>authenb</tt></td>
+ <td>authentication enabled</td>
+ </tr>
+ <tr>
+ <td><tt>80</tt></td>
+ <td><tt>config</tt></td>
+ <td>persistent association</td>
+ </tr>
+</table>
+<p>The Select Field displays the current selection status. (The T Field in the following table gives the corresponding tally codes used in the <tt>ntpq peers</tt> display.) The values are coded as follows:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>T</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td><tt>sel_reject</tt></td>
+ <td>&nbsp;</td>
+ <td>discarded as not valid (TEST10-TEST13)</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td><tt>sel_falsetick</tt></td>
+ <td><tt>x</tt></td>
+ <td>discarded by intersection algorithm</td>
+ </tr>
+ <tr>
+ <td><tt>2</tt></td>
+ <td><tt>sel_excess</tt></td>
+ <td><tt>.</tt></td>
+ <td>discarded by table overflow (not used)</td>
+ </tr>
+ <tr>
+ <td><tt>3</tt></td>
+ <td><tt>sel_outlyer</tt></td>
+ <td><tt>-</tt></td>
+ <td>discarded by the cluster algorithm</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td><tt>sel_candidate</tt></td>
+ <td><tt>+</tt></td>
+ <td>included by the combine algorithm</td>
+ </tr>
+ <tr>
+ <td><tt>5</tt></td>
+ <td><tt>sel_backup</tt></td>
+ <td><tt>#</tt></td>
+ <td>backup (more than <tt>tos maxclock</tt> sources)</td>
+ </tr>
+ <tr>
+ <td><tt>6</tt></td>
+ <td><tt>sel_sys.peer</tt></td>
+ <td><tt>*</tt></td>
+ <td>system peer</td>
+ </tr>
+ <tr>
+ <td><tt>7</tt></td>
+ <td><tt>sel_pps.peer</tt></td>
+ <td><tt>o</tt></td>
+ <td>PPS peer (when the prefer peer is valid)</td>
+ </tr>
+</table>
+<p>The Count Field displays the number of events since the last time the code changed. Upon reaching 15, subsequent events with the same code are ignored. </p>
+<p>The Event Field displays the most recent event message coded as follows:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>01</tt></td>
+ <td><tt>mobilize</tt></td>
+ <td>association mobilized</td>
+ </tr>
+ <tr>
+ <td><tt>02</tt></td>
+ <td><tt>demobilize</tt></td>
+ <td>association demobilized</td>
+ </tr>
+ <tr>
+ <td><tt>03</tt></td>
+ <td><tt>unreachable</tt></td>
+ <td>server unreachable</td>
+ </tr>
+ <tr>
+ <td><tt>04</tt></td>
+ <td><tt>reachable</tt></td>
+ <td>server reachable</td>
+ </tr>
+ <tr>
+ <td><tt>05</tt></td>
+ <td><tt>restart</tt></td>
+ <td>association restart</td>
+ </tr>
+ <tr>
+ <td><tt>06</tt></td>
+ <td><tt>no_reply</tt></td>
+ <td>no server found (<tt>ntpdate</tt> mode)</td>
+ </tr>
+ <tr>
+ <td><tt>07</tt></td>
+ <td><tt>rate_exceeded</tt></td>
+ <td>rate exceeded (kiss code <tt>RATE</tt>)</td>
+ </tr>
+ <tr>
+ <td><tt>08</tt></td>
+ <td><tt>access_denied</tt></td>
+ <td>access denied (kiss code <tt>DENY</tt>)</td>
+ </tr>
+ <tr>
+ <td><tt>09</tt></td>
+ <td><tt>leap_armed</tt></td>
+ <td>leap armed from server LI code</td>
+ </tr>
+ <tr>
+ <td><tt>0a</tt></td>
+ <td><tt>sys_peer</tt></td>
+ <td>become system peer</td>
+ </tr>
+ <tr>
+ <td><tt>0b</tt></td>
+ <td><tt>clock_event</tt></td>
+ <td>see clock status word</td>
+ </tr>
+ <tr>
+ <td><tt>0c</tt></td>
+ <td><tt>bad_auth</tt></td>
+ <td>authentication failure</td>
+ </tr>
+ <tr>
+ <td><tt>0d</tt></td>
+ <td><tt>popcorn</tt></td>
+ <td>popcorn spike suppressor</td>
+ </tr>
+ <tr>
+ <td><tt>0e</tt></td>
+ <td><tt>interleave_mode</tt></td>
+ <td>entering interleave mode</td>
+ </tr>
+ <tr>
+ <td><tt>0f</tt></td>
+ <td><tt>interleave_error</tt></td>
+ <td>interleave error (recovered)</td>
+ </tr>
+</table>
+<h4 id="clock">Clock Status Word</h4>
+<p>The clock status word consists of four fields: Unused (0-7), Count (8-11) and Code (12-15). It is reported in the first line of the <tt>clockvar <i>associd</i></tt> display produced by the <tt>ntpq</tt> program.</p>
+<table width="50%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td><div align="center">Unused</div></td>
+ <td><div align="center">Count</div></td>
+ <td><div align="center">Code</div></td>
+ </tr>
+</table>
+<p>The Count Field displays the number of events since the last <tt>lockvar</tt> command, while the Event Field displays the most recent event message coded as follows:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>00</tt></td>
+ <td><tt>clk_unspe</tt></td>
+ <td>nominal</td>
+ </tr>
+ <tr>
+ <td><tt>01</tt></td>
+ <td><tt>clk_noreply</tt></td>
+ <td>no reply to poll</td>
+ </tr>
+ <tr>
+ <td><tt>02</tt></td>
+ <td><tt>clk_badformat</tt></td>
+ <td>bad timecode format</td>
+ </tr>
+ <tr>
+ <td><tt>03</tt></td>
+ <td><tt>clk_fault</tt></td>
+ <td>hardware or software fault</td>
+ </tr>
+ <tr>
+ <td><tt>04</tt></td>
+ <td><tt>clk_bad_signal</tt></td>
+ <td>signal loss</td>
+ </tr>
+ <tr>
+ <td><tt>05</tt></td>
+ <td><tt>clk_bad_date</tt></td>
+ <td>bad date format</td>
+ </tr>
+ <tr>
+ <td><tt>06</tt></td>
+ <td><tt>clk_bad_time</tt></td>
+ <td>bad time format</td>
+ </tr>
+</table>
+<p>When the clock driver sets the code to a new value, a <tt>clock_alarm</tt> (11) peer event is reported.</p>
+<h4 id="flash">Flash Status Word</h4>
+<p>The flash status word is displayed by the <tt>ntpq</tt> program <tt>rv</tt> command. It consists of a number of bits coded in hexadecimal as follows:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td width="10%">Code</td>
+ <td width="15%">Tag</td>
+ <td width="20%">Message</td>
+ <td width="55%">Description</td>
+ </tr>
+ <tr>
+ <td><tt>0001</tt></td>
+ <td>TEST1</td>
+ <td><tt>pkt_dup</tt></td>
+ <td>duplicate packet</td>
+ </tr>
+ <tr>
+ <td><tt>0002</tt></td>
+ <td>TEST2</td>
+ <td><tt>pkt_bogus</tt></td>
+ <td>bogus packet</td>
+ </tr>
+ <tr>
+ <td><tt>0004</tt></td>
+ <td>TEST3</td>
+ <td><tt>pkt_unsync</tt></td>
+ <td>server not synchronized</td>
+ </tr>
+ <tr>
+ <td><tt>0008</tt></td>
+ <td>TEST4</td>
+ <td><tt>pkt_denied</tt></td>
+ <td>access denied</td>
+ </tr>
+ <tr>
+ <td><tt>0010</tt></td>
+ <td>TEST5</td>
+ <td><tt>pkt_auth</tt></td>
+ <td> authentication failure</td>
+ </tr>
+ <tr>
+ <td><tt>0020</tt></td>
+ <td>TEST6</td>
+ <td><tt>pkt_stratum</tt></td>
+ <td>invalid leap or stratum</td>
+ </tr>
+ <tr>
+ <td><tt>0040</tt></td>
+ <td>TEST7</td>
+ <td><tt>pkt_header</tt></td>
+ <td> header distance exceeded</td>
+ </tr>
+ <tr>
+ <td><tt>0080</tt></td>
+ <td>TEST8</td>
+ <td><tt>pkt_autokey</tt></td>
+ <td>Autokey sequence error</td>
+ </tr>
+ <tr>
+ <td><tt>0100</tt></td>
+ <td>TEST9</td>
+ <td><tt>pkt_crypto</tt></td>
+ <td>Autokey protocol error</td>
+ </tr>
+ <tr>
+ <td><tt>0200</tt></td>
+ <td>TEST10</td>
+ <td><tt>peer_stratum</tt></td>
+ <td> invalid header or stratum</td>
+ </tr>
+ <tr>
+ <td><tt>0400</tt></td>
+ <td>TEST11</td>
+ <td><tt>peer_dist</tt></td>
+ <td> distance threshold exceeded</td>
+ </tr>
+ <tr>
+ <td><tt>0800</tt></td>
+ <td>TEST12</td>
+ <td><tt>peer_loop</tt></td>
+ <td> synchronization loop</td>
+ </tr>
+ <tr>
+ <td><tt>1000</tt></td>
+ <td>TEST13</td>
+ <td><tt>peer_unreach</tt></td>
+ <td> unreachable or nonselect</td>
+ </tr>
+</table>
+<h4 id="kiss">Kiss Codes</h4>
+<p>Kiss codes are used in kiss-o'-death (KoD) packets, billboard displays and log messages. They consist of a string of four zero-padded ASCII charactes. In practice they are informal and tend to change with time and implementation. Some of these codes can appear in the reference identifier field in <tt>ntpq</tt> billboards. Following is the current list:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Code</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>ACST</tt></td>
+ <td>manycast server</td>
+ </tr>
+ <tr>
+ <td><tt>AUTH</tt></td>
+ <td>authentication error</td>
+ </tr>
+ <tr>
+ <td><tt>AUTO</tt></td>
+ <td>Autokey sequence error</td>
+ </tr>
+ <tr>
+ <td><tt>BCST</tt></td>
+ <td>broadcast server</td>
+ </tr>
+ <tr>
+ <td><tt>CRYPT</tt></td>
+ <td>Autokey protocol error</td>
+ </tr>
+ <tr>
+ <td><tt>DENY</tt></td>
+ <td>access denied by server</td>
+ </tr>
+ <tr>
+ <td><tt>INIT</tt></td>
+ <td>association initialized</td>
+ </tr>
+ <tr>
+ <td><tt>MCST</tt></td>
+ <td>multicast server</td>
+ </tr>
+ <tr>
+ <td><tt>RATE</tt></td>
+ <td>rate exceeded</td>
+ </tr>
+ <tr>
+ <td><tt>TIME</tt></td>
+ <td>association timeout</td>
+ </tr>
+ <tr>
+ <td><tt>STEP</tt></td>
+ <td>step time change</td>
+ </tr>
+</table>
+<h4 id="crypto">Crypto Messages</h4>
+<p>These messages are sent to the <tt>cryptostats</tt> file when an error is detected in the Autokey protocol.</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Code</td>
+ <td>Message</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>01</tt></td>
+ <td><tt>bad_format</tt></td>
+ <td>bad extension field format or length</td>
+ </tr>
+ <tr>
+ <td><tt>02</tt></td>
+ <td><tt>bad_timestamp</tt></td>
+ <td>bad timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>03</tt></td>
+ <td><tt>bad_filestamp</tt></td>
+ <td>bad filestamp</td>
+ </tr>
+ <tr>
+ <td><tt>04</tt></td>
+ <td><tt>bad_public_key</tt></td>
+ <td>bad or missing public key</td>
+ </tr>
+ <tr>
+ <td><tt>05</tt></td>
+ <td><tt>bad_digest</tt></td>
+ <td>unsupported digest type</td>
+ </tr>
+ <tr>
+ <td><tt>06</tt></td>
+ <td><tt>bad_identity</tt></td>
+ <td>unsupported identity type</td>
+ </tr>
+ <tr>
+ <td><tt>07</tt></td>
+ <td><tt>bad_siglength</tt></td>
+ <td>bad signature length</td>
+ </tr>
+ <tr>
+ <td><tt>08</tt></td>
+ <td><tt>bad signature</tt></td>
+ <td>extension field signature not verified</td>
+ </tr>
+ <tr>
+ <td><tt>09</tt></td>
+ <td><tt>cert_not_verified</tt></td>
+ <td>certificate signature not verified</td>
+ </tr>
+ <tr>
+ <td><tt>0a</tt></td>
+ <td><tt>cert_expired</tt></td>
+ <td>host certificate expired</td>
+ </tr>
+ <tr>
+ <td><tt>0b</tt></td>
+ <td><tt>bad_cookie</tt></td>
+ <td>bad or missing cookie</td>
+ </tr>
+ <tr>
+ <td><tt>0c</tt></td>
+ <td><tt>bad_leapseconds</tt></td>
+ <td>bad or missing leapseconds values</td>
+ </tr>
+ <tr>
+ <td><tt>0d</tt></td>
+ <td><tt>cert_missing</tt></td>
+ <td>bad or missing certificate</td>
+ </tr>
+ <tr>
+ <td><tt>0e</tt></td>
+ <td><tt>bad_group_key</tt></td>
+ <td>bad or missing group key</td>
+ </tr>
+ <tr>
+ <td><tt>0f</tt></td>
+ <td><tt>proto_error</tt></td>
+ <td>protocol error</td>
+ </tr>
+</table>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/discipline.html b/html/discipline.html
new file mode 100644
index 0000000..53b60cc
--- /dev/null
+++ b/html/discipline.html
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Clock Discipline Algorithm</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Clock Discipline Algorithm</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:03<!-- #EndDate -->
+ UTC</p>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">General Overview</a></li>
+ <li class="inline"><a href="#pll">Phase-Lock Loop Operations</a></li>
+ <li class="inline"><a href="#loop">Loop Dynamics</a></li>
+ <li class="inline"><a href="#house">Clock Initialization and Management</a></li>
+</ul>
+<hr>
+<h4 id="intro">General Overview</h4>
+<p>At the heart of the NTP specification and reference implementation is the clock discipline algorithm, which is best described as an adaptive parameter, hybrid phase/frequency-lock feedback loop. It is an intricately crafted algorithm that automatically adapts for optimum performance while minimizing network overhead. Operation is in two modes, phase-lock loop (PLL), which is used at poll intervals below the Allan intercept, by default 2048 s, and frequency-lock loop (FLL), which is used above that.</p>
+<div align="center"> <img src="pic/discipline.gif" alt="gif">
+ <p>Figure 1. Clock Discipline Algorithm</p>
+</div>
+<h4 id="pll">Clock Discipline Operations</h4>
+<p>A block diagram of the clock discipline is shown in Figure 1. The timestamp of a reference clock or remote server is compared with the timestamp of the system clock, represented as a variable frequency oscillator (VFO), to produce a raw offset sample <em>V<sub>d</sub></em>. Offset samples are processed by the clock filter to produce a filtered update <em>V<sub>s</sub></em>. The loop filter implements a type-2 proportional-integrator controller (PIC). The PIC can minimize errors in both time and frequency using predictors <em>x</em> and <em>y</em>, respectively. The clock adjust process samples these predictors once each second for the daemon discipline or once each tick interrupt for the kernel discipline to produce the system clock update <em>V<sub>c</sub></em>.</p>
+<p>In PLL mode the frequency predictor is an integral of the offset over past updates, while the phase predictor is the offset amortized over time in order to avoid setting the clock backward. In FLL mode the phase predictor is not used, while the frequency predictor is similar to the NIST <em>lockclock</em> algorithm. In this algorithm, the frequency predictor is computed as a fraction of the current offset divided by the time since the last update in order to minimize the offset at the next update.</p>
+<p>The discipline response in PLL mode is determined by the <em>time constant</em>, which results in a &quot;stiffness&quot; depending on the jitter of the available sources and the wander of the system clock oscillator. The scaled time constant is also used as the poll interval described on the <a href="poll.html">Poll Program</a> page. However, in NTP symmetric mode, each peer manages its own poll interval and the two might not be the same. In such cases either peer uses the minimum of its own poll interval and that of the other peer, which is included in the NTP packet header.</p>
+<h4 id="loop">Loop Dynamics</h4>
+<p> It is necessary to verify that the clock discipline algorithm is stable and satisfies the Nyquist criterion, which requires that the sampling rate be at least twice the bandwidth. In this case the bandwidth can be approximated by the reciprocal of the time constant. In the NTP specification and reference implementation, time constants and poll intervals are expressed as exponents of 2. By construction, the time constant exponent is five times the poll interval exponent. Thus, the default poll exponent of 6 corresponds to a poll interval of 64 s and a time constant of 2048 s. A change in the poll interval changes the time constant by a corresponding amount.. The Nyquist criterion requires the sample interval to be not more than half the time constant or 1024 s. The clock filter guarantees at least one sample in eight poll intervals, so the sample interval is not more than 512 s. This would be described as oversampling by a factor of two. Finally, the PLL parameters have been chosen for a damping factor of 2, which results in a much faster risetime than with critical damping, but results in modest overshoot of 6 percent.</p>
+<p> It is important to understand how the dynamics of the PLL are affected by the time constant and poll interval. At the default poll interval of 64 s and a step offset change of 100 ms, the time response crosses zero in about 50 min and overshoots about 6 ms, as per design. Ordinarily, a step correction would causes a temporary frequency surge of about 5 PPM, which along with the overshoot slowly dissipates over a few hours.</p>
+<p>However, the clock state machine used with the discipline algorithm avoids this transient at startup. It does this using a previously saved frequency file, if present, or by measuring the oscillator frequency, if not. It then quickly amortizes the residual offset at startup without affecting the oscillator frequency. In this way the offset error is less than 0.5 ms within 5 min, if the file is present, and within 10 min if not. See the <a href="clock.html">Clock State Machine</a> page for further details.</p>
+<p>Since the PLL is linear, the response with different offset step amplitudes and poll intervals has the same characteristic shape, but scaled differently in amplitude and time. The response scales exactly with step amplitude, so that the response to a 10-ms step has the same shape as at 64 s, but with amplitude compressed by one-tenth. The response scales exactly with poll interval, so that response at a poll interval of 8 s has the same shape as at 64 s, but with time compressed by one-eighth.</p>
+<p>The optimum time constant, and thus the poll interval, depends on the network time jitter and the oscillator frequency wander. Errors due to jitter decrease as the time constant increases, while errors due to wander decrease as the time constant decreases. For typical Internet paths, the two error characteristics intersect at a point called the <em>Allan intercept</em>, which represents the optimum time constant. With a compromise Allan intercept of 2048 s, the optimum poll interval is about 64 s, which corresponds to a compromise poll exponent of 6. For fast LANs with modern computers, the Allan intercept is somewhat lower at around 512 s, so a compromise poll exponent of 4 (16 s) is appropriate. An intricate, heuristic algorithm is used to manage the actual poll interval within a specified range. Details are on the <a href="poll.html">Poll Program</a> page.</p>
+<p>In the NTPv4 specification and reference implementation a state machine is used to manage the system clock under exceptional conditions, as when the daemon is first started or when encountering severe network congestion. In extreme cases not likely to be encountered in normal operation, the system time can be stepped forward or backward more than 128 ms. Further details are on the <a href="clock.html">Clock State Machine</a> page.</p>
+<h4 id="house">Clock Initialization and Management</h4>
+<p>If left running continuously, an NTP client on a fast LAN in a home or office environment can maintain synchronization nominally within one millisecond. When the ambient temperature variations are less than a degree Celsius, the clock oscillator frequency is disciplined to within one part per million (PPM), even when the clock oscillator native frequency offset is 100 PPM or more.</p>
+<p> For laptops and portable devices when the power is turned off, the battery backup clock offset error can increase as much as one second per day. When power is restored after several hours or days, the clock offset and oscillator frequency errors must be resolved by the clock discipline algorithm, but this can take several hours without specific provisions.</p>
+<p> The provisions described in this section insure that, in all but pathological situations, the startup transient is suppressed to within nominal levels in no more than five minutes after a warm start or ten minutes after a cold start. Following is a summary of these provisions. A detailed discussion of these provisions is on the <a href="clock.html">Clock State Machine</a> page.</p>
+<p> The reference implementation measures the clock oscillator frequency and updates a frequency file at intervals of one hour or more, depending on the measured frequency wander. This design is intended to minimize write cycles in NVRAM that might be used in a laptop or portable device. In a warm start, the frequency is initialized from this file, which avoids a possibly lengthy convergence time. In a cold start when no frequency file is available, the reference implementation first measures the oscillator frequency over a five-min interval. This generally results in a residual frequency error less than 1 PPM. The measurement interval can be changed using the <tt>stepout</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
+<p>In order to reduce the clock offset error at restart, the reference implementation mext disables oscillator frequency discipline and enables clock offset discipline with a small time constant. This is designed to quickly reduce the clock offset error without causing a frequency surge. This configuration is continued for an interval of five-min, after which the clock offset error is usually no more than a millisecond. The measurement interval can be changed using the <tt>stepout</tt> option of the <a href="miscopt.html#tinker"><tt>tinker</tt></a> command.</p>
+<p>Another concern at restart is the time necessary for the select and cluster algorithms to refine and validate the initial clock offset estimate. Normally, this takes several updates before setting the system clock. As the default minimum poll interval in most configurations is about one minute, it can take several minutes before setting the system clock. The <tt>iburst</tt> option of the <a href="confopt.html#burst"><tt>server</tt></a> command changes the behavior at restart and is recommended for client/server configurations. When this option is enabled, the client sends a volley of six requests at intervals of two seconds. This usually insures a reliable estimate is available in about ten seconds before setting the clock. Once this initial volley is complete, the procedures described above are executed.</p>
+<p>As a result of the above considerations, when a backup source, such as the local clock driver, ACTS modem driver or orphan mode is included in the system configuration, it may happen that one or more of them are selectable before one or more of the regular sources are selectable. When backup sources are included in the configuration, the reference implementation waits an interval of several minutes without regular sources before switching to backup sources. This is generally enough to avoid startup transients due to premature switching to backup sources. The interval can be changed using the <tt>orphanwait</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/discover.html b/html/discover.html
new file mode 100644
index 0000000..b35359c
--- /dev/null
+++ b/html/discover.html
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Automatic Server Discoveryschemes</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Automatic Server Discovery Schemes</h3>
+<img src="pic/alice51.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>Make sure who your friends are.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:04<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#assoc">Association Management</a></li>
+ <li class="inline"><a href="#bcst">Broadcast/Multicast Scheme</a></li>
+ <li class="inline"><a href="#mcst">Manycast Scheme</a></li>
+ <li class="inline"><a href="#pool">Server Pool Scheme</a></li>
+</ul>
+<hr>
+<h4 id="modes">Introduction</h4>
+<p>This page describes the automatic server discovery schemes provided in NTPv4. There are three automatic server discovery schemes: broadcast/multicast, many cast, and server pool, which are described on this page. The broadcast/multicast and many cast schemes utilize the ubiquitous broadcast or one-to-many paradigm native to IPv4 and IPv6. The server pool scheme uses DNS to resolve addresses of multiple volunteer servers scattered throughout the world.</p>
+<p> All three schemes work in much the same way and might be described as <i>grab-n'-prune.</i> Through one means or another they grab a number of associations either directly or indirectly from the configuration file, order them from best to worst according to the NTP mitigation algorithms, and prune the surplus associations.</p>
+<h4 id="assoc">Association Management</h4>
+<p>All schemes use an iterated process to discover new preemptable client associations as long as the total number of client associations is less than the <tt>maxclock</tt> option of the <tt>tos</tt> command. The <tt>maxclock</tt> default is 10, but it should be changed in typical configuration to some lower number, usually two greater than the <tt>minclock</tt> option of the same command. </p>
+<p>All schemes use a stratum filter to select just those servers with stratum considered useful. This can avoid large numbers of clients ganging up on a small number of low-stratum servers and avoid servers below or above specified stratum levels. By default, servers of all strata are acceptable; however, the <tt>tos</tt> command can be used to restrict the acceptable range from the <tt>floor</tt> option, inclusive, to the <tt>ceiling</tt> option, exclusive. Potential servers operating at the same stratum as the client will be avoided, unless the <tt>cohort</tt> option is present. Additional filters can be supplied using the methods described on the <a href="authentic.html">Authentication Support</a> page.</p>
+<p>The pruning process uses a set of unreach counters, one for each association created by the configuration or discovery processes. At each poll interval, the counter is increased by one. If an acceptable packet arrives for a persistent (configured) or ephemeral (broadcast/multicast) association, the counter is set to zero. If an acceptable packet arrives for a preemptable (manycast, pool) association and survives the selection and clustering algorithms, the counter is set to zero. If the the counter reaches an arbitrary threshold of 10, the association becomes a candidate for pruning.</p>
+<p>The pruning algorithm is very simple. If an ephemeral or preemptable association becomes a candidate for pruning, it is immediately demobilized. If a persistent association becomes a candidate for pruning, it is not demobilized, but its poll interval is set at the maximum. The pruning algorithm design avoids needless discovery/prune cycles for associations that wander in and out of the survivor list, but otherwise have similar characteristics. </p>
+<p>Following is a summary of each scheme. Note that reference to option applies to the commands described on the <a href="confopt.html">Configuration Options</a> page. See that page for applicability and defaults.</p>
+<h4 id="bcst">Broadcast/Multicast Scheme</h4>
+<p>A broadcast server generates messages continuously at intervals by default 64 s and time-to-live by default 127. These defaults can be overridden by the <tt>minpoll</tt> and <tt>ttl</tt> options, respectively. Not all kernels support the <tt>ttl</tt> option. A broadcast client responds to the first message received by waiting a randomized interval to avoid implosion at the server. It then polls the server in client/server mode using the <tt>iburst</tt> option in order to quickly authenticate the server, calibrate the propagation delay and set the client clock. This normally results in a volley of six client/server exchanges at 2-s intervals during which both the synchronization and cryptographic protocols run concurrently.</p>
+<p>Following the volley, the server continues in listen-only mode and sends no further messages. If for some reason the broadcast server does not respond to these messages, the client will cease transmission and continue in listen-only mode with a default propagation delay. The volley can be avoided by using the <tt>broadcastdelay</tt> command with nonzero argument.</p>
+<p>A server is configured in broadcast mode using the <tt>broadcast</tt> command and specifying the broadcast address of a local interface. If two or more local interfaces are installed with different broadcast addresses, a <tt>broadcast</tt> command is needed for each address. This provides a way to limit exposure in a firewall, for example. A broadcast client is configured using the <tt>broadcastclient</tt> command. </p>
+<p>NTP multicast mode can be used to extend the scope using IPv4 multicast or IPv6 broadcast with defined span. The IANA has assigned IPv4 multicast address 224.0.1.1 and IPv6 address FF05::101 (site local) to NTP, but these addresses should be used only where the multicast span can be reliably constrained to protect neighbor networks. In general, administratively scoped IPv4 group addresses should be used, as described in RFC-2365, or GLOP group addresses, as described in RFC-2770.</p>
+<p>A multicast server is configured using the <tt>broadcast</tt> command, but specifying a multicast address instead of a broadcast address. A multicast client is configured using the <tt>multicastclient</tt> command specifying a list of one or more multicast addresses. Note that there is a subtle distinction between the IPv4 and IPv6 address families. The IPv4 broadcast or mulitcast mode is determined by the IPv4 class. For IPv6 the same distinction can be made using the link-local prefix FF02 for each interface and site-local prefix FF05 for all interfaces.</p>
+<p>It is possible and frequently useful to configure a host as both broadcast client and broadcast server. A number of hosts configured this way and sharing a common broadcast address will automatically organize themselves in an optimum configuration based on stratum and synchronization distance.</p>
+<p>Since an intruder can impersonate a broadcast server and inject false time values, broadcast mode should always be cryptographically authenticated. By default, a broadcast association will not be mobilized unless cryptographically authenticated. If necessary, the <tt>auth</tt> option of the <tt>disable</tt> command will disable this feature. The feature can be selectively enabled using the <tt>notrust</tt> option of the <tt>restrict</tt> command.</p>
+<p>With symmetric key cryptography each broadcast server can use the same or different keys. In one scenario on a broadcast LAN,&nbsp;a set of broadcast clients and servers share the same key along with another set that share a different key. Only the clients with matching key will respond to a server broadcast. Further information is on the <a href="authentic.html">Authentication Support</a> page.</p>
+<p>Public key cryptography can be used with some restrictions. If multiple servers belonging to different secure groups share the same broadcast LAN, the clients on that LAN&nbsp;must have the client keys for all of them. This scenario is illustrated in the example on the <a href="autokey.html">Autokey Public Key Authentication</a> page.</p>
+<h4 id="mcst">Manycast Scheme</h4>
+<p>Manycast is an automatic server discovery and configuration paradigm new to NTPv4. It is intended as a means for a client to troll the nearby network neighborhood to find cooperating servers, validate them using cryptographic means and evaluate their time values with respect to other servers that might be lurking in the vicinity. It uses the grab-n'-drop paradigm with the additional feature that active means are used to grab additional servers should the number of associations fall below the <tt>maxclock</tt> option of the <tt>tos</tt> command.</p>
+<p>The manycast paradigm is not the anycast paradigm described in RFC-1546, which is designed to find a single server from a clique of servers providing the same service. The manycast paradigm is designed to find a plurality of redundant servers satisfying defined optimality criteria.</p>
+<p>A manycast client is configured using the <tt>manycastclient</tt> configuration command, which is similar to the <tt>server</tt> configuration command. It sends ordinary client mode messages, but with a broadcast address rather than a unicast address and sends only if less than <tt>maxclock</tt> associations remain and then only at the minimum feasible rate and minimum feasible time-to-live (TTL) hops. The polling strategy is designed to reduce as much as possible the volume of broadcast messages and the effects of implosion due to near-simultaneous arrival of manycast server messages. There can be as many manycast client associations as different addresses, each one serving as a template for future unicast client/server associations.</p>
+<p>A manycast server is configured using the <tt>manycastserver</tt> command, which listens on the specified broadcast address for manycast client messages. If a manycast server is in scope of the current TTL and is itself synchronized to a valid source and operating at a stratum level equal to or lower than the manycast client, it replies with an ordinary unicast server message.</p>
+<p>The manycast client receiving this message mobilizes a preemptable client association according to the matching manycast client template. This requires the server to be cryptographically authenticated and the server stratum to be less than or equal to the client stratum. </p>
+<p>It is possible and frequently useful to configure a host as both manycast client and manycast server. A number of hosts configured this way and sharing a common multicast group address will automatically organize themselves in an optimum configuration based on stratum and synchronization distance.</p>
+<p>The use of cryptograpic authentication is always a good idea in any server discovery scheme. Both symmetric key and public key cryptography can be used in the same scenarios as described above for the broadast/multicast scheme.</p>
+<h4 id="pool">Server Pool Scheme</h4>
+<p>The idea of targeting servers on a random basis to distribute and balance the load is not a new one; however, the NTP pool scheme puts this on steroids. At present, several thousand operators around the globe have volunteered their servers for public access. In general, NTP&nbsp;is a lightweight service and servers used for other purposes don't mind an additional small load. The trick is to randomize over the population and minimize the load on any one server while retaining the advantages of multiple servers using the NTP&nbsp;mitigation algorithms.</p>
+<p>To support this service, custom DNS software is used by pool.ntp.org and its subdomains
+ to discover a random selection of participating servers in response to a DNS query.
+ The client receiving this list mobilizes some or all of them, similar to the
+ manycast discovery scheme, and prunes the excess. Unlike <tt>manycastclient</tt>,
+ cryptographic authentication is not required. The pool scheme solicits a single
+ server at a time, compared to <tt>manycastclient</tt> which solicits all servers
+ within a multicast TTL range simultaneously. Otherwise, the pool server discovery
+ scheme operates as manycast does.</p>
+<p>The pool scheme is configured using one or more <tt>pool</tt> commands with DNS names
+ indicating the pool from which to draw. The <tt>pool</tt> command can be used more
+ than once; duplicate servers are detected and discarded. In principle, it is
+ possible to use a configuration file containing a single line <tt>pool
+ pool.ntp.org</tt>. The <a href="http://www.pool.ntp.org/en/use.html">NTP Pool
+ Project</a> offers instructions on using the pool with the <tt>server</tt> command, which is suboptimal but works with older versions of <tt>ntpd</tt> predating the <tt>pool</tt> command. With recent ntpd, consider replacing the
+ multiple <tt>server</tt> commands in their example with a single <tt>pool</tt> command.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver1.html b/html/drivers/driver1.html
new file mode 100644
index 0000000..4518b72
--- /dev/null
+++ b/html/drivers/driver1.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Undisciplined Local Clock</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Undisciplined Local Clock</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last update:
+ <!-- #BeginDate format:En2m -->9-May-2014 08:34<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.1.<i>u</i><br>
+ Reference ID: <tt>LOCL</tt><br>
+ Driver ID: <tt>LOCAL</tt></p>
+<h4>Description</h4>
+<p>Note: <strong>We recommend against using this driver.</strong> A much more flexible replacement is described on the <a href="../orphan.html">Orphan Mode</a> page.</p>
+<p>This driver was intended for use in an isolated network where no external source of synchronization such as a radio clock or modem is available. It allows a designated time server to act as a primary server to provide synchronization to other clients on the network. Pick a machine that has a good clock oscillator and configure it with this driver. Set the clock using the best means available, like eyeball-and-wristwatch. Then, point all the other machines at this one or use broadcast mode to distribute time.</p>
+<p>Another application for this driver is if a particular server clock is to be used as the clock of last resort when all other normal synchronization sources have gone away. This is especially useful if that server has an ovenized oscillator. For this you would usually, but not necessarily, configure this driver at a stratum greater than any other likely sources of time, such as the default 5 for this driver, to prevent this driver taking over when legitimate sources elsewhere in the network are available. To further protect the Internet infrastructure from accidental or malicious exposure to this driver, the driver is disabled if another source is available and operating.</p>
+<h4>Monitor Data</h4>
+<p>No <tt>filegen clockstats</tt> monitor data are produced by this driver.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Specifies the frequency offset calibration factor, in parts per million, with default 0.0.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 5.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>LOCL</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+</dl>
+<h4>Additional Information</h4>
+<p><a href="../refclock.html">Reference Clock Drivers</a></p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver10.html b/html/drivers/driver10.html
new file mode 100644
index 0000000..1dd56c1
--- /dev/null
+++ b/html/drivers/driver10.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+<title>Austron 2200A/2201A GPS Receivers</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Austron 2200A/2201A GPS Receivers</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.10.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_AS2201</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+<h4>Description</h4>
+<p>This driver supports the Austron 2200A/2201A GPS/LORAN Synchronized Clock and Timing Receiver connected via a serial port. It supports several special features of the clock, including the Input Buffer Module, Output Buffer Module, IRIG-B Interface Module and LORAN Assist Module. It requires the RS232 Buffered Serial Interface module for communication with the driver.</p>
+<p>For use with a single computer, the receiver can be connected directly to the receiver. For use with multiple computers, one of them is connected directly to the receiver and generates the polling messages. The other computers just listen to the receiver output directly or through a buffer amplifier. For computers that just listen, <tt>fudge flag2</tt> must be set and the <tt>ppsclock </tt>streams module configured on each of them.</p>
+<p>This receiver is capable of a comprehensive and large volume of statistics and operational data. The specific data collection commands and attributes are embedded in the driver source code; however, the collection process can be enabled or disabled using the flag4 flag. If set, collection is enabled; if not, which is the default, it is disabled. A comprehensive suite of data reduction and summary scripts is in the ./scripts/stats directory</p>
+of the ntp3 distribution.
+<h4>Monitor Data</h4>
+<p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Set for computers that listen-only.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
+</dl>
+<h4>Additional Information</h4>
+<p><a href="../refclock.html">Reference Clock Drivers</a></p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver11.html b/html/drivers/driver11.html
new file mode 100644
index 0000000..f3c9a81
--- /dev/null
+++ b/html/drivers/driver11.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+<title>Arbiter 1088A/B GPS Receiver</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Arbiter 1088A/B GPS Receiver</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.11.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_ARBITER</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+<h4>Description</h4>
+<p>This driver supports the Arbiter 1088A/B Satellite Controlled Clock. The claimed accuracy of this clock is 100 ns relative to the PPS output when receiving four or more satellites.</p>
+<p>The receiver should be configured before starting the NTP daemon, in order to establish reliable position and operating conditions. It does not initiate surveying or hold mode. For use with NTP, the daylight savings time feature should be disables (<tt>D0</tt> command) and the broadcast mode set to operate in UTC (<tt>BU</tt> command).</p>
+<p>The timecode format supported by this driver is selected by the poll sequence <tt>B5</tt>, which initiates a line in the following format to be repeated once per second until turned off by the <tt>B0</tt> command.</p>
+<p>Format <tt>B5</tt> (24 ASCII printing characters):</p>
+<pre>&lt;cr&gt;&lt;lf&gt;i yy ddd hh:mm:ss.000bbb
+
+on-time = &lt;cr&gt;
+i = synchronization flag (' ' = locked, '?' = unlocked)
+yy = year of century
+ddd = day of year
+hh:mm:ss = hours, minutes, seconds
+.000 = fraction of second (not used)
+bbb = tailing spaces for fill</pre>
+<p>The alarm condition is indicated by a '?' at i, which indicates the receiver is not synchronized. In normal operation, a line consisting of the timecode followed by the time quality character (TQ) followed by the receiver status string (SR) is written to the clockstats file.</p>
+<p>The time quality character is encoded in IEEE P1344 standard:</p>
+<p>Format <tt>TQ</tt> (IEEE P1344 estimated worst-case time quality)</p>
+<pre>0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock locked, maximum accuracy
+F&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock failure, time not reliable
+4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 1 us
+5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 10 us
+6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 100 us
+7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 1 ms
+8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 10 ms
+9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 100 ms
+A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 1 s
+B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 10 s</pre>
+<p>The status string is encoded as follows:</p>
+<p>Format <tt>SR</tt> (25 ASCII printing characters)</p>
+<pre>V=vv S=ss T=t P=pdop E=ee
+
+vv = satellites visible
+ss = relative signal strength
+t = satellites tracked
+pdop = position dilution of precision (meters)
+ee = hardware errors</pre>
+<p>A three-stage median filter is used to reduce jitter and provide a dispersion measure. The driver makes no attempt to correct for the intrinsic jitter of the radio itself.</p>
+<h4>Monitor Data</h4>
+<p>When enabled by the <tt>flag4</tt> fudge flag, an additional line containing the latitude, longitude, elevation and optional deviation data is written to the <tt>clockstats</tt> file. The deviation data operates with an external pulse-per-second (PPS) input, such as a cesium oscillator or another radio clock. The PPS input should be connected to the B event channel and the radio initialized for deviation data on that channel. The deviation data consists of the mean offset and standard deviation of the external PPS signal relative the GPS signal, both in microseconds over the last 16 seconds.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
+</dl>
+<h4>Additional Information</h4>
+<p><a href="../refclock.html">Reference Clock Drivers</a></p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver12.html b/html/drivers/driver12.html
new file mode 100644
index 0000000..3b6fc15
--- /dev/null
+++ b/html/drivers/driver12.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+<title>KSI/Odetics TPRO/S IRIG Interface</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>KSI/Odetics TPRO/S IRIG Interface</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.12.<i>u</i><br>
+ Reference ID: <tt>IRIG</tt><br>
+ Driver ID: <tt>IRIG_TPRO</tt><br>
+ TPRO Device: <tt>/dev/tpro<i>u</i></tt><br>
+ Requires: KSI/Odetics device driver, <tt>/usr/include/sys/tpro.h</tt> header file</p>
+<h4>Description</h4>
+<p>This driver supports the KSI/Odetics TPRO and TPRO-SAT IRIG-B Decoder, which is a module connected directly to the SBus of a Sun workstation. The module works with the IRIG-B signal generated by several radio clocks, including those made by Arbiter, Austron, Odetics, Spectracom and TrueTime, among others, although it is generally an add- on option. In the case of the TPRO-SAT, the module is an integral part of a GPS receiver, which serves as the primary timing source.</p>
+<p>Using the TPRO interface as a NTP reference clock provides precision time only to ntpd and its clients. With suitable kernel modifications, it is possible to use the TPRO as the CPU system clock, avoiding errors introduced by the CPU clock oscillator wander. See the <a href="../kern.html">A Kernel Model for Precision Timekeeping </a>page for further details.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>IRIG</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+</dl>
+<h4>Additional Information</h4>
+<p><a href="../refclock.html">Reference Clock Drivers</a></p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver16.html b/html/drivers/driver16.html
new file mode 100644
index 0000000..74a3bd6
--- /dev/null
+++ b/html/drivers/driver16.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.6 [en] (Win95; U) [Netscape]">
+ <meta name="Author" content="Ganesh Ramasivan">
+ <title>Bancomm bc635VME Time and Frequency Processor</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>bc635VME/bc350VXI Time and Frequency Processor</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.16.<i>u</i><br>
+ Reference ID: BTFP<br>
+ Driver ID: GPS_BANCOMM<br>
+ Bancomm Device <tt>/dev/btfp0</tt><br>
+ Requires: Bancomm bc635 TFP device module driver for SunOS 4.x/SunOS 5.x</p>
+ <h4>Description</h4>
+ <p>This is the clock driver for the Bancomm bc635VME Time and Frequency Processor. It requires the BANCOMM bc635VME bc350VXI Time and Frequency Processor Module Driver for SunOS 4.x/SunOS 5.x UNIX Systems.</p>
+ <p>Most of this code is originally from refclock_bancomm.c with thanks. It has been modified and tested on an UltraSparc IIi-cEngine running Solaris 2.6. A port for HPUX is not available henceforth.</p>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver18.html b/html/drivers/driver18.html
new file mode 100644
index 0000000..02fb5d2
--- /dev/null
+++ b/html/drivers/driver18.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+<title>NIST/USNO/PTB Modem Time Services</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>NIST/USNO/PTB Modem Time Services</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->1-Dec-2012 10:44<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.18.<i>u</i><br>
+ Reference ID: <tt>NIST | USNO | PTB | WWVB</tt><br>
+ Driver ID: <tt>ACTS_MODEM</tt><br>
+ Serial Port: <tt>/dev/acts<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt><br>
+ Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control and a dial-out (cua)&nbsp;device.</p>
+<h4>Description</h4>
+<p>This driver supports the US (NIST and USNO) and European (PTB (Germany), NPL (UK), etc.) modem time services, as well as Spectracom GPS&nbsp;and WWVB receivers connected via a modem. The driver periodically dials a number from a telephone list, receives the timecode data and calculates the local clock correction. It is designed primarily for backup when neither a radio clock nor connectivity to Internet time servers are available. It can also be configured to operate full period.</p>
+<p>For best results the indicated time must be corrected for the modem and telephone circuit propagation delays, which can reach 200 ms or more. For the NIST service, corrections are determined automatically by measuring the roundtrip delay of echoed characters. With this service the absolute accuracy is typically a millisecond or two. Corrections for the other services must be determined by other means. With these services variations from call to call and between messages during a call are typically a few milliseconds, occasionally higher.</p>
+<p>This driver requires a 9600-bps modem with a Hayes-compatible command set and control over the modem data terminal ready (DTR) control line. The actual line speed ranges from 1200 bps with USNO&nbsp;to 14,400 bps with NIST. The modem setup string is hard-coded in the driver and may require changes for nonstandard modems or special circumstances.</p>
+<p>There are three modes of operation selected by the <tt>mode</tt> keyword in the <tt>server</tt> configuration command. In manual mode (2) the calling program is initiated by setting fudge <tt>flag1</tt>. This can be done manually using <tt>ntpq</tt>, or by a cron job. In auto mode (0) <tt>flag1</tt> is set at each poll event. In backup mode (1) <tt>flag1</tt> is set at each poll event, but only if no other synchronization sources are available.</p>
+<p>When <tt>flag1</tt> is set, the calling program dials the first number in the list specified by the <tt>phone</tt> command. If the call fails for any reason, the program dials the second number and so on. The phone number is specified by the Hayes ATDT prefix followed by the number itself, including the prefix and long-distance digits and delay code, if necessary. The <tt>flag1</tt> is reset and the calling program terminated if (a) valid clock update has been determined, (b) no more numbers remain in the list, (c) a device fault or timeout occurs or (d) fudge <tt>flag1</tt> is reset manually using <tt>ntpq</tt>.</p>
+<p>The driver automatically recognizes the message format of each modem time service. It selects the parsing algorithm depending on the message length. There is some hazard should the message be corrupted. However, the data format is checked carefully and only if all checks succeed is the message accepted. Corrupted lines are discarded without complaint. Once the service is known, the reference identifier for the driver is set to NIST, USNO, PTB or WWVB as appropriate.</p>
+<p>The Spectracom radio can be connected via a modem if the radio is configured to send time codes continuously at 1-s intervals. In principle, fudge <tt>flag2</tt> enables port locking, allowing the modem to be shared when not in use by this driver. At least on Solaris with the current NTP I/O routines, this results in lots of ugly error messages.</p>
+<p>The <tt>minpoll</tt> and <tt>maxpoll</tt> keywords of the server configuration command can be used to limit the intervals between calls. The recommended settings are 12 (1.1 hours) for <tt>minpoll</tt> and 17 (36 hours) for <tt>maxpoll</tt>. Ordinarily, the poll interval will start at <tt>minpoll</tt> and ramp up to <tt>maxpoll</tt> in a day or two.</p>
+<h4>US Phone Numbers and Formats</h4>
+<p>Note: Phone numbers include the entire Hayes modem command, including the <tt>ATDT</tt> and other control codes as may be necessary. For most cases only the <tt>ATDT</tt> may be necessary.</p>
+<p><a href="http://www.boulder.nist.gov/timefreq">National Institute of Science and Technology (NIST)</a></p>
+<p>Phone: (303) 494-4774 (Boulder, CO); (808) 335-4721 (Hawaii)</p>
+<p><a href="http://www.boulder.nist.gov/timefreq/service/acts.htm">Data Format</a></p>
+<p><tt>National Institute of Standards and Technology<br>
+ Telephone Time Service, Generator 3B<br>
+ Enter question mark &quot;?&quot; for HELP<br>
+ MJD YR MO DA H M S ST S UT1 msADV &lt;OTM&gt;<br>
+ 47999 90-04-18 21:39:15 50 0 +.1 045.0 UTC(NIST) *<br>
+ 47999 90-04-18 21:39:16 50 0 +.1 045.0 UTC(NIST) #<br>
+ ...</tt></p>
+<p><tt>MJD</tt>, <tt>YR</tt>, <tt>ST</tt>, <tt>UT1</tt> and <tt>UTC(NIST)</tt> are not used by this driver. The <tt>&lt;OTM&gt;</tt> on-time character &quot;<tt>*</tt>&quot; changes to &quot;<tt>#</tt>&quot;&nbsp;when the delay correction is valid.</p>
+<p><a href="http://tycho.usno.navy.mil">US Naval Observatory (USNO)</a></p>
+<p>Phone: (202) 762-1594 (Washington, DC); (719) 567-6742 (Boulder, CO)</p>
+<p><a href="http://tycho.usno.navy.mil/modem_time.html">Data Format</a> (two lines, repeating at one-second intervals)</p>
+<p><tt>jjjjj nnn hhmmss UTC</tt></p>
+<p>* on-time character for previous timecode message<br>
+ jjjjj modified Julian day number (not used)<br>
+ nnn day of year<br>
+ hhmmss second of day</p>
+<p><a href="tf582_4.html">European Phone Numbers and Formats</a></p>
+<p><a href="http://www.spectracomcorp.com">Spectracom GPS and WWVB Receivers</a></p>
+<p>If a modem is connected to a Spectracom receiver, this driver will call it and retrieve the time in one of two formats, 0 and 2. Ordinarily, the receiver requires a <tt>T</tt> in order to return the timecode. As this driver does not send data via the modem, it must either be configured in continuous mode or be polled by another local driver.</p>
+<h4>Monitor Data</h4>
+<p>The received timecode is written as-is to the <tt>clockstats</tt> file along with the Hayes connection and hang-up commands and result codes.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Set by the driver to (one of) <tt>NIST</tt>, <tt>USNO</tt>, <tt>PTB</tt> or <tt>WWVB</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Initiate a call if 1. Automatically reset by program.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Enables port locking if 1, disables if 0 (default).</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+</dl>
+<h4>Additional Information</h4>
+<p><a href="../refclock.html">Reference Clock Drivers</a>&nbsp;</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver19.html b/html/drivers/driver19.html
new file mode 100644
index 0000000..2c8278f
--- /dev/null
+++ b/html/drivers/driver19.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+<title>Heath WWV/WWVH Receiver</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Heath WWV/WWVH Receiver</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.19.<i>u</i><br>
+ Reference ID: <tt>WWV</tt><br>
+ Driver ID: <tt>WWV_HEATH</tt><br>
+ Serial Port: <tt>/dev/heath<i>u</i></tt>; 1200 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt><br>
+ Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control</p>
+<h4>Description</h4>
+<p>This driver supports the Heath GC-1000 Most Accurate Clock, with RS232C Output Accessory. This is a WWV/WWVH receiver somewhat less robust than other supported receivers. It's claimed accuracy is 100 ms when actually synchronized to the broadcast signal, but this doesn't happen even most of the time, due to propagation conditions, ambient noise sources, etc. When not synchronized, the accuracy is at the whim of the internal clock oscillator, which can wander into the sunset without warning. Since the indicated precision is 100 ms, expect a host synchronized only to this thing to wander to and fro, occasionally being rudely stepped when the offset exceeds the default CLOCK_MAX of 128 ms.</p>
+<p>The internal DIPswitches should be set to operate at 1200 baud in MANUAL mode and the current year. The external DIPswitches should be set to GMT and 24-hour format. It is very important that the year be set correctly in the DIPswitches; otherwise, the day of year will be incorrect after 28 April of a normal or leap year.</p>
+<p>In MANUAL mode the clock responds to a rising edge of the request to send (RTS) modem control line by sending the timecode. Therefore, it is necessary that the operating system implement the <tt>TIOCMBIC</tt> and <tt>TIOCMBIS</tt> ioctl system calls and <tt>TIOCM_RTS</tt> control bit. Present restrictions require the use of a POSIX-compatible programming interface, although other interfaces may work as well.</p>
+<p>The clock message consists of 23 ASCII printing characters in the following format:</p>
+<pre>hh:mm:ss.f&nbsp;&nbsp;&nbsp;&nbsp; dd/mm/yr&lt;cr&gt;
+
+hh:mm:ss.f = hours, minutes, seconds
+f = deciseconds ('?' when out of spec)
+dd/mm/yr = day, month, year</pre>
+<p>The alarm condition is indicated by '?', rather than a digit, at A. Note that 0?:??:??.? is displayed before synchronization is first established and hh:mm:ss.? once synchronization is established and then lost again for about a day.</p>
+<p>A fudge time1 value of .07 s appears to center the clock offset residuals.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>WWV</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Not used by this driver</dd>
+</dl>
+Additional Information
+<p><a href="../refclock.html">Reference Clock Drivers</a>&nbsp;</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver20.html b/html/drivers/driver20.html
new file mode 100644
index 0000000..6391e86
--- /dev/null
+++ b/html/drivers/driver20.html
@@ -0,0 +1,432 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Generic NMEA GPS Receiver</title>
+ <!-- Changed by: Harlan &, 31-Mar-2014 -->
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ <style type="text/css">
+ table.dlstable { font-size:85%; }
+ td.ttf{ font-family:Courier; font-weight:bold; }
+ </style></head>
+
+
+
+ <body>
+ <h3>Generic NMEA GPS Receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Mar-2014 03:55<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+
+ <p>
+ Address: 127.127.20.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_NMEA</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; 4800 - 115200 bps, 8-bits, no parity<br>
+ Serial Port: <tt>/dev/gpspps<i>u</i></tt>; for just the PPS signal (this
+ is tried first for PPS, before <tt>/dev/gps<i>u</i></tt>)<br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; symlink to server:port (for nmead)<br>
+ Features: <tt>tty_clk</tt>
+ </p>
+
+ <h4>Description</h4>
+
+ <p>
+ This driver supports GPS receivers with
+ the <tt>$GPRMC</tt>, <tt>$GPGLL</tt>, <tt>$GPGGA</tt>, <tt>$GPZDA</tt>
+ and <tt>$GPZDG</tt> NMEA sentences by default.&nbsp; Note that Accord's
+ custom NMEA sentence <tt>$GPZDG</tt> reports using the GPS timescale,
+ while the rest of the sentences report UTC.&nbsp; The difference between
+ the two is a whole number of seconds which increases with each leap
+ second insertion in UTC.&nbsp; To avoid problems mixing UTC and GPS
+ timescales, the driver disables processing of UTC sentences
+ once <tt>$GPZDG</tt> is received.
+ </p>
+ <p>
+ The driver expects the receiver to be set up to transmit at least one
+ supported sentence every second.
+ </p>
+ <p>
+ The accuracy depends on the receiver used. Inexpensive GPS models are
+ available with a claimed PPS signal accuracy of
+ 1 &mu;s or better relative to the broadcast
+ signal. However, in most cases the actual accuracy is limited by the
+ precision of the timecode and the latencies of the serial interface and
+ operating system.
+ </p>
+ <p>
+ If the Operating System supports PPSAPI
+ (<a href="http://www.ietf.org/rfc/rfc2783.txt">RFC 2783</a>), fudge flag1
+ 1 enables its use.
+ </p>
+ <p>
+ The various GPS sentences that this driver recognises look like this:<br>
+ (others quietly ignored)
+ </p>
+
+ <p><table class="dlstable" border="1">
+ <caption>Accepted NMEA sentences</caption>
+ <tbody><tr>
+ <th>Sentence</th>
+ <th>Vendor</th>
+ </tr><tr>
+ <td class="ttf">$GPRMC,UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CS&lt;cr&gt;&lt;lf&gt;</td>
+ </tr><tr>
+ <td class="ttf">$GPGLL,LAT,LAT_REF,LON,LON_REF,UTC,POS_STAT*CS&lt;cr&gt;&lt;lf&gt;</td>
+ </tr><tr>
+ <td class="ttf">$GPGGA,UTC,LAT,LAT_REF,LON,LON_REF,FIX_MODE,SAT_USED,HDOP,ALT,ALT_UNIT,GEO,G_UNIT,D_AGE,D_REF*CS&lt;cr&gt;&lt;lf&gt;</td>
+ </tr><tr>
+ <td class="ttf">$GPZDA,UTC,DD,MM,YYYY,TH,TM,*CS&lt;cr&gt;&lt;lf&gt;</td>
+ </tr><tr>
+ <td class="ttf">$GPZDG,GPSTIME,DD,MM,YYYY,AA.BB,V*CS&lt;cr&gt;&lt;lf&gt;</td>
+ <td>Accord</td>
+ </tr>
+ </tbody></table></p>
+
+ <p><table class="dlstable" border="1">
+ <caption>NMEA data items</caption>
+ <tbody><tr>
+ <th>Symbol</th>
+ <th>Meaning and Format</th>
+ </tr>
+
+ <tr>
+ <td class="ttf">UTC</td>
+ <td>Time of day on UTC timescale. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])</td>
+ </tr><tr>
+ <td class="ttf">POS_STAT</td>
+ <td>Position status. (A = Data valid, V = Data invalid)</td>
+ </tr><tr>
+ <td class="ttf">LAT</td>
+ <td>Latitude (llll.ll)</td>
+ </tr><tr>
+ <td class="ttf">LAT_REF</td>
+ <td>Latitude direction. (N = North, S = South)</td>
+ </tr><tr>
+ <td class="ttf">LON</td>
+ <td>Longitude (yyyyy.yy)</td>
+ </tr><tr>
+ <td class="ttf">LON_REF</td>
+ <td>Longitude direction (E = East, W = West)</td>
+ </tr><tr>
+ <td class="ttf">SPD</td>
+ <td>Speed over ground. (knots) (x.x)</td>
+ </tr><tr>
+ <td class="ttf">HDG</td>
+ <td>Heading/track made good (degrees True) (x.x)</td>
+ </tr><tr>
+ <td class="ttf">DATE</td>
+ <td>Date (ddmmyy)</td>
+ </tr><tr>
+ <td class="ttf">MAG_VAR</td>
+ <td>Magnetic variation (degrees) (x.x)</td>
+ </tr><tr>
+ <td class="ttf">MAG_REF</td>
+ <td>Magnetic variation (E = East, W = West)</td>
+ </tr><tr>
+ <td class="ttf">FIX_MODE</td>
+ <td>Position Fix Mode (0 = Invalid, &gt;0 = Valid)</td>
+ </tr><tr>
+ <td class="ttf">SAT_USED</td>
+ <td>Number of Satellites used in solution</td>
+ </tr><tr>
+ <td class="ttf">HDOP</td>
+ <td>Horizontal Dilution of Precision</td>
+ </tr><tr>
+ <td class="ttf">ALT</td>
+ <td>Antenna Altitude</td>
+ </tr><tr>
+ <td class="ttf">ALT_UNIT</td>
+ <td>Altitude Units (Metres/Feet)</td>
+ </tr><tr>
+ <td class="ttf">GEO</td>
+ <td>Geoid/Elipsoid separation</td>
+ </tr><tr>
+ <td class="ttf">G_UNIT</td>
+ <td>Geoid units (M/F)</td>
+ </tr><tr>
+ <td class="ttf">D_AGE</td>
+ <td>Age of last DGPS Fix</td>
+ </tr><tr>
+ <td class="ttf">D_REF</td>
+ <td>Reference ID of DGPS station</td>
+ </tr><tr>
+ <td class="ttf">GPSTIME</td>
+ <td>Time of day on GPS timescale. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.f])</td>
+ </tr><tr>
+ <td class="ttf">DD</td>
+ <td>Day of the month (1-31)</td>
+ </tr><tr>
+ <td class="ttf">MM</td>
+ <td>Month of the year (1-12)</td>
+ </tr><tr>
+ <td class="ttf">YYYY</td>
+ <td>Year</td>
+ </tr><tr>
+ <td class="ttf">AA.BB</td>
+ <td>Denotes the signal strength (should be &lt; 05.00)</td>
+ </tr><tr>
+ <td class="ttf">V</td>
+ <td>GPS sync status<br>
+ &nbsp;&nbsp;&nbsp;'0' =&gt; INVALID time,<br>
+ &nbsp;&nbsp;&nbsp;'1' =&gt; accuracy of +/- 20ms,<br>
+ &nbsp;&nbsp;&nbsp;'2' =&gt; accuracy of +/- 100ns</td>
+ </tr><tr>
+ <td class="ttf">CS</td>
+ <td> Checksum</td>
+ </tr><tr>
+ <td class="ttf">&lt;cr&gt;&lt;lf&gt;</td>
+ <td>Sentence terminator.</td>
+ </tr>
+ </tbody></table></p>
+
+
+ <h4>The 'mode' byte</h4>
+
+ <p>
+ Specific GPS sentences and bitrates may be selected by setting bits of
+ the 'mode' in the server configuration line:<br> &nbsp;&nbsp;<tt>server
+ 127.127.20.x mode X</tt>
+ </p>
+
+ <table border="1">
+ <caption>mode byte bits and bit groups</caption>
+ <tbody><tr>
+ <th align="center">Bit</th>
+ <th align="center">Decimal</th>
+ <th align="center">Hex</th>
+ <th align="left">Meaning</th>
+ </tr>
+
+ <tr>
+ <td align="center">0</td>
+ <td align="center">1</td>
+ <td align="center">1</td>
+ <td>process <tt>$GPMRC</tt></td>
+ </tr><tr>
+ <td align="center">1</td>
+ <td align="center">2</td>
+ <td align="center">2</td>
+ <td>process <tt>$GPGGA</tt></td>
+ </tr><tr>
+ <td align="center">2</td>
+ <td align="center">4</td>
+ <td align="center">4</td>
+ <td>process <tt>$GPGLL</tt></td>
+ </tr><tr>
+ <td align="center">3</td>
+ <td align="center">8</td>
+ <td align="center">8</td>
+ <td>process <tt>$GPZDA</tt> or <tt>$GPZDG</tt></td>
+ </tr><tr>
+ <td rowspan="6" align="center">4-6</td>
+ <td align="center">0</td>
+ <td align="center">0</td>
+ <td>linespeed 4800 bps</td>
+ </tr><tr>
+ <td align="center">16</td>
+ <td align="center">0x10</td>
+ <td>linespeed 9600 bps</td>
+ </tr><tr>
+ <td align="center">32</td>
+ <td align="center">0x20</td>
+ <td>linespeed 19200 bps</td>
+ </tr><tr>
+ <td align="center">48</td>
+ <td align="center">0x30</td>
+ <td>linespeed 38400 bps</td>
+ </tr><tr>
+ <td align="center">64</td>
+ <td align="center">0x40</td>
+ <td>linespeed 57600 bps</td>
+ </tr><tr>
+ <td align="center">80</td>
+ <td align="center">0x50</td>
+ <td>linespeed 115200 bps</td>
+ </tr><tr>
+ <td align="center">7</td>
+ <td align="center">128</td>
+ <td align="center">0x80</td>
+ <td>Write the sub-second fraction of the receive time stamp to the
+ clockstat file for all recognised NMEA sentences. This can be used to
+ get a useful value for fudge time2.<br><strong>Caveat:</strong> This
+ will fill your clockstat file rather fast. Use it only temporarily to
+ get the numbers for the NMEA sentence of your choice.</td>
+ </tr>
+ </tr><tr>
+ <td align="center">8</td>
+ <td align="center">256</td>
+ <td align="center">0x100</td>
+ <td>process <tt>$PGRMF</tt></td>
+ </tr><tr>
+ <td align="center">9-15</td>
+ <td align="center"></td>
+ <td align="center">0xFE00</td>
+ <td>reserved - leave 0</td>
+ </tr><tr>
+ <td align="center">16</td>
+ <td align="center">65536</td>
+ <td align="center">0x10000</td>
+ <td>Append extra statistics to the clockstats line.
+ Details below.</td>
+ </tr>
+ </tbody></table>
+
+
+ <p>
+ The default (mode 0) is to process all supported sentences at a linespeed
+ of 4800 bps, which results in the first one received and recognised in
+ each cycle being used.&nbsp; If only specific sentences should be
+ recognised, then the mode byte must be chosen to enable only the selected
+ ones.&nbsp; Multiple sentences may be selected by adding their mode bit
+ values, but of those enabled still only the first received sentence in a
+ cycle will be used.&nbsp; Using more than one sentence per cycle is
+ impossible, because
+ </p><ul>
+ <li>there is only <a href="#fudgetime2">fudge time2</a> available to
+ compensate for transmission delays but every sentence would need a
+ different one and
+ </li><li>using more than one sentence per cycle overstuffs the internal data
+ filters.
+ </li></ul>
+ The driver uses 4800 bits per second by default, but faster bitrates can
+ be selected using bits 4 to 6 of the mode field.
+ <p></p>
+
+ <p>
+ <strong>Caveat:</strong> Using higher line speeds does not necessarily
+ increase the precision of the timing device.&nbsp; Higher line speeds are
+ not necessarily helpful for the NMEA driver, either.&nbsp; They can be
+ used to accomodate for an amount of data that does not fit into a
+ 1-second cycle at 4800 bps, but high-speed high-volume NMEA data is likely
+ to cause trouble with the serial line driver since NMEA supports no
+ protocol handshake.&nbsp; Any device that is exclusively used for time
+ synchronisation purposes should be configured to transmit the relevant
+ data only, e.g. one <tt>$GPRMC</tt> or <tt>$GPZDA</tt> per second, at a
+ linespeed of 4800 bps or 9600 bps.
+ </p>
+
+ <h4>Monitor Data</h4>
+
+ <p>The last GPS sentence that is accepted or rejected is written to the
+ clockstats file and available with <code>ntpq -c clockvar</code>.
+ (Logging the rejected sentences lets you see/debug why they were rejected.)
+ Filtered sentences are not logged.</p>
+
+ <p>
+ If the 0x10000 mode bit is on and clockstats is enabled, several extra
+ counters will be appended to the NMEA sentence that gets logged.
+ For example:
+<pre>
+56299 76876.691 127.127.20.20 $GPGGA,212116.000,3726.0785,N,12212.2605,W,1,05,2.0,17.0,M,-25.7,M,,0000*5C 228 64 0 0 64 0
+</pre>
+ </p>
+
+ <table border="1">
+ <caption>Clockstats</caption>
+ <tbody><tr>
+ <th align="center">Column</th>
+ <th align="center">Sample</th>
+ <th align="left">Meaning</th>
+ </tr>
+
+ <tr>
+ <td align="center">1</td>
+ <td align="center">56299</td>
+ <td>MJD</td>
+ </tr><tr>
+ <td align="center">2</td>
+ <td align="center">76876.691</td>
+ <td>Time of day in seconds</td>
+ </tr><tr>
+ <td align="center">3</td>
+ <td align="center">127.127.20.20</td>
+ <td>IP Address from server config line</td>
+ </tr><tr>
+ <td align="center">4</td>
+ <td align="center">$GPGGA,...0*5C</td>
+ <td>NMEA Sentence</td>
+ </tr><tr>
+ <td align="center">5</td>
+ <td align="center">228</td>
+ <td>Number of sentences received</td>
+ </tr><tr>
+ <td align="center">6</td>
+ <td align="center">64</td>
+ <td>Number of sentences accepted and used for timekeeping</td>
+ </tr><tr>
+ <td align="center">7</td>
+ <td align="center">0</td>
+ <td>Number of sentences rejected because they were marked invalid (poor signal)</td>
+ </tr><tr>
+ <td align="center">8</td>
+ <td align="center">0</td>
+ <td>Number of sentences rejected because of bad checksum or invalid date/time</td>
+ </tr><tr>
+ <td align="center">9</td>
+ <td align="center">64</td>
+ <td>Number of sentences filtered by mode bits or same second</td>
+ </tr><tr>
+ <td align="center">10</td>
+ <td align="center">0</td>
+ <td>Number of PPS pulses used, overrides NMEA sentences</td>
+ </tr>
+ </tbody></table>
+
+ Sentences like $GPGSV that don't contain the time will get
+ counted in the total but otherwise ignored.
+
+ <p>
+ <a href="https://support.ntp.org/bin/view/Support/ConfiguringNMEARefclocks">Configuring
+ NMEA Refclocks</a> might give further useful hints for specific hardware
+ devices that exhibit strange or curious behaviour.
+ </p>
+
+ <p>
+ To make a specific setting, select the corresponding decimal values from
+ the mode byte table, add them all together and enter the resulting
+ decimal value into the clock configuration line.
+ </p>
+
+ <h4>Setting up the Garmin GPS-25XL</h4>
+
+ Switch off all output with by sending it the following string.
+ <pre>"$PGRMO,,2&lt;cr&gt;&lt;lf&gt;"</pre>
+ <p>Now switch only $GPRMC on by sending it the following string.</p>
+ <pre>"$PGRMO,GPRMC,1&lt;cr&gt;&lt;lf&gt;"</pre>
+
+ <p>On some systems the PPS signal isn't switched on by default. It can be
+ switched on by sending the following string.</p>
+ <pre>"$PGRMC,,,,,,,,,,,,2&lt;cr&gt;&lt;lf&gt;"</pre>
+
+ <h4>Fudge Factors</h4>
+
+ <dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the PPS time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><a name="fudgetime2"><tt>time2 <i>time</i></tt></a></dt>
+ <dd>Specifies the serial end of line time offset calibration factor, in seconds and fraction, with default
+ 0.0.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with
+ default <tt>GPS</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Disable PPS signal processing if 0 (default); enable PPS signal processing if 1.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>If PPS signal processing is enabled, capture the pulse on the rising edge if 0 (default); capture on the
+ falling edge if 1.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>If PPS signal processing is enabled, use the <tt>ntpd</tt> clock discipline if 0 (default); use the kernel
+ discipline if 1.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Obscures location in timecode: 0 for disable (default), 1 for enable.</dd>
+ </dl>
+
+ <p>Additional Information</p>
+ <p><tt>flag1</tt>, <tt>flag2</tt>, and <tt>flag3</tt> are ignored under Windows.</p>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body></html>
diff --git a/html/drivers/driver22.html b/html/drivers/driver22.html
new file mode 100644
index 0000000..6e01a38
--- /dev/null
+++ b/html/drivers/driver22.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>PPS Clock Discipline</title>
+<!-- Changed by: Harlan &, 31-Mar-2014 -->
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>PPS Clock Discipline</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last change:
+ <!-- #BeginDate format:En2m -->31-Mar-2014 07:46<!-- #EndDate -->
+ UTC</p>
+ <hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.22.<i>u</i><br>
+ Reference ID: <tt>PPS</tt><br>
+ Driver ID: <tt>PPS</tt><br>
+ Serial or Parallel Port: <tt>/dev/pps<i>u</i></tt><br>
+ Requires: PPSAPI signal interface for PPS signal processing.</p>
+<p>Note: This driver supersedes an older one of the same name. The older driver operated with several somewhat archaic signal interface devices, required intricate configuration and was poorly documented. This driver requires the Pulse per Second API (PPSAPI)<sup>1</sup>. Note also that the <tt>pps</tt> configuration command has been obsoleted by this driver.</p>
+<h4>Description</h4>
+<p>This driver furnishes an interface for the pulse-per-second (PPS) signal produced by a cesium clock, radio clock or related devices. It can be used to augment the serial timecode generated by a GPS receiver, for example. It can be used to remove accumulated jitter and re-time a secondary server when synchronized to a primary server over a congested, wide-area network and before redistributing the time to local clients. The driver includes extensive signal sanity checks and grooming algorithms. A range gate and frequency discriminator reject noise and signals with incorrect frequency. A multiple-stage median filter rejects jitter due to hardware interrupt and operating system latencies. A trimmed-mean algorithm determines the best time samples. With typical workstations and processing loads, the incidental jitter can be reduced to a few microseconds.</p>
+<p>While this driver can discipline the time and frequency relative to the PPS source, it cannot number the seconds. For this purpose an auxiliary source is required, ordinarily a radio clock operated as a primary reference (stratum 1) source; however, another NTP time server can be used as well. For this purpose, the auxiliary source should be specified as the prefer peer, as described in the <a href="../prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page.</p>
+<p>The driver requires the PPSAPI interface<sup>1</sup>, which is a proposed IETF standard. The interface consists of the <tt>timepps.h</tt> header file and associated kernel support. Support for this interface is included in current versions of Solaris, FreeBSD and Linux and proprietary versions of Tru64 (Alpha) and SunOS. See the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page for further information.</p>
+<p>The PPS source can be connected via a serial or parallel port, depending on the hardware and operating system. A serial port can be dedicated to the PPS source or shared with another device; however, if dedicated the data leads should not be connected, as noise or unexpected signals can cause <tt>ntpd</tt> to exit.</p>
+<p>A radio clock is usually connected via a serial port and the PPS source
+ connected via a level converter to the data carrier detect (DCD)
+ pin (DB-9 pin 1, DB-25 pin 8) of the same connector. In some systems
+ where a parallel port and driver are available, the PPS signal can
+ be connected directly to the ACK pin (DB25 pin 10) of the connector.
+ Whether the PPS signal is connected via a dedicated port or shared with another
+ device, the driver opens the device <tt>/dev/pps%d</tt>,
+ where <tt>%d</tt> is the unit number. As with other drivers, links can be
+ used to redirect the logical name to the actual physical device.</p>
+<p>The driver normally operates like any other driver and uses the same mitigation
+ algorithms and PLL/FLL clock discipline incorporated in the daemon.
+ If kernel PLL/FLL support is available, the kernel PLL/FLL clock
+ discipline can be used instead. The default behavior is not to use
+ the kernel PPS clock discipline, even if present. This driver incorporates
+ a good deal of signal processing to reduce jitter using the median
+ filter algorithm in the driver. As the result, performance
+ with <tt>minpoll</tt> configured at 4 (16s) is generally
+ better than the kernel PPS discipline. However, fudge flag 3 can
+ be used to enable the kernel PPS discipline if necessary.</p>
+<p>This driver
+ is enabled only under one of two conditions (a) a prefer peer other than
+ this driver is among the survivors of the mitigation algorithms or (b)
+ there are no survivors and the <tt>minsane</tt> option
+ of the <tt>tos</tt> command is 0. The prefer peer designates another source
+ that can reliably number the seconds when available . However, if no
+ sources are available, the system clock continues to be disciplined by
+ the PPS driver on an indefinite basis.</p>
+<p>A scenario where the latter behavior can be most useful is a planetary orbiter
+ fleet, for instance in the vicinity of Mars, where contact between orbiters
+ and Earth only one or two times per Sol (Mars day). These orbiters have a
+ precise timing reference based on an Ultra Stable Oscillator (USO) with accuracy
+ in the order of a Cesium oscillator. A PPS signal is derived from the USO
+ and can be disciplined from Earth on rare occasion or from another orbiter
+ via NTP. In the above scenario the PPS signal disciplines the spacecraft clock
+ between NTP updates.</p>
+<p>In a similar scenario a PPS signal can be used to discipline the clock between
+ updates produced by the modem driver. This would provide precise synchronization
+ without needing the Internet at all.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>PPS</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Specifies PPS capture on the rising (assert) pulse edge if 0 (default) or falling
+ (clear) pulse edge if 1. Not used under Windows - if the special <tt>serialpps.sys</tt> serial port driver is installed then the leading edge will <i>always</i> be used.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Controls the kernel PPS discipline: 0 for disable (default), 1 for enable. Not used under Windows - if the special <tt>serialpps.sys<\tt> serial port driver is used then kernel PPS will be available and used.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Record a timestamp once for each second if 1. Useful for constructing
+ Allan deviation plots.</dd>
+ .
+</dl>
+<h4>Additional Information</h4>
+<p><a href="../refclock.html">Reference Clock Drivers</a></p>
+<p>Reference</p>
+<ol>
+ <li>Mogul, J., D. Mills, J. Brittenson, J. Stone and U. Windl. Pulse-per-second API for Unix-like operating systems, version 1. Request for Comments RFC-2783, Internet Engineering Task Force, March 2000, 31 pp.</li>
+</ol>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver26.html b/html/drivers/driver26.html
new file mode 100644
index 0000000..dc84cc1
--- /dev/null
+++ b/html/drivers/driver26.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Hewlett Packard 58503A GPS Receiver and HP Z3801A</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Hewlett Packard 58503A GPS Receiver and HP Z3801A</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->5-Oct-2005 04:37<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.26.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_HP</tt><br>
+ Serial Port: <tt>/dev/hpgps<i>u</i></tt>; 9600 baud, 8-bits, no parity, 19200 baud 7-bits, odd parity for the HP Z3801A</p>
+ <h4>Description</h4>
+ <p>This driver supports the HP 58503A Time and Frequency Reference Receiver and HP Z3801A GPS Receiver. They use HP SmartClock (TM) to implement an Enhanced GPS receiver. The receiver accuracy when locked to GPS in normal operation is better than 1 usec. The accuracy when operating in holdover is typically better than 10 us per day. It receiver should be operated with factory default settings. Initial driver operation: expects the receiver to be already locked to GPS, configured and able to output timecode format 2 messages.</p>
+ <p>The driver uses the poll sequence <tt>:PTIME:TCODE?</tt> to get a response from the receiver. The receiver responds with a timecode string of ASCII printing characters, followed by a &lt;cr&gt;&lt;lf&gt;, followed by a prompt string issued by the receiver, in the following format:</p>
+ <pre>T#yyyymmddhhmmssMFLRVcc&lt;cr&gt;&lt;lf&gt;scpi &gt;</pre>
+ The driver processes the response at the &lt;cr&gt; and &lt;lf&gt;, so what the driver sees is the prompt from the previous poll, followed by this timecode. The prompt from the current poll is (usually) left unread until the next poll. So (except on the very first poll) the driver sees this:
+ <pre>scpi &gt;T#yyyymmddhhmmssMFLRVcc&lt;cr&gt;&lt;lf&gt;</pre>
+ <p>The T is the on-time character, at 980 msec. before the next 1PPS edge. The # is the timecode format type. We look for format 2. Without any of the CLK or PPS stuff, then, the receiver buffer timestamp at the &lt;cr&gt; is 24 characters later, which is about 25 msec. at 9600 bps, so the first approximation for fudge time1 is nominally -0.955 seconds. This number probably needs adjusting for each machine / OS type, so far: -0.955000 on an HP 9000 Model 712/80 HP-UX 9.05 -0.953175 on an HP 9000 Model 370 HP-UX 9.10</p>
+This driver will probably work with the 58503B and 59551A if they are setup appropriately.<P>
+To use an HP Z3801A, specify <tt>mode 1</tt> on the server config line to setup the right line paramters.<P>
+The timekeeping portion of HP's business has been sold to <a href="http://www.symmetricom.com/">Symmetricom</a>.<P>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver27.html b/html/drivers/driver27.html
new file mode 100644
index 0000000..91534ad
--- /dev/null
+++ b/html/drivers/driver27.html
@@ -0,0 +1,248 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Arcron MSF Receiver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Arcron MSF Receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.27.<i>u</i><br>
+ Reference ID: <tt>MSFa</tt> / <tt>MSF</tt> / <tt>DCF</tt> / <tt>WWVB</tt><br>
+ Driver ID: <tt>MSF_ARCRON</tt><br>
+ Serial Port: <tt>/dev/arc<i>u</i></tt>; 300 baud, 8-bits, 2-stop, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the Arcron MSF, DCF and WWVB receivers. The clock reports its ID as &quot;<tt>MSFa</tt>'', &quot;<tt>MSF</tt>'', &quot;<tt>DCF</tt>'' or &quot;<tt>WWVB</tt>'' to indicate the time source.</p>
+ <p>This documentation describes v1.3 (2003/2/21) of the source and has been tested against ntpd 4.1.0 on linux x86. Changes from v1.1 and v1.2 include patches to work with the new ntp-4 code, clock support for DCF and WWVB configurable via mode flag, an option to ignore resync request (for those of us at the fringes of the WWVB signal, for instance), averaging of the signal quality poll and several bug fixes, code cleanup and standardizations. In all other respects, the driver works as per v1.1 if a mode is not specified.</p>
+ <p>To use the alternate modes, the mode flag must be specified. If the mode flag is 0, or unspecified, the original MSF version is assumed. This should assure backwards compatibility and should not break existing setups.</p>
+ <p>The previous documentation described version V1.1 (1997/06/23) of the source and had been tested (amongst others) against ntpd3-5.90 on Solaris-1 (SunOS 4.1.3_U1 on an SS1 serving as a router and firewall) and against ntpd3-5.90 on Solaris-2.5 (on a SS1+ and TurboSPARC 170MHz). That code will claimed increased stability, reduced jitter and more efficiency (fewer context switches) with the <tt>tty_clk</tt> discipline/STREAMS module installed, but this has not been tested. For a to-do list see the comments at the start of the code.</p>
+ <p>This code has been significantly slimmed down since the V1.0 version, roughly halving the memory footprint of its code and data.</p>
+ <p>This driver is designed to allow the unit to run from batteries as designed, for something approaching the 2.5 years expected in the usual stand-alone mode, but no battery-life measurements have been taken.</p>
+ <p>Much of this code is originally from the other refclock driver files with thanks. The code was originally made to work with the clock by <a href="mailto:derek@toybox.demon.co.uk">Derek Mulcahy</a>, with modifications by <a href="mailto:d@hd.org">Damon Hart-Davis</a>. Thanks also to <a href="mailto:lyndond@sentinet.co.uk">Lyndon David</a> for some of the specifications of the clock. <a href="mailto:palfille@partners.org">Paul Alfille</a> added support for the WWVB clock. <a href="mailto:cprice@cs-home.com">Christopher Price</a> added enhanced support for the MSF, DCF and WWVB clocks.</p>
+ <p>There is support for a Tcl/Tk monitor written by Derek Mulcahy that examines the output stats; see the <a href="http://www2.exnet.com/NTP/ARC/ARC.html">ARC Rugby MSF Receiver</a> page for more details and the code. Information on the WWVB version is available from <a href="http://www.arctime.com">Atomic Time</a> as their <a href="http://www.atomictime.com/Product17.html">Atomic Time PC</a>.</p>
+ <p>Look at the notes at the start of the code for further information; some of the more important details follow.</p>
+ <p>The driver interrogates the clock at each poll (ie every 64s by default) for a timestamp. The clock responds at the start of the next second (with the start bit of the first byte being on-time). In the default or original MSF mode, the time is in `local' format, including the daylight savings adjustment when it is in effect. The driver code converts the time back to UTC. In modes 1-3 the driver can be configured for UTC or local time depending on the setting of flag1.</p>
+ <p>The clock claims to be accurate to within about 20ms of the broadcast time, and given the low data transmission speed from clock to host, and the fact that the clock is not in continuous sync with MSF, it seems sensible to set the `precision' of this clock to -5 or -4, -4 being used in this code, which builds in a reported dispersion of over 63ms (ie says ``This clock is not very good.''). You can improve the reported precision to -4 (and thus reduce the base dispersion to about 31ms) by setting the fudge <tt>flag3</tt> to <tt>1</tt>.</p>
+ <p>Even a busy and slow IP link can yield lower dispersions than this from polls of primary time servers on the Internet, which reinforces the idea that this clock should be used as a backup in case of problems with such an IP link, or in the unfortunate event of failure of more accurate sources such as GPS.</p>
+ <p>By default this clock reports itself to be at stratum 2 rather than the usual stratum 0 for a refclock, because it is not really suited to be used as other than a backup source. The stratum reported can be changed with the <tt>stratum</tt> directive to be whatever you like. After careful monitoring of your clock, and appropriate choice of the <tt>time1</tt> fudge factor to remove systematic errors in the clock's reported time, you might fudge the clock to stratum 1 to allow a stratum-2 secondary server to sync to it.</p>
+ <p>In default mode, the driver code arranges to resync the clock to MSF at intervals of a little less than an hour (deliberately avoiding the same time each hour to avoid any systematic problems with the signal or host). Whilst resyncing, the driver supplements the normal polls for time from the clock with polls for the reception signal quality reported by the clock. If the signal quality is too low (0--2 out of a range of 0--5), we chose not to trust the clock until the next resync (which we bring forward by about half an hour). If we don't catch the resync, and so don't know the signal quality, we do trust the clock (because this would generally be when the signal is very good and a resync happens quickly), but we still bring the next resync forward and reduce the reported precision (and thus increase reported dispersion).</p>
+ <p>If we force resyncs to MSF too often we will needlessly exhaust the batteries the unit runs from. During clock resync this driver tries to take enough time samples to avoid <tt>ntpd</tt> losing sync in case this clock is the current peer. By default the clock would only resync to MSF about once per day, which would almost certainly not be acceptable for NTP purposes.</p>
+ <p>The driver does not force an immediate resync of the clock to MSF when it starts up to avoid excessive battery drain in case <tt>ntpd</tt> is going to be repeatedly restarted for any reason, and also to allow enough samples of the clock to be taken for <tt>ntpd</tt> to sync immediately to this clock (and not remain unsynchronised or to sync briefly to another configured peer, only to hop back in a few poll times, causing unnecessary disturbance). This behaviour should not cause problems because the driver will not accept the timestamps from the clock if the status flag delivered with the time code indicates that the last resync attempt was unsuccessful, so the initial timestamps will be close to reality, even if with up to a day's clock drift in the worst case (the clock by default resyncs to MSF once per day).</p>
+ <p>When alternate modes 1-3 are selected, the driver can be configured to ignore the resync requests by setting <tt>flag2</tt> to 1. This allows clocks at the fringe of the signal to resync at night when signals are stronger.</p>
+ <p>The clock has a peculiar RS232 arrangement where the transmit lines are powered from the receive lines, presumably to minimise battery drain. This arrangement has two consequences:</p>
+ <ul>
+ <li>Your RS232 interface must drive both +ve and -ve
+ <li>You must (in theory) wait for an echo and a further 10ms between characters
+ </ul>
+ <p>This driver, running on standard Sun and x86 hardware, seems to work fine; note the use of the <tt>send_slow()</tt> routine to queue up command characters to be sent once every two seconds.</p>
+ <p>Three commands are sent to the clock by this driver. Each command consists of a single letter (of which only the bottom four bits are significant), followed by a CR (ASCII 13). Each character sent to the clock should be followed by a delay to allow the unit to echo the character, and then by a further 10ms. Following the echo of the command string, there may be a response (ie in the case of the <tt>g</tt> and <tt>o</tt> commands below), which in the case of the <tt>o</tt> command may be delayed by up to 1 second so as the start bit of the first byte of the response can arrive on time. The commands and their responses are:</p>
+ <dl>
+ <dt><tt>g</tt> CR
+ <dd>Request for signal quality. Answer only valid during (late part of) resync to MSF signal. The response consists of two characters as follows:
+ <dl compact>
+ <dt>bit 7
+ <dd>parity
+ <dt>bit 6
+ <dd>always 0
+ <dt>bit 5
+ <dd>always 1
+ <dt>bit 4
+ <dd>always 1
+ <dt>bit 3
+ <dd>always 0
+ <dt>bit 2
+ <dd>always 0
+ <dt>bit 1
+ <dd>always 1
+ <dt>bit 0
+ <dd>= 0 if no reception attempt at the moment, = 1 if reception attempt (ie resync) in progress
+ </dl>
+ <dl compact>
+ <dt>bit 7
+ <dd>parity
+ <dt>bit 6
+ <dd>always 0
+ <dt>bit 5
+ <dd>always 1
+ <dt>bit 4
+ <dd>always 1
+ <dt>bit 3
+ <dd>always 0
+ <dt>bit 2--0
+ <dd>reception signal quality in the range 0--5 (very poor to very good); if in the range 0--2 no successful reception is to be expected. The reported value drops to zero when not resyncing, ie when first returned byte is not `3'.
+ </dl>
+ <dt><tt>h</tt> CR
+ <dd>Request to resync to signal. Can take up from about 30s to 360s. Drains batteries so should not be used excessively. After this the clock time and date should be correct and the phase within 20ms of time as transmitted from the source signal (remember to allow for propagation time). By default the clock resyncs once per day in the late evening/early morning (presumably to catch transitions to/from daylight saving time quickly). This driver code, by default, resyncs at least once per hour to minimise clock wander.
+ <dt><tt>o</tt> CR
+ <dd>Request timestamp. Start bit of first byte of response is on-time, so may be delayed up to 1 second. Note that the driver will convert time to GMT, if required. The response data is as follows:
+ <ol>
+ <li>hours tens (hours range from 00 to 23)
+ <li>hours units
+ <li>minutes tens (minutes range from 00 to 59)
+ <li>minutes units
+ <li>seconds tens (seconds presumed to range from 00 to 60 to allow for leap second)
+ <li>seconds units
+ <li>day of week 1 (Monday) to 7 (Sunday)
+ <li>day of month tens (day ranges from 01 to 31)
+ <li>day of month units
+ <li>month tens (months range from 01 to 12)
+ <li>month units
+ <li>year tens (years range from 00 to 99)
+ <li>year units
+ <li>BST/UTC status (Ignored in WWVB version)
+ <dl compact>
+ <dt>bit 7
+ <dd>parity
+ <dt>bit 6
+ <dd>always 0
+ <dt>bit 5
+ <dd>always 1
+ <dt>bit 4
+ <dd>always 1
+ <dt>bit 3
+ <dd>(MSF) always 0<br>
+ (WWVB) Leap year indicator bit<br>
+ 0 = non-leap year<br>
+ 1 = leap year
+ <dt>bit 2
+ <dd>= (MSF) 1 if UTC is in effect (reverse of bit 1)<br>
+ (WWVB) Leap second warning bit
+ <dt>bit 1
+ <dd>= (MSF)1 if BST is in effect (reverse of bit 2)<br>
+ = (WWVB) 0 if ST is in effect, 1 if DST is in effect, 1 if transition from ST with bit 0 is set to 0
+ <dt>bit 0
+ <dd>= (MSF)1 if BST/UTC change pending<br>
+ = (WWVB) 0 if ST is in effect, 1 if DST is in effect, 0 if transition from DST with bit 1 is set to 0
+ </dl>
+ <li>clock status
+ <dl compact>
+ <dt>bit 7
+ <dd>parity
+ <dt>bit 6
+ <dd>always 0
+ <dt>bit 5
+ <dd>always 1
+ <dt>bit 4
+ <dd>always 1
+ <dt>bit 3
+ <dd>= 1 if low battery is detected
+ <dt>bit 2
+ <dd>= 1 if last resync failed (though officially undefined for the MSF clock, officially defined for WWVB)
+ <dt>bit 1
+ <dd>= 1 if at least one reception attempt was successful<br>
+ (MSF) since 0230<br>
+ (DCF) since 0300<br>
+ (WWVB) resets if not successful between 0300-0400
+ <dt>bit 0
+ <dd>= 1 if the clock has valid time---reset to zero when clock is reset (eg at power-up), and set to 1 after first successful resync attempt.
+ </dl>
+ </ol>
+ <p>The driver only accepts time from the clock if the bottom three bits of the status byte are <tt>011</tt> or <tt>flag2</tt> is set to 1 to ignore resync requests. For the MSF clock, if the UK parliament decides to move us to +0100/+0200 time as opposed to the current +0000/+0100 time, it is not clear what effect that will have on the time broadcast by MSF, and therefore on this driver's usefulness.</p>
+ </dl>
+ <p>A typical <tt>ntp.conf</tt> configuration file for this driver might be:</p>
+ <pre># hostname(n) means we expect (n) to be the stratum at which hostname runs.
+
+#------------------------------------------------------------------------------
+# SYNCHRONISATION PARTNERS
+# ========================
+
+# Default configuration (Original MSF mode)s...
+server 127.127.27.0 mode 333 # ARCRON MSF radio clock
+# Fudge stratum and other features as required.
+# ADJUST time1 VALUE FOR YOUR HOST, CLOCK AND LOCATION!
+fudge 127.127.27.0 stratum 1 time1 0.016 flag3 1
+# WWVB users should change that line to:
+server 127.127.27.0 mode 3 # ARCRON WWVB radio clock
+fudge 127.127.27.0 stratum 1 time1 0.030 flag1 1 flag3 1
+
+peer 11.22.33.9 # tick(1--2).
+peer 11.22.33.4 # tock(3), boot/NFS server.
+
+# This shouldn't get swept away unless left untouched for a long time.
+driftfile /var/tmp/ntp.drift
+
+#------------------------------------------------------------------------------
+# RESTRICTIONS
+# ============
+
+# By default, don't trust and don't allow modifications.&nbsp; Ignore in fact.
+restrict default ignore notrust nomodify
+
+# Allow others in our subnet to check us out...
+restrict 11.22.33.0 mask 255.255.255.0 nomodify notrust
+
+# Trust our peers for time.&nbsp; Don't trust others in case they are insane.
+restrict 127.127.27.0 nomodify
+restrict 11.22.33.4 nomodify
+restrict 11.22.33.9 nomodify
+
+# Allow anything from the local host.
+restrict 127.0.0.1</pre>
+ There are a few <tt>#define</tt>s in the code that you might wish to play with:
+ <dl>
+ <dt><tt>ARCRON_KEEN</tt>
+ <dd>With this defined, the code is relatively trusting of the clock, and assumes that you will have the clock as one of a few time sources, so will bend over backwards to use the time from the clock when available and avoid <tt>ntpd</tt> dropping sync from the clock where possible. You may wish to undefine this, especially if you have better sources of time or your reception is ropey. However, there are many checks built in even with this flag defined.
+ <dt><tt>ARCRON_MULTIPLE_SAMPLES</tt>
+ <dd>When is defined, we regard each character in the returned timecode as at a known delay from the start of the second, and use the smallest (most negative) offset implied by any such character, ie with the smallest kernel-induced display, and use that. This helps to reduce jitter and spikes.
+ <dt><tt>ARCRON_LEAPSECOND_KEEN</tt>
+ <dd>When is defined, we try to do a resync to MSF as soon as possible in the first hour of the morning of the first day of the first and seventh months, ie just after a leap-second insertion or deletion would happen if it is going to. This should help compensate for the fact that this clock does not continuously sample MSF, which compounds the fact that MSF itself gives no warning of an impending leap-second event. This code did not seem functional at the leap-second insertion of 30th June 1997 so is by default disabled.
+ <dt><tt>PRECISION</tt>
+ <dd>Currently set to <tt>-4</tt>, but you may wish to set it to <tt>-5</tt> if you are more conservative, or to <tt>-6</tt> if you have particularly good experience with the clock and you live on the edge. Note that the <tt>flag3</tt> fudge value will improve the reported dispersion one notch if clock signal quality is known good. So maybe just leave this alone.
+ </dl>
+ <h4>Monitor Data</h4>
+ <p>Each timecode is written to the <tt>clockstats</tt> file with a signal quality value appended (`0'--`5' as reported by the clock, or `6' for unknown).</p>
+ <p>Each resync and result (plus gaining or losing MSF sync) is logged to the system log at level <tt>LOG_NOTICE</tt>; note that each resync drains the unit's batteries, so the syslog entry seems justified.</p>
+ <p>Syslog entries are of the form:</p>
+ <pre>May 10 10:15:24 oolong ntpd[615]: ARCRON: unit 0: sending resync command
+May 10 10:17:32 oolong ntpd[615]: ARCRON: sync finished, signal quality 5: OK, will use clock
+May 10 11:13:01 oolong ntpd[615]: ARCRON: unit 0: sending resync command
+May 10 11:14:06 oolong ntpd[615]: ARCRON: sync finished, signal quality -1: UNKNOWN, will use clock anyway
+May 10 11:41:49 oolong ntpd[615]: ARCRON: unit 0: sending resync command
+May 10 11:43:57 oolong ntpd[615]: ARCRON: sync finished, signal quality 5: OK, will use clock
+May 10 12:39:26 oolong ntpd[615]: ARCRON: unit 0: sending resync command
+May 10 12:41:34 oolong ntpd[615]: ARCRON: sync finished, signal quality 3: OK, will use clock</pre>
+ <h4>Fudge Factors</h4>
+ <p></p>
+ <dl>
+ <dt><tt>mode 0 | 1 | 2 | 3</tt>
+ <dd>Specifies the clock hardware model. This parameter is optional, it defaults to the original mode of operation.
+ <dd>Supported modes of operation:
+ <dd>0 - Default, Original MSF
+ <dd>1 - Updated MSF
+ <dd>2 - New DCF77
+ <dd>3 - New WWVB
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. On a Sun SparcStation 1 running SunOS 4.1.3_U1, with the receiver in London, a value of 0.020 (20ms) seems to be appropriate.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not currently used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 2. It is suggested that the clock be not be fudged higher than stratum 1 so that it is used a backup time source rather than a primary when more accurate sources are available.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>MSFa</tt>. When used in modes 1-3, the driver will report either <tt>MSF</tt>, <tt>DCF</tt>, or <tt>WWVB</tt> respectively.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>(Modes 1-3) If set to 0 (the default), the clock is set to UTC time. If set to 1, the clock is set to localtime.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>(Modes 1-3) If set to 0 (the default), the clock will be forced to resync approximately every hour. If set to 1, the clock will resync per normal operations (approximately midnight).
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>If set to 1, better precision is reported (and thus lower dispersion) while clock's received signal quality is known to be good.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a><br>
+ <a href="http://www2.exnet.com/NTP/ARC/ARC.html">ARC Rugby MSF Receiver</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver28.html b/html/drivers/driver28.html
new file mode 100644
index 0000000..8c7fd80
--- /dev/null
+++ b/html/drivers/driver28.html
@@ -0,0 +1,147 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Shared Memory Driver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Shared Memory Driver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->8-Aug-2014 19:17<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.28.<i>u</i><br>
+ Reference ID: <tt>SHM</tt><br>
+ Driver ID: <tt>SHM</tt></p>
+
+ <h4>Description</h4>
+ <p>This driver receives its reference clock info from a shared memory-segment. The shared memory-segment is created with owner-only access for unit 0 and 1, and world access for unit 2 and 3</p>
+
+ <h4>Structure of shared memory-segment</h4>
+ <pre>struct shmTime {
+ int mode; /* 0 - if valid is set:
+ * use values,
+ * clear valid
+ * 1 - if valid is set:
+ * if count before and after read of data is equal:
+ * use values
+ * clear valid
+ */
+ volatile int count;
+ time_t clockTimeStampSec;
+ int clockTimeStampUSec;
+ time_t receiveTimeStampSec;
+ int receiveTimeStampUSec;
+ int leap;
+ int precision;
+ int nsamples;
+ volatile int valid;
+ unsigned clockTimeStampNSec; /* Unsigned ns timestamps */
+ unsigned receiveTimeStampNSec; /* Unsigned ns timestamps */
+ int dummy[8];
+};</pre>
+
+ <h4>Operation mode=0</h4>
+ <p>Each second, the value of <code>valid</code> of the shared memory-segment is checked:</p>
+ <p>If set, the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are passed to ntp, and <code>valid</code> is cleared and <code>count</code> is bumped.</p>
+ <p>If not set, <code>count</code> is bumped.</p>
+ <h4>Operation mode=1</h4>
+ <p>Each second, <code>valid</code> in the shared memory-segment is checked:</p>
+ <p>If set, the <code>count</code> field of the record is remembered, and the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are read. Then, the remembered <code>count</code> is compared to current value of <code>count</code> now in the record. If both are equal, the values read from the record are passed to ntp. If they differ, another process has modified the record while it was read out (was not able to produce this case), and failure is reported to ntp. The <code>valid</code> flag is cleared and <code>count</code> is bumped.</p>
+ <p>If not set, <code>count</code> is bumped</p>
+
+<h4>Mode-independent postprocessing</h4>
+After the time stamps have been successfully plucked from the SHM
+segment, some sanity checks take place:
+<ul>
+ <li>The receive time stamp of the SHM data must be in the last 5
+ seconds before the time the data is processed. This helps in weeding
+ out stale data.
+ <li>If the absolute difference between remote and local clock
+ exceeds the limit (either <i>time2</i> or the default of 4hrs), then
+ the sample is discarded. This check is disabled when <i>flag1</i> is
+ set to 1.
+</ul>
+
+<h4>gpsd</h4>
+
+<a href="http://gpsd.berlios.de/"><i>gpsd</i></a>
+knows how to talk to many GPS devices.
+It can work with <i>ntpd</i> through the SHM driver.
+<P>
+The <i>gpsd</i> man page suggests setting minpoll and maxpoll to 4.
+That was an attempt to reduce jitter.
+The SHM driver was fixed (ntp-4.2.5p138) to collect data each second rather than
+once per polling interval so that suggestion is no longer reasonable.
+<P>
+ <b>Note:</b> The GPSD client driver (type 46) uses the <i>gpsd</i>
+ client protocol to connect and talk to <i>gpsd</i>, but using the
+ SHM driver is the ancient way to have <i>gpsd</i> talk to <i>ntpd</i>.
+
+<h4>Clockstats</h4>
+If flag4 is set when the driver is polled, a clockstats record is written.
+The first 3 fields are the normal date, time, and IP address common to all clockstats records.
+<P>
+The 4th field is the number of second ticks since the last poll.
+The 5th field is the number of good data samples found. The last 64 will be used by ntpd.
+The 6th field is the number of sample that didn't have valid data ready.
+The 7th field is the number of bad samples.
+The 8th field is the number of times the the mode 1 info was update while nptd was trying to grab a sample.
+<P>
+
+Here is a sample showing the GPS reception fading out:
+<pre>
+54364 84927.157 127.127.28.0 66 65 1 0 0
+54364 84990.161 127.127.28.0 63 63 0 0 0
+54364 85053.160 127.127.28.0 63 63 0 0 0
+54364 85116.159 127.127.28.0 63 62 1 0 0
+54364 85180.158 127.127.28.0 64 63 1 0 0
+54364 85246.161 127.127.28.0 66 66 0 0 0
+54364 85312.157 127.127.28.0 66 50 16 0 0
+54364 85375.160 127.127.28.0 63 41 22 0 0
+54364 85439.155 127.127.28.0 64 64 0 0 0
+54364 85505.158 127.127.28.0 66 36 30 0 0
+54364 85569.157 127.127.28.0 64 0 64 0 0
+54364 85635.157 127.127.28.0 66 0 66 0 0
+54364 85700.160 127.127.28.0 65 0 65 0 0
+</pre>
+
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Maximum allowed difference between remote and local
+ clock, in seconds. Values <1.0 or >86400.0 are ignored, and the
+ default value of 4hrs (14400s) is used instead. See also flag 1.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>SHM</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd><i>Skip</i> the difference limit check if set. Useful
+ for systems where the RTC backup cannot keep the time over
+ long periods without power and the SHM clock must be able
+ to force long-distance initial jumps. <i>Check</i> the
+ difference limit if cleared (default).
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>If flag4 is set, clockstats records will be written when the driver is polled.
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
+
diff --git a/html/drivers/driver29.html b/html/drivers/driver29.html
new file mode 100644
index 0000000..4939d80
--- /dev/null
+++ b/html/drivers/driver29.html
@@ -0,0 +1,1093 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <title>Trimble Palisade and Thunderbolt Receivers</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+ <h1><font size="+2">Trimble Palisade and Thunderbolt Receivers</font>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ </h1>
+ <table>
+ <tr>
+ <td>
+ <h2><img src="../pic/driver29.gif" alt="gif" nosave height="100" width="420"></h2>
+ </td>
+ <td>
+ <h2><img src="../pic/thunderbolt.jpg" alt="jpg" nosave height="270" width="420"></h2>
+ </td>
+ </tr>
+ </table>
+ <h2><font size="+1">Synopsis</font></h2>
+ <table>
+ <tr>
+ <td>
+ <div align="right">
+ <tt>Address:&nbsp;</tt></div>
+ </td>
+ <td><b>127.127.29.<i>u</i></b></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="right">
+ <tt>Reference ID:</tt></div>
+ </td>
+ <td><a name="REFID"></a><b>GPS</b></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="right">
+ <tt>Driver ID:</tt></div>
+ </td>
+ <td><b>GPS_PALISADE</b></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="right">
+ <tt>Serial Port:</tt></div>
+ </td>
+ <td><b>/dev/palisade<i>u</i></b></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="right">
+ <tt><font size="+1">Serial I/O:</font></tt></div>
+ </td>
+ <td><b>9600 baud, 8-bits, 1-stop, odd parity</b></td>
+ </tr>
+ <tr>
+ <td>
+ <div align="right">
+ <tt><font size="+1">Serial I/O (Thunderbolt):</font></tt></div>
+ </td>
+ <td><b>9600 baud, 8-bits, 1-stop, no parity</b></td>
+ </tr>
+ </table>
+ <h2><font size="+1">Description</font></h2>
+ The <b>refclock_palisade</b> driver supports <a href="http://www.trimble.com/products/ntp">Trimble Navigation's Palisade Smart Antenna GPS receiver</a>.<br>
+ Additional software and information about the Palisade GPS is available from: <a href="http://www.trimble.com/oem/ntp">http://www.trimble.com/oem/ntp</a>.<br>
+ Latest NTP driver source, executables and documentation is maintained at: <a href="ftp://ftp.trimble.com/pub/ntp">ftp://ftp.trimble.com/pub/ntp</a>
+ <p>This documentation describes version 7.12 of the GPS Firmware and version 2.46 (July 15, 1999) and later, of the driver source.<br>&nbsp;</p>
+ <p>This documentation describes version 1 of the Thunderbolt Receiver Firmware, no tests have been made on further firmwares, please read "Notes on the Thunderbolt Receiver's Firmware" at the end of this documentation for more information.</p>
+ <h2><font size="+1">Operating System Compatibility</font></h2>
+ The Palisade driver has been tested on the following software and hardware platforms:<br>&nbsp;
+ <center>
+ <table>
+ <tr>
+ <td valign="CENTER" width="23%">Platform</td>
+ <td valign="CENTER">Operating System</td>
+ <td>NTP Sources</td>
+ <td>Accuracy</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="23%">i386 (PC)&nbsp;</td>
+ <td valign="CENTER">Linux</td>
+ <td>NTP Distribution</td>
+ <td>10 us</td>
+ </tr>
+ <tr>
+ <td>i386 (PC)&nbsp;</td>
+ <td>Windows NT</td>
+ <td><a href="ftp://ftp.trimble.com/pub/ntp">ftp://ftp.trimble.com/pub/ntp</a></td>
+ <td>1 ms</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="23%">SUN</td>
+ <td valign="CENTER">Solaris 2.x</td>
+ <td>NTP Distribution</td>
+ <td>50 us</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="23%">Hewlett-Packard</td>
+ <td valign="CENTER">HPUX 9, 10, 11</td>
+ <td><a href="http://us-support.external.hp.com">http://us-support.external.hp.com</a></td>
+ <td>50 us</td>
+ </tr>
+ <tr>
+ <td>Various</td>
+ <td>Free BSD</td>
+ <td>NTP Distribution</td>
+ <td>20 us</td>
+ </tr>
+ </table>
+ </center><P>
+ <b>Attention</b>: Thunderbolt Receiver has not being tested on the previous software and hardware plataforms.
+ <h2><font size="+1">GPS Receiver</font></h2>
+ The Palisade GPS receiver is an 8-channel smart antenna, housing the GPS receiver, antenna and interface in a single unit, and is designed for rooftop deployment in static timing applications.
+ <p>Palisade generates a PPS synchronized to UTC within +/- 100 ns.&nbsp; The Palisade's external event input with 40 nanosecond resolution is utilized by the Palisade NTP driver for asynchronous precision time transfer.</p>
+ <p>No user initialization of the receiver is required. This driver is compatible with the following versions of Palisade:<br>&nbsp;</p>
+ <center>
+ <table>
+ <tr>
+ <td valign="CENTER">
+ <center>
+ Version</center>
+ </td>
+ <td valign="TOP">
+ <center>
+ Event Input</center>
+ </td>
+ <td valign="CENTER">
+ <center>
+ Trimble Part Number</center>
+ </td>
+ </tr>
+ <tr>
+ <td valign="CENTER">
+ <center>
+ 7.02</center>
+ </td>
+ <td valign="TOP">
+ <center>
+ No</center>
+ </td>
+ <td valign="CENTER">
+ <center>
+ 26664-00</center>
+ </td>
+ </tr>
+ <tr>
+ <td align="CENTER" valign="CENTER">
+ <center>
+ 7.02E</center>
+ </td>
+ <td valign="TOP">
+ <center>
+ Yes</center>
+ </td>
+ <td valign="CENTER">
+ <center>
+ 26664-10</center>
+ </td>
+ </tr>
+ <tr>
+ <td valign="CENTER">
+ <center>
+ 7.12</center>
+ </td>
+ <td valign="TOP">
+ <center>
+ Yes</center>
+ </td>
+ <td valign="CENTER">
+ <center>
+ 38158-00</center>
+ </td>
+ </tr>
+ </table>
+ </center>
+ <dl>
+ <dl>
+ Note: When using Palisade 26664-00, you must set fudge flag2 to 1 in <b>ntp.conf</b>. See <a href="#Configuration">configuration</a>.
+ </dl>
+ <dl>
+ <h3><font size="+1">GPS&nbsp;<a name="Installation"></a>Installation</font></h3>
+ A location with unobstructed view of the horizon is recommended. Palisade is designed to be securely mounted atop standard 3/4 inch threaded pipe.
+ <p>The 12 conductor (dia. 10 mm)&nbsp; power and I/O cable must be routed from the rooftop site to the NTP server and properly strain relieved.</p>
+ <h3><font size="+1">GPS&nbsp;<a name="Connection"></a>Connection</font></h3>
+ The Palisade is equipped with dual (A &amp; B) RS-422 serial interfaces and a differential TTL PPS output. An RS-232 / RS-422 Interface Module is supplied with the Palisade NTP Synchronization Kit. Palisade <a href="#PortA">port A</a> must be connected to the NTP host server. Maximum antenna cable length is 500 meters. See the <a href="#Pinouts">pinouts</a> table for detailed connection Information.
+ <p>Palisade's <a href="#PortB">port B</a> provides a TSIP (Trimble Standard Interface Protocol) interface for diagnostics, configuration, and monitoring. Port B and the PPS output are not currently used by the Palisade NTP reference clock driver.<br>&nbsp;</p>
+ </dl>
+ </dl>
+ <h2><font size="+1">O/S Serial Port Configuration</font></h2>
+ The driver attempts to open the device <b><tt><a href="#REFID">/dev/palisade<i>u</i></a></tt></b> where <b><i>u</i></b> is the NTP refclock unit number as defined by the LSB of the refclock address.&nbsp; Valid refclock unit numbers are 0 - 3.
+ <p>The user is expected to provide a symbolic link to an available serial port device.&nbsp; This is typically performed by a command such as:</p>
+ <blockquote>
+ <tt>ln -s /dev/ttyS0 /dev/palisade0</tt></blockquote>
+ Windows NT does not support symbolic links to device files. COM<b>x</b>: is used by the driver, based on the refclock unit number, where unit 1 corresponds to COM<b>1</b>: and unit 3 corresponds to COM3:<br>&nbsp;
+ <h2><a name="Configuration"></a><font size="+1">NTP Configuration</font></h2>
+ Palisade NTP configuration file <b><tt>&quot;ntp.conf&quot;</tt></b> with event polling:<br>
+ <tt>#------------------------------------------------------------------------------</tt><br>
+ <tt># The Primary reference</tt><br>
+ <tt>server 127.127.29.0 # Trimble Palisade GPS Refclock Unit #0</tt><br>
+ <tt>peer terrapin.csc.ncsu.edu # internet server</tt><br>
+ <tt># Drift file for expedient re-synchronization after downtime or reboot.</tt><br>
+ <tt>driftfile /etc/ntp.drift</tt><br>
+ <tt>#------------------------------------------------------------------------------</tt>
+ <p>Configuration without event polling:<br>
+ <tt>#------------------------------------------------------------------------------</tt><br>
+ <tt># The Primary reference</tt><br>
+ <tt>server 127.127.29.0 # Trimble Palisade GPS (Stratum 1).</tt><br>
+ <tt># Set packet delay</tt><br>
+ <tt><a href="#time1">fudge 127.127.29.0 time1 0.020</a></tt><br>
+ <tt># and set flag2 to turn off event polling.</tt><br>
+ <tt><a href="#flag2">fudge 127.127.29.0 flag2 1</a></tt><br>
+ <tt>#------------------------------------------------------------------------------</tt><br>&nbsp;</p>
+
+ <h4>Thunderbolt NTP Configuration file</h4>
+ <tt>#------------------------------------------------------------------------------</tt>
+ <p>Configuration without event polling:<br>
+ <tt>#------------------------------------------------------------------------------</tt><br>
+ <tt># The Primary reference</tt><br>
+ <tt>server 127.127.29.0 mode 2 # Trimble Thunderbolt GPS (Stratum 1).</tt><br>
+ <tt># Set packet delay</tt><br>
+ <tt><a href="#time1">fudge 127.127.29.0 time1 0.020</a></tt><br>
+ <tt># and set flag2 to turn off event polling.</tt><br>
+ <tt><a href="#flag2">fudge 127.127.29.0 flag2 1</a></tt><br>
+ <tt>#------------------------------------------------------------------------------</tt><br>&nbsp;</p>
+ Currently the Thunderbolt mode doesn't support event polling, the reasons are explained on the "Notes on the Thunderbolt Receiver's Firmware" section at the end of this documentation.
+ <h2><a name="TimeTransfer"></a><font size="+1">Time Transfer and Polling</font></h2>
+ Time transfer to the NTP host is performed via the Palisade's comprehensive time packet output. The time packets are output once per second, and whenever an event timestamp is requested.
+ <p>The driver requests an event time stamp at the end of each polling interval, by pulsing the RTS (request to send) line on the serial port. The Palisade GPS responds with a time stamped event packet.</p>
+ <p>Time stamps are reported by the Palisade with respect to UTC time. The GPS receiver must download UTC offset information from GPS satellites. After an initial UTC download, the receiver will always start with correct UTC offset information.<br>&nbsp;</p>
+ <h2><font size="+1">Run NTP in Debugging Mode</font></h2>
+ The following procedure is recommended for installing and testing a Palisade NTP driver:
+ <ol>
+ <li>Perform initial checkout procedures. Place the GPS receiver outdoors; with clear view of the sky. Allow the receiver to obtain an UTC almanac.
+ <li>Verify presence of timing packets by observing the 1 Hz (PPS) led on the interface module. It should flash once per second.
+ <li>Connect Palisade's port A to the NTP host.
+ <li>Configure NTP and the serial I/O port on the host system.
+ <li>Initially use <tt><a href="#flag2">fudge flag2</a></tt> in <b><a href="#Configuration">ntp.conf</a>,</b> to disable event polling (see configuration).
+ <li>Run NTP in debug mode (-d -d), to observe Palisade_receive events.
+ <li>The driver reports the <a href="#TrackingStatus">tracking status of the receiver</a>. Make sure it is tracking several satellites.
+ <li>Remove fudge flag2 and restart <b>ntpd</b> in debug mode to observe palisade_receive events.
+ <li>If event polling fails, verify the <a href="#Pinouts">connections</a> and that the host hardware supports RTS control.
+ </ol>
+ <h2><font size="+1">Event Logging</font></h2>
+ System and Event log entries are generated by NTP to report significant system events. Administrators should monitor the system log to observe NTP error messages. Log entries generated by the Palisade NTP reference clock driver will be of the form:
+ <blockquote>
+ <pre>Nov 14 16:16:21 terrapin ntpd[1127]: Palisade #0: <i>message</i></pre>
+ </blockquote>
+ <h2><font size="+1">Fudge Factors</font></h2>
+ <dl>
+ <dt><a name="time1"></a><tt><font size="+1"><a href="#Configuration">time1 <i>time</i></a></font></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. If event capture is not used, time1 should be set to 20 milliseconds to correct serial line and operating system delays incurred in capturing time stamps from the synchronous packets.
+ <dt><tt><font size="+1">stratum <i>number</i></font></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt><font size="+1"><a href="#REFID">refid <i>string</i></a></font></tt>
+ <dd>Specifies the driver reference identifier, <b>GPS</b>.
+ <dt><a name="flag2"></a><tt><font size="+1"><a href="#Configuration">flag2 0 | 1</a></font></tt>
+ <dd>When set to 1, driver does not use hardware event capture. The synchronous packet output by the receiver at the beginning of each second is time stamped by the driver. If triggering the event pulse fails, the driver falls back to this mode automatically.
+ </dl>
+ <h2><font size="+1">Mode Parameter</font></h2>
+ <dl>
+ <dt><tt><font size="+1">mode <i>number</i></font></tt>
+ <dd>The mode parameter to the server command specifies the specific hardware this driver is for. The default is 0 for a normal Trimble Palisade. The other options are <b>1</b> for an <b>Endrun Praecis</b> in Trimble emulation mode, and <b>2</b> for the <b>Trimble Thunderbolt</b> GPS Disciplined Clock Receiver.
+ </dl>
+ <h2><font size="+1">DEFINEs</font></h2>
+ The following constants are defined in the driver source code. These defines may be modified to improve performance or adapt to new operating systems.<br>&nbsp;
+ <center>
+ <table border>
+ <tr>
+ <td><b>Label</b></td>
+ <td>Definition</td>
+ <td>Default Value</td>
+ </tr>
+ <tr>
+ <td>DEVICE</td>
+ <td>The serial port device to be used by the driver</td>
+ <td>/dev/palisade<b><i>u</i></b></td>
+ </tr>
+ <tr>
+ <td>PRECISION</td>
+ <td>Accuracy of time transfer</td>
+ <td>1 microsecond</td>
+ </tr>
+ <tr>
+ <td>CURRENT_UTC</td>
+ <td>Valid GPS - UTC offset</td>
+ <td>13</td>
+ </tr>
+ <tr>
+ <td>SPEED232</td>
+ <td>Host RS-232 baud rate</td>
+ <td>B9600</td>
+ </tr>
+ <tr>
+ <td>TRMB_MINPOLL&nbsp;</td>
+ <td>Minimum polling interval</td>
+ <td>5 (32 seconds)</td>
+ </tr>
+ <tr>
+ <td>TRMB_MAXPOLL</td>
+ <td>Maximum interval between polls</td>
+ <td>7 (128 seconds)</td>
+ </tr>
+ </table>
+ </center>
+ <h2><a name="DataFormat"></a><font size="+1">Data Format</font></h2>
+ Palisade port A can output two synchronous time packets. The NTP driver can use either packet for synchronization. Packets are formatted as follows:
+ <h3><b><font size="+0">Packet 8F-AD (Primary NTP Packet)</font></b></h3>
+ <center>
+ <table>
+ <tr>
+ <td>Byte</td>
+ <td>Item</td>
+ <td>Type</td>
+ <td>Meaning</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>Sub-Packet ID</td>
+ <td>BYTE</td>
+ <td>Subcode 0xAD</td>
+ </tr>
+ <tr>
+ <td>1 - 2</td>
+ <td>Event Count</td>
+ <td>INTEGER</td>
+ <td>External event count recorded (0 = PPS)</td>
+ </tr>
+ <tr>
+ <td>3 - 10</td>
+ <td>Fractional Second</td>
+ <td>DOUBLE</td>
+ <td>Time elapsed in current second (s)</td>
+ </tr>
+ <tr>
+ <td>11</td>
+ <td>Hour</td>
+ <td>BYTE</td>
+ <td>Hour (0 - 23)</td>
+ </tr>
+ <tr>
+ <td>12</td>
+ <td>Minute</td>
+ <td>BYTE</td>
+ <td>Minute (0 - 59)</td>
+ </tr>
+ <tr>
+ <td>13</td>
+ <td>Second</td>
+ <td>BYTE</td>
+ <td>Second (0 - 59; 60 = leap)</td>
+ </tr>
+ <tr>
+ <td>14</td>
+ <td>Day</td>
+ <td>BYTE</td>
+ <td>Date (1 - 31)</td>
+ </tr>
+ <tr>
+ <td>15</td>
+ <td>Month</td>
+ <td>BYTE</td>
+ <td>Month (1 - 12)</td>
+ </tr>
+ <tr>
+ <td>16 - 17</td>
+ <td>Year</td>
+ <td>INTEGER</td>
+ <td>Year (4 digit)</td>
+ </tr>
+ <tr>
+ <td>18</td>
+ <td>Receiver Status</td>
+ <td>BYTE</td>
+ <td>Tracking Status</td>
+ </tr>
+ <tr>
+ <td>19</td>
+ <td>UTC Flags</td>
+ <td>BYTE</td>
+ <td>Leap Second Flags</td>
+ </tr>
+ <tr>
+ <td>20</td>
+ <td>Reserved</td>
+ <td>BYTE</td>
+ <td>Contains 0xFF</td>
+ </tr>
+ <tr>
+ <td>21</td>
+ <td>Reserved</td>
+ <td>BYTE</td>
+ <td>Contains 0xFF</td>
+ </tr>
+ </table>
+ </center>
+
+ <blockquote>
+ <h4>Leap Second Flag Definition:</h4>Bit 0:&nbsp; (1) UTC Time is available<br>
+ Bits 1 - 3: Undefined<br>Bit 4:&nbsp; (1) Leap Scheduled: Leap second pending asserted by GPS control segment.<br>Bit 5:&nbsp; (1) Leap Pending: set 24 hours before, until beginning of leap second.<br>Bit 6:&nbsp; (1) GPS Leap Warning: 6 hours before until 6 hours after leap event<br>Bit 7:&nbsp; (1) Leap In Progress. Only set during the leap second.
+ <h4><a name="TrackingStatus"></a>Tracking Status Flag Definitions:</h4>
+ </blockquote>
+ <center>
+ <table width="712" border="0" cellspacing="0">
+ <tr>
+ <td valign="CENTER" width="5%">Code</td>
+ <td valign="CENTER" width="59%">Meaning</td>
+ <td>Accuracy</td>
+ <td>Receiver Mode</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>Receiver is Navigating</td>
+ <td>+/- 1 us</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">1</td>
+ <td valign="CENTER" width="59%">Static 1 Sat. Timing Mode&nbsp;</td>
+ <td>+/- 1 us</td>
+ <td>1-D Timing</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">2</td>
+ <td valign="CENTER" width="59%">Approximate Time</td>
+ <td>20 - 50 ms</td>
+ <td>Acquisition</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">3</td>
+ <td valign="CENTER" width="59%">Startup</td>
+ <td>N/A</td>
+ <td>Initialization</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">4</td>
+ <td valign="CENTER" width="59%">Startup</td>
+ <td>N/A</td>
+ <td>Initialization</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">5</td>
+ <td valign="CENTER" width="59%">Dilution of Position too High&nbsp;</td>
+ <td>5 ppm</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">6</td>
+ <td valign="CENTER" width="59%">Static 1 Sat. Timing: Sat. not usable</td>
+ <td>5 ppm</td>
+ <td>1-D Timing</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">7</td>
+ <td valign="CENTER" width="59%">No Satellites Usable</td>
+ <td>N/A</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">8</td>
+ <td valign="CENTER" width="59%">Only 1 Satellite Usable</td>
+ <td>20 - 50 ms</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">9</td>
+ <td valign="CENTER" width="59%">Only 2 Satellite Usable</td>
+ <td>20 - 50 ms</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">10</td>
+ <td valign="CENTER" width="59%">Only 3 Satellites Usable</td>
+ <td>20 - 50 ms</td>
+ <td>Self Survey</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">11</td>
+ <td valign="CENTER" width="59%">Invalid Solution</td>
+ <td>N/A</td>
+ <td>Error</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">12</td>
+ <td valign="CENTER" width="59%">Differential Corrections&nbsp;</td>
+ <td>N/A</td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="5%">13</td>
+ <td valign="CENTER" width="59%">Overdetermined Fixes</td>
+ <td>+/- 100 ns</td>
+ <td>Timing Steady State</td>
+ </tr>
+ </table>
+ </center>
+ <h3><b><font size="+0">Packet 8F-0B (Comprehensive Timing Packet)</font></b></h3>
+ <center>
+ <table border="0" cellspacing="0">
+ <tr>
+ <td valign="CENTER" width="9%">Byte</td>
+ <td valign="CENTER" width="27%">Item</td>
+ <td valign="CENTER" width="16%">Type</td>
+ <td valign="CENTER" width="48%">Meaning</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">0</td>
+ <td valign="CENTER" width="27%">Sub-Packet ID</td>
+ <td valign="CENTER" width="16%">BYTE</td>
+ <td valign="CENTER" width="48%">Subcode 0x0B</td>
+ </tr>
+ <tr>
+ <td valign="TOP" width="9%">1 - 2</td>
+ <td valign="TOP" width="27%">Event Count</td>
+ <td valign="TOP" width="16%">INTEGER</td>
+ <td valign="TOP" width="48%">External event count recorded (0 = PPS)</td>
+ </tr>
+ <tr>
+ <td valign="TOP" width="9%">3 - 10</td>
+ <td valign="TOP" width="27%">UTC / GPS TOW</td>
+ <td valign="TOP" width="16%">DOUBLE</td>
+ <td valign="TOP" width="48%">UTC / GPS time of week (seconds)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">11</td>
+ <td valign="CENTER" width="27%">Date</td>
+ <td valign="CENTER" width="16%">BYTE</td>
+ <td valign="CENTER" width="48%">Day of Month</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">12</td>
+ <td valign="CENTER" width="27%">Month</td>
+ <td valign="CENTER" width="16%">BYTE</td>
+ <td valign="CENTER" width="48%">Month of Event</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">13 - 14</td>
+ <td valign="CENTER" width="27%">Year</td>
+ <td valign="CENTER" width="16%">INT</td>
+ <td valign="CENTER" width="48%">Year of event</td>
+ </tr>
+ <tr>
+ <td valign="TOP" width="9%">15</td>
+ <td valign="TOP" width="27%">Receiver Mode</td>
+ <td valign="TOP" width="16%">BYTE</td>
+ <td valign="TOP" width="48%">Receiver operating dimensions:&nbsp;<br>0: Horizontal (2D)&nbsp;<br>1: Full Position (3D)&nbsp;<br>2: Single Satellite (0D)&nbsp;<br>3: Automatic (2D / 3D)&nbsp;<br>4: DGPS reference&nbsp;<br>5: Clock hold (2D)&nbsp;<br>
+ 6: Over determined Clock</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">15 - 17</td>
+ <td valign="CENTER" width="27%">UTC Offset</td>
+ <td valign="CENTER" width="16%">INTEGER</td>
+ <td valign="CENTER" width="48%">UTC Offset value (seconds)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">18 - 25</td>
+ <td valign="CENTER" width="27%">Oscillator Bias</td>
+ <td valign="CENTER" width="16%">DOUBLE</td>
+ <td valign="CENTER" width="48%">Oscillator BIAS (meters)</td>
+ </tr>
+ <tr>
+ <td valign="TOP" width="9%">26 - 33</td>
+ <td valign="TOP" width="27%">Oscillator Drift Rate</td>
+ <td valign="TOP" width="16%">DOUBLE</td>
+ <td valign="TOP" width="48%">Oscillator Drift (meters / second)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">34 - 37</td>
+ <td valign="CENTER" width="27%">Bias Uncertainty</td>
+ <td valign="CENTER" width="16%">SINGLE</td>
+ <td valign="CENTER" width="48%">Oscillator bias uncertainty (meters)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">38 - 41</td>
+ <td valign="CENTER" width="27%">Drift Uncertainty</td>
+ <td valign="CENTER" width="16%">SINGLE</td>
+ <td valign="CENTER" width="48%">Oscillator bias rate uncertainty (m / sec)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">42 - 49</td>
+ <td valign="CENTER" width="27%">Latitude</td>
+ <td valign="CENTER" width="16%">DOUBLE</td>
+ <td valign="CENTER" width="48%">Latitude in radians</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">50 - 57</td>
+ <td valign="CENTER" width="27%">Longitude</td>
+ <td valign="CENTER" width="16%">DOUBLE</td>
+ <td valign="CENTER" width="48%">Longitude in radians</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">58 - 65</td>
+ <td valign="CENTER" width="27%">Altitude</td>
+ <td valign="CENTER" width="16%">DOUBLE</td>
+ <td valign="CENTER" width="48%">Altitude above mean sea level, in meters</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="9%">66 - 73</td>
+ <td valign="CENTER" width="27%">Satellite ID</td>
+ <td valign="CENTER" width="16%">BYTE</td>
+ <td valign="CENTER" width="48%">SV Id No. of tracked satellites</td>
+ </tr>
+ </table>
+ </center>
+ <h3>Thunderbolt Timing packets Data Format</h3>
+ Thunderbolt can output 2 synchronous packets.
+ <h4><b>Primary Timing Packet - 0x8FAB</h4>
+ <center>
+ <table>
+ <tr>
+ <td><b>Byte</b></td>
+ <td><b>Bit</b></td>
+ <td><b>Item</b></td>
+ <td><b>Type</b></td>
+ <td><b>Value</b></td>
+ <td><b>Description</b></td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td></td>
+ <td>Subcode</td>
+ <td>UINT8</td>
+ <td></td>
+ <td>0xAB</td>
+ </tr>
+ <tr>
+ <td>1-4</td>
+ <td></td>
+ <td>Time of Week</td>
+ <td>UINT32</td>
+ <td></td>
+ <td>GPS seconds of week</td>
+ </tr>
+ <tr>
+ <td>5-6</td>
+ <td></td>
+ <td>Week Number</td>
+ <td>UINT16</td>
+ <td></td>
+ <td>GPS Week Number</td>
+ </tr>
+ <tr>
+ <td>7-8</td>
+ <td></td>
+ <td>UTC Offset</td>
+ <td>SINT16</td>
+ <td></td>
+ <td>UTC Offset (seconds)</td>
+ </tr>
+ <tr>
+ <td valign="top">9</td>
+ <td><table><tr><td>0</td></tr><tr><td>1</td></tr><tr><td>2</td></tr><tr><td>3</tr><tr><td>4</tr></table></td>
+ <td valign="top">Timing Flag</td>
+ <td valign="top">Bit field</td>
+ <td valign="top"><table><tr><td>0 or 1</td></tr><tr><td>0 or 1</td></tr><tr><td>0 or 1</td></tr><tr><td>0 or 1</tr><tr><td>0 or 1</tr></table></td></td>
+ <td valign="top"><table><tr><td>GPS Time or UTC Time</td></tr><tr><td>GPS PPS or UTC PPS</td></tr><tr><td>time is set or time is not set</td></tr><tr><td>have UTC info or no UTC info</td></tr><tr><td>Time from GPS or time from user</td></tr></table></td>
+ </tr>
+ <tr>
+ <td>10</td>
+ <td></td>
+ <td>Seconds</td>
+ <td>UINT8</td>
+ <td>0-59</td>
+ <td>(60 for UTC leap second event)</td>
+ </tr>
+ <tr>
+ <td>11</td>
+ <td></td>
+ <td>Minutes</td>
+ <td>UINT8</td>
+ <td>0-59</td>
+ <td>Minutes of Hour</td>
+ </tr>
+ <tr>
+ <td>12</td>
+ <td></td>
+ <td>Hours</td>
+ <td>UINT8</td>
+ <td>0-23</td>
+ <td>Hour of Day</td>
+ </tr>
+ <tr>
+ <td>13</td>
+ <td></td>
+ <td>Day of Month</td>
+ <td>UINT8</td>
+ <td>1-31</td>
+ <td>Day of Month</td>
+ </tr>
+ <tr>
+ <td>14</td>
+ <td></td>
+ <td>Month</td>
+ <td>UINT8</td>
+ <td>1-12</td>
+ <td>Month of Year</td>
+ </tr>
+ <tr>
+ <td>15-16</td>
+ <td></td>
+ <td>Year</td>
+ <td>UINT16</td>
+ <td></td>
+ <td>Four digits of Year (e.g. 1998)</td>
+ </tr>
+ </table>
+ </center>
+ <h4><b>Supplemental Timing Packet - 0x8FAC</h4>
+ <center>
+ <table>
+ <tr>
+ <td><b>Byte</b></td>
+ <td><b>Bit</b></td>
+ <td><b>Item</b></td>
+ <td><b>Type</b></td>
+ <td><b>Value</b></td>
+ <td><b>Description</b></td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td></td>
+ <td>Subcode</td>
+ <td>UINT8</td>
+ <td></td>
+ <td>0xAC</td>
+ </tr>
+ <tr>
+ <td valign="top">1</td>
+ <td></td>
+ <td valign="top">Receiver Mode</td>
+ <td valign="top">UINT8</td>
+ <td valign="top"><table><tr><td>0</td></tr><tr><td>1</td></tr><tr><td>2</td></tr><tr><td>3</td></tr><tr><td>4</td></tr><tr><td>5</td></tr><tr><td>6</td></tr></table></td>
+ <td valign="top"><table><tr><td>Automatic (2D/3D)</td></tr><tr><td>Single Satellite (Time)</td></tr><tr><td>Horizontal (2D)</td></tr><tr><td>Full Position (3D)</td></tr><tr><td>DGPS Reference</td></tr><tr><td>Clock Hold (2D)</td></tr><tr><td>Overdetermined Clock</td></tr></table></td>
+ </tr>
+ <tr>
+ <td valign="top">2</td>
+ <td></td>
+ <td valign="top">Disciplining Mode</td>
+ <td valign="top">UINT8</td>
+ <td valign="top"><table><tr><td>0</td></tr><tr><td>1</td></tr><tr><td>2</td></tr><tr><td>3</td></tr><tr><td>4</td></tr><tr><td>5</td></tr><tr><td>6</td></tr></table></td>
+ <td valign="top"><table><tr>Normal<td></td></tr><tr><td>Power-Up</td></tr><tr><td>Auto Holdover</td></tr><tr><td>Manual Holdover</td></tr><tr><td>Recovery</td></tr><tr><td>Not Used</td></tr><tr><td>Disciplining disabled</td></tr></table></td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td></td>
+ <td>Self-Survey Progress</td>
+ <td>UINT 8</td>
+ <td>0-100%</td>
+ <td></td>
+ <tr>
+ <td>4-7</td>
+ <td></td>
+ <td>Holdover Duration</td>
+ <td>UINT 32</td>
+ <td></td>
+ <td>seconds</td>
+ </tr>
+ <tr>
+ <td valign="top">8-9</td>
+ <td><table><tr><td>0</td></tr><tr><td>1</td></tr><tr><td>2</td></tr><tr><td>3</tr><tr><td>4</tr></table></td>
+ <td valign="top">Critical Alarms</td>
+ <td valign="top">UINT16</td>
+ <td valign="top">Bit field</td>
+ <td valign="top"><table><tr><td>ROM checksum error</td></tr><tr><td>RAM check has failed</td></tr><tr><td>Power supply failure</td></tr><tr><td>FPGA check has failed</td></tr><tr><td>Oscillator control voltage at rail</td></tr></table></td>
+ </tr>
+ <tr>
+ <td valign="top">10-11</td>
+ <td valign="top"><table><tr><td>0</td></tr><tr><td>1</td></tr><tr><td>2</td></tr><tr><td>3</tr><tr><td>4</tr><tr><td>5</td></tr><tr><td>6</td></tr></table></td>
+ <td valign="top">Minor Alarms</td>
+ <td valign="top">UINT16</td>
+ <td valign="top">Bit field</td>
+ <td valign="top"><table><tr><td>Normal</td></tr><tr><td>Power-Up</td></tr><tr><td>Auto Holdover</td></tr><tr><td>Manual Holdover</tr><tr><td>Recovery</tr><tr><td>Not Used</td></tr><tr><td>Disciplining disabled</td></tr></table></td>
+ </tr>
+ <tr>
+ <td valign="top">12</td>
+ <td></td>
+ <td valign="top">GPS Decoding Status</td>
+ <td valign="top">UINT8</td>
+ <td valign="top"><table><tr><td>0</td></tr><tr><td>1</td></tr><tr><td>3</td></tr><tr><td>8</tr><tr><td>9</tr><tr><td>0x0A</td></tr><tr><td>0x0B</td></tr><tr><td>0x0C</td></tr><tr><td>0x10</tr></table></td>
+ <td valign="top"><table><tr><td>Doing fixes</td></tr><tr><td>Don t have GPS time</td></tr><tr><td>PDOP is too high</td></tr><tr><td>No usable sats</tr><tr><td>Only 1 usable sat</tr><tr><td>Only 2 usable sats</td></tr><tr><td>Only 3 usable sats</td></tr><tr><td>The chosen sat is unusable</td></tr><tr><td>TRAIM rejected the fix</tr></table></td>
+ </tr>
+ <tr>
+ <td valign="top">13</td>
+ <td></td>
+ <td valign="top">Disciplining Activity</td>
+ <td valign="top">UINT8</td>
+ <td><table><tr><td>0</td></tr><tr><td>1</td></tr><tr><td>2</td></tr><tr><td>3</tr><tr><td>4</tr><tr><td>5</td></tr><tr><td>6</td></tr><tr><td>7</td></tr><tr><td>8</tr></table></td>
+ <td><table><tr><td>Phase locking</td></tr><tr><td>Oscillator warming up</td></tr><tr><td>Frequency locking</td></tr><tr><td>Placing PPS</tr><tr><td>Initializing loop filter</tr><tr><td>Compensating OCXO</td></tr><tr><td>Inactive</td></tr><tr><td>Not used</td></tr><tr><td>Recovery mode</tr></table></td>
+ </tr>
+ <tr>
+ <td>14</td>
+ <td></td>
+ <td>Spare Status 1</td>
+ <td>UINT8</td>
+ <td>0</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>15</td>
+ <td></td>
+ <td>Spare Status 2</td>
+ <td>UINT8</td>
+ <td>0</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>16-19</td>
+ <td></td>
+ <td>PPS Offset</td>
+ <td>Single</td>
+ <td></td>
+ <td>Estimate of UTC/GPS offset (ns)</td>
+ </tr>
+ <tr>
+ <td>20-23</td>
+ <td></td>
+ <td>10 MHz Offset</td>
+ <td>Single</td>
+ <td></td>
+ <td>Estimate of UTC/GPS offset (ns)</td>
+ </tr>
+ <tr>
+ <td>24-27</td>
+ <td></td>
+ <td>DAC Value</td>
+ <td>UINT32</td>
+ <td></td>
+ <td>Offset binary (0x00 - 0xFFFFF)</td>
+ </tr>
+ <tr>
+ <td>28-31</td>
+ <td></td>
+ <td>DAC Voltage</td>
+ <td>Single</td>
+ <td></td>
+ <td>Volts</td>
+ </tr>
+ <tr>
+ <td>32-35</td>
+ <td></td>
+ <td>Temperature</td>
+ <td>Single</td>
+ <td></td>
+ <td>degrees C</td>
+ </tr>
+ <tr>
+ <td>36-43</td>
+ <td></td>
+ <td>Latitude</td>
+ <td>Double</td>
+ <td></td>
+ <td>radians</td>
+ </tr>
+ <tr>
+ <td>44-51</td>
+ <td></td>
+ <td>Longitude</td>
+ <td>Double</td>
+ <td></td>
+ <td>radians</td>
+ </tr>
+ <tr>
+ <td>52-59</td>
+ <td></td>
+ <td>Altitude</td>
+ <td>Double</td>
+ <td></td>
+ <td>Meters</td>
+ </tr>
+ <tr>
+ <td>60-67</td>
+ <td></td>
+ <td>Spare</td>
+ <td></td>
+ <td></td>
+ <td>For Future Expantion</td>
+ </tr>
+ </table>
+ </center>
+ <h2><a name="Pinouts"></a><font size="+1">Pinouts</font></h2>
+ <a href="#Connection">The following connections are required when connecting Palisade with a host:</a><br>&nbsp;<br>&nbsp;
+ <center>
+ <table>
+ <tr>
+ <td><u>Description</u></td>
+ <td><b>Host</b></td>
+ <td></td>
+ <td></td>
+ <td><b>Palisade&nbsp;</b></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><a name="PortA"></a><b>Port A</b></td>
+ <td><u>DB-9</u></td>
+ <td><u>DB-25</u></td>
+ <td></td>
+ <td><u>RS-232</u></td>
+ <td><u>RS-422</u></td>
+ <td><u>Palisade Pin</u></td>
+ </tr>
+ <tr>
+ <td>Receive Data&nbsp;</td>
+ <td>2</td>
+ <td>3</td>
+ <td>&lt;--&gt;</td>
+ <td>Green</td>
+ <td>Green / Blue</td>
+ <td>8 (T-) &amp; 10 (T+)</td>
+ </tr>
+ <tr>
+ <td>Request to Send</td>
+ <td>7</td>
+ <td>4</td>
+ <td>&lt;--&gt;</td>
+ <td>Gray</td>
+ <td>Gray / White</td>
+ <td>6 (R-) &amp; 7 (R+)</td>
+ </tr>
+ <tr>
+ <td>Signal Ground</td>
+ <td>5</td>
+ <td>7</td>
+ <td>&lt;--&gt;</td>
+ <td>Black</td>
+ <td>Black</td>
+ <td>9 (GND)</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><a name="PortB"></a><b>Port B</b></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>Receive Data&nbsp;</td>
+ <td>2</td>
+ <td>3</td>
+ <td>&lt;--&gt;</td>
+ <td>Brown</td>
+ <td>Brown / Yellow</td>
+ <td>4 (T-) &amp; 5 (T+)</td>
+ </tr>
+ <tr>
+ <td>Transmit Data</td>
+ <td>3</td>
+ <td>2</td>
+ <td>&lt;--&gt;</td>
+ <td>Violet</td>
+ <td>Orange/ Violet</td>
+ <td>2 (R-) &amp; 3 (R+)</td>
+ </tr>
+ <tr>
+ <td>Signal Ground</td>
+ <td>5</td>
+ <td>7</td>
+ <td>&lt;--&gt;</td>
+ <td>Black</td>
+ <td>Black</td>
+ <td>9 (GND)</td>
+ </tr>
+ </table>
+ </center>
+ <blockquote>
+ Note: If driving the RS-422 inputs on the Palisade single ended, i.e. using the Green and Gray connections only, does not work on all serial ports. Use of the Palisade NTP Synchronization Interface Module is recommended.</blockquote>
+ <blockquote>
+ The 12 pin connector pinout definition:<br>
+ Face the round 12 pin connector at the end of the cable, with the notch turned upwards.<br>
+ Pin 1 is to the left of the notch. Pins 2 - 8 wrap around the bottom, counterclockwise to pin 9 on the right of the notch. Pin 10 is just below the notch. Pins 10 (top), 11 (bottom left) and 12 (bottom right) form a triangle in the center of the connector.</blockquote>
+ <blockquote>
+ <a name="SIM"></a>Pinouts for the Palisade NTP host adapter (Trimble PN 37070) DB-25 M connector are as follows:</blockquote>
+ <center>
+ <table width="682" border="0" cellspacing="0">
+ <tr>
+ <td valign="CENTER" width="12%">DB-25M</td>
+ <td valign="CENTER" width="31%">Conductor&nbsp;</td>
+ <td valign="CENTER" width="16%">Palisade</td>
+ <td valign="CENTER" width="41%">Description</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">1&nbsp;</td>
+ <td valign="CENTER" width="31%">Red</td>
+ <td valign="CENTER" width="16%">1</td>
+ <td valign="CENTER" width="41%">Power</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">7&nbsp;</td>
+ <td valign="CENTER" width="31%">Black</td>
+ <td valign="CENTER" width="16%">9</td>
+ <td valign="CENTER" width="41%">Ground</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">9</td>
+ <td valign="CENTER" width="31%">Black/White</td>
+ <td valign="CENTER" width="16%">12</td>
+ <td valign="CENTER" width="41%">PPS -</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">10&nbsp;</td>
+ <td valign="CENTER" width="31%">Green</td>
+ <td valign="CENTER" width="16%">8</td>
+ <td valign="CENTER" width="41%">Transmit Port A (T-)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">11&nbsp;</td>
+ <td valign="CENTER" width="31%">Brown</td>
+ <td valign="CENTER" width="16%">4</td>
+ <td valign="CENTER" width="41%">Transmit Port B (T-)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">12&nbsp;</td>
+ <td valign="CENTER" width="31%">Gray</td>
+ <td valign="CENTER" width="16%">7</td>
+ <td valign="CENTER" width="41%">Receive Port A (R+)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">13</td>
+ <td valign="CENTER" width="31%">Orange</td>
+ <td valign="CENTER" width="16%">3</td>
+ <td valign="CENTER" width="41%">Receive Port B (R+)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">21</td>
+ <td valign="CENTER" width="31%">Orange/White</td>
+ <td valign="CENTER" width="16%">11</td>
+ <td valign="CENTER" width="41%">PPS +</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">22</td>
+ <td valign="CENTER" width="31%">Blue</td>
+ <td valign="CENTER" width="16%">10</td>
+ <td valign="CENTER" width="41%">Transmit Port A (T+)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">23</td>
+ <td valign="CENTER" width="31%">Yellow</td>
+ <td valign="CENTER" width="16%">5</td>
+ <td valign="CENTER" width="41%">Transmit Port B (T+)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">24</td>
+ <td valign="CENTER" width="31%">White</td>
+ <td valign="CENTER" width="16%">6</td>
+ <td valign="CENTER" width="41%">Receive Port A (R-)</td>
+ </tr>
+ <tr>
+ <td valign="CENTER" width="12%">25</td>
+ <td valign="CENTER" width="31%">Violet</td>
+ <td valign="CENTER" width="16%">2</td>
+ <td valign="CENTER" width="41%">Receive Port B (R-)</td>
+ </tr>
+ </table>
+ </center>
+
+ <b><h3>Notes on the Thunderbolt Receiver's Firmware</h3></b>
+
+ The support for Thunderbolt Receiver in the palisade driver doesn't support (for now) event-polling, the reason is that the Thunderbolt receiver the patch is written for doesn't support time-on-request, so you just have to sit there and wait for the time to arrive with the PPS. We tried to contact Trimble because there's presumably a firmware update that support it, but we didn't have much luck.
+Here is a link explaining the situation:<p>
+<a href="https://lists.ntp.isc.org/pipermail/hackers/2006-April/002216.html">https://lists.ntp.isc.org/pipermail/hackers/2006-April/002216.html
+ <p></p>
+ <hr>
+ <p>Questions or Comments:<br>
+ <a href="mailto:sven_dietrich@trimble.com">Sven Dietrich</a><br>
+ <a href="http://www.trimble.com/">Trimble Navigation Ltd.</a></p>
+ <a href="mailto:fernandoph@iar.unlp.edu.ar">Fernando P. Hauscarriaga</a><br>
+ <p>(last updated January 15, 2007)</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ ;
+ </body>
+
+</html>
diff --git a/html/drivers/driver3.html b/html/drivers/driver3.html
new file mode 100644
index 0000000..457e5a2
--- /dev/null
+++ b/html/drivers/driver3.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+<title>PSTI/Traconex 1020 WWV/WWVH Receiver</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>PSTI/Traconex 1020 WWV/WWVH Receiver</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.3.<i>u</i><br>
+ Reference ID: <tt>WWV</tt><br>
+ Driver ID: <tt>WWV_PST</tt><br>
+ Serial Port: <tt>/dev/wwv<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt></p>
+<h4>Description</h4>
+<p>This driver supports the PSTI 1010 and Traconex 1020 WWV/WWVH Receivers. No specific claim of accuracy is made for these receiver, but actual experience suggests that 10 ms would be a conservative assumption.</p>
+<p>The dipswitches should be set for 9600 bps line speed, 24-hour day-of-year format and UTC time zone. Automatic correction for DST should be disabled. It is very important that the year be set correctly in the DIP-switches; otherwise, the day of year will be incorrect after 28 April of a normal or leap year. As the there are only four dipswitches to set the year and the base value of zero correspondes to 1986, years beyond 2001 recycle with the value of zero corresponding to 2002. The propagation delay DIP-switches should be set according to the distance from the transmitter for both WWV and WWVH, as described in the instructions. While the delay can be set only to within 11 ms, the fudge time1 parameter can be used for vernier corrections.</p>
+<p>Using the poll sequence <tt>QTQDQM</tt>, the response timecode is in three sections totalling 50 ASCII printing characters, as concatenated by the driver, in the following format:</p>
+<pre>
+ahh:mm:ss.fffs&lt;cr&gt; yy/dd/mm/ddd&lt;cr&gt;
+frdzycchhSSFTttttuuxx&lt;cr&gt;
+
+on-time = first &lt;cr&gt;
+hh:mm:ss.fff = hours, minutes, seconds, milliseconds
+a = AM/PM indicator (' ' for 24-hour mode)
+yy = year (from DIPswitches)
+dd/mm/ddd = day of month, month, day of year
+s = daylight-saving indicator (' ' for 24-hour mode)
+f = frequency enable (O = all frequencies enabled)
+r = baud rate (3 = 1200, 6 = 9600)
+d = features indicator (@ = month/day display enabled)
+z = time zone (0 = UTC)
+y = year (5 = 91)
+cc = WWV propagation delay (52 = 22 ms)
+hh = WWVH propagation delay (81 = 33 ms)
+SS = status (80 or 82 = operating correctly)
+F = current receive frequency (4 = 15 MHz)
+T = transmitter (C = WWV, H = WWVH)
+tttt = time since last update (0000 = minutes)
+uu = flush character (03 = ^c)
+xx = 94 (unknown)</pre>
+<p>The alarm condition is indicated by other than <tt>8</tt> at <tt>a</tt>, which occurs during initial synchronization and when received signal is lost for an extended period; unlock condition is indicated by other than <tt>0000</tt> in the <tt>tttt</tt> subfield.</p>
+<h4>Monitor Data</h4>
+<p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>WWV</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+</dl>
+<h4>Additional Information</h4>
+<p><a href="../refclock.html">Reference Clock Drivers</a></p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver30.html b/html/drivers/driver30.html
new file mode 100644
index 0000000..ddf9b94
--- /dev/null
+++ b/html/drivers/driver30.html
@@ -0,0 +1,86 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.06 [en] (X11; I; FreeBSD 3.0-CURRENT i386) [Netscape]">
+ <title>Motorola Oncore GPS Receiver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Motorola Oncore GPS receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.30.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: ONCORE<br>
+ Serial Port: <tt>/dev/oncore.serial.</tt><i>u</i>; &nbsp;9600 baud, 8-bits, no parity.<br>
+ PPS Port: <tt>/dev/oncore.pps.</tt><i>u</i>;&nbsp; <tt>PPS_CAPTUREASSERT</tt> required,&nbsp; <tt>PPS_OFFSETASSERT</tt> supported.<br>
+ Configuration File: <tt>ntp.oncore</tt>, or <tt>ntp.oncore.</tt><i>u</i>, or <tt>ntp.oncore</tt><i>u</i>, in <tt>/etc/ntp</tt> or <tt>/etc</tt>.</p>
+ <h4>Description</h4>
+ <p>This driver supports most models of the <a href="http://www.mot.com/AECS/PNSB/products">Motorola Oncore GPS receivers</a> (Basic, PVT6, VP, UT, UT+, GT, GT+, SL, M12, M12+T), as long as they support the <i>Motorola Binary Protocol</i>.</p>
+ <p>The interesting versions of the Oncore are the VP, the UT+, the &quot;Remote&quot; which is a prepackaged UT+, and the M12 Timing. The VP is no longer available new, and the UT, GT, and SL are at end-of-life. The Motorola evaluation kit can be recommended. It interfaces to a PC straightaway, using the serial (DCD) or parallel port for PPS input and packs the receiver in a nice and sturdy box. Less expensive interface kits are available from <a href="http://www.tapr.org">TAPR</a> and <a href="http://www.synergy-gps.com">Synergy</a>.<br>&nbsp;</p>
+ <center>
+ <table>
+ <tr>
+ <td><img src="../pic/oncore_utplusbig.gif" alt="gif" height="124" width="210"></td>
+ <td><img src="../pic/oncore_evalbig.gif" alt="gif" height="124" width="182"></td>
+ <td><img src="../pic/oncore_remoteant.jpg" alt="gif" height="188" width="178"></td>
+ </tr>
+ <tr>
+ <td>
+ <center>
+ UT+ oncore</center>
+ </td>
+ <td>
+ <center>
+ Evaluation kit</center>
+ </td>
+ <td>
+ <center>
+ Oncore Remote</center>
+ </td>
+ </tr>
+ </table>
+ </center>
+ <p>The driver requires a standard <tt>PPS</tt> interface for the pulse-per-second output from the receiver. The serial data stream alone does not provide precision time stamps (0-50msec variance, according to the manual), whereas the PPS output is precise down to 50 nsec (1 sigma) for the VP/UT models and 25 nsec for the M12 Timing. If you do not have the PPS signal available, then you should probably be using the NMEA driver rather than the Oncore driver. Most of these are available on-line</p>
+ <p>The driver will use the &quot;position hold&quot; mode with user provided coordinates, the receivers built-in site-survey, or a similar algorithm implemented in this driver to determine the antenna position.</p>
+ <h4>Monitor Data</h4>
+ The driver always puts a lot of useful information on the clockstats file, and when run with debugging can be quite chatty on stdout. When first starting to use the driver you should definitely review the information written to the clockstats file to verify that the driver is running correctly.
+ <p>In addition, on platforms supporting Shared Memory, all of the messages received from the Oncore receiver are made available in shared memory for use by other programs. See the <a href="oncore-shmem.html">Oncore-SHMEM</a> manual page for information on how to use this option. For either debugging or using the SHMEM option, an Oncore Reference Manual for the specific receiver in use will be required.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p>The driver was initially developed on FreeBSD, and has since been tested on Linux, SunOS and Solaris.</p>
+ <p><b>Configuration</b></p>
+ <p>There is a driver specific configuration file <tt>ntp.oncore</tt> (or <tt>ntp.oncore.</tt><i>u</i> or <tt>ntp.oncore</tt><i>u</i> if you must distinguish between more than one Oncore receiver) that contains information on the startup mode, the location of the GPS receiver, an offset of the PPS signal from zero, and the cable delay. The offset shifts the PPS signal to avoid interrupt pileups `on' the second, and adjusts the timestamp accordingly. See the driver source for information on this file. The default with no file is: no delay, no offset, and a site survey is done to get the location of the gps receiver.</p>
+ <p>The following three options can be set in the driver specific configuration file only if the driver is using the PPSAPI. The edge of the PPS signal that is `on-time' can be set with the keywords [ASSERT/CLEAR] and the word HARDPPS will cause the PPS signal to control the kernel PLL.</p>
+ <p><b>Performance</b></p>
+ <p>Really good. With the VP/UT+, the generated PPS pulse is referenced to UTC(GPS)&nbsp;with better than 50 nsec (1 sigma) accuracy. The limiting factor will be the timebase of the computer and the precision with which you can timestamp the rising flank of the PPS signal. Using FreeBSD, a FPGA&nbsp;based Timecounter/PPS&nbsp;interface, and an ovenized quartz oscillator, that performance has been reproduced. For more details on this aspect: <a href="http://phk.freebsd.dk/rover.html">Sub-Microsecond timekeeping under FreeBSD</a>.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver31.html b/html/drivers/driver31.html
new file mode 100644
index 0000000..a329faf
--- /dev/null
+++ b/html/drivers/driver31.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.06 [en] (X11; I; FreeBSD 3.0-CURRENT i386) [Netscape]">
+ <title>Rockwell Jupiter GPS Receiver</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Rockwell Jupiter GPS receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.31.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: JUPITER<br>
+ Serial Port: <tt>/dev/gps</tt><i>u</i>; &nbsp;9600 baud, 8-bits, no parity.</p>
+ <h4>Description</h4>
+ <p>This driver supports at least some models of the <a href="http://www.navman.com/oem/products/receivers/jupiter/">Rockwell Jupiter <tt>GPS</tt> receivers</a> (Jupiter 11, Jupiter-T), they must at least support the <i>Zodiac Binary Protocol</i>.</p>
+ <p>The driver requires a standard <tt>PPS</tt> interface for the pulse-per-second output from the receiver. The serial data stream alone does not provide precision time stamps, whereas the PPS output is precise down to 40 ns (1 sigma) for the Jupiter 11 and 25 ns (1 sigma) for Jupiter-T according to the documentation. If you do not have the PPS signal available, then you should probably not be using the Jupiter receiver as a time source. This driver requires a <tt>PPS</tt> signal and the time output from Jupiter receivers is not predictable in <tt>NMEA</tt> mode; the reported time can take one second steps.</p>
+ <h4>Monitor Data</h4>
+ <p>The driver always puts a lot of useful information on the clockstats file, and when run with debugging can be quite chatty on stdout. When first starting to use the driver you should definitely review the information written to the clockstats file to verify that the driver is running correctly.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver. Should be left at zero.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an <tt>ASCII</tt> string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Specifies the mobility of the <tt>GPS</tt> receiver: 0 for walking (default), 1 for driving.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Specifies the <tt>PPS</tt> signal on-time edge: 0 for assert (default), 1 for clear.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p>The driver was resurrected from a sorry state using the Windows NT port and a Jupiter 11, and has since seen little testing on other platforms. On Windows there exist a barrier though, as there is no publicly available <tt>PPSAPI</tt> implementation, at least not to my knowledge. However, there has been one success report using Linux 2.4.20 and PPSkit 2.1.1.</p>
+ <p>The Jupiter receivers seem to have quite a few names. They are referred to at least as Rockwell receivers, Navman receivers, Zodiac receivers, Conexant receivers and SiRF Technology receivers. Rockwell seems to be the original and most commonly used name and Navman seems to be the current supplier.</p>
+ <p><b>Configuration</b></p>
+ <p>The edge of the <tt>PPS</tt> signal that is `on-time' can be set with <tt>flag2</tt>. There is currently no way to cause the <tt>PPS</tt> signal to control the kernel <tt>PLL</tt>.</p>
+ <p><b>Performance</b></p>
+ <p>The performance is largely unexplored. I have achieved submillisecond stability using a Jupiter 11, but the poor result is more than likely due to the proprietary <tt>PPSAPI</tt> implementation or Windows itself.</p>
+ <p>This driver does not handle leap seconds.</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html>
+
+=
diff --git a/html/drivers/driver32.html b/html/drivers/driver32.html
new file mode 100644
index 0000000..8cb810a
--- /dev/null
+++ b/html/drivers/driver32.html
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <title>Chrono-log K-series WWVB receiver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Chrono-log K-series WWVB receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.32.<i>u</i><br>
+ Reference ID: <tt>CHRONOLOG</tt><br>
+ Driver ID: <tt>CHRONOLOG</tt><br>
+ Serial Port: <tt>/dev/chronolog<i>u</i></tt>; 2400 bps, 8-bits, no parity<br>
+ <br>
+ Features: <tt>(none)</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the Chrono-log K-series WWVB receiver. This is a very old receiver without provisions for leap seconds, quality codes, etc. It assumes output in the local time zone, and that the C library mktime()/localtime() routines will correctly convert back and forth between local and UTC. There is a hack in the driver for permitting UTC, but it has not been tested.</p>
+ <p>Most of this code is originally from refclock_wwvb.c with thanks. It has been so mangled that wwvb is not a recognizable ancestor.</p>
+ <pre>
+Timecode format: Y yy/mm/ddCLZhh:mm:ssCL
+Y - year/month/date line indicator
+yy/mm/dd -- two-digit year/month/day
+C - \r (carriage return)
+L - \n (newline)
+Z - timestamp indicator
+hh:mm:ss - local time
+</pre>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver33.html b/html/drivers/driver33.html
new file mode 100644
index 0000000..6142f53
--- /dev/null
+++ b/html/drivers/driver33.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <title>Dumb Clock</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Dumb Clock</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.33.<i>u</i><br>
+ Reference ID: <tt>DUMBCLOCK</tt><br>
+ Driver ID: <tt>DUMBCLOCK</tt><br>
+ Serial Port: <tt>/dev/dumbclock<i>u</i></tt>; 9600 bps, 8-bits, no parity<br>
+ Features: <tt>(none)</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports a dumb ASCII clock that only emits localtime at a reliable interval. This has no provisions for leap seconds, quality codes, etc. It assumes output in the local time zone, and that the C library mktime()/localtime() routines will correctly convert back and forth between local and UTC.</p>
+ <p>Most of this code is originally from refclock_wwvb.c with thanks. It has been so mangled that wwvb is not a recognizable ancestor.</p>
+ <pre>
+Timecode format: hh:mm:ssCL
+hh:mm:ss - local time
+C - \r (carriage return)
+L - \n (newline)
+</pre>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver34.html b/html/drivers/driver34.html
new file mode 100644
index 0000000..65ce819
--- /dev/null
+++ b/html/drivers/driver34.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>Ultralink Clock</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Ultralink Clock</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Dec-2007 19:43<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.34.<i>u</i><br>
+ Reference ID: <tt>WWVB</tt><br>
+ Driver ID: <tt>ULINK</tt><br>
+ Serial Port: <tt>/dev/wwvb<i>u</i></tt>; 9600 bps, 8-bits, no parity<br>
+ Features: <tt>(none)</tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the Ultralink Model 325 (replacement for Model 320) RS-232 powered WWVB receiver. PDF specs available on <a href="http://www.ulio.com/">http://www.ulio.com/</a>. This driver also supports the Model 320, 330,331,332 decoders in both polled or continous time code mode.Leap second and quality are supported. Most of this code is originally from refclock_wwvb.c with thanks. Any mistakes are mine. Any improvements are welcome.</p>
+ <h4>Model 325 timecode format</h4>
+ <p><tt>&lt;cr&gt;&lt;lf&gt;RQ_1C00LYYYY+DDDUTCS_HH:MM:SSL+5</tt></p>
+ <p>R = Signal readability indicator, ranging from R1 to R5 Q R1 is unreadable, R5 is best reception<br>
+ _ = Space<br>
+ 1 = prev. received data bit, values: 0, 1 ,M or ? unknown
+ C = Signal reception from (C)olorado or (H)awaii 0 = Hours since last WWVB time and flag code update, values 0 00 to 99 (hopefully always 00)<br>
+ L = HEX A5 if receiver is locked to WWVB, Space if not<br>
+ YYYY = Year from 2000 to 2099<br>
+ + = '+' if current year is a leap year, else ' '<br>
+ DDD = current day in the year from 1 to 365/366<br>
+ UTC = timezone (always UTC)<br>
+ S = Daylight savings indicator, (S)TD, (D)ST, (O) transition into DST, (I) transition out of DST<br>
+ _ = Space<br>
+ HH = UTC hour 0 to 23<br>
+ : = Time delimiter, ':' if synced, Space if not<br>
+ MM = Minutes of current hour from 0 to 59<br>
+ : = Time delimiter, ':' if synced, Space if not<br>
+ SS = Seconds of current minute from 0 to 59<br>
+ mm = 10's milliseconds of the current second from 00 to 99<br>
+ L = Leap second pending at end of month, (I)nsert, (D)elete or Space<br>
+ +5 = UT1 correction, +/- .1 sec increments</p>
+ <p>Note that Model 325 reports a very similar output like Model 33X series. The driver for this clock is similar to Model 33X behavior. On a unmodified new ULM325 clock, the polling flag (flag1 =1) needs to be set.</p>
+ <h4>Model 320 timecode format</h4>
+ <p><tt>&lt;cr&gt;&lt;lf&gt;SQRYYYYDDD+HH:MM:SS.mmLT&lt;cr&gt;</tt></p>
+ <p>S = 'S' -- sync'd in last hour, '0'-'9' - hours x 10 since last update, else '?'<br>
+ Q = Number of correlating time-frames, from 0 to 5<br>
+ R = 'R' -- reception in progress,'N' -- Noisy reception, ' ' -- standby mode<br>
+ YYYY = year from 1990 to 2089<br>
+ DDD = current day from 1 to 366 + = '+' if current year is a leap year, else ' '<br>
+ HH = UTC hour 0 to 23<br>
+ MM = Minutes of current hour from 0 to 59<br>
+ SS = Seconds of current minute from 0 to 59<br>
+ mm = 10's milliseconds of the current second from 00 to 99<br>
+ L = Leap second pending at end of month -- 'I' = insert, 'D'=delete<br>
+ T = DST &lt;-&gt; STD transition indicators</p>
+ <p>Note that this driver does not do anything with the T flag. The M320 also has a 'U' command which returns UT1 correction information. It is not used in this driver.</p>
+ <h4>Model 33x timecode format</h4>
+ <p><tt>S9+D 00 YYYY+DDDUTCS HH:MM:SSl+5</tt></p>
+ <p>S = sync indicator S insync N not in sync the sync flag is WWVB decoder sync nothing to do with time being correct </p>
+ <p>9+ = signal level 0 thru 9+ If over 9 indicated as 9<br>
+ D = data bit (fun to watch but useless ;-) space<br>
+ 00 = hours since last GOOD WWVB frame sync space<br>
+ YYYY = current year + = leap year indicator<br>
+ DDD = day of year<br>
+ UTC = timezone (always UTC)<br>
+ S = daylight savings indicator space<br>
+ HH = hours : = This is the REAL in sync indicator (: = insync)<br>
+ MM = minutes : = : = in sync ? = NOT in sync<br>
+ SS = seconds<br>
+ L = leap second flag<br>
+ +5 = UT1 correction (sign + digit ))</p>
+ <p>This driver ignores UT1 correction, DST indicator,Leap year and signal level.</p>
+ <h4>Fudge factors</h4>
+ <p>flag1 polling enable (1=poll 0=no poll)</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+</html>
diff --git a/html/drivers/driver35.html b/html/drivers/driver35.html
new file mode 100644
index 0000000..3ded63f
--- /dev/null
+++ b/html/drivers/driver35.html
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>Conrad parallel port radio clock</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Conrad parallel port radio clock</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.35.<i>u</i><br>
+ Reference ID: <tt>PCF</tt><br>
+ Driver ID: <tt>PCF</tt><br>
+ Parallel Port: <tt>/dev/pcfclocks/<i>u</i></tt> or <tt>/dev/pcfclock<i>u</i></tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the parallel port radio clock sold by <a href="http://www.conrad-electronic.com/">Conrad Electronic</a> under order numbers 967602 and 642002. This clock is put between a parallel port and your printer. It receives the legal German time, which is either CET or CEST, from the DCF77 transmitter and uses it to set its internal quartz clock. The DCF77 transmitter is located near to Frankfurt/Main and covers a radius of more than 1500 kilometers.</p>
+ <p>The pcfclock device driver is required in order to use this reference clock driver. Currently device drivers for <a href="http://home.pages.de/%7evoegele/pcf.html">Linux</a> and <a href="http://schumann.cx/pcfclock/">FreeBSD</a> are available.</p>
+ <p>This driver uses C library functions to convert the received timecode to UTC and thus requires that the local timezone be CET or CEST. If your server is not located in Central Europe you have to set the environment variable TZ to CET before starting <tt>ntpd</tt>.</p>
+ <h4>Monitor Data</h4>
+ <p>Each timecode is written to the <tt>clockstats</tt> file in the format <tt>YYYY MM DD HH MI SS</tt>.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.1725.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>PCF</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>If set to 1, the radio clock's synchronisation status bit is ignored, ie the timecode is used without a check.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver36.html b/html/drivers/driver36.html
new file mode 100644
index 0000000..2b25324
--- /dev/null
+++ b/html/drivers/driver36.html
@@ -0,0 +1,150 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Radio WWV/H Audio Demodulator/Decoder</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Radio WWV/H Audio Demodulator/Decoder</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last updage:
+ <!-- #BeginDate format:En2m -->15-Nov-2012 06:42<!-- #EndDate -->
+UTC</p>
+<hr>
+<h4>Synopsis</h4>
+Address: 127.127.36.<i>u</i><br>
+Reference ID: <tt>WV<i>f</i></tt> or <tt>WH<i>f</i></tt><br>
+Driver ID: <tt>WWV_AUDIO</tt><br>
+Autotune Port: <tt>/dev/icom</tt>; 1200/9600 baud, 8-bits, no parity<br>
+Audio Device: <tt>/dev/audio</tt> and <tt>/dev/audioctl</tt>
+<h4>Description</h4>
+This driver synchronizes the computer time using shortwave radio transmissions from NIST time/frequency stations <a href="http://www.bldrdoc.gov/timefreq/stations/wwv.html">WWV</a> in Ft. Collins, CO, and <a href="http://www.bldrdoc.gov/timefreq/stations/wwvh.htm">WWVH</a> in Kauai, HI. Transmissions are made continuously on 2.5, 5, 10 and 15 MHz from both stations and on 20 MHz from WWV. An ordinary shortwave receiver can be tuned manually to one of these frequencies or, in the case of ICOM receivers, the receiver can be tuned automatically by the driver as propagation conditions change throughout the day and season. The radio is connected via an optional attenuator and cable to either the microphone or line-in port of a workstation or PC.
+<p>The driver requires an audio codec or sound card with sampling rate 8 kHz and &mu;-law companding to demodulate the data. This is the same standard as used by the telephone industry and is supported by most hardware and operating systems, including Solaris, FreeBSD and Linux, among others. In this implementation only one audio driver and codec can be supported on a single machine. In order to assure reliable signal capture, the codec frequency error must be less than 187 PPM (.0187 percent). If necessary, the <tt>tinker codec</tt> configuration command can be used to bracket the codec frequency to this range.</p>
+<p>In general and without calibration, the driver is accurate within 1 ms relative to the broadcast time when tracking a station. However, variations up to 0.3 ms can be expected due to diurnal variations in ionospheric layer height and ray geometry. In Newark DE, 2479 km from the transmitter, the predicted two-hop propagation delay varies from 9.3 ms in sunlight to 9.0 ms in moonlight. When not tracking the station the accuracy depends on the computer clock oscillator stability, ordinarily better than 0.5 PPM.</p>
+<p>After calibration relative to the PPS&nbsp;signal from a GPS&nbsp;receiver, the mean offset with a 2.4-GHz P4 running FreeBSD 6.1 is generally within 0.1 ms short-term with 0.4 ms jitter. The long-term mean offset varies up to 0.3 ms due to propagation path geometry variations. The processor load due to the driver is 0.4 percent on the P4.</p>
+<p>The driver performs a number of error checks to protect against overdriven or underdriven input signal levels, incorrect signal format or improper hardware configuration. The specific checks are detailed later in this page. Note that additional checks are done elsewhere in the reference clock interface routines.</p>
+<p>This driver incorporates several features in common with other audio drivers such as described in the <a href="driver7.html">Radio CHU Audio Demodulator/Decoder</a> and the <a href="driver6.html">IRIG Audio Decoder</a> pages. They include automatic gain control (AGC), selectable audio codec port and signal monitoring capabilities. For a discussion of these common features, as well as a guide to hookup, debugging and monitoring, see the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
+<h4>Technical Overview</h4>
+<p>The driver processes 8-kHz &mu;-law companded codec samples using maximum-likelihood techniques which exploit the considerable degree of redundancy available in the broadcast signal. The WWV signal format is described in NIST Special Publication 432 (Revised 1990) and also available on the <a href="http://tf.nist.gov/stations/wwvtimecode.htm">WWV/H web site</a>. It consists of three elements, a 5-ms, 1000-Hz pulse, which occurs at the beginning of each second, a 800-ms, 1000-Hz pulse, which occurs at the beginning of each minute, and a pulse-width modulated 100-Hz subcarrier for the data bits, one bit per second. The WWVH format is identical, except that the 1000-Hz pulses are sent at 1200 Hz. Each minute encodes nine BCD digits for the time of century plus seven bits for the daylight savings time (DST) indicator, leap warning indicator and DUT1 correction.</p>
+<p>The demodulation and decoding algorithms used by this driver are based on a machine language program developed for the TAPR DSP93 DSP unit, which uses the TI 320C25 DSP chip. The analysis, design and performance of the program for this unit is described in: Mills, D.L. A precision radio clock for WWV transmissions. Electrical Engineering Report 97-8-1, University of Delaware, August 1997, 25 pp. Available from <a href="http://www.eecis.udel.edu/%7emills/reports.html">www.eecis.udel.edu/~mills/reports.htm</a>. For use in this driver, the original program was rebuilt in the C language and adapted to the NTP driver interface. The algorithms have been modified to improve performance, especially under weak signal conditions and to provide an automatic frequency and station selection feature.</p>
+<p>As in the original program, the clock discipline is modelled as a Markov process, with probabilistic state transitions corresponding to a conventional clock and the probabilities of received decimal digits. The result is a performance level with very high accuracy and reliability, even under conditions when the minute beep of the signal, normally its most prominent feature, can barely be detected by ear using a communications receiver.</p>
+<h4>Baseband Signal Processing</h4>
+<p>The 1000/1200-Hz pulses and 100-Hz subcarrier are first separated using a 600-Hz bandpass filter centered on 1100 Hz and a 150-Hz lowpass filter. The minute pulse is extracted using an 800-ms synchronous matched filter and pulse grooming logic which discriminates between WWV and WWVH signals and noise. The second pulse is extracted using a 5-ms FIR matched filter for each station and a single 8000-stage comb filter.</p>
+<p>The phase of the 100-Hz subcarrier relative to the second pulse is fixed at the transmitter; however, the audio stage in many radios affects the phase response at 100 Hz in unpredictable ways. The driver adjusts for each radio using two 170-ms synchronous matched filters. The I (in-phase) filter is used to demodulate the subcarrier envelope, while the Q (quadrature-phase) filter is used in a type-1 phase-lock loop (PLL) to discipline the demodulator phase.</p>
+<p>A bipolar data signal is determined from the matched filter subcarrier envelope using a pulse-width discriminator. The discriminator samples the I channel at 15 ms (<i>n</i>), 200 ms (<i>s</i><sub>0</sub>) and 500 ms (<i>s</i><sub>1</sub>), and the envelope (RMS I and Q channels) at 200 ms (<i>e</i><sub>1</sub>) and the end of the second (<i>e</i><sub>0</sub>). The bipolar data signal is expressed 2<i>s</i><sub>1</sub> - <i>s</i><sub>0</sub> - <i>n</i>, where positive values correspond to data 1 and negative values correspond to data 0. Note that, since the signals <i>s</i><sub>0</sub> and <i>s</i><sub>1</sub> include the noise <i>n</i>, the noise component cancels out. The data bit SNR is calculated as 20 log<sub>10</sub>(<i>e</i><sub>1</sub> / <i>e</i><sub>0</sub>). If the driver has not synchronized to the minute pulse, or if the data bit amplitude <i>e</i><sub>1</sub> or SNR are below thresholds, the bit is considered invalid and the bipolar signal is forced to zero.</p>
+<p>The bipolar signal is exponentially averaged in a set of 60 accumulators, one for each second, to determine the semi-static miscellaneous bits, such as DST indicator, leap second warning and DUT1 correction. In this design a data average value larger than a positive threshold is interpreted as +1 (hit) and a value smaller than a negative threshold as a -1 (miss). Values between the two thresholds, which can occur due to signal fades, are interpreted as an erasure and result in no change of indication.</p>
+<h4>Maximum-Likelihood Decoder</h4>
+<p>The BCD digit in each digit position of the timecode is represented as four data bits. The bits are correlated with the bits corresponding to each of the valid decimal digits in this position. If any of the four bits are invalid, the correlated value for all digits in this position is assumed zero. In either case, the values for all digits are exponentially averaged in a likelihood vector associated with this position. The digit associated with the maximum over all averaged values then becomes the maximum-likelihood candidate for this position and the ratio of the maximum over the next lower value represents the digit SNR.</p>
+<p>The decoding matrix contains nine row vectors, one for each digit position. Each row vector includes the maximum-likelihood digit, likelihood vector and other related data. The maximum-likelihood digit for each of the nine digit positions becomes the maximum-likelihood time of the century. A built-in transition function implements a conventional clock with decimal digits that count the minutes, hours, days and years, as corrected for leap seconds and leap years. The counting operation also rotates the likelihood vector corresponding to each digit as it advances. Thus, once the clock is set, each clock digit should correspond to the maximum-likelihood digit as transmitted.</p>
+<p>Each row of the decoding matrix also includes a compare counter and the most recently determined maximum-likelihood digit. If a digit likelihood exceeds the decision level and compares with previous digits for a number of successive minutes in any row, the maximum-likelihood digit replaces the clock digit in that row. When this condition is true for all rows and the second epoch has been reliably determined, the clock is set (or verified if it has already been set) and delivers correct time to the integral second. The fraction within the second is derived from the logical master clock, which runs at 8000 Hz and drives all system timing functions.</p>
+<h4>Master Clock Discipline</h4>
+<p>The logical master clock is derived from the audio codec clock. Its frequency is disciplined by a frequency-lock loop (FLL) which operates independently of the data recovery functions. The maximum value of the 5-ms pulse after the comb filter represents the on-time epoch of the second. At averaging intervals determined by the measured jitter, the frequency error is calculated as the difference between the epoches over the interval divided by the interval itself. The sample clock frequency is then corrected by this amount divided by a time constant of 8.</p>
+<p>When first started, the frequency averaging interval is 8 seconds, in order to compensate for intrinsic codec clock frequency offsets up to 125 PPM. Under most conditions, the averaging interval doubles in stages from the initial value to 1024 s, which results in an ultimate frequency resolution of 0.125 PPM, or about 11 ms/day.</p>
+<p>The data demodulation functions operate using the subcarrier clock, which is independent of the epoch. However, the data decoding functions are driven by the epoch. The decoder is phase-locked to the epoch in such a way that, when the clock state machine has reliably decoded the broadcast time to the second, the epoch timestamp of that second becomes a candidate to set the system clock.</p>
+<p>The comb filter can have a long memory and is vulnerable to noise and stale data, especially when coming up after a long fade. Therefore, a candidate is considered valid only if the 5-ms signal amplitude and SNR&nbsp;are above thresholds. In addition, the system clock is not set until after one complete averaging interval has passed with valid candidates.</p>
+<h4>Station Identification</h4>
+<p>It is important that the logical clock frequency is stable and accurately determined, since in many applications the shortwave radio will be tuned to a fixed frequency where WWV or WWVH signals are not available throughout the day. In addition, in some parts of the US, especially on the west coast, signals from either or both WWV and WWVH may be available at different times or even at the same time. Since the propagation times from either station are almost always different, each station must be reliably identified before attempting to set the clock.</p>
+<p>Reliable station identification requires accurate discrimination between very weak signals in noise and noise alone. The driver very aggressively soaks up every scrap of signal information, but has to be careful to avoid making pseudo-sense of noise alone. The signal quality metric depends on the minute pulse amplitude and SNR measured in second 0 of the minute, together with the data subcarrier amplitude and SNR measured in second 1. If all four values are above defined thresholds a hit is declared, otherwise a miss. In principle, the data pulse in second 58 is usable, but the AGC in most radios is not fast enough for a reliable measurement.</p>
+<p>The number of hits declared in the last 6 minutes for each station represents the high order bits of the metric, while the current minute pulse amplitude represents the low order bits. Only if the metric is above a defined threshold is the station signal considered acceptable. The metric is also used by the autotune function described below and reported in the timecode string.</p>
+<h4>Performance</h4>
+<p>It is the intent of the design that the accuracy and stability of the indicated time be limited only by the characteristics of the ionospheric propagation medium. Conventional wisdom is that manual synchronization via oscilloscope and HF medium is good only to a millisecond under the best propagation conditions. The performance of the NTP daemon disciplined by this driver is clearly better than this, even under marginal conditions.</p>
+<p>The figure below shows the measured offsets over a typical day near the bottom of the sunspot cycle ending in October, 2006. Variations up to &plusmn;0.4 ms can be expected due to changing ionospheric layer height and ray geometry over the day and night.</p>
+<div align="center"> <img src="../pic/offset1211.gif" alt="gif"></div>
+<p>The figure was constructed using a 2.4-GHz P4 running FreeBSD 6.1. For these measurements the computer clock was disciplined within a few microseconds of UTC using a PPS signal and GPS receiver and the measured offsets determined from the filegen peerstats data.</p>
+<p>The predicted propagation delay from the WWV transmitter at Boulder, CO, to the receiver at Newark, DE, varies over 9.0-9.3 ms. In addition, the receiver contributes 4.7 ms and the 600-Hz bandpass filter 0.9 ms. With these values, the mean error is less than 0.1 ms and varies &plusmn;0.3 ms over the day as the result of changing ionospheric height and ray geometry.</p>
+<h4>Program Operation</h4>
+The driver begins operation immediately upon startup. It first searches for one or both of the stations WWV and WWVH and attempts to acquire minute synch. This may take some fits and starts, as the driver expects to see several consecutive minutes with good signals and low jitter. If the autotune function is active, the driver will rotate over all five frequencies and both WWV and WWVH stations until finding a station and frequency with acceptable metric.
+<p>While this is going on the the driver acquires second synch, which can take up to several minutes, depending on signal quality. When minute synch has been acquired, the driver accumulates likelihood values for the unit (seconds) digit of the nine timecode digits, plus the seven miscellaneous bits included in the WWV/H transmission format. When a good unit digit has been found, the driver accumulated likelihood values for the remaining eight digits of the timecode. When three repetitions of all nine digits have decoded correctly, which normally takes 15 minutes with good signals, and up to 40 minutes when buried in noise, and the second synch has been acquired, the clock is set (or verified) and is selectable to discipline the system clock.</p>
+<p>Once the clock is set, it continues to provide correct timecodes as long as the signal metric is above threshold, as described in the previous section. As long as the clock is correctly set or verified, the system clock offsets are provided once each minute to the reference clock interface, where they are processed using the same algorithms as with other reference clocks and remote servers.</p>
+<p>It may happen as the hours progress around the clock that WWV and WWVH signals may appear alone, together or not at all. When the driver has mitigated which station and frequency is best, it sets the reference identifier to the string WV<i>f</i> for WWV and WH<i>f</i> for WWVH, where <i>f</i> is the frequency in megahertz. If the propagation delays have been properly set with the <tt>fudge time1</tt> (WWV) and <tt>fudge time2</tt> (WWVH) commands in the configuration file, handover from one station to the other is seamless.</p>
+<p>Operation continues as long as the signal metric from at least one station on at least one frequency is acceptable. A consequence of this design is that, once the clock is set, the time and frequency are disciplined only by the second synch pulse and the clock digits themselves are driven by the clock state machine. If for some reason the state machine drifts to the wrong second, it would never resynchronize. To protect against this most unlikely situation, if after two days with no signals, the clock is considered unset and resumes the synchronization procedure from the beginning.</p>
+<p>Once the system clock been set correctly it will continue to read correctly even during the holdover interval, but with increasing dispersion. Assuming the system clock frequency can be disciplined within 1 PPM, it can coast without signals for several days without exceeding the NTP step threshold of 128 ms. During such periods the root distance increases at 15 &mu;s per second, which makes the driver appear less likely for selection as time goes on. Eventually, when the distance due all causes exceeds 1 s, it is no longer suitable for synchronization. Ordinarily, this happens after about 18 hours with no signals. The <tt>tinker maxdist</tt> configuration command can be used to change this value.</p>
+<h4>Autotune</h4>
+<p>The driver includes provisions to automatically tune the radio in response to changing radio propagation conditions throughout the day and night. The radio interface is compatible with the ICOM CI-V standard, which is a bidirectional serial bus operating at TTL levels. The bus can be connected to a standard serial port using a level converter such as the CT-17. Further details are on the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
+<p>If specified, the driver will attempt to open the device <tt>/dev/icom</tt> and, if successful will activate the autotune function and tune the radio to each operating frequency in turn while attempting to acquire minute synch from either WWV or WWVH. However, the driver is liberal in what it assumes of the configuration. If the <tt>/dev/icom</tt> link is not present or the open fails or the CI-V bus is inoperative, the driver quietly gives up with no harm done.</p>
+<p>Once acquiring minute synch, the driver operates as described above to set the clock. However, during seconds 59, 0 and 1 of each minute it tunes the radio to one of the five broadcast frequencies to measure the signal metric as described above. Each of the five frequencies are probed in a five-minute rotation to build a database of current propagation conditions for all signals that can be heard at the time. At the end of each probe a mitigation procedure scans the database and retunes the radio to the best frequency and station found. For this to work well, the radio should be set for a fast AGC recovery time. This is most important while tracking a strong signal, which is normally the case, and then probing another frequency, which may have much weaker signals.</p>
+<p>The mitigation procedure selects the frequency and station with the highest valid metric, ties going first to the highest frequency and then to WWV in order. A station is considered valid only if the metric is above a specified threshold; if no station is above the metric, the rotating probes continue until a valid station is found.</p>
+<p>The behavior of the autotune function over a typical day is shown in the figure below.</p>
+<div align="center"> <img src="../pic/freq1211.gif" alt="gif"></div>
+<p>As expected, the lower frequencies prevail when the ray path is in moonlight (0100-1300 UTC) and the higher frequencies when the path is in sunlight (1300-0100 UTC). Note three periods in the figure show zero frequency when signals are below the minimum for all frequencies and stations.</p>
+<h4>Debugging Aids</h4>
+<p>The most convenient way to track the driver status is using the <tt>ntpq</tt> program and the <tt>clockvar</tt> command. This displays the last determined timecode and related status and error counters, even when the driver is not disciplining the system clock. If the debugging trace feature (<tt>-d</tt> on the <tt>ntpd</tt> command line) is enabled, the driver produces detailed status messages as it operates. If the <tt>fudge flag 4</tt> is set, these messages are written to the <tt>clockstats</tt> file. All messages produced by this driver have the prefix <tt>wwv</tt> for convenient filtering with the Unix <tt>grep</tt> command.</p>
+<p>The autotune process produces diagnostic information along with the timecode. This is very useful for evaluating the performance of the algorithms, as well as radio propagation conditions in general. The message is produced once each minute for each frequency in turn after minute synch has been acquired.</p>
+<p><tt>wwv5 status agc epoch secamp/secsnr datamp/datsnr wwv wwvh</tt></p>
+<p>where the fields after the <tt>wwv5</tt> identifier are: <tt>status</tt> contains status bits, <tt>agc</tt> audio gain, <tt>epoch </tt>second epoch, <tt>secamp/secsnr </tt>second pulse amplitude/SNR, and <tt>wwv</tt> and <tt>wwvh</tt> are two sets of fields, one each for WWV and WWVH. Each of the two fields has the format</p>
+<p><tt>ident score metric minamp/minsnr</tt></p>
+<p>where <tt>ident </tt>encodes the station (<tt>WV</tt> for WWV, <tt>WH</tt> for WWVH) and frequency (2, 5, 10, 15 or 20), <tt>score</tt> 32-bit shift register recording the hits (1) and misses (0) of the last 32 probes (hits and misses enter from the right), <tt>metric</tt> is described above, and <tt>minamp/minsnr</tt> is the minute pulse ampliture/SNR. An example is:</p>
+<pre><tt>wwv5 000d 111 5753 3967/20.1 3523/10.2 WV20 bdeff 100 8348/30.0 WH20 0000 1 22/-12.4</tt></pre>
+<p>There are several other messages that can occur; these are documented in the source listing.</p>
+<h4>Monitor Data</h4>
+When enabled by the <tt>filegen</tt> facility, every received timecode is written to the <tt>clockstats</tt> file in the following format:
+<p><tt>sq yyyy ddd hh:mm:ss l d du lset agc ident metric errs freq avg<br>
+ </tt></p>
+The fields beginning with <tt>yyyy</tt> and extending through <tt>du</tt> are decoded from the received data and are in fixed-length format. The remaining fields are in variable-length format. The fields are as follows:
+<dl>
+ <dt><tt>s</tt></dt>
+ <dd>The synch indicator is initially <tt>?</tt> before the clock is set, but turns to space when all nine digits of the timecode are correctly set and the decoder is synchronized to the station within 125 &mu;s.</dd>
+ <dt><tt>q</tt></dt>
+ <dd>The quality character is a four-bit hexadecimal code showing which alarms have been raised. Each bit is associated with a specific alarm condition according to the following:
+ <dl>
+ <dt><tt>0x8</tt></dt>
+ <dd>synch alarm. The decoder is not synchronized to the station within 125 &mu;s.</dd>
+ <dt><tt>0x4</tt></dt>
+ <dd>Digit error alarm. Less than nine decimal digits were found in the last minute.</dd>
+ <dt><tt>0x2</tt></dt>
+ <dd>Error alarm. More than 40 data bit errors were found in the last minute.</dd>
+ <dt><tt>0x1</tt></dt>
+ <dd>Compare alarm. A maximum-likelihood digit failed to agree with the current associated clock digit in the last minute.</dd>
+ </dl>
+ It is important to note that one or more of the above alarms does not necessarily indicate a clock error, but only that the decoder has detected a marginal condition.</dd>
+ <dt><tt>yyyy ddd hh:mm:ss</tt></dt>
+ <dd>The timecode format itself is self explanatory. Since the driver latches the on-time epoch directly from the second synch pulse, the seconds fraction is always zero. Although the transmitted timecode includes only the year of century, the Gregorian year is augmented by 2000.</dd>
+ <dt><tt>l</tt></dt>
+ <dd>The leap second warning is normally space, but changes to <tt>L</tt> if a leap second is to occur at the end of the month.</dd>
+ <dt><tt>d</tt></dt>
+ <dd>The DST state is <tt>S</tt> or <tt>D</tt> when standard time or daylight time is in effect, respectively. The state is <tt>I</tt> or <tt>O</tt> when daylight time is about to go into effect or out of effect, respectively.</dd>
+ <dt><tt>du</tt></dt>
+ <dd>The DUT sign and magnitude shows the current UT1 offset relative to the displayed UTC time, in deciseconds.</dd>
+ <dt><tt>lset</tt></dt>
+ <dd>Before the clock is set, the interval since last set is the number of minutes since the driver was started; after the clock is set, this is number of minutes since the decoder was last synchronized to the station within 125 &mu;s.</dd>
+ <dt><tt>agc</tt></dt>
+ <dd>The audio gain shows the current codec gain setting in the range 0 to 255. Ordinarily, the receiver audio gain control should be set for a value midway in this range.</dd>
+ <dt><tt>ident</tt></dt>
+ <dd>The station identifier shows the station, <tt>WV<i>f</i></tt> for WWV or <tt>WH<i>f</i></tt> for WWVH, and frequency <i><tt>f</tt></i> being tracked. If neither station is heard on any frequency, the reference identifier shows <tt>NONE</tt>.</dd>
+ <dt><tt>metric</tt></dt>
+ <dd>The signal metric described above from 0 (no signal) to 100 (best).</dd>
+ <dt><tt>errs</tt></dt>
+ <dd>The bit error counter is useful to determine the quality of the data signal received in the most recent minute. It is normal to drop a couple of data bits even under good signal conditions and increasing numbers as conditions worsen. While the decoder performs moderately well even with half the bits are in error in any minute, usually by that point the metric drops below threshold and the decoder switches to a different frequency.</dd>
+ <dt><tt>freq</tt></dt>
+ <dd>The frequency offset is the current estimate of the codec frequency offset to within 0.1 PPM. This may wander a bit over the day due to local temperature fluctuations and propagation conditions.</dd>
+ <dt><tt>avg</tt></dt>
+ <dd>The averaging time is the interval between frequency updates in powers of two to a maximum of 1024 s. Attainment of the maximum indicates the driver is operating at the best possible resolution in time and frequency.</dd>
+</dl>
+<p>An example timecode is:</p>
+<p><tt>0 2000 006 22:36:00 S +3 1 115 WV20 86 5 66.4 1024</tt></p>
+<p>Here the clock has been set and no alarms are raised. The year, day and time are displayed along with no leap warning, standard time and DUT +0.3 s. The clock was set on the last minute, the AGC is safely in the middle ot the range 0-255, and the receiver is tracking WWV on 20 MHz. Good receiving conditions prevail, as indicated by the metric 86 and 5 bit errors during the last minute. The current frequency is 66.4 PPM and the averaging interval is 1024 s, indicating the maximum precision available.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the propagation delay for WWV (40:40:49.0N 105:02:27.0W), in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Specifies the propagation delay for WWVH (21:59:26.0N 159:46:00.0W), in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Ordinarily, this field specifies the driver reference identifier; however, the driver sets the reference identifier automatically as described above.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Specifies the microphone port if set to zero or the line-in port if set to one. It does not seem useful to specify the compact disc player port.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Enables audio monitoring of the input signal. For this purpose, the speaker volume must be set before the driver is started.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver37.html b/html/drivers/driver37.html
new file mode 100644
index 0000000..c87a82f
--- /dev/null
+++ b/html/drivers/driver37.html
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>Forum Graphic GPS Dating station</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Forum Graphic GPS Dating station</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p>Address: 127.127.37.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS</tt><br>
+ Parallel Port: <tt>/dev/fgclock<i>u</i></tt></p>
+ <h4>Description</h4>
+ <p>This driver supports the Forum Graphic GPS Dating station sold by <a href="http://www.emr.fr/gpsclock.html">EMR company</a>.</p>
+ <p>Unfortunately sometime FG GPS start continues reporting of the same date. The only way to fix this problem is GPS power cycling and ntpd restart after GPS power-up.</p>
+ <p>After Jan,10 2000 my FG GPS unit start send a wrong answer after 10:00am till 11:00am. It repeat hour value in result string twice. I wroite a small code to avoid such problem. Unfortunately I have no second FG GPS unit to evaluate this problem. Please let me know if your GPS has no problems after Y2K.</p>
+ <p></p>
+ <h4>Monitor Data</h4>
+ <p>Each timecode is written to the <tt>clockstats</tt> file in the format <tt>YYYY YD HH MI SS</tt>.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>FG</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <hr>
+ <address>Dmitry Smirnov (das@amt.ru)</address>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver38.html b/html/drivers/driver38.html
new file mode 100644
index 0000000..445d70d
--- /dev/null
+++ b/html/drivers/driver38.html
@@ -0,0 +1,133 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <title>hopf clock drivers by ATLSoft</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+ <h1><font face="Arial"><i><blink><font size="5">hopf</font></blink></i><font size="+2"> </font><font size="3">Serial Line Receivers (6021 and&nbsp; kompatible)</font></font></h1>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h2><font size="+1">Synopsis</font></h2>
+ <table width="100%">
+ <tr>
+ <td>
+ <table bgcolor="#C0C0C0">
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Address:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td><b>127.127.38.<i>X</i></b></td>
+ </tr>
+ <tr>
+ <td height="1">
+ <div align="right">
+ <tt>Reference ID:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="1"><a name="REFID"></a><b>.hopf. </b>(default)<b>, GPS, DCF</b></td>
+ </tr>
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Driver ID:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="21"><b>HOPF_S</b></td>
+ </tr>
+ <tr>
+ <td height="16">
+ <div align="right">
+ <tt>Serial Port:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="16"><b>/dev/hopfclock<i>X</i></b></td>
+ </tr>
+ <tr>
+ <td height="23">
+ <div align="right">
+ <tt><font size="+1">Serial I/O</font>:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="23"><b>9600 baud, 8-bits, 1-stop, no parity</b></td>
+ </tr>
+ </table>
+ </td>
+ <td align="center"><img src="../pic/fg6021.gif" alt="gif" height="207" width="238" border="0"></td>
+ </tr>
+ </table>
+ <hr>
+ <h2><font size="+1">Description</font></h2>
+ <p>The <b>refclock_hopf_serial</b> driver supports <a href="http://www.hopf.com">hopf electronic receivers</a> with serial Interface kompatibel 6021.<br>
+ </p>
+ <p>Additional software and information about the software drivers is available from: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a>.<br>
+ </p>
+ <p>Latest NTP driver source, executables and documentation is maintained at: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a></p>
+ <hr>
+ <h2><font size="+1">Operating System Compatibility</font></h2>
+ <p align="left">The hopf clock driver has been tested on the following software and hardware platforms:<br>&nbsp;</p>
+ <table bgcolor="#C0C0C0">
+ <tr>
+ <td valign="CENTER" nowrap width="23%">
+ <p align="left"><b>Platform</b></p>
+ </td>
+ <td valign="CENTER" nowrap>
+ <p align="left"><b>Operating System</b></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="CENTER" nowrap width="23%">
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <td valign="CENTER" nowrap>
+ <p align="left">Linux</p>
+ </td>
+ </tr>
+ <tr>
+ <td nowrap>
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <td nowrap>
+ <p align="left">Windows NT</p>
+ </td>
+ </tr>
+ <tr>
+ <td nowrap>
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <center>
+ <td nowrap>Windows 2000</td>
+ </center>
+ </tr>
+ </table>
+ <hr>
+ <h2><font size="+1">O/S Serial Port Configuration</font></h2>
+ The driver attempts to open the device <b><tt><a href="#REFID">/dev/hopfclock<i>X</i></a></tt></b> where <i><b>X</b></i> is the NTP refclock unit number as defined by the LSB of the refclock address.&nbsp; Valid refclock unit numbers are 0 - 3.
+ <p>The user is expected to provide a symbolic link to an available serial port device.&nbsp; This is typically performed by a command such as:</p>
+ <blockquote>
+ <tt>ln -s /dev/ttyS0 /dev/hopfclock0</tt></blockquote>Windows NT does not support symbolic links to device files.&nbsp;<br>
+ <b>COMx</b>: is used by the driver, based on the refclock unit number, where <b>unit 1</b> corresponds to <b>COM1</b>: and <b>unit 3</b> corresponds to <b>COM3</b>:<br>&nbsp;
+ <hr>
+ <h2><font size="+1">Fudge Factors</font></h2>
+ <dl>
+ <dt><b><tt><font size="+1">time1 <i>time</i></font></tt></b>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. Should be set to 20 milliseconds to correct serial line and operating system delays incurred in capturing time stamps from the synchronous packets.
+ <dt><tt><font size="+1"><a href="#REFID"><b>refid <i>string</i></b></a></font></tt>
+ <dd>Specifies the driver reference identifier, <b>GPS </b><i>or</i> <b>DCF</b>.
+ <dt><tt><font size="+1"><b>flag1 0 | 1</b></font></tt>
+ <dd>When set to 1, driver sync's even if only crystal driven.
+ </dl>
+ <hr>
+ <h2><a name="DataFormat"></a><font size="+1">Data Format</font></h2>
+ <p>as specified in clock manual under pt. <u>[ <span style="font-size:10.0pt;font-family: Arial;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;; mso-ansi-language:EN-GB;mso-fareast-language:DE;mso-bidi-language:AR-SA" lang="EN-GB"><b>Data String for NTP</b> ( <b><i>Network Time Protocol </i></b>) </span>]</u></p>
+ <hr>
+ <h3>Questions or Comments:</h3>
+ <p><a href="mailto:altmeier@atlsoft.de">Bernd Altmeier</a><a href="http://www.ATLSoft.de"><br>Ing.-B&uuml;ro f&uuml;r Software www.ATLSoft.de</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver39.html b/html/drivers/driver39.html
new file mode 100644
index 0000000..9e1605f
--- /dev/null
+++ b/html/drivers/driver39.html
@@ -0,0 +1,115 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <title>hopf clock drivers by ATLSoft</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
+ <h1><font face="Arial"><i><blink><font size="5">hopf</font></blink></i><font size="+2"> </font><font size="3">PCI-Bus Receiver (6039 GPS/DCF77)</font></font></h1>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <div align="center">
+ <center>
+ <table width="100%">
+ <tr>
+ <td width="50%">
+ <h2><font size="+1">Synopsis</font></h2>
+ <table bgcolor="#C0C0C0">
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Address:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="21"><b>127.127.39.<i>X</i></b></td>
+ </tr>
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Reference ID:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="21"><a name="REFID"></a><b>.hopf. </b>(default)<b>, GPS, DCF</b></td>
+ </tr>
+ <tr>
+ <td height="21">
+ <div align="right">
+ <tt>Driver ID:&nbsp;&nbsp;</tt></div>
+ </td>
+ <td height="21"><b>HOPF_P</b></td>
+ </tr>
+ </table>
+ </td>
+ <td align="center" valign="middle"><font face="Arial"><i><blink><font size="5"><img src="../pic/fg6039.jpg" alt="gif" height="140" width="141" border="0"></font></blink></i></font></td>
+ </tr>
+ </table>
+ </center>
+ </div>
+ <hr>
+ <h2><font size="+1">Description</font></h2>
+ The <b>refclock_hopf_pci </b>driver supports the <a href="http://www.hopf.com">hopf</a> PCI-bus interface 6039 GPS/DCF77.<br>
+ Additional software and information about the software drivers maybe available from: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a>.<br>
+ Latest NTP driver source, executables and documentation is maintained at: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a>
+ <hr>
+ <h2><font size="+1">Operating System Compatibility</font></h2>
+ <p align="left">The hopf clock driver has been tested on the following software and hardware platforms:<br>&nbsp;</p>
+ <table bgcolor="#C0C0C0">
+ <tr>
+ <td valign="CENTER" nowrap width="23%">
+ <p align="left"><b>Platform</b></p>
+ </td>
+ <td valign="CENTER" nowrap>
+ <p align="left"><b>Operating System</b></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="CENTER" nowrap width="23%">
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <td valign="CENTER" nowrap>
+ <p align="left">Linux</p>
+ </td>
+ </tr>
+ <tr>
+ <td nowrap>
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <td nowrap>
+ <p align="left">Windows NT</p>
+ </td>
+ </tr>
+ <tr>
+ <td nowrap>
+ <p align="left">i386 (PC)&nbsp;</p>
+ </td>
+ <center>
+ <td nowrap>Windows 2000</td>
+ </center>
+ </tr>
+ </table>
+ <hr>
+ <h2><font size="+1">O/S System Configuration</font></h2>
+ <p><b>UNIX</b></p>
+ The driver attempts to open the device <b><tt><a href="#REFID">/dev/hopf6039</a></tt></b> . The device entry will be made by the installation process of the kernel module for the PCI-bus board. The driver sources belongs to the delivery equipment of the PCI-board.
+ <p><b>Windows NT/2000</b></p>
+ <p>The driver attempts to open the device by calling the function &quot;OpenHopfDevice()&quot;. This function will be installed by the Device Driver for the PCI-bus board. The driver belongs to the delivery equipment of the PCI-board.</p>
+ <hr>
+ <h2><font size="+1">Fudge Factors</font></h2>
+ <dl>
+ <dt><tt><font size="+1"><a href="#REFID"><b>refid <i>string</i></b></a></font></tt>
+ <dd>Specifies the driver reference identifier, <b>GPS </b><i>or</i> <b>DCF</b>.
+ <dt><tt><font size="+1"><b>flag1 0 | 1</b></font></tt>
+ <dd>When set to 1, driver sync's even if only crystal driven.
+ </dl>
+ <hr>
+ <h3>Questions or Comments:</h3>
+ <p><a href="mailto:altmeier@atlsoft.de">Bernd Altmeier</a><a href="http://www.ATLSoft.de"><br>Ing.-B&uuml;ro f&uuml;r Software www.ATLSoft.de</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver4.html b/html/drivers/driver4.html
new file mode 100644
index 0000000..2139289
--- /dev/null
+++ b/html/drivers/driver4.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>Spectracom WWVB/GPS Receivers</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+.style1 {
+ font-family: Symbol
+}
+-->
+</style>
+</head>
+<body>
+<h3>Spectracom WWVB/GPS Receivers</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+ Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:56<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<p>Address: 127.127.4.<i>u</i><br>
+ Reference ID: <tt>WWVB</tt><br>
+ Driver ID: <tt>WWVB_SPEC</tt><br>
+ Serial Port: <tt>/dev/wwvb<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: Optional PPS signal processing, <tt>tty_clk</tt><br>
+ Requires: Optional PPS signal processing requires the PPSAPI signal interface.</p>
+<h4>Description</h4>
+<p>This driver supports all known Spectracom radio and satellite clocks, including the Model 8170 and Netclock/2 WWVB Synchronized Clocks and the Netclock/GPS GPS Master Clock. The claimed accuracy of the WWVB clocks is 100 <span class="style1">m</span>s relative to the broadcast signal. These clocks have proven a reliable source of time, except in some parts of the country with high levels of conducted RF interference. WIth the GPS clock the claimed accuracy is 130 ns. However, in most cases the actual accuracy is limited by the precision of the timecode and the latencies of the serial interface and operating system.</p>
+<p>The DIPswitches on these clocks should be set to 24-hour display, AUTO DST off, data format 0 or 2 (see below) and baud rate 9600. If this clock is used as the source for the IRIG Audio Decoder (<tt>refclock_irig.c</tt> in this distribution), set the DIPswitches for AM IRIG output and IRIG format 1 (IRIG B with signature control).</p>
+<p>There are two timecode formats used by these clocks. Format 0, which is available with all clocks, and format 2, which is available with all clocks except the original (unmodified) Model 8170.</p>
+<p>Format 0 (22 ASCII printing characters):<br>
+ &lt;cr&gt;&lt;lf&gt;i ddd hh:mm:ss TZ=zz&lt;cr&gt;&lt;lf&gt;</p>
+<p>on-time = first &lt;cr&gt;<br>
+ i = synchronization flag (' ' = in synch, '?' = out synch)<br>
+ hh:mm:ss = hours, minutes, seconds</p>
+<p>The alarm condition is indicated by other than ' ' at <tt>i</tt>, which occurs during initial synchronization and when received signal is lost for about ten hours.</p>
+<p>Format 2 (24 ASCII printing characters):<br>
+ lt;cr&gt;lf&gt;iqyy ddd hh:mm:ss.fff ld</p>
+<p>on-time = &lt;cr&gt;<br>
+ i = synchronization flag (' ' = in synch, '?' = out synch)<br>
+ q = quality indicator (' ' = locked, 'A'...'D' = unlocked)<br>
+ yy = year (as broadcast)<br>
+ ddd = day of year<br>
+ hh:mm:ss.fff = hours, minutes, seconds, milliseconds</p>
+<p>The alarm condition is indicated by other than ' ' at <tt>i</tt>, which occurs during initial synchronization and when received signal is lost for about ten hours. The unlock condition is indicated by other than ' ' at <tt>q</tt>.</p>
+<p>The <tt>q</tt> is normally ' ' when the time error is less than 1 ms and a character in the set <tt>A...D</tt> when the time error is less than 10, 100, 500 and greater than 500 ms respectively. The <tt>l</tt> is normally ' ', but is set to <tt>L</tt> early in the month of an upcoming UTC leap second and reset to ' ' on the first day of the following month. The <tt>d</tt> is set to <tt>S</tt> for standard time <tt>S</tt>, <tt>I</tt> on the day preceding a switch to daylight time, <tt>D</tt> for daylight time and <tt>O</tt> on the day preceding a switch to standard time. The start bit of the first &lt;cr&gt; is synchronized to the indicated time as returned.</p>
+<p>This driver does not need to be told which format is in use - it figures out which one from the length of the message. A three-stage median filter is used to reduce jitter and provide a dispersion measure. The driver makes no attempt to correct for the intrinsic jitter of the radio itself, which is a known problem with the older radios.</p>
+<h4>PPS Signal Processing</h4>
+<p>When PPS signal processing is enabled, and when the system clock has been set by this or another driver and the PPS signal offset is within 0.4 s of the system clock offset, the PPS signal replaces the timecode for as long as the PPS signal is active. If for some reason the PPS signal fails for one or more poll intervals, the driver reverts to the timecode. If the timecode fails for one or more poll intervals, the PPS signal is disconnected.</p>
+<h4>Monitor Data</h4>
+<p>The driver writes each timecode as received to the <tt>clockstats</tt> file. When enabled by the <tt>flag4</tt> fudge flag, a table of quality data maintained internally by the Netclock/2 is retrieved and written to the <tt>clockstats</tt> file when the first timecode message of a new day is received.</p>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the PPS time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Specifies the serial time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>WWVB</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Disable PPS signal processing if 0 (default); enable PPS signal processing if 1.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>If PPS signal processing is enabled, capture the pulse on the rising edge if 0 (default); capture on the falling edge if 1.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>If PPS signal processing is enabled, use the <tt>ntpd</tt> clock discipline if 0 (default); use the kernel discipline if 1.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver40.html b/html/drivers/driver40.html
new file mode 100644
index 0000000..6799f76
--- /dev/null
+++ b/html/drivers/driver40.html
@@ -0,0 +1,264 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html lang="en">
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <title>JJY Receivers</title>
+ <link rev="made" href="http://www.bea.hi-ho.ne.jp/abetakao/">
+ <link rel="start" href="http://www.eecis.udel.edu/~mills/ntp/html/refclock.html">
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>JJY Receivers</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->3-May-2011 00:20<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.40.<em>u</em><br>
+ Reference ID: <code>JJY</code><br>
+ Driver ID: <code>JJY</code><br>
+ Serial Port: <code>/dev/jjy<em>u</em></code>; See corresponding receiver
+ <h4>Description</h4>
+ <p>This driver supports the following JJY receivers sold in Japan.</p>
+ <ul>
+
+ <li>
+ <p>Tristate Ltd. JJY01, JJY02 <a href="http://www.tristate.ne.jp/">http://www.tristate.ne.jp/</a> (Japanese only)</p><br>
+ <dl>
+ <dt>NTP configuration ( ntp.conf )</dt>
+ <dd>
+ <p>server &nbsp; 127.127.40.X &nbsp; mode 1</p>
+ <dl>
+ <dt>fudge &nbsp; 127.127.40.X &nbsp; flag1 0|1</dt>
+ <dd>
+ <p>Flag1 has no effect for time synchronization. When a flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into a clockstats file.</p>
+ <table border="1" summary="fudge flag1">
+ <tr><td>0 (Default)</td><td>DCST and STUS commands are not issued</td></tr>
+ <tr><td>1</td><td>DCST and STUS commands are issued</td></tr>
+ </table>
+ </dd>
+ </dl>
+ <br>
+ </dd>
+ <dt>Interface</dt>
+ <dd>
+ <p>RS-232C, 9600 baud, 8-bits, no parity, 1 stop bit</p>
+ <br>
+ </dd>
+ <dt>Time code format</dt>
+ <dd><br>
+ <table summary="CommandAndReply">
+ <tr>
+ <td>Command</td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td>Reply</td>
+ </tr>
+ <tr>
+ <td><code>date{CR}{LF}</code></td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td><code>YYYY/MM/DD WWW{CR}{LF}</code></td>
+ </tr>
+ <tr>
+ <td><code>stim{CR}{LF}</code></td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td><code>HH:MM:SS{CR}{LF}</code></td>
+ </tr>
+ </table>
+ <br>
+ </dd>
+ </dl>
+ </li>
+
+ <li>
+ <p>C-DEX Co.,Ltd. JST2000 <a href="http://www.c-dex.co.jp/">http://www.c-dex.co.jp/</a> (Japanese only)</p><br>
+ <dl>
+ <dt>NTP configuration ( ntp.conf )</dt>
+ <dd>
+ <p>server &nbsp; 127.127.40.X &nbsp; mode 2</p>
+ <br>
+ </dd>
+ <dt>Interface</dt>
+ <dd>
+ <p>RS-232C, 9600 baud, 8-bits, no parity, 1 stop bit</p>
+ <br>
+ </dd>
+ <dt>Time code format</dt>
+ <dd><br>
+ <table summary="CommandAndReply">
+ <tr>
+ <td>Command</td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td>Reply</td>
+ </tr>
+ <tr>
+ <td><code>{ENQ}1J{ETX}</code></td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td><code>{STX}JYYMMDD HHMMSSS{ETX}</code></td>
+ </tr>
+ </table>
+ <br>
+ </dd>
+ </dl>
+ </li>
+
+ <li>
+ <p>Echo Keisokuki Co.,Ltd. LT-2000 <a href="http://www.clock.co.jp/">http://www.clock.co.jp/</a> (Japanese only)</p><br>
+ <dl>
+ <dt>NTP configuration ( ntp.conf )</dt>
+ <dd>
+ <p>server &nbsp; 127.127.40.X &nbsp; mode 3</p>
+ <br>
+ </dd>
+ <dt>Interface</dt>
+ <dd>
+ <p>RS-232C, 9600 baud, 8-bits, no parity, 1 stop bit</p>
+ <br>
+ </dd>
+ <dt>Time code format</dt>
+ <dd><br>
+ <table summary="CommandAndReply">
+ <tr>
+ <td>Command</td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td>Reply</td>
+ </tr>
+ <tr>
+ <td><code>C</code></td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td>( Mode 2 : Continuous )</td>
+ </tr>
+ <tr>
+ <td>( Every second before 0.5 second )</td>
+ <td></td>
+ <td><code>YYMMDDWHHMMSS{ST1}{ST2}{ST3}{ST4}{CR}</code></td>
+ </tr>
+ <tr>
+ <td><code>#</code></td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td>( Mode 1 : Request&amp;Send )</td>
+ </tr>
+ </table>
+ <br>
+ </dd>
+ </dl>
+ </li>
+
+ <li>
+ <p>CITIZEN T.I.C. CO.,LTD. JJY-200 <a href="http://www.tic-citizen.co.jp/">http://www.tic-citizen.co.jp/</a> (Japanese only)</p><br>
+ <dl>
+ <dt>NTP configuration ( ntp.conf )</dt>
+ <dd>
+ <p>server &nbsp; 127.127.40.X &nbsp; mode 4</p>
+ <br>
+ </dd>
+ <dt>Interface</dt>
+ <dd>
+ <p>RS-232C, 4800 baud, 8-bits, no parity, 1 stop bit</p>
+ <br>
+ </dd>
+ <dt>Time code format</dt>
+ <dd><br>
+ <table summary="CommandAndReply">
+ <tr>
+ <td>Command</td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td>Reply</td>
+ </tr>
+ <tr>
+ <td>( Every second )</td>
+ <td></td>
+ <td><code>'XX YY/MM/DD W HH:MM:SS{CR}</code></td>
+ </tr>
+ </table>
+ <br>
+ </dd>
+ </dl>
+ </li>
+
+ <li>
+ <p>Tristate Ltd. TS-GPSclock-01 <a href="http://www.tristate.ne.jp/">http://www.tristate.ne.jp/</a> (Japanese only)</p>
+ <p>This driver supports the Tristate TS-GPSclock-01 in command/response mode, though it is a GPS clock, not JJY radio clock. Using the menus and the onboard switches, the TS-GPSclock-01 should be set to command/response mode and JST time zone.<br>
+ Besides this driver ( Type 40 ), <a href="driver20.html">the generic NMEA GPS driver ( Type 20 )</a> supports the TS-GPSclock-01 in NMEA mode.</p>
+ <dl>
+ <dt>NTP configuration ( ntp.conf )</dt>
+ <dd>
+ <p>server &nbsp; 127.127.40.X &nbsp; mode 5</p>
+ <dl>
+ <dt>fudge &nbsp; 127.127.40.X &nbsp; flag1 0|1</dt>
+ <dd>
+ <p>Flag1 has no effect for time synchronization. When a flag1 is set to 1, status command is issued before DATE and TIME commands, and write a response text into a clockstats file.</p>
+ <table border="1" summary="fudge flag1">
+ <tr><td>0 (Default)</td><td>STUS command is not issued</td></tr>
+ <tr><td>1</td><td>STUS command is issued</td></tr>
+ </table>
+ </dd>
+ </dl>
+ <br>
+ </dd>
+ <dt>Interface</dt>
+ <dd>
+ <p>USB ( /dev/ttyACM<em>0</em> )</p>
+ <br>
+ </dd>
+ <dt>Time code format</dt>
+ <dd><br>
+ <table summary="CommandAndReply">
+ <tr>
+ <td>Command</td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td>Reply</td>
+ </tr>
+ <tr>
+ <td><code>date{CR}{LF}</code></td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td><code>YYYY/MM/DD{CR}{LF}</code></td>
+ </tr>
+ <tr>
+ <td><code>time{CR}{LF}</code></td>
+ <td>&nbsp;--&gt;&nbsp;</td>
+ <td><code>HH:MM:SS{CR}{LF}</code></td>
+ </tr>
+ </table>
+ <br>
+ </dd>
+ </dl>
+ </li>
+
+ </ul>
+ <p>JJY is the radio station which transmites the JST (Japan Standard Time) in long wave radio. The station JJY is operated by the National Institute of Information and Communications Technology. An operating announcement and some information are avaiable from <a href="http://www.nict.go.jp/">http://www.nict.go.jp/</a> (English and Japanese) and <a href="http://jjy.nict.go.jp/">http://jjy.nict.go.jp/</a> (English and Japanese)</p>
+ <p>The user is expected to provide a symbolic link to an available serial port device. This is typically performed by a command such as;</p>
+ <p><code>ln -s /dev/ttyS0 /dev/jjy0</code></p>
+ <p>Using RS232C to USB converter cable, the clock can be connected to an USB port instead of a serial port. In this case, typical symbolic link command is as follows;
+ <p><code>ln -s /dev/ttyUSB0 /dev/jjy0</code></p>
+ <p>Windows NT does not support symbolic links to device files. COM<em>X</em>: is the unit used by the driver, based on the refclock unit number, where unit 1 corresponds to COM1: and unit 3 corresponds to COM3:</p>
+ <h4>Monitor Data</h4>
+ <p>The driver writes each timecode as received to the <code>clockstats</code> file.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><code>time1 <em>time</em></code>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><code>time2 <em>time</em></code>
+ <dd>Not used by this driver.
+ <dt><code>stratum <em>number</em></code>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><code>refid <em>string</em></code>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <code>JJY</code>.
+ <dt><code>flag1 0 | 1</code>
+ <dd>See corresponding receiver.
+ <dt><code>flag2 0 | 1</code>
+ <dd>Not used by this driver.
+ <dt><code>flag3 0 | 1</code>
+ <dd>Not used by this driver.
+ <dt><code>flag4 0 | 1</code>
+ <dd>Not used by this driver.
+ </dl>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver42.html b/html/drivers/driver42.html
new file mode 100644
index 0000000..86f676e
--- /dev/null
+++ b/html/drivers/driver42.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>Zyfer GPStarplus Receiver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Zyfer GPStarplus Receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.42.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>Zyfer GPStarplus</tt><br>
+ Serial Port: <tt>/dev/zyfer<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>(none)</tt>
+ <h4>Description</h4>
+ <p>This driver supports the <a href="http://www.zyfer.com/">Zyfer GPStarplus</a> receiver.</p>
+ <p>The receiver has a DB15 port on the back which has input TxD and RxD lines for configuration and control, and a separate TxD line for the once-per-second timestamp.</p>
+ <p>Additionally, there are BNC connectors on the back for things like PPS and IRIG output.</p>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver43.html b/html/drivers/driver43.html
new file mode 100644
index 0000000..6d04102
--- /dev/null
+++ b/html/drivers/driver43.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>RIPE NCC interface for Trimble Palisade</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>RIPE NCC interface for Trimble Palisade</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <img src="../pic/driver43_2.jpg" alt="Trimble Acutime 2000" align="right">
+ <h4>Synopsis</h4>
+ Address: 127.127.43.<i>u</i><br>
+ Reference ID: <tt>RIPENCC</tt><br>
+ Driver ID: <tt>RIPENCC</tt>
+ <h4>Description</h4>
+ <p>This is a special driver developed to be used in conjuction with the RIPE NCC clock card in the RIPE NCC Test Traffic Measurements project.</p>
+ <h4>Why this driver?</h4>
+ <p>The reason why we created a seperated driver for an antenna for which already a (vendor supplied) driver exist is a design decision. To be more specific, the standard Trimble interface uses a 12 pin connector. The cable sold by Trimble to connect to this wire is a very thick cable. Certainly not something you wish to run for several 100 meters through your building. And if you wanted to run it for 100 meters, you always would have to really run the cable, and didn't have the option to use existing wiring.<br>
+ </p>
+ <p>This is where we wanted more flexibility. We wanted to be able to use existing wiring in buildings. That leaded us to CAT-5(UTP) which only gives us 8 wires. Therefor we decided to redesing the use of the Trimble antenna. The Trimble supports two modes: EVENT driver and PPS mode. The default is to use the EVENT mode which needs all 12 wires. We only use the PPS timestamps for which we have enough with 8 wires. For our purposes this is more than fine.</p>
+ More information about the project can be found on the <a href="http://www.ripe.net/test-traffic" target="_new">Test Traffic Measurements</a> website. <img src="../pic/driver43_1.gif" alt="RIPE NCC clock card" align="right">
+ <h4>RIPE NCC clock card</h4>
+ <p>The card is very a simple PCI card. The only feature on the bus it uses is the power supply. It uses this power supply to power the Trimble GPS antenna.</p>
+ <p>The card basicly just is a RS422 to RS232 converter. It gets the Trimble's RS422 signal on a RJ45 connector and transforms that to RS232 on a DIN9 connector. This connector should be loopbacked on the back of the machine to the serial port. As said, the card doesn't do any PCI data transfers.</p>
+ <p>The schematics of the interface card is available here: <a href="http://www.ripe.net/projects/ttm/Host_testbox/gps_if.pdf">gps_interface_schematic.pdf</a>. You are free to create this card yourself as long as you give some credit or reference to us. Note that we don't sell these cards on a commercial basis, but for interested parties we do have some spares to share.</p>
+ <p></p>
+ <h4>Monitor Data</h4>
+ <p>In the <tt>filegen clockstats</tt> file the following (example) data is collected:</p>
+ <pre>
+52445 41931.275 127.127.40.0 U1 20.6.2002 11:38:51 13 11
+52445 41931.395 127.127.40.0 C1 20062002 113851 6 364785 110.2 450 6.7 13 5222.374737 N 0453.268013 E 48 7 11 0 1 -14 20 0 -25
+52445 41931.465 127.127.40.0 S1 07 1 1 02 59.3 291.5 39.3
+52445 41931.485 127.127.40.0 S1 11 2 1 02 59.9 138.0 60.2
+52445 41931.525 127.127.40.0 S1 01 4 1 02 48.4 185.7 28.3
+52445 41931.555 127.127.40.0 S1 14 5 2 02 32.7 41.0 15.4
+52445 41931.585 127.127.40.0 S1 20 6 1 02 59.9 256.6 78.0
+52445 41931.615 127.127.40.0 S1 25 8 2 00 0.0 86.6 20.1
+</pre>
+ <p>This is in the form of:</p>
+ <pre>
+All output lines consist of a prefix and a message, the prefix is:
+[days since epoch] [sec.ms since start of day] [peer address]
+
+And all individual messages:
+
+*Primary UTC time packet:
+U1 [date] [time] [trackstat] [utcflags]
+
+*Comprehensive time packet:
+C1 [date] [time] [mode] [bias] [biasunc] [rate] [rateunc] [utcoff] [latitude] [longtitude] [alt] [vis sat](x8)
+
+*Tracking status packet:
+S1 [prn] [channel] [aqflag] [ephstat] [snr] [azinuth] [elevation]
+</pre>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver44.html b/html/drivers/driver44.html
new file mode 100644
index 0000000..a3fac5c
--- /dev/null
+++ b/html/drivers/driver44.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <title>NeoClock4X</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ </head>
+
+ <body>
+ <h1>NeoClock4X - DCF77 / TDF serial line receiver<br>
+ </h1>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr size="2" width="100%">
+ <h2>Synopsis</h2>
+ <table width="100%">
+ <tbody>
+ <tr>
+ <td valign="top">
+ <table width="100%">
+ <tbody>
+ <tr>
+ <td valign="top">Adress<br>
+ </td>
+ <td valign="top">127.127.44.u<br>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">Reference ID<br>
+ </td>
+ <td valign="top">neol<br>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">Driver ID<br>
+ </td>
+ <td valign="top">NEOCLK4X<br>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">Serial Port<br>
+ </td>
+ <td valign="top">/dev/neoclock4x-u<br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <br>
+ </td>
+ <td align="right" valign="top"><a href="http://www.linum.com"><img src="../pic/neoclock4x.gif" alt="NeoClock4X - DCF77 receiver" height="195" width="150"> </a><br>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <hr size="2" width="100%">
+ <h2>Description</h2>
+ The refclock_neoclock4x driver supports the NeoClock4X receiver available from <a href="http://www.linum.com">Linum Software GmbH</a>. The receiver is available as a <a href="http://www.dcf77.de">DCF77</a> or TDF receiver. Both receivers have the same output string. For more information about the NeoClock4X receiver please visit <a href="http://www.linux-funkuhr.de">http://www.linux-funkuhr.de</a>. &nbsp;
+ <hr size="2" width="100%">
+ <h2>Fudge Factors</h2>
+ <dl>
+ <dt><b><a href="../clockopt.html">time1 time</a></b>
+ <dd>Specifies the time offset calibration factor with the default value off 0.16958333 seconds. This offset is used&nbsp; to correct serial line and operating system delays incurred in capturing time stamps. If you want to fudge the time1 offset <b>ALWAYS</b> add a value off 0.16958333. This is neccessary to compensate to delay that is caused by transmit the timestamp at 2400 Baud. If you want to compensate the delay that the DCF77 or TDF radio signal takes to travel to your site simply add the needed millisecond delay to the given value. Note that the time here is given in seconds.
+ <dd>Default setting is 0.16958333 seconds.<br>
+ </dl>
+ <dl>
+ <dt><b><a href="../clockopt.html">time2 time</a></b>
+ <dd>Not used by this driver.
+ </dl>
+ <dl>
+ <dt><a href="../clockopt.html"><b>flag1 0 | 1</b></a>
+ <dd>When set to 1 the driver will feed ntp with timestampe even if the radio signal is lost. In this case an internal backup clock generates the timestamps. This is ok as long as the receiver is synced once since the receiver is able to keep time for a long period.
+ <dd>Default setting is 0 = don't synchronize to CMOS clock.
+ <dt><a href="../clockopt.html"><b>flag2 0 | 1</b></a>
+ <dd>You can allow the NeoClock4X driver to use the quartz clock even if it is never synchronized to a radio clock. This is usally not a good idea if you want preceise timestamps since the CMOS clock is maybe not adjusted to a dst status change. So <b>PLEASE</b> switch this only on if you now what you're doing.
+ <dd>Default setting is 0 = don't synchronize to unsynchronized CMOS clock.
+ <dt><a href="../clockopt.html"><b>flag3 0 | 1</b></a>
+ <dd>Not used by this driver.
+ <dt><a href="../clockopt.html"><b>flag4 0 | 1</b></a>
+ <dd>It is recommended to allow extensive logging while you setup the NeoClock4X receiver. If you activate flag4 every received data is logged. You should turn off flag4 as soon as the clock works as expected to reduce logfile cluttering.
+ <dd>Default setting is 0 = don't log received data and converted utc time.
+ </dl>
+ <hr size="2" width="100%">
+ Please send any comments or question to <a href="mailto:neoclock4@linum.com">neoclock4x@linum.com</a>.
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver45.html b/html/drivers/driver45.html
new file mode 100644
index 0000000..bef883f
--- /dev/null
+++ b/html/drivers/driver45.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>Spectracom TSYNC PCI</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Spectracom TSYNC PCI</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->26-Mar-2012 05:10<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.45.<i>u</i><br>
+ Reference ID: one of <tt>GPS</tt>, <tt>IRIG</tt>, <tt>HVQ</tt>, <tt>FREQ</tt>, <tt>ACTS</tt>, <tt>PPS</tt>, <tt>PTP</tt>, <tt>ACT</tt>, <tt>USR</tt>, <tt>LOCL</tt><br>
+ Driver ID: <tt>Spectracom TSYNC PCI</tt><br>
+ Driver Port: <tt>/dev/tsyncpci<i>u</i></tt>
+ Features: <tt>(none)</tt>
+ <h4>Description</h4>
+ <p>This driver supports the <a
+ href="http://www.spectracomcorp.com/ProductsServices/TimingSynchronization/BuslevelTiming">Spectracom TSYNC PCI</a> receiver.</p>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver46.html b/html/drivers/driver46.html
new file mode 100644
index 0000000..40aded8
--- /dev/null
+++ b/html/drivers/driver46.html
@@ -0,0 +1,184 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+ <meta http-equiv="Content-Type"
+ content="text/html;charset=iso-8859-1"><title>GPSD-NG client driver</title>
+
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ <style type="text/css">
+ table.dlstable { font-size:85%; }
+ td.ttf{ font-family:Courier; font-weight:bold; }
+ </style></head>
+
+
+
+ <body>
+ <h3>GPSD NG client driver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->1-Mar-2014 03:48<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+
+ <p>
+ Address: 127.127.46.<i>u</i><br>
+ Reference ID: <tt>GPSD</tt><br>
+ Driver ID: <tt>GPSD_JSON</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt> as symlink to the true
+ device (not used directly; see below)<br>
+ Features: <tt></tt>
+ </p>
+
+ <h4>Description</h4>
+
+ <p>
+ This driver is a client driver to the <i>GPSD</i> daemon, which
+ over the time became increasingly popular for UN*Xish
+ platforms. <i>GPSD</i> can manage several devices in parallel,
+ aggregate information, and acts as a data hub for client
+ applications. <i>GPSD</i> can also auto-detect and handle PPS
+ hardware signals on serial ports. Have a look
+ at <a href="http://www.catb.org/gpsd/">the
+ <i>GPSD</i> project page</a>.
+ </p>
+ <p>
+ <b>It is important to understand that this driver works best
+ using a GPS device with PPS support.</b>
+ </p>
+ <p>
+ The GPSD-NG protocol is text based, using JSON notation to
+ transfer records in form of JSON objects. The driver uses a
+ TCP/IP connection to <tt>localhost:gpsd</tt> to connect to the
+ daemon and then requests the GPS
+ device <tt>/dev/gps<i>u</i></tt> to be watched. (Different clock
+ units use different devices, and
+ <i>GPSD</i> is able to give only the relevant information to a clock
+ instance.)
+ </p>
+ <p>
+ This driver does not expect <i>GPSD</i> to be running or the
+ clock device to be present <i>a priori</i>; it will try to
+ re-establish a lost or hitherto unsuccessful connection and will
+ wait for device to come up in <i>GPSD.</i> There is an initial
+ 10 seconds delay between a connection loss or failed attempt and
+ the next reconnect attempt; this makes sure that there is no
+ thrashing on the network layer. If the connection fails again,
+ an exponential back off is used with an upper limit of
+ approximately 10 minutes.
+ </p>
+ <p>
+ The overall accuracy depends on the receiver used. The driver
+ uses the error estimations (95% probability limits) provided by
+ <i>GPSD</i> to set the clock precision dynamically according to these
+ readings.
+ </p>
+ <p>
+ The driver needs the VERSION, TPV, PPS and WATCH objects of
+ the <i>GPSD</i> protocol. (Others are quietly ignored.)
+ </p>
+
+
+ <h4>Naming a Device</h4>
+ <p>
+ The <i>GPSD</i> driver uses the same name as the NMEA driver,
+ namely <tt>/dev/gps<i>u</i></tt>. There is a simple reason for
+ that: While the NMEA driver and the <i>GPSD</i> driver can be
+ active at the same time <b>for different devices</b>,
+ they cannot access the same device at a time. Having the same
+ name helps on that. It also eases migration from using NMEA
+ directly to using <i>GPSD</i>, as no new links etc need to be
+ created.
+ </p>
+ <p>
+ <i>GPSD</i> is normally started with the device name to access;
+ it can also be instructed by hot-plug scripts to add or remove
+ devices from its device pool. Luckily, the symlinks used by the
+ NMEA driver are happily accepted and used by <i>GPSD</i>; this
+ makes it possible to use the symlink names as device
+ identification. This makes the migration from the built-in NMEA
+ driver a bit easier.
+ </p>
+ <p><b>Note:</b> <i>GPSD</i> (as of version 3.10) cannot
+ use kernel mode PPS on devices that are hot-plugged. This would
+ require to attach the PPS line discipline to the file, which is
+ not possible when running with root privileges dropped. This is
+ not likely to change in the future.
+ </p>
+
+ <h4>The 'mode' byte</h4>
+ <p>
+ A few operation modes can be selected with the mode word.
+ </p>
+ <p>
+ <table border="1" frame="box" rules="all">
+ <th colspan="3">The Mode Word</th>
+ <tr> <td>Bits</td><td>Value</td><td>Description</td>
+ </tr>
+ <tr> <td rowspan="4"align="center">0..1</td><td align="center">0</td>
+ <td>Uses TPV to get absolute time stamps for full
+ synchronization. If PPS is available , it is used to improve
+ the precision, but the clock can work without it.</td>
+ </tr>
+ <tr><td align="center">1</td>
+ <td>Require TPV <b>and</b> PPS to work.</td>
+ </tr>
+ <tr><td align="center">2</td>
+ <td>Ignore PPS data, run on TPV only. This is not a
+ recommended mode unless the serial timing is very stable
+ and GPSD provides an information element in TPV that
+ indicates the receive time of the fix data.</td>
+ </tr>
+ <tr><td align="center">3</td>
+ <td>PPS-only mode. Ignores TPV and does only the PPS phase
+ correction. This means that some other source must get NTPD
+ close to synchronisation; only after that happened and the
+ phase shift between the system clock and the PPS pulse is
+ less than 125msec the PPS lock will be engaged.</td>
+ </tr>
+ <tf colspan="3"><b>IMPORTANT: work in progress, mode
+ word ignored right now. Fixed mode '0' operation.</b></tf>
+ </table>
+ </p>
+
+ <h4>Syslog flood throttle</h4>
+ <p>This driver can create a lot of syslog messages when things go
+ wrong, and cluttering the log files is frowned upon. So we attempt
+ to log persistent or recurring errors only once per hour. On the
+ other hand, when tracking a problem the syslog flood throttle can
+ get into the way.</p>
+ <p>Therefore, fudge <i>flag3</i> can be used to <i>disable</i> the
+ flood throttle at any time; the throttle is engaged by
+ default. Running with the syslog flood throttle disabled for
+ lengthy time is not recommended unless the log files are closely
+ monitored.</p>
+
+ <h4>Fudge Factors</h4>
+
+ <dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the PPS time offset calibration factor, in seconds
+ and fraction, with default 0.0.</dd>
+ <dt><a name="fudgetime2"><tt>time2 <i>time</i></tt></a></dt>
+ <dd>Specifies the TPV time offset calibration factor, in seconds
+ and fraction, with default 0.0.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string
+ from one to four characters, with default <tt>GPSD</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt><dd><i>(not used)</i></dd>
+ <dt><tt>flag2 0 | 1</tt></dt><dd><i>(not used)</i></dd>
+ <dt><tt>flag3 0 | 1</tt></dt><dd>If set, <i>disable</i> the
+ log throttle. Useful when tracking problems in the interaction
+ between <i>GPSD</i> and <i>NTPD</i>, since now all error
+ events are logged. Persistent/recurrent errors can easily fill
+ up the log, so this should only be enabled during bug
+ hunts.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt><dd>If set, write a clock stats
+ line on every poll cycle.</dd>
+ </dl>
+
+ <p>Additional Information</p>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body></html>
diff --git a/html/drivers/driver5.html b/html/drivers/driver5.html
new file mode 100644
index 0000000..fa19764
--- /dev/null
+++ b/html/drivers/driver5.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <title>TrueTime GPS/GOES/OMEGA/WWV Receivers</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>TrueTime GPS/GOES/OMEGA/WWV Receivers</h3>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.5.<i>u</i><br>
+ Reference ID: <tt>GPS, OMEGA, GOES, WWV</tt><br>
+ Driver ID: <tt>TRUETIME</tt><br>
+ Serial Port: <tt>/dev/true<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
+ Features: <tt>tty_clk</tt>
+ <h4>Description</h4>
+ <p>This driver supports several models models of Kinemetrics/TrueTime timing receivers, including 468-DC MK III GOES Synchronized Clock, GPS- DC MK III and GPS/TM-TMD GPS Synchronized Clock, XL-DC (a 151-602-210, reported by the driver as a GPS/TM-TMD), GPS-800 TCU (an 805-957 with the RS232 Talker/Listener module), OM-DC OMEGA Synchronized Clock, the TL-3 WWV receiver, and very likely others in the same model families that use the same timecode formats.</p>
+ <p>Most of this code is originally from refclock_wwvb.c with thanks. It has been so mangled that wwvb is not a recognizable ancestor.</p>
+ <p>Timcode format: <tt>ADDD:HH:MM:SSQCL</tt><br>
+A - control A (this is stripped before we see it) Q - Quality indication (see below) C - Carriage return L - Line feed</p><br>
+Quality codes indicate possible error of:
+ <dl>
+ <dt>468-DC GOES Receiver<br>
+ GPS-TM/TMD Receiver
+ <dd>? +/- 500 milliseconds # +/- 50 milliseconds<br>
+ * +/- 5 milliseconds . +/- 1 millisecond<br>
+ space less than 1 millisecond
+ <dt>OM-DC OMEGA Receiver:
+ <dd>&gt; +/- 5 seconds<br>
+ ? +/- 500 milliseconds # +/- 50 milliseconds<br>
+ * +/- 5 milliseconds . +/- 1 millisecond<br>
+ A-H less than 1 millisecond. Character indicates which station is being received as follows<br>
+ A = Norway, B = Liberia, C = Hawaii, D = North Dakota, E = La Reunion, F = Argentina, G = Australia, H = Japan<br>
+ The carriage return start bit begins on 0 seconds and extends to 1 bit time.
+ <dt>TL-3 WWV Receiver:
+ <dd>? receiver is unlocked<br>
+ <dd>space +/- 5 milliseconds<br>
+ </dl>
+ <h4>Notes on 468-DC and OMEGA receiver:</h4>
+ <p>Send the clock a <tt>R</tt> or <tt>C</tt> and once per second a timestamp will appear. Send a <tt>R</tt> to get the satellite position once (GOES only).</p>
+ <h4>Notes on the 468-DC receiver:</h4>
+ <p>Since the old east/west satellite locations are only historical, you can't set your clock propagation delay settings correctly and still use automatic mode. The manual says to use a compromise when setting the switches. This results in significant errors. The solution; use fudge time1 and time2 to incorporate corrections. If your clock is set for 50 and it should be 58 for using the west and 46 for using the east, use the line</p>
+ <p><tt>fudge 127.127.5.0 time1 +0.008 time2 -0.004</tt></p>
+ <p>This corrects the 4 milliseconds advance and 8 milliseconds retard needed. The software will ask the clock which satellite it sees.</p>
+ <p>The PCL720 from PC Labs has an Intel 8253 look-alike, as well as a bunch of TTL input and output pins, all brought out to the back panel. If you wire a PPS signal (such as the TTL PPS coming out of a GOES or other Kinemetrics/Truetime clock) to the 8253's GATE0, and then also wire the 8253's OUT0 to the PCL720's INPUT3.BIT0, then we can read CTR0 to get the number of microseconds since the last PPS upward edge, mediated by reading OUT0 to find out if the counter has wrapped around (this happens if more than 65535us (65ms) elapses between the PPS event and our being called.)</p>
+ <h4>Notes on the TL-3 receiver:</h4>
+ <p>The mini-DIN RS-232 port uses the Apple pinout.<br>
+ Send the clock ST1 to turn on continuous (1/sec) timecodes.
+You can also enable "mode C" via the front panel. ST0 turns off this mode.<br>
+QV will return the firmware revision (and is useful in identifying this clock.)<br>
+QW will return its weekly signal log, useful if you're testing antennas. You may wish to turn the loss interval down from 4h (04) to 1h (01), so the receiver declares itself unlocked sooner. When in holdover, drift can be on the order of 10 ms/hr since there is no high quality reference oscillator.</p>
+ <h4>Monitor Data</h4>
+ <p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, to be used for the West satellite, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>. Specifies the time offset calibration factor, in seconds and fraction, to be used for the East satellite, with default 0.0.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>TRUE</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Silence the clock side of ntpd, just reading the clock without trying to write to it.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Generate a debug file /tmp/true%d.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/driver6.html b/html/drivers/driver6.html
new file mode 100644
index 0000000..ebb3683
--- /dev/null
+++ b/html/drivers/driver6.html
@@ -0,0 +1,80 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>IRIG Audio Decoder</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>IRIG Audio Decoder</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last update:
+ <!-- #BeginDate format:En2m -->17-Jul-2014 02:17<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+Address: 127.127.6.<i>u</i><br>
+Reference ID: <tt>IRIG</tt><br>
+Driver ID: <tt>IRIG_AUDIO</tt><br>
+Audio Device: <tt>/dev/audio</tt> and <tt>/dev/audioctl</tt>
+<h4>Description</h4>
+<p>This driver synchronizes the computer time using the Inter-Range Instrumentation Group (IRIG) standard time distribution signal. This signal is generated by several radio clocks, including those made by Arbiter, Austron, Bancomm, Odetics, Spectracom, Symmetricom and TrueTime, among others, although it is often an add-on option. The signal is connected via an optional attenuator and cable to either the microphone or line-in port of a workstation or PC.</p>
+<p>The driver requires an audio codec or sound card with sampling rate 8 kHz and &mu;-law companding to demodulate the data. This is the same standard as used by the telephone industry and is supported by most hardware and operating systems, including Solaris, FreeBSD and Linux, among others. In this implementation, only one audio driver and codec can be supported on a single machine. In order to assure reliable signal capture, the codec frequency error must be less than 250 PPM (.025 percent). If necessary, the <tt>tinker codec</tt> configuration command can be used to bracket the codec frequency to this range.</p>
+<p>For proper operation the IRIG signal source should be configured for analog signal levels, not digital TTL levels. In most radios the IRIG signal is driven &plusmn;10 V behind 50 Ohms. In such cases the cable should be terminated at the line-in port with a 50-Ohm resistor to avoid overloading the codec. Where feasible, the IRIG signal source should be operated with signature control so that, if the signal is lost or mutilated, the source produces an unmodulated signal, rather than possibly random digits. The driver automatically rejects the data and declares itself unsynchronized in this case. Some devices, in particular Spectracom radio/satellite clocks, provide additional year and status indication; other devices may not.</p>
+<p>In general and without calibration, the driver is accurate within 500 &mu;s relative to the IRIG time. After calibrating relative to the PPS&nbsp;signal from a GPS&nbsp;receiver, the mean offset with a 2.4-GHz P4 running FreeBSD 6.1 is less than 20 &mu;s with standard deviation 10 &mu;s. Most of this is due to residuals after filtering and averaging the raw codec samples, which have an inherent jitter of 125 &mu;s. The processor load due to the driver is 0.6 percent on the P4.</p>
+<p>However, be acutely aware that the accuracy with Solaris 2.8 and beyond has been seriously degraded to the order of several milliseconds. The Sun kernel driver has a sawtooth modulation with amplitude over 5 ms P-P and period 5.5 s. This distortion is especially prevalent with Sun Blade 1000 and possibly other systems.</p>
+<p>The driver performs a number of error checks to protect against overdriven or underdriven input signal levels, incorrect signal format or improper hardware configuration. The specific checks are detailed later in this page. Note that additional checks are done elsewhere in the reference clock interface routines.</p>
+<p>This driver incorporates several features in common with other audio drivers such as described in the <a href="driver7.html">Radio CHU Audio Demodulator/Decoder</a> and the <a href="driver36.html">Radio WWV/H Audio Demodulator/Decoder</a> pages. They include automatic gain control (AGC), selectable audio codec port and signal monitoring capabilities. For a discussion of these common features, as well as a guide to hookup, debugging and monitoring, see the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
+<h4>Technical Overview</h4>
+<p>The IRIG signal format uses an amplitude-modulated carrier with pulse-width modulated data bits. For IRIG-B, the carrier frequency is 1000 Hz and bit rate 100 b/s; for IRIG-E, the carrier frequenchy is 100 Hz and bit rate 10 b/s. While IRIG-B provides the best accuracy, generally within a few tens of microseconds relative to IRIG time, it can also generate a significant processor load with older workstations. Generally, the accuracy with IRIG-E is about ten times worse than IRIG-B, but the processor load is somewhat less. Technical details about the IRIG&nbsp;formats can be found in <a href="http://handle.dtic.mil/100.2/ADA346250">IRIG Standard 200-98</a>.</p>
+<p>The driver processes 8000-Hz &mu;-law companded samples using separate signal filters for IRIG-B and IRIG-E, a comb filter, envelope detector and automatic threshold corrector. An infinite impulse response (IIR) 1000-Hz bandpass filter is used for IRIG-B and an IIR 130-Hz lowpass filter for IRIG-E. These are intended for use with noisy signals, such as might be received over a telephone line or radio circuit, or when interfering signals may be present in the audio passband. The driver determines which IRIG format is in use by sampling the amplitude of each filter output and selecting the one with maximum signal.</p>
+<p>Cycle crossings relative to the corrected slice level determine the width of each pulse and its value - zero, one or position identifier (PI). The data encode ten characters (20 BCD digits) which determine the second, minute, hour and day of the year and with some IRIG&nbsp;generators the year and synchronization condition. The comb filter exponentially averages the corresponding samples of successive baud intervals in order to reliably identify the reference carrier cycle.</p>
+<p>A type-II phase-lock loop (PLL) performs additional integration and interpolation to accurately determine the zero crossing of that cycle, which determines the reference timestamp. A pulse-width discriminator demodulates the data pulses, which are then encoded as the BCD digits of the timecode. The timecode and reference timestamp are updated once each second with IRIG-B (ten seconds with IRIG-E) and local clock offset samples saved for later processing. At poll intervals of 64 s, the saved samples are processed by a median filter and used to update the system clock.</p>
+<h4>Monitor Data</h4>
+The timecode format used for debugging and data recording includes data helpful in diagnosing problems with the IRIG signal and codec connections. The driver produces one line for each timecode in the following format:
+<p><tt>00 00 98 23 19:26:52 2782 143 0.694 10 0.3 66.5 3094572411.00027</tt></p>
+<p>If clockstats is enabled, the most recent line is written to the clockstats file every 64 s. If verbose recording is enabled (fudge flag 4) each line is written as generated.</p>
+<p>The first field containes the error flags in hex, where the hex bits are interpreted as below. This is followed by the year of century, day of year and time of day. Note that the time of day is for the previous minute, not the current time. The status indicator and year are not produced by some IRIG devices and appear as zeros. Following these fields are the carrier amplitude (0-3000), codec gain (0-255), modulation index (0-1), time constant (4-10), carrier phase error (0&plusmn;0.5) and carrier frequency error (PPM). The last field is the on-time timestamp in NTP format.</p>
+<p>The error flags are defined as follows in hex:</p>
+<dl>
+ <dt><tt>x01</tt></dt>
+ <dd>Low signal. The carrier amplitude is less than 100 units. This is usually the result of no signal or wrong input port.</dd>
+ <dt><tt>x02</tt></dt>
+ <dd>Frequency error. The codec frequency error is greater than 250 PPM. This may be due to wrong signal format or (rarely) defective codec.</dd>
+ <dt><tt>x04</tt></dt>
+ <dd>Modulation error. The IRIG modulation index is less than 0.5. This is usually the result of an overdriven codec, wrong signal format or wrong input port.</dd>
+ <dt><tt>x08</tt></dt>
+ <dd>Frame synch error. The decoder frame does not match the IRIG frame. This is usually the result of an overdriven codec, wrong signal format or noisy IRIG signal. It may also be the result of an IRIG signature check which indicates a failure of the IRIG signal synchronization source.</dd>
+ <dt><tt>x10</tt></dt>
+ <dd>Data bit error. The data bit length is out of tolerance. This is usually the result of an overdriven codec, wrong signal format or noisy IRIG signal.</dd>
+ <dt><tt>x20</tt></dt>
+ <dd>Seconds numbering discrepancy. The decoder second does not match the IRIG second. This is usually the result of an overdriven codec, wrong signal format or noisy IRIG signal.</dd>
+ <dt><tt>x40</tt></dt>
+ <dd>Codec error (overrun). The machine is not fast enough to keep up with the codec.</dd>
+ <dt><tt>x80</tt></dt>
+ <dd>Device status error (Spectracom).</dd>
+</dl>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>IRIG</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>Specifies the microphone port if set to zero or the line-in port if set to one. It does not seem useful to specify the compact disc player port.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>Enables audio monitoring of the input signal. For this purpose, the speaker volume must be set before the driver is started.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver7.html b/html/drivers/driver7.html
new file mode 100644
index 0000000..90baf61
--- /dev/null
+++ b/html/drivers/driver7.html
@@ -0,0 +1,144 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Radio CHU Audio Demodulator/Decoder</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Radio CHU Audio Demodulator/Decoder</h3>
+<p>Author: David L. Mills (mills@udel.edu)<br>
+Last update:
+ <!-- #BeginDate format:En2m -->17-Jul-2014 02:17<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+Address: 127.127.7.<i>u</i><br>
+Reference ID: <tt>CHU</tt><br>
+Driver ID: <tt>CHU</tt><br>
+Modem Port: <tt>/dev/chu<i>u</i></tt>; 300 baud, 8-bits, no parity<br>
+Autotune Port: <tt>/dev/icom</tt>; 1200/9600 baud, 8-bits, no parity<br>
+Audio Device: <tt>/dev/audio</tt> and <tt>/dev/audioctl</tt>
+<h4>Description</h4>
+<p>This driver synchronizes the computer time using shortwave radio transmissions
+ from Canadian time/frequency station <a href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/shortwave_broadcasts_e.html">CHU</a> in
+ Ottawa, Ontario. CHU transmissions are made continuously on 3.330,
+ 7.850 and 14.670 MHz in upper sideband, compatible AM mode. An ordinary
+ shortwave receiver can be tuned manually to one of these frequencies or, in
+ the case of ICOM receivers, the receiver can be tuned automatically as propagation
+ conditions change throughout the day and season.</p>
+<p>The driver can be compiled to use either an audio codec or soundcard, or a Bell 103-compatible, 300-b/s modem or modem chip, as described on the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. If compiled for a modem, the driver uses it to receive the radio signal and demodulate the data. If compiled for the audio codec, it requires a sampling rate of 8 kHz and &mu;-law companding to demodulate the data. This is the same standard as used by the telephone industry and is supported by most hardware and operating systems, including Solaris, FreeBSD and Linux, among others. The radio is connected via an optional attenuator and cable to either the microphone or line-in port of a workstation or PC. In this implementation, only one audio driver and codec can be supported on a single machine.</p>
+<p>In general and without calibration, the driver is accurate within 1 ms relative to the broadcast time when tracking a station. However, variations up to 0.3 ms can be expected due to diurnal variations in ionospheric layer height and ray geometry. In Newark DE, 625 km from the transmitter, the predicted one-hop propagation delay varies from 2.8 ms in sunlight to 2.6 ms in moonlight. When not tracking the station the accuracy depends on the computer clock oscillator stability, ordinarily better than 0.5 PPM.</p>
+<p>After calibration relative to the PPS&nbsp;signal from a GPS&nbsp;receiver, the mean offset with a 2.4-GHz P4 running FreeBSD 6.1 is generally within 0.2 ms short-term with 0.4 ms jitter. The long-term mean offset varies up to 0.3 ms due to propagation path geometry variations. The processor load due to the driver is 0.4 percent on the P4.</p>
+<p>The driver performs a number of error checks to protect against overdriven or underdriven input signal levels, incorrect signal format or improper hardware configuration. The specific checks are detailed later in this page. Note that additional checks are done elsewhere in the reference clock interface routines.</p>
+<p>This driver incorporates several features in common with other audio drivers such as described in the <a href="driver36.html">Radio WWV/H Audio Demodulator/Decoder</a> and the <a href="driver6.html">IRIG Audio Decoder</a> pages. They include automatic gain control (AGC), selectable audio codec port and signal monitoring capabilities. For a discussion of these common features, as well as a guide to hookup, debugging and monitoring, see the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
+<h4>Technical Overview</h4>
+<p>The driver processes 8-kHz &mu;-law companded codec samples using maximum-likelihood techniques which exploit the considerable degree of redundancy available in each broadcast message or burst. As described below, every character is sent twice and, in the case of format A bursts, the burst is sent eight times every minute. The single format B burst is considered correct only if every character matches its repetition in the burst. For the eight format A bursts, a majority decoder requires more than half of the 16 repetitions for each digit decode to the same value. Every character in every burst provides an independent timestamp upon arrival with a potential total of 60 timestamps for each minute.</p>
+<p>The CHU timecode format is described on the <a href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/chu_e.html">CHU website</a>. A timecode is assembled when all bursts have been received in each minute. The timecode is considered valid and the clock set when at least one valid format B burst has been decoded and the majority decoder declares success. Once the driver has synchronized for the first time, it will appear reachable and selectable to discipline the system clock. It is normal on occasion to miss a minute or two due to signal fades or noise. If eight successive minutes are missed, the driver is considered unreachable and the system clock will free-wheel at the latest determined frequency offset. Since the signals are almost always available during some period of the day and the NTP clock discipline algorithms are designed to work well even with long intervals between updates, it is unlikely that the system clock will drift more than a few milliseconds during periods of signal loss.</p>
+<h4>Baseband Signal Processing</h4>
+<p>The program consists of four major parts: the DSP modem, maximum-likelihood UART, burst assembler and majority decoder. The DSP modem demodulates Bell 103 modem answer-frequency signals; that is, frequency-shift keyed (FSK) tones of 2225 Hz (mark) and 2025 Hz (space). It consists of a 500-Hz bandpass filter centered on 2125 Hz followed by a limiter/discriminator and raised-cosine lowpass filter optimized for the 300-b/s data rate. </p>
+<p>The maximum likelihood UART is implemented using a set of eight 11-stage shift registers, one for each of eight phases of the 300-b/s bit clock. At each phase a new baseband signal from the DSP modem is shifted into the corresponding register and the maximum and minimum over all 11 samples computed. This establishes a span (difference) and slice level (average) over all 11 stages. For each stage, a signal level above the slice is a mark (1) and below that is a space (0). A quality metric is calculated for each register with respect to the slice level and the a-priori signal consisting of a start bit (space), eight arbitrary information bits and two stop bits (mark).</p>
+<p>The shift registers are processed in round-robin order as the phases of each bit arrive. At the end of each bit all eight phases are searched for valid framing bits, sufficient span and best metric. The best candidate found in this way represents the maximum-likelihood character. The process then continues for all ten characters in the burst.</p>
+<p>The burst assembler processes characters either from the maximum-likelihood UART or directly from the serial port as configured. A burst begins when a character is received and is processed after a timeout interval when no characters are received. If the interval between characters is greater than two characters, but less than the timeout interval, the burst is rejected as a runt and a new burst begun. As each character is received, a timestamp is captured and saved for later processing.</p>
+<p>A valid burst consists of ten characters in two replicated five-character blocks, each block representing ten 4-bit BCD digits. The format B blocks sent in second 31 contain the year and other information in ten digits. The eight format A blocks sent in seconds 32-39 contain the timecode in ten digits, the first of which is a framing code (6). The burst assembler must deal with cases where the first character of a format A burst is lost or is noise. This is done using the framing codes to correct the discrepancy, either one character early or one character late.</p>
+<p>The burst distance is incremented by one for each bit in the first block that matches the corresponding bit in the second block and decremented by one otherwise. In a format B burst the second block is bit-inverted relative to the first, so a perfect burst of five 8-bit characters has distance -40. In a format A burst the two blocks are identical, so a perfect burst has distance +40. Format B bursts must be perfect to be acceptable; however, format A bursts, which are further processed by the majority decoder, are acceptable if the distance is at least 28.</p>
+<h4>Majority Decoder</h4>
+<p>Each minute of transmission includes eight format A bursts containing two timecodes for each second from 32 through 39. The majority decoder uses a decoding matrix of ten rows, one for each digit position in the timecode, and 16 columns, one for each 4-bit code combination that might be decoded at that position. In order to use the character timestamps, it is necessary to reliably determine the second number of each burst. In a valid burst, the last digit of the two timecodes in the burst must match and the value must be in the range 2-9 and greater than in the previous burst.</p>
+<p>As each digit of a valid burst is processed, the value at the row corresponding to the digit position in the timecode and column corresponding to the code found at that position is incremented. At the end of the minute, each row of the decoding matrix encodes the number of occurrences of each code found at the corresponding position.</p>
+<p>The maximum over all occurrences at each digit position is the distance for that position and the corresponding code is the maximum-likelihood digit. If the distance is not more than half the total number of occurrences, the decoder assumes a soft error and discards all information collected during the minute. The decoding distance is defined as the sum of the distances over the first nine digits; the tenth digit varies over the seconds and is uncounted.</p>
+<p>The result of the majority decoder is a nine-digit timecode representing the maximum-likelihood candidate for the transmitted timecode in that minute. Note that the second and fraction within the minute are always zero and that the actual reference point to calculate timestamp offsets is backdated to the first second of the minute. At this point the timecode block is reformatted and the year, days, hours and minutes extracted along with other information from the format B burst, including DST state, DUT1 correction and leap warning. The reformatting operation checks the timecode for invalid code combinations that might have been left by the majority decoder and rejects the entire timecode if found.</p>
+<p>If the timecode is valid, it is passed to the reference clock interface along with the backdated timestamps accumulated over the minute. A perfect set of eight bursts could generate as many as 80 timestamps, but the maximum the interface can handle is 60. These are processed using a median filter and trimmed-mean average, so the resulting system clock correction is usually much better than would otherwise be the case with radio noise, UART jitter and occasional burst errors.</p>
+<h4>Autotune</h4>
+<p>The driver includes provisions to automatically tune the radio in response to changing radio propagation conditions throughout the day and night. The radio interface is compatible with the ICOM CI-V standard, which is a bidirectional serial bus operating at TTL levels. The bus can be connected to a standard serial port using a level converter such as the CT-17. Further details are on the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
+<p>If specified, the driver will attempt to open the device <tt>/dev/icom</tt> and, if successful will tune the radio to 3.331 MHz. The 1-kHz offset is useful with a narrowband SSB&nbsp;filter where the passband includes the carrier and modem signals. However, the driver is liberal in what it assumes of the configuration. If the <tt>/dev/icom</tt> link is not present or the open fails or the CI-V bus is inoperative, the driver continues in single-frequency mode.</p>
+<p>As long as no bursts are received, the driver cycles over the three frequencies in turn, one minute for each station. When bursts are received from one or more stations, the driver operates in a five-minute cycle. During the first four minutes it tunes to the station with the highest metric. During the last minute it alternates between the other two stations in turn in order to measure the metric.</p>
+<h4>Debugging Aids</h4>
+<p>The most convenient way to track the program status is using the <tt>ntpq</tt> program and the <tt>clockvar</tt> command. This displays the last determined timecode and related status and error counters, even when the program is not discipline the system clock. If the debugging trace feature (<tt>-d</tt> on the <tt>ntpd</tt> command line) is enabled, the program produces detailed status messages as it operates. If the <tt>fudge flag 4</tt> is set, these messages are written to the <tt>clockstats</tt> file. All messages produced by this driver have the prefix <tt>chu</tt> for convenient filtering with the Unix <tt>grep</tt> command.</p>
+<p>With debugging enabled the driver produces messages in the following formats: A single message beginning with <tt>chuB</tt> is produced for each format B burst received in second 31, while eight messages beginning with <tt>chuA</tt> are produced for each format A burst received in seconds 32 through 39 of the minute. The first four fields are</p>
+<p><tt>stat sig n b</tt></p>
+<p>where <tt>stat</tt> is the status code, <tt>sig</tt> the character span, <tt>n</tt> the number of characters in the burst (9-11) and <tt>b</tt> the burst distance (0-40). Good bursts will have spans of a 800 or more and the other numbers near the top of the range specified. See the source for the interpretation of the remaining data in the burst. Note that each character of the burst is encoded as two digits in nibble-swapped order.</p>
+<p>If the CI-V interface for ICOM radios is active, a debug level greater than 1 will produce a trace of the CI-V command and response messages. Interpretation of these messages requires knowledge of the CI-V protocol, which is beyond the scope of this document.</p>
+<h4>Monitor Data</h4>
+When enabled by the <tt>filegen</tt> facility, every received timecode is written to the <tt>clockstats</tt> file in the following format:
+<pre>
+ sq yyyy ddd hh:mm:ss lw dst du lset agc rfrq bcnt dist tsmp
+
+ s sync indicator
+ q quality character
+ yyyy Gregorian year
+ ddd day of year
+ hh hour of day
+ mm minute of hour
+ ss second of minute
+ lw leap second warning
+ dst DST state
+ dut DUT sign and magnitude in deciseconds
+ lset minutes since last set
+ agc audio gain (0-255)
+ ident CHU&nbsp;identifier code
+ dist decoder distance
+ tsmp timestamps captured
+</pre>
+The fields beginning with <tt>year</tt> and extending through <tt>dut</tt> are decoded from the received data and are in fixed-length format. The <tt>agc</tt> and <tt>lset</tt> fields, as well as the following driver-dependent fields, are in variable-length format.
+<dl>
+ <dt><tt>s</tt></dt>
+ <dd>The sync indicator is initially <tt>?</tt> before the clock is set, but turns to space when the clock has been correctly set.</dd>
+ <dt><tt>q</tt></dt>
+ <dd>The quality character is a four-bit hexadecimal code showing which alarms have been raised during the most recent minute. Each bit is associated with a specific alarm condition according to the following:
+ <dl>
+ <dt><tt>8</tt></dt>
+ <dd>Timestamp alarm. Fewer than 20 timestamps have been determined.</dd>
+ <dt><tt>4</tt></dt>
+ <dd>Decoder alarm. A majority of repetitions for at least one digit of the timecode fails to agree.</dd>
+ <dt><tt>2</tt></dt>
+ <dd>Format alarm. One or more bursts contained invalid data or was improperly formatted.</dd>
+ <dt><tt>1</tt></dt>
+ <dd>Frame alarm. One or more bursts was improperly framed or contained too many repetition errors.</dd>
+ </dl>
+ The timestamp and decoder alarms are fatal; the data accumulated during the minute are not used to set the clock. The format and fram alarm are nonfatal; only the data in the burst are discarded.</dd>
+ <dt><tt>yyyy ddd hh:mm:ss</tt></dt>
+ <dd>The timecode format itself is self explanatory. Note that the Gregorian year is decoded directly from the transmitted timecode.</dd>
+ <dt><tt>lw</tt></dt>
+ <dd>The leap second warning is normally space, but changes to <tt>L</tt> if a leap second is to occur at the end of the month.</dd>
+ <dt><tt>dst</tt></dt>
+ <dd>The DST code for Canada encodes the state for all provinces. It is encoded as two hex characters.</dd>
+ <dt><tt>dut</tt></dt>
+ <dd>The DUT sign and magnitude shows the current UT1 offset relative to the displayed UTC time, in deciseconds. It is encoded as one digit preceeded by sign.</dd>
+ <dt><tt>lset</tt></dt>
+ <dd>Before the clock is set, this is the number of minutes since the program was started; after the clock is set, this is the number of minutes since the time was last verified relative to the broadcast signal.</dd>
+ <dt><tt>agc</tt></dt>
+ <dd>The audio gain shows the current codec gain setting in the range 0 to 255. Ordinarily, the receiver audio gain control should be set for a value midway in this range.</dd>
+ <dt><tt>ident</tt></dt>
+ <dd>The CHU&nbsp;identifier <tt>CHU </tt>followed by the current radio frequency
+ code, if the CI-V interface is active, or <tt>CHU</tt> if not. The radio
+ frequncy is encoded as 0 for 3.330 MHz, 1 for 7.850 MHz and 2
+ for 14.670 MHz.</dd>
+ <dt><tt>dist</tt></dt>
+ <dd>The decoding distance determined during the most recent minute bursts were received. The values range from 0 to 160, with the higher values indicating better signals. The decoding algorithms require the distance at least 50; otherwise all data in the minute are discarded.</dd>
+ <dt><tt>tsmp</tt></dt>
+ <dd>The number of timestamps determined during the most recent minute bursts were received. The values range from 0 to 60, with the higher values indicating better signals. The decoding algoriths require at least 20 timestamps in the minute; otherwise all data in the minute are discarded.</dd>
+</dl>
+<h4>Fudge Factors</h4>
+<dl>
+ <dt><tt>time1 <i>time</i></tt></dt>
+ <dd>Specifies the propagation delay for CHU (45:18N 75:45N), in seconds and fraction, with default 0.0.</dd>
+ <dt><tt>time2 <i>time</i></tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>stratum <i>number</i></tt></dt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.</dd>
+ <dt><tt>refid <i>string</i></tt></dt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>CHU</tt>.</dd>
+ <dt><tt>flag1 0 | 1</tt></dt>
+ <dd>Not used by this driver.</dd>
+ <dt><tt>flag2 0 | 1</tt></dt>
+ <dd>When the audio driver is compiled, this flag selects the audio input port, where 0 is the mike port (default) and 1 is the line-in port. It does not seem useful to select the compact disc player port.</dd>
+ <dt><tt>flag3 0 | 1</tt></dt>
+ <dd>When the audio driver is compiled, this flag enables audio monitoring of the input signal. For this purpose, the speaker volume must be set before the driver is started.</dd>
+ <dt><tt>flag4 0 | 1</tt></dt>
+ <dd>Enable verbose <tt>clockstats</tt> recording if set.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/drivers/driver8.html b/html/drivers/driver8.html
new file mode 100644
index 0000000..ab21f0f
--- /dev/null
+++ b/html/drivers/driver8.html
@@ -0,0 +1,278 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>Generic Reference Driver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Generic Reference Driver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->27-Jan-2014 05:31<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.8.<em>u</em><br>
+ Reference ID: PARSE<br>
+ Driver ID: GENERIC<br>
+ Serial Port: /dev/refclock-<em>u</em>; TTY mode according to clock type<br>
+ PPS device: /dev/refclockpps-<em>u</em>; alternate PPS device (if not available via the serial port)
+ <h4>Description</h4>
+ The PARSE driver supports 20 different clock types/configurations. PARSE is actually a multi-clock driver.<br>
+ <br>
+ <p>The actual receiver status is mapped into various synchronization states generally used by receivers. The driver is configured to interpret the time codes of Meinberg DCF77 AM receivers, DCF77 FM receivers, Meinberg GPS16x/17x receivers, Trimble SV6 GPS, ELV DCF7000, Schmid, Wharton 400A and low cost receivers (see <a href="imap://mills@mail.eecis.udel.edu:993/fetch%3EUID%3E.INBOX%3E67132?part=1.3&type=text/html&filename=driver8.html#clocklist">list below</a>).</p>
+ <p>The reference clock support in NTP contains the necessary configuration tables for those receivers. In addition to supporting several different clock types and up to 4 devices, the processing of a PPS signal is also provided as a configuration option. The PPS configuration option uses the receiver-generated time stamps for feeding the PPS loopfilter control for much finer clock synchronization.</p>
+ <p>CAUTION: The PPS configuration option is different from the hardware PPS signal, which is also supported (see below), as it controls the way ntpd is synchronized to the reference clock, while the hardware PPS signal controls the way time offsets are determined.</p>
+ <p>The use of the PPS option requires receivers with an accuracy of better than 1ms.</p>
+ <h4>Timecode variables listed by ntpq (8)</h4>
+ <p>The ntpq program can read and display several clock variables. These hold the following information:</p>
+ <dl>
+ <dt>refclock_format</dt>
+ <dd>A qualification of the decoded time code format.</dd>
+ <dt>refclock_states</dt>
+ <dd>The overall running time and the accumulated times for the clock event states.</dd>
+ <dt>refclock_status</dt>
+ <dd>Lists the currently active receiver flags. Additional feature flags for the receiver are optionally listed in parentheses.</dd>
+ <dt>refclock_time</dt>
+ <dd>The local time with the offset to UTC (format HHMM).</dd>
+ <dt>timecode</dt>
+ <dd>The actual time code.</dd>
+ </dl>
+ <p>If PPS information is present, additional variables are available:</p>
+ <dl>
+ <dt>refclock_ppsskew</dt>
+ <dd>The difference between the RS-232-derived timestamp and the PPS timestamp.</dd>
+ <dt>refclock_ppstime</dt>
+ <dd>The PPS timestamp.</dd>
+ </dl>
+ <h4>Supported Devices</h4>
+ <p>Currently, twenty-four clock types are supported by the PARSE driver and up to four (devices /dev/refclock-0 - /dev/refclock-3) of these clocks may be operational at any one time.<br>
+ A note on the implementations:</p>
+ <ul>
+ <li>These implementations were mainly done without actual access to the hardware, thus not all implementations provide full support. The development was done with the help of many kind souls who had the hardware and kindly lent me their time and patience during the development and debugging cycle. Thus for continued support and quality, direct access to the receivers is a big help. Nevertheless I am not prepared to buy these reference clocks - donations to (<a href="mailto:kardel%20%3CAT%3E%20ntp.org">kardel &lt;AT&gt; ntp.org</a>) are welcome as long as they work within Europe 8-).
+ <p>Verified implementations are:</p>
+ <ul>
+ <li>RAWDCF variants
+ <p>These variants have been tested for correct decoding with my own homegrown receivers. Interfacing with specific commercial products may involve some fiddling with cables. In particular, commercial RAWDCF receivers have a seemingly unlimited number of ways to draw power from the RS-232 port and to encode the DCF77 datastream. You are mainly on your own here unless I have a sample of the receiver.</p>
+ </li>
+ <li><a href="http://www.meinberg.de">Meinberg clocks</a>
+ <p>These implementations have been verified by the Meinberg people themselves and I have access to one of these clocks.</p>
+ </li>
+ <li><a href="http://www.selinc.com">Schweitzer Engineering
+ Laboratories SEL-240x clocks</a>
+ <p>This implementation was provided and verified by SEL and <a
+ href="http://networktimefoundation.org">Network Time Foundation</a>
+ has an SEL-2407 in one of its development labs.</p>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>The pictures below have been taken from and are linked to the vendors' web pages.</p>
+ <a name="clocklist"></a>
+ <ul>
+ <li><strong>server 127.127.8.0-3 mode 0</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg</a> <a href="http://www.meinberg.de/english/products/timesource.htm#dcf---freq_sync">PZF5xx receiver family</a> (FM demodulation/TCXO / 50&mu;s)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 1</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg</a> <a href="http://www.meinberg.de/english/products/timesource.htm#dcf---freq_sync">PZF5xx receiver family</a> (FM demodulation/OCXO / 50&mu;s)</strong><br>
+ <a href="http://www.meinberg.de/english/products/pzf-eurocard.htm"><img src="../pic/pzf511.jpg" alt="Image PZF511" align="top" border="0" height="300" width="260"></a><br>
+ <br>
+ </p>
+ </li>
+ <li><a name="mode2"></a><strong>server 127.127.8.0-3 mode 2</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg</a> <a href="http://www.meinberg.de/english/products/c51.htm">DCF C51 receiver and similar</a> (AM demodulation / 4ms)</strong><br>
+ <a href="http://www.meinberg.de/english/products/c51.htm"><img src="../pic/c51.jpg" alt="Image C51" align="top" border="0" height="239" width="330"></a><br>
+ </p>
+ <p>This mode expects the Meinberg standard time string format with 9600/7E2.</p>
+ <p><strong>Note:</strong> mode 2 must also be used for <a href="http://www.meinberg.de/english/products/formfactor.htm#slot_card">Meinberg PCI cards</a> under Linux, e.g. <a href="http://www.meinberg.de/english/products/gps-pcicard.htm">the GPS PCI card</a> or <a href="http://www.meinberg.de/english/products/dcf-pcicard.htm">the DCF77 PCI card</a>. Please note the <a href="http://www.meinberg.de/english/sw/#linux">Meinberg Linux driver</a> must be installed. That driver emulates a refclock device in order to allow ntpd to access those cards. For details, please refer to the README file that comes with the Meinberg driver package.<br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 3</strong>
+ <p><strong><a href="http://www.elv.de">ELV</a> DCF7000 (sloppy AM demodulation / 50ms)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 4</strong>
+ <p><strong>Walter Schmid DCF receiver Kit (AM demodulation / 1ms)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 5</strong>
+ <p><strong>RAW DCF77 100/200ms pulses (Conrad DCF77 receiver module / 5ms)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 6</strong>
+ <p><strong>RAW DCF77 100/200ms pulses (TimeBrick DCF77 receiver module / 5ms)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 7</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg</a> <a href="http://www.meinberg.de/english/products/timesource.htm#gps---freq_sync">GPS16x/GPS17x receivers</a> (GPS / &lt;&lt;1&mu;s)</strong><br>
+ <a href="http://www.meinberg.de/english/products/gps-eurocard.htm"><img src="../pic/gps167.jpg" alt="Image GPS167" align="top" border="0" height="300" width="280"></a><br>
+ </p>
+ <p>This mode expects either the University of Erlangen time string format or the Meinberg standard time string format at 19200/8N1.</p>
+ <p>The University of Erlangen format is preferred. Newer Meinberg GPS receivers can be configured to transmit that format; for older devices, a special firmware version may be available.</p>
+ <p>In this mode some additional GPS receiver status information is also read. However, this requires a point-to-point connection. <a href="imap://mills@mail.eecis.udel.edu:993/fetch%3EUID%3E.INBOX%3E67132?part=1.3&type=text/html&filename=driver8.html#mode18">Mode 18</a> should be used if the device is accessed by a multidrop connection.</p>
+ <p><strong>Note:</strong> mode 7 must not be used with Meinberg PCI cards; use <a href="imap://mills@mail.eecis.udel.edu:993/fetch%3EUID%3E.INBOX%3E67132?part=1.3&type=text/html&filename=driver8.html#mode2">mode 2</a> instead.<br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 8</strong>
+ <p><strong><a href="http://www.igel.de">IGEL</a> <a href="http://www.igel.de/eigelmn.html">clock</a></strong><br>
+ <a href="http://www.igel.de/eigelmn.html"><img src="../pic/igclock.gif" alt="Image IGEL clock" border="0" height="174" width="200"></a><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 9</strong>
+ <p><strong><a href="http://www.trimble.com">Trimble</a> <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html">SVeeSix GPS receiver</a> TAIP protocol (GPS / &lt;&lt;1&mu;s)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 10</strong>
+ <p><strong><a href="http://www.trimble.com">Trimble</a> <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html">SVeeSix GPS receiver</a> TSIP protocol (GPS / &lt;&lt;1&mu;s) (no kernel support yet)</strong><br>
+ <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html"><img src="../pic/pd_om011.gif" alt="Image SVeeSix-CM3" align="top" border="0" height="100" width="420"></a><br>
+ <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om006.html"><img src="../pic/pd_om006.gif" alt="Image Lassen-SK8" border="0" height="100" width="420"></a><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 11</strong>
+ <p><strong>Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support </strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 12</strong>
+ <p><strong><a href="http://www.hopf-time.com">HOPF</a> <a href="http://www.hopf-time.com/kart6021.html">Funkuhr 6021</a></strong><br>
+ <a href="http://www.hopf-time.com/engl/kart6021.html"><img src="../pic/fg6021.gif" alt="Image DCF77 Interface Board" align="top" border="0" height="207" width="238"></a><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 13</strong>
+ <p><strong>Diem's Computime Radio Clock</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 14</strong>
+ <p><strong>RAWDCF receiver (DTR=high/RTS=low)</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 15</strong>
+ <p><strong>WHARTON 400A Series Clocks with a 404.2 Serial Interface</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 16</strong>
+ <p><strong>RAWDCF receiver (DTR=low/RTS=high) </strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 17</strong>
+ <p><strong>VARITEXT Receiver (MSF) </strong><br>
+ <br>
+ </p>
+ </li>
+ <li><a name="mode18"></a><strong>server 127.127.8.0-3 mode 18</strong>
+ <p><strong><a href="http://www.meinberg.de">Meinberg </a><a href="http://www.meinberg.de/english/products/timesource.htm#gps---freq_sync">GPS16x/GPS17x receivers</a> (GPS / &lt;&lt;1&mu;s)</strong><br>
+ </p>
+ <p>This mode works without additional data communication (version, GPS status etc.) and thus should be used with multidrop, heterogeneous multiclient operation.</p>
+ <p><strong>Note:</strong> mode 18 must not be used with Meinberg PCI cards, use mode 2 instead.<br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 19</strong>
+ <p><strong>Gude Analog- und Digitalsystem GmbH 'Expert mouseCLOCK USB v2.0'</strong><br>
+ <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 20</strong>
+ <p><strong>RAWDCF receiver similar to mode 14, but operating @ 75 baud (DTR=high/RTS=low)</strong><br>
+ </p>
+ <p>Driving the DCF clocks at 75 baud may help to get them to work with a bunch of common USB serial converters, that do 75 but cannot do 50 baud at all, e.g. those based on Prolific PL2303. <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 21</strong>
+ <p><strong>RAWDCF receiver similar to mode 16, but operating @ 75 baud (DTR=low/RTS=high) </strong><br>
+ </p>
+ <p>See comment from mode 20 clock. <br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 22</strong>
+ <p><strong>MEINBERG, mode 2 but with POWERUP trust </strong><br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 23</strong>
+ <p><strong>MEINBERG, mode 7 but with POWERUP trust </strong><br>
+ </p>
+ </li>
+ <li><strong>server 127.127.8.0-3 mode 24</strong>
+ <p><strong><a href="http://www.selinc.com/">Schweitzer Engineering Laboratories</a></strong><br>
+ </p>
+ </li>
+ </ul>
+ <p>Actual data formats and setup requirements of the various clocks can be found in <a href="../parsedata.html">NTP PARSE clock data formats</a>.</p>
+ <h4>Operation</h4>
+ <p>The reference clock support software carefully monitors the state transitions of the receiver. All state changes and exceptional events (such as loss of time code transmission) are logged via the syslog facility. Every hour a summary of the accumulated times for the clock states is listed via syslog.</p>
+ <p>PPS support is only available when the receiver is completely synchronized. The receiver is believed to deliver correct time for an additional period of time after losing synchronization, unless a disruption in time code transmission is detected (possible power loss). The trust period is dependent on the receiver oscillator and thus is a function of clock type.</p>
+ <p>Raw DCF77 pulses can be fed via a level converter to the RXD pin of an RS-232 serial port (pin 3 of a 25-pin connector or pin 2 of a 9-pin connector). The telegrams are decoded and used for synchronization. DCF77 AM receivers can be bought for as little as $25. The accuracy is dependent on the receiver and is somewhere between 2ms (expensive) and 10ms (cheap). Synchronization ceases when reception of the DCF77 signal deteriorates, since no backup oscillator is available as usually found in other reference clock receivers. So it is important to have a good place for the DCF77 antenna. During transmitter shutdowns you are out of luck unless you have other NTP servers with alternate time sources available.</p>
+ <p>In addition to the PPS loopfilter control, a true PPS hardware signal can be utilized via the PPSAPI interface. PPS pulses are usually fed via a level converter to the DCD pin of an RS-232 serial port (pin 8 of a 25-pin connector or pin 1 of a 9-pin connector). To select PPS support, the mode parameter is the mode value as above plus 128. If 128 is not added to the mode value, PPS will be detected to be available but will not be used. </p>
+ <h4>Hardware PPS support<br>
+ </h4>
+ <p>For PPS to be used, add 128 to the mode parameter.</p>
+ <p>If the PPS signal is fed in from a device different from the device providing the serial communication (/dev/refclock-{0..3}), this device is configured as /dev/refclockpps-{0..3}. This allows the PPS information to be fed in e.g. via the parallel port (if supported by the underlying operation system) and the date/time telegrams to be handled via the serial port.</p>
+ <h4>Monitor Data</h4>
+ <p>Clock state statistics are written hourly to the syslog service. Online information can be found by examining the clock variables via the ntpq cv command.<br>
+ Some devices have quite extensive additional information (GPS16x/GPS17x, Trimble). The driver reads out much of the internal GPS data and makes it accessible via clock variables. To find out about additional variable names, query for the clock_var_list variable on a specific clock association as shown below. </p>
+ <p>First let ntpq display the table of associations:</p>
+ <pre> ntpq&gt; as ind assID status conf reach auth condition last_event cnt =========================================================== 1 19556 9154 yes yes none falsetick reachable 5 2 19557 9435 yes yes none candidat clock expt 3 3 19558 9714 yes yes none pps.peer reachable 1 </pre>
+ <p>Then switch to raw output. This may be required because of display limitations in ntpq/ntpd - so large lists need to be retrieved in several queries.</p>
+ <pre> ntpq&gt; raw Output set to raw </pre>
+ <p>Use the cv command to read the list of clock variables of a selected association:</p>
+ <pre> ntpq&gt; cv 19557 clock_var_list </pre>
+ <p>The long output of the command above looks similar to:</p>
+ <pre> assID=19557 status=0x0000, clock_var_list="type,timecode,poll,noreply,badformat,baddata,fudgetime1, fudgetime2,stratum,refid,flags,device,clock_var_list,refclock_time,refclock_status, refclock_format,refclock_states,refclock_id,refclock_iomode,refclock_driver_version, meinberg_gps_status,gps_utc_correction,gps_message,meinberg_antenna_status,gps_tot_51, gps_tot_63,gps_t0a,gps_cfg[1],gps_health[1],gps_cfg[2],gps_health[2],gps_cfg[3], gps_health[3],gps_cfg[4],gps_health[4],gps_cfg[5]" </pre>
+ <p>Then use the cv command again to list selected clock variables. The following command must be entered as a single line:</p>
+ <pre> ntpq&gt; cv 19557 refclock_status,refclock_format,refclock_states,refclock_id, refclock_iomode,refclock_driver_version,meinberg_gps_status,gps_utc_correction, gps_message,meinberg_antenna_status,gps_tot_51,gps_tot_63,gps_t0a,gps_cfg[1], gps_health[1],gps_cfg[2],gps_health[2],gps_cfg[3],gps_health[3],gps_cfg[4], gps_health[4],gps_cfg[5] </pre>
+ <p>The output of the command above is wrapped around depending on the screen width and looks similar to:</p>
+ <pre> status=0x0003, refclock_status="UTC DISPLAY; TIME CODE; PPS; POSITION; (LEAP INDICATION; PPS SIGNAL; POSITION)", refclock_format="Meinberg GPS Extended", refclock_states="*NOMINAL: 21:21:36 (99.99%); FAULT: 00:00:03 (0.00%); running time: 21:21:39", refclock_id="GPS", refclock_iomode="normal", refclock_driver_version="refclock_parse.c,v 4.77 2006/08/05 07:44:49 kardel RELEASE_20060805_A", meinberg_gps_status="[0x0000] &lt;OK&gt;", gps_utc_correction="current correction 14 sec, last correction on c7619a00.00000000 Sun, Jan 1 2006 0:00:00.000", gps_message="/PFU3SOP-4WG14EPU0V1KA", meinberg_antenna_status="RECONNECTED on 2006-07-18 08:13:20.0000000 (+0000) UTC CORR, LOCAL TIME, reconnect clockoffset +0.0000000 s, disconnect time 0000-00-00 00:00:00.0000000 (+0000) ", gps_tot_51="week 1400 + 3 days + 42300.0000000 sec", gps_tot_63="week 1400 + 3 days + 42294.0000000 sec", gps_t0a="week 1400 + 5 days + 71808.0000000 sec", gps_cfg[1]="[0x9] BLOCK II", gps_health[1]="[0x0] OK;SIGNAL OK", gps_cfg[2]="[0x0] BLOCK I", gps_health[2]="[0x3f] PARITY;MULTIPLE ERRS", gps_cfg[3]="[0x9] BLOCK II", gps_health[3]="[0x0] OK;SIGNAL OK", gps_cfg[4]="[0x9] BLOCK II", gps_health[6]="[0x0] OK;SIGNAL OK", gps_cfg[5]="[0x9] BLOCK II" </pre>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt>time1 <em>time</em> </dt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction. The default value depends on the clock type. </dd>
+ <dt>time2 <em>time</em> </dt>
+ <dd> If flag1 is 0, time2 specifies the offset of the PPS signal from the actual time (PPS fine tuning). </dd>
+ <dd> If flag1 is 1, time2 specifies the number of seconds a receiver with a premium local oscillator can be trusted after losing synchronisation. </dd>
+ <dt>stratum <em>stratum</em> </dt>
+ <dd>The stratum for this reference clock. </dd>
+ <dt>refid <em>refid</em> </dt>
+ <dd>The refid for this reference clock. </dd>
+ </dl>
+ <dl>
+ <dt>flag1 { 0 | 1 } </dt>
+ <dd>If 0, the fudge factor time2 refers to the PPS offset. </dd>
+ <dd>If 1, time2 refers to the TRUST TIME. </dd>
+ <dt>flag2 { 0 | 1 } </dt>
+ <dd>If flag2 is 1, sample PPS on CLEAR instead of on ASSERT. </dd>
+ <dt>flag3 { 0 | 1 } </dt>
+ <dd>If flag3 is 1, link kernel PPS tracking to this refclock instance. </dd>
+ <dt>flag4 { 0 | 1 } </dt>
+ <dd>Delete next leap second instead of adding it. (You'll need to wait a bit for that to happen 8-) </dd>
+ </dl>
+ Note about auxiliary Sun STREAMS modules (SunOS and Solaris):<br>
+ <dl>
+ <dt>The timecode of these receivers can be sampled via a STREAMS module in the kernel. (The STREAMS module has been designed for use with Sun systems under SunOS 4.1.x or Solaris 2.3 - 2.8. It can be linked directly into the kernel or loaded via the loadable driver mechanism.) This STREAMS module can be adapted to convert different time code formats. Nowadays the PPSAPI mechanism is usually used. </dt>
+ </dl>
+ <h4>Making your own PARSE clocks</h4>
+ <p>The parse clock mechanism deviates from the way other NTP reference clocks work. For a short description of how to build parse reference clocks, see <a href="../parsenew.html">making PARSE clocks</a>.</p>
+ <p>Additional Information</p>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+</html>
diff --git a/html/drivers/driver9.html b/html/drivers/driver9.html
new file mode 100644
index 0000000..2e52af8
--- /dev/null
+++ b/html/drivers/driver9.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
+ <title>Magnavox MX4200 GPS Receiver</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Magnavox MX4200 GPS Receiver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ Address: 127.127.9.<i>u</i><br>
+ Reference ID: <tt>GPS</tt><br>
+ Driver ID: <tt>GPS_MX4200</tt><br>
+ Serial Port: <tt>/dev/gps<i>u</i></tt>; 4800 baud, 8-bits, no parity<br>
+ Features: <tt>ppsclock</tt> (required)
+ <h4>Description</h4>
+ <p>This driver supports the Magnavox MX4200 Navigation Receiver adapted to precision timing applications. This driver supports all compatible receivers such as the 6-channel MX4200, MX4200D, and the 12-channel MX9212, MX9012R, MX9112.</p>
+ <p><a href="http://www.leica-gps.com/"><img src="../pic/9400n.jpg" alt="Leica MX9400N Navigator" height="143" width="180" align="left"></a> <a href="http://www.leica-gps.com/">Leica Geosystems</a> acquired the Magnavox commercial GPS technology business in February of 1994. They now market and support former Magnavox GPS products such as the MX4200 and its successors.</p>
+ <br clear="LEFT">
+ <p>Leica MX9400N Navigator.</p>
+ <h4>Operating Modes</h4>
+ <p>This driver supports two modes of operation, static and mobile, controlled by clock flag 2.</p>
+ <p>In static mode (the default) the driver assumes that the GPS antenna is in a fixed location. The receiver is initially placed in a &quot;Static, 3D Nav&quot; mode, where latitude, longitude, elevation and time are calculated for a fixed station. An average position is calculated from this data. After 24 hours, the receiver is placed into a &quot;Known Position&quot; mode, initialized with the calculated position, and then solves only for time.</p>
+ <p>In mobile mode, the driver assumes the GPS antenna is mounted on a moving platform such as a car, ship, or aircraft. The receiver is placed in &quot;Dynamic, 3D Nav&quot; mode and solves for position, altitude and time while moving. No position averaging is performed.</p>
+ <h4>Monitor Data</h4>
+ <p>The driver writes each timecode as received to the <tt>clockstats</tt> file. Documentation for the <cite>NMEA-0183</cite> proprietary sentences produced by the MX4200 can be found in <a href="mx4200data.html">MX4200 Receiver Data Format</a>.</p>
+ <h4>Fudge Factors</h4>
+ <dl>
+ <dt><tt>time1 <i>time</i></tt>
+ <dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
+ <dt><tt>time2 <i>time</i></tt>
+ <dd>Not used by this driver.
+ <dt><tt>stratum <i>number</i></tt>
+ <dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
+ <dt><tt>refid <i>string</i></tt>
+ <dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
+ <dt><tt>flag1 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag2 0 | 1</tt>
+ <dd>Assume GPS receiver is on a mobile platform if set.
+ <dt><tt>flag3 0 | 1</tt>
+ <dd>Not used by this driver.
+ <dt><tt>flag4 0 | 1</tt>
+ <dd>Not used by this driver.
+ </dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a>&nbsp;</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/icons/home.gif b/html/drivers/icons/home.gif
new file mode 100644
index 0000000..e181298
--- /dev/null
+++ b/html/drivers/icons/home.gif
Binary files differ
diff --git a/html/drivers/icons/mail2.gif b/html/drivers/icons/mail2.gif
new file mode 100644
index 0000000..21bc1c4
--- /dev/null
+++ b/html/drivers/icons/mail2.gif
Binary files differ
diff --git a/html/drivers/mx4200data.html b/html/drivers/mx4200data.html
new file mode 100644
index 0000000..611da6a
--- /dev/null
+++ b/html/drivers/mx4200data.html
@@ -0,0 +1,1077 @@
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>MX4200 Receiver Data Format</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h1>MX4200 Receiver Data Format</h1>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h2>Table of Contents</h2>
+ <ul>
+ <li><a href="#control">Control Port Sentences</a>
+ <li><a href="#input">Control Port Input Sentences</a>
+ <ul>
+ <li><a href="#input_000">$PMVXG,000</a> Initialization/Mode Control - Part A
+ <li><a href="#input_001">$PMVXG,001</a> Initialization/Mode Control - Part B
+ <li><a href="#input_007">$PMVXG,007</a> Control Port Configuration
+ <li><a href="#input_023">$PMVXG,023</a> Time Recovery Configuration
+ <li><a href="#input_gpq">$CDGPQ,YYY</a> Query From a Remote Device / Request to Output a Sentence
+ </ul>
+ <li><a href="#output">Control Port Output Sentences</a>
+ <ul>
+ <li><a href="#output_000">$PMVXG,000</a> Receiver Status
+ <li><a href="#output_021">$PMVXG,021</a> Position, Height, Velocity
+ <li><a href="#output_022">$PMVXG,022</a> DOPs
+ <li><a href="#output_030">$PMVXG,030</a> Software Configuration
+ <li><a href="#output_101">$PMVXG,101</a> Control Sentence Accept/Reject
+ <li><a href="#output_523">$PMVXG,523</a> Time Recovery Configuration
+ <li><a href="#output_830">$PMVXG,830</a> Time Recovery Results
+ </ul>
+ </ul>
+ <hr>
+ <h2><a name="control">Control Port Sentences</a></h2>
+ <p>The Control (CDU) Port is used to initialize, monitor, and control the receiver. The structure of the control port sentences is based on the <cite>NMEA-0183</cite> Standard for Interfacing Marine Electronics Navigation Devices (version 1.5). For more details, please refer to the <cite>NMEA-0183</cite> Specification available from the <a href="http://www.nmea.org/">National Marine Electronics Association</a>.</p>
+ <p>Reserved characters are used to indicate the beginning and the end of records in the data stream, and to delimit data fields within a sentence. Only printable ASCII characters (Hex 20 through 7F) may be used in a sentence. <a href="#table_2">Table 2</a> lists the reserved characters and defines their usage. <a href="#table_1">Table 1</a> illustrates the general Magnavox proprietary NMEA sentence format.</p>
+ <h4><a name="table_1">Table 1. Magnavox Proprietary NMEA Sentence Format</a></h4>
+ <code>$PMVXG,XXX,...................*CK </code>
+ <p></p>
+ <table border>
+ <tr>
+ <th>Character</th>
+ <th>Meaning</th>
+ </tr>
+ <tr>
+ <td><code>$</code></td>
+ <td>Sentence Start Character</td>
+ </tr>
+ <tr>
+ <td><code>P</code></td>
+ <td>Special ID (P = Proprietary)</td>
+ </tr>
+ <tr>
+ <td><code>MVX</code></td>
+ <td>Originator ID (MVX = Magnavox)</td>
+ </tr>
+ <tr>
+ <td><code>G</code></td>
+ <td>Interface ID (G = GPS)</td>
+ </tr>
+ <tr>
+ <td><code>XXX</code></td>
+ <td>Sentence Type</td>
+ </tr>
+ <tr>
+ <td><code>...</code></td>
+ <td>Data</td>
+ </tr>
+ <tr>
+ <td><code>*</code></td>
+ <td>Optional Checksum Field Delimiter</td>
+ </tr>
+ <tr>
+ <td><code>CK</code></td>
+ <td>Optional Checksum</td>
+ </tr>
+ </table>
+ <h4><a name="table_2">Table 2. NMEA Sentence Reserved Characters</a></h4>
+ <table border>
+ <tr>
+ <th>Character</th>
+ <th>Hex Value</th>
+ <th>Usage</th>
+ </tr>
+ <tr>
+ <td><code>$</code></td>
+ <td>24</td>
+ <td>Start of Sentence Identifier</td>
+ </tr>
+ <tr>
+ <td><code>{cr}{lf}</code></td>
+ <td>0D 0A</td>
+ <td>End of Sentence Identifier</td>
+ </tr>
+ <tr>
+ <td><code>,</code></td>
+ <td>2C</td>
+ <td>Sentence Delimiter</td>
+ </tr>
+ <tr>
+ <td><code>*</code></td>
+ <td>2A</td>
+ <td>Optional Checksum Field Delimiter</td>
+ </tr>
+ </table>
+ <p>Following the start character <code>$</code>, are five characters which constitute the block label of the sentence. For Magnavox proprietary sentences, this label is always <code>PMVXG</code>. The next field after the block label is the sentence type, consisting of three decimal digits.</p>
+ <p>The data, delimited by commas, follows the sentence type. Note that the receiver uses a free-format parsing algorithm, so you need not send the exact number of characters shown in the examples. You will need to use the commas to determine how many bytes of data need to be retrieved.</p>
+ <p>The notation <code>CK</code> shown in <a href="#table_1">Table 1</a> symbolically indicates the optional checksum in the examples. The checksum is computed by exclusive-ORing all of the bytes between the <code>$</code> and the <code>*</code> characters. The <code>$</code>, <code>*</code> and the checksum are not included in the checksum computation.</p>
+ <p>Checksums are optional for Control Port input sentences, but are highly recommended to limit the effects of communication errors. Magnavox receivers always generate checksums for Control Port output sentences.</p>
+ <p>ASCII data characters are transmitted in the following format:</p>
+ <table border>
+ <tr>
+ <td>Data Bits</td>
+ <td>8 (msb always 0)</td>
+ </tr>
+ <tr>
+ <td>Parity</td>
+ <td>None</td>
+ </tr>
+ <tr>
+ <td>Stop Bits</td>
+ <td>1</td>
+ </tr>
+ </table>
+ <p>NULL fields are fields which do not contain any data. They would appear as two commas together in the sentence format, except for the final field. Some Magnavox proprietary sentences require that the format contain NULL fields. mandatory NULL fields are identified by an '*' next to the respective field.</p>
+ <hr>
+ <h2><a name="input">Control Port Input Sentences</a></h2>
+ These are the subset of the MX4200 control port input sentences sent by the NTP driver to the GPS receiver.
+ <hr>
+ <h3><a name="input_000">$PMVXG,000</a></h3>
+ <h4>Initialization/Mode Control - Part A</h4>
+ Initializes the time, position and antenna height of the MX4200.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Day</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1-31</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Month</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1-12</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Year</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1991-9999</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>GMT Time</td>
+ <td>HHMMSS</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>000000-235959</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>WGS-84 Latitude</td>
+ <td>DDMM.MMMM</td>
+ <td>Float</td>
+ <td>0.0</td>
+ <td>0 - 8959.9999</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>North/South Indicator</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>N</td>
+ <td>N,S</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>WGS-84 Longitude</td>
+ <td>DDDMM.MMMM</td>
+ <td>Float</td>
+ <td>0.0</td>
+ <td>0 - 17959.9999</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>East/West Indicator</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>E</td>
+ <td>E,W</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>Altitude (height above Mean Sea Level) in meters (WGS-84)</td>
+ <td>Meters</td>
+ <td>Float</td>
+ <td>0.0</td>
+ <td>+/-99999.0</td>
+ </tr>
+ <tr>
+ <td>10</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,000,,,,,,,,,,*48</code><br>
+ <code>$PMVXG,000,,,,,5128.4651,N,00020.0715,W,58.04,*4F</code>
+ <hr>
+ <h3><a name="input_001">$PMVXG,001</a></h3>
+ <h4>Initialization/Mode Control - Part B</h4>
+ Specifies various navigation parameters: Altitude aiding, acceleration DOP limits, and satellite elevation limits.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>*1</td>
+ <td>Constrain Altitude</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1</td>
+ <td>0=3D Only<br>
+ 1=Auto<br>
+ 2=2D Only</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>*3</td>
+ <td>Horizontal Acceleration Factor</td>
+ <td>m/sec^2</td>
+ <td>Float</td>
+ <td>1.0</td>
+ <td>0.5-10.0</td>
+ </tr>
+ <tr>
+ <td>*4</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>*5</td>
+ <td>VDOP Limit</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>10</td>
+ <td>1-9999</td>
+ </tr>
+ <tr>
+ <td>*6</td>
+ <td>HDOP Limit</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>10</td>
+ <td>1-9999</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Elevation Limit</td>
+ <td>Deg</td>
+ <td>Int</td>
+ <td>5</td>
+ <td>0-90</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>Time Output Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>U</td>
+ <td>U=UTC<br>
+ L=Local Time</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>Local Time Offset</td>
+ <td>HHMM</td>
+ <td>Int</td>
+ <td>0</td>
+ <td>+/- 0-2359</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,001,3,,0.1,0.1,10,10,5,U,0*06</code>
+ <hr>
+ <h3><a name="input_007">$PMVXG,007</a></h3>
+ <h4>Control Port Output Configuration</h4>
+ This message enables or disables output of the specified sentence and defines the output rate. The user sends this message for each sentence that the receiver is to output.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Control Port Output Block Label</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Clear Current Output List</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>0=No<br>
+ 1=Yes</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Add/Delete Sentence from List</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1=Append<br>
+ 2=Delete</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Sentence Output Rate</td>
+ <td>Sec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ <td>1-9999</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td># digits of Precision for CGA and GLL sentences</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>2</td>
+ <td>2-4</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,007,022,0,1,,1,,,*4F</code>
+ <hr>
+ <h3><a name="input_023">$PMVXG,023</a></h3>
+ <h4>Time Recovery Configuration</h4>
+ This message is used to enable/disable the time recovery feature of the receiver. The time synchronization for the 1PPS output is specified in addition to a user time bias and an error tolerance for a valid pulse. This record is accepted in units configured for time recovery. If the back panel contains a 1PPS outlet, the receiver is a time recovery unit.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>*1</td>
+ <td>Time Recovery Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>D</td>
+ <td>D=Dynamic<br>
+ S=Static<br>
+ K=Known Position<br>
+ N=No Time Recovery</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Time Synchronization</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>G</td>
+ <td>U=UTC<br>
+ G=GPS</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Time Mark Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>A</td>
+ <td>A=Always<br>
+ V=Valid Pulses Only</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Maximum Time Error</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>100</td>
+ <td>50-1000</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>User Time Bias</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>0</td>
+ <td>+/- 99999</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>ASCII Time Message Control</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0</td>
+ <td>0=No Output<br>
+ 1=830 to Control Port<br>
+ 2=830 to Equipment Port</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Known Pos PRN</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0</td>
+ <td>1-32<br>
+ 0=Track All Sats</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,023,S,U,A,500,0,1,*16</code>
+ <hr>
+ <h3><a name="input_gpq">$CDGPQ,YYY</a></h3>
+ <h4>Query From a Remote Device / Request to Output a Sentence</h4>
+ Enables the controller to request a one-time transmission of a specific block label. To output messages at a periodic rate, refer to input sentence <a href="#input_007">$PMVXG,007</a>.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Default</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1:CD</td>
+ <td>ID of Remote Device</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>(See <cite>NMEA-0183</cite>)</td>
+ </tr>
+ <tr>
+ <td>2:GP</td>
+ <td>GPS</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>(See <cite>NMEA-0183</cite>)</td>
+ </tr>
+ <tr>
+ <td>3:Q</td>
+ <td>Query</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>(See <cite>NMEA-0183</cite>)</td>
+ </tr>
+ <tr>
+ <td>4:YYY</td>
+ <td>Label of Desired Sentence</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ <td>Any Valid NMEA or Magnavox Sentence Type</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$CDGPQ,030*5E</code>
+ <hr>
+ <h2><a name="output">Control Port Output Sentences</a></h2>
+ These are the subset of the MX4200 control port output sentences recognized by the NTP driver.
+ <hr>
+ <h3><a name="output_000">$PMVXG,000</a></h3>
+ <h4>Receiver Status</h4>
+ Returns the current status of the receiver including the operating mode, number of satellites visible, and the number of satellites being tracked.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Current Receiver Status</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>ACQ=Reacquisition<br>
+ ALT=Constellation Selection<br>
+ IAC=Initial Acquisition<br>
+ IDL=Idle, No Satellites<br>
+ NAV=Navigating<br>
+ STS=Search The Sky<br>
+ TRK=Tracking</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Number of Satellites that should be Visible</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0-12</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Number of Satellites being Tracked</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0-12</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Time since Last Navigation</td>
+ <td>HHMM</td>
+ <td>Int</td>
+ <td>0-2359</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Initialization Status</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0=Waiting for Initialization<br>
+ 1=Initialization Complete</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,000,TRK,3,3,0122,1*19</code>
+ <hr>
+ <h3><a name="output_021">$PMVXG,021</a></h3>
+ <h4>Position, Height, Velocity</h4>
+ This sentence gives the receiver position, height, navigation mode and velocity north/east. <em>This sentence is intended for post analysis applications.</em>
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>UTC Measurement Time</td>
+ <td>Seconds into the week</td>
+ <td>Float</td>
+ <td>0-604800.00</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>WGS-84 Latitude</td>
+ <td>DDMM.MMMM</td>
+ <td>Float</td>
+ <td>0-89.9999</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>North/South Indicator</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>N, S</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>WGS-84 Longitude</td>
+ <td>DDDMM.MMMM</td>
+ <td>Float</td>
+ <td>0-179.9999</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>East/West Indicator</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>E, W</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Altitude (MSL)</td>
+ <td>Meters</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Geoidal Height</td>
+ <td>Meters</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>Velocity East</td>
+ <td>M/Sec</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>Velocity North</td>
+ <td>M/Sec</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>10</td>
+ <td>Navigation Mode</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td><em>Navigating</em><br>
+ 1=Position From a Remote Device<br>
+ 2=2D<br>
+ 3=3D<br>
+ 4=2D differential<br>
+ 5=3D differential<br>
+ <em>Not Navigating</em><br>
+ 51=Too Few Satellites<br>
+ 52=DOPs too large<br>
+ 53=Position STD too large<br>
+ 54=Velocity STD too large<br>
+ 55=Too many iterations for velocity<br>
+ 56=Too many iterations for position<br>
+ 57=3 Sat Startup failed</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,021,142244.00,5128.4744,N,00020.0593,W,00054.4,0047.4,0000.1,-000.2,03*66</code>
+ <hr>
+ <h3><a name="output_022">$PMVXG,022</a></h3>
+ <h4>DOPs</h4>
+ This sentence reports the DOP (Dilution Of Precision) values actually used in the measurement processing corresponding to the satellites listed. The satellites are listed in receiver channel order. Fields 11-16 are output only on 12-channel receivers.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>UTC Measurement Time</td>
+ <td>Seconds into the week</td>
+ <td>Float</td>
+ <td>0-604800.00</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>East DOP (EDOP)</td>
+ <td>&nbsp;</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>North DOP (NDOP)</td>
+ <td>&nbsp;</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Vertical DOP (VDOP)</td>
+ <td>&nbsp;</td>
+ <td>Float</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>PRN on Channel #1</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>PRN on Channel #2</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>PRN on Channel #3</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>PRN on Channel #4</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>PRN on Channel #5</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>10</td>
+ <td>PRN on Channel #6</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>11</td>
+ <td>PRN on Channel #7</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>12</td>
+ <td>PRN on Channel #8</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>13</td>
+ <td>PRN on Channel #9</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>14</td>
+ <td>PRN on Channel #10</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>15</td>
+ <td>PRN on Channel #11</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ <tr>
+ <td>16</td>
+ <td>PRN on Channel #12</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-32</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,022,142243.00,00.7,00.8,01.9,27,26,10,09,13,23*77</code>
+ <hr>
+ <h3><a name="output_030">$PMVXG,030</a></h3>
+ <h4>Software Configuration</h4>
+ This sentence contains the navigation processor and baseband firmware version numbers.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Nav Processor Version Number</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Baseband Firmware Version Number</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,030,DA35,015</code>
+ <hr>
+ <h3><a name="output_101">$PMVXG,101</a></h3>
+ <h4>Control Sentence Accept/Reject</h4>
+ This sentence is returned (on the Control Port) for every <strong>$PMVXG</strong> and <strong>$XXGPQ</strong> sentence that is received.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Sentence ID</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Accept/Reject Status</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0=Sentence Accepted<br>
+ 1=Bad Checksum<br>
+ 2=Illegal Value<br>
+ 3=Unrecognized ID<br>
+ 4=Wrong # of fields<br>
+ 5=Required Data Field Missing<br>
+ 6=Requested Sentence Unavailable</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Bad Field Index</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Requested Sentence ID (If field #1 = GPQ)</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,101,GPQ,0,,030*0D</code>
+ <hr>
+ <h3><a name="output_523">$PMVXG,523</a></h3>
+ <h4>Time Recovery Configuration</h4>
+ This sentence contains the configuration of the time recovery function of the receiver.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Time Recovery Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>D=Dynamic<br>
+ S=Static<br>
+ K=Known Position<br>
+ N=No Time Recovery</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Time Synchronization</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>U=UTC Time<br>
+ G=GPS Time</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Time Mark Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>A=Always Output Time Pulse<br>
+ V=Only when Valid</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Maximum Time Error for which a time mark will be considered valid</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>User Time Bias</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Time Message Control</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>0=No Message<br>
+ 1=830 to Control Port<br>
+ 2=830 to Equipment Port</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Not Used</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,523,S,U,A,0500,000000,1,0*23</code>
+ <hr>
+ <h3><a name="output_830">$PMVXG,830</a></h3>
+ <h4>Time Recovery Results</h4>
+ This sentence is output approximately 1 second preceding the 1PPS output. It indicates the exact time of the next pulse, whether or not the time mark will be valid (based on operator-specified error tolerance), the time to which the pulse is synchronized, the receiver operating mode, and the time error of the <strong>last</strong> 1PPS output. The leap second flag (Field #11) is not output by older receivers.
+ <p></p>
+ <table border>
+ <tr>
+ <th>Field</th>
+ <th>Description</th>
+ <th>Units</th>
+ <th>Format</th>
+ <th>Range</th>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>Time Mark Valid</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>T=Valid<br>
+ F=Not Valid</td>
+ </tr>
+ <tr>
+ <td>2</td>
+ <td>Year</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1993-</td>
+ </tr>
+ <tr>
+ <td>3</td>
+ <td>Month</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>1-12</td>
+ </tr>
+ <tr>
+ <td>4</td>
+ <td>Day</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>1-31</td>
+ </tr>
+ <tr>
+ <td>5</td>
+ <td>Time</td>
+ <td>HH:MM:SS</td>
+ <td>Int</td>
+ <td>00:00:00-23:59:59</td>
+ </tr>
+ <tr>
+ <td>6</td>
+ <td>Time Synchronization</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>U=UTC<br>
+ G=GPS</td>
+ </tr>
+ <tr>
+ <td>7</td>
+ <td>Operating Mode</td>
+ <td>&nbsp;</td>
+ <td>Char</td>
+ <td>D=Dynamic<br>
+ S=Static<br>
+ K=Known Position</td>
+ </tr>
+ <tr>
+ <td>8</td>
+ <td>Oscillator Offset - estimate of oscillator frequency error</td>
+ <td>PPB</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>9</td>
+ <td>Time Mark Error of last pulse</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>10</td>
+ <td>User Time Bias</td>
+ <td>Nsec</td>
+ <td>Int</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td>11</td>
+ <td>Leap Second Flag - indicates that a leap second will occur. This value is usually zero except during the week prior to a leap second occurrence, when this value will be set to +/-1. A value of +1 indicates that GPS time will be 1 second further ahead of UTC time.</td>
+ <td>&nbsp;</td>
+ <td>Int</td>
+ <td>-1,0,1</td>
+ </tr>
+ </table>
+ Example:<br>
+ <code>$PMVXG,830,T,1998,10,12,15:30:46,U,S,000298,00003,000000,01*02</code>
+ <hr>
+ <script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/oncore-shmem.html b/html/drivers/oncore-shmem.html
new file mode 100644
index 0000000..ec1d974
--- /dev/null
+++ b/html/drivers/oncore-shmem.html
@@ -0,0 +1,164 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>ONCORE - SHMEM</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>Motorola ONCORE - The Shared Memory Interface</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Introduction</h4>
+ <p>In NMEA mode, the Oncore GPS receiver provides the user with the same information as other GPS receivers. In BINARY mode, it can provide a lot of additional information.</p>
+ <p>In particular, you can ask for satellite positions, satellite health, signal levels, the ephemeris and the almanac, and you can set many operational parameters. In the case of the VP, you can get the pseudorange corrections necessary to act as a DGPS base station, and you can see the raw satellite data messages themselves.</p>
+ <p>When using the Oncore GPS receiver with NTP, this additional information is usually not available since the receiver is only talking to the oncore driver in NTPD. To make this information available for use in other programs, (say graphic displays of satellites positions, plots of SA, etc.), a shared memory interface (SHMEM) has been added to the refclock_oncore driver on those operating systems that support shared memory.</p>
+ <p>To make use of this information you will need an Oncore Reference Manual for the Oncore GPS receiver that you have. The Manual for the VP only exists as a paper document, the UT+/GT+/M12 manuals are available as a pdf documents at <a href="http://www.synergy-gps.com/Mot_Manuals.html">Synergy</a> .</p>
+ <p>This interface was written by Poul-Henning Kamp (phk@FreeBSD.org), and modified by Reg Clemens (reg@dwf.com). The interface is known to work in FreeBSD, Linux, and Solaris.</p>
+ <h4>Activating the Interface</h4>
+ <p>Although the Shared Memory Interface will be compiled into the Oncore driver on those systems where Shared Memory is supported, to activate this interface you must include a <b>STATUS</b> or <b>SHMEM</b> line in the <tt>/etc/ntp.oncore</tt> data file that looks like</p>
+ <pre>
+ STATUS &lt; file_name &gt;<br>
+
+ or<br>
+
+ SHMEM &lt; file_name &gt;
+</pre>
+ Thus a line like
+ <pre>
+ SHMEM /var/adm/ntpstats/ONCORE
+</pre>
+ <p>would be acceptable. This file name will be used to access the Shared Memory.</p>
+ <p>In addition, one the two keywords <b>Posn2D</b> and <b>Posn3D</b> can be added to see @@Ea records containing the 2D or 3D position of the station (see below). Thus to activate the interface, and see 3D positions, something like</p>
+ <pre>
+ SHMEM /var/adm/ntpstats/ONCORE
+ Posn3D
+</pre>
+ <p>would be required.</p>
+ <h4>Storage of Messages in Shared Memory</h4>
+ <p>With the shared memory interface, the oncore driver (refclock_oncore) allocates space for all of the messages that it is configured to receive, and then puts each message in the appropriate slot in shared memory as it arrives from the receiver. Since there is no easy way for a client program to know when the shared memory has been updated, a sequence number is associated with each message, and is incremented when a new message arrives. With the sequence number it is easy to check through the shared memory segment for messages that have changed.</p>
+ <p>The Oncore binary messages are kept in their full length, as described in the Reference manual, that is everything from the @@ prefix thru the &lt;checksum&gt;&lt;CR&gt;&lt;LF&gt;.</p>
+ <p>The data starts at location ONE of SHMEM (NOT location ZERO).</p>
+ <p>The messages are stacked in a series of variable length structures, that look like</p>
+ <pre>
+ struct message {
+ u_int length;
+ u_char sequence;
+ u_char message[length];
+ }
+</pre>
+ <p>if something like that were legal. That is, there are two bytes (caution, these may NOT be aligned with word boundaries, so the field needs to be treated as a pair of u_char), that contains the length of the next message. This is followed by a u_char sequence number, that is incremented whenever a new message of this type is received. This is followed by 'length' characters of the actual message.</p>
+ <p>The next structure starts immediately following the last char of the previous message (no alignment). Thus, each structure starts a distance of 'length+3' from the previous structure.</p>
+ <p>Following the last structure, is a u_int containing a zero length to indicate the end of the data.</p>
+ <p>The messages are recognized by reading the headers in the data itself, viz @@Ea or whatever.</p>
+ <p>There are two special cases.</p>
+ <p>(1) The almanac takes a total of 34 submessages all starting with @@Cb.<br>
+ 35 slots are allocated in shared memory. Each @@Cb message is initially placed in the first of these locations, and then later it is moved to the appropriate location for that submessage. The submessages can be distinguished by the first two characters following the @@Cb header, and new data is received only when the almanac changes.</p>
+ <p>(2) The @@Ea message contains the calculated location of the antenna, and is received once per second. However, when in timekeeping mode, the receiver is normally put in 0D mode, with the position fixed, to get better accuracy. In 0D mode no position is calculated.</p>
+ <p>When the SHMEM option is active, and if one of <b>Posn2D</b> or <b>Posn3D</b> is specified, one @@Ea record is hijacked each 15s, and the receiver is put back in 2D/3D mode so the the current location can be determined (for position determination, or for tracking SA). The timekeeping code is careful NOT to use the time associated with this (less accurate) 2D/3D tick in its timekeeping functions.</p>
+ <p>Following the initial @@Ea message are 3 additional slots for a total of four. As with the almanac, the first gets filled each time a new record becomes available, later in the code, the message is distributed to the appropriate slot. The additional slots are for messages containing 0D, 2D and 3D positions. These messages can be distinguished by different bit patterns in the last data byte of the record.</p>
+ <h4>Opening the Shared Memory File</h4>
+ <p>The shared memory segment is accessed through a file name given on a <b>SHMEM</b> card in the <tt>/etc/ntp.oncore</tt> input file. The following code could be used to open the Shared Memory Segment:</p>
+ <pre>
+ char *Buf, *file;
+ int size, fd;
+ struct stat statbuf;
+
+ file = &quot;/var/adm/ntpstats/ONCORE&quot;; /* the file name on my ACCESS card */
+ if ((fd=open(file, O_RDONLY)) &lt; 0) {
+ fprintf(stderr, &quot;Cant open %s\n&quot;, file);
+ exit(1);
+ }
+
+ if (stat(file, &amp;statbuf) &lt; 0) {
+ fprintf(stderr, &quot;Cant stat %s\n&quot;, file);
+ exit(1);
+ }
+
+ size = statbuf.st_size;
+ if ((Buf=mmap(0, size, PROT_READ, MAP_SHARED, fd, (off_t) 0)) &lt; 0) {
+ fprintf(stderr, &quot;MMAP failed\n&quot;);
+ exit(1);
+ }
+</pre>
+ <h4>Accessing the data</h4>
+ <p>The following code shows how to get to the individual records.</p>
+ <pre>
+ void oncore_msg_Ea(), oncore_msg_As(), oncore_msg_Bb();
+
+ struct Msg {
+ char c[5];
+ unsigned int seq;
+ void (*go_to)(uchar *);
+ };
+
+ struct Msg Hdr[] = { {&quot;@@Bb&quot;, 0, &amp;oncore_msg_Bb},
+ {&quot;@@Ea&quot;, 0, &amp;oncore_msg_Ea},
+ {&quot;@@As&quot;, 0, &amp;oncore_msg_As}};
+
+ void
+ read_data()
+ {
+ int i, j, k, n, iseq, jseq;
+ uchar *cp, *cp1;
+
+
+ for(cp=Buf+1; (n = 256*(*cp) + *(cp+1)) != 0; cp+=(n+3)) {
+ for (k=0; k &lt; sizeof(Hdr)/sizeof(Hdr[0]); k++) {
+ if (!strncmp(cp+3, Hdr[k].c, 4)) { /* am I interested? */
+ iseq = *(cp+2);
+ jseq = Hdr[k].seq;
+ Hdr[k].seq = iseq;
+ if (iseq &gt; jseq) { /* has it changed? */
+ /* verify checksum */
+ j = 0;
+ cp1 = cp+3; /* points to start of oncore response */
+ for (i=2; i &lt; n-3; i++)
+ j ^= cp1[i];
+ if (j == cp1[n-3]) { /* good checksum */
+ Hdr[k].go_to(cp1);
+ } else {
+ fprintf(stderr, &quot;Bad Checksum for %s\n&quot;, Hdr[k].c);
+ break;
+ }
+ }
+ }
+ }
+ if (!strncmp(cp+3, &quot;@@Ea&quot;, 4))
+ cp += 3*(n+3);
+ if (!strncmp(cp+3, &quot;@@Cb&quot;, 4))
+ cp += 34*(n+3);
+ }
+ }
+
+ oncore_msg_Bb(uchar *buf)
+ {
+ /* process Bb messages */
+ }
+
+ oncore_msg_Ea(uchar *buf)
+ {
+ /* process Ea messages */
+ }
+
+ oncore_msg_As(uchar *buf)
+ {
+ /* process As messages */
+ }
+</pre>
+ <p>The structure Hdr contains the Identifying string for each of the messages that we want to examine, and the name of a program to call when a new message of that type is arrives. The loop can be run every few seconds to check for new data.</p>
+ <h4>Examples</h4>
+ <p>There are two complete examples available. The first plots satellite positions and the station position as affected by SA, and keeps track of the mean station position, so you can run it for periods of days to get a better station position. The second shows the effective horizon by watching satellite tracks. The examples will be found in the GNU-zipped tar file <a href="ftp://ftp.udel.edu/pub/ntp/software/OncorePlot.tar.gz">ftp://ftp.udel.edu/pub/ntp/software/OncorePlot.tar.gz</a>.</p>
+ <p>Try the new interface, enjoy.</p>
+ <hr>
+ <address>Reg.Clemens (reg@dwf.com), Poul-Henning Kamp (phk@FreeBSD.org)</address>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/drivers/scripts/footer.txt b/html/drivers/scripts/footer.txt
new file mode 100644
index 0000000..d716cbf
--- /dev/null
+++ b/html/drivers/scripts/footer.txt
@@ -0,0 +1,9 @@
+document.write("\
+<table><tr>\
+<td width='33%' align='center'><img src='../icons/home.gif' align='middle'>\
+<a href='../index.html'>Home Page</a></td>\
+<td width='33%' ><img src='../icons/sitemap.png' align='middle'>\
+<a href='../sitemap.html'>Site Map</a></td>\
+<td width='33%' ><img src='../icons/mail2.gif' align='middle'>\
+<a href='http://www.ntp.org/contact'>Contacts</a></td>\
+</tr></table>")
diff --git a/html/drivers/scripts/style.css b/html/drivers/scripts/style.css
new file mode 100644
index 0000000..7b90fce
--- /dev/null
+++ b/html/drivers/scripts/style.css
@@ -0,0 +1,64 @@
+body {background: #FDF1E1;
+ color: #006600;
+ font-family: "verdana", sans-serif;
+ text-align: justify;
+ margin-left: 5px;}
+
+p, h4, hr, li {margin-top: .6em; margin-bottom: .6em}
+li.inline {text-align: left; margin-top: 0; margin-bottom: 0}
+
+ul, dl, ol, {margin-top: .6em; margin-bottom: .6em; margin-left 5em}
+
+dt {margin-top: .6em}
+dd {margin-bottom: .6em}
+
+div.header {text-align: center;
+ font-style: italic;}
+
+div.footer {text-align: center;
+ font-size: 60%;}
+
+img.cell {align: left;}
+
+td.sidebar {width: 40px; align: center; valign: top;}
+img.sidebar {align: center; margin-top: 5px;}
+h4.sidebar {align: center;}
+
+p.top {background: #FDF1E1;
+ color: #006600;
+ position: absolute;
+ margin-left: -90px;
+ text-align: center;}
+
+a:link.sidebar {background: transparent;
+ color: #990033;
+ font-weight: bold;}
+
+a:visited.sidebar {background: transparent;
+ color: #990033;
+ font-weight: bold;}
+
+a:hover.sidebar {background: #FDF1E1;
+ color: #006600;}
+
+img {margin: 5px;}
+
+div {text-align: center;}
+
+h1 {text-align: center;
+ font-size: 250%;}
+
+caption {background: #EEEEEE;
+ color: #339999;}
+
+tx {text-align: center;}
+
+th {background: #FFFFCC;
+ color: #006600;
+ text-align: center;
+ text-decoration: underline;
+ padding-top: 5px;}
+
+th.caption {background: #EEEEEE;
+ color: #006600;
+ text-align: center;}
diff --git a/html/drivers/tf582_4.html b/html/drivers/tf582_4.html
new file mode 100644
index 0000000..177976c
--- /dev/null
+++ b/html/drivers/tf582_4.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta name="GENERATOR" content="Adobe PageMill 3.0 per Windows">
+ <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+ <title>PTB Modem Time Service</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>European Automated Computer Time Services</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <p>Several European countries use the following message data format:</p>
+ <p><font size="-1" face="Courier New">Data format<br>
+ 0000000000111111111122222222223333333333444444444455555555556666666666777777777 7<br>
+ 0123456789012345678901234567890123456789012345678901234567890123456789012345678 9<br>
+ 1995-01-23 20:58:51 MEZ 10402303260219950123195849740+40000500 *<br>
+ A B C D EF G H IJ K L M N O P Q R S T U V W XY Z&lt;CR&gt;&lt;LF&gt;<br>
+ A year<br>
+ B month<br>
+ C day<br>
+ D hour<br>
+ E : normally<br>
+ A for DST to ST switch first hour<br>
+ B for DST to ST switch second hour if not marked in H<br>
+ F minute<br>
+ G second<br>
+ H timezone<br>
+ I day of week<br>
+ J week of year<br>
+ K day of year<br>
+ L month for next ST/DST changes<br>
+ M day<br>
+ N hour<br>
+ O UTC year<br>
+ P UTC month<br>
+ Q UTC day<br>
+ R UTC hour<br>
+ S UTC minute<br>
+ T modified julian day (MJD)<br>
+ U DUT1<br>
+ V direction and month if leap second<br>
+ W signal delay (assumed/measured)<br>
+ X sequence number for additional text line in Y<br>
+ Y additional text<br>
+ Z on time marker (* - assumed delay / # measured delay)<br>
+ &lt;CR&gt;!&lt;LF&gt; ! is second change !<br>
+ </font></p>
+ <p>This format is an ITU-R Recommendation (ITU-R TF583.4) and is now available from the primary timing centres of the following countries: Austria, Belgium, Germany, Italy, The Netherlands, Poland, Portugal, Romania, Spain, Sweden, Switzerland, Turkey and United Kingdom. Some examples are:</p>
+ <ul>
+ <li>In Germany by Physikalisch-Technische Bundesanstalt (PTB)'s timecode service. Phone number: +49 5 31 51 20 38.
+ <p>For more detail, see <a href="http://www.ptb.de/english/org/4/43/433/disse.html">http://www.ptb.de/english/org/4/43/433/disse.htm</a></p>
+ <li>In the UK by National Physical Laboratory (NPL)'s TRUETIME service. Phone number: 0891 516 333
+ <p>For more detail, see <a href="http://www.npl.co.uk/npl/ctm/truetime.html">http://www.npl.co.uk/npl/ctm/truetime.html</a></p>
+ <li>In Italy by Istituto Elettrotecnico Nazionale &quot;Galileo Ferrais&quot; (IEN)'s CTD service. Phone number: 166 11 46 15
+ <p>For more detail, see <a href="http://www.ien.it/tf/time/Pagina42.html">http://www.ien.it/tf/time/Pagina42.html</a></p>
+ <li>In Switzerland by Swiss Federal Office of Metrology's timecode service. Phone number: 031 323 32 25
+ <p>For more detail, see <a href="http://www.metas.ch/en/labors/official-time/modem/index.html">http://www.ofmet.admin.ch/de/labors/4/Zeitvert.html </a></p>
+ <li>In Sweden by SP Swedish National Testing and Research Institute 's timecode service. Phone number: +46 33 415783.
+ <p>For more detail, see <a href="http://www.sp.se/metrology/timefreq/eng/tandf.htm">http://www.sp.se/metrology/timefreq/eng/tandf.htm</a></p>
+ </ul>
+ <dl></dl>
+ <h4>Additional Information</h4>
+ <p><a href="../refclock.html">Reference Clock Drivers</a></p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/extern.html b/html/extern.html
new file mode 100644
index 0000000..764631d
--- /dev/null
+++ b/html/extern.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>External Clock Discipline and the Local Clock Driver</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>External Clock Discipline and the Local Clock Driver</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->9-May-2014 04:46<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>The NTPv4 implementation includes provisions for an external clock, where
+ the system clock is implemented by some external hardware device.
+ One implementation might take the form of a bus peripheral with a high resolution
+ counter disciplined by a GPS receiver, for example. Another implementation
+ might involve another synchronization protocol, such as the Digital Time Synchronization
+ Service (DTSS), where the system time is disciplined to this protocol and
+ NTP clients of the server obtain synchronization indirectly via the server.
+ A third implementation might be a completely separate clock discipline algorithm
+ and synchronization protocol, such as the <tt>Lockclock</tt> algorithm used
+ with NIST Automated Computer Time Service (ACTS) modem synchronized time.</p>
+<p>When external clocks are used in conjunction with NTP service, some way needs to be provided for the external clock driver and NTP daemon <tt>ntpd</tt> to communicate and determine which discipline is in control. This is necessary in order to provide backup, for instance if the external clock or protocol were to fail and synchronization service fall back to other means, such as a local reference clock or another NTP server. In addition, when the external clock and driver are in control, some means needs to be provided for the clock driver to pass on status information and error statistics to the NTP daemon.</p>
+<p>Control and monitoring functions for the external clock and driver are implemented using the <a href="drivers/driver1.html">Local Clock (type 1) driver</a> and the <tt>ntp_adjtime()</tt> system call. This system call is implemented by special kernel provisions included in the kernel of several operating systems, including Solaris, Tru64, FreeBSD and Linux, and possibly others. When the external clock is disabled or not implemented, the system call is used to pass time and frequency information, as well as error statistics, to the kernel. Besides disciplining the system time, the same interface can be used by other applications to determine the operating parameters of the discipline.</p>
+<p>When the external clock is enabled, <tt>ntpd</tt> does not discipline the system clock, nor does it maintain the error statistics. In this case, the external clock and driver do this using mechanisms unknown to <tt>ntpd</tt>; however, in this case the kernel state variables are retrieved at 64-s intervals by the Local Clock driver and used by the clock selection and mitigation algorithms to determine the system variables presented to other NTP clients and peers. In this way, downstream clients and servers in the NTP subnet can make an intelligent choice when more than one server is available.</p>
+<p>In order to implement a reliable mitigation between ordinary NTP sources and the external clock source, a protocol is necessary between the local clock driver and the external clock driver. This is implemented using Boolean variables and certain bits in the kernel clock status word. The Boolean variables include the following:</p>
+<p><tt>ntp_enable</tt>. set/reset by the <tt>enable</tt> command. enables ntpd
+ clock discipline</p>
+<p><tt>ntp_contro</tt>l. set during initial configuration if kernel support is available</p>
+<p><tt>kern_enable</tt> Set/reset by the <tt>enable</tt> command</p>
+<p>If the <tt>kern_enable</tt> switch is set, the daemon computes the offset,
+ frequency, maximum error, estimated error, time constant and status bits,
+ then provides them to the kernel via <tt>ntp_adjtime()</tt>. If this switch
+ is not set, these values are not passed to the kernel; however, the daemon
+ retrieves their present values and uses them in place of the values computed
+ by the daemon.</p>
+<p>The <tt>pps_update</tt> bit set in the protocol routine if the prefer peer has survived and has offset less than 128 ms; otherwise set to zero.</p>
+<p>The <tt>PPS control</tt> Updated to the current time by kernel support if
+ the PPS signal is enabled and working correctly. Set to zero in the adjust
+ routine if the interval since the last update exceeds 120 s.</p>
+<p>The <tt>ntp_enable</tt> and <tt>kern_enable</tt> are set by the configuration module. Normally, both switches default on, so the daemon can control the time and the kernel discipline can be used, if available. The <tt>pps_update</tt> switch is set by the protocol module when it believes the PPS provider source is legitimate and operating within nominals. The <tt>ntp_control</tt> switch is set during configuration by interrogating the kernel. If both the <tt>kern_enable</tt> and <tt>ntp_control</tt> switches are set, the daemon disciplines the clock via the kernel and the internal daemon discipline is disabled.</p>
+<p>The external clock driver controls the system time and clock selection in the following way. Normally, the driver adjusts the kernel time using the <tt>ntp_adjtime()</tt> system call in the same way as the daemon. In the case where the kernel discipline is to be used intact, the clock offset is provided in this call and the loop operates as specified. In the case where the driver steers only the frequency, the offset is specified as zero.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/filter.html b/html/filter.html
new file mode 100644
index 0000000..5f9ed0a
--- /dev/null
+++ b/html/filter.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Clock Filter Algorithm</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Clock Filter Algorithm</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:05<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>The clock filter algorithm processes the offset and delay samples produced by the on-wire protocol for each peer process separately. It uses a sliding window of eight samples and picks out the sample with the least expected error. This page describes the algorithm design principles along with an example of typical performance.</p>
+<div align="center"><img src="pic/flt5.gif" alt="gif">
+ <p>Figure 1. Wedge Scattergram</p>
+</div>
+<p>Figure 1 shows a typical <em>wedge scattergram</em> plotting sample points of offset versus delay collected over a 24-hr period. As the delay increases, the offset variation increases, so the best samples are those at the lowest delay. There are two limb lines at slope &plusmn;0.5, representing the limits of sample variation. However, it is apparent that, if a way could be found to find the sample of lowest delay, it would have the least offset variation and would be the best candidate to synchronize the system clock.</p>
+<p>The clock filter algorithm works best when the delays are statistically identical in the reciprocal directions between the server and client. This is apparent in Figure 1, where the scattergram is symmetric about the x axis through the apex sample. In configurations where the delays are not reciprocal, or where the transmission delays on the two directions are traffic dependent, this may not be the case. A common case with DSL links is when downloading or uploading a large file. During the download or upload process, the delays may be significantly different resulting in large errrors. However, these errors can be largely eliminated using samples near the limb lines, as described on the <a href="huffpuff.html">Huff-n'-Puff Filter</a> page.</p>
+<p>In the clock filter algorithm the offset and delay samples from the on-wire protocol are inserted as the youngest stage of an eight-stage shift register, thus discarding the oldest stage. Each time an NTP packet is received from a source, a dispersion sample is initialized as the sum of the precisions of the server and client. Precision is defined by the latency to read the system clock and varies from 1000 ns to 100 ns in modern machines. The dispersion sample is inserted in the shift register along with the associated offset and delay samples. Subsequently, the dispersion sample in each stage is increased at a fixed rate of 15 &mu;s/s, representing the worst case error due to skew between the server and client clock frequencies.</p>
+<p>In each peer process the clock filter algorithm selects the stage with the smallest delay, which generally represents the most accurate data, and it and the associated offset sample become the peer variables of the same name. The peer jitter statistic is computed as the root mean square (RMS) differences between the offset samples and the offset of the selected stage.</p>
+<p> The peer dispersion statistic is determined as a weighted sum of the dispersion samples in the shift register. Initially, the dispersion of all shift register stages is set to a large number &quot;infinity&quot; equal to 16 s. The weight factor for each stage, starting from the youngest numbered <em>i</em> = 1, is 2<sup>-<em>i</em></sup>, which means the peer dispersion is approximately 16 s.</p>
+<p> As samples enter the register, the peer dispersion drops from 16 s to 8 s, 4 s, 2 s, and so forth. In practice, the synchronization distance, which is equal to one-half the delay plus the dispersion, falls below the select threshold of 1.5 s in about four updates. This gives some time for meaningful comparison between sources, if more than one are available. The dispersion continues to grow at the same rate as the sample dispersion. For additional information on statistacl principles and performance metrics, see the <a href="stats.html">Performance Metrics</a> page.</p>
+<p> As explained elsewhere, when a source becomes unreachable, the poll process inserts a dummy infinity sample in the shift register for each poll sent. After eight polls, the register returns to its original state.</p>
+<div align="center"><img src="pic/flt1.gif" alt="gif"> &nbsp; <img src="pic/flt2.gif" alt="gif">
+ <p>Figure 2. Raw (left) and Filtered (right) Offsets</p>
+</div>
+<p>Figure 2 shows the performance of the algorithm for a typical Internet path over a 24-hr period. The graph on the left shows the raw offsets produced by the on-wired protocol, while the figure on the right shows the filtered offsets produced by the clock filter algorithm. If we consider the series formed as the absolute value of the offset samples, the mean error is defined as the mean of this series. Thus, the mean error of the raw samples is 0.724 ms, while the mean error of the filtered series is 0.192 ms. Radio engineers would interpret this as a processing gain of 11.5 dB.</p>
+<p>The reader might notice the somewhat boxy characteristic of the filtered offsets. Once a sample is selected, it remains selected until a newer sample with lower delay is available. This commonly occurs when an older selected sample is discarded from the shift register. The reason for this is to preserve causality; that is, time always moves forward, never backward. The result can be the loss of up to seven samples in the shift register, or more to the point, the output sample rate can never be less than one in eight input samples. The clock discipline algorithm is specifically designed to operate at this rate.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/hints.html b/html/hints.html
new file mode 100644
index 0000000..7749ba9
--- /dev/null
+++ b/html/hints.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=windows-1252">
+<title>Hints and Kinks</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Hints and Kinks</h3>
+<img src="pic/alice35.gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html"> from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>Mother in law has all the answers.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:06<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<hr>
+<p>This is an index for a set of troubleshooting notes contained in individual text files in the <tt>./hints</tt> directory. They were supplied by various volunteers in the form of mail messages, patches or just plain word of mouth. Each note applies to a specific computer and operating system and gives information found useful in setting up the NTP distribution or site configuration. The notes are very informal and subject to errors; no attempt has been made to verify the accuracy of the information contained in them.</p>
+<p>Additions or corrections to this list or the information contained in the notes is solicited. The most useful submissions include the name of the computer manufacturer (and model numbers where appropriate), operating system (specific version(s) where appropriate), problem description, problem solution and submitter's name and electric address. If the submitter is willing to continue debate on the problem, please so advise. See the <a href="hints/">directory listing</a>.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/hints/a-ux b/html/hints/a-ux
new file mode 100644
index 0000000..f8c26d2
--- /dev/null
+++ b/html/hints/a-ux
@@ -0,0 +1,195 @@
+-------------
+INTRODUCTION:
+-------------
+Last revision: 06-Jul-1994
+
+Included in this distribution of XNTP V3 is a configuration file suitable
+for use under Apple's A/UX Version 3.x.x There is also one for A/UX 2.0.1
+but it has not been fully tested. To make the executables follow the steps
+outlined below.
+
+*** NOTE: You must have gcc installed to successfully compile the current
+distribution; the native cc supplied with A/UX will NOT correctly compile
+this source. See the FAQ in comp.unix.aux for places to obtain gcc from
+and how to install it.
+
+----------------------
+MAKING XNTPD FOR A/UX:
+----------------------
+
+First, you need to create the makefiles (after you've downloaded the
+source, of course):
+
+ % make clean
+ % make refconf
+
+After that, you should edit Config.local to make sure that BINDIR is
+correct for where you wish the programs to be "installed". The default
+(and what I use) is /usr/local/etc. Make sure that DEFS_LOCAL and
+CLOCKDEFS are commented out! Presently, only the LOCAL_CLOCK/REFCLOCK
+clock is used and supported.
+
+
+After this is done (you should be told that your system is A/UX 3), make
+'xntpd' (the options to 'gcc' are held in compilers/aux3.gcc):
+
+ % make
+
+I do not normally use the `make install' option and so have not verified its
+compatibility with A/UX. Rather, I pull out each of the executables and
+place them in the locally appropriate locations.
+
+---------------
+STARTING XNTPD:
+---------------
+
+At this point you need to set things up so that 'xntpd' is started upon
+boot-up. You can do this in 1 of 2 ways: either add entries in /etc/inittab
+or, more ideally, create and use an /etc/rc.local file. Since rc.local is
+what I recommend, here's how you do it:
+
+By default, A/UX doesn't have rc.local, so you'll need to add the following to
+/etc/inittab:
+
+ net6:2:wait:/etc/syslogd # set to "wait" to run a syslog daemon
++ jmj0:2:wait:/etc/rc.local 1>/dev/syscon 2>&1 # Local stuff
+ dbg2::wait:/etc/telinit v # turn off init's verbose mode
+
+Now, the look of a sample /etc/rc.local is as follows:
+
+ #!/bin/sh
+ :
+ : rc.local
+ :
+ # @(#)Copyright Apple Computer 1987 Version 1.17 of rc.sh on 91/11/08 15:56:21 (ATT 1.12)
+
+
+ # Push line discipline/set the device so it will print
+ /etc/line_sane 1
+ echo " "
+ echo "Entering rc.local..."
+
+ set `/bin/who -r`
+ if [ "$7" = 2 ]
+ then
+ /bin/echo " now setting the time..."
+ /usr/local/etc/ntpdate -s -b <host.domain>
+ sleep 5
+ #
+ # start up 'xntpd' if we want
+ #
+ if [ -f /etc/ntp.conf ]
+ then
+ /bin/echo " setting tick and tickadj..."
+ /usr/local/etc/tickadj -t 16672 -a 54
+ sleep 5
+ /bin/echo " starting xntpd..."
+ /usr/local/etc/xntpd <&- > /dev/null 2>&1
+ sleep 5
+ fi
+ #
+ fi
+
+ echo "Leaving rc.local..."
+
+There are a few things to notice about the above:
+
+ o When run, 'ntpdate' forces your clock to the time returned by the
+ host(s) specified by <host.domain> (you'll need to replace this
+ be the IP address(es) of your timehosts. This is good since it gets
+ things close to start off with. You can use more than one time
+ server.
+
+ o 'tickadj' is also called. This does two things: changes the
+ default value of 'tick' (which the the amount of time, in ms, that
+ is added to the clock every 1/60 seconds) and changes the value
+ of 'tickadj' which the the amount that is added or subtracted
+ from 'tickadj' when adjtime() is called.
+
+ Now Mac clocks are pretty bad and tend to be slow. Sooo, instead of
+ having A/UX add the default of 16666ms every 1/60th of a second, you
+ may want it to add more (or less) so that it keeps better time. The
+ above value works for me but your "best" value may be different and
+ will likely require some fooling around to find the best value. As a
+ general rule of thumb, if you see 'xntpd' make a lot of negative clock
+ adjustments, then your clock is fast and you'll need to _decrease_
+ the value of 'tick'. If your adjustments are positive, then you need
+ to increase 'tick'. To make a guess on how fast/slow your clock is,
+ use 'ntpdate' to sync your clock. Now watch 'xntpd' and see how it
+ operates. If, for example, it resets your clock by 1 second every 30
+ minutes, then your clock is (1/(30*60)) is about 0.056% off and you'll
+ need to adjust 'tick' by 16666*0.00056 or about 9 (i.e. 'tick' should
+ be ~16675 if slow or ~16657 if fast)
+
+ A/UX's default value of 'tickadj' is 1666 which is too big for
+ 'xntpd'... so it also needs to be adjusted. I like using larger
+ values then the recommended value of 9 for 'tickadj' (although not
+ anything near as big as 1666) since this allows for quick slews
+ when adjusting the clock. Even with semi-large values of 'tickadj'
+ (~200), getting 5ms (1/200 s) accuracy is easy.
+
+
+Finally, before A/UX and 'xntpd' will work happily together, you need to
+patch the kernel. This is due to the fact that A/UX attempts to keep the
+UNIX-software clock and the Mac-hardware clock in sync. Neither the h/w or
+the s/w clock are too accurate. Also, 'xntpd' will be attempting to adjust
+the software clock as well, so having A/UX muck around with it is asking
+for headaches. What you therefore need to do is tell the kernel _not_ to
+sync the s/w clock with the h/w one. This is done using 'adb'. The
+following is a shell script that will do the patch for you:
+
+ #! /bin/sh
+ adb -w /unix <<!
+ init_time_fix_timeout?4i
+ init_time_fix_timeout?w 0x4e75
+ init_time_fix_timeout?4i
+ $q
+ !
+
+This must be done _every_ time you create a new kernel (via newconfig or
+newunix) or else 'xntpd' will go crazy.
+
+--------
+HISTORY:
+--------
+
+John Dundas was the original porter of 'xntpd' and a lot of the additions
+and A/UX-ports are from him. I got involved when I wanted to run 'xntpd'
+on jagubox. It was also around this time that the base-patchlevel of
+'xntpd' changed relatively (the so-called "jones" version). Since then,
+I've been maintaining 'xntpd' for A/UX for the xntp development team
+
+The original kernel patch (which patched 'time_fix_timeout') was from
+Richard Todd. I suggest patching 'init_time_fix_timeout' which prevents
+'time_fix_timeout' from even being called.
+
+----------------
+TECHNICAL NOTES:
+----------------
+
+ o As configured (see machines/aux3), 'xntpd' will log messages via syslogd
+ using the LOC_LOCAL1 facility. I would suggest the following in
+ /etc/syslog.conf:
+
+ local1.notice /usr/adm/ntpd-syslog
+
+ o As mentioned above, the clocks on A/UX and Macs are kinda bad. Not
+ only that, but logging in and out of the MacOS mode as well as
+ extensive floppy use causes A/UX to drop and lose clock interupts
+ (these are sent every 1/60th of a second). So, if you do these
+ activities a lot, you find out that you lose about 300ms of time
+ (i.e., you become 300ms slow). 'xntpd' default way of handling this
+ is to called 'settimeofday()' and step the clock to the correct
+ time. I prefer having 'xntpd' slew the clock back into line by
+ making gradual adjustments to the clock over a coupla minutes
+ or so. It's for this reason that SLEWALWAYS is defined in
+ include/ntp_machine.h for SYS_AUX3. It's also for this reason than
+ I like larger values of 'tickadj'.
+
+Good luck! If you have problems under A/UX feel free to contact me (e-mail
+is preferred).
+--
+ Jim Jagielski | "That is no ordinary rabbit... 'tis the
+ jim@jagubox.gsfc.nasa.gov | most foul, cruel and bad-tempered
+ NASA/GSFC, Code 734.4 | rodent you ever set eyes on"
+ Greenbelt, MD 20771 | Tim the Enchanter
diff --git a/html/hints/aix b/html/hints/aix
new file mode 100644
index 0000000..e53beff
--- /dev/null
+++ b/html/hints/aix
@@ -0,0 +1,76 @@
+Problem with recent ANSI compilers
+
+On some systems, including AIX, the compiler quits on the ntp_refclock.c
+file when processing the refclock_report() routine. The problem, which
+is eithre a feature or a bug, has to do with an unwanted promotion of
+the u_char argument to an int and a failure of the compiler to recognize
+the preceding prototype. A workaround is to use ANSI syntax to delare
+the arguments. Since ANSI compilers are not universally available, this
+syntax can't be used in the stock distribution.
+
+(Message # 60: 2884 bytes, New)
+Date: Sat, 19 Aug 1995 13:20:50 -0400
+From: "R. Bernstein" <rocky@panix.com>
+Newsgroups: comp.protocols.time.ntp
+to: mills@udel.edu
+return-receipt-to: rocky@panix.com
+Subject: time and AIX 3.2.5 raw tty bug
+
+This posting isn't strictly about NTP, any program that may stop the
+clock or set the clock backwards is subject to the AIX 3.2.5 bug.
+
+On AIX 3.2.5, there is a bug in the tty driver for a raw device which
+may crash the box under certain conditions: basically a read() on a
+raw tty in effect, a character was read but not as many as specified
+by VMIN when a read timeout occurred. VTIME specifies the timeout. See
+the AIX manual page on termios.h or that include file. for Information
+on VMIN (or MIN) VTIME (or TIME).
+
+A remedy other than to not use raw tty's is to apply patch U435110.
+
+Details of the problem report follow.
+
+> ABSTRACT:
+> IX43779: TRAP IN PSX_TIMEO
+>
+> ORIGINATING DETAILS:
+> Stacktrace shows:
+> IAR: 01460214 posixdd:psx_timeo + 8bf4: ti 4,r12,0x0
+> *LR: 014601a0 posixdd:psx_timeo + 8b80
+> 00212c60: 014604f4 posixdd:psx_timer + 8ed4
+> 00212cc0: 0144b74c ttydd:tty_do_offlevel + 4284
+> 00212d20: 000216fc .i_offlevel + 8c
+> 00212d70: 00021d78 .i_softint + c8
+> 00001004: 00008714 .finish_interrupt + 80
+>
+> RESPONDER SUMMARY:
+> AIX asserted in psx_timeo(). Reason for the assert was that
+> the current time was behind psx_ctime. Since this state
+> can occur when the current time is changed after a character
+> is received but before the VTIME interbyte timer pops, we
+> should not assert on this.
+>
+> RESPONDER CONCLUSION:
+> Removed the requirement that current time > psx_ctime by
+> adding a new L_ntimersub macro that is used instead of the
+> ntimersub macro in time.h. Also added a test for (current
+> time - psx_ctime) being negative, in that case we do not
+> adjust the new timeout.
+>
+> Reported to Correct a PTF in Error: NO
+> Reported as a Highly pervasive problem: NO
+>
+> PE Apar?: NoPE
+> Hiper Apar?: NoHiper
+> Status: CLOSED PER
+> Component Name: AIX V3 FOR RS/6
+> Version: 320
+> Component ID: 575603001
+> Submitted: 94/05/03
+> Closed: 94/05/05
+> ChangeTeam: TX2527
+>
+> APAR FIXED BY: U431696 U432151 U432844 U432870 U432979
+> U433049 U433081 U433459 U433876 U433906 U434598 U434453
+> U434672 U434737 U435110
+
diff --git a/html/hints/bsdi b/html/hints/bsdi
new file mode 100644
index 0000000..3b8bc38
--- /dev/null
+++ b/html/hints/bsdi
@@ -0,0 +1,65 @@
+hints/bsdi
+
+Author: Bdale Garbee, bdale@gag.com
+Last revision: 27Oct94 (Paul Vixie)
+
+Included in this distribution of XNTP is a configuration file suitable
+for use with BSDI's BSD/OS 1.1 (formerly BSD/386 1.1). On this system,
+the "cc" command is GCC 1.4x rather than PCC or GCC 2.x. It is imperative
+that "cc" be used since it predefines the symbol __bsdi__; if you want to
+use another compiler you will need to add -D__bsdi__ to catch the various
+#ifdef's required for this system.
+
+The Kinemetrics/Truetime GPS-TM/TMD driver is known to work on this system.
+The GPS-805 and GOES should also work fine. Hell, they should all work fine
+but it's hard to test very many locally.
+
+Due to BNR2's strict interpretation of POSIX and XNTP's use of SIGIO, BSD/OS
+can only handle one refclock per daemon. We're working this out with the
+system architects.
+
+The config file is machine/bsdi, and the following steps should be all that
+are required to install and use the bits.
+
+Note that you will need GNU sed; the version supplied with BSD/OS 1.1 loops
+endlessly during "make refconf". Likewise you should get GNU make, which
+the instructions below assume that you have put in /usr/local/bin/gnumake.
+
+To build the software:
+
+ rm -f Config.local
+ gnumake refconf
+ gnumake MAKE=gnumake
+
+To install the software:
+
+ gnumake install
+
+ This will place all of the executables in /usr/local/etc. The config
+ file is expected to be /usr/local/etc/xntp.conf and the key file for
+ the optional authentication is /etc/ntp.keys.
+
+ Craft a config file and a key file, and put them in the right places.
+ There is information on how to do this elsewhere in the documentation,
+ the only thing I'll mention is that I put the drift file in
+ /var/log/ntp.drift, and the authdelay on my 486DX/50 system is
+ 0.000064. Your mileage will vary, learn to use the authspeed tools
+ if you're going to authenticate.
+
+ In the file /etc/rc.local, make sure that the invocation of ntpd is
+ commented out, and add an invocation of xntpd. Here's what I'm using:
+
+ echo -n 'starting local daemons:'
+
+ if [ -f /etc/ntp.keys -a -f /usr/local/etc/xntp.conf ]; then
+ echo -n ' xntpd'; /usr/local/etc/xntpd
+ fi
+
+ #XXX# echo -n ' ntpd'; /usr/libexec/ntpd -t
+
+At this point, you should be good to go. Try running /usr/local/etc/xntpd and
+using ntpq or xntpdc to see if things are working, then pay attention the next
+time you reboot to make sure that xntpd is being invoked, and use ntpq or
+xntpdc again to make sure all is well.
+
+Enjoy!
diff --git a/html/hints/changes b/html/hints/changes
new file mode 100644
index 0000000..177e562
--- /dev/null
+++ b/html/hints/changes
@@ -0,0 +1,13 @@
+Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> (xntpd/refclock_parse.c):
+ - Added support to supply power from RS232 with CLOCK_RAWDCF.
+ Known to work with Linux 1.2.
+ - Made Linux ignore parity errors with CLOCK_RAWDCF.
+
+Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> (parse/util/dcfd.c):
+ - Removed conflicting prototype for Linux (sscanf)
+ - Corrected spelling error
+ - Made Linux ignore parity errors.
+ - Added support to supply power from RS232 with CLOCK_RAWDCF.
+
+Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> (parse/util/testdcf.c):
+ - Made Linux ignore parity errors.
diff --git a/html/hints/decosf1 b/html/hints/decosf1
new file mode 100644
index 0000000..bc4ce0b
--- /dev/null
+++ b/html/hints/decosf1
@@ -0,0 +1,40 @@
+Some major changes were necessary to make xntp v3 run on the DEC Alpha
+hardware running DEC OSF/1. All "long" and "u_long" declarations and
+casts in the code were changed to "LONG" and "U_LONG" and a new header
+file (include/ntp_types.h) was added. The new header file defines
+LONG as int and U_LONG as u_int for the Alpha hardware and as long
+and u_long for anything else. A couple of #ifs where changed in
+ntpq and xntpdc to get the result of a signal defined correctly. The
+Config.decosf1 file built the programs here with no problems.
+
+I don't have a radio clock here, so none of that code has been tested.
+I have run xntpd, xntpdc, xntpres, ntpq, ntpdate, and tickadj under
+DEC OSF/1 v1.2-2 (BL10).
+
+Mike Iglesias Internet: iglesias@draco.acs.uci.edu
+University of California, Irvine BITNET: iglesias@uci
+Office of Academic Computing uucp: ...!ucbvax!ucivax!iglesias
+Distributed Computing Support phone: (714) 856-6926
+
+Support for NTP Version 2 is included with the current OSF/1 release. If
+you are upgrading to NTP Version 3 with this distribution, you should not
+use the xntpd or ntpq programs that come with the OSF/1 release. The
+older programs should be replaced by the newer programs of the same name,
+either in situ or via a link to a tranquil spot like /usr/local/bin. The
+make install script in the this distribution don't work due to a silly
+install program incompatibility, so you will need to copy the programs by
+hand.
+
+Don't use the setup utility to install or configure the xntpd installation,
+as it will cheerfully clobber your painstakingly crafted ntp.conf program.
+However, assuming you put this file in /etc/ntp.conf, you can use the
+/sbin/init.d/xntpd script to start and stop the daemon.
+
+This distribution compiles with nominal mumur with the stock cc compiler
+that comes with OSF/1.
+
+Dave Mills
+Electrical Engineering Department
+Unibergisty of Delabunch
+mills@udel.edu
+
diff --git a/html/hints/decosf2 b/html/hints/decosf2
new file mode 100644
index 0000000..e4a8828
--- /dev/null
+++ b/html/hints/decosf2
@@ -0,0 +1,54 @@
+Problems with DEC OSF/1 V2.0
+
+Compilation using gcc fails with ntp_config.c. The problem is an apparent
+error in the /usr/include/sys/procset.h and /usr/include/sys/wait.h
+include files.
+
+cowbird:/usr/include/sys# diff -c wait.h.orig wait.h
+*** wait.h.orig Tue Feb 22 02:41:38 1994
+--- wait.h Thu Aug 25 14:52:57 1994
+***************
+*** 298,304 ****
+ #else
+
+ _BEGIN_CPLUSPLUS
+! extern int waitid(idtype_t, id_t, siginfo_t *, int);
+ _END_CPLUSPLUS
+ #endif /* _NO_PROTO */
+
+--- 298,304 ----
+ #else
+
+ _BEGIN_CPLUSPLUS
+! extern int waitid(idtype_t, pid_t, siginfo_t *, int);
+ _END_CPLUSPLUS
+ #endif /* _NO_PROTO */
+
+cowbird:/usr/include/sys# diff -c procset.h.orig procset.h
+*** procset.h.orig Tue Feb 22 02:41:44 1994
+--- procset.h Thu Aug 25 14:43:52 1994
+***************
+*** 86,95 ****
+ */
+
+ idtype_t p_lidtype; /* The id type for the left set. */
+! id_t p_lid; /* The id for the left set. */
+
+ idtype_t p_ridtype; /* The id type of for right set. */
+! id_t p_rid; /* The id of the right set. */
+ } procset_t;
+
+
+--- 86,95 ----
+ */
+
+ idtype_t p_lidtype; /* The id type for the left set. */
+! pid_t p_lid; /* The id for the left set. */
+
+ idtype_t p_ridtype; /* The id type of for right set. */
+! pid_t p_rid; /* The id of the right set. */
+ } procset_t;
+
+Also, if using gcc from the freeware disk, either replace syscall.h
+in the directory /usr/local/lib/gcc-lib/alpha-dec-osf1/2.3.3/include
+or replace with a link to /usr/include/sys/syscall.h.
diff --git a/html/hints/freebsd b/html/hints/freebsd
new file mode 100644
index 0000000..ef84732
--- /dev/null
+++ b/html/hints/freebsd
@@ -0,0 +1,15 @@
+If you are compiling under FreeBSD and see messages in the syslogs that
+indicate that the ntpd process is trying to use unavailable sched_
+calls, it means you are running a kernel that does not have the POSIX
+scheduling calls enabled.
+
+You have two choices:
+
+- Ignore the messages
+
+- Generate a new kernel, where the kernel configuration file contains
+ the lines:
+
+ options "P1003_1B"
+ options "_KPOSIX_PRIORITY_SCHEDULING"
+ options "_KPOSIX_VERSION=199309L"
diff --git a/html/hints/hpux b/html/hints/hpux
new file mode 100644
index 0000000..1640d05
--- /dev/null
+++ b/html/hints/hpux
@@ -0,0 +1,158 @@
+Last update: Sun Mar 13 15:05:31 PST 1994
+
+This file hopefully describes the whatever and however of how to get xntp
+running on hpux 7.0 and later s300. s400, s700, and s800.
+
+First off, all the standard disclaimers hold here ... HP doesn't have anthing
+to do with this stuff. I fool with it in my spare time because we use it and
+because I like to. We just happen to have a lot of HP machines around here :-)
+Xntpd has been in use here for several years and has a fair amount of mileage
+on various HP platforms within the company. I can't really guarantee bug fixes
+but I'd certainly like to hear about bugs and I won't hestitate to look at
+any fixes sent to me.
+
+Now lets talk OS. If you don't have 7.0 or later, pretty much hang it up now.
+This stuff has run here on pretty much everything from 8.0 upward on s300,
+s700, and s800. It is known to run on 7.0 s300/s400 but all reports are
+from the field and not my personal experience.
+
+If you are lucky enough to have a s300 or s400 with 9.03, then you no longer
+have to worry about adjtimed as HP-UX now has adjtime(2). The rest of you
+will have to wait on 10.0 which will have adjtime(2) and a supported though
+a bit older version of xntpd.
+
+Next, let me explain a bit about how this stuff works on HP-UX's that do not
+have adjtime(2). The directory adjtime contains libadjtime.a and the adjtimed
+daemon. Instead of the adjtime(2) system call, we use a library routine to
+talk to adjtimed thru message queues. Adjtimed munges into /dev/kmem and
+causes the clock to skew properly as needed. PLEASE NOTE that the adjtime
+code provided here is NOT a general replacement for adjtime(2) ... use of
+this adjtime(3)/adjtimed(8) other than with xntpd may yield very odd results.
+
+What to do to get this stuff running ?
+
+ * If you are running an OS less than 10.0 or do not have a s300/s400
+ with 9.03 or better
+ -> cd machines
+ -> vi hpux
+ -> (change -DSYS_HPUX=? to match whatever you are running [7,8,9])
+ -> cd ..
+
+ * Say "make makeconfig"
+
+ * Say "make", sit back for a few minutes.
+
+ * cd authstuff
+ * Say "./authcert < certdata" and check the output. Every line should
+ end with "OK" ... if not, we got trouble.
+ * Now try "./authspeed auth.samplekeys". What we want to
+ remember here is the "authentication delay in CPU time"
+ * cd ..
+
+ * Say "make install"
+
+ * I'd suggest reading the xntp docs about now :-) ... seriously !!
+
+ * One thing I have added to this version of xntpd is a way to select
+ config files if you are sharing /usr/local thru NFS or whatever.
+ If the file /usr/local/etc/xntp.conf happens to be a directory, the
+ files in that directory are searched until a match is found. The
+ rules for a match are:
+
+ 1. Our hostname
+ 2. default.<machine id> (as in default.375 or default.850)
+ 3. default
+
+ * Ok, make sure adjtimed is running (just start it up for now with
+ "/usr/local/etc/adjtimed"). Using -z as an option will get you
+ a usage message.
+
+ * Now start up xntpd and watch it work.
+
+ * Make sure that adjtimed gets started at boot right before xntpd.
+ We do this in /etc/netbsdsrc. They must both run as root !!
+
+Possible problems ?
+
+ * On some 320's and 835's we have had to run adjtimed with "-p 45" or
+ so to get rid of syslog messages about "last adjust did not finish".
+
+ * At 9.0, there is a problem with DIAGMON (patch available from the
+ response center) which causes it to delete the message queue that
+ adjtimed/xntpd use to communicate. (see next note for result)
+
+ * Xntpd has been known to get really ticked off when adjtime() fails
+ which is usually only while running the emulation code on HP-UX.
+ When it gets mad, it usually jumps the clock into never never land.
+ Possible reasons for this are adjtimed being killed or just never
+ started or adjtimed being completely swapped out on a really busy
+ machine (newer adjtimed try to lock themselves in memory to prevent
+ this one).
+
+Anything else ... just drop me a line at ken@sdd.hp.com
+
+Received: from louie.udel.edu by huey.udel.edu id aa14418; 15 Jun 95 9:19 EDT
+Received: from host5.colby.edu (host-05.colby.edu) by host-04.colby.edu with ESMTP (1.37.109.15/Colby 1.1)
+ id AA165442355; Thu, 15 Jun 1995 09:19:16 -0400
+Received: by host5.colby.edu (1.37.109.15/Colby 1.1)
+ id AA056252339; Thu, 15 Jun 1995 09:18:59 -0400
+Date: Thu, 15 Jun 1995 09:18:59 -0400 (EDT)
+From: "Jeff A. Earickson" <jaearick@colby.edu>
+To: Mills@huey.udel.edu
+Subject: More minor bugs in xntp3.4s
+In-Reply-To: <9506150022.aa12727@huey.udel.edu>
+Message-Id: <Pine.HPP.3.91.950615083549.4557A-100000@host5.colby.edu>
+Mime-Version: 1.0
+Content-Type: TEXT/PLAIN; charset=US-ASCII
+
+Dave,
+ After reading the hpux hints file, I realized I didn't install or
+start adjtimed. In the course of doing this, I discovered that:
+
+--> $(TOP) is not defined in adjtime/Makefile, so "make install" can't
+ find the install.sh script.
+
+--> "make install" from the main Makefile never goes into the adjtime
+ directory, so I added the following two lines into the install
+ target of the main Makefile:
+
+ @echo installing from adjtime
+ @cd adjtime && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)" install
+
+This twiddle may not be right for all systems, but it got adjtimed
+installed for me.
+
+ You might also want to add to the hpux hints file that one way to
+fire things up at boot time is to add the following lines to the localrc
+function of /etc/rc:
+
+ #---daemons for Network Time Protocol (version 3.4s)
+ #---note that adjtimed is only needed for HP-UX 9.X, not 10.0
+ #---adjtimed must be running or xntpd won't work right...
+ if [ -x /usr/local/bin/adjtimed ]; then
+ /usr/local/bin/adjtimed -r & echo -n ' adjtimed'
+ if [ -x /usr/local/bin/xntpd ]; then
+ /usr/local/bin/xntpd & echo -n ' xntpd'
+ fi
+ fi
+
+I discovered that the "-r" option of adjtimed is needed to clear out any
+trash from a previous execution of it. Otherwise adjtimed quietly dies
+and leaves xntpd in the lurch...
+
+Thanks for the help.
+
+** Jeff A. Earickson, Ph.D PHONE: 207-872-3659
+** Senior UNIX Sysadmin, Information Technology EMAIL: jaearick@colby.edu
+** Colby College, 4214 Mayflower Hill, FAX: 207-872-3555
+** Waterville ME, 04901-8842
+
+On Thu, 15 Jun 1995 Mills@huey.udel.edu wrote:
+
+> Jeff,
+>
+> Read the hpux file in the hints directory.
+>
+> Dave
+>
+
diff --git a/html/hints/linux b/html/hints/linux
new file mode 100644
index 0000000..b06a36a
--- /dev/null
+++ b/html/hints/linux
@@ -0,0 +1,5 @@
+The kernel PLL interface is broken, I know.
+Update RSN.
+
+ Torsten
+ (duwe@informatik.uni-erlangen.de)
diff --git a/html/hints/mpeix b/html/hints/mpeix
new file mode 100644
index 0000000..83c7241
--- /dev/null
+++ b/html/hints/mpeix
@@ -0,0 +1,50 @@
+HP e3000 MPE/iX NTP Hints - May 29, 2001
+----------------------------------------
+
+NTP was first ported to MPE several years ago, but those diffs were never
+submitted back to the official NTP distribution. For more information about
+that deprecated port, please see http://www.bixby.org/mark/xntpix.html.
+
+NTP was re-ported to MPE in May 2001. What follows are hints learned from
+working with NTP 4.0.99k23. For additional information about NTP on MPE,
+please see http://jazz.external.hp.com/src/hp_freeware/ntp/.
+
+MPE lacks the clock-related APIs expected by NTP, so adjtime(), gettimeofday(),
+and settimeofday() all had to be implemented from scratch by calling
+privileged, undocumented internal OS functions.
+
+Unfortunately the implementation of adjtime() has exposed a sub-second accuracy
+bug when slewing the system time. This bug is documented in SR 5003462838, and
+exists on all current versions of MPE. It has not been fixed at the time of
+this writing. The adjtime() code may possibly need to be altered if/when this
+bug is fixed.
+
+This bug has a side-effect whereby the ntpd daemon will screw up the hardware
+PDC clock time by many minutes if used for continuous clock adjustments or in
+the one-time -q mode. But note that you can safely run ntpd in order to become
+a time server if you include "disable ntp" in the ntp.conf configuration file.
+
+The one-time clock adjustment functionality of ntpdate and ntp_timeset is not
+affected by this bug side-effect. You can safely use these commands to alter
+your system time with reasonable accuracy.
+
+The only reference clock that has been tested on MPE is the local clock. So
+building NTP with --disable-all-clocks --enable-LOCAL_CLOCK is strongly
+recommended.
+
+NTP makes use of Privileged Mode (PM) capability in order to bind to the NTP
+network port (123) and to access the low-level clock functions.
+
+NTP was ported using the gcc compiler. Attempting to use the HP C/iX compiler
+is not recommended and has not been tested.
+
+Please note that NTP is not an HP product and is NOT supported by HP. The best
+place for asking MPE-specific questions about NTP is the HP3000-L mailing list
+at http://raven.utc.edu/Archives/hp3000-l.html or the associated Usenet
+newsgroup of comp.sys.hp.mpe.
+
+The original author of this port is:
+
+Mark Bixby
+HP CSY MPE Internet & Interoperability Engineer
+mark_bixby@hp.com
diff --git a/html/hints/notes-xntp-v3 b/html/hints/notes-xntp-v3
new file mode 100644
index 0000000..ba027f2
--- /dev/null
+++ b/html/hints/notes-xntp-v3
@@ -0,0 +1,119 @@
+Notes for NTP Version 3
+
+This version operates in much the same manner as Version 2 with the
+following changes and additions:
+
+1. The protocol machinery operates in conformance with the RFC1305 NTP
+ Version 3 specification. The most visible characteristic of this
+ version is that the poll intervals for all polls, even selected
+ ones, is significantly increased. This is especially desirable when
+ serving a large client population. This implementation supports
+ previous versions as non-configured peers; for version-2 configured
+ peers a "version 2" keyword should be included on the "peer" line.
+
+2. The configuration file has a new keyword: statfile <file>, where
+ <file> is the name of a statistics file." When present, each clock
+ update generates an entry of the form:
+
+ <day> <sec>.<frac> <addr> <status> <offset> <delay> <disp>
+
+ where <day> is the modified Julian day, <sec>.<frac> is the time of
+ day, <addr> is the peer address and <status> is the peer status.
+ The <offset>, <delay> and <disp> are the measured offset, delay and
+ dispersion, respectively, of the peer clock relative to the local
+ clock. About once per day the current file is closed and a new one
+ created with names <file>.<gen>, where <gen> starts at one and
+ increments for each new generation.
+
+3. A number of additional platforms are supported. See ./Config file
+ for details.
+
+4. A driver for the TrueTime 468DC GOES Synchronized Clock is
+ included. This driver (refclock_goes.c) should also work for other
+ TrueTime radio clocks, since all use the same format.
+
+5. A replacement driver for the Spectracom 8170 WWVB Synchronized
+ Clock is included. This driver (refclock_wwvb.c) (a) does not
+ require a 1-pulse-per-second signal, (b) supports both format 0
+ (original 8170) and format 2 (Netclock/2 and upgraded 8170), (c)
+ can be connected to more than one computer and (d) automatically
+ compensates for all serial baud rates.
+
+6. A driver for the German time/frequency station DCF77 is included.
+ This requires a special STREAMS module.
+
+7. In Version 2 special line-discipline modules were required for the
+ CHU and WWVB drivers. This code continues to work in Version 3,
+ although it is no longer needed for the WWVB driver. However, this
+ code does not work under STREAMS, as used in SunOS 4.1.1.
+ Equivalent STREAMS modules are supplied with Version 3.
+
+8. Support for an external 1-pulse-per-second (pps) signal is
+ provided. The signal is connected to a serial port (see
+ xntpd/ntp_loopfilter.c for details). When present the leading edge
+ of the pulse establishes the on-time epoch within an interval
+ established by the selected radio clock or other NTP time server.
+ Use of the pps is indicated when the tattletale displayed by ntpq
+ changes from "*" to "o".
+
+9. The clock-selection and poll-update procedures have been modified
+ slightly in order to achieve better performance on high speed LANs
+ with compromise in performance on typical WANs.
+
+10. In order to comply with U.S. Commerce Department regulations, the DES
+ encryption routine lib/authdes.c cannot be exported. For exportable
+ versions of this distribution a DES-encrypted version of this routine
+ lib/authdes.c.des is included along with an unencrypted version
+ lib/authdes.c.export, which allows normal operation, but without the
+ NTP authentication feature. Further information is available in the
+ lib/authdes.c.export file.
+
+11. As an alternative to the DES-based authentication mechanism, an
+ implementation of the RSA Message Digest 5 algorithm is provided.
+ (see applicable copyright information in the library files).
+
+12. A driver for the Magnavox MX4200 GPS clock.
+
+13. A STREAMS module which captures carrier-detect data-lead transitions to
+ connect a precision source of 1-pps, yet avoid the ugly overhead in the
+ usual STREAMS processing. See the ppsclock subdirectory.
+
+14. Support for the Apple A/UX operating system and enhanced support for the
+ Hewlet-Packard HP/UX operating system. See the various README and Config
+ files for further information.
+
+See the COPYRIGHT file for authors and copyright information. Note that some
+modules in this distribution contain copyright information that supersedes
+the copyright information in that file.
+
+If I missed something or neglected to give due credit, please advise.
+
+David L. Mills
+University of Delaware
+31 May 1992, amended 23 July 1992, 25 October 1992
+
+Bugs and notes
+
+A bug in the original tty_clk_STREAMS.c module has been fixed.
+
+The poll-interval randomization feature of poll_update (in
+xntpd/ntp_proto.c) has been extended to apply when the poll interval is
+increased, as well as reduced. This spreads the update messages in time
+and helps avoid unpleasant bursts of messages.
+
+In the clock_select algorithm the peers selected for combining are
+limited to those survivors at the lowest stratum, not the entire list.
+This helps avoid whiplash when large numbers of peers are at the same
+stratum.
+
+The number formerly displayed by ntpq as "compliance" is now the time
+constant of integration.
+
+The DNS resolver xntpd/ntp_intres.c is now integrated into xntpd, making
+configuration of multiple hosts easier.
+
+System and peer event are now written to the system log at priority
+LOG_INFO.
+
+The leap-second code was fixed to avoid broadcasting leap warnings on
+all except the last day of June and December.
diff --git a/html/hints/parse b/html/hints/parse
new file mode 100644
index 0000000..d252351
--- /dev/null
+++ b/html/hints/parse
@@ -0,0 +1,105 @@
+Compilation:
+ Usual thing: rm -f Config.local ; make for vanilla
+ make refconf for reference clock (e. g. DCF77)
+
+Directory contents:
+
+ hints/PARSE - this file
+
+ xntpd/refclock_parse.c
+ - reference clock support for DCF77/GPS in xntp
+ parse/parse.c
+ - Reference clock data parser framework
+ parse/parse_conf.c
+ - parser configuration (clock types)
+ parse/clk_meinberg.c
+ - Meinberg clock formats (DCF U/A 31, PZF 535, GPS166)
+ parse/clk_schmid.c
+ - Schmid receiver (DCF77)
+ parse/clk_rawdcf.c
+ - 100/200ms pulses via 50 Baud line (DCF77)
+ parse/clk_dcf7000.c
+ - ELV DCF7000 (DCF77)
+ parse/clk_trimble.c
+ - Trimble SV6 GPS receiver
+
+ If you want to add new clock types please check
+ with kardel@informatik.uni-erlangen.de. These files
+ implement the conversion of RS232 data streams into
+ timing information used by refclock_parse.c which is
+ mostly generic except for NTP configuration constants.
+
+ parse/Makefile.kernel
+ - *SIMPLE* makefile to build a loadable STREAMS
+ module for SunOS 4.x / SunOS 5.x systems
+
+ parse/parsestreams.c
+ - SUN Streams module (loadable) for radio clocks
+ This streams module is designed for SunOS 4.1.X.
+
+ parse/parsesolaris.c
+ - SUN Streams module (loadable) for radio clocks.
+ This streams module is designed for SunOS 5.x
+ Beware this is still new - so it might crash
+ your machine (we have seen it working, though).
+
+ parse/parsetest.c
+ - simple test program for STREAMS module. Its so simple,
+ that it doesn't even set TTY-modes, thus they got to
+ be correct on startup - works for Meinberg receivers
+
+ parse/testdcf.c
+ - test program for raw DCF77 (100/200ms pulses)
+ receivers
+
+ include/parse.h - interface to "parse" module and more
+ include/parse_conf.h
+ - interface to "parse" configuration
+
+ include/sys/parsestreams.h
+ - STREAMS specific definitions
+
+ scripts/support
+ - scripts (perl & sh) for statistics and rc startup
+ the startup scripts are used in Erlangen for
+ starting the daemon on a variety of Suns and HPs
+ and for Reference Clock startup on Suns
+ These scripts may or may not be helpful to you.
+
+Supported clocks:
+ Meinberg DCF U/A 31
+ Meinberg PZF535/TCXO (Software revision PZFUERL 4.6)
+ Meinberg PZF535/OCXO (Software revision PZFUERL 4.6)
+ Meinberg GPS166 (Software version for Uni-Erlangen)
+ ELV DCF7000 (not recommended - casual/emergency use only)
+ Conrad DCF77 receiver (email: time@informatik.uni-erlangen.de)
+ + level converter
+ TimeBrick (email: time@informatik.uni-erlangen.de)
+ Schmid Receiver Kit
+ Trimble SV6 GPS receiver
+
+Addresses:
+ Meinberg Funkuhren
+ Auf der Landwehr 22
+ 31812 Bad Pyrmont
+ Germany
+ Tel.: 05281/20 18
+ FAX: 05281/60 81 80
+
+ ELV Kundenservice
+ Postfach 1000
+ 26787 Leer
+ Germany
+ Tel.: 0491/60 08 88
+
+ Walter Schmidt
+ Eichwisrain 14
+ 8634 Hombrechtikon
+ Switzerland
+
+If you have problems mail to:
+
+ time@informatik.uni-erlangen.de
+
+We'll help (conditions permitting)
+
diff --git a/html/hints/refclocks b/html/hints/refclocks
new file mode 100644
index 0000000..17e7643
--- /dev/null
+++ b/html/hints/refclocks
@@ -0,0 +1,35 @@
+This is a short overview for the reference clocks currently supported
+by xntp V3. (Ultimate wisdom can be obtained from xntpd/refclock_*.c
+this file was derived from that information - unfortunately some comments
+in the files tend to get stale - so use with caution)
+
+Refclock address Type
+127.127.0.x no clock (fails to configure)
+127.127.1.x local clock - use local clock as reference
+127.127.2.x no clock (fails to configure)
+127.127.3.x PSTI 1010/1020 WWV Clock
+127.127.4.x SPECTRACOM WWVB receiver 8170 and Netclock/2
+127.127.5.x Kinimetric Truetime 468-DC GOES receiver
+127.127.6.x IRIG audio decode (Sun & modified BSD audio driver)
+127.127.7.x CHU Timecode (via normal receiver & Bell 103 modem)
+127.127.8.x PARSE (generic driver for a bunch of DCF/GPS clocks
+ can be extended for other clocks too)
+ 8.0-3 Meinberg PZF535/TCXO
+ 8.4-7 Meinberg PZF535/OCXO
+ 8.8-11 Meinberg DCF U/A 31
+ 8.12-15 ELV DCF7000
+ 8.16-19 Walter Schmid DCF receiver (Kit)
+ 8.20-23 Conrad DCF77 receiver module + level converter (Kit)
+ 8.24-27 TimeBrick (limited availability ask
+ time@informatik.uni-erlangen.de)
+ 8.28-31 Meinberg GPS166
+ 8.32-35 Trimble SV6 GPS receiver
+127.127.9.x MX4200 GPS receiver
+127.127.10.x Austron 2201A GPS Timing Receiver
+127.127.11.x Kinemetrics Truetime OM-DC OMEGA Receiver
+127.127.12.x KSI/Odetecs TPRO-S IRIG-B / TPRO-SAT GPS
+127.127.13.x Leitch: CSD 5300 Master Clock System Driver
+127.127.14.x MSFEES
+127/127.15.x TrueTime GPS/TM-TMD
+127.127.16.x Bancomm GPS/IRIG Ticktock
+127.127.17.x Datum Programmable Time System
diff --git a/html/hints/rs6000 b/html/hints/rs6000
new file mode 100644
index 0000000..8561ac2
--- /dev/null
+++ b/html/hints/rs6000
@@ -0,0 +1,56 @@
+15.7.1993
+xntp3 compiles now again on AIX. I have disabled prototyping and added
+the switch -D_NO_PROTO which disables prototyping in the system include
+files.
+
+Matthias Ernst maer@nmr.lpc.ethz.ch
+--------------------------------------------------------------------------------
+Xntp version 3 now support the cc compiler for AIX.
+The Config.aix will now use cc by default. You can still compile xntp
+with the bsd compiler by changing "COMP= cc" to "COMP= bsdcc" and
+and removing the "-DSTUPID_SIGNAL" option from the "DEFS" option.
+
+xntp and tickadj was also modified so that the value of tickadj is read
+form the kernel and can be set by tickadj. For now I would not set
+tickadj below 40 us.
+
+Bill Jones
+jones@chpc.utexas.edu
+-------------------------------------------------------------------------------
+
+This is a modified version of xntp version 3 for the RS6000. It works for
+AIX 3.2 and these are the same changes as have been applied tothe version 2
+implementation of xntp. It works fine for us but I have not tested all of
+the features, especially the local clock support for the RS6000 is not tested
+at all.
+
+Matthias Ernst, ETH-Zuerich, Switzerland - maer@nmr.lpc.ethz.ch
+
+--------------------------------------------------------------------------------
+
+Here the original README.rs6000 for the version 2 implementation:
+
+A hacked version of xntp for the IBM RS/6000 under AIX 3.1 can be found
+in xntp.rs6000.tar.Z. [ if still available at all - Frank Kardel 93/12/3 ]
+
+This will not work on older versions of AIX due to a kernel bug; to find
+out whether you have the kernel bug, compile and run testrs6000.c (see
+comments in the code for instructions).
+
+xntp and testrs6000 require "bsdcc" to compile. This is simply another
+entry point into the xlc compiler with various options set for BSD
+compatibility. If your system does not have bsdcc, do the following:
+
+link /bin/bsdcc to /bin/xlc
+
+put the following into /etc/xlc.cfg:
+
+* BSD compatibility
+bsdcc: use = DEFLT
+ crt = /lib/crt0.o
+ mcrt = /lib/mcrt0.o
+ gcrt = /lib/gcrt0.o
+ libraries = -lbsd, -lc
+ proflibs = -L/lib/profiled,-L/usr/lib/profiled
+ options = -H512,-T512, -qlanglvl=extended, -qnoro, -D_BSD, -D_NONSTD_TYPES, -D_NO_PROTO, -tp,-B/lib/
+
diff --git a/html/hints/sco.html b/html/hints/sco.html
new file mode 100644
index 0000000..d5d1933
--- /dev/null
+++ b/html/hints/sco.html
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>SCO Unix hints</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>SCO Unix hints</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <h4>Older SCO Unix versions</h4>
+ <p>NTP 4.0.x does not run on SCO Unix prior to version 3.2.5.0.0. If you need NTP on an older SCO Unix system and don't mind to modify your kernel, use 3.5.91 which has patches for SCO Unix 3.2.4.x. Apply the kernel modifications as described in <a href="http://www.echelon.nl/en/ntp/sco3-recipe.html">XNTP on SCO 3.2.4.2</a>.</p>
+ <h4>Compiling NTP</h4>
+ <p>Delete the old SCO supplied NTP programs using the &quot;custom&quot; utility. Run the NTP configure program with CFLAGS=&quot;-b elf -K <i>processor-type</i>&quot; for best results.</p>
+ <h4>Running NTP</h4>
+ <p>Run &quot;tickadj -As&quot; after every reboot to set the variables &quot;clock_drift&quot; and &quot;track_rtc&quot; to the right values.</p>
+ <p>Run &quot;ntpd&quot; with a high negative nice-value, i.e. &quot;nice --19 ntpd&quot; for best results.</p>
+ <h4>More information</h4>
+ <p>More information on the way SCO Unix and NTP interact can be found in <a href="http://www.echelon.nl/en/ntp/ntp-on-sco.html">NTP on SCO Unix</a>, which includes links to precompiled versions of NTP.</p>
+ <p>Kees Hendrikse, January 1999</p>
+ </body>
+
+</html>
diff --git a/html/hints/sgi b/html/hints/sgi
new file mode 100644
index 0000000..5e4f7de
--- /dev/null
+++ b/html/hints/sgi
@@ -0,0 +1,74 @@
+adjtime, tick and tickadj:
+--------------------------
+
+The SGI value for HZ is 100 under Irix 4, with the system clock running
+in nominal mode (ftimer off), so the value for tick is 10000 usec.
+Tickadj is a bit more tricky because of the behaviour of adjtime(),
+which seems to try to perform the correction over 100-200 seconds, with
+a rate limit of 0.04 secs/sec for large corrections. Corrections of
+less than 0.017 seconds generally complete in less than a second,
+however.
+
+Some measured rates are as follows:
+
+ Delta Rate (sec/sec)
+
+ > 1 0.04
+ 0.75 0.04
+ 0.6 0.004
+ 0.5 0.004
+ 0.4 0.0026
+ 0.3 0.0026
+ 0.2 0.0013
+ 0.1 0.0015
+ 0.05 0.0015
+ 0.02 0.0003
+ 0.01 0.015
+Strange. Anyway, since adjtime will complete adjustments of less than
+17msec in less than a second, whether the fast clock is on or off, I
+have used a value of 150usec/tick for the tickadj value.
+
+Fast clock:
+-----------
+
+I get smoother timekeeping if I turn on the fast clock, thereby making
+the clock tick at 1kHz rather than 100Hz. With the fast clock off, I
+see a sawtooth clock offset with an amplitude of 5msec. With it on,
+the amplitude drops to 0.5msec (surprise!). This may be a consequence
+of having a local reference clock which spits out the time at exactly
+one-second intervals - I am probably seeing sampling aliasing between
+that and the machine clock. This may all be irrelevant for machines
+without a local reference clock. Fiddling with the fast clock doesn't
+seem to compromise the above choices for tick and tickadj.
+
+I use the "ftimer" program to switch the fast clock on when the system
+goes into multiuser mode, but you can set the "fastclock" flag in
+/usr/sysgen/master.d/kernel to have it on by default. See ftimer(1).
+
+timetrim:
+---------
+
+Irix has a kernel variable called timetrim which adjusts the system
+time increment, effectively trimming the clock frequency. Xntpd could
+use this rather than adjtime() to do it's frequency trimming, but I
+haven't the time to explore this. There is a utility program,
+"timetrim", in the util directory which allows manipulation of the
+timetrim value in both SGI and xntpd native units. You can fiddle with
+default timetrim value in /usr/sysgen/master.d/kernel, but I think
+that's ugly. I just use xntpd to figure out the right value for
+timetrim for a particular CPU and then set it using "timetrim" when
+going to multiuser mode.
+
+Serial I/O latency:
+-------------------
+
+If you use a local clock on an RS-232 line, look into the kernel
+configuration stuff with regard to improving the input latency (check
+out /usr/sysgen/master.d/[sduart|cdsio]). I have a Kinemetrics OM-DC
+hooked onto /dev/ttyd2 (the second CPU board RS-232 port) on an SGI
+Crimson, and setting the duart_rsrv_duration flag to 0 improves things
+a bit.
+
+
+12 Jan 93
+Steve Clift, CSIRO Marine Labs, Hobart, Australia (clift@ml.csiro.au)
diff --git a/html/hints/solaris-dosynctodr.html b/html/hints/solaris-dosynctodr.html
new file mode 100644
index 0000000..89a12b2
--- /dev/null
+++ b/html/hints/solaris-dosynctodr.html
@@ -0,0 +1,321 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+
+
+<!-- Sun Template V4.0 9/9/98 -->
+<HTML>
+<HEAD>
+<TITLE>Symptoms and Resolutions Article 19195</title><link href="scripts/style.css" type="text/css" rel="stylesheet">
+
+<META NAME="GENERATOR" CONTENT="Sun Microsystems, Inc.">
+<META HTTP-EQUIV="content-type" CONTENT="text/html;charset=iso-8859-1">
+
+<!-- INSERT YOUR META TAGS HERE -->
+
+<META NAME="PUBLISHED_DATE" CONTENT="">
+<META NAME="KEYWORDS" CONTENT="">
+<META NAME="DESCRIPTION" CONTENT="">
+
+<!-- END META TAGS -->
+
+<LINK REL="Stylesheet" TYPE="text/css" HREF="/style.css" TITLE="Style">
+
+</HEAD>
+<!--stopindex-->
+<BODY BGCOLOR="#FFFFFF" LINK="#666699" ALINK="#FFFFFF">
+
+
+<TABLE WIDTH="623" BORDER="0" CELLSPACING="0" CELLPADDING="0">
+ <TR>
+ <TD COLSPAN="2" VALIGN="TOP" WIDTH="623">
+ <IMG BORDER="0" SRC="/images/homebuy.gif" WIDTH="149" HEIGHT="32" ALT="Home * Buy * My Sun(sm)" USEMAP="#lefttop"><IMG BORDER="0" SRC="/images/globalnavbar.gif" WIDTH="474" HEIGHT="32" ALT="sun.com Global Sections" USEMAP="#topnav"></TD>
+ </TR>
+ <TR>
+ <TD COLSPAN="2" VALIGN="TOP" WIDTH="623">
+
+ <!-- TITLEBAR IMAGE: INSERT CUSTOMIZED TITLEBAR IMAGE BELOW -->
+
+ <A HREF="http://www.sun.com/"><IMG BORDER="0" SRC="/images/sunlogo.gif" WIDTH="149" HEIGHT="72" ALT="Sun Microsystems"></A><IMG BORDER="0" SRC="/images/titlebar/doc.title.gif" WIDTH="474" HEIGHT="72"></TD>
+ </TR>
+ <!-- Begin Search Elements -->
+ <TR VALIGN="top">
+ <TD BGCOLOR="#666699">
+ <TABLE BORDER="0" WIDTH="157" CELLSPACING="0" CELLPADDING="0">
+ <TR>
+ <TD BGCOLOR="#666699" COLSPAN="2" WIDTH="157" VALIGN="TOP"><IMG BORDER="0" SRC="/images/search/contract/search1.gif" WIDTH="157" HEIGHT="16" ALT="Search SunSolve"></TD>
+ </TR>
+ <TR>
+ <TD VALIGN="top" ALIGN="center" WIDTH="141" BGCOLOR="#666699"><FORM ACTION="search.pl" METHOD="POST"><FONT SIZE="2"><INPUT TYPE="text" NAME="zone_32" SIZE="14"></FONT><input type=hidden name=mode value=results><BR>
+<INPUT TYPE="image" SRC="/images/search/contract/search5.gif" BORDER="0" NAME="Search"><IMG SRC="/images/cg_clear.gif" ALT="" WIDTH="2" HEIGHT="1" BORDER="0" HSPACE="29" VSPACE="0"><BR>
+
+<A HREF="search.pl?mode=advanced"><IMG BORDER="0" SRC="/images/search/contract/search3.gif" WIDTH="144" HEIGHT="16" ALT="Advanced Search"></A><BR>
+
+<A HREF="search.pl?mode=product"><IMG SRC="/images/search/contract/search4.gif" BORDER="0" ALT="Product Search" WIDTH="144" HEIGHT="19"></A><BR>
+
+<A HREF="show.pl?target=help/search_tips"><IMG SRC="/images/search/contract/search6.gif" BORDER="0" ALT="Search Tips" WIDTH="144" HEIGHT="27"></A></TD>
+ <TD ALIGN="right"><IMG SRC="/images/search/contract/search2.gif" ALT="" WIDTH="13" HEIGHT="117" BORDER="0"></TD>
+ </TR>
+ <!-- End Search Elements -->
+ <!-- Begin User Personalization (Must limit to 10 Characters)-->
+ <TR>
+ <TD COLSPAN="2"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="157"><TR><TD COLSPAN="3" ALIGN="right"><IMG SRC="/images/home_con/welcom_1.gif" ALT="" WIDTH="156" HEIGHT="4" BORDER="0"></TD></TR>
+ <TR><TD BGCOLOR="#333366"><IMG SRC="/images/home_con/welcom_2.gif" ALT="" WIDTH="17" HEIGHT="19" BORDER="0"></TD><TD BGCOLOR="#333366" VALIGN="middle"><NOBR><FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" COLOR="#99CC33" SIZE="-2">sopko</FONT></NOBR></TD><TD BGCOLOR="#333366" ALIGN="right"><A HREF="edit-user-form.pl?viewmode=contractuser"><IMG SRC="/images/home_con/welcom_3.gif" ALT="Edit" WIDTH="45" HEIGHT="19" BORDER="0"></A></TD></TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <!-- End User Personalization -->
+
+ <TR>
+ <TD COLSPAN="2" ALIGN="right" VALIGN="top" WIDTH="157" BGCOLOR="#666699"><IMG BORDER="0" SRC="/images/ssolvecontents.gif" WIDTH="157" HEIGHT="37" ALT="Contents Of SunSolve"><BR>
+
+
+
+
+
+ <!-- PILLS: CHANGE THE PILL FOR CURRENT SECTION TO THE HIGHLIGHTED PILL -->
+ <!-- Beginning of Nav area -->
+<A HREF="show.pl?target=patches/patch-access" onmouseover="window.status='All Public Patches'; return true" onmouseout="window.status=''; return true">
+<IMG BORDER="0" SRC="/images/nav/p1.gif" WIDTH="157" HEIGHT="19" ALT="All Public Patches"></A><BR>
+<A HREF="suncourier.pl" onmouseover="window.status='Submit a Service Order'; return true" onmouseout="window.status=''; return true">
+<IMG BORDER="0" SRC="/images/nav/p5.gif" WIDTH="157" HEIGHT="19" ALT="Submit a Service Order"></A><BR>
+<A HREF="show.pl?target=resources/tools" onmouseover="window.status='Diagnostic Tools'; return true" onmouseout="window.status=''; return true">
+<IMG BORDER="0" SRC="/images/nav/p4.gif" WIDTH="157" HEIGHT="19" ALT="Diagnostic Tools"></A><BR>
+<A HREF="show.pl?target=help/collections" onmouseover="window.status='Support Docs.'; return true" onmouseout="window.status=''; return true">
+<IMG BORDER="0" SRC="/images/nav/cp2.gif" WIDTH="157" HEIGHT="19" ALT="Support Docs."></A><BR>
+<A HREF="show.pl?target=resources/y2k" onmouseover="window.status='Y2K Central'; return true" onmouseout="window.status=''; return true">
+<IMG BORDER="0" SRC="/images/nav/p3.gif" WIDTH="157" HEIGHT="19" ALT="Y2K Central"></A><BR>
+<A HREF="show.pl?target=security/sec" onmouseover="window.status='Security Information'; return true" onmouseout="window.status=''; return true">
+<IMG BORDER="0" SRC="/images/nav/p2.gif" WIDTH="157" HEIGHT="19" ALT="Security Information"></A><BR>
+<br><table cellpadding="0" cellspacing="0" border="0" width="157">
+<tr><td width="8">&nbsp;</td><td width="149">
+<table cellpadding="0" cellspacing="0" border="0">
+<BR><tr><td><BR><img src="/images/line.gif" alt="------" width="140" height="11" border="0"><br>
+ <A HREF="mark.pl"
+ onmouseover="window.status='Marked Docs.';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">Marked Docs.</FONT></A><BR>
+ <A HREF="notify.pl"
+ onmouseover="window.status='Notifications';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">Notifications</FONT></A><BR>
+ <A HREF="/plain-cgi/show.pl?target=home_con"
+ onmouseover="window.status='Low Graphics';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">Low Graphics</FONT></A><BR>
+ <A HREF="show.pl?target=link"
+ onmouseover="window.status='SunSolve Servers';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">SunSolve Servers</FONT></A><BR>
+ <A HREF="show.pl?target=about_sunsolve"
+ onmouseover="window.status='About SunSolve';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">About SunSolve</FONT></A><BR>
+ <A HREF="feedback.pl"
+ onmouseover="window.status='Contact Us';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">Contact Us</FONT></A><BR>
+ <A HREF="show.pl?target=help/sitemap"
+ onmouseover="window.status='Site Map';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">Site Map</FONT></A><BR>
+ <A HREF="show.pl?target=article/article"
+ onmouseover="window.status='Articles';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">Articles</FONT></A><BR>
+ <A HREF="show.pl?target=home_con"
+ onmouseover="window.status='Home';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">Home</FONT></A><BR>
+ <A HREF="show.pl?target=help/faq"
+ onmouseover="window.status='Help';return true"
+ onmouseout="window.status='';return true">
+ <font class="locallink" color="#dddddd">Help</FONT></A><BR>
+<br></td></tr></table></td></tr></table>
+<!-- End of Nav area -->
+
+ </FORM>
+ <br><br><!-- some spacers -->
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ <TD VALIGN="TOP" WIDTH="466">
+
+
+ <!--startindex-->
+ <!-- ============ -->
+ <!-- MAIN CONTENT -->
+ <!-- ============ -->
+
+
+
+<table width=100% cellpadding=16 cellspacing=0 border=0>
+ <tr>
+<td width=100% valign=top>
+<CENTER><FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" SIZE="2">
+[&nbsp;<a href="retrieve.pl?type=0&doc=srdb%2F19195&display=plain">Printer Friendly Page</a>&nbsp;]
+[&nbsp;<b>Was this document useful? <a href="retrieve.pl?type=0&doc=srdb/19195&vote=yes">Yes</a> or <a href="retrieve.pl?type=0&doc=srdb/19195&vote=no">No</a></b>&nbsp;]<br>[&nbsp;<a href="notify.pl?action=add&doc=srdb%2F19195&type=synopsis">Notify if Document Changes</a>&nbsp;]
+[&nbsp;<a href="mark.pl?action=add&doc=srdb%2F19195&type=0">Mark Document for Download</a>&nbsp;]<br>[&nbsp;<a href="notify.pl">View/Edit Notifications</a>&nbsp;]
+[&nbsp;<a href="mark.pl">View/Edit Marked Documents</a>&nbsp;]<br></FONT></CENTER><br>
+ <SCRIPT Language="JavaScript">
+ <!-- Hide javascript from older browsers
+ function jump()
+ {
+ var ctl = document.docform.jumplist;
+ location.href = ctl.options[ctl.selectedIndex].value;
+ }
+ // End hiding contents -->
+ </SCRIPT>
+<a name="top">
+<form name="docform"><div align=center><font size=2> Jump to <select name="jumplist" size=1 onchange="jump();"></font><option value="#Hardware">Hardware</option>
+<option value="#Product">Product</option>
+<option value="#Product-Area">Product Area</option>
+<option value="#Synopsis">Synopsis</option>
+<option value="#Problem-Description">Problem Description</option>
+<option value="#Document-Content">Document Content</option>
+<option value="#Problem-Solution">Problem Solution</option>
+<option value="#SRDB-ID">SRDB ID</option>
+<option value="#OS">OS</option>
+</select></div></form>
+<table width=100% cellpadding=2 cellspacing=0 border=0>
+<tr bgcolor=#666699><td><font size=2 color=#ffffff><b>SRDB ID</b></font></td>
+<td bgcolor=#ffffff><font size=2>&nbsp;</font></td>
+<td><font size=2 color=#ffffff><b>Synopsis</b></font></td>
+<td bgcolor=#ffffff><font size=2>&nbsp;</font></td>
+<td><font size=2 color=#ffffff><b>Date</b></font></td>
+</tr>
+<tr bgcolor=#CCCCE7><td><font size=2><b>19195</b></font></td>
+<td bgcolor=#ffffff><font size=2>&nbsp;</font></td>
+<td><font size=2><b>Upgraded to 2.6, using xntpd, but the system clock is drifting. Worked fine</b></font></td>
+<td bgcolor=#ffffff><font size=2>&nbsp;</font></td>
+<td><font size=2><b>4 Sep 1999</b></font></td>
+</tr>
+</table><br clear>
+<table width=100% cellpadding=2 cellspacing=0 border=0><tr bgcolor=#999999>
+<td><font size=2 color=#ffffff><b><a name=Problem-Description>Problem Description</a></b></font></td>
+<td align=right><b><a href="#top"><font size=2 color=#ffffff>Top</font></a></b></td></tr></table>
+<pre>Ever since upgrading to Solaris 2.6, the system clock has been drifting and
+there are messages like 'synchronisation lost', 'Previous time adjustment
+didn''t complete' and 'time reset (step)' a lot in the /var/adm/messages
+file. The system either was previously working fine with the freeware
+xntpd or the configuration was copied from another system that was
+using the freeware version.
+-- 23-Apr-99 08:22 US/Eastern --</pre><table width=100% cellpadding=2 cellspacing=0 border=0><tr bgcolor=#999999>
+<td><font size=2 color=#ffffff><b><a name=Problem-Solution>Problem Solution</a></b></font></td>
+<td align=right><b><a href="#top"><font size=2 color=#ffffff>Top</font></a></b></td></tr></table>
+<pre>The common lore for setting up xntpd on Solaris using
+the freeware version included the warning to set the
+kernel variable <font color=red>dosynctodr</font> to 0 in the /etc/system
+file thus: set <font color=red>dosynctodr</font>=0
+
+When using NTP on Solaris 2.6 or later, the kernel
+variable MUST be left at the default value of 1. Prior
+to 2.6 this variable controlled whether or not to rein
+in the softclock using the hardware clock, with the result
+that NTP and the hardware clock would fight for control of
+the soft clock; thus before 2.6 you had to set <font color=red>dosynctodr</font>
+to 0. At 2.6, every system call that adjusts the softclock
+also sets the hard clock, thus while NTP controls the soft
+clock, the hard clock is also controlled. Setting
+<font color=red>dosynctodr</font> to 0 reverts the behavior back to the pre 2.6
+defaulkt behavior, having exactly the opposite effect
+as that intended.
+
+Do not set <font color=red>dosynctodr</font> to 0.</pre><table width=100% cellpadding=2 cellspacing=0 border=0>
+<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Product-Area>Product Area</a></b></font></td>
+<td bgcolor=#cccccc valign=top width=75%><font size=2>Bundled Network</font></td></tr>
+<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Product>Product</a></b></font></td>
+<td bgcolor=#cccccc valign=top width=75%><font size=2>NTP</font></td></tr>
+<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=OS>OS</a></b></font></td>
+<td bgcolor=#cccccc valign=top width=75%><font size=2>Solaris 2.6</font></td></tr>
+<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Hardware>Hardware</a></b></font></td>
+<td bgcolor=#cccccc valign=top width=75%><font size=2>Ultra 2</font></td></tr>
+<tr><td bgcolor=#999999 valign=top width=25%><font color=#ffffff size=2><b><a name=Document-Content>Document Content</a></b></font></td>
+<td bgcolor=#cccccc valign=top width=75%><font size=2>with freeware xntpd.</font></td></tr>
+</table><br clear>
+<font size=2><a href="#top">Top</a></font><br><br>
+</td></tr></table>
+
+ <!-- =================== -->
+ <!-- END OF MAIN CONTENT -->
+ <!-- =================== -->
+ <!--stopindex-->
+
+ <!-- DON'T CHANGE INFORMATION OTHER THAN titlebar BELOW THIS LINE -->
+
+ <!-- Altered Table Structure from Template to format properly with new design -->
+ </TD>
+ </TR>
+ <TR>
+ <TD>&nbsp;</TD>
+ <TD VALIGN="top">
+ <center>
+ <IMG SRC="/images/cg_grey_line.gif" ALT="" WIDTH="466" HEIGHT="2" BORDER="0"><BR>
+ <IMG SRC="/images/cg_clear.gif" ALT="" WIDTH="1" HEIGHT="2" BORDER="0" HSPACE="0" VSPACE="4">
+ </center>
+ <CENTER>
+ <FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" SIZE="2">
+ [ <A HREF="edit-user-form.pl?viewmode=contractuser">Edit Account</A> ]
+ [ <A HREF="show.pl?target=patches/patch-access">Patches</A> ]
+ [ <A HREF="suncourier.pl">Submit a Service Order</A> ]<br>
+ [ <A HREF="show.pl?target=resources/tools">Diagnostic Tools</A> ]
+ [ <A HREF="show.pl?target=help/collections">Support Docs.</A> ]
+ [ <A HREF="show.pl?target=resources/y2k">Y2K Central</A> ]
+ [ <A HREF="show.pl?target=security/sec">Security Information</A> ] <br>
+ [ <A HREF="show.pl?target=link">SunSolve Servers </A> ]
+ [ <A HREF="show.pl?target=about_sunsolve">About SunSolve</A> ]
+ [ <A HREF="feedback.pl">Contact Us</A> ]
+ [ <A HREF="show.pl?target=help/sitemap">Site Map</A> ]
+ [ <A HREF="show.pl?target=article/article">Articles</A> ]
+ [ <A HREF="show.pl?target=home_con">Home</A> ]
+ [ <A HREF="show.pl?target=help/faq">Help</A> ]
+ </FONT>
+ </CENTER>
+
+<!-- MAPS -->
+<MAP NAME="lefttop">
+<AREA SHAPE="rect" HREF="http://www.sun.com/MySun/" ALT="My Sun" COORDS="89,0 149,32">
+<AREA SHAPE="rect" HREF="show.pl?target=home_con" ALT="Home" COORDS="0,0 42,32">
+<AREA SHAPE="rect" HREF="http://www.sun.com/sales/" ALT="Buy" COORDS="54,0 78,32">
+</MAP>
+
+
+<MAP NAME="topnav">
+<AREA SHAPE="rect" HREF="http://www.sun.com/java/" ALT="Java Technologies" COORDS="4,0,67,32">
+<AREA SHAPE="rect" HREF="http://www.sun.com/products-n-solutions/" ALT="Products and Solutions" COORDS="74,0,141,32">
+<AREA SHAPE="rect" HREF="http://www.sun.com/service/" ALT="Support, Education, and Consulting" COORDS="148,0,249,32">
+<AREA SHAPE="rect" HREF="http://www.sun.com/tech/" ALT="Technology and Research" COORDS="261,0,324,32">
+<AREA SHAPE="rect" HREF="http://www.sun.com/developers/developers.html" ALT="For Developers" COORDS="334,0,396,32">
+<AREA SHAPE="rect" HREF="http://www.sun.com/corporateoverview/" ALT="Corporate Information" COORDS="406,0,482,32">
+</MAP>
+
+<!-- INSERT titlebar HREFS BELOW -->
+<MAP NAME="titlebar">
+<!-- LINK TO SEC HOME Removed because no longer needed on this template -->
+<AREA SHAPE="rect" HREF="/visual/home/" ALT="SunSolve Online(tm)" COORDS="0,21,215,51"> <!-- LINK TO CURRENT PILL HOME -->
+</MAP>
+
+
+<!-- begin copyright notice -->
+
+<BR>
+<CENTER>
+<FONT FACE="Geneva, Helvetica, Arial, SunSans-Regular" COLOR="#999999" SIZE="2">
+<br>
+Copyright 1994-1999 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.
+<br>
+All rights reserved.
+<a href="http://www.sun.com/share/text/SMICopyright.html">Legal Terms</a>.
+<a href="http://www.sun.com/privacy/">Privacy Policy</a>.
+</font>
+</CENTER>
+
+<!-- end copyright notice -->
+
+ </TD>
+ </TR>
+</TABLE>
+
+</BODY>
+</HTML>
+
diff --git a/html/hints/solaris.html b/html/hints/solaris.html
new file mode 100644
index 0000000..4b83862
--- /dev/null
+++ b/html/hints/solaris.html
@@ -0,0 +1,236 @@
+<HTML>
+<HEAD>
+<TITLE>Solaris hints and kinks</title><link href="scripts/style.css" type="text/css" rel="stylesheet">
+
+</HEAD>
+<BODY>
+Information on compiling and executing ntpd under Solaris.
+<BR>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->27-Jan-2014 05:31<!-- #EndDate -->
+ UTC,
+John Hawkinson,
+<! -- This is deliberately not a mailto -- > &lt;jhawk@MIT.EDU&gt;
+</p>
+<P>
+If you're not running Solaris 2.5.1 or later, it is likely
+that you will have problems; upgrading would be a really good plan.
+<P>
+<H3>All Solaris versions</H3>
+<P>
+ We have a report that says starting with Solaris 2.6 we should leave
+ <I>dosynctodr</I> alone.
+ <A HREF="solaris-dosynctodr.html">Here is the report</A>.
+<P>
+Proper operation of ntp under Solaris may require setting the kernel
+variable <I>dosynctodr</I> to zero (meaning "do not synchronize the clock
+to the hardware time-of-day clock"). This can be done with the
+tickadj utility:
+<BLOCKQUOTE><TT>
+tickadj -s
+</TT></BLOCKQUOTE>
+If you prefer, it can also be done with the native Solaris kernel debugger:
+<BLOCKQUOTE><TT>
+echo dosynctodr/W0 | adb -k -w /dev/ksyms /dev/mem
+</BLOCKQUOTE></TT>
+<P>
+Or, it can also be set by adding a line to /etc/system:
+<BLOCKQUOTE><TT>
+set dosynctodr = 0
+</BLOCKQUOTE></TT>
+<P>
+Instead of the <I>tick</I> kernel variable, which many operating
+systems use to control microseconds added to the system time every
+clock tick (c.f. <A HREF="#frequency_tolerance">Dealing
+with Frequency Tolerance Violations</A>), Solaris has the variables
+<I>nsec_per_tick</I> and <I>usec_per_tick</I>.
+<P>
+<I>nsec_per_tick</I> and <I>usec_per_tick</I> control the number of
+nanoseconds and microseconds, respectively, added to the system clock
+each clock interrupt. Enterprising souls may set these based on
+information collected by ntpd in the <CODE>/etc/ntp.drift</CODE> file
+to correct for individual hardware variations.
+<P>
+On UltraSPARC systems, <I>nsec_per_tick</I> and <I>usec_per_tick</I>
+are ignored in favor of the <I>cpu_tick_freq</I> variable, which
+should be automatically be determined by the PROM in an accurate
+fashion.
+<P>
+In general, the same ntp binaries should not be used across multiple
+operating system releases. There is enough variation in the core operating
+system support for timekeeping that a rebuild of ntpd for the idiosyncracies
+of your specific operating system version is advisable.
+<P>
+It is recommended that ntp be started via a script like <A
+HREF="solaris.xtra.S99ntpd">this one</A>, installed in
+<CODE>/etc/init.d/ntpd</CODE> with a symbol link from
+<CODE>/etc/rc2.d/S99ntpd</CODE>.
+
+<a id="frequency_tolerance" />
+<h4>Dealing with Frequency Tolerance Violations (<tt>tickadj</tt> and
+Friends)</h4>
+ The NTP Version 3 specification RFC-1305 calls for a maximum
+ oscillator frequency tolerance of +-100 parts-per-million (PPM), which is
+representative of those components suitable for use in relatively
+inexpensive workstation platforms. For those platforms meeting this
+tolerance, NTP will automatically compensate for the frequency errors of the
+individual oscillator and no further adjustments are required, either to the
+configuration file or to various kernel variables. For the NTP Version 4
+release, this tolerance has been increased to +-500 PPM. <p>However, in the
+case of certain notorious platforms, in particular Sun 4.1.1 systems, the
+performance can be improved by adjusting the values of certain kernel
+variables; in particular, <tt>tick</tt> and <tt>tickadj</tt>. The variable
+<tt>tick</tt> is the increment in microseconds added to the system time on
+each interval- timer interrupt, while the variable <tt>tickadj</tt> is used
+by the time adjustment code as a slew rate, in microseconds per tick. When
+the time is being adjusted via a call to the system routine
+<tt>adjtime()</tt>, the kernel increases or reduces tick by <tt>tickadj</tt>
+microseconds per tick until the specified adjustment has been
+completed. Unfortunately, in most Unix implementations the tick increment
+must be either zero or plus/minus exactly <tt>tickadj</tt> microseconds,
+meaning that adjustments are truncated to be an integral multiple of
+<tt>tickadj</tt> (this latter behaviour is a misfeature, and is the only
+reason the <tt>tickadj</tt> code needs to concern itself with the internal
+implementation of <tt>tickadj</tt> at all). In addition, the stock Unix
+implementation considers it an error to request another adjustment before a
+prior one has completed.</p> <p>Thus, to make very sure it avoids problems
+related to the roundoff, the <tt>tickadj</tt> program can be used to adjust
+the values of <tt>tick</tt> and <tt>tickadj</tt>. This ensures that all
+adjustments given to <tt>adjtime()</tt> are an even multiple of
+<tt>tickadj</tt> microseconds and computes the largest adjustment that can
+be completed in the adjustment interval (using both the value of
+<tt>tick</tt> and the value of <tt>tickadj</tt>) so it can avoid exceeding
+this limit. It is important to note that not all systems will allow
+inspection or modification of kernel variables other than at system build
+time. It is also important to know that, with the current NTP tolerances, it
+is rarely necessary to make these changes, but in many cases they will
+substantially improve the general accuracy of the time service.</p>
+<p>Unfortunately, the value of <tt>tickadj</tt> set by default is almost
+always too large for <tt>ntpd</tt>. NTP operates by continuously making
+small adjustments to the clock, usually at one-second intervals. If
+<tt>tickaj</tt> is set too large, the adjustments will disappear in the
+roundoff; while, if <tt>tickadj</tt> is too small, NTP will have difficulty
+if it needs to make an occasional large adjustment. While the daemon itself
+will read the kernel's values of these variables, it will not change the
+values, even if they are unsuitable. You must do this yourself before the
+daemon is started using the <tt>tickadj</tt> program included in the
+<tt>./util</tt> directory of the distribution. Note that the latter program
+will also compute an optimal value of <tt>tickadj</tt> for NTP use based on
+the kernel's value of <tt>tick</tt>.</p> <p>The <tt>tickadj</tt> program can
+reset several other kernel variables if asked. It can change the value of
+<tt>tick</tt> if asked. This is handy to compensate for kernel bugs which
+cause the clock to run with a very large frequency error, as with SunOS
+4.1.1 systems. It can also be used to set the value of the kernel
+<tt>dosynctodr</tt> variable to zero. This variable controls whether to
+synchronize the system clock to the time-of-day clock, something you really
+don't want to be happen when <tt>ntpd</tt> is trying to keep it under
+control. In some systems, such as recent Sun Solaris kernels, the
+<tt>dosynctodr</tt > variable is the only one that can be changed by the
+<tt>tickadj</tt> program. In this and other modern kernels, it is not
+necessary to change the other variables in any case.</p>
+
+<p>We have a report that says starting with Solaris 2.6 we should leave
+<i>dosynctodr</i> alone.</p> <p>In order to maintain reasonable correctness
+bounds, as well as reasonably good accuracy with acceptable polling
+intervals, <tt>ntpd</tt> will complain if the frequency error is greater
+than 500 PPM. For machines with a value of <tt>tick</tt> in the 10-ms range,
+a change of one in the value of <tt>tick</tt> will change the frequency by
+about 100 PPM. In order to determine the value of <tt>tick</tt> for a
+particular CPU, disconnect the machine from all source s of time
+(<tt>dosynctodr</tt> = 0) and record its actual time compared to an outside
+source (eyeball-and-wristwatch will do) over a day or more. Multiply the
+time change over the day by 0.116 and add or subtract the result to tick,
+depending on whether the CPU is fast or slow. An example call to
+<tt>tickadj</tt> useful on SunOS 4.1.1 is:</p>
+ <pre>
+ <tt>tickadj</tt> -t 9999 -a 5 -s
+</pre>
+which sets tick 100 PPM fast, <tt>tickadj</tt> to 5 microseconds and turns
+off the clock/calendar chip fiddle. This line can be added to the <tt
+>rc.local</tt> configuration file to automatically set the kernel variables
+at boot time. <p>All this stuff about diddling kernel variables so the NTP
+daemon will work is really silly. If vendors would ship machines with clocks
+that kept reasonable time and would make their <tt>adjtime()</tt> system
+call apply the slew it is given exactly, independent of the value of
+<tt>tickadj</tt>, all this could go away. This is in fact the case on many
+current Unix systems.</p>
+
+<H3>Solaris 2.6</H3>
+<P>
+Solaris 2.6 adds support for kernel PLL timekeeping, but breaks this
+support in such a fashion that using it worse than not. This is <A
+HREF="solaris.xtra.4095849"> SUN Bug ID 4095849</A>, and it is not yet
+fixed as of June 1998.
+<P>
+<H3>Solaris 2.5 and 2.5.1</H3>
+<P>
+On UltraSPARC systems, calculation of <I>cpu_tick_freq</I> is broken
+such that values that are off by significant amounts may be used
+instead. This unfortunately means that ntpd may have severe problems
+keeping synchronization. This is <A HREF="solaris.xtra.4023118"> SUN Bug ID
+4023118</A>. Bryan Cantrill <! -- &lt;bmc@eng.sun.com&gt; --> of Sun
+posted <A HREF="solaris.xtra.patchfreq">patchfreq</A>, a workaround script,
+to comp.protocols.time.ntp in March of 1997.
+<P>
+<HR>
+<H2>OLD DATA</H2>
+<STRONG>I can't vouch for the accuracy the information below this
+rule. It may be significantly dated or incorrect.</STRONG>
+<P>
+<P>
+<H3>Solaris 2.2</H3>
+<P>
+Solaris 2.2 and later contain completely re-written clock code to
+provide high resolution microsecond timers. A benefit of the
+re-written clock code is that adjtime does not round off its
+adjustments, so ntp does not have to compensate for this
+rounding. Under Solaris 2.2 and later, ntp #define's
+<CODE>ADJTIME_IS_ACCURATE</CODE>, and does not look for the <I>tickadj</I>
+kernel variable.
+<P>
+<H3>Solaris 2.1</H3>
+(This originally written by William L. Jones &lt;jones@chpc.utexas.edu&gt;)
+<P>
+Solaris 2.1 contains fairly traditional clock code, with <I>tick</I>
+and <I>tickadj</I>.
+<P>
+Since settimeofday under Solaris 2.1 only sets the seconds part of timeval
+care must be used in starting xntpd. I suggest the following start
+up script:
+<BLOCKQUOTE><TT>
+tickadj -s -a 1000
+<BR>ntpdate -v server1 server2
+<BR>sleep 20
+<BR>ntpdate -v server1 server2
+<BR>sleep 20
+<BR>tickadj -a 200
+<BR>xntpd
+</TT></BLOCKQUOTE>
+
+The first tickadj turns of the time of day clock and sets the tick
+adjust value to 1 millisecond. This will insure that an adjtime value
+of at most 2 seconds will complete in 20 seconds.
+<P>
+The first ntpdate will set the time to within two seconds
+using settimeofday or it will adjust time using adjtime.
+<P>
+The first sleep insures the adjtime has completed for the first ntpdate.
+<P>
+The second ntpdate will use adjtime to set the time of day since the
+clock should be within 2 seconds of the correct time.
+<P>
+The second tickadj set the tick adjust system value to 5 microseconds.
+<P>
+The second sleeps insure that adjtime will complete before starting
+the next xntpd.
+<P>
+I tried running with a tickadj of 5 microseconds with out much success.
+200 microseconds seems to work well.
+<P>
+<HR>
+Prior versions of this file had major text contributed by:
+<MENU>
+<LI>Denny Gentry &lt;denny@eng.sun.com&gt;
+</MENU>
+<BODY>
+</HTML>
diff --git a/html/hints/solaris.xtra.4023118 b/html/hints/solaris.xtra.4023118
new file mode 100644
index 0000000..84c5d15
--- /dev/null
+++ b/html/hints/solaris.xtra.4023118
@@ -0,0 +1,36 @@
+ Bug Id: 4023118
+ Category: kernel
+ Subcategory: other
+ State: integrated
+ Synopsis: sun4u doesn't keep accurate time
+ Description:
+
+[ bmc, 12/20/96 ]
+
+The clock on a sun4u drifts unacceptably. On a typical 143 mHz Ultra,
+the clock took 1.0001350 seconds to count 1 second. While this may seem
+trivial, it adds up quickly. In this case, the TOD chip will have to
+pull the clock forward by 2 seconds every 4 hours and 7 minutes.
+This drift rate is so high, that the clock is close to being too broken
+for NTP to guarantee correctness (in order for NTP's mechanism to work,
+it must be assured that the local clock drifts no more than 20 ms in 64
+seconds; this particular 143 mHz Ultra will drift by nearly 9 ms in that
+period). This problem has been reproduced on virtually all sun4u
+classes.
+
+The fundamental problem lies in the kernel's perception of ticks per
+second. The PROM is responsible for determining this figure exactly,
+and the kernel extracts it into the variable cpu_tick_freq. On sun4u's,
+this number is disconcertingly round: 143000000, 167000000, 248000000,
+etc. Indeed, a simple experiment revealed that these numbers were
+quite far from the actual ticks per second. Typical was the 143 mHz
+Ultra which was discovered to tick around 142,980,806 (+/- 10) times
+per second.
+
+ Work around:
+
+ Integrated in releases: s297_27
+ Duplicate of:
+ Patch id:
+ See also:
+ Summary:
diff --git a/html/hints/solaris.xtra.4095849 b/html/hints/solaris.xtra.4095849
new file mode 100644
index 0000000..8d3ce80
--- /dev/null
+++ b/html/hints/solaris.xtra.4095849
@@ -0,0 +1,74 @@
+ Bug Id: 4095849
+ Category: kernel
+ Subcategory: syscall
+ State: evaluated
+ Synopsis: time_constant value >6 with PLL in use leads to integer divide
+ zero trap panic
+ Description:
+If the time_constant parameter is 7 or higher, and the phase-lock looping model
+is in use, the system will take a "integer divide zero trap" panic in
+the clock routine as soon as the time_offset becomes non-zero.
+
+time_constant defaults to 0. The only place it is set is in the ntp_adjtime
+system call, from the 'constant' element of the timex structure argument.
+
+ Work around:
+Never set the constant element of the timex structure passed to ntp_adjtime to
+a value larger than 6.
+
+satish.mynam@Eng 1998-04-30
+1. Use Sun's version of NTP software instead of PD version. This problem
+is not seen with Sun's NTP version (which is mostly eqivalent to PD NTP 3.4
+plus some Sun's local functionality futures).
+
+2. Workaround for the public domain NTP version ONLY:
+ =====================================================
+The workaround for public domain NTP version is to disable the
+KERNEL_PLL from the NTP code. This way ntp_Adjtime() system call is
+totally bypassed without sacrificing any of the functionality of the
+NTP. The only hit you might see is the way kernel precision timminig
+is done without the PLL algorithm in the kernel.
+
+ The easiest way to disable ntp_adjtime option is(without changing
+ any makefiles or other config files) to disable the KERNEL_PLL
+ value in the ./config.h file.
+
+After doing a ./configure for probing for all the necessary tools(compilers,
+os version, libraries), please comment out KERNEL_PLL macro in
+the ./config.h file. This will disable the KERNEL_PLL part of the source
+code and the newly obtained xntpd is just similar to the old one but it
+does not use ntp_adjtime() system call. This prevents it from panic'ng
+the kernel.
+
+/*#define KERNEL_PLL 1*/
+
+I complied a new xntpd binary this way and it does nothave any ntp_adjtime()
+related stuff.
+
+Default:
+=======
+/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings
+xntpd |
+grep ntp_adjtime
+354:adj_frequency: ntp_adjtime failed: %m
+357:loop_config: ntp_adjtime() failed: %m
+435:get_kernel_info: ntp_adjtime() failed: %m
+
+With KERNEL_PLL disabled in config.h file
+-=======================
+
+/net/divya/export/home/mynam/public_domain/ntp/xntp3-5.92/xntpd>strings
+xntpd.nopll | grep ntp_adjtime
+
+ Integrated in releases:
+ Duplicate of:
+ Patch id:
+ See also: 4133517
+ Summary:
+If the time_constant parameter is 7 or higher, and the phase-lock looping model
+is in use, the system will take a "integer divide zero trap" panic in
+the clock routine as soon as the time_offset becomes non-zero.
+
+time_constant defaults to 0. The only place it is set is in the ntp_adjtime
+system call, from the 'constant' element of the timex structure argument.
+----------------------------------------------------------------------------
diff --git a/html/hints/solaris.xtra.S99ntpd b/html/hints/solaris.xtra.S99ntpd
new file mode 100644
index 0000000..d8058fd
--- /dev/null
+++ b/html/hints/solaris.xtra.S99ntpd
@@ -0,0 +1,21 @@
+#!/bin/sh
+if [ $1 = "start" ]; then
+ if [ -x /usr/local/bin/xntpd ]; then
+ echo "Starting NTP daemon, takes about 1 minute... "
+ # dosynctodr may need to be left alone as of with Solaris 2.6
+ # The following line is unnecessary if you turn off
+ # dosynctodr in /etc/system.
+ /usr/local/bin/tickadj -s
+ /usr/local/bin/ntpdate -v server1 server2
+ sleep 5
+ /usr/local/bin/xntpd
+ fi
+else
+ if [ $1 = "stop" ]; then
+ pid=`/usr/bin/ps -e | /usr/bin/grep xntpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
+ if [ "${pid}" != "" ]; then
+ echo "Stopping Network Time Protocol daemon "
+ /usr/bin/kill ${pid}
+ fi
+ fi
+fi
diff --git a/html/hints/solaris.xtra.patchfreq b/html/hints/solaris.xtra.patchfreq
new file mode 100644
index 0000000..9600881
--- /dev/null
+++ b/html/hints/solaris.xtra.patchfreq
@@ -0,0 +1,85 @@
+#!/bin/ksh
+
+#
+# File: patchfreq
+# Author: Bryan Cantrill (bmc@eng.sun.com), Solaris Performance
+# Modified: Sat Apr 26 04:00:59 PDT 1997
+#
+# This is a little script to patch a 5.5 or 5.5.1 kernel to get around
+# the cpu_tick_freq inaccuracy. Before running this script, one must
+# know the true frequency of one's CPU; this can be derived by NTP,
+# or by observing the clock relative to the time-of-day chip over a
+# long period of time (the TOD will pull system time when it drifts
+# by more than two seconds).
+#
+# Patching a kernel can render a machine unbootable; do not run this
+# script unless you are prepared to accept that possibility. It
+# is advisable to have a backout path (e.g. net booting, an alternate
+# boot disk, an installation CD) should your machine fail to boot.
+#
+# This is not a product of Sun Microsystems, and is provided "as is",
+# without warranty of any kind expressed or implied including, but not
+# limited to, the suitability of this script for any purpose.
+#
+
+if [ $# -eq 0 ]; then
+ echo "Usage: $0 cpu_tick_freq [ alternate_kernel ]"
+ exit 1
+fi
+
+cpu_tick_freq=$1
+kernel=/platform/sun4u/kernel/unix
+
+if [ $# -eq 2 ]; then
+ kernel=$2
+fi
+
+if [ ! -w $kernel ]; then
+ echo "$0: Cannot open $kernel for writing."
+ exit 1
+fi
+
+arch=`echo utsname+404?s | adb $kernel | cut -d: -f2`
+
+if [ ! $arch = "sun4u" ]; then
+ echo "Patch only applies to sun4u"
+ exit 1
+fi
+
+rel=`echo utsname+202?s | adb $kernel | cut -d: -f2`
+
+if [ ! $rel = "5.5" ] && [ ! $rel = "5.5.1" ]; then
+ echo "Patch only applies to 5.5 or 5.5.1..."
+ exit 1
+fi
+
+nop="1000000" # nop
+store_mask="ffffe000" # mask out low 13 bits
+store="da256000" # st %o5, [%l5 + offset]
+
+instr=`echo setcpudelay+34?X | adb $kernel | cut -d: -f 2 | nawk '{ print $1 }'`
+
+if [ $instr = $nop ]; then
+ echo "Instruction already patched..."
+else
+ let masked="(16#$store_mask & 16#$instr) - 16#$store"
+ if [ $masked -ne 0 ]; then
+ echo "Couldn't find instruction to patch; aborting."
+ exit 1
+ fi
+
+ if ! echo setcpudelay+34?W $nop | adb -w $kernel 1> /dev/null
+ then
+ echo "adb returned an unexpected error; aborting."
+ fi
+fi
+
+echo "Patching cpu_tick_freq to $cpu_tick_freq..."
+
+if ! echo cpu_tick_freq?W 0t$cpu_tick_freq | adb -w $kernel 1> /dev/null; then
+ echo "adb returned an unexpected error; aborting."
+ exit 1
+fi
+
+echo "$kernel successfully patched."
+exit 0
diff --git a/html/hints/sun4 b/html/hints/sun4
new file mode 100644
index 0000000..424fa18
--- /dev/null
+++ b/html/hints/sun4
@@ -0,0 +1,15 @@
+Notes on CPU clock oscillator tolerance with SunOS 4.1.1 and 4.1.3
+
+A bug in SunOS 4.1.1 results in the kernel time losing 1 microsecond
+per tick of the system clock. The bug was fixed (bugid 1094383) for
+SunOS 4.1.1 and corrected in SunOS 4.1.3. The easiest way to fix this
+is to replace the 4.1.1 binary clock.o with the corresponding 4.1.3
+binary. Without this change it is necessary to use the tickadj program
+included in this distribution with the -t 9999 option.
+
+The tickadj option will work in all cases except when the kernel has
+been modified to correct the CPU clock oscillator frequency using a
+1-pps signal from a precision source. The bugfix must be installed for
+this wrinkle to work properly.
+
+Dave Mills (mills@udel.edu)
diff --git a/html/hints/svr4-dell b/html/hints/svr4-dell
new file mode 100644
index 0000000..2c92f8a
--- /dev/null
+++ b/html/hints/svr4-dell
@@ -0,0 +1,8 @@
+Notes on the DELL SVR4.
+
+You should use -DSETTIMEOFDAY_BROKEN.
+
+Philip.Gladstone@mail.citicorp.com
+
+(XXX But there is no checking for SETTIMEOFDAY_BROKEN in the code)
+
diff --git a/html/hints/svr4_package b/html/hints/svr4_package
new file mode 100644
index 0000000..b9f5ca3
--- /dev/null
+++ b/html/hints/svr4_package
@@ -0,0 +1,33 @@
+Date: Wed, 12 Apr 1995 12:42:03 +0100
+Message-ID: <513.797686923@concurrent.co.uk>
+From: Andy Chittenden <asc@concurrent.co.uk>
+
+Dave
+
+Here is a uuencoded, compressed tar file. The only file I've
+changed is Makefile - I've included the full file rather than diffs.
+There are some new files as well:
+
+ xntp shell script that starts up ntp during boot up
+ (the packaging stuff creates links to it so it comes
+ up at run level 2). As with all svr4 start/stop
+ scripts, it takes one parameter which is either
+ start or stop. It assumes that ntp.conf is in
+ /etc/inet/ntp.conf (where it should be on svr4
+ machines).
+ prototype describes the file contents of the package.
+ You might like to review its contents to
+ see whether you want to include any other
+ files or remove some. NB I've made the man
+ pages go into 1m as they should on svr4.
+ preinstall runs before installation takes place. It
+ ensures that ntp is down if it is up before
+ installing a replacement package
+ postinstall starts up ntp after package installation.
+ preremove brings down ntp before removing the package.
+
+You create a package using "make package". This creates a file
+called xntp.pkg. To install this package, you use
+"pkgadd -d `pwd`/xntp.pkg xntp". This will start up ntp if
+/etc/inet/ntp.conf exists. If you don't want the package anymore, use
+"pkgrm xntp". I have tested this on Solaris 2.4.
diff --git a/html/hints/todo b/html/hints/todo
new file mode 100644
index 0000000..e0e5ffa
--- /dev/null
+++ b/html/hints/todo
@@ -0,0 +1,4 @@
+Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de>:
+ Any change in a source file in the lib directory causes all files to
+ be recompiled (because the objects are removed). Add a better rule for
+ make to update the library. Maybe just remove "-rm -f $?".
diff --git a/html/hints/vxworks.html b/html/hints/vxworks.html
new file mode 100644
index 0000000..eac9312
--- /dev/null
+++ b/html/hints/vxworks.html
@@ -0,0 +1,88 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>vxWorks Port of NTP</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+ <body link="#00008B" vlink="#8B0000">
+ <h4>VxWorks port of NTP</h4>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <p>Creating a port for vxWorks posed some problems. This port may help as a starting point for similar ports to real-time OS's and other embeddable kernels, particularly where <tt>main()</tt> is not allowed, and where the configure scripts need to be altered.</p>
+ <h4>Configuration issues</h4>
+ <p>I decided to do as little invasive surgery as possible on the NTP code, so I brought the vxWorks header tree in line with the standard Unix tree. The following changes were needed, as a side effect these changes will allow for easy porting of other autoconfigure enabled code.</p>
+ <p>Where I have 386 you will need to put in your target type. The vxWorks tree entry point is <tt>/usr/wind</tt>. If these are the same for your system, you should be able to cut and paste the changes.</p>
+ <p><blink>WARNING: Check you are not overwriting files, before entering the following: there should be no conflict, but check first...</blink></p>
+ <pre>
+ export CC=&quot;cc386 -nostdlib -m486 -DCPU=I80486 -I/usr/wind/target/h&quot;
+ export RANLIB=ranlib386
+ export AR=ar386
+ export VX_KERNEL=/usr/wind/target/config/ims_std_bsp/vxWorks<br>
+
+ cd /usr/wind/target/sys
+ ln -s ../signal.h
+ ln -s ../time.h
+ ln -s socket.h sockio.h
+ ln -s ../selectLib.h select.h
+ ln -s ../timers.h
+ touch file.h param.h resource.h utsname.h var.h ../netdb.h ../a.out.h ../termios.h
+ echo &quot; ******ADD #include \&quot;sys/times.h\&quot; to sys/time.h &quot;
+ </pre>
+ The configure script must be changed in the following way to get the linking tests to work, once in the correct directory issue the following commands:
+
+ <pre> sed -e 's%main.*()%vxmain()%' configure &gt; configure.vxnew
+ mv configure.vxnew configure
+ chmod 755 configure
+ </pre>
+ <p></p>The new version 4 of NTP requires some maths functions so it links in the maths library (-lm) in the <tt>./ntpd/Makefile.am</tt> file change the line <tt>ntpd_LDADD = $(LDADD) -lm</tt> by removing the &quot;-lm&quot;.</p>
+ <p>>You are now ready to compile
+ <p>The ./configure.in file needed to be altered to allow for a host-target configuration to take place.</p>
+ <ul>
+ <li>The define SYS_VXWORKS was added to the compilation flags.
+ <li>Little endianess is set if the target is of type iX86.
+ <li>The size of char, integer, long values are all set. If Wind River ever changes these values they will need to be updated.
+ <li>clock_settime() is defined to be used for setting the clock.
+ <li>The Linking flags have -r added to allow for relinking into the vxWorks kernel
+ </ul>
+ <p>Unfortunately I have had to make use of the <tt>./include/ntp_machine.h</tt> file to add in the checks that would have been checked at linking stage by <tt>autoconf</tt>, a better method should be devised.</p>
+ <ul>
+ <li>There is now a <tt>NO_MAIN_ALLOWED</tt> define that simulates command line args, this allows the use of the normal startup sysntax.
+ <li>POSIX timers have been added.
+ <li>Structures normally found in <tt>netdb.h</tt> have been added with, the corresponding code is in <tt>./libntp/machines.c</tt>. Where possible the defines for these have been kept non-vxWorks specific.
+ </ul>
+ <p>Unfortunately there are still quite a few <tt>SYS_VXWORKS</tt> type defines in the source, but I have eliminated as many as possible. You have the choice of using the <tt>usrtime.a</tt> library avaliable from the vxworks archives or forgoing <tt>adjtime()</tt> and using the <tt>clock_[get|set]time()</tt>. The <tt>./include/ntp_machine.h</tt> file clearly marks how to do this.</p>
+ <h4>Compilation issues</h4>
+ <p>You will need autoconf and automake ... available free from the gnu archives worldwide.</p>
+ <p>The variable <tt>arch</tt> is the target architecture (e.g. i486)</p>
+ <pre>
+ mkdir A.vxworks)
+ cd A.vxworks
+ ../configure --target=arch-wrs-vxworks
+ make
+ </pre>
+ <p>Options I normally use are the <tt>--disable-all-clocks --enable-LOCAL-CLOCK</tt> flags. The program should proceed to compile without problem. The daemon ntpd, ntpdate, ntptrace, ntpdc, ntpq programs and of course the libraries are all fully ported. The other utilities are not, but they should be easy to port.</p>
+ <h4>Running the software</h4>
+ <p>Load in the various files, call them in the normal vxWorks function type manner. Here are some examples. Refer to the man pages for further information.</p>
+ <pre>
+ ld &lt; ntpdate/ntpdate
+ ld &lt; ntpd/ntpd
+ ld &lt; ntptrace/ntptrace
+ ld &lt; ntpq/ntpq
+ ld &lt; ntpdc/ntpdc
+ ntpdate (&quot;-b&quot;, &quot;192.168.0.245&quot;)
+ sp(ntpd, &quot;-c&quot;, &quot;/export/home/casey/ntp/ntp.conf&quot;)
+ ntpdc(&quot;-c&quot;, &quot;monlist&quot;, &quot;192.168.0.244&quot;)
+ ntpq(&quot;-c&quot;, &quot;peers&quot;, &quot;192.168.0.244&quot;)
+ ntptrace(&quot;192.168.0.244&quot;)
+ </pre>
+ <p>Casey Crellin, casey@csc.co.za</p>
+ </body>
+
+</html>
diff --git a/html/hints/winnt.html b/html/hints/winnt.html
new file mode 100644
index 0000000..7c41b86
--- /dev/null
+++ b/html/hints/winnt.html
@@ -0,0 +1,90 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>NTP on Windows NT</title>
+ <link href="../scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+ <body>
+ <h3>NTP 4.x for Windows</h3>
+
+ <h4>Introduction</h4>
+ <p>The NTP 4 distribution runs as service on Windows 2000 and later. It will NOT run on Windows 95, 98, ME, etc. Lately it has been run the most on Windows-7 and later. The binaries work on multi-processor systems. This port has not been tested on the Alpha platform. This release now uses OpenSSL for authentication. IPv6 is not implemented yet for Win32 platforms. A ready-to-run install distribution is available from Meinberg at <a href="http://www.meinberg.de/english/sw/ntp.htm">http://www.meinberg.de/english/sw/ntp.htm.</a></p>
+ <p>Users should note that the stock Windows client sends requests as mode-1 packets, which can have unintended consequences and create a security risk. The client should send requests as mode-3 (client) packets, which conform to the protocol specification. The issues and resolution are described in Microsoft KB 875424. A less desirable alternative that avoids changing registry keys is to use the <tt>--with-wintime</tt> option when building the executable.</p>
+ <h4>Authentication Keys</h4>
+ <p>With this release ntp-keygen is supported. See the <a href="../keygen.html"> ntp keygen documentation</a> for details on how to use ntp-keygen.</p>
+ <p><tt>ntpd</tt> can now use the generated keys in the same way as on Unix platforms. Please refer to the <a href="../authopt.html">Authentication Options</a> for details on how to use these.</p>
+ <p><B>NOTE:</B> ntpd and <tt>ntp-keygen</tt> both use OpenSSL which requires a random
+ character file called <tt>.rnd</tt> by default. Both of these programs will automatically generate this file if they are not found. The programs will look for an environmental variable called RANDFILE and use that for the name of the random character file if the variable exists. If it does not exist it will look for an environmental variable called HOME and use that directory to search for a file called <tt>.rnd</tt> in that directory. Finally, if neither RANDFILE nor HOME exists it will look in <tt>C:\</tt> for a .rnd file. In each case it will search for and create the file if the environmental variable exists or in the C:\ directory if it doesn't.</p>
+ <p>Note that ntpd normally runs as a service so that the only way that it will have either RANDFILE or HOME defined is if it is a System environmental variable or if the service is run under a specific account name and that account has one of those variables defined. Otherwise it will use the file <tt>c:\.rnd</tt>. This was done so that OpenSSL will work normally on Win32 systems. This obviates the need to ship the OpenSSL.exe file and explain how to generate the .rnd file. A future version may change this behavior.</p>
+ <p>Refer to <a href="#Compiling">Compiling Requirements</a> and Instructions for how to compile the program.</p>
+ <h4>Reference Clocks</h4>
+ <p>Reference clock support under Windows NT is tricky because the IO functions are so much different. Some of the clock types have been built into the ntpd executable and should work but have not been tested by the ntp project. If you have a clock that runs on Win32 and the driver is there but not implemented on Win32 you will have make the required configuration changes in config.h and then build ntpd from source and test it. The following reference clock is known to work and is supported by Windows NT: <a href="../drivers/driver1.html">Type 1</a> Undisciplined Local Clock (LOCAL)</p>
+ <h4>Functions Supported</h4>
+ <p>All NTP functions are supported with some constraints. See the <a href="#ToDo">TODO list</a> below. Note that the ntptrace executable is not supported and you should use the PERL script version instead.</p>
+ <h4>Accuracy</h4>
+ <p>Greg Brackley has implemented a fantastic interpolation scheme that improves the precision of the NTP clock using a realtime thread (is that poetic or what!) which captures a tick count from the 8253 counter after each OS tick. The count is used to interpolate the time between operating system ticks.</p>
+ <p>On a typical 200+ MHz system NTP achieves a precision of about 5 microseconds and synchronizes the clock to +/-500 microseconds using the <a href="http://www.trimble.com/products/ntp">Trimble Palisade</a> as UTC reference. This allows distributed applications to use the 10 milliseconds ticks available to them with high confidence.</p>
+ <h4>Binaries</h4>
+ <p>Recent InstallShield based executable versions of NTP for Windows NT (intel) are available from:</p>
+ <ul>
+ <li><a href="http://www.five-ten-sg.com/">http://www.five-ten-sg.com/</a>
+ </ul>
+ <h4 id="ToDo">ToDo</h4>
+ <p>These tasks are in no particular order of priority.</p>
+ <ul>
+ <li>Add IPv6 support
+ <li>See if precision can be improved by using CPU cycle counter for tick interpolation.
+ <li>Make precision time available to applications using NTP_GETTIME API
+ </ul>
+ <h4>Compiling Requirements</h4>
+ <ul>
+ <li>Windows 7 or Windows.NET Server 2003, or later.
+ <li>Windows NT 4.0 Windows 2000, Windows XP or Windows Vista <i>may</i> still work.
+ <li>Microsoft Visual C++ 2008, 2010, or 2013 EE
+ <li>Some way of uncompressing and untarring the gzipped tar file.
+ <li>OpenSSL must be built on the box before building NTP. Additional steps would
+ be required to not use OpenSSL.
+ <li>Microsoft Visual C++ redistributables</ul>
+ <a name="Compiling"><B>Compiling Instructions</B></a>
+ <ol>
+ <li>Install Micosoft Visual C++ <a href="http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF">redistributables</a>
+ <li>Install <a href="http://www.slproweb.com/products/Win32OpenSSL.html">OpenSSL full installer for Windows</a>. Add the following to your system environment variables in the control panel (adjusting paths as appropriate to point to the directory containing only an openssl subdirectory, for OPENSSL_INC, and to the directory containing openssl .lib files for OPENSSL_LIB:
+<ul><li> OPENSSL_INC=C:\OpenSSL\include
+<li> OPENSSL_LIB=C:\OpenSSL\lib</ul>
+ <li>Unpack the NTP-4.x.tar.gz using utilities such as WinZip or WinRar.
+ <li>Run Microsoft Visual C++ 2008 EE.
+ <li>Open the ports\winnt\vs2008\ntp.sln solution file
+ <li>Batch build all projects (Build menu, Batch Build..., select all, build).
+ <li>The built binaries can be found in the <tt>ports\winnt\v2008\Win32-bin\Release</tt> directory.
+ <li>If you are shipping binaries in a kit it is strongly recommended that you ship this file (winnt.html) along with the binaries.
+ </ol>
+ <h4>Configuration File</h4>
+ <p>The default NTP configuration file path is %SystemRoot%<tt>\system32\drivers\etc\. </tt>(%SystemRoot% is an environmental variable that can be determined by typing &quot;set&quot; at the &quot;Command Prompt&quot; or from the &quot;System&quot; icon in the &quot;Control Panel&quot;).</p>
+ <p>Refer to your system environment and create your<tt> ntp.conf</tt> file in the directory corresponding to your system&nbsp; installation. The older <tt>&lt;WINDIR&gt;\ntp.conf</tt> is still supported but you will get a log entry reporting that the first file wasn't found.
+ <h4>Installation Instructions</h4>
+ <p>The <tt>instsrv</tt> program in the instsrv subdirectory of the distribution can be used to install 'ntpd' as a service and start automatically at boot time. Instsrv is automatically compiled with the rest of the distribution if you followed the steps above.</p>
+ <ol>
+ <li>Start a command prompt and enter &quot;instsrv.exe &lt;pathname_for_ntpd.exe&gt;&quot;
+ <li>Clicking on the &quot;Services&quot; icon in the &quot;Control Panel&quot; will display the list of currently installed services in a dialog box. The NetworkTimeProtocol service should show up in this list. Select it in the list and hit the &quot;Start&quot; button in the dialog box. The NTP service should start.
+ <li>You can also stop and start the service by typing net start|stop NetworkTimeProtocol at the DOS prompt.
+ <li>View the event log by clicking on the &quot;Event Viewer&quot; icon in the &quot;Administrative Tools&quot; group, there should be several successful startup messages from NTP. NTP will keep running and restart automatically when the machine is rebooted.
+ </ol>
+ <p>You can change the start mode (automatic/manual) and other startup parameters corresponding to the NTP service in the &quot;Services&quot; dialog box if you wish.</p>
+ <h4>Removing NTP</h4>
+ <p>You can also use <tt>instsrv</tt> to delete the NTP service by entering: <tt>>&quot;instsrv.exe remove&quot;</tt>
+ <h4>Command Line Parameters and Registry Entries</h4>
+ <p>Unlike the Unix environment, there is no clean way to run 'ntpdate' and reset the clock before starting 'ntpd' at boot time. NTP will step the clock up to 1000 seconds by default. While there is no reason that the system clock should be that much off during bootup if <tt>ntpd</tt> was running before, you may wish to override this default and/or pass other command line directives.
+ <p>Use the registry editor to edit the value for the ntpd executable under LocalMachine\System\CurrentControlSet\Services\NTP.</p>
+ <p>Add the -g option to the ImagePath key, behind &quot;%INSTALLDIR&gt;\ntpd.exe&quot;. This will force NTP to accept large time errors (including 1.1.1980 00:00)</p>
+ <h4>Bug Reports</h4>
+ <p>Please follow the <a href="../bugs.html">NTP Bug Reporting Procedures</a> to report bugs or request enhancements.</p>
+ <p>Last update:
+ <!-- #BeginDate format:En2m -->6-Apr-2014 23:27<!-- #EndDate -->
+ </p>
+
+ </body>
+</html>
diff --git a/html/history.html b/html/history.html
new file mode 100644
index 0000000..8b1ad50
--- /dev/null
+++ b/html/history.html
@@ -0,0 +1,74 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Historical Notes</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Historical Notes</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:07<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Historical Notes on NTP Upgrades</h4>
+<p>This is an interim report on recent upgrades to the NTPv4 reference implementation code base and documentation. This report documents the upgrade program, which began in June 2007 and continued until March 2008. It is very important to recognize that this historic document describes the upgrade status as of 2008. Additional upgrades have been implemented since then. As of mid 2011, the additional upgrades are documented on the <a href="release.html">NTP Version 4 Release Notes</a> page.</p>
+<p>The motivation for this project was the overhaul and refinement of the code, some of which dates back twenty years. Some four dozen sets of fingers have introduced sometimes incompatible &quot;improvements&quot; that to some degree enhance or burden the product. There has been a continuing effort over the years to maintain the briar patch and pluck the more flagrant weeds, but it now requires a more systematic and thorough examination of purpose, design and implementation. The project is not complete, but far enough along to present a status report and review of significant changes.</p>
+<p>Please note THE CHANGES DO NOT AFFECT THE PROTOCOL SPECIFICATION AND DO NOT AFFECT INTEROPERABILITY WITH PREVIOUS VERSIONS.</p>
+<h4>1. Transparent Design</h4>
+<p>During the project a number of minor inconsistencies in various algorithms were found and resolved. In most cases this did not result in any changes in behavior, just a more simplified, transparent and easier to maintain design. In a few cases behavior has been modified to correct deficiencies and to avoid hostile attacks, as described below.</p>
+<h4>2. Documentation</h4>
+<p>The documentation required a major upgrade. Many pages have been overhauled, some completely rewritten and new ones added. A site map has been added and sorted by page category. A comprehensive command index has been added and sorted by page category. The command index includes a brief gloss for each command. A page has been added to show the various status word and event decodes used for monitoring and event reporting. The decodes show the internal code, ASCII report and short function gloss.</p>
+<p>New pages have been added on association management, automatic server discovery and rate management. Much of the overburden on the program manual and configuration pages has been moved to these pages with the intent of the original pages to contain primarily a functional description for the commands and command line options. This is still an ongoing process.</p>
+<h4>3. Bulletproofing</h4>
+<p>In a continuing mission the code flow has been carefully adjusted to decrease vulnerability to configuration errors and possibly hostile attack. The order of restriction processing was adjusted to deflect access denials as early as possible and without consuming useless processor cycles. This is especially important in rate defense, as the MRU list should only be used for clients that could be legitimately served. In addition, the Autokey protocol was adjusted to avoid some potentially nasty disruption attacks.</p>
+<h4>4. Rate Management</h4>
+<p>Strict rate controls have been refined in both outbound and inbound traffic for both minimum headway (guard time) and minimum average headway. This is a major improvement over the original limitreject design of 1992 and upgrade circa 2003. Headway violations result in an optional <em>kiss-o'-death</em> (KoD) packet. To avoid a clogging vulnerability, the KoD packets are themselves rate controlled for each source address separately.</p>
+<p>The main feature of the revised design is that it is responsive to the server minimum headway and avoids guessing. This is done by setting the ppoll field in the server packet to the maximum of (a) the ppoll field in the client packet and (b) the server headway. The client sets the ppoll field in the association to the maximum of (a) the ppoll field in the server packet and (b) the minpoll field in the association. If this is a KoD and this value is greater than minpoll, minpoll is set to this value. The result is that the client continues sending, but only at headway at least as large as the server.</p>
+<p>The revised design makes possible a decrease in the minimum time constant/poll interval to 3 (8 s), which reduces the risetime to 250 s. This may be useful for rapid convergence when a client is first started, but should not be used for links with moderate to large jitter. This is done using the average option of the discard command, which sets the minimum poll interval and headway from the default 4 (16 s) to a value in the range 3 (8 s) to 6 (64 s). Larger values than 4 might be appropriate for very busy public servers.</p>
+<p>Rate management applies also to Autokey messages. This fixes a problem when iburst and autokey are both in play and when for some reason an association with iburst is repeatedly restarted. This may appear spooky to some folks that frequently restart a client for testing. The server remembers. Further information is in the current web documentation.</p>
+<h4>5. Frequency File</h4>
+<p>Initial frequency training has always been a problem, as it can take a very long time to trim the frequency estimate to nominal values. Once this happens and the frequency file is written, subsequent reboots will restore the frequency and frequency training is avoided. The problem is exacerbated using toll modem services such as ACTS which make a call at each poll interval. Until the training is complete the poll interval is held below the desired maximum as toll charges accrue.</p>
+<p>The problem was solved by changing the clock state machine so that, if no frequency file is available, an initial training interval of 300 s occurs, after which the frequency is directly calculated and the discipline then turned over to the feedback loop. The choice of 300 s is based on the assumption that time can be estimated within 1 ms and the resulting frequency estimate within nominal 1 PPM.</p>
+<p>Note that once the initial time offset is either stepped or slewed, no further time offsets are amortized during the training period. If the frequency error is large, the time offset at the end of the period can be moderately large, which then must be amortized by the feedback loop. While this may take up to an hour and result in a minor frequency tweak, the behavior is very much better than without the initial training. The remedy would require intricate and fragile code revisions.</p>
+<p>In the original design the frequency file was written at one-hour intervals. This apparently makes embedded systems folks nervous, since this can tire the flash NVRAM after several years. The interval between writes now depends on the ambient clock stability and normally maxes out at something over one day unless the frequency takes an unusual twitch. </p>
+<h4>6. Leapseconds</h4>
+<p>The leapsecond processing has been overhauled once again. The problem is to avoid fake leap warnings displayed by an errant server and to insure correct response in case of large time changes which might validate or invalidate arming for a subsequent leap. No leap information is used unless the client is synchronized to a proventic source. The values obtained from an Autokey server or peer are updated if newer than the current values. Server leap warning bits are disregarded if these values are available. If not, and if either a majority of the servers show leap warning bits or if one or more of the survivors are a reference clock with leap warning bit, the leap is armed. If armed by server leap warning bits and these provisions no longer prevail, the leap is disarmed. The NTPv4 protocol specifically does not speak to this issue.</p>
+<p>The leap armed condition is displayed in the host status word. Transitions between warnings and no warnings are reported to the protostats file, system log and traps.</p>
+<h4>7. Orphan Mode and Local Clock Driver</h4>
+<p>The orphan mode code has been overhauled to correct some minor bugs and to clarify operation under normal and recovery conditions. The requirement that all subnet hosts have orphan configuration has been removed. The only requirement is that the orphan clients on the DMZ network sharing the root server(s) be so configured The scheme now works if the root servers are configured with each other, either in symmetric or broadcast modes. Orphan mode is not considered in the NTPv4 protocol specification.</p>
+<p>The local clock driver can be very dangerous when used as a fallback when connectivity to Internet time servers is interrupted. Orphan mode was designed to reduce the need for the local clock driver, as it is active only if no server is available. The local clock driver has been modified to have the same characteristics, regardless of stratum. Only if the host running the local clock driver loses all servers, regardless of stratum, is the driver activated. Thus, it is possible, but not recommended, to run the driver at any stratum, including zero.</p>
+<h4>8. Poll Rate Control</h4>
+<p>One of the most persistent problems is when after long operation and then a failure and then subsequently recovery, a client can take a long time to refresh the clock filter and resynchronize. Once the client has backed off the poll interval after a lengthy outage, it sends polls at that interval until receiving a response. At that time it temporarily retries at the minimum poll interval to fill up the clock filter. If iburst is configured, this will happen after 10 seconds or so and the client then resumes its poll interval required by the discipline time constant. This avoids needless network traffic while the poll interval increases gradually to the maximum. Further information is in the current web documentation.</p>
+<p>The same thing happens on initial startup or when an association is restarted. The intent is to avoid a blast of <tt>iburst</tt> packets unless the server actually responds to the first one and to retry only while responding to the the rate controls.</p>
+<p>In order to speed response to initial startup when a reference clock is available, the clock is set on the first message received from the driver. This exposed an interesting bug, now fixed, with the ACTS modem driver, which began prematurely to ramp up the poll interval.</p>
+<h4>9. Autokey</h4>
+<p>The management of host and group names with respect to Autokey configuration and key generation has been removed and simplified. On host certificates, the subject and issuer fields carry the group name, while other certificates carry the host name, which can be an arbitrary string having nothing to do with the DNS name. This opens up a possible future plan to use the Autokey name rather than the IP address when constructing the session key. It also allows a client to easily switch from one group to another without regenerating the certificate. Further information is in the current web documentation and in the latest Autokey ID.</p>
+<p>Various protocol refinements have been done in the Autokey state machine. A bug was found in symmetric modes where the peer cookies were not EXORed. A bug was found in processing the certificate cache when a participant was a client of two or more server in the same group which themselves had certificate trails to different trusted hosts.</p>
+<p>The protocol machine is now restarted every several days in order to update certificates and leapseconds values when they are changed.</p>
+<h4> 10. Report, Log and Event Codes </h4>
+<p>The status, selection, source, event and log decodes have been adjusted for consistency. Some of the decodes were missing, some with errors and a few new ones added. Old versions of ntpq continue to work without change, but display a new code as space. Except for the new codes, this behavior is consistent with RFC 1305 and proposed for the NTPv4 protocol specification.</p>
+<p>The ntpq as command has been changed to fix some very old bugs. The display is now consistent with the system and peer billboards. The authentication state is correctly displayed for broadcast server associations.</p>
+<p>The event reporting has been cleaned up for more straightforward interpretation by a remote agent. All significant state transitions are reported, including clock state machine changes, mobilization, /demobilization, system and peer restart, system peer change, panic stop and so forth.</p>
+<p>A new protostats monitoring file facility has been added. It works just like the other monitor files. All events are recorded to this file as reported and optionally to the system log. Many reports that sometimes clog up the system log are more usefully directed to this file. The reports also trigger a trap packet that can be sent via an agent to page an administrator.</p>
+<p>When the current mode-6 monitoring protocol was designed circa 1988 the considered intent was that monitoring functions rely only on the NTP packet itself and the system, peer and clock status words provided in the mode-6 packet. While the strongly felt advice at that time was to avoid reformatting the plain ASCII text sent by the server, at various times folks have cheated and reformatted the text. In some places this is good, like displaying the filter shift register; in some places this is bad, like reformatting the timestamps. There is nothing much that can be done about this now without angry mobs rioting when forced to upgrade to a new ntpq. I will not rule this out in future.</p>
+<p>A more serious comment has to do with using other than the NTP packet, status words and events for monitoring purposes. Emphasis added: monitors should not parse such things as the flash codes, clock state or anything else not called out in the NTPv4 specification. The clock state machine is defined in the specification, but no specific numbers are assigned to the states.</p>
+<p>When the numbers were changed to align for reporting purposes, some scripts no longer worked. The scripts should be changed to use only the leap and select fields of the system status word. If the leap field is other than 0, the client has synchronized at least once; if the select field is other than 0, the client is currently synchronized to the source indicated in the decode.</p>
+<h4>11. Two-step and timestamp capture</h4>
+<p>A number of interesting ideas were found in the IEEE 1588 Precision Time Protocol specification. One of them was the two-step protocol in which the transmit timestamp is sent in a following message. However, the PTP design operates only in a master-slave configuration and is not directly usable in NTP. The protocol was adapted to the NTP symmetric design, which requires four state variables rather than two. It is described on <a href="http://www.eecis.udel.edu/~mills/stamp.html">Timestamp Capture Principles</a>. This might be an interesting project for future research.</p>
+<p>A detailed study of the timestamp capture opportunities for both hardware and software timestamping revealed that the most accurate and interoperable design involves the transmit timestamp at the beginning of the packet and then receive timestamp at the end. This makes it possible to accurately measure the offset and delay even if the ends of the synchronization path operate at different rates. It is described on the Timestamp Capture Principles page.</p>
+<h4>12. Windows client bug</h4>
+<p>The Windows XP and Vista clients send the NTP request in symmetric active mode rather than client mode. An unsuspecting server could mobilize a symmetric passive association, which is a serious security vulnerability. The NTPv4 servers, including those at NIST and USNO, discard symmetric active requests unless cryptographically authenticated, so Windows clients do not work. The Microsoft KB 875424 discusses the preferred workaround; however, an optional workaround is now available so that, if the request is not authenticated, the server responds with symmetric passive mode, but without mobilize an association. The workaround is enabled with the WINTIME build option.</p>
+<p>The spec assumes that either peer in symmetric modes can synchronize the other should a peer lose all sources. The workaround violates that assumption and some legitimate configuration might be badly misused. It should be used only with this understanding.</p>
+<h4>13. Autonomous configuration</h4>
+<p>The autonomous configuration (pool and manycast) code was refined to more reliably prune excess servers. If a truechimer is discarded by the clustering algorithm and the total number of survivors is greater than the maxclock option of the tos command, it is considered excess and shows a &quot;#&quot; tally code. If the association is ephemeral and survives the clustering algorithm, the watchdog counter is reset. If the watchdog timer expires and the total number of associations is greater than the maxclock option of the tos command, it is demobilized. This behavior is not considered in the NTPv4 protocol specification.</p>
+<h4>14. Code ornamentation</h4>
+<p>When auditing the code and figuring out its historic origin and evolution, additional commentary has been added so future generations can figure it out, too. </p>
+<p>David L. Mills<br>
+ 17 March 2008<br>
+</p>
+<hr>
+<p><script type="text/javascript" language="javascript" src="scripts/footer.txt"></script></p>
+</body>
+</html>
diff --git a/html/howto.html b/html/howto.html
new file mode 100644
index 0000000..e89fa78
--- /dev/null
+++ b/html/howto.html
@@ -0,0 +1,109 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>How to Write a Reference Clock Driver</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>How to Write a Reference Clock Driver</h3>
+<img src="pic/pogo4.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>You need a little magic.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:08<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#desc">Description</a></li>
+ <li class="inline"><a href="#file">Files Which Need to be Changed</a></li>
+ <li class="inline"><a href="#intf">Interface Routine Overview</a></li>
+ <li class="inline"><a href="#pps">Pulse-per-Second Interface</a></li>
+</ul>
+<hr>
+<h4 id="desc">Description</h4>
+<p>NTP reference clock support maintains the fiction that the clock is actually an ordinary server in the NTP tradition, but operating at a synthetic stratum of zero. The entire suite of algorithms filter the received data and select the best sources to correct the system clock. No packets are exchanged with a reference clock; however, the transmit, receive and packet procedures are replaced with code to simulate them.</p>
+<p>The driver assumes three timescales: standard time maintained by a distant laboratory such as USNO or NIST, reference time maintained by the external radio and the system time maintained by NTP. The radio synchronizes reference time via radio, satellite or modem. As the transmission means may not always be reliable, most radios continue to provide clock updates for some time after signal loss using an internal reference oscillator. In such cases the radio may or may not reveal the time since last synchronized or the estimated time error.</p>
+<p>All three timescales run only in Coordinated Universal Time (UTC) and are not adjusted for local timezone or standard/daylight time. The local timezone, standard/daylight indicator and year, if provided, are ignored. However, it is important to determine whether a leap second is to be inserted in the UTC timescale in the near future so NTP can insert it in the system timescale at the appropriate epoch.</p>
+<p>The interface routines in the <tt>ntp_refclock.c</tt> source file call the following driver routines via a transfer vector:</p>
+<dl>
+ <dt><tt>startup</tt></dt>
+ <dd>The association has just been mobilized. The driver may allocate a private structure and open the device(s) required.</dd>
+ <dt><tt>shutdown</tt></dt>
+ <dd>The association is about to be demobilized. The driver should close all device(s) and free private structures.</dd>
+ <dt><tt>receive</tt></dt>
+ <dd>A timecode string is ready for retrieval using the <tt>refclock_gtlin()</tt> or <tt>refclock_gtraw()</tt> routines and provide clock updates.</dd>
+ <dt><tt>poll</tt></dt>
+ <dd>Called at poll timeout, by default 64 s. Ordinarily, the driver will send a poll sequence to the radio as required.</dd>
+ <dt><tt>timer</tt></dt>
+ <dd>Called once per second. This can be used for housekeeping functions. In the case with pulse-per-second (PPS) signals, this can be used to process the signals and provide clock updates.</dd>
+</dl>
+<p>The receive routine retrieves a timecode string via serial or parallel port, PPS signal or other means. It decodes the timecode in days, hours, minutes, seconds and nanoseconds and checks for errors. It provides these data along with the on-time timestamp to the <tt>refclock_process</tt> routine, which saves the computed offset in a 60-sample circular buffer. On occasion, either by timeout, sample count or call to the poll routine, the driver calls <tt>refclock_receive</tt> to process the circular buffer samples and update the system clock.</p>
+<p>The best way to understand how the clock drivers work is to study one of the drivers already implemented, such as <tt>refclock_wwvb.c</tt>. The main interface is the <tt>refclockproc</tt> structure, which contains for most drivers the decoded timecode, on-time timestamp, reference timestamp, exception reports and statistics tallies, etc. The support routines are passed a pointer to the <tt>peer</tt> structure, which contains a pointer to the <tt>refclockproc</tt> structure, which in turn contains a pointer to the unit structure, if used. For legacy purposes, a table <tt>typeunit[type][unit]</tt> contains the peer structure pointer for each configured clock type and unit. This structure should not be used for new implementations.</p>
+<p>Radio and modem reference clocks by convention have addresses of the form <tt>127.127.<i>t</i>.<i>u</i></tt>, where <i>t</i> is the clock type and <i>u</i> in the range 0-3 is used to distinguish multiple instances of clocks of the same type. Most clocks require a serial or parallel port or special bus peripheral. The particular device is normally specified by adding a soft link <tt>/dev/device<i>u</i></tt> to the particular hardware device.</p>
+<p>By convention, reference clock drivers are named in the form <tt>refclock_<i>xxxx</i>.c</tt>, where <tt><i>xxxx</i></tt> is a unique string. Each driver is assigned a unique type number, long-form driver name, short-form driver name and device name. The existing assignments are in the <a href="refclock.html">Reference Clock Drivers</a> page and its dependencies. All drivers supported by the particular hardware and operating system are automatically detected in the autoconfigure phase and conditionally compiled.</p>
+<h4>Conventions, Fudge Factors and Flags</h4>
+<p>Most drivers support manual or automatic calibration for systematic offset bias using values encoded in the <tt>fudge</tt> configuration command. By convention, the <tt>time1</tt> value defines the calibration offset in seconds. For those drivers that support statistics collection using the <tt>filegen</tt> utility and the <tt>clockstats</tt> file, the <tt>flag4</tt> switch enables the utility.</p>
+<p>If the calibration feature has been enabled, the <tt>flag1</tt> switch is set and the PPS signal is actively disciplining the system time, the <tt>time1</tt> value is automatically adjusted to maintain a residual offset of zero. Once the its value has stabilized, the value can be inserted in the configuration file and the calibration feature disabled.</p>
+<h4 id="file">Files Which Need to be Changed</h4>
+<p>When a new reference clock driver is installed, the following files need to be edited. Note that changes are also necessary to properly integrate the driver in the configuration and makefile scripts, but these are decidedly beyond the scope of this page.</p>
+<dl>
+ <dt><tt>./include/ntp.h</tt></dt>
+ <dd>The reference clock type defines are used in many places. Each driver is assigned a unique type number. Unused numbers are clearly marked in the list. A unique <tt>REFCLK_<i>xxxx</i></tt> identification code should be recorded in the list opposite its assigned type number.</dd>
+ <dt><tt>./libntp/clocktypes.c</tt></dt>
+ <dd>The <tt>./libntp/clktype</tt> array is used by certain display functions. A unique short-form name of the driver should be entered together with its assigned identification code.</dd>
+ <dt><tt>./ntpd/ntp_control.c</tt></dt>
+ <dd>The <tt>clocktypes</tt> array is used for certain control message displays functions. It should be initialized with the reference clock class assigned to the driver, as per the NTP specification RFC-1305. See the <tt>./include/ntp_control.h</tt> header file for the assigned classes.</dd>
+ <dt><tt>./ntpd/refclock_conf.c</tt></dt>
+ <dd>This file contains a list of external structure definitions which are conditionally defined. A new set of entries should be installed similar to those already in the table. The <tt>refclock_conf</tt> array is a set of pointers to transfer vectors in the individual drivers. The external name of the transfer vector should be initialized in correspondence with the type number.</dd>
+</dl>
+<h4 id="intf">Interface Routine Overview</h4>
+<dl>
+ <dt><tt>refclock_newpeer</tt> - initialize and start a reference clock.</dt>
+ <dd>This routine allocates and initializes the interface structure which supports a reference clock in the form of an ordinary NTP peer. A driver-specific support routine completes the initialization, if used. Default peer variables which identify the clock and establish its reference ID and stratum are set here. It returns one if success and zero if the clock address is invalid or already running, insufficient resources are available or the driver declares a bum rap.</dd>
+ <dt><tt>refclock_unpeer</tt> - shut down a clock</dt>
+ <dd>This routine is used to shut down a clock and return its resources to the system.</dd>
+ <dt><tt>refclock_transmit</tt> - simulate the transmit procedure</dt>
+ <dd>This routine implements the NTP transmit procedure for a reference clock. This provides a mechanism to call the driver at the NTP poll interval, as well as provides a reachability mechanism to detect a broken radio or other madness.</dd>
+ <dt><tt>refclock_process</tt> - insert a sample in the circular buffer</dt>
+ <dd>This routine saves the offset computed from the on-time timestamp and the days, hours, minutes, seconds and nanoseconds in the circular buffer. Note that no provision is included for the year, as provided by some (but not all) radio clocks. Ordinarily, the year is implicit in the Unix file system and hardware/software clock support, so this is ordinarily not a problem.</dd>
+ <dt><tt>refclock_receive</tt> - simulate the receive and packet procedures</dt>
+ <dd>This routine simulates the NTP receive and packet procedures for a reference clock. This provides a mechanism in which the ordinary NTP filter, selection and combining algorithms can be used to suppress misbehaving radios and to mitigate between them when more than one is available for backup.</dd>
+ <dt><tt>refclock_gtraw</tt>, <tt>refclock_gtlin</tt> - read the buffer and on-time timestamp</dt>
+ <dd>These routines return the data received from the clock and the on-time timestamp. The <tt>refclock_gtraw</tt> routine returns a batch of one or more characters returned by the Unix terminal routines in raw mode. The <tt>refclock_gtlin</tt> routine removes the parity bit and control characters and returns all the characters up to and including the line terminator. Either routine returns the number of characters delivered.</dd>
+ <dt><tt>refclock_open</tt> - open a serial port for reference clock</dt>
+ <dd>This routine opens a serial port for I/O and sets default options. It returns the file descriptor if success and zero if failure.</dd>
+ <dt><tt>refclock_ioctl</tt> - set serial port control functions</dt>
+ <dd>This routine attempts to hide the internal, system-specific details of serial ports. It can handle POSIX (<tt>termios</tt>), SYSV (<tt>termio</tt>) and BSD (<tt>sgtty</tt>) interfaces with varying degrees of success. The routine returns one if success and zero if failure.</dd>
+ <dt><tt>refclock_ppsapi</tt></dt>
+ <dd>This routine initializes the Pulse-per-Second interface (see below).</dd>
+ <dt><tt>refclock_pps</tt></dt>
+ <dd>This routine is called once per second to read the latest PPS offset and save it in the circular buffer (see below).</dd>
+</dl>
+<h4 id="pps">Pulse-per-Second Interface</h4>
+<p>When the Pulse-per-Second Application Interface (RFC 2783) is present, a
+ compact PPS interface is available to all drivers. See the <a href="prefer.html">Mitigation
+ Rules and the Prefer Peer</a> page for further information. To use this interface,
+ include the <tt>timeppps.h</tt> and <tt>refclock_atom.h</tt> header files
+ and define the <tt>refclock_atom</tt> structure in the driver private storage.
+ The <tt>timepps.h</tt> file is specific to each operating system and may not
+ be available for some systems.</p>
+<p>To use the interface, call <tt>refclock_ppsapi</tt> from the startup routine
+ passing the device file descriptor and <tt>refclock_atom</tt> structure pointer.
+ Then, call <tt>refclock_pps</tt> from the timer routine passing the association
+ pointer and <tt>refclock_atom</tt> structure pointer. See the <tt>refclock_atom.c</tt> file
+ for examples and calling sequences. If the PPS signal is valid, the offset
+ sample will be save in the circular buffer and a bit set in the association
+ flags word indicating the sample is valid and the driver an be selected as
+ a PPS peer. If this bit is set when the poll routine is called, the driver
+ calls the <tt>refclock_receive</tt> routine to process the samples in the
+ circular buffer and update the system clock.</p>
+<hr>
+<div align="center"> <img src="pic/pogo1a.gif" alt="gif"> </div>
+<br>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/huffpuff.html b/html/huffpuff.html
new file mode 100644
index 0000000..2be4d4a
--- /dev/null
+++ b/html/huffpuff.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>The Huff-n'-Puff Filter</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>The Huff-n'-Puff Filter</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:09<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>In scenarios where a considerable amount of data are downloaded or uploaded using DSL or telephone modem lines, timekeeping quality can be seriously degraded. This occurs because the traffic volume, and thus the queuing delays, on the upload and download directions of transmission can be very different. In many cases the apparent time errors are so large as to exceed the step threshold and a step correction can occur during and after the data transfer.</p>
+<p>The huff-n'-puff filter is designed to correct the apparent time offset in these cases. It depends on knowledge of the propagation delay when no other traffic is present, such as during other than work hours. The filter remembers the minimum delay over the most recent interval measured usually in hours. Under conditions of large delay, the filter corrects the apparent offset using the sign of the offset and the difference between the apparent delay and minimum delay. The name of the filter reflects the negative (huff) and positive (puff) correction, which depends on the sign of the offset. The filter is activated by the <tt>tinker huffpuff</tt> command, as described in the <a href="miscopt.html">Miscellaneous Options</a> page.</p>
+<hr>
+<div align="center"><img src="pic/flt4.gif" alt="gif">
+<p>Figure 1. Huff-n'-Puff Wedge Scattergram</p>
+</div>
+<p>Figure 1 shows how the huff-n'-puff filter works. Recall from the <a href="filter.html">Clock Filter Algorithm</a> page that the wedge scattergram plots sample points (<em>x</em>, <em>y</em>) corresponding to the measured delay and offset, and that the limb lines are at slope &plusmn;0.5. Note in the figure that the samples are clustered close to the upper limb line, representing heavy traffic in the download direction. The apparent offset <i>y</i><sub>0</sub> is near zero at the minimum delay <i>x</i><sub>0</sub>, which is near 0.1s. Thus, for a point (<em>x</em>, <em>y</em>), the true offset is</p>
+<blockquote>
+ <p> &theta; = <em>y</em> <font face="symbol">-</font> (<em>x </em><font face="symbol">- </font><i>x</i><sub>0</sub>) / 2 for <em>y</em> &gt; <i>y</i><sub>0</sub> at or near the upper limb line or<br>
+ &theta; = <em>y</em> <font face="symbol">+</font> (<em>x </em><font face="symbol">- </font><i>x</i><sub>0</sub>) / 2 for <em>y</em> &lt; <i>y</i><sub>0</sub> at or near the lower limb line.</p>
+</blockquote>
+<p>In either case the associated delay is &delta; = <em>x</em>.</p>
+<p>In the interior of the wedge scattergram far from the limb lines, the corrections are less effective and can lead to significant errors if the area between the limb lines is heavily populated.</p>
+<hr>
+<p><script type="text/javascript" language="javascript" src="scripts/footer.txt"></script></p>
+</body>
+</html>
diff --git a/html/icons/home.gif b/html/icons/home.gif
new file mode 100644
index 0000000..e181298
--- /dev/null
+++ b/html/icons/home.gif
Binary files differ
diff --git a/html/icons/mail2.gif b/html/icons/mail2.gif
new file mode 100644
index 0000000..21bc1c4
--- /dev/null
+++ b/html/icons/mail2.gif
Binary files differ
diff --git a/html/icons/sitemap.png b/html/icons/sitemap.png
new file mode 100644
index 0000000..17c7c55
--- /dev/null
+++ b/html/icons/sitemap.png
Binary files differ
diff --git a/html/index.html b/html/index.html
new file mode 100644
index 0000000..d409837
--- /dev/null
+++ b/html/index.html
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>The Network Time Protocol (NTP) Distribution</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>The Network Time Protocol (NTP) Distribution</h3>
+<img src="pic/barnstable.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html"><i>P.T. Bridgeport Bear</i>; from <i>Pogo</i>, Walt Kelly</a>
+<p>Pleased to meet you.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Mar-2014 05:41<!-- #EndDate -->
+</p>
+<br clear="left">
+<h4>Related Links</h4>
+<ul>
+ <li>A list of all links is on the <a href="sitemap.html">Site Map</a> page.</li>
+</ul>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#hand">The Handbook</a></li>
+ <li class="inline"><a href="#build">Building and Installing NTP</a></li>
+ <li class="inline"><a href="#prob">Resolving Problems</a></li>
+ <li class="inline"><a href="#info">Further Information</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>Note: The NTP Version 4 software contained in this distribution is available without charge under the conditions set forth in the <a href="copyright.html">Copyright Notice</a>.</p>
+<dl>
+ <dd>It is very important that readers understand that the NTP document collection began 25 years ago and remains today a work in progress. It has evolved as new features were invented and old features retired. It has been widely copied, cached and morphed to other formats, including man pages, with varying loss of fidelity. However, these HTML pages are the ONLY authoritative and definitive reference. Readers should always use the collection that comes with the distribution they use. A copy of the online collection at <a href="http://www.ntp.org">www.ntp.org</a> is normally included in the most recent snapshot, but might not agree with an earlier snapshot or release version.</dd>
+</dl>
+<p>This distribution is an implementation of RFC-5905 &quot;Network Time Protocol Version 4: Protocol and Algorithms Specification&quot;.<br>
+ NTP is widely used to synchronize a computer to Internet time servers or other sources, such as a radio or satellite receiver or telephone modem service. It can also be used as a server for dependent clients. It provides accuracies typically less than a millisecond on LANs and up to a few milliseconds on WANs. Typical NTP configurations utilize multiple redundant servers and diverse network paths in order to achieve high accuracy and reliability.</p>
+<p>This distribution includes a simulation framework in which substantially all the runtime NTP operations and most features can be tested and evaluated. This has been very useful in exploring in vitro response to unusual circumstances or over time periods impractical in vivo. Details are on the <a href="ntpdsim.html">Network Time Protocol (NTP) Simulator</a> page.</p>
+<h4 id="hand">The Handbook</h4>
+<p>A good deal of tutorial and directive information is available on the handbook pages. These should be read in conjunction with the command and option information available on the pages listed on the sitemap page.</p>
+<dl>
+ <dt><a href="release.html">NTP Version 4 Release Notes</a></dt>
+ <dd>Lists recent changes and new features in the current distribution.</dd>
+ <dt><a href="assoc.html">Association Management</a></dt>
+ <dd>Describes how to configure servers and peers and manage the various options. Includes automatic server discovery schemes.</dd>
+ <dt><a href="discover.html">Automatic Server Discovery Schemes</a></dt>
+ <dd>Describes automatic server discovery using broadcast, multicast, manycast and server pool scheme.</dd>
+ <dt><a href="access.html">Access Control Support</a></dt>
+ <dd>Describes the access control mechanisms that can be used to limit client access to various time and management functions.</dd>
+ <dt><a href="authentic.html">Authentication Support</a></dt>
+ <dd>Describes the authentication mechanisms for symmetric-key and public-key cryptography.</dd>
+ <dt><a href="rate.html">Rate Management</a></dt>
+ <dd>Describes the principles of rate management to minimize network load and defend against DoS attacks.</dd>
+ <dt>&nbsp;</dt>
+ <dt><a href="refclock.html">Reference Clock Support</a></dt>
+ <dd>Describes the collection of radio clocks used to synchronize primary servers.</dd>
+ <dt><a href="warp.html">How NTP Works</a></dt>
+ <dd>Gives an overview of the NTP daemon architecture and how it works.</dd>
+</dl>
+<h4 id="build">Building and Installing NTP</h4>
+<p>NTP supports Unix, VMS and Windows (2000 and later) systems. The <a href="build.html">Building and Installing the Distribution</a> page details the procedures for building and installing on a typical system. This distribution includes drivers for many radio and satellite receivers and telephone modem services in the US, Canada and Europe. A list of supported drivers is on the <a href="refclock.html">Reference Clock Drivers</a> page. The default build includes the debugging options and all drivers that run on the target machine; however, options and drivers can be included or excluded using options on the <a href="config.html">Configuration Options</a> page.</p>
+<h4 id="prob">Resolving Problems</h4>
+<p>Like other things in modern Internet life, NTP problems can be devilishly intricate. This distribution includes a number of utilities designed to identify and repair problems using an integrated management protocol supported by the <a href="ntpq.html"><tt>ntpq</tt></a> utility program. </p>
+<p>The <a href="debug.html">NTP Debugging Techniques</a> and <a href="hints.html">Hints and Kinks</a> pages contain useful information for identifying problems and devising solutions. Additional information on reference clock driver construction and debugging is in the <a href="rdebug.html">Debugging Hints for Reference Clock Drivers</a> page.</p>
+<p>Users are invited to report bugs and offer suggestions via the <a href="bugs.html">NTP Bug Reporting Procedures</a> page.</p>
+<h4 id="info">Further Information</h4>
+<p>The <a href="sitemap.html">Site Map</a> page contains a list of document collections arranged by topic. The Program Manual Pages collection may be the best place to start. The <a href="comdex.html">Command Index</a> collection contains a list of all configuration file commands together with a short function description. A great wealth of additional information is available via the External Links collection, including a book and numerous background papers and briefing presentations.</p>
+<p>Background information on computer network time synchronization is on the <a href="http://www.eecis.udel.edu/%7emills/exec.html">Executive Summary - Computer Network Time Synchronization</a> page. Discussion on new features and interoperability with previous NTP versions is on the <a href="release.html">NTP Version 4 Release Notes</a> page. Background information, bibliography and briefing slides suitable for presentations are on the <a href="http://www.eecis.udel.edu/%7emills/ntp.html">Network Time Synchronization Research Project</a> page. Additional information is at the NTP web site <a href="http://www.ntp.org">www.ntp.org</a>.</p>
+<hr>
+<div align="center"> <img src="pic/pogo1a.gif" alt="gif"></div>
+<br>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/kern.html b/html/kern.html
new file mode 100644
index 0000000..b166045
--- /dev/null
+++ b/html/kern.html
@@ -0,0 +1,32 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Kernel Model for Precision Timekeeping</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Kernel Model for Precision Timekeeping</h3>
+<p><img src="pic/alice61.gif" alt="gif" align="left"> <a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a></p>
+<p>Alice finds the kernel a house of cards.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:10<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+<hr>
+<p>The technical report [2], which is a revision and update of an earlier report [3], describes an engineering model for a precision clock discipline function for a generic operating system. The model is the same hybrid phase/frequecy-lock feedback loop used by <tt>ntpd</tt>, but implemented in the kernel. The code described in [2] is included in Solaris and Digital/Compaq/HP Tru64. It provides two system calls <tt>ntp_gettime()</tt> and <tt>ntp_adjtime()</tt> and can discipline the system clock with microsecond resolution. However, newer hardware and kernels with the same system calls can discipline the clock with nanosecond resolution. The new code described in [1] is in FreeBSD, Linux and Tru64. The software and documentation, including a simulator used to verify correct behavior, but not involving licensed code, is available in the <a href="ftp://ftp.udel.edu/pub/ntp/software/nanokernel.tar.gz">nanokernel.tar.gz</a> distribution</p>
+<p>Ordinarily, the kernel clock discipline function is used with the NTP daemon, but could be used for other purposes. The <a href="ntptime.html"><tt>ntptime</tt></a> utility program can be used to control it manually.</p>
+<p>The kernel model also provides support for an external precision timing source, such as described in the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. The new system calls are used by the <a href="kernpps.html">PPSAPI interface</a> and in turn by the <a href="drivers/driver22.html">PPS Clock Discipline</a> driver (type 22) to provide synchronization limited in principle only by the accuracy and stability of the external timing source. Typical results with the PPS signal from a GPS receiver and a modern computer are in the 3 &mu;s range.</p>
+<h4>References</h4>
+<ol>
+ <li>Mills, D.L., and P.-H. Kamp. The nanokernel. <i>Proc. Precision Time and Time Interval (PTTI) Applications and Planning Meeting</i> (Reston VA, November 2000). Paper: <a href="http://www.eecis.udel.edu/%7emills/database/papers/nano/nano2.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/papers/nano/nano2.pdf">PDF</a>, Slides: <a href="http://www.eecis.udel.edu/%7emills/database/brief/nano/nano.html">HTML</a> | <a href="http://www.eecis.udel.edu/%7emills/database/brief/nano/nano.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/brief/nano/nano.pdf">PDF</a> | <a href="http://www.eecis.udel.edu/%7emills/database/brief/nano/nano.ppt">PowerPoint</a></li>
+ <li>Mills, D.L. Unix kernel modifications for precision time synchronization. Electrical Engineering Department Report 94-10-1, University of Delaware, October 1994, 24 pp. Abstract: <a href="http://www.eecis.udel.edu/%7emills/database/reports/kern/kerna.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/reports/kern/kerna.pdf">PDF</a>, Body: <a href="http://www.eecis.udel.edu/%7emills/database/reports/kern/kernb.ps">PostScript</a> | <a href="http://www.eecis.udel.edu/%7emills/database/reports/kern/kernb.pdf">PDF</a></li>
+ <li>Mills, D.L. A kernel model for precision timekeeping. Network Working Group Report RFC-1589, University of Delaware, March 1994. 31 pp. <a href="http://www.eecis.udel.edu/%7emills/database/rfc/rfc1589.txt">ASCII</a></li>
+</ol>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/kernpps.html b/html/kernpps.html
new file mode 100644
index 0000000..b7536bd
--- /dev/null
+++ b/html/kernpps.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>PPSAPI Interface for Precision Time Signals</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>PPSAPI Interface for Precision Time Signals</h3>
+<img src="pic/tonea.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>NBS Special Publication 432, 1979</i></a> (out of print)
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:10<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+ <br clear="left">
+</p>
+<hr>
+<h4>Introduction</h4>
+<p>RFC-2783 describes the PPSAPI application programming interface for external precision time signals, such as the pulse-per-second (PPS) signal generated by some radio clocks and cesium oscillators. The PPSAPI provides a generic capability in the ubiquitous Unix kernel which can be used for a wide variety of measurement applications, including network time synchronization and related experiments. The hardware to do this requires only a serial port and a modem control lead, such as the data carrier detect (DCD) lead, which can be driven by an external source via a level converter/pulse generator such as described on the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. In some systems a parallel port can be used for the same purpose.</p>
+<p>The PPSAPI interface defined in RFC-2783 is the only PPS interface supported in NTP Version 4. The PPSAPI is supported in stock FreeBSD and, with the addition of the <tt>PPSkit</tt> kernel module, in Linux.</p>
+<p>The special header file <tt>/usr/include/sys/timepps.h</tt> implements the PPSAPI using whatever primitives are available in each archeticture and operating system. It obsoletes previous APIs based on the <tt>tty_clock</tt> and <tt>ppsclock</tt> line disciplines and streams modules, which are no longer supported.</p>
+<p>The <a href="drivers/driver22.html">PPS Clock Discipline</a> driver (type 22) uses the PPSAPI in conjunction with a local radio clock or remote NTP&nbsp;server as a reference clock. The driver can also use the PPSAPI&nbsp;as an interface directly to the kernel PPS facility as described on the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page.</p>
+<h4>PPSAPI Application Program Interface</h4>
+<p>The PPSAPI interface provides the following functions:</p>
+<dl>
+ <dt><tt>time_pps_create</tt></dt>
+ <dd>Creates a PPS interface instance and returns a handle to it.</dd>
+ <dt><tt>time_pps_destroy</tt></dt>
+ <dd>Destroys a PPS interface and returns the resources used.</dd>
+ <dt><tt>time_pps_setparams</tt></dt>
+ <dd>Sets the parameters associated with a PPS interface instance, including offsets to be automatically added to captured timestamps.</dd>
+ <dt><tt>time_pps_getparams</tt></dt>
+ <dd>Returns the parameters associated with a PPS interface instance.
+ </dd><dt><tt>time_pps_getcap</tt></dt>
+ <dd>Returns the capabilities of the current interface and kernel implementation.</dd>
+ <dt><tt>time_pps_fetch</tt></dt>
+ <dd>Returns the current timestamps associated with a PPS interface instance in either nanoseconds and nanoseconds (Unix <tt>timespec</tt>) or seconds and fraction (NTP) format.</dd>
+ <dt><tt>time_pps_kcbind</tt></dt>
+ <dd>If kernel PPS processing is supported, this binds the support to the associated PPS interface instance.</dd>
+</dl>
+<p>The entire PPS interface functionality is currently provided by inline code in the <tt>timepps.h</tt> header file. While not all implementations support the full PPSAPI specification, they do support all the functions required for the PPS driver described next. The FreeBSD, Linux and Solaris implementations can be used with the stock kernels provided with those systems; however, the Tru64 and SunOS kernels require additional functions not provided in the stock kernels. Solaris users are cautioned that these functions operate improperly in Solaris versions prior to 2.8 with patch Generic_108528-02. Header files for other systems can be found via the web at <a href="ftp://ftp.udel.edu/pub/ntp/software/nanokernel.tar.gz">nanokernel.tar.gz</a>.</p>
+<hr>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/keygen.html b/html/keygen.html
new file mode 100644
index 0000000..191b714
--- /dev/null
+++ b/html/keygen.html
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntp-keygen - generate public and private keys</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntp-keygen</tt> - generate public and private keys</h3>
+<p><img src="pic/alice23.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a></p>
+<p>Alice holds the key.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:11<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#synop">Synopsis</a></li>
+ <li class="inline"><a href="#descrip">Description</a></li>
+ <li class="inline"><a href="#run">Running the program</a></li>
+ <li class="inline"><a href="#cmd">Command Line Options</a></li>
+ <li class="inline"><a href="#rand">Random Seed File</a></li>
+ <li class="inline"><a href="#fmt">Cryptographic Data Files</a></li>
+ <li class="inline"><a href="#bug">Bugs</a></li>
+</ul>
+<hr>
+<h4 id="synop">Synopsis</h4>
+<p id="intro"><tt>ntp-keygen [ -deGHIMPT ] [ -b <i>modulus</i> ] [ -c [ RSA-MD2 | RSA-MD5 | RSA-SHA
+ | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ] ]
+ [ -C <i>cipher</i> ] [-i <i>group</i> ] [ -l <em>days</em>]
+ [ -m <i>modulus</i> ] [ -p <i>passwd1</i> ] [ -q <i>passwd2</i> ]
+ [ -S [ RSA | DSA ] ] [ -s <i>host</i> ] [ -V <i>nkeys</i> ]</tt></p>
+<h4 id="descrip">Description</h4>
+<p>This program generates cryptographic data files used by the NTPv4 authentication and identity schemes. It can generate message digest keys used in symmetric key cryptography and, if the OpenSSL software library has been installed, it can generate host keys, sign keys, certificates, and identity keys and parameters used by the Autokey public key cryptography. The message digest keys file is generated in a format compatible with NTPv3. All other files are in PEM-encoded printable ASCII format so they can be embedded as MIME attachments in mail to other sites.</p>
+<p>When used to generate message digest keys, the program produces a file containing
+ ten pseudo-random printable ASCII strings suitable for the MD5 message digest algorithm included in the distribution. If the OpenSSL library is installed, it produces an additional ten hex-encoded random bit strings suitable for the SHA1 and other message digest algorithms. The message digest keys file must be distributed and stored using secure means beyond the scope of NTP itself. Besides the keys used for ordinary NTP associations, additional keys can be defined as passwords for the <tt><a href="ntpq.html">ntpq</a></tt> and <tt><a href="ntpdc.html">ntpdc</a></tt> utility programs.</p>
+<p>The remaining generated files are compatible with other OpenSSL applications and other Public Key Infrastructure (PKI) resources. Certificates generated by this program are compatible with extant industry practice, although some users might find the interpretation of X509v3 extension fields somewhat liberal. However, the identity keys are probably not compatible with anything other than Autokey.</p>
+<p>Some files used by this program are encrypted using a private password. The <tt>-p</tt> option specifies the password for local encrypted files and the <tt>-q</tt> option the password for encrypted files sent to remote sites. If no password is specified, the host name returned by the Unix <tt>gethostname()</tt> function, normally the DNS name of the host, is used.</p>
+<p>The <tt>pw</tt> option of the <tt>crypto</tt> configuration command specifies the read password for previously encrypted local files. This must match the local password used by this program. If not specified, the host name is used. Thus, if files are generated by this program without password, they can be read back by <tt>ntpd</tt> without password, but only on the same host.</p>
+<p>Normally, encrypted files for each host are generated by that host and used only by that host, although exceptions exist as noted later on this page. The symmetric keys file, normally called <tt>ntp.keys</tt>, is usually installed in <tt>/etc</tt>. Other files and links are usually installed in <tt>/usr/local/etc</tt>, which is normally in a shared filesystem in NFS-mounted networks and cannot be changed by shared clients. The location of the keys directory can be changed by the <tt>keysdir</tt> configuration command in such cases. Normally, this is in <tt>/etc</tt>.</p>
+<p>This program directs commentary and error messages to the standard error stream <tt>stderr</tt> and remote files to the standard output stream <tt>stdout</tt> where they can be piped to other applications or redirected to files. The names used for generated files and links all begin with the string <tt>ntpkey</tt> and include the file type, generating host and filestamp, as described in the <a href="#fmt">Cryptographic Data Files</a> section below</p>
+<h4 id="run">Running the Program</h4>
+<p>To test and gain experience with Autokey concepts, log in as root and change to the keys directory, usually <tt>/usr/local/etc</tt>. When run for the first time, or if all files with names beginning <tt>ntpkey</tt> have been removed, use the <tt>ntp-keygen </tt>command without arguments to generate a default RSA host key and matching RSA-MD5 certificate with expiration date one year hence. If run again without options, the program uses the existing keys and parameters and generates only a new certificate with new expiration date one year hence.</p>
+<p>Run the command on as many hosts as necessary. Designate one of them as the trusted host (TH) using <tt>ntp-keygen</tt> with the <tt>-T</tt> option and configure it to synchronize from reliable Internet servers. Then configure the other hosts to synchronize to the TH directly or indirectly. A certificate trail is created when Autokey asks the immediately ascendant host towards the TH to sign its certificate, which is then provided to the immediately descendant host on request. All group hosts should have acyclic certificate trails ending on the TH.</p>
+<p>The host key is used to encrypt the cookie when required and so must be RSA type. By default, the host key is also the sign key used to encrypt signatures. A different sign key can be assigned using the <tt>-S</tt> option and this can be either RSA or DSA type. By default, the signature message digest type is MD5, but any combination of sign key type and message digest type supported by the OpenSSL library can be specified using the <tt>-c</tt> option.</p>
+<dd>The rules say cryptographic media should be generated with proventic filestamps, which means the host should already be synchronized before this program is run. This of course creates a chicken-and-egg problem when the host is started for the first time. Accordingly, the host time should be set by some other means, such as eyeball-and-wristwatch, at least so that the certificate lifetime is within the current year. After that and when the host is synchronized to a proventic source, the certificate should be re-generated.</dd>
+<p>Additional information on trusted groups and identity schemes is on the <a href="autokey.html">Autokey Public-Key Authentication</a> page.</p>
+<h4 id="cmd">Command Line Options</h4>
+<dl>
+ <dt><tt>-b <i>modulus</i></tt></dt>
+ <dd>Set the modulus for generating identity keys to <i>modulus</i> bits. The modulus defaults to 256, but can be set from 256 (32 octets) to 2048 (256 octets). Use the larger moduli with caution, as this can consume considerable computing resources and increases the size of authenticated packets.</dd>
+ <dt><tt>-c [ RSA-MD2 | RSA-MD5 | RSA-SHA | RSA-SHA1 | RSA-MDC2 | RSA-RIPEMD160 | DSA-SHA | DSA-SHA1 ]</tt></dt>
+ <dd>Select certificate digital signature and message digest scheme. Note that RSA schemes must be used with an RSA sign key and DSA schemes must be used with a DSA sign key. The default without this option is <tt>RSA-MD5</tt>. If compatibility with FIPS 140-2 is required, either the <tt>DSA-SHA</tt> or <tt>DSA-SHA1</tt> scheme must be used.</dd>
+ <dt><tt>-C <i>cipher</i></tt></dt>
+ <dd>Select the OpenSSL cipher to use for password-protected keys. The <tt>openssl -h</tt> command provided with OpenSSL displays available ciphers. The default without this option is <tt>des-ede3-cbc</tt>.</dd>
+ <dt><tt>-d</tt></dt>
+ <dd>Enable debugging. This option displays the cryptographic data produced for eye-friendly billboards.</dd>
+ <dt><tt>-e</tt></dt>
+ <dd>Extract the IFF or GQ public parameters from the <tt>IFFkey</tt> or <tt>GQkey</tt> keys file previously specified. Send the unencrypted data to the standard output stream <tt>stdout</tt>.</dd>
+ <dt><tt>-G</tt></dt>
+ <dd>Generate a new encrypted GQ key file for the Guillou-Quisquater (GQ) identity scheme. This option is mutually exclusive with the <tt>-I</tt> and <tt>-V</tt> options.</dd>
+ <dt><tt>-H</tt></dt>
+ <dd>Generate a new encrypted RSA public/private host key file.</dd>
+ <dt><tt>-i <i>group</i></tt></dt>
+ <dd>Set the optional Autokey group name to <tt><i>group</i></tt>. This is used in the identity scheme parameter file names. In that role, the default is the host name if no group is provided. The group name, if specified using <tt>-i</tt> or using <tt>-s</tt> following an <tt>@</tt> character, is also used in certificate subject and issuer names in the form <tt><i>host</i>@<i>group</i></tt> and should match the group specified via <tt>crypto ident</tt> or <tt>server ident</tt> in ntpd's configuration file.</dd>
+ <dt><tt>-I</tt></dt>
+ <dd>Generate a new encrypted IFF key file for the Schnorr (IFF) identity scheme. This option is mutually exclusive with the <tt>-G</tt> and <tt>-V</tt> options.</dd>
+ <dt><tt>-l <i>days</i></tt></dt>
+ <dd>Set the lifetime for certificates to <tt><i>days</i></tt>. The default lifetime is one year (365 d).</dd>
+ <dt><tt>-m <i>modulus</i></tt></dt>
+ <dd>Set the modulus for generating files to <i>modulus</i> bits. The modulus defaults to 512, but can be set from 256 (32 octets) to 2048 (256 octets). Use the larger moduli with caution, as this can consume considerable computing resources and increases the size of authenticated packets.</dd>
+ <dt><tt>-M</tt></dt>
+ <dd>Generate a new keys file containing 10 MD5 keys and 10 SHA keys. An MD5 key is a string of 20 random printable ASCII characters, while a SHA key is a string of 40 random hex digits. The file can be edited using a text editor to change the key type or key content. This option is mutually exclusive with all other option.</dd>
+ <dt><tt>-P</tt></dt>
+ <dd>Generate a new private certificate used by the PC identity scheme. By default, the program generates public certificates. Note: the PC identity scheme is not recommended for new installations.</dd>
+ <dt><tt>-p <i>passwd</i></tt></dt>
+ <dd>Set the password for reading and writing encrypted files to <tt><i>passwd.</i></tt> These include the host, sign and identify key files. By default, the password is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
+ <dt><tt>-q <i>passwd</i></tt></dt>
+ <dd>Set the password for writing encrypted IFF, GQ and MV identity files redirected to <tt>stdout</tt> to <tt><i>passwd.</i></tt> In effect, these files are decrypted with the <tt>-p</tt> password, then encrypted with the <tt>-q</tt> password. By default, the password is the string returned by the Unix <tt>gethostname()</tt> routine.</dd>
+ <dt><tt>-S [ RSA | DSA ]</tt></dt>
+ <dd>Generate a new encrypted public/private sign key file of the specified type. By default, the sign key is
+ the host key and has the same type. If compatibly with FIPS 140-2 is required,
+ the sign key type must be <tt>DSA</tt>.</dd>
+ <dt><tt>-s <i>host</i>[@<i>group</i>]</tt></dt>
+ <dd>Specify the Autokey host name, where <tt><i>host</i></tt> is the host name and <tt><i>group</i></tt> is the optional group name. The host name, and if provided, group name are used in <tt><i>host</i>@<i>group</i></tt> form as certificate subject and issuer. Specifying <tt>-s @<i>group</i></tt> is allowed, and results in leaving the host name unchanged, as with <tt>-i <i>group</i></tt>. The group name, or if no group is provided, the host name are also used in the file names of IFF, GQ, and MV identity scheme parameter files. If <tt><i>host</i></tt> is not specified, the default host name is the string returned by the <tt>gethostname()</tt> routine.</dd>
+ <dt><tt>-T</tt></dt>
+ <dd>Generate a trusted certificate. By default, the program generates nontrusted certificates.</dd>
+ <dt><tt>-V <i>nkeys</i></tt></dt>
+ <dd>Generate <tt>nkeys</tt> encrypted server keys for the Mu-Varadharajan (MV) identity scheme. This option is mutually exclusive with the <tt>-I</tt> and <tt>-G</tt> options. Note: support for this option should be considered a work in progress.</dd>
+</dl>
+<h4 id="rand">Random Seed File</h4>
+<p>All cryptographically sound key generation schemes must have means to randomize the entropy seed used to initialize the internal pseudo-random number generator used by the OpenSSL library routines. If a site supports <tt>ssh</tt>, it is very likely that means to do this are already available. The entropy seed used by the OpenSSL library is contained in a file, usually called <tt>.rnd</tt>, which must be available when starting the <tt>ntp-keygen</tt> program or <tt>ntpd</tt> daemon.</p>
+<p>The OpenSSL library looks for the file using the path specified by the <tt>RANDFILE</tt> environment variable in the user home directory, whether root or some other user. If the <tt>RANDFILE</tt> environment variable is not present, the library looks for the <tt>.rnd</tt> file in the user home directory. Since both the <tt>ntp-keygen</tt> program and <tt>ntpd</tt> daemon must run as root, the logical place to put this file is in <tt>/.rnd</tt> or <tt>/root/.rnd</tt>. If the file is not available or cannot be written, the program exits with a message to the system log.</p>
+<h4 id="fmt">Cryptographic Data Files</h4>
+<p>File and link names are in the form <tt>ntpkey_<i>key</i>_<i>name</i>.<i>fstamp</i></tt>, where <tt><i>key</i></tt> is the key or parameter type, <tt><i>name</i></tt> is the host or group name and <tt><i>fstamp</i></tt> is the filestamp (NTP seconds) when the file was created). By convention, <em><tt>key</tt></em> names in generated file names include both upper and lower case characters, while <em><tt>key</tt></em> names in generated link names include only lower case characters. The filestamp is not used in generated link names.</p>
+<p>The <em><tt>key</tt></em> name is a string defining the cryptographic key type. Key types include public/private keys <tt>host</tt> and <tt>sign</tt>, certificate <tt>cert</tt> and several challenge/response key types. By convention, client files used for challenges have a <tt>par</tt> subtype, as in the IFF challenge <tt>IFFpar</tt>, while server files for responses have a <tt>key</tt> subtype, as in the GQ response <tt>GQkey</tt>.</p>
+<p>All files begin with two nonencrypted lines. The first line contains the file name in the format <tt>ntpkey_<i>key</i>_<i>host</i>.<i>fstamp</i></tt>. The second line contains the datestamp in conventional Unix <tt>date</tt> format. Lines beginning with <tt>#</tt> are ignored.</p>
+<p>The remainder of the file contains cryptographic data encoded first using ASN.1 rules, then encrypted using the DES-CBC algorithm with given password and finally written in PEM-encoded printable ASCII text preceded and followed by MIME content identifier lines.</p>
+<p>The format of the symmetric keys file, ordinarily named <tt>ntp.keys,</tt> is somewhat different than the other files in the interest of backward compatibility. Ordinarily, the file is generated by this program, but it can be constructed and edited using an ordinary text editor.</p>
+<div align="center">
+ <p><img src="pic/sx5.gif" alt="gif"></p>
+ <p>Figure 1. Typical Symmetric Key File</p>
+</div>
+<p>Figure 1 shows a typical symmetric keys file used by the reference implementation. Each line of the file contains three fields, first an integer between 1 and 65534, inclusive, representing the key identifier used in the <tt>server</tt> and <tt>peer</tt> configuration commands. Next is the key type for the message digest algorithm, which in the absence of the OpenSSL library must be <tt>MD5</tt> to designate the MD5 message digest algorithm. If the OpenSSL library is installed, the key type can be any message digest algorithm supported by that library. However, if compatibility with FIPS 140-2 is required, the key type must be either <tt>SHA</tt> or <tt>SHA1</tt>. The key type can be changed using an ASCII text editor.</p>
+<p> An MD5 key consists of a printable ASCII string less than or equal to 16 characters and terminated by whitespace or a # character. An OpenSSL key consists of a hex-encoded ASCII string of 40 characters, which is truncated as necessary.</p>
+<p>Note that the keys used by the <tt>ntpq</tt> and <tt>ntpdc</tt> programs are checked against passwords requested by the programs and entered by hand, so it is generally appropriate to specify these keys in human readable ASCII format.</p>
+<p>The <tt>ntp-keygen</tt> program generates a MD5 symmetric keys file <tt>ntpkey_MD5key_<i>hostname.filestamp</i></tt>. Since the file contains private shared keys, it should be visible only to root and distributed by secure means to other subnet hosts. The NTP daemon loads the file <tt>ntp.keys</tt>, so <tt>ntp-keygen</tt> installs a soft link from this name to the generated file. Subsequently, similar soft links must be installed by manual or automated means on the other subnet hosts. While this file is not used with the Autokey Version 2 protocol, it is needed to authenticate some remote configuration commands used by the <a href="ntpq.html"><tt>ntpq</tt></a> and <a href="ntpdc.html"><tt>ntpdc</tt></a> utilities.</p>
+<h4 id="bug">Bugs</h4>
+<p>It can take quite a while to generate some cryptographic values, from one to several minutes with modern architectures such as UltraSPARC and up to tens of minutes to an hour with older architectures such as SPARC IPC.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/leap.html b/html/leap.html
new file mode 100644
index 0000000..8abec14
--- /dev/null
+++ b/html/leap.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Leap Second Processing</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Leap Second Processing</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:11<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>About every eighteen months the International Earth Rotation Service (IERS) issues a bulletin announcing the insertion of a leap second in the Universal Coordinated Time (UTC) timescale. Ordinarily, this happens at the end of the last day of June or December; but, in principle, it could happen at the end of any month. While these bulletins are available on the Internet at <a href="http://www.iers.org">www.iers.org</a>, advance notice of leap seconds is also available in signals broadcast from national time and frequency stations, in GPS signals and in telephone modem services. Many, but not all, reference clocks recognize these signals and many, but not all, drivers for them can decode the signals and set the leap bits in the timecode accordingly. This means that many, but not all, primary servers can pass on these bits in the NTP packet heard to dependent secondary servers and clients. Secondary servers can pass these bits to their dependents and so on throughout the NTP subnet.</p>
+<p> A leap second is inserted following second 59 of the last minute of the day and becomes second 60 of that day. A leap second is deleted by omitting second 59 of the last minute of the day, although this has never happened and is highly unlikely to happen in future. So far as is known, there are no provisions in the Unix or Windows libraries to account for this occasion other than to affect the conversion of an NTP datestamp or timestamp to conventional civil time.</p>
+<p>When an update is received from a reference clock or downstratum server, the leap bits are inspected for all survivors of the cluster algorithm. If the number of survivors showing a leap bit is greater than half the total number of survivors, a pending leap condition exists until the end of the current month.</p>
+<p>When no means are available to determine the leap bits from a reference clock or downstratum server, a leapseconds file can be downloaded from time.nist.gov and installed using the <a href="miscopt.html#leapfile">leapfile</a> command. The file includes a list of historic leap seconds and the NTP time of insertion. It is parsed by the <tt>ntpd</tt> daemon at startup and the latest leap time saved for future reference. Each time the clock is set, the current time is compared with the last leap time. If the current time is later than the last leap time, nothing further is done. If earlier, the leap timer is initialized with the time in seconds until the leap time and counts down from there. When the leap timer is less than one month, a pending leap condition exists until the end of the current month. If the leapseconds file is present, the leap bits for reference clocks and downstratum servers are ignored.</p>
+<p>If the precision time kernel support is available and enabled, at the beginning of the day of the leap event, the leap bits are set by the Unix <tt>ntp_adjtime()</tt> system call to arm the kernel for the leap at the end of the day. The kernel automatically inserts one second exactly at the time of the leap, after which the leap bits are turned off. If the kernel support is not availed or disabled, the leap is implemented as a crude hack by setting the clock back one second using the Unix <tt>settimeofday() </tt>system call, which effectively repeats the last second. Note however that in any case setting the time backwards by one second does not actually set the system clock backwards, but effectively stalls the clock for one second. These points are expanded in the white paper <a href="http://www.eecis.udel.edu/~mills/leap.html">The NTP Timescale and Leap Seconds</a>. If the leap timer is less than one day, the leap bits are set for dependent servers and clients.</p>
+<p>As an additional feature when the NIST leap seconds file is installed, it is possible to determine the number of leap seconds inserted in UTC since UTC began on 1 January 1972. This represents the offset between International Atomic Time (TAI) and UTC. If the precision time kernel modifications are available and enabled, the TAI offset is available to application programs using the <tt>antipasti()</tt> system call. If the Autokey public-key cryptography feature is installed, the TAI offset is automatically propagated along with other cryptographic media to dependent servers and clients.</p>
+<hr>
+<p><script type="text/javascript" language="javascript" src="scripts/footer.txt"></script></p>
+</body>
+</html>
diff --git a/html/miscopt.html b/html/miscopt.html
new file mode 100644
index 0000000..62f41b6
--- /dev/null
+++ b/html/miscopt.html
@@ -0,0 +1,177 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>Miscellaneous Commands and Options</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Miscellaneous Commands and Options</h3>
+<img src="pic/boom3.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>We have three, now looking for more.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/miscopt.txt"></script>
+<hr>
+<h4>Commands and Options</h4>
+<dl>
+ <dt id="broadcastdelay"><tt>broadcastdelay <i>delay</i></tt></dt>
+ <dd>In broadcast and multicast modes, means are required to determine the network delay between the server and client. Ordinarily, this is done automatically by the initial calibration exchanges between the client and server. In some cases, the exchange might not be possible due to network or server access controls. The value of <em><tt>delay</tt></em> is by default zero, in which case the exchange is enabled. If <em><tt>delay</tt></em> is greater than zero, it becomes the roundtrip delay (s), as measured by the Unix <tt>ping</tt> program, and the exchange is disabled. </dd>
+ <dt>&nbsp;</dt>
+ <dt id="driftfile"><tt>driftfile <i>driftfile</i></tt></dt>
+ <dd>This command specifies the complete path and name of the file used to record the frequency of the local clock oscillator. This is the same operation as the <tt>-f</tt> command line option. This command is mutually exclusive with the <tt>freq</tt> option of the <tt>tinker</tt> command.</dd>
+ <dd> If the file exists, it is read at startup in order to set the initial frequency and then updated once per hour or more with the current frequency computed by the daemon. If the file name is specified, but the file itself does not exist, the starts with an initial frequency of zero and creates the file when writing it for the first time. If this command is not given, the daemon will always start with an initial frequency of zero.</dd>
+ <dd>The file format consists of a single line containing a single floating point number, which records the frequency offset measured in parts-per-million (PPM). The file is updated by first writing the current drift value into a temporary file and then renaming this file to replace the old version.</dd>
+ <dt id="enable"><tt>enable [auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats]</tt><br>
+ <tt>disable [auth | bclient | calibrate | kernel | mode7 | monitor | ntp | stats]</tt></dt>
+ <dd>Provides a way to enable or disable various system options. Flags not mentioned are unaffected. Note that most of these flags can be modified remotely using <a href="ntpq.html"><tt>ntpq</tt></a> utility program's <tt>:config</tt> and <tt>config-from-file</tt> commands.
+ <dl>
+ <dt><tt>auth</tt></dt>
+ <dd>Enables the server to synchronize with unconfigured peers only if the peer has been correctly authenticated using either public key or private key cryptography. The default for this flag is enable.</dd>
+ <dt><tt>bclient</tt></dt>
+ <dd>Enables the server to listen for a message from a broadcast or multicast server, as in the <tt>multicastclient</tt> command with default address. The default for this flag is disable.</dd>
+ <dt><tt>calibrate</tt></dt>
+ <dd>Enables the calibrate feature for reference clocks. The default for this flag is disable.</dd>
+ <dt><tt>kernel</tt></dt>
+ <dd>Enables the kernel time discipline, if available. The default for this flag is enable if support is available, otherwise disable.</dd>
+ <dt><tt>mode7</tt></dt>
+ <dd>Enables processing of NTP mode 7 implementation-specific requests which are used by the deprecated <tt>ntpdc</tt> program. The default for this flag is disable. This flag is excluded from runtime configuration using <tt>ntpq</tt>. The <tt>ntpq</tt> program provides the same capabilities as <tt>ntpdc</tt> using standard mode 6 requests.</dd>
+ <dt><tt>monitor</tt></dt>
+ <dd>Enables the monitoring facility. See the <a href="ntpq.html"><tt>ntpq</tt> program</a> and the <tt>monstats</tt> and <tt>mrulist</tt> commands, as well as the <a href="accopt.html#discard">Access Control Options</a> for details.
+ The monitoring facility is also enabled by the presence of <a href="accopt.html#limited"><tt>limited</tt></a> in any <tt>restrict</tt> commands. The default for this flag is enable.</dd>
+ <dt><tt>ntp</tt></dt>
+ <dd>Enables time and frequency discipline. In effect, this switch opens and closes the feedback loop, which is useful for testing. The default for this flag is enable.</dd>
+ <dt><tt>stats</tt></dt>
+ <dd>Enables the statistics facility. See the <a href="monopt.html">Monitoring Options</a> page for further information. The default for this flag is enabled. This flag is excluded from runtime configuration using <tt>ntpq</tt>.</dd>
+ </dl>
+ </dd>
+ <dt id="includefile"><tt>includefile <i>includefile</i></tt></dt>
+ <dd>This command allows additional configuration commands to be included from a separate file. Include files may be nested to a depth of five; upon reaching the end of any include file, command processing resumes in the previous configuration file. This option is useful for sites that run <tt>ntpd</tt> on multiple hosts, with (mostly) common options (e.g., a restriction list).</dd>
+ <dt id="interface"><tt>interface [listen | ignore | drop] [all | ipv4 | ipv6 | wildcard | <i>name</i> | <i>address</i>[/<i>prefixlen</i>]]</tt></dt>
+ <dd>This command controls which network addresses <tt>ntpd</tt> opens, and whether input is dropped without processing. The first parameter determines the action for addresses which match the second parameter. That parameter specifies a class of addresses, or a specific interface name, or an address. In the address case, <tt><i>prefixlen</i></tt> determines how many bits must match for this rule to apply. <tt>ignore</tt> prevents opening matching addresses, <tt>drop</tt> causes <tt>ntpd</tt> to open the address and drop all received packets without examination. Multiple <tt>interface</tt> commands can be used. The last rule which matches a particular address determines the action for it. <tt>interface</tt> commands are disabled if any <a href="ntpd.html#--interface"><tt>-I</tt></a>, <a href="ntpd.html#--interface"><tt>--interface</tt></a>, <a href="ntpd.html#--novirtualips"><tt>-L</tt></a>, or <a href="ntpd.html#--novirtualips"><tt>--novirtualips</tt></a> command-line options are used. If none of those options are used and no <tt>interface</tt> actions are specified in the configuration file, all available network addresses are opened. The <tt>nic</tt> command is an alias for <tt>interface</tt>.</dd>
+ <dt id="leapfile"><tt>leapfile <i>leapfile</i></tt></dt>
+ <dd>This command loads the NIST leapseconds file and initializes the leapsecond values for the next leapsecond time, expiration time and TAI offset. The file can be obtained directly from NIST national time servers using <tt>ftp</tt> as the ASCII file <tt>pub/leap-seconds</tt>.</dd>
+ <dd>The <i>leapfile</i> is scanned when <tt>ntpd</tt> processes the <tt>leapfile</tt> directive or when <tt>ntpd</tt> detects that <i>leapfile</i> has changed. <tt>ntpd</tt> checks once a day to see if the <i>leapfile</i> has changed.</dd>
+ <dd>While not strictly a security function, the Autokey protocol provides means to securely retrieve the current or updated leapsecond values from a server.</dd>
+ <dt id="logconfig"><tt>logconfig <i>configkeyword</i></tt></dt>
+ <dd>This command controls the amount and type of output written to the system <tt>syslog</tt> facility or the alternate <tt>logfile</tt> log file. All <i><tt>configkeyword</tt></i> keywords can be prefixed with <tt>=</tt>, <tt>+</tt> and <tt>-</tt>, where <tt>=</tt> sets the <tt>syslogmask</tt>, <tt>+</tt> adds and <tt>-</tt> removes messages. <tt>syslog messages</tt> can be controlled in four classes (<tt>clock</tt>, <tt>peer</tt>, <tt>sys</tt> and <tt>sync</tt>). Within these classes four types of messages can be controlled: informational messages (<tt>info</tt>), event messages (<tt>events</tt>), statistics messages (<tt>statistics</tt>) and status messages (<tt>status</tt>).</dd>
+ <dd>Configuration keywords are formed by concatenating the message class with the event class. The <tt>all</tt> prefix can be used instead of a message class. A message class may also be followed by the <tt>all</tt> keyword to enable/disable all messages of the respective message class. By default, <tt>logconfig</tt> output is set to <tt>allsync</tt>.</dd>
+ <dd>Thus, a minimal log configuration could look like this:</dd>
+ <dd><tt>logconfig=syncstatus +sysevents</tt></dd>
+ <dd>This would just list the synchronizations state of <tt>ntpd</tt> and the major system events. For a simple reference server, the following minimum message configuration could be useful:</dd>
+ <dd><tt>logconfig=syncall +clockall</tt></dd>
+ <dd>This configuration will list all clock information and synchronization information. All other events and messages about peers, system events and so on is suppressed.</dd>
+ <dt id="logfile"><tt>logfile <i>logfile</i></tt></dt>
+ <dd>This command specifies the location of an alternate log file to be used instead of the default system <tt>syslog</tt> facility. This is the same operation as the <tt>-l </tt>command line option.</dd>
+ <dt id="mru"><tt>mru [maxdepth <i>count</i> | maxmem <i>kilobytes</i> | mindepth <i>count</i> | maxage <i>seconds</i> | initalloc <i>count</i> | initmem <i>kilobytes</i> | incalloc <i>count</i> | incmem <i>kilobytes</i>]</tt></dt>
+ <dd>Controls size limits of the monitoring facility Most Recently Used <a href="ntpq.html#mrulist">(MRU) list</a> of client addresses, which is also used by the <a href="accopt.html#discard">rate control facility</a>.
+ <dl>
+ <dt><tt>maxdepth <i>count</i><br>
+ maxmem <i>kilobytes</i></tt></dt>
+ <dd>Equivalent upper limits on the size of the MRU list, in terms of entries or kilobytes. The actual limit will be up to <tt>incalloc</tt> entries or <tt>incmem</tt> kilobytes larger. As with all
+ of the <tt>mru</tt> options offered in units of entries or kilobytes, if both <tt>maxdepth</tt> and <tt>maxmem</tt> are used, the last one used controls. The default is 1024 kilobytes.</dd>
+ <dt><tt>mindepth <i>count</i></tt></dt>
+ <dd>Lower limit on the MRU list size. When the MRU list has fewer than <tt>mindepth</tt> entries, existing entries are never removed to make room for newer ones, regardless of their age.
+ The default is 600 entries.</dd>
+ <dt><tt>maxage <i>seconds</i></tt></dt>
+ <dd>Once the MRU list has <tt>mindepth</tt> entries and an additional client address is to be added to the list, if the oldest entry was updated more than <tt>maxage</tt> seconds ago, that entry
+ is removed and its storage reused. If the oldest entry was updated more recently, the MRU list
+ is grown, subject to <tt>maxdepth</tt>/<tt>maxmem</tt>. The default is 64 seconds.</dd>
+ <dt><tt>initalloc <i>count</i><br>
+ initmem <i>kilobytes</i></tt></dt>
+ <dd>Initial memory allocation at the time the monitoring facility is first enabled, in terms of entries or kilobytes. The default is 4 kilobytes.</dd>
+ <dt><tt>incalloc <i>count</i><br>
+ incmem <i>kilobytes</i></tt></dt>
+ <dd>Size of additional memory allocations when growing the MRU list, in entries or kilobytes. The default is 4 kilobytes.</dd>
+ </dl>
+ </dd>
+ <dt id="nonvolatile"><tt>nonvolatile <i>threshold</i></tt></dt>
+ <dd>Specify the <i><tt>threshold</tt></i> in PPM to write the frequency file, with default 0.1 PPM. The frequency file is inspected each hour. If the difference between the current frequency and the last value written exceeds the threshold, the file is written and the <tt><em>threshold</em></tt> becomes the new threshold value. If the threshold is not exceeded, it is reduced by half. This is intended to reduce the frequency of unnecessary file writes for embedded systems with nonvolatile memory.</dd>
+ <dt id="phone"><tt>phone <i>dial</i> ...</tt></dt>
+ <dd>This command is used in conjunction with the ACTS modem driver (type 18). The arguments consist of a maximum of 10 telephone numbers used to dial USNO, NIST or European time services. The Hayes command ATDT&nbsp;is normally prepended to the number, which can contain other modem control codes as well.</dd>
+ <dt id="reset"><tt>reset [allpeers] [auth] [ctl] [io] [mem] [sys] [timer]</tt></dt>
+ <dd>Reset one or more groups of counters maintained by ntpd and exposed by <tt>ntpq</tt> and <tt>ntpdc</tt>.</dd>
+ <dt id="saveconfigdir"><tt>saveconfigdir <i>directory_path</i></tt></dt>
+ <dd>Specify the directory in which to write configuration snapshots requested with <tt>ntpq</tt>'s <a href="ntpq.html#saveconfig">saveconfig</a> command. If <tt>saveconfigdir</tt> does not appear in the configuration file, saveconfig requests are rejected by ntpd.</dd>
+ <dt id="setvar"><tt>setvar <i>variable</i> [default]</tt></dt>
+ <dd>This command adds an additional system variable. These variables can be used to distribute additional information such as the access policy. If the variable of the form <tt><i>name</i> = <i>value</i></tt> is followed by the <tt>default</tt> keyword, the variable will be listed as part of the default system variables (<tt>ntpq rv</tt> command). These additional variables serve informational purposes only. They are not related to the protocol other that they can be listed. The known protocol variables will always override any variables defined via the <tt>setvar</tt> mechanism. There are three special variables that contain the names of all variable of the same group. The <tt>sys_var_list</tt> holds the names of all system variables. The <tt>peer_var_list</tt> holds the names of all peer variables and the <tt>clock_var_list</tt> holds the names of the reference clock variables.</dd>
+ <dt id="tinker"><tt>tinker [allan <i>allan</i> | dispersion <i>dispersion</i> | freq <i>freq</i> | huffpuff <i>huffpuff</i> | panic <i>panic</i> | step <i>step</i> | stepout <i>stepout</i>]</tt></dt>
+ <dd>This command alters certain system variables used by the clock discipline algorithm. The default values of these variables have been carefully optimized for a wide range of network speeds and reliability expectations. Very rarely is it necessary to change the default values; but, some folks can't resist twisting the knobs. Options are as follows:</dd>
+ <dd>
+ <dl>
+ <dt><tt>allan <i>allan</i></tt></dt>
+ <dd>Specifies the Allan intercept, which is a parameter of the PLL/FLL clock discipline algorithm, in seconds with default 1500 s.</dd>
+ <dt><tt>dispersion <i>dispersion</i></tt></dt>
+ <dd>Specifies the dispersion increase rate in parts-per-million (PPM) with default 15 PPM.</dd>
+ <dt><tt>freq <i>freq</i></tt></dt>
+ <dd>Specifies the frequency offset in parts-per-million (PPM). This option is mutually exclusive with the driftfile command.</dd>
+ <dt><tt>huffpuff <i>huffpuff</i></tt></dt>
+ <dd>Specifies the huff-n'-puff filter span, which determines the most recent interval the algorithm will search for a minimum delay. The lower limit is 900 s (15 min), but a more reasonable value is 7200 (2 hours).See the <a href="huffpuff.html">Huff-n'-Puff Filter</a> page for further information.</dd>
+ <dt><tt>panic <i>panic</i></tt></dt>
+ <dd>Specifies the panic threshold in seconds with default 1000 s. If set to zero, the panic sanity check is disabled and a clock offset of any value will be accepted.</dd>
+ <dt><tt>step <i>step</i></tt></dt>
+ <dd>Specifies the step threshold in seconds. The default without this command is 0.128 s. If set to zero, step adjustments will never occur. Note: The kernel time discipline is disabled if the step threshold is set to zero or greater than 0.5
+ s. Further details are on the <a href="clock.html">Clock State Machine</a> page.</dd>
+ <dt><tt>stepout <i>stepout</i></tt></dt>
+ <dd>Specifies the stepout threshold in seconds. The default without this command is 300 s. Since this option also affects the training and startup intervals, it should not be set less than the default. Further details are on the <a href="clock.html">Clock State Machine</a> page.</dd>
+ </dl>
+ </dd>
+ <dt id="rlimit"><tt>rlimit [memlock <i>Nmegabytes</i> | stacksize <i>N4kPages</i> | filenum <i>Nfiledescriptors</i>]</tt></dt>
+ <dd>This command alters certain process storage allocation limits, and is only available on some operating systems. Options are as follows:</dd>
+ <dd>
+ <dl>
+ <dt><tt>memlock <i>Nmegabytes</i></tt></dt>
+ <dd>Specify the number of megabytes of memory that can be allocated. Probably only available under Linux, this option is useful when dropping root (the <tt>-i</tt> option). The default is 32 megabytes. Setting this to zero will prevent any attemp to lock memory.</dd>
+ <dt><tt>stacksize <i>N4kPages</i></tt></dt>
+ <dd>Specifies the maximum size of the process stack on systems with the <tt>mlockall()</tt> function. Defaults to 50 4k pages (200 4k pages in OpenBSD).</dd>
+ <dt><tt>filenum <i>Nfiledescriptors</i></tt></dt>
+ <dd>Specifies the maximum number of file descriptors ntp may have open at the same time. Defaults to system default.</dd>
+ </dl>
+ </dd>
+ <dt id="tos"><tt>tos [beacon <i>beacon</i> | ceiling <i>ceiling</i> | cohort {0 | 1} | floor <i>floor</i> | maxclock <i>maxclock </i>| maxdist <i>maxdist</i> | minclock <i>minclock</i> | mindist <i>mindist </i>| minsane <i>minsane</i> | orphan <i>stratum</i> | orphanwait <em>delay</em>]</tt></dt>
+ <dd>This command alters certain system variables used by the the clock selection and clustering algorithms. The default values of these variables have been carefully optimized for a wide range of network speeds and reliability expectations. Very rarely is it necessary to change the default values; but, some folks can't resist twisting the knobs. It can be used to select the quality and quantity of peers used to synchronize the system clock and is most useful in dynamic server discovery schemes. The options are as follows:</dd>
+ <dd>
+ <dl>
+ <dt><tt>beacon <i>beacon</i></tt></dt>
+ <dd>The manycast server sends packets at intervals of 64 s if less than <tt>maxclock</tt> servers are available. Otherwise, it sends packets at the <i><tt>beacon</tt></i> interval in seconds. The default is 3600 s. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>ceiling <i>ceiling</i></tt></dt>
+ <dd>Specify the maximum stratum (exclusive) for acceptable server packets. The default is 16. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>cohort { 0 | 1 }</tt></dt>
+ <dd>Specify whether (1) or whether not (0) a server packet will be accepted for the same stratum as the client. The default is 0. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>floor <i>floor</i></tt></dt>
+ <dd>Specify the minimum stratum (inclusive) for acceptable server packets. The default is 1. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>maxclock <i>maxclock</i></tt></dt>
+ <dd>Specify the maximum number of servers retained by the server discovery schemes. The default is 10. See the <a href="discover.html">Automatic Server Discovery</a> page for further details.</dd>
+ <dt><tt>maxdist <i>maxdistance</i></tt></dt>
+ <dd>Specify the synchronization distance threshold used by the clock selection algorithm. The default is 1.5 s. This determines both the minimum number of packets to set the system clock and the maximum roundtrip delay. It can be decreased to improve reliability or increased to synchronize clocks on the Moon or planets.</dd>
+ <dt><tt>minclock <i>minclock</i></tt></dt>
+ <dd>Specify the number of servers used by the clustering algorithm as the minimum to include on the candidate list. The default is 3. This is also the number of servers to be averaged by the combining algorithm.</dd>
+ <dt><tt>mindist <i>mindistance</i></tt></dt>
+ <dd>Specify the minimum distance used by the selection and anticlockhop
+ algorithm. Larger values increase the tolerance for outliers;
+ smaller values increase the selectivity. The default is .001 s. In some
+ cases, such as reference clocks with high jitter and a PPS signal, it is
+ useful to increase the value to insure the intersection interval is
+ always nonempty.</dd>
+ <dt><tt>minsane <i>minsane</i></tt></dt>
+ <dd>Specify the number of servers used by the selection algorithm as the minimum to set the system clock. The default is 1 for legacy purposes; however, for critical applications the value should be somewhat higher but less than <tt>minclock</tt>.</dd>
+ <dt><tt>orphan <i>stratum</i></tt></dt>
+ <dd>Specify the orphan stratum with default 16. If less than 16 this is the stratum assumed by the root servers. See the <a href="orphan.html">Orphan Mode</a> page for further details.</dd>
+ <dt><tt>orphanwait <em>delay</em></tt></dt>
+ <dd>Specify the delay in seconds from the time all sources are lost until orphan parent mode is enabled with default 300 s (five minutes). During this period, the local clock driver and the modem driver are not selectable, unless marked with the <tt>prefer</tt> keyword. This allows time for one or more primary sources to become reachable and selectable before using backup sources, and avoids transient use of the backup sources at startup.</dd>
+ </dl>
+ </dd>
+ <dt id="trap"><tt>trap <i>host_address</i> [port <i>port_number</i>] [interface <i>interfSace_address</i>]</tt></dt>
+ <dd>This command configures a trap receiver at the given host address and port number for sending messages with the specified local interface address. If the port number is unspecified, a value of 18447 is used. If the interface address is not specified, the message is sent with a source address of the local interface the message is sent through. Note that on a multihomed host the interface used may vary from time to time with routing changes.</dd>
+ <dd>The trap receiver will generally log event messages and other information from the server in a log file. While such monitor programs may also request their own trap dynamically, configuring a trap receiver will ensure that no messages are lost when the server is started.</dd>
+ <dt id="ttl"><tt>ttl <i>hop</i> ...</tt></dt>
+ <dd>This command specifies a list of TTL values in increasing order. up to 8 values can be specified. In manycast mode these values are used in turn in an expanding-ring search. The default is eight multiples of 32 starting at 31.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/monopt.html b/html/monopt.html
new file mode 100644
index 0000000..acf4847
--- /dev/null
+++ b/html/monopt.html
@@ -0,0 +1,566 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Monitoring Options</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Monitoring Commands and Options</h3>
+<img src="pic/pogo8.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html"></a> from <i>Pogo</i>, Walt Kelly</a>
+<p>Pig was hired to watch the logs.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/monopt.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Naming Conventions</a></li>
+ <li class="inline"><a href="#cmd">Monitoring Commands and Options</a></li>
+ <li class="inline"><a href="#types">File Set Types</a></li>
+</ul>
+<hr>
+<h4 id="intro">Naming Conventions</h4>
+<p>The <tt>ntpd</tt> includes a comprehensive monitoring facility which collects
+ statistical data of various types and writes the data to files associated with
+ each type at defined events or intervals. The files associated with a particular
+ type are collectively called the generation file set for that type. The files
+ in the file set are the members of that set.</p>
+<p>File sets have names specific to the type and generation epoch. The names
+ are constructed from three concatenated elements <i><tt>prefix</tt></i>, <i><tt>filename</tt></i> and <i><tt>suffix</tt></i>:</p>
+<dl>
+ <dt><i><tt>prefix</tt></i></dt>
+ <dd>The directory path specified in the <tt>statsdir</tt> command.</dd>
+ <dt><i><tt>name</tt></i></dt>
+ <dd>The name specified by the <tt>file</tt> option of the <tt>filegen</tt> command.</dd>
+ <dt><i><tt>suffix</tt></i></dt>
+ <dd>A string of elements bdginning with . (dot) followed by a number of elements
+ depending on the file set type.</dd>
+</dl>
+<p>Statistics files can be managed using scripts, examples of which are in the <tt>./scripts</tt> directory.
+ Using these or similar scripts and Unix <tt>cron</tt> jobs, the files can be
+ automatically summarized and archived for retrospective analysis.</p>
+<h4 id="cmd">Monitoring Commands and Options</h4>
+<p>Unless noted otherwise, further information about these commands is on the <a href="decode.html">Event Messages and Status Codes</a> page.</p></a> page.</p><dl>
+ <dt id="filegen"><tt>filegen <i>name</i> [file <i>filename</i>] [type <i>type</i>]
+ [link | nolink] [enable | disable]</tt></dt>
+ <dd>
+ <dl>
+ <dt><i><tt>name</tt></i></dt>
+ <dd>Specifies the file set type from the list in the next section.</dd>
+ <dt><tt>file <i>filename</i></tt></dt>
+ <dd>Specifies the filename prefix. The default is the file set type, such as "loopstats".</dd>
+ <dt><tt>type <i>typename</i></tt></dt>
+ <dd>Specifies the file set interval. The following intervals are supported
+ with default <tt>day</tt>:</dd>
+ <dd>
+ <dl>
+ <dt><tt>none</tt></dt>
+ <dd>The file set is actually a single plain file.</dd>
+ <dt><tt>pid</tt></dt>
+ <dd>One file set member is created for every incarnation of <tt>ntpd</tt>.
+ The file name suffix is the string .<tt>n</tt>, where <tt>n</tt> is the
+ process ID of the <tt>ntpd</tt> server process.</dd>
+ <dt><tt>day</tt></dt>
+ <dd>One file set member is created per day. A day is defined as the period
+ between 00:00 and 23:59 UTC. The file name suffix is the string .<tt>yyyymmdd</tt>,
+ where <tt>yyyy</tt> is the year, <tt>mm</tt> the month of the year and <tt>dd</tt> the
+ day of the month. Thus, member created on 10 December 1992 would have suffix <tt>.19921210</tt>.</dd>
+ <dt><tt>week</tt></dt>
+ <dd>One file set member is created per week. The week is defined as the
+ day of year modulo 7. The file name suffix is the string .<tt>yyyyWww</tt>,
+ where <tt>yyyy</tt> is the year, <tt>W</tt> stands for itself and <tt>ww</tt> the
+ week number starting from 0. For example, The member created on 10 January
+ 1992 would have suffix <tt>.1992W1</tt>.</dd>
+ <dt><tt>month</tt></dt>
+ <dd>One file set member is created per month. The file name suffix is the
+ string .<tt>yyyymm</tt>, where <tt>yyyy</tt> is the year and <tt>mm</tt> the
+ month of the year starting from 1. For example, The member created on 10
+ January 1992 would have suffix <tt>.199201</tt>.</dd>
+ <dt><tt>year</tt></dt>
+ <dd>One file set member is generated per year. The file name suffix is the
+ string .<tt>yyyy</tt>, where <tt>yyyy</tt> is the year. For example, The
+ member created on 1 January 1992 would have suffix <tt>.1992</tt>.</dd>
+ <dt><tt>age</tt></dt>
+ <dd>One file set member is generated every 24 hours of <tt>ntpd</tt> operation.
+ The filename suffix is the string <tt>.adddddddd</tt>, where <tt>a</tt> stands
+ for itself and <tt>dddddddd</tt> is the <tt>ntpd</tt> running time in seconds
+ at the start of the corresponding 24-hour period.</dd>
+ </dl>
+ </dd>
+ <dt><tt>link | nolink</tt></dt>
+ <dd>It is convenient to be able to access the current file set members by
+ file name, but without the suffix. This feature is enabled by <tt>link</tt> and
+ disabled by <tt>nolink</tt>. If enabled, which is the default, a hard link
+ from the current file set member to a file without suffix is created. When
+ there is already a file with this name and the number of links to this file
+ is one, it is renamed by appending a dot, the letter <tt>C</tt>, and the
+ pid of the <tt>ntpd</tt> server process. When the number of links is greater
+ than one, the file is unlinked. This allows the current file to be accessed
+ by a constant name.</dd>
+ <dt><tt>enable | disable</tt></dt>
+ <dd>Enable or disable the recording function, with default <tt>enable</tt>.
+ These options are intended for remote configuration commands.</dd>
+ </dl>
+ </dd>
+ <dt id="statistics"><tt>statistics <i>name</i>...</tt></dt>
+ <dd>Enables writing of statistics records. Currently, eight kinds of
+ statistics are supported: <i>name</i>s specify the file set type(s) from
+ the list in the next section.</dd>
+ <dt id="statsdir"><tt>statsdir <i>directory_path</i></tt></dt>
+ <dd>Specify the directory path prefix for statistics file names.</dd>
+</dl>
+<h4 id="types">File Set Types</h4>
+<dl>
+ <dt><tt>clockstats</tt></dt>
+ <dd>Record reference clock statistics. Each update received from a reference
+ clock driver appends one line to the <tt>clockstats</tt> file set:</dd>
+ <dd><tt>49213 525.624 127.127.4.1 93 226 00:08:29.606 D</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>49213</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>525.624</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>127.127.4.1</tt></td>
+ <td>IP</td>
+ <td>reference clock address</td>
+ </tr>
+ <tr>
+ <td><tt><i>message</i></tt></td>
+ <td>text</td>
+ <td>log message</td>
+ </tr>
+ </table>
+ </dd>
+ <dd>The <tt><i>message</i></tt> field includes the last timecode received in
+ decoded ASCII format, where meaningful. In some cases a good deal of additional
+ information is displayed. See information specific to each reference clock
+ for further details.</dd>
+ <dt><tt>cryptostats</tt></dt>
+ <dd>Record significant events in the Autokey protocol. This option requires
+ the OpenSSL cryptographic software library. Each event appends one line to
+ the <tt>cryptostats</tt> file set:</dd>
+ <dd><tt>49213 525.624 128.4.1.1 <i>message</i></tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>49213</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>525.624</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>128.4.1.1</tt></td>
+ <td>IP</td>
+ <td>source address (<tt>0.0.0.0</tt> for system)</td>
+ </tr>
+ <tr>
+ <td><tt><i>message</i></tt></td>
+ <td>text</td>
+ <td>log message</td>
+ </tr>
+ </table>
+ </dd>
+ <dd>The <tt><i>message</i></tt> field includes the message type and certain
+ ancillary information. See the <a href="authopt.html">Authentication Options</a> page
+ for further information.</dd>
+ <dt><tt>loopstats</tt></dt>
+ <dd>Record clock discipline loop statistics. Each system clock update appends
+ one line to the <tt>loopstats</tt> file set:</dd>
+ <dd><tt>50935 75440.031 0.000006019 13.778 0.000351733 0.013380 6</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>50935</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>75440.031</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>0.000006019</tt></td>
+ <td>s</td>
+ <td>clock offset</td>
+ </tr>
+ <tr>
+ <td><tt>13.778</tt></td>
+ <td>PPM</td>
+ <td>frequency offset</td>
+ </tr>
+ <tr>
+ <td><tt>0.000351733</tt></td>
+ <td>s</td>
+ <td>RMS jitter</td>
+ </tr>
+ <tr>
+ <td><tt>0.013380</tt></td>
+ <td>PPM</td>
+ <td>RMS&nbsp;frequency jitter (aka wander)</td>
+ </tr>
+ <tr>
+ <td><tt>6 </tt></td>
+ <td>log<sub>2</sub> s</td>
+ <td>clock discipline loop time constant</td>
+ </tr>
+ </table>
+ </dd>
+ <dt><tt>peerstats</tt></dt>
+ <dd>Record peer statistics. Each NTP packet or reference clock update received
+ appends one line to the <tt>peerstats</tt> file set:</dd>
+ <dd><tt>48773 10847.650 127.127.4.1 9714 -0.001605376 0.000000000 0.001424877
+ 0.000958674</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>48773</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>10847.650</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>127.127.4.1</tt></td>
+ <td>IP</td>
+ <td>source address</td>
+ </tr>
+ <tr>
+ <td><tt>9714</tt></td>
+ <td>hex</td>
+ <td>status word</td>
+ </tr>
+ <tr>
+ <td><tt>-0.001605376</tt></td>
+ <td>s</td>
+ <td>clock offset</td>
+ </tr>
+ <tr>
+ <td><tt>0.000000000 </tt></td>
+ <td>s</td>
+ <td>roundtrip delay</td>
+ </tr>
+ <tr>
+ <td><tt>0.001424877</tt></td>
+ <td>s</td>
+ <td>dispersion</td>
+ </tr>
+ <tr>
+ <td><tt>0.000958674</tt></td>
+ <td>s</td>
+ <td>RMS&nbsp;jitter</td>
+ </tr>
+ </table>
+ </dd>
+ <dd>The status field is encoded in hex format as described in Appendix B of
+ the NTP specification RFC 1305.</dd>
+ <dt><tt>protostats</tt></dt>
+ <dd>Record significant peer, system and [rptpcp; events. Each significant event
+ appends one line to the <tt>protostats</tt> file set:</dd>
+ <dd><tt>49213 525.624 128.4.1.1 963a 8a <i>message</i></tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>49213</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>525.624</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>128.4.1.1</tt></td>
+ <td>IP</td>
+ <td>source address (<tt>0.0.0.0</tt> for system)</td>
+ </tr>
+ <tr>
+ <td><tt>963a</tt></td>
+ <td>code</td>
+ <td>status word</td>
+ </tr>
+ <tr>
+ <td><tt>8a</tt></td>
+ <td>code</td>
+ <td>event message code</td>
+ </tr>
+ <tr>
+ <td><tt><i>message</i></tt></td>
+ <td>text</td>
+ <td>event message</td>
+ </tr>
+ </table>
+ </dd>
+ <dd>The event message code and <tt><i>message</i></tt> field are described on
+ the <a href="decode.html">Event Messages and Status Words</a> page.</dd>
+ <dt><tt>rawstats</tt></dt>
+ <dd>Record timestamp statistics. Each NTP packet received appends one line to
+ the <tt>rawstats</tt> file set:</dd>
+ <dd><tt>56285 54575.160 128.4.1.1 192.168.1.5 3565350574.400229473 3565350574.442385200 3565350574.442436000 3565350575.154505763 0 4 4 1 8 -21 0.000000 0.000320 .PPS.</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>56285</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>54575.160</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>128.4.1.1</tt></td>
+ <td>IP</td>
+ <td>source address</td>
+ </tr>
+ <tr>
+ <td><tt>192.168.1.5</tt></td>
+ <td>IP</td>
+ <td>destination address</td>
+ </tr>
+ <tr>
+ <td><tt>3565350574.400229473</tt></td>
+ <td>NTP&nbsp;s</td>
+ <td>origin timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>3565350574.442385200</tt></td>
+ <td>NTP s</td>
+ <td>receive timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>3565350574.442436000</tt></td>
+ <td>NTP s</td>
+ <td>transmit timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>3565350575.154505763</tt></td>
+ <td>NTP&nbsp;s</td>
+ <td>destination timestamp</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td>0: OK, 1: insert pending,<br>2: delete pending, 3: not synced</td>
+ <td>leap warning indicator</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td>4 was current in 2012</td>
+ <td>NTP version</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td>3: client, 4: server, 5: broadcast</td>
+ <td>mode</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td>1-15, 16: not synced</td>
+ <td>stratum</td>
+ </tr>
+ <tr>
+ <td><tt>8</tt></td>
+ <td>log<sub>2</sub> seconds</td>
+ <td>poll</td>
+ </tr>
+ <tr>
+ <td><tt>-21</tt></td>
+ <td>log<sub>2</sub> seconds</td>
+ <td>precision</td>
+ </tr>
+ <tr>
+ <td><tt>0.000000</tt></td>
+ <td>seconds</td>
+ <td>total roundtrip delay to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>0.000320</tt></td>
+ <td>seconds</td>
+ <td>total dispersion to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>PPS.</tt></td>
+ <td>IP or text</td>
+ <td>refid, association ID</td>
+ </tr>
+ </table>
+ </dd>
+ <dt><tt>sysstats</tt></dt>
+ <dd>Record system statistics. Each hour one line is appended to the <tt>sysstats</tt> file
+ set in the following format:</dd>
+ <dd><tt>50928 2132.543 3600 81965 0 9546 56 512 540 10 4 147 1</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>50928</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>2132.543</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>3600</tt></td>
+ <td>s</td>
+ <td>time since reset</td>
+ </tr>
+ <tr>
+ <td><tt>81965</tt></td>
+ <td>#</td>
+ <td>packets received</td>
+ </tr>
+ <tr>
+ <td><tt>0</tt></td>
+ <td>#</td>
+ <td>packets for this host</td>
+ </tr>
+ <tr>
+ <td><tt>9546</tt></td>
+ <td>#</td>
+ <td>current versions</td>
+ </tr>
+ <tr>
+ <td><tt>56</tt></td>
+ <td>#</td>
+ <td>old version</td>
+ </tr>
+ <tr>
+ <td><tt>512</tt></td>
+ <td>#</td>
+ <td>access denied</td>
+ </tr>
+ <tr>
+ <td><tt>540</tt></td>
+ <td>#</td>
+ <td>bad length or format</td>
+ </tr>
+ <tr>
+ <td><tt>10</tt></td>
+ <td>#</td>
+ <td>bad authentication</td>
+ </tr>
+ <tr>
+ <td><tt>4</tt></td>
+ <td>#</td>
+ <td>declined</td>
+ </tr>
+ <tr>
+ <td><tt>147</tt></td>
+ <td>#</td>
+ <td>rate exceeded</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td>#</td>
+ <td>kiss-o'-death packets sent</td>
+ </tr>
+ </table>
+ </dd>
+ <dt><tt>timingstats</tt></dt>
+ <dd>(Only available when the deamon is compiled with process time debugging
+ support (--enable-debug-timing - costs performance). Record processing time
+ statistics for various selected code paths.</dd>
+ <dd><tt>53876 36.920 10.0.3.5 1 0.000014592 input processing delay</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Item</td>
+ <td>Units</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>53876</tt></td>
+ <td>MJD</td>
+ <td>date</td>
+ </tr>
+ <tr>
+ <td><tt>36.920</tt></td>
+ <td>s</td>
+ <td>time past midnight</td>
+ </tr>
+ <tr>
+ <td><tt>10.0.3.5</tt></td>
+ <td>IP</td>
+ <td>server address</td>
+ </tr>
+ <tr>
+ <td><tt>1</tt></td>
+ <td>#</td>
+ <td>event count</td>
+ </tr>
+ <tr>
+ <td><tt>0.000014592</tt></td>
+ <td>s</td>
+ <td>total time</td>
+ </tr>
+ <tr>
+ <td><tt><i>message</i></tt></td>
+ <td>text</td>
+ <td>code path description (see source)</td>
+ </tr>
+ </table>
+ </dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/msyslog.html b/html/msyslog.html
new file mode 100644
index 0000000..affa088
--- /dev/null
+++ b/html/msyslog.html
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntpd System Log Messages</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntpd</tt> System Log Messages</h3>
+<img src="pic/flatheads.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>The log can be shrill at times.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:12<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+</p>
+<hr>
+<p>You have come here because you found a cryptic message in the system log. This page by no means lists all messages that might be found, since new ones come and old ones go. Generally, however, the most common ones will be found here. They are listed by program module and log severity code in bold: <tt><b>LOG_ERR</b></tt>, <b><tt>LOG_NOTICE</tt></b> and <tt><b>LOG_INFO</b></tt>.</p>
+<p>Most of the time <b><tt>LOG_ERR</tt></b> messages are fatal, but often <tt>ntpd</tt> limps onward in the hopes of discovering more errors. The <tt><b>LOG_NOTICE</b></tt> messages usually mean the time has changed or some other condition that probably should be noticed. The <tt><b>LOG_INFO</b></tt>&nbsp;messages usually say something about the system operations, but do not affect the time.</p>
+<p>In the following a '?' character stands for text in the message. The meaning should be clear from context.</p>
+<h4>Protocol Module</h4>
+<p><tt><b>LOG_ERR</b></tt></p>
+<dl>
+ <dt><tt>buffer overflow ? </tt></dt>
+ <dd>Fatal error. An input packet is too long for processing.</dd>
+</dl>
+<p><tt><b>LOG_NOTICE</b></tt></p>
+<dl>
+ <dt><tt>no reply; clock not set</tt></dt>
+ <dd>In <tt>ntpdate</tt> mode no servers have been found. The server(s) and/or network may be down. Standard debugging procedures apply.</dd>
+</dl>
+<p><tt><b>LOG_INFO</b></tt></p>
+<dl>
+ <dt><tt>proto_config: illegal item ?, value ?</tt></dt>
+ <dd>Program error. Bugs can be reported <a href="bugs.html">here</a>.</dd>
+ <dt><tt>receive:&nbsp;autokey requires two-way communication</tt></dt>
+ <dd>Configuration error on the <tt>broadcastclient</tt> command.</dd>
+ <dt><tt>receive: server <i>server</i> maaximum rate exceeded</tt></dt>
+ <dd>A kiss-o'death packet has been received. The transmit rate is automatically reduced.</dd>
+ <dt><tt>pps sync enabled</tt></dt>
+ <dd>The PPS signal has been detected and enabled.</dd>
+ <dt><tt>transmit: encryption key ? not found</tt></dt>
+ <dd>The encryption key is not defined or not trusted.</dd>
+ <dt><tt>precision = ? usec </tt></dt>
+ <dd>This reports the precision measured for this machine.</dd>
+ <dt><tt>using 10ms tick adjustments</tt></dt>
+ <dd>Gotcha for some machines with dirty rotten clock hardware.</dd>
+ <dt><tt>no servers reachable</tt></dt>
+ <dd>The system clock is running on internal batteries. The server(s) and/or network may be down.</dd>
+</dl>
+<h4>Clock Discipline Module</h4>
+<p><tt><b>LOG_ERR</b></tt></p>
+<dl>
+ <dt><tt>time correction of ? seconds exceeds sanity limit (?); set clock manually to the correct UTC time</tt>.</dt>
+ <dd>Fatal error. Better do what it says, then restart the daemon. Be advised NTP and Unix know nothing about local time zones. The clock must be set to Coordinated Universal Time (UTC). Believe it; by international agreement abbreviations are in French and descriptions are in English.</dd>
+ <dt><tt>sigaction() fails to save SIGSYS trap: ?<br>
+ </tt><tt>sigaction() fails to restore SIGSYS trap: ?</tt></dt>
+ <dt>Program error. Bugs can be reported <a href="bugs.html">here</a>.</dt>
+</dl>
+<p><tt><b>LOG_NOTICE</b></tt></p>
+<dl>
+ <dt><tt>frequency error ? exceeds tolerance 500 PPM</tt></dt>
+ <dd>The hardware clock frequency error exceeds the rate the kernel can correct. This could be a hardware or a kernel problem.</dd>
+ <dt><tt>time slew ? s</tt></dt>
+ <dd>The time error exceeds the step threshold and is being slewed to the correct time. You may have to wait a very long time.</dd>
+ <dt><tt>time reset ? s</tt></dt>
+ <dd>The time error exceeds the step threshold and has been reset to the correct time. Computer scientists don't like this, but they can set the <tt>ntpd -x</tt> option and wait forever.</dd>
+ <dt><tt>kernel time sync disabled ?</tt></dt>
+ <dd>The kernel reports an error. See the codes in the <tt>timex.h</tt> file.</dd>
+ <dt><tt>pps sync disabled</tt></dt>
+ <dd>The PPS signal has died, probably due to a dead radio, broken wire or loose connector.</dd>
+</dl>
+<p><tt><b>LOG_INFO</b></tt></p>
+<dl>
+ <dt><tt>kernel time sync status ? </tt></dt>
+ <dd>For information only. See the codes in the <tt>timex.h</tt> file.</dd>
+</dl>
+<h4>Cryptographic Module</h4>
+<p><tt><b>LOG_ERR</b></tt></p>
+<dl>
+ <dt><tt>cert_parse ?<br>
+ </tt><tt>cert_sign ?<br>
+ </tt><tt>crypto_cert ?<br>
+ </tt><tt>crypto_encrypt ?<br>
+ </tt><tt>crypto_gq ?<br>
+ </tt><tt>crypto_iff ?<br>
+ </tt><tt>crypto_key ?<br>
+ </tt><tt>crypto_mv ?<br>
+ </tt><tt>crypto_setup ?<br>
+ </tt><tt>make_keys ?</tt></dt>
+ <dd>Usually fatal errors. These messages display error codes returned from the OpenSSL library. See the OpenSSL documentation for explanation.</dd>
+ <dt><tt>crypto_setup: certificate ? is trusted, but not self signed.<br>
+ </tt><tt>crypto_setup: certificate ? not for this host<br>
+ </tt><tt>crypto_setup: certificate file ? not found or corrupt<br>
+ </tt><tt>crypto_setup: host key file ? not found or corrupt<br>
+ </tt><tt>crypto_setup: host key is not RSA key type<br>
+ </tt><tt>crypto_setup: random seed file ? not found<br>
+ </tt><tt>rypto_setup: random seed file not specified</tt></dt>
+ <dd>Fatal errors. These messages show problems during the initialization procedure.</dd>
+</dl>
+<p><tt><b>LOG_INFO</b></tt></p>
+<dl>
+ <dt><tt>cert_parse: expired ?<br>
+ </tt><tt>cert_parse: invalid issuer ?<br>
+ </tt><tt>cert_parse: invalid signature ?<br>
+ </tt><tt>cert_parse: invalid subject ?</tt></dt>
+ <dd>There is a problem with a certificate. Operation cannot proceed untill the problem is fixed. If the certificate is local, it can be regenerated using the <tt>ntp-keygen</tt> program. If it is held somewhere else, it must be fixed by the holder.</dd>
+ <dt><tt>crypto_?: defective key<br>
+ </tt><tt>crypto_?: invalid filestamp<br>
+ </tt><tt>crypto_?: missing challenge<br>
+ </tt><tt>crypto_?: scheme unavailable</tt></dt>
+ <dd>There is a problem with the identity scheme. Operation cannot proceed untill the problem is fixed. Usually errors are due to misconfiguration or an orphan association. If the latter, <tt>ntpd</tt> will usually time out and recover by itself.</dd>
+ <dt><tt>crypto_cert: wrong PEM type ?</tt></dt>
+ <dd>The certificate does not have MIME type <tt>CERTIFICATE</tt>. You are probably using the wrong type from OpenSSL or an external certificate authority.</dd>
+ <dt><tt>crypto_ident: no compatible identity scheme found</tt></dt>
+ <dd>Configuration error. The server and client identity schemes are incompatible.</dd>
+ <dt><tt>crypto_tai: kernel TAI update failed</tt></dt>
+ <dd>The kernel does not support this function. You may need a new kernel or patch.</dd>
+ <dt><tt>crypto_tai: leapseconds file ? error ?</tt></dt>
+ <dd>The leapseconds file is corrupt. Obtain the latest file from <tt>time.nist.gov</tt>.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntp-wait.html b/html/ntp-wait.html
new file mode 100644
index 0000000..dcc6a10
--- /dev/null
+++ b/html/ntp-wait.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>ntp-wait - waits until ntpd is in synchronized state</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+ <body>
+ <h3><tt>ntp-wait</tt> - waits until ntpd is in synchronized state</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->12-Jul-2011 22:03<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Synopsis</h4>
+ <p><tt>ntp-wait [ -v ] [ -n <i>tries</i> ] [ -s <i>seconds</i> ]</tt></p>
+ <h4>Description</h4>
+ <p>The <tt>ntp-wait</tt> program blocks until ntpd is in synchronized state.
+ This can be useful at boot time, to delay the boot sequence
+ until after "ntpd -g" has set the time.
+ <h4>Command Line Options</h4>
+ <dl>
+ <dt><tt>-n <i>tries</i></tt>
+ <dd>Number of tries before giving up. The default is 1000.
+ <dt><tt>-s <i>seconds</i></tt>
+ <dd>Seconds to sleep between tries. The default is 6 seconds.
+ <dt><tt>-v</tt>
+ <dd>Be verbose.
+ </dl>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/ntp_conf.html b/html/ntp_conf.html
new file mode 100644
index 0000000..73d26cd
--- /dev/null
+++ b/html/ntp_conf.html
@@ -0,0 +1,174 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Configuration File Definition (Advanced)</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Configuration File Definition (Advanced)</h3>
+<img src="pic/pogo7.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>Racoon is shooting configuration bugs.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->4-Oct-2010 05:13<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#synopsis">Synopsis</a></li>
+ <li class="inline"><a href="#files">Files</a></li>
+ <li class="inline"><a href="#high-level">High-Level Description</a></li>
+ <li class="inline"><a href="#detailed">Detailed Description</a></li>
+ <li class="inline"><a href="#guidelines">Guidelines for Adding Configuration Commands </a></li>
+</ul>
+<hr>
+<h4 id="synopsis">Synopsis</h4>
+<p>The NTP configuration process is driven by a phrase-structure grammar which is used to specify the format of the configuration commands and the actions needed to build an abstract syntax tree (AST). The grammar is fed to a parser generator (Bison) which produces a parser for the configuration file.</p>
+<p>The generated parser is used to parse an NTP configuration file and check it for syntax and semantic errors. The result of the parse is an AST, which contains a representation of the various commands and options. This AST is then traversed to set up the NTP daemon to the correct configuration.</p>
+<p>This document is intended for developers who wish to modify the configuration code and/or add configuration commands and options. It contains a description of the files used in the configuration process as well as guidelines on how to construct them.</p>
+<h4 id="files">Files</h4>
+<p>A brief description of the files used by the configuration code is given below:</p>
+<table border="1">
+ <tbody>
+ <tr>
+ <th width="179">File</th>
+ <th width="537">Description</th>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_config.y</b></td>
+ <td>This file is a Bison source file that contains the phrase-structure grammar and the actions that need to be performed to generate an AST.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_config.c</b></td>
+ <td>This file contains the major chunk of the configuration code. It contains all the functions that are called for building the AST as well as the functions that are needed for traversing the AST.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_config.h</b></td>
+ <td>This file is the header file for <b>ntp_config.c</b>. It mainly contains the structure definitions needed to build the AST. </td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_scanner.c</b></td>
+ <td>This file contains the code for a simple lexical analyzer. This file is directly included into the <b>ntp_config.c</b> file since this code is only used by the configuration code. The most important function in this file is <tt>yylex</tt>, which is called by the generated parser to get the next token on the input line.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_data_structures.c</b></td>
+ <td>This file contains a generic implementation of a priority queue and a simple queue. This code can be used to create a queue for any structure.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_data_structures.h</b></td>
+ <td>This header file contains the structure declarations and function prototypes needed to use the data structures defined in <b>ntp_data_structures.c</b>. This file forms the public interface of the data structures.</td>
+ </tr>
+ <tr>
+ <td valign="top"><b>ntp_config.tab.c</b></td>
+ <td>This file is generated by Bison from the <b>ntp_config.y</b> file. This file is also included directly into the configuration code.</td>
+ </tr>
+ </tbody>
+</table>
+<h4 id="high-level">High-Level Description</h4>
+<p>A high-level description of the configuration process showing where all the files fit in is given below:</p>
+<p><img src="pic/description.jpg" alt="JPEG" border="0"></p>
+<p>The scanner reads in an NTP configuration file and converts it into tokens. The Bison generated parser reads these tokens and converts them into an AST. The AST traverser consists of a set of functions that configure parts of NTP on the basis of what is on the tree. A more detailed description of these parts and the files used is given below:</p>
+<h4 id="detailed">Detailed Description</h4>
+<dl>
+ <dt><b>ntp_scanner.c</b></dt>
+ <dd>This file contains the scanner. The scanner is a small program that converts an input NTP configuration file into a set of <b>tokens</b> that correspond to <b>lexemes</b> in the input. Lexemes are strings in the input, delimited by whitespace and/or special characters. Tokens are basically unique integers that represent these lexemes. A different token is generated for each reserved word and special character in the input. There are two main functions in the public interface of this file:</dd>
+ <dt><tt>int yylex</tt>()</dt>
+ <dd>This function is called <tt>yylex</tt> for historical reasons; <tt>lex</tt> is a program that takes a set of regular expressions and generates a scanner that returns tokens corresponding to those regular expressions. The name of the generated function is called <tt>yylex</tt>. We aren't using<b> </b><tt>lex</tt><b> </b>because it requires linking against an external library and we didn't want to increase the compile-time requirements of NTP.</dd>
+ <dd>History lessons aside, this function basically checks to see if the next input character is a special character as defined in the array <tt>char special_char[]</tt>. (The function <tt>int is_special(char ch)</tt>, can be used for this.) If yes, the special character is returned as the token. If not, a set of characters is read until the next whitespace or special character is encountered. This set of characters forms the lexeme; <tt>yylex</tt> then checks whether this lexeme is an integer, a double, an IP address or a reserved word. If yes, the corresponding token is returned. If not, a token for a string is returned as the default token.</dd>
+ <dt><tt>struct state *create_keyword_scanner(struct key_tok *<i>keyword_list</i>)</tt></dt>
+ <dd>This function takes a list of (<i>keyword, token</i>) pairs and converts them into a trie that can recognize the keywords (reserved words). Every time the scanner reads a lexeme, it compares it against the list of reserved words. If it finds a match, it returns the corresponding token for that keyword.</dd>
+ <dt><b>ntp_data_structures.c</b></dt>
+ <dd>This file contains an implementation of a generic priority queue and FIFO queue. By generic, we mean that these queues can hold element of any type (integers, user-defined structs, etc.), provided that these elements are allocated on the heap using the function <tt>void</tt> *<tt>get_node(size_t size)</tt>. Note that the prototype for this function is exactly the same as that of <tt>malloc</tt> and that it can be used in the exact same way. Behind the scenes, <tt>get_node</tt> calls <tt>malloc</tt> to allocate <i>size</i> plus some extra memory needed for bookkeeping. The allocated memory can be freed using the function <tt>void free_node (void *<i>my_node</i>)</tt>. In addition to these two functions, the public interface of this file contains the following functions:</dd>
+ <dt><tt>queue *create_priority_queue(int (*get_order)(void *, void*))</tt></dt>
+ <dd>This function creates a priority queue in which the order of the elements is determined by the <tt>get_order</tt><b> </b>function that is passed as input to the priority queue. The <tt>get_order</tt><b> </b>function should return positive if the priority of the first element is less than the priority of the second element.</dd>
+ <dt><tt>queue *create_queue(void)</tt></dt>
+ <dd>This function creates a FIFO queue. It basically calls the <tt>create_priority_queue</tt> function with the <tt>get_fifo_order</tt><b> </b>function as its argument.</dd>
+ <dt><tt>void destroy_queue(queue *<i>my_queue</i>)</tt></dt>
+ <dd>This function deletes <tt><i>my_queue</i></tt><b> </b>and frees up all the memory allocated to it an its elements.</dd>
+ <dt><tt>int empty(queue *</tt><i><tt>my_queue</tt></i><tt>)</tt></dt>
+ <dd>This function checks to see if <i><tt>my_queue</tt></i> is empty. Returns <tt>true</tt> if <tt><i>my_queue</i></tt> does not have any elements, else it returns false.</dd>
+ <dt><tt>queue *enqueue(queue *<i>my_queue</i>, void *<i>my_node</i>)</tt></dt>
+ <dd>This function adds an element, <i><tt>my_node</tt></i>, to a queue, <i><tt>my_queue</tt></i>. <i><tt>my_node</tt></i> must be allocated on the heap using the <tt>get_node</tt> function instead of <tt>malloc</tt>.</dd>
+ <dt><tt>void *dequeue(queue *<i>my_queue</i>)</tt></dt>
+ <dd>This function returns the element at the front of the queue. This element will be element with the highest priority.</dd>
+ <dt><tt>int get_no_of_elements(queue *<i>my_queue</i>)</tt></dt>
+ <dd>This function returns the number of elements in <tt><i>my_queue</i></tt>.</dd>
+ <dt><tt>void append_queue(queue *<i>q</i>1, queue *<i>q</i>2)</tt></dt>
+ <dd>This function adds all the elements of <tt><i>q</i>2</tt> to <tt><i>q</i>1</tt>. The queue <tt><i>q</i>2</tt> is destroyed in the process.</dd>
+ <dt><b>ntp_config.y</b></dt>
+ <dd>This file is structured as a standard Bison file and consists of three main parts, separated by <tt>%%</tt>:</dd>
+</dl>
+<ol>
+ <li>The prologue and bison declarations: This section contains a list of the terminal symbols, the non-terminal symbols and the types of these symbols.</li>
+ <li>The rules section: This section contains a description of the actual phrase-structure rules that are used to parse the configuration commands. Each rule consists of a left-hand side (LHS), a right-hand side (RHS) and an optional action. As is standard with phrase-structure grammars, the LHS consists of a single non-terminal symbol. The RHS can contain both terminal and non-terminal symbols, while the optional action can consist of any arbitrary C code.</li>
+ <li>The epilogue: This section is left empty on purpose. It is traditionally used to code the support functions needed to build the ASTs Since, we have moved all the support functions to <b>ntp_config.c</b>, this section is left empty.</li>
+</ol>
+<h4>Prologue and Bison Declarations</h4>
+<p>All the terminal symbols (also known as tokens) have to be declared in the prologue section. Note that terminals and non-terminals may have values associated with them and these values have types. (More on this later). An unnamed union has to be declared with all the possible types at the start of the prologue section. For example, we declare the following union at the start of the <b>ntp_config.y</b> file:</p>
+<p class="style1"><tt>%union {<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;char *String;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;double Double;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;int Integer;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;void *VoidPtr;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;queue *Queue;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;struct attr_val *Attr_val;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;struct address_node *Address_node;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;struct setvar_node *Set_var;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;/* Simulation types */<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;server_info *Sim_server;<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;script_info *Sim_script;<br>
+ }</tt></p>
+<p>Some tokens may not have any types. For example, tokens that correspond to reserved words do not usually have types as they simply indicate that a reserved word has been read in the input file. Such tokens have to be declared as follows:</p>
+<p><tt>%token T_Discard<br>
+ %token T_Dispersion</tt></p>
+<p>Other tokens do have types. For example, a <tt>T_Double</tt> token is returned by the scanner whenever it sees a floating-point double in the configuration file. The value associated with the token is the actual number that was read in the configuration file and its type (after conversion) is double. Hence, the token <tt>T_Double</tt> will have to be declared as follows in the prologue of <b>ntp_config.y</b> file:</p>
+<p><tt>%token &lt;Double&gt; T_Double </tt></p>
+<p>Note that the declaration given in the angled brackets is not <tt>double</tt> but <tt>Double</tt>, which is the name of the variable given in the <tt>%union {}</tt> declaration above.</p>
+<p>Finally, non-terminal symbols may also have values associated with them, which have types. This is because Bison allows non-terminal symbols to have actions associated with them. Actions may be thought of as small functions which get executed whenever the RHS of a non-terminal is detected. The return values of these functions are the values associated with the non-terminals. The types of the non-terminals are specified with a <tt>%type</tt> declaration as shown below:</p>
+<p><tt>%type &lt;Queue&gt; address_list<br>
+ %type &lt;Integer&gt; boolean</tt></p>
+<p>The <tt>%type</tt> declaration may be omitted for non-terminals that do not return any value and do not have type information associated with them.</p>
+<h4>The Rules Section </h4>
+<p>The rule section only consists of phrase-structure grammar rules. Each rule typically has the following format:</p>
+<p><tt>LHS : RHS [{ Actions }]<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;;</tt></p>
+<p>where LHS consists of a single non-terminal symbol and the RHS consists of one or more terminal and non-terminal symbols. The <tt>Actions</tt> are optional and may consist of any number of arbitrary C statements. Note that Bison can only process LALR(1) grammars, which imposes additional restrictions on the kind of rules that can be specified. Examples of rules are shown below:</p>
+<p><tt>orphan_mode_command<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;: T_Tos tos_option_list<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ append_queue(my_config.orphan_cmds, $2); }<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;;</tt></p>
+<p><tt>tos_option_list<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;: tos_option_list tos_option { $$ = enqueue($1, $2); }<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;| tos_option { $$ = enqueue_in_new_queue($1); }<br>
+ &nbsp;&nbsp;&nbsp;&nbsp;;</tt></p>
+<p>The <tt>$n</tt> notation, where <tt>n</tt> is an integer, is used to refer to the value of a terminal or non-terminal symbol. All terminals and non-terminal symbols within a particular rule are numbered (starting from 1) according to the order in which they appear within the RHS of a rule. <tt>$$</tt> is used to refer to the value of the LHS terminal symbol - it is used to return a value for the non-terminal symbol specified in the LHS of the rule.</p>
+<h4>Invoking Bison </h4>
+<p>Bison needs to be invoked in order to convert the <b>ntp_config.y</b> file into a C source file. To invoke Bison, simply enter the command:</p>
+<p><tt>bison ntp_config.y</tt></p>
+<p>at the command prompt. If no errors are detected, an <b>ntp_config.tab.c</b> file will be generated by default. This generated file can be directly included into the <b>ntp_config.c</b> file.</p>
+<p>If Bison report shift-reduce errors or reduce-reduce errors, it means that the grammar specified using the rules in not LALR(1). To debug such a grammar, invoke Bison with a <tt>-v</tt> switch, as shown below. This will generate a <b>ntp_config.output</b> file, which will contain a description of the generated state machine, together with a list of states that have shift-reduce/reduce-reduce conflicts. You can then change the rules to remove such conflicts.</p>
+<p><tt>bison -v ntp_config.y</tt></p>
+<p>For more information, refer to the <a href="http://www.gnu.org/software/bison/manual/html_mono/bison.html">Bison manual</a>.</p>
+<p><b>ntp_config.c</b></p>
+<p>This file contains the major chunk of the configuration code including all the support functions needed for building and traversing the ASTs. As such, most of the functions in this file can be divided into two groups:</p>
+<ol>
+ <li>Functions that have a <tt>create_</tt> prefix. These functions are used to build a node of the AST.</li>
+ <li>Functions that have a <tt>config_</tt> prefix. These functions are used to traverse the AST and configure NTP according to the nodes present on the tree.</li>
+</ol>
+<h4 id="guidelines">Guidelines for Adding Configuration Commands</h4>
+<p>The following steps may be used to add a new configuration command to the NTP reference implementation:</p>
+<ol>
+ <li>Write phrase-structure grammar rules for the syntax of the new command. Add these rules to the rules section of the <b>ntp_config.y</b> file. </li>
+ <li>Write the action to be performed on recognizing the rules. These actions will be used to build the AST.</li>
+ <li>If new reserved words are needed, add these to the <tt>struct key_tok keyword_list[]</tt>structure in the <b>ntp_config.c </b>file. This will allow the scanner to recognize these reserved words and generate the desired tokens on recognizing them.</li>
+ <li>Specify the types of all the terminals and non-terminal symbols in the prologue section of the <b>ntp_config.c</b> file.</li>
+ <li>Write a function with a <tt>config_</tt> prefix that will be executed for this new command. Make sure this function is called in the <tt>config_ntpd()</tt>function.</li>
+</ol>
+<hr>
+<address>
+<a href="mailto:skamboj@udel.edu">Sachin Kamboj</a>
+</address>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntpd.html b/html/ntpd.html
new file mode 100644
index 0000000..418d199
--- /dev/null
+++ b/html/ntpd.html
@@ -0,0 +1,176 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntpd - Network Time Protocol (NTP) daemon</title>
+<!-- Changed by: Harlan &, 10-Feb-2014 -->
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntpd</tt> - Network Time Protocol (NTP) Daemon</h3>
+<img src="pic/wingdorothy.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
+<p>You need help from the monkeys.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:14<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#synop">Synopsis</a></li>
+ <li class="inline"><a href="#descr">Description</a></li>
+ <li class="inline"><a href="#cmd">Command Line Options</a></li>
+ <li class="inline"><a href="#cfg">The Configuration File</a></li>
+ <li class="inline"><a href="#files">Files</a></li>
+</ul>
+<hr>
+<h4 id="synop">Synopsis</h4>
+<tt>ntpd [ -46aAbdDgLmnNqx ] [ -c <i>conffile</i> ] [ -f <i>driftfile</i> ] [ -i <i>jaildir</i> ] [ -I <i>InterfaceOrAddress</i> ] [ -k <i>keyfile</i> ] [ -l <i>logfile</i> ] [ -p <i>pidfile</i> ] [ -P <i>priority</i> ] [ -r <i>broadcastdelay</i> ] [ -s <i>statsdir</i> ] [ -t <i>key</i> ] [ -u <i>user</i>[:<i>group</i>] ] [ -U <i>interface_update_interval</i> ] [ -v <i>variable</i> ] [ -V <i>variable</i> ]</tt>
+<h4 id="descr">Description</h4>
+<p>The <tt>ntpd</tt> program is an operating system daemon that synchronizes the system clock to remote NTP time servers or local reference clocks. It is a complete implementation of NTP version 4 defined by RFC-5905, but also retains compatible with version 3 defined by RFC-1305 and versions 1 and 2, defined by RFC-1059 and RFC-1119, respectively. The program can operate in any of several modes, including client/server, symmetric and broadcast modes, and with both symmetric-key and public key-cryptography</p>
+<p>The <tt>ntpd</tt> program ordinarily requires a configuration file described on this page. It contains configuration commands described on the pages listed above. However a client can discover remote servers and configure them automatically. This makes it possible to deploy a fleet of workstations without specifying configuration details specific to the local environment. Further details are on the </p>
+<p>The <tt>ntpd</tt> program normally operates continuously while adjusting the system time and frequency, but in some cases this might not be practical. With the <tt>-q</tt> option <tt>ntpd</tt> operates as in continuous mode, but exits just after setting the clock for the first time. Most applications will probably want to specify the <tt>iburst</tt> option with the <tt>server</tt> command. With this option a volley of messages is exchanged to groom the data and set the clock in about ten seconds. If nothing is heard after a few minutes, the daemon times out and exits without setting the clock.</p>
+<h4 id="cmd">Command Line Options</h4>
+<dl>
+ <dt><tt>-4</tt>
+ <dd>Force DNS resolution of host names to the IPv4 namespace.
+ <dt><tt>-6</tt>
+ <dd>Force DNS resolution of host names to the IPv6 namespace.
+ <dt><tt>-a</tt></dt>
+ <dd>Require cryptographic authentication for broadcast client, multicast client and symmetric passive associations. This is the same operation as the <tt>enable auth</tt> command and is the default.</dd>
+ <dt><tt>-A</tt></dt>
+ <dd>Do not require cryptographic authentication for broadcast client, multicast client and symmetric passive associations. This is the same operation as the <tt>disable auth</tt> command and almost never a good idea.</dd>
+ <dt><tt>-b</tt></dt>
+ <dd>Enable the client to synchronize to broadcast servers.</dd>
+ <dt><tt>-c <i>conffile</i></tt></dt>
+ <dd>Specify the name and path of the configuration file. Without the option the default is <tt>/etc/ntp.conf</tt>.</dd>
+ <dt><tt>-d</tt></dt>
+ <dd> Disable switching into daemon mode, so <tt>ntpd</tt> stays attached to the starting terminal which will get all the debugging printout. Also, ^C will kill it. This option may occur more than once, with each occurrence indicating greater detail of display.</dd>
+ <dt><tt>-D <i>level</i></tt></dt>
+ <dd>Specify debugging level directly, with <tt>level</tt> corresponding to the numbe of <tt>-d</tt> options..</dd>
+ <dt><tt>-f <i>driftfile</i></tt></dt>
+ <dd>Specify the name and path of the frequency file. This is the same operation as the <tt>driftfile <i>driftfile</i></tt> configuration command.
+ <dt><tt>-g</tt></dt>
+ <dd>Normally, <tt>ntpd</tt> exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, <tt>ntpd</tt> will exit with a message to the system log. This option can be used with the <tt>-q</tt> and <tt>-x</tt> options. See the <tt>tinker</tt> command for other options.</dd>
+ <dt><tt>-i <i>jaildir</i></tt></dt>
+ <dd>Chroot the server to the directory <i><tt>jaildir</tt></i>. This option also implies that the server attempts to drop root privileges at startup (otherwise, chroot gives very little additional security), and it is only available if the OS supports to run the server without full root privileges. You may need to also specify a <tt>-u</tt> option.</dd>
+ <dt id="--interface"><tt>-I [<i>address</i> | <i>interface name</i>]</tt></dt>
+ <dd>Open the network address given, or all the addresses associated with the given interface name. This option may appear multiple times. This option also implies not opening other addresses, except wildcard and localhost. This option is deprecated. Please consider using the configuration file <a href="miscopt.html#interface">interface</a> command, which is more versatile.</dd>
+ <dt><tt>-k <i>keyfile</i></tt></dt>
+ <dd>Specify the name and path of the symmetric key file. This is the same operation as the <tt>keys <i>keyfile</i></tt> command.</dd>
+ <dt><tt>-l <i>logfile</i></tt></dt>
+ <dd>Specify the name and path of the log file. The default is the system log file. This is the same operation as the <tt>logfile <i>logfile</i></tt> command.</dd>
+ <dt id="--mdns"><tt>-m</tt></dt>
+ <dd>Once the system clock is synchronized, register with mDNS as an available server.</dd>
+ <dt id="--novirtualips"><tt>-L</tt></dt>
+ <dd>Do not listen to virtual interfaces, defined as those with names containing a colon. This option is deprecated. Please consider using the configuration file <a href="miscopt.html#interface">interface</a> command, which is more versatile.</dd>
+ <dt><tt>-M</tt></dt>
+ <dd>Raise scheduler precision to its maximum (1 ms) using timeBeginPeriod. (Windows only)</dd>
+ <dt><tt>-n</tt></dt>
+ <dd>Don't fork.</dd>
+ <dt><tt>-N</tt></dt>
+ <dd>To the extent permitted by the operating system, run the <tt>ntpd</tt> at the highest priority.</dd>
+ <dt><tt>-p <i>pidfile</i></tt></dt>
+ <dd>Specify the name and path of the file used to record the <tt>ntpd</tt> process ID. This is the same operation as the <tt>pidfile <i>pidfile</i></tt> command.</dd>
+ <dt><tt>-P <i>priority</i></tt></dt>
+ <dd>To the extent permitted by the operating system, run the <tt>ntpd</tt> at the specified priority.</dd>
+ <dt><tt>-q</tt></dt>
+ <dd>Exit the <tt>ntpd</tt> just after the first time the clock is set. This behavior mimics that of the <tt>ntpdate</tt> program, which is to be retired. The <tt>-g</tt> and <tt>-x</tt> options can be used with this option. Note: The kernel time discipline is disabled with this option.</dd>
+ <dt><tt>-r <i>broadcastdelay</i></tt></dt>
+ <dd>Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.</dd>
+ <dt><tt>-s <i>statsdir</i></tt></dt>
+ <dd>Specify the directory path for files created by the statistics facility. This is the same operation as the <tt>statsdir <i>statsdir</i></tt> command.</dd>
+ <dt><tt>-t <i>key</i></tt></dt>
+ <dd>Add a key number to the trusted key list. This option can occur more than once. This is the same operation as the <tt>trustedkey <i>key</i></tt> command.</dd>
+ <dt><tt>-u <i>user[:group]</i> </tt></dt>
+ <dd>Specify a user, and optionally a group, to switch to. This option is only available if the OS supports running the server without full root privileges. Currently, this option is supported under NetBSD (configure with <tt>--enable-clockctl</tt>) and Linux (configure with --<tt>enable-linuxcaps</tt>).</dd>
+ <dt><tt>-U <i>interface update interval</i></tt></dt>
+ <dd>Number of seconds to wait between interface list scans to pick up old and delete network interface. Set to 0 to disable dynamic interface list updating. The default is to scan every 5 minutes.</dd>
+ <dt><tt>-v <i>variable</i></tt><br>
+ <tt>-V <i>variable</i></tt></dt>
+ <dd>Add a system variable listed by default.</dd>
+ <dt><tt>-x</tt></dt>
+ <dd>Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold. This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually. Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s. Thus, an adjustment as much as 600 s will take almost 14 days to complete. This option can be used with the <tt>-g</tt> and <tt>-q</tt> options. See the <tt>tinker</tt> command for other options. Note: The kernel time discipline is disabled with this option.</dd>
+ <dt><tt>--pccfreq <i>frequency</i></tt></dt>
+ <dd>Substitute processor cycle counter for QueryPerformanceCounter unconditionally
+ using the given frequency (in Hz). <tt>--pccfreq</tt> can be used on systems
+ which do not use the PCC to implement QueryPerformanceCounter
+ and have a fixed PCC frequency. The frequency specified must
+ be accurate within 0.5 percent. <tt>--usepcc</tt> is equivalent on many systems and should
+ be tried first, as it does not require determining the frequency
+ of the processor cycle counter. For x86-compatible processors, the PCC is
+ also referred to as <tt>RDTSC</tt>, which is the assembly-language instruction to retrieve
+ the current value.&nbsp; (Windows only)</dd>
+ <dt><tt>--usepcc</tt></dt>
+ <dd>Substitute processor cycle counter for QueryPerformanceCounter if they
+ appear equivalent. This option should be used only if the PCC
+ frequency is fixed. Power-saving functionality on many laptops varies the
+ PCC frequency. (Windows only)</dd>
+</dl>
+<h4 id="cfg">The Configuration File</h4>
+<p>Ordinarily, <tt>ntpd</tt> reads the <tt>ntp.conf</tt> configuration file at startup in order to determine the synchronization sources and operating modes. It is also possible to specify a working, although limited, configuration entirely on the command line, obviating the need for a configuration file. This may be particularly useful when the local host is to be configured as a broadcast client, with servers determined by listening to broadcasts at run time.</p>
+<p>Usually, the configuration file is installed as<tt>/etc/ntp.conf</tt>, but could be installed elsewhere (see the <tt>-c <i>conffile</i></tt> command line option). The file format is similar to other Unix configuration files - comments begin with a <tt>#</tt> character and extend to the end of the line; blank lines are ignored.</p>
+<p>Configuration commands consist of an initial command keyword followed by a list of option keywords separated by whitespace. Commands may not be continued over multiple lines. Options may be host names, host addresses written in numeric, dotted-quad form, integers, floating point numbers (when specifying times in seconds) and text strings. Optional arguments are delimited by <tt>[ ]</tt> in the options pages, while alternatives are separated by <tt>|</tt>. The notation <tt>[ ... ]</tt> means an optional, indefinite repetition of the last item before the <tt>[ ... ]</tt>.</p>
+<h4 id="files">Files</h4>
+<table width="100%" border="1">
+ <tr>
+ <td width="30%">File</td>
+ <td width="30%">Default</td>
+ <td width="20%">Option</td>
+ <td width="20%">Option</td>
+ </tr>
+ <tr>
+ <td width="30%">configuration file</td>
+ <td width="30%"><tt>/etc/ntp.conf</tt></td>
+ <td width="20%"><tt>-c</tt></td>
+ <td width="20%"><tt>conffile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">frequency file</td>
+ <td width="30%">none</td>
+ <td width="20%"><tt>-f</tt></td>
+ <td width="20%"><tt>driftfile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">leapseconds file</td>
+ <td width="30%">none</td>
+ <td width="20%"></td>
+ <td width="20%"><tt>leapfile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">process ID file</td>
+ <td width="30%">none</td>
+ <td width="20%"><tt>-p</tt></td>
+ <td width="20%"><tt>pidfile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">log file</td>
+ <td width="30%">system log</td>
+ <td width="20%"><tt>-l</tt></td>
+ <td width="20%"><tt>logfile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">include file</td>
+ <td width="30%">none</td>
+ <td width="20%">none</td>
+ <td width="20%"><tt>includefile</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">statistics path</td>
+ <td width="30%"><tt>/var/NTP</tt></td>
+ <td width="20%"><tt>-s</tt></td>
+ <td width="20%"><tt>statsdir</tt></td>
+ </tr>
+ <tr>
+ <td width="30%">keys path</td>
+ <td width="30%"><tt>/usr/local/etc</tt></td>
+ <td width="20%">none</td>
+ <td width="20%"><tt>keysdir</tt></td>
+ </tr>
+</table>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntpdate.html b/html/ntpdate.html
new file mode 100644
index 0000000..9216b6c
--- /dev/null
+++ b/html/ntpdate.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntpdate - set the date and time via NTP</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntpdate</tt> - set the date and time via NTP</h3>
+<img src="pic/rabbit.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>I told you it was eyeball and wristwatch.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->9-Feb-2014 03:34<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<hr>
+<p>Disclaimer: This program has known bugs and deficiencies and nobody
+has volunteered to fix them in a long time. The good news is the
+functionality originally intended for this program is available in the <tt>ntpd</tt> and
+<tt>sntp</tt> programs. See the <a
+href="http://support.ntp.org/Dev/DeprecatingNtpdate">Deprecating
+<tt>ntpdate</tt> topic</a> in the NTP Support wiki
+for a thorough discussion and analysis of the issues.
+See the <tt>-q</tt> command line option in the <a
+href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a>
+page and/or the <a href="sntp.html"><tt>sntp</tt> - Simple Network Time
+Protocol (SNTP) Client</a> page. After a suitable period of mourning, the <tt>ntpdate</tt> program will be retired from this distribution.</p>
+<h4>Synopsis</h4>
+<tt>ntpdate [ -46bBdqsuv ] [ -a <i>key</i> ] [ -e <i>authdelay</i> ] [ -k <i>keyfile</i> ] [ -o <i>version</i> ] [ -p <i>samples</i> ] [ -t <i>timeout</i> ] <i>server</i> [ ... ]</tt>
+<h4>Description</h4>
+<p><tt>ntpdate</tt> sets the local date and time by polling the Network Time Protocol (NTP) server(s) given as the <i>server</i> arguments to determine the correct time. It must be run as root on the local host. A number of samples are obtained from each of the servers specified and a subset of the NTP clock filter and selection algorithms are applied to select the best of these. Note that the accuracy and reliability of <tt>ntpdate</tt> depends on the number of servers, the number of polls each time it is run and the interval between runs.</p>
+<p><tt>ntpdate</tt> can be run manually as necessary to set the host clock, or it can be run from the host startup script to set the clock at boot time. This is useful in some cases to set the clock initially before starting the NTP daemon <tt>ntpd</tt>. It is also possible to run <tt>ntpdate</tt> from a <tt>cron</tt> script. However, it is important to note that <tt>ntpdate</tt> with contrived <tt>cron</tt> scripts is no substitute for the NTP daemon, which uses sophisticated algorithms to maximize accuracy and reliability while minimizing resource use. Finally, since <tt>ntpdate</tt> does not discipline the host clock frequency as does <tt>ntpd</tt>, the accuracy using <tt>ntpdate</tt> is limited.</p>
+<p>Time adjustments are made by <tt>ntpdate</tt> in one of two ways. If <tt>ntpdate</tt> determines the clock is in error more than 0.5 second it will simply step the time by calling the system <tt>settimeofday()</tt> routine. If the error is less than 0.5 seconds, it will slew the time by calling the system <tt>adjtime()</tt> routine. The latter technique is less disruptive and more accurate when the error is small, and works quite well when <tt>ntpdate</tt> is run by <tt>cron</tt> every hour or two.</p>
+<p><tt>ntpdate</tt> will, if the <tt>-u</tt> flag was not specified, decline to set the date if an NTP server daemon (e.g., <tt>ntpd</tt>) is running on the same host. When running <tt>ntpdate</tt> on a regular basis from <tt>cron</tt> as an alternative to running a daemon, doing so once every hour or two will result in precise enough timekeeping to avoid stepping the clock.</p>
+<p>Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
+<p>If NetInfo support is compiled into <tt>ntpdate</tt>, then the <tt>server</tt> argument is optional if <tt>ntpdate</tt> can find a time server in the NetInfo configuration for <tt>ntpd</tt>.</p>
+<h4>Command Line Options</h4>
+<dl>
+ <dt><tt>-4</tt></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.</dd>
+ <dt><tt>-6</tt></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.</dd>
+ <dt><tt>-a <i>key</i></tt></dt>
+ <dd>Enable the authentication function and specify the key identifier to be used for authentication as the argument <i>key</i>. The keys and key identifiers must match in both the client and server key files. The default is to disable the authentication function.
+ <dt><tt>-B</tt></dt>
+ <dd>Force the time to always be slewed using the adjtime() system call, even if the measured offset is greater than +-500 ms. The default is to step the time using settimeofday() if the offset is greater than +-500 ms. Note that, if the offset is much greater than +-500 ms in this case, that it can take a long time (hours) to slew the clock to the correct value. During this time. the host should not be used to synchronize clients.
+ <dt><tt>-b</tt></dt>
+ <dd>Force the time to be stepped using the settimeofday() system call, rather than slewed (default) using the adjtime() system call. This option should be used when called from a startup file at boot time.</dd>
+ <dt><tt>-d</tt></dt>
+ <dd>Enable the debugging mode, in which <tt>ntpdate</tt> will go through all the steps, but not adjust the local clock and using an unprivileged port. Information useful for general debugging will also be printed.</dd>
+ <dt><tt>-e <i>authdelay</i></tt></dt>
+ <dd>Specify the processing delay to perform an authentication function as the value <i>authdelay</i>, in seconds and fraction (see <tt>ntpd</tt> for details). This number is usually small enough to be negligible for most purposes, though specifying a value may improve timekeeping on very slow CPU's.</dd>
+ <dt><tt>-k <i>keyfile</i></tt></dt>
+ <dd>Specify the path for the authentication key file as the string <i>keyfile</i>. The default is <tt>/etc/ntp.keys</tt>. This file should be in the format described in <tt>ntpd</tt>.</dd>
+ <dt><tt>-o <i>version</i></tt></dt>
+ <dd>Specify the NTP version for outgoing packets as the integer
+ <i>version</i>, which can be 1, 2, 3 or 4. The default is 4. This allows <tt>ntpdate</tt> to be used with older NTP versions.</dd>
+ <dt><tt>-p <i>samples</i></tt></dt>
+ <dd>Specify the number of samples to be acquired from each server as the integer <i>samples</i>, with values from 1 to 8 inclusive. The default is 4.</dd>
+ <dt><i><tt>-q</tt></i></dt>
+ <dd>Query only - don't set the clock.</dd>
+ <dt><tt>-s</tt></dt>
+ <dd>Divert logging output from the standard output (default) to the system <tt>syslog</tt> facility. This is designed primarily for convenience of <tt>cron</tt> scripts.</dd>
+ <dt><tt>-t <i>timeout</i></tt></dt>
+ <dd>Specify the maximum time waiting for a server response as the value <i>timeout</i>, in seconds and fraction. The value is is rounded to a multiple of 0.2 seconds. The default is 1 second, a value suitable for polling across a LAN.</dd>
+ <dt><tt>-u</tt></dt>
+ <dd>Direct <tt>ntpdate</tt> to use an unprivileged port for outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronize with hosts beyond the firewall. Note that the <tt>-d</tt> option always uses unprivileged ports.
+ <dt><tt>-<i>v</i></tt></dt>
+ <dd>Be verbose. This option will cause <tt>ntpdate</tt>'s version identification string to be logged.</dd>
+</dl>
+<h4>Diagnostics</h4>
+<tt>ntpdate</tt>'s exit status is zero if it finds a server and updates the clock, and nonzero otherwise.
+<h4>Files</h4>
+<tt>/etc/ntp.keys</tt> - encryption keys used by <tt>ntpdate</tt>.
+<h4>Bugs</h4>
+The slew adjustment is actually 50% larger than the measured offset, since this (it is argued) will tend to keep a badly drifting clock more accurate. This is probably not a good idea and may cause a troubling hunt for some values of the kernel variables <tt>tick</tt> and <tt>tickadj</tt>.&nbsp;
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntpdc.html b/html/ntpdc.html
new file mode 100644
index 0000000..7a68dd2
--- /dev/null
+++ b/html/ntpdc.html
@@ -0,0 +1,178 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntpdc - special NTP query program</title>
+<!-- Changed by: Harlan &, 31-Jan-2014 -->
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntpdc</tt> - special NTP query program</h3>
+<img src="pic/alice31.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>This program is a big, deprecated puppy.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>More Help</h4>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<hr>
+<h4>Synopsis</h4>
+<tt>ntpdc [ -46dilnps ] [ -c <i>command</i> ] [ <i>host</i> ] [ ... ]</tt>
+<h4>Description</h4>
+<p><tt>ntpdc</tt> is deprecated - please use <tt>ntpq</tt> now, as it uses a more sane interface and can provide all of the information that <tt>ntpdc</tt> used to provide.</p>
+<p><tt>ntpdc</tt> is used to query the <tt>ntpd</tt> daemon about its current state and to request changes in that state. The program may be run either in interactive mode or controlled using command line arguments. Extensive state and statistics information is available through the <tt>ntpdc</tt> interface. In addition, nearly all the configuration options which can be specified at startup using ntpd's configuration file may also be specified at run time using <tt>ntpdc</tt>.</p>
+<p>If one or more request options are included on the command line when <tt>ntpdc</tt> is executed, each of the requests will be sent to the NTP servers running on each of the hosts given as command line arguments, or on localhost by default. If no request options are given, <tt>ntpdc</tt> will attempt to read commands from the standard input and execute these on the NTP server running on the first host given on the command line, again defaulting to localhost when no other host is specified. <tt>ntpdc</tt> will prompt for commands if the standard input is a terminal device.</p>
+<p><tt>ntpdc</tt> uses NTP mode 7 packets to communicate with the NTP server, and hence can be used to query any compatible server on the network which permits it. Note that since NTP is a UDP protocol this communication will be somewhat unreliable, especially over large distances in terms of network topology. <tt>ntpdc</tt> makes no attempt to retransmit requests, and will time requests out if the remote host is not heard from within a suitable timeout time.</p>
+<p>The operation of <tt>ntpdc</tt> are specific to the particular implementation of the <tt>ntpd</tt> daemon and can be expected to work only with this and maybe some previous versions of the daemon. Requests from a remote <tt>ntpdc</tt> program which affect the state of the local server must be authenticated, which requires both the remote program and local server share a common key and key identifier.</p>
+<p>Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
+<h4>Command Line Options</h4>
+<p>Specifying a command line option other than <tt>-i</tt> or <tt>-n</tt> will cause the specified query (queries) to be sent to the indicated host(s) immediately. Otherwise, <tt>ntpdc</tt> will attempt to read interactive format commands from the standard input.</p>
+<dl>
+ <dt><tt>-4</tt></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.</dd>
+ <dt><tt>-6</tt></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.</dd>
+ <dt><tt>-c <i>command</i></tt></dt>
+ <dd>The following argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified host(s). Multiple -c options may be given.</dd>
+ <dt><tt>-d</tt>
+ <dd>Turn on debugging mode.
+ <dt><tt>-i</tt></dt>
+ <dd>Force <tt>ntpdc</tt> to operate in interactive mode. Prompts will be written to the standard output and commands read from the standard input.</dd>
+ <dt><tt>-l</tt></dt>
+ <dd>Obtain a list of peers which are known to the server(s). This switch is equivalent to <tt>-c listpeers</tt>.</dd>
+ <dt><tt>-n</tt></dt>
+ <dd>Output all host addresses in dotted-quad numeric format rather than converting to the canonical host names.</dd>
+ <dt><tt>-p</tt></dt>
+ <dd>Print a list of the peers known to the server as well as a summary of their state. This is equivalent to <tt>-c peers</tt>.</dd>
+ <dt><tt>-s</tt></dt>
+ <dd>Print a list of the peers known to the server as well as a summary of their state, but in a slightly different format than the -p switch. This is equivalent to <tt>-c dmpeers</tt>.</dd>
+</dl>
+<h4>Interactive Commands</h4>
+<p>Interactive format commands consist of a keyword followed by zero to four arguments. Only enough characters of the full keyword to uniquely identify the command need be typed. The output of a command is normally sent to the standard output, but optionally the output of individual commands may be sent to a file by appending a <tt>&lt;</tt>, followed by a file name, to the command line.</p>
+<p>A number of interactive format commands are executed entirely within the <tt>ntpdc</tt> program itself and do not result in NTP mode 7 requests being sent to a server. These are described following.</p>
+<dl>
+ <dt><tt>? [ <i>command_keyword</i> ]</tt><br>
+ <tt>help [ <i>command_keyword</i> ]</tt></dt>
+ <dd>A <tt>?</tt> by itself will print a list of all the command keywords known to this incarnation of <tt>ntpq</tt>. A <tt>?</tt> followed by a command keyword will print function and usage information about the command. This command is probably a better source of information about <tt>ntpq</tt> than this manual page.</dd>
+ <dt><tt>delay <i>milliseconds</i></tt></dt>
+ <dd>Specify a time interval to be added to timestamps included in requests which require authentication. This is used to enable (unreliable) server reconfiguration over long delay network paths or between machines whose clocks are unsynchronized. Actually the server does not now require timestamps in authenticated requests, so this command may be obsolete.</dd>
+ <dt><tt>host <i>hostname</i></tt></dt>
+ <dd>Set the host to which future queries will be sent. Hostname may be either a host name or a numeric address.</dd>
+ <dt><tt>hostnames [ yes | no ]</tt></dt>
+ <dd>If <tt>yes</tt> is specified, host names are printed in information displays. If <tt>no</tt> is specified, numeric addresses are printed instead. The default is <tt>yes</tt>, unless modified using the command line <tt>-n</tt> switch.</dd>
+ <dt><tt>keyid <i>keyid</i></tt></dt>
+ <dd>This command allows the specification of a
+ key number to be used to authenticate configuration
+ requests from ntpdc to the host(s). This must
+ correspond to a key number which the host/server has
+ been configured to use for this purpose (server
+ options: <tt>trustedkey</tt>, and <tt>requestkey</tt>). If authentication is not
+ enabled on the host(s) for ntpdc
+ commands, the command <tt>&quot;keyid 0&quot;</tt> should be given; otherwise the <i>keyid</i> of the next subsequent <tt>addpeer/addserver/broadcast </tt> command will
+ be used.</dd>
+ <dt><tt>quit</tt></dt>
+ <dd>Exit <tt>ntpdc</tt>.</dd>
+ <dt><tt>passwd</tt></dt>
+ <dd>This command prompts you to type in a password (which will not be echoed) which will be used to authenticate configuration requests. The password must correspond to the key configured for use by the NTP server for this purpose if such requests are to be successful.</dd>
+ <dt><tt>timeout <i>milliseconds</i></tt></dt>
+ <dd>Specify a timeout period for responses to server queries. The default is about 8000 milliseconds. Note that since <tt>ntpdc</tt> retries each query once after a timeout, the total waiting time for a timeout will be twice the timeout value set.</dd>
+</dl>
+<h4>Control Message Commands</h4>
+<p>Query commands result in NTP mode 7 packets containing requests for information being sent to the server. These are read-only commands in that they make no modification of the server configuration state.</p>
+<dl>
+ <dt><tt>listpeers</tt></dt>
+ <dd>Obtains and prints a brief list of the peers for which the server is maintaining state. These should include all configured peer associations as well as those peers whose stratum is such that they are considered by the server to be possible future synchronization candidates.</dd>
+ <dt><tt>peers</tt></dt>
+ <dd>Obtains a list of peers for which the server is maintaining state, along with a summary of that state. Summary information includes the address of the remote peer, the local interface address (0.0.0.0 if a local address has yet to be determined), the stratum of the remote peer (a stratum of 16 indicates the remote peer is unsynchronized), the polling interval, in seconds, the reachability register, in octal, and the current estimated delay, offset and dispersion of the peer, all in seconds.</dd>
+ <dd>The character in the left margin indicates the mode this peer entry is operating in. A <tt>+</tt> denotes symmetric active, a <tt>-</tt> indicates symmetric passive, a <tt>=</tt> means the remote server is being polled in client mode, a <tt>^</tt> indicates that the server is broadcasting to this address, a <tt>~</tt> denotes that the remote peer is sending broadcasts and a <tt>*</tt> marks the peer the server is currently synchronizing to.</dd>
+ <dd>The contents of the host field may be one of four forms. It may be a host name, an IP address, a reference clock implementation name with its parameter or <tt>REFCLK(<i>implementation number</i>, <i>parameter</i>)</tt>. On <tt>hostnames no</tt> only IP-addresses will be displayed.</dd>
+ <dt><tt>dmpeers</tt></dt>
+ <dd>A slightly different peer summary list. Identical to the output of the <tt>peers</tt> command, except for the character in the leftmost column. Characters only appear beside peers which were included in the final stage of the clock selection algorithm. A <tt>.</tt> indicates that this peer was cast off in the falseticker detection, while a <tt>+</tt> indicates that the peer made it through. A <tt>*</tt> denotes the peer the server is currently synchronizing with.</dd>
+ <dt><tt>showpeer <i>peer_address</i> [...]</tt></dt>
+ <dd>Shows a detailed display of the current peer variables for one or more peers. Most of these values are described in the NTP Version 2 specification.</dd>
+ <dt><tt>pstats <i>peer_address</i> [...]</tt></dt>
+ <dd>Show per-peer statistic counters associated with the specified peer(s).</dd>
+ <dt><tt>clockstat <i>clock_peer_address</i> [...]</tt></dt>
+ <dd>Obtain and print information concerning a peer clock. The values obtained provide information on the setting of fudge factors and other clock performance information.</dd>
+ <dt><tt>kerninfo</tt></dt>
+ <dd>Obtain and print kernel phase-lock loop operating parameters. This information is available only if the kernel has been specially modified for a precision timekeeping function.</dd>
+ <dt><tt>loopinfo [ oneline | multiline ]</tt></dt>
+ <dd>Print the values of selected loop filter variables. The loop filter is the part of NTP which deals with adjusting the local system clock. The <tt>offset</tt> is the last offset given to the loop filter by the packet processing code. The <tt>frequency</tt> is the frequency error of the local clock in parts-per-million (ppm). The <tt>time_const</tt> controls the stiffness of the phase-lock loop and thus the speed at which it can adapt to oscillator drift. The <tt>watchdog timer</tt> value is the number of seconds which have elapsed since the last sample offset was given to the loop filter. The <tt>oneline</tt> and <tt>multiline</tt> options specify the format in which this information is to be printed, with <tt>multiline</tt> as the default.</dd>
+ <dt><tt>sysinfo</tt></dt>
+ <dd>Print a variety of system state variables, i.e., state related to the local server. All except the last four lines are described in the NTP Version 3 specification, RFC-1305.</dd>
+ <dd>The <tt>system flags</tt> show various system flags, some of which can be set and cleared by the <tt>enable</tt> and <tt>disable</tt> configuration commands, respectively. These are the <tt>auth</tt>, <tt>bclient</tt>, <tt>monitor</tt>, <tt>pll</tt>, <tt>pps</tt> and <tt>stats</tt> flags. See the <tt>ntpd</tt> documentation for the meaning of these flags. There are two additional flags which are read only, the <tt>kernel_pll</tt> and <tt>kernel_pps</tt>. These flags indicate the synchronization status when the precision time kernel modifications are in use. The <tt>kernel_pll</tt> indicates that the local clock is being disciplined by the kernel, while the kernel_pps indicates the kernel discipline is provided by the PPS signal.</dd>
+ <dd>Note that some directives, like <tt>enable pps</tt>, are only supported on certain versions of <tt>ntpd</tt>.</dd>
+ <dd>The <tt>stability</tt> is the residual frequency error remaining after the system frequency correction is applied and is intended for maintenance and debugging. In most architectures, this value will initially decrease from as high as 500 ppm to a nominal value in the range .01 to 0.1 ppm. If it remains high for some time after starting the daemon, something may be wrong with the local clock, or the value of the kernel variable <tt>tick</tt> may be incorrect.</dd>
+ <dd>The <tt>broadcastdelay</tt> shows the default broadcast delay, as set by the <tt>broadcastdelay</tt> configuration command.</dd>
+ <dd>The <tt>authdelay</tt> shows the default authentication delay, as set by the <tt>authdelay</tt> configuration command.</dd>
+ <dt><tt>sysstats</tt></dt>
+ <dd>Print statistics counters maintained in the protocol module.</dd>
+ <dt><tt>memstats</tt></dt>
+ <dd>Print statistics counters related to memory allocation code.</dd>
+ <dt><tt>iostats</tt></dt>
+ <dd>Print statistics counters maintained in the input-output module.</dd>
+ <dt><tt>timerstats</tt></dt>
+ <dd>Print statistics counters maintained in the timer/event queue support code.</dd>
+ <dt><tt>reslist</tt></dt>
+ <dd>Obtain and print the server's restriction list. This list is (usually) printed in sorted order and may help to understand how the restrictions are applied.</dd>
+ <dt><tt>ifstats</tt></dt>
+ <dd>List interface statistics for interfaces used by ntpd for network communication.</dd>
+ <dt><tt>ifreload</tt></dt>
+ <dd>Force rescan of current system interfaces. Outputs interface statistics for interfaces that could possibly change. Marks unchanged interfaces with <b>.</b>, added interfaces with <b>+</b> and deleted interfaces with <b>-</b>.</dd>
+ <dt><tt>monlist [ <i>version</i> ]</tt></dt>
+ <dd>Obtain and print traffic counts collected and maintained by the monitor facility. The version number should not normally need to be specified. At most, 600 entries are displayed by <tt>monlist</tt>. To display the entire MRU list, use the <tt>ntpq</tt> program's <a href="ntpq.html#mrulist"><tt>mrulist</tt></a> command.</dd>
+ <dt><tt>clkbug <i>clock_peer_address</i> [...]</tt></dt>
+ <dd>Obtain debugging information for a reference clock driver. This information is provided only by some clock drivers and is mostly undecodable without a copy of the driver source in hand.</dd>
+</dl>
+<h4>Runtime Configuration Requests</h4>
+<p>All requests which cause state changes in the server are authenticated by the server using a configured NTP key (the facility can also be disabled by the server by not configuring a key). The key number and the corresponding key must also be made known to <tt>ntpdc</tt>. This can be done using the keyid and passwd commands, the latter of which will prompt at the terminal for a password to use as the encryption key. You will also be prompted automatically for both the key number and password the first time a command which would result in an authenticated request to the server is given. Authentication not only provides verification that the requester has permission to make such changes, but also gives an extra degree of protection again transmission errors.</p>
+<p>Authenticated requests always include a timestamp in the packet data, which is included in the computation of the authentication code. This timestamp is compared by the server to its receive time stamp. If they differ by more than a small amount the request is rejected. This is done for two reasons. First, it makes simple replay attacks on the server, by someone who might be able to overhear traffic on your LAN, much more difficult. Second, it makes it more difficult to request configuration changes to your server from topologically remote hosts. While the reconfiguration facility will work well with a server on the local host, and may work adequately between time-synchronized hosts on the same LAN, it will work very poorly for more distant hosts. As such, if reasonable passwords are chosen, care is taken in the distribution and protection of keys and appropriate source address restrictions are applied, the run time reconfiguration facility should provide an adequate level of security.</p>
+<p>The following commands all make authenticated requests.</p>
+<dl>
+ <dt><tt>addpeer <i>peer_address</i> [ <i>keyid</i> ] [ <i>version</i> ] [ <tt>minpoll# | prefer | minpoll <i>N</i> | <tt>maxpoll</tt> <i>N</i> [...] ]</tt></tt></dt>
+ <dt><tt>addpeer <i>peer_address</i> [ <tt>prefer | minpoll <i>N</i> | <tt>maxpoll</tt> <i>N</i> | <tt>keyid</tt> <i>N</i> | <tt>version</tt> <i>N</i> [...] ]</tt></tt></dt>
+ <dd>Add a configured peer association at the given address and operating in symmetric
+ active mode. Note that an existing association with the same peer may be deleted when this
+ command is executed, or may simply be converted to conform to the new configuration, as appropriate. If the <tt>keyid</tt> is nonzero, all outgoing packets to the remote server will have an authentication field attached encrypted with this key. If the value is 0 (or not given) no authentication will be done. If ntpdc's key number has not yet been set (<i>e.g.,</i> by the keyid command), it will be set to this value. The <tt>version#</tt> can be 1 through 4 and defaults to 3. The remaining options are either a numeric value for <tt>minpoll</tt> or literals <tt>prefer</tt>, <tt>burst</tt>, <tt>minpoll </tt><i>N</i>, <tt>keyid </tt><i>N</i>, <tt>version </tt> <i>N</i>, or <tt>maxpoll </tt><i>N</i> (where <i>N</i> is a numeric value), and have the action as specified in the <tt>peer</tt> configuration file command of
+ ntpd. See the <a href="confopt.html">Server Options</a> page for further information. Each flag (or its absence) replaces the previous setting. The <tt>prefer</tt> keyword indicates a preferred peer (and thus will be used primarily for clock synchronisation if possible). The preferred peer also determines the validity of the PPS signal - if the preferred peer is suitable for synchronisation so is the PPS signal. The <tt>dynamic</tt> keyword allows association configuration even when no suitable network interface is found at configuration time. The dynamic interface update mechanism may complete the configuration when new interfaces appear (e.g. WLAN/PPP interfaces) at a later time and thus render the association operable.</dd>
+ <dt><tt>addserver <i>peer_address</i> [ <i>address</i> [ <i>keyid</i> ] [ <i>version</i> ] [ minpoll | prefer | iburst | burst | minpoll <i>N</i> | maxpoll <i>N</i> [...] ] prefer | iburst | burst | minpoll <i>N</i> | maxpoll <i>N</i> | keyid <i>N</i> | version <i>N</i> [...] ]</tt></dt>
+ <dd>Identical to the addpeer command, except that the operating mode is client.</dd>
+ <dt><tt>broadcast <i>peer_address</i> [ <i>keyid</i> ] [ <i>version</i> ] [ <i>prefer</i> ]</tt></dt>
+ <dd>Identical to the addpeer command, except that the operating mode is broadcast. In this case a valid non-zero key identifier and key are required. The <tt>peer_address</tt> parameter can be the broadcast address of the local network or a multicast group address assigned to NTP. If a multicast address, a multicast-capable kernel is required.</dd>
+ <dt><tt>unconfig <i>peer_address</i> [...]</tt></dt>
+ <dd>This command causes the configured bit to be removed from the specified peer(s). In many cases this will cause the peer association to be deleted. When appropriate, however, the association may persist in an unconfigured mode if the remote peer is willing to continue on in this fashion.</dd>
+ <dt><tt>fudge <i>peer_address</i> [ <i>time1</i> ] [ <i>time2</i> ] [ <i>stratum</i> ] [ <i>refid</i> ]</tt></dt>
+ <dd>This command provides a way to set certain data for a reference clock. See the source listing for further information.</dd>
+ <dt><tt>enable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt><br>
+ <tt>disable [ auth | bclient | calibrate | kernel | monitor | ntp | pps | stats]</tt></dt>
+ <dd>These commands operate in the same way as the <tt>enable</tt> and <tt>disable</tt> configuration file commands of <tt>ntpd</tt>. See the <a href="miscopt.html">Miscellaneous Options</a> page for further information.</dd>
+ <dt><tt>restrict <i>address mask flag</i> [ <i>flag</i> ]</tt></dt>
+ <dd>This command operates in the same way as the <tt>restrict</tt> configuration file commands of <tt>ntpd</tt>.</dd>
+ <dt><tt>unrestrict <i>address mask flag</i> [ <i>flag</i> ]</tt></dt>
+ <dd>Unrestrict the matching entry from the restrict list.</dd>
+ <dt><tt>delrestrict <i>address mask [ ntpport ]</i></tt></dt>
+ <dd>Delete the matching entry from the restrict list.</dd>
+ <dt><tt>readkeys</tt></dt>
+ <dd>Causes the current set of authentication keys to be purged and a new set to be obtained by rereading the keys file (which must have been specified in the <tt>ntpd</tt> configuration file). This allows encryption keys to be changed without restarting the server.</dd>
+ <dt><tt>trustedkey <i>keyid</i> [...]</tt></dt>
+ <dt><tt>untrustedkey <i>keyid</i> [...]</tt></dt>
+ <dd>These commands operate in the same way as the <tt>trustedkey</tt> and <tt>untrustedkey</tt> configuration file commands of <tt>ntpd</tt>.</dd>
+ <dt><tt>authinfo</tt></dt>
+ <dd>Returns information concerning the authentication module, including known keys and counts of encryptions and decryptions which have been done.</dd>
+ <dt><tt>traps</tt></dt>
+ <dd>Display the traps set in the server. See the source listing for further information.</dd>
+ <dt><tt>addtrap [ <i>address</i> [ <i>port</i> ] [ <i>interface</i> ]</tt></dt>
+ <dd>Set a trap for asynchronous messages. See the source listing for further information.</dd>
+ <dt><tt>clrtrap [ <i>address</i> [ <i>port</i> ] [ <i>interface</i>]</tt></dt>
+ <dd>Clear a trap for asynchronous messages. See the source listing for further information.</dd>
+ <dt><tt>reset</tt></dt>
+ <dd>Clear the statistics counters in various modules of the server. See the source listing for further information.</dd>
+</dl>
+<h4>Bugs</h4>
+<p><tt>ntpdc</tt> is a crude hack. Much of the information it shows is deadly boring and could only be loved by its implementer. The program was designed so that new (and temporary) features were easy to hack in, at great expense to the program's ease of use. Despite this, the program is occasionally useful.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntpdsim.html b/html/ntpdsim.html
new file mode 100644
index 0000000..3f823df
--- /dev/null
+++ b/html/ntpdsim.html
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntpdsim - Network Time Protocol (NTP) simulator</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</h3>
+<img src="pic/oz2.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
+<p>All in a row.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#synop">Synopsis</a></li>
+ <li class="inline"><a href="#descr">Description</a></li>
+ <li class="inline"><a href="#cmd">Command Line Oprionts</a></li>
+ <li class="inline"><a href="#files">Files</a></li>
+</ul>
+<hr>
+<h4 id="synop">Synopsis</h4>
+<tt>ntpdsim [ -B <i>bdly</i> ] [ -C <i>snse</i> ] [ -O <i>clk_time</i> ] [ -S <i>sim_time</i> ] [ -T <i>ferr</i> ] [ -W <i>fsne</i> ] [ -Y </tt><i><tt>ndly</tt></i><tt> ] [ -X </tt><i><tt>pdly</tt></i><tt> ]</tt>
+<h4 id="descr">Description</h4>
+<p>The <tt>ntpdsim</tt> program is an adaptation of the <tt>ntpd</tt> operating system daemon. The program operates as a discrete time simulator using specified systematic and random driving sources. It includes all the mitigation and discipline algorithms of the actual daemon, but with the packet I/O and system clock algorithms driven by simulation. Most functions of the real <tt>ntpd</tt> remain intact, including the monitoring, statistics recording, trace and host name resolution features. Further information on the simulator is on the <a href="http://www.eecis.udel.edu/%7emills/ntpsim.html">NTP Discrete Event Simulator</a> page.</p>
+<p>The simulator is most useful to study NTP behavior in response to time and/or frequency transients under specific conditions of network jitter and oscillator wander. For this purpose the daemon can be driven by pseudorandom jitter and wander sample sequences characteristic of real networks and oscillators. The jitter generator produces samples from a Poisson distribution, while the wander generator produces samples from a Guassian distribution.</p>
+<p>The easiest way to use this program is to create a <tt>ntpstats</tt> directory, configuration file <tt>ntp.conf</tt> and frequency file <tt>ntp.drift</tt> and test shell <tt>test.sh</tt> in the base directory. The <tt>ntp.drift</tt> file and <tt>ntpstats</tt> directory can be empty to start. The <tt>test.sh</tt> script can contain something like</p>
+<pre>rm ./ntpstats/*
+ntpdsim -O 0.1 -C .001 -T 400 -W 1 -c ./ntp.conf,
+</pre>
+<p>which starts the simulator with a time offset 100 ms, network jitter 1 ms, frequency offset 400 PPM and oscillator wander 1 PPM/s. These parameters represent typical conditions with modern workstations on a Ethernet LAN. The ntp.conf file should contain something like</p>
+<pre>disable kernel
+server pogo
+driftfile ./ntp.drift
+statsdir ./ntpstats/
+filegen loopstats type day enable
+filegen peerstats type day enable
+</pre>
+<h4 id="cmd">Command Line Options</h4>
+<dl>
+ <dt>Note: The NTP development team is moving to the use of a syntax-directed configuration file design. When complete these options will be replaced by a <a href="ntpdsim_new.html">new one</a>. Most of the <tt>ntpd</tt> command line options apply also to <tt>ntpdsim</tt>. In addition, the following command line options apply to <tt>ntpdsim.</tt></dt>
+ <dt><tt>-B <i>bdly</i></tt></dt>
+ <dd>Specify beep delay (3600) s.</dd>
+ <dt><tt>-C <i>snse</i></tt></dt>
+ <dd>Specify network jitter parameter (0) s.</dd>
+ <dt><tt>-O <i>clk_time</i></tt></dt>
+ <dd>Specify initial time offset (0) s.</dd>
+ <dt><tt>-S <i>sim_time</i></tt></dt>
+ <dd>Specify simulation duration (86400) s.</dd>
+ <dt><tt>-T <i>ferr</i></tt></dt>
+ <dd>Specify initial frequency offset (0) PPM.</dd>
+ <dt><tt>-W <i>fnse</i></tt></dt>
+ <dd>Specify oscillator wander parameter (0) PPM/s.</dd>
+ <dt><tt>-Y <i>ndly</i></tt></dt>
+ <dd>Specify network propagation delay (.001) s.</dd>
+ <dt><tt>-Z <i>pdly</i></tt></dt>
+ <dd>Specify server processing delay (.001) s.</dd>
+</dl>
+<h4 id="files">Files</h4>
+<tt>/etc/ntp.conf</tt> - the default name of the configuration file<br>
+<tt>/etc/ntp.drift</tt> - the default name of the drift file<br>
+<tt>/etc/ntp.keys</tt> - the default name of the key file
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntpdsim_new.html b/html/ntpdsim_new.html
new file mode 100644
index 0000000..54c6743
--- /dev/null
+++ b/html/ntpdsim_new.html
@@ -0,0 +1,110 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntpdsim - Network Time Protocol (NTP) Simulator</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntpdsim</tt> - Network Time Protocol (NTP) Simulator</h3>
+<img src="pic/oz2.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
+<p>All in a row.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li><a href="#description">Description</a></li>
+ <li><a href="#configuration">Configuration</a></li>
+ <li><a href="#sample">Sample Configuration File</a></li>
+</ul>
+<hr>
+<h4 id="description">Description</h4>
+<p>The ntpdsim program is used to simulate and study the behavior of an NTP daemon that derives its time from a number of different simulated time sources (servers). Each simulated server can be configured to have a different time offset, frequency offset, propagation delay, processing delay, network jitter and oscillator wander.</p>
+<p>The ntpdsim program runs all the same selection, mitigation, and discipline
+ algorithms as the actual ntpd daemon at the client. (It actually
+ uses the same code). However, the input/output routines and servers are simulated.
+ That is, instead of sending the client messages over the network
+ to the actual servers, the client messages are intercepted by the ntpdsim
+ program, which then generates the replies to those messages. The reply messages
+ are carefully &quot;inserted&quot; into the input queue of the client at the right time
+ according to the specified server properties (like propagation delay).</p>
+<p>Each simulated server runs according to a specified script that describes the server properties at a particular time. Each script consists of a series of consecutive acts. Each act runs for a particular duration and specifies the frequency offset, propagation delay, processing delay, network jitter and oscillator wander of the server for that duration. Once the duration of an act expires, the simulated server reconfigures itself according to the properties specified in the next act.</p>
+<h4 id="configuration">Configuration</h4>
+<p>The ntpdsim program is configured by providing a configuration file at startup. The crux of the simulator configuration is specified using a <tt>simulate</tt> command, the syntax of which is given below. Note that all time quantities are in seconds and all frequency quantities are in parts per million (PPM):</p>
+<p>&lt;<i>simulate_command</i>&gt; ::= <tt>simulate</tt> { &lt;<i>init_statement_list</i>&gt; &lt;<i>server_list</i>&gt; }<br>
+ &lt;<i>init_statement_list</i>&gt; ::= &lt;init_statement_list&gt; &lt;init_statement&gt; ; | &lt;init_statement&gt; ;<br>
+ &lt;<i>init_statement</i>&gt; ::= <tt>beep_delay</tt> = &lt;number&gt; | <tt>simulation_duration</tt> = &lt;number&gt;<br>
+ &lt;<i>server_list</i>&gt; ::= &lt;<i>server_list</i>&gt; &lt;server&gt; | &lt;server&gt;<br>
+ &lt;<i>server_list</i>&gt; ::= <tt>server</tt> = &lt;address&gt; { <tt>server_offset</tt> = &lt;number&gt; ; &lt;act_list&gt; }<br>
+ &lt;<i>act_list</i>&gt; ::= &lt;<i>act_list</i>&gt; &lt;<i>act</i>&gt; | &lt;<i>act</i>&gt;<br>
+ &lt;<i>act</i>&gt; ::= <tt>duration</tt> = &lt;number&gt; { &lt;<i>act_stmt_list</i>&gt; }<br>
+ &lt;<i>act_stmt_list</i>&gt; ::= &lt;<i>act_stmt_list</i>&gt; &lt;<i>act_stmt</i>&gt; ; | &lt;<i>act_stmt</i>&gt; ;<br>
+ &lt;<i>act_stmt</i>&gt; ::= <tt>freq_offset</tt> = &lt;number&gt; | <tt>wander</tt> = &lt;number&gt; | <tt>jitter</tt> = &lt;number&gt; | <tt>prop_delay</tt> = &lt;number&gt; | <tt>proc_delay</tt> = &lt;number&gt;</p>
+<p>In addition to the <tt>simulate</tt> command, other standard NTP configuration commands can be specified. These commands have the same meaning as in the ntpd configuration. Note that newlines are <b>not</b> significant within the <tt>simulate</tt> command even though they are used to mark the end of a normal NTP configuration command. While a newline is an "end of command" terminator for other configuration commands, in the <tt>simulate</tt> stanza <tt>;</tt> (the semicolon) is the "end of command" terminator.</p>
+<h4 id="sample">Sample Configuration File</h4>
+<p>A sample ntpdsim configuration file is given below. It specifies two simulated servers, each of which has two acts.</p>
+<pre>
+ # Client configuration
+ disable kernel
+ server pogo
+ driftfile ./ntp.drift
+ statsdir ./ntpstats/
+ filegen loopstats type day enable
+ filegen peerstats type day enable
+
+ # Simulation configuration
+ simulate {
+ simulation_duration = 86400;
+ beep_delay = 3600;
+
+ # Server 1
+ server = louie.udel.edu {
+ server_offset = 0;
+ duration = 50000 {
+ freq_offset = 400;
+ wander = 1.0;
+ jitter = 0.001;
+ prop_delay = 0.001;
+ proc_delay = 0.001;
+ }
+ duration = 6400 {
+ freq_offset = 200;
+ wander = 1.0;
+ jitter = 0.001;
+ prop_delay = 0.001;
+ proc_delay = 0.001;
+ }
+ }
+
+ # Server 2
+ server = baldwin.udel.edu {
+ server_offset = 0.02;
+ duration = 10000 {
+ freq_offset = 400;
+ wander = 1.0;
+ jitter = 0.001;
+ prop_delay = 0.5;
+ proc_delay = 0.001;
+ }
+ duration = 60000 {
+ freq_offset = 200;
+ wander = 1.0;
+ jitter = 0.05;
+ prop_delay = 0.005;
+ proc_delay = 0.001;
+ }
+ }
+ }
+ </pre>
+<hr>
+<address>
+<a href="mailto:skamboj@udel.edu">Sachin Kamboj</a>
+</address>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntpq.html b/html/ntpq.html
new file mode 100644
index 0000000..1aa8df3
--- /dev/null
+++ b/html/ntpq.html
@@ -0,0 +1,654 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntpq - standard NTP query program</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntpq</tt> - standard NTP query program</h3>
+<img src="pic/bustardfly.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>A typical NTP monitoring packet</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>More Help</h4>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<hr>
+<h4>Synopsis</h4>
+<tt>ntpq [-46dinp] [-c <i>command</i>] [<i>host</i>] [...]</tt>
+<h4>Description</h4>
+<p>The <tt>ntpq</tt> utility program is used to monitor NTP daemon <tt>ntpd</tt> operations
+ and determine performance. It uses the standard NTP mode 6 control
+ message formats defined in Appendix B of the NTPv3 specification
+ RFC1305. The same formats are used in NTPv4, although some of the
+ variable names have changed and new ones added. The description
+ on this page is for the NTPv4 variables.</p>
+<p>The program can be run either in interactive mode or controlled using command line arguments. Requests to read and write arbitrary variables can be assembled, with raw and pretty-printed output options being available. The <tt>ntpq</tt> can also obtain and print a list of peers in a common format by sending multiple queries to the server.</p>
+<p>If one or more request options is included on the command line when <tt>ntpq</tt> is executed, each of the requests will be sent to the NTP servers running on each of the hosts given as command line arguments, or on localhost by default. If no request options are given, <tt>ntpq</tt> will attempt to read commands from the standard input and execute these on the NTP server running on the first host given on the command line, again defaulting to localhost when no other host is specified. <tt>ntpq</tt> will prompt for commands if the standard input is a terminal device.</p>
+<p><tt>ntpq</tt> uses NTP mode 6 packets to communicate with the NTP server, and hence can be used to query any compatible server on the network which permits it. Note that since NTP is a UDP protocol this communication will be somewhat unreliable, especially over large distances in terms of network topology. <tt>ntpq</tt> makes one attempt to retransmit requests, and will time requests out if the remote host is not heard from within a suitable timeout time.</p>
+<p>Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</p>
+<p>For examples and usage, see the <a href="debug.html">NTP Debugging Techniques</a> page.</p>
+<p>Command line options are described following. Specifying a command line option other than <tt>-i</tt> or <tt>-n</tt> will cause the specified query (queries) to be sent to the indicated host(s) immediately. Otherwise, <tt>ntpq</tt> will attempt to read interactive format commands from the standard input.</p>
+<dl>
+ <dt><tt>-4</tt></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv4 namespace.</dd>
+ <dt><tt>-6</tt></dt>
+ <dd>Force DNS resolution of following host names on the command line to the IPv6 namespace.</dd>
+ <dt><tt>-c</tt></dt>
+ <dd>The following argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified host(s). Multiple <tt>-c</tt> options may be given.</dd>
+ <dt><tt>-d</tt></dt>
+ <dd>Turn on debugging mode.</dd>
+ <dt><tt>-i</tt></dt>
+ <dd>Force <tt>ntpq</tt> to operate in interactive mode. Prompts will be written to the standard output and commands read from the standard input.</dd>
+ <dt><tt>-n</tt></dt>
+ <dd>Output all host addresses in dotted-quad numeric format rather than converting to the canonical host names.</dd>
+ <dt><tt>-p</tt></dt>
+ <dd>Print a list of the peers known to the server as well as a summary of their state. This is equivalent to the <tt>peers</tt> interactive command.</dd>
+</dl>
+<h4>Internal Commands</h4>
+<p>Interactive format commands consist of a keyword followed by zero to four arguments. Only enough characters of the full keyword to uniquely identify the command need be typed. The output of a command is normally sent to the standard output, but optionally the output of individual commands may be sent to a file by appending a <tt>&gt;</tt>, followed by a file name, to the command line. A number of interactive format commands are executed entirely within the <tt>ntpq</tt> program itself and do not result in NTP mode-6 requests being sent to a server. These are described following.</p>
+<dl>
+ <dt id="help"><tt>? [<i>command_keyword</i>]</tt><br>
+ <tt>help [<i>command_keyword</i>]</tt></dt>
+ <dd>A <tt>?</tt> by itself will print a list of all the command keywords known to <tt>ntpq</tt>. A <tt>?</tt> followed by a command keyword will print function and usage information about the command.</dd>
+ <dt id="addvars"><tt>addvars <i>name</i> [ = <i>value</i>] [...]</tt><br>
+ <tt>rmvars <i>name</i> [...]</tt><br>
+ <tt>clearvars</tt></dt>
+ <dd>The arguments to this command consist of a list of items of the form <tt><i>name</i> = <i>value</i></tt>, where the <tt>= <i>value</i></tt> is ignored, and can be omitted in read requests. <tt>ntpq</tt> maintains an internal list in which data to be included in control messages can be assembled, and sent using the <tt>readlist</tt> and <tt>writelist</tt> commands described below. The <tt>addvars</tt> command allows variables and optional values to be added to the list. If more than one variable is to be added, the list should be comma-separated and not contain white space. The <tt>rmvars</tt> command can be used to remove individual variables from the list, while the <tt>clearlist</tt> command removes all variables from the list.</dd>
+ <dt id="cooked"><tt>cooked</tt></dt>
+ <dd>Display server messages in prettyprint format.</dd>
+ <dt id="debug"><tt>debug more | less | off</tt></dt>
+ <dd>Turns internal query program debugging on and off.</dd>
+ <dt id="delay"><tt>delay <i>milliseconds</i></tt></dt>
+ <dd>Specify a time interval to be added to timestamps included in requests which require authentication. This is used to enable (unreliable) server reconfiguration over long delay network paths or between machines whose clocks are unsynchronized. Actually the server does not now require timestamps in authenticated requests, so this command may be obsolete.</dd>
+ <dt id="host"><tt>host <i>name</i></tt></dt>
+ <dd>Set the host to which future queries will be sent. The name may be either a DNS name or a numeric address.</dd>
+ <dt id="hostnames"><tt>hostnames [yes | no]</tt></dt>
+ <dd>If <tt>yes</tt> is specified, host names are printed in information displays. If <tt>no</tt> is specified, numeric addresses are printed instead. The default is <tt>yes</tt>, unless modified using the command line <tt>-n</tt> switch.</dd>
+ <dt id="keyid"><tt>keyid <i>keyid</i></tt></dt>
+ <dd>This command specifies the key number to be used to authenticate configuration requests. This must correspond to a key ID configured in <tt>ntp.conf</tt> for this purpose.</dd>
+ <dt id="keytype"><tt>keytype</tt></dt>
+ <dd>Specify the digest algorithm to use for authenticated requests, with default <tt>MD5</tt>. If the OpenSSL library is installed, digest can be be any message digest algorithm supported by the library. The current selections are: <tt>MD2</tt>, <tt>MD4</tt>, <tt>MD5</tt>, <tt>MDC2</tt>, <tt>RIPEMD160</tt>, <tt>SHA</tt> and <tt>SHA1</tt>.</dd>
+ <dt id="ntpversion"><tt>ntpversion 1 | 2 | 3 | 4</tt></dt>
+ <dd>Sets the NTP version number which <tt>ntpq</tt> claims in packets. Defaults to 2, Note that mode-6 control messages (and modes, for that matter) didn't exist in NTP version 1.</dd>
+ <dt id="passwd"><tt>passwd</tt></dt>
+ <dd>This command prompts for a password to authenticate requests. The password must correspond to the key ID configured in <tt>ntp.conf</tt> for this purpose.</dd>
+ <dt id="quit"><tt>quit</tt></dt>
+ <dd>Exit <tt>ntpq</tt>.</dd>
+ <dt id="raw"><tt>raw</tt></dt>
+ <dd>Display server messages as received and without reformatting.</dd>
+ <dt id="timeout"><tt>timeout <i>millseconds</i></tt></dt>
+ <dd>Specify a timeout period for responses to server queries. The default is about 5000 milliseconds. Note that since <tt>ntpq</tt> retries each query once after a timeout, the total waiting time for a timeout will be twice the timeout value set.</dd>
+</dl>
+<h4>Control Message Commands</h4>
+<p>Association IDs are used to identify system, peer and clock variables. System variables are assigned an association ID of zero and system name space, while each association is assigned a nonzero association ID and peer namespace. Most control commands send a single mode-6 message to the server and expect a single response message. The exceptions are the <tt>peers</tt> command, which sends a series of messages, and the <tt>mreadlist</tt> and <tt>mreadvar</tt> commands, which iterate over a range of associations.</p>
+<dl>
+ <dt id="as"><tt>associations</tt></dt>
+ <dd>Display a list of mobilized associations in the form</dd>
+ <dd><tt>ind assid status conf reach auth condition last_event cnt</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>ind</tt></td>
+ <td>index on this list</td>
+ </tr>
+ <tr>
+ <td><tt>assid</tt></td>
+ <td>association ID</td>
+ </tr>
+ <tr>
+ <td><tt>status</tt></td>
+ <td><a href="decode.html#peer">peer status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>conf</tt></td>
+ <td><tt>yes</tt>: persistent, <tt>no</tt>: ephemeral</td>
+ </tr>
+ <tr>
+ <td><tt>reach</tt></td>
+ <td><tt>yes</tt>: reachable, <tt>no</tt>: unreachable</td>
+ </tr>
+ <tr>
+ <td><tt>auth</tt></td>
+ <td><tt>ok</tt>, <tt>yes</tt>, <tt>bad</tt> and <tt>none</tt></td>
+ </tr>
+ <tr>
+ <td><tt>condition</tt></td>
+ <td>selection status (see the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
+ </tr>
+ <tr>
+ <td><tt>last_event</tt></td>
+ <td>event report (see the <tt>event</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
+ </tr>
+ <tr>
+ <td><tt>cnt</tt></td>
+ <td>event count (see the <tt>count</tt> field of the <a href="decode.html#peer">peer status word</a>)</td>
+ </tr>
+ </table>
+ </dd>
+ <dt id="cv"><tt>clockvar <i>assocID</i> [<i>name</i> [ = <i>value</i> [...]] [...]</tt><br>
+ <tt>cv <i>assocID</i> [<i>name</i> [ = <i>value</i> [...] ][...]</tt></dt>
+ <dd>Display a list of <a href="#clock">clock variables</a> for those associations supporting a reference clock.</dd>
+ <dt id=":config"><tt>:config [...]</tt></dt>
+ <dd>Send the remainder of the command line, including whitespace, to the server as a run-time configuration command in the same format as the configuration file. This command is experimental until further notice and clarification. Authentication is of course required.</dd>
+ <dt id="config-from-file"><tt>config-from-file <i>filename</i></tt></dt>
+ <dd>Send the each line of <i>filename</i> to the server as run-time configuration commands in the same format as the configuration file. This command is experimental until further notice and clarification. Authentication is required.</dd>
+ <dt id="ifstats"><tt>ifstats</tt></dt>
+ <dd>Display statistics for each local network address. Authentication is required.</dd>
+ <dt id="iostats"><tt>iostats</tt></dt>
+ <dd>Display network and reference clock I/O statistics.</dd>
+ <dt id="kerninfo"><tt>kerninfo</tt></dt>
+ <dd>Display kernel loop and PPS statistics. As with other ntpq output, times are in milliseconds. The precision value displayed is in milliseconds as well, unlike the precision system variable.</dd>
+ <dt id="lassoc"><tt>lassociations</tt></dt>
+ <dd>Perform the same function as the associations command, except display mobilized and unmobilized associations.</dd>
+ <dt id="monstats"><tt>monstats</tt></dt>
+ <dd>Display monitor facility statistics.</dd>
+ <dt id="mrulist"><tt>mrulist [limited | kod | mincount=<i>count</i> | laddr=<i>localaddr</i> | sort=<i>sortorder</i> | resany=<i>hexmask</i> | resall=<i>hexmask</i>]</tt></dt>
+ <dd>Obtain and print traffic counts collected and maintained by the monitor facility. With the exception of <tt>sort=<i>sortorder</i></tt>, the options filter the list returned by <tt>ntpd</tt>. The <tt>limited</tt> and <tt>kod</tt> options return only entries representing client addresses from which the last packet received triggered either discarding or a KoD response. The <tt>mincount=<i>count</i></tt> option filters entries representing less than <tt><i>count</i></tt> packets. The <tt>laddr=<i>localaddr</i></tt> option filters entries for packets received on any local address other than <tt><i>localaddr</i></tt>. <tt>resany=<i>hexmask</i></tt> and <tt>resall=<i>hexmask</i></tt> filter entries containing none or less than all, respectively, of the bits in <tt><i>hexmask</i></tt>, which must begin with <tt>0x</tt>.</dd>
+ <dd>The <tt><i>sortorder</i></tt> defaults to <tt>lstint</tt> and may be any of <tt>addr</tt>, <tt>count</tt>, <tt>avgint</tt>, <tt>lstint</tt>, or any of those preceded by a minus sign (hyphen) to reverse the sort order. The output columns are:
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Column</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>lstint</tt></td>
+ <td>Interval in s between the receipt of the most recent packet from this address and the completion of the
+ retrieval of the MRU list by <tt>ntpq</tt>.</td>
+ </tr>
+ <tr>
+ <td><tt>avgint</tt></td>
+ <td>Average interval in s between packets from this address.</td>
+ </tr>
+ <tr>
+ <td><tt>rstr</tt></td>
+ <td>Restriction flags associated with this address. Most are copied unchanged from the matching <tt>restrict</tt> command, however 0x400 (kod) and 0x20 (limited) flags are cleared unless the last packet from this
+ address triggered a rate control response.</td>
+ </tr>
+ <tr>
+ <td><tt>r</tt></td>
+ <td>Rate control indicator, either a period, <tt>L</tt> or <tt>K</tt> for no rate control response,
+ rate limiting by discarding, or rate limiting with a KoD response, respectively.</td>
+ </tr>
+ <tr>
+ <td><tt>m</tt></td>
+ <td>Packet mode.</td>
+ </tr>
+ <tr>
+ <td><tt>v</tt></td>
+ <td>Packet version number.</td>
+ </tr>
+ <tr>
+ <td><tt>count</tt></td>
+ <td>Packets received from this address.</td>
+ </tr>
+ <tr>
+ <td><tt>rport</tt></td>
+ <td>Source port of last packet from this address.</td>
+ </tr>
+ <tr>
+ <td><tt>remote address</tt></td>
+ <td>DNS name, numeric address, or address followed by claimed DNS name which
+ could not be verified in parentheses.</td>
+ </tr>
+ </table>
+ </dd>
+ <dt id="mreadvar"><tt>mreadvar <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt></dt>
+ <dt id="mrv"><tt>mrv <i>assocID</i> <i>assocID</i> [ <i>variable_name</i> [ = <i>value</i>[ ... ]</tt></dt>
+ <dd>Perform the same function as the <tt>readvar</tt> command, except for a range of association IDs. This range is determined from the association list cached by the most recent <tt>associations</tt> command.</dd>
+ <dt id="passoc"><tt>passociations</tt></dt>
+ <dd>Perform the same function as the <tt>associations command</tt>, except that it uses previously stored data rather than making a new query.</dd>
+ <dt id="pe"><tt>peers</tt></dt>
+ <dd>Display a list of peers in the form</dd>
+ <dd><tt>[tally]remote refid st t when pool reach delay offset jitter</tt></dd>
+ <dd>
+ <table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>[tally]</tt></td>
+ <td>single-character code indicating current value of the <tt>select</tt> field of the <a href="decode.html#peer">peer status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>remote</tt></td>
+ <td>host name (or IP number) of peer</td>
+ </tr>
+ <tr>
+ <td><tt>refid</tt></td>
+ <td>association ID or <a href="decode.html#kiss">kiss code</a></td>
+ </tr>
+ <tr>
+ <td><tt>st</tt></td>
+ <td>stratum</td>
+ </tr>
+ <tr>
+ <td><tt>t</tt></td>
+ <td><tt>u</tt>: unicast or manycast client, <tt>b</tt>:
+ broadcast or multicast client, <tt>l</tt>: local (reference clock), <tt>s</tt>: symmetric (peer), <tt>A</tt>: manycast server, <tt>B</tt>:
+ broadcast server, <tt>M</tt>: multicast server</td>
+ </tr>
+ <tr>
+ <td><tt>when</tt></td>
+ <td>sec/min/hr since last received packet</td>
+ </tr>
+ <tr>
+ <td><tt>poll</tt></td>
+ <td>poll interval (log<sub>2</sub> s)</td>
+ </tr>
+ <tr>
+ <td><tt>reach</tt></td>
+ <td>reach shift register (octal)</td>
+ </tr>
+ <tr>
+ <td><tt>delay</tt></td>
+ <td>roundtrip delay</td>
+ </tr>
+ <tr>
+ <td><tt>offset</tt></td>
+ <td>offset of server relative to this host</td>
+ </tr>
+ <tr>
+ <td><tt>jitter</tt></td>
+ <td>jitter</td>
+ </tr>
+ </table>
+ </dd>
+ <dt id="rv"><tt>readvar <i>assocID</i> <i>name</i> [ = <i>value</i> ] [,...]</tt><br>
+ <tt>rv <i>assocID</i> [ <i>name</i> ] [,...]</tt></dt>
+ <dd>Display the specified variables. If <tt><i>assocID</i></tt> is zero, the
+ variables are from the <a href="#system">system variables</a> name space,
+ otherwise they are from the <a href="#peer">peer variables</a> name space.
+ The <tt><i>assocID</i></tt> is required, as the same name can occur in both spaces. If no <tt><i>name</i></tt> is
+ included, all operative variables in the name space are displayed.
+ In this case only, if the <tt><i>assocID</i></tt> is omitted, it is assumed zero. Multiple
+ names are specified with comma separators and without whitespace.
+ Note that time values are represented in milliseconds and frequency
+ values in parts-per-million (PPM). Some NTP timestamps are represented
+ in the format YYYYMMDDTTTT, where YYYY is the year, MM the month
+ of year, DD the day of month and TTTT the time of day.</dd>
+ <dt id="saveconfig"><tt>saveconfig <i>filename</i></tt></dt>
+ <dd>Write the current configuration, including any runtime modifications given with <tt>:config</tt> or <tt>config-from-file</tt>, to the ntpd host's file <i>filename</i>. This command will be rejected by the server unless <a href="miscopt.html#saveconfigdir">saveconfigdir</a> appears in the <tt>ntpd</tt> configuration file. <i>filename</i> can use strftime() format specifies to substitute the current date and time, for example, <tt>saveconfig ntp-%Y%m%d-%H%M%S.conf</tt>. The filename used is stored in system variable <tt>savedconfig</tt>. Authentication is required.</dd>
+ <dt id="writevar"><tt>writevar <i>assocID</i> <i>name</i> = <i>value</i> [,...]</tt></dt>
+ <dd>Write the specified variables. If the <tt><i>assocID</i></tt> is zero, the variables are from the <a href="#system">system variables</a> name space, otherwise they are from the <a href="#peer">peer variables</a> name space. The <tt><i>assocID</i></tt> is required, as the same name can occur in both spaces.</dd>
+ <dt id="sysinfo"><tt>sysinfo</tt></dt>
+ <dd>Display operational summary.</dd>
+ <dt id="sysstats"><tt>sysstats</tt></dt>
+ <dd>Print statistics counters maintained in the protocol module.</dd>
+</dl>
+<h4 id="status">Status Words and Kiss Codes</h4>
+<p>The current state of the operating program is shown in a set of status words maintained by the system and each association separately. These words are displayed in the <tt>rv</tt> and <tt>as</tt> commands both in hexadecimal and decoded short tip strings. The codes, tips and short explanations are on the <a href="decode.html">Event Messages and Status Words</a> page. The page also includes a list of system and peer messages, the code for the latest of which is included in the status word.</p>
+<p>Information resulting from protocol machine state transitions is displayed using an informal set of ASCII strings called <a href="decode.html#kiss">kiss codes</a>. The original purpose was for kiss-o'-death (KoD) packets sent by the server to advise the client of an unusual condition. They are now displayed, when appropriate, in the reference identifier field in various billboards.</p>
+<h4 id="system">System Variables</h4>
+<p>The following system variables appear in the <tt>rv</tt> billboard. Not all variables are displayed in some configurations.</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>status</tt></td>
+ <td><a href="decode.html#sys">system status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>version</tt></td>
+ <td>NTP software version and build time</td>
+ </tr>
+ <tr>
+ <td><tt>processor</tt></td>
+ <td>hardware platform and version</td>
+ </tr>
+ <tr>
+ <td><tt>system</tt></td>
+ <td>operating system and version</td>
+ </tr>
+ <tr>
+ <td><tt>leap</tt></td>
+ <td>leap warning indicator (0-3)</td>
+ </tr>
+ <tr>
+ <td><tt>stratum</tt></td>
+ <td>stratum (1-15)</td>
+ </tr>
+ <tr>
+ <td><tt>precision</tt></td>
+ <td>precision (log<sub>2</sub> s)</td>
+ </tr>
+ <tr>
+ <td><tt>rootdelay</tt></td>
+ <td>total roundtrip delay to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>rootdisp</tt></td>
+ <td>total dispersion to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>peer</tt></td>
+ <td>system peer association ID</td>
+ </tr>
+ <tr>
+ <td><tt>tc</tt></td>
+ <td>time constant and poll exponent (log<sub>2</sub> s) (3-17)</td>
+ </tr>
+ <tr>
+ <td><tt>mintc</tt></td>
+ <td>minimum time constant (log<sub>2</sub> s) (3-10)</td>
+ </tr>
+ <tr>
+ <td><tt>clock</tt></td>
+ <td>date and time of day</td>
+ </tr>
+ <tr>
+ <td><tt>refid</tt></td>
+ <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
+ </tr>
+ <tr>
+ <td><tt>reftime</tt></td>
+ <td>reference time</td>
+ </tr>
+ <tr>
+ <td><tt>offset</tt></td>
+ <td>combined offset of server relative to this host</td>
+ </tr>
+ <tr>
+ <td><tt>sys_jitter</tt></td>
+ <td>combined system jitter</td>
+ </tr>
+ <tr>
+ <td><tt>frequency</tt></td>
+ <td> frequency offset (PPM) relative to hardware clock</td>
+ </tr>
+ <tr>
+ <td><tt>clk_wander</tt></td>
+ <td>clock frequency wander (PPM)</td>
+ </tr>
+ <tr>
+ <td><tt>clk_jitter</tt></td>
+ <td>clock jitter</td>
+ </tr>
+ <tr>
+ <td><tt>tai</tt></td>
+ <td>TAI-UTC offset (s)</td>
+ </tr>
+ <tr>
+ <td><tt>leapsec</tt></td>
+ <td>NTP seconds when the next leap second is/was inserted</td>
+ </tr>
+ <tr>
+ <td><tt>expire</tt></td>
+ <td>NTP seconds when the NIST leapseconds file expires</td>
+ </tr>
+</table>
+<dl>
+ <dt>The jitter and wander statistics are exponentially-weighted RMS averages.
+ The system jitter is defined in the NTPv4 specification; the
+ clock jitter statistic is computed by the clock discipline module.</dt>
+ <dt>When the NTPv4 daemon is compiled with the OpenSSL software library, additional
+ system variables are displayed, including some or all of the following, depending
+ on the particular Autokey dance:</dt>
+</dl>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>host</tt></td>
+ <td>Autokey host name for this host</td>
+ </tr>
+ <tr>
+ <td><tt>ident</tt></td>
+ <td>Autokey group name for this host</td>
+ </tr>
+ <tr>
+ <td><tt>flags</tt></td>
+ <td>host flags (see Autokey specification)</td>
+ </tr>
+ <tr>
+ <td><tt>digest</tt></td>
+ <td>OpenSSL message digest algorithm</td>
+ </tr>
+ <tr>
+ <td><tt>signature</tt></td>
+ <td>OpenSSL digest/signature scheme</td>
+ </tr>
+ <tr>
+ <td><tt>update</tt></td>
+ <td>NTP seconds at last signature update</td>
+ </tr>
+ <tr>
+ <td><tt>cert</tt></td>
+ <td>certificate subject, issuer and certificate flags</td>
+ </tr>
+ <tr>
+ <td><tt>until</tt></td>
+ <td>NTP seconds when the certificate expires</td>
+ </tr>
+</table>
+<h4 id="peer">Peer Variables</h4>
+<p>The following peer variables appear in the <tt>rv</tt> billboard for each association. Not all variables are displayed in some configurations.</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>associd</tt></td>
+ <td>association ID</td>
+ </tr>
+ <tr>
+ <td><tt>status</tt></td>
+ <td><a href="decode.html#peer">peer status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>srcadr<br>
+ srcport</tt></td>
+ <td>source (remote) IP address and port</td>
+ </tr>
+ <tr>
+ <td><tt>dstadr<br>
+ dstport</tt></td>
+ <td>destination (local) IP address and port</td>
+ </tr>
+ <tr>
+ <td><tt>leap</tt></td>
+ <td>leap indicator (0-3)</td>
+ </tr>
+ <tr>
+ <td><tt>stratum</tt></td>
+ <td>stratum (0-15)</td>
+ </tr>
+ <tr>
+ <td><tt>precision</tt></td>
+ <td>precision (log<sub>2</sub> s)</td>
+ </tr>
+ <tr>
+ <td><tt>rootdelay</tt></td>
+ <td>total roundtrip delay to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>rootdisp</tt></td>
+ <td>total root dispersion to the primary reference clock</td>
+ </tr>
+ <tr>
+ <td><tt>refid</tt></td>
+ <td>reference ID or <a href="decode.html#kiss">kiss code</a></td>
+ </tr>
+ <tr>
+ <td><tt>reftime</tt></td>
+ <td>reference time</td>
+ </tr>
+ <tr>
+ <td><tt>reach</tt></td>
+ <td>reach register (octal)</td>
+ </tr>
+ <tr>
+ <td><tt>unreach</tt></td>
+ <td>unreach counter</td>
+ </tr>
+ <tr>
+ <td><tt>hmode</tt></td>
+ <td>host mode (1-6)</td>
+ </tr>
+ <tr>
+ <td><tt>pmode</tt></td>
+ <td>peer mode (1-5)</td>
+ </tr>
+ <tr>
+ <td><tt>hpoll</tt></td>
+ <td>host poll exponent (log<sub>2</sub> s) (3-17)</td>
+ </tr>
+ <tr>
+ <td><tt>ppoll</tt></td>
+ <td>peer poll exponent (log<sub>2</sub> s) (3-17)</td>
+ </tr>
+ <tr>
+ <td><tt>headway</tt></td>
+ <td>headway (see <a href="rate.html">Rate Management and the Kiss-o'-Death Packet)</a></td>
+ </tr>
+ <tr>
+ <td><tt>flash</tt></td>
+ <td><a href="decode.html#flash">flash status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>offset</tt></td>
+ <td>filter offset</td>
+ </tr>
+ <tr>
+ <td><tt>delay</tt></td>
+ <td>filter delay</td>
+ </tr>
+ <tr>
+ <td><tt>dispersion</tt></td>
+ <td>filter dispersion</td>
+ </tr>
+ <tr>
+ <td><tt>jitter</tt></td>
+ <td>filter jitter</td>
+ </tr>
+ <tr>
+ <td><tt>ident</tt></td>
+ <td>Autokey group name for this association</td>
+ </tr>
+ <tr>
+ <td><tt>bias</tt></td>
+ <td>unicast/broadcast bias</td>
+ </tr>
+ <tr>
+ <td><tt>xleave</tt></td>
+ <td>interleave delay (see <a href="xleave.html">NTP Interleaved Modes</a>)</td>
+ </tr>
+</table>
+<p>The bias variable is calculated when the first broadcast packet is received
+ after the calibration volley. It represents the offset of the broadcast
+ subgraph relative to the unicast subgraph. The xleave variable appears
+ only the interleaved symmetric and interleaved modes. It represents
+ the internal queuing, buffering and transmission delays for the preceding
+ packet.</p>
+<p>When the NTPv4 daemon is compiled with the OpenSSL software library, additional peer variables are displayed, including the following:</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>flags</tt></td>
+ <td>peer flags (see Autokey specification)</td>
+ </tr>
+ <tr>
+ <td><tt>host</tt></td>
+ <td>Autokey server name</td>
+ </tr>
+ <tr>
+ <td><tt>flags</tt></td>
+ <td>peer flags (see Autokey specification)</td>
+ </tr>
+ <tr>
+ <td><tt>signature</tt></td>
+ <td>OpenSSL digest/signature scheme</td>
+ </tr>
+ <tr>
+ <td><tt>initsequence</tt></td>
+ <td>initial key ID</td>
+ </tr>
+ <tr>
+ <td><tt>initkey</tt></td>
+ <td>initial key index</td>
+ </tr>
+ <tr>
+ <td><tt>timestamp</tt></td>
+ <td>Autokey signature timestamp</td>
+ </tr>
+</table>
+<h4 id="clock">Clock Variables</h4>
+<p>The following clock variables appear in the <tt>cv</tt> billboard for each association with a reference clock. Not all variables are displayed in some configurations.</p>
+<table width="100%" border="1" cellspacing="2" cellpadding="2">
+ <tr>
+ <td>Variable</td>
+ <td>Description</td>
+ </tr>
+ <tr>
+ <td><tt>associd</tt></td>
+ <td>association ID</td>
+ </tr>
+ <tr>
+ <td><tt>status</tt></td>
+ <td><a href="decode.html#clock">clock status word</a></td>
+ </tr>
+ <tr>
+ <td><tt>device</tt></td>
+ <td>device description</td>
+ </tr>
+ <tr>
+ <td><tt>timecode</tt></td>
+ <td>ASCII time code string (specific to device)</td>
+ </tr>
+ <tr>
+ <td><tt>poll</tt></td>
+ <td>poll messages sent</td>
+ </tr>
+ <tr>
+ <td><tt>noreply</tt></td>
+ <td>no reply</td>
+ </tr>
+ <tr>
+ <td><tt>badformat</tt></td>
+ <td>bad format</td>
+ </tr>
+ <tr>
+ <td><tt>baddata</tt></td>
+ <td>bad date or time</td>
+ </tr>
+ <tr>
+ <td><tt>fudgetime1</tt></td>
+ <td>fudge time 1</td>
+ </tr>
+ <tr>
+ <td><tt>fudgetime2</tt></td>
+ <td>fudge time 2</td>
+ </tr>
+ <tr>
+ <td><tt>stratum</tt></td>
+ <td>driver stratum</td>
+ </tr>
+ <tr>
+ <td><tt>refid</tt></td>
+ <td>driver reference ID</td>
+ </tr>
+ <tr>
+ <td><tt>flags</tt></td>
+ <td>driver flags</td>
+ </tr>
+</table>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntptime.html b/html/ntptime.html
new file mode 100644
index 0000000..8f14761
--- /dev/null
+++ b/html/ntptime.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntptime - read and set kernel time variables</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntptime</tt> - read and set kernel time variables</h3>
+<img src="pic/pogo5.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>The turtle has been swimming in the kernel.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<hr>
+<h4>Synopsis</h4>
+<tt>ntptime [ -chr ] [ -e <i>est_error</i> ] [ -f <i>frequency</i> ] [ -m <i>max_error</i> ] [ -o <i>offset</i> ] [ -s <i>status</i> ] [ -t <i>time_constant</i>]</tt>
+<h4>Description</h4>
+<p>This program is useful only with special kernels described in the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page. It reads and displays time-related kernel variables using the <tt>ntp_gettime()</tt> system call. A similar display can be obtained using the <tt>ntpdc</tt> program and <tt>kerninfo</tt> command.</p>
+<h4>Options</h4>
+<dl>
+ <dt><tt>-c</tt></dt>
+ <dd>Display the execution time of <tt>ntptime</tt> itself.</dd>
+ <dt><tt>-e <i>est_error</i></tt></dt>
+ <dd>Specify estimated error, in microseconds.</dd>
+ <dt><tt>-f <i>frequency</i></tt></dt>
+ <dd>Specify frequency offset, in parts per million.</dd>
+ <dt><tt>-h</tt></dt>
+ <dd>Display help information.</dd>
+ <dt><tt>-m <i>max_error</i></tt></dt>
+ <dd>Specify max possible errors, in microseconds.</dd>
+ <dt><tt>-o <i>offset</i></tt></dt>
+ <dd>Specify clock offset, in microseconds.</dd>
+ <dt><tt>-r</tt></dt>
+ <dd>Display Unix and NTP times in raw format.</dd>
+ <dt><tt>-s <i>status</i></tt></dt>
+ <dd>Specify clock status. Better know what you are doing.</dd>
+ <dt><tt>-t <i>time_constant</i></tt></dt>
+ <dd>Specify time constant, an integer in the range 0-10.</dd>
+</dl>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/ntptrace.html b/html/ntptrace.html
new file mode 100644
index 0000000..bd47bd9
--- /dev/null
+++ b/html/ntptrace.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>ntptrace - trace a chain of NTP servers back to the primary source</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</h3>
+<img src="pic/alice13.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>The rabbit knows the way back.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->31-Jan-2014 06:54<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<hr>
+<h4>Synopsis</h4>
+<tt>ntptrace [ -n ] [ -m <i>maxhosts</i> ] [ <i>server</i> ]</tt>
+<h4>Description</h4>
+<p><tt>ntptrace</tt> is a <tt>perl</tt> script that uses the <tt>ntpq</tt> utility program to follow the chain of NTP&nbsp;servers from a given host back to the primary time source. For <tt>ntptrace</tt> to work properly, each of these servers must implement the NTP&nbsp;Control and Monitoring Protocol specified in RFC 1305 and enable NTP&nbsp;Mode 6 packets.</p>
+<p>If given no arguments, <tt>ntptrace</tt> starts with <tt>localhost</tt>. Here is an example of the output from <tt>ntptrace</tt>:</p>
+<pre>
+% ntptrace
+localhost: stratum 4, offset 0.0019529, synch distance 0.144135
+server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784
+usndh.edu: stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
+</pre>
+<p>On each line, the fields are (left to right): the host name, the host stratum, the time offset between that host and the local host (as measured by <tt>ntptrace</tt>; this is why it is not always zero for &quot;<tt>localhost</tt>&quot;), the host synchronization distance, and (only for stratum-1 servers) the reference clock ID. All times are given in seconds. Note that the stratum is the server hop count to the primary source, while the synchronization distance is the estimated error relative to the primary source. These terms are precisely defined in RFC-1305.</p>
+<h4>Options</h4>
+<dl>
+ <dt><tt>-m <i>max_hosts</i></tt></dt>
+ <dd>Sets the upper limit of the number of hosts to check (default: unlimited).</dd>
+ <dt><tt>-n</tt></dt>
+ <dd>Turns off the printing of host names; instead, host IP addresses are given. This may be useful if a nameserver is down.</dd>
+</dl>
+<h4>Bugs</h4>
+<p>This program makes no attempt to improve accuracy by doing multiple samples.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/orphan.html b/html/orphan.html
new file mode 100644
index 0000000..3174c8e
--- /dev/null
+++ b/html/orphan.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Orphan Mode</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Orphan Mode</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->4-Aug-2011 23:40<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>Sometimes an NTP subnet becomes isolated from all UTC sources such as local reference clocks or Internet time servers. In such cases it may be necessary that the subnet servers and clients remain synchronized to a common timescale, not necessarily the UTC timescale. Previously, this function was provided by the local clock driver to simulate a UTC source. A server with this driver could be used to synchronize other hosts in the subnet directly or indirectly.</p>
+<p>There are many disadvantages using the local clock driver, primarily that the subnet is vulnerable to single-point failures and multiple server redundancy is not possible. Orphan mode is intended to replace the local clock driver. It provides a single simulated UTC source with multiple servers and provides seamless switching as servers fail and recover.</p>
+<p>A common configuration for private networks includes one or more core servers operating at the lowest stratum. Good practice is to configure each of these servers as backup for the others using symmetric or broadcast modes. As long as at least one core server can reach a UTC source, the entire subnet can synchronize to it.</p>
+<p>If no UTC sources are available to any core server, one of them can provide a simulated UTC source for all other hosts in the subnet. However, only one core server can simulate the UTC source and all direct dependents, called orphan children, must select the same server, called the orphan parent.</p>
+<p>Hosts sharing the same common subnet, including potential orphan parents and potential orphan children, can be enabled for orphan mode using the <tt>orphan <em>stratum</em></tt> option of the <a href="miscopt.html#tos"> <tt>tos command</tt></a>, where <tt><i>stratum</i></tt> is some stratum less than 16 and greater than any anticipated stratum that might occur with configured Internet time servers. However, sufficient headroom should remain so every subnet host dependent on the orphan children has stratum less than 16. Where no associations for other servers or reference clocks are configured, the orphan stratum can be set to 1. These are the same considerations that guide the local clock driver stratum selection.</p>
+<p>In order to avoid premature enabling orphan mode, a holdoff delay occurs when the daemon is first started and when all sources have been lost after that. The delay is intended to allow time for other sources to become reachable and selectable. Only when the delay has expired with no sources will orphan mode be enabled. By default the delay is 300 s (five minutes), but this can be changed using the <tt> orphanwait</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+<p>A orphan parent with no sources shows reference ID <font face="Courier New, Courier, Monaco, monospace">LOOP</font>&nbsp;if
+ operating at stratum 1 and 127.0.0.1 (IPv4 loopback address) otherwise.
+ While ordinary NTP clients use a selection metric based on delay
+ and dispersion, orphan children use a metric computed from the IP
+ address of each core server. Each orphan child chooses the orphan
+ parent as the core server with the smallest metric.</p>
+<p>For orphan mode to work well, each core server with available sources should operate at the same stratum. All core servers and orphan children should include the same <font face="Courier New, Courier, Monaco, monospace">tos</font> command in the configuration file. Each orphan child should include in the configuration file all root servers.</p>
+<div align="center"> <img src="pic/peer.gif" alt="gif">
+ <p>Figure 1. Orphan Peer Configuration</p>
+</div>
+<p>For example, consider the peer network configuration in Figure 1, where two or more campus primary or secondary (stratum 2) servers are configured with reference clocks or public Internet primary servers and with each other using symmetric modes. With this configuration a server that loses all sources continues to discipline the system clock using the other servers as backup. Only the core servers and orphan children need to be enabled for orphan mode.</p>
+<div align="center"> <img src="pic/broad.gif" alt="gif">
+ <p>Figure 2. Orphan Broadcast Configuration</p>
+</div>
+<p>For broadcast networks each core server is configured in both broadcast server and broadcast client modes as shown in Figure 2. Orphan children operate as broadcast clients of all core servers. As in peer networks, the core servers back up each other and only they and the orphan children need to be enabled for orphan mode.</p>
+<p>In normal operation subnet hosts operate below stratum 5, so the subnet is automatically configured as described in the NTP specification. If all UTC sources are lost, all core servers become orphans and the orphan children will select the same core server to become the orphan parent.</p>
+<hr>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</p>
+</body>
+</html>
diff --git a/html/parsedata.html b/html/parsedata.html
new file mode 100644
index 0000000..4d3734b
--- /dev/null
+++ b/html/parsedata.html
@@ -0,0 +1,352 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <meta name="generator" content="HTML Tidy, see www.w3.org">
+ <title>NTP PARSE clock data formats</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>NTP PARSE clock data formats</h3>
+ <p>The parse driver currently supports several clocks with different query mechanisms. In order for you to find a sample that might be similar to a clock you might want to integrate into parse I'll sum up the major features of the clocks (this information is distributed in the parse/clk_*.c and ntpd/refclock_parse.c files).</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->21-Oct-2010 23:44<!-- #EndDate -->
+ UTC</p>
+ <hr>
+ <h4>Meinberg clocks</h4>
+ <pre>
+Meinberg: start=&lt;STX&gt;, end=&lt;ETX&gt;, sync on start
+ pattern=&quot;\2D: . . ;T: ;U: . . ; \3&quot;
+ pattern=&quot;\2 . . ; ; : : ; \3&quot;
+ pattern=&quot;\2 . . ; ; : : ; : ; ; . . &quot;
+</pre>
+ <p>Meinberg is a German manufacturer of time code receivers. Those clocks have a pretty common output format in the stock version. In order to support NTP Meinberg was so kind to produce some special versions of the firmware for the use with NTP. So, if you are going to use a Meinberg clock please ask whether there is a special Uni Erlangen version. You can reach <a href="http://www.meinberg.de/">Meinberg</a> via the Web. Information can also be ordered via eMail from <a href="mailto:%20info@meinberg.de">info@meinberg.de</a></p>
+ <p>General characteristics:<br>
+ Meinberg clocks primarily output pulse per second and a describing ASCII string. This string can be produced in two modes: either upon the reception of a question mark or every second. NTP uses the latter mechanism. DCF77 AM clocks have a limited accuracy of a few milliseconds. The DCF77 PZF5xx variants provide higher accuracy and have a pretty good relationship between RS232 time code and the PPS signal. Except for early versions of the old GPS166 receiver type, Meinberg GPS receivers have a very good timing relationship between the datagram and the pulse. The beginning of the start bit of the first character has basically the same accuracy as the PPS signal, plus a jitter of up to 1 bit time depending on the selected baud rate, i.e. 52 &mu;s @ 19200. PPS support should always be used, if possible, in order to yield the highest possible accuracy.</p>
+ <p>The preferred tty setting for Meinberg DCF77 receivers is 9600/7E2:</p>
+ <pre>
+ CFLAG (B9600|CS7|PARENB|CREAD|HUPCL)
+ IFLAG (IGNBRK|IGNPAR|ISTRIP)
+ OFLAG 0
+ LFLAG 0
+ </pre>
+ <p>The tty setting for Meinberg GPS16x/17x receivers is 19200/8N1:</p>
+ <pre>
+ CFLAG (B19200|CS8|PARENB|CREAD|HUPCL)
+ IFLAG (IGNBRK|IGNPAR|ISTRIP)
+ OFLAG 0
+ LFLAG 0
+ </pre>
+ <p>All clocks should be run at datagram once per second.<br><br></p>
+ <p>Format of the Meinberg standard time string:</p>
+<pre>
+ <b><i>&lt;STX&gt;</i>D:<i>dd.mm.yy</i>;T:<i>w</i>;U:<i>hh.mm.ss</i>;<i>uvxy</i><i>&lt;ETX&gt;</i></b>
+ pos: 0 000000001111111111222222222233 3
+ 1 234567890123456789012345678901 2
+
+ <i>&lt;STX&gt;</i> = start-of-text, ASCII code 0x02
+ <i>dd.mm.yy</i> = day of month, month, year of the century, separated by dots
+ <i>w</i> = day of week (1..7, Monday = 1)
+ <i>hh:mm:ss</i> = hour, minute, second, separated by dots
+ <i>u</i> = '#' for GPS receivers: time is <b>not</b> synchronized
+ '#' for older PZF5xx receivers: no correlation, not synchronized
+ '#' for other devices: never sync'ed since powerup
+ ' ' if nothing of the above applies
+ <i>v</i> = '*' for GPS receivers: position has <b>not</b> been verified
+ '*' for other devices: freewheeling based on internal quartz
+ ' ' if nothing of the above applies
+ <i>x</i> = 'U' if UTC time is transmitted
+ 'S' if daylight saving time is active
+ ' ' if nothing of the above applies
+ <i>y</i> = '!' during the hour preceding start or end of daylight saving time
+ 'A' during the hour preceding a leap second
+ ' ' if nothing of the above applies
+ <i>&lt;ETX&gt;</i> = end-of-text, ASCII code 0x03
+</pre>
+ <p>Format of the Uni Erlangen time string for PZF5xx receivers:</p>
+<pre>
+ <b><i>&lt;STX&gt;</i><i>dd.mm.yy</i>; <i>w</i>; <i>hh:mm:ss</i>; <i>tuvxyza</i><i>&lt;ETX&gt;</i></b>
+ pos: 0 000000001111111111222222222233 3
+ 1 234567890123456789012345678901 2
+
+ <i>&lt;STX&gt;</i> = start-of-text, ASCII code 0x02
+ <i>dd.mm.yy</i> = day of month, month, year of the century, separated by dots
+ <i>w</i> = day of week (1..7, Monday = 1)
+ <i>hh:mm:ss</i> = hour, minute, second, separated by colons
+
+ <i>t</i> = 'U' if UTC time is transmitted, else ' '
+ <i>u</i> = '#' for older PZF5xx receivers: no correlation, not synchronized
+ '#' for PZF511 and newer: never sync'ed since powerup
+ ' ' if nothing of the above applies
+ <i>v</i> = '*' if freewheeling based on internal quartz, else ' '
+ <i>x</i> = 'S' if daylight saving time is active, else ' '
+ <i>y</i> = '!' during the hour preceding start or end of daylight saving time, else ' '
+ <i>z</i> = 'A' during the hour preceding a leap second, else ' '
+ <i>a</i> = 'R' alternate antenna (reminiscent of PZF5xx), usually ' ' for GPS receivers
+ <i>&lt;ETX&gt;</i> = end-of-text, ASCII code 0x03
+</pre>
+ <p>Format of the Uni Erlangen time string for GPS16x/GPS17x receivers:</p>
+<pre>
+ <b><i>&lt;STX&gt;</i><i>dd.mm.yy</i>; <i>w</i>; <i>hh:mm:ss</i>; <i>+uu:uu</i>; <i>uvxyzab</i>; <i>ll.lllln</i> <i>lll.lllle</i> <i>hhhh</i>m<i>&lt;ETX&gt;</i></b>
+ pos: 0 0000000011111111112222222222333333333344444444445555555555666666 6
+ 1 2345678901234567890123456789012345678901234567890123456789012345 6
+
+ <i>&lt;STX&gt;</i> = start-of-text, ASCII code 0x02
+ <i>dd.mm.yy</i> = day of month, month, year of the century, separated by dots
+ <i>w</i> = day of week (1..7, Monday = 1)
+ <i>hh:mm:ss</i> = hour, minute, second, separated by colons
+ <i>+uu:uu</i> = offset to UTC in hours and minutes, preceded by + or -
+ <i>u</i> = '#' if time is <b>not</b> synchronized, else ' '
+ <i>v</i> = '*' if position has <b>not</b> been verified, else ' '
+ <i>x</i> = 'S' if daylight saving time is active, else ' '
+ <i>y</i> = '!' during the hour preceding start or end of daylight saving time, else ' '
+ <i>z</i> = 'A' during the hour preceding a leap second, else ' '
+ <i>a</i> = 'R' alternate antenna (reminiscent of PZF5xx), usually ' ' for GPS receivers
+ <i>b</i> = 'L' during a leap second, i.e. if the seconds field is 60, else ' '
+ <i>ll.lllln</i> = position latitude in degrees, 'n' can actually be 'N' or 'S', i.e. North or South
+ <i>lll.lllle</i> = position longitude in degrees, 'e' can actually be 'E' or 'W', i.e. East or West
+ <i>hhhh</i> = position altitude in meters, always followed by 'm'
+ <i>&lt;ETX&gt;</i> = end-of-text, ASCII code 0x03
+</pre>
+ <p>Examples for Uni Erlangen strings from GPS receivers:</p>
+<pre>
+ \x02 09.07.93; 5; 08:48:26; +00:00; ; 49.5736N 11.0280E 373m \x03
+ \x02 08.11.06; 3; 14:39:39; +00:00; ; 51.9828N 9.2258E 176m \x03
+</pre>
+ <p>The Uni Erlangen formats should be used preferably. Newer Meinberg GPS receivers can be configured to transmit that format, for older devices there may be a special firmware version available.</p>
+ <p>For the Meinberg parse look into clk_meinberg.c<br><br></p>
+ <hr>
+ <h4>Raw DCF77 Data via serial line</h4>
+ <p>RAWDCF: end=TIMEOUT&gt;1.5s, sync each char (any char),generate psuedo time codes, fixed format</p>
+ <p>direct DCF77 code input</p>
+ <p>In Europe it is relatively easy/cheap the receive the german time code transmitter DCF77. The simplest version to process its signal is to feed the 100/200ms pulse of the demodulated AM signal via a level converter to an RS232 port at 50Baud. parse/clk_rawdcf.c holds all necessary decoding logic for the time code which is transmitted each minute for one minute. A bit of the time code is sent once a second.</p>
+ <pre>
+ The preferred tty setting is:
+ CFLAG (B50|CS8|CREAD|CLOCAL)
+ IFLAG 0
+ OFLAG 0
+ LFLAG 0
+</pre>
+ <h4>DCF77 raw time code</h4>
+ <p>From &quot;Zur Zeit&quot;, Physikalisch-Technische Bundesanstalt (PTB), Braunschweig und Berlin, M&auml;rz 1989<br>
+ </p>
+ <p>Timecode transmission:</p>
+ <pre>
+ AM:
+
+ time marks are send every second except for the second before the
+ next minute mark
+ time marks consist of a reduction of transmitter power to 25%
+ of the nominal level
+ the falling edge is the time indication (on time)
+ time marks of a 100ms duration constitute a logical 0
+ time marks of a 200ms duration constitute a logical 1
+</pre>
+ <p>see the spec. (basically a (non-)inverted psuedo random phase shift) encoding:</p>
+ <pre>
+ FM:
+
+ Second Contents
+ 0 - 10 AM: free, FM: 0
+ 11 - 14 free
+ 15 R - alternate antenna
+ 16 A1 - expect zone change (1 hour before)
+ 17 - 18 Z1,Z2 - time zone
+ 0 0 illegal
+ 0 1 MEZ (MET)
+ 1 0 MESZ (MED, MET DST)
+ 1 1 illegal
+ 19 A2 - expect leap insertion/deletion (1 hour before)
+ 20 S - start of time code (1)
+ 21 - 24 M1 - BCD (lsb first) Minutes
+ 25 - 27 M10 - BCD (lsb first) 10 Minutes
+ 28 P1 - Minute Parity (even)
+ 29 - 32 H1 - BCD (lsb first) Hours
+ 33 - 34 H10 - BCD (lsb first) 10 Hours
+ 35 P2 - Hour Parity (even)
+ 36 - 39 D1 - BCD (lsb first) Days
+ 40 - 41 D10 - BCD (lsb first) 10 Days
+ 42 - 44 DW - BCD (lsb first) day of week (1: Monday -&gt; 7: Sunday)
+ 45 - 49 MO1 - BCD (lsb first) Month
+ 50 MO10 - 10 Months
+ 51 - 53 Y1 - BCD (lsb first) Years
+ 54 - 57 Y10 - BCD (lsb first) 10 Years
+ 58 P3 - Date Parity (even)
+ 59 - usually missing (minute indication), except for leap insertion
+</pre>
+ <hr>
+ <h4>Schmid clock</h4>
+ <p>Schmid clock: needs poll, binary input, end='\xFC', sync start</p>
+ <p>The Schmid clock is a DCF77 receiver that sends a binary time code at the reception of a flag byte. The contents if the flag byte determined the time code format. The binary time code is delimited by the byte 0xFC.</p>
+ <pre>
+ TTY setup is:
+ CFLAG (B1200|CS8|CREAD|CLOCAL)
+ IFLAG 0
+ OFLAG 0
+ LFLAG 0
+
+</pre>
+ <p>The command to Schmid's DCF77 clock is a single byte; each bit allows the user to select some part of the time string, as follows (the output for the lsb is sent first).</p>
+ <pre>
+ Bit 0: time in MEZ, 4 bytes *binary, not BCD*; hh.mm.ss.tenths
+ Bit 1: date 3 bytes *binary, not BCD: dd.mm.yy
+ Bit 2: week day, 1 byte (unused here)
+ Bit 3: time zone, 1 byte, 0=MET, 1=MEST. (unused here)
+ Bit 4: clock status, 1 byte, 0=time invalid,
+ 1=time from crystal backup,
+ 3=time from DCF77
+ Bit 5: transmitter status, 1 byte,
+ bit 0: backup antenna
+ bit 1: time zone change within 1h
+ bit 3,2: TZ 01=MEST, 10=MET
+ bit 4: leap second will be
+ added within one hour
+ bits 5-7: Zero
+ Bit 6: time in backup mode, units of 5 minutes (unused here)
+</pre>
+ <hr>
+ <h4>Trimble SV6 ASCII time code (TAIP)</h4>
+ <p>Trimble SV6: needs poll, ascii timecode, start='&gt;', end='&lt;', query='&gt;QTM&lt;', eol='&lt;'</p>
+ <p>Trimble SV6 is a GPS receiver with PPS output. It needs to be polled. It also need a special tty mode setup (EOL='&lt;').</p>
+ <pre>
+ TTY setup is:
+ CFLAG (B4800|CS8|CREAD)
+ IFLAG (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON)
+ OFLAG (OPOST|ONLCR)
+ LFLAG (ICANON|ECHOK)
+</pre>
+ <p>Special flags are:</p>
+ <pre> PARSE_F_PPSPPS - use CIOGETEV for PPS time stamping
+ PARSE_F_PPSONSECOND - the time code is not related to
+ the PPS pulse (so use the time code
+ only for the second epoch)
+
+ Timecode
+ 0000000000111111111122222222223333333 / char
+ 0123456789012345678901234567890123456 \ posn
+ &gt;RTMhhmmssdddDDMMYYYYoodnnvrrrrr;*xx&lt; Actual
+ ----33445566600112222BB7__-_____--99- Parse
+ &gt;RTM 1 ;* &lt; Check
+</pre>
+ <hr>
+ <h4>ELV DCF7000</h4>
+ <p>ELV DCF7000: end='\r', pattern=&quot; - - - - - - - \r&quot;</p>
+ <p>The ELV DCF7000 is a cheap DCF77 receiver sending each second a time code (though not very precise!) delimited by '`r'</p>
+ <pre>
+ Timecode
+ YY-MM-DD-HH-MM-SS-FF\r
+
+ FF&amp;0x1 - DST
+ FF&amp;0x2 - DST switch warning
+ FF&amp;0x4 - unsynchronised
+</pre>
+ <hr>
+ <h4>HOPF 6021 und Kompatible</h4>
+ <p>HOPF Funkuhr 6021 mit serieller Schnittstelle Created by F.Schnekenbuehl &lt;frank@comsys.dofn.de&gt; from clk_rcc8000.c Nortel DASA Network Systems GmbH, Department: ND250 A Joint venture of Daimler-Benz Aerospace and Nortel.</p>
+ <pre>
+ hopf Funkuhr 6021
+ used with 9600,8N1,
+ UTC via serial line
+ &quot;Sekundenvorlauf&quot; ON
+ ETX zum Sekundenvorlauf ON
+ dataformat 6021
+ output time and date
+ transmit with control characters
+ transmit evry second
+ </pre>
+ <p>Type 6021 Serial Output format</p>
+ <pre>
+ 000000000011111111 / char
+ 012345678901234567 \ position
+ sABHHMMSSDDMMYYnre Actual
+ C4110046231195 Parse
+ s enr Check
+
+ s = STX (0x02), e = ETX (0x03)
+ n = NL (0x0A), r = CR (0x0D)
+
+ A B - Status and weekday
+
+ A - Status
+
+ 8 4 2 1
+ x x x 0 - no announcement
+ x x x 1 - Summertime - wintertime - summertime announcement
+ x x 0 x - Wintertime
+ x x 1 x - Summertime
+ 0 0 x x - Time/Date invalid
+ 0 1 x x - Internal clock used
+ 1 0 x x - Radio clock
+ 1 1 x x - Radio clock highprecision
+
+ B - 8 4 2 1
+ 0 x x x - MESZ/MEZ
+ 1 x x x - UTC
+ x 0 0 1 - Monday
+ x 0 1 0 - Tuesday
+ x 0 1 1 - Wednesday
+ x 1 0 0 - Thursday
+ x 1 0 1 - Friday
+ x 1 1 0 - Saturday
+ x 1 1 1 - Sunday
+</pre>
+ <hr>
+ <h4>Diem Computime Clock</h4>
+ <p>The Computime receiver sends a datagram in the following format every minute</p>
+ <pre>
+ Timestamp T:YY:MM:MD:WD:HH:MM:SSCRLF
+ Pos 0123456789012345678901 2 3
+ 0000000000111111111122 2 2
+ Parse T: : : : : : : \r\n
+
+ T Startcharacter &quot;T&quot; specifies start of the timestamp
+ YY Year MM Month 1-12
+ MD Day of the month
+ WD Day of week
+ HH Hour
+ MM Minute
+ SS Second
+ CR Carriage return
+ LF Linefeed
+</pre>
+ <hr>
+ <h4>WHARTON 400A Series Clock with a 404.2 Serial interface</h4>
+ <p>The WHARTON 400A Series clock is able to send date/time serial messages in 7 output formats. We use format 1 here because it is the shortest. We set up the clock to send a datagram every second. For use with this driver, the WHARTON 400A Series clock must be set-up as follows :</p>
+ <pre>
+ Programmable Selected
+ Option No Option
+ BST or CET display 3 9 or 11
+ No external controller 7 0
+ Serial Output Format 1 9 1
+ Baud rate 9600 bps 10 96
+ Bit length 8 bits 11 8
+ Parity even 12 E
+</pre>
+ <p>WHARTON 400A Series output format 1 is as follows :</p>
+ <pre>
+ Timestamp STXssmmhhDDMMYYSETX
+ Pos 0 12345678901234
+ 0 00000000011111
+
+ STX start transmission (ASCII 0x02)
+ ETX end transmission (ASCII 0x03)
+ ss Second expressed in reversed decimal (units then tens)
+ mm Minute expressed in reversed decimal
+ hh Hour expressed in reversed decimal
+ DD Day of month expressed in reversed decimal
+ MM Month expressed in reversed decimal (January is 1)
+ YY Year (without century) expressed in reversed decimal
+ S Status byte : 0x30 +
+ bit 0 0 = MSF source 1 = DCF source
+ bit 1 0 = Winter time 1 = Summer time
+ bit 2 0 = not synchronised 1 = synchronised
+ bit 3 0 = no early warning 1 = early warning
+</pre>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+</html>
diff --git a/html/parsenew.html b/html/parsenew.html
new file mode 100644
index 0000000..244612f
--- /dev/null
+++ b/html/parsenew.html
@@ -0,0 +1,199 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+ <title>Making PARSE Clocks</title>
+ <link href="scripts/style.css" type="text/css" rel="stylesheet">
+ </head>
+
+ <body>
+ <h3>How to build new PARSE clocks</h3>
+ <p>Here is an attempt to sketch out what you need to do in order to add another clock to the parse driver: Currently the implementation is being cleaned up - so not all information in here is completely correct. Refer to the included code where in doubt.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->13-Oct-2010 00:33<!-- #EndDate -->
+ UTC</p>
+ <p>Prerequisites:</p>
+ <ul>
+ <li>Does the system you want the clock connect to have the include files termio.h or termios.h ? (You need that for the parse driver)
+ </ul>
+ <p>What to do:</p>
+ <p>Make a conversion module (libparse/clk_*.c)</p>
+ <ol>
+ <li>What ist the time code format ?
+ <ul>
+ <li>find year, month, day, hour, minute, second, status (synchronised or not), possibly time zone information (you need to give the offset to UTC) You will have to convert the data from a string into a struct clocktime:
+ <pre>
+ struct clocktime /* clock time broken up from time code */
+ {
+ long day;
+ long month;
+ long year;
+ long hour;
+ long minute;
+ long second;
+ long usecond;
+ long utcoffset; /* in seconds */
+ time_t utcoffset; /* true utc time instead of date/time */
+ long flags; /* current clock status */
+ };
+</pre>
+ <p>Conversion is usually simple and straight forward. For the flags following values can be OR'ed together:</p>
+ <pre>
+ PARSEB_ANNOUNCE switch time zone warning (informational only)
+ PARSEB_POWERUP no synchronisation - clock confused (must set then)
+ PARSEB_NOSYNC timecode currently not confirmed (must set then)
+ usually on reception error when there is still a
+ chance the the generated time is still ok.
+
+ PARSEB_DST DST in effect (informational only)
+ PARSEB_UTC timecode contains UTC time (informational only)
+ PARSEB_LEAPADD LEAP addition warning (prior to leap happening - must set when imminent)
+ also used for time code that do not encode the
+ direction (as this is currently the default).
+ PARSEB_LEAPDEL LEAP deletion warning (prior to leap happening - must set when imminent)
+ PARSEB_ALTERNATE backup transmitter (informational only)
+ PARSEB_POSITION geographic position available (informational only)
+ PARSEB_LEAPSECOND actual leap second (this time code is the leap
+ second - informational only)
+</pre>
+ <p>These are feature flags denoting items that are supported by the clock:</p>
+ <pre>
+ PARSEB_S_LEAP supports LEAP - might set PARSEB_LEAP
+ PARSEB_S_ANTENNA supports ANTENNA - might set PARSEB_ALTERNATE
+ PARSEB_S_PPS supports PPS time stamping
+ PARSEB_S_POSITION supports position information (GPS)
+ </pre>
+ <p>If the utctime field is non zero this value will be take as time code value. This allows for conversion routines that already have the utc time value. The utctime field gives the seconds since Jan 1st 1970, 0:00:00. The useconds field gives the respective usec value. The fields for date and time (down to second resolution) will be ignored.</p>
+ <p>Conversion is done in the cvt_* routine in parse/clk_*.c files. look in them for examples. The basic structure is:</p>
+ <pre>
+ struct clockformat &lt;yourclock&gt;_format = {
+ lots of fields for you to fill out (see below)
+ };
+
+ static cvt_&lt;yourclock&gt;()
+ ...
+ {
+ if (&lt;I do not recognize my time code&gt;) {
+ return CVT_NONE;
+ } else {
+ if (&lt;conversion into clockformat is ok&gt;) {
+ &lt;set all necessary flags&gt;;
+ return CVT_OK;
+ } else {
+ return CVT_FAIL|CVT_BADFMT;
+ }
+ }
+</pre>
+ <p>The struct clockformat is the interface to the rest of the parse driver - it holds all information necessary for finding the clock message and doing the appropriate time stamping.</p>
+ <pre>
+struct clockformat
+{
+ u_long (*input)();
+ /* input routine - your routine - cvt_&lt;yourclock&gt; */
+ u_long (*convert)();
+ /* conversion routine - your routine - cvt_&lt;yourclock&gt; */
+ /* routine for handling RS232 sync events (time stamps) - usually sync_simple */
+ u_long (*syncpps)();
+ /* PPS input routine - usually pps_one */
+ void *data;
+ /* local parameters - any parameters/data/configuration info your conversion
+ routine might need */
+ char *name;
+ /* clock format name - Name of the time code */
+ unsigned short length;
+ /* maximum length of data packet for your clock format */
+ u_long flags;
+ /* information for the parser what to look for */
+};
+</pre>
+ <p>The above should have given you some hints on how to build a clk_*.c file with the time code conversion. See the examples and pick a clock closest to yours and tweak the code to match your clock.</p>
+ <p>In order to make your clk_*.c file usable a reference to the clockformat structure must be put into parse_conf.c.</p>
+ </ul>
+ <li>TTY setup and initialisation/configuration will be done in ntpd/refclock_parse.c.
+ <ul>
+ <li>Find out the exact tty settings for your clock (baud rate, parity, stop bits, character size, ...) and note them in terms of termio*.h c_cflag macros.
+ <li>in ntpd/refclock_parse.c fill out a new the struct clockinfo element (that allocates a new &quot;IP&quot; address - see comments) (see all the other clocks for example)
+ <pre>
+ struct clockinfo
+ {
+ u_long cl_flags; /* operation flags (io modes) */
+ PARSE_F_PPSPPS use loopfilter PPS code (CIOGETEV)
+ PARSE_F_PPSONSECOND PPS pulses are on second
+ usually flags stay 0 as they are used only for special setups
+
+ void (*cl_poll)(); /* active poll routine */
+ The routine to call when the clock needs data sent to it in order to
+ get a time code from the clock (e.g. Trimble clock)
+
+ int (*cl_init)(); /* active poll init routine */
+ The routine to call for very special initializations.
+
+ void (*cl_event)(); /* special event handling (e.g. reset clock) */
+ What to do, when an event happens - used to re-initialize clocks on timeout.
+
+ void (*cl_end)(); /* active poll end routine */
+ The routine to call to undo any special initialisation (free memory/timers)
+
+ void *cl_data; /* local data area for &quot;poll&quot; mechanism */
+ local data for polling routines
+
+ u_fp cl_rootdelay; /* rootdelay */
+ NTP rootdelay estimate (usually 0)
+
+ u_long cl_basedelay; /* current offset - unsigned l_fp
+ fractional part (fraction) by
+ which the RS232 time code is
+ delayed from the actual time. */
+
+ u_long cl_ppsdelay; /* current PPS offset - unsigned l_fp fractional
+ time (fraction) by which the PPS time stamp is delayed (usually 0)
+ part */
+
+ char *cl_id; /* ID code (usually &quot;DCF&quot;) */
+ Refclock id - (max 4 chars)
+
+ char *cl_description; /* device name */
+ Name of this device.
+
+ char *cl_format; /* fixed format */
+ If the data format cann not ne detected automatically this is the name
+ as in clk_*.c clockformat.
+
+ u_char cl_type; /* clock type (ntp control) */
+ Type if clock as in clock status word (ntp control messages) - usually 0
+
+ u_long cl_maxunsync; /* time to trust oscillator after losing synch
+ */
+ seconds a clock can be trusted after losing synchronisation.
+
+ u_long cl_speed; /* terminal input &amp; output baudrate */
+ u_long cl_cflag; /* terminal io flags */
+ u_long cl_iflag; /* terminal io flags */
+ u_long cl_oflag; /* terminal io flags */
+ u_long cl_lflag; /* terminal io flags */
+ termio*.h tty modes.
+
+ u_long cl_samples; /* samples for median filter */
+ u_long cl_keep; /* samples for median filter to keep */
+ median filter parameters - smoothing and rejection of bad samples
+ } clockinfo[] = {
+ ...,&lt;other clocks&gt;,...
+ { &lt; your parameters&gt; },
+ };
+
+</pre>
+ </ul>
+ </ol>
+ <p>Well, this is very sketchy, i know. But I hope it helps a little bit. The best way is to look which clock comes closest to your and tweak that code.</p>
+ <p>Two sorts of clocks are used with parse. Clocks that automatically send their time code (once a second) do not need entries in the poll routines because they send the data all the time. The second sort are the clocks that need a command sent to them in order to reply with a time code (like the Trimble clock).</p>
+ <p>For questions: <a href="mailto:%20kardel AT acm.org">kardel@acm.org</a>.</p>
+ <p>Please include an exact description on how your clock works. (initialisation, TTY modes, strings to be sent to it, responses received from the clock).</p>
+ <hr>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+ </body>
+
+ <body></body>
+
+</html>
diff --git a/html/pic/9400n.jpg b/html/pic/9400n.jpg
new file mode 100644
index 0000000..9209b90
--- /dev/null
+++ b/html/pic/9400n.jpg
Binary files differ
diff --git a/html/pic/alice11.gif b/html/pic/alice11.gif
new file mode 100644
index 0000000..62d0c9b
--- /dev/null
+++ b/html/pic/alice11.gif
Binary files differ
diff --git a/html/pic/alice13.gif b/html/pic/alice13.gif
new file mode 100644
index 0000000..c928ff7
--- /dev/null
+++ b/html/pic/alice13.gif
Binary files differ
diff --git a/html/pic/alice15.gif b/html/pic/alice15.gif
new file mode 100644
index 0000000..e17b5fd
--- /dev/null
+++ b/html/pic/alice15.gif
Binary files differ
diff --git a/html/pic/alice23.gif b/html/pic/alice23.gif
new file mode 100644
index 0000000..bc258a0
--- /dev/null
+++ b/html/pic/alice23.gif
Binary files differ
diff --git a/html/pic/alice31.gif b/html/pic/alice31.gif
new file mode 100644
index 0000000..ea3d20c
--- /dev/null
+++ b/html/pic/alice31.gif
Binary files differ
diff --git a/html/pic/alice32.gif b/html/pic/alice32.gif
new file mode 100644
index 0000000..db7cc40
--- /dev/null
+++ b/html/pic/alice32.gif
Binary files differ
diff --git a/html/pic/alice35.gif b/html/pic/alice35.gif
new file mode 100644
index 0000000..aa0ca43
--- /dev/null
+++ b/html/pic/alice35.gif
Binary files differ
diff --git a/html/pic/alice38.gif b/html/pic/alice38.gif
new file mode 100644
index 0000000..e40adba
--- /dev/null
+++ b/html/pic/alice38.gif
Binary files differ
diff --git a/html/pic/alice44.gif b/html/pic/alice44.gif
new file mode 100644
index 0000000..953387e
--- /dev/null
+++ b/html/pic/alice44.gif
Binary files differ
diff --git a/html/pic/alice47.gif b/html/pic/alice47.gif
new file mode 100644
index 0000000..6b27160
--- /dev/null
+++ b/html/pic/alice47.gif
Binary files differ
diff --git a/html/pic/alice51.gif b/html/pic/alice51.gif
new file mode 100644
index 0000000..1e9082a
--- /dev/null
+++ b/html/pic/alice51.gif
Binary files differ
diff --git a/html/pic/alice61.gif b/html/pic/alice61.gif
new file mode 100644
index 0000000..5687c38
--- /dev/null
+++ b/html/pic/alice61.gif
Binary files differ
diff --git a/html/pic/barnstable.gif b/html/pic/barnstable.gif
new file mode 100644
index 0000000..17d9cdd
--- /dev/null
+++ b/html/pic/barnstable.gif
Binary files differ
diff --git a/html/pic/beaver.gif b/html/pic/beaver.gif
new file mode 100644
index 0000000..3d0c8eb
--- /dev/null
+++ b/html/pic/beaver.gif
Binary files differ
diff --git a/html/pic/boom3.gif b/html/pic/boom3.gif
new file mode 100644
index 0000000..1a95d40
--- /dev/null
+++ b/html/pic/boom3.gif
Binary files differ
diff --git a/html/pic/boom3a.gif b/html/pic/boom3a.gif
new file mode 100644
index 0000000..14bfe5b
--- /dev/null
+++ b/html/pic/boom3a.gif
Binary files differ
diff --git a/html/pic/boom4.gif b/html/pic/boom4.gif
new file mode 100644
index 0000000..0661ac4
--- /dev/null
+++ b/html/pic/boom4.gif
Binary files differ
diff --git a/html/pic/broad.gif b/html/pic/broad.gif
new file mode 100644
index 0000000..b372bb5
--- /dev/null
+++ b/html/pic/broad.gif
Binary files differ
diff --git a/html/pic/bustardfly.gif b/html/pic/bustardfly.gif
new file mode 100644
index 0000000..b5c6e91
--- /dev/null
+++ b/html/pic/bustardfly.gif
Binary files differ
diff --git a/html/pic/c51.jpg b/html/pic/c51.jpg
new file mode 100644
index 0000000..d90ad55
--- /dev/null
+++ b/html/pic/c51.jpg
Binary files differ
diff --git a/html/pic/description.jpg b/html/pic/description.jpg
new file mode 100644
index 0000000..2153180
--- /dev/null
+++ b/html/pic/description.jpg
Binary files differ
diff --git a/html/pic/discipline.gif b/html/pic/discipline.gif
new file mode 100644
index 0000000..3280d14
--- /dev/null
+++ b/html/pic/discipline.gif
Binary files differ
diff --git a/html/pic/dogsnake.gif b/html/pic/dogsnake.gif
new file mode 100644
index 0000000..1f9755d
--- /dev/null
+++ b/html/pic/dogsnake.gif
Binary files differ
diff --git a/html/pic/driver29.gif b/html/pic/driver29.gif
new file mode 100644
index 0000000..b0415ae
--- /dev/null
+++ b/html/pic/driver29.gif
Binary files differ
diff --git a/html/pic/driver43_1.gif b/html/pic/driver43_1.gif
new file mode 100644
index 0000000..f1ff7c7
--- /dev/null
+++ b/html/pic/driver43_1.gif
Binary files differ
diff --git a/html/pic/driver43_2.jpg b/html/pic/driver43_2.jpg
new file mode 100644
index 0000000..c53639c
--- /dev/null
+++ b/html/pic/driver43_2.jpg
Binary files differ
diff --git a/html/pic/fg6021.gif b/html/pic/fg6021.gif
new file mode 100644
index 0000000..e6e3071
--- /dev/null
+++ b/html/pic/fg6021.gif
Binary files differ
diff --git a/html/pic/fg6039.jpg b/html/pic/fg6039.jpg
new file mode 100644
index 0000000..25fc7c4
--- /dev/null
+++ b/html/pic/fg6039.jpg
Binary files differ
diff --git a/html/pic/fig_3_1.gif b/html/pic/fig_3_1.gif
new file mode 100644
index 0000000..a280a89
--- /dev/null
+++ b/html/pic/fig_3_1.gif
Binary files differ
diff --git a/html/pic/flatheads.gif b/html/pic/flatheads.gif
new file mode 100644
index 0000000..707cb8c
--- /dev/null
+++ b/html/pic/flatheads.gif
Binary files differ
diff --git a/html/pic/flt1.gif b/html/pic/flt1.gif
new file mode 100644
index 0000000..d08c5ac
--- /dev/null
+++ b/html/pic/flt1.gif
Binary files differ
diff --git a/html/pic/flt2.gif b/html/pic/flt2.gif
new file mode 100644
index 0000000..d4909cb
--- /dev/null
+++ b/html/pic/flt2.gif
Binary files differ
diff --git a/html/pic/flt3.gif b/html/pic/flt3.gif
new file mode 100644
index 0000000..1eefbe1
--- /dev/null
+++ b/html/pic/flt3.gif
Binary files differ
diff --git a/html/pic/flt4.gif b/html/pic/flt4.gif
new file mode 100644
index 0000000..3f8b671
--- /dev/null
+++ b/html/pic/flt4.gif
Binary files differ
diff --git a/html/pic/flt5.gif b/html/pic/flt5.gif
new file mode 100644
index 0000000..52714ac
--- /dev/null
+++ b/html/pic/flt5.gif
Binary files differ
diff --git a/html/pic/flt6.gif b/html/pic/flt6.gif
new file mode 100644
index 0000000..0451e86
--- /dev/null
+++ b/html/pic/flt6.gif
Binary files differ
diff --git a/html/pic/flt7.gif b/html/pic/flt7.gif
new file mode 100644
index 0000000..55f07d8
--- /dev/null
+++ b/html/pic/flt7.gif
Binary files differ
diff --git a/html/pic/flt8.gif b/html/pic/flt8.gif
new file mode 100644
index 0000000..04bd32b
--- /dev/null
+++ b/html/pic/flt8.gif
Binary files differ
diff --git a/html/pic/flt9.gif b/html/pic/flt9.gif
new file mode 100644
index 0000000..e107c48
--- /dev/null
+++ b/html/pic/flt9.gif
Binary files differ
diff --git a/html/pic/freq1211.gif b/html/pic/freq1211.gif
new file mode 100644
index 0000000..2a56416
--- /dev/null
+++ b/html/pic/freq1211.gif
Binary files differ
diff --git a/html/pic/gadget.jpg b/html/pic/gadget.jpg
new file mode 100644
index 0000000..6289911
--- /dev/null
+++ b/html/pic/gadget.jpg
Binary files differ
diff --git a/html/pic/gps167.jpg b/html/pic/gps167.jpg
new file mode 100644
index 0000000..8a87a75
--- /dev/null
+++ b/html/pic/gps167.jpg
Binary files differ
diff --git a/html/pic/group.gif b/html/pic/group.gif
new file mode 100644
index 0000000..26aff06
--- /dev/null
+++ b/html/pic/group.gif
Binary files differ
diff --git a/html/pic/hornraba.gif b/html/pic/hornraba.gif
new file mode 100644
index 0000000..3077d75
--- /dev/null
+++ b/html/pic/hornraba.gif
Binary files differ
diff --git a/html/pic/igclock.gif b/html/pic/igclock.gif
new file mode 100644
index 0000000..940f330
--- /dev/null
+++ b/html/pic/igclock.gif
Binary files differ
diff --git a/html/pic/neoclock4x.gif b/html/pic/neoclock4x.gif
new file mode 100755
index 0000000..4df95af
--- /dev/null
+++ b/html/pic/neoclock4x.gif
Binary files differ
diff --git a/html/pic/offset1211.gif b/html/pic/offset1211.gif
new file mode 100644
index 0000000..8a73287
--- /dev/null
+++ b/html/pic/offset1211.gif
Binary files differ
diff --git a/html/pic/oncore_evalbig.gif b/html/pic/oncore_evalbig.gif
new file mode 100644
index 0000000..931a7f1
--- /dev/null
+++ b/html/pic/oncore_evalbig.gif
Binary files differ
diff --git a/html/pic/oncore_remoteant.jpg b/html/pic/oncore_remoteant.jpg
new file mode 100644
index 0000000..0f1d048
--- /dev/null
+++ b/html/pic/oncore_remoteant.jpg
Binary files differ
diff --git a/html/pic/oncore_utplusbig.gif b/html/pic/oncore_utplusbig.gif
new file mode 100644
index 0000000..dec7e71
--- /dev/null
+++ b/html/pic/oncore_utplusbig.gif
Binary files differ
diff --git a/html/pic/oz2.gif b/html/pic/oz2.gif
new file mode 100644
index 0000000..d4982f0
--- /dev/null
+++ b/html/pic/oz2.gif
Binary files differ
diff --git a/html/pic/panda.gif b/html/pic/panda.gif
new file mode 100644
index 0000000..6feb743
--- /dev/null
+++ b/html/pic/panda.gif
Binary files differ
diff --git a/html/pic/pd_om006.gif b/html/pic/pd_om006.gif
new file mode 100644
index 0000000..3266285
--- /dev/null
+++ b/html/pic/pd_om006.gif
Binary files differ
diff --git a/html/pic/pd_om011.gif b/html/pic/pd_om011.gif
new file mode 100644
index 0000000..06566b9
--- /dev/null
+++ b/html/pic/pd_om011.gif
Binary files differ
diff --git a/html/pic/peer.gif b/html/pic/peer.gif
new file mode 100644
index 0000000..35bd36f
--- /dev/null
+++ b/html/pic/peer.gif
Binary files differ
diff --git a/html/pic/pogo.gif b/html/pic/pogo.gif
new file mode 100644
index 0000000..68dacbe
--- /dev/null
+++ b/html/pic/pogo.gif
Binary files differ
diff --git a/html/pic/pogo1a.gif b/html/pic/pogo1a.gif
new file mode 100644
index 0000000..433e467
--- /dev/null
+++ b/html/pic/pogo1a.gif
Binary files differ
diff --git a/html/pic/pogo3a.gif b/html/pic/pogo3a.gif
new file mode 100644
index 0000000..49f1359
--- /dev/null
+++ b/html/pic/pogo3a.gif
Binary files differ
diff --git a/html/pic/pogo4.gif b/html/pic/pogo4.gif
new file mode 100644
index 0000000..e0a3b17
--- /dev/null
+++ b/html/pic/pogo4.gif
Binary files differ
diff --git a/html/pic/pogo5.gif b/html/pic/pogo5.gif
new file mode 100644
index 0000000..87ad8e4
--- /dev/null
+++ b/html/pic/pogo5.gif
Binary files differ
diff --git a/html/pic/pogo6.gif b/html/pic/pogo6.gif
new file mode 100644
index 0000000..3f98c52
--- /dev/null
+++ b/html/pic/pogo6.gif
Binary files differ
diff --git a/html/pic/pogo7.gif b/html/pic/pogo7.gif
new file mode 100644
index 0000000..36befe7
--- /dev/null
+++ b/html/pic/pogo7.gif
Binary files differ
diff --git a/html/pic/pogo8.gif b/html/pic/pogo8.gif
new file mode 100644
index 0000000..6860efb
--- /dev/null
+++ b/html/pic/pogo8.gif
Binary files differ
diff --git a/html/pic/pzf509.jpg b/html/pic/pzf509.jpg
new file mode 100644
index 0000000..b51303b
--- /dev/null
+++ b/html/pic/pzf509.jpg
Binary files differ
diff --git a/html/pic/pzf511.jpg b/html/pic/pzf511.jpg
new file mode 100644
index 0000000..c470af2
--- /dev/null
+++ b/html/pic/pzf511.jpg
Binary files differ
diff --git a/html/pic/rabbit.gif b/html/pic/rabbit.gif
new file mode 100644
index 0000000..ab6ec5f
--- /dev/null
+++ b/html/pic/rabbit.gif
Binary files differ
diff --git a/html/pic/radio2.jpg b/html/pic/radio2.jpg
new file mode 100644
index 0000000..ceb7c76
--- /dev/null
+++ b/html/pic/radio2.jpg
Binary files differ
diff --git a/html/pic/sheepb.jpg b/html/pic/sheepb.jpg
new file mode 100644
index 0000000..1b3323e
--- /dev/null
+++ b/html/pic/sheepb.jpg
Binary files differ
diff --git a/html/pic/stack1a.jpg b/html/pic/stack1a.jpg
new file mode 100644
index 0000000..1e023cb
--- /dev/null
+++ b/html/pic/stack1a.jpg
Binary files differ
diff --git a/html/pic/stats.gif b/html/pic/stats.gif
new file mode 100644
index 0000000..b0d0aaa
--- /dev/null
+++ b/html/pic/stats.gif
Binary files differ
diff --git a/html/pic/sx5.gif b/html/pic/sx5.gif
new file mode 100644
index 0000000..504e38b
--- /dev/null
+++ b/html/pic/sx5.gif
Binary files differ
diff --git a/html/pic/thunderbolt.jpg b/html/pic/thunderbolt.jpg
new file mode 100644
index 0000000..49253ab
--- /dev/null
+++ b/html/pic/thunderbolt.jpg
Binary files differ
diff --git a/html/pic/time1.gif b/html/pic/time1.gif
new file mode 100644
index 0000000..88e7042
--- /dev/null
+++ b/html/pic/time1.gif
Binary files differ
diff --git a/html/pic/tonea.gif b/html/pic/tonea.gif
new file mode 100644
index 0000000..195a3df
--- /dev/null
+++ b/html/pic/tonea.gif
Binary files differ
diff --git a/html/pic/tribeb.gif b/html/pic/tribeb.gif
new file mode 100644
index 0000000..59e8a7c
--- /dev/null
+++ b/html/pic/tribeb.gif
Binary files differ
diff --git a/html/pic/wingdorothy.gif b/html/pic/wingdorothy.gif
new file mode 100644
index 0000000..3f2e0be
--- /dev/null
+++ b/html/pic/wingdorothy.gif
Binary files differ
diff --git a/html/poll.html b/html/poll.html
new file mode 100644
index 0000000..aeb9c32
--- /dev/null
+++ b/html/poll.html
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Poll Process</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Poll Process</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:17<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>The poll process sends NTP packets at intervals determined by the clock discipline algorithm. The process is designed to provide a sufficient update rate to maximize accuracy while minimizing network overhead. The process is designed to operate over a poll exponent range between 3 (8 s) and 17 (36 hr). The minimum and maximum poll exponent within this range can be set using the <tt>minpoll</tt> and <tt>maxpoll</tt> options of the <a href="confopt.html#option"><tt>server</tt></a> command, with default 6 (64 s) and 10 (1024 s), respectively.</p>
+<p> The poll interval is managed by a heuristic algorithm developed over several years of experimentation. It depends on an exponentially weighted average of clock offset differences, called <em>clock jitter</em>, and a jiggle counter, which is initially set to zero. When a clock update is received and the offset exceeds the clock jitter by a factor of 4, the jiggle counter is increased by the poll exponent; otherwise, it is decreased by twice the poll exponent. If the jiggle counter is greater than an arbitrary threshold of 30, it is reset to 0 and the the poll exponent is increased by 1. If the jiggle counter is less than -30, it is set to 0 and the poll exponent decreased by 1. In effect, the algorithm has a relatively slow reaction to good news, but a relatively fast reaction to bad news.</p>
+<p>As an option of the <a href="confopt.html#option"><tt>server</tt></a> command, instead of a single packet, the poll process can send a burst of several packets at 2-s intervals. This is designed to reduce the time to synchronize the clock at initial startup (<tt>iburst</tt>) and/or to reduce the phase noise at the longer poll intervals (<tt>burst</tt>). The <tt>iburst</tt> option is effective only when the server is unreachable, while the <tt>burst</tt> option is effective only when the server is reachable. The two options are independent of each other and both can be enabled at the same time.</p>
+<p>For the <tt>iburst</tt> option the number of packets in the burst is six, which is the number normally needed to synchronize the clock; for the <tt>burst</tt> option, the number of packets in the burst is determined by the difference between the current poll exponent and the minimum poll exponent as a power of 2. For instance, with the default minimum poll exponent of 6 (64 s), only one packet is sent for every poll, while the full number of eight packets is sent at poll exponents of 9 (512 s) or more. This insures that the average headway will never exceed the minimum headway.</p>
+<p>The burst options can result in increased load on the network if not carefully designed. Both options are affected by the provisions described on the <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a> page. In addition, when <tt>iburst</tt> or <tt>burst</tt> are enabled, the first packet of the burst is sent, but the remaining packets sent only when the reply to the fist packet is received. If no reply has been received after a timeout set by the <tt>minpoll</tt> option, the first packet is sent again. This means that, even if a server is unreachable, the network load is no more than at the minimum poll interval.</p>
+<p>To further reduce the network load when a server is unreachable, an unreach timer is incremented by 1 at each poll interval, but is set to 0 as each packet is received. If the timer exceeds the <em>unreach threshold</em> set at 10, the poll exponent is incremented by 1 and the unreach timer set to 0. This continues until the poll exponent reaches the maximum set by the <tt>maxpoll</tt> option.</p>
+<hr>
+<p>
+ <script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</p>
+</body>
+</html>
diff --git a/html/pps.html b/html/pps.html
new file mode 100644
index 0000000..0b9bd5d
--- /dev/null
+++ b/html/pps.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Pulse-Per-Second (PPS) Signal Interfacing</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Pulse-Per-Second (PPS) Signal Interfacing</h3>
+<img src="pic/alice32.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>Alice is trying to find the PPS signal connector.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:17<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#gadget">Gadget Box</a></li>
+ <li class="inline"><a href="#opsys">Operating System Support</a></li>
+ <li class="inline"><a href="#use">Using the Pulse-per-Second (PPS) Signal</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>Most radio clocks are connected using a serial port operating at speeds of 9600 bps. The accuracy using typical timecode formats, where the on-time epoch is indicated by a designated ASCII character such as carriage-return <tt>&lt;cr&gt;</tt>, is normally limited to 100 &mu;s. Using carefully crafted averaging techniques, the NTP&nbsp;algorithms can whittle this down to a few tens of microseconds. However, some radios produce a pulse-per-second (PPS) signal which can be used to improve the accuracy to a few microseconds. This page describes the hardware and software necessary for NTP to use the PPS signal.</p>
+<p> The PPS signal can be connected in either of two ways. On FreeBSD systems (with the PPS_SYNC and pps kernel options) it can be connected directly to the ACK pin of a parallel port. This is the preferred way, as it requires no additional hardware. Alternatively, it can be connected via the DCD pin of a serial port. However, the PPS signal levels are usually incompatible with the serial port interface signals. Note that NTP no longer supports connection via the RD pin of a serial port.</p>
+<div align="center">
+ <p><img src="pic/gadget.jpg" alt="gif"></p>
+ <p>A Gadget Box built by Chuck Hanavin</p>
+</div>
+<h4 id="gadget">Gadget Box</h4>
+<p>The gadget box shown above is assembled in a 5&quot;x3&quot;x2&quot; aluminum minibox containing the the circuitry, serial connector and optional 12-V power connector. A complete set of schematics, PCB artwork, drill templates can be obtained via the web from ftp.udel.edu as <a href="ftp://ftp.udel.edu/pub/ntp/hardware/gadget.tar.Z">gadget.tar.Z</a>.</p>
+<p> The gadget box includes two subcircuits. One of these converts a TTL positive edge into a fixed-width pulse at EIA levels and is for use with a timecode receiver or precision oscillator with a TTL PPS output. The other converts the timecode modulation broadcast by Canadian time/frequency standard station CHU into a 300-bps serial character stream at EIA levels and is for use with the <a href="drivers/driver7.html">Radio CHU Audio Demodulator/Decoder</a> driver.</p>
+<h4 id="opsys">Operating System Support</h4>
+<p>Both the serial and parallel port connection require operating system support, which is available in a few operating systems, including FreeBSD, Linux (with PPSkit patch) and Solaris. Support on an experimental basis is available for several other systems, including SunOS and HP/Compaq/Digital Tru64. The kernel interface described on the <a href="kernpps.html">PPSAPI Interface for Precision Time Signals</a> page is the only interface currently supported. Older PPS interfaces based on the <tt>ppsclock</tt> and <tt>tty_clk</tt> streams modules are no longer supported. The interface consists of the <tt>timepps.h</tt> header file which is specific to each system. It is included automatically when the distribution is built.</p>
+<h4>PPS Driver</h4>
+<p>PPS support requires is built into some drivers, in particular the WWVB and NMEA drivers, and may be added to other drivers in future. Alternatively, the PPS driver described on the <a href="drivers/driver22.html">Type 22 PPS Clock Discipline</a> page can be used. It operates in conjunction with another source that provides seconds numbering. The selected source is designate a prefer peer, as using the <tt>prefer</tt> option, as described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The prefer peer is ordinarily the radio clock that provides the PPS signal, but in principle another radio clock or even a remote Internet server could be designated preferred Note that the <tt>pps</tt> configuration command has been obsoleted by this driver.</p>
+<h4 id="use">Using the Pulse-per-Second (PPS) Signal</h4>
+<p>The PPS signal can be used in either of two ways, one using the NTP grooming and mitigation algorithms and the other using the kernel PPS signal support described in the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page. The presence of &nbsp;kernel support is automatically detected during the NTP build process and supporting code automatically compiled. In either case, the PPS&nbsp;signal must be present and within nominal jitter and wander tolerances. In addition, the prefer peer must be a truechimer; that is, survive the sanity checks and intersection algorithm. Finally, the offset of the system clock relative to the prefer peer must be within &plusmn;0.5 s. The kernel maintains a watchdog timer for the PPS signal; if the signal has not been heard or is out of tolerance for more than some interval, currently two minutes, the kernel discipline is disabled and operation continues as if it were not present. </p>
+<p> An option flag in the driver determines whether the NTP algorithms or kernel support is enabled (if available). For historical reasons, the NTP algorithms are selected by by default, since performance is generally better using older, slower systems. However, performance is generally better with kernl support using newer, faster systems.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/prefer.html b/html/prefer.html
new file mode 100644
index 0000000..0fd0b8f
--- /dev/null
+++ b/html/prefer.html
@@ -0,0 +1,93 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>Mitigation Rules and the prefer Keyword</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Mitigation Rules and the <tt>prefer</tt> Keyword</h3>
+<img src="pic/alice11.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html"> from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>Listen carefully to what I say; it is very complicated.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:18<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">1. Introduction and Overview</a></li>
+ <li class="inline"><a href="#combine">2. Combine Algorithm</a></li>
+ <li class="inline"><a href="#clockhop">3. Anti-Clockhop Algorithm</a></li>
+ <li class="inline"><a href="#peer">4. Peer Classification</a></li>
+ <li class="inline"><a href="#prefer">5. 5. The <tt>prefer</tt> Peer</a></li>
+ <li class="inline"><a href="#miti">6. Mitigation Rules</a></li>
+ <li class="inline"><a href="#mins">7. The <tt>minsane</tt> Option</a></li>
+</ul>
+<hr>
+<h4 id="intro">1. Introduction and Overview</h4>
+<p>This page summarizes the criteria for choosing from among the survivors of the clock cluster algorithm a set of contributors to the clock discipline algorithm. The criteria are very meticulous, since they have to handle many different scenarios that may be optimized for special circumstances, including some scenarios designed to support planetary and deep space missions. For additional information on statistical principles and performance metrics, see the <a href="stats.html">Performance Metrics</a> page.</p>
+<p>Recall the suite of NTP data acquisition and grooming algorithms. These algorithms proceed in five phases. Phase one discovers the available <em>sources</em> and mobilizes an association for each source found. These sources can result from explicit configuration, broadcast discovery or the pool and manycast autonomous configuration schemes. See the <a href="discover.html">Automatic Server Discovery Schemes</a> page for further information.</p>
+<p> Phase two selects the <em> candidates</em> from among the sources by excluding those sources showing one or more of the errors summarized on the <a href="select.html">Clock Select Algorithm</a> page and to determine the <em>truechimers</em> from among the candidates, leaving behind the <em>falsetickers</em>. A server or peer configured with the <tt>true</tt> option is declared a truechimer independent of this algorithm. Phase four uses the algorithm described on the <a href="cluster.html">Clock Cluster Algorithm</a> page to prune the statistical outliers from the truechimers, leaving the <em>survivor list</em><em></em> as result. </p>
+<p> Phase five uses a set of algorithms and mitigation rules to combined the survivor statistics and discipline the system clock. The mitigation rules select from among the survivors a <em>system peer</em> from which a set of system statistics can be inherited and passed along to dependent clients, if any. The mitigation algorithms and rules are the main topic of this page. The clock offset developed from these algorithms can discipline the system clock, either using the <a href="discipline.html">clock discipline algorithm</a> or using the kernel to discipline the system clock directly, as described on the <a href="kern.html">A Kernel Model for Precision Timekeeping</a> page. </p>
+<h4 id="combine">2. Combine Algorithm</h4>
+<p> The clock combine algorithm uses the survivor list to produce a weighted average of both offset and jitter. Absent other considerations discussed later, the <em>combined offset</em> is used to discipline the system clock, while the <em>combined jitter</em> is augmented with other components to produce the system jitter statistic inherited by dependent clients, if any.</p>
+<p> The clock combine algorithm uses a weight factor for each survivor equal to the reciprocal of the root distance. This is normalized so that the sum of the reciprocals is equal to unity. This design favors the survivors at the smallest root distance and thus the smallest maximum error.</p>
+<h4 id="clockhop">3. Anti-Clockhop Algorithm</h4>
+<p>The anti-clockhop algorithm is intended for cases where multiple servers are available on a fast LAN with modern computers. Typical offset differences between servers in such cases are less than 0.5 ms. However, changes between servers can result in unnecessary system jitter. The object of the anti-clockhop algorithm is to avoid changing the current system peer, unless it becomes stale or has significant offset relative to other candidates on the survivor list.</p>
+<p>For the purposes of the following description, call the last selected system peer the <em>old peer</em>, and the currently selected source the <em>candidate peer</em>. At each update, the candidate peer is selected as the first peer on the survivor list sorted by increasing root distance. The algorithm initializes the -<em>clockhop threshold</em> with the value of <tt>mindist</tt>, by default 1 ms. </p>
+<p>The anti-clockhop algorithm is called immediately after the combine algorithm. If there was no old peer or the old and candidate peers are the same, the candidate peer becomes the system peer. If the old peer and the candidate peer are different, the algorithm measures the difference between the offset of the old peer and the candidate peer. If the difference exceeds the clockhop threshold, the candidate peer becomes the system peer and the clockhop threshold is restored to its original value. If the difference is less than the clockhop threshold, the old peer continues as the system peer. However, at each subsequent update, the algorithm reduces the clockhop threshold by half. Should operation continue in this way, the candidate peer will eventually become the system peer.</p>
+<h4 id="peer">4. Peer Classification</h4>
+<p>The behavior of the various algorithms and mitigation rules involved depends on how the various synchronization sources are classified. This depends on whether the source is local or remote and if local, the type of source. The following classes are defined:</p>
+<ol>
+ <li>A selectable association configured for a remote server or peer is classified as a <i>client association</i>. All other selectable associations are classified as <i>device driver associations</i> of one kind or another. In general, one or more sources of either type will be available in each installation.</li>
+ <li>If all sources have been lost and one or more hosts on a common DMZ network have specified the orphan stratum in the <tt>orphan</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command, each of them can become an <i>orphan parent</i>. Dependent orphan children on the same DMZ network will see the orphan parents as if synchronized to a server at the orphan stratum. Note that, as described on the <a href="orphan.html">Orphan Mode</a> page, all orphan children will select the same orphan parent for synchronization.</li>
+ <li>When a device driver has been configured for pulse-per-second (PPS) signals and PPS signals are being received, it is designated the <i>PPS driver.</i> Note that the Pulse-per-Second driver (type 22) is often used as a PPS driver, but any driver can be configure as a PPS driver if the hardware facilities are available. The PPS driver provides precision clock discipline only within &plusmn;0.4 s, so it is always associated with another source or sources that provide the seconds numbering function.</li>
+ <li>When the Undisciplined Local Clock driver (type 1) is configured, it is designated the <i>local driver</i>. It can be used either as a backup source (stratum greater than zero) should all sources fail, or as the primary source (stratum zero) whether or not other sources are available if the <tt>prefer</tt> option is present. The local driver can be used when the kernel time is disciplined by some other means of synchronization, such as the NIST <tt>lock clock</tt> scheme, or another synchronization protocol such as the IEEE 1588 Precision Time Protocol (PTP) or Digital Time Synchronization Service (DTSS).</li>
+ <li>When the Automated Computer Time Service driver (type 18) is configured, it is designated the <i>modem driver</i>. It is used either as a backup source, should all other sources fail, or as the primary source if the <tt>prefer</tt> option is present.</li>
+</ol>
+<h4 id="prefer">5. The <tt>prefer</tt> Peer</h4>
+<p>The mitigation rules are designed to provide an intelligent selection of the system peer from among the selectable sources of different types. When used with the <tt>server</tt> or <tt>peer</tt> commands, the <tt>prefer</tt> option designates one or more sources as preferred over all others. While the rules do not forbid it, it is usually not useful to designate more than one source as preferred; however, if more than one source is so designated, they are used in the order specified in the configuration file. If the first one becomes un selectable, the second one is considered and so forth. This order of priority is also applicable to multiple PPS drivers, multiple modem drivers and even multiple local drivers, although that would not normally be useful.</p>
+<p>The cluster algorithm works on the set of truechimers produced by the select algorithm. At each round the algorithm casts off the survivor least likely to influence the choice of system peer. If selectable, the prefer peer is never discarded; on the contrary, its potential removal becomes a termination condition. However, the prefer peer can still be discarded by the select algorithm as a falseticker; otherwise, the prefer peer becomes the system peer.</p>
+<p>Ordinarily, the combine algorithm computes a weighted average of the survivor
+ offset and jitter to produce the final values. However, if a prefer
+ peer is among the survivors, the combine algorithm is not used. Instead,
+ the offset and jitter of the prefer peer are used exclusively as the final values. In the common case involving a radio clock and a flock of remote backup
+ servers, and with the radio clock designated a prefer peer, the
+ the radio clock disciplines the system clock as long as the radio itself
+ remains operational. However, if the radio fails or becomes a falseticker,
+ the combined backup sources continue to discipline the system clock.</p>
+<h4 id="miti">6. Mitigation Rules</h4>
+<p>As the select algorithm scans the associations for selectable candidates, the modem driver and local driver are segregated for later, but only if not designated a prefer peer. If so designated, the driver is included among the candidate population. In addition, if orphan parents are found, the parent with the lowest metric is segregated for later; the others are discarded. For this purpose the metric is defined as the four-octet IPv4 address or the first four octets of the hashed IPv6 address. The resulting candidates, including any prefer peers found, are processed by the select algorithm to produce a possibly empty set of truechimers.</p>
+<p> As previously noted, the cluster algorithm casts out outliers, leaving the survivor list for later processing. The survivor list is then sorted by increasing root distance and the first entry temporarily designated the system peer. At this point the following contributors to the system clock discipline may be available:</p>
+<ul>
+ <li>(potential) system peer, if there are survivors;</li>
+ <li>orphan parent, if present;</li>
+ <li>local driver, if present;</li>
+ <li>modem driver, if present;</li>
+ <li>prefer peer, if present;</li>
+ <li>PPS driver, if present.</li>
+</ul>
+<p>The mitigation algorithm proceeds in three steps in turn.</p>
+<ol>
+ <li>If there are no survivors, the modem driver becomes the only survivor if there is one. If not, the local driver becomes the only survivor if there is one. If not, the orphan parent becomes the only survivor if there is one. If the number of survivors at this point is less than the <tt>minsane</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command, the algorithm is terminated and the system variables remain unchanged. Note that <tt>minsane</tt> is by default 1, but can be set at any value including 0.</li>
+ <li>If the prefer peer is among the survivors, it becomes the system peer and its offset and jitter are inherited by the corresponding system variables. Otherwise, the combine algorithm computes these variables from the survivor population.</li>
+ <li>If there is a PPS driver and the system clock offset at this point is less than 0.4 s, and if there is a prefer peer among the survivors or if the PPS peer is designated as a prefer peer, the PPS driver becomes the system peer and its offset and jitter are inherited by the system variables, thus overriding any variables already computed. Note that a PPS driver is present only if PPS signals are actually being received and enabled by the associated driver.</li>
+</ol>
+<p>If none of the above is the case, the data are disregarded and the system variables remain as they are.</p>
+<h4 id="mins">7. The <tt>minsane</tt> Option</H4>
+<p> The <tt>minsane</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command, the <tt>prefer</tt> option of the <tt>server</tt> and <tt>peer</tt> commands and the <tt>flag</tt> option of the <tt>fudge</tt> command for a selected driver can be used with the mitigation rules to provide many useful configurations. The <tt>minsane</tt> option specifies the minimum number of survivors required to synchronize the system clock. The <tt>prefer</tt> option operates as described in previous sections. The <tt>flag</tt> option enables the PPS signal for the selected driver.</p>
+<p>A common scenario is a GPS driver with a serial timecode and PPS signal. The
+ PPS signal is disabled until the system clock has been set by some means, not
+ necessarily the GPS driver. If the serial timecode is within 0.4 s of the PPS
+ signal, the GPS driver is designated the PPS driver and the PPS signal disciplines
+ the system clock. If the serial timecode becomes unreliable, or if the PPS signal is
+ disconnected, the GPS driver stops updating the system clock and so eventually
+ becomes unreachable and is replaced by other sources.</p>
+<p>Whether or not the GPS driver disables the PPS signal when the timecode becomes unreliable is
+ at the discretion of the driver. Ordinarily, the PPS signal is disabled in this case; however, when the GPS receiver has a precision holdover oscillator, the driver may elect to continue PPS discipline . In this case, <tt>minsane</tt> can be set to zero so the PPS signal continues to discipline the system clock.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/quick.html b/html/quick.html
new file mode 100644
index 0000000..9b6859b
--- /dev/null
+++ b/html/quick.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=windows-1252">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Quick Start</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->1-Dec-2012 04:44<!-- #EndDate -->
+ UTC</p>
+<h3>Quick Start</h3>
+<img src="pic/panda.gif" alt="gif" align="left">FAX test image for SATNET (1979).
+<p>The baby panda was scanned at University College London and used as a FAX test image for a demonstration of the DARPA Atlantic SATNET Program and the first transatlantic Internet connection in 1978. The computing system used for that demonstration was called the <a href="http://www.eecis.udel.edu/%7emills/database/papers/fuzz.ps">Fuzzball</a>. As it happened, this was also the first Internet multimedia presentation and the first to use a predecessor of NTP in regular operation. The image was widely copied and used for testing purpose throughout much of the 1980s.</p>
+<p>Last update:
+ <!-- #BeginDate format:En1m -->1-Dec-2012 04:44<!-- #EndDate -->
+ UTC</p>
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+<hr>
+<p>For the rank amateur the sheer volume of the documentation collection must be intimidating. However, it doesn't take much to fly the <tt>ntpd</tt> daemon with a simple configuration where a workstation needs to synchronize to some server elsewhere in the Internet. The first thing is to build the distribution for the particular workstation and install in the usual place. The <a href="build.html">Building and Installing the Distribution</a> page describes how to do this.</p>
+<p>While it is possible that certain configurations do not need a configuration file, most do. The file, called by default <tt>/etc/ntp.conf</tt>, need only contain one command specifying a remote server, for instance</p>
+<p><tt>server foo.bar.com</tt></p>
+<p>Choosing an appropriate remote server is somewhat of a black art, but a
+ suboptimal choice is seldom a problem. The simplest and best is to use the
+ Server Pool Scheme on the <a href="discover.html">Automatic Server Discovery</a> page. There
+ are about two dozen public time servers operated by the <a href="http://tf.nist.gov/tf-cgi/servers.cgi">National
+ Institutes of Science and Technology (NIST)</a>, <a href="http://tycho.usno.navy.mil/ntp.html">US
+ Naval Observatory (USNO)</a>, <a href="http://inms-ienm.nrc-cnrc.gc.ca/time_services/network_time_protocol_e.html"> Canadian
+ Metrology Centre (CMC)</a> and many others available on the Internet. Lists
+ of public primary and secondary NTP servers maintained on the <a href="http://support.ntp.org/Servers/WebHome">Public
+ NTP Time Servers</a> page, which is updated frequently. The lists are sorted
+ by country and, in the case of the US, by state. Usually, the best
+ choice is the nearest in geographical terms, but the terms of engagement
+ specified in each list entry should be carefully respected.</p>
+<p>During operation <tt>ntpd</tt> measures and corrects for incidental clock frequency error and occasionally writes the current value to a file specified by the</p>
+<p><tt>driftfile /etc/ntp.drift</tt></p>
+<p>configuration command. If <tt>ntpd</tt> is stopped and restarted, it initializes the frequency from this file and avoids the potentially lengthy interval to relearn the correction.</p>
+<p>That's all there is to it, unless some problem in network connectivity or local operating system configuration occurs. The most common problem is some firewall between the workstation and server. System administrators should understand NTP uses UDP port 123 as both the source and destination port and that NTP does not involve any operating system interaction other than to set the system clock. While almost all modern Unix systems have included NTP and UDP port 123 defined in the services file, this should be checked if <tt>ntpd</tt> fails to come up at all.</p>
+<p>The best way to confirm NTP is working is using the <a href="ntpq.html"><tt>ntpq</tt></a> utility, although the <a href="ntpdc.html"><tt>ntpdc</tt></a> utility may be useful in extreme cases. See the documentation pages for further information. Don't forget to check for <a href="msyslog.html"> system log messages</a>. In the most extreme cases the <tt>-d</tt> option on the <tt>ntpd</tt> command line results in a blow-by-blow trace of the daemon operations. While the trace output can be cryptic, to say the least, it gives a general idea of what the program is doing and, in particular, details the arriving and departing packets and any errors found.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/rate.html b/html/rate.html
new file mode 100644
index 0000000..2b47db8
--- /dev/null
+++ b/html/rate.html
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Rate Management and the Kiss-o'-Death</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+<style type="text/css">
+<!--
+<style1 {
+color: #FF0000;
+ font-weight: bold;
+}
+-->
+</style>
+</head>
+<body>
+<h3>Rate Management and the Kiss-o'-Death Packet</h3>
+<img src="pic/boom4.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>Our junior managers and the administrators.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:19<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#guard">Minimum Headway Time</a></li>
+ <li class="inline"><a href="#mah">Minimum Average Headway Time</a></li>
+ <li class="inline"><a href="#kiss">The Kiss-o'-Death Packet</a></li>
+ <li class="inline"><a href="#ref">References</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>This page describes the various rate management provisions in NTPv4. Some national time metrology laboratories, including NIST and USNO, use the NTP reference implementation in their very busy public time servers. They operate multiple servers behind load-balancing devices to support aggregate rates up to ten thousand packets per second. The servers need to defend themselves against all manner of broken client implementations that can clog the server and network infrastructure. On the other hand, friendly clients need to avoid configurations that can result in unfriendly behavior.</p>
+<p>A review of past client abuse incidence shows the most frequent scenario is a broken client that attempts to send packets at rates of one per second or more. On one occasion due to a defective client design [1], over 750,000 clients demonstrated this abuse. There have been occasions where this abuse has persisted for days at a time. These scenarios are the most damaging, as they can threaten not only the victim server but the network infrastructure as well.</p>
+<p>There are several features in the reference implementation<tt></tt> designed to defend the servers and network against accidental or intentional flood attack. Other features are used to insure that the client <tt></tt> is a good citizen, even if configured in unfriendly ways. The ground rules are:</p>
+<ul>
+ <li>Send at the lowest rate consistent with the expected accuracy requirements.</li>
+ <li>Maintain strict guard time and minimum average headway time, even if multiple burst options and/or the Autokey protocol are operating.</li>
+ <li>When the first packet of a burst is sent to a server, do not send further packets until the first packet has been received from the server.</li>
+ <li>Upon receiving a Kiss-o'-Death packet (KoD, see below), immediately reduce the sending rate.</li>
+</ul>
+<p>Rate management involves four algorithms to manage resources: (1) poll rate control, (2) burst control, (3) average headway time and (4) guard time. The first two algorithms are described on the <a href="poll.html">Poll Program</a> page; the remaining two are described in following sections.</p>
+<h4 id="guard">Minimum Headway Time</h4>
+<p>The headway is defined for each source as the interval between the last packet sent or received and the next packet for that source. The minimum receive headway is defined as the guard time. In the reference implementation, if the receive headway is less than the guard time, the packet is discarded. The guard time defaults to 2 s, but this can be changed using the <tt>minimum</tt> option of the <a href="accopt.html#discard"><tt>discard</tt></a> command. By design, the minimum interval between <tt>burst</tt> and <tt>iburst</tt> packets sent by any client is 2 s, which does not violate this constraint. Packets sent by other implementations that violate this constraint will be dropped and a KoD packet returned, if enabled.</p>
+<h4 id="mah">Minimum Average Headway Time</h4>
+<p>There are two features in the reference implementation to manage the minimum average headway time between one packet and the next, and thus the maximum average rate for each source. The transmit throttle limits the rate for transmit packets, while the receive discard limits the rate for receive packets. These features make use of a pair of counters: a client output counter for each association and a server input counter for each distinct client IP address. For each packet received, the input counter increments by a value equal to the minimum average headway (MAH) and then decrements by one each second. For each packet transmitted, the output counter increments by the MAH and then decrements by one each second. The default MAH is 8 s, but this can be changed using the <tt>average</tt> option of the <a href="accopt.html#discard"><tt>discard</tt></a> command.</p>
+<p>If the <tt>iburst</tt> or <tt>burst</tt> options are present, the poll algorithm sends a burst of packets instead of a single packet at each poll opportunity. The NTPv4 specification requires that bursts contain no more than eight packets. Starting from an output counter value of zero, the maximum counter value, called the ceiling, can be no more than eight times the MAH. However, if the burst starts with a counter value other than zero, there is a potential to exceed the ceiling. This can result from protocol restarts and/or Autokey protocol operations. In these cases the poll algorithm throttles the output rate by computing an additional headway time so that the next packet sent will not exceed the ceiling. Designs such as this are often called leaky buckets.</p>
+<p>The reference implementation uses a special most-recently used (MRU) list of entries, one entry for each distinct client IP address found. Each entry includes the IP address, input counter and process time at the last packet arrival. As each packet arrives, the IP source address is compared to the IP address in each entry in turn. If a match is found the entry is removed and inserted first on the list. If the IP source address does not match any entry, a new entry is created and inserted first, possibly discarding the last entry if the list is full. Observers will note this is the same algorithm used for page replacement in virtual memory systems. However, in the virtual memory algorithm the entry of interest is the last, whereas here the entry of interest is the first.</p>
+<p> The input counter for the first entry on the MRU list, representing the current input packet, is decreased by the interval since the entry was last referenced, but not below zero. If the input counter is greater than the ceiling, the packet is discarded. Otherwise, the counter is increased by the MAH and the packet is processed. The result is, if the client maintains an average headway greater than the ceiling and transmits no more than eight packets in a burst, the input counter will not exceed the ceiling. Packets sent by other implementations that violate this constraint will be dropped and a KoD packet returned, if enabled.</p>
+<p>The reference implementation has a maximum MRU list size of a few hundred entries. The national time servers operated by NIST and USNO have an aggregate packet rate in the thousands of packets per second from many thousands of customers. Under these conditions, the list overflows after only a few seconds of traffic. However, analysis shows that the vast majority of the abusive traffic is due to a tiny minority of the customers, some of which send at over one packet per second. This means that the few seconds retained on the list is sufficient to identify and discard by far the majority of the abusive traffic.</p>
+<h4 id="kiss">The Kiss-of-Death Packet</h4>
+<p>Ordinarily, packets denied service are simply dropped with no further action except incrementing statistics counters. Sometimes a more proactive response is needed to cause the client to slow down. A special packet has been created for this purpose called the kiss-o'-death (KoD) packet. KoD packets have leap indicator 3, stratum 0 and the reference identifier set to a four-octet ASCII code. At present, only one code <tt>RATE</tt> is sent by the server if the <tt>limited</tt> and <tt>kod</tt> flags of the <a href="accopt.html#restrict"><tt>restrict</tt></a> command are present and either the guard time or MAH time are violated.</p>
+<p>A client receiving a KoD packet is expected to slow down; however, no explicit mechanism is specified in the protocol to do this. In the reference implementation, the server sets the poll field of the KoD packet to the greater of (a) the server MAH and (b) client packet poll field. In response to the KoD packet, the client sets the peer poll interval to the maximum of (a) the client MAH and (b) the server packet poll field. This automatically increases the headway for following client packets. </p>
+<p> In order to make sure the client notices the KoD packet, the server sets the receive and transmit timestamps to the transmit timestamp of the client packet. Thus, even if the client ignores all except the timestamps, it cannot do any useful time computations. KoD packets themselves are rate limited to no more than one packet per guard time, in order to defend against flood attacks.</p>
+<h4 id="ref">References</h4>
+<ol>
+ <li>Mills, D.L., J. Levine, R. Schmidt and D. Plonka. Coping with overload on the Network Time Protocol public servers. <i>Proc. Precision Time and Time Interval (PTTI) Applications and Planning Meeting</i> (Washington DC, December 2004), 5-16. Paper: <a href="http://www.eecis.udel.edu/~mills/database/papers/ptti/ptti04a.pdf">PDF</a>, Slides:<a href="http://www.eecis.udel.edu/~mills/database/brief/ptti/ptti04.pdf">PDF</a> | <a href="http://www.eecis.udel.edu/~mills/database/brief/ptti/ptti04.ppt">PowerPoint</a></li>
+</ol>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/rdebug.html b/html/rdebug.html
new file mode 100644
index 0000000..f14bf43
--- /dev/null
+++ b/html/rdebug.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>Debugging Reference Clock Drivers</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Debugging Reference Clock Drivers</h3>
+<img src="pic/oz2.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>The Wizard of Oz</i>, L. Frank Baum</a>
+<p>Call the girls and they'll sweep your bugs.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:19<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+<hr>
+<p>The <a href="ntpq.html"><tt>ntpq</tt></a> and <a href="ntpdc.html"><tt>ntpdc</tt></a> utility programs can be used to debug reference clocks, either on the server itself or from another machine elsewhere in the network. The server is compiled, installed and started using the configuration file described in the <a href="ntpd.html"><tt>ntpd</tt></a> page and its dependencies. If the clock appears in the <tt>ntpq</tt> utility and <tt>pe</tt> command, no errors have occurred and the daemon has started, opened the devices specified and waiting for peers and radios to come up. If not, the first thing to look for are error messages on the system log. These are usually due to improper configuration, missing links or multiple instances of the daemon.</p>
+<p>It normally takes a minute or so for evidence to appear that the clock is running and the driver is operating correctly. The first indication is a nonzero value in the <tt>reach</tt> column in the <tt>pe</tt> billboard. If nothing appears after a few minutes, the next step is to be sure the RS232 messages, if used, are getting to and from the clock. The most reliable way to do this is with an RS232 tester and to look for data flashes as the driver polls the clock and/or as data arrive from the clock. Our experience is that the overwhelming fraction of problems occurring during installation are due to problems such as miswired connectors or improperly configured device links at this stage.</p>
+<p>If RS232 messages are getting to and from the clock, the variables of interest can be inspected using the <tt>ntpq</tt> program and various commands described on the documentation page. First, use the <tt>pe</tt> and <tt>as</tt> commands to display billboards showing the peer configuration and association IDs for all peers, including the radio clock. The assigned clock address should appear in the <tt>pe</tt> billboard and the association ID for it at the same relative line position in the <tt>as</tt> billboard.</p>
+<p>Additional information is available with the <tt>rv</tt> and <tt>clockvar</tt> commands, which take as argument the association ID shown in the <tt>as</tt> billboard. The <tt>rv</tt> command with no argument shows the system variables, while the <tt>rv</tt> command with association ID argument shows the peer variables for the clock, as well as other peers of interest. The <tt>clockvar</tt> command with argument shows the peer variables specific to reference clock peers, including the clock status, device name, last received timecode (if relevant), and various event counters. In addition, a subset of the <tt>fudge</tt> parameters is included. The poll and error counters in the <tt>clockvar</tt> billboard are useful debugging aids. The <tt>poll</tt> counts the poll messages sent to the clock, while the <tt>noreply</tt>, <tt>badformat</tt> and <tt>baddate</tt> count various errors. Check the timecode to be sure it matches what the driver expects. This may require consulting the clock hardware reference manual, which is probably pretty dusty at this stage.</p>
+<p>The <tt>ntpdc</tt> utility program can be used for detailed inspection of the clock driver status. The most useful are the <tt>clockstat</tt> and <tt>clkbug</tt> commands described in the document page. While these commands permit getting quite personal with the particular driver involved, their use is seldom necessary, unless an implementation bug shows up. If all else fails, turn on the debugging trace using two <tt>-d</tt> flags in the <tt>ntpd</tt> startup command line. Most drivers will dump status at every received message in this case. While the displayed trace can be intimidating, this provides the most detailed and revealing indicator of how the driver and clock are performing and where bugs might lurk.</p>
+<p>Most drivers write a message to the <tt>clockstats</tt> file as each timecode or surrogate is received from the radio clock. By convention, this is the last ASCII timecode (or ASCII gloss of a binary-coded one) received from the radio clock. This file is managed by the <tt>filegen</tt> facility described in the <tt>ntpd</tt> page and requires specific commands in the configuration file. This forms a highly useful record to discover anomalies during regular operation of the clock. The scripts included in the <tt>./scripts/stats</tt> directory can be run from a <tt>cron</tt> job to collect and summarize these data on a daily or weekly basis. The summary files have proven inspirational to detect infrequent misbehavior due to clock implementation bugs in some radios.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/refclock.html b/html/refclock.html
new file mode 100644
index 0000000..d8969e3
--- /dev/null
+++ b/html/refclock.html
@@ -0,0 +1,93 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Reference Clock Support</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Reference Clock Support</h3>
+<img src="pic/stack1a.jpg" alt="gif" align="left">Master Time Facility at the <a href="http://www.eecis.udel.edu/%7emills/lab.html">UDel Internet Research Laboratory</a>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:20<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">Introduction</a></li>
+ <li class="inline"><a href="#spec">Special Considerations</a></li>
+ <li class="inline"><a href="#list">List of Reference Clock Drivers</a></li>
+</ul>
+<hr>
+<h4 id="intro">Introduction</h4>
+<p>NTP Version 4 supports almost four dozen satellite, radio and telephone modem reference clocks plus several audio devices for instrumentation signals. A general description of the reference clock support is on this page. Additional information about each reference clock driver can be found via links from this page. Additional information is on the <a href="rdebug.html">Debugging Hints for Reference Clock Drivers</a> and <a href="howto.html">How To Write a Reference Clock Driver</a> pages. Information on how to support pulse-per-second (PPS) signals produced by some devices is on the <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. All reference clock drivers require that the reference clock use only Coordinated Universal Time (UTC). Timezone and standard/daylight adjustments are performed by the operating system kernel.</p>
+<p>A reference clock will generally (though not always) be a radio timecode receiver synchronized to standard time as provided by NIST and USNO in the US, NRC in Canada and their counterparts elsewhere in the world. A device driver specific to each reference clock must be compiled in the distribution; however, most common radio, satellite and telephone modem clocks are included by default and are activated by configuration commands.</p>
+<p>Reference clocks are supported in the same way as ordinary NTP clients and use the same filter, select, cluster and combine algorithms. Drivers have addresses in the form 127.127.<i>t.u</i>, where <i>t</i> is the driver type and <i>u</i> is a unit number in the range 0-3 to distinguish multiple instances of the same driver. The connection to the computer is device dependent, usually a serial port, parallel port or special bus peripheral, but some can work directly from an audio codec or sound card. The particular device is specified by adding a soft link from the name used by the driver to the particular device name.</p>
+<p>The <tt>server</tt> command is used to configure a reference clock. Only the <tt>mode>,<tt>minpoll</tt>, <tt>maxpoll</tt>, and <tt>prefer</tt> options are supported for reference clocks, as described on the <a href="clockopt.html">Reference Clock Commands</a> page. The <tt>prefer</tt> option is discussed on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. Some of these options have meaning only for selected clock drivers.</p>
+<p>The <tt>fudge</tt> command can be used to provide additional information for individual drivers and normally follows immediately after the <tt>server</tt> command. The reference clock stratum is by default 0, so that the server stratum appears to clients as 1. The <tt>stratum</tt> option can be used to set the stratum to any value in the range 0 through 15. The <tt>refid</tt> option can be used to change the reference identifier, as might in the case when the driver is disciplined by a pulse-per-second (PPS) source. The device-dependent <tt>mode</tt>, <tt>time</tt> and <tt>flag</tt> options can provide additional driver customization.</p>
+<h4 id="spec">Special Considerations</h4>
+<p>The <a href="audio.html">Audio Drivers</a> page describes three software drivers that process audio signals from an audio codec or sound card. One is for the NIST time and frequency stations WWV and WWVH, another for the Canadian time and frequency station CHU. These require an external shortwave radio and antenna. A third is for the generic IRIG signal produced by some timing devices. Currently, these are supported in FreeBSD, Solaris and SunOS and likely in other system as well.</p>
+<p>The <a href="drivers/driver1.html"> Undisciplined Local Clock</a> driver can simulate a reference clock when no external synchronization sources are available. If a server with this driver is connected directly or indirectly to the public Internet, there is some danger that it can destabilize other clients. It is not recommended that the local clock driver be used in this way, as the orphan mode described on the <a href="assoc.html">Association Management</a> page provides a generic backup capability.</p>
+<p>The local clock driver can also be used when an external synchronization source such as the IEEE 1588 Precision Time Protocol or NIST Lockclock directly synchronizes the computer time. Further information is on the <a href="extern.html">External Clock Discipline and the Local Clock Driver</a> page.</p>
+<p>Several drivers make use of the pulse-per-second (PPS)&nbsp;signal discipline, which is part of the generic driver interface, so require no specific configuration. For those drivers that do not use this interface, the <a href="drivers/driver22.html"> PPS Clock Discipline</a> driver can be can provide this function. It normally works in conjunction with the reference clock that produces the timecode signal, but can work with another driver or remote server. When PPS kernel features are present, the driver can redirect the PPS signal to the kernel.</p>
+<p>Some drivers depending on longwave or shortwave radio services need to know the radio propagation time from the transmitter to the receiver. This must be calculated for each specific receiver location and requires the geographic coordinates of both the transmitter and receiver. The transmitter coordinates for various radio services are given in the <a href="http://www.eecis.udel.edu/%7emills/ntp/qth.html">Time and Frequency Standard Station Information</a> page. Receiver coordinates can be obtained locally or from Google Earth. The actual calculations are beyond the scope of this document.</p>
+<p>Depending on interface type, port speed, etc., a reference clock can have a small residual offset relative to another. To reduce the effects of jitter when switching from one driver to the another, it is useful to calibrate the drivers to a common ensemble offset. The <tt>enable calibrate</tt> configuration command described on the <a href="miscopt.html">Miscellaneous Options</a> page activates a special feature which automatically calculates a correction factor for each driver relative to an association designated the prefer peer.</p>
+<h4 id="list"> List of Reference Clock Drivers</h4>
+<p>Following is a list showing the type and title of each driver currently implemented. The compile-time identifier for each is shown in parentheses. Click on a selected type for specific description and configuration documentation, including the clock address, reference ID, driver ID, device name and serial line speed. For those drivers without specific documentation, please contact the author listed in the <a href="copyright.html">Copyright Notice</a> page.</p>
+<ul>
+ <li class="inline"><a href="drivers/driver1.html">Type 1</a> Undisciplined Local Clock (<tt>LOCAL</tt>)</li>
+ <li class="inline">Type 2 Deprecated: was Trak 8820 GPS Receiver</li>
+ <li class="inline"><a href="drivers/driver3.html">Type 3</a> PSTI/Traconex 1020 WWV/WWVH Receiver (<tt>WWV_PST</tt>)</li>
+ <li class="inline"><a href="drivers/driver4.html">Type 4</a> Spectracom WWVB/GPS Receivers (<tt>WWVB_SPEC</tt>)</li>
+ <li class="inline"><a href="drivers/driver5.html">Type 5</a> TrueTime GPS/GOES/OMEGA Receivers (<tt>TRUETIME</tt>)</li>
+ <li class="inline"><a href="drivers/driver6.html">Type 6</a> IRIG Audio Decoder (<tt>IRIG_AUDIO</tt>)</li>
+ <li class="inline"><a href="drivers/driver7.html">Type 7</a> Radio CHU Audio Demodulator/Decoder (<tt>CHU</tt>)</li>
+ <li class="inline"><a href="drivers/driver8.html">Type 8</a> Generic Reference Driver (<tt>PARSE</tt>)</li>
+ <li class="inline"><a href="drivers/driver9.html">Type 9</a> Magnavox MX4200 GPS Receiver (<tt>GPS_MX4200</tt>)</li>
+ <li class="inline"><a href="drivers/driver10.html">Type 10</a> Austron 2200A/2201A GPS Receivers (<tt>GPS_AS2201</tt>)</li>
+ <li class="inline"><a href="drivers/driver11.html">Type 11</a> Arbiter 1088A/B GPS Receiver (<tt>GPS_ARBITER</tt>)</li>
+ <li class="inline"><a href="drivers/driver12.html">Type 12</a> KSI/Odetics TPRO/S IRIG Interface (<tt>IRIG_TPRO</tt>)</li>
+ <li class="inline">Type 13 Leitch CSD 5300 Master Clock Controller (<tt>ATOM_LEITCH</tt>)</li>
+ <li class="inline">Type 14 EES M201 MSF Receiver (<tt>MSF_EES</tt>)</li>
+ <li class="inline">Type 15 reserved</li>
+ <li class="inline"><a href="drivers/driver16.html">Type 16</a> Bancomm GPS/IRIG Receiver (<tt>GPS_BANCOMM</tt>)</li>
+ <li class="inline">Type 17 Datum Precision Time System (<tt>GPS_DATUM</tt>)</li>
+ <li class="inline"><a href="drivers/driver18.html">Type 18</a> NIST/USNO/PTB Modem Time Services (<tt>ACTS_MODEM</tt>)</li>
+ <li class="inline"><a href="drivers/driver19.html">Type 19</a> Heath WWV/WWVH Receiver (<tt>WWV_HEATH</tt>)</li>
+ <li class="inline"><a href="drivers/driver20.html">Type 20</a> Generic NMEA GPS Receiver (<tt>NMEA</tt>)</li>
+ <li class="inline">Type 21 TrueTime GPS-VME Interface (<tt>GPS_VME</tt>)</li>
+ <li class="inline"><a href="drivers/driver22.html">Type 22</a> PPS Clock Discipline (<tt>PPS</tt>)</li>
+ <li class="inline">Type 23 reserved</li>
+ <li class="inline">Type 24 reserved</li>
+ <li class="inline">Type 25 reserved</li>
+ <li class="inline"><a href="drivers/driver26.html">Type 26</a> Hewlett Packard 58503A GPS Receiver (<tt>GPS_HP</tt>)</li>
+ <li class="inline"><a href="drivers/driver27.html">Type 27</a> Arcron MSF Receiver (<tt>MSF_ARCRON</tt>)</li>
+ <li class="inline"><a href="drivers/driver28.html">Type 28</a> Shared Memory Driver (<tt>SHM</tt>)</li>
+ <li class="inline"><a href="drivers/driver29.html">Type 29</a> Trimble Navigation Palisade GPS (<tt>GPS_PALISADE</tt>)</li>
+ <li class="inline"><a href="drivers/driver30.html">Type 30</a> Motorola UT Oncore GPS <tt>GPS_ONCORE</tt>)</li>
+ <li class="inline"><a href="drivers/driver31.html">Type 31</a> Rockwell Jupiter GPS (<tt>GPS_JUPITER</tt>)</li>
+ <li class="inline"><a href="drivers/driver32.html">Type 32</a> Chrono-log K-series WWVB receiver (<tt>CHRONOLOG</tt>)</li>
+ <li class="inline"><a href="drivers/driver33.html">Type 33</a> Dumb Clock (<tt>DUMBCLOCK</tt>)</li>
+ <li class="inline"><a href="drivers/driver34.html">Type 34</a> Ultralink WWVB Receivers (<tt>ULINK</tt>)</li>
+ <li class="inline"><a href="drivers/driver35.html">Type 35</a> Conrad Parallel Port Radio Clock (<tt>PCF</tt>)</li>
+ <li class="inline"><a href="drivers/driver36.html">Type 36</a> Radio WWV/H Audio Demodulator/Decoder (<tt>WWV</tt>)</li>
+ <li class="inline"><a href="drivers/driver37.html">Type 37</a> Forum Graphic GPS Dating station (<tt>FG</tt>)</li>
+ <li class="inline"><a href="drivers/driver38.html">Type 38</a> hopf GPS/DCF77 6021/komp for Serial Line (<tt>HOPF_S</tt>)</li>
+ <li class="inline"><a href="drivers/driver39.html">Type 39</a> hopf GPS/DCF77 6039 for PCI-Bus (<tt>HOPF_P</tt>)</li>
+ <li class="inline"><a href="drivers/driver40.html">Type 40</a> JJY Receivers (<tt>JJY</tt>)</li>
+ <li class="inline">Type 41 TrueTime 560 IRIG-B Decoder</li>
+ <li class="inline"><a href="drivers/driver42.html">Type 42</a> Zyfer GPStarplus Receiver</li>
+ <li class="inline"><a href="drivers/driver43.html">Type 43</a> RIPE NCC interface for Trimble Palisade</li>
+ <li class="inline"><a href="drivers/driver44.html">Type 44</a> NeoClock4X - DCF77 / TDF serial line</li>
+ <li class="inline"><a href="drivers/driver45.html">Type 45</a> Spectracom TSYNC PCI</li>
+ <li class="inline"><a href="drivers/driver46.html">Type 46</a> GPSD NG client protocol</li>
+</ul>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/release.html b/html/release.html
new file mode 100644
index 0000000..f940603
--- /dev/null
+++ b/html/release.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>NTP Version 4 Release Notes</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>NTP Version 4 Release Notes</h3>
+<img src="pic/hornraba.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>The rabbit toots to make sure you read this.</p>
+<p>Last update:
+ <!-- #BeginDate format:En1m -->3-Oct-2011 21:51<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#new">New Features Modes</a></li>
+ <li class="inline"><a href="#change">Changes and Upgrades Since the NTPv3 Version (xntp3-5)</a></li>
+ <li class="inline"><a href="#nasty">Nasty Surprises</a></li>
+</ul>
+<hr>
+<p>NTP has been under development for almost 30 years, but the paint ain't dry even now. This release of the NTP Version 4 (NTPv4) distribution for Unix, VMS and Windows incorporates new features and refinements, but retaining backwards compatibility with older versions, including NTPv3 and NTPv2, but not NTPv1. Support for NTPv1 has been discontinued because of certain security vulnerabilities.</p>
+<h4 id="new">New Features</h4>
+<ul>
+ <li>The behavior of the daemon at startup has been considerably improved. The time to measure the frequency and correct an initial offset error when started for the first time is now no more than ten minutes. Upon restart, it takes no more than five minutes to reduce the initial offset to less than one millisecond without adversely affecting the frequency. This avoids a subsequent frequency correction which could take up to several hours.</li>
+ <li>A new feature called interleaved mode can be used in NTP
+ symmetric and broadcast modes. It is designed to improve accuracy
+ by minimizing errors due to queuing and transmission delays. It is described on the <a href="xleave.html">NTP
+ Interleaved Modes</a> page.</li>
+ <li>The huff-n'-puff filter is designed to avoid large errors with DSL circuits and highly asymmetrical traffic, as when downloading large files. Details are on the <a href="huffpuff.html">The Huff-n'-Puff Filter</a> page.</li>
+ <li>A new feature called orphan mode provides an automatic, subnet-wide synchronization feature with multiple sources. It provides reliable backup in isolated networks or in pr when Internet sources have become unavailable. See the <a href="orphan.html">Orphan Mode</a> page for further information.</li>
+ <li>This release includes comprehensive packet rate management tools to help reduce the level of spurious network traffic and protect the busiest servers from overload. There is support for the optional Kiss-o'-Death (KoD) packet intended to slow down an abusive client. See the <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a> page for further information.</li>
+ <li>There are two new burst mode features available where special conditions apply. One of these is enabled by the <tt>iburst</tt> keyword in the <tt>server</tt> configuration command. It is intended for cases where it is important to set the clock quickly when an association is first mobilized. The other is enabled by the <tt>burst</tt> keyword in the <tt>server</tt> configuration command. It is intended for cases where the network attachment requires an initial calling or training procedure. See the <a href="assoc.html">Association Management</a> page for further information.</li>
+ <li>The OpenSSL cryptographic library has replaced the library formerly available from RSA Laboratories. All cryptographic routines except a version of the MD5 message digest algorithm have been removed from the base distribution. All 128-bit and 160-bit message digests algorithms are now supported for both symmetric key and public key cryptosystems. See the <a href="authentic.html">Authentication Support</a> page for further information and the <a href="authopt.html">Authentication Options</a> page for a list of supported digest algorithms.</li>
+ <li>This release includes support for Autokey public-key cryptography for authenticating public servers to clients, as described in RFC 5906. This support requires the --enable-autokey option when building the distribution, which is the default is OpenSSL is available. The deployment of Autokey subnets is now considerably simpler than in earlier versions. A subnet naming scheme is now available to filter manycast and pool configurations. Additional information about Autokey is on the <a href="autokey.html">Autokey Public Key Authentication</a> page and links from there.</li>
+ <li>The NTP descrete even simulator has been substantially upgraded, now including scenarios with multiple servers and time-sensitive scripts. This allows the NTP&nbsp;algorithms to be tested in an embedded environment with systematic and pseudo-random network delay and oscillator wander distributions. This has been used to verify correct operation under conditions of extreme error and misconfiguration. See the <a href="ntpdsim.html"><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</a> page. A technical description and performance analysis is given in the white papers at the <a href="http://www.eecis.udel.edu/~mills/ntp.html">NTP Project Page</a>.</li>
+ <li>NTPv4 includes three new server discovery schemes, which in most applications can avoid per-host configuration altogether. Two of these are based on IP multicast technology, while the remaining one is based on crafted DNS lookups. See the <a href="discover.html">Automatic NTP Configuration Schemes</a> page for further information.</li>
+ <li>The status display and event report monitoring functions have been considerably expanded, including new statistics files and event reporting to files and the system log. See the <a href="decode.html">Event Messages and Status Words</a> page for further information.</li>
+ <li>Several new options have been added for the <tt>ntpd</tt> command line. For the inveterate knob twiddlers several of the more important performance variables can be changed to fit actual or perceived special conditions. In particular, the <tt>tinker</tt> and <tt>tos</tt> commands can be used to adjust thresholds, throw switches and change limits.</li>
+ <li>The <tt>ntpd</tt> daemon can be operated in a one-time mode similar to <tt>ntpdate</tt>, which program is headed for retirement. See the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a> page for the new features.</li>
+ <li>A number of white papers have been added to the library on the NTP Reseatch Project Page, including:</li>
+</ul>
+<script type="text/javascript" language="javascript" src="scripts/external.txt"></script>
+<h4 id="change">Changes and Upgrades Since the NTPv3 Version (xntp3-5) </h4>
+<p>This section summarizes general changes since the publication of RFC-1305. Specific changes made during the code upgrade of 2007-2008 are summarized in <a href="history.html">Historical Notes</a>.</p>
+<ul>
+ <li>If the Basic Socket Interface Extensions for IPv6 (RFC-2553) is detected, support for the IPv6 address family is supported in addition to the default support for the IPv4 address family. In contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace.</li>
+ <li>Many changes have been made in the NTP algorithms to improve performance and reliability A clock state machine has been incorporated to improve behavior under transient conditions. The clock discipline algorithm has been redesigned to improve accuracy, reduce the impact of network disruptions and allow increased poll intervals to 36 hours with only moderate sacrifice in accuracy. The clock select, cluster and combine algorithms have been overhauled as the result of a thorough statistical analysis.</li>
+ <li>In all except a very few cases, all timing intervals are randomized, so that the tendency for NTPv3 to self-synchronize and bunch messages, especially with a large number of configured associations, is minimized.</li>
+ <li>Support for the precision time kernel modifications, which are now in stock FreeBSD and optional in Linux kernels, is included. With this support the system clock can be disciplined to the order of one nanosecond. The older microtime kernel modifications in Digital/Compaq/HP Tru64, Digital Ultrix and Sun Microsystems SunOS and Solaris, continue to be supported. In either case the support eliminates sawtooth error, which can be in the hundreds of microseconds. Further information is on the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page.</li>
+ <li>New reference clock drivers have been added for several GPS receivers now on the market for a total of 44 drivers. The reference clock driver interface is smaller, more rational, more flexible and more accurate. Most of the drivers in NTPv3 have been converted to the NTPv4 interface and continue to operate as before. A summary of the supported drivers is on the <a href="refclock.html">Reference Clock Support</a> page. Audio drivers for the Canadian standard time and frequency station CHU, the US standard time and frequency stations WWV/H and for IRIG signals have been updated and capabilities added to allow direct connection of these signals to an audio port. See the <a href="audio.html">Reference Clock Audio Drivers</a> page for further information.</li>
+ <li>Support for pulse-per-second (PPS) signals has been extended to all drivers as an intrinsic function. Further information is on the <a href="pps.html">Pulse-Per-Second (PPS) Signal Interfacing</a> page. Typical performance with the PPS interface and a fast machine are in the low microseconds.</li>
+ <li>Several small changes have been made to make administration and maintenance more convenience. The entire distribution has been converted to gnu <tt>automake</tt>, which greatly ease the task of porting to new and different programming environments, as well as reduce the incidence of bugs due to improper handling of idiosyncratic kernel functions. Version control is provided by Bitkeeper using an online repository at www.ntp.org. Trouble ticket reporting is provided using Bugzilla. If <tt>ntpd</tt>, is configured with NetInfo support, it will attempt to read its configuration from the NetInfo service if the default <tt>ntp.conf</tt> file cannot be read and no file is specified by the <tt>-c</tt> option. When <tt>ntpd</tt> starts it looks at the value of <tt>umask</tt>, and if zero <tt>ntpd</tt> will set the <tt>umask</tt> to <tt>022</tt>.</li>
+</ul>
+<h4 id="nasty">Nasty Surprises</h4>
+<p>There are a few things different about this release that have changed since the latest NTP Version 3 release. Following are a few things to worry about:</p>
+<ul>
+ <li>Some configuration commands have been removed, others added and some changed in minor ways. See the Commands and Options collection on the <a href="sitemap.html">Site Map</a> page.</li>
+ <li>When both IPv4 and IPv6 address families are in use, the host's resolver library may not choose the intended address family if a server has an IPv4 and IPv6 address associated with the same DNS name. The solution is to use the IPv4 or IPv6 address directly in such cases or use another DNS name that resolves to the intended address family. Older versions of <tt>ntpdc</tt> will show only the IPv4 associations with the <tt>peers</tt> and some other commands. Older versions of <tt>ntpq</tt> will show 0.0.0.0 for IPv6 associations with the <tt>peers</tt> and some other commands.</li>
+ <li>There is a minor change to the reference ID field of the NTP packet header when operating with IPv6 associations. In IPv4 associations this field contains the 32-bit IPv4 address of the server, in order to detect and avoid loops. In IPv6 associations this field contains the first 32-bits of a MD5 hash formed from the IPv6 address. All programs in the distribution have been modified to work with both address families.</li>
+ <li>The <tt>tty_clk</tt> and <tt>ppsclock</tt> pulse-per-second (PPS) line discipline/streams modules are no longer supported. The PPS function is now handled by the <a href="drivers/driver22.html">PPS Clock Discipline</a> driver, which uses the new PPSAPI application program interface adopted by the IETF. Note that the <tt>pps</tt> configuration file command has been obsoleted by the driver. See the <a href="pps.html">Pulse-Per-Second (PPS) Signal Interfacing</a> page for further information.</li>
+ <li>Support for the NTPv1 symmetric mode has been discontinued, since it hasn't worked for years. Support continues for the NTPv1 client mode, which is used by some SNTP clients.</li>
+ <li>The <tt>authstuff</tt> directory, intended as a development and testing aid for porting cryptographic routines to exotic architectures, has been removed. Testing and conformance validation tools are available in the OpenSSL software distribution.</li>
+</ul>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/scripts/accopt.txt b/html/scripts/accopt.txt
new file mode 100644
index 0000000..d8f0280
--- /dev/null
+++ b/html/scripts/accopt.txt
@@ -0,0 +1,5 @@
+document.write("<p>Access Control Commands and Options</p><ul>\
+<li class='inline'><a href='accopt.html#discard'>discard - specify headway parameters</a></li>\
+<li class='inline'><a href='accopt.html#restrict'>restrict - specify access restrictions</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/audio.txt b/html/scripts/audio.txt
new file mode 100644
index 0000000..5fb11fc
--- /dev/null
+++ b/html/scripts/audio.txt
@@ -0,0 +1,7 @@
+document.write("<p>Reference Clock Audio Drivers</p><ul>\
+<li class='inline'><a href='drivers/driver6.html'>IRIG Audio Decoder</a>\
+<li class='inline'><a href='drivers/driver7.html'>Radio CHU Audio Demodulator/Decoder</a></li>\
+<li class='inline'><a href='drivers/driver36.html'>Radio WWV/H Audio Demodulator/Decoder</a></li>\
+<li class='inline'><a href='audio.html'>Reference Clock Audio Drivers</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/authopt.txt b/html/scripts/authopt.txt
new file mode 100644
index 0000000..5064b18
--- /dev/null
+++ b/html/scripts/authopt.txt
@@ -0,0 +1,12 @@
+document.write("<p>Authentication Commands and Options</p4><ul>\
+<li class='inline'><a href='authopt.html#automax'>automax - specify Autokey regeneration interval</a></li>\
+<li class='inline'><a href='authopt.html#controlkey'>controlkey - specify control key ID</a></li>\
+<li class='inline'><a href='authopt.html#crypto'>crypto - configure Autokey parameters</a></li>\
+<li class='inline'><a href='authopt.html#ident'>ident - specify Autokey ephemeral group name</a></li>\
+<li class='inline'><a href='authopt.html#keys'>keys - specify symmetric keys filename</a></li>\
+<li class='inline'><a href='authopt.html#keysdir'>keysdir - specify Autokey key directory</a></li>\
+<li class='inline'><a href='authopt.html#requestkey'>requestkey - specify request key ID</a></li>\
+<li class='inline'><a href='authopt.html#revoke'>revoke - specify Autokey randomization interval</a></li>\
+<li class='inline'><a href='authopt.html#trustedkey'>trustedkey - specify trusted key IDs</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/clockopt.txt b/html/scripts/clockopt.txt
new file mode 100644
index 0000000..1c76a1c
--- /dev/null
+++ b/html/scripts/clockopt.txt
@@ -0,0 +1,5 @@
+document.write("<p>Reference Clock Commands and Options</p><ul>\
+<li class='inline'><a href='clockopt.html#fudge'>fudge - specify fudge parameters</a><br>\
+<li class='inline'><a href='clockopt.html#server'>server - specify reference clock server</a><br>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/command.txt b/html/scripts/command.txt
new file mode 100644
index 0000000..ec6169e
--- /dev/null
+++ b/html/scripts/command.txt
@@ -0,0 +1,7 @@
+document.write("\
+<table><tr>\
+<td width='50%' ><img src='icons/home.gif' align='middle' alt='gif'>\
+<a href='index.html'>Home Page</a></td>\
+<td width='50%' ><img src='icons/mail2.gif' align='middle' alt='gif'>\
+<a href='http://www.ntp.org/contact'>Contacts</a></i></td>\
+</tr></table>")
diff --git a/html/scripts/config.txt b/html/scripts/config.txt
new file mode 100644
index 0000000..84c226a
--- /dev/null
+++ b/html/scripts/config.txt
@@ -0,0 +1,5 @@
+document.write("<p>Client and Server Configuration</p><ul>\
+<li class='inline'><a href='assoc.html'>Association Management</a></li>\
+<li class='inline'><a href='discover.html'>Automatic Server Discovery Schemes</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/confopt.txt b/html/scripts/confopt.txt
new file mode 100644
index 0000000..c524f59
--- /dev/null
+++ b/html/scripts/confopt.txt
@@ -0,0 +1,12 @@
+document.write("<p>Server Commands and Options</p><ul>\
+<li class='inline'><a href='confopt.html#server'>server - configure client association</a></li>\
+<li class='inline'><a href='confopt.html#peer'>peer - configure symmetric peer association</a></li>\
+<li class='inline'><a href='confopt.html#broadcast'>broadcast - configure broadcast server association</a></li>\
+<li class='inline'><a href='confopt.html#manycastclient'>manycastclient - configure manycast client association</a></li>\
+<li class='inline'><a href='confopt.html#pool'>pool - configure pool association</a></li>\
+<li class='inline'><a href='confopt.html#unpeer'>unpeer - remove association</a></li>\
+<li class='inline'><a href='confopt.html#broadcastclient'>broadcastclient - enable broadcast client</a></li>\
+<li class='inline'><a href='confopt.html#manycastserver'>manycastserver - enable manycast server</a></li>\
+<li class='inline'><a href='confopt.html#multicastclient'>multicastclient - enable multicast client</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/external.txt b/html/scripts/external.txt
new file mode 100644
index 0000000..5e70705
--- /dev/null
+++ b/html/scripts/external.txt
@@ -0,0 +1,19 @@
+document.write("<p>External Links</p><ul>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/book.html'>Computer Network Time Synchronization - The Network Time Protocol (book)</a></li>\
+<li class='inline'><a href='http://www.ntp.org/index.html'>NTP Public Services Project (home page)</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/ntp.html'>NTP Research Project (home page)</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/exec.html'>Executive Summary: Computer Network Time Synchronization</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/leap.html'>The NTP Timescale and Leap Seconds</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/time.html'>NTP Timestamp Calculations</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/y2k.html'>The NTP Era and Era Numbering</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/stamp.html'>Timestamp Capture Principles</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/onwire.html'>Analysis and Simulation of the NTP On-Wire Protocols</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/proximity.html'>Time Synchroization for Space Data Links</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/security.html'>NTP Security Analysis</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/ptp.html'>IEEE 1588 Precision Time Protocol (PTP)</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/autocfg.html'>Autonomous Configuration</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/autokey.html'>Autonomous Authentication</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/proto.html'>Autokey Protocol</a></li>\
+<li class='inline'><a href='http://www.eecis.udel.edu/~mills/ident.html'>Autokey Identity Schemes</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/footer.txt b/html/scripts/footer.txt
new file mode 100644
index 0000000..48830e6
--- /dev/null
+++ b/html/scripts/footer.txt
@@ -0,0 +1,9 @@
+document.write("\
+<table><tr>\
+<td width='33%' align='center'><img src='icons/home.gif' align='middle'>\
+<a href='index.html'>Home Page</a></td>\
+<td width='33%' align='center'><img src='icons/sitemap.png' align='middle'>\
+<a href='sitemap.html'>Site Map</a></td>\
+<td width='33%' align='center'><img src='icons/mail2.gif' align='middle'>\
+<a href='http://www.ntp.org/contact'>Contacts</a></td>\
+</tr></table>")
diff --git a/html/scripts/hand.txt b/html/scripts/hand.txt
new file mode 100644
index 0000000..95da082
--- /dev/null
+++ b/html/scripts/hand.txt
@@ -0,0 +1,11 @@
+document.write("<p>Handbook Pages</p><ul>\
+<li class='inline'><a href='release.html'>NTP Version 4 Release Notes</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+<li class='inline'><a href='access.html'>Access Control Support</a></li>\
+<li class='inline'><a href='assoc.html'>Association Management</a></li>\
+<li class='inline'><a href='authentic.html'>Authentication Support</a></li>\
+<li class='inline'><a href='discover.html'>Automatic Server Discovery Schemes Timekeeping</a></li>\
+<li class='inline'><a href='rate.html'>Rate Management</a></li>\
+<li class='inline'><a href='refclock.html'>Reference Clock Support</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/install.txt b/html/scripts/install.txt
new file mode 100644
index 0000000..e8185f2
--- /dev/null
+++ b/html/scripts/install.txt
@@ -0,0 +1,10 @@
+document.write("<p>Build and Install</p><ul>\
+<li class='inline'><a href='build.html'>Building and Installing the Distribution</a></li>\
+<li class='inline'><a href='config.html'>Build Options</a></li>\
+<li class='inline'><a href='rdebug.html'>Debugging Reference Clock Drivers</a></li>\
+<li class='inline'><a href='quick.html'>Quick Start</a></li>\
+<li class='inline'><a href='release.html'>NTP Version 4 Release Notes</a></li>\
+<li class='inline'><a href='debug.html'>NTP Debugging Techniques</a></li>\
+<li class='inline'><a href='bugs.html'>NTP Bug Reporting Procedures</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/manual.txt b/html/scripts/manual.txt
new file mode 100644
index 0000000..bad1f93
--- /dev/null
+++ b/html/scripts/manual.txt
@@ -0,0 +1,13 @@
+document.write("<p>Program Manual Pages<p><ul>\
+<li class='inline'><a href='ntpd.html'><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a></li>\
+<li class='inline'><a href='ntpq.html'><tt>ntpq</tt> - standard NTP query program</a></li>\
+<li class='inline'><a href='ntpdc.html'><tt>ntpdc</tt> - special NTP query program</a></li>\
+<li class='inline'><a href='ntpdate.html'><tt>ntpdate</tt> - set the date and time via NTP</a></li>\
+<li class='inline'><a href='sntp.html'><tt>sntp</tt> - Simple Network Time Protocol (SNTP) client</a></li>\
+<li class='inline'><a href='ntptrace.html'><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</a></li>\
+<li class='inline'><a href='tickadj.html'><tt>tickadj</tt> - set time-related kernel variables</a></li>\
+<li class='inline'><a href='ntptime.html'><tt>ntptime</tt> - read and set kernel time variables</a></li>\
+<li class='inline'><a href='keygen.html'><tt>ntp-keygen</tt> - generate public and private keys</a></li>\
+<li class='inline'><a href='ntpdsim_new.html'><tt>ntpdsim</tt> - Network Time Protocol (NTP) simulator</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/misc.txt b/html/scripts/misc.txt
new file mode 100644
index 0000000..2dfb289
--- /dev/null
+++ b/html/scripts/misc.txt
@@ -0,0 +1,9 @@
+document.write("<p>Miscellaneous Pages</p><ul>\
+<li class='inline'><a href='copyright.html'>Copyright Notice</a></li>\
+<li class='inline'><a href='decode.html'>Event Messages and Status Words</a></li>\
+<li class='inline'><a href='kern.html'>Kernel Model for Precision Timekeeping</a></li>\
+<li class='inline'><a href='msyslog.html'><tt>ntpd</tt> System Log Messages</a></li>\
+<li class='inline'><a href='kernpps.html'>PPSAPI Interface for Precision Time Signals</a></li>\
+<li class='inline'><a href='pps.html'>Pulse-per-second (PPS) Signal Interfacing</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/miscopt.txt b/html/scripts/miscopt.txt
new file mode 100644
index 0000000..64987c8
--- /dev/null
+++ b/html/scripts/miscopt.txt
@@ -0,0 +1,21 @@
+document.write("<p>Miscellaneous Commands and Options</p><ul>\
+<li class='inline'><a href='miscopt.html#broadcastdelay'>broadcastdelay - specify broadcast delay</a></li>\
+<li class='inline'><a href='miscopt.html#driftfile'>driftfile - specify frequency file</a></li>\
+<li class='inline'><a href='miscopt.html#enable'>enable - enable options</a></li>\
+<li class='inline'><a href='miscopt.html#enable'>disable - disable options</a></li>\
+<li class='inline'><a href='miscopt.html#includefile'>includefile - specify include file</a></li>\
+<li class='inline'><a href='miscopt.html#interface'>interface - specify which local network addresses to use</a></li>\
+<li class='inline'><a href='miscopt.html#leapfile'>leapfile - specify leapseconds file</a></li>\
+<li class='inline'><a href='miscopt.html#logconfig'>logconfig - configure log file</a></li>\
+<li class='inline'><a href='miscopt.html#mru'>mru - control monitor MRU list limits</a></li>\
+<li class='inline'><a href='miscopt.html#phone'>phone - specify modem phone numbers</a></li>\
+<li class='inline'><a href='miscopt.html#reset'>reset - reset groups of counters</a></li>\
+<li class='inline'><a href='miscopt.html#saveconfigdir'>saveconfigdir - specify saveconfig directory</a></li>\
+<li class='inline'><a href='miscopt.html#setvar'>setvar - set system variables</a></li>\
+<li class='inline'><a href='miscopt.html#tinker'>tinker - modify sacred system parameters (dangerous)</a></li>\
+<li class='inline'><a href='miscopt.html#rlimit'>rlimit - alters certain process storage allocation limits</a></li>\
+<li class='inline'><a href='miscopt.html#tos'>tos - modify service parameters</a></li>\
+<li class='inline'><a href='miscopt.html#trap'>trap - set trap address</a></li>\
+<li class='inline'><a href='miscopt.html#ttl'>ttl - set time to live</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/monopt.txt b/html/scripts/monopt.txt
new file mode 100644
index 0000000..b7d5a2f
--- /dev/null
+++ b/html/scripts/monopt.txt
@@ -0,0 +1,6 @@
+document.write("<p>Monitoring Commands and Options</p><ul>\
+<li class='inline'><a href='monopt.html#filegen'>filegen - specify monitor files</a></li>\
+<li class='inline'><a href='monopt.html#statistics'>statistics - enable writing of statistics records</a></li>\
+<li class='inline'><a href='monopt.html#statsdir'>statsdir - specify monitor files directory</a></li>\
+<li class='inline'><a href='comdex.html'>Command Index</a></li>\
+</ul>")
diff --git a/html/scripts/refclock.txt b/html/scripts/refclock.txt
new file mode 100644
index 0000000..b32e5fa
--- /dev/null
+++ b/html/scripts/refclock.txt
@@ -0,0 +1,7 @@
+document.write("<p>Reference Clock Support</p><ul>\
+<li class='inline'><a href='extern.html'>External Clock Discipline and the Local Clock Driver</a></li>\
+<li class='inline'><a href='howto.html'>How to Write a Reference Clock Driver</a></li>\
+<li class='inline'><a href='howto.html'>How to build new PARSE clocks</a></li>\
+<li class='inline'><a href='refclock.html'>Reference Clock Drivers</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul></ul>")
diff --git a/html/scripts/special.txt b/html/scripts/special.txt
new file mode 100644
index 0000000..b62d15e
--- /dev/null
+++ b/html/scripts/special.txt
@@ -0,0 +1,17 @@
+document.write("<p>Special Topics</p><ul>\
+<li class='inline'><a href='warp.html'>How NTP Works</a></li>\
+<li class='inline'><a href='prefer.html'>Mitigation Rules and the <tt>prefer</tt> Keyword</a></li>\
+<li class='inline'><a href='autokey.html'>Autokey Public-Key Authentication</a></li>\
+<li class='inline'><a href='orphan.html'>Orphan Mode</a></li>\
+<li class='inline'><a href='xleave.html'>NTP Interleaved Modes</a></li>\
+<li class='inline'><a href='huffpuff.html'>Huff-n'-Puff Filter</a></li>\
+<li class='inline'><a href='filter.html'>Clock Filter Algorithm</a></li>\
+<li class='inline'><a href='select.html'>Clock Select Algorithm</a></li>\
+<li class='inline'><a href='cluster.html'>Clock Cluster Algorithm</a></li>\
+<li class='inline'><a href='prefer.html'>Mitigation Rules and the <tt>prefer</tt> Keyword</a></li>\
+<li class='inline'><a href='discipline.html'>Clock Discipline Algorithm</a></li>\
+<li class='inline'><a href='poll.html'>Poll Process</a></li>\
+<li class='inline'><a href='clock.html'>Clock State Machine</a></li>\
+<li class='inline'><a href='leap.html'>Leap Second Processing</a></li>\
+<li class='inline'><a href='sitemap.html'>Site Map</a></li>\
+</ul>")
diff --git a/html/scripts/style.css b/html/scripts/style.css
new file mode 100644
index 0000000..7a0cc54
--- /dev/null
+++ b/html/scripts/style.css
@@ -0,0 +1,64 @@
+body {background: #FDF1E1;
+ color: #006600;
+ font-family: "verdana", sans-serif;
+ text-align: justify;
+ margin-left: 5px;}
+
+p, h4, hr, li {margin-top: .6em; margin-bottom: .6em}
+li.inline {text-align: left; margin-top: 0; margin-bottom: 0}
+
+ul, dl, ol, {margin-top: .6em; margin-bottom: .6em; margin-left 5em}
+
+dt {margin-top: .6em}
+dd {margin-bottom: .6em}
+
+div.header {text-align: center;
+ font-style: italic;}
+
+div.footer {text-align: center;
+ font-size: 60%;}
+
+img.cell {align: left;}
+
+td.sidebar {width: 40px; align: center; valign: top;}
+img.sidebar {align: center; margin-top: 5px;}
+h4.sidebar {align: center;}
+
+p.top {background: #FDF1E1;
+ color: #006600;
+ position: absolute;
+ margin-left: -90px;
+ text-align: center;}
+
+a:link.sidebar {background: transparent;
+ color: #990033;
+ font-weight: bold;}
+
+a:visited.sidebar {background: transparent;
+ color: #990033;
+ font-weight: bold;}
+
+a:hover.sidebar {background: #FDF1E1;
+ color: #006600;}
+
+img {margin: 5px;}
+
+div {text-align: center;}
+
+h1 {text-align: center;
+ font-size: 250%;}
+
+caption {background: #EEEEEE;
+ color: #339999;}
+
+tx {text-align: center;}
+
+th {background: #FFFFCC;
+ color: #006600;
+ text-align: center;
+ text-decoration: underline;
+ padding-top: 5px;}
+
+th.caption {background: #EEEEEE;
+ color: #006600;
+ text-align: center;}
diff --git a/html/select.html b/html/select.html
new file mode 100644
index 0000000..6cfa186
--- /dev/null
+++ b/html/select.html
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Clock Select Algorithm</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<em></em>
+<h3>Clock Select Algorithm</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:22<!-- #EndDate -->
+ UTC</p>
+<hr>
+<p>The clock select algorithm determines from a set of sources , which are correct (<em>truechimers</em>) and which are not (<em>falsetickers</em>) according to a set of formal correctness assertions. The principles are based on the observation that the maximum error in determining the offset of a candidate cannot exceed one-half the roundtrip delay to the primary reference clock at the time of measurement. This must be increased by the maximum error that can accumulate since then. The selection metric, called the <em>root distance,</em>, is one-half the roundtrip root delay plus the root dispersion plus minor error contributions not considered here.</p>
+<p>First, a number of sanity checks is performed to sift the selectable candidate from among the source population. The sanity checks are sumarized as follows:.</p>
+<ol>
+ <li>A <em>stratum error</em> occurs if (1) the source had never been synchronized or (2) the stratum of the source is below the <tt>floor</tt> option or not below the <tt>ceiling</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. The default values for these options are 0 and 15, respectively. Note that 15 is a valid stratum, but a server operating at that stratum cannot synchronize clients.</li>
+ <li>A <em>distance error</em> occurs for a source if the root distance (also known ad synchronization distance) of the source is not below the distance threshold <tt>maxdist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. The default value for this option is 1.5 s for networks including only the Earth, but this should be increased to 2.5 s for networks including the Moon.</li>
+ <li>A <em>loop</em> <em>error</em> occurs if the source is synchronized to the client. This can occur if two peers are configured with each other in symmetric modes.</li>
+ <li>An <em>unreachable</em> <em>error</em> occurs if the source is unreachable or if the <tt>server</tt> or <tt>peer</tt> command for the source includes the <tt>noselect</tt> option.</li>
+</ol>
+Sources showing one or more of these errors are considered nonselectable; only the selectable candidates are considered in the following algorithm. Given the measured offset &theta;<sub>0</sub> and root distance &lambda;, this defines a <em>correctness interval</em> [&theta;<sub>0</sub> &minus; &lambda;, &theta;<sub>0</sub> + &lambda;] of points where the true value of &theta; lies somewhere on the interval. The given problem is to determine from a set of correctness intervals, which represent truechimers and which represent falsetickers. The principles must be given a precise definition. The <em>intersection interval</em> is the <em>smallest interval containing points from the largest number of correctness intervals.</em> An algorithm that finds the intersection interval was devised by Keith Marzullo in his doctoral dissertation. It was first implemented in the Digital Time Synchronization Service (DTSS) for the VMS operating system for the VAX.
+<p> While the NTP algorithm is based on DTSS, it remains to establish which point in the correctness interval represents the best estimate of the offset for each candidate. The best point is at the midpoint &theta;<sub>0</sub> of the correctness interval; however, the midpoint might not be within the intersection interval. A candidate with a correctness interval that contains points in the intersection interval is a truechimer and the best offset estimate is the midpoint of its correctness interval. A candidate with a correctness interval that contains no points in the intersection interval is a falseticker.</p>
+<div align="center"><img src="pic/flt3.gif" alt="gif">
+ <p>Figure 1. Intersection Interval</p>
+</div>
+<p>Figure 1 shows correctness intervals for each of four candidates A, B, C and D. We need to find the maximum number of candidates that contain points in common. The result is the interval labeled DTSS. In the figure there are three truechimers A, B and C, and one falseticker D. In DTSS any point in the intersection interval can represent the true time; however, as shown below, this may throw away valuable statistical information. In any case, the clock is considered correct if the number of truechimers found in this way are greater than half the total number of candidates.</p>
+<p>The question remains, which is the best point to represent the true time of each correctness interval? Fortunately, we already have the maximum likelihood estimate at the midpoint of each correctness interval. But, while the midpoint of candidate C is outside the intersection interval, its correctness interval contains points in common with the intersection interval, so the candidate is a truechimer and the midpoint is chosen to represent its time.</p>
+<p>The DTSS correctness assertions do not consider how best to represent the truechimer time. To support the midpoint choice, consider the selection algorithm as a method to reject correctness intervals that cannot contribute to the final outcome; that is, they are falsetickers. The remaining correctness intervals can contribute to the final outcome; that is, they are truechimers. Samples in the intersection interval are usually of very low probability and thus poor estimates for truechimer time. On the other hand, the midpoint sample produced by the clock filter algorithm is the maximum likelihood estimate and thus best represents the truechimer time.</p>
+<div align="center"><img src="pic/flt6.gif" alt="gif">
+ <p>Figure 2. Clock Select Algorithm</p>
+</div>
+<p> The algorithm operates as shown in Figure 2. Let <em>m</em> be the number of candidates and <em>f</em> the number of falsetickers, initially zero. Move a pointer from the leftmost endpoint towards the rightmost endpoint in Figure 1 and count the number of candidates, stopping when that number reaches <em>m</em> &minus; <em>f</em>; this is the left endpoint of the intersection interval. Then, do the same, but moving from the rightmost endpoint towards the leftmost endpoint; this is the right endpoint of the intersection interval. If the left endpoint is less than the right endpoint, the intersection interval has been found. Otherwise, increase <em>f</em> by 1. If <em>f</em> is less than <em>n</em> / 2, try again; otherwise, the algorithm fails and no truechimers could be found.</p>
+<p>The clock select algorithm again scans the correctness intervals. If the right endpoint of the correctness interval for a candidate is greater than the left endpoint of the intersection interval, or if the left endpoint of the correctness interval is less than the right endpoint of the intersection interval, the candidate is a truechimer; otherwise, it is a falseticker.</p>
+<p>In practice, with fast LANs and modern computers, the correctness interval can be quite small, especially when the candidates are multiple reference clocks. In such cases the intersection interval might be empty, due to insignificant differences in the reference clock offsets. To avoid this, the size of the correctness interval is padded to the value of <tt>mindist</tt>, with default 1 ms. This value can be changed using the <tt>mindist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/sitemap.html b/html/sitemap.html
new file mode 100644
index 0000000..c4b9110
--- /dev/null
+++ b/html/sitemap.html
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Site Map</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Site Map</h3>
+<img src="pic/alice15.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Alice in Wonderland</i>, Lewis Carroll</a>
+<p>Welcome to the tea party.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->11-Sep-2010 05:55<!-- #EndDate -->
+ UTC<br clear="left">
+</p>
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/install.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/manual.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/hand.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/command.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/config.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/refclock.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/audio.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/misc.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/special.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/external.txt"></script>
+<hr>
+<div align="center"> <img src="pic/tribeb.gif" alt="gif"></div>
+<br>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/sntp.html b/html/sntp.html
new file mode 100644
index 0000000..0c270cb
--- /dev/null
+++ b/html/sntp.html
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<title>sntp - Simple Network Time Protocol (SNTP) Client</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>sntp</tt> - Simple Network Time Protocol (SNTP) Client</h3>
+<img src="pic/dogsnake.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/~mills/pictures.html">from <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
+<p>S is for snakeoil.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->3-Oct-2011 21:51<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<hr>
+<h4>Synopsis</h4>
+<tt>sntp [{--help -?}][{-4 -6}][-a <i>keynum</i>][-b <i>bcaddress</i>][-B <i>bctimeout</i>][-c][-d][-D <i>debug-level</i>][-g <i>delay</i>][-K <i>kodfile</i>][-k <i>keyfile</i>][-l <i>logfile</i>][-M <i>steplimit</i>][-o <i>ntpver</i>][-r][-S][-s][-u <i>uctimeout</i>][--wait][--version][<i>address(es)</i>]</tt>
+<h4>Description</h4>
+<p>This program is a Simple Network Time Protocol (SNTP) client that can be used to query a Network Time Protocol (NTP) server and display the time offset of the system clock relative to the server clock. Run as root it can correct the system clock to this offset as well. It can be run as an interactive command or from a script by a <tt>cron</tt> job. The program implements the SNTP client protocol defined in RFC 5905, including the full on-wire protocol but does not provide the sanity checks, access controls, security functions and mitigation algorithms as in the full NTP version 4 specification, also defined in RFC 5905.</p>
+<p>By default, <tt>sntp</tt> writes the local date and time (i.e., not UTC) to the standard output in the format</p>
+<p><tt>2011-08-04 00:40:36.642222 (+0000) +0.006611 +/- 0.041061 psp-os1 149.20.68.26</tt></p>
+<p>where the <tt>+0.006611 +/- 0.041061</tt> indicates the time offset and error bound of the system clock relative to the server clock, in seconds.</p>
+<p>If -b <i>bcaddress</i> is not specified, the program sends a single message to each address and waits up to <i>uctimeout</i> (default 5) seconds for a unicast server response. Otherwise, it sends no message and waits up to <i>bctimeout</i> (default 68) seconds for a broadcast NTP message.</p>
+<h4>Options</h4>
+<p><tt>sntp</tt> recognizes the following options:</p>
+<dl>
+ <dt><tt>-?, --help</tt></dt>
+ <dd>displays usage information. The short form typically requires shell quoting, such as <tt>-\?</tt>, otherwise <tt>?</tt> is consumed by the shell.</dd>
+ <dt><tt>-4, --ipv4</tt></dt>
+ <dd>When resolving hostnames to IP addresses, use IPv4 addresses only.</dd>
+ <dt><tt>-6, --ipv6</tt></dt>
+ <dd>When resolving hostnames to IP addresses, use IPv6 addresses only.</dd>
+ <dt><tt>-a <i>keynum</i>, --authentication <i>keynum</i></tt></dt>
+ <dd>Enable authentication with the key ID <i>keynum</i>. <i>keynum</i> is a number specified in the keyfile along with an authentication secret (password or digest). See the <tt>-k, --keyfile</tt> option for more details.</dd>
+ <dt><tt>-b <i>bcaddress</i>, --broadcast <i>bcaddress</i></tt></dt>
+ <dd>Listen for NTP packets sent to the broadcast or multicast address <i>bcaddress</i>, which can be a DNS name or IP address. The default maximum time to listen for broadcasts/multicasts, 68 seconds, can be modified with the <tt>-B, --bctimeout</tt> option.</dd>
+ <dt><tt>-B <i>bctimeout</i>, --bctimeout <i>bctimeout</i></tt></dt>
+ <dd>Wait <i>bctimeout</i> seconds for broadcast or multicast NTP message before terminating. The default is 68 seconds, chosen because ntpd typically transmits broadcasts/multicasts every 64 seconds. Note that the short option is <tt>-B</tt>, an uppercase letter B.</dd>
+ <dt><tt>-c, --concurrent</tt></dt>
+ <dd>Concurrently query all addresses returned for hostname. Requests from an NTP client to a single server should never be sent more often than once every two seconds. By default, all addresses resolved from a single hostname are assumed to be for a single instance of ntpd, and therefore sntp will send queries to these addresses one after another, waiting two seconds between queries. This option indicates multiple addresses returned for a hostname are on different machines, so sntp can send concurrent queries. This is appropriate when using *.pool.ntp.org, for example.</dd>
+ <dt><tt>-d, --debug-level</tt></dt>
+ <dd>Increase debug verbosity level by one. May be specified multiple times. See also the <tt>-D, --set-debug-level</tt> option.</dd>
+ <dt><tt>-D <i>debug-level</i>, --set-debug-level <i>debug-level</i></tt></dt>
+ <dd>Set the debug verbosity level to <i>debug-level</i>. The default level is zero. Note that the short option is <tt>-D</tt>, an uppercase letter D. See also the <tt>-d, --debug-level</tt> option.</dd>
+ <dt><tt>-g <i>delay</i>, --gap <i>delay</i></tt></dt>
+ <dd>Specify the <i>delay</i> in milliseconds between outgoing queries, defaulting to 50. <tt>sntp</tt> sends queries to all provided hostnames/addresses in short succession, and by default terminates once the first valid response is received. With multiple time sources provided, all but one will not be used. To limit the number of queries whose responses will not be used, each query is separated from the preceding one by <i>delay</i> milliseconds, to allow time for responses to earlier queries to be received. A larger <i>delay</i> reduces the query load on the time sources, increasing the time to receive a valid response if the first source attempted is slow or unreachable.</dd>
+ <dt><tt>-K <i>kodfile</i>, --kod <i>kodfile</i></tt></dt>
+ <dd>Specifies the filename <i>kodfile</i> to be used for the persistent history of KoD (Kiss Of Death, or rate-limiting) responses received from servers. The default is <tt>/var/db/ntp-kod</tt>. Note that the short option is <tt>-K</tt>, an uppercase letter K.</dd>
+ <dt><tt>-k <i>keyfile</i>, --keyfile <i>keyfile</i></tt></dt>
+ <dd>Specifies the filename <i>keyfile</i> used with the <tt>-a</tt>/<tt>--authentication</tt> option. The format of the file is described on the <a href="keygen.html"><tt>ntp-keygen</tt> page</a>.</dd>
+ <dt><tt>-l <i>logfile</i>, --filelog <i>logfile</i></tt></dt>
+ <dd>Specifies the filename in which to append a copy of status messages, which also appear on the terminal.</dd>
+ <dt><tt>-M <i>steplimit</i>, --steplimit <i>steplimit</i></tt></dt>
+ <dd>If both <tt>-S</tt>/<tt>--step</tt> and <tt>-s</tt>/<tt>--slew</tt> options are provided, an offset of less than <i>steplimit</i> milliseconds will be corrected by slewing the clock using adjtime(), while an offset of <i>steplimit</i> or more will be corrected by setting the clock to the corrected time. Note that the short option is <tt>-M</tt>, an uppercase letter M.</dd>
+ <dt><tt>-o <i>ntpver</i>, --ntpversion <i>ntpver</i></tt></dt>
+ <dd>Specifies the NTP protocol version number <i>ntpver</i> to include in requests, default 4. This option is rarely useful.</dd>
+ <dt><tt>-r, --usereservedport</tt></dt>
+ <dd>By default, <tt>sntp</tt> uses a UDP source port number selected by the operating system. When this option is used, the reserved NTP port 123 is used, which most often requires <tt>sntp</tt> be invoked as the superuser (commonly "root"). This can help identify connectivity failures due to port-based firewalling which affect <tt>ntpd</tt>, which always uses source port 123.</dd>
+ <dt><tt>-S, --step</tt></dt>
+ <dd>By default, <tt>sntp</tt> displays the clock offset but does not attempt to correct it. This option enables offset correction by stepping, that is, directly setting the clock to the corrected time. This typically requires <tt>sntp</tt> be invoked as the superuser ("root"). Note that the short option is <tt>-S</tt>, an uppercase letter S.</dd>
+ <dt><tt>-s, --slew</tt></dt>
+ <dd>By default, <tt>sntp</tt> displays the clock offset but does not attempt to correct it. This option enables offset correction by slewing using adjtime(), which changes the rate of the clock for a period long enough to accomplish the required offset (phase) correction. This typically requires <tt>sntp</tt> be invoked as the superuser ("root").</dd>
+ <dt><tt>-u <i>uctimeout</i>, --uctimeout <i>uctimeout</i></tt></dt>
+ <dd>Specifies the maximum time <i>uctimeout</i> in seconds to wait for a unicast response before terminating.</dd>
+ <dt><tt>--wait</tt></dt>
+ <dd>When neither <tt>-S</tt>/<tt>--step</tt> nor <tt>-s</tt>/<tt>--slew</tt> options are provided, <tt>sntp</tt> will by default terminate after the first valid response is received. This option causes <tt>sntp</tt> to instead wait for all pending queries' responses.</dd>
+ <dt><tt>--version</tt></dt>
+ <dd>Display the <tt>sntp</tt> program's version number and the date and time it was compiled.</dd>
+</dl>
+<h4>Return Value</h4>
+<p>The program returns an exit status of zero for if a valid response is received and non-zero otherwise.</p>
+<h4>Author</h4>
+<p>This <tt>sntp</tt> was originally developed by Johannes Maximilian Kuehn. Harlan Stenn and Dave Hart modified it to query more than one server at a time. See the file <tt>ChangeLog</tt> in the distribution for details.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/stats.html b/html/stats.html
new file mode 100644
index 0000000..9438517
--- /dev/null
+++ b/html/stats.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>Performance Metrics</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>Performance Metrics</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:23<!-- #EndDate -->
+ UTC</p>
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/special.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/external.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">1. Introduction</a></li>
+ <li class="inline"><a href="#budget">2. Statistics Summary</a></li>
+ <li class="inline"><a href="#quality">3. Quality of Service</a></li>
+</ul>
+<hr>
+<h4 id="intro">1. Introduction</h4>
+
+<p>This page describes several statistics provided in the NTP specification and reference implementation and how they determine the accuracy and error measured during routine and exceptional operation. These statistics provide the following information.</p>
+<ul>
+ <li>Nominal estimate of the server clock time relative to the client clock time. This is called <em>clock offset</em> symbolized by the Greek letter &theta;.</li>
+ <li>Roundtrip system and network delay measured by the on-wire protocol. This is call <em>roundtrip delay</em> symbolized by the Greek letter &delta;.</li>
+ <li>Potential clock offset error due to the maximum uncorrected system clock frequency error. This is called <em>dispersion</em> symbolized by the Greek letter &epsilon;.</li>
+ <li>Expected error, consisting of the root mean square (RMS) nominal clock offset sample differencess in a sliding window of several samples. This is called <em>jitter</em> symbolized by the Greek letter &phi;.</li>
+</ul>
+<p> Figure 1 shows how the various measured statistics are collected and compiled to calibrate NTP performance.</p>
+<div align="center">
+<img src="pic/stats.gif" alt="gif">
+<p>Figure 1. Statistics Budget</p>
+</div>
+<p>The data represented in boxes labeled Server are contained in fields in packet received from the server. The data represented in boxes labeled Peer are computed by the on-wire protocol, as described below. The algorithms of the box labeled Selection and Combining Algorithms process the peer data to select a system peer. The System box represents summary data inherited from the system peer. These data are available to application programs and dependent downstream clients.</p>
+<h4 id="budget">2. Statistics Summary</h4>
+<p>Each NTP synchronization source is characterized by the offset &theta; and delay &delta; samples measured by the on-wire protocol, as described on the <a href="warp.html">How NTP Works</a> page. In addition, the dispersion &epsilon; sample is initialized with the sum of the source precision &rho;<sub>R</sub> and the client precision &rho; (not shown) as each source packet is received. The dispersion increases at a rate of 15 &mu;s/s after that. For this purpose, the precision is equal to the latency to read the system clock. The offset, delay and dispersion are called the sample statistics.</p>
+<blockquote>
+ <p>Note. In very fast networks where the client clock frequency is not within 1 PPM or so of the the server clock frequency, the roundtrip delay may have small negative values. This is usually a temporary condition when the client is first started. When using the roundtrip delay in calculations, negative values are assumed zero.</p>
+</blockquote>
+<p> In a window of eight (offset, delay, dispersion) samples, the algorithm described on the <a href="filter.html">Clock Filter Algorithm</a> page selects the sample with minimum delay, which generally represents the most accurate offset statistic. The selected offset sample determines the <em>peer offset</em> and <em>peer delay </em>statistics. The <em>peer dispersion</em> is a weighted average of the dispersion samples in the window. These quantities are recalculated as each update is received from the source. Between updates, both the sample dispersion and peer dispersion continue to grow at the same rate, 15 &mu;s/s. Finally, the <em>peer jitter</em> &phi; is determined as the RMS differences between the offset samples in the window relative to the selected offset sample. The peer statistics are recorded by the <tt>peerstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. Peer variables are displayed by the <tt>rv</tt> command of the <a href="ntpq.html#peer"><tt>ntpq</tt></a> program.</p>
+<p> The clock filter algorithm continues to process updates in this way until the source is no longer reachable. Reachability is determined by an eight-bit shift register, which is shifted left by one bit as each poll packet is sent, with 0 replacing the vacated rightmost bit. Each time a valid update is received, the rightmost bit is set to 1. The source is considered reachable if any bit is set to 1 in the register; otherwise, it is considered unreachable. When a source becomes unreachable, a dummy sample with &quot;infinite&quot; dispersion is inserted in the filter window at each poll, thus displacing old samples. This causes the peer dispersion to increase eventually to infinity.</p>
+<p>The composition of the source population and the system peer selection is redetermined as each update from each source is received. The system peer and system variables are determined as described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The system variables &Theta;, &Delta;, &Epsilon; and &Phi; are updated from the system peer variables of the same name and the system stratum set one greater than the system peer stratum. The system statistics are recorded by the <tt>loopstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. System variables are displayed by the <tt>rv</tt> command of the <a href="ntpq.html#system"><tt>ntpq</tt></a> program.</p>
+<p>Although it might seem counterintuitive, a cardinal rule in the selection process is, once a sample has been selected by the clock filter algorithm, older samples are no longer selectable. This applies also to the clock select algorithm. Once the peer variables for a source have been selected, older variables of the same or other sources are no longer selectable. The reason for these rules is to limit the time delay in the clock discipline algorithm. This is necessary to preserve the optimum impulse response and thus the risetime and overshoot.</p>
+<p>This means that not every sample can be used to update the peer variables, and up to seven samples can be ignored between selected samples. This fact has been carefully considered in the discipline algorithm design with due consideration for feedback loop delay and minimum sampling rate. In engineering terms, even if only one sample in eight survives, the resulting sample rate is twice the Nyquist rate at any time constant and poll interval.</p>
+<h4 id="quality">3. Quality of Service</h4>
+<p>This section discusses how an NTP client determines the system performance using a peer population including reference clocks and remote servers. This is determined for each peer from two statistics, <em>peer jitter</em> and <em>root distance.</em> Peer jitter is determined from various jitter components as described above. It represents the expected error in determining the clock offset estimate. Root distance represents the maximum error of the estimate due to all causes.</p>
+<p>The root distance statistic is computed as one-half the <em> root delay</em> of the primary source of time; i.e., the reference clock, plus the <em> root dispersion</em> of that source. The root variables are included in the NTP packet header received from each source. At each update the root delay is recomputed as the sum of the root delay in the packet plus the peer delay, while the root dispersion is recomputed as the sum of the root dispersion in the packet plus the peer dispersion.</p>
+<blockquote>
+ <p>Note. In order to avoid timing loops, the root distance is adjusted to the maximum of the above computation and a <em>minimum threshold.</em> The minimum threshold defaults to 1 ms, but can be changed according to client preference using the <tt>mindist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command.</p>
+</blockquote>
+<p>A source is considered selectable only if its root distance is less than the <em>select threshold</em>, by default 1.5 s, but can be changed according to client preference using the <tt>maxdist</tt> option of the <a href="miscopt.html#tos"><tt>tos</tt></a> command. When an upstream server loses all sources, its root distance apparent to dependent clients continues to increase. The clients are not aware of this condition and continue to accept synchronization as long as the root distance is less than the select threshold.</p>
+<p>The root distance statistic is used by the select, cluster and mitigation algorithms. In this respect, it is sometimes called the <em>synchronization distance</em> often shortened simply to <em>distance</em>. The root distance is also used in the following ways.</p>
+<ul>
+ <li>Root distance defines the maximum error of the clock offset estimate due to all causes as long as the source remains reachable..</li>
+ <li>Root distance defines the upper and lower limits of the correctness interval. This interval represents the maximum clock offset for each of possibly several sources. The clock select algorithm computes the intersection of the correctness intervals to determine the truechimers from the selectable source population.</li>
+ <li>Root distance is used by the clock cluster algorithm as a weight factor when pruning outlyers from the truechimer population.</li>
+ <li>The (normalized) reciprocal of the root distance is used as a weight factor by the combine algorithm when computing the system clock offset and system jitter.</li>
+ <li>Root distance is used by the mitigation algorithm to select the system peer from among the cluster algorithm survivors.</li>
+</ul>
+<p>The root distance thus functions as a metric in the selection and weighting of the various available sources. The strategy is to select the system peer as the source with the minimum root distance and thus the minimum maximum error. The reference implementation uses the Bellman-Ford algorithm described in the literature, where the goal is to minimize the root distance. The algorithm selects the <em>system peer</em>, from which the system root delay and system root dispersion are inherited.</p>
+<p>The algorithms described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page deliver several important statistics. The <em>system offset</em> and <em>system jitter</em> are weighted averages computed by the clock combine algorithm. System offset is best interpreted as the maximum-likelihood estimate of the system clock offset, while system jitter, also called estimated error, is best interpreted as the expected error of this estimate. <em>System delay</em> is the root delay inherited from the system peer, while <em>s</em><em>ystem dispersion</em> is the root dispersion plus contributions due to jitter and the absolute value of the system offset.</p>
+<p>The maximum system error, or <em>system distance</em>, is computed as one-half the system delay plus the system dispersion. In order to simplify discussion, certain minor contributions to the maximum error statistic are ignored. If the precision time kernel support is available, both the estimated error and maximum error are reported to user programs via the <tt>ntp_adjtime()</tt> kernel system call. See the <a href="kern.html">Kernel Model for Precision Timekeeping</a> page for further information.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/tickadj.html b/html/tickadj.html
new file mode 100644
index 0000000..3c38f84
--- /dev/null
+++ b/html/tickadj.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>tickadj - set time-related kernel variables</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3><tt>tickadj</tt> - set time-related kernel variables</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:24<!-- #EndDate -->
+ UTC</p>
+<hr>
+<h4>Synopsis</h4>
+<tt>tickadj [ -Aqs ] [ -a <i>tickadj</i> ] [ -t <i>tick</i> ]</tt>
+<h4>Description</h4>
+<p>The <tt>tickadj</tt> program reads, and optionally modifies, several timekeeping-related variables in older kernels that do not have support for precision timekeeping, including HP-UX, SunOS, Ultrix, SGI and probably others. Those machines provide means to patch the kernel <tt>/dev/kmem</tt>. Newer machines with kernel time support, including Solaris, Tru64, FreeBSD and Linux, should NOT use the program, even if it appears to work, as it will destabilize the kernel time support. Use the <a href="ntptime.html"><tt>ntptime</tt></a> program instead.</p>
+<p>The particular variables that can be changed with <tt>tickadj</tt> include <tt>tick</tt>, which is the number of microseconds added to the system time for a clock interrupt, <tt>tickadj</tt>, which sets the slew rate and resolution used by the <tt>adjtime</tt> system call, and <tt>dosynctodr</tt>, which indicates to the kernels on some machines whether they should internally adjust the system clock to keep it in line with time-of-day clock or not.</p>
+<p>By default, with no arguments, <tt>tickadj</tt> reads the variables of interest in the kernel and displays them. At the same time, it determines an &quot;optimal&quot; value for the value of the <tt>tickadj</tt> variable if the intent is to run the <tt>ntpd</tt> Network Time Protocol (NTP) daemon, and prints this as well. Since the operation of <tt>tickadj</tt> when reading the kernel mimics the operation of similar parts of the <tt>ntpd</tt> program fairly closely, this can be useful when debugging problems with <tt>ntpd</tt>.</p>
+<p>Note that <tt>tickadj</tt> should be run with some caution when being used for the first time on different types of machines. The operations which <tt>tickadj</tt> tries to perform are not guaranteed to work on all Unix machines and may in rare cases cause the kernel to crash.</p>
+<h4>Command Line Options</h4>
+<dl>
+ <dt><tt>-a <i>tickadj</i></tt></dt>
+ <dd>Set the kernel variable <tt>tickadj</tt> to the value <i><tt>tickadj specified.</tt></i></dd>
+ <dt><tt>-A</tt></dt>
+ <dd>Set the kernel variable <tt>tickadj</tt> to an internally computed &quot;optimal&quot; value.</dd>
+ <dt><tt>-t <i>tick</i></tt></dt>
+ <dd>Set the kernel variable <tt>tick</tt> to the value <i><tt>tick</tt></i> specified.</dd>
+ <dt><tt>-s</tt></dt>
+ <dd>Set the kernel variable <tt>dosynctodr</tt> to zero, which disables the hardware time-of-year clock, a prerequisite for running the <tt>ntpd</tt> daemon under SunOS 4.x.</dd>
+ <dt><tt>-q</tt></dt>
+ <dd>Normally, <tt>tickadj</tt> is quite verbose about what it is doing. The <tt>-q</tt> flag tells it to shut up about everything except errors.</dd>
+</dl>
+<h4>Files</h4>
+<tt>/vmunix<br>
+/unix<br>
+/dev/kmem<br>
+</tt>
+<h4>Bugs</h4>
+Fiddling with kernel variables at run time as a part of ordinary operations is a hideous practice which is only necessary to make up for deficiencies in the implementation of <tt>adjtime</tt> in many kernels and/or brokenness of the system clock in some vendors' kernels. It would be much better if the kernels were fixed and the <tt>tickadj</tt> program went away.
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/warp.html b/html/warp.html
new file mode 100644
index 0000000..1d42dd6
--- /dev/null
+++ b/html/warp.html
@@ -0,0 +1,60 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>How NTP Works</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>How NTP Works</h3>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:24<!-- #EndDate -->
+ UTC</p>
+<h4>Related Links</h4>
+<script type="text/javascript" language="javascript" src="scripts/special.txt"></script>
+<script type="text/javascript" language="javascript" src="scripts/external.txt"></script>
+<h4>Table of Contents</h4>
+<ul>
+ <li class="inline"><a href="#intro">1. Introduction and Overview</a></li>
+ <li class="inline"><a href="#scale">2. NTP Timescale and Data Formats</a></li>
+ <li class="inline"><a href="#arch">3. Architecture and Algorithms</a></li>
+</ul>
+<hr>
+<h4 align="center">Abstract</h4>
+<blockquote>
+ <p align="left"> This page and its dependencies contain a technical description of the Network Time Protocol (NTP) architecture and operation. It is intended for administrators, operators and monitoring personnel. Additional information for nontechnical readers can be found in the white paper <a href="http://www.eecis.udel.edu/~mills/exec.html">Executive Summary: Computer Network Time Synchronization</a>. While this page and its dependencies are primarily concerned with NTP, additional information on related protocols can be found in the white papers <a href="http://www.eecis.udel.edu/~mills/ptp.html">IEEE 1588 Precision Time Protocol (PTP)</a> and <a href="http://www.eecis.udel.edu/~mills/proximity.html">Time Synchronization for Space Data Links</a>. Note that reference to a page in this document collection is to a page in the collection, while reference to a <em>white paper</em> is to a document at the <a href="http://www.eecis.udel.edu/~mills/ntp.html">Network Time Synchronization Research Project</a> web site.</p>
+</blockquote>
+<h4 id="intro">1. Introduction and Overview</h4>
+
+<p>NTP time synchronization services are widely available in the public Internet. The public NTP subnet currently includes several thousand servers in most countries and on every continent of the globe, including Antarctica, and sometimes in space and on the sea floor. These servers support, directly or indirectly, a total population estimated at over 25 million computers in the global Internet.</p>
+<p> The NTP subnet operates with a hierarchy of levels, where each level is assigned a number called the stratum. Stratum 1 (primary) servers at the lowest level are directly synchronized to national time services via satellite, radio or telephone modem. Stratum 2 (secondary) servers at the next higher level are synchronized to stratum 1 servers and so on. Normally, NTP clients and servers with a relatively small number of clients do not synchronize to public primary servers. There are several hundred public secondary servers operating at higher strata and are the preferred choice.</p>
+<p>This page presents an overview of the NTP implementation included in this software distribution. We refer to this implementation as the <em>reference implementation</em> only because it was used to test and validate the NTPv4 specification RFC-5905. It is best read in conjunction with the briefings and white papers on the <a href="http://www.eecis.udel.edu/~mills/ntp.html">Network Time Synchronization Research Project</a> page. An executive summary suitable for management and planning purposes is in the white paper <a href="http://www.eecis.udel.edu/~mills/exec.html">Executive Summary: Computer Network Time Synchronization</a>.</p>
+<h4 id="scale">2. NTP Timescale and Data Formats</h4>
+<p>NTP clients and servers synchronize to the Coordinated Universal Time (UTC) timescale used by national laboratories and disseminated by radio, satellite and telephone modem. This is a global timescale independent of geographic position. There are no provisions to correct for local time zone or daylight savings time; however, these functions can be performed by the operating system on a per-user basis.</p>
+<p> The UT1 timescale, upon which UTC is based, is determined by the rotation of the Earth about its axis. The Earth rotation is gradually slowing down relative to International Atomic Time (TAI). In order to rationalize UTC with respect to TAI, a leap second is inserted at intervals of about 18 months, as determined by the International Earth Rotation Service (IERS). Reckoning with leap seconds in the NTP timescale is described in the white paper <a href="http://www.eecis.udel.edu/~mills/leap.html">The NTP Timescale and Leap Seconds</a>.</p>
+<p>The historic insertions are documented in the <tt>leap-seconds.list</tt> file, which can be downloaded from the NIST FTP servers. This file is updated at intervals not exceeding six months. Leap second warnings are disseminated by the national laboratories in the broadcast timecode format. These warnings are propagated from the NTP primary servers via other server to the clients by the NTP on-wire protocol. The leap second is implemented by the operating system kernel, as described in the white paper <a href="http://www.eecis.udel.edu/~mills/leap.html">The NTP Timescale and Leap Seconds</a>. Implementation details are described on the <a href="leap.html">Leap Second Processing</a> page.</p>
+<div align="center">
+<img src="pic/time1.gif" alt="gif">
+<p>Figure 1. NTP Data Formats</p>
+</div>
+<p>Figure 1 shows two NTP time formats, a 64-bit <em>timestamp</em> format and a 128-bit <em>datestamp</em> format. The datestamp format is used internally, while the timestamp format is used in packet headers exchanged between clients and servers. The timestamp format spans 136 years, called an <em>era</em>. The current era began on 1 January 1900, while the next one begins in 2036. Details on these formats and conversions between them are in the white paper <a href="http://www.eecis.udel.edu/~mills/y2k.html">The NTP Era and Era Numbering</a>. However, the NTP protocol will synchronize correctly, regardless of era, as long as the system clock is set initially within 68 years of the correct time. Further discussion on this issue is in the white paper <a href="http://www.eecis.udel.edu/~mills/time.html">NTP Timestamp Calculations</a>. Ordinarily, these formats are not seen by application programs, which convert these NTP formats to native Unix or Windows formats.</p>
+<h4 id="arch">3. Architecture and Algorithms</h4>
+<div align="center">
+ <p><img src="pic/fig_3_1.gif" alt="gif"></p>
+ <p>Figure 2. NTP Daemon Processes and Algorithms</p>
+</div>
+<p>The overall organization of the NTP architecture is shown in Figure 2. It is useful in this context to consider the implementation as both a client of upstream (lower stratum) servers and as a server for downstream (higher stratum) clients. It includes a pair of peer/poll processes for each reference clock or remote server used as a synchronization source. Packets are exchanged between the client and server using the <em>on-wire protocol</em> described in the white paper <a href="http://www.eecis.udel.edu/~mills/onwire.html">Analysis and Simulation of the NTP On-Wire Protocols</a>. The protocol is resistant to lost, replayed or spoofed packets.</p>
+<p> The poll process sends NTP packets at intervals ranging from 8 s to 36 hr. The intervals are managed as described on the <a href="poll.html">Poll Process</a> page to maximize accuracy while minimizing network load. The peer process receives NTP packets and performs the packet sanity tests described on the <a href="decode.html">Event Messages and Status Words</a> page and <a href="decode.html#flash">flash status word</a>. The flash status word reports in addition the results of various access control and security checks described in the white paper <a href="http://www.eecis.udel.edu/~mills/security.html">NTP Security Analysis</a>. A sophisticated traffic monitoring facility described on the <a href="rate.html">Rate Management and the Kiss-o'-Death Packet</a> page protects against denial-of-service (DoS) attacks.</p>
+<p>Packets that fail one or more of these tests are summarily discarded. Otherwise, the peer process runs the on-wire protocol that uses four raw timestamps: the <em>origin timestamp</em> <em>T</em><sub>1</sub> upon departure of the client request, the <em>receive timestamp</em> <em>T</em><sub>2</sub> upon arrival at the server, the <em>transmit timestamp</em> <em>T</em><sub>3</sub> upon departure of the server reply, and the <em>destination timestamp</em> <em>T</em><sub>4</sub> upon arrival at the client. These timestamps, which are recorded by the <tt>rawstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command, are used to calculate the clock offset and roundtrip delay samples:</p>
+<div align="center">
+ <p>offset = [(<em>T</em><sub>2</sub> -<em> T</em><sub>1</sub>) + (<em>T</em><sub>3</sub> - <em>T</em><sub>4</sub>)] / 2,<br>
+ delay = (<em>T</em><sub>4</sub> - <em>T</em><sub>1</sub>) - (<em>T</em><sub>3</sub> - <em>T</em><sub>2</sub>).</p>
+</div>
+<p>In this description the transmit timestamps <em>T</em><sub>1</sub> and <em>T</em><sub>3</sub> are <em>softstamps</em> measured by the inline code. Softstamps are subject to various queuing and processing delays. A more accurate measurement uses <em>drivestamps</em>, as described on the <a href="xleave.html">NTP Interleaved Modes</a> page. These issues along with mathematical models are discussed in the white paper <a href="http://www.eecis.udel.edu/~mills/time.html">NTP Timestamp Calculations</a>.</p>
+<p>The offset and delay statistics for one or more peer processes are processed by a suite of mitigation algorithms. The algorithm described on the <a href="filter.html">Clock Filter Algorithm</a> page selects the offset and delay samples most likely to produce accurate results. Those servers that have passed the sanity tests are declared <em>selectable</em>. From the selectable population the statistics are used by the algorithm described on the <a href="select.html">Clock Select Algorithm</a> page to determine a number of <em>truechimers</em> according to Byzantine agreement and correctness principles. From the truechimer population the algorithm described on the <a href="cluster.html">Clock Cluster Algorithm</a> page determines a number of <em>survivors</em> on the basis of statistical clustering principles.</p>
+<p> The algorithms described on the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page combine the survivor offsets, designate one of them as the <em>system peer</em> and produces the final offset used by the algorithm described on the <a href="discipline.html">Clock Discipline Algorithm</a> page to adjust the system clock time and frequency. The clock offset and frequency, are recorded by the <tt>loopstats</tt> option of the <a href="monopt.html#filegen"><tt>filegen</tt></a> command. For additional details about these algorithms, see the Architecture Briefing on the <a href="http://www.eecis.udel.edu/~mills/ntp.html">Network Time Synchronization Research Project</a> page. For additional information on statistacl principles and performance metrics, see the <a href="stats.html">Performance Metrics</a> page.</p>
+<hr>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>
diff --git a/html/xleave.html b/html/xleave.html
new file mode 100644
index 0000000..417185c
--- /dev/null
+++ b/html/xleave.html
@@ -0,0 +1,30 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
+<meta name="generator" content="HTML Tidy, see www.w3.org">
+<title>NTP Interleaved Modes</title>
+<link href="scripts/style.css" type="text/css" rel="stylesheet">
+</head>
+<body>
+<h3>NTP Interleaved Modes </h3>
+<img src="pic/pogo4.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
+<p>You need a little magic.</p>
+<p>Last update:
+ <!-- #BeginDate format:En2m -->10-Mar-2014 05:25<!-- #EndDate -->
+ UTC</p>
+<br clear="left">
+<hr>
+<p>In the protocol described in the NTP specification and reference implementation up to now, the transmit timestamp, which is captured before the message digest is computed and the packet queued for output, is properly called as a <em>softstamp</em> The receive timestamp, which is captured after the input driver interrupt routine and before the packet is queued for input, is properly called a <em>drivestamp</em>. For enhanced accuracy it is desirable to capture the transmit timestamp as close to the wire as possible; for example, after the output driver interrupt routine.</p>
+<p> In other words, we would like to replace the transmit softstamp with a drivestamp, but the problem is the transmit drivestamp is available only after the packet has been sent. A solution for this problem is the two-step or interleaved protocol described on this page and included in the the current reference implementation. In interleaved modes the transmit drivestamp for one packet is actually carried in the immediately following packet. The trick, however, is to implement the interleaved protocol without changing the NTP packet header format, without compromising backwards compatibility and without compromising the error recovery properties.</p>
+<p> The reference implementation captures a softstamp before the message digest routine and a drivestamp after the output interrupt routine. In this design the latter timestamp can be considered most accurate, as it avoids the various queuing and transmission latencies. The difference between the two timestamps, which is called the interleaved or output delay, varies from 16 &mu;s for a dual-core Pentium running FreeBSD 6.1 to 1100 &mu;s for a Sun Blade 1500 running Solaris 10.</p>
+<p>Interleaved mode can be used only in NTP symmetric and broadcast modes.
+ It is activated by the <tt>xleave</tt> option with the <tt>peer</tt> or <tt>broadcast</tt> configuration
+commands. A broadcast server configured for interleaved mode is transparent to ordinary broadcast clients, so both ordinary and interleaved broadcast clients can use the same packets. An interleaved symmetric active peer automatically switches to ordinary symmetric mode if the other peer is not capable of operation in interleaved mode. </p>
+<p>As demonstrated in the white paper <a href="http://www.eecis.udel.edu/~mills/onwire.html">Analysis and Simulation of the NTP On-Wire Protocols</a>, the interleaved modes have the same resistance to lost packets, duplicate packets, packets crossed in flight and protocol restarts as the ordinary modes. An application of the interleaved symmetric mode in space missions is presented in the white paper <a href="http://www.eecis.udel.edu/~mills/proximity.html">Time Synchronization for Space Data Links</a>.</p>
+<hr>
+<div align="center"> <img src="pic/pogo1a.gif" alt="gif"> </div>
+<br>
+<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
+</body>
+</html>