MFV ntp 4.2.8p1 (r258945, r275970, r276091, r276092, r276093, r278284)

Thanks to roberto for providing pointers to wedge this into HEAD.

Approved by:	roberto
This commit is contained in:
Cy Schubert 2015-03-30 13:30:15 +00:00
commit 2b15cb3d09
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=280849
1662 changed files with 678357 additions and 159503 deletions

View file

@ -2,18 +2,18 @@ This file is automatically generated from html/copyright.html
Copyright Notice
jpg "Clone me," says Dolly sheepishly
jpg "Clone me," says Dolly sheepishly.
Last update: 20:31 UTC Saturday, January 06, 2007
Last update: 17-Jan-2015 00:16 UTC
_________________________________________________________________
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.
specifically declared otherwise in an individual file, this entire
notice applies as if the text was explicitly included in the file.
***********************************************************************
* *
* Copyright (c) David L. Mills 1992-2009 *
* Copyright (c) University of Delaware 1992-2015 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose with or without fee is hereby *
@ -27,150 +27,203 @@ This file is automatically generated from html/copyright.html
* purpose. It is provided "as is" without express or implied *
* warranty. *
* *
***********************************************************************
Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin
Burnicki is:
***********************************************************************
* *
* Copyright (c) Network Time Foundation 2011-2015 *
* *
* All Rights Reserved *
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions *
* are met: *
* 1. Redistributions of source code must retain the above copyright *
* notice, this list of conditions and the following disclaimer. *
* 2. Redistributions in binary form must reproduce the above *
* copyright notice, this list of conditions and the following *
* disclaimer in the documentation and/or other materials provided *
* with the distribution. *
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS *
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE *
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR *
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
***********************************************************************
The following individuals contributed in part to the Network Time
Protocol Distribution Version 4 and are acknowledged as authors of
this work.
1. [1]Mark Andrews <mark_andrews@isc.org> Leitch atomic clock
1. [1]Takao Abe <takao_abe@xurb.jp> Clock driver for JJY receivers
2. [2]Mark Andrews <mark_andrews@isc.org> Leitch atomic clock
controller
2. [2]Bernd Altmeier <altmeier@atlsoft.de> hopf Elektronik serial
3. [3]Bernd Altmeier <altmeier@atlsoft.de> hopf Elektronik serial
line and PCI-bus devices
3. [3]Viraj Bais <vbais@mailman1.intel.com> and [4]Clayton Kirkwood
4. [4]Viraj Bais <vbais@mailman1.intel.com> and [5]Clayton Kirkwood
<kirkwood@striderfm.intel.com> port to WindowsNT 3.5
4. [5]Michael Barone <michael,barone@lmco.com> GPSVME fixes
5. [6]Jean-Francois Boudreault
<Jean-Francois.Boudreault@viagenie.qc.ca>IPv6 support
5. [6]Michael Barone <michael,barone@lmco.com> GPSVME fixes
6. [7]Karl Berry <karl@owl.HQ.ileaf.com> syslog to file option
7. [8]Greg Brackley <greg.brackley@bigfoot.com> Major rework of WINNT
port. Clean up recvbuf and iosignal code into separate modules.
8. [9]Marc Brett <Marc.Brett@westgeo.com> Magnavox GPS clock driver
9. [10]Piete Brooks <Piete.Brooks@cl.cam.ac.uk> MSF clock driver,
Trimble PARSE support
10. [11]Reg Clemens <reg@dwf.com> Oncore driver (Current maintainer)
11. [12]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
12. [13]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and
10. [11]Nelson B Bolyard <nelson@bolyard.me> update and complete
broadcast and crypto features in sntp
11. [12]Jean-Francois Boudreault
<Jean-Francois.Boudreault@viagenie.qc.ca> IPv6 support
12. [13]Reg Clemens <reg@dwf.com> Oncore driver (Current maintainer)
13. [14]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
14. [15]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and
help with target configuration
13. [14]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
15. [16]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
clock driver, NT adj. residuals, integrated Greg's Winnt port.
14. [15]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
15. [16]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux
16. [17]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
17. [18]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux
port
16. [17]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
18. [19]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
NTP Version 2 as specified in RFC-1119
17. [18]John Hay <jhay@@icomtek.csir.co.za> IPv6 support and testing
18. [19]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
19. [20]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
20. [21]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
21. [22]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
19. [20]John Hay <jhay@icomtek.csir.co.za> IPv6 support and testing
20. [21]Dave Hart <davehart@davehart.com> General maintenance, Windows
port interpolation rewrite
21. [22]Claas Hilbrecht <neoclock4x@linum.com> NeoClock4X clock driver
22. [23]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
23. [24]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
24. [25]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
25. [26]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
overhaul
22. [23]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
[24]<H.Lambermont@chello.nl> ntpsweep
23. [25]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
26. [27]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
[28]<H.Lambermont@chello.nl> ntpsweep
27. [29]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
author)
24. [26]Frank Kardel [27]<kardel (at) ntp (dot) org> PARSE <GENERIC>
driver (>14 reference clocks), STREAMS modules for PARSE, support
28. [30]Frank Kardel [31]<kardel (at) ntp (dot) org> PARSE <GENERIC>
(driver 14 reference clocks), STREAMS modules for PARSE, support
scripts, syslog cleanup, dynamic interface handling
25. [28]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
29. [32]Johannes Maximilian Kuehn <kuehn@ntp.org> Rewrote sntp to
comply with NTPv4 specification, ntpq saveconfig
30. [33]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
modifications, HPUX modifications
26. [29]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
27. [30]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
31. [34]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
32. [35]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
GPS clock driver
28. [31]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
29. [32]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
30. [33]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
33. [36]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
34. [37]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
35. [38]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
code for Version 3 as specified in RFC-1305
31. [34]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
36. [39]Danny Mayer <mayer@ntp.org>Network I/O, Windows Port, Code
Maintenance
32. [35]David L. Mills <mills@udel.edu> Version 4 foundation: clock
discipline, authentication, precision kernel; clock drivers:
Spectracom, Austron, Arbiter, Heath, ATOM, ACTS, KSI/Odetics;
audio clock drivers: CHU, WWV/H, IRIG
33. [36]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
34. [37]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
35. [38]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
36. [39]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
37. [40]Derek Mulcahy <derek@toybox.demon.co.uk> and [41]Damon
37. [40]David L. Mills <mills@udel.edu> Version 4 foundation,
precision kernel; clock drivers: 1, 3, 4, 6, 7, 11, 13, 18, 19,
22, 36
38. [41]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
39. [42]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
40. [43]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
41. [44]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
42. [45]Derek Mulcahy <derek@toybox.demon.co.uk> and [46]Damon
Hart-Davis <d@hd.org> ARCRON MSF clock driver
38. [42]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
43. [47]Rob Neal <neal@ntp.org> Bancomm refclock and config/parse code
maintenance
44. [48]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
monitoring/trap scripts, statistics file handling
39. [43]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
40. [44]Wilfredo Sánchez <wsanchez@apple.com> added support for
45. [49]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
46. [50]Wilfredo Sánchez <wsanchez@apple.com> added support for
NetInfo
41. [45]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
42. [46]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
47. [51]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
48. [52]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
space on the stuff in the html/pic/ subdirectory
43. [47]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
44. [48]Michael Shields <shields@tembel.org> USNO clock driver
45. [49]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
49. [53]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
50. [54]Michael Shields <shields@tembel.org> USNO clock driver
51. [55]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
driver
46. [50]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
52. [56]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog)
47. [51]Kenneth Stone <ken@sdd.hp.com> HP-UX port
48. [52]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
53. [57]Kenneth Stone <ken@sdd.hp.com> HP-UX port
54. [58]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
support
49. [53]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
55. [59]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
driver
50. [54]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
56. [60]Brian Utterback <brian.utterback@oracle.com> General codebase,
Solaris issues
57. [61]Loganaden Velvindron <loganaden@gmail.com> Sandboxing
(libseccomp) support
58. [62]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
TrueTime clock driver
51. [55]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
59. [63]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
validated HTML documents according to the HTML DTD
_________________________________________________________________
References
1. mailto:%20mark_andrews@isc.org
2. mailto:%20altmeier@atlsoft.de
3. mailto:%20vbais@mailman1.intel.co
4. mailto:%20kirkwood@striderfm.intel.com
5. mailto:%20michael.barone@lmco.com
6. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca
1. mailto:%20takao_abe@xurb.jp
2. mailto:%20mark_andrews@isc.org
3. mailto:%20altmeier@atlsoft.de
4. mailto:%20vbais@mailman1.intel.co
5. mailto:%20kirkwood@striderfm.intel.com
6. mailto:%20michael.barone@lmco.com
7. mailto:%20karl@owl.HQ.ileaf.com
8. mailto:%20greg.brackley@bigfoot.com
9. mailto:%20Marc.Brett@westgeo.com
10. mailto:%20Piete.Brooks@cl.cam.ac.uk
11. mailto:%20reg@dwf.com
12. mailto:%20clift@ml.csiro.au
13. mailto:casey@csc.co.za
14. mailto:%20Sven_Dietrich@trimble.COM
15. mailto:%20dundas@salt.jpl.nasa.gov
16. mailto:%20duwe@immd4.informatik.uni-erlangen.de
17. mailto:%20dennis@mrbill.canet.ca
18. mailto:%20jhay@icomtek.csir.co.za
19. mailto:%20glenn@herald.usask.ca
20. mailto:%20iglesias@uci.edu
21. mailto:%20jagubox.gsfc.nasa.gov
22. mailto:%20jbj@chatham.usdesign.com
23. mailto:Hans.Lambermont@nl.origin-it.com
24. mailto:H.Lambermont@chello.nl
25. mailto:%20phk@FreeBSD.ORG
26. http://www4.informatik.uni-erlangen.de/%7ekardel
27. mailto:%20kardel(at)ntp(dot)org
28. mailto:%20jones@hermes.chpc.utexas.edu
29. mailto:%20dkatz@cisco.com
30. mailto:%20leres@ee.lbl.gov
31. mailto:%20lindholm@ucs.ubc.ca
32. mailto:%20louie@ni.umd.edu
33. mailto:%20thorinn@diku.dk
34. mailto:%20mayer@ntp.org
35. mailto:%20mills@udel.edu
36. mailto:%20moeller@gwdgv1.dnet.gwdg.de
37. mailto:%20mogul@pa.dec.com
38. mailto:%20tmoore@fievel.daytonoh.ncr.com
39. mailto:%20kamal@whence.com
40. mailto:%20derek@toybox.demon.co.uk
41. mailto:%20d@hd.org
42. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
43. mailto:%20dirce@zk3.dec.com
44. mailto:%20wsanchez@apple.com
45. mailto:%20mrapple@quack.kfu.com
46. mailto:%20jack@innovativeinternet.com
47. mailto:%20schnitz@unipress.com
48. mailto:%20shields@tembel.org
49. mailto:%20pebbles.jpl.nasa.gov
50. mailto:%20harlan@pfcs.com
51. mailto:%20ken@sdd.hp.com
52. mailto:%20ajit@ee.udel.edu
53. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
54. mailto:%20vixie@vix.com
55. mailto:%20Ulrich.Windl@rz.uni-regensburg.de
11. mailto:%20nelson@bolyard.me
12. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca
13. mailto:%20reg@dwf.com
14. mailto:%20clift@ml.csiro.au
15. mailto:%20casey@csc.co.za
16. mailto:%20Sven_Dietrich@trimble.COM
17. mailto:%20dundas@salt.jpl.nasa.gov
18. mailto:%20duwe@immd4.informatik.uni-erlangen.de
19. mailto:%20dennis@mrbill.canet.ca
20. mailto:%20jhay@icomtek.csir.co.za
21. mailto:%20davehart@davehart.com
22. mailto:%20neoclock4x@linum.com
23. mailto:%20glenn@herald.usask.ca
24. mailto:%20iglesias@uci.edu
25. mailto:%20jagubox.gsfc.nasa.gov
26. mailto:%20jbj@chatham.usdesign.com
27. mailto:%20Hans.Lambermont@nl.origin-it.com
28. mailto:H.Lambermont@chello.nl
29. mailto:%20phk@FreeBSD.ORG
30. http://www4.informatik.uni-erlangen.de/%7ekardel
31. mailto:%20kardel%20%28at%29%20ntp%20%28dot%29%20org
32. mailto:kuehn@ntp.org
33. mailto:%20jones@hermes.chpc.utexas.edu
34. mailto:%20dkatz@cisco.com
35. mailto:%20leres@ee.lbl.gov
36. mailto:%20lindholm@ucs.ubc.ca
37. mailto:%20louie@ni.umd.edu
38. mailto:%20thorinn@diku.dk
39. mailto:%20mayer@ntp.org
40. mailto:%20mills@udel.edu
41. mailto:%20moeller@gwdgv1.dnet.gwdg.de
42. mailto:%20mogul@pa.dec.com
43. mailto:%20tmoore@fievel.daytonoh.ncr.com
44. mailto:%20kamal@whence.com
45. mailto:%20derek@toybox.demon.co.uk
46. mailto:%20d@hd.org
47. mailto:%20neal@ntp.org
48. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
49. mailto:%20dirce@zk3.dec.com
50. mailto:%20wsanchez@apple.com
51. mailto:%20mrapple@quack.kfu.com
52. mailto:%20jack@innovativeinternet.com
53. mailto:%20schnitz@unipress.com
54. mailto:%20shields@tembel.org
55. mailto:%20pebbles.jpl.nasa.gov
56. mailto:%20harlan@pfcs.com
57. mailto:%20ken@sdd.hp.com
58. mailto:%20ajit@ee.udel.edu
59. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
60. mailto:%20brian.utterback@oracle.com
61. mailto:%20loganaden@gmail.com
62. mailto:%20vixie@vix.com
63. mailto:%20Ulrich.Windl@rz.uni-regensburg.de

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
*ports
*html/pic

View file

@ -0,0 +1,55 @@
# ex:ts=8
#
# $FreeBSD$
NTP 4.2.8
originals can be found on http://www.ntp.org/downloads.html
Import
------
For the import of NTP the following files were removed:
ports/* NT files
html/pic/* GIF files
html/build/hints/solaris.xtra.4095849 Trigger merge conflict script
The stripped down version was created using FREEBSD-Xlist during
extraction:
tar -X FREEBSD-Xlist -xvzf ntp-4.2.8.tar.gz
mv ntp-4.2.8 4.2.8
Imported by:
See procedure on
https://www.freebsd.org/doc/en_US.ISO8859-1/articles/committers-guide/subversion-primer.html
Updating usr.sbin/ntp
---------------------
./configure --disable-all-clocks --enable-NMEA --enable-ONCORE
--enable-RAWDCF --with-crypto --disable-debugging
--enable-LOCAL-CLOCK --with-sntp --with-arlib --prefix=/usr
config.h was generated by running configure and excluding almost all clock
drivers (what is included is DCF77 -- what I use --, NMEA, Motorola OnCORE
and local clocks).
The file is then edited to edit the value of "NO_PARENB_IGNPAR" because we
need to set no parity on the serial port (needed for DCF77). All clock
drivers are then disabled (some of them are included by default by ntpd).
Note that there are two #ifdef to support other architectures (WRT to long
size and endianness). They'll need to be redone for each upgrade to the
vendor branch to keep config.h in sync.
ntpd/ntp_control.c is now the only file that is different from the vendor
branch for unsigned char/int fixes and removal of a DoS.
Documentation in /usr/share/doc/ntp is generated from the HTML files with
lynx (without the GIF files of course).
A patch to fix IPV6_MULTICAST_LOOP was committed to head as r222444 and
filed as http://bugs.ntp.org/show_bug.cgi?id=1936. Check if still needed
or re-apply on update.

View file

@ -1,132 +1,74 @@
#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.8
ACLOCAL_AMFLAGS= -I m4 -I libopts/m4
ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/libevent/m4 -I sntp/libopts/m4
NULL=
NULL =
SUBDIRS=
if NEED_LIBOPTS
SUBDIRS+= libopts
endif
SUBDIRS+= \
scripts \
include \
ElectricFence \
@ARLIB_DIR@ \
libntp \
libparse \
ntpd \
ntpdate \
ntpdc \
ntpq \
parseutil \
adjtimed \
clockstuff \
kernel \
# moved sntp first to get libtool and libevent built.
SUBDIRS = \
sntp \
util \
$(NULL)
DIST_SUBDIRS= \
scripts \
include \
ElectricFence \
arlib \
libntp \
libopts \
libparse \
ntpd \
ntpdate \
ntpdc \
ntpq \
ntpsnmpd \
parseutil \
adjtimed \
clockstuff \
kernel \
sntp \
util \
tests \
$(NULL)
DISTCHECK_CONFIGURE_FLAGS= --with-arlib --enable-local-libopts
DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp
EXTRA_DIST = \
COPYRIGHT \
ChangeLog \
CommitLog \
CommitLog-4.1.0 \
NEWS \
NOTES.y2kfixes \
README.bk \
README.hackers \
README.patches \
README.refclocks \
README.versions \
TODO \
WHERE-TO-START \
bootstrap \
build \
config.guess \
config.h.in \
config.sub \
dot.emacs \
excludes \
flock-build \
install-sh \
packageinfo.sh \
readme.y2kfixes \
EXTRA_DIST = \
$(srcdir)/COPYRIGHT \
ChangeLog \
CommitLog \
CommitLog-4.1.0 \
NEWS \
NOTES.y2kfixes \
README.bk \
README.hackers \
README.patches \
README.refclocks \
README.versions \
TODO \
WHERE-TO-START \
bootstrap \
build \
config.h.in \
dot.emacs \
flock-build \
packageinfo.sh \
readme.y2kfixes \
results.y2kfixes \
\
conf \
html \
libisc \
ports \
conf \
html \
lib/isc \
libjsmn \
ports \
\
bincheck.mf \
version \
version.m4 \
deps-ver \
\
$(NULL)
CLEANFILES =
DISTCLEANFILES = .gcc-warning
#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.ac
ETAGS_ARGS = Makefile.am configure.ac
# HMS: make ports be the last directory...
# DIST_HOOK_DIRS = conf html scripts ports
# HMS: Keep .gcc-warning first, as that way it gets printed first.
BUILT_SOURCES = .gcc-warning $(srcdir)/COPYRIGHT $(srcdir)/version $(srcdir)/version.m4 $(srcdir)/include/version.def
$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
( echo "This file is automatically generated from html/copyright.html" ; lynx -dump $(srcdir)/html/copyright.html ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
# HMS: The next bit is still suboptimal. If bk is present but this NTP
# repo is not a bk repo, we'll get an error message from the prs command.
# Unfortunately, I haven't found the necessary magic to redirect this error
# output to /dev/null under ancient/unique shells like the one Ultrix uses.
# We'll also get an error if srcdir or version is unwritable.
$(srcdir)/version: FRC.version
-(bk version) >/dev/null 2>&1 && \
cd $(srcdir) && \
x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
y=`cat version 2>/dev/null` || true && \
case "$$x" in ''|$$y) ;; *) echo $$x > version ;; esac
$(srcdir)/version.m4: $(srcdir)/packageinfo.sh
cd $(srcdir) && \
./scripts/genver version.m4
$(srcdir)/include/version.def: $(srcdir)/packageinfo.sh
cd $(srcdir) && \
./scripts/genver include/version.def
dist-hook:
@find $(distdir) -type d -name CVS -print | xargs rm -rf
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
@chmod u+w $(distdir)/ports/winnt
@for i in `find $(distdir)/ports/winnt -type f -name '*.ds*' -print`; \
do chmod u+w $$i ; unix2dos $$i $$i; done
BUILT_SOURCES = \
.gcc-warning \
libtool \
html/.datecheck \
$(srcdir)/COPYRIGHT \
$(srcdir)/.checkChangeLog \
$(NULL)
.gcc-warning:
@echo "Compiling with GCC now generates lots of new warnings."
@ -140,15 +82,54 @@ dist-hook:
@sleep 1
@touch $@
html/.datecheck: FRC.html
cd $(srcdir)/html && \
../scripts/build/checkHtmlFileDates
libtool: $(LIBTOOL_DEPS)
./config.status --recheck
sntp/built-sources-only: FRC.sntp
@cd sntp && $(MAKE) $(AM_MAKEFLAGS) built-sources-only
$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
{ echo "This file is automatically generated from html/copyright.html" ; \
lynx -dump $(srcdir)/html/copyright.html ;} > COPYRIGHT.new \
&& mv -f COPYRIGHT.new $(srcdir)/COPYRIGHT
COPYRIGHT-please: $(srcdir)/COPYRIGHT
@: do-nothing action to prevent default \
This target is needed by sntp/Makefile.am on decrepit \
FreeBSD 6.x make which fails with "make COPYRIGHT" \
configured in $(srcdir) but "make ./COPYRIGHT" succeeds. \
Rather than determine our $(srcdir) from sntp/Makefile.am \
COPYRIGHT-please serves as a fixed target.
$(srcdir)/.checkChangeLog: $(srcdir)/ChangeLog $(srcdir)/scripts/build/checkChangeLog
cd $(srcdir) && \
./scripts/build/checkChangeLog
dist-hook:
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
install-data-local:
( cd $(srcdir) && find html -name SCCS -prune -o -type d \
-exec $(INSTALL) -d $(DESTDIR)$(htmldir)/{} ";" )
( cd $(srcdir) && find html -name SCCS -prune -o -type f \
-exec $(INSTALL_DATA) {} $(DESTDIR)$(htmldir)/{} ";" )
uninstall-local:
rm -rf $(DESTDIR)$(htmldir)/html
CommitLog: FRC.CommitLog
cd $(srcdir) \
&& /bin/test -e CommitLog \
&& $(PATH_TEST) -e CommitLog \
-a SCCS/s.ChangeSet -ot CommitLog \
|| scripts/genCommitLog
|| scripts/build/genCommitLog
# HMS: The following seems to be a work-in-progress...
CVO=`$(srcdir)/config.guess`
CVO=`$(srcdir)/sntp/libevent/build-aux/config.guess`
.buildcvo:
echo "$(CVO)" > .buildcvo
@ -171,7 +152,8 @@ BHOST=`(hostname || uname -n)`
echo " "; \
fi
FRC.CommitLog FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version:
FRC.CommitLog FRC.checkcvo FRC.checkhost FRC.distwarn FRC.html FRC.sntp:
@: do-nothing action prevents any default
# HMS: what was I trying to do with this?
#dot.emacs: FRC.distwarn

View file

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@ -33,18 +33,55 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
@NEED_LIBOPTS_TRUE@am__append_1 = libopts
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure ChangeLog INSTALL NEWS TODO compile \
config.guess config.sub depcomp install-sh ltmain.sh missing
config.guess config.sub depcomp install-sh ltmain.sh missing \
sntp/libevent/build-aux/compile \
sntp/libevent/build-aux/config.guess \
sntp/libevent/build-aux/config.sub \
sntp/libevent/build-aux/depcomp \
sntp/libevent/build-aux/install-sh \
sntp/libevent/build-aux/ltmain.sh \
sntp/libevent/build-aux/missing sntp/libevent/build-aux/ylwrap \
ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/define_dir.m4 \
$(top_srcdir)/m4/hs_ulong_const.m4 \
$(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
$(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
$(top_srcdir)/sntp/m4/ltoptions.m4 \
$(top_srcdir)/sntp/m4/ltsugar.m4 \
$(top_srcdir)/sntp/m4/ltversion.m4 \
$(top_srcdir)/sntp/m4/lt~obsolete.m4 \
$(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
$(top_srcdir)/sntp/m4/ntp_compiler.m4 \
$(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
$(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
$(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
$(top_srcdir)/sntp/m4/ntp_libevent.m4 \
$(top_srcdir)/sntp/m4/ntp_libntp.m4 \
$(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
$(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
$(top_srcdir)/sntp/m4/ntp_openssl.m4 \
$(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@ -53,6 +90,12 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@ -69,6 +112,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@ -106,42 +150,71 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARLIB_DIR = @ARLIB_DIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINSUBDIR = @BINSUBDIR@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
GTEST_CONFIG = @GTEST_CONFIG@
GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LCRYPTO = @LCRYPTO@
LD = @LD@
LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NLIST = @LDADD_NLIST@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
LDFLAGS_NTP = @LDFLAGS_NTP@
LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@ -149,6 +222,8 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
LTLIBOBJS = @LTLIBOBJS@
@ -160,15 +235,76 @@ MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
MAKE_NTPTIME = @MAKE_NTPTIME@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
NTPDATE_DB = @NTPDATE_DB@
NTPDATE_DL = @NTPDATE_DL@
NTPDATE_DS = @NTPDATE_DS@
NTPDATE_MS = @NTPDATE_MS@
NTPDATE_NI = @NTPDATE_NI@
NTPDC_DB = @NTPDC_DB@
NTPDC_DL = @NTPDC_DL@
NTPDC_DS = @NTPDC_DS@
NTPDC_MS = @NTPDC_MS@
NTPDC_NI = @NTPDC_NI@
NTPDSIM_DB = @NTPDSIM_DB@
NTPDSIM_DL = @NTPDSIM_DL@
NTPDSIM_DS = @NTPDSIM_DS@
NTPDSIM_MS = @NTPDSIM_MS@
NTPDSIM_NI = @NTPDSIM_NI@
NTPD_DB = @NTPD_DB@
NTPD_DL = @NTPD_DL@
NTPD_DS = @NTPD_DS@
NTPD_MS = @NTPD_MS@
NTPD_NI = @NTPD_NI@
NTPQ_DB = @NTPQ_DB@
NTPQ_DL = @NTPQ_DL@
NTPQ_DS = @NTPQ_DS@
NTPQ_MS = @NTPQ_MS@
NTPQ_NI = @NTPQ_NI@
NTPSNMPD_DB = @NTPSNMPD_DB@
NTPSNMPD_DL = @NTPSNMPD_DL@
NTPSNMPD_DS = @NTPSNMPD_DS@
NTPSNMPD_MS = @NTPSNMPD_MS@
NTPSNMPD_NI = @NTPSNMPD_NI@
NTPSWEEP_DB = @NTPSWEEP_DB@
NTPSWEEP_DL = @NTPSWEEP_DL@
NTPSWEEP_DS = @NTPSWEEP_DS@
NTPSWEEP_MS = @NTPSWEEP_MS@
NTPSWEEP_NI = @NTPSWEEP_NI@
NTPTIME_DB = @NTPTIME_DB@
NTPTIME_DL = @NTPTIME_DL@
NTPTIME_DS = @NTPTIME_DS@
NTPTIME_MS = @NTPTIME_MS@
NTPTIME_NI = @NTPTIME_NI@
NTPTRACE_DB = @NTPTRACE_DB@
NTPTRACE_DL = @NTPTRACE_DL@
NTPTRACE_DS = @NTPTRACE_DS@
NTPTRACE_MS = @NTPTRACE_MS@
NTPTRACE_NI = @NTPTRACE_NI@
NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
NTP_KEYSDIR = @NTP_KEYSDIR@
NTP_WAIT_DB = @NTP_WAIT_DB@
NTP_WAIT_DL = @NTP_WAIT_DL@
NTP_WAIT_DS = @NTP_WAIT_DS@
NTP_WAIT_MS = @NTP_WAIT_MS@
NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -176,23 +312,53 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
SNTP = @SNTP@
SNTP_DB = @SNTP_DB@
SNTP_DL = @SNTP_DL@
SNTP_DS = @SNTP_DS@
SNTP_MS = @SNTP_MS@
SNTP_NI = @SNTP_NI@
STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
TICKADJ_DB = @TICKADJ_DB@
TICKADJ_DL = @TICKADJ_DL@
TICKADJ_DS = @TICKADJ_DS@
TICKADJ_MS = @TICKADJ_MS@
TICKADJ_NI = @TICKADJ_NI@
TIMETRIM_DB = @TIMETRIM_DB@
TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -239,86 +405,78 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.8
ACLOCAL_AMFLAGS = -I m4 -I libopts/m4
ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/libevent/m4 -I sntp/libopts/m4
NULL =
SUBDIRS = $(am__append_1) scripts include ElectricFence @ARLIB_DIR@ \
libntp libparse ntpd ntpdate ntpdc ntpq parseutil adjtimed \
clockstuff kernel sntp util $(NULL)
DIST_SUBDIRS = \
# moved sntp first to get libtool and libevent built.
SUBDIRS = \
sntp \
scripts \
include \
ElectricFence \
arlib \
libntp \
libopts \
libparse \
ntpd \
ntpdate \
ntpdc \
ntpq \
ntpsnmpd \
parseutil \
adjtimed \
clockstuff \
kernel \
sntp \
util \
tests \
$(NULL)
DISTCHECK_CONFIGURE_FLAGS = --with-arlib --enable-local-libopts
DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp
EXTRA_DIST = \
COPYRIGHT \
ChangeLog \
CommitLog \
CommitLog-4.1.0 \
NEWS \
NOTES.y2kfixes \
README.bk \
README.hackers \
README.patches \
README.refclocks \
README.versions \
TODO \
WHERE-TO-START \
bootstrap \
build \
config.guess \
config.h.in \
config.sub \
dot.emacs \
excludes \
flock-build \
install-sh \
packageinfo.sh \
readme.y2kfixes \
$(srcdir)/COPYRIGHT \
ChangeLog \
CommitLog \
CommitLog-4.1.0 \
NEWS \
NOTES.y2kfixes \
README.bk \
README.hackers \
README.patches \
README.refclocks \
README.versions \
TODO \
WHERE-TO-START \
bootstrap \
build \
config.h.in \
dot.emacs \
flock-build \
packageinfo.sh \
readme.y2kfixes \
results.y2kfixes \
\
conf \
html \
libisc \
ports \
conf \
html \
lib/isc \
libjsmn \
ports \
\
bincheck.mf \
version \
version.m4 \
deps-ver \
\
$(NULL)
CLEANFILES =
DISTCLEANFILES = .gcc-warning
#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.ac
ETAGS_ARGS = Makefile.am configure.ac
# HMS: make ports be the last directory...
# DIST_HOOK_DIRS = conf html scripts ports
# HMS: Keep .gcc-warning first, as that way it gets printed first.
BUILT_SOURCES = .gcc-warning $(srcdir)/COPYRIGHT $(srcdir)/version $(srcdir)/version.m4 $(srcdir)/include/version.def
BUILT_SOURCES = \
.gcc-warning \
libtool \
html/.datecheck \
$(srcdir)/COPYRIGHT \
$(srcdir)/.checkChangeLog \
$(NULL)
# HMS: The following seems to be a work-in-progress...
CVO = `$(srcdir)/config.guess`
CVO = `$(srcdir)/sntp/libevent/build-aux/config.guess`
BHOST = `(hostname || uname -n)`
all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@ -392,7 +550,7 @@ distclean-libtool:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@ -417,7 +575,7 @@ $(RECURSIVE_TARGETS):
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@ -584,7 +742,8 @@ distdir: $(DISTFILES)
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
@ -628,17 +787,17 @@ dist dist-all: distdir
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
@ -721,6 +880,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@ -753,7 +913,7 @@ info: info-recursive
info-am:
install-data-am:
install-data-am: install-data-local
install-dvi: install-dvi-recursive
@ -799,7 +959,7 @@ ps: ps-recursive
ps-am:
uninstall-am:
uninstall-am: uninstall-local
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
ctags-recursive install install-am install-strip \
@ -812,46 +972,17 @@ uninstall-am:
dist-zip distcheck distclean distclean-generic distclean-hdr \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags tags-recursive uninstall uninstall-am
install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-local
$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
( echo "This file is automatically generated from html/copyright.html" ; lynx -dump $(srcdir)/html/copyright.html ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
# HMS: The next bit is still suboptimal. If bk is present but this NTP
# repo is not a bk repo, we'll get an error message from the prs command.
# Unfortunately, I haven't found the necessary magic to redirect this error
# output to /dev/null under ancient/unique shells like the one Ultrix uses.
# We'll also get an error if srcdir or version is unwritable.
$(srcdir)/version: FRC.version
-(bk version) >/dev/null 2>&1 && \
cd $(srcdir) && \
x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
y=`cat version 2>/dev/null` || true && \
case "$$x" in ''|$$y) ;; *) echo $$x > version ;; esac
$(srcdir)/version.m4: $(srcdir)/packageinfo.sh
cd $(srcdir) && \
./scripts/genver version.m4
$(srcdir)/include/version.def: $(srcdir)/packageinfo.sh
cd $(srcdir) && \
./scripts/genver include/version.def
dist-hook:
@find $(distdir) -type d -name CVS -print | xargs rm -rf
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
@chmod u+w $(distdir)/ports/winnt
@for i in `find $(distdir)/ports/winnt -type f -name '*.ds*' -print`; \
do chmod u+w $$i ; unix2dos $$i $$i; done
.gcc-warning:
@echo "Compiling with GCC now generates lots of new warnings."
@echo " "
@ -864,11 +995,50 @@ dist-hook:
@sleep 1
@touch $@
html/.datecheck: FRC.html
cd $(srcdir)/html && \
../scripts/build/checkHtmlFileDates
libtool: $(LIBTOOL_DEPS)
./config.status --recheck
sntp/built-sources-only: FRC.sntp
@cd sntp && $(MAKE) $(AM_MAKEFLAGS) built-sources-only
$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
{ echo "This file is automatically generated from html/copyright.html" ; \
lynx -dump $(srcdir)/html/copyright.html ;} > COPYRIGHT.new \
&& mv -f COPYRIGHT.new $(srcdir)/COPYRIGHT
COPYRIGHT-please: $(srcdir)/COPYRIGHT
@: do-nothing action to prevent default \
This target is needed by sntp/Makefile.am on decrepit \
FreeBSD 6.x make which fails with "make COPYRIGHT" \
configured in $(srcdir) but "make ./COPYRIGHT" succeeds. \
Rather than determine our $(srcdir) from sntp/Makefile.am \
COPYRIGHT-please serves as a fixed target.
$(srcdir)/.checkChangeLog: $(srcdir)/ChangeLog $(srcdir)/scripts/build/checkChangeLog
cd $(srcdir) && \
./scripts/build/checkChangeLog
dist-hook:
@find $(distdir) -type d -name SCCS -print | xargs rm -rf
install-data-local:
( cd $(srcdir) && find html -name SCCS -prune -o -type d \
-exec $(INSTALL) -d $(DESTDIR)$(htmldir)/{} ";" )
( cd $(srcdir) && find html -name SCCS -prune -o -type f \
-exec $(INSTALL_DATA) {} $(DESTDIR)$(htmldir)/{} ";" )
uninstall-local:
rm -rf $(DESTDIR)$(htmldir)/html
CommitLog: FRC.CommitLog
cd $(srcdir) \
&& /bin/test -e CommitLog \
&& $(PATH_TEST) -e CommitLog \
-a SCCS/s.ChangeSet -ot CommitLog \
|| scripts/genCommitLog
|| scripts/build/genCommitLog
.buildcvo:
echo "$(CVO)" > .buildcvo
@ -889,7 +1059,8 @@ CommitLog: FRC.CommitLog
echo " "; \
fi
FRC.CommitLog FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version:
FRC.CommitLog FRC.checkcvo FRC.checkhost FRC.distwarn FRC.html FRC.sntp:
@: do-nothing action prevents any default
# HMS: what was I trying to do with this?
#dot.emacs: FRC.distwarn

View file

@ -1,3 +1,507 @@
---
NTP 4.2.8p1 (Harlan Stenn <stenn@ntp.org>, 2015/02/04)
Focus: Security and Bug fixes, enhancements.
Severity: HIGH
In addition to bug fixes and enhancements, this release fixes the
following high-severity vulnerabilities:
* vallen is not validated in several places in ntp_crypto.c, leading
to a potential information leak or possibly a crash
References: Sec 2671 / CVE-2014-9297 / VU#852879
Affects: All NTP4 releases before 4.2.8p1 that are running autokey.
CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
Date Resolved: Stable (4.2.8p1) 04 Feb 2015
Summary: The vallen packet value is not validated in several code
paths in ntp_crypto.c which can lead to information leakage
or perhaps a crash of the ntpd process.
Mitigation - any of:
Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
or the NTP Public Services Project Download Page.
Disable Autokey Authentication by removing, or commenting out,
all configuration directives beginning with the "crypto"
keyword in your ntp.conf file.
Credit: This vulnerability was discovered by Stephen Roettger of the
Google Security Team, with additional cases found by Sebastian
Krahmer of the SUSE Security Team and Harlan Stenn of Network
Time Foundation.
* ::1 can be spoofed on some OSes, so ACLs based on IPv6 ::1 addresses
can be bypassed.
References: Sec 2672 / CVE-2014-9298 / VU#852879
Affects: All NTP4 releases before 4.2.8p1, under at least some
versions of MacOS and Linux. *BSD has not been seen to be vulnerable.
CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:C) Base Score: 9
Date Resolved: Stable (4.2.8p1) 04 Feb 2014
Summary: While available kernels will prevent 127.0.0.1 addresses
from "appearing" on non-localhost IPv4 interfaces, some kernels
do not offer the same protection for ::1 source addresses on
IPv6 interfaces. Since NTP's access control is based on source
address and localhost addresses generally have no restrictions,
an attacker can send malicious control and configuration packets
by spoofing ::1 addresses from the outside. Note Well: This is
not really a bug in NTP, it's a problem with some OSes. If you
have one of these OSes where ::1 can be spoofed, ALL ::1 -based
ACL restrictions on any application can be bypassed!
Mitigation:
Upgrade to 4.2.8p1, or later, from the NTP Project Download Page
or the NTP Public Services Project Download Page
Install firewall rules to block packets claiming to come from
::1 from inappropriate network interfaces.
Credit: This vulnerability was discovered by Stephen Roettger of
the Google Security Team.
Additionally, over 30 bugfixes and improvements were made to the codebase.
See the ChangeLog for more information.
---
NTP 4.2.8 (Harlan Stenn <stenn@ntp.org>, 2014/12/18)
Focus: Security and Bug fixes, enhancements.
Severity: HIGH
In addition to bug fixes and enhancements, this release fixes the
following high-severity vulnerabilities:
************************** vv NOTE WELL vv *****************************
The vulnerabilities listed below can be significantly mitigated by
following the BCP of putting
restrict default ... noquery
in the ntp.conf file. With the exception of:
receive(): missing return on error
References: Sec 2670 / CVE-2014-9296 / VU#852879
below (which is a limited-risk vulnerability), none of the recent
vulnerabilities listed below can be exploited if the source IP is
restricted from sending a 'query'-class packet by your ntp.conf file.
************************** ^^ NOTE WELL ^^ *****************************
* Weak default key in config_auth().
References: [Sec 2665] / CVE-2014-9293 / VU#852879
CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
Vulnerable Versions: all releases prior to 4.2.7p11
Date Resolved: 28 Jan 2010
Summary: If no 'auth' key is set in the configuration file, ntpd
would generate a random key on the fly. There were two
problems with this: 1) the generated key was 31 bits in size,
and 2) it used the (now weak) ntp_random() function, which was
seeded with a 32-bit value and could only provide 32 bits of
entropy. This was sufficient back in the late 1990s when the
code was written. Not today.
Mitigation - any of:
- Upgrade to 4.2.7p11 or later.
- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
Credit: This vulnerability was noticed in ntp-4.2.6 by Neel Mehta
of the Google Security Team.
* Non-cryptographic random number generator with weak seed used by
ntp-keygen to generate symmetric keys.
References: [Sec 2666] / CVE-2014-9294 / VU#852879
CVSS: (AV:N/AC:L/Au:M/C:P/I:P/A:C) Base Score: 7.3
Vulnerable Versions: All NTP4 releases before 4.2.7p230
Date Resolved: Dev (4.2.7p230) 01 Nov 2011
Summary: Prior to ntp-4.2.7p230 ntp-keygen used a weak seed to
prepare a random number generator that was of good quality back
in the late 1990s. The random numbers produced was then used to
generate symmetric keys. In ntp-4.2.8 we use a current-technology
cryptographic random number generator, either RAND_bytes from
OpenSSL, or arc4random().
Mitigation - any of:
- Upgrade to 4.2.7p230 or later.
- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
Credit: This vulnerability was discovered in ntp-4.2.6 by
Stephen Roettger of the Google Security Team.
* Buffer overflow in crypto_recv()
References: Sec 2667 / CVE-2014-9295 / VU#852879
CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
Versions: All releases before 4.2.8
Date Resolved: Stable (4.2.8) 18 Dec 2014
Summary: When Autokey Authentication is enabled (i.e. the ntp.conf
file contains a 'crypto pw ...' directive) a remote attacker
can send a carefully crafted packet that can overflow a stack
buffer and potentially allow malicious code to be executed
with the privilege level of the ntpd process.
Mitigation - any of:
- Upgrade to 4.2.8, or later, or
- Disable Autokey Authentication by removing, or commenting out,
all configuration directives beginning with the crypto keyword
in your ntp.conf file.
Credit: This vulnerability was discovered by Stephen Roettger of the
Google Security Team.
* Buffer overflow in ctl_putdata()
References: Sec 2668 / CVE-2014-9295 / VU#852879
CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
Versions: All NTP4 releases before 4.2.8
Date Resolved: Stable (4.2.8) 18 Dec 2014
Summary: A remote attacker can send a carefully crafted packet that
can overflow a stack buffer and potentially allow malicious
code to be executed with the privilege level of the ntpd process.
Mitigation - any of:
- Upgrade to 4.2.8, or later.
- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
Credit: This vulnerability was discovered by Stephen Roettger of the
Google Security Team.
* Buffer overflow in configure()
References: Sec 2669 / CVE-2014-9295 / VU#852879
CVSS: (AV:N/AC:L/Au:N/C:P/I:P/A:P) Base Score: 7.5
Versions: All NTP4 releases before 4.2.8
Date Resolved: Stable (4.2.8) 18 Dec 2014
Summary: A remote attacker can send a carefully crafted packet that
can overflow a stack buffer and potentially allow malicious
code to be executed with the privilege level of the ntpd process.
Mitigation - any of:
- Upgrade to 4.2.8, or later.
- Follow BCP and put 'restrict ... noquery' in your ntp.conf file.
Credit: This vulnerability was discovered by Stephen Roettger of the
Google Security Team.
* receive(): missing return on error
References: Sec 2670 / CVE-2014-9296 / VU#852879
CVSS: (AV:N/AC:L/Au:N/C:N/I:N/A:P) Base Score: 5.0
Versions: All NTP4 releases before 4.2.8
Date Resolved: Stable (4.2.8) 18 Dec 2014
Summary: Code in ntp_proto.c:receive() was missing a 'return;' in
the code path where an error was detected, which meant
processing did not stop when a specific rare error occurred.
We haven't found a way for this bug to affect system integrity.
If there is no way to affect system integrity the base CVSS
score for this bug is 0. If there is one avenue through which
system integrity can be partially affected, the base score
becomes a 5. If system integrity can be partially affected
via all three integrity metrics, the CVSS base score become 7.5.
Mitigation - any of:
- Upgrade to 4.2.8, or later,
- Remove or comment out all configuration directives
beginning with the crypto keyword in your ntp.conf file.
Credit: This vulnerability was discovered by Stephen Roettger of the
Google Security Team.
See http://support.ntp.org/security for more information.
New features / changes in this release:
Important Changes
* Internal NTP Era counters
The internal counters that track the "era" (range of years) we are in
rolls over every 136 years'. The current "era" started at the stroke of
midnight on 1 Jan 1900, and ends just before the stroke of midnight on
1 Jan 2036.
In the past, we have used the "midpoint" of the range to decide which
era we were in. Given the longevity of some products, it became clear
that it would be more functional to "look back" less, and "look forward"
more. We now compile a timestamp into the ntpd executable and when we
get a timestamp we us the "built-on" to tell us what era we are in.
This check "looks back" 10 years, and "looks forward" 126 years.
* ntpdc responses disabled by default
Dave Hart writes:
For a long time, ntpq and its mostly text-based mode 6 (control)
protocol have been preferred over ntpdc and its mode 7 (private
request) protocol for runtime queries and configuration. There has
been a goal of deprecating ntpdc, previously held back by numerous
capabilities exposed by ntpdc with no ntpq equivalent. I have been
adding commands to ntpq to cover these cases, and I believe I've
covered them all, though I've not compared command-by-command
recently.
As I've said previously, the binary mode 7 protocol involves a lot of
hand-rolled structure layout and byte-swapping code in both ntpd and
ntpdc which is hard to get right. As ntpd grows and changes, the
changes are difficult to expose via ntpdc while maintaining forward
and backward compatibility between ntpdc and ntpd. In contrast,
ntpq's text-based, label=value approach involves more code reuse and
allows compatible changes without extra work in most cases.
Mode 7 has always been defined as vendor/implementation-specific while
mode 6 is described in RFC 1305 and intended to be open to interoperate
with other implementations. There is an early draft of an updated
mode 6 description that likely will join the other NTPv4 RFCs
eventually. (http://tools.ietf.org/html/draft-odonoghue-ntpv4-control-01)
For these reasons, ntpd 4.2.7p230 by default disables processing of
ntpdc queries, reducing ntpd's attack surface and functionally
deprecating ntpdc. If you are in the habit of using ntpdc for certain
operations, please try the ntpq equivalent. If there's no equivalent,
please open a bug report at http://bugs.ntp.org./
In addition to the above, over 1100 issues have been resolved between
the 4.2.6 branch and 4.2.8. The ChangeLog file in the distribution
lists these.
---
NTP 4.2.6p5 (Harlan Stenn <stenn@ntp.org>, 2011/12/24)
Focus: Bug fixes
Severity: Medium
This is a recommended upgrade.
This release updates sys_rootdisp and sys_jitter calculations to match the
RFC specification, fixes a potential IPv6 address matching error for the
"nic" and "interface" configuration directives, suppresses the creation of
extraneous ephemeral associations for certain broadcastclient and
multicastclient configurations, cleans up some ntpq display issues, and
includes improvements to orphan mode, minor bugs fixes and code clean-ups.
New features / changes in this release:
ntpd
* Updated "nic" and "interface" IPv6 address handling to prevent
mismatches with localhost [::1] and wildcard [::] which resulted from
using the address/prefix format (e.g. fe80::/64)
* Fix orphan mode stratum incorrectly counting to infinity
* Orphan parent selection metric updated to includes missing ntohl()
* Non-printable stratum 16 refid no longer sent to ntp
* Duplicate ephemeral associations suppressed for broadcastclient and
multicastclient without broadcastdelay
* Exclude undetermined sys_refid from use in loopback TEST12
* Exclude MODE_SERVER responses from KoD rate limiting
* Include root delay in clock_update() sys_rootdisp calculations
* get_systime() updated to exclude sys_residual offset (which only
affected bits "below" sys_tick, the precision threshold)
* sys.peer jitter weighting corrected in sys_jitter calculation
ntpq
* -n option extended to include the billboard "server" column
* IPv6 addresses in the local column truncated to prevent overruns
---
NTP 4.2.6p4 (Harlan Stenn <stenn@ntp.org>, 2011/09/22)
Focus: Bug fixes and portability improvements
Severity: Medium
This is a recommended upgrade.
This release includes build infrastructure updates, code
clean-ups, minor bug fixes, fixes for a number of minor
ref-clock issues, and documentation revisions.
Portability improvements affect AIX, HP-UX, Linux, OS X and 64-bit time_t.
New features / changes in this release:
Build system
* Fix checking for struct rtattr
* Update config.guess and config.sub for AIX
* Upgrade required version of autogen and libopts for building
from our source code repository
ntpd
* Back-ported several fixes for Coverity warnings from ntp-dev
* Fix a rare boundary condition in UNLINK_EXPR_SLIST()
* Allow "logconfig =allall" configuration directive
* Bind tentative IPv6 addresses on Linux
* Correct WWVB/Spectracom driver to timestamp CR instead of LF
* Improved tally bit handling to prevent incorrect ntpq peer status reports
* Exclude the Undisciplined Local Clock and ACTS drivers from the initial
candidate list unless they are designated a "prefer peer"
* Prevent the consideration of Undisciplined Local Clock or ACTS drivers for
selection during the 'tos orphanwait' period
* Prefer an Orphan Mode Parent over the Undisciplined Local Clock or ACTS
drivers
* Improved support of the Parse Refclock trusttime flag in Meinberg mode
* Back-port utility routines from ntp-dev: mprintf(), emalloc_zero()
* Added the NTPD_TICKADJ_PPM environment variable for specifying baseline
clock slew on Microsoft Windows
* Code cleanup in libntpq
ntpdc
* Fix timerstats reporting
ntpdate
* Reduce time required to set clock
* Allow a timeout greater than 2 seconds
sntp
* Backward incompatible command-line option change:
-l/--filelog changed -l/--logfile (to be consistent with ntpd)
Documentation
* Update html2man. Fix some tags in the .html files
* Distribute ntp-wait.html
---
NTP 4.2.6p3 (Harlan Stenn <stenn@ntp.org>, 2011/01/03)
Focus: Bug fixes and portability improvements
Severity: Medium
This is a recommended upgrade.
This release includes build infrastructure updates, code
clean-ups, minor bug fixes, fixes for a number of minor
ref-clock issues, and documentation revisions.
Portability improvements in this release affect AIX, Atari FreeMiNT,
FreeBSD4, Linux and Microsoft Windows.
New features / changes in this release:
Build system
* Use lsb_release to get information about Linux distributions.
* 'test' is in /usr/bin (instead of /bin) on some systems.
* Basic sanity checks for the ChangeLog file.
* Source certain build files with ./filename for systems without . in PATH.
* IRIX portability fix.
* Use a single copy of the "libopts" code.
* autogen/libopts upgrade.
* configure.ac m4 quoting cleanup.
ntpd
* Do not bind to IN6_IFF_ANYCAST addresses.
* Log the reason for exiting under Windows.
* Multicast fixes for Windows.
* Interpolation fixes for Windows.
* IPv4 and IPv6 Multicast fixes.
* Manycast solicitation fixes and general repairs.
* JJY refclock cleanup.
* NMEA refclock improvements.
* Oncore debug message cleanup.
* Palisade refclock now builds under Linux.
* Give RAWDCF more baud rates.
* Support Truetime Satellite clocks under Windows.
* Support Arbiter 1093C Satellite clocks under Windows.
* Make sure that the "filegen" configuration command defaults to "enable".
* Range-check the status codes (plus other cleanup) in the RIPE-NCC driver.
* Prohibit 'includefile' directive in remote configuration command.
* Fix 'nic' interface bindings.
* Fix the way we link with openssl if openssl is installed in the base
system.
ntp-keygen
* Fix -V coredump.
* OpenSSL version display cleanup.
ntpdc
* Many counters should be treated as unsigned.
ntpdate
* Do not ignore replies with equal receive and transmit timestamps.
ntpq
* libntpq warning cleanup.
ntpsnmpd
* Correct SNMP type for "precision" and "resolution".
* Update the MIB from the draft version to RFC-5907.
sntp
* Display timezone offset when showing time for sntp in the local
timezone.
* Pay proper attention to RATE KoD packets.
* Fix a miscalculation of the offset.
* Properly parse empty lines in the key file.
* Logging cleanup.
* Use tv_usec correctly in set_time().
* Documentation cleanup.
---
NTP 4.2.6p2 (Harlan Stenn <stenn@ntp.org>, 2010/07/08)
Focus: Bug fixes and portability improvements
Severity: Medium
This is a recommended upgrade.
This release includes build infrastructure updates, code
clean-ups, minor bug fixes, fixes for a number of minor
ref-clock issues, improved KOD handling, OpenSSL related
updates and documentation revisions.
Portability improvements in this release affect Irix, Linux,
Mac OS, Microsoft Windows, OpenBSD and QNX6
New features / changes in this release:
ntpd
* Range syntax for the trustedkey configuration directive
* Unified IPv4 and IPv6 restrict lists
ntpdate
* Rate limiting and KOD handling
ntpsnmpd
* default connection to net-snmpd via a unix-domain socket
* command-line 'socket name' option
ntpq / ntpdc
* support for the "passwd ..." syntax
* key-type specific password prompts
sntp
* MD5 authentication of an ntpd
* Broadcast and crypto
* OpenSSL support
---
NTP 4.2.6p1 (Harlan Stenn <stenn@ntp.org>, 2010/04/09)
Focus: Bug fixes, portability fixes, and documentation improvements
Severity: Medium
This is a recommended upgrade.
---
NTP 4.2.6 (Harlan Stenn <stenn@ntp.org>, 2009/12/08)
Focus: enhancements and bug fixes.
---
NTP 4.2.4p8 (Harlan Stenn <stenn@ntp.org>, 2009/12/08)
Focus: Security Fixes
@ -31,6 +535,14 @@ This release fixes the following high-severity vulnerability:
THIS IS A STRONGLY RECOMMENDED UPGRADE.
---
ntpd now syncs to refclocks right away.
Backward-Incompatible changes:
ntpd no longer accepts '-v name' or '-V name' to define internal variables.
Use '--var name' or '--dvar name' instead. (Bug 817)
---
NTP 4.2.4p7 (Harlan Stenn <stenn@ntp.org>, 2009/05/04)

View file

@ -9,19 +9,6 @@ The file "dot.emacs" has the emacs C-mode indentation style that Dave likes.
---
NTP4 uses ANSI C. Some folks are blessed with a pre-ansi C compiler. We
support them by using "ansi2knr" in the Makefiles, which is automatically
detected and selected by the configure process.
For ansi2knr to work, we MUST define functions as follows:
type stuff
function_name ( actual parameters )
While the whitespace is optional, the function name MUST start at column 0.
---
We'd like to see *all* system function declarations live in include/l_stdlib.h
and NEVER appear in the .c files.

View file

@ -15,7 +15,7 @@ bugfixes and drivers for new and exotic radios, telephones and sundials.
This distribution is normally available by anonymous ftp as the
compressed tar archive ntp-<version>.tar.gz in the pub/ntp directory on
huey.udel.edu and <version> is the version number. The current stable
and development version numbers can be found at <http://ntp.org>.
and development version numbers can be found at <http://www.ntp.org>.
A considerable amount of documentation, including build instructions,
configuration advice, program usage and miscellaneous information is
@ -35,7 +35,8 @@ files in the base directory of this distribution is in the README file.
A list of "significant" changes for the release is in the NEWS file.
If you're interested in helping us test pre-release versions of ntpd,
please look in <ftp://huey.udel.edu/pub/ntp/testing/>.
please visit http://support.ntp.org/downloads and look for RC and/or
Development tarballs.
David L. Mills (mills@udel.edu)
21 June 1998

6368
contrib/ntp/aclocal.m4 vendored

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,21 @@
AUTOMAKE_OPTIONS= ../util/ansi2knr
## adjtimed Makefile.am
bindir= ${exec_prefix}/${BINSUBDIR}
bin_PROGRAMS= @MAKE_ADJTIMED@
EXTRA_PROGRAMS= adjtimed
AM_CPPFLAGS= -I$(top_srcdir)/include
LDADD= ../libntp/libntp.a
ETAGS_ARGS= Makefile.am
bin_PROGRAMS = $(ADJTIMED_DB)
libexec_PROGRAMS = $(ADJTIMED_DL)
sbin_PROGRAMS = $(ADJTIMED_DS)
include ../bincheck.mf
BUILT_SOURCES =
CLEANFILES =
EXTRA_PROGRAMS = adjtimed
AM_CFLAGS = $(CFLAGS_NTP)
AM_CPPFLAGS = $(NTP_INCS)
AM_CPPFLAGS += $(CPPFLAGS_NTP)
LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
include $(top_srcdir)/bincheck.mf
include $(top_srcdir)/sntp/check-libntp.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf

View file

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@ -38,84 +38,165 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
ANSI2KNR = ../util/ansi2knr
bin_PROGRAMS =
libexec_PROGRAMS =
sbin_PROGRAMS =
EXTRA_PROGRAMS = adjtimed$(EXEEXT)
DIST_COMMON = README $(srcdir)/../bincheck.mf $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/bincheck.mf $(top_srcdir)/depsver.mf \
$(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf
subdir = adjtimed
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/define_dir.m4 \
$(top_srcdir)/m4/hs_ulong_const.m4 \
$(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
$(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
$(top_srcdir)/sntp/m4/ltoptions.m4 \
$(top_srcdir)/sntp/m4/ltsugar.m4 \
$(top_srcdir)/sntp/m4/ltversion.m4 \
$(top_srcdir)/sntp/m4/lt~obsolete.m4 \
$(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
$(top_srcdir)/sntp/m4/ntp_compiler.m4 \
$(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
$(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
$(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
$(top_srcdir)/sntp/m4/ntp_libevent.m4 \
$(top_srcdir)/sntp/m4/ntp_libntp.m4 \
$(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
$(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
$(top_srcdir)/sntp/m4/ntp_openssl.m4 \
$(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
"$(DESTDIR)$(sbindir)"
PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS) $(sbin_PROGRAMS)
adjtimed_SOURCES = adjtimed.c
adjtimed_OBJECTS = adjtimed$U.$(OBJEXT)
adjtimed_OBJECTS = adjtimed.$(OBJEXT)
adjtimed_LDADD = $(LDADD)
adjtimed_DEPENDENCIES = ../libntp/libntp.a
am__DEPENDENCIES_1 =
adjtimed_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = adjtimed.c
DIST_SOURCES = adjtimed.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARLIB_DIR = @ARLIB_DIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINSUBDIR = @BINSUBDIR@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
GTEST_CONFIG = @GTEST_CONFIG@
GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LCRYPTO = @LCRYPTO@
LD = @LD@
LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NLIST = @LDADD_NLIST@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
LDFLAGS_NTP = @LDFLAGS_NTP@
LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@ -123,6 +204,8 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
LTLIBOBJS = @LTLIBOBJS@
@ -134,15 +217,76 @@ MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
MAKE_NTPTIME = @MAKE_NTPTIME@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
NTPDATE_DB = @NTPDATE_DB@
NTPDATE_DL = @NTPDATE_DL@
NTPDATE_DS = @NTPDATE_DS@
NTPDATE_MS = @NTPDATE_MS@
NTPDATE_NI = @NTPDATE_NI@
NTPDC_DB = @NTPDC_DB@
NTPDC_DL = @NTPDC_DL@
NTPDC_DS = @NTPDC_DS@
NTPDC_MS = @NTPDC_MS@
NTPDC_NI = @NTPDC_NI@
NTPDSIM_DB = @NTPDSIM_DB@
NTPDSIM_DL = @NTPDSIM_DL@
NTPDSIM_DS = @NTPDSIM_DS@
NTPDSIM_MS = @NTPDSIM_MS@
NTPDSIM_NI = @NTPDSIM_NI@
NTPD_DB = @NTPD_DB@
NTPD_DL = @NTPD_DL@
NTPD_DS = @NTPD_DS@
NTPD_MS = @NTPD_MS@
NTPD_NI = @NTPD_NI@
NTPQ_DB = @NTPQ_DB@
NTPQ_DL = @NTPQ_DL@
NTPQ_DS = @NTPQ_DS@
NTPQ_MS = @NTPQ_MS@
NTPQ_NI = @NTPQ_NI@
NTPSNMPD_DB = @NTPSNMPD_DB@
NTPSNMPD_DL = @NTPSNMPD_DL@
NTPSNMPD_DS = @NTPSNMPD_DS@
NTPSNMPD_MS = @NTPSNMPD_MS@
NTPSNMPD_NI = @NTPSNMPD_NI@
NTPSWEEP_DB = @NTPSWEEP_DB@
NTPSWEEP_DL = @NTPSWEEP_DL@
NTPSWEEP_DS = @NTPSWEEP_DS@
NTPSWEEP_MS = @NTPSWEEP_MS@
NTPSWEEP_NI = @NTPSWEEP_NI@
NTPTIME_DB = @NTPTIME_DB@
NTPTIME_DL = @NTPTIME_DL@
NTPTIME_DS = @NTPTIME_DS@
NTPTIME_MS = @NTPTIME_MS@
NTPTIME_NI = @NTPTIME_NI@
NTPTRACE_DB = @NTPTRACE_DB@
NTPTRACE_DL = @NTPTRACE_DL@
NTPTRACE_DS = @NTPTRACE_DS@
NTPTRACE_MS = @NTPTRACE_MS@
NTPTRACE_NI = @NTPTRACE_NI@
NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
NTP_KEYSDIR = @NTP_KEYSDIR@
NTP_WAIT_DB = @NTP_WAIT_DB@
NTP_WAIT_DL = @NTP_WAIT_DL@
NTP_WAIT_DS = @NTP_WAIT_DS@
NTP_WAIT_MS = @NTP_WAIT_MS@
NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -150,29 +294,59 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
SNTP = @SNTP@
SNTP_DB = @SNTP_DB@
SNTP_DL = @SNTP_DL@
SNTP_DS = @SNTP_DS@
SNTP_MS = @SNTP_MS@
SNTP_NI = @SNTP_NI@
STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
TICKADJ_DB = @TICKADJ_DB@
TICKADJ_DL = @TICKADJ_DL@
TICKADJ_DS = @TICKADJ_DS@
TICKADJ_MS = @TICKADJ_MS@
TICKADJ_NI = @TICKADJ_NI@
TIMETRIM_DB = @TIMETRIM_DB@
TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = ${exec_prefix}/${BINSUBDIR}
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
@ -213,16 +387,20 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = ../util/ansi2knr
bin_PROGRAMS = @MAKE_ADJTIMED@
AM_CPPFLAGS = -I$(top_srcdir)/include
LDADD = ../libntp/libntp.a
ETAGS_ARGS = Makefile.am
all: all-am
BUILT_SOURCES = check-libntp .deps-ver
CLEANFILES = check-libntp .deps-ver
AM_CFLAGS = $(CFLAGS_NTP)
AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP)
LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
-I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
-I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../bincheck.mf $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -295,46 +473,127 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
} \
; done
uninstall-libexecPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
clean-libexecPROGRAMS:
@list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
} \
; done
uninstall-sbinPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
clean-sbinPROGRAMS:
@list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
adjtimed$(EXEEXT): $(adjtimed_OBJECTS) $(adjtimed_DEPENDENCIES)
@rm -f adjtimed$(EXEEXT)
$(LINK) $(adjtimed_OBJECTS) $(adjtimed_LDADD) $(LIBS)
$(AM_V_CCLD)$(LINK) $(adjtimed_OBJECTS) $(adjtimed_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
../util/ansi2knr:
$(am__cd) ../util && $(MAKE) $(AM_MAKEFLAGS) ./ansi2knr
mostlyclean-kr:
-test "$U" = "" || rm -f *_.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimed$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/adjtimed.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
adjtimed_.c: adjtimed.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/adjtimed.c; then echo $(srcdir)/adjtimed.c; else echo adjtimed.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
adjtimed_.$(OBJEXT) adjtimed_.lo : $(ANSI2KNR)
mostlyclean-libtool:
-rm -f *.lo
@ -425,13 +684,15 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
check: check-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(sbindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@ -448,6 +709,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@ -456,9 +718,11 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
clean-libtool clean-sbinPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@ -484,7 +748,8 @@ install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-exec-am: install-binPROGRAMS install-libexecPROGRAMS \
install-sbinPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
install-html: install-html-am
@ -514,7 +779,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr \
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
@ -525,37 +790,105 @@ ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
uninstall-am: uninstall-binPROGRAMS uninstall-libexecPROGRAMS \
uninstall-sbinPROGRAMS
.MAKE: ../util/ansi2knr install-am install-exec-am install-strip
.MAKE: all check install install-am install-exec-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-libtool ctags distclean distclean-compile \
clean-generic clean-libexecPROGRAMS clean-libtool \
clean-sbinPROGRAMS ctags distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-exec-hook \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-kr mostlyclean-libtool pdf pdf-am ps ps-am tags \
uninstall uninstall-am uninstall-binPROGRAMS
install-libexecPROGRAMS install-man install-pdf install-pdf-am \
install-ps install-ps-am install-sbinPROGRAMS install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-libexecPROGRAMS uninstall-sbinPROGRAMS
install-exec-hook:
@case ${BINSUBDIR} in \
bin) ODIR=${exec_prefix}/sbin ;; \
sbin) ODIR=${exec_prefix}/bin ;; \
esac; \
test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
|| for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
@test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
|| for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
test ! -f ${sbindir}/$$i \
|| echo "*** $$i is also in ${sbindir}!"; \
done
@test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
|| for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
test ! -f ${bindir}/$$i \
|| echo "*** $$i is also in ${bindir}!"; \
done
#
check-libntp: ../libntp/libntp.a
@echo stamp > $@
../libntp/libntp.a:
cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
$(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
mkdir $(DEPDIR) && \
case "$(top_builddir)" in \
.) \
./config.status Makefile depfiles \
;; \
*) \
cd "$(top_builddir)" && \
./config.status $(subdir)/Makefile depfiles && \
cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
# depsver.mf included in Makefile.am for directories with .deps
#
# When building in the same directory with sources that change over
# time, such as when tracking using bk, the .deps files can become
# stale with respect to moved, deleted, or superceded headers. Most
# commonly, this would exhibit as make reporting a failure to make a
# header file which is no longer in the location given. To address
# this issue, we use a deps-ver file which is updated with each change
# that breaks old .deps files. A copy of deps-ver is made into
# $(DEPDIR) if not already present. If $(DEPDIR)/deps-ver is present
# with different contents than deps-ver, we make clean to ensure all
# .o files built before the incompatible change are rebuilt along with
# their updated .deps files, then remove $(DEPDIR) and recreate it as
# empty stubs.
#
# It is normal when configured with --disable-dependency-tracking for
# the DEPDIR to not have been created. For this reason, we use the
# intermediate target .deps-ver, which invokes make recursively if
# DEPDIR exists.
#
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
# This comment block follows rather than leads the related code so that
# it stays with it in the generated Makefile.in and Makefile.
#
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,46 +0,0 @@
Replied: Fri, 16 Feb 2001 14:12:54 -0500
Replied: "Darren Reed <darrenr@reed.wattle.id.au> "
Received: from [139.134.6.79] by whimsy.udel.edu id aa15476;
16 Feb 2001 04:21 EST
Received: from CPE-61-9-164-106.vic.bigpond.net.au
([139.134.4.52]) by mailin6.bigpond.com (Netscape Messaging
Server 4.15) with SMTP id G8UFIB00.4QI for
<stenn@whimsy.udel.edu>; Fri, 16 Feb 2001 19:25:23 +1000
Received: from CPE-61-9-164-110.vic.bigpond.net.au ([61.9.164.110]) by mail5.bigpond.com (Claudes-Retiring-MailRouter V2.9c 9/11963672); 16 Feb 2001 19:20:45
Received: (from root@localhost)
by CPE-61-9-164-106.vic.bigpond.net.au (8.11.0/8.11.0) id f1G92GC29158
for <stenn@whimsy.udel.edu>; Fri, 16 Feb 2001 20:02:16 +1100
From: Darren Reed <darrenr@reed.wattle.id.au>
Message-Id: <200102160901.UAA23657@avalon.reed.wattle.id.au>
Subject: Re: arlib?
In-Reply-To: <901.982219274@whimsy.udel.edu> from Harlan Stenn at "Feb 15, 1 01:41:14 am"
To: Harlan Stenn <stenn@whimsy.udel.edu>
Date: Fri, 16 Feb 2001 20:01:46 +1100
X-Mailer: ELM [version 2.4ME+ PL37 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
In some email I received from Harlan Stenn, sie wrote:
> Darren,
>
> I'm looking for an async resolver library that I can use with NTP.
>
> I noticed your code in the contrib/ subdir of later bind8 distribution
> and I noticed the Copyright notice in arlib.c:
>
> * arlib.c (C)opyright 1993 Darren Reed. All rights reserved.
> * This file may not be distributed without the author's permission in any
> * shape or form. The author takes no responsibility for any damage or loss
> * of property which results from the use of this software.
>
> so I thought I'd ask your permission to distribute your files if I can
> figure out how to make it all work with ntpd.
http://coombs.anu.edu.au/~avalon/arlib.tar.gz
a few bug fixes (inc. buffer overflow :) and stuff in there.
But otherwise, go for it.
Darren

View file

@ -1,182 +0,0 @@
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

View file

@ -1,15 +0,0 @@
AUTOMAKE_OPTIONS = foreign # ansi2knr
#lib_LIBRARIES = libares.a
noinst_LIBRARIES = libares.a
libares_a_SOURCES = arlib.c arplib.h
#include_HEADERS = arlib.h
noinst_HEADERS = arlib.h
noinst_PROGRAMS = example
example_SOURCES = sample.c
example_LDADD = libares.a
#man_MANS = arlib.3
#EXTRA_DIST = $(man_MANS) UNSHAR.HDR
noinst_MANS = arlib.3
EXTRA_DIST = $(noinst_MANS) UNSHAR.HDR

View file

@ -1,580 +0,0 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
noinst_PROGRAMS = example$(EXEEXT)
subdir = .
DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/configure COPYING INSTALL depcomp install-sh \
missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = @AR@
ARFLAGS = @ARFLAGS@
libares_a_AR = $(AR) $(ARFLAGS)
libares_a_LIBADD =
am_libares_a_OBJECTS = arlib.$(OBJEXT)
libares_a_OBJECTS = $(am_libares_a_OBJECTS)
PROGRAMS = $(noinst_PROGRAMS)
am_example_OBJECTS = sample.$(OBJEXT)
example_OBJECTS = $(am_example_OBJECTS)
example_DEPENDENCIES = libares.a
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libares_a_SOURCES) $(example_SOURCES)
DIST_SOURCES = $(libares_a_SOURCES) $(example_SOURCES)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EXEEXT = @EXEEXT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign # ansi2knr
#lib_LIBRARIES = libares.a
noinst_LIBRARIES = libares.a
libares_a_SOURCES = arlib.c arplib.h
#include_HEADERS = arlib.h
noinst_HEADERS = arlib.h
example_SOURCES = sample.c
example_LDADD = libares.a
#man_MANS = arlib.3
#EXTRA_DIST = $(man_MANS) UNSHAR.HDR
noinst_MANS = arlib.3
EXTRA_DIST = $(noinst_MANS) UNSHAR.HDR
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
libares.a: $(libares_a_OBJECTS) $(libares_a_DEPENDENCIES)
-rm -f libares.a
$(libares_a_AR) libares.a $(libares_a_OBJECTS) $(libares_a_LIBADD)
$(RANLIB) libares.a
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
example$(EXEEXT): $(example_OBJECTS) $(example_DEPENDENCIES)
@rm -f example$(EXEEXT)
$(LINK) $(example_OBJECTS) $(example_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arlib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sample.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS ctags \
dist dist-all dist-bzip2 dist-gzip dist-lzma dist-shar \
dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-compile distclean-generic distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -1,49 +0,0 @@
Asynchronous DNS
----------------
Intro.
For those who write real time network applications that have to handle
multiple TCP or UDP connections, the problem of effectively doing DNS
lookups is quite real. Generally, this means the program waits while
the query finishes, holding everything else up. This small library of
routines aims to solve that problem by performing the DNS query and
then returning the program to its normal flow.
Whats included ?
The library routines, arlib.c, a header file for it, arlib.h, a man
page, arlib.3 and an example of how this sort of code is used,
sample.c.
Compilation & Installation.
Edit the Makefile and do "make install" to install things where you
wish them to go. You should check it makes and works before doing
this :)
If the compilation is successful, you'll have an executeable called
"example" and libares.a. "example" is a simple program which will
do hostname->IP# or IP#->hostnae lookups by entering either the
hostname or IP# on the line with "Host-->". You dont have to wait
for a query to fail or succeed before typing in the next line.
Portability.
I'm not sure how portable this is, it was written under SunOS 4.1.2
on a Sparc 1+ and hasn't been tested very widely. If you find any
problems when compiling/execution, plase send me a patch (using
diff -c) to avalon@coombs.anu.edu.au. If it goes well enough, I'll
send it to comp.unix.sources or comp.sources.misc for further testing.
Future additions.
Adding a working cache would be nice but I'm not sure if that really
is needed (?). I guess it depends on how often your program is
required to do a DNS lookup and whether caching would help.
Cheers,
Darren.

View file

@ -1,32 +0,0 @@
Replied: Sun, 19 Dec 93 09:58:30 PST
Replied: "Darren Reed <avalon@coombs.anu.edu.au> "
Return-Path: avalon@coombs.anu.edu.au
Received: by gw.home.vix.com id AA12017; Sun, 19 Dec 93 07:04:44 -0800
Message-Id: <9312191504.AA12017@gw.home.vix.com>
Received: by coombs.anu.edu.au
(1.37.109.8/16.2) id AA10850; Mon, 20 Dec 1993 02:07:21 +1100
From: Darren Reed <avalon@coombs.anu.edu.au>
Subject: Addition for 4.9 "contrib" directory
To: paul@vix.com
Date: Mon, 20 Dec 1993 02:07:20 +1000 (EDT)
X-Mailer: ELM [version 2.4 PL21]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 67950
Well, I just sent one letter off to dec.com, being from the 4.9 README I had.
So, to sum up what I said, I've included below, some code I've written to
perform async. DNS lookups - `replacements' for gethostbyname and
gethostbyaddr. I've written and tested it mainly on a HP-UX machine, so
I'm not sure how it will port to others, but I've tried to keep the amount
of OS specific code to a minimum.
The Makefile is setup to work best from "contrib/arlib", which is how I
checked to make sure it worked and ran well. There's a man page included
also.
Cheers,
Darren

View file

@ -1,230 +0,0 @@
.TH arlib 3
.SH NAME
ar_answer, ar_close, ar_delete, ar_gethostbyname, ar_gethostbyaddr,
ar_init, ar_open, ar_timeout - Asynchronous DNS library routines
.SH SYNOPSIS
.nf
.B #include "arlib.h"
.B struct hostent *ar_answer(dataptr, size)
.B char *dataptr;
.B int size;
.B void ar_close();
.B int ar_delete(dataptr, size)
.B char *dataptr;
.B int size;
.B int ar_gethostbyname(name, dataptr, size)
.B char *name;
.B char *dataptr;
.B int size;
.B int ar_gethostbyaddr(name, dataptr, size)
.B char *name;
.B char *dataptr;
.B int size;
.B int ar_init(flags)
.B int flags;
.B int ar_open();
.B long ar_timeout(time, dataptr, size)
.B long time;
.B char *dataptr;
.B int size;
.fi
.SH DESCRIPTION
.PP
This small library of DNS routines is intended to provide an
asynchronous interface to performing hostname and IP number lookups.
Only lookups of Internet domain are handled as yet. To use this
set of routines properly, the presence of the
.B "BIND 4.8"
resolve
libraries is required (or any library derived from it).
.PP
This library should be used in conjunction with
.B select(2)
to wait for
the name server's reply to arrive or the lookup to timeout.
.PP
To open a fd for talking to the name server, either
.B ar_open()
or
ar_init()
must be used.
.B ar_open()
will open either a datagram socket
or a virtual circuit with the name server, depending on the flags
set in the _res structure (see
.B resolv(5)
). In both cases, if the socket
> i
.B ar_init()
is
used to both open the socket (as in
.B ar_open()
) and initialize the
queues used by this library. The values recognized as parameters to
.B ar_init()
are:
.RS
#define ARES_INITLIST 1
.RE
.RS
#define ARES_CALLINIT 2
.RE
.RS
#define ARES_INITSOCK 4
.RE
.RS
#define ARES_INITDEBG 8
.RE
ARES_INITLIST initializes the list of queries waiting for replies.
ARES_CALLINIT is a flag which when set causes
.B res_init()
to be called.
ARES_INITSOCK will close the current socket if it is open and call
.B ar_open()
to open a new one, returning the fd for that socket.
ARES_INITDEBG sets the RES_DEBUG flag of the
.B _res
structure.
ARES_INITCACH is as yet, unused and is for future use where the library
keeps its own cache of replies.
To send a query about either a hostname or an IP number,
.B ar_gethostbyname()
and
.B ar_gethostbyaddr()
must be used. Each takes
either a pointer to the hostname or the IP number respectively for use
when making the query. In addition to this, both (optionally) can be
passed a pointer to data, dataptr, with the size also passed which can
be used for identifying individual queries. A copy of the area pointed
to is made if dataptr is non NULL and size is non zero. These functions
will always return NULL unless the answer to the query is found in
internal caches. A new flag, RES_CHECKPTR is checked during the
processing of answers for
.B ar_gethostbyname()
which will automatically
cause a reverse lookup to be queued, causing a failure if that reply
differs from the original.
To check for a query,
.B ar_answer()
is called with a pointer to an area
of memory which is sufficient to hold what was originally passed via
.B ar_gethostbyname()
or
.B ar_gethostbyaddr()
through dataptr. If an answer
is found, a pointer to the host information is returned and the data
segment copied if dataptr is non NULL and it was originally passed. The
size of the copied data is the smaller of the passed size and that of
original data stored.
To expire old queries,
.B ar_timeout()
is called with the 'current' time
(or the time for which you want to do timeouts for). If a queue entry
is too old, it will be expired when it has exhausted all available avenues
for lookups and the data segment for the expired query copied into
dataptr. The size of the copied data is the smaller of the passed size
and that of the original stored data. Only 1 entry is thus expired with
each call, requiring that it be called immediately after an expiration
to check for others. In addition to expiring lookups,
.B ar_timeout()
also
triggers resends of queries and the searching of the domain tree for the
host, the latter works from the
.B _res
structure of
.B resolv(5).
To delete entries from the queue,
.B ar_delete()
can be used and by
passing the pointer and size of the data segment, all queries have their
data segments checked (if present) for an exact match, being deleted if
and only if there is a match. A NULL pointer passed to ar_deleted()
matches all queries which were called with a NULL dataptr parameter.
The amount of data compared is the smaller of the size passed and that
of the data stored for the queue entry being compared.
To close a socket opened by
.B ar_open()
,
.B ar_close()
should be used so
that it is closed and also marked closed within this library.
.SH DIAGNOSIS
.B ar_open()
returns -1 if a socket isn't open and could not be opened;
otherwise returns the current fd open or the fd it opened.
.B ar_init()
returns -1 for any errors, the value returned by
.B res_init()
if
.B res_init()
was called, the return value for
.B ar_open()
if that was
called or the current socket open if 0 is passed and a socket is open.
If neither
.B res_init()
or
.B ar_open()
are called and the flags are non-zero, -2 is returned.
.B ar_gethostbyaddr()
and
.B ar_gethostbyname()
will always return NULL in this version but may return a pointer to a hostent
structure if a cache is being used and the answer is found in the cache.
.B ar_answer()
returns NULL if the answer is either not found or the
query returned an error and another attempt at a lookup is attempted.
If an answer was found, it returned a pointer to this structure and
the contents of the data segment copied over.
.B ar_timeout()
returns the time when it should be called next or 0 if
there are no queries in the queue to be checked later. If any queries
are expired, the data segment is copied over if dataptr is non NULL.
.B ar_delete()
returns the number of entries that were found to match
and consequently deleted.
.SH SEE ALSO
gethostbyaddr(3), gethostbyname(3), resolv(5)
.SH FILES
.nf
arlib.h
/usr/include/resolv.h
/usr/include/arpa/nameser.h
/etc/resolv.conf
.SH BUGS
The results of a successful call to ar_answer() destroy the structure
for any previous calls.
.SH AUTHOR
Darren Reed. Email address: avalon@coombs.anu.edu.au

File diff suppressed because it is too large Load diff

View file

@ -1,29 +0,0 @@
/*
* arlib.h (C)opyright 1992 Darren Reed.
*/
#define ARES_INITLIST 1
#define ARES_CALLINIT 2
#define ARES_INITSOCK 4
#define ARES_INITDEBG 8
#define ARES_INITCACH 16
#ifdef __STDC__
extern struct hostent *ar_answer(char *, int);
extern void ar_close();
extern int ar_delete(char *, int);
extern int ar_gethostbyname(char *, char *, int);
extern int ar_gethostbyaddr(char *, char *, int);
extern int ar_init(int);
extern int ar_open();
extern long ar_timeout(time_t, char *, int);
#else
extern struct hostent *ar_answer();
extern void ar_close();
extern int ar_delete();
extern int ar_gethostbyname();
extern int ar_gethostbyaddr();
extern int ar_init();
extern int ar_open();
extern long ar_timeout();
#endif

View file

@ -1,45 +0,0 @@
/*
* arplib.h (C)opyright 1992 Darren Reed.
*/
#define MAXPACKET 1024
#define MAXALIASES 35
#define MAXADDRS 35
#define RES_CHECKPTR 0x0400
struct hent {
char *h_name; /* official name of host */
char *h_aliases[MAXALIASES]; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
/* list of addresses from name server */
struct in_addr h_addr_list[MAXADDRS];
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
};
struct resinfo {
char *ri_ptr;
int ri_size;
};
struct reslist {
int re_id;
char re_type;
char re_retries;
char re_resend; /* send flag. 0 == dont resend */
char re_sends;
char re_srch;
int re_sent;
u_long re_sentat;
u_long re_timeout;
struct in_addr re_addr;
struct resinfo re_rinfo;
struct hent re_he;
struct reslist *re_next, *re_prev;
char re_name[65];
};
#ifndef MIN
#define MIN(a,b) ((a) > (b) ? (b) : (a))
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,57 +0,0 @@
# Process this file with autoconf to produce a configure script.
AC_INIT
AM_INIT_AUTOMAKE(arlib, 1.0)
AC_CONFIG_SRCDIR([arlib.c])
#AM_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
# Checks for libraries.
AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
AC_CHECK_FUNC(res_init, , AC_CHECK_LIB(resolv, res_init))
# Checks for header files.
dnl AC_CHECK_HEADERS([errno.h fcntl.h netdb.h netinet/in.h strings.h sys/socket.h sys/time.h])
# Checks for typedefs, structures, and compiler characteristics.
dnl AC_HEADER_TIME
AC_CHECK_TYPE(u_int32_t, ,
[AC_DEFINE(u_int32_t, [unsigned int], [Unsigned 32-bit type])],[
#include <sys/types.h>
#include <netinet/in.h>])
AC_CACHE_CHECK([for name of NS address list], [ac_cv_var_ns_addr_list],
[ans=''
# Normal
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>], [ return sizeof(_res.nsaddr_list);],
[ans=nsaddr_list],
[# Ultrix
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>], [ return sizeof(_res.ns_list);],
[ans=ns_list])])
case "$ans" in
'') AC_MSG_RESULT([???])
AC_MSG_ERROR([Can't find nameserver address list in _res])
;;
esac
ac_cv_var_ns_addr_list=$ans])
AC_DEFINE_UNQUOTED(NS_ADDR_LIST, $ans, [The name of the NS address list in _res])
# Checks for library functions.
dnl AC_HEADER_STDC
dnl AC_FUNC_MALLOC
dnl AC_CHECK_FUNCS([bzero inet_ntoa select socket])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View file

@ -1,323 +0,0 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-05-14.22
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

View file

@ -1,143 +0,0 @@
#include <stdio.h>
#include <strings.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <netdb.h>
#include "arlib.h"
#ifndef lint
static char sccsid[] = "@(#)sample.c 1.1 12/21/92 (C)1992 Darren Reed. ASYNC DNS";
#endif
char line[512];
int lookup = 0, seq = 0;
long expire = 0;
main()
{
struct in_addr adr;
struct timeval tv2;
fd_set rd;
long now;
char *s;
int afd, nfd, pid = getpid(), del;
afd = ar_init(ARES_INITLIST|ARES_CALLINIT|ARES_INITSOCK);
(void)printf("afd = %d pid = %d\n",afd, pid);
while (1)
{
(void)printf("Host =>");
(void)fflush(stdout);
*line = '\0';
FD_ZERO(&rd);
FD_SET(0,&rd);
FD_SET(afd,&rd);
now = time(NULL);
if (expire >= now)
{
tv2.tv_usec = 0;
tv2.tv_sec = expire - now;
nfd = select(FD_SETSIZE, &rd, NULL, NULL, &tv2);
}
else
nfd = select(FD_SETSIZE, &rd, NULL, NULL, NULL);
if (FD_ISSET(0, &rd))
{
if (!fgets(line, sizeof(line) - 1, stdin))
exit(0);
if (s = index(line, '\n'))
*s = '\0';
}
if (isalpha(*line))
{
(void)printf("Asking about [%s] #%d.\n",line, ++seq);
(void)ar_gethostbyname(line, (char *)&seq,
sizeof(seq));
lookup++;
}
else if (isdigit(*line))
{
(void)printf("Asking about IP#[%s] #%d.\n",
line, ++seq);
adr.s_addr = inet_addr(line);
(void)ar_gethostbyaddr(&adr, (char *)&seq,
sizeof(seq));
lookup++;
}
if (lookup)
(void)printf("Waiting for answer:\n");
if (FD_ISSET(afd, &rd))
(void)waitonlookup(afd);
del = 0;
expire = ar_timeout(time(NULL), &del, sizeof(del));
if (del)
{
(void)fprintf(stderr,"#%d failed\n", del);
lookup--;
}
}
}
printhostent(hp)
struct hostent *hp;
{
struct in_addr ip;
int i;
(void)printf("hname = %s\n", hp->h_name);
for (i = 0; hp->h_aliases[i]; i++)
(void)printf("alias %d = %s\n", i+1, hp->h_aliases[i]);
for (i = 0; hp->h_addr_list[i]; i++)
{
bcopy(hp->h_addr_list[i], (char *)&ip, sizeof(ip));
(void)printf("IP# %d = %s\n", i+1, inet_ntoa(ip));
}
}
int waitonlookup(afd)
int afd;
{
struct timeval delay;
struct hostent *hp;
fd_set rd;
long now;
int nfd, del;
waitloop:
FD_ZERO(&rd);
now = time(NULL);
if (expire >= now)
delay.tv_sec = expire - now;
else
delay.tv_sec = 1;
delay.tv_usec = 0;
FD_SET(afd, &rd);
FD_SET(0, &rd);
nfd = select(FD_SETSIZE, &rd, 0, 0, &delay);
if (nfd == 0)
return 0;
else if (FD_ISSET(afd, &rd))
{
del = 0;
hp = ar_answer(&del, sizeof(del));
(void)printf("hp=%x seq=%d\n",hp,del);
if (hp)
{
(void)printhostent(hp);
if (!--lookup)
return 1;
}
}
if (FD_ISSET(0, &rd))
return 2;
return 0;
}

View file

@ -3,13 +3,15 @@
# subdir to warn folks if there is another version there.
install-exec-hook:
@case ${BINSUBDIR} in \
bin) ODIR=${exec_prefix}/sbin ;; \
sbin) ODIR=${exec_prefix}/bin ;; \
esac; \
test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
|| for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \
@test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \
|| for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \
test ! -f ${sbindir}/$$i \
|| echo "*** $$i is also in ${sbindir}!"; \
done
@test -z "${sbin_PROGRAMS}${asbin_SCRIPTS}" \
|| for i in ${sbin_PROGRAMS} ${sbin_SCRIPTS} " "; do \
test ! -f ${bindir}/$$i \
|| echo "*** $$i is also in ${bindir}!"; \
done
#

View file

@ -3,6 +3,8 @@
# This "bootstrap" script performs various pre-autoreconf actions
# that are required after pulling fresh sources from the repository.
#
# --force is supported and will be passed to autoreconf
#
# NOTE: THE NTP VERSION NUMBER COMES FROM packageinfo.sh
#
# all other instances of it anywhere in the source base have propagated
@ -27,7 +29,8 @@
set -e
scripts/genver
(cd sntp && ../scripts/build/genver) || {
echo scripts/build/genver failed ; exit 1; }
# autoreconf says:
# The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
@ -35,17 +38,17 @@ scripts/genver
AUTORECONF=${AUTORECONF:-autoreconf}
case `hostname` in
pogo.udel.edu)
if fgrep -q 4.2.4 version.m4; then
AUTOCONF=autoconf-2.59
AUTOHEADER=autoheader-2.59
AUTOMAKE=automake-1.9
ACLOCAL=aclocal-1.9
export AUTOCONF AUTOHEADER AUTOMAKE ACLOCAL
fi
;;
esac
# case `hostname` in
# pogo.udel.edu)
# if fgrep -q 4.2.4 sntp/m4/version.m4; then
# AUTOCONF=autoconf-2.59
# AUTOHEADER=autoheader-2.59
# AUTOMAKE=automake-1.9
# ACLOCAL=aclocal-1.9
# export AUTOCONF AUTOHEADER AUTOMAKE ACLOCAL
# fi
# ;;
# esac
# 20060629: HMS: Let's try checking in libopts and the autogen-generated files
## The copy for ntp...
@ -78,38 +81,86 @@ prog_opt_files=`grep -l '^prog.name' $def_files`
## Non-AutoGen stuff
for i in autogen-version.def version.def
do
cmp -s include/$i sntp/$i || cp -p include/$i sntp/$i
done
# touch the stuff generated by the opt files
l=
lh=
li=
for f in ${prog_opt_files}
do
f=`echo $f | sed -e 's/-opts.def//'`
l=
for i in `ls -1 $f*`
f=`echo $f | sed -e 's/-opts.def//' -e 's/.def//'`
dfi=`dirname $f`
dfi=`echo $dfi | sed -e 's:$:/invoke-*:'`
for i in `ls -1 $f* $dfi`
do
case "$i" in
*.c|*.h|*.1|*.texi|*.menu)
*invoke-*)
li="$li $i"
;;
*.c|*.h|*.[1-9]*man|*.[1-9]*mdoc|*.man.in|*.mdoc.in|*-opts|*.texi|*.menu)
l="$l $i"
;;
*.html)
lh="$lh $i"
;;
esac
done
case "$l" in
'') ;;
*) touch $l
;;
esac
done
case "$l" in
'') ;;
*) touch $l
echo "Touching <$l>"
sleep 1
;;
esac
case "$li" in
'') ;;
*) touch $li
echo "Touching <$li>"
sleep 1
;;
esac
case "$lh" in
'') ;;
*) touch $lh
echo "Touching <$lh>"
;;
esac
## EOAutoGen stuff
# Yacc/bison files ntp_parser.[ch] so we don't require the tool if
# ntp_parser.y hasn't been updated. At the same time, keyword-gen-utd
# and ntp_keyword.h which are derived from ntp_parser.h and
# keyword-gen.c.
touch ntpd/ntp_parser.[ch] ntpd/keyword-gen-utd ntpd/ntp_keyword.h
cp bincheck.mf sntp/
cp depsver.mf sntp/
${AUTORECONF} -i -v
${AUTORECONF} -i -v "$@"
# Because some systems do not support 'test a -nt b'
case `ls -1tr config.h.in aclocal.m4 | tail -1` in
aclocal.m4) touch config.h.in ;;
esac
case `ls -1tr sntp/config.h.in sntp/aclocal.m4 | tail -1` in
sntp/aclocal.m4) touch sntp/config.h.in ;;
esac
case `ls -1tr sntp/libevent/config.h.in sntp/libevent/aclocal.m4 | tail -1` in
sntp/libevent/aclocal.m4) touch sntp/libevent/config.h.in ;;
esac
# DH: 20110118: Due to our workaround for the AM_COND_IF bug that was
# triggering the buggy recursive autoreconf, we can once again use a
# single autoreconf invocation. See
# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7860
# DH: 20101120: We are back to a single copy of libopts, and
# once again it seems we need to run autoreconf in sntp after
# the top-level run to get a correct sntp/libopts/Makefile.in.
# To reduce redundancy, the top-level autoreconf uses --no-recursive.
#
# HMS: 20060618: Now that we use separate copies of libopts
# we should only need the previous line.
#
@ -117,4 +168,4 @@ ${AUTORECONF} -i -v
## we get the correct srcdir path in sntp/libopts/Makefile.in
#rm -rf sntp/autom4te.cache
#
#(cd sntp && ${AUTORECONF} -i -v)
# (cd sntp && ${AUTORECONF} -i -v "$@")

View file

@ -18,8 +18,8 @@ case "$1" in
echo "This is <`pwd`>"
echo "SIG is <$SIG>"
echo "KEY is <$KEY>"
exit 1
;;
exit 1
;;
esac
;;
*)
@ -30,26 +30,58 @@ esac
#set -e
#set -x
CVO=`./config.guess`
if [ ! -r sntp/libevent/build-aux/config.guess ] ; then
echo "Error: bootstrap required." 1>&2 && exit 1
fi
# sntp/scripts/cvo.sh invokes config.guess, and we want it to use the copy
# in the build-aux directory if there's not another config.guess earlier
# on the path, so we invoke it using env to append to the PATH.
CVO=`env PATH="$PATH:./sntp/libevent/build-aux" sntp/scripts/cvo.sh @cvo@`
case "$CVO" in
*-*-*-*) echo "sntp/scripts/cvo.sh returned <$CVO>, which makes no sense to me."
exit 1
;;
*-*-*) ;;
*) echo "config.guess returned <$CVO>, which makes no sense to me."
*) echo "sntp/scripts/cvo.sh returned <$CVO>, which makes no sense to me."
exit 1
;;
esac
case "$IAM" in
*.udel.edu)
BDIR=A.$MYNAME
CONFIG_ARGS="$CONFIG_ARGS --enable-local-libopts"
case "$CVO" in
*-*-ultrix*)
CONFIG_ARGS="$CONFIG_ARGS --with-libregex=/usr/local"
case "$NTP_BDIR" in
'')
case "$IAM" in
*.ntp.org)
NTP_BDIR=host
;;
esac
*.udel.edu)
NTP_BDIR=host
# HMS: --enable-local-libopts is the default now...
#CONFIG_ARGS="$CONFIG_ARGS --enable-local-libopts"
case "$CVO" in
*-*-ultrix*)
CONFIG_ARGS="$CONFIG_ARGS --with-libregex=/usr/local"
;;
esac
;;
*)
NTP_BDIR=cvo
;;
esac
;;
esac
case "$NTP_BDIR" in
host)
BASEDIR=A.$MYNAME
;;
cvo)
BASEDIR=A.$CVO
;;
*)
BDIR=A.$CVO
echo "build: NTP_BDIR must be either 'cvo' or 'host'!" 1>&2
exit 1
;;
esac
@ -76,15 +108,16 @@ case "$CONFIG_ARGS" in
;;
esac
CCSUF=""
case "$CC" in
'') ;;
*) CCSUF="-$CC"
'')
CCSUF=""
;;
*)
CCSUF="-`echo $CC | sed -e 's: :_:g' -e's:/:+:g'`"
;;
esac
BDIR="$BDIR$KEYSUF$CCSUF"
BDIR="$BASEDIR$KEYSUF$CCSUF"
[ -d "$BDIR" ] || mkdir $BDIR
[ -f "$BDIR/.buildcvo" ] || echo $CVO > $BDIR/.buildcvo
@ -94,29 +127,78 @@ BDIR="$BDIR$KEYSUF$CCSUF"
cd $BDIR
#
# make sure we have a nice that works,
# Make sure we have a nice that works.
# To disable use of nice, setenv NO_NICE_BUILD=1
#
nice true && NICEB=nice
nice true || NICEB=./.nicebuild-$MYNAME-$SIG && (
cat > .nicebuild-$MYNAME-$SIG <<UNLYKUHLY
#! /bin/sh
shift
\$*
UNLYKUHLY
chmod +x .nicebuild-$MYNAME-$SIG
)
NICEB=
[ "$NO_NICE_BUILD" != "1" ] && nice true && NICEB=nice
[ -z "$NICEB" ] && {
NICEB="./.nicebuild-$MYNAME-$SIG"
cat > $NICEB <<-HEREDOC
#! /bin/sh
shift
\$*
HEREDOC
chmod +x $NICEB
}
#
# Find a test which supports -nt, unlike Solaris /bin/sh builtin.
#
TEST="${TEST-}"
if [ -z "$TEST" ] ; then
for try in test /bin/test /usr/bin/test ; do
case `$try config.status -nt ../configure 2>&1` in
'')
TEST="$try"
# echo "Using $TEST"
break
;;
esac
done
if [ -z "$TEST" ] ; then
echo "build: need help finding test binary" 1>&2
exit 1
fi
fi
CONFIGURE="../configure"
# We need KEYSUF because of RAND_ and others, and -noopenssl"
#CONFIGURE="$CONFIGURE --cache-file=../config.cache-$IAM$KEYSUF$CCSUF"
CONFIGURE="$CONFIGURE $CONFIG_ARGS"
(
[ -f config.status ] || $NICEB -7 ../configure --config-cache \
$CONFIG_ARGS
( # This sequence of commands is logged to make.log.
# If config.status is newer than ../configure, and the same
# is true for sntp, we do not need to re-run configure.
# For libevent, the twist is we may not be configuring the
# tearoff, so only act if its config.status exists.
# Solaris /bin/sh doesn't grok -nt.
$NICEB -5 ./config.status
case "$MAKE" in
'') $NICEB -14 make && $NICEB -10 make check
;;
*) $NICEB -14 $MAKE && $NICEB -10 $MAKE check
;;
esac
( "$TEST" config.status -nt ../configure &&
"$TEST" sntp/config.status -nt ../sntp/configure &&
( "$TEST" '!' -f sntp/libevent/config.status ||
"$TEST" sntp/libevent/config.status -nt ../sntp/libevent/configure ) ) ||
"$NICEB" -7 $CONFIGURE
"$TEST" Makefile -nt config.status ||
"$NICEB" -5 ./config.status
"$TEST" sntp/Makefile -nt sntp/config.status ||
( cd sntp && "$NICEB" -5 ./config.status )
"$TEST" '!' -f sntp/libevent/Makefile ||
"$TEST" sntp/libevent/Makefile -nt sntp/libevent/config.status ||
( cd sntp/libevent && "$NICEB" -5 ./config.status )
"$NICEB" -14 ${MAKE-make} && "$NICEB" -11 ${MAKE-make} check
) > $LOGF 2>&1
EXITCODE=$?
# clean up if we made a dummy nice script
case "$NICEB" in
nice)
;;
*)
rm "$NICEB"
;;
esac
exit $EXITCODE

View file

@ -0,0 +1,14 @@
## check-libopts.mf - automake fragment
##
## If we are not using the tearoff libopts, we won't be
## building its libopts.la, so the submake is allowed
## to fail.
BUILT_SOURCES += check-libopts
CLEANFILES += check-libopts
check-libopts: ../sntp/libopts/libopts.la
@echo stamp > $@
../sntp/libopts/libopts.la:
-cd ../sntp/libopts && $(MAKE) $(AM_MAKEFLAGS) libopts.la

View file

@ -1,18 +1,17 @@
#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
EXTRA_PROGRAMS = propdelay chutest clktest
noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@
EXTRA_PROGRAMS = propdelay chutest
INCLUDES = -I$(top_srcdir)/include
# We need -lm (and perhaps $(COMPAT) for propdelay, -lntp for {chu,clk}test
propdelay_LDADD = -lm ../libntp/libntp.a
chutest_LDADD = ../libntp/libntp.a
clktest_LDADD = ../libntp/libntp.a
ETAGS_ARGS = Makefile.am
#EXTRA_DIST = TAGS
AM_CFLAGS = $(CFLAGS_NTP)
# clktest-opts.def wants ../include/copyright.def ../include/homerc.def
AM_CPPFLAGS = $(NTP_INCS)
AM_CPPFLAGS += $(CPPFLAGS_NTP)
chutest$(EXEEXT): ../libntp/libntp.a
LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
propdelay_LDADD = $(LDADD)
clktest$(EXEEXT): ../libntp/libntp.a
BUILT_SOURCES =
CLEANFILES =
include $(top_srcdir)/sntp/check-libntp.mf
include $(top_srcdir)/depsver.mf
include $(top_srcdir)/includes.mf

View file

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.11 from Makefile.am.
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@ -34,16 +34,47 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
ANSI2KNR = ../util/ansi2knr
EXTRA_PROGRAMS = propdelay$(EXEEXT) chutest$(EXEEXT) clktest$(EXEEXT)
EXTRA_PROGRAMS = propdelay$(EXEEXT) chutest$(EXEEXT)
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf \
$(top_srcdir)/sntp/check-libntp.mf
subdir = clockstuff
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/libopts/m4/libopts.m4 \
$(top_srcdir)/m4/define_dir.m4 \
$(top_srcdir)/m4/hs_ulong_const.m4 \
$(top_srcdir)/m4/os_cflags.m4 $(top_srcdir)/version.m4 \
$(top_srcdir)/configure.ac
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
$(top_srcdir)/sntp/libevent/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
$(top_srcdir)/sntp/m4/ltoptions.m4 \
$(top_srcdir)/sntp/m4/ltsugar.m4 \
$(top_srcdir)/sntp/m4/ltversion.m4 \
$(top_srcdir)/sntp/m4/lt~obsolete.m4 \
$(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
$(top_srcdir)/sntp/m4/ntp_compiler.m4 \
$(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
$(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
$(top_srcdir)/sntp/m4/ntp_googletest.m4 \
$(top_srcdir)/sntp/m4/ntp_ipv6.m4 \
$(top_srcdir)/sntp/m4/ntp_lib_m.m4 \
$(top_srcdir)/sntp/m4/ntp_libevent.m4 \
$(top_srcdir)/sntp/m4/ntp_libntp.m4 \
$(top_srcdir)/sntp/m4/ntp_lineeditlibs.m4 \
$(top_srcdir)/sntp/m4/ntp_locinfo.m4 \
$(top_srcdir)/sntp/m4/ntp_openssl.m4 \
$(top_srcdir)/sntp/m4/ntp_pkg_config.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@ -52,69 +83,116 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
chutest_SOURCES = chutest.c
chutest_OBJECTS = chutest$U.$(OBJEXT)
chutest_DEPENDENCIES = ../libntp/libntp.a
clktest_SOURCES = clktest.c
clktest_OBJECTS = clktest$U.$(OBJEXT)
clktest_DEPENDENCIES = ../libntp/libntp.a
chutest_OBJECTS = chutest.$(OBJEXT)
chutest_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
chutest_DEPENDENCIES = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
propdelay_SOURCES = propdelay.c
propdelay_OBJECTS = propdelay$U.$(OBJEXT)
propdelay_DEPENDENCIES = ../libntp/libntp.a
propdelay_OBJECTS = propdelay.$(OBJEXT)
am__DEPENDENCIES_2 = ../libntp/libntp.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
propdelay_DEPENDENCIES = $(am__DEPENDENCIES_2)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = chutest.c clktest.c propdelay.c
DIST_SOURCES = chutest.c clktest.c propdelay.c
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = chutest.c propdelay.c
DIST_SOURCES = chutest.c propdelay.c
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARLIB_DIR = @ARLIB_DIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINSUBDIR = @BINSUBDIR@
CALC_TICKADJ_DB = @CALC_TICKADJ_DB@
CALC_TICKADJ_DL = @CALC_TICKADJ_DL@
CALC_TICKADJ_DS = @CALC_TICKADJ_DS@
CALC_TICKADJ_MS = @CALC_TICKADJ_MS@
CALC_TICKADJ_NI = @CALC_TICKADJ_NI@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAGS_NTP = @CFLAGS_NTP@
CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@
EDITLINE_LIBS = @EDITLINE_LIBS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
GTEST_CONFIG = @GTEST_CONFIG@
GTEST_CPPFLAGS = @GTEST_CPPFLAGS@
GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LCRYPTO = @LCRYPTO@
LD = @LD@
LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NLIST = @LDADD_NLIST@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
LDFLAGS_NTP = @LDFLAGS_NTP@
LIBISC_PTHREADS_NOTHREADS = @LIBISC_PTHREADS_NOTHREADS@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@
LIBOPTS_DIR = @LIBOPTS_DIR@
@ -122,6 +200,8 @@ LIBOPTS_LDADD = @LIBOPTS_LDADD@
LIBPARSE = @LIBPARSE@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIPO = @LIPO@
LN_S = @LN_S@
LSCF = @LSCF@
LTLIBOBJS = @LTLIBOBJS@
@ -133,15 +213,76 @@ MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPSNMPD = @MAKE_NTPSNMPD@
MAKE_NTPTIME = @MAKE_NTPTIME@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@
MANIFEST_TOOL = @MANIFEST_TOOL@
MANTAGFMT = @MANTAGFMT@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
NTPDATE_DB = @NTPDATE_DB@
NTPDATE_DL = @NTPDATE_DL@
NTPDATE_DS = @NTPDATE_DS@
NTPDATE_MS = @NTPDATE_MS@
NTPDATE_NI = @NTPDATE_NI@
NTPDC_DB = @NTPDC_DB@
NTPDC_DL = @NTPDC_DL@
NTPDC_DS = @NTPDC_DS@
NTPDC_MS = @NTPDC_MS@
NTPDC_NI = @NTPDC_NI@
NTPDSIM_DB = @NTPDSIM_DB@
NTPDSIM_DL = @NTPDSIM_DL@
NTPDSIM_DS = @NTPDSIM_DS@
NTPDSIM_MS = @NTPDSIM_MS@
NTPDSIM_NI = @NTPDSIM_NI@
NTPD_DB = @NTPD_DB@
NTPD_DL = @NTPD_DL@
NTPD_DS = @NTPD_DS@
NTPD_MS = @NTPD_MS@
NTPD_NI = @NTPD_NI@
NTPQ_DB = @NTPQ_DB@
NTPQ_DL = @NTPQ_DL@
NTPQ_DS = @NTPQ_DS@
NTPQ_MS = @NTPQ_MS@
NTPQ_NI = @NTPQ_NI@
NTPSNMPD_DB = @NTPSNMPD_DB@
NTPSNMPD_DL = @NTPSNMPD_DL@
NTPSNMPD_DS = @NTPSNMPD_DS@
NTPSNMPD_MS = @NTPSNMPD_MS@
NTPSNMPD_NI = @NTPSNMPD_NI@
NTPSWEEP_DB = @NTPSWEEP_DB@
NTPSWEEP_DL = @NTPSWEEP_DL@
NTPSWEEP_DS = @NTPSWEEP_DS@
NTPSWEEP_MS = @NTPSWEEP_MS@
NTPSWEEP_NI = @NTPSWEEP_NI@
NTPTIME_DB = @NTPTIME_DB@
NTPTIME_DL = @NTPTIME_DL@
NTPTIME_DS = @NTPTIME_DS@
NTPTIME_MS = @NTPTIME_MS@
NTPTIME_NI = @NTPTIME_NI@
NTPTRACE_DB = @NTPTRACE_DB@
NTPTRACE_DL = @NTPTRACE_DL@
NTPTRACE_DS = @NTPTRACE_DS@
NTPTRACE_MS = @NTPTRACE_MS@
NTPTRACE_NI = @NTPTRACE_NI@
NTP_KEYGEN_DB = @NTP_KEYGEN_DB@
NTP_KEYGEN_DL = @NTP_KEYGEN_DL@
NTP_KEYGEN_DS = @NTP_KEYGEN_DS@
NTP_KEYGEN_MS = @NTP_KEYGEN_MS@
NTP_KEYGEN_NI = @NTP_KEYGEN_NI@
NTP_KEYSDIR = @NTP_KEYSDIR@
NTP_WAIT_DB = @NTP_WAIT_DB@
NTP_WAIT_DL = @NTP_WAIT_DL@
NTP_WAIT_DS = @NTP_WAIT_DS@
NTP_WAIT_MS = @NTP_WAIT_MS@
NTP_WAIT_NI = @NTP_WAIT_NI@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@ -149,23 +290,53 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
PKG_CONFIG = @PKG_CONFIG@
POSIX_SHELL = @POSIX_SHELL@
PROPDELAY = @PROPDELAY@
PTHREAD_LIBS = @PTHREAD_LIBS@
RANLIB = @RANLIB@
READLINE_LIBS = @READLINE_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SNMP_CFLAGS = @SNMP_CFLAGS@
SNMP_CPPFLAGS = @SNMP_CPPFLAGS@
SNMP_LIBS = @SNMP_LIBS@
SNTP = @SNTP@
SNTP_DB = @SNTP_DB@
SNTP_DL = @SNTP_DL@
SNTP_DS = @SNTP_DS@
SNTP_MS = @SNTP_MS@
SNTP_NI = @SNTP_NI@
STDNORETURN_H = @STDNORETURN_H@
STRIP = @STRIP@
TESTDCF = @TESTDCF@
U = @U@
TICKADJ_DB = @TICKADJ_DB@
TICKADJ_DL = @TICKADJ_DL@
TICKADJ_DS = @TICKADJ_DS@
TICKADJ_MS = @TICKADJ_MS@
TICKADJ_NI = @TICKADJ_NI@
TIMETRIM_DB = @TIMETRIM_DB@
TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
YFLAGS = @YFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@ -212,21 +383,22 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr
noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
INCLUDES = -I$(top_srcdir)/include
# We need -lm (and perhaps $(COMPAT) for propdelay, -lntp for {chu,clk}test
propdelay_LDADD = -lm ../libntp/libntp.a
chutest_LDADD = ../libntp/libntp.a
clktest_LDADD = ../libntp/libntp.a
ETAGS_ARGS = Makefile.am
all: all-am
noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@
AM_CFLAGS = $(CFLAGS_NTP)
AM_CPPFLAGS = $(NTP_INCS) $(CPPFLAGS_NTP)
LDADD = ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(PTHREAD_LIBS)
propdelay_LDADD = $(LDADD)
BUILT_SOURCES = check-libntp .deps-ver
CLEANFILES = check-libntp .deps-ver
NTP_INCS = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
-I$(top_srcdir)/lib/isc/$(LIBISC_PTHREADS_NOTHREADS)/include \
-I$(top_srcdir)/lib/isc/unix/include
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@ -265,53 +437,45 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
chutest$(EXEEXT): $(chutest_OBJECTS) $(chutest_DEPENDENCIES)
@rm -f chutest$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(chutest_OBJECTS) $(chutest_LDADD) $(LIBS)
propdelay$(EXEEXT): $(propdelay_OBJECTS) $(propdelay_DEPENDENCIES)
@rm -f propdelay$(EXEEXT)
$(LINK) $(propdelay_OBJECTS) $(propdelay_LDADD) $(LIBS)
$(AM_V_CCLD)$(LINK) $(propdelay_OBJECTS) $(propdelay_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
../util/ansi2knr:
$(am__cd) ../util && $(MAKE) $(AM_MAKEFLAGS) ./ansi2knr
mostlyclean-kr:
-test "$U" = "" || rm -f *_.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chutest$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clktest$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propdelay$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chutest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propdelay.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
chutest_.c: chutest.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/chutest.c; then echo $(srcdir)/chutest.c; else echo chutest.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
clktest_.c: clktest.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clktest.c; then echo $(srcdir)/clktest.c; else echo clktest.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
propdelay_.c: propdelay.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/propdelay.c; then echo $(srcdir)/propdelay.c; else echo propdelay.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
chutest_.$(OBJEXT) chutest_.lo clktest_.$(OBJEXT) clktest_.lo \
propdelay_.$(OBJEXT) propdelay_.lo : $(ANSI2KNR)
mostlyclean-libtool:
-rm -f *.lo
@ -402,10 +566,12 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
check: check-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(PROGRAMS)
installdirs:
install: install-am
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@ -422,6 +588,7 @@ install-strip:
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@ -430,6 +597,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
@ -488,7 +656,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr \
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
@ -501,7 +669,7 @@ ps-am:
uninstall-am:
.MAKE: ../util/ansi2knr install-am install-strip
.MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool clean-noinstPROGRAMS ctags distclean \
@ -513,17 +681,72 @@ uninstall-am:
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-kr \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am
#EXTRA_DIST = TAGS
# clktest-opts.def wants ../include/copyright.def ../include/homerc.def
check-libntp: ../libntp/libntp.a
@echo stamp > $@
chutest$(EXEEXT): ../libntp/libntp.a
../libntp/libntp.a:
cd ../libntp && $(MAKE) $(AM_MAKEFLAGS) libntp.a
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
$(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
mkdir $(DEPDIR) && \
case "$(top_builddir)" in \
.) \
./config.status Makefile depfiles \
;; \
*) \
cd "$(top_builddir)" && \
./config.status $(subdir)/Makefile depfiles && \
cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
cp $(top_srcdir)/deps-ver $@
clktest$(EXEEXT): ../libntp/libntp.a
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
#
# depsver.mf included in Makefile.am for directories with .deps
#
# When building in the same directory with sources that change over
# time, such as when tracking using bk, the .deps files can become
# stale with respect to moved, deleted, or superceded headers. Most
# commonly, this would exhibit as make reporting a failure to make a
# header file which is no longer in the location given. To address
# this issue, we use a deps-ver file which is updated with each change
# that breaks old .deps files. A copy of deps-ver is made into
# $(DEPDIR) if not already present. If $(DEPDIR)/deps-ver is present
# with different contents than deps-ver, we make clean to ensure all
# .o files built before the incompatible change are rebuilt along with
# their updated .deps files, then remove $(DEPDIR) and recreate it as
# empty stubs.
#
# It is normal when configured with --disable-dependency-tracking for
# the DEPDIR to not have been created. For this reason, we use the
# intermediate target .deps-ver, which invokes make recursively if
# DEPDIR exists.
#
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
# This comment block follows rather than leads the related code so that
# it stays with it in the generated Makefile.in and Makefile.
#
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -1,19 +1,14 @@
README file for directory ./clockstuff of the NTP Version 4 distribution
This directory contains the sources for utility programs designed to
support radio clocks. The chutest.c and clktest.c are desgined to
test the chu_clk and tty_clk line disciplines and STREAMS modules in
the ../kernel directory.
support radio clocks. chutest.c is desgined to test the depredated
chu_clk line discipline or STREAMS module and can also test a CHU
modem in raw mode.
These files have been modified to work with either the line disciplines
or the STREAMS modules. Be sure to define -DSTREAM if appropriate.
These are random bits of things written to help with clocks. You can
make things in here by typing one or more of:
You can make things in here by typing one or more of:
make propdelay (or `make')
make chutest
make clktest
Propdelay computes high frequency propagation delays, given the
longitude and latitude of the transmitter and receiver. Use
@ -24,8 +19,3 @@ Chutest can be used to input and process data from a CHU modem
attached to a serial port. It will use the CHU line discipline
(if installed), or raw mode otherwise. This was used to test
out the initial reduction algorithms, and may not be up to date.
Clktest can be used to test the clock line discipline (CLKLDISC,
it must be available), and to take a look at radio clocks attached to a
serial port.

View file

@ -2,36 +2,48 @@
* chutest - test the CHU clock
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_STROPTS_H
# include <stropts.h>
#else
# ifdef HAVE_SYS_STROPTS_H
# include <sys/stropts.h>
# endif
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/file.h>
#include <sgtty.h>
#ifdef HAVE_TERMIOS_H
# include <termios.h>
#else
# ifdef HAVE_SGTTY_H
# include <sgtty.h>
# endif
#endif
#include "../include/ntp_fp.h"
#include "../include/ntp.h"
#include "../include/ntp_unixtime.h"
#ifdef CHULDISC
#ifdef STREAM
# ifdef HAVE_SYS_CHUDEFS_H
#include <sys/chudefs.h>
#endif
#include <stropts.h>
#endif
#endif
#include "ntp_fp.h"
#include "ntp.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
#ifdef CHULDISC
# ifdef HAVE_SYS_CHUDEFS_H
#include <sys/chudefs.h>
#endif
# include <sys/chudefs.h>
# endif
#endif
#ifndef CHULDISC
#ifndef STREAM
#define NCHUCHARS (10)
struct chucode {
@ -41,12 +53,10 @@ struct chucode {
struct timeval codetimes[NCHUCHARS]; /* arrival times */
};
#endif
#endif
#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
char *progname;
int debug;
int dofilter = 0; /* set to 1 when we should run filter algorithm */
int showtimes = 0; /* set to 1 when we should show char arrival times */
@ -61,9 +71,14 @@ int usechuldisc = 0; /* set to 1 when CHU line discipline should be used */
struct timeval lasttv;
struct chucode chudata;
extern u_long ustotslo[];
extern u_long ustotsmid[];
extern u_long ustotshi[];
void error(char *fmt, char *s1, char *s2);
void init_chu(void);
int openterm(char *dev);
int process_raw(int s);
int process_ldisc(int s);
void raw_filter(unsigned int c, struct timeval *tv);
void chufilter(struct chucode *chuc, l_fp *rtime);
/*
* main - parse arguments and handle options
@ -77,8 +92,6 @@ main(
int c;
int errflg = 0;
extern int ntp_optind;
extern char *ntp_optarg;
void init_chu();
progname = argv[0];
while ((c = ntp_getopt(argc, argv, "cdfpt")) != EOF)
@ -261,21 +274,20 @@ process_raw(
/*
* raw_filter - run the line discipline filter over raw data
*/
int
void
raw_filter(
unsigned int c,
struct timeval *tv
)
{
static struct timeval diffs[10] = { 0 };
static struct timeval diffs[10];
struct timeval diff;
l_fp ts;
void chufilter();
if ((c & 0xf) > 9 || ((c>>4)&0xf) > 9) {
if (debug)
(void) fprintf(stderr,
"character %02x failed BCD test\n");
"character %02x failed BCD test\n", c);
chudata.ncodechars = 0;
return;
}
@ -496,14 +508,6 @@ static u_long yearstart;
extern u_long current_time;
extern struct event timerqueue[];
/*
* Time conversion tables imported from the library
*/
extern u_long ustotslo[];
extern u_long ustotsmid[];
extern u_long ustotshi[];
/*
* init_chu - initialize internal chu driver data
*/
@ -543,10 +547,6 @@ chufilter(
l_fp ts;
int day, hour, minute, second;
static u_char lastcode[NCHUCHARS];
extern u_long calyearstart();
extern char *mfptoa();
void chu_process();
extern char *prettydate();
/*
* We'll skip the checks made in the kernel, but assume they've
@ -632,6 +632,7 @@ chufilter(
* work most of the time.
*/
date_ui = tmp + yearstart;
#define CLOCK_WAYTOOBIG 1000 /* revived from ancient sources */
if (date_ui < (rtime->l_ui + CLOCK_WAYTOOBIG)
&& date_ui > (rtime->l_ui - CLOCK_WAYTOOBIG))
goto codeokay; /* looks good */
@ -640,7 +641,7 @@ chufilter(
* Trouble. Next check is to see if the year rolled over and, if
* so, try again with the new year's start.
*/
date_ui = calyearstart(rtime->l_ui);
date_ui = calyearstart(rtime->l_ui, NULL);
if (date_ui != yearstart) {
yearstart = date_ui;
date_ui += tmp;
@ -666,7 +667,9 @@ chufilter(
* than CLOCK_WAYTOOBIG seconds into the new year.
*/
if ((rtime->l_ui - yearstart) < CLOCK_WAYTOOBIG) {
date_ui = tmp + calyearstart(yearstart - CLOCK_WAYTOOBIG);
date_ui = tmp;
date_ui += calyearstart(yearstart - CLOCK_WAYTOOBIG,
NULL);
if ((rtime->l_ui - date_ui) < CLOCK_WAYTOOBIG)
goto codeokay;
}
@ -676,7 +679,9 @@ chufilter(
* following the year the system is in. Try this one before
* giving up.
*/
date_ui = tmp + calyearstart(yearstart + (400*24*60*60)); /* 400 days */
date_ui = tmp;
date_ui += calyearstart(yearstart + (400 * SECSPERDAY),
NULL);
if ((date_ui - rtime->l_ui) >= CLOCK_WAYTOOBIG) {
printf("Date hopelessly off\n");
return; /* hopeless, let it sync to other peers */

View file

@ -1,412 +0,0 @@
/* clktest.c,v 3.1 1993/07/06 01:05:23 jbj Exp
* clktest - test the clock line discipline
*
* usage: clktest -b bps -f -t timeo -s cmd -c char1 -a char2 /dev/whatever
*/
#include "clktest-opts.h"
#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
#if defined(ULT_2_0_SUCKS)
#ifndef sigmask
#define sigmask(m) (1<<(m))
#endif
#endif
#ifndef STREAM
# ifndef CLKLDISC
CLOCK_LINE_DISCIPLINE_NEEDED_BY_THIS_PROGRAM;
# endif
#else
# ifdef CLKLDISC
ONLY_ONE_CLOCK_LINE_DISCIPLINE_FOR_THIS_PROGRAM;
# endif
#endif
/*
* Mask for blocking SIGIO and SIGALRM
*/
#define BLOCKSIGMASK (sigmask(SIGIO)|sigmask(SIGALRM))
#define progname clktestOptions.pzProgName
struct timeval timeout = { 0 };
char *cmd = NULL;
int cmdlen;
#ifdef CLKLDISC
u_long magic1 = DEFMAGIC;
u_long magic2 = DEFMAGIC;
#endif
int speed = B9600;
int ttflags = RAW|EVENP|ODDP;
volatile int wasalarmed;
volatile int iosig;
struct timeval lasttv;
extern u_long ustotslo[];
extern u_long ustotsmid[];
extern u_long ustotshi[];
int alarming();
int ioready();
/*
* main - parse arguments and handle options
*/
int
main(
int argc,
char *argv[]
)
{
int fd;
struct sgttyb ttyb;
struct itimerval itimer;
#ifdef STREAM
magic[0] = 0;
#endif
{
int ct = optionProcess( &clktestOptions, argc, argv );
if (HAVE_OPT(COMMAND) && (strlen(OPT_ARG(COMMAND)) == 0)) {
fputs( "The command option string must not be empty\n", stderr );
USAGE( EXIT_FAILURE );
}
if ((argc -= ct) != 1) {
fputs( "Missing tty device name\n", stderr );
USAGE( EXIT_FAILURE );
}
argv += ct;
}
#ifdef STREAM
if (!strlen(magic))
strcpy(magic,DEFMAGIC);
#endif
fd = open(*argv, HAVE_OPT(TIMEOUT) ? O_RDWR : O_RDONLY, 0777);
if (fd == -1) {
fprintf(stderr, "%s: open(%s): ", progname, *argv);
perror("");
exit(1);
}
if (ioctl(fd, TIOCEXCL, (char *)0) < 0) {
(void) fprintf(stderr, "%s: ioctl(TIOCEXCL): ", progname);
perror("");
exit(1);
}
/*
* If we have the clock discipline, set the port to raw. Otherwise
* we run cooked.
*/
ttyb.sg_ispeed = ttyb.sg_ospeed = speed;
#ifdef CLKLDISC
ttyb.sg_erase = (char)magic1;
ttyb.sg_kill = (char)magic2;
#endif
ttyb.sg_flags = (short)ttflags;
if (ioctl(fd, TIOCSETP, (char *)&ttyb) < 0) {
(void) fprintf(stderr, "%s: ioctl(TIOCSETP): ", progname);
perror("");
exit(1);
}
if (fcntl(fd, F_SETOWN, getpid()) == -1) {
(void) fprintf(stderr, "%s: fcntl(F_SETOWN): ", progname);
perror("");
exit(1);
}
#ifdef CLKLDISC
{
int ldisc;
ldisc = CLKLDISC;
if (ioctl(fd, TIOCSETD, (char *)&ldisc) < 0) {
(void) fprintf(stderr, "%s: ioctl(TIOCSETD): ", progname);
perror("");
exit(1);
}
}
#endif
#ifdef STREAM
if (ioctl(fd, I_POP, 0) >=0 ) ;
if (ioctl(fd, I_PUSH, "clk") < 0) {
(void) fprintf(stderr, "%s: ioctl(I_PUSH): ", progname);
perror("");
exit(1);
}
if (ioctl(fd, CLK_SETSTR, magic) < 0) {
(void) fprintf(stderr, "%s: ioctl(CLK_SETSTR): ", progname);
perror("");
exit(1);
}
#endif
(void) gettimeofday(&lasttv, (struct timezone *)0);
if (HAVE_OPT(TIMEOUT)) {
/*
* set non-blocking, async I/O on the descriptor
*/
iosig = 0;
(void) signal(SIGIO, ioready);
if (fcntl(fd, F_SETFL, FNDELAY|FASYNC) < 0) {
(void) fprintf(stderr, "%s: fcntl(F_SETFL): ",
progname);
perror("");
exit(1);
}
/*
* Set up the alarm interrupt.
*/
wasalarmed = 0;
(void) signal(SIGALRM, alarming);
timeout.tv_sec = OPT_VALUE_TIMEOUT;
itimer.it_interval = itimer.it_value = timeout;
setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0);
doboth(fd);
}
doioonly(fd);
}
/*
* doboth - handle both I/O and alarms via SIGIO
*/
int
doboth(
int fd
)
{
int n;
int sawalarm;
int sawiosig;
int omask;
fd_set fds;
struct timeval tvzero;
sawalarm = 0;
sawiosig = 0;
FD_ZERO(&fds);
for (;;) {
omask = sigblock(BLOCKSIGMASK);
if (wasalarmed) { /* alarmed? */
sawalarm = 1;
wasalarmed = 0;
}
if (iosig) {
sawiosig = 1;
iosig = 0;
}
if (!sawalarm && !sawiosig) {
/*
* Nothing to do. Wait for something.
*/
sigpause(omask);
if (wasalarmed) { /* alarmed? */
sawalarm = 1;
wasalarmed = 0;
}
if (iosig) {
sawiosig = 1;
iosig = 0;
}
}
(void)sigsetmask(omask);
if (sawiosig) {
do {
tvzero.tv_sec = tvzero.tv_usec = 0;
FD_SET(fd, &fds);
n = select(fd+1, &fds, (fd_set *)0,
(fd_set *)0, &tvzero);
if (n > 0)
doio(fd);
} while (n > 0);
if (n == -1) {
(void) fprintf(stderr, "%s: select: ",
progname);
perror("");
exit(1);
}
sawiosig = 0;
}
if (sawalarm) {
doalarm(fd);
sawalarm = 0;
}
}
}
/*
* doioonly - do I/O. This avoids the use of signals
*/
int
doioonly(
int fd
)
{
int n;
fd_set fds;
FD_ZERO(&fds);
for (;;) {
FD_SET(fd, &fds);
n = select(fd+1, &fds, (fd_set *)0, (fd_set *)0,
(struct timeval *)0);
if (n > 0)
doio(fd);
}
}
/*
* doio - read a buffer full of stuff and print it out
*/
int
doio(
int fd
)
{
register char *rp, *rpend;
register char *cp;
register int i;
char raw[512];
struct timeval tv, tvd;
int rlen;
int ind;
char cooked[2049];
static char *digits = "0123456789abcdef";
rlen = read(fd, raw, sizeof(raw));
if (rlen < 0) {
(void) fprintf(stderr, "%s: read(): ", progname);
perror("");
return;
}
if (rlen == 0) {
(void) printf("Zero length read\n");
return;
}
cp = cooked;
rp = raw;
rpend = &raw[rlen];
ind = 0;
while (rp < rpend) {
ind = 1;
if (isprint(*rp))
*cp++ = *rp;
else {
*cp++ = '<';
*cp++ = digits[((*rp)>>4) & 0xf];
*cp++ = digits[*rp & 0xf];
*cp++ = '>';
}
if (
#ifdef CLKLDISC
(*rp == (char)magic1 || *rp == (char)magic2)
#else
( strchr( magic, *rp) != NULL )
#endif
) {
rp++;
ind = 0;
*cp = '\0';
if ((rpend - rp) < sizeof(struct timeval)) {
(void)printf(
"Too little data (%d): %s\n",
rpend-rp, cooked);
return;
}
tv.tv_sec = 0;
for (i = 0; i < 4; i++) {
tv.tv_sec <<= 8;
tv.tv_sec |= ((long)*rp++) & 0xff;
}
tv.tv_usec = 0;
for (i = 0; i < 4; i++) {
tv.tv_usec <<= 8;
tv.tv_usec |= ((long)*rp++) & 0xff;
}
tvd.tv_sec = tv.tv_sec - lasttv.tv_sec;
tvd.tv_usec = tv.tv_usec - lasttv.tv_usec;
if (tvd.tv_usec < 0) {
tvd.tv_usec += 1000000;
tvd.tv_sec--;
}
(void)printf("%lu.%06lu %lu.%06lu %s\n",
tv.tv_sec, tv.tv_usec, tvd.tv_sec, tvd.tv_usec,
cooked);
lasttv = tv;
} else {
rp++;
}
}
if (ind) {
*cp = '\0';
(void)printf("Incomplete data: %s\n", cooked);
}
}
/*
* doalarm - send a string out the port, if we have one.
*/
int
doalarm(
int fd
)
{
int n;
if (! HAVE_OPT(COMMAND))
return;
n = write(fd, cmd, cmdlen);
if (n < 0) {
(void) fprintf(stderr, "%s: write(): ", progname);
perror("");
} else if (n < cmdlen) {
(void) printf("Short write (%d bytes, should be %d)\n",
n, cmdlen);
}
}
/*
* alarming - receive alarm interupt
*/
void
alarming(void)
{
wasalarmed = 1;
}
/*
* ioready - handle SIGIO interrupt
*/
void
ioready(void)
{
iosig = 1;
}

View file

@ -47,6 +47,9 @@
* to find delays to GOES via each of the three satellites.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <string.h>
@ -115,7 +118,6 @@ int Gflag = 0;
int height;
char *progname;
volatile int debug;
static void doit (double, double, double, double, double, char *);
static double latlong (char *, int);
@ -142,6 +144,8 @@ main(
double lat2, long2;
double lat3, long3;
init_lib();
progname = argv[0];
while ((c = ntp_getopt(argc, argv, "dh:CWG")) != EOF)
switch (c) {

View file

@ -1,6 +1,6 @@
#
# NTP configuration file (ntp.conf)
# bearegard.udel.edu
# beauregard.udel.edu
#
server 127.127.18.1 # NIST ACTS modem driver
fudge 127.127.18.1 time1 .0035

View file

@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
timestamp='2005-07-08'
timestamp='2011-06-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -26,16 +27,16 @@ timestamp='2005-07-08'
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a ChangeLog
# entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit build system type.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
@ -55,8 +56,9 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -106,7 +108,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@ -160,6 +162,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@ -168,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@ -178,7 +181,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
os=netbsd
os=netbsd
;;
esac
# The OS release
@ -206,8 +209,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@ -218,7 +224,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@ -264,7 +270,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit ;;
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
@ -290,7 +299,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
@ -319,14 +328,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@ -370,23 +398,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@ -456,8 +484,8 @@ EOF
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@ -470,7 +498,7 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
exit ;;
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
@ -527,7 +555,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[45])
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@ -570,52 +598,52 @@ EOF
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
esac ;;
esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
@ -635,7 +663,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep __LP64__ >/dev/null
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@ -706,22 +734,22 @@ EOF
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@ -745,14 +773,14 @@ EOF
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
@ -764,27 +792,46 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
i*:MINGW*:*)
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit ;;
*:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@ -794,7 +841,7 @@ EOF
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:*)
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
@ -814,7 +861,37 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
@ -824,7 +901,18 @@ EOF
echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
echo frv-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -835,63 +923,33 @@ EOF
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
mips:Linux:*:*)
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
@ -901,14 +959,17 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -916,68 +977,18 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
# Set LC_ALL=C to ensure ld outputs messages in English.
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
s/ .*//
p'`
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
LIBC=gnu
# else
LIBC=gnulibc1
# endif
# else
LIBC=gnulibc1
# endif
#else
#ifdef __INTEL_COMPILER
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
}
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@ -985,11 +996,11 @@ EOF
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@ -1006,7 +1017,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@ -1021,7 +1032,7 @@ EOF
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
@ -1049,10 +1060,13 @@ EOF
exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
exit ;;
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
@ -1087,8 +1101,18 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@ -1101,7 +1125,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@ -1121,10 +1145,10 @@ EOF
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@ -1150,11 +1174,11 @@ EOF
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@ -1164,6 +1188,9 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@ -1173,6 +1200,15 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@ -1182,7 +1218,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;;
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@ -1198,6 +1243,9 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
@ -1243,13 +1291,13 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@ -1261,6 +1309,12 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@ -1283,11 +1337,11 @@ main ()
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
"4"
#else
""
""
#endif
); exit (0);
); exit (0);
#endif
#endif
@ -1421,9 +1475,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be

File diff suppressed because it is too large Load diff

337
contrib/ntp/config.sub vendored
View file

@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
timestamp='2005-07-08'
timestamp='2011-06-03'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -31,13 +32,16 @@ timestamp='2005-07-08'
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@ -71,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -119,8 +124,11 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@ -146,10 +154,13 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray)
-apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@ -164,13 +175,17 @@ case $os in
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
;;
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@ -187,6 +202,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@ -231,20 +250,24 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr | mips64vrel \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
@ -257,35 +280,63 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ms1 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \
| ns16k | ns32k \
| open8 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
m32c)
basic_machine=$basic_machine-unknown
c54x)
basic_machine=tic54x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@ -305,25 +356,28 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
@ -336,30 +390,38 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| ms1-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
| z8k-* | z80-*)
;;
m32c-*)
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@ -377,7 +439,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
abacus)
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@ -423,6 +485,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux)
basic_machine=m68k-apple
os=-aux
@ -431,10 +497,35 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@ -463,8 +554,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@ -502,6 +593,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
@ -656,6 +751,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
@ -667,10 +770,17 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32)
basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
@ -696,6 +806,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs)
basic_machine=i370-ibm
os=-mvs
@ -764,6 +877,12 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -794,6 +913,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
@ -803,6 +930,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@ -832,9 +965,10 @@ case $basic_machine in
;;
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@ -859,6 +993,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@ -885,6 +1023,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
@ -896,6 +1038,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
@ -917,6 +1062,9 @@ case $basic_machine in
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
@ -973,17 +1121,9 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
tile*)
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
@ -1052,6 +1192,9 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
@ -1060,6 +1203,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
@ -1098,10 +1245,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b)
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@ -1145,9 +1292,12 @@ esac
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@ -1168,27 +1318,31 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1227,7 +1381,7 @@ case $os in
-opened*)
os=-openedition
;;
-os400*)
-os400*)
os=-os400
;;
-wince*)
@ -1276,7 +1430,7 @@ case $os in
-sinix*)
os=-sysv4
;;
-tpf*)
-tpf*)
os=-tpf
;;
-triton*)
@ -1318,6 +1472,11 @@ case $os in
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
@ -1340,6 +1499,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
@ -1349,9 +1514,18 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c4x-* | tic4x-*)
os=-coff
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@ -1377,6 +1551,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
@ -1401,7 +1578,7 @@ case $basic_machine in
*-ibm)
os=-aix
;;
*-knuth)
*-knuth)
os=-mmixware
;;
*-wec)
@ -1506,7 +1683,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
-aix*)
-cnk*|-aix*)
vendor=ibm
;;
-beos*)

46261
contrib/ntp/configure vendored

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1
contrib/ntp/deps-ver Normal file
View file

@ -0,0 +1 @@
Fri Dec 30 11:24:57 UTC 2011

60
contrib/ntp/depsver.mf Normal file
View file

@ -0,0 +1,60 @@
$(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
@[ -f $@ ] || \
cp $(top_srcdir)/deps-ver $@
@[ -w $@ ] || \
chmod ug+w $@
@cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
$(MAKE) $(AM_MAKEFLAGS) clean && \
echo -n "Prior $(subdir)/$(DEPDIR) version " && \
cat $@ && \
rm -rf $(DEPDIR) && \
mkdir $(DEPDIR) && \
case "$(top_builddir)" in \
.) \
./config.status Makefile depfiles \
;; \
*) \
cd "$(top_builddir)" && \
./config.status $(subdir)/Makefile depfiles && \
cd $(subdir) \
;; \
esac && \
echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
cat $(top_srcdir)/deps-ver \
)
cp $(top_srcdir)/deps-ver $@
.deps-ver: $(top_srcdir)/deps-ver
@[ ! -d $(DEPDIR) ] || $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/deps-ver
@touch $@
BUILT_SOURCES += .deps-ver
CLEANFILES += .deps-ver
#
# depsver.mf included in Makefile.am for directories with .deps
#
# When building in the same directory with sources that change over
# time, such as when tracking using bk, the .deps files can become
# stale with respect to moved, deleted, or superceded headers. Most
# commonly, this would exhibit as make reporting a failure to make a
# header file which is no longer in the location given. To address
# this issue, we use a deps-ver file which is updated with each change
# that breaks old .deps files. A copy of deps-ver is made into
# $(DEPDIR) if not already present. If $(DEPDIR)/deps-ver is present
# with different contents than deps-ver, we make clean to ensure all
# .o files built before the incompatible change are rebuilt along with
# their updated .deps files, then remove $(DEPDIR) and recreate it as
# empty stubs.
#
# It is normal when configured with --disable-dependency-tracking for
# the DEPDIR to not have been created. For this reason, we use the
# intermediate target .deps-ver, which invokes make recursively if
# DEPDIR exists.
#
# If you modify depsver.mf, please make the changes to the master
# copy, the one in sntp is copied by the bootstrap script from it.
#
# This comment block follows rather than leads the related code so that
# it stays with it in the generated Makefile.in and Makefile.
#

View file

@ -1,13 +1,14 @@
;; This is how Dave Mills likes to see the code formatted.
;; This is how Dave Mills likes to see the NTP code formatted.
(defconst ntp-c-style
'((c-basic-offset . 8)
'((c-basic-offset . 8)
(fill-column . 72)
(c-offsets-alist . ((arglist-intro . +)
(case-label . *)
(statement-case-intro . *)
(statement-cont . *)
(substatement-open . 0))))
"Dave L. Mills; programming style for use with ntp")
"David L. Mills; NTP code indentation style")
(defun ntp-c-mode-common-hook ()
;; add ntp c style

View file

@ -1 +0,0 @@
*.obj *.pch *.bsc *.pdb *.sbr nt*.zip *.tar *.gz *.ilk beta*.zip

View file

@ -1,14 +1,32 @@
#! /bin/sh
IAM=`hostname || uname -n`
MYNAME=`IFS=. ; set $IAM ; echo $1`
case "$1" in
'--one'|'-1')
shift
FB_FIRSTONLY=1
LIST=$MYNAME
;;
*)
FB_FIRSTONLY=0
esac
BUILD_ARGS="$@"
PARSE="--enable-parse-clocks"
#PARSE=
STD="--enable-simulator"
case "$SIMUL" in
'') PARALLEL_BUILDS=1
;;
*) PARALLEL_BUILDS=$SIMUL
case "$SIMUL::$FB_FIRSTONLY" in
::*)
PARALLEL_BUILDS=1
;;
*::0)
PARALLEL_BUILDS=$SIMUL
;;
*)
PARALLEL_BUILDS=1
esac
case "$PARALLEL_BUILDS" in
@ -30,11 +48,14 @@ esac
# Campus:
# * baldwin sparc-sun-solaris2.10
# * bridgeport sparc-sun-solaris2.10
# * cowbird freebsd-6.1
# * malarky sparc-sun-solaris2.10
# * pogo sparc-sun-solaris2.10
# * rackety freebsd-6.1
if [ ! -r sntp/libevent/build-aux/config.guess ] ; then
echo "Error: bootstrap required." 1>&2 && exit 1
fi
# HMS: we need $PWD because solaris produces /deacon/backroom when
# we are in /backroom and in general there is no /deacon/backroom.
c_d=${PWD:-`pwd`}
@ -42,7 +63,7 @@ c_d=${PWD:-`pwd`}
SIG=`perl -e 'print rand'`
case "$LIST" in
'') LIST="baldwin bridgeport cowbird malarky pogo rackety" ;;
'') LIST="pogo" ;;
esac
for i in $LIST
@ -51,56 +72,62 @@ do
[ -f .buildkey-$i ] && SKIPTHIS=1
case "$SKIPTHIS" in
1)
echo flock-build running on $i? check LIST, skipping
;;
0)
echo $i
echo $SIG > .buildkey-$i
case "1" in
0)
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD $BUILD_ARGS" &
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto $BUILD_ARGS" &
ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks $BUILD_ARGS" &
;;
1)
cat > .flockbuild-$i-$SIG <<ENDQUOT
#!/bin/sh
echo flock-build running on $i? check LIST, skipping
;;
0)
echo $i
echo $SIG > .buildkey-$i
case "1" in
0)
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD $BUILD_ARGS" &
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS" &
ssh $i "cd $c_d ; ./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS" &
ssh $i "cd $c_d ; ./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS" &
;;
1)
cat > .flockbuild-$i-$SIG <<-ENDQUOT
#!/bin/sh
# depends on job control and expects to be invoked under ssh -tt
# script uses job control and expects to be invoked
# in a ssh session started with the -tt option,
# which forces a pseudo-tty to be used.
cd $c_d
COUNT=0
cd $c_d
COUNT=0
./build $SIG $PARSE $STD $BUILD_ARGS &
./build $SIG $PARSE $STD $BUILD_ARGS &
COUNT=\`expr \$COUNT + 1\`
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
COUNT=\`expr \$COUNT + 1\`
echo $i started build \$COUNT of 4
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
case $FB_FIRSTONLY in
'0')
./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS &
./build $SIG $PARSE $STD --disable-debugging $BUILD_ARGS &
COUNT=\`expr \$COUNT + 1\`
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
COUNT=\`expr \$COUNT + 1\`
echo $i started build \$COUNT of 4
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
./build $SIG $PARSE $STD --without-crypto --enable-c99-snprintf $BUILD_ARGS &
./build $SIG $PARSE $STD --without-crypto $BUILD_ARGS &
COUNT=\`expr \$COUNT + 1\`
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
COUNT=\`expr \$COUNT + 1\`
echo $i started build \$COUNT of 4
[ 0 -lt \`expr \$COUNT % $PARALLEL_BUILDS\` ] || wait
./build $SIG $STD --disable-all-clocks --disable-autokey --without-sntp --disable-thread-support $BUILD_ARGS &
./build $SIG $STD --disable-all-clocks $BUILD_ARGS &
COUNT=\`expr \$COUNT + 1\`
echo $i started build \$COUNT of 4
wait
echo \`date -u '+%H:%M:%S'\` $i flock-build $c_d done.
rm .buildkey-$i
COUNT=\`expr \$COUNT + 1\`
echo \`date -u '+%H:%M:%S'\` $i started build \$COUNT of 4
wait
esac
echo \`date -u '+%H:%M:%S'\` $i flock-build $c_d done.
rm .buildkey-$i
ENDQUOT
chmod +x .flockbuild-$i-$SIG
ssh -tt $i "$c_d/.flockbuild-$i-$SIG ; \
rm $c_d/.flockbuild-$i-$SIG" 2>/dev/null &
esac
chmod +x .flockbuild-$i-$SIG
ssh -tt $i "$c_d/.flockbuild-$i-$SIG ; \
rm $c_d/.flockbuild-$i-$SIG" 2>/dev/null &
esac
esac
done
echo `date -u '+%H:%M:%S'` flock-build launched

View file

@ -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>

View file

@ -1,73 +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 Options</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Access Control 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: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">18:35</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="246">Thursday, July 28, 2005</csobj></p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#acx">Access Control Support</a>
<li class="inline"><a href="#kiss">The Kiss-of-Death Packet</a>
<li class="inline"><a href="#cmd">Access Control Commands</a>
</ul>
<hr>
<h4 id="acx">Access Control Support</h4>
The<tt> ntpd</tt> daemon implements a general purpose address/mask based restriction list. The list contains address/match entries sorted first by increasing address values and 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. Additional information and examples can be found in the <a href="notes.html">Notes on Configuring NTP and Setting up a NTP Subnet</a> page.
<p>The restriction facility was implemented in conformance with the access policies for the original NSFnet backbone time servers. Later the facility was expanded to deflect cryptographic and clogging attacks. While this facility may be useful for keeping unwanted or 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>Clients can be denied service because they are explicitly included in the restrict list created by the <tt>restrict</tt> command or implicitly as the result of cryptographic or rate limit violations. Cryptographic violations include certificate or identity verification failure; rate limit violations generally result from defective NTP&nbsp;implementations that send packets at abusive rates. Some violations cause denied service only for the offending packet, others cause denied service for a timed period and others cause the denied service for an indefinate period. When a client or network is denied access for an indefinate period, the only way at present to remove the restrictions is by restarting the server.</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, such as a server message that explicitly requests the client to stop sending and leave a message for the system operator. A special packet format has been created for this purpose called the &quot;kiss-o'-death&quot; (KoD) packet. KoD packets have the leap bits set unsynchronized and stratum set to zero and the reference identifier field set to a four-byte ASCII code. If the <tt>noserve</tt> or <tt>notrust</tt> flag of the matching restrict list entry is set, the code is &quot;DENY&quot;; if the <tt>limited</tt> flag is set and the rate limit is exceeded, the code is &quot;RATE&quot;. Finally, if a cryptographic violation occurs, the code is &quot;CRYP&quot;.</p>
<p>A client receiving a KoD performs a set of sanity checks to minimize security exposure, then updates the stratum and reference identifier peer variables, sets the access denied (TEST4) bit in the peer flash variable and sends a message to the log. As long as the TEST4 bit is set, the client will send no further packets to the server. The only way at present to recover from this condition is to restart the protocol at both the client and server. This happens automatically at the client when the association times out. It will happen at the server only if the server operator cooperates.</p>
<h4 id="cmd">Access Control Commands</h4>
<dl>
<dt><tt>discard [ average <i>avg</i> ][ minimum <i>min</i> ] [ monitor <i>prob</i> ]</tt>
<dd>Set the parameters of the <tt>limited</tt> facility which protects the server from client abuse. The <tt>average</tt> subcommand specifies the minimum average packet spacing, while the <tt>minimum</tt> subcommand specifies the minimum packet spacing. Packets that violate these minima are discarded and a kiss-o'-death packet returned if enabled. The default minimum average and minimum are 5 and 2, respectively. The monitor subcommand specifies the probability of discard for packets that overflow the rate-control window.
<dt><tt>restrict <i>address</i> [mask <i>mask</i>] [<i>flag</i>][...]</tt>
<dd>The <i><tt>address</tt></i> 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&nbsp;name. The <i><tt>mask</tt></i> argument expressed in dotted-quad form defaults to <tt>255.255.255.255</tt>, meaning that the <i><tt>address</tt></i> is treated as the address of an individual host. A default entry (address <tt>0.0.0.0</tt>, mask <tt>0.0.0.0</tt>) is always included and is always the first entry in the list. Note that text string <tt>default</tt>, with no mask option, may be used to indicate the default entry.
<dd>In the current implementation, <i><tt>flag</tt></i> always restricts access, i.e., an entry with no flags indicates that free access to the server is to be given. The flags are not orthogonal, in that more restrictive flags will often make less restrictive ones redundant. The flags can generally be classed into two catagories, those which restrict time service and those which restrict informational queries and attempts to do run-time reconfiguration of the server. One or more of the following flags may be specified:
<dl>
<dt><tt>ignore</tt>
<dd>Deny packets of all kinds, including <tt>ntpq</tt> and <tt>ntpdc</tt> queries.
<dt><tt>kod</tt>
<dd>If this flag is set when an access violation occurs, a kiss-o'-death (KoD) packet is sent. KoD packets are rate limited to no more than one per second. If another KoD packet occurs within one second after the last one, the packet is dropped
<dt><tt>limited</tt>
<dd>Deny service if the packet spacing violates the lower limits specified in the <tt>discard</tt> command. A history of clients is kept using the monitoring capability of <tt>ntpd</tt>. Thus, monitoring is always active as long as there is a restriction entry with the <tt>limited</tt> flag.
<dt><tt>lowpriotrap</tt>
<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.
<dt><tt>nomodify</tt>
<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.
<dt><tt>noquery</tt>
<dd>Deny <tt>ntpq</tt> and <tt>ntpdc</tt> queries. Time service is not affected.
<dt><tt>nopeer</tt>
<dd>Deny packets which would result in mobilizing a new association. &nbsp;This includes broadcast, symmetric-active and manycast client packets when a configured association does not exist.
<dt><tt>noserve</tt>
<dd>Deny all packets except <tt>ntpq</tt> and <tt>ntpdc</tt> queries.
<dt><tt>notrap</tt>
<dd>Decline to provide mode 6 control message trap service to matching hosts. The trap service is a subsystem of the <tt>ntpdq</tt> control message protocol which is intended for use by remote event logging programs.
<dt><tt>notrust</tt>
<dd>Deny packets unless the packet is cryptographically authenticated.
<dt><tt>ntpport</tt>
<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). Both <tt>ntpport</tt> and <tt>non-ntpport</tt> may be specified. The <tt>ntpport</tt> is considered more specific and is sorted later in the list.
<dt><tt>version</tt>
<dd>Deny packets that do not match the current NTP version.
</dl>
<dd>Default restriction list entries with the flags <tt>ignore, interface, 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).
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</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>

View file

@ -1,59 +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: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">18:35</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="246">Thursday, July 28, 2005</csobj></p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#modes">Association Modes</a>
<li class="inline"><a href="#client">Client/Server Mode</a>
<li class="inline"><a href="#symact">Symmetric Active/Passive Mode</a>
<li class="inline"><a href="#broad">Broadcast/Multicast Modes</a>
<li class="inline"><a href="#umlt">Multicasting</a>
<li class="inline"><a href="#umlt">Multicasting</a>
<li class="inline"><a href="#burst">Burst Modes</a>
</ul>
<hr>
<h4 id="modes">Association Modes</h4>
<p>NTP Version 4 (NTPv4) incorporates new features and refinements to the NTP Version 3 (NTPv3) algorithms; however, it continues the tradition of backwards compatibility with older versions. A number of new operating modes for automatic server discovery and improved accuracy in occasionally connected networks are provided. Following is an overview of the new features; additional information is available on the <a href="confopt.html">Configuration Options</a> and <a href="authopt.html">Authentication Options</a> pages and in the papers, reports, memoranda and briefings at <a href="http://www.ntp.org">www.ntp.org</a>.</p>
<p>There are two types of associations: persistent associations, which result from configuration file commands, and ephemeral associations, which result from protocol operations described below. A persistent association is never demobilized, although it may become dormant when the associated server becomes unreachable. An ephemeral association is mobilized when a message arrives from a server; for instance, a symmetric passive association is mobilized upon arrival of a symmetric active message. A broadcast client association is mobilized upon arrival of a broadcast server message, while a Manycast client association is mobilized upon arrival of a Manycast server message.</p>
<p>Ordinarily, successful mobilization of an ephemeral association requires the server to be cryptographically authenticated to the dependent client. This can be done using either symmetric-key or public-key cryptography, as described in the <a href="authopt.html">Authentication Options</a> page. The cryptographic means insure an unbroken chain of trust between the dependent client and the primary servers at the root of the synchronization subnet. We call this chain the <i>provenance</i> of the client and define new vocabulary as to proventicate a client or provide proventic credentials. Once mobilized, ephemeral associations are demobilized when either (a) the server becomes unreachable or (b) the server refreshes the key media without notifying the client.</p>
<p>There are three principal modes of operation: client/server, symmetric active/passive and broadcast. In addition, there are two modes using IP multicast support: multicast and manycast. These modes are selected based on the scope of service, intended flow of time and proventic values and means of configuration. Following is a summary of the operations in each mode.</p>
<h4 id="client">Client/Server Mode</h4>
<p>Client/server mode is probably the most common configuration in the Internet today. It operates in the classic remote-procedure-call (RPC) paradigm with stateless servers. In this mode a client sends a request to the server and expects a reply at some future time. In some contexts this would be described as a &quot;pull&quot; operation, in that the client pulls the time and proventic values from the server. A client is configured in client mode using the <tt>server</tt> (sic) command and specifying the server IPv4 or IPv6 DNS name or address; the server requires no prior configuration. The original NTPv3 authentication scheme is applicable in this mode, as well as the new NTPv4 Autokey proventication scheme. In addition, two burst modes described below can be used in appropriate cases.</p>
<h4 id="symact">Symmetric Active/Passive Mode</h4>
<p>Symmetric active/passive mode is intended for configurations were 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 radio clock, or a subset of secondary servers known to be reliable and proventicated. Should one of the peers lose all reference sources or simply cease operation, the other peers will automatically reconfigure so that time and proventication values can flow from the surviving peers to all the others in the clique. 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 proventic values depending on the particular configuration.</p>
<p>Symmetric peers operate with their sources in some NTP mode and with each other in symmetric mode. A peer is configured in symmetric active mode using the <tt>peer</tt> command and specifying the other peer IPv4 or IPv6 DNS name or address. The other peer can also be configured in symmetric active mode in a similar way. However, if the other peer is not specifically configured in this way, a symmetric passive association is mobilized upon arrival of a symmetric active message. Since an intruder can impersonate a symmetric active peer and inject false time values, symmetric mode should always be cryptographically validated. The original NTPv3 authentication scheme is applicable in this mode, as well as the new NTPv4 Autokey proventication scheme.</p>
<h4 id="broad">Broadcast/Multicast Modes</h4>
<p>IPv4 broadcast mode in both NTPv3 and NTPv4 is limited to directly connected subnets such as Ethernets which support broadcast technology. Ordinarily, this technology does not operate beyond the first hop router or gateway. In IPv6 and where service is intended beyond the local subnet, IP multicasting can be used where supported by the operating system and the routers support the Internet Group Management Protocol (IGMP). Most current kernels and available routers do support IP multicast technology, although service providers are sometimes reluctant to deploy it.</p>
<p>IPv4 broadcast mode is intended for configurations involving one or a few servers and a possibly very large client population on the same subnet. A broadcast server is configured using the <tt>broadcast</tt> command and a IPv4 local subnet broadcast address. A broadcast client is configured using the <tt>broadcastclient</tt> command, in which case it responds to broadcast messages received on any interface. Since an intruder can impersonate a broadcast server and inject false time values, this mode should always be cryptographically validated. The original NTPv3 authentication scheme is applicable in this mode, as well as the new NTPv4 Autokey proventication scheme.</p>
<p>The server generates broadcast messages continuously at intervals specified by the <tt>minpoll</tt> keyword and with a time-to-live span specified by the <tt>ttl</tt> keyword. A broadcast client responds to the first message received by waiting a short interval to avoid implosion at the server. Then, the client polls the server in burst mode in order to quickly set the host clock and validate the source. This normally results in a volley of eight client/server cycles at 2-s intervals during which both the synchronization and cryptographic protocols run concurrently. Following the volley, the client computes the offset between the apparent broadcast time and the (unicast) client time. This offset is used to compensate for the propagation time between the broadcast server and client. Once the offset is computed, the server continues as before and the client sends no further messages. If for some reason the broadcast server does not respond to client messages, the client will time out the volley and continue in listen-only mode with a default propagation delay.</p>
<h4 id="umlt">Multicasting</h4>
<p>Multicasting can be used to extend the scope of a timekeeping subnet in two ways: multicasting and manycasting. A general discussion of IP multicast technology is beyond the scope of this page. In simple terms a host or router sending to a IPv4 or IPv6 multicast group address expects all hosts or routers listening on this address to receive the message. There is no intrinsic limit on the number of senders or receivers and senders can be receivers and vice versa. The IANA has assigned multicast group address IPv4 224.0.1.1 and IPv6 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 with a multicast group address instead of a broadcast address. A multicast client is configured using the <tt>multicastclient</tt> command with a multicast group address. However, there is a subtle difference between IPv4 broadcasting and multicasting. IPv4 broadcasting is specific to each interface and local subnet address. If more than one interface is attached to a machine, a separate <tt>broadcast</tt> command applies to each one separately. This provides a way to limit exposure in a firewall, for example. For IPv6 the same distinction can be made using link-local prefix FF02 for each interface and site-local FF05 for all interfacesl.</p>
<p>IP multicasting is a different paradigm. By design, multicast messages travel from the sender via a shortest-path or shared tree to the receivers, which may require these messages emit from one or all interfaces, but carry a common source address. However, it is possible to configure multiple multicast group addresses using multiple <tt>broadcast</tt> or <tt>multicastclient</tt> commands. Other than these particulars, multicast messages are processed just like broadcast messages. Note that the calibration feature in broadcast mode is extremely important, since IP multicast messages can travel far different paths through the IP routing fabric than ordinary IP unicast messages.</p>
<h4 id="many">Manycasting</h4>
<p>Manycasting is a automatic discovery and configuration paradigm new to NTPv4. It is intended as a means for a multicast client to troll the nearby network neighborhood to find cooperating manycast 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 manycast client mobilizes client associations with some number of the &quot;best&quot; of the nearby anycast servers, yet automatically reconfigures to sustain this number of servers should one or another fail. Additional information is on the <a href="manyopt.html">Automatic NTP Configuration Options</a> page.</p>
<h4 id="burst">Burst Modes</h4>
<p>There are two burst modes where a single poll event triggers a burst of eight packets at 2-s intervals instead of the usual one. The <tt>burst</tt> mode sends a burst when the server is reachable, while the <tt>iburst</tt> mode sends a burst when the server is unreachable. Each mode is independently of the other and both can be used if necessary. The <tt>calldelay</tt> command can be used to increase the interval between the first and second packets in the burst in order to allow a modem to complete a call. 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 sets the system clock in the usual manner, as if only a single client/server cycle had occurred. The result is not only a rapid and reliable setting of the system clock, but a considerable reduction in network jitter.</p>
<p>The <tt>iburst</tt> keyword is used where it is important to set the clock quickly when an association is first mobilized or first becomes reachable or when the network attachment requires an initial calling or training procedure. The burst is initiated only when the server first becomes reachable and results in good accuracy with intermittent connections typical of PPP and ISDN services. Outlyers due to initial dial-up delays, etc., are avoided and the client sets the clock within a few seconds after the first message.</p>
<p>The <tt>burst</tt> keyword can be configured in cases of excessive network jitter or when the network attachment requires an initial calling or training procedure. The burst is initiated at each poll interval when the server is reachable. The burst does produce additional network overhead and can cause trouble if used indiscriminately. It should only be used where the poll interval is expected to settle to values at or above 1024 s.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</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>

View file

@ -1,148 +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: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">18:36</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="246">Thursday, July 28, 2005</csobj></p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/links8.txt"></script>
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#sound">Sound Card Drivers</a>
<li class="inline"><a href="#short">Shortwave Radio Drivers</a>
<li class="inline"><a href="#setup">Setup and Debugging Aids</a>
</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, modelled 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 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 radio drivers. The largest error observed so far is about 60 PPM, but it is possible some sound cards or codecs may exceed that value.</p>
<p>The drivers include provisions to select the input port and to monitor the input signal. The <tt>fudge flag 2</tt> 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> 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>Transitions between daytime and nightime conditions generally occur somewhat after sunrise and sunset at the midpoint of the path from transmitter to receiver.
<li>Ambient noise (static) on the lower frequencies follows the thunderstorm season, so is higher on summer afternoons and evenings.
<li>The lower frequency bands are best for shorter distances, while the higher bands are best for longer distances.
<li>The optimum frequencies are higher at the peak of the 11-year sunspot cycle and lower at the trough. The current sunspot cycle should peak in the first couple of years beginning the century.
</ul>
<p>The best way to choose a frequency is to listen at various times over the day and determine the best highest (daytime) and lowest (nighttime) frequencies. Then, assuming one is available, choose the highest frequency between these frequencies. This strategy assumes that the high frequency is more problematic than the low, that the low frequency probably comes with severe multipath and static, and insures that probably twice a day the chosen frequency will work. For instance, on the east coast the best compromise CHU frequency is probably 7335 kHz and the best WWV frequency is probably 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>R71</td>
<td>0x1A</td>
<td>26</td>
</tr>
<tr>
<td>735</td>
<td>0x04</td>
<td>4</td>
<td>R72</td>
<td>0x32</td>
<td>50</td>
</tr>
<tr>
<td>746</td>
<td>0x66</td>
<td>102</td>
<td>R75</td>
<td>0x5a</td>
<td>90</td>
</tr>
<tr>
<td>751</td>
<td>0x1c</td>
<td>28</td>
<td>R7000</td>
<td>0x08</td>
<td>8</td>
</tr>
<tr>
<td>756PROII</td>
<td>0x64</td>
<td>100</td>
<td>R7100</td>
<td>0x34</td>
<td>52</td>
</tr>
<tr>
<td>761</td>
<td>0x1e</td>
<td>30</td>
<td>R8500</td>
<td>0x4a</td>
<td>74</td>
</tr>
<tr>
<td>765</td>
<td>0x2c</td>
<td>44</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 line level signal not affected by the volume control. These signals can be connected to the line-in port on the computer. If the level is too low, connect to the microphone-in port instead. 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 an attenuator must be used to reduce the signal level below the overload point.</p>
<p>It is very easy to underdrive 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 hum and interference. This feature is not intended for regular use, since it does increase the processor load on the system. Note that the speaker 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>
<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>

View file

@ -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>

View file

@ -1,155 +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 Options</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Authentication 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: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">01:29</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="338">Wednesday, September 13, 2006</csobj></p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/links9.txt"></script>
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#auth">Authentication Support</a>
<li class="inline"><a href="#symm">Symmetric Key Cryptography</a>
<li class="inline"><a href="#pub">Public Key Cryptography</a>
<li class="inline"><a href="#cfg">Configuration</a>
<li class="inline"><a href="#inter">Operation</a>
<li class="inline"><a href="#key">Key Management</a>
<li class="inline"><a href="#cmd">Authentication Commands</a>
<li class="inline"><a href="#err">Error Codes</a>
<li class="inline"><a href="#file">Files</a>
</ul>
<hr>
<h4 id="auth">Authentication Support</h4>
<p>Authentication support allows the NTP client to verify that the server is in fact known and trusted and not an intruder intending accidentally or on purpose to masquerade as that server. The NTPv3 specification RFC-1305 defines a scheme which provides cryptographic authentication of received NTP packets. Originally, this was done using the Data Encryption Standard (DES) algorithm operating in Cipher Block Chaining (CBC) mode, commonly called DES-CBC. Subsequently, this was replaced by the RSA Message Digest 5 (MD5) algorithm using a private key, commonly called keyed-MD5. Either algorithm computes a message digest, or one-way hash, which can be used to verify the server has the correct private key and key identifier.</p>
<p>NTPv4 retains the NTPv3 scheme, properly described as symmetric key cryptography, and, in addition, provides a new Autokey scheme based on public key cryptography. Public key cryptography is generally considered more secure than symmetric key cryptography, since the security is based on a private value which is generated by each host and never revealed. With the exception of the group key described later, all key distribution and management functions involve only public values, which considerably simplifies key distribution and storage. Public key management is based on X.509 certificates, which can be provided by commercial services or produced by utility programs in the OpenSSL software library or the NTPv4 distribution.</p>
<p>While the algorithms for symmetric key cryptography are included in the NTPv4 distribution, public key cryptography requires the OpenSSL software library to be installed before building the NTP distribution. 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/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>Authentication is configured separately for each association using the <tt>key</tt> or <tt>autokey</tt> subcommand on the <tt>peer</tt>, <tt>server</tt>, <tt>broadcast</tt> and <tt>manycastclient</tt> configuration commands as described in the <a href="confopt.html">Configuration Options</a> page. The authentication options described below specify the locations of the key files, if other than default, which symmetric keys are trusted and the interval between various operations, if other than default.</p>
<p>Authentication is always enabled, although ineffective if not configured as described below. If a NTP packet arrives including a message authentication code (MAC), it is accepted only if it passes all cryptographic checks. The checks require correct key ID, key value and message digest. If the packet has been modified in any way or replayed by an intruder, it will fail one or more of these checks and be discarded. Furthermore, the Autokey scheme requires a preliminary protocol exchange to obtain the server certificate, verify its credentials and initialize the protocol</p>
<p>The <tt>auth</tt> flag controls whether new associations or remote configuration commands require cryptographic authentication. This flag can be set or reset by the <tt>enable</tt> and <tt>disable</tt> commands and also by remote configuration commands sent by a <tt>ntpdc</tt> program running on another machine. If this flag is enabled, which is the default case, new broadcast/manycast client and symmetric passive associations and remote configuration commands must be cryptographically authenticated using either symmetric key or public key cryptography. If this flag is disabled, these operations are effective even if not cryptographic authenticated. It should be understood that operating with the <tt>auth</tt> flag disabled invites a significant vulnerability where a rogue hacker can masquerade as a truechimer and seriously disrupt system timekeeping. It is important to note that this flag has no purpose other than to allow or disallow a new association in response to new broadcast and symmetric active messages and remote configuration commands and, in particular, the flag has no effect on the authentication process itself.</p>
<p>The security model and protocol schemes for both symmetric key and public key cryptography are summarized below; 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>
<h4 id="symm">Symmetric Key Cryptography</h4>
The original RFC-1305 specification allows any one of possibly 65,534 keys, each distinguished by a 32-bit key identifier, to authenticate an association. The servers and clients involved must agree on the key and key identifier to authenticate NTP packets. Keys and related information are specified in a key file, usually called <tt>ntp.keys</tt>, 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.
<p>When <tt>ntpd</tt> is first started, it reads the key file specified in the <tt>keys</tt> configuration command and installs the keys in the key cache. However, individual keys must be activated with the <tt>trustedkey</tt> command before use. This allows, for instance, the installation of possibly several batches of keys and then activating or deactivating each batch remotely using <tt>ntpdc</tt>. This also provides a revocation capability that can be used if a key becomes compromised. The <tt>requestkey</tt> command selects the key used as the password for the <tt>ntpdc</tt> utility, while the <tt>controlkey</tt> command selects the key used as the password for the <tt>ntpq</tt> utility.</p>
<h4 id="pub">Public Key Cryptography</h4>
<p>NTPv4 supports the original NTPv3 symmetric key scheme described in RFC-1305 and in addition the Autokey protocol, which is based on public key cryptography. 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 MD5 message digests and verifies the source with digital signatures and any of several digest/signature schemes. Optional identity schemes described on the <a href="http://www.eecis.udel.edu/%7emills/ident.html">Identity Schemes</a> page and based on cryptographic challenge/response algorithms are also available. Using these schemes provides strong security against replay with or without modification, spoofing, masquerade and most forms of clogging attacks.</p>
<p>The Autokey protocol has several modes of operation corresponding to the various NTP modes supported. Most modes use a special cookie which can be computed independently by the client and server, but encrypted in transmission. All modes use in addition a variant of the S-KEY scheme, in which a pseudo-random key list is generated and used in reverse order. These schemes are described along with an executive summary, current status, briefing slides and reading list on the <a href="http://www.eecis.udel.edu/%7emills/autokey.html">Autonomous Authentication</a> page.</p>
<p>The specific cryptographic environment used by Autokey servers and clients is determined by a set of files and soft links generated by the <a href="keygen.html"><tt>ntp-keygen</tt></a> program. This includes a required host key file, required host certificate file and optional sign key file, leapsecond file and identity scheme files. The digest/signature scheme is specified in the X.509 certificate along with the matching sign key. There are several schemes available in the OpenSSL software library, each identified by a specific string such as <tt>md5WithRSAEncryption</tt>, which stands for the MD5 message digest with RSA encryption scheme. The current NTP distribution supports all the schemes in the OpenSSL library, including those based on RSA and DSA digital signatures.</p>
<p>NTP secure groups can be used to define cryptographic compartments and security hierarchies. It is important that every host in the group be able to construct a certificate trail to one or more trusted hosts in the same group. Each group host runs the Autokey protocol to obtain the certificates for all hosts along the trail to one or more trusted hosts. This requires the configuration file in all hosts to be engineered so that, even under anticipated failure conditions, the NTP&nbsp;subnet will form such that every group host can find a trail to at least one trusted host.</p>
<h4>Naming and Addressing</h4>
<p>It is important to note that Autokey does not use DNS&nbsp;to resolve addresses, since DNS can't be completely trusted until the name servers have synchronized clocks. The cryptographic name used by Autokey to bind the host identity credentials and cryptographic values must be independent of interface, network and any other naming convention. The name appears in the host certificate in either or both the subject and issuer fields, so protection against DNS&nbsp;compromise is essential.</p>
<p>By convention, the name of an Autokey host is the name returned by the Unix <tt>gethostname()</tt> system call or equivalent in other systems. By the system design model, there are no provisions to allow alternate names or aliases. However, this is not to say that DNS&nbsp;aliases, different names for each interface, etc., are constrained in any way.</p>
<p>It is also important to note that Autokey verifies authenticity using the host name, network address and public keys, all of which are bound together by the protocol specifically to deflect masquerade attacks. For this reason Autokey includes the source and destinatino IP&nbsp;addresses in message digest computations and so the same addresses must be available 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&nbsp;servers are operated outside firewall perimeters.</p>
<h4 id="cfg">Configuration</h4>
<p>Autokey has an intimidating number of options, most of which are not necessary in typical scenarios. The simplest configuration consists of a subnet with one or more servers at the same low stratum acting as trusted hosts and with dependent clients at higher strata and sharing a single secure group and identity scheme. Each trusted host generates a host key, trusted certificate and group key. Each client generates a host key, normal certificate and installs the group key of each trusted host using secure means and renames it as the name of the trusted host.</p>
<p>For example, trusted host Alice generates keys using</p>
<p><tt>ntp-keygen -H -T -I -p xyz</tt></p>
<p>where H specifies a new host key, T the trusted certificate, I&nbsp;the IFF&nbsp;identity scheme and p the password used to encrypt the private key files. The group key file is <tt>ntpkey_IFFpar_alice.<i>filestamp</i></tt><i>, </i>where <i>filestamp </i>represents the NTP&nbsp;time in seconds when the file was generated.</p>
<p>Host Bob generate keys using</p>
<p><tt>ntp-keygen -H -p abc</tt></p>
<p>where <tt>abc</tt> is different for each group host. The trusted host generates a password-protected group key using</p>
<p><tt>ntp-keygen -q xyz -p abc -e &gt;<i>temp</i></tt></p>
<p>where <tt>xyz</tt> is the trusted host password, <tt>abc</tt> is the password supplied by the client and <i><tt>temp</tt></i> is a temporary file. This file is transmitted to Bob using secure means and renamed to the fully qualified host name for Alice preceded by the string <tt>ntpkey_iff_</tt>.</p>
<h4>Operation</h4>
<p>A specific combination of authentication scheme (none, symmetric key, public key) and identity scheme is called a cryptotype, although not all combinations are compatible. There may be management configurations where the clients, servers and peers may not all support the same cryptotypes. A secure NTPv4 subnet can be configured in many ways while keeping in mind the principles explained above and in this section. Note however that some cryptotype combinations may successfully interoperate with each other, but may not represent good security practice.</p>
<p>The cryptotype of an association is determined at the time of mobilization, either at configuration time or some time later when a message of appropriate cryptotype arrives. When mobilized by a <tt>server</tt> or <tt>peer</tt> configuration command and no <tt>key</tt> or <tt>autokey</tt> subcommands are present, the association is not authenticated; if the <tt>key</tt> subcommand is present, the association is authenticated using the symmetric key ID specified; if the <tt>autokey</tt> subcommand is present, the association is authenticated using Autokey.</p>
<h4 id="key">Key Management</h4>
<p>The cryptographic values used by the Autokey protocol are incorporated as a set of files generated by the <a href="keygen.html"><tt>ntp-keygen</tt></a> utility program, including symmetric key, host key and public certificate files, as well as sign key, identity parameters and leapseconds files. Alternatively, host and sign keys and certificate files can be generated by the OpenSSL utilities and certificates can be imported from public certificate authorities. Note that symmetric keys are necessary for the <tt>ntpq</tt> and <tt>ntpdc</tt> utility programs. The remaining files are necessary only for the Autokey protocol.</p>
<p>Certificates imported from OpenSSL or public certificate authorities have certian limitations. The certificate should be in ASN.1 syntax, X.509 Version 3 format and encoded in PEM, which is the same format used by OpenSSL. The overall length of the certificate encoded in ASN.1 must not exceed 1024 bytes. The subject distinguished name field (<tt>CN</tt>) is the fully qualified name of the host on which it is used; the remaining subject fields are ignored. The certificate extension fields must not contain either a subject key identifier or a issuer key identifier field; however, an extended key usage field for a trusted host must contain the value <tt>trustRoot</tt>;. Other extension fields are ignored.</p>
<h4 id="cmd">Authentication Commands</h4>
<dl>
<dt><tt>autokey [<i>logsec</i>]</tt>
<dd>Specifies the interval between regenerations of the session key list used with the Autokey protocol. Note that the size of the key list for each association depends on this interval and the current poll interval. The default value is 12 (4096 s or about 1.1 hours). For poll intervals above the specified interval, a session key list with a single entry will be regenerated for every message sent.
<dt><tt>controlkey <i>key</i></tt>
<dd>Specifies the key identifier to use with the <a href="ntpq.html"><tt>ntpq</tt></a> utility, which uses the standard protocol defined in RFC-1305. The <tt><i>key</i></tt> argument is the key identifier for a trusted key, where the value can be in the range 1 to 65,534, inclusive.
<dt><tt>crypto [cert <i>file</i>] [leap <i>file</i>] [randfile <i>file</i>] [host <i>file</i>] [sign <i>file</i>] [ident <i>scheme</i>] [iffpar <i>file</i>] [gqpar <i>file</i>] [mvpar <i>file</i>] [pw <i>password</i>]</tt>
<dd>This command requires the OpenSSL library. It activates public key cryptography, selects the message digest and signature encryption scheme and loads the required private and public values described above. If one or more files are left unspecified, the default names are used as described above. 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> command or default <tt>/usr/local/etc</tt>. Following are the subcommands:
<dl>
<dt><tt>cert <i>file</i></tt>
<dd>Specifies the location of the required host public certificate file. This overrides the link <tt>ntpkey_cert_<i>hostname</i></tt> in the keys directory.
<dt><tt>gqpar <i>file</i></tt>
<dd>Specifies the location of the client GQ parameters file. This overrides the link <tt>ntpkey_gq_<i>hostname</i></tt> in the keys directory.
<dt><tt>host <i>file</i></tt>
<dd>Specifies the location of the required host key file. This overrides the link <tt>ntpkey_key_<i>hostname</i></tt> in the keys directory.
<dt><tt>ident <i>scheme</i></tt>
<dd>Requests the server identity <i><tt>scheme</tt></i>, which can be <tt>IFF</tt>, <tt>GQ</tt> or <tt>MV</tt>. This is used when the host will not be a server for a dependent client.<dt><tt>iffpar <i>file</i></tt>
<dd>Specifies the location of the optional IFF parameters file.This overrides the link <tt>ntpkey_iff_<i>hostname</i></tt> in the keys directory.
<dt><tt>leap <i>file</i></tt>
<dd>Specifies the location of the client leapsecond file. This overrides the link <tt>ntpkey_leap</tt> in the keys directory.
<dt><tt>mv</tt>
<dd>Requests the MV server identity scheme.
<dt><tt>mvpar <i>file</i></tt>
<dd>Specifies the location of the client MV parameters file. This overrides the link <tt>ntpkey_mv_<i>hostname</i></tt> in the keys directory.
<dt><tt>pw <i>password</i></tt>
<dd>Specifies the password to decrypt files containing private keys and identity parameters. This is required only if these files have been encrypted.
<dt><tt>randfile <i>file</i></tt>
<dd>Specifies the location of the random seed file used by the OpenSSL library. The defaults are described in the main text above.
<dt><tt>sign <i>file</i></tt>
<dd>Specifies the location of the optional sign key file. This overrides the link <tt>ntpkey_sign_<i>hostname</i></tt> in the keys directory. If this file is not found, the host key is also the sign key.
</dl>
<dt><tt>keys <i>keyfile</i></tt>
<dd>Specifies the complete path and location of the MD5 key file containing the keys and key identifiers used by <tt>ntpd</tt>, <tt>ntpq</tt> and <tt>ntpdc</tt> when operating with symmetric key cryptography. This is the same operation as the <tt>-k </tt>command line option.
<dt><tt>keysdir <i>path</i></tt>
<dd>This command specifies the default directory path for cryptographic keys, parameters and certificates. The default is <tt>/usr/local/etc/</tt>.
<dt><tt>requestkey <i>key</i></tt>
<dd>Specifies the key identifier to use with 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>key</i></tt> argument is a key identifier for the trusted key, where the value can be in the range 1 to 65,534, inclusive.
<dt><tt>revoke [<i>logsec</i>]</tt>
<dd>Specifies the interval between re-randomization of certain cryptographic values used by the Autokey scheme, as a power of 2 in seconds. These values need to be updated frequently in order to deflect brute-force attacks on the algorithms of the scheme; however, updating some values is a relatively expensive operation. The default interval is 16 (65,536 s or about 18 hours). For poll intervals above the specified interval, the values will be updated for every message sent.
<dt><tt>trustedkey <i>key</i> [...]</tt>
<dd>Specifies the key identifiers which are trusted for the purposes of authenticating peers with symmetric key cryptography, as well as keys used by the <tt>ntpq</tt> and <tt>ntpdc</tt> programs. The authentication procedures require that both the local and remote servers share the same key and key identifier for this purpose, although different keys can be used with different servers. The <tt><i>key</i></tt> arguments are 32-bit unsigned integers with values from 1 to 65,534.
</dl>
<h4 id="err">Error Codes</h4>
<p>Errors can occur due to mismatched configurations, unexpected 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 <tt><a href="keygen.html">ntp-keygen</a></tt> program.</p>
<p>The following error codes are reported via the NTP control and monitoring protocol trap mechanism.</p>
<dl>
<dt>101 (bad field format or length)
<dd>The packet has invalid version, length or format.
<dt>102 (bad timestamp)
<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.
<dt>103 (bad filestamp)
<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.
<dt>104 (bad or missing public key)
<dd>The public key is missing, has incorrect format or is an unsupported type.
<dt>105 (unsupported digest type)
<dd>The server requires an unsupported digest/signature scheme.
<dt>106 (unsupported identity type)<dd>The client or server has requested an identity scheme the other does not support.<dt>107 (bad signature length)
<dd>The signature length does not match the current public key.
<dt>108 (signature not verified)
<dd>The message fails the signature check. It could be bogus or signed by a different private key.
<dt>109 (certificate not verified)
<dd>The certificate is invalid or signed with the wrong key.<dt>110 (host certificate expired)<dd>The old server certificate has expired.<dt>111 (bad or missing cookie)
<dd>The cookie is missing, corrupted or bogus.
<dt>112 (bad or missing leapseconds table)
<dd>The leapseconds table is missing, corrupted or bogus.
<dt>113 (bad or missing certificate)
<dd>The certificate is missing, corrupted or bogus.
<dt>114 (bad or missing group key)<dd>The identity key is missing, corrupt or bogus.
<dt>115 (protocol error)
<dd>The protocol state machine has wedged due to unexpected restart
<dt>116 (server certificate expired)
<dd>The old server certificate has expired.
</dl>
<h4 id="file">Files</h4>
<p>See the <a href="keygen.html"><tt>ntp-keygen</tt></a> page.</p>
<h4 id="leap">Leapseconds Table</h4>
<p>The NIST provides a file documenting the epoch for all historic occasions of leap second insertion since 1972. The leapsecond table shows each epoch of insertion along with the offset of International Atomic Time (TAI) with respect to Coordinated Universal Time (UTC), as disseminated by NTP. The table can be obtained directly from NIST national time servers using <tt>ftp</tt> as the ASCII file <tt>pub/leap-seconds</tt>.</p>
<p>While not strictly a security function, the Autokey protocol provides means to securely retrieve the leapsecond table from a server or peer. Servers load the leapsecond table directly from the file specified in the <tt>crypto</tt> command, with default <tt>ntpkey_leap</tt>, while clients can obtain the table indirectly from the servers using the Autokey protocol. Once loaded, the table can be provided on request to other clients and servers.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -1,83 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">03:06 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 13, 2003</csobj></p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#build">Building and Installing the Distribution</a>
<li class="inline"><a href="#unix">Building and Installing under Unix</a>
<li class="inline"><a href="#comp">Compilation</a>
<li class="inline"><a href="#install">Installation</a>
<li class="inline"><a href="#config">Configuration</a>
<li class="inline"><a href="#prob">If You Have Problems</a>
<li class="inline"><a href="#win">Building and Installing under Windows NT</a>
</ul>
<hr>
<h4 id="build">Building and Installing the Distribution</h4>
<p>As a practical matter, every computer architecture and operating system version seems to be different than any other. The device drivers may be different, the input/output system may be idiosyncratic and the libraries may have different semantics. It is not possible in a software distribution such as this one to support every individual system with a common set of binaries, even with the same system but different versions. Therefore, it is necessary to individually configure the software build for each system and version, both at compile time and at run time. In almost all cases, these procedures are completely automatic and all the newbie user need do is type &quot;configure&quot;, &quot;make&quot; and &quot;install&quot; 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> page.</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 NTPv4. The procedures for doing that are included in the OpenSSL documentation. The library is found during the normal NTPv4 configure phase and the interface routines compiled automatically. Only the <tt>libcrypto.a</tt> library and associated header files are used. If the library is not available or disabled, this step is not required.</p>
<h4 id="unix">Building and Installing under Unix</h4>
<p>Make sure that you have all necessary tools for building executables. These tools include <tt>cc/gcc, make, awk, sed, tr, sh, grep, egrep</tt> and a few others. 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. 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 tests for the presence of system header files and the contents of these files to determine if certain features are present. When one or more of these features are present, the code is compiled to use them; if not, no special code is compiled. However, even if the code is compiled to use these features, the code does a special test at run time to see if one or more are actually present and avoids using them if not present. In such cases a warning message is sent to the system log, but the daemon should still work properly.</p>
<p>The default build normally includes the debugging code, which can be useful in diagnosing problems found in initial test, and all reference clock drivers known to work with each machine and operating system. Unless memory space is at a premium, this is a sensible strategy and greatly simplifies debugging and support. If you need to delete either the debugging code or one or all reference clock drivers to save space, see the <a href="config.html">Configuration Options</a> page.</p>
<p>If your site supports multiple architectures and uses NFS to share files, you can use a single source tree to compile executables for all architectures. While running on a target architecture machine and in the distribution base directory create a subdirectory using a command like <tt>mkdir A.`config.guess`</tt>, which will create an architecture-specific directory with name peculiar to the architecture and operating system. Then change to this directory and emit a <tt>../configure</tt> command. The remaining steps are the same whether building in the base directory or in the subdirectory.</p>
<h4 id="comp">Compilation</h4>
<p>Use the <tt>make</tt> command to compile all source modules, construct the libraries and link the distribution. Expect few or no warnings using <tt>cc</tt> and a moderate level of warnings using <tt>gcc</tt>. Note: On some Unix platforms <tt>gcc</tt> may show quite a few complaints about system header files and type inconsistencies, especially with pointer variables. This is usually the case when the system header files are not up to ANSI standards or <tt>gcc </tt>expectations, when <tt>gcc</tt> is not installed properly, or when operating system updates and patches are applied and <tt>gcc</tt> is not reinstalled. While the autoconfigure process is quite thorough, the Unix programming cultures of the various workstation makers still remain idiosyncratic.</p>
<h4 id="install">Installation</h4>
<p>As root, use the <tt>make install</tt> command to install the binaries in the destination directory. Most commonly, these programs are installed in <tt>/usr/local/bin</tt>, but this can be overridden during configuration. You must of course have write permission on the install in the destination directory. This includes the following programs:</p>
<ul>
<li><a href="../ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a>
<li><a href="../ntpq.html"><tt>ntpq</tt> - standard NTP query program</a>
<li><a href="../ntpdc.html"><tt>ntpdc</tt> - special NTP query program</a>
<li><a href="../ntpdate.html"><tt>ntpdate</tt> - set the date and time via NTP</a>
<li><a href="../ntptrace.html"><tt>ntptrace</tt> - trace a chain of NTP servers back to the primary source</a>
</ul>
<p>If the precision time kernel modifications are present, the following program is installed:</p>
<ul>
<li><a href="../ntptime.html"><tt>ntptime</tt> - read kernel time variables</a>
</ul>
<p>If the public key authentication functions are present, the following program is installed:</p>
<ul>
<li><a href="../keygen.html"><tt>ntp-keygen</tt> - generate public and private keys</a>
</ul>
<p>In some systems that include the capability to edit kernel variables, the following program is installed:</p>
<ul>
<li><a href="../tickadj.html"><tt>tickadj</tt> - set time-related kernel variables</a>
</ul>
<p>Cryptographic support, both symmetric and public key, requires one or more key files, commonly installed in <tt>/usr/local/etc</tt>. Public key cryptography requires a random seed file, usually called <tt>.rnd</tt>, installed in a dark place such as the root directory or <tt>/etc</tt>. Directions for generating keys is on the <a href="../authopt.html">Authentication Options</a> page.</p>
<h4 id="config">Configuration</h4>
<p>You are now ready to configure the daemon and start it. You will need to create a NTP configuration file <tt>ntp.conf</tt> and a cryptographic key file <tt>ntp.keys</tt>. The latter file is necessary only for remote configuration support, if needed. 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. A tutorial on NTP subnet design and configuration options is in the <a href="../notes.html">Notes on Configuring NTP and Setting up a NTP Subnet</a> page.</p>
<h4 id="prob">If You Have Problems</h4>
<p>If you have problems peculiar to the particular hardware and software environment (e.g. operating system-specific issues), browse the <a href="hints.html">Hints and Kinks</a> page. For other problems a tutorial on debugging technique is in the <a href="../debug.html">NTP Debugging Technique</a> page. As always, the first line of general assistance is the NTP web site <a href="http://www.ntp.org">www.ntp.org</a> and the FAQ 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. Bug reports of a specific nature should be sent to <a href="mailto:bugs@mail.ntp.org">bugs@ntp.org</a>. Bug reports of a specific nature on features implemented by the programmer corps mentioned in the <a href="../copyright.html">Copyright</a> page should be sent directly to the implementor listed in that page, with copy to bugs@ntp.org.</p>
<p>Please include the version of the source distribution (e.g., ntp-4.0.70a) in your bug report, as well as billboards from the relevant utility programs and debug trace, if available. Please include the output of <tt>config.guess</tt> in your bug report. It will look something like:</p>
<p><tt>pdp11-dec-fuzzos3.4</tt></p>
<h4>Additional <tt>make</tt> commands</h4>
<dl>
<dt><tt>make clean</tt>
<dd>Cleans out object files, programs and temporary files.
<dt><tt>make distclean</tt>
<dd>Does the work of <tt>clean</tt>, but cleans out all directories in preparation for a new distribution release.
<dt><tt>make dist</tt>
<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.
</dl>
<h4 id="win">Building and Installing under Windows NT</h4>
<p>See <tt><a href="hints/winnt.html">hints/winnt.htm</a></tt> for directions to compile the sources and install the executables.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>

View file

@ -1,168 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Configuration Options</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Configuration Options</h3>
<img src="../pic/pogo3a.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html">from <i>Pogo</i>, Walt Kelly</a>
<p>Gnu autoconfigure tools are in the backpack.</p>
<p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">12:56 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="266">Saturday, March 20, 2004</csobj></p>
<br clear="left">
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#basic">Basic Configuration Options - the <tt>configure</tt> utility</a>
<li class="inline"><a href="#opt">Options</a>
<li class="inline"><a href="#dir">Directory and File Names</a>
<li class="inline"><a href="#host">Host Type</a>
<li class="inline"><a href="#pkg">Optional Packages</a>
<li class="inline"><a href="#feat">Optional Features</a>
<li class="inline"><a href="#radio">Radio Clocks</a>
<li class="inline"><a href="#parse">PARSE Clocks</a>
</ul>
<hr>
<h4 id="basic">Basic Configuration Options - the <tt>configure</tt> utility</h4>
<p>The following options are for compiling and installing a working version of the NTP distribution. In most cases, the build process is completely automatic. In some cases where memory space is at a premium, or the binaries are to be installed in a different place, it is possible to tailor the configuration to remove such features as reference clock driver support, debugging support, and so forth.</p>
<p>Configuration options are specified as arguments to the <tt>configure</tt> script. Following is a summary of the current options, as of the 4.0.99m version:</p>
<p>Usage: <tt>configure [options] [host]</tt><br>
</p>
<h4 id="opt">Options</h4>
<p><tt>[defaults in brackets after descriptions]</tt> Configuration:</p>
<pre>
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print `checking...' messages
--version print the version of autoconf that created
configure
</pre>
<h4 id="dir">Directory and File Names</h4>
<pre>
--prefix=PREFIX install architecture-independent files in PREFIX [/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
--sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data in DIR [PREFIX/share]
--sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
</pre>
<h4 id="host">Host Type</h4>
<pre>
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
</pre>
<h4 id="pkg">Optional Packages</h4>
<pre>
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
openssl-libdir=DIR OpenSSL object code libraries in DIR [/usr/lib/usr/local/lib/usr/local/ssl/lib]
openssl-incdir=DIR OpenSSL header files in DIR [/usr/include/usr/local/include/usr/local/ssl/include]
crypto=autokey Use autokey cryptography
crypto=rsaref Use the RSAREF library
electricfence Compile with ElectricFence malloc debugger
</pre>
<h4 id="feat">Optional Features</h4>
<pre>
--disable-FEATURE do not include FEATURE (same as
--enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
accurate-adjtime The adjtime() call is accurate
clockctl use /dev/clockctl (non root control of system clock)
debugging Include debugging code [enable]
des Include support for DES keys [enable]
dst-minutes=VALUE Minutes per DST adjustment [60]
gdt-surveying Include GDT survey code [disable]
hourly-todr-sync If we should sync TODR hourly
kernel-fll-bug If we should avoid a (Solaris) kernel FLL bug
kmem Read /dev/kmem for 'tick' and/or 'tickadj'
md5 Include support for MD5 keys [enable]
ntpdate-step If ntpdate should step the time
slew-always Always slew the time
step-slew Step and slew the time
tick=VALUE Force a value for 'tick'
tickadj=VALUE Force a value for 'tickadj'
udp-wildcard Use UDP wildcard delivery
</pre>
<h4 id="radio">Radio Clocks</h4>
<p>(these are ordinarily enabled, if supported by the machine and operating system):</p>
<pre>
all-clocks Include drivers for all suitable non-PARSE clocks [enable]
ACTS NIST dialup clock
ARBITER Arbiter 1088A/B GPS receiver
ARCRON_MSF Arcron MSF receiver
AS2201 Austron 2200A or 2201A GPS receiver
ATOM ATOM PPS interface
AUDIO-CHU CHU audio decoder
BANCOMM Datum/Bancomm BC635/VME interface (requires an explicit --enable-BANCOMM request)
CHRONOLOG Chrono-log K-series WWVB receiver
CHU CHU modem decoder
DATUM Datum Programmable Time System
DUMBCLOCK Dumb generic hh:mm:ss local clock
FG Forum Graphic GPS
GPSVME TrueTime GPS receiver with VME interface (requires an explicit --enable-GPSVME request)
HEATH HeathKit GC-1000 Most Accurate Clock
HOPFPCI HOPF 6039 PCI board
HOPFSERIAL HOPF serial clock device
HPGPS HP 58503A GPS Time &amp; Frequency receiver
IRIG IRIG (Audio) Clock
JUPITER Rockwell Jupiter GPS receiver
LEITCH Leitch CSD 5300 Master Clock System Driver
LOCAL-CLOCK Local clock driver
MSFEES EES M201 MSF receiver
MX4200 Magnavox MX4200 GPS receiver
NMEA NMEA GPS receiver
ONCORE Motorola VP/UT Oncore GPS receiver
PALISADE Palisade clock
PCF Conrad parallel port radio clock
PST PST/Traconex 1020 WWV/H receiver
PTBACTS PTB dialup clock support
SHM Clock attached through shared memory (requires an explicit --enable-SHM request)
SPECTRACOM Spectracom 8170/Netclock/2 WWVB receiver
TRAK TRAK 8810 GPS station clock
TPRO KSI/Odetics TPRO/S IRIG Interface
TRUETIME Kinemetrics/TrueTime (generic) receiver
ULINK Ultralink WWVB receiver
USNO US Naval Observatory dialup clock
WWV WWV audio receiver
</pre>
<h4 id="parse">PARSE Clocks</h4>
<pre>
parse-clocks Include drivers for all suitable PARSE clocks [enable]
COMPUTIME Diem Computime Radio Clock
DCF7000 ELV/DCF7000 Clock
HOPF6021 HOPF 6021 Radio Clock support
MEINBERG Meinberg clocks
RAWDCF DCF77 raw time code
RCC8000 RCC 8000 Radio Clock support
SCHMID SCHMID DCF77 clock support
TRIMTAIP Trimble GPS/TAIP Protocol
TRIMTSIP Trimble GPS/TSIP Protocol
VARITEXT VARITEXT clock
WHARTON Wharton 400A Series clock
</pre>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>

View file

@ -1,23 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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" alt="gif"><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: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">12:56 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="266">Saturday, March 20, 2004</csobj></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>

View file

@ -1,37 +0,0 @@
Starting with NetBSD-1.6, it is possible to delegate the system clock
control to a non root user. This enable running ntpd in a chroot
jail under a non privilegied UID/GID, using ntpd -i and -u flags.
The delegation is done through the clockctl(4) pseudodevice driver.
This driver makes privilegied system calls such as ntp_adjtime(2)
available through ioctl(2) on the /dev/clockctl device. If a user
is able to write to /dev/clockctl, then (s)he can control the system
clock.
In order to use this feature, make sure that:
1) Your kernel is compiled with the following option:
pseudo-device clockctl
This is true for GENERIC kernels on most ports. Please check
http://wwW.netbsd.org/Documentation/kernel/
if you need information about building a kernel.
2) You have a ntpd user on your system. Here is the /etc/master.passwd
entry for ntpd user on NetBSD-1.6:
ntpd:*:15:15::0:0:& pseudo-user:/var/chroot/ntpd:/sbin/nologin
And here is the /etc/group entry for group 15:
ntpd:*:15:
3) /dev/clockctl exists and is writtable by user ntpd. Default
NetBSD-1.6 setting is:
crw-rw---- 1 root ntpd 61, 0 Apr 1 2002 /dev/clockctl
Major device number and date is likely to be different on your system.
If you need to create the device, issue the following command:
cd /dev && ./MAKEDEV clockctl
Here is an example of how to run ntpd chrooted in /var/chroot/ntpd,
running with ntpd UID and ntpd GID:
ntpd -i /var/chroot/ntpd -u ntpd:ntpd
Note that -i and -u options are enabled at configure time if your
system supports system clock control by an unprivilegied user. If this
is not the case, then the -i and -u options will not be available.

View file

@ -1,144 +0,0 @@
<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>
Last Updated: Sun Jun 21 01:32:18 EDT 1998,
John Hawkinson,
<! -- This is deliberately not a mailto -- > &lt;jhawk@MIT.EDU&gt;
<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="../../notes.html#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>.
<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>

View file

@ -1,82 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>vxWorks Port of NTP</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body link="#00008B" vlink="#8B0000">
<h1>VxWorks port of NTP</h1>
<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 main() is not allowed, and where the configure scripts need to be altered.</p>
<h1><b>Configuration issues</b></h1>
<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 /usr/wind. 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>
<p>export CC=&quot;cc386 -nostdlib -m486 -DCPU=I80486 -I/usr/wind/target/h&quot;<br>
export RANLIB=ranlib386<br>
export AR=ar386<br>
export VX_KERNEL=/usr/wind/target/config/ims_std_bsp/vxWorks<br>
cd /usr/wind/target/sys<br>
ln -s ../signal.h<br>
ln -s ../time.h<br>
ln -s socket.h sockio.h<br>
ln -s ../selectLib.h select.h<br>
ln -s ../timers.h<br>
touch file.h param.h resource.h utsname.h var.h ../netdb.h ../a.out.h ../termios.h<br>
echo &quot; ******ADD #include \&quot;sys/times.h\&quot; to sys/time.h &quot;</p>
<p>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:<br>
sed -e 's%main.*()%vxmain()%' configure &gt; configure.vxnew<br>
mv configure.vxnew configure<br>
chmod 755 configure</p>
<p>The new version 4 of NTP requires some maths functions so it links in the maths library (-lm) in the ntpd <a href="../../ntpd/Makefile.am">Makefile.am</a> change the line &quot;ntpd_LDADD = $(LDADD) -lm&quot; by removing the &quot;-lm&quot;.<br>
You are now ready to compile</p>
<p><br>
The <a href="../../configure.in">configure.in </a>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 <a href="../../include/ntp_machine.h">ntp_machine.h </a>file to add in the checks that would have been checked at linking stage by autoconf, a better method should be devised.</p>
<ul>
<li>There is now a NO_MAIN_ALLOWED 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 netdb.h have been added with, the corresponding code is in <a href="../../libntp/machines.c">machines.c </a>. Where possible the defines for these have been kept non-vxWorks specific.
</ul>
<p>Unfortunately there are still quite a few SYS_VXWORKS type defines in the source, but I have eliminated as many as possible. You have the choice of using the usrtime.a library avaliable from the vxworks archives or forgoing adjtime() and using the clock_[get|set]time().The <a href="../../include/ntp_machine.h">ntp_machine.h </a>file clearly marks how to do this.</p>
<h1><b>Compilation issues</b></h1>
<p>You will need autoconf and automake ... available free from the gnu archives worldwide.</p>
<p>The variable arch is the target architecture (e.g. i486)</p>
<p>mkdir A.vxworks (or whatever....)<br>
cd A.vxworks<br>
../configure --target=arch-wrs-vxworks [any other options]<br>
make</p>
<p>Options I normally use are the --disable-all-clocks --enable-LOCAL-CLOCK 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>
<h1>Running the software</h1>
<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>
<p>ld &lt; ntpdate/ntpdate<br>
ld &lt; ntpd/ntpd<br>
ld &lt; ntptrace/ntptrace<br>
ld &lt; ntpq/ntpq<br>
ld &lt; ntpdc/ntpdc<br>
ntpdate (&quot;-b&quot;, &quot;192.168.0.245&quot;)<br>
sp(ntpd, &quot;-c&quot;, &quot;/export/home/casey/ntp/ntp.conf&quot;)<br>
ntpdc(&quot;-c&quot;, &quot;monlist&quot;, &quot;192.168.0.244&quot;)<br>
ntpq(&quot;-c&quot;, &quot;peers&quot;, &quot;192.168.0.244&quot;)<br>
ntptrace(&quot;192.168.0.244&quot;)<br>
</p>
<h1>Bugs and such</h1>
<p>Should you happen across any bugs, please let me know, or better yet fix them and submit a patch. Remember to make you patch general for Vxworks, not just for your particular architecture. <a href="http://www.ccii.co.za">CCII Systems (Pty) Ltd</a>, my ex employers, sponsored the time to this port. Please let me know how it goes, I would be most interested in offsets and configurations.</p>
<p><br>
</p>
<p>Casey Crellin<br>
<a href="mailto:casey@csc.co.za">casey@csc.co.za</a></p>
<p><br>
</p>
</body>
</html>

View file

@ -1,281 +0,0 @@
<!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>NTP on Windows NT</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>NTP 4.x for Windows NT</h1>
<h2>Introduction</h2>
The NTP 4 distribution runs as service on Windows NT 4.0, Windows 2000, Windows XP,
Windows .NET Server 2003. It will NOT run on Windows 95, 98, ME, etc.
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.
<h2>Authentication Keys</h2>
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>
ntpd 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><B>NOTE:</B> ntpd and ntp-keygen both use OpenSSL which requires a random
character file called .rnd 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 filed called .rnd
in that directory. Finally, if neither RANDFILE nor HOME exists it will look
in C:\ 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.
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
"c:\.rnd". 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>Refer to <a href="#Compiling">Compiling Requirements</a> and Instructions for how to compile the program.</p>
<h2>Reference Clocks</h2>
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 clocks are known to work and are supported
by Windows NT:
<p><a href="../../driver1.html">Type 1</a> Undisciplined Local Clock (LOCAL)<br>
<a href="../../driver29.html">Type 29</a> Trimble Navigation Palisade GPS (GPS_PALISADE)</p>
<h2>Functions Supported</h2>
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.
<h2>Accuracy</h2>
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>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>
<h2>Binaries</h2>
Recent InstallShield based executable versions of NTP for Windows NT (intel) are available from:
<ul>
<li><a href="http://www.trimble.com/oem/ntp">http://www.trimble.com/oem/ntp</a>
<li><a href="http://www.five-ten-sg.com/">http://www.five-ten-sg.com/</a>
<li><a href="http://www.meinberg.de/english/sw/ntp.htm">http://www.meinberg.de/english/sw/ntp.htm</a>
</ul>
<a name="ToDo"><h2>ToDo</h2></a>
These tasks are in no particular order of priority.
<ul>
<li>Create a proper install/uninstall program
<li>Add sntp to the list of supported programs
<li>Add support for Visual C++ 7.0 or later (.NET)
<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>
<h2>Compiling Requirements</h2>
<ul>
<li>Windows NT 4.0 Windows 2000, Windows XP, or Windows.NET Server 2003
<li>Microsoft Visual C++ 6.0. <B>NOTE:</B> VC++ 7.0 (aka .NET) is not yet supported
but will probably work fine.
<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.
</ul>
<a name="Compiling"><h2>Compiling Instructions</h2></a>
<ol>
<li>Unpack and build OpenSSL according to the OpenSSL instructions for building on
Windows. An environment variable named OPENSSL must be set up to specify the base path
of the OpenSSL directory to be used to build the NTP package
(e.g. <code>OPENSSL=C:\openssl-0.9.8b</code>).
<li>Unpack the ntp-*.tar.gz archive using utilities such as WinZip.
<li>Open the .\ports\winnt\ntp.dsw Visual C workspace
<li>Batch build all projects
<li>The built binaries can be found in the port\winnt\bin\Release subdirectory
<li>In addition you will need to install the OpenSSL libeay32.dll
<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>
<h2>Configuration File</h2>
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;).<br>
Refer to your system environment and <tt>c</tt>reate your<tt> ntp.conf</tt> file in the directory
corresponding to your system&nbsp; installation.<br>
<tt>The older &lt;WINDIR&gt;\ntp.conf </tt>is still supported but you will get a log entry reporting that
the first file wasn't found.
<h2>Installation Instructions</h2>
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.
<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>
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.
<h2>Removing NTP</h2>
You can also use <tt>instsrv</tt> to delete the NTP service by entering: &quot;instsrv.exe remove&quot;
<h2>Command Line Parameters and Registry Entries</h2>
Unlike the Unix environment, there is no clean way to run 'ntpdate' and reset the clock before starting 'ntpd' at boot time.<br>
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 'ntpd' 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>
<h2>Bug Reports</h2>
Send questions to <a href="news://comp.protocols.time.ntp">news://comp.protocols.time.ntp</a>
and bug reports should be entered in <a href="http://bugzilla.ntp.org/">Bugzilla</a> on the
NTP Web site.
<h2>Change Log</h2>
<h3>Last revision 2 July 2003&nbsp; Version 4.2.0</h3>
<b>by Danny Mayer (mayer@ntp.org>)</b>
<h3>Significant Changes:</h3>
This latest release of NTP constitutes a major upgrade to its ability to build and
run on Windows platforms and should now build and run cleanly. More importantly it
is now able to support all authentication in the same way as Unix boxes. This does
require the usage of OpenSSL which is now a prerequisite for build on Windows.
ntp-keygen is now supported and builds on Win32 platforms.
<h3>Last revision 16 February 1999&nbsp; Version 4.0.99e.</h3>
<b>by Sven Dietrich (sven_dietrich@trimble.com)</b>
<p><b>Significant Changes:</b></p>
<ul>
<li>Perl 5 is no longer needed to compile NTP. The configuration script which creates version.c
with the current date and time was modified by Frederick Czajka [w2k@austin.rr.com] so that Perl
is no longer required.
</ul>
<h3>Last revision 15 November 1999&nbsp; Version 4.0.98f.</h3>
<b>by Sven Dietrich (sven_dietrich@trimble.com)</b>
<p><b>Significant Changes:</b></p>
<ul>
<li>Fixed I/O problem delaying packet responses which resulted in no-replys to NTPQ and others.
<li>The default configuration file path is <tt>&lt;WINDIR&gt;\system32\drivers\etc\ntp.conf.
The old &lt;WINDIR&gt;\ntp.conf </tt>is still supported but you will get a log entry reporting
that the first file wasn't found. The NTP 3.x legacy <tt>ntp.ini</tt> file is no longer supported.
</ul>
<b>Known Problems / TODO:</b>
<ul>
<li>MD5 and name resolution do not yet get along. If you define MD5, you cannot use DNS names, only IP numbers.
</ul>
<h3>Last revision 27 July 1999&nbsp; Version 4.0.95.</h3>
This version compiles under WINNT with Visual C 6.0.
<p>Greg Brackley and Sven Dietrich</p>
<p>Significant changes:<br>
-Visual Studio v6.0 support<br>
-Winsock 2.0 support<br>
-Use of I/O completion ports for sockets and comm port I/O<br>
-Removed the use of multimedia timers (from ntpd, others need removing)<br>
-Use of waitable timers (with user mode APC) and performance counters to fake getting a better time<br>
-Trimble Palisade NTP Reference Clock support<br>
-General cleanup, prototyping of functions<br>
-Moved receiver buffer code to a separate module (removed unused members from the recvbuff struct)<br>
-Moved io signal code to a separate module</p>
<h3>Last revision:&nbsp; 20-Oct-1996</h3>
This version corrects problems with building the XNTP<br>
version 3.5-86 distribution under Windows NT.
<p>The following files were modified:<br>
&nbsp;blddbg.bat<br>
&nbsp;bldrel.bat<br>
&nbsp;include\ntp_machine.h<br>
&nbsp;xntpd\ntp_unixclock.c<br>
&nbsp;xntpd\ntp_refclock.c<br>
&nbsp;scripts\wininstall\build.bat<br>
&nbsp;scripts\wininstall\setup.rul<br>
&nbsp;scripts\wininstall\readme.nt<br>
&nbsp;scripts\wininstall\distrib\ntpog.wri<br>
&nbsp;html\hints\winnt (this file)</p>
<p>In order to build the entire Windows NT distribution you<br>
need to modify the file scripts\wininstall\build.bat<br>
with the installation directory of the InstallShield<br>
software.&nbsp; Then, simply type &quot;bldrel&quot; for non-debug<br>
or &quot;blddbg&quot; for debug executables.</p>
<p>Greg Schueman<br>
&nbsp;&nbsp;&nbsp; &lt;schueman@acm.org&gt;</p>
<h3>Last revision:&nbsp; 07-May-1996</h3>
This set of changes fixes all known bugs, and it includes<br>
several major enhancements.
<p>Many changes have been made both to the build environment as<br>
well as the code.&nbsp; There is no longer an ntp.mak file, instead<br>
there is a buildntall.bat file that will build the entire<br>
release in one shot.&nbsp; The batch file requires Perl.&nbsp; Perl<br>
is easily available from the NT Resource Kit or on the Net.</p>
<p>The multiple interface support was adapted from Larry Kahn's<br>
work on the BIND NT port.&nbsp; I have not been able to test it<br>
adequately as I only have NT servers with one network<br>
interfaces on which to test.</p>
<p>Enhancements:<br>
* Event Logging now works correctly.<br>
* Version numbers now work (requires Perl during build)<br>
* Support for multiple network interface cards (untested)<br>
* NTP.CONF now default, but supports ntp.ini if not found<br>
* Installation procedure automated.<br>
* All paths now allow environment variables such as %windir%</p>
<p>Bug fixes:<br>
* INSTSRV replaced, works correctly<br>
* Cleaned up many warnings<br>
* Corrected use of an uninitialized variable in XNTPD<br>
* Fixed ntpdate -b option<br>
* Fixed ntpdate to accept names as well as IP addresses<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Winsock WSAStartup was called after a gethostbyname())<br>
* Fixed problem with &quot;longjmp&quot; in xntpdc/ntpdc.c that<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caused a software exception on doing a Control-C in xntpdc.<br>
&nbsp;A Cntrl-C now terminates the program.</p>
<p>See below for more detail:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Note: SIGINT is not supported for any Win32 application including<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Windows NT and Windows 95. When a CTRL+C interrupt occurs, Win32<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operating systems generate a new thread to specifically handle that<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; interrupt. This can cause a single-thread application such as UNIX,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to become multithreaded, resulting in unexpected behavior.<br>
&nbsp;</p>
<p>Possible enhancements and things left to do:<br>
* Reference clock drivers for NT (at least Local Clock support)<br>
* Control Panel Applet<br>
* InstallShield based installation, like NT BIND has<br>
* Integration with NT Performance Monitor<br>
* SNMP integration<br>
* Fully test multiple interface support<br>
&nbsp;</p>
<p>Known problems:<br>
*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bug in ntptrace - if no Stratum 1 servers are available,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; such as on an
IntraNet, the application crashes.</p>
<h3>Last revision:&nbsp; 12-Apr-1995</h3>
This NTPv3 distribution includes a sample configuration file and the project<br>
makefiles for WindowsNT 3.5 platform using Microsoft Visual C++ 2.0 compiler.<br>
Also included is a small routine to install the NTP daemon as a &quot;service&quot;<br>
on a WindowsNT box. Besides xntpd, the utilities that have been ported are<br>
ntpdate and xntpdc. The port to WindowsNT 3.5 has been tested using a Bancomm<br>
TimeServe2000 GPS receiver clock that acts as a strata 1 NTP server with no<br>
authentication (it has not been tested with any refclock drivers compiled in).<br>
Following are the known flaws in this port:<br>
1) currently, I do not know of a way in NT to get information about multiple<br>
&nbsp;&nbsp; network interface cards. The current port uses just one socket bound to<br>
&nbsp;&nbsp; INADDR_ANY address. Therefore when dealing with a multihomed NT time server,<br>
&nbsp;&nbsp; clients should point to the default address on the server (otherwise the<br>
&nbsp;&nbsp; reply is not guaranteed to come from the same interface to which the<br>
&nbsp;&nbsp; request was sent). Working with Microsoft to get this resolved.<br>
2) There is some problem with &quot;longjmp&quot; in xntpdc/ntpdc.c that causes a<br>
&nbsp;&nbsp; software exception on doing a Control-C in xntpdc. Be patient!<br>
3) The error messages logged by xntpd currently contain only the numerical<br>
&nbsp;&nbsp; error code. Corresponding error message string has to be looked up in<br>
&nbsp;&nbsp; &quot;Books Online&quot; on Visual C++ 2.0 under the topic &quot;Numerical List of Error<br>
&nbsp;&nbsp; Codes&quot;.
<p>Last HTML Update: November 17, 1999<br>
<a href="mailto://sven_dietrich@trimble.com">Sven_Dietrich@Trimble.COM</a></p>
</body>
</html>

View file

@ -1,36 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Patching Procedures</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Patching Procedures</h3>
<img src="../pic/alice38.gif" alt="gif" align="left"><a href="http://www.eecis.udel.edu/%7emills/pictures.html"> rom <i>Alice's Adventures in Wonderland</i>, Lewis Carroll</a>
<p>The Mad Hatter needs patches.</p>
<p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">12:56 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="266">Saturday, March 20, 2004</csobj></p>
<br clear="left">
<hr>
<p>A distribution so widely used as this one eventually develops numerous barnacles as the result of <a href="porting.html">porting</a> to new systems, idiosyncratic new features and just plain bugs. In order to help keep order and make maintenance bearable, we ask that proposed changes to the distribution be submitted in the following form.</p>
<ol>
<li>Please submit patches to <a href="mailto:bugs@mail.ntp.org">bugs@mail.ntp.org</a> in the form of either unified-diffs (<tt>diff -u</tt>) or context-diffs (<tt>diff -c</tt>).
<li>Please include the <strong>output</strong> from <tt>config.guess</tt> in the description of your patch. If <tt>config.guess</tt> does not produce any output for your machine, please fix that, too!
<li>Please base the patch on the root directory of the distribution. The preferred procedure here is to copy your patch to the root directory and mumble
<p><tt>patch -p &lt;your_patch&gt;</tt></p>
<li>Please avoid patching the RCS subdirectories; better yet, clean them out before submitting patches.
<li>If you have whole new files, as well as patches, wrap the files and patches in a shell script. If you need to compress it, use either GNU <tt>gzip</tt> or the stock Unix <tt>compress</tt> utility.
<li>Don't forget the documentation that may be affected by the patch. Send us patches for the <tt>./htm</tt> files as well.
<li>We would be glad to include your name, electric address and descriptive phrase in the <a href="../copyright.html">Copyright</a> page, if you wish.
</ol>
<p>Prior to ntp3-5.83 (releases up to and including ntp3.5f) a complete patch history back to the dark ages was kept in the <tt>./patches</tt> directory, which might have been helpful to see if the same problem occurred in another port, etc. Patches were saved in that directory with file name in the form <tt>patch.<i>nnn</i></tt>, where <i>nnn</i> was approaching 200. All patches in that directory have been made; so, if yours was there, it was in the distribution.</p>
<p>Since we have been getting multple patches for some bugs, plus many changes are implemented locally, no two maintainers here use the same tools, and since we're not using any bug-tracking software or even source code control, there is currently no tracking of specific changes.</p>
<p>The best way to see what's changed between two distributions is to run a <tt>diff</tt> against them.</p>
<p>Thanks for your contribution and happy chime.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>

View file

@ -1,40 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Porting Hints</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Porting Hints</h3>
<img src="../pic/wingdorothy.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>Porting Dorothy in Oz
</p>
<p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">12:56 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="266">Saturday, March 20, 2004</csobj></p>
<br clear="left">
<hr>
<p>NOTE: The following procedures have been replaced by GNU <tt>automake</tt> and <tt>autoconfigure</tt>. This page is to be updated in the next release.</p>
<p>Porting to a new machine or operating system ordinarily requires updating the <tt>./machines</tt> directory and the <tt>./compilers</tt> directories in order to define the build environment and autoconfigure means. You will probably have to modify the <tt>ntp_machines.h</tt> file and <tt>&quot;l_stdlib.h&quot;</tt> files as well. The two most famous trouble spots are the I/O code in <tt>./ntpd/ntp_io.c</tt> and the clock adjustment code in <tt>./ntpd/ntp_unixclock.c</tt>.</p>
<p>These are the rules so that older bsd systems and the POSIX standard system can coexist together.</p>
<ol>
<li>If you use <tt>select</tt> then include <tt>&quot;ntp_select.h&quot;</tt>. <tt>select</tt> is not standard, since it is very system dependent as to where it is defined. The logic to include the right system dependent include file is in <tt>&quot;ntp_select.h&quot;</tt>.
<li>Always use POSIX definition of strings. Include <tt>&quot;ntp_string.h&quot;</tt> instead of <tt>&lt;string.h&gt;</tt>.
<li>Always include <tt>&quot;ntp_malloc.h&quot;</tt> if you use <tt>malloc</tt>.
<li>Always include <tt>&quot;ntp_io.h&quot;</tt> instead of <tt>&lt;sys/file.h&gt;</tt> or <tt>&lt;fnctl.h&gt;</tt> to get <tt>O_*</tt> flags.
<li>Always include <tt>&quot;ntp_if.h&quot;</tt> instead of <tt>&lt;net/if.h&gt;</tt>.
<li>Always include <tt>&quot;ntp_stdlib.h&quot;</tt> instead of <tt>&lt;stdlib.h&gt;</tt>.
<li>Define any special defines needed for a system in <tt>./include/ntp_machine.h</tt> based on system identifier. This file is included by the <tt>&quot;ntp_types.h&quot;</tt> file and should always be placed first after the <tt>&lt;&gt;</tt> defines.
<li>Define any special library prototypes left over from the system library and include files in the <tt>&quot;l_stdlib.h&quot;</tt> file. This file is included by the <tt>&quot;ntp_stdlib.h&quot;</tt> file and should ordinarily be placed last in the includes list.
<li>Don't define a include file by the same name as a system include file.
</ol>
<p><tt>&quot;l_stdlib.h&quot;</tt> can contain any extra definitions that are needed so that <tt>gcc</tt> will shut up. They should be controlled by a system identifier and there should be a separate section for each system. Really this will make it easier to maintain.</p>
<p>See <tt>include/ntp_machines.h</tt> for the various compile time options.</p>
<p>When you are satisfied the port works and that other ports are not adversely affected, please send <a href="patches.html">patches</a> for the system files you have changed, as well as any documentation that should be updated, including the advice herein.</p>
<p>Good luck.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>

View file

@ -1,30 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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>
<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.pdf">Fuzzball</a> . As it happened, this was also the first Internet multimedia presentation and the first to use NTP in regular operation. The image was widely copied and used for testing purpose throughout much of the 1980s.</p>
<p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="99">01:01 AM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="266">Saturday, March 20, 2004</csobj></p>
<br clear="left">
<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 that needs to be done 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 require one. The file, called by default <tt>/etc/ntp.conf</tt>, need only contain one line 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. There are about two dozen public time servers operated by National Institutes of Science and Technology (NIST), US Naval Observatory (USNO), Canadian Metrology Centre (CMC) and many others available on the Internet. Lists of public primary and secondary NTP servers maintained on the <a href="http://www.eecis.udel.edu/%7emills/ntp/servers.html">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 writes the current value to a file called by default <tt>/etc/ntp.drift</tt>. If <tt>ntpd</tt> is stopped and restarted, it initializes the frequency from this file. In this way the potentially lengthy interval to relearn the frequency error is avoided.</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. 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 detected errors, if present.</p>
<p>Sometimes the <tt>ntpd</tt>. behavior may seem to violate the Principle of Least Astonishment, but there are good reasons for this. See the <a href="../ntpd.html">Network Time Protocol (NTP) daemon</a> page for revealing insights. See this page and its dependencies for additional configuration and control options. The <a href="../notes.html">Notes on Configuring NTP and Setting up a NTP Subnet</a> page contains an extended discussion of these options.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>

View file

@ -1,7 +0,0 @@
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.html'>Contacts</a></i></td>\
</tr></table>")

View file

@ -1,5 +0,0 @@
document.write("<ul>\
<li class='inline'><a href='refclock.html'>Reference Clock Drivers</a><br>\
<li class='inline'><a href='prefer.html'>Mitigation Rules and the <tt>prefer</tt> Keyword</a><br>\
<li class='inline'><a href='howto.html'>How to Write a Reference Clock Driver</a><br>\
</ul>")

View file

@ -1,5 +0,0 @@
document.write("<ul>\
<li class='inline'><a href='refclock.html'>Reference Clock Drivers</a><br>\
<li class='inline'><a href='pps.html'>Pulse-per-second (PPS) Signal Interfacing</a><br>\
<li class='inline'><a href='ldisc.html'>Line Disciplines and Streams Modules</a><br>\
</ul>")

View file

@ -1,5 +0,0 @@
document.write("<ul>\
<li class='inline'><a href='debug.html'>NTP Debugging Techniques</a><br>\
<li class='inline'><a href='rdebug.html'>Debugging Reference Clock Drivers</a><br>\
<li class='inline'><a href='msyslog.html'><tt>ntpd</tt> System Log Messages</a><br>\
</ul>")

View file

@ -1,5 +0,0 @@
document.write("<ul>\
<li class='inline'><a href='../confopt.html'>Server Options</a><br>\
<li class='inline'><a href='../authopt.html'>Authentication Options</a><br>\
<li class='inline'><a href='../monopt.html'>Monitoring Options</a><br>\
</ul>")

View file

@ -1,6 +0,0 @@
document.write("<ul>\
<li class='inline'><a href='refclock.html'>Reference Clock Drivers</a><br>\
<li class='inline'><a href='drivers/driver7.html'>Radio CHU Audio Demodulator/Decoder</a><br>\
<li class='inline'><a href='drivers/driver36.html'>Radio WWV/H Audio Demodulator/Decoder</a><br>\
<li class='inline'><a href='drivers/driver6.html'>IRIG Audio Decoder</a>\
</ul>")

View file

@ -1,7 +0,0 @@
document.write("<ul>\
<li class='inline'><a href='authopt.html'>Authentication Options</a><br>\
<li class='inline'><a href='manyopt.html'>Automatic NTP Configuration Options</a><br>\
<li class='inline'><a href='confopt.html'>Server Options</a><br>\
<li class='inline'><a href='keygen.html'><tt>ntp-keygen</tt> - generate public and private keys</a>\
<li class='inline'><a href='http://www.eecis.udel.edu/~mills/autokey.html'>Autonomous Authentication</a>\
</ul>")

View file

@ -1,64 +0,0 @@
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;}

View file

@ -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>

View file

@ -1,68 +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 Options</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Reference Clock Options</h3>
<img src="pic/stack1a.jpg" alt="gif" align="left">
<p>See the radios, all in a row.</p>
<p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">18:37</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="246">Thursday, July 28, 2005</csobj></p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#ref">Reference Clock Support</a>
<li class="inline"><a href="#cmd">Reference Clock Commands</a>
</ul>
<hr>
<h4 id="ref">Reference Clock Support</h4>
<p>The NTP Version 4 daemon supports some three dozen different radio, satellite and modem reference clocks plus a special pseudo-clock used for backup or when no other clock source is available. Detailed descriptions of individual device drivers and options can be found in the <a href="refclock.html">Reference Clock Drivers</a> page. Additional information can be found in the pages linked there, including 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. In addition, support for a PPS signal is available as described in <a href="pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. Many drivers support special line discipline/streams modules which can significantly improve the accuracy using the driver. These are described in the <a href="ldisc.html">Line Disciplines and Streams Drivers</a> page.</p>
<p>A reference clock will generally (though not always) be a radio timecode receiver which is synchronized to a source of standard time such as the services offered by the NRC in Canada and NIST and USNO in the US. The interface between the computer and the timecode receiver is device dependent, but is usually a serial port. A device driver specific to each reference clock must be selected and compiled in the distribution; however, most common radio, satellite and modem clocks are included by default. Note that an attempt to configure a reference clock when the driver has not been compiled or the hardware port has not been appropriately configured results in a scalding remark to the system log file, but is otherwise non hazardous.</p>
<p>For the purposes of configuration, <tt>ntpd</tt> treats reference clocks in a manner analogous to normal NTP peers as much as possible. Reference clocks are identified by a syntactically correct but invalid IP address, in order to distinguish them from normal NTP peers. Reference clock addresses are of the form <tt>127.127.<i>t.u</i></tt>, where <i><tt>t</tt></i> is an integer denoting the clock type and <i><tt>u</tt></i> 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>
<p>The <tt>server</tt> command is used to configure a reference clock, where the <i><tt>address</tt></i> argument in that command is the clock address. The <tt>key</tt>, <tt>version</tt> and <tt>ttl</tt> options are not used for reference clock support. The <tt>mode</tt> option is added for reference clock support, as described below. The <tt>prefer</tt> option can be useful to persuade the server to cherish a reference clock with somewhat more enthusiasm than other reference clocks or peers. Further information on this option can be found in the <a href="prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page. The <tt>minpoll</tt> and <tt>maxpoll</tt> options have meaning only for selected clock drivers. See the individual clock driver document pages for additional information.</p>
<p>The <tt>fudge</tt> command is used to provide additional information for individual clock drivers and normally follows immediately after the <tt>server</tt> command. The <i><tt>address</tt></i> argument specifies the clock address. The <tt>refid</tt> and <tt>stratum</tt> options control can be used to override the defaults for the device. There are two optional device-dependent time offsets and four flags that can be included in the <tt>fudge</tt> command as well.</p>
<p>The stratum number of a reference clock is by default zero. Since the <tt>ntpd</tt> daemon adds one to the stratum of each peer, a primary server ordinarily displays an external stratum of one. In order to provide engineered backups, it is often useful to specify the reference clock stratum as greater than zero. The <tt>stratum</tt> option is used for this purpose. Also, in cases involving both a reference clock and a pulse-per-second (PPS) discipline signal, it is useful to specify the reference clock identifier as other than the default, depending on the driver. The <tt>refid</tt> option is used for this purpose. Except where noted, these options apply to all clock drivers.</p>
<h4 id="cmd">Reference Clock Commands</h4>
<dl>
<dt><tt>server 127.127.<i>t.u</i> [prefer] [mode <i>int</i>] [minpoll <i>int</i>] [maxpoll <i>int</i>]</tt>
<dd>This command can be used to configure reference clocks in special ways. The options are interpreted as follows:
<dl>
<dt><tt>prefer</tt>
<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.
<dt><tt>mode <i>int</i></tt>
<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.
<dt><tt>minpoll <i>int</i></tt>
<dt><tt>maxpoll <i>int</i></tt>
<dd>These options specify the minimum and maximum polling interval for reference clock messages in seconds, interpreted as dual logarithms (2 ^ x). For most directly connected reference clocks, both <tt>minpoll</tt> and <tt>maxpoll</tt> default to 6 (2^16 = 64 s). For modem reference clocks, <tt>minpoll</tt> defaults to 10 (2^10 = 1024 s = 17.1 m) and <tt>maxpoll</tt> defaults to 14 (2^14 = 16384 s = 4.5 h). The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.
</dl>
<dt><tt>fudge 127.127.<i>t.u</i> [time1 <i>sec</i>] [time2 <i>sec</i>] [stratum <i>int</i>] [refid <i>string</i>] [mode <i>int</i>] [flag1 0|1] [flag2 0|1] [flag3 0|1] [flag4 0|1]</tt>
<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>
<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>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 Drivers</a> page.
<dt><tt>time2 <i>secs</i></tt>
<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 drivers</a> page.
<dt><tt>stratum <i>int</i></tt>
<dd>Specifies the stratum number assigned to the driver, an integer between 0 and 15. This number overrides the default stratum number ordinarily assigned by the driver itself, usually zero.
<dt><tt>refid <i>string</i></tt>
<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.
<dt><tt>mode <i>int</i></tt>
<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.
<dt><tt>flag1 flag2 flag3 flag4</tt>
<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 clock 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. Further information on the <tt>filegen</tt> command can be found in the <a href="monopt.html">Monitoring Options</a> page.
</dl>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
<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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -1,82 +1,105 @@
<!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 Options</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Server 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: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">20:57</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="270">Monday, October 10, 2005</csobj></p>
<br clear="left">
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="scripts/links7.txt"></script>
<h4>Table of Contents</h4>
<ul>
<li class="inline"><a href="#cfg">Configuration Commands</a>
<li class="inline"><a href="#opt">Command Options</a>
<li class="inline"><a href="#aux">Auxilliary Commands</a>
<li class="inline"><a href="#bug">Bugs</a>
</ul>
<hr>
<p>Following is a description of the 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 auxilliary commands that specify environmental variables that control various related operations.</p>
<h4 id="cfg">Configuration Commands</h4>
<p>The various modes are determined by the command keyword and the required IP address. Addresses are classed by type as (s) a remote server or peer (IPv4 class A, B and C), (b) the broadcast address of a local interface, (m) a multicast address (IPv4 class D), or (r) a reference clock address (127.127.x.x). The options that can be used with these commands are listed below.</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 support of the 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>
<p>There are three types of associations: persistent, preemptable and ephemeral. 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>prempt</tt> flag and are demobilized by timeout or error. Ephemeral associations are mobilized upon arrival of designated messages and demobilized by timeout or error.</p>
<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 <i>address</i> [options ...]</tt><br>
<tt>peer <i>address</i> [</tt><tt>options ...]<br>
broadcast <i>address</i> [options ...]</tt><br>
<tt>manycastclient <i>address</i> [options ...]</tt>
<dd>These four commands specify the time 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 IP address in dotted-quad notation. Additional information on association behavior can be found in the <a href="assoc.html">Association Management</a> page.
<dl>
<dt><tt>server</tt>
<dd>For type s and r addresses (only), this command normally 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 association is mobilized instead. In client mode the client clock can synchronize to the remote server or local reference clock, but the remote server can never be synchronized to the client clock. This command should NOT be used for type <tt>b</tt> or <tt>m</tt> addresses. <dt><tt>peer</tt>
<dd>For type s addresses (only), this command mobilizes a persistent symmetric-active mode association with the specified remote peer. In this mode the local clock can be synchronized to the remote peer or the remote peer can be synchronized to the local clock. This is useful in a network of servers where, depending on various failure scenarios, either the local or remote peer may be the better source of time. This command should NOT be used for type <tt>b</tt>, <tt>m</tt> or <tt>r</tt> addresses.
<dt><tt>broadcast</tt>
<dd>For type <tt>b</tt> and <tt>m</tt> addresses (only), this command mobilizes a persistent broadcast mode association. Multiple commands can be used to specify multiple local broadcast interfaces (subnets) and/or multiple multicast groups. Note that local broadcast messages go only to the interface associated with the subnet specified, but multicast messages go to all interfaces.
<dd>In broadcast mode the local server sends periodic broadcast messages to a client population at the <i><tt>address</tt></i> specified, which is usually the broadcast address on (one of) the local network(s) or a multicast address assigned to NTP. 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 to contain the messages within administrative boundaries. Ordinarily, this specification applies only to the local server operating as a sender; for operation as a broadcast client, see the <tt>broadcastclient</tt> or <tt>multicastclient</tt> commands below.
<dt><tt>manycastclient</tt>
<dd>For type <tt>m</tt> addresses (only), this command mobilizes a preemptable manycast client mode association for the multicast group address specified. In this mode a specific address must be supplied which matches the address used on the <tt>manycastserver</tt> command for the designated manycast servers. The NTP multicast address 224.0.1.1 assigned by the IANA should NOT be used, unless specific means are taken to avoid spraying large areas of the Internet with these messages and causing a possibly massive implosion of replies at the sender.
<dd>The <tt>manycastclient</tt> command specifies that the host is to operate in client mode with the remote servers that are discovered as the result of broadcast/multicast messages. The client broadcasts a request message to the group address associated with the specified <i><tt>address</tt></i> and specifically enabled servers respond to these messages. The client selects the servers providing the best time and continues as with the <tt>server </tt>command. The remaining servers are discarded as if never heard.
</dl>
</dl>
<h4 id="opt">Command Options</h4>
<dl>
<dt><tt>autokey</tt>
<dd>All packets sent to and received from the server or peer are to include authentication fields encrypted using the autokey scheme described in the <a href="authopt.html">Authentication Options</a> page. This option is valid with all commands.<dt><tt>burst</tt>
<dd>When the server is reachable, send a burst of eight packets instead of the usual one. The packet spacing is normally 2 s; however, the spacing between the first and second packets can be changed with the <a href="miscopt.html"><tt>calldelay</tt></a> command to allow additional time for a modem or ISDN call to complete. This option is valid with only the <tt>server</tt> command and is a recommended option with this command when the <tt>maxpoll</tt> option is 11 or greater. <dt><tt>iburst</tt>
<dd>When the server is unreachable, send a burst of eight packets instead of the usual one. The packet spacing is normally 2 s; however, the spacing between the first and second packets can be changed with the <a href="miscopt.html"><tt>calldelay</tt></a> command to allow additional time for a modem or ISDN call to complete. This option is valid with only the <tt>server</tt> command and is a recommended option with this command.<dt><tt>key</tt> <i><tt>key</tt></i>
<dd>All packets sent to and received from the server or peer are to include authentication fields encrypted using the specified <i><tt>key</tt></i> identifier with values from 1 to 65534, inclusive. The default is to include no encryption field. This option is valid with all commands.<dt><tt>minpoll <i>minpoll</i></tt><br>
<tt>maxpoll <i>maxpoll</i></tt>
<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 (1,024 s), but can be increased by the <tt>maxpoll</tt> option to an upper limit of 17 (36.4 h). The minimum poll interval defaults to 6 (64 s), but can be decreased by the <tt>minpoll</tt> option to a lower limit of 4 (16 s). These option are valid only with the <tt>server</tt> and <tt>peer</tt> commands.<dt><tt>noselect</tt>
<dd>Marks the server as unused, except for display purposes. The server is discarded by the selection algorithm. This option is valid only with the <tt>server</tt> and <tt>peer</tt> commands.<dt><tt>preempt</tt>
<dd>Specifies the association as preemptable rather than the default persistent. This option is valied only with the <tt>server</tt> command.<dt><tt>prefer</tt>
<dd>Marks 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.<dt><tt>true</tt>
<dd>Force 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.<dt><tt>ttl <i>ttl</i></tt>
<dd>This option is used only with broadcast server and manycast client modes. It specifies the time-to-live <i><tt>ttl</tt></i> to use on broadcast server and multicast server and the maximum <i><tt>ttl</tt></i> for the expanding ring search with manycast client packets. Selection of the proper value, which defaults to 127, is something of a black art and should be coordinated with the network administrator.
<dt><tt>version <i>version</i></tt>
<dd>Specifies the version number to be used for outgoing NTP packets. Versions 1-4 are the choices, with version 4 the default. This option is valid only with the <tt>server,</tt> <tt>peer</tt> and <tt>broadcast</tt> commands.
</dl>
<h4 id="aux">Auxilliary Commands</h4>
<dl>
<dt><tt>broadcastclient [novolley]</tt>
<dd>This command enables reception of broadcast server messages to any local interface (type <tt>b</tt>) address. Ordinarily, upon receiving a message for the first time, the broadcast client measures the nominal server propagation delay using a brief client/server exchange with the server, after which it continues in listen-only mode. If the <tt>novolley</tt> keyword is present, the exchange is not used and the value specified in the <tt>broadcastdelay</tt> command is used or, if the <tt>broadcastdelay</tt> command is not used, the default 4.0 ms. 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 <tt>novolley</tt> keyword is incompatible with public key authentication.<dt><tt>manycastserver <i>address</i> [...]</tt>
<dd>This command enables reception of manycast client messages to the multicast group address(es) (type <tt>m</tt>) specified. At least one address is required. The NTP multicast address 224.0.1.1 assigned by the IANA should NOT be used, unless specific means are taken to limit the span of the reply and avoid a possibly massive implosion at the original sender. 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.
<dt><tt>multicastclient <i>address</i> [...]</tt>
<dd>This command enables reception of multicast server messages to the multicast group address(es) (type <tt>m</tt>) 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.
</dl>
<h4 id="bug">Bugs</h4>
<p>The syntax checking is not picky; some combinations of ridiculous and even hilarious options and modes may not be detected.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
<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>
<dt id="mdnstries"><tt>mdnstries</tt> <i>number</i></dt>
<dd>If we are participating in mDNS, after we have synched for the first time we attempt to register with the mDNS system. If that registration attempt fails, we try again at one minute intervals for up to <tt>mdnstries</tt> times. After all, <tt>ntpd</tt> may be starting before mDNS. The default value for <tt>mdnstries</tt> is 5.</dd>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>

View file

@ -1,25 +1,25 @@
<!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>
<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"> &quot;Clone me,&quot; says Dolly sheepishly
<p>Last update: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">20:31</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="285">Saturday, January 06, 2007</csobj></p>
<br clear="left">
<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.<br>
</p>
<pre>
<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 -->17-Jan-2015 00:16<!-- #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 entire notice applies as if the text was explicitly included in the file.</p>
<pre>
***********************************************************************
* *
* Copyright (c) David L. Mills 1992-2009 *
* Copyright (c) University of Delaware 1992-2015 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose with or without fee is hereby *
@ -35,62 +35,100 @@
* *
***********************************************************************
</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 class="inline"><a href="mailto:%20mark_andrews@isc.org">Mark Andrews &lt;mark_andrews@isc.org&gt;</a> Leitch atomic clock controller
<li class="inline"><a href="mailto:%20altmeier@atlsoft.de">Bernd Altmeier &lt;altmeier@atlsoft.de&gt;</a> hopf Elektronik serial line and PCI-bus devices
<li class="inline"><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 class="inline"><a href="mailto:%20michael.barone@lmco.com">Michael Barone &lt;michael,barone@lmco.com&gt;</a> GPSVME fixes
<li class="inline"><a href="mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca">Jean-Francois Boudreault &lt;Jean-Francois.Boudreault@viagenie.qc.ca&gt;</a>IPv6 support
<li class="inline"><a href="mailto:%20karl@owl.HQ.ileaf.com">Karl Berry &lt;karl@owl.HQ.ileaf.com&gt;</a> syslog to file option
<li class="inline"><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 class="inline"><a href="mailto:%20Marc.Brett@westgeo.com">Marc Brett &lt;Marc.Brett@westgeo.com&gt;</a> Magnavox GPS clock driver
<li class="inline"><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 class="inline"><a href="mailto:%20reg@dwf.com">Reg Clemens &lt;reg@dwf.com&gt;</a> Oncore driver (Current maintainer)
<li class="inline"><a href="mailto:%20clift@ml.csiro.au">Steve Clift &lt;clift@ml.csiro.au&gt;</a> OMEGA clock driver
<li class="inline"><a href="mailto:casey@csc.co.za">Casey Crellin &lt;casey@csc.co.za&gt;</a> vxWorks (Tornado) port and help with target configuration
<li class="inline"><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 class="inline"><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 class="inline"><a href="mailto:%20duwe@immd4.informatik.uni-erlangen.de">Torsten Duwe &lt;duwe@immd4.informatik.uni-erlangen.de&gt;</a> Linux port
<li class="inline"><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 class="inline"><a href="mailto:%20jhay@icomtek.csir.co.za">John Hay &lt;jhay@@icomtek.csir.co.za&gt;</a> IPv6 support and testing
<li class="inline"><a href="mailto:%20glenn@herald.usask.ca">Glenn Hollinger &lt;glenn@herald.usask.ca&gt;</a> GOES clock driver
<li class="inline"><a href="mailto:%20iglesias@uci.edu">Mike Iglesias &lt;iglesias@uci.edu&gt;</a> DEC Alpha port
<li class="inline"><a href="mailto:%20jagubox.gsfc.nasa.gov">Jim Jagielski &lt;jim@jagubox.gsfc.nasa.gov&gt;</a> A/UX port
<li class="inline"><a href="mailto:%20jbj@chatham.usdesign.com">Jeff Johnson &lt;jbj@chatham.usdesign.com&gt;</a> massive prototyping overhaul
<li class="inline"><a href="mailto:Hans.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 class="inline"><a href="mailto:%20phk@FreeBSD.ORG">Poul-Henning Kamp &lt;phk@FreeBSD.ORG&gt;</a> Oncore driver (Original author)
<li class="inline"><a href="http://www4.informatik.uni-erlangen.de/%7ekardel">Frank Kardel</a> <a href="mailto:%20kardel (at) ntp (dot) org">&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 class="inline"><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 class="inline"><a href="mailto:%20dkatz@cisco.com">Dave Katz &lt;dkatz@cisco.com&gt;</a> RS/6000 AIX port
<li class="inline"><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 class="inline"><a href="mailto:%20lindholm@ucs.ubc.ca">George Lindholm &lt;lindholm@ucs.ubc.ca&gt;</a> SunOS 5.1 port
<li class="inline"><a href="mailto:%20louie@ni.umd.edu">Louis A. Mamakos &lt;louie@ni.umd.edu&gt;</a> MD5-based authentication
<li class="inline"><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 class="inline"><a href="mailto:%20mayer@ntp.org">Danny Mayer &lt;mayer@ntp.org&gt;</a>Network I/O, Windows Port, Code Maintenance
<li class="inline"><a href="mailto:%20mills@udel.edu">David L. Mills &lt;mills@udel.edu&gt;</a> Version 4 foundation: clock discipline, authentication, precision kernel; clock drivers: Spectracom, Austron, Arbiter, Heath, ATOM, ACTS, KSI/Odetics; audio clock drivers: CHU, WWV/H, IRIG
<li class="inline"><a href="mailto:%20moeller@gwdgv1.dnet.gwdg.de">Wolfgang Moeller &lt;moeller@gwdgv1.dnet.gwdg.de&gt;</a> VMS port
<li class="inline"><a href="mailto:%20mogul@pa.dec.com">Jeffrey Mogul &lt;mogul@pa.dec.com&gt;</a> ntptrace utility
<li class="inline"><a href="mailto:%20tmoore@fievel.daytonoh.ncr.com">Tom Moore &lt;tmoore@fievel.daytonoh.ncr.com&gt;</a> i386 svr4 port
<li class="inline"><a href="mailto:%20kamal@whence.com">Kamal A Mostafa &lt;kamal@whence.com&gt;</a> SCO OpenServer port
<li class="inline"><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 class="inline"><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 class="inline"><a href="mailto:%20dirce@zk3.dec.com">Dirce Richards &lt;dirce@zk3.dec.com&gt;</a> Digital UNIX V4.0 port
<li class="inline"><a href="mailto:%20wsanchez@apple.com">Wilfredo S&aacute;nchez &lt;wsanchez@apple.com&gt;</a> added support for NetInfo
<li class="inline"><a href="mailto:%20mrapple@quack.kfu.com">Nick Sayer &lt;mrapple@quack.kfu.com&gt;</a> SunOS streams modules
<li class="inline"><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 class="inline"><a href="mailto:%20schnitz@unipress.com">Ray Schnitzler &lt;schnitz@unipress.com&gt;</a> Unixware1 port
<li class="inline"><a href="mailto:%20shields@tembel.org">Michael Shields &lt;shields@tembel.org&gt;</a> USNO clock driver
<li class="inline"><a href="mailto:%20pebbles.jpl.nasa.gov">Jeff Steinman &lt;jss@pebbles.jpl.nasa.gov&gt;</a> Datum PTS clock driver
<li class="inline"><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 class="inline"><a href="mailto:%20ken@sdd.hp.com">Kenneth Stone &lt;ken@sdd.hp.com&gt;</a> HP-UX port
<li class="inline"><a href="mailto:%20ajit@ee.udel.edu">Ajit Thyagarajan &lt;ajit@ee.udel.edu&gt;</a>IP multicast/anycast support
<li class="inline"><a href="mailto:%20tsuruoka@nc.fukuoka-u.ac.jp">Tomoaki TSURUOKA &lt;tsuruoka@nc.fukuoka-u.ac.jp&gt;</a>TRAK clock driver
<li class="inline"><a href="mailto:%20vixie@vix.com">Paul A Vixie &lt;vixie@vix.com&gt;</a> TrueTime GPS driver, generic TrueTime clock driver
<li class="inline"><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
</ol>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
<p>Content starting in 2011 from Harlan Stenn, Danny Mayer, and Martin Burnicki is:</p>
<pre>
***********************************************************************
* *
* Copyright (c) Network Time Foundation 2011-2015 *
* *
* All Rights Reserved *
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions *
* are met: *
* 1. Redistributions of source code must retain the above copyright *
* notice, this list of conditions and the following disclaimer. *
* 2. Redistributions in binary form must reproduce the above *
* copyright notice, this list of conditions and the following *
* disclaimer in the documentation and/or other materials provided *
* with the distribution. *
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS *
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE *
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE *
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR *
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
* DAMAGE. *
***********************************************************************
</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>

View file

@ -1,172 +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: <csobj format="ShortTime" h="25" locale="00000409" region="0" t="DateTime" w="61">18:38</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="246">Thursday, July 28, 2005</csobj></p>
<br clear="left">
<h4>More Help</h4>
<script type="text/javascript" language="javascript" src="scripts/links12.txt"></script>
<hr>
<p>Once the NTP software distribution has been compiled and installed and the configuration file constructed, the next step is to verify correct operation and fix any bugs that may result. Usually, the command line that starts the daemon is included in the system startup file, so it is executed only at system boot time; however, the daemon can be stopped and restarted from root at any time. Usually, no command-line arguments are required, unless special actions described in the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a> page are required. Once started, the daemon will begin sending and receiving messages, as specified in the configuration file.</p>
<h4>Initial Startup</h4>
<p>When started for the first time, the frequency file, usually called <tt>ntp.drift</tt>, has not yet been created. The daemon switches to a special training routine designed to quickly determine the system clock frequency offset of the particular machine. The routine first measures the current clock offset and sets the clock, then continues for up to twenty minutes before measuring the clock offset, which might involve setting the clock again. The two measurements are used to compute the initial frequency offset and the daemon continues in regular operation, during which the frequency offset is continuously updated. Once each hour the daemon writes the current frequency offset to the <tt>ntp.drift</tt> file. When restarted after that, the daemon reads the frequency offset from the <tt>ntp.drift</tt> file and avoids the training routine.</p>
<p>Note that the daemon requires at least four packet exchanges when first started in any case. This is required in order for the mitigation algorithms to insure valid and accurate measurements and defend against network delay spikes and accidental or malicious errors induced by the servers selected in the configuration file. It normally takes less than four minutes to set the clock when first started, but this can be reduced to less than ten seconds with the <tt>iburst</tt> configuration option.</p>
<p>The best way to verify correct operation is using the <a href="ntpq.html"><tt>ntpq</tt> - standard NTP query program</a> and <a href="ntpdc.html"><tt>ntpdc</tt> - special NTP query program</a> utility programs, either on the server itself or from another machine elsewhere in the network. 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>. The <tt>ntpdc</tt> program implements additional functions not provided in the standard. Both programs can be used to inspect the state variables defined in the specification and, in the case of <tt>ntpdc</tt>, additional ones intended for serious debugging. In addition, the <tt>ntpdc</tt> program can be used to selectively reconfigure and enable or disable some functions while the daemon is running.</p>
<p>In extreme cases with elusive bugs, the daemon can operate in two modes, depending on the presence of the <tt>-d</tt> command-line debug switch. If not present, the daemon detaches from the controlling terminal and proceeds autonomously. If one or more <tt>-d</tt> switches are present, the daemon does not detach and generates special 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. With a little experience, the volume of output can be reduced by piping the output to <tt>grep</tt> and specifying the keyword of the trace you want to see.</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&nbsp;requires 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. Error messages at startup and during regular operation are sent to the system log. 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&nbsp;newsgroup are not NTP&nbsp;problems, but problems with the network or firewall configuration.</p>
<p>When first started, the daemon polls the servers listed in the configuration file at 64-s intervals. In order to allow a sufficient number of samples for the NTP algorithms to reliably discriminate between truechimer servers and possible falsetickers, at least four valid messages from at least one server or peer listed in the configuration file is required before the daemon can set the clock. However, if the difference between the client time and server time is greater than the panic threshold, which defaults to 1000 s, the daemon sends a message to the system log and shuts down without setting the clock. It is necessary to set the local clock to within the panic threshold first, either manually by eyeball and wristwatch and the Unix <tt>date</tt> command, or by the <tt>ntpdate</tt> or <tt>ntpd -q</tt> commands. The panic threshold can be changed by the <tt>tinker panic</tt> command discribed on the <a href="miscopt.html">Miscellaneous Options</a> page. The panic threshold can be disabled for the first measurement by the <tt>-g</tt> command line option described on the <a href="ntpd.html"><tt>ntpd</tt> - Network Time Protocol (NTP) daemon</a> page.</p>
<p>If the difference between local time and server time is less than the panic threshold but greater than the step threshold, which defaults to 128 ms, the daemon will perform a step adjustment; otherwise, it will gradually slew the clock to the nominal time. Step adjustments are extremely rare in ordinary operation, usually as the result of reboot or hardware failure. The step threshold can be changed to 300 s using the <tt>-x</tt> command line option described on the <tt>ntpd</tt> page. This is usually sufficient to avoid a step after reboot or when the operator has set the system clock to within five minutes by eyeball-and-wristwatch. In extreme cases the step threshold can be changed by the <tt>tinker step</tt> command discribed on the <a href="miscopt.html">Miscellaneous Options</a> page. If set to zero, the clock will never be stepped; however, users should understand the implications for doing this in a distributed data network where all processing must be tightly synchronized. See the <a href="http://www.eecis.udel.edu/%7emills/leap.html">NTP Timescale and Leap Seconds</a> page for further information. If a step adjustment is made, the clock discipline algorithm will start all over again, requiring another round of at least four messages as before. This is necessary so that all servers and peers operate on the same set of time values.</p>
<p>The clock discipline algorithm is designed to avoid large noise spikes that might occur on a congested network or access line. If an offset sample exceeds the step threshold, it is ignored and a timer started. If a later sample is below the step threshold, the counter is reset and operation continues normally. However, if the counter is greater than the stepout interval, which defaults to 900 s, the next sample will step the time as directed. The stepout threshold can be changed by the <tt>tinker stepout</tt> command discribed on the Miscellaneous Options page.</p>
<p>If for some reason the hardware clock oscillator frequency error is very large, say over 400 PPM, the time offset when the daemon is started for the first time may increase over time until exceeding the step threshold, which requires a frequency adjustment and another step correction. However, due to provisions that reduce vulnerability to noise spikes, the second correction will not be done until after the stepout threshold. When the frequency error is very large, it may take a number of cycles like this until converging to the nominal frequency correction and writing the <tt>ntp.drift</tt> file. If the frequency error is over 500 PPM, convergence will never occur and occasional step adjustments will occur indefinitely.</p>
<h4>Verifying Correct Operation</h4>
<p>After starting the daemon, run the <tt>ntpq</tt> program using the <tt>-n</tt> switch, which will avoid possible distractions due to name resolution problems. Use the <tt>pe</tt> command to display a billboard showing the status of configured peers and possibly other clients poking the daemon. After operating for a few minutes, the display should be something like:</p>
<pre>
ntpq&gt; pe
remote refid st t when poll reach delay offset jitter
=====================================================================
-isipc6.cairn.ne .GPS1. 1 u 18 64 377 65.592 -5.891 0.044
+saicpc-isiepc2. pogo.udel.edu 2 u 241 128 370 10.477 -0.117 0.067
+uclpc.cairn.net pogo.udel.edu 2 u 37 64 177 212.111 -0.551 0.187
*pogo.udel.edu .GPS1. 1 u 95 128 377 0.607 0.123 0.027
</pre>
<p>The host names or addresses shown in the <tt>remote</tt> column correspond to the server and peer entries listed in the configuration file; however, the DNS names might not agree if the names listed are not the canonical DNS names. IPv4 addresses are shown in dotted quad notation, while IPv6 addresses are shown alarmingly. The <tt>refid</tt> column shows the current source of synchronization, while the <tt>st</tt> column reveals the stratum, <tt>t</tt> the type (<tt>u</tt> = unicast, <tt>m</tt> = multicast, <tt>l</tt> = local, <tt>-</tt> = don't know), and <tt>poll</tt> the poll interval in seconds. The <tt>when</tt> column shows the time since the peer was last heard in seconds, while the <tt>reach</tt> column shows the status of the reachability register (see RFC-1305) in octal. The remaining entries show the latest delay, offset and jitter in milliseconds. Note that in NTP Version 4 what used to be the <tt>dispersion</tt> column has been replaced by the <tt>jitter</tt> column.</p>
<p>As per the NTP specification RFC-1305, when the <tt>stratum</tt> is between 0 and 15 for a NTP server, the <tt>refid</tt> field shows the server DNS name or, if not found, the IP address in dotted-quad. When the <tt>stratum</tt> is any value for a reference clock, this field shows the identification string assigned to the clock. However, until the client has synchronized to a server, or when the <tt>stratum</tt> for a NTP server is 0 (appears as 16 in the billboards), the status cannot be determined. As a help in debugging, the <tt>refid</tt> field is set to a four-character string called the kiss code. The current kiss codes are as as follows.</p>
<p>Peer Kiss Codes</p>
<p><tt>ACST</tt></p>
<dl>
<dd>The association belongs to a anycast server.
<dt><tt>AUTH</tt>
<dd>Server authentication failed. Please wait while the association is restarted.
<dt><tt>AUTO</tt>
<dd>Autokey sequence failed. Please wait while the association is restarted.
<dt><tt>BCST</tt>
<dd>The association belongs to a broadcast server.
<dt><tt>CRYP</tt>
<dd>Cryptographic authentication or identification failed. The details should be in the system log file or the <tt>cryptostats</tt> statistics file, if configured. No further messages will be sent to the server.
<dt><tt>DENY</tt>
<dd>Access denied by remote server. No further messages will be sent to the server.
<dt><tt>DROP</tt>
<dd>Lost peer in symmetric mode. Please wait while the association is restarted.
<dt><tt>RSTR</tt>
<dd>Access denied due to local policy. No further messages will be sent to the server.
<dt><tt>INIT</tt>
<dd>The association has not yet synchronized for the first time.
<dt><tt>MCST</tt>
<dd>The association belongs to a manycast server.
<dt><tt>NKEY</tt>
<dd>No key found. Either the key was never installed or is not trusted.
<dt><tt>RATE</tt>
<dd>Rate exceeded. The server has temporarily denied access because the client exceeded the rate threshold.
<dt><tt>RMOT</tt>
<dd>Somebody is tinkering with the association from a remote host running <tt>ntpdc</tt>. Not to worry unless some rascal has stolen your keys.
<dt><tt>STEP</tt>
<dd>A step change in system time has occurred, but the association has not yet resynchronized.
</dl>
<p>System Kiss Codes</p>
<dl>
<dt><tt>INIT</tt>
<dd>The system clock has not yet synchronized for the first time.
<dt><tt>STEP</tt>
<dd>A step change in system time has occurred, but the system clock has not yet resynchronized.
</dl>
<p>The tattletale symbol at the left margin displays the synchronization status of each peer. The currently selected peer is marked <tt>*</tt>, while additional peers designated acceptable for synchronization are marked <tt>+</tt>. Peers marked <tt>*</tt> and <tt>+</tt> are included in the weighted average computation to set the local clock; the data produced by peers marked with other symbols are discarded. See the <tt>ntpq</tt> page for the meaning of these symbols.</p>
<p>Additional details for each peer separately can be determined by the following procedure. First, use the <tt>as</tt> command to display an index of association identifiers, such as</p>
<pre>
ntpq&gt; as
ind assID status conf reach auth condition last_event cnt
===========================================================
1 50252 f314 yes yes ok outlyer reachable 1
2 50253 f414 yes yes ok candidat reachable 1
3 50254 f414 yes yes ok candidat reachable 1
4 50255 f614 yes yes ok sys.peer reachable 1
</pre>
<p>Each line in this billboard is associated with the corresponding line in the <tt>pe</tt> billboard above. The <tt>assID</tt> shows the unique identifier for each mobilized association, while the <tt>status</tt> column shows the peer status word in hex, as defined in the NTP specification. Next, use the <tt>rv</tt> command and the respective <tt>assID</tt> identifier to display a detailed synopsis for the selected peer, such as</p>
<pre>
ntpq&gt; rv 50253
status=f414 reach, conf, auth, sel_candidat, 1 event, event_reach,
srcadr=saicpc-isiepc2.cairn.net, srcport=123, dstadr=140.173.1.46,
dstport=123, keyid=3816249004, stratum=2, precision=-27,
rootdelay=10.925, rootdispersion=12.848, refid=pogo.udel.edu,
reftime=bd11b225.133e1437 Sat, Jul 8 2000 13:59:01.075, delay=10.550,
offset=-1.357, jitter=0.074, dispersion=1.444, reach=377, valid=7,
hmode=1, pmode=1, hpoll=6, ppoll=7, leap=00, flash=00 ok,
org=bd11b23c.01385836 Sat, Jul 8 2000 13:59:24.004,
rec=bd11b23c.02dc8fb8 Sat, Jul 8 2000 13:59:24.011,
xmt=bd11b21a.ac34c1a8 Sat, Jul 8 2000 13:58:50.672,
filtdelay= 10.45 10.50 10.63 10.40 10.48 10.43 10.49 11.26,
filtoffset= -1.18 -1.26 -1.26 -1.35 -1.35 -1.42 -1.54 -1.81,
filtdisp= 0.51 1.47 2.46 3.45 4.40 5.34 6.33 7.28,
hostname=&quot;miro.time.saic.com&quot;, signature=md5WithRSAEncryption, flags=0x83f01, initsequence=61, initkey=0x287b649c,
timestamp=3172053041
</pre>
<p>A detailed explanation of the fields in this billboard are beyond the scope of this discussion; however, most variables defined in the NTP Version 3 specification RFC-1305 are available along with others defined for NTPv4 on the <tt>ntpq</tt> page. This particular example was chosen to illustrate probably the most complex configuration involving symmetric modes and public-key cryptography. As the result of debugging experience, the names and values of these variables may change from time to time.</p>
<p>A useful indicator of miscellaneous problems is the <tt>flash</tt> value, which reveals the state of the various sanity tests on incoming packets. There are currently 12 bits, one for each test, numbered from the right, which is for test 1. If the test fails, the corresponding bit is set to one and zero otherwise. If any bit is set following each processing step, the packet is discarded. The meaning of each test is described on the <tt>ntpq</tt> page.</p>
<p>The three lines identified as <tt>filtdelay</tt>, <tt>filtoffset</tt> and <tt>filtdisp</tt> reveal the roundtrip delay, clock offset and dispersion for each of the last eight measurement rounds, all in milliseconds. Note that the dispersion, which is an estimate of the error, increases as the age of the sample increases. From these data, it is usually possible to determine the incidence of severe packet loss, network congestion, and unstable local clock oscillators. There are no hard and fast rules here, since every case is unique; however, if one or more of the rounds show large values or change radically from one round to another, the network is probably congested or lossy.</p>
<p>Once the daemon has set the local clock, it will continuously track the discrepancy between local time and NTP time and adjust the local clock accordingly. There are two components of this adjustment, time and frequency. These adjustments are automatically determined by the clock discipline algorithm, which functions as a hybrid phase/frequency feedback loop. The behavior of this algorithm is carefully controlled to minimize residual errors due to network jitter and frequency variations of the local clock hardware oscillator that normally occur in practice. However, when started for the first time, the algorithm may take some time to converge on the intrinsic frequency error of the host machine.</p>
<p>The state of the local clock itself can be determined using the <tt>rv</tt> command (without the argument), such as</p>
<pre>
ntpq&gt; rv
status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
version=&quot;ntpd 4.0.99j4-r Fri Jul 7 23:38:17 GMT 2000 (1)&quot;,
processor=&quot;i386&quot;, system=&quot;FreeBSD3.4-RELEASE&quot;, leap=00, stratum=2,
precision=-27, rootdelay=0.552, rootdispersion=12.532, peer=50255,
refid=pogo.udel.edu,
reftime=bd11b220.ac89f40a Sat, Jul 8 2000 13:58:56.673, poll=6,
clock=bd11b225.ee201472 Sat, Jul 8 2000 13:59:01.930, state=4,
phase=0.179, frequency=44.298, jitter=0.022, stability=0.001,
hostname=&quot;barnstable.udel.edu&quot;, signature=md5WithRSAEncryption,
flags=0x80011, hostkey=3171372095, refresh=3172016539
cert=&quot;grundoon.udel.edu grundoon.udel.edu 0x3 3233600829&quot;
cert=&quot;whimsy.udel.edu whimsy.udel.edu 0x5 3233682156&quot;
</pre>
<p>An explanation about most of these variables is in the RFC-1305 specification. The most useful ones include <tt>clock</tt>, which shows when the clock was last adjusted, and <tt>reftime</tt>, which shows when the server clock of <tt>refid</tt> was last adjusted. The <tt>version</tt>, <tt>processor</tt> and <tt>system</tt> values are very helpful when included in bug reports. The mean millisecond time offset (<tt>phase</tt>) and deviation (<tt>jitter</tt>) monitor the clock quality, while the mean PPM frequency offset (<tt>frequency</tt>) and deviation (<tt>stability</tt>) monitor the clock stability and serve as a useful diagnostic tool. It has been the experience of NTP operators over the years that these data represent useful environment and hardware alarms. If the motherboard fan freezes up or some hardware bit sticks, the system clock is usually the first to notice it.</p>
<p>Among the new variables added for NTP Version 4 are the <tt>hostname</tt>, <tt>signature</tt>, <tt>flags, hostkey, refresh </tt>and<tt> cert</tt>, which are used for the Autokey public-key cryptography described on the <a href="authopt.html">Authentication Options</a> page. The numeric values show the filestamps, in NTP seconds, that the associated media files were created. These are useful in diagnosing problems with cryptographic key consistency and ordering principles.</p>
<p>When nothing seems to happen in the <tt>pe</tt> billboard after some minutes, there may be a network problem. One common network problem is an access controlled router on the path to the selected peer or an access controlled server using methods described on the <a href="accopt.html">Access Control Options</a> page. Another common problem is that the server is down or running in unsynchronized mode due to a local problem. Use the <tt>ntpq</tt> program to spy on the server variables in the same way you can spy on your own.</p>
<p>Normally, the daemon will adjust the local clock in small steps in such a way that system and user programs are unaware of its operation. The adjustment process operates continuously unless the apparent clock error exceeds the step threshold for a period longer than the stepout threshold, which for most Internet paths is a very rare event. If the event is simply an outlyer due to an occasional network delay spike, the correction is simply discarded; however, if the apparent time error persists for longer than the stepout threshold of about 17 minutes, the local clock is stepped or slewed to the new value as directed. This behavior is designed to resist errors due to severely congested network paths, as well as errors due to confused radio clocks upon the epoch of a leap second.</p>
<h4>Large Frequency Errors</h4>
<p>The frequency tolerance of computer clock oscillators can vary widely, which can put a strain on the daemon's ability to compensate for the intrinsic frequency error. While the daemon can handle frequency errors up to 500 parts-per-million (PPM), or 43 seconds per day, values much above 100 PPM reduce the headroom and increase the time to learn the particular value and record it in the <tt>ntp.drift</tt> file. In extreme cases before the particular oscillator frequency error has been determined, the residual system time offsets can sweep from one extreme to the other of the 128-ms tracking window only for the behavior to repeat at 900-s intervals until the measurements have converged.</p>
<p>In order to determine if excessive frequency error is a problem, observe the nominal <tt>filtoffset</tt> values for a number of rounds and divide by the poll interval. If the result is something approaching 500 PPM, there is a good chance that NTP will not work properly until the frequency error is reduced by some means. A common cause is the hardware time-of-year (TOY) clock chip, which must be disabled when NTP disciplines the software clock. For some systems this can be done using the <tt><a href="tickadj.html">tickadj</a></tt> utility and the <tt>-s</tt> command line argument. For other systems this can be done using a command in the system startup file.</p>
<p>If the TOY chip is not the cause, the problem may be that the hardware clock frequency may simply be too slow or two fast. In some systems this might require tweaking a trimmer capacitor on the motherboard. For other systems the clock frequency can be adjusted in increments of 100 PPM using the <tt>tickadj</tt> utility and the <tt>-t</tt> command line argument. Note that the <tt>tickadj</tt> alters certain kernel variables and, while the utility attempts to figure out an acceptable way to do this, there are many cases where <tt>tickadj</tt> is incompatible with a running kernel.</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 informatin.</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>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>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>Check that the remote NTP&nbsp;server is up and running. The usual evidence that it is not is a <tt>Connection refused</tt> message.
<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>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 refid 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>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>If all else fails, see the FAQ and/or the discussion and briefings at the NTP Project page.
</ol>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -1,65 +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>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.1.<i>u</i><br>
Reference ID: <tt>LCL</tt><br>
Driver ID: <tt>LOCAL</tt></p>
<h4>Description</h4>
<p>This driver is 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 (Digital machines are good, Sun machines are not) 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 (not multicast) 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 configure this driver at a stratum greater than any other likely sources of time (say 3 or 4) to prevent the server taking over when legitimate sources are still available.</p>
<p>A third application for this driver is when an external discipline source is available, such as the NIST <tt>lockclock</tt> program, which synchronizes the local clock via a telephone modem and the NIST Automated Computer Time Service (ACTS), or the Digital Time Synchronization Service (DTSS), which runs on DCE machines. In this case the stratum should be set at zero, indicating a bona fide stratum-1 source. In the case of DTSS, the local clock can have a rather large jitter, depending on the interval between corrections and the intrinsic frequency error of the clock oscillator. In extreme cases, this can cause clients to exceed the 128-ms slew window and drop off the NTP subnet.</p>
<p>In the case where a NTP time server is synchronized to some device or protocol that is not external to the NTP daemon itself, some means should be provided to pass such things as error and health values to the NTP daemon for dissemination to its clients. If this is not done, there is a very real danger that the device or protocol could fail and with no means to tell NTP clients of the mishap. When ordinary Unix system calls like <tt>adjtime()</tt> are used to discipline the kernel clock, there is no obvious way this can be done without modifying the code for each case. However, when a modified kernel with the <tt>ntp_adjtime()</tt> system call&nbsp; is available, that routine can be used for the same purpose as the <tt>adjtime()</tt> routine and in addition provided with the estimated error, maximum error, and leap-indicator values. This is the preferred way to synchronize the kernel clock and pass information to the NTP clients.</p>
<p>In the default mode the behavior of the clock selection algorithm is modified when this driver is in use. The algorithm is designed so that this driver will never be selected unless no other discipline source is available. This can be overridden with the <tt>prefer</tt> keyword of the <tt>server</tt> configuration command, in which case only this driver will be selected for synchronization and all other discipline sources will be ignored. This behavior is intended for use when an external discipline source controls the system clock. See the <a href="../prefer.html">Mitigation Rules and the <tt>prefer</tt> Keyword</a> page for a detailed description of the exact behavior.</p>
<p>The stratum for this driver is set at 5 by default, but can be changed by the <tt>fudge</tt> configuration command and/or the <tt>ntpdc</tt> utility. The reference ID is <tt>LCL</tt> by default, but can be changed using the same mechanisms. <b>*NEVER*</b> configure this driver to operate at a stratum which might possibly disrupt a client with access to a bona fide primary server, unless the local clock oscillator is reliably disciplined by another source. <b>*NEVER NEVER*</b> configure a server which might devolve to an undisciplined local clock to use multicast mode.</p>
<p>This driver provides a mechanism to trim the local clock in both time and frequency, as well as a way to manipulate the leap bits. The <tt>fudge time1</tt> parameter adjusts the time (in seconds) and the <tt>fudge time2</tt> parameter adjusts the frequency (in parts per million). Both parameters are additive and operate only once; that is, each command (as from <tt>ntpdc</tt>) adds signed increments in time or frequency to the nominal local clock time and frequency.</p>
<h4>Operation with an External Reference Source</h4>
<p>There are special provisions for this driver to operate in conjunction with an external reference source, such as the <tt>LOCKCLOCK</tt> scheme used by the NIST&nbsp;time servers. In such schemes the system clock is disciplined by a source external to NTP, in the <tt>LOCKCLOCK</tt> case an ACTS&nbsp;telephone modem. To support <tt>LOCKCLOCK</tt> the NTP&nbsp;distribution should be built with the <tt>--enable-nist</tt> parameter in the configuration phase of the build procedure. This changes the system behavior as follows:</p>
<ol>
<li>The system clock is not disciplined in any way other than to call the <tt>ntp_adjtime()</tt>&nbsp;system call to obtain the kernel leap code, which becomes the driver leap code and. If the kernel leap code is 11 (not synchronized), the driver stratum is infinity; otherwise the stratum is set by the <tt>stratum</tt> subcommand on the <tt>fudge</tt> command applying to the driver.
<li>The NTP&nbsp;algorithms operate in the normal fashion with this driver and possibly other drivers and servers; however, the local clock driver as the <tt>prefer</tt> peer will always be selected, even if declared falseticker by the selection algorithm or fails to survive the clustering algorithm.
<li>If the driver leap code is 11, the system leap code is 11, system stratum infinity and system reference identifier <tt>DOWN</tt>. This provides a definitive status condition to dependent clients.
</ol>
<p>The local clock driver should be configured something like this:</p>
<p><tt>server 127.127.1.1 prefer</tt></p>
<p><tt>fudge 127.127.1.1 stratum 0 refid NIST</tt></p>
<p>The <tt>prefer</tt> keyword forces the driver to discipline the clock, even if other servers are configured and running correctly. This is convenient when a number of servers watch each other for monitoring and statistics gathering. In particular, the <tt>peerstats</tt> data and <tt>sysstats</tt> data can be collected at each server, aggregated for daily or weekly reports and sent by electric mail to a monitoring site. In addition, the full suite of cryptographic authentication algorithms is avialable to other servers and dependent clients.</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>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
<dt><tt>time2 <i>time</i></tt>
<dd>Specifies the frequency offset calibration factor, in parts per million, with default 0.0.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 3.
<dt><tt>refid <i>string</i></tt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>LCL</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>
<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>

View file

@ -1,53 +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>
<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. For operation with multiple computers, it requires the <tt>ppsclock</tt> streams module described in the <a href="../ldisc.html">Line Disciplines and Streams Modules</a> page. The streams module requires a gadget box and 1-PPS level converter, such as described in the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page.</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>
<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>Set for computers that listen-only.
<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>
<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>

View file

@ -1,31 +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="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>
<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>
<p>Description</p>
</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
<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)
@ -34,10 +33,10 @@ 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
<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
@ -47,41 +46,40 @@ F&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock failure, time not reliable
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
<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>
<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>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>
<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>

View file

@ -1,49 +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>
<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>
<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>IRIG</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>
<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>

View file

@ -2,30 +2,33 @@
<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>
<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>
<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>
<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>
</html>

View file

@ -1,82 +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 Modem Time Service</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Automated Computer Time Service (ACTS)</h3>
<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>ntpdc</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>ntpdc</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>Ordinarily, the serial port is connected to a modem; however, if fudge <tt>flag3</tt> is set, it can be connected directly to a Spectracom WWV or GPS radio for testing or calibration. The Spectracom radio can be connected via a modem if the radio is connfigured to send time codes continuoulsly 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 hangup commands and result codes.</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>Set by the driver to (one of) <tt>NIST</tt>, <tt>USNO</tt>, <tt>PTB</tt> or <tt>WWVB</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Initiate a call if 1. Automatically reset by program.
<dt><tt>flag2 0 | 1</tt>
<dd>Enables port locking if 1, disables if 0 (default).
<dt><tt>flag3 0 | 1</tt>
<dd>Enables direct connection if 1, or modem if 0 (default). If set, the driver will send a single character 'T' at every poll event.
<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>
<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>

View file

@ -1,59 +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>
<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. Its 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;
<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>
<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>
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>
<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>

View file

@ -1,67 +0,0 @@
<!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>Trak 8820 GPS Receiver</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Trak 8820 GPS Receiver</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.2.<i>u</i><br>
Reference ID: <tt>GPS</tt><br>
Driver ID: <tt>GPS_TRAK</tt><br>
Serial Port: <tt>/dev/trak<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 Trak 8820 GPS Station Clock. The claimed accuracy at the 1-PPS output is 200-300 ns 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>For best accuracy, this radio requires the <tt>tty_clk</tt> line discipline, which captures a timestamp at the <tt>*</tt> on-time character of the timecode. Using this discipline the jitter is in the order of 1 ms and systematic error about 0.5 ms. If unavailable, the buffer timestamp is used, which is captured at the <tt>\r</tt> ending the timecode message. This introduces a systematic error of 23 character times, or about 24 ms at 9600 bps, together with a jitter well over 8 ms on Sun IPC-class machines.</p>
<p>Using the menus, the radio should be set for 9600 bps, one stop bit and no parity. It should be set to operate in computer (no echo) mode. The timecode format includes neither the year nor leap-second warning.</p>
<p>In operation, this driver sends a <tt>RQTS\r</tt> request to the radio at initialization in order to put it in continuous time output mode. The radio then sends the following message once each second:</p>
<pre>*RQTS U,ddd:hh:mm:ss.0,q&lt;cr&gt;&lt;lf&gt;
on-time = '*'
ddd = day of year
hh:mm:ss = hours, minutes, seconds
q = quality indicator (phase error), 0-6:
&nbsp;&nbsp;&nbsp;&nbsp; 0 &gt; 20 us
&nbsp;&nbsp;&nbsp;&nbsp; 6 &gt; 10 us
&nbsp;&nbsp;&nbsp;&nbsp; 5 &gt; 1 us
&nbsp;&nbsp;&nbsp;&nbsp; 4 &gt; 100 ns
&nbsp;&nbsp;&nbsp;&nbsp; 3 &gt; 10 ns
&nbsp;&nbsp;&nbsp;&nbsp; 2 &lt; 10 ns</pre>
The alarm condition is indicated by <tt>0</tt> at <tt>Q</tt>, which means the radio has a phase error greater than 20 us relative to the broadcast time. The absence of year, DST and leap-second warning in this format is also alarmed.
<p>The continuous time mode is disabled using the <tt>RQTX\r</tt> request, following which the radio sends a <tt>RQTX DONE&lt;cr&gt;&lt;lf&gt;</tt> response. In the normal mode, other control and status requests are effective, including the leap-second status request <tt>RQLS&lt;cr&gt;</tt>. The radio responds with <tt>RQLS yy,mm,dd&lt;cr&gt;&lt;lf&gt;</tt>, where <tt>yy,mm,dd</tt> are the year, month and day. Presumably, this gives the epoch of the next leap second, <tt>RQLS 00,00,00</tt> if none is specified in the GPS message. Specified in this form, the information is generally useless and is ignored by the driver.</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>
<p></p>
<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.
<p>Additional Information</p>
<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>

View file

@ -1,91 +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>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i586) [Netscape]">
<title>Generic NMEA GPS Receiver</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Generic NMEA GPS Receiver</h3>
<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 baud, 8-bits, no parity<br>
Serial Port: <tt>/dev/gps<i>u</i></tt>; symlink to server:port (for nmead) Features: <tt>tty_clk</tt></p>
<h4>Description</h4>
<p>This driver supports GPS receivers with the <tt>$GPRMC</tt> NMEA output string by default.&nbsp; Alternately the <tt>$GPGGA</tt> or <tt>$GPGLL </tt>may be selected.</p>
<p>The driver expects the receiver to be set up to transmit a <tt>$GPRMC</tt> message every second.</p>
<p>The accuracy depend on the receiver used. Inexpesive GPS models are available with a claimed PPS signal accuracy of 1 <font face="Symbol">m</font>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 the PPSAPI, RFC-2783, it will be used.<br>&nbsp;</p>
<p>The various GPS sentences that this driver recognises look like this:<br>
(others quietly ignored)</p>
<pre><tt>$GPRMC,POS_UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CC&lt;cr&gt;&lt;lf&gt;
$GPGLL,LAT,LAT_REF,LONG,LONG_REF,POS_UTC,POS_STAT*CC&lt;cr&gt;&lt;lf&gt;
$GPGGA,POS_UTC,LAT,LAT_REF,LONG,LONG_REF,FIX_MODE,SAT_USED,HDOP,ALT,ALT_UNIT,GEO,G_UNIT,D_AGE,D_REF*CC&lt;cr&gt;&lt;lf&gt;
<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>
&nbsp; POS_UTC&nbsp; - UTC of position. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])
&nbsp; POS_STAT - Position status. (A = Data valid, V = Data invalid)
&nbsp; LAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Latitude (llll.ll)
&nbsp; LAT_REF&nbsp; - Latitude direction. (N = North, S = South)
&nbsp; LON&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Longitude (yyyyy.yy)
&nbsp; LON_REF&nbsp; - Longitude direction (E = East, W = West)
&nbsp; SPD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Speed over ground. (knots) (x.x)
&nbsp; HDG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Heading/track made good (degrees True) (x.x)
&nbsp; DATE&nbsp;&nbsp;&nbsp;&nbsp; - Date (ddmmyy)
&nbsp; MAG_VAR&nbsp; - Magnetic variation (degrees) (x.x)
&nbsp; MAG_REF&nbsp; - Magnetic variation (E = East, W = West)
&nbsp; FIX_MODE - Position Fix Mode ( 0 = Invalid, &gt;0 = Valid)
&nbsp; SAT_USED - Number Satellites used in solution
&nbsp; HDOP&nbsp;&nbsp;&nbsp;&nbsp; - Horizontal Dilution of Precision
&nbsp; ALT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Antenna Altitude
&nbsp; ALT_UNIT - Altitude Units (Metres/Feet)
&nbsp; GEO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Geoid/Elipsoid separation
&nbsp; G_UNIT&nbsp;&nbsp; - Geoid units (M/F)
&nbsp; D_AGE&nbsp;&nbsp;&nbsp; - Age of last DGPS Fix
&nbsp; D_REF&nbsp;&nbsp;&nbsp; - Reference ID of DGPS station
&nbsp; CC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Checksum (optional)
&nbsp; &lt;cr&gt;&lt;lf&gt; - Sentence terminator.</tt></pre>
Alternate GPS sentences (other than <tt>$GPRMC</tt> - the default) may be enabled by setting the relevent bits of 'mode' in the server configuration line<br>&nbsp;* server 127.127.20.x mode X<br>&nbsp;&nbsp;&nbsp; bit 0 - enables RMC&nbsp;&nbsp;&nbsp; ( value = 1)<br>&nbsp;&nbsp;&nbsp; bit 1 - enables GGA&nbsp;&nbsp;&nbsp; ( value = 2)<br>&nbsp;&nbsp;&nbsp; bit 2 - enables GLL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ( value = 4)<br>
multiple sentences may be selected<br>
<p>The driver will send a <tt>$PMOTG,RMC,0000*1D&lt;cr&gt;&lt;lf&gt;</tt> message each time a <tt>$GPRMC</tt> string is needed. This is not needed on most GPS receivers because they automatically send the <tt>$GPRMC</tt> string every second and will only work on GPS receivers that understand the <tt>$PMOTG</tt> string. Others will just ignore it.</p>
<h4>Setting up the Garmin GPS-25XL</h4>
Switch off all output with by sending it the following string.
<pre>&quot;$PGRMO,,2&lt;cr&gt;&lt;lf&gt;&quot;</pre>
<p>Now switch only $GPRMC on by sending it the following string.</p>
<pre>&quot;$PGRMO,GPRMC,1&lt;cr&gt;&lt;lf&gt;&quot;</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>&quot;$PGRMC,,,,,,,,,,,,2&lt;cr&gt;&lt;lf&gt;&quot;</pre>
<h4>Monitor Data</h4>
<p>The GPS sentence(s) that is used is written to the clockstats 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>GPS</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear.
<dt><tt>flag3 0 | 1</tt>
<dd>Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.
<dt><tt>flag4 0 | 1</tt>
<dd>Not used by this driver.
</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>
<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>
</html>
<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>

View file

@ -1,60 +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>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>PPS Clock Discipline</h3>
<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 interface</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 operates only with the PPSAPI interface proposed as an IETF standard. 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 (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 and trimmed average algorithms in the driver interface. As the result, performance with minpoll and maxpoll configured at the minimum 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>Note that the PPS source is considered valid only if the auxiliary source is the prefer peer, is reachable and is selectable to discipline the system clock. By default the stratum assigned to the PPS source is automatically determined. If the auxiliary source is unreachable or inoperative, the stratum is set to 16. Otherwise it is set to the stratum specified by the <tt>fudge stratum</tt> command, if present, or the auxiliary source stratum if not present. Please note the temptation to masquerade as a primary server by forcing the stratum to zero is decidedly dangerous, as it invites timing loops.</p>
<p>The <tt>mode</tt> keyword of the <tt>server</tt> command can be used to set the PPSAPI mode bits which determine the capture edge and echo options. See the <tt>/usr/include/sys/timepps.h</tt> header file for the bit definitions, which must be converted to their decimal equivalents. This overrides the fudge <tt>flag2</tt> option.</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>PPS</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>Specifies the PPS signal on-time edge: 0 for assert (default), 1 for clear.
<dt><tt>flag3 0 | 1</tt>
<dd>Controls the kernel PPS discipline: 0 for disable (default), 1 for enable.
<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>
<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.
</ol>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</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>

View file

@ -11,6 +11,9 @@
<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>

View file

@ -11,6 +11,9 @@
<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>
@ -46,7 +49,6 @@
<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:
<ol>
<dl compact>
<dt>bit 7
<dd>parity
@ -79,7 +81,6 @@
<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>
</ol>
<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
@ -244,4 +245,4 @@ May 10 12:41:34 oolong ntpd[615]: ARCRON: sync finished, signal quality 3: OK, w
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>
</html>

View file

@ -5,72 +5,249 @@
<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 memoy Driver</title>
<title>Shared Memory 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>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>
<p>This driver receives its reference clock info from a shared
memory-segment. The shared memory-segment is created with owner-only
access by default, unless otherwise requested by the mode word for units
&ge;2. Units 0 and 1 are always created with owner-only access for
backward compatibility.
</p>
<h4>Structure of shared memory-segment</h4>
<pre>struct shmTime {
&nbsp; int&nbsp;&nbsp;&nbsp; mode; /* 0 - if valid set
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use values,&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clear valid
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * 1 - if valid set&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if count before and after read of&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; values is equal,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use values&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clear valid
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */
&nbsp; int&nbsp;&nbsp;&nbsp; count;
&nbsp; time_t clockTimeStampSec;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* external clock */
&nbsp; int&nbsp;&nbsp;&nbsp; clockTimeStampUSec;&nbsp;&nbsp;&nbsp;&nbsp; /* external clock */
&nbsp; time_t receiveTimeStampSec;&nbsp;&nbsp;&nbsp; /* internal clock, when external value was received */
&nbsp; int&nbsp;&nbsp;&nbsp; receiveTimeStampUSec;&nbsp;&nbsp; /* internal clock, when external value was received */
&nbsp; int&nbsp;&nbsp;&nbsp; leap;
&nbsp; int&nbsp;&nbsp;&nbsp; precision;
&nbsp; int&nbsp;&nbsp;&nbsp; nsamples;
&nbsp; int&nbsp;&nbsp;&nbsp; valid;
&nbsp; int&nbsp;&nbsp;&nbsp; dummy[10];&nbsp;
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>When the poll-method of the driver is called, the valid-flag 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 the valid-flag is cleared.</p>
<p>If not set, a timeout is reported to ntp, nothing else happend</p>
<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 <i>NTPD</i>, 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>When the poll-method of the driver is called, the valid-flag of the shared memory-segment is checked:</p>
<p>If set, the count-field of the record is remembered, and the values in the record (clockTimeStampSec, clockTimeStampUSec, receiveTimeStampSec, receiveTimeStampUSec, leap, precision) are read. Then, the remembered count is compared to the count 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 valid flag is cleared.</p>
<p>If not set, a timeout is reported to ntp, nothing else happend</p>
<h4>Fudge Factors</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 <i>NTPD</i>. 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 <i>NTPD</i>. 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 post-processing</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 <i>GPSD</i> 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>. There
are some tricky points when using the SHM interface to interface
with <i>GPSD</i>, because <i>GPSD</i> will use two SHM clocks, one for the
serial data stream and one for the PPS information when
available. Receivers with a loose/sloppy timing between PPS and serial data
can easily cause trouble here because <i>NTPD</i> has no way to join the two
data streams and correlate the serial data with the PPS events.
</p>
<p>
<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 <i>NTPD</i>.
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 <i>NTPD</i> 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>The 'mode' word</h4>
<p>
Some aspects of the driver behavior can be adjusted by setting bits of
the 'mode' word in the server configuration line:<br>
&nbsp;&nbsp;<tt>server 127.127.28.</tt><i>x</i><tt> mode </tt><i>Y</i>
</p>
<table border="1" width="100%">
<caption>mode word bits and bit groups</caption>
<tbody><tr>
<th align="center">Bit</th>
<th align="center">Dec</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>The SHM segment is private (mode 0600). This is the fixed
default for clock units 0 and 1; clock units &gt;1 are mode
0666 unless this bit is set for the specific unit.</td>
</tr><tr>
<td align="center">1-31</td>
<td align="center">-</td>
<td align="center">-</td>
<td><i>reserved -- do not use</i></td>
</tr>
</tbody>
</table>
<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.
<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>Not used by this driver.
<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>Not used by this driver.
<h4>Additional Information</h4>
<p><a href="../refclock.html">Reference Clock Drivers</a></p>
<dd>If flag4 is set, clockstats records will be written when the driver is polled.
</dl>
<h4>Public vs. Private SHM segments</h4>
<p>The driver attempts to create a shared memory segment with an
identifier depending on the unit number. This identifier (which can be
a numeric value or a string) clearly depends on the method used, which
in turn depends on the host operating system:</p>
<ul>
<li><p>
<tt>Windows</tt> uses a file mapping to the page file with the
name '<tt>Global\NTP</tt><i>u</i>' for public accessible
mappings, where <i>u</i> is the clock unit. Private /
non-public mappings are created as
'<tt>Local\NTP</tt><i>u</i>'.
</p><p>
Public access assigns a NULL DACL to the memory mapping, while
private access just uses the default DACL of the process creating
the mapping.
</p>
</li>
<li><p>
<tt>SYSV IPC</tt> creates a shared memory segment with a key value
of <tt>0x4E545030</tt> + <i>u</i>, where <i>u</i> is again
the clock unit. (This value could be hex-decoded as 'NTP0',
'NTP1',..., with funny characters for units &gt; 9.)
</p><p>
Public access means a permission set of 0666, while private access
creates the mapping with a permission set of 0600.
</p>
</li>
</ul>
<p>There's no support for POSIX shared memory yet.</p>
<p><i>NTPD</i> is started as root on most POSIX-like operating systems
and uses the setuid/setgid system API to run under reduced rights once
the initial setup of the process is done. One consequence out of this
is that the allocation of SHM segments must be done early during the
clock setup. The actual polling of the clock is done as the run-time
user; deferring the creation of the SHM segment to this point will
create a SHM segment owned by the runtime-user account. The internal
structure of <i>NTPD</i> does not permit the use of a fudge flag if
this is to be avoided; this is the reason why a mode bit is used for
the configuration of a public segment.
</p>
<p>When running under Windows, the chosen user account must be able to
create a SHM segment in the global object name space for SHM clocks with
public access. Otherwise the session isolation used by Windows kernels
after WinXP will get into the way if the client program does not run in
the same session.
</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>
</html>

View file

@ -4,15 +4,27 @@
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Trimble Palisade Receiver</title>
<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 Receiver</font>
<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>
@ -50,12 +62,20 @@
</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>
@ -97,7 +117,8 @@
<td>20 us</td>
</tr>
</table>
</center>
</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>
@ -199,6 +220,19 @@
<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>
@ -235,7 +269,7 @@
<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 only other option at this time is 1 for a Endrun Praecis in Trimble emulation mode.
<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;
@ -369,6 +403,7 @@
</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.
@ -576,6 +611,281 @@
</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>
@ -762,15 +1072,22 @@
</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>
<p>(last updated July 29, 1999)</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>
</html>

Some files were not shown because too many files have changed in this diff Show more