This commit was generated by cvs2svn to compensate for changes in r132451,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
roberto 2004-07-20 15:01:56 +00:00
commit cd68d2072b
378 changed files with 96144 additions and 17019 deletions

View File

@ -1,17 +1,19 @@
This file is automatically generated from html/copyright.htm This file is automatically generated from html/copyright.html
Copyright Notice Copyright Notice
[sheepb.jpg] "Clone me," says Dolly sheepishly jpg "Clone me," says Dolly sheepishly
Last update: 15:44 UTC Tuesday, July 15, 2003
_________________________________________________________________ _________________________________________________________________
The following copyright notice applies to all files collectively The following copyright notice applies to all files collectively
called the Network Time Protocol Version 4 Distribution. Unless called the Network Time Protocol Version 4 Distribution. Unless
specifically declared otherwise in an individual file, this notice specifically declared otherwise in an individual file, this notice
applies as if the text was explicitly included in the file. applies as if the text was explicitly included in the file.
*********************************************************************** ***********************************************************************
* * * *
* Copyright (c) David L. Mills 1992-2001 * * Copyright (c) David L. Mills 1992-2003 *
* * * *
* Permission to use, copy, modify, and distribute this software and * * Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose and without fee is hereby * * its documentation for any purpose and without fee is hereby *
@ -30,144 +32,145 @@ This file is automatically generated from html/copyright.htm
The following individuals contributed in part to the Network Time The following individuals contributed in part to the Network Time
Protocol Distribution Version 4 and are acknowledged as authors of Protocol Distribution Version 4 and are acknowledged as authors of
this work. this work.
1. [1]Mark Andrews <marka@syd.dms.csiro.au> Leitch atomic clock 1. [1]Mark Andrews <mark_andrews@isc.org> Leitch atomic clock
controller controller
2. [2]Bernd Altmeier <altmeier@atlsoft.de> hopf Elektronik serial 2. [2]Bernd Altmeier <altmeier@atlsoft.de> hopf Elektronik serial
line and PCI-bus devices line and PCI-bus devices
3. [3]Viraj Bais <vbais@mailman1.intel.com> and [4]Clayton Kirkwood 3. [3]Viraj Bais <vbais@mailman1.intel.com> and [4]Clayton Kirkwood
<kirkwood@striderfm.intel.com> port to WindowsNT 3.5 <kirkwood@striderfm.intel.com> port to WindowsNT 3.5
4. [5]Michael Barone <michael,barone@lmco.com> GPSVME fixes 4. [5]Michael Barone <michael,barone@lmco.com> GPSVME fixes
5. [6]Karl Berry <karl@owl.HQ.ileaf.com> syslog to file option 5. [6]Jean-Francois Boudreault
6. [7]Greg Brackley <greg.brackley@bigfoot.com> Major rework of WINNT <Jean-Francois.Boudreault@viagenie.qc.ca>IPv6 support
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. port. Clean up recvbuf and iosignal code into separate modules.
7. [8]Marc Brett <Marc.Brett@westgeo.com> Magnavox GPS clock driver 8. [9]Marc Brett <Marc.Brett@westgeo.com> Magnavox GPS clock driver
8. [9]Piete Brooks <Piete.Brooks@cl.cam.ac.uk> MSF clock driver, 9. [10]Piete Brooks <Piete.Brooks@cl.cam.ac.uk> MSF clock driver,
Trimble PARSE support Trimble PARSE support
9. [10]Reg Clemens <reg@dwf.com> Oncore driver (Current maintainer) 10. [11]Reg Clemens <reg@dwf.com> Oncore driver (Current maintainer)
10. [11]Steve Clift <clift@ml.csiro.au> OMEGA clock driver 11. [12]Steve Clift <clift@ml.csiro.au> OMEGA clock driver
11. [12]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and 12. [13]Casey Crellin <casey@csc.co.za> vxWorks (Tornado) port and
help with target configuration help with target configuration
12. [13]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference 13. [14]Sven Dietrich <sven_dietrich@trimble.com> Palisade reference
clock driver, NT adj. residuals, integrated Greg's Winnt port. clock driver, NT adj. residuals, integrated Greg's Winnt port.
13. [14]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port 14. [15]John A. Dundas III <dundas@salt.jpl.nasa.gov> Apple A/UX port
14. [15]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux 15. [16]Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> Linux
port port
15. [16]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for 16. [17]Dennis Ferguson <dennis@mrbill.canet.ca> foundation code for
NTP Version 2 as specified in RFC-1119 NTP Version 2 as specified in RFC-1119
16. [17]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver 17. [18]John Hay <jhay@@icomtek.csir.co.za> IPv6 support and testing
17. [18]Mike Iglesias <iglesias@uci.edu> DEC Alpha port 18. [19]Glenn Hollinger <glenn@herald.usask.ca> GOES clock driver
18. [19]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port 19. [20]Mike Iglesias <iglesias@uci.edu> DEC Alpha port
19. [20]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping 20. [21]Jim Jagielski <jim@jagubox.gsfc.nasa.gov> A/UX port
21. [22]Jeff Johnson <jbj@chatham.usdesign.com> massive prototyping
overhaul overhaul
20. [21]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or 22. [23]Hans Lambermont <Hans.Lambermont@nl.origin-it.com> or
[22]<H.Lambermont@chello.nl> ntpsweep [24]<H.Lambermont@chello.nl> ntpsweep
21. [23]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original 23. [25]Poul-Henning Kamp <phk@FreeBSD.ORG> Oncore driver (Original
author) author)
22. [24]Frank Kardel [25]<Frank.Kardel@informatik.uni-erlangen.de> 24. [26]Frank Kardel [27]<Frank.Kardel@informatik.uni-erlangen.de>
PARSE <GENERIC> driver (14 reference clocks), STREAMS modules for PARSE <GENERIC> driver (14 reference clocks), STREAMS modules for
PARSE, support scripts, syslog cleanup PARSE, support scripts, syslog cleanup
23. [26]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX 25. [28]William L. Jones <jones@hermes.chpc.utexas.edu> RS/6000 AIX
modifications, HPUX modifications modifications, HPUX modifications
24. [27]Dave Katz <dkatz@cisco.com> RS/6000 AIX port 26. [29]Dave Katz <dkatz@cisco.com> RS/6000 AIX port
25. [28]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox 27. [30]Craig Leres <leres@ee.lbl.gov> 4.4BSD port, ppsclock, Magnavox
GPS clock driver GPS clock driver
26. [29]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port 28. [31]George Lindholm <lindholm@ucs.ubc.ca> SunOS 5.1 port
27. [30]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication 29. [32]Louis A. Mamakos <louie@ni.umd.edu> MD5-based authentication
28. [31]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation 30. [33]Lars H. Mathiesen <thorinn@diku.dk> adaptation of foundation
code for Version 3 as specified in RFC-1305 code for Version 3 as specified in RFC-1305
29. [32]David L. Mills <mills@udel.edu> Version 4 foundation: clock 31. [34]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: discipline, authentication, precision kernel; clock drivers:
Spectracom, Austron, Arbiter, Heath, ATOM, ACTS, KSI/Odetics; Spectracom, Austron, Arbiter, Heath, ATOM, ACTS, KSI/Odetics;
audio clock drivers: CHU, WWV/H, IRIG audio clock drivers: CHU, WWV/H, IRIG
30. [33]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port 33. [36]Wolfgang Moeller <moeller@gwdgv1.dnet.gwdg.de> VMS port
31. [34]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility 34. [37]Jeffrey Mogul <mogul@pa.dec.com> ntptrace utility
32. [35]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port 35. [38]Tom Moore <tmoore@fievel.daytonoh.ncr.com> i386 svr4 port
33. [36]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port 36. [39]Kamal A Mostafa <kamal@whence.com> SCO OpenServer port
34. [37]Derek Mulcahy <derek@toybox.demon.co.uk> and [38]Damon 37. [40]Derek Mulcahy <derek@toybox.demon.co.uk> and [41]Damon
Hart-Davis <d@hd.org> ARCRON MSF clock driver Hart-Davis <d@hd.org> ARCRON MSF clock driver
35. [39]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de> 38. [42]Rainer Pruy <Rainer.Pruy@informatik.uni-erlangen.de>
monitoring/trap scripts, statistics file handling monitoring/trap scripts, statistics file handling
36. [40]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port 39. [43]Dirce Richards <dirce@zk3.dec.com> Digital UNIX V4.0 port
37. [41]Wilfredo Sánchez <wsanchez@apple.com> added support for 40. [44]Wilfredo Sánchez <wsanchez@apple.com> added support for
NetInfo NetInfo
38. [42]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules 41. [45]Nick Sayer <mrapple@quack.kfu.com> SunOS streams modules
39. [43]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of 42. [46]Jack Sasportas <jack@innovativeinternet.com> Saved a Lot of
space on the stuff in the html/pic/ subdirectory space on the stuff in the html/pic/ subdirectory
40. [44]Ray Schnitzler <schnitz@unipress.com> Unixware1 port 43. [47]Ray Schnitzler <schnitz@unipress.com> Unixware1 port
41. [45]Michael Shields <shields@tembel.org> USNO clock driver 44. [48]Michael Shields <shields@tembel.org> USNO clock driver
42. [46]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock 45. [49]Jeff Steinman <jss@pebbles.jpl.nasa.gov> Datum PTS clock
driver driver
43. [47]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure 46. [50]Harlan Stenn <harlan@pfcs.com> GNU automake/autoconfigure
makeover, various other bits (see the ChangeLog) makeover, various other bits (see the ChangeLog)
44. [48]Kenneth Stone <ken@sdd.hp.com> HP-UX port 47. [51]Kenneth Stone <ken@sdd.hp.com> HP-UX port
45. [49]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast 48. [52]Ajit Thyagarajan <ajit@ee.udel.edu>IP multicast/anycast
support support
46. [50]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock 49. [53]Tomoaki TSURUOKA <tsuruoka@nc.fukuoka-u.ac.jp>TRAK clock
driver driver
47. [51]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic 50. [54]Paul A Vixie <vixie@vix.com> TrueTime GPS driver, generic
TrueTime clock driver TrueTime clock driver
48. [52]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and 51. [55]Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> corrected and
validated HTML documents according to the HTML DTD validated HTML documents according to the HTML DTD
_________________________________________________________________ _________________________________________________________________
[53]gif
[54]David L. Mills <mills@udel.edu>
References References
1. mailto:marka@syd.dms.csiro.au 1. mailto:%20mark_andrews@isc.org
2. mailto:altmeier@atlsoft.de 2. mailto:%20altmeier@atlsoft.de
3. mailto:vbais@mailman1.intel.co 3. mailto:%20vbais@mailman1.intel.co
4. mailto:kirkwood@striderfm.intel.com 4. mailto:%20kirkwood@striderfm.intel.com
5. mailto:michael.barone@lmco.com 5. mailto:%20michael.barone@lmco.com
6. mailto:karl@owl.HQ.ileaf.com 6. mailto:%20Jean-Francois.Boudreault@viagenie.qc.ca
7. mailto:greg.brackley@bigfoot.com 7. mailto:%20karl@owl.HQ.ileaf.com
8. mailto:Marc.Brett@westgeo.com 8. mailto:%20greg.brackley@bigfoot.com
9. mailto:Piete.Brooks@cl.cam.ac.uk 9. mailto:%20Marc.Brett@westgeo.com
10. mailto:reg@dwf.com 10. mailto:%20Piete.Brooks@cl.cam.ac.uk
11. mailto:clift@ml.csiro.au 11. mailto:%20reg@dwf.com
12. mailto:casey@csc.co.za 12. mailto:%20clift@ml.csiro.au
13. mailto:Sven_Dietrich@trimble.COM 13. mailto:casey@csc.co.za
14. mailto:dundas@salt.jpl.nasa.gov 14. mailto:%20Sven_Dietrich@trimble.COM
15. mailto:duwe@immd4.informatik.uni-erlangen.de 15. mailto:%20dundas@salt.jpl.nasa.gov
16. mailto:dennis@mrbill.canet.ca 16. mailto:%20duwe@immd4.informatik.uni-erlangen.de
17. mailto:glenn@herald.usask.ca 17. mailto:%20dennis@mrbill.canet.ca
18. mailto:iglesias@uci.edu 18. mailto:%20jhay@icomtek.csir.co.za
19. mailto:jagubox.gsfc.nasa.gov 19. mailto:%20glenn@herald.usask.ca
20. mailto:jbj@chatham.usdesign.com 20. mailto:%20iglesias@uci.edu
21. mailto:Hans.Lambermont@nl.origin-it.com 21. mailto:%20jagubox.gsfc.nasa.gov
22. mailto:H.Lambermont@chello.nl 22. mailto:%20jbj@chatham.usdesign.com
23. mailto:phk@FreeBSD.ORG 23. mailto:Hans.Lambermont@nl.origin-it.com
24. http://www4.informatik.uni-erlangen.de/~kardel 24. mailto:H.Lambermont@chello.nl
25. mailto:Frank.Kardel@informatik.uni-erlangen.de 25. mailto:%20phk@FreeBSD.ORG
26. mailto:jones@hermes.chpc.utexas.edu 26. http://www4.informatik.uni-erlangen.de/%7ekardel
27. mailto:dkatz@cisco.com 27. mailto:%20Frank.Kardel@informatik.uni-erlangen.de
28. mailto:leres@ee.lbl.gov 28. mailto:%20jones@hermes.chpc.utexas.edu
29. mailto:lindholm@ucs.ubc.ca 29. mailto:%20dkatz@cisco.com
30. mailto:louie@ni.umd.edu 30. mailto:%20leres@ee.lbl.gov
31. mailto:thorinn@diku.dk 31. mailto:%20lindholm@ucs.ubc.ca
32. mailto:mills@udel.edu 32. mailto:%20louie@ni.umd.edu
33. mailto:moeller@gwdgv1.dnet.gwdg.de 33. mailto:%20thorinn@diku.dk
34. mailto:mogul@pa.dec.com 34. mailto:%20mayer@ntp.org
35. mailto:tmoore@fievel.daytonoh.ncr.com 35. mailto:%20mills@udel.edu
36. mailto:kamal@whence.com 36. mailto:%20moeller@gwdgv1.dnet.gwdg.de
37. mailto:derek@toybox.demon.co.uk 37. mailto:%20mogul@pa.dec.com
38. mailto:d@hd.org 38. mailto:%20tmoore@fievel.daytonoh.ncr.com
39. mailto:Rainer.Pruy@informatik.uni-erlangen.de 39. mailto:%20kamal@whence.com
40. mailto:dirce@zk3.dec.com 40. mailto:%20derek@toybox.demon.co.uk
41. mailto:wsanchez@apple.com 41. mailto:%20d@hd.org
42. mailto:mrapple@quack.kfu.com 42. mailto:%20Rainer.Pruy@informatik.uni-erlangen.de
43. mailto:jack@innovativeinternet.com 43. mailto:%20dirce@zk3.dec.com
44. mailto:schnitz@unipress.com 44. mailto:%20wsanchez@apple.com
45. mailto:shields@tembel.org 45. mailto:%20mrapple@quack.kfu.com
46. mailto:pebbles.jpl.nasa.gov 46. mailto:%20jack@innovativeinternet.com
47. mailto:harlan@pfcs.com 47. mailto:%20schnitz@unipress.com
48. mailto:ken@sdd.hp.com 48. mailto:%20shields@tembel.org
49. mailto:ajit@ee.udel.edu 49. mailto:%20pebbles.jpl.nasa.gov
50. mailto:tsuruoka@nc.fukuoka-u.ac.jp 50. mailto:%20harlan@pfcs.com
51. mailto:vixie@vix.com 51. mailto:%20ken@sdd.hp.com
52. mailto:Ulrich.Windl@rz.uni-regensburg.de 52. mailto:%20ajit@ee.udel.edu
53. file://localhost/backroom/ntp-stable/html/index.htm 53. mailto:%20tsuruoka@nc.fukuoka-u.ac.jp
54. mailto:mills@udel.edu 54. mailto:%20vixie@vix.com
55. mailto:%20Ulrich.Windl@rz.uni-regensburg.de

File diff suppressed because it is too large Load Diff

View File

@ -4364,7 +4364,7 @@ Tue May 25 18:00:49 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
since it may be malloc'ed. since it may be malloc'ed.
* ntpdc/ntpdc.c (sendrequest): Declare pass as const char *, don't * ntpdc/ntpdc.c (sendrequest): Declare pass as const char *, don't
loose const in cast. lose const in cast.
* ntpq/ntpq.c (sendrequest): Likewise. * ntpq/ntpq.c (sendrequest): Likewise.
* ntpd/ntp_control.c (ctl_getitem): Remove superfluous cast. * ntpd/ntp_control.c (ctl_getitem): Remove superfluous cast.

View File

@ -1,24 +1,43 @@
#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies #AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
AUTOMAKE_OPTIONS = util/ansi2knr foreign AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.5
SUBDIRS = \ SUBDIRS = \
scripts \ scripts \
include \ include \
ElectricFence \ ElectricFence \
librsaref \ @ARLIB_DIR@ \
libntp \ libntp \
libparse \ libparse \
ntpd \ ntpd \
ntpdate \ ntpdate \
ntpdc \ ntpdc \
ntpq \ ntpq \
ntptrace \
parseutil \ parseutil \
adjtimed \ adjtimed \
clockstuff \ clockstuff \
kernel \ kernel \
@MAKE_SNTP@ \
util util
DIST_SUBDIRS= \
scripts \
include \
ElectricFence \
arlib \
libntp \
libparse \
ntpd \
ntpdate \
ntpdc \
ntpq \
parseutil \
adjtimed \
clockstuff \
kernel \
sntp \
util
DISTCHECK_CONFIGURE_FLAGS= --with-arlib --with-sntp
EXTRA_DIST = \ EXTRA_DIST = \
COPYRIGHT \ COPYRIGHT \
ChangeLog \ ChangeLog \
@ -26,15 +45,12 @@ EXTRA_DIST = \
NEWS \ NEWS \
NOTES.y2kfixes \ NOTES.y2kfixes \
README.bk \ README.bk \
README.cvs \
README.des \
README.hackers \ README.hackers \
README.patches \
README.refclocks \ README.refclocks \
README.rsa \
README.versions \ README.versions \
TODO \ TODO \
WHERE-TO-START \ WHERE-TO-START \
acconfig.h \
build \ build \
config.guess \ config.guess \
config.h.in \ config.h.in \
@ -43,18 +59,18 @@ EXTRA_DIST = \
excludes \ excludes \
flock-build \ flock-build \
install-sh \ install-sh \
ntp_update \
readme.y2kfixes \ readme.y2kfixes \
results.y2kfixes \ results.y2kfixes \
conf \ conf \
html \ html \
libisc \
ports \ ports \
version version
DISTCLEANFILES = .warning DISTCLEANFILES = .warning
#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in #ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in
ETAGS_ARGS = Makefile.am configure.in acconfig.h ETAGS_ARGS = Makefile.am configure.in
# HMS: make ports be the last directory... # HMS: make ports be the last directory...
# DIST_HOOK_DIRS = conf html scripts ports # DIST_HOOK_DIRS = conf html scripts ports
@ -62,23 +78,25 @@ ETAGS_ARGS = Makefile.am configure.in acconfig.h
# HMS: Keep .warning first, as that way it gets printed first. # HMS: Keep .warning first, as that way it gets printed first.
BUILT_SOURCES = .warning $(srcdir)/COPYRIGHT $(srcdir)/version BUILT_SOURCES = .warning $(srcdir)/COPYRIGHT $(srcdir)/version
$(srcdir)/COPYRIGHT: html/copyright.htm $(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
( echo "This file is automatically generated from html/copyright.htm" ; lynx -dump $(srcdir)/html/copyright.htm ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT ( 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 # 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. # 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 # 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. # output to /dev/null under ancient/unique shells like the one Ultrix uses.
# We'll also get an error of srcdir or version is unwritable. # We'll also get an error if srcdir or version is unwritable.
$(srcdir)/version: FRC.version $(srcdir)/version: FRC.version
-(bk version) >/dev/null 2>&1 && \ -(bk version) >/dev/null 2>&1 && \
cd $(srcdir) && \ cd $(srcdir) && \
x=`bk -R prs -hr+ -nd:I: ChangeSet` && \ x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
case "$$x" in '') ;; *) echo $$x > version ;; esac y=`cat version 2>/dev/null` || true && \
case "$$x" in ''|$$y) ;; *) echo $$x > version ;; esac
dist-hook: dist-hook:
@find $(distdir) -type d -name CVS -print | xargs rm -rf @find $(distdir) -type d -name CVS -print | xargs rm -rf
@find $(distdir) -type d -name SCCS -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`; \ @for i in `find $(distdir)/ports/winnt -type f -name '*.ds*' -print`; \
do chmod u+w $$i ; unix2dos $$i $$i; done do chmod u+w $$i ; unix2dos $$i $$i; done

View File

@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Makefile.in generated by automake 1.7.7 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -13,82 +14,79 @@
@SET_MAKE@ @SET_MAKE@
#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
SHELL = @SHELL@
srcdir = @srcdir@ srcdir = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = . top_builddir = .
ACLOCAL = @ACLOCAL@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ install_sh_DATA = $(install_sh) -c -m 644
INSTALL_DATA = @INSTALL_DATA@ install_sh_PROGRAM = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@ install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA) INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = $(program_transform_name)
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@ build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@ target_triplet = @target@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AUTOKEY = @AUTOKEY@ ARLIB_DIR = @ARLIB_DIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@ CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@ CLKTEST = @CLKTEST@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@ DCFD = @DCFD@
DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@ EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@ EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@ LIBPARSE = @LIBPARSE@
LIBRSAREF = @LIBRSAREF@ LIBS = @LIBS@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@ MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@ MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@ MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@ MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
MAKE_LIBRSAREF = @MAKE_LIBRSAREF@ MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@ MAKE_NTPTIME = @MAKE_NTPTIME@
MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@ MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@ MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@ MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
@ -96,42 +94,106 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@ OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@ OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@ PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@ PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@ PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
RSADIR = @RSADIR@ READLINE_LIBS = @READLINE_LIBS@
RSAOBJS = @RSAOBJS@ SET_MAKE = @SET_MAKE@
RSAREF = @RSAREF@ SHELL = @SHELL@
RSASRCS = @RSASRCS@ STRIP = @STRIP@
TESTDCF = @TESTDCF@ TESTDCF = @TESTDCF@
U = @U@ U = @U@
VERSION = @VERSION@ VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
AUTOMAKE_OPTIONS = util/ansi2knr foreign #AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
AUTOMAKE_OPTIONS = util/ansi2knr foreign 1.5
SUBDIRS = \ SUBDIRS = \
scripts \ scripts \
include \ include \
ElectricFence \ ElectricFence \
librsaref \ @ARLIB_DIR@ \
libntp \ libntp \
libparse \ libparse \
ntpd \ ntpd \
ntpdate \ ntpdate \
ntpdc \ ntpdc \
ntpq \ ntpq \
ntptrace \
parseutil \ parseutil \
adjtimed \ adjtimed \
clockstuff \ clockstuff \
kernel \ kernel \
@MAKE_SNTP@ \
util util
DIST_SUBDIRS = \
scripts \
include \
ElectricFence \
arlib \
libntp \
libparse \
ntpd \
ntpdate \
ntpdc \
ntpq \
parseutil \
adjtimed \
clockstuff \
kernel \
sntp \
util
DISTCHECK_CONFIGURE_FLAGS = --with-arlib --with-sntp
EXTRA_DIST = \ EXTRA_DIST = \
COPYRIGHT \ COPYRIGHT \
ChangeLog \ ChangeLog \
@ -139,15 +201,12 @@ EXTRA_DIST = \
NEWS \ NEWS \
NOTES.y2kfixes \ NOTES.y2kfixes \
README.bk \ README.bk \
README.cvs \
README.des \
README.hackers \ README.hackers \
README.patches \
README.refclocks \ README.refclocks \
README.rsa \
README.versions \ README.versions \
TODO \ TODO \
WHERE-TO-START \ WHERE-TO-START \
acconfig.h \
build \ build \
config.guess \ config.guess \
config.h.in \ config.h.in \
@ -156,11 +215,11 @@ EXTRA_DIST = \
excludes \ excludes \
flock-build \ flock-build \
install-sh \ install-sh \
ntp_update \
readme.y2kfixes \ readme.y2kfixes \
results.y2kfixes \ results.y2kfixes \
conf \ conf \
html \ html \
libisc \
ports \ ports \
version version
@ -168,7 +227,7 @@ EXTRA_DIST = \
DISTCLEANFILES = .warning DISTCLEANFILES = .warning
#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in #ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in
ETAGS_ARGS = Makefile.am configure.in acconfig.h ETAGS_ARGS = Makefile.am configure.in
# HMS: make ports be the last directory... # HMS: make ports be the last directory...
# DIST_HOOK_DIRS = conf html scripts ports # DIST_HOOK_DIRS = conf html scripts ports
@ -188,26 +247,27 @@ CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
DIST_SOURCES = DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
uninstall-info-recursive all-recursive install-data-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \
install-exec-recursive installdirs-recursive install-recursive \ all-recursive install-data-recursive install-exec-recursive \
uninstall-recursive check-recursive installcheck-recursive installdirs-recursive install-recursive uninstall-recursive \
DIST_COMMON = README ./stamp-h.in ChangeLog INSTALL Makefile.am \ check-recursive installcheck-recursive
Makefile.in NEWS TODO acconfig.h acinclude.m4 aclocal.m4 \ DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure \
config.guess config.h.in config.sub configure configure.in \ ChangeLog INSTALL Makefile.am NEWS TODO acinclude.m4 aclocal.m4 \
depcomp install-sh missing mkinstalldirs compile config.guess config.h.in config.sub configure \
DIST_SUBDIRS = $(SUBDIRS) configure.in depcomp install-sh missing mkinstalldirs
all: $(BUILT_SOURCES) config.h all: $(BUILT_SOURCES) config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive $(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES: .SUFFIXES:
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \ cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile $(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$@ $(SHELL) ./config.status
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck $(SHELL) ./config.status --recheck
@ -216,31 +276,23 @@ $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENC
$(ACLOCAL_M4): configure.in acinclude.m4 $(ACLOCAL_M4): configure.in acinclude.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h
config.h: stamp-h1
@if test ! -f $@; then \ @if test ! -f $@; then \
rm -f stamp-h; \ rm -f stamp-h1; \
$(MAKE) stamp-h; \ $(MAKE) stamp-h1; \
else :; fi else :; fi
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h stamp-hT stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@echo timestamp > stamp-hT 2> /dev/null @rm -f stamp-h1
cd $(top_builddir) \ cd $(top_builddir) && $(SHELL) ./config.status config.h
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status $(srcdir)/config.h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4)
@mv stamp-hT stamp-h
$(srcdir)/config.h.in: $(srcdir)/./stamp-h.in
@if test ! -f $@; then \
rm -f $(srcdir)/./stamp-h.in; \
$(MAKE) $(srcdir)/./stamp-h.in; \
else :; fi
$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
@rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
@echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
cd $(top_srcdir) && $(AUTOHEADER) cd $(top_srcdir) && $(AUTOHEADER)
@mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in touch $(srcdir)/config.h.in
distclean-hdr: distclean-hdr:
-rm -f config.h -rm -f config.h stamp-h1
uninstall-info-am: uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
@ -250,7 +302,7 @@ uninstall-info-am:
# (which will cause the Makefiles to be regenerated when you run `make'); # (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line. # (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS): $(RECURSIVE_TARGETS):
@set fnord $(MAKEFLAGS); amf=$$2; \ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \ dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \ target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
@ -270,7 +322,7 @@ $(RECURSIVE_TARGETS):
mostlyclean-recursive clean-recursive distclean-recursive \ mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive: maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \ dot_seen=no; \
case "$@" in \ case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@ -297,72 +349,120 @@ tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP) mkid -fID $$unique
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \ here=`pwd`; \
if (etags --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
else \
include_option=--include; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \ list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \ if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ test -f $$subdir/TAGS && \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \ fi; \
done; \ done; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(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; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS: GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \ && cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here && gtags -i $(GTAGS_ARGS) $$here
distclean-tags: distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = . top_distdir = .
# Avoid unsightly `./'.
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES) distdir: $(DISTFILES)
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) $(am__remove_distdir)
mkdir $(distdir) mkdir $(distdir)
$(mkinstalldirs) $(distdir)/scripts $(mkinstalldirs) $(distdir)/ntpdc $(distdir)/scripts
@for file in $(DISTFILES); do \ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
if test -f $$file; then d=.; else d=$(srcdir); fi; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \ dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \ fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|| exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
for subdir in $(SUBDIRS); do \ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \ if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \ test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \
@ -376,55 +476,86 @@ distdir: $(DISTFILES)
fi; \ fi; \
done done
$(MAKE) $(AM_MAKEFLAGS) \ $(MAKE) $(AM_MAKEFLAGS) \
top_distdir="${top_distdir}" distdir="$(distdir)" \ top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -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 -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir) || chmod -R a+r $(distdir)
dist: distdir dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir) $(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then # This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another # it guarantees that the distribution is self-contained by making another
# tarfile. # tarfile.
distcheck: dist distcheck: dist
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir) $(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir) chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/=build mkdir $(distdir)/_build
mkdir $(distdir)/=inst mkdir $(distdir)/_inst
chmod a-w $(distdir) chmod a-w $(distdir)
dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& cd $(distdir)/=build \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \ && cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|| (echo "Error: files left after uninstall" 1>&2; \ distuninstallcheck \
exit 1) ) \ && chmod -R a-w "$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \ && ({ \
&& $(MAKE) $(AM_MAKEFLAGS) distclean \ (cd ../.. && $(mkinstalldirs) "$$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-gzip \
&& rm -f $(distdir).tar.gz \ && rm -f $(distdir).tar.gz \
&& (test `find . -type f -print | wc -l` -eq 0 \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|| (echo "Error: files left after distclean" 1>&2; \ $(am__remove_distdir)
exit 1) )
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \ @echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x' sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
@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-am: all-am
check: check-recursive check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile config.h all-am: Makefile config.h
installdirs: installdirs-recursive installdirs: installdirs-recursive
installdirs-am: installdirs-am:
install: install-recursive install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-recursive
install-exec: install-exec-recursive install-exec: install-exec-recursive
install-data: install-data-recursive install-data: install-data-recursive
uninstall: uninstall-recursive uninstall: uninstall-recursive
@ -435,6 +566,7 @@ install-am: all-am
installcheck: installcheck-recursive installcheck: installcheck-recursive
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \ `test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
@ -442,7 +574,7 @@ mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* -rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic: maintainer-clean-generic:
@ -453,11 +585,10 @@ clean: clean-recursive
clean-am: clean-generic mostlyclean-am clean-am: clean-generic mostlyclean-am
dist-all: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
distclean: distclean-recursive distclean: distclean-recursive
-rm -f config.status config.cache config.log -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive dvi: dvi-recursive
@ -479,50 +610,65 @@ install-man:
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-recursive maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \ .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
clean-generic clean-recursive dist dist-all distcheck distclean \ clean-generic clean-recursive ctags ctags-recursive dist \
distclean-generic distclean-hdr distclean-recursive \ dist-all dist-gzip distcheck distclean distclean-generic \
distclean-tags distdir dvi dvi-am dvi-recursive info info-am \ distclean-hdr distclean-recursive distclean-tags distcleancheck \
info-recursive install install-am install-data install-data-am \ distdir distuninstallcheck dvi dvi-am dvi-recursive info \
install-data-recursive install-exec install-exec-am \ info-am info-recursive install install-am install-data \
install-exec-recursive install-info install-info-am \ install-data-am install-data-recursive install-exec \
install-info-recursive install-man install-recursive \ install-exec-am install-exec-recursive install-info \
install-strip installcheck installcheck-am installdirs \ install-info-am install-info-recursive install-man \
installdirs-am installdirs-recursive maintainer-clean \ install-recursive install-strip installcheck installcheck-am \
maintainer-clean-generic maintainer-clean-recursive mostlyclean \ installdirs installdirs-am installdirs-recursive \
mostlyclean-generic mostlyclean-recursive tags tags-recursive \ maintainer-clean maintainer-clean-generic \
uninstall uninstall-am uninstall-info-am \ maintainer-clean-recursive mostlyclean mostlyclean-generic \
uninstall-info-recursive uninstall-recursive mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
ps-recursive tags tags-recursive uninstall uninstall-am \
uninstall-info-am uninstall-info-recursive uninstall-recursive
$(srcdir)/COPYRIGHT: html/copyright.htm $(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
( echo "This file is automatically generated from html/copyright.htm" ; lynx -dump $(srcdir)/html/copyright.htm ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT ( 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 # 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. # 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 # 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. # output to /dev/null under ancient/unique shells like the one Ultrix uses.
# We'll also get an error of srcdir or version is unwritable. # We'll also get an error if srcdir or version is unwritable.
$(srcdir)/version: FRC.version $(srcdir)/version: FRC.version
-(bk version) >/dev/null 2>&1 && \ -(bk version) >/dev/null 2>&1 && \
cd $(srcdir) && \ cd $(srcdir) && \
x=`bk -R prs -hr+ -nd:I: ChangeSet` && \ x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
case "$$x" in '') ;; *) echo $$x > version ;; esac y=`cat version 2>/dev/null` || true && \
case "$$x" in ''|$$y) ;; *) echo $$x > version ;; esac
dist-hook: dist-hook:
@find $(distdir) -type d -name CVS -print | xargs rm -rf @find $(distdir) -type d -name CVS -print | xargs rm -rf
@find $(distdir) -type d -name SCCS -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`; \ @for i in `find $(distdir)/ports/winnt -type f -name '*.ds*' -print`; \
do chmod u+w $$i ; unix2dos $$i $$i; done do chmod u+w $$i ; unix2dos $$i $$i; done

View File

@ -1,4 +1,11 @@
-- (4.2.0)
* More stuff than I have time to document
* Bugfixes
* call-gap filtering
* wwv and chu refclock improvements
* OpenSSL integration
(4.1.2)
* clock state machine bugfix * clock state machine bugfix
* Lose the source port check on incoming packets * Lose the source port check on incoming packets
* (x)ntpdc compatibility patch * (x)ntpdc compatibility patch
@ -7,12 +14,17 @@
* ntpdc improvements * ntpdc improvements
* GOES refclock fix * GOES refclock fix
* JJY driver * JJY driver
* Jupiter refclock fixes
* Neoclock4X refclock fixes
* AIX 5 port
* bsdi port fixes * bsdi port fixes
* Cray unicos port upgrade
* HP MPE/iX port * HP MPE/iX port
* Win/NT port upgrade * Win/NT port upgrade
* Dynix PTX port fixes * Dynix PTX port fixes
* Document conversion from CVS to BK * Document conversion from CVS to BK
* readline support for ntpq * readline support for ntpq
(4.1.0) (4.1.0)
* CERT problem fixed (99k23) * CERT problem fixed (99k23)
* Huff-n-Puff filter * Huff-n-Puff filter
@ -34,6 +46,7 @@
* New/updated drivers: Forum Graphic GPS, WWV/H, Heath GC-100 II, HOPF * New/updated drivers: Forum Graphic GPS, WWV/H, Heath GC-100 II, HOPF
serial and PCI, ONCORE, ulink331 serial and PCI, ONCORE, ulink331
* Rewrite of the audio drivers * Rewrite of the audio drivers
(4.0.99) (4.0.99)
* Driver updates: CHU, DCF, GPS/VME, Oncore, PCF, Ulink, WWVB, burst * Driver updates: CHU, DCF, GPS/VME, Oncore, PCF, Ulink, WWVB, burst
If you use the ONCORE driver with a HARDPPS kernel module, If you use the ONCORE driver with a HARDPPS kernel module,
@ -45,6 +58,7 @@
* ntpd, ntpq, ntpdate cleanup and fixes * ntpd, ntpq, ntpdate cleanup and fixes
* NT port improvements * NT port improvements
* AIX, BSDI, DEC OSF, FreeBSD, NetBSD, Reliant, SCO, Solaris port improvements * AIX, BSDI, DEC OSF, FreeBSD, NetBSD, Reliant, SCO, Solaris port improvements
(4.0.98) (4.0.98)
* Solaris kernel FLL bug is fixed in 106541-07 * Solaris kernel FLL bug is fixed in 106541-07
* Bug/lint cleanup * Bug/lint cleanup
@ -55,26 +69,31 @@
* Trimble OEM Ace-II support * Trimble OEM Ace-II support
* DCF77 power choices * DCF77 power choices
* Oncore improvements * Oncore improvements
(4.0.97) (4.0.97)
* NT patches * NT patches
* AIX,SunOS,IRIX portability * AIX,SunOS,IRIX portability
* NeXT portability * NeXT portability
* ntptimeset utility added * ntptimeset utility added
* cygwin portability patches * cygwin portability patches
(4.0.96) (4.0.96)
* -lnsl, -lsocket, -lgen configuration patches * -lnsl, -lsocket, -lgen configuration patches
* Y2K patches from AT&T * Y2K patches from AT&T
* Linux portability cruft * Linux portability cruft
(4.0.95) (4.0.95)
* NT port cleanup/replacement * NT port cleanup/replacement
* a few portability fixes * a few portability fixes
* VARITEXT Parse clock added * VARITEXT Parse clock added
(4.0.94) (4.0.94)
* PPS updates (including ntp.config options) * PPS updates (including ntp.config options)
* Lose the old DES stuff in favor of the (optional) RSAREF stuff * Lose the old DES stuff in favor of the (optional) RSAREF stuff
* html cleanup/updates * html cleanup/updates
* numerous drivers cleaned up * numerous drivers cleaned up
* numerous portability patches and code cleanup * numerous portability patches and code cleanup
(4.0.93) (4.0.93)
* Oncore refclock needs PPS or one of two ioctls. * Oncore refclock needs PPS or one of two ioctls.
* Don't make ntptime under Linux. It doesn't compile for too many folks. * Don't make ntptime under Linux. It doesn't compile for too many folks.
@ -92,6 +111,7 @@
* New clock state machine * New clock state machine
* SCO cleanup * SCO cleanup
* Skip alias interfaces * Skip alias interfaces
(4.0.92) (4.0.92)
* chronolog and dumbclock refclocks * chronolog and dumbclock refclocks
* SCO updates * SCO updates
@ -104,6 +124,7 @@
* NMEA clock improvements * NMEA clock improvements
* PPS improvements * PPS improvements
* AIX portability patches * AIX portability patches
(4.0.91) (4.0.91)
* New ONCORE driver * New ONCORE driver
* New MX4200 driver * New MX4200 driver
@ -113,15 +134,18 @@
* HP-UX, IRIX lint cleanup * HP-UX, IRIX lint cleanup
* AIX portability patches * AIX portability patches
* NT cleanup * NT cleanup
(4.0.90) (4.0.90)
* Nanoseconds * Nanoseconds
* New palisade driver * New palisade driver
* New Oncore driver * New Oncore driver
(4.0.73) (4.0.73)
* README.hackers added * README.hackers added
* PARSE driver is working again * PARSE driver is working again
* Solaris 2.6 has nasty kernel bugs. DO NOT enable pll! * Solaris 2.6 has nasty kernel bugs. DO NOT enable pll!
* DES is out of the distribution. * DES is out of the distribution.
(4.0.72) (4.0.72)
* K&R C compiling should work again. * K&R C compiling should work again.
* IRIG patches. * IRIG patches.

View File

@ -1,5 +1,7 @@
Send patches and bug reports to <bugs@ntp.org> . Submit patches, bug reports, and enhancement requests via
http://bugzilla.ntp.org
The ntp Distribution Base Directory The ntp Distribution Base Directory
@ -17,7 +19,7 @@ read WHERE-TO-START.
For Windows/NT, visit html/hints/winnt . For Windows/NT, visit html/hints/winnt .
The base directory ./ contains the autoconfiguation files, source The base directory ./ contains the autoconfiguration files, source
directories and related stuff: directories and related stuff:
COPYRIGHT Excerpt from the HTML file ./html/copyright.html. This file COPYRIGHT Excerpt from the HTML file ./html/copyright.html. This file
@ -32,11 +34,9 @@ NEWS What's new in this release.
README This file. README This file.
README.cvs Instructions for folks who use the CVS-repository README.bk Instructions for folks who use the BitKeeper-repository
version of NTP. version of NTP.
README.des If you *need* DES support.
README.hackers Notes to folks who want to hack on the code. README.hackers Notes to folks who want to hack on the code.
TODO List of items the NTP developers are working on. TODO List of items the NTP developers are working on.
@ -49,9 +49,6 @@ Makefile.am Automake file configuration file. Edit only if you have the
Makefile.in Autoconf make file template for Unix. Makefile.in Autoconf make file template for Unix.
acconfig.h Autoconf template header file. Edit only if you
have the GNU automake and autoconf utilities installed.
adjtimed Directory containing the sources for the adjtime daemon adjtimed Directory containing the sources for the adjtime daemon
for HP/UX systems prior to HP-UX 10.0. for HP/UX systems prior to HP-UX 10.0.
@ -111,10 +108,6 @@ kernel Directory containing sources for kernel programs such as
libntp Directory containing library source code used by most libntp Directory containing library source code used by most
programs in the distribution. programs in the distribution.
librsaref Staging directory for RSAREF.
ntp_update Update an NTP CVS tree.
ntpdate Directory containing sources for a program to set the ntpdate Directory containing sources for a program to set the
local machine time from one or more remote machines local machine time from one or more remote machines
running NTP. Operates like rdate, but much more accurate. running NTP. Operates like rdate, but much more accurate.

View File

@ -1,7 +1,7 @@
In order to use the BitKeeper repository version of NTP you will have In order to use the BitKeeper repository version of NTP you will have
to have the following tools installed: to have the following tools installed:
autoconf 2.52 or later autoconf 2.53 or later
automake 1.5 or later automake 1.5 or later
lynx lynx
@ -37,17 +37,6 @@ You can get the ntp-dev repository by either of the following commands:
bk clone bk://ntp.bkbits.net/ntp-dev ntp-dev bk clone bk://ntp.bkbits.net/ntp-dev ntp-dev
The IPV6 patch has been applied:
bk clone bk://www.ntp.org/home/bk/ntp-dev-ipv6 ntp-dev-ipv6
bk clone bk://ntp.bkserver.net/ntp-dev-ipv6 ntp-dev-ipv6
bk clone bk://ntp.bkbits.net/ntp-dev-ipv6 ntp-dev-ipv6
The ntp-dev-ipv6 repository will be merged back in to the ntp-dev repo
as soon as the code is stable.
If you are stuck behind a firewall that blocks access to the default port If you are stuck behind a firewall that blocks access to the default port
used by bitkeeper (14690) but you can use port 80 instead, you can use used by bitkeeper (14690) but you can use port 80 instead, you can use
http as a bk transport mechanism. Just use: http as a bk transport mechanism. Just use:
@ -70,3 +59,5 @@ You can update your repository by incanting:
cd REPO cd REPO
bk pull bk pull
If you want to submit patches, please see the README.hackers file.

View File

@ -1,5 +1,7 @@
Notes to hackers. Notes to hackers.
See README.patches for information about submitting patches.
--- ---
Dave likes this code indented formatted in a consistent way. Dave likes this code indented formatted in a consistent way.
@ -23,3 +25,4 @@ 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 We'd like to see *all* system function declarations live in include/l_stdlib.h
and NEVER appear in the .c files. and NEVER appear in the .c files.
---

View File

@ -0,0 +1,39 @@
See README.hackers for notes on coding styles.
If you are going to patch both ntp-stable and ntp-dev
please do it this way:
> cd ntp-stable
> (make and test your changes to ntp-stable first)
> (commit your changes to ntp-stable)
> cd ../ntp-dev
> bk pull ../ntp-stable (get your changes from ntp-stable)
> (resolve any problems and test your changes)
> (commit your changes to ntp-dev)
With the current release of bitkeeper it is *much* easier to move changes
from ntp-stable to ntp-dev than it is to move changes from ntp-dev to
ntp-stable.
If you make your changes in the above order and then submit them,
it will be trivial to apply your patches.
Otherwise, it will be much more difficult to apply your patches.
---
Please read (and follow) the previous section if you want to submit
patches for both ntp-stable and ntp-dev.
To submit patches please use the 'bk send' command:
> cd REPO
> bk citool (or bk ci ... ; bk commit ... )
> bk pull # make sure your repo is up-to-date
> bk send -d -ubk://www.ntp.org/home/bk/REPO - > file-containing-the-patch
> bk receive -vv -a < file-containing-the-patch
# Sanity check.
# Open a bugzilla item at <http://bugzilla.ntp.org>
# After the bug is opened, visit the bug and attach file-containing-the-patch

View File

@ -16,10 +16,6 @@
970210: Find a way to dump the current configuration to either syslog or 970210: Find a way to dump the current configuration to either syslog or
a file. a file.
CPP macros we need to handle:
SUN_3_3_STINKS (this will be easy to handle if anybody still needs it)
Problems that need to be fixed: Problems that need to be fixed:
- Get rid of the old SYS_* macros: - Get rid of the old SYS_* macros:

View File

@ -1,5 +1,6 @@
AC_DEFUN(hs_ULONG_CONST, AC_DEFUN(hs_ULONG_CONST,
[ AC_EGREP_CPP(Circus, [ AH_TEMPLATE(ULONG_CONST, [How do we create unsigned long constants?])
AC_EGREP_CPP(Circus,
[#define ACAT(a,b)a ## b [#define ACAT(a,b)a ## b
ACAT(Cir,cus) ACAT(Cir,cus)
], AC_DEFINE([ULONG_CONST(a)], [a ## UL]), ], AC_DEFINE([ULONG_CONST(a)], [a ## UL]),
@ -21,7 +22,7 @@ dnl
dnl AC_DEFINE_DIR(DATADIR, datadir) dnl AC_DEFINE_DIR(DATADIR, datadir)
dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries]) dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
dnl dnl
dnl @version $Id$ dnl @version $Id: acinclude.m4,v 1.3 2000/08/04 03:26:22 stenn Exp $
dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br> dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br>
AC_DEFUN(AC_DEFINE_DIR, [ AC_DEFUN(AC_DEFINE_DIR, [

742
contrib/ntp/aclocal.m4 vendored
View File

@ -1,6 +1,6 @@
# aclocal.m4 generated automatically by aclocal 1.5 # generated automatically by aclocal 1.7.7 -*- Autoconf -*-
# Copyright 1996, 1997, 1998, 1999, 2000, 2001 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation # This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -12,7 +12,8 @@
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
AC_DEFUN(hs_ULONG_CONST, AC_DEFUN(hs_ULONG_CONST,
[ AC_EGREP_CPP(Circus, [ AH_TEMPLATE(ULONG_CONST, [How do we create unsigned long constants?])
AC_EGREP_CPP(Circus,
[#define ACAT(a,b)a ## b [#define ACAT(a,b)a ## b
ACAT(Cir,cus) ACAT(Cir,cus)
], AC_DEFINE([ULONG_CONST(a)], [a ## UL]), ], AC_DEFINE([ULONG_CONST(a)], [a ## UL]),
@ -34,7 +35,7 @@ dnl
dnl AC_DEFINE_DIR(DATADIR, datadir) dnl AC_DEFINE_DIR(DATADIR, datadir)
dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries]) dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
dnl dnl
dnl @version $Id$ dnl @version $Id: acinclude.m4,v 1.3 2000/08/04 03:26:22 stenn Exp $
dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br> dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br>
AC_DEFUN(AC_DEFINE_DIR, [ AC_DEFUN(AC_DEFINE_DIR, [
@ -48,142 +49,113 @@ AC_DEFUN(AC_DEFINE_DIR, [
AC_DEFINE_UNQUOTED($1, "$ac_expanded", $3)) AC_DEFINE_UNQUOTED($1, "$ac_expanded", $3))
]) ])
# Like AC_CONFIG_HEADER, but automatically create stamp file. # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
# serial 3 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
# When config.status generates a header, we must update the stamp-h file. # This program is free software; you can redistribute it and/or modify
# This file resides in the same directory as the config header # it under the terms of the GNU General Public License as published by
# that is generated. We must strip everything past the first ":", # the Free Software Foundation; either version 2, or (at your option)
# and everything past the last "/". # any later version.
AC_PREREQ([2.12]) # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
AC_DEFUN([AM_CONFIG_HEADER], # You should have received a copy of the GNU General Public License
[ifdef([AC_FOREACH],dnl # along with this program; if not, write to the Free Software
[dnl init our file count if it isn't already # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0])) # 02111-1307, USA.
dnl prepare to store our destination file list for use in config.status
AC_FOREACH([_AM_File], [$1],
[m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
dnl and add it to the list of files AC keeps track of, along
dnl with our hook
AC_CONFIG_HEADERS(_AM_File,
dnl COMMANDS, [, INIT-CMDS]
[# update the timestamp
echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
m4_popdef([_AM_Dest])])],dnl
[AC_CONFIG_HEADER([$1])
AC_OUTPUT_COMMANDS(
ifelse(patsubst([$1], [[^ ]], []),
[],
[test -z "$CONFIG_HEADERS" || echo timestamp >dnl
patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
[am_indx=1
for am_file in $1; do
case " \$CONFIG_HEADERS " in
*" \$am_file "*)
am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
if test -n "\$am_dir"; then
am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
am_tmpdir=\$am_tmpdir\$am_subdir/
if test ! -d \$am_tmpdir; then
mkdir \$am_tmpdir
fi
done
fi
echo timestamp > "\$am_dir"stamp-h\$am_indx
;;
esac
am_indx=\`expr \$am_indx + 1\`
done])
])]) # AM_CONFIG_HEADER
# _AM_DIRNAME(PATH) AC_PREREQ([2.52])
# -----------------
# Like AS_DIRNAME, only do it during macro expansion
AC_DEFUN([_AM_DIRNAME],
[m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
m4_if(m4_regexp([$1], [^/.*]), -1,
[.],
m4_patsubst([$1], [^\(/\).*], [\1])),
m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
]) # _AM_DIRNAME
# Do all the work for Automake. This macro actually does too much -- # serial 6
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
# serial 5 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # Do all the work for Automake. -*- Autoconf -*-
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# We require 2.13 because we rely on SHELL being computed by configure. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
AC_PREREQ([2.13]) # Free Software Foundation, Inc.
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # This program is free software; you can redistribute it and/or modify
# ----------------------------------------------------------- # it under the terms of the GNU General Public License as published by
# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED. # the Free Software Foundation; either version 2, or (at your option)
# The purpose of this macro is to provide the user with a means to # any later version.
# check macros which are provided without letting her know how the
# information is coded.
# If this macro is not defined by Autoconf, define it here.
ifdef([AC_PROVIDE_IFELSE],
[],
[define([AC_PROVIDE_IFELSE],
[ifdef([AC_PROVIDE_$1],
[$2], [$3])])])
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE]) # You should have received a copy of the GNU General Public License
# ---------------------------------------------- # along with this program; if not, write to the Free Software
AC_DEFUN([AM_INIT_AUTOMAKE], # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
[AC_REQUIRE([AC_PROG_INSTALL])dnl # 02111-1307, USA.
# test to see if srcdir already configured
if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
fi
# Define the identity of the package. # serial 10
PACKAGE=$1
AC_SUBST(PACKAGE)dnl AC_PREREQ([2.54])
VERSION=$2
AC_SUBST(VERSION)dnl
ifelse([$3],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
# the ones we care about. # the ones we care about.
ifdef([m4_pattern_allow], m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
[m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
# Autoconf 2.50 always computes EXEEXT. However we need to be # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# compatible with 2.13, for now. So we always define EXEEXT, but we # AM_INIT_AUTOMAKE([OPTIONS])
# don't compute it. # -----------------------------------------------
AC_SUBST(EXEEXT) # The call with PACKAGE and VERSION arguments is the old style
# Similar for OBJEXT -- only we only use OBJEXT if the user actually # call (pre autoconf-2.50), which is being phased out. PACKAGE
# requests that it be used. This is a bit dumb. # and VERSION should now be passed to AC_INIT and removed from
: ${OBJEXT=o} # the call to AM_INIT_AUTOMAKE.
AC_SUBST(OBJEXT) # We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs. # Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal) AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_MISSING_PROG(AMTAR, tar) AM_MISSING_PROG(AMTAR, tar)
@ -193,22 +165,135 @@ AM_PROG_INSTALL_STRIP
# some platforms. # some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_PROVIDE_IFELSE([AC_PROG_][CC], _AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)], [_AM_DEPENDENCIES(CC)],
[define([AC_PROG_][CC], [define([AC_PROG_CC],
defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_][CXX], AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)], [_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_][CXX], [define([AC_PROG_CXX],
defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
]) ])
])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$1 | $1:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.7.7])])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright 2001, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# #
# Check to make sure that the build environment is sane. # Check to make sure that the build environment is sane.
# #
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3 # serial 3
# AM_SANITY_CHECK # AM_SANITY_CHECK
@ -252,8 +337,27 @@ Check your system clock])
fi fi
AC_MSG_RESULT(yes)]) AC_MSG_RESULT(yes)])
# -*- Autoconf -*-
# serial 2
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_MISSING_PROG(NAME, PROGRAM) # AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------ # ------------------------------
@ -275,13 +379,29 @@ if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run " am_missing_run="$MISSING --run "
else else
am_missing_run= am_missing_run=
am_backtick='`' AC_MSG_WARN([`missing' script is too old or missing])
AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
fi fi
]) ])
# AM_AUX_DIR_EXPAND # AM_AUX_DIR_EXPAND
# Copyright 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@ -320,19 +440,59 @@ fi
# absolute PATH. The drawback is that using absolute paths prevent a # absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration. # configured tree to be moved without reconfiguration.
# Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])
AC_DEFUN([AM_AUX_DIR_EXPAND], [ AC_DEFUN([AM_AUX_DIR_EXPAND], [
# expand $ac_aux_dir to an absolute path # expand $ac_aux_dir to an absolute path
am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd` am_aux_dir=`cd $ac_aux_dir && pwd`
]) ])
# AM_PROG_INSTALL_SH # AM_PROG_INSTALL_SH
# ------------------ # ------------------
# Define $install_sh. # Define $install_sh.
# Copyright 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([AM_PROG_INSTALL_SH], AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"} install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)]) AC_SUBST(install_sh)])
# AM_PROG_INSTALL_STRIP
# Copyright 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# One issue with vendor `install' (even GNU) is that you can't # One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially # specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip # annoying in cross-compiling environments, where the build's strip
@ -342,11 +502,68 @@ AC_SUBST(install_sh)])
# STRIPPROG with the value of the STRIP variable (set by the user). # STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP], AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_SUBST([INSTALL_STRIP_PROGRAM])])
# serial 4 -*- Autoconf -*- # -*- Autoconf -*-
# Copyright (C) 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 1
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# serial 5 -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
@ -358,9 +575,9 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# _AM_DEPENDENCIES(NAME) # _AM_DEPENDENCIES(NAME)
# --------------------- # ----------------------
# See how the compiler implements dependency checking. # See how the compiler implements dependency checking.
# NAME is "CC", "CXX" or "OBJC". # NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable. # We try a few techniques and use that to set a single cache variable.
# #
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@ -375,7 +592,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=], ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'] [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=]) [depcc="$$1" am_compiler_list=])
@ -392,18 +609,32 @@ AC_CACHE_CHECK([dependency style of $depcc],
# using a relative directory. # using a relative directory.
cp "$am_depcomp" conftest.dir cp "$am_depcomp" conftest.dir
cd conftest.dir cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi fi
for depmode in $am_compiler_list; do for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may # We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines. # overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler. # This happens at least with the AIX C compiler.
echo '#include "conftest.h"' > conftest.c : > sub/conftest.c
echo 'int i;' > conftest.h for i in 1 2 3 4 5 6; do
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf echo '#include "conftst'$i'.h"' >> sub/conftest.c
: > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in case $depmode in
nosideeffect) nosideeffect)
@ -421,13 +652,20 @@ AC_CACHE_CHECK([dependency style of $depcc],
# mode. It turns out that the SunPro C++ compiler does not properly # mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this. # handle `-M -o', and we need to detect this.
if depmode=$depmode \ if depmode=$depmode \
source=conftest.c object=conftest.o \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=conftest.Po tmpdepfile=conftest.TPo \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
grep conftest.h conftest.Po > /dev/null 2>&1 && >/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
am_cv_$1_dependencies_compiler_type=$depmode # icc doesn't choke on unknown options, it will just issue warnings
break # (even with -Werror). So we grep stderr for any message
# that says an option was ignored.
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi fi
done done
@ -437,8 +675,10 @@ else
am_cv_$1_dependencies_compiler_type=none am_cv_$1_dependencies_compiler_type=none
fi fi
]) ])
$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type" AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AC_SUBST([$1DEPMODE]) AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
]) ])
@ -447,16 +687,8 @@ AC_SUBST([$1DEPMODE])
# Choose a directory name for dependency files. # Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES # This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR], AC_DEFUN([AM_SET_DEPDIR],
[rm -f .deps 2>/dev/null [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
mkdir .deps 2>/dev/null AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
if test -d .deps; then
DEPDIR=.deps
else
# MS-DOS does not allow filenames that begin with a dot.
DEPDIR=_deps
fi
rmdir .deps 2>/dev/null
AC_SUBST(DEPDIR)
]) ])
@ -471,30 +703,48 @@ if test "x$enable_dependency_tracking" != xno; then
AMDEPBACKSLASH='\' AMDEPBACKSLASH='\'
fi fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
pushdef([subst], defn([AC_SUBST])) AC_SUBST([AMDEPBACKSLASH])
subst(AMDEPBACKSLASH)
popdef([subst])
]) ])
# Generate code to set up dependency tracking. # Generate code to set up dependency tracking. -*- Autoconf -*-
# This macro should only be invoked once -- use via AC_REQUIRE.
# Usage:
# AM_OUTPUT_DEPENDENCY_COMMANDS
# # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will # This program is free software; you can redistribute it and/or modify
# need in order to bootstrap the dependency handling code. # it under the terms of the GNU General Public License as published by
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[ # the Free Software Foundation; either version 2, or (at your option)
AC_OUTPUT_COMMANDS([ # any later version.
test x"$AMDEP_TRUE" != x"" ||
for mf in $CONFIG_FILES; do # This program is distributed in the hope that it will be useful,
case "$mf" in # but WITHOUT ANY WARRANTY; without even the implied warranty of
Makefile) dirpart=.;; # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*/Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; # GNU General Public License for more details.
*) continue;;
esac # You should have received a copy of the GNU General Public License
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#serial 2
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without # Extract the definition of DEP_FILES from the Makefile without
# running `make'. # running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
@ -518,14 +768,48 @@ for mf in $CONFIG_FILES; do
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists. # Make sure the directory exists.
test -f "$dirpart/$file" && continue test -f "$dirpart/$file" && continue
fdir=`echo "$file" | sed -e 's|/[^/]*$||'` fdir=`AS_DIRNAME(["$file"])`
$ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1 AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file" # echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file" echo '# dummy' > "$dirpart/$file"
done done
done done
], [AMDEP_TRUE="$AMDEP_TRUE" ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
ac_aux_dir="$ac_aux_dir"])])
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# AM_MAKE_INCLUDE() # AM_MAKE_INCLUDE()
# ----------------- # -----------------
@ -533,12 +817,13 @@ ac_aux_dir="$ac_aux_dir"])])
AC_DEFUN([AM_MAKE_INCLUDE], AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make} [am_make=${MAKE-make}
cat > confinc << 'END' cat > confinc << 'END'
doit: am__doit:
@echo done @echo done
.PHONY: am__doit
END END
# If we don't find an include directive, just comment out the code. # If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make]) AC_MSG_CHECKING([for style of include used by $am_make])
am__include='#' am__include="#"
am__quote= am__quote=
_am_result=none _am_result=none
# First try GNU make style include. # First try GNU make style include.
@ -548,7 +833,7 @@ echo "include confinc" > confmf
# In particular we don't look at `^make:' because GNU make might # In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which # be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'. # case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include am__include=include
am__quote= am__quote=
_am_result=GNU _am_result=GNU
@ -558,33 +843,45 @@ if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include am__include=.include
am__quote='"' am__quote="\""
_am_result=BSD _am_result=BSD
fi fi
fi fi
AC_SUBST(am__include) AC_SUBST([am__include])
AC_SUBST(am__quote) AC_SUBST([am__quote])
AC_MSG_RESULT($_am_result) AC_MSG_RESULT([$_am_result])
rm -f confinc confmf rm -f confinc confmf
]) ])
# serial 3 # AM_CONDITIONAL -*- Autoconf -*-
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 5
AC_PREREQ(2.52)
# AM_CONDITIONAL(NAME, SHELL-CONDITION) # AM_CONDITIONAL(NAME, SHELL-CONDITION)
# ------------------------------------- # -------------------------------------
# Define a conditional. # Define a conditional.
#
# FIXME: Once using 2.50, use this:
# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_DEFUN([AM_CONDITIONAL], AC_DEFUN([AM_CONDITIONAL],
[ifelse([$1], [TRUE], [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[errprint(__file__:__line__: [$0: invalid condition: $1 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
])dnl
m4exit(1)])dnl
ifelse([$1], [FALSE],
[errprint(__file__:__line__: [$0: invalid condition: $1
])dnl
m4exit(1)])dnl
AC_SUBST([$1_TRUE]) AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE]) AC_SUBST([$1_FALSE])
if $2; then if $2; then
@ -593,10 +890,32 @@ if $2; then
else else
$1_TRUE='#' $1_TRUE='#'
$1_FALSE= $1_FALSE=
fi]) fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.])
fi])])
# serial 1 # Copyright 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
AC_DEFUN([AM_C_PROTOTYPES], AC_DEFUN([AM_C_PROTOTYPES],
[AC_REQUIRE([AM_PROG_CC_STDC]) [AC_REQUIRE([AM_PROG_CC_STDC])
@ -617,8 +936,27 @@ AC_SUBST(U)dnl
AC_SUBST(ANSI2KNR)dnl AC_SUBST(ANSI2KNR)dnl
]) ])
AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
# serial 1
# Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# @defmac AC_PROG_CC_STDC # @defmac AC_PROG_CC_STDC
# @maindex PROG_CC_STDC # @maindex PROG_CC_STDC
@ -706,3 +1044,5 @@ case "x$am_cv_prog_cc_stdc" in
esac esac
]) ])
AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])

View File

@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Makefile.in generated by automake 1.7.7 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -13,82 +14,79 @@
@SET_MAKE@ @SET_MAKE@
#AUTOMAKE_OPTIONS = ../ansi2knr #no-dependencies
SHELL = @SHELL@
srcdir = @srcdir@ srcdir = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
ACLOCAL = @ACLOCAL@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ install_sh_DATA = $(install_sh) -c -m 644
INSTALL_DATA = @INSTALL_DATA@ install_sh_PROGRAM = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@ install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA) INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = $(program_transform_name)
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@ build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@ target_triplet = @target@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AUTOKEY = @AUTOKEY@ ARLIB_DIR = @ARLIB_DIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@ CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@ CLKTEST = @CLKTEST@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@ DCFD = @DCFD@
DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@ EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@ EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@ LIBPARSE = @LIBPARSE@
LIBRSAREF = @LIBRSAREF@ LIBS = @LIBS@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@ MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@ MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@ MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@ MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
MAKE_LIBRSAREF = @MAKE_LIBRSAREF@ MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@ MAKE_NTPTIME = @MAKE_NTPTIME@
MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@ MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@ MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@ MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
@ -96,21 +94,65 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@ OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@ OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@ PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@ PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@ PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
RSADIR = @RSADIR@ READLINE_LIBS = @READLINE_LIBS@
RSAOBJS = @RSAOBJS@ SET_MAKE = @SET_MAKE@
RSAREF = @RSAREF@ SHELL = @SHELL@
RSASRCS = @RSASRCS@ STRIP = @STRIP@
TESTDCF = @TESTDCF@ TESTDCF = @TESTDCF@
U = @U@ U = @U@
VERSION = @VERSION@ VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
#AUTOMAKE_OPTIONS = ../ansi2knr #no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr AUTOMAKE_OPTIONS = ../util/ansi2knr
bin_PROGRAMS = @MAKE_ADJTIMED@ bin_PROGRAMS = @MAKE_ADJTIMED@
EXTRA_PROGRAMS = adjtimed EXTRA_PROGRAMS = adjtimed
@ -119,6 +161,7 @@ LDADD = ../libntp/libntp.a
#EXTRA_DIST = TAGS #EXTRA_DIST = TAGS
ETAGS_ARGS = Makefile.am ETAGS_ARGS = Makefile.am
subdir = adjtimed subdir = adjtimed
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
@ -132,19 +175,16 @@ adjtimed_LDADD = $(LDADD)
adjtimed_DEPENDENCIES = ../libntp/libntp.a adjtimed_DEPENDENCIES = ../libntp/libntp.a
adjtimed_LDFLAGS = adjtimed_LDFLAGS =
DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/adjtimed$U.Po am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/adjtimed$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = adjtimed.c DIST_SOURCES = adjtimed.c
DIST_COMMON = README Makefile.am Makefile.in DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
SOURCES = adjtimed.c SOURCES = adjtimed.c
all: all-am all: all-am
@ -155,9 +195,8 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \ cd $(top_srcdir) && \
$(AUTOMAKE) --gnu adjtimed/Makefile $(AUTOMAKE) --gnu adjtimed/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
CONFIG_HEADERS= CONFIG_LINKS= \ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
install-binPROGRAMS: $(bin_PROGRAMS) install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(bindir)
@ -165,16 +204,16 @@ install-binPROGRAMS: $(bin_PROGRAMS)
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \ if test -f $$p \
; then \ ; then \
f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
else :; fi; \ else :; fi; \
done done
uninstall-binPROGRAMS: uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; for p in $$list; do \ @list='$(bin_PROGRAMS)'; for p in $$list; do \
f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
rm -f $(DESTDIR)$(bindir)/$$f; \ rm -f $(DESTDIR)$(bindir)/$$f; \
done done
@ -196,77 +235,115 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr: mostlyclean-kr:
-rm -f *_.c -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$U.Po@am__quote@
distclean-depend:
-rm -rf $(DEPDIR)
.c.o: .c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$< @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj: .c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
$(COMPILE) -c `cygpath -w $<` @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
CCDEPMODE = @CCDEPMODE@ @am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
adjtimed_.c: adjtimed.c $(ANSI2KNR) 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) > adjtimed_.c || rm -f adjtimed_.c $(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) : $(ANSI2KNR) adjtimed_.$(OBJEXT) : $(ANSI2KNR)
uninstall-info-am: uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP) mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \ here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP) || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
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; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS: GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \ && cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here && gtags -i $(GTAGS_ARGS) $$here
distclean-tags: distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .. top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES) distdir: $(DISTFILES)
@for file in $(DISTFILES); do \ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
if test -f $$file; then d=.; else d=$(srcdir); fi; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \ dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \ fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|| exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \
@ -279,7 +356,6 @@ all-am: Makefile $(PROGRAMS)
installdirs: installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(bindir)
install: install-am install: install-am
install-exec: install-exec-am install-exec: install-exec-am
install-data: install-data-am install-data: install-data-am
@ -291,6 +367,7 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \ `test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
@ -298,7 +375,7 @@ mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@ -308,9 +385,11 @@ clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-depend \ distclean-am: clean-am distclean-compile distclean-generic \
distclean-generic distclean-tags distclean-tags
dvi: dvi-am dvi: dvi-am
@ -331,6 +410,8 @@ install-man:
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic maintainer-clean-am: distclean-am maintainer-clean-generic
@ -338,18 +419,26 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-am: uninstall-binPROGRAMS uninstall-info-am
.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic distclean distclean-compile distclean-depend \ clean-generic ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am info \ distclean-generic distclean-tags distdir dvi dvi-am info \
info-am install install-am install-binPROGRAMS install-data \ info-am install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \ install-data-am install-exec install-exec-am install-info \
install-info-am install-man install-strip installcheck \ install-info-am install-man install-strip installcheck \
installcheck-am installdirs maintainer-clean \ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \ maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \ mostlyclean-generic mostlyclean-kr pdf pdf-am ps ps-am tags \
uninstall-binPROGRAMS uninstall-info-am uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am
# Tell versions [3.59,3.63) of GNU make to not export all variables. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.

46
contrib/ntp/arlib/COPYING Normal file
View File

@ -0,0 +1,46 @@
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

182
contrib/ntp/arlib/INSTALL Normal file
View File

@ -0,0 +1,182 @@
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

@ -0,0 +1,15 @@
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

@ -0,0 +1,484 @@
# Makefile.in generated by automake 1.7.7 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# 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@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
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 = :
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
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_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@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
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
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
libares_a_AR = $(AR) cru
libares_a_LIBADD =
am_libares_a_OBJECTS = arlib.$(OBJEXT)
libares_a_OBJECTS = $(am_libares_a_OBJECTS)
noinst_PROGRAMS = example$(EXEEXT)
PROGRAMS = $(noinst_PROGRAMS)
am_example_OBJECTS = sample.$(OBJEXT)
example_OBJECTS = $(am_example_OBJECTS)
example_DEPENDENCIES = libares.a
example_LDFLAGS =
DEFAULT_INCLUDES = -I. -I$(srcdir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/arlib.Po ./$(DEPDIR)/sample.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(libares_a_SOURCES) $(example_SOURCES)
HEADERS = $(noinst_HEADERS)
DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.in \
$(srcdir)/configure COPYING INSTALL Makefile.am aclocal.m4 \
configure configure.in depcomp install-sh missing mkinstalldirs
SOURCES = $(libares_a_SOURCES) $(example_SOURCES)
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): configure.in
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
AR = ar
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_LDFLAGS) $(example_OBJECTS) $(example_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT) core *.core
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@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
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; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
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; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
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; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
-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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | 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
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& 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 ../.. && $(mkinstalldirs) "$$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-gzip \
&& rm -f $(distdir).tar.gz \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
distuninstallcheck:
@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_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_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:
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
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: uninstall-info-am
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-noinstLIBRARIES clean-noinstPROGRAMS ctags dist dist-all \
dist-gzip distcheck distclean distclean-compile \
distclean-generic distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man 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 uninstall-info-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:

49
contrib/ntp/arlib/README Normal file
View File

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

@ -0,0 +1,32 @@
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

835
contrib/ntp/arlib/aclocal.m4 vendored Normal file
View File

@ -0,0 +1,835 @@
# generated automatically by aclocal 1.7.7 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
# This file 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.
# Do all the work for Automake. -*- Autoconf -*-
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 10
AC_PREREQ([2.54])
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
# the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_MISSING_PROG(AMTAR, tar)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
])
])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$1 | $1:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.7.7])])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright 2001, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
#
# Check to make sure that the build environment is sane.
#
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# -*- Autoconf -*-
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 3
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# AM_AUX_DIR_EXPAND
# Copyright 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
# Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])
AC_DEFUN([AM_AUX_DIR_EXPAND], [
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
# Copyright 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# AM_PROG_INSTALL_STRIP
# Copyright 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# -*- Autoconf -*-
# Copyright (C) 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 1
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# serial 5 -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
: > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# (even with -Werror). So we grep stderr for any message
# that says an option was ignored.
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#serial 2
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
# Extract the definition of DEP_FILES from the Makefile without
# running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
test -z "$DEPDIR" && continue
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n -e '/^U = / s///p' < "$mf"`
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
# We invoke sed twice because it is the simplest approach to
# changing $(DEPDIR) to its actual value in the expansion.
for file in `sed -n -e '
/^DEP_FILES = .*\\\\$/ {
s/^DEP_FILES = //
:loop
s/\\\\$//
p
n
/\\\\$/ b loop
p
}
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 2
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo done
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote="\""
_am_result=BSD
fi
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# serial 5
AC_PREREQ(2.52)
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])
AC_SUBST([$1_FALSE])
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.])
fi])])

230
contrib/ntp/arlib/arlib.3 Normal file
View File

@ -0,0 +1,230 @@
.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

1056
contrib/ntp/arlib/arlib.c Normal file

File diff suppressed because it is too large Load Diff

29
contrib/ntp/arlib/arlib.h Normal file
View File

@ -0,0 +1,29 @@
/*
* 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

@ -0,0 +1,45 @@
/*
* 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

4424
contrib/ntp/arlib/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
# 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

472
contrib/ntp/arlib/depcomp Executable file
View File

@ -0,0 +1,472 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. This file always lives in the current directory.
# Also, the AIX compiler puts `$object:' at the start of each line;
# $object doesn't have directory information.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0

294
contrib/ntp/arlib/install-sh Executable file
View File

@ -0,0 +1,294 @@
#!/bin/sh
#
# install - install a program, script, or datafile
#
# 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}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$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 $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# 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 [ -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
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}

336
contrib/ntp/arlib/missing Executable file
View File

@ -0,0 +1,336 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

111
contrib/ntp/arlib/mkinstalldirs Executable file
View File

@ -0,0 +1,111 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage" 1>&2
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi
;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# End:
# mkinstalldirs ends here

143
contrib/ntp/arlib/sample.c Normal file
View File

@ -0,0 +1,143 @@
#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

@ -13,6 +13,9 @@ case "$1" in
$KEY) ;; $KEY) ;;
*) *)
echo "Wrong directory for build on host $IAM" echo "Wrong directory for build on host $IAM"
echo "This is <`pwd`>"
echo "SIG is <$SIG>"
echo "KEY is <$KEY>"
exit 1 exit 1
;; ;;
esac esac
@ -51,7 +54,7 @@ case "$CONFIG_ARGS" in
KEYSUF="-autokey" KEYSUF="-autokey"
;; ;;
*--without-crypto*) *--without-crypto*)
[ -d rsaref2 ] && KEYSUF="-norsaref" KEYSUF="-noopenssl"
;; ;;
esac esac

View File

@ -1,6 +1,7 @@
# Makefile.in generated automatically by automake 1.5 from Makefile.am. # Makefile.in generated by automake 1.7.7 from Makefile.am.
# @configure_input@
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation # This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it, # gives unlimited permission to copy and/or distribute it,
@ -13,82 +14,79 @@
@SET_MAKE@ @SET_MAKE@
#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
SHELL = @SHELL@
srcdir = @srcdir@ srcdir = @srcdir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@ pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
ACLOCAL = @ACLOCAL@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ install_sh_DATA = $(install_sh) -c -m 644
INSTALL_DATA = @INSTALL_DATA@ install_sh_PROGRAM = $(install_sh) -c
INSTALL_SCRIPT = @INSTALL_SCRIPT@ install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA) INSTALL_HEADER = $(INSTALL_DATA)
transform = @program_transform_name@ transform = $(program_transform_name)
NORMAL_INSTALL = : NORMAL_INSTALL = :
PRE_INSTALL = : PRE_INSTALL = :
POST_INSTALL = : POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@ build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@ host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@ target_triplet = @target@
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
AUTOKEY = @AUTOKEY@ ARLIB_DIR = @ARLIB_DIR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
CHUTEST = @CHUTEST@ CHUTEST = @CHUTEST@
CLKTEST = @CLKTEST@ CLKTEST = @CLKTEST@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DCFD = @DCFD@ DCFD = @DCFD@
DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EF_LIBS = @EF_LIBS@ EF_LIBS = @EF_LIBS@
EF_PROGS = @EF_PROGS@ EF_PROGS = @EF_PROGS@
EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LCRYPTO = @LCRYPTO@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBPARSE = @LIBPARSE@ LIBPARSE = @LIBPARSE@
LIBRSAREF = @LIBRSAREF@ LIBS = @LIBS@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MAKE_ADJTIMED = @MAKE_ADJTIMED@ MAKE_ADJTIMED = @MAKE_ADJTIMED@
MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@ MAKE_CHECK_Y2K = @MAKE_CHECK_Y2K@
MAKE_LIBNTPSIM = @MAKE_LIBNTPSIM@
MAKE_LIBPARSE = @MAKE_LIBPARSE@ MAKE_LIBPARSE = @MAKE_LIBPARSE@
MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@ MAKE_LIBPARSE_KERNEL = @MAKE_LIBPARSE_KERNEL@
MAKE_LIBRSAREF = @MAKE_LIBRSAREF@ MAKE_NTPDSIM = @MAKE_NTPDSIM@
MAKE_NTPTIME = @MAKE_NTPTIME@ MAKE_NTPTIME = @MAKE_NTPTIME@
MAKE_NTP_GENKEYS = @MAKE_NTP_GENKEYS@ MAKE_NTP_KEYGEN = @MAKE_NTP_KEYGEN@
MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@ MAKE_PARSEKMODULE = @MAKE_PARSEKMODULE@
MAKE_SNTP = @MAKE_SNTP@
MAKE_TICKADJ = @MAKE_TICKADJ@ MAKE_TICKADJ = @MAKE_TICKADJ@
MAKE_TIMETRIM = @MAKE_TIMETRIM@ MAKE_TIMETRIM = @MAKE_TIMETRIM@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
@ -96,21 +94,65 @@ OPENSSL = @OPENSSL@
OPENSSL_INC = @OPENSSL_INC@ OPENSSL_INC = @OPENSSL_INC@
OPENSSL_LIB = @OPENSSL_LIB@ OPENSSL_LIB = @OPENSSL_LIB@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_PERL = @PATH_PERL@ PATH_PERL = @PATH_PERL@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_SH = @PATH_SH@ PATH_SH = @PATH_SH@
PROPDELAY = @PROPDELAY@ PROPDELAY = @PROPDELAY@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
RSADIR = @RSADIR@ READLINE_LIBS = @READLINE_LIBS@
RSAOBJS = @RSAOBJS@ SET_MAKE = @SET_MAKE@
RSAREF = @RSAREF@ SHELL = @SHELL@
RSASRCS = @RSASRCS@ STRIP = @STRIP@
TESTDCF = @TESTDCF@ TESTDCF = @TESTDCF@
U = @U@ U = @U@
VERSION = @VERSION@ VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
#AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies
AUTOMAKE_OPTIONS = ../util/ansi2knr AUTOMAKE_OPTIONS = ../util/ansi2knr
noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@ noinst_PROGRAMS = @PROPDELAY@ @CHUTEST@ @CLKTEST@
EXTRA_PROGRAMS = propdelay chutest clktest EXTRA_PROGRAMS = propdelay chutest clktest
@ -122,6 +164,7 @@ chutest_LDADD = ../libntp/libntp.a
clktest_LDADD = ../libntp/libntp.a clktest_LDADD = ../libntp/libntp.a
ETAGS_ARGS = Makefile.am ETAGS_ARGS = Makefile.am
subdir = clockstuff subdir = clockstuff
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
@ -142,20 +185,17 @@ propdelay_OBJECTS = propdelay$U.$(OBJEXT)
propdelay_DEPENDENCIES = propdelay_DEPENDENCIES =
propdelay_LDFLAGS = propdelay_LDFLAGS =
DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/chutest$U.Po $(DEPDIR)/clktest$U.Po \ am__depfiles_maybe = depfiles
@AMDEP_TRUE@ $(DEPDIR)/propdelay$U.Po @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/chutest$U.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/clktest$U.Po ./$(DEPDIR)/propdelay$U.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC) CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = chutest.c clktest.c propdelay.c DIST_SOURCES = chutest.c clktest.c propdelay.c
DIST_COMMON = README Makefile.am Makefile.in DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
SOURCES = chutest.c clktest.c propdelay.c SOURCES = chutest.c clktest.c propdelay.c
all: all-am all: all-am
@ -166,9 +206,7 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \ cd $(top_srcdir) && \
$(AUTOMAKE) --gnu clockstuff/Makefile $(AUTOMAKE) --gnu clockstuff/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
clean-noinstPROGRAMS: clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
@ -187,84 +225,122 @@ ANSI2KNR = ../util/ansi2knr
cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr cd ../util && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
mostlyclean-kr: mostlyclean-kr:
-rm -f *_.c -test "$U" = "" || rm -f *_.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/chutest$U.Po@am__quote@ @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)/clktest$U.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/propdelay$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propdelay$U.Po@am__quote@
distclean-depend:
-rm -rf $(DEPDIR)
.c.o: .c.o:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
$(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$< @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
@am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
.c.obj: .c.obj:
@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
$(COMPILE) -c `cygpath -w $<` @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
CCDEPMODE = @CCDEPMODE@ @am__fastdepCC_TRUE@ fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
chutest_.c: chutest.c $(ANSI2KNR) 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) > chutest_.c || rm -f chutest_.c $(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) 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) > clktest_.c || rm -f clktest_.c $(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) 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) > propdelay_.c || rm -f propdelay_.c $(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) clktest_.$(OBJEXT) propdelay_.$(OBJEXT) : \ chutest_.$(OBJEXT) clktest_.$(OBJEXT) propdelay_.$(OBJEXT) : \
$(ANSI2KNR) $(ANSI2KNR)
uninstall-info-am: uninstall-info-am:
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
mkid -fID $$unique $(LISP) mkid -fID $$unique
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP) $(TAGS_FILES) $(LISP)
tags=; \ tags=; \
here=`pwd`; \ here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \ unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \ done | \
$(AWK) ' { files[$$0] = 1; } \ $(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \ END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP) || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
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; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS: GTAGS:
here=`CDPATH=: && cd $(top_builddir) && pwd` \ here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \ && cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here && gtags -i $(GTAGS_ARGS) $$here
distclean-tags: distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .. top_distdir = ..
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES) distdir: $(DISTFILES)
@for file in $(DISTFILES); do \ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
if test -f $$file; then d=.; else d=$(srcdir); fi; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
$(mkinstalldirs) "$(distdir)/$$dir"; \ dir="/$$dir"; \
$(mkinstalldirs) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \ fi; \
if test -d $$d/$$file; then \ if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|| exit 1; \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \ else \
test -f $(distdir)/$$file \ test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \
@ -276,7 +352,6 @@ check: check-am
all-am: Makefile $(PROGRAMS) all-am: Makefile $(PROGRAMS)
installdirs: installdirs:
install: install-am install: install-am
install-exec: install-exec-am install-exec: install-exec-am
install-data: install-data-am install-data: install-data-am
@ -288,6 +363,7 @@ install-am: all-am
installcheck: installcheck-am installcheck: installcheck-am
install-strip: install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \ `test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic: mostlyclean-generic:
@ -295,7 +371,7 @@ mostlyclean-generic:
clean-generic: clean-generic:
distclean-generic: distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* -rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@ -305,9 +381,11 @@ clean: clean-am
clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-depend \ distclean-am: clean-am distclean-compile distclean-generic \
distclean-generic distclean-tags distclean-tags
dvi: dvi-am dvi: dvi-am
@ -328,6 +406,8 @@ install-man:
installcheck-am: installcheck-am:
maintainer-clean: maintainer-clean-am maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic maintainer-clean-am: distclean-am maintainer-clean-generic
@ -335,17 +415,25 @@ mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-am: uninstall-info-am
.PHONY: GTAGS all all-am check check-am clean clean-generic \ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-noinstPROGRAMS distclean distclean-compile \ clean-noinstPROGRAMS ctags distclean distclean-compile \
distclean-depend distclean-generic distclean-tags distdir dvi \ distclean-generic distclean-tags distdir dvi dvi-am info \
dvi-am info info-am install install-am install-data \ info-am install install-am install-data install-data-am \
install-data-am install-exec install-exec-am install-info \ install-exec install-exec-am install-info install-info-am \
install-info-am install-man install-strip installcheck \ install-man install-strip installcheck installcheck-am \
installcheck-am installdirs maintainer-clean \ installdirs maintainer-clean maintainer-clean-generic \
maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-generic mostlyclean-kr tags uninstall uninstall-am \ mostlyclean-kr pdf pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-info-am uninstall-info-am
#EXTRA_DIST = TAGS #EXTRA_DIST = TAGS

99
contrib/ntp/compile Executable file
View File

@ -0,0 +1,99 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
# Copyright 1999, 2000 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Usage:
# compile PROGRAM [ARGS]...
# `-o FOO.o' is removed from the args passed to the actual compile.
prog=$1
shift
ofile=
cfile=
args=
while test $# -gt 0; do
case "$1" in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we do something ugly here.
ofile=$2
shift
case "$ofile" in
*.o | *.obj)
;;
*)
args="$args -o $ofile"
ofile=
;;
esac
;;
*.c)
cfile=$1
args="$args $1"
;;
*)
args="$args $1"
;;
esac
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$prog" $args
fi
# Name of file we expect compiler to create.
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir $lockdir > /dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir $lockdir; exit 1" 1 2 15
# Run the compile.
"$prog" $args
status=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
fi
rmdir $lockdir
exit $status

View File

@ -7,11 +7,7 @@ anything good if run on machines other than their native spot, so don't
just blindly copy something and put it up. Additional information can just blindly copy something and put it up. Additional information can
be found in the ./doc directory of the base directory. be found in the ./doc directory of the base directory.
See the Config.local.dist file in the base directory for an explanation Included also are example public key and symmetric key files produced
of the defines used. by the ntp-genkeys program with names prefixed by ntpkey. These are
ordinarily kept in /usr/local/etc and used by the Autokey scheme. See
The files Config.* are used to generate fullblown binaries suitable for the authopt.htm pnd genkeys.htm ages for further information.
distribution with the systems shown as suffix. While this can result
in some degree of useless code, the degree is small compared to the
size of the baseline code. The files *.conf are representative NTP
run-time configuration files, which normally live in /etc/ntp.conf.

View File

@ -1,34 +1,10 @@
# #
# NTP configuration file (ntp.conf) # NTP manycast configuration file (ntp.conf) for DCnet hosts
# baldwin.udel.edu
# #
# This illustrates the use of an external clock with the local clock # Note that the .rnd random seed file must pe in the root
# driver, as well as a multicast server. The prefer keyword on the # directory and the public and private keys in /usr/local/etc.
# local clock driver declares an external clock and that the time of
# this server should not be wiggled by an NTP peer, unless the
# external source comes unstuck. Note the use of the multicast group
# ID assigned to NTP, 224.0.1.1, which identifies this as a multicast
# server rather than a broadcast one. The other NTP peers are known
# stratum-1 chimes intended as backup should the external clock croak.
# #
server 127.127.1.0 prefer # local clock driver manycastclient 239.1.1.1 autokey maxpoll 12
broadcast 224.0.1.1 key 6 ttl 127 manycastserver 239.1.1.1
peer rackety.udel.edu crypto randfile /.rnd # enable public key
peer barnstable.udel.edu driftfile /etc/ntp.drift # path for drift file
peer mizbeaver.udel.edu
peer pogo.udel.edu
#
# Miscellaneous stuff
#
driftfile /etc/ntp.drift # path for drift file
statsdir /baldwin/ntpstats/ # directory for statistics files
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
#
# Authentication stuff
#
keys /usr/local/etc/ntp.keys # path for keys file
trustedkey 3 4 5 6 14 15 # define trusted keys
requestkey 15 # key (7) for accessing server variables
controlkey 15 # key (6) for accessing server variables

View File

@ -5,7 +5,7 @@
server 127.127.11.1 prefer # Arbiter 1088 GPS receiver server 127.127.11.1 prefer # Arbiter 1088 GPS receiver
fudge 127.127.11.1 time1 .00487 flag1 1 flag4 1 fudge 127.127.11.1 time1 .00487 flag1 1 flag4 1
server 127.127.22.1 minpoll 4 # PPS quick poll server 127.127.22.1 minpoll 4 # PPS quick poll
fudge 127.127.22.1 # use PLL/FLL loop fudge 127.127.22.1 # default use PLL/FLL loop
broadcast 128.4.2.255 key 5 # brpadcast on LAN shared key broadcast 128.4.2.255 key 5 # brpadcast on LAN shared key
broadcast 239.1.1.2 autokey # multicast on WAN autokey broadcast 239.1.1.2 autokey # multicast on WAN autokey

View File

@ -4,7 +4,7 @@
# This is for a broadcast/multicast client. Except for the statistics # This is for a broadcast/multicast client. Except for the statistics
# stuff, this can be done with only a commmand line of the form # stuff, this can be done with only a commmand line of the form
# #
# /usr/local/bin/xntpd -a -k /usr/local/bin/ntp.keys -m -t 3 # /usr/local/bin/ntpd -a -k /usr/local/bin/ntp.keys -m -t 3
# #
multicastclient # listen on default 224.0.1.1 multicastclient # listen on default 224.0.1.1
# #

View File

@ -30,18 +30,7 @@ restrict 140.173.0.0 mask 255.255.0.0 # allow DARTnet/CAIRN clients
# #
# Authentication stuff # Authentication stuff
# #
# Local filesystem crypto # enable public key
# /etc/ntpkey -> ntpkey.3171396491
# /etc/ntpkey.3171396491
#
# NFS mounted filesystem
# /usr/local/etc/ntpkey -> /etc/ntpkey
# /usr/local/etc/ntpkey_dh -> ntpkey_dh.3171396491
# /usr/local/etc/ntpkey_dh.3171396491
# /usr/local/etc/ntpkey_pogo.udel.edu -> ntpkey_pogo.udel.edu.3171396491
# /usr/local/etc/ntpkey_pogo.udel.edu.3171396491
#
crypto privatekey /etc/ntpkey # enable public key
keys /usr/local/etc/ntp.keys # path for keys file keys /usr/local/etc/ntp.keys # path for keys file
trustedkey 3 4 5 14 # define trusted keys trustedkey 3 4 5 14 # define trusted keys
requestkey 14 # key (7) for accessing server variables requestkey 14 # key (7) for accessing server variables
@ -52,4 +41,4 @@ controlkey 14 # key (6) for accessing server variables
driftfile /etc/ntp.drift # path for drift file driftfile /etc/ntp.drift # path for drift file
statsdir /var/spool/ntpstats/ # directory for statistics files statsdir /var/spool/ntpstats/ # directory for statistics files
filegen loopstats file loopstats type day enable filegen loopstats file loopstats type day enable
filegen cryptostats file cryptostats type day enable

View File

@ -2,6 +2,14 @@
# NTP configuration file (ntp.conf) # NTP configuration file (ntp.conf)
# SunOS rackety.u 4.1.3 243 sun4c # SunOS rackety.u 4.1.3 243 sun4c
# #
# This is for a dedicated primary server connected to four reference
# clocks and providing service via multicast, broadcast, manycast and
# the usual suspects. It blocks previous versions and limits clients
# per network to two and returnd a kiss-of-death packet if the
# sender is blocked. Note that the precise fudge factors were
# determined using the calibrate feature and that the kernel PPS
# discipline is selected.
#
server 127.127.4.0 prefer # Spectracom GPS receiver #1 server 127.127.4.0 prefer # Spectracom GPS receiver #1
fudge 127.127.4.0 refid GPS1 time1 -.000097 flag1 1 fudge 127.127.4.0 refid GPS1 time1 -.000097 flag1 1
server 127.127.4.1 # Spectracom GPS receiver #2 server 127.127.4.1 # Spectracom GPS receiver #2
@ -24,7 +32,7 @@ manycastserver 239.1.1.1 # manycast
# #
# Access controls # Access controls
# #
restrict default limited # default limit clients per net restrict default limited version kod # default limit clients per net
restrict 127.0.0.1 # allow local host restrict 127.0.0.1 # allow local host
restrict 128.4.0.0 mask 255.255.0.0 # allow DCnet clients restrict 128.4.0.0 mask 255.255.0.0 # allow DCnet clients
restrict 128.175.0.0 mask 255.255.0.0 # allow UDELnet clients restrict 128.175.0.0 mask 255.255.0.0 # allow UDELnet clients

View File

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Attempt to guess a canonical system name. # Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# Free Software Foundation, Inc. # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2001-08-21' timestamp='2003-07-02'
# This file is free software; you can redistribute it and/or modify it # 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 # under the terms of the GNU General Public License as published by
@ -24,8 +24,9 @@ timestamp='2001-08-21'
# configuration script generated by Autoconf, you may include it under # configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program. # the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>. # Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. # Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# #
# This script attempts to guess a canonical system name similar to # This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and # config.sub. If it succeeds, it prints the system name on stdout, and
@ -87,30 +88,42 @@ if test $# != 0; then
exit 1 exit 1
fi fi
trap 'exit 1' 1 2 15
dummy=dummy-$$ # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# CC_FOR_BUILD -- compiler used by this script.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated. # use `HOST_CC' if defined, but it is deprecated.
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in # Portable tmp directory creation inspired by the Autoconf team.
,,) echo "int dummy(){}" > $dummy.c ;
for c in cc gcc c89 ; do set_cc_for_build='
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
if test $? = 0 ; then 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" ; } ||
{ 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 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ; CC_FOR_BUILD="$c"; break ;
fi ; fi ;
done ; done ;
rm -f $dummy.c $dummy.o $dummy.rel ;
if test x"$CC_FOR_BUILD" = x ; then if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ; CC_FOR_BUILD=no_compiler_found ;
fi fi
;; ;;
,,*) CC_FOR_BUILD=$CC ;; ,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac' esac ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24) # (ghazi@noc.rutgers.edu 1994-08-24)
@ -127,29 +140,30 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*) *:NetBSD:*:*)
# Netbsd (nbsd) targets should (where applicable) match one or # NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old # switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward # object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the # compatibility and a consistent mechanism for selecting the
# object file format. # object file format.
# Determine the machine/vendor (is the vendor relevant). #
case "${UNAME_MACHINE}" in # Note: NetBSD doesn't particularly care about the vendor
amiga) machine=m68k-unknown ;; # portion of the name. We always set it to "unknown".
arm32) machine=arm-unknown ;; sysctl="sysctl -n hw.machine_arch"
atari*) machine=m68k-atari ;; UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
sun3*) machine=m68k-sun ;; /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
mac68k) machine=m68k-apple ;; case "${UNAME_MACHINE_ARCH}" in
macppc) machine=powerpc-apple ;; armeb) machine=armeb-unknown ;;
hp3[0-9][05]) machine=m68k-hp ;; arm*) machine=arm-unknown ;;
ibmrt|romp-ibm) machine=romp-ibm ;; sh3el) machine=shl-unknown ;;
*) machine=${UNAME_MACHINE}-unknown ;; sh3eb) machine=sh-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac esac
# The Operating System including object format, if it has switched # The Operating System including object format, if it has switched
# to ELF recently, or will in the future. # to ELF recently, or will in the future.
case "${UNAME_MACHINE}" in case "${UNAME_MACHINE_ARCH}" in
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null | grep __ELF__ >/dev/null
@ -166,75 +180,112 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;; ;;
esac esac
# The OS release # The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form: # contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}" echo "${machine}-${os}${release}"
exit 0 ;; exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
macppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mipseb-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*) alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
fi fi
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Vn.n version is a released version. # A Vn.n version is a released version.
# A Tn.n version is a released field test version. # A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel. # A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r. # 1.2 uses "1.2" for uname -r.
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
eval $set_cc_for_build
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
1-0)
UNAME_MACHINE="alphaev5"
;;
1-1)
UNAME_MACHINE="alphaev56"
;;
1-101)
UNAME_MACHINE="alphapca56"
;;
2-303)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
2-1307)
UNAME_MACHINE="alphaev68"
;;
esac
fi
rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;; exit 0 ;;
Alpha*:OpenVMS:*:*)
echo alpha-hp-vms
exit 0 ;;
Alpha\ *:Windows_NT*:*) Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem? # 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 # Should we change UNAME_MACHINE based on the output of uname instead
@ -247,29 +298,11 @@ EOF
Amiga*:UNIX_System_V:4.0:*) Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4 echo m68k-unknown-sysv4
exit 0;; exit 0;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:[Aa]miga[Oo][Ss]:*:*) *:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos echo ${UNAME_MACHINE}-unknown-amigaos
exit 0 ;; exit 0 ;;
arc64:OpenBSD:*:*) *:[Mm]orph[Oo][Ss]:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-morphos
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
hkmips:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sgi:OpenBSD:*:*)
echo mips-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:OS/390:*:*) *:OS/390:*:*)
echo i370-ibm-openedition echo i370-ibm-openedition
@ -291,6 +324,13 @@ EOF
NILE*:*:*:dcosx) NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4 echo pyramid-pyramid-svr4
exit 0 ;; exit 0 ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
esac ;;
sun4H:SunOS:5.*:*) sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;; exit 0 ;;
@ -319,7 +359,7 @@ EOF
echo m68k-sun-sunos${UNAME_RELEASE} echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
sun*:*:4.2BSD:*) sun*:*:4.2BSD:*)
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in case "`/bin/arch`" in
sun3) sun3)
@ -333,12 +373,6 @@ EOF
aushp:SunOS:*:*) aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE} echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
sparc*:NetBSD:*)
echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
# The situation for MiNT is a little confusing. The machine name # The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not # can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor # "atarist" or "atariste" at least should have a processor
@ -365,18 +399,6 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE} echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*) powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE} echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -393,6 +415,7 @@ EOF
echo clipper-intergraph-clix${UNAME_RELEASE} echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos) mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus #ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */ #include <stdio.h> /* for printf() prototype */
@ -414,16 +437,20 @@ EOF
exit (-1); exit (-1);
} }
EOF EOF
eval $set_cc_for_build $CC_FOR_BUILD -o $dummy $dummy.c \
$CC_FOR_BUILD $dummy.c -o $dummy \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0
&& rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo mips-mips-riscos${UNAME_RELEASE} echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
Motorola:PowerMAX_OS:*:*) Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax echo powerpc-motorola-powermax
exit 0 ;; exit 0 ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit 0 ;;
Night_Hawk:Power_UNIX:*:*) Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix echo powerpc-harris-powerunix
exit 0 ;; exit 0 ;;
@ -484,6 +511,7 @@ EOF
exit 0 ;; exit 0 ;;
*:AIX:2:3) *:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h> #include <sys/systemcfg.h>
@ -495,9 +523,7 @@ EOF
exit(0); exit(0);
} }
EOF EOF
eval $set_cc_for_build $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo rs6000-ibm-aix3.2.5 echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4 echo rs6000-ibm-aix3.2.4
@ -506,7 +532,7 @@ EOF
fi fi
exit 0 ;; exit 0 ;;
*:AIX:*:[45]) *:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` 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 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000 IBM_ARCH=rs6000
else else
@ -546,10 +572,8 @@ EOF
9000/31? ) HP_ARCH=m68000 ;; 9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;; 9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9]) 9000/[678][0-9][0-9])
case "${HPUX_REV}" in if [ -x /usr/bin/getconf ]; then
11.[0-9][0-9]) sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
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` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
@ -558,12 +582,13 @@ EOF
case "${sc_kernel_bits}" in case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;; 32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;; 64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;; esac ;;
esac esac
fi ;; fi
esac if [ "${HP_ARCH}" = "" ]; then
if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE #define _HPUX_SOURCE
#include <stdlib.h> #include <stdlib.h>
@ -596,12 +621,21 @@ EOF
exit (0); exit (0);
} }
EOF EOF
eval $set_cc_for_build (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi fi ;;
rm -f $dummy.c $dummy
fi ;;
esac esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
# avoid double evaluation of $set_cc_for_build
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
HP_ARCH="hppa64"
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV} echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;; exit 0 ;;
ia64:HP-UX:*:*) ia64:HP-UX:*:*)
@ -609,6 +643,7 @@ EOF
echo ia64-hp-hpux${HPUX_REV} echo ia64-hp-hpux${HPUX_REV}
exit 0 ;; exit 0 ;;
3050*:HI-UX:*:*) 3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c sed 's/^ //' << EOF >$dummy.c
#include <unistd.h> #include <unistd.h>
int int
@ -634,9 +669,7 @@ EOF
exit (0); exit (0);
} }
EOF EOF
eval $set_cc_for_build $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo unknown-hitachi-hiuxwe2 echo unknown-hitachi-hiuxwe2
exit 0 ;; exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@ -664,9 +697,6 @@ EOF
parisc*:Lites*:*:*) parisc*:Lites*:*:*)
echo hppa1.1-hp-lites echo hppa1.1-hp-lites
exit 0 ;; exit 0 ;;
hppa*:OpenBSD:*:*)
echo hppa-unknown-openbsd
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd echo c1-convex-bsd
exit 0 ;; exit 0 ;;
@ -685,9 +715,6 @@ EOF
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd echo c4-convex-bsd
exit 0 ;; exit 0 ;;
CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*) CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
@ -700,27 +727,21 @@ EOF
CRAY*TS:*:*:*) CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
CRAY*T3D:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3E:*:*:*) CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
CRAY*SV1:*:*:*) CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
CRAY-2:*:*:*) *:UNICOS/mp:*:*)
echo cray2-cray-unicos echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;; exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;; exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -730,11 +751,22 @@ EOF
*:BSD/OS:*:*) *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:FreeBSD:*:*) *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` # Determine whether the default compiler uses glibc.
exit 0 ;; eval $set_cc_for_build
*:OpenBSD:*:*) sed 's/^ //' << EOF >$dummy.c
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` #include <features.h>
#if __GLIBC__ >= 2
LIBC=gnu
#else
LIBC=
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
# GNU/FreeBSD systems have a "k" prefix to indicate we are using
# FreeBSD's kernel, but not the complete OS.
case ${LIBC} in gnu) kernel_only='k' ;; esac
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;; exit 0 ;;
i*:CYGWIN*:*) i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin echo ${UNAME_MACHINE}-pc-cygwin
@ -745,11 +777,17 @@ EOF
i*:PW*:*) i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32 echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;; exit 0 ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*) i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem? # 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 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386? # UNAME_MACHINE based on the output of uname instead of i386?
echo i386-pc-interix echo i586-pc-interix
exit 0 ;; exit 0 ;;
i*:UWIN*:*) i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin echo ${UNAME_MACHINE}-pc-uwin
@ -769,17 +807,52 @@ EOF
arm*:Linux:*:*) arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;; exit 0 ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit 0 ;;
ia64:Linux:*:*) ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;; exit 0 ;;
m68*:Linux:*:*) m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;; exit 0 ;;
mips:Linux:*:*) mips:Linux:*:*)
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in eval $set_cc_for_build
big) echo mips-unknown-linux-gnu && exit 0 ;; sed 's/^ //' << EOF >$dummy.c
little) echo mipsel-unknown-linux-gnu && exit 0 ;; #undef CPU
esac #undef mips
#undef mipsel
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
#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 0
;;
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 0
;; ;;
ppc:Linux:*:*) ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu echo powerpc-unknown-linux-gnu
@ -815,6 +888,9 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*) s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;; exit 0 ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
sh*:Linux:*:*) sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;; exit 0 ;;
@ -828,7 +904,8 @@ EOF
# The BFD linker knows what the default object file format is, so # 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 # 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. # problems with other programs or directories called `ld' in the path.
ld_supported_targets=`cd /; ld --help 2>&1 \ # 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 | sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g s/[ ][ ]*/ /g
s/.*supported targets: *// s/.*supported targets: *//
@ -840,7 +917,7 @@ EOF
;; ;;
a.out-i386-linux) a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout" echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0 ;; exit 0 ;;
coff-i386) coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff" echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0 ;; exit 0 ;;
@ -851,33 +928,29 @@ EOF
exit 0 ;; exit 0 ;;
esac esac
# Determine whether the default compiler is a.out or elf # Determine whether the default compiler is a.out or elf
cat >$dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
printf ("%s-pc-linux-gnu\n", argv[1]);
# else
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
# else
printf ("%s-pc-linux-gnulibc1\n", argv[1]);
# endif
#else
printf ("%s-pc-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
EOF
eval $set_cc_for_build eval $set_cc_for_build
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 sed 's/^ //' << EOF >$dummy.c
rm -f $dummy.c $dummy #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
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;; ;;
i*86:DYNIX/ptx:4*:*) i*86:DYNIX/ptx:4*:*)
@ -894,6 +967,23 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it. # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;; exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit 0 ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@ -915,22 +1005,19 @@ EOF
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586 && UNAME_MACHINE=i586
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686 && UNAME_MACHINE=i686
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686 && UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else else
echo ${UNAME_MACHINE}-pc-sysv32 echo ${UNAME_MACHINE}-pc-sysv32
fi fi
exit 0 ;; exit 0 ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
pc:*:*:*) pc:*:*:*)
# Left here for compatibility: # Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about # uname -m prints for DJGPP always 'pc', but it prints nothing about
@ -954,9 +1041,15 @@ EOF
# "miniframe" # "miniframe"
echo m68010-convergent-sysv echo m68010-convergent-sysv
exit 0 ;; exit 0 ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit 0 ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit 0 ;;
M68*:*:R3V[567]*:*) M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL='' OS_REL=''
test -r /etc/.relid \ test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@ -973,9 +1066,6 @@ EOF
mc68030:UNIX_System_V:4.*:*) mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4 echo m68k-atari-sysv4
exit 0 ;; exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*) TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE} echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -1047,6 +1137,9 @@ EOF
SX-5:SUPER-UX:*:*) SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE} echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit 0 ;;
Power*:Rhapsody:*:*) Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE} echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
@ -1054,18 +1147,24 @@ EOF
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:Darwin:*:*) *:Darwin:*:*)
echo `uname -p`-apple-darwin${UNAME_RELEASE} case `uname -p` in
*86) UNAME_PROCESSOR=i686 ;;
powerpc) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*) *:procnto*:*:* | *:QNX:[0123456789]*:*)
if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc UNAME_MACHINE=pc
fi fi
echo `uname -p`-${UNAME_MACHINE}-nto-qnx echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:QNX:*:4*) *:QNX:*:4*)
echo i386-pc-qnx echo i386-pc-qnx
exit 0 ;; exit 0 ;;
NSR-[KW]:NONSTOP_KERNEL:*:*) NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE} echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
*:NonStop-UX:*:*) *:NonStop-UX:*:*)
@ -1088,11 +1187,6 @@ EOF
fi fi
echo ${UNAME_MACHINE}-unknown-plan9 echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;; exit 0 ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit 0 ;;
*:TOPS-10:*:*) *:TOPS-10:*:*)
echo pdp10-unknown-tops10 echo pdp10-unknown-tops10
exit 0 ;; exit 0 ;;
@ -1111,14 +1205,15 @@ EOF
*:ITS:*:*) *:ITS:*:*)
echo pdp10-unknown-its echo pdp10-unknown-its
exit 0 ;; exit 0 ;;
i*86:XTS-300:*:STOP) SEI:*:*:SEIUX)
echo ${UNAME_MACHINE}-unknown-stop echo mips-sei-seiux${UNAME_RELEASE}
exit 0 ;; exit 0 ;;
esac esac
#echo '(No uname command or uname output not recognized.)' 1>&2 #echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
eval $set_cc_for_build
cat >$dummy.c <<EOF cat >$dummy.c <<EOF
#ifdef _SEQUENT_ #ifdef _SEQUENT_
# include <sys/types.h> # include <sys/types.h>
@ -1233,9 +1328,7 @@ main ()
} }
EOF EOF
eval $set_cc_for_build $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
# Apollos put the system type in the environment. # Apollos put the system type in the environment.

View File

@ -1,5 +1,4 @@
/* config.h.in. Generated from configure.in by autoheader. */ /* config.h.in. Generated from configure.in by autoheader. */
#undef ULONG_CONST
/* Is adjtime() accurate? */ /* Is adjtime() accurate? */
#undef ADJTIME_IS_ACCURATE #undef ADJTIME_IS_ACCURATE
@ -7,9 +6,6 @@
/* CHU audio/decoder? */ /* CHU audio/decoder? */
#undef AUDIO_CHU #undef AUDIO_CHU
/* Autokey? */
#undef AUTOKEY
/* Declare char *sys_errlist array */ /* Declare char *sys_errlist array */
#undef CHAR_SYS_ERRLIST #undef CHAR_SYS_ERRLIST
@ -157,7 +153,7 @@
/* TrueTime 560 IRIG-B decoder? */ /* TrueTime 560 IRIG-B decoder? */
#undef CLOCK_TT560 #undef CLOCK_TT560
/* Ultralink M320 WWVB receiver */ /* Ultralink M320 WWVB receiver? */
#undef CLOCK_ULINK #undef CLOCK_ULINK
/* USNO modem service */ /* USNO modem service */
@ -283,9 +279,6 @@
/* What is the fallback value for HZ? */ /* What is the fallback value for HZ? */
#undef DEFAULT_HZ #undef DEFAULT_HZ
/* Use DES? */
#undef DES
/* synch TODR hourly? */ /* synch TODR hourly? */
#undef DOSYNCTODR #undef DOSYNCTODR
@ -307,6 +300,9 @@
/* Do we have the CIOGETEV ioctl (SunOS, Linux)? */ /* Do we have the CIOGETEV ioctl (SunOS, Linux)? */
#undef HAVE_CIOGETEV #undef HAVE_CIOGETEV
/* [Use], [/dev/clockctl?] */
#undef HAVE_CLOCKCTL
/* Define to 1 if you have the `clock_gettime' function. */ /* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME #undef HAVE_CLOCK_GETTIME
@ -319,6 +315,12 @@
/* Define to 1 if you have the <errno.h> header file. */ /* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H #undef HAVE_ERRNO_H
/* Define to 1 if you have the `EVP_md2' function. */
#undef HAVE_EVP_MD2
/* Define to 1 if you have the `EVP_mdc2' function. */
#undef HAVE_EVP_MDC2
/* Define to 1 if you have the <fcntl.h> header file. */ /* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H #undef HAVE_FCNTL_H
@ -349,6 +351,9 @@
/* Define to 1 if you have the <ieeefp.h> header file. */ /* Define to 1 if you have the <ieeefp.h> header file. */
#undef HAVE_IEEEFP_H #undef HAVE_IEEEFP_H
/* ISC: Use iflist_sysctl? */
#undef HAVE_IFLIST_SYSCTL
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
@ -367,6 +372,9 @@
/* Do we have the curses library? */ /* Do we have the curses library? */
#undef HAVE_LIBCURSES #undef HAVE_LIBCURSES
/* Do we have the edit library? */
#undef HAVE_LIBEDIT
/* Define to 1 if you have the `elf' library (-lelf). */ /* Define to 1 if you have the `elf' library (-lelf). */
#undef HAVE_LIBELF #undef HAVE_LIBELF
@ -379,6 +387,12 @@
/* Define to 1 if you have the `ld' library (-lld). */ /* Define to 1 if you have the `ld' library (-lld). */
#undef HAVE_LIBLD #undef HAVE_LIBLD
/* Define to 1 if you have the `md' library (-lmd). */
#undef HAVE_LIBMD
/* Define to 1 if you have the `md5' library (-lmd5). */
#undef HAVE_LIBMD5
/* Define to 1 if you have the `mld' library (-lmld). */ /* Define to 1 if you have the `mld' library (-lmld). */
#undef HAVE_LIBMLD #undef HAVE_LIBMLD
@ -409,6 +423,12 @@
/* Define to 1 if you have the <math.h> header file. */ /* Define to 1 if you have the <math.h> header file. */
#undef HAVE_MATH_H #undef HAVE_MATH_H
/* Define to 1 if you have the `MD5Init' function. */
#undef HAVE_MD5INIT
/* Define to 1 if you have the <md5.h> header file. */
#undef HAVE_MD5_H
/* Define to 1 if you have the `memcpy' function. */ /* Define to 1 if you have the `memcpy' function. */
#undef HAVE_MEMCPY #undef HAVE_MEMCPY
@ -457,6 +477,9 @@
/* Define to 1 if you have the <netinfo/ni.h> header file. */ /* Define to 1 if you have the <netinfo/ni.h> header file. */
#undef HAVE_NETINFO_NI_H #undef HAVE_NETINFO_NI_H
/* Define to 1 if you have the <net/if6.h> header file. */
#undef HAVE_NET_IF6_H
/* Define to 1 if you have the <net/if.h> header file. */ /* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H #undef HAVE_NET_IF_H
@ -532,6 +555,9 @@
/* Define to 1 if you have the `setpriority' function. */ /* Define to 1 if you have the `setpriority' function. */
#undef HAVE_SETPRIORITY #undef HAVE_SETPRIORITY
/* Define to 1 if you have the `setrlimit' function. */
#undef HAVE_SETRLIMIT
/* Define to 1 if you have the `setsid' function. */ /* Define to 1 if you have the `setsid' function. */
#undef HAVE_SETSID #undef HAVE_SETSID
@ -565,6 +591,9 @@
/* Define to 1 if you have the `srand48' function. */ /* Define to 1 if you have the `srand48' function. */
#undef HAVE_SRAND48 #undef HAVE_SRAND48
/* Does struct sockaddr_storage have ss_family? */
#undef HAVE_SS_FAMILY_IN_SS
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #undef HAVE_STDINT_H
@ -622,6 +651,9 @@
/* Define to 1 if you have the <sys/clkdefs.h> header file. */ /* Define to 1 if you have the <sys/clkdefs.h> header file. */
#undef HAVE_SYS_CLKDEFS_H #undef HAVE_SYS_CLKDEFS_H
/* Define to 1 if you have the <sys/clockctl.h> header file. */
#undef HAVE_SYS_CLOCKCTL_H
/* Define to 1 if you have the <sys/file.h> header file. */ /* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H #undef HAVE_SYS_FILE_H
@ -631,6 +663,9 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */ /* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H #undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/ipc.h> header file. */
#undef HAVE_SYS_IPC_H
/* Define to 1 if you have the <sys/lock.h> header file. */ /* Define to 1 if you have the <sys/lock.h> header file. */
#undef HAVE_SYS_LOCK_H #undef HAVE_SYS_LOCK_H
@ -664,6 +699,9 @@
/* Define to 1 if you have the <sys/select.h> header file. */ /* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H #undef HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/shm.h> header file. */
#undef HAVE_SYS_SHM_H
/* Define to 1 if you have the <sys/signal.h> header file. */ /* Define to 1 if you have the <sys/signal.h> header file. */
#undef HAVE_SYS_SIGNAL_H #undef HAVE_SYS_SIGNAL_H
@ -691,6 +729,9 @@
/* Define to 1 if you have the <sys/syssgi.h> header file. */ /* Define to 1 if you have the <sys/syssgi.h> header file. */
#undef HAVE_SYS_SYSSGI_H #undef HAVE_SYS_SYSSGI_H
/* Define to 1 if you have the <sys/systune.h> header file. */
#undef HAVE_SYS_SYSTUNE_H
/* Define to 1 if you have the <sys/termios.h> header file. */ /* Define to 1 if you have the <sys/termios.h> header file. */
#undef HAVE_SYS_TERMIOS_H #undef HAVE_SYS_TERMIOS_H
@ -751,6 +792,12 @@
/* Do we have the TIO serial stuff? */ /* Do we have the TIO serial stuff? */
#undef HAVE_TIO_SERIAL_STUFF #undef HAVE_TIO_SERIAL_STUFF
/* Does u_int64_t exist */
#undef HAVE_TYPE_U_INT64_T
/* Does u_int8_t exist */
#undef HAVE_TYPE_U_INT8_T
/* Define to 1 if you have the `umask' function. */ /* Define to 1 if you have the `umask' function. */
#undef HAVE_UMASK #undef HAVE_UMASK
@ -787,6 +834,33 @@
/* Define to 1 if you have the `__ntp_gettime' function. */ /* Define to 1 if you have the `__ntp_gettime' function. */
#undef HAVE___NTP_GETTIME #undef HAVE___NTP_GETTIME
/* Does struct sockaddr_storage have __ss_family? */
#undef HAVE___SS_FAMILY_IN_SS
/* Should we use the IRIG sawtooth filter? */
#undef IRIG_SUCKS
/* ISC: have struct if_laddrconf? */
#undef ISC_PLATFORM_HAVEIF_LADDRCONF
/* ISC: have struct if_laddrreq? */
#undef ISC_PLATFORM_HAVEIF_LADDRREQ
/* ISC: Have struct in6_pktinfo? */
#undef ISC_PLATFORM_HAVEIN6PKTINFO
/* ISC: Have IPv6? */
#undef ISC_PLATFORM_HAVEIPV6
/* ISC: struct sockaddr as sa_len? */
#undef ISC_PLATFORM_HAVESALEN
/* ISC: Need in6addr_any? */
#undef ISC_PLATFORM_NEEDIN6ADDRANY
/* ISC: provide inet_ntop() */
#undef ISC_PLATFORM_NEEDNTOP
/* Does the kernel have an FLL bug? */ /* Does the kernel have an FLL bug? */
#undef KERNEL_FLL_BUG #undef KERNEL_FLL_BUG
@ -805,6 +879,9 @@
/* What is the name of TICK in the kernel? */ /* What is the name of TICK in the kernel? */
#undef K_TICK_NAME #undef K_TICK_NAME
/* Should we align with the NIST lockclock scheme? */
#undef LOCKCLOCK
/* Does the kernel support multicasting IP? */ /* Does the kernel support multicasting IP? */
#undef MCAST #undef MCAST
@ -898,9 +975,6 @@
/* Define if compiler has function prototypes */ /* Define if compiler has function prototypes */
#undef PROTOTYPES #undef PROTOTYPES
/* Public key? */
#undef PUBKEY
/* Does qsort expect to work on "void *" stuff? */ /* Does qsort expect to work on "void *" stuff? */
#undef QSORT_USES_VOID_P #undef QSORT_USES_VOID_P
@ -916,9 +990,6 @@
/* Define as the return type of signal handlers (`int' or `void'). */ /* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE #undef RETSIGTYPE
/* Use RSAREF? */
#undef RSAREF
/* Do we want the SCO clock hacks? */ /* Do we want the SCO clock hacks? */
#undef SCO5_CLOCK #undef SCO5_CLOCK
@ -937,6 +1008,9 @@
/* Slew always? */ /* Slew always? */
#undef SLEWALWAYS #undef SLEWALWAYS
/* *s*printf() functions are char* */
#undef SPRINTF_CHAR
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS #undef STDC_HEADERS
@ -979,6 +1053,9 @@
/* use UDP Wildcard Delivery? */ /* use UDP Wildcard Delivery? */
#undef UDP_WILDCARD_DELIVERY #undef UDP_WILDCARD_DELIVERY
/* How do we create unsigned long constants? */
#undef ULONG_CONST
/* Must we have a CTTY for fsetown? */ /* Must we have a CTTY for fsetown? */
#undef USE_FSETOWNCTTY #undef USE_FSETOWNCTTY
@ -991,10 +1068,19 @@
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION
/* ISC: Want IPv6? */
#undef WANT_IPV6
/* Define to 1 if your processor stores words with the most significant byte /* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */ first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN #undef WORDS_BIGENDIAN
/* Handle ss_family */
#if !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE___SS_FAMILY_IN_SS)
# define ss_family __ss_family
# define ss_len __ss_len
#endif /* !defined(HAVE_SS_FAMILY_IN_SS) && defined(HAVE_SA_FAMILY_IN_SS) */
/* Define to 1 if on AIX 3. /* Define to 1 if on AIX 3.
System headers sometimes define this. System headers sometimes define this.
We just want to avoid a redefinition error message. */ We just want to avoid a redefinition error message. */

302
contrib/ntp/config.sub vendored
View File

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Configuration validation subroutine script. # Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# Free Software Foundation, Inc. # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
timestamp='2001-08-13' timestamp='2003-07-04'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
@ -29,7 +29,8 @@ timestamp='2001-08-13'
# configuration script generated by Autoconf, you may include it under # configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program. # the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>. # Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# #
# Configuration subroutine to validate and canonicalize a configuration type. # Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument. # Supply the specified configuration type as an argument.
@ -117,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations. # Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in case $maybe_os in
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;; ;;
@ -226,31 +227,44 @@ case $basic_machine in
1750a | 580 \ 1750a | 580 \
| a29k \ | a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| 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 \
| c4x | clipper \ | c4x | clipper \
| d10v | d30v | dsp16xx \ | d10v | d30v | dlx | dsp16xx \
| fr30 \ | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \ | i370 | i860 | i960 | ia64 \
| ip2k \
| m32r | m68000 | m68k | m88k | mcore \ | m32r | m68000 | m68k | m88k | mcore \
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \ | mips | mipsbe | mipseb | mipsel | mipsle \
| mips64vr4100 | mips64vr4100el | mips64vr4300 \ | mips16 \
| mips64vr4300el | mips64vr5000 | mips64vr5000el \ | mips64 | mips64el \
| mipsbe | mipsel | mipsle | mipstx39 | mipstx39el \ | mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \ | mn10200 | mn10300 \
| msp430 \
| ns16k | ns32k \ | ns16k | ns32k \
| openrisc \ | openrisc | or32 \
| pdp10 | pdp11 | pj | pjl \ | pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \ | pyramid \
| s390 | s390x \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[34] | sh[34]eb | shbe | shle \ | sh64 | sh64le \
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
| strongarm \ | strongarm \
| tahoe | thumb | tic80 | tron \ | tahoe | thumb | tic4x | tic80 | tron \
| v850 \ | v850 | v850e \
| we32k \ | we32k \
| x86 | xscale \ | x86 | xscale | xstormy16 | xtensa \
| z8k) | z8k)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
;; ;;
@ -277,38 +291,55 @@ case $basic_machine in
580-* \ 580-* \
| a29k-* \ | a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alphapca5[67]-* | arc-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| arm-* | armbe-* | armle-* | armv*-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \ | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c54x-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cray2-* | cydra-* \ | clipper-* | cydra-* \
| d10v-* | d30v-* \ | d10v-* | d30v-* | dlx-* \
| elxsi-* \ | elxsi-* \
| f30[01]-* | f700-* | fr30-* | fx80-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \ | h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \ | i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* \
| m32r-* \ | m32r-* \
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \ | m88110-* | m88k-* | mcore-* \
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ | mips16-* \
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipsel-* \ | mips64-* | mips64el-* \
| mipsle-* | mipstx39-* | mipstx39el-* \ | mips64vr-* | mips64vrel-* \
| none-* | np1-* | ns16k-* | ns32k-* \ | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| msp430-* \
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
| orion-* \ | orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \ | pyramid-* \
| romp-* | rs6000-* \ | romp-* | rs6000-* \
| s390-* | s390x-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ | tahoe-* | thumb-* \
| v850-* | vax-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \ | we32k-* \
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
| xtensa-* \
| ymp-* \ | ymp-* \
| z8k-*) | z8k-*)
;; ;;
@ -342,6 +373,9 @@ case $basic_machine in
basic_machine=a29k-none basic_machine=a29k-none
os=-bsd os=-bsd
;; ;;
amd64)
basic_machine=x86_64-pc
;;
amdahl) amdahl)
basic_machine=580-amdahl basic_machine=580-amdahl
os=-sysv os=-sysv
@ -373,6 +407,10 @@ case $basic_machine in
basic_machine=ns32k-sequent basic_machine=ns32k-sequent
os=-dynix os=-dynix
;; ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
convex-c1) convex-c1)
basic_machine=c1-convex basic_machine=c1-convex
os=-bsd os=-bsd
@ -393,16 +431,8 @@ case $basic_machine in
basic_machine=c38-convex basic_machine=c38-convex
os=-bsd os=-bsd
;; ;;
cray | ymp) cray | j90)
basic_machine=ymp-cray basic_machine=j90-cray
os=-unicos
;;
cray2)
basic_machine=cray2-cray
os=-unicos
;;
[cjt]90)
basic_machine=${basic_machine}-cray
os=-unicos os=-unicos
;; ;;
crds | unos) crds | unos)
@ -417,6 +447,14 @@ case $basic_machine in
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec basic_machine=mips-dec
;; ;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \ delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola) | 3300-motorola | delta-motorola)
basic_machine=m68k-motorola basic_machine=m68k-motorola
@ -597,14 +635,6 @@ case $basic_machine in
basic_machine=m68k-atari basic_machine=m68k-atari
os=-mint os=-mint
;; ;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux-gnu
;;
mips3*-*) mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;; ;;
@ -619,6 +649,10 @@ case $basic_machine in
basic_machine=m68k-rom68k basic_machine=m68k-rom68k
os=-coff os=-coff
;; ;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
msdos) msdos)
basic_machine=i386-pc basic_machine=i386-pc
os=-msdos os=-msdos
@ -691,6 +725,10 @@ case $basic_machine in
np1) np1)
basic_machine=np1-gould basic_machine=np1-gould
;; ;;
nv1)
basic_machine=nv1-cray
os=-unicosmp
;;
nsr-tandem) nsr-tandem)
basic_machine=nsr-tandem basic_machine=nsr-tandem
;; ;;
@ -698,6 +736,10 @@ case $basic_machine in
basic_machine=hppa1.1-oki basic_machine=hppa1.1-oki
os=-proelf os=-proelf
;; ;;
or32 | or32-*)
basic_machine=or32-unknown
os=-coff
;;
OSE68000 | ose68000) OSE68000 | ose68000)
basic_machine=m68000-ericsson basic_machine=m68000-ericsson
os=-ose os=-ose
@ -720,49 +762,55 @@ case $basic_machine in
pbb) pbb)
basic_machine=m68k-tti basic_machine=m68k-tti
;; ;;
pc532 | pc532-*) pc532 | pc532-*)
basic_machine=ns32k-pc532 basic_machine=ns32k-pc532
;; ;;
pentium | p5 | k5 | k6 | nexgen) pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc basic_machine=i586-pc
;; ;;
pentiumpro | p6 | 6x86 | athlon) pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc basic_machine=i686-pc
;; ;;
pentiumii | pentium2) pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc basic_machine=i686-pc
;; ;;
pentium-* | p5-* | k5-* | k6-* | nexgen-*) pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
pentiumpro-* | p6-* | 6x86-* | athlon-*) pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
pentiumii-* | pentium2-*) pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn) pn)
basic_machine=pn-gould basic_machine=pn-gould
;; ;;
power) basic_machine=power-ibm power) basic_machine=power-ibm
;; ;;
ppc) basic_machine=powerpc-unknown ppc) basic_machine=powerpc-unknown
;; ;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
ppcle | powerpclittle | ppc-le | powerpc-little) ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown basic_machine=powerpcle-unknown
;; ;;
ppcle-* | powerpclittle-*) ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
ppc64) basic_machine=powerpc64-unknown ppc64) basic_machine=powerpc64-unknown
;; ;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little) ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown basic_machine=powerpc64le-unknown
;; ;;
ppc64le-* | powerpc64little-*) ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;; ;;
@ -783,10 +831,26 @@ case $basic_machine in
rtpc | rtpc-*) rtpc | rtpc-*)
basic_machine=romp-ibm basic_machine=romp-ibm
;; ;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200) sa29200)
basic_machine=a29k-amd basic_machine=a29k-amd
os=-udi os=-udi
;; ;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent) sequent)
basic_machine=i386-sequent basic_machine=i386-sequent
;; ;;
@ -794,7 +858,10 @@ case $basic_machine in
basic_machine=sh-hitachi basic_machine=sh-hitachi
os=-hms os=-hms
;; ;;
sparclite-wrs) sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs basic_machine=sparclite-wrs
os=-vxworks os=-vxworks
;; ;;
@ -861,19 +928,35 @@ case $basic_machine in
os=-dynix os=-dynix
;; ;;
t3e) t3e)
basic_machine=t3e-cray basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos os=-unicos
;; ;;
tic54x | c54x*) tic54x | c54x*)
basic_machine=tic54x-unknown basic_machine=tic54x-unknown
os=-coff os=-coff
;; ;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
tx39) tx39)
basic_machine=mipstx39-unknown basic_machine=mipstx39-unknown
;; ;;
tx39el) tx39el)
basic_machine=mipstx39el-unknown basic_machine=mipstx39el-unknown
;; ;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32) tower | tower-32)
basic_machine=m68k-ncr basic_machine=m68k-ncr
;; ;;
@ -898,8 +981,8 @@ case $basic_machine in
os=-vms os=-vms
;; ;;
vpp*|vx|vx-*) vpp*|vx|vx-*)
basic_machine=f301-fujitsu basic_machine=f301-fujitsu
;; ;;
vxworks960) vxworks960)
basic_machine=i960-wrs basic_machine=i960-wrs
os=-vxworks os=-vxworks
@ -920,17 +1003,13 @@ case $basic_machine in
basic_machine=hppa1.1-winbond basic_machine=hppa1.1-winbond
os=-proelf os=-proelf
;; ;;
windows32) xps | xps100)
basic_machine=i386-pc
os=-windows32-msvcrt
;;
xmp)
basic_machine=xmp-cray
os=-unicos
;;
xps | xps100)
basic_machine=xps100-honeywell basic_machine=xps100-honeywell
;; ;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff) z8k-*-coff)
basic_machine=z8k-unknown basic_machine=z8k-unknown
os=-sim os=-sim
@ -951,13 +1030,6 @@ case $basic_machine in
op60c) op60c)
basic_machine=hppa1.1-oki basic_machine=hppa1.1-oki
;; ;;
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
fi
;;
romp) romp)
basic_machine=romp-ibm basic_machine=romp-ibm
;; ;;
@ -977,13 +1049,16 @@ case $basic_machine in
we32k) we32k)
basic_machine=we32k-att basic_machine=we32k-att
;; ;;
sh3 | sh4 | sh3eb | sh4eb) sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown basic_machine=sh-unknown
;; ;;
sh64)
basic_machine=sh64-unknown
;;
sparc | sparcv9 | sparcv9b) sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun basic_machine=sparc-sun
;; ;;
cydra) cydra)
basic_machine=cydra-cydrome basic_machine=cydra-cydrome
;; ;;
orion) orion)
@ -998,10 +1073,6 @@ case $basic_machine in
pmac | pmac-mpw) pmac | pmac-mpw)
basic_machine=powerpc-apple basic_machine=powerpc-apple
;; ;;
c4x*)
basic_machine=c4x-none
os=-coff
;;
*-unknown) *-unknown)
# Make sure to match an already-canonicalized machine name. # Make sure to match an already-canonicalized machine name.
;; ;;
@ -1057,17 +1128,19 @@ case $os in
| -aos* \ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \ | -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos*) | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
# Remember, each alternative MUST END IN *, to match a version number. # Remember, each alternative MUST END IN *, to match a version number.
;; ;;
-qnx*) -qnx*)
@ -1079,8 +1152,10 @@ case $os in
;; ;;
esac esac
;; ;;
-nto-qnx*)
;;
-nto*) -nto*)
os=-nto-qnx os=`echo $os | sed -e 's|nto|nto-qnx|'`
;; ;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
@ -1119,14 +1194,20 @@ case $os in
-acis*) -acis*)
os=-aos os=-aos
;; ;;
-atheos*)
os=-atheos
;;
-386bsd) -386bsd)
os=-bsd os=-bsd
;; ;;
-ctix* | -uts*) -ctix* | -uts*)
os=-sysv os=-sysv
;; ;;
-nova*)
os=-rtmk-nova
;;
-ns2 ) -ns2 )
os=-nextstep2 os=-nextstep2
;; ;;
-nsk*) -nsk*)
os=-nsk os=-nsk
@ -1165,8 +1246,14 @@ case $os in
-xenix) -xenix)
os=-xenix os=-xenix
;; ;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint os=-mint
;;
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;; ;;
-none) -none)
;; ;;
@ -1199,10 +1286,14 @@ case $basic_machine in
arm*-semi) arm*-semi)
os=-aout os=-aout
;; ;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*) pdp10-*)
os=-tops20 os=-tops20
;; ;;
pdp11-*) pdp11-*)
os=-none os=-none
;; ;;
*-dec | vax-*) *-dec | vax-*)
@ -1229,6 +1320,9 @@ case $basic_machine in
mips*-*) mips*-*)
os=-elf os=-elf
;; ;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os. *-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3 os=-sysv3
;; ;;
@ -1292,19 +1386,19 @@ case $basic_machine in
*-next) *-next)
os=-nextstep3 os=-nextstep3
;; ;;
*-gould) *-gould)
os=-sysv os=-sysv
;; ;;
*-highlevel) *-highlevel)
os=-bsd os=-bsd
;; ;;
*-encore) *-encore)
os=-bsd os=-bsd
;; ;;
*-sgi) *-sgi)
os=-irix os=-irix
;; ;;
*-siemens) *-siemens)
os=-sysv4 os=-sysv4
;; ;;
*-masscomp) *-masscomp)
@ -1376,7 +1470,7 @@ case $basic_machine in
-ptx*) -ptx*)
vendor=sequent vendor=sequent
;; ;;
-vxsim* | -vxworks*) -vxsim* | -vxworks* | -windiss*)
vendor=wrs vendor=wrs
;; ;;
-aux*) -aux*)

10653
contrib/ntp/configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,16 @@ if test -z "$depmode" || test -z "$source" || test -z "$object"; then
fi fi
# `libtool' can also be set to `yes' or `no'. # `libtool' can also be set to `yes' or `no'.
depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
@ -197,18 +206,61 @@ aix)
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
;; ;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64) tru64)
# The Tru64 AIX compiler uses -MD to generate dependencies as a side # The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too. # dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected. # Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
tmpdepfile1="$object.d"
tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
if test "$libtool" = yes; then if test "$libtool" = yes; then
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD "$@" -Wc,-MD
else else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
"$@" -MD "$@" -MD
fi fi
@ -240,34 +292,42 @@ tru64)
dashmstdout) dashmstdout)
# Important note: in order to support this mode, a compiler *must* # Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o, # always write the proprocessed file to stdout, regardless of -o.
# because we must use -o when running libtool. "$@" || exit $?
test -z "$dashmflag" && dashmflag=-M
( IFS=" " # Remove the call to Libtool.
case " $* " in if test "$libtool" = yes; then
*" --mode=compile "*) # this is libtool, let us make it quiet while test $1 != '--mode=compile'; do
for arg shift
do # cycle over the arguments done
case "$arg" in shift
"--mode=compile") fi
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet # Remove `-o $object'.
shift # fnord IFS=" "
;; for arg
esac do
set fnord "$@" "$arg" case $arg in
shift # fnord -o)
shift # "$arg" shift
done ;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;; ;;
esac esac
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" done
) &
proc=$! test -z "$dashmflag" && dashmflag=-M
"$@" # Require at least two characters before searching for `:'
stat=$? # in the target name. This is to cope with DOS-style filenames:
wait "$proc" # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
if test "$stat" != 0; then exit $stat; fi "$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile" rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile" cat < "$tmpdepfile" > "$depfile"
tr ' ' ' tr ' ' '
@ -285,36 +345,40 @@ dashXmstdout)
;; ;;
makedepend) makedepend)
# X makedepend "$@" || exit $?
( # Remove any Libtool call
shift if test "$libtool" = yes; then
cleared=no while test $1 != '--mode=compile'; do
for arg in "$@"; do shift
case $cleared in no)
set ""; shift
cleared=yes
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift;;
-*)
;;
*)
set fnord "$@" "$arg"; shift;;
esac
done done
obj_suffix="`echo $object | sed 's/^.*\././'`" shift
touch "$tmpdepfile" fi
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" # X makedepend
) & shift
proc=$! cleared=no
"$@" for arg in "$@"; do
stat=$? case $cleared in
wait "$proc" no)
if test "$stat" != 0; then exit $stat; fi set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile" rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile" cat < "$tmpdepfile" > "$depfile"
tail +3 "$tmpdepfile" | tr ' ' ' sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \ ' | \
## Some versions of the HPUX 10.20 sed can't process this invocation ## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround. ## correctly. Breaking it into two sed invocations is a workaround.
@ -324,35 +388,39 @@ makedepend)
cpp) cpp)
# Important note: in order to support this mode, a compiler *must* # Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o, # always write the proprocessed file to stdout.
# because we must use -o when running libtool. "$@" || exit $?
( IFS=" "
case " $* " in # Remove the call to Libtool.
*" --mode=compile "*) if test "$libtool" = yes; then
for arg while test $1 != '--mode=compile'; do
do # cycle over the arguments shift
case $arg in done
"--mode=compile") shift
# insert --quiet before "--mode=compile" fi
set fnord "$@" --quiet
shift # fnord # Remove `-o $object'.
;; IFS=" "
esac for arg
set fnord "$@" "$arg" do
shift # fnord case $arg in
shift # "$arg" -o)
done shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;; ;;
esac esac
"$@" -E | done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile" sed '$ s: \\$::' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile" rm -f "$depfile"
echo "$object : \\" > "$depfile" echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile" cat < "$tmpdepfile" >> "$depfile"
@ -364,32 +432,25 @@ msvisualcpp)
# Important note: in order to support this mode, a compiler *must* # Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o, # always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool. # because we must use -o when running libtool.
( IFS=" " "$@" || exit $?
case " $* " in IFS=" "
*" --mode=compile "*) for arg
for arg do
do # cycle over the arguments case "$arg" in
case $arg in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
"--mode=compile") set fnord "$@"
# insert --quiet before "--mode=compile" shift
set fnord "$@" --quiet shift
shift # fnord ;;
;; *)
esac
set fnord "$@" "$arg" set fnord "$@" "$arg"
shift # fnord shift
shift # "$arg" shift
done ;;
;;
esac esac
"$@" -E | done
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" "$@" -E |
) & sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile" rm -f "$depfile"
echo "$object : \\" > "$depfile" echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"

View File

@ -3,21 +3,30 @@
BUILD_ARGS="$@" BUILD_ARGS="$@"
PARSE="--enable-parse-clocks" PARSE="--enable-parse-clocks"
#PARSE= #PARSE=
SNTP="--with-sntp"
# baldwin sparc-sun-solaris2.7 # Backroom:
# bridgeport sparc-sun-solaris2.6 # beauregard freebsd-4
# * bunnylou alpha-dec-osf4.0 # deacon sparc-sun-solaris2.7
# * churchy alpha-dec-osf5.1 # grundoon sparc-sun-sunos4.1.3
# cowbird alpha-dec-osf4.0 # howland freebsd-4
# grundoon sparc-sun-sunos4.1.3 # mort sparc-sun-solaris2.8
# * hepzibah freebsd-4 # whimsy sparc-sun-solaris2.8
# malarky sparc-sun-solaris2.8
# * pogo sparc-sun-solaris2.8 # Campus:
# * porkypine mips-dec-ultrix4.4 # * albert redhat-8
# * rackety sparc-sun-sunos4.1.3/cc # baldwin sparc-sun-solaris2.8
# bridgeport sparc-sun-solaris2.8
# * bunnylou alpha-dec-osf4.0
# * churchy alpha-dec-osf5.1
# cowbird alpha-dec-osf4.0
# * hepzibah freebsd-4
# malarky sparc-sun-solaris2.8
# * pogo sparc-sun-solaris2.8
# * porkypine mips-dec-ultrix4.4
# * rackety sparc-sun-sunos4.1.3/cc
# ? roogey debian # ? roogey debian
# * snavely hppa1.1-hp-hpux10.20 # * snavely hppa1.1-hp-hpux10.20
# whimsy sparc-sun-solaris2.8
c_d=`pwd` c_d=`pwd`
@ -25,7 +34,7 @@ SIG=`perl -e 'print rand'`
echo $SIG > .buildkey echo $SIG > .buildkey
case "$LIST" in case "$LIST" in
'') LIST="bunnylou churchy hepzibah pogo porkypine rackety snavely" ;; '') LIST="albert bunnylou churchy hepzibah pogo porkypine rackety snavely" ;;
esac esac
for i in $LIST for i in $LIST
@ -33,14 +42,12 @@ do
echo $i echo $i
case "1" in case "1" in
0) 0)
ssh $i "cd $c_d ; ./build $SIG $PARSE $BUILD_ARGS" & ssh $i "cd $c_d ; ./build $SIG $PARSE $SNTP $BUILD_ARGS" &
ssh $i "cd $c_d ; ./build $SIG $PARSE --with-crypto=autokey $BUILD_ARGS" & ssh $i "cd $c_d ; ./build $SIG $PARSE $SNTP --without-crypto $BUILD_ARGS" &
ssh $i "cd $c_d ; ./build $SIG $PARSE --without-crypto $BUILD_ARGS" &
;; ;;
1) ssh $i "cd $c_d ; \ 1) ssh $i "cd $c_d ; \
./build $SIG $PARSE $BUILD_ARGS ; \ ./build $SIG $PARSE $SNTP $BUILD_ARGS ; \
./build $SIG $PARSE --with-crypto=autokey $BUILD_ARGS ; \ ./build $SIG $PARSE $SNTP --without-crypto $BUILD_ARGS" &
./build $SIG $PARSE --without-crypto $BUILD_ARGS" &
;; ;;
esac esac
done done

View File

@ -0,0 +1,70 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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="99">03:02 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="#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 and symmetric active 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 service 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>

View File

@ -0,0 +1,58 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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="99">03:03 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="#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>

View File

@ -0,0 +1,55 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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="99">03:04 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/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 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>

View File

@ -0,0 +1,144 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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/~mills/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="99">03:05 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/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="#auto">Autokey Dances</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 server and never revealed. With Autokey 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. Directions for doing that are on the <a href="build.html">Building and Installing the Distribution</a> page.</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 falseticker 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>An attractive alternative where multicast support is available is manycast mode, in which clients periodically troll for servers as described in the <a href="manyopt.html">Automatic NTP Configuration Options</a> page. Either symmetric key or public key cryptographic authentication can be used in this mode. The principle advantage of manycast mode is that potential servers need not be configured in advance, since the client finds them during regular operation, and the configuration files for all clients can be identical.</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.
<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>trusted</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/~mills/ident.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/~mills/ident.html">Identity Schemes</a> page and based on cryptographic challenge/response algorithms are also available. Using all of these schemes provides strong security against replay with or without modification, spoofing, masquerade and most forms of clogging attacks.</p>
<p>The cryptographic means necessary for all Autokey operations is provided by the OpenSSL software library. 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>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/~mills/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 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>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>
<p>When multiple identity schemes are supported in the Autokey protocol, the first message exchange determines which one is used. The client request message contains bits corresponding to which schemes it has available. The server response message contains bits corresponding to which schemes it has available. Both server and client match the received bits with their own and select a common scheme.</p>
<p>Following the principle that time is a public value, a server responds to any client packet that matches its cryptotype capabilities. Thus, a server receiving an unauthenticated packet will respond with an unauthenticated packet, while the same server receiving a packet of a cryptotype it supports will respond with packets of that cryptotype. However, unconfigured broadcast or manycast client associations or symmetric passive associations will not be mobilized unless the server supports a cryptotype compatible with the first packet received. By default, unauthenticated associations will not be mobilized unless overridden in a decidedly dangerous way.</p>
<p>Some examples may help to reduce confusion. Client Alice has no specific cryptotype selected. Server Bob has both a symmetric key file and minimal Autokey files. Alice's unauthenticated messages arrive at Bob, who replies with unauthenticated messages. Cathy has a copy of Bob's symmetric key file and has selected key ID 4 in messages to Bob. Bob verifies the message with his key ID 4. If it's the same key and the message is verified, Bob sends Cathy a reply authenticated with that key. If verification fails, Bob sends Cathy a thing called a crypto-NAK, which tells her something broke. She can see the evidence using the <tt>ntpq</tt> program.</p>
<p>Denise has rolled her own host key and certificate. She also uses one of the identity schemes as Bob. She sends the first Autokey message to Bob and they both dance the protocol authentication and identity steps. If all comes out okay, Denise and Bob continue as described above.</p>
<p>It should be clear from the above that Bob can support all the girls at the same time, as long as he has compatible authentication and identity credentials. Now, Bob can act just like the girls in his own choice of servers; he can run multiple configured associations with multiple different servers (or the same server, although that might not be useful). But, wise security policy might preclude some cryptotype combinations; for instance, running an identity scheme with one server and no authentication with another might not be wise.</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>] [gq <i>file</i>] [gqpar <i>file</i>] [iffpar <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 optional 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>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 optional leapsecond file. This overrides the link <tt>ntpkey_leap</tt> in the keys directory.
<dt><tt>mvpar <i>file</i></tt>
<dd>Specifies the location of the optional 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>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 (mismatched digest types)
<dd>Not used.
<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 (certificate not verified)
<dd>The certificate is not yet valid or has expired or the signature could not be verified.
<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 identity)
<dd>The identity key is missing, corrupt or bogus.
</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>

View File

@ -0,0 +1,83 @@
<!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

@ -0,0 +1,67 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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="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="#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 to the power of two. 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> defaults to 10 (17.1 m) and <tt>maxpoll</tt> defaults to 14 (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>
</html>

View File

@ -0,0 +1,168 @@
<!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/~mills/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">03:07 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>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

@ -0,0 +1,88 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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="99">03:08 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="#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. These commands have the same basic functions as in NTPv3 and in some cases new functions and new arguments. There are two classes of commands, configuration commands that configure a persistent association with a remote server or 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 type of 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). Note that only those options applicable to each command are listed below. Use of options not listed may not be caught as an error, but may result in some weird and even destructive behavior.</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. In a few cases, including the <tt>reslist</tt> billboard generated by <tt>ntpdc</tt>, IPv6 addresses are automatically generated. 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.</p>
<p>Note that in contexts where a host name is expected, a <tt>-4</tt> qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a <tt>-6</tt> qualifier forces DNS resolution to the IPv6 namespace. See IPv6 references for the equivalent classes for that address family.</p>
<dl>
<dt><tt>server <i>address</i> [key <i>key</i> | autokey] [burst] [iburst] [version <i>version</i>] [prefer] [minpoll <i>minpoll</i>] [maxpoll <i>maxpoll</i>]</tt><br>
<tt>peer <i>address</i> [key <i>key</i> | autokey] [version <i>version</i>] [prefer] [minpoll <i>minpoll</i>] [maxpoll <i>maxpoll</i>]</tt><br>
<tt>broadcast <i>address</i> [key <i>key</i> | autokey] [version <i>version</i>] [minpoll <i>minpoll</i>] [ttl <i>ttl</i>]</tt><br>
<tt>manycastclient <i>address</i> [key <i>key</i> | autokey] [version <i>version</i>] [minpoll <i>minpoll</i> [maxpoll <i>maxpoll</i>] [ttl <i>ttl</i>]</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, this command mobilizes a persistent client mode association with the specified remote server or local radio clock. In this mode the local clock can synchronized to the remote server, but the remote server can never be synchronized to the local 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 manycast client mode association for the multicast address specified. In this case 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>manycast</tt> command specifies that the local server 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.
<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 <tt>calldelay</tt> command to allow additional time for a modem or ISDN call to complete. This is designed to improve timekeeping quality with the <tt>server</tt> command and <tt>s</tt> addresses.
<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 two packets can be changed with the <tt>calldelay</tt> command to allow additional time for a modem or ISDN call to complete. This is designed to speed the initial synchronization acquisition with the <tt>server</tt> command and <tt>s</tt> addresses and when <tt>ntpd</tt> is started with the <tt>-q</tt> option.
<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>key</i> identifier with values from 1 to 65534, inclusive. The default is to include no encryption field.
<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).
<dt><tt>noselect</tt>
<dd>Marks the server as unused, except for display purposes. The server is discarded by the selection algroithm.
<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.
<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.
</dl>
<h4 id="aux">Auxilliary Commands</h4>
<dl>
<dt><tt>broadcastclient</tt>
<dd>This command enables reception of broadcast server messages to any local interface (type b) address. 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, then enters the broadcast client mode, in which it synchronizes to succeeding broadcast 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.
<dt><tt>manycastserver <i>address</i> [...]</tt>
<dd>This command enables reception of manycast client messages to the multicast group address(es) (type m) specified. At least one address is required, but 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 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.
</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>
</html>

View File

@ -0,0 +1,95 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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="24" locale="00000409" region="0" t="DateTime" w="50">15:44</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="240">Tuesday, July 15, 2003</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>
***********************************************************************
* *
* Copyright (c) David L. Mills 1992-2003 *
* *
* Permission to use, copy, modify, and distribute this software and *
* its documentation for any purpose and without fee is hereby *
* granted, provided that the above copyright notice appears in all *
* copies and that both the copyright notice and this permission *
* notice appear in supporting documentation, and that the name *
* University of Delaware not be used in advertising or publicity *
* pertaining to distribution of the software without specific, *
* written prior permission. The University of Delaware makes no *
* representations about the suitability this software for any *
* purpose. It is provided &quot;as is&quot; without express or implied *
* warranty. *
* *
***********************************************************************
</pre>
<p>The following individuals contributed in part to the Network Time Protocol Distribution Version 4 and are acknowledged as authors of this work.</p>
<ol>
<li 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:%20Frank.Kardel@informatik.uni-erlangen.de">&lt;Frank.Kardel@informatik.uni-erlangen.de&gt;</a> PARSE &lt;GENERIC&gt; driver (14 reference clocks), STREAMS modules for PARSE, support scripts, syslog cleanup
<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>
</html>

171
contrib/ntp/html/debug.html Normal file
View File

@ -0,0 +1,171 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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="97">10:23 PM</csobj> UTC <csobj format="LongDate" h="25" locale="00000409" region="0" t="DateTime" w="266">Tuesday, August 05, 2003</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>

View File

@ -0,0 +1,64 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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>

View File

@ -0,0 +1,53 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>Austron 2200A/2201A GPS Receivers</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Austron 2200A/2201A GPS Receivers</h3>
<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>

View File

@ -0,0 +1,87 @@
<!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
on-time = &lt;cr&gt;
i = synchronization flag (' ' = locked, '?' = unlocked)
yy = year of century
ddd = day of year
hh:mm:ss = hours, minutes, seconds
.000 = fraction of second (not used)
bbb = tailing spaces for fill</pre>
<p>The alarm condition is indicated by a '?' at i, which indicates the receiver is not synchronized. In normal operation, a line consisting of the timecode followed by the time quality character (TQ) followed by the receiver status string (SR) is written to the clockstats file.</p>
<p>The time quality character is encoded in IEEE P1344 standard:</p>
<p>Format <tt>TQ</tt> (IEEE P1344 estimated worst-case time quality)</p>
<pre>0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock locked, maximum accuracy
F&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock failure, time not reliable
4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 1 us
5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 10 us
6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 100 us
7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 1 ms
8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 10 ms
9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 100 ms
A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 1 s
B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clock unlocked, accuracy &lt; 10 s</pre>
<p>The status string is encoded as follows:</p>
<p>Format <tt>SR</tt> (25 ASCII printing characters)</p>
<pre>V=vv S=ss T=t P=pdop E=ee
vv = satellites visible
ss = relative signal strength
t = satellites tracked
pdop = position dilution of precision (meters)
ee = hardware errors</pre>
<p>A three-stage median filter is used to reduce jitter and provide a dispersion measure. The driver makes no attempt to correct for the intrinsic jitter of the radio itself.</p>
<h4>Monitor Data</h4>
<p>When enabled by the <tt>flag4</tt> fudge flag, an additional line containing the latitude, longitude, elevation and optional deviation data is written to the <tt>clockstats</tt> file. The deviation data operates with an external pulse-per-second (PPS) input, such as a cesium oscillator or another radio clock. The PPS input should be connected to the B event channel and the radio initialized for deviation data on that channel. The deviation data consists of the mean offset and standard deviation of the external PPS signal relative the GPS signal, both in microseconds over the last 16 seconds.</p>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<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>

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="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>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="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>
</html>

View File

@ -0,0 +1,87 @@
<!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>NIST Modem Time Service</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.18.<i>u</i><br>
Reference ID: <tt>NIST</tt><br>
Driver ID: <tt>ACTS_NIST</tt><br>
Serial Port: <tt>/dev/acts<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 NIST Automated Computer Time Service (ACTS). It periodically dials a prespecified telephone number, receives the NIST timecode data and calculates the local clock correction. It designed primarily for use when neither a radio clock nor connectivity to Internet time servers is available. For the best accuracy, the individual telephone line/modem delay needs to be calibrated using outside sources.</p>
<p>The ACTS is located at NIST Boulder, CO, telephone 303 494 4774. A toll call from Newark, DE, costs between three and four cents, although it is not clear what carrier and time of day discounts apply. The modem dial string will differ depending on local telephone configuration, etc., and is specified by the phone command in the configuration file. The argument to this command is an AT command for a Hayes compatible modem.</p>
<p>The driver can operate in either of two modes, as determined by the mode parameter in the server configuration command. In mode 0 the driver operates continuously at intervals determined by the fudge time1 parameter, as described above. In mode 1 the driver is enabled only when no other sources of synchronization are available and when we have gone more than MAXOUTAGE (3600 s) since last synchronized by other sources of synchronization.</p>
<p>The accuracy produced by this driver should be in the range of a millisecond or two, but may need correction due to the delay characteristics of the individual modem involved. For undetermined reasons, some modems work with the ACTS echo-delay measurement scheme and some don't. This driver tries to do the best it can with what it gets. Initial experiments with a Practical Peripherals 9600SA modem here in Delaware suggest an accuracy of a millisecond or two can be achieved without the scheme by using a fudge time1 value of 65.0 ms. In either case, the dispersion for a single call involving ten samples is about 1.3 ms.</p>
<p>For reliable call management, this driver requires a 1200-bps modem with a Hayes-compatible command set and control over the modem data terminal ready (DTR) control line. Present restrictions require the use of a POSIX-compatible programming interface, although other interfaces may work as well. The ACTS telephone number and modem setup string are hard-coded in the driver and may require changes for nonstandard modems or special circumstances.</p>
<p>The fudge time1 parameter represents a propagation-delay correction factor which is added to the value computed by ACTS when the echo-delay scheme is used. This scheme does not work with all modems; for those that don't, fudge flag2 should be set to disable the feature. In this case the fudge time1 parameter represents the total propagation delay due to all causes and must be determined by external calibration.</p>
<p>The ACTS call interval is determined by a counter initially set to the fudge time2 parameter. At each poll interval, minpoll (usually 64 s) is subtracted from the counter. When the counter is equal to or less than zero, the fudge flag1 is set, which causes up to three call attempts to be made to ACTS. The fudge flag1 is reset after a valid clock update has been determined or by a device fault, timeout or manually using <tt>ntpdc</tt>. After a valid clock update, the counter is reset for the next interval. Setting the <tt>fudge time2</tt> parameter to zero disables automatic call attempts. Manual call attempts can be made at any time by setting <tt>fudgeflag1</tt> using ntpdc.</p>
<p>The NIST timecode message is transmitted at 1200 bps in the following format:</p>
<pre>
jjjjj yy-mm-dd hh:mm:ss tt l uuu mmmmm UTC(NIST) *
jjjjj = modified Julian day
yy-mm-dd = year, month, day
hh:mm:ss = hours, minutes, seconds
tt = DST indicator (see driver listing)
l = leap-second warning (see driver listing)
uuu = DUT1 correction (see driver listing)
mmmmm = modem calibration (see driver listing)
on-time = '*'</pre>
<p>The timecode message is transmitted continuously after a signon banner, which this driver ignores. The driver also ignores all but the yy-mm-dd, hh:mm:ss and on-time character '*' fields, although it checks the format of all fields of the message. A timestamp is captured at the '*' character, as required by the ACTS specification, and used as the reference time of the timecode. If a message with an on-time character of '#' is received, the driver updates the propagation delay. The driver disconnects when (a) ten valid messages have been received, (b) no message has been received for 15 s, (c) an on-time character of '#' is received. These messages are processed by a trimmed-mean filter to reduce timing noise and then by the usual NTP algorithms to develop the clock correction.</p>
<p>Since the accumulated error grows with the interval between calls, it is important that the intrinsic frequency error be minimized. This can be done by observing difference in offsets between two calls placed some hours apart and calculating the uncorrected frequency error. This error, as a fixed-point value in parts-per-million, should be installed in the ntp.drift file before the daemon is started. Some experimentation may be necessary in order to reduce the intrinsic frequency error to the order of 1 ppm.</p>
<p>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 prefer keyword of the server configuration command, in which case only this driver will be selected for synchronization and all other discipline sources will be ignored.</p>
<p>Unlike other drivers, each ACTS call generates one clock correction and that correction is processed immediately. There is no wait to allow the clock filter to accumulate samples. In addition, the watchdog timeout of the local clock algorithm is disabled, so that a correction received from this driver that exceeds CLOCK_MAX (128 ms) causes an immediate step/slew.</p>
<p>Since the interval between updates can be much longer than used with ordinary NTP peers, the local clock procedure has been modified to operate in either of two modes, depending on whether the interval between updates is less than or greater than CLOCK_MAXSEC (1200 s). If less than this value, the local clock procedure operates using the standard NTP phase-lock loop as with other NTP peers. If greater than this value, the procedure operates using a modified frequency-lock loop suggested by Judah Levine in his lockclock algorithm designed specifically for ACTS.</p>
<h4>Call Management</h4>
<p>Since ACTS will be a toll call in most areas of the country, it is necessary to carefully manage the call frequency. This can be done in two ways, by specifying the interval between calls, or by setting a flag bit manually or via a cron job. The call interval is determined by a counter initially set to the fudge time2 parameter. At each poll interval, minpoll (usually 64 s) is subtracted from the counter. When the counter is equal to or less than zero, the fudge flag1 is set, which causes up to three call attempts to be made. The fudge flag1 is reset after ten offset samples have been determined in a single call or by a device fault, timeout or manually using ntpdc. Upon successful completion of a call, the eight samples have been shifted into the clock filter, the local clock updated and the counter reset for the next interval. Setting the fudge time2 parameter to zero disables automatic call attempts.</p>
<p>Manual call attempts can be made at any time by setting fudge flag1 using ntpdc. For example, the ntpdc command</p>
<pre>
fudge 127.127.18.1 flags 1</pre>
<p>will ask for a key identifier and password and, if authenticated by the server, will set flag1. There may be a short delay until the expiration of the current poll timeout.</p>
<p>The flag1 can be set from a cron job in the following way. Construct a file with contents</p>
<pre>keyid 11
passwd dialup
fudge 127.127.18.1 flags 1
quit</pre>
<p>Then, run the following program at specified times as required.</p>
<pre>/usr/local/bin/ntpdc &lt;file</pre>
<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>NIST</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>&nbsp;</p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,59 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>Heath WWV/WWVH Receiver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Heath WWV/WWVH Receiver</h3>
<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;
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>

View File

@ -0,0 +1,67 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="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

@ -0,0 +1,96 @@
<!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.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>
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;
&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>
</html>

View File

@ -0,0 +1,56 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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 equipment. 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 less than a microsecond.</p>
<p>While this driver can discipline the time and frequency relative to the PPS source, it cannot number the seconds. For this purpose a 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. The port can be dedicated to the PPS source or shared with another device. 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 clock discipline. However, fudge flag 3 can be used to enable this 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>
<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>

View File

@ -0,0 +1,104 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="GENERATOR" content="Adobe PageMill 3.0 per Windows">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>PTB Modem Time Service</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>PTB Modem Time Service and other European Laboratories Time Services</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.23.<i>u</i><br>
Reference ID: <tt>PTB</tt><br>
Driver ID: <tt>ACTS_PTB</tt><br>
Serial Port: <tt>/dev/ptb<i>u</i></tt>; 1200 baud, 8-bits, no parity<br>
Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control</p>
<h4>Description</h4>
<p>This driver supports the PTB Automated Computer Time Service (ACTS) and it is a modified version of the NIST ACTS driver so see it for more informations..</p>
<p>It periodically dials a prespecified telephone number, receives the PTB timecode data and calculates the local clock correction. It designed primarily for use when neither a radio clock nor connectivity to Internet time servers is available. For the best accuracy, the individual telephone line/modem delay needs to be calibrated using outside sources.</p>
<p>The only change between this driver and the NIST one is the data format. Infact PTB data format is the following:</p>
<p><font size="-1" face="Courier New">Data format<br>
0000000000111111111122222222223333333333444444444455555555556666666666777777777 7<br>
0123456789012345678901234567890123456789012345678901234567890123456789012345678 9<br>
1995-01-23 20:58:51 MEZ 10402303260219950123195849740+40000500 *<br>
A B C D EF G H IJ K L M N O P Q R S T U V W XY Z&lt;CR&gt;&lt;LF&gt;<br>
A year<br>
B month<br>
C day<br>
D hour<br>
E : normally<br>
A for DST to ST switch first hour<br>
B for DST to ST switch second hour if not marked in H<br>
F minute<br>
G second<br>
H timezone<br>
I day of week<br>
J week of year<br>
K day of year<br>
L month for next ST/DST changes<br>
M day<br>
N hour<br>
O UTC year<br>
P UTC month<br>
Q UTC day<br>
R UTC hour<br>
S UTC minute<br>
T modified julian day (MJD)<br>
U DUT1<br>
V direction and month if leap second<br>
W signal delay (assumed/measured)<br>
X sequence number for additional text line in Y<br>
Y additional text<br>
Z on time marker (* - assumed delay / # measured delay)<br>
&lt;CR&gt;!&lt;LF&gt; ! is second change !<br>
</font></p>
<p>This format is an ITU-R Recommendation (ITU-R TF583.4) and is now available from the primary timing centres of the following countries: Austria, Belgium, Germany, Italy, The Netherlands, Poland, Portugal, Romania, Spain, Sweden, Switzerland, Turkey, United Kingdom. Some examples are:</p>
<ul>
<li>In Germany by Physikalisch-Technische Bundesanstalt (PTB)'s timecode service. Phone number: +49 5 31 51 20 38.
<p>For more detail, see <a href="http://www.ptb.de/english/org/4/43/433/disse.html">http://www.ptb.de/english/org/4/43/433/disse.htm</a></p>
<li>In the UK by National Physical Laboratory (NPL)'s TRUETIME service. Phone number: 0891 516 333
<p>For more detail, see <a href="http://www.npl.co.uk/npl/ctm/truetime.html">http://www.npl.co.uk/npl/ctm/truetime.html</a></p>
<li>In Italy by Istituto Elettrotecnico Nazionale &quot;Galileo Ferrais&quot; (IEN)'s CTD service. Phone number: 166 11 46 15
<p>For more detail, see <a href="http://www.ien.it/tf/time/Pagina42.html">http://www.ien.it/tf/time/Pagina42.html</a></p>
<li>In Switzerland by Swiss Federal Office of Metrology 's timecode service. Phone number: 031 323 32 25
<p>For more detail, see <a href="http://www.ofmet.admin.ch/de/labors/4/Zeitvert.html%20">http://www.ofmet.admin.ch/de/labors/4/Zeitvert.html </a></p>
<li>In Sweden by SP Swedish National Testing and Research Institute 's timecode service. Phone number: +46 33 415783.
<p>For more detail, see <a href="http://www.sp.se/metrology/timefreq/eng/tandf.htm">http://www.sp.se/metrology/timefreq/eng/tandf.htm</a><br>
</p>
</ul>
<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 PTB.
<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 keyword in the ntp.conf file permits a direct connection to a serial port of source of time like IEN CTD signal. It is sufficient to use the string DIRECT in place of the phone number.</p>
<p>Example:</p>
<p><font face="Courier New">server 127.127.23.1</font></p>
<p><font face="Courier New">phone DIRECT</font></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>

View File

@ -0,0 +1,46 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>USNO Modem Time Service</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>USNO Modem Time Service</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.24.<i>u</i><br>
Reference ID: <tt>USNO</tt><br>
Driver ID: <tt>ACTS_USNO</tt><br>
Serial Port: <tt>/dev/cua<i>u</i></tt>; 1200 baud, 8-bits, no parity<br>
Requires: <tt>/usr/include/sys/termios.h</tt> header file with modem control</p>
<h4>Description</h4>
<p>No information available.</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>USNO</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 <tt>clockstats</tt> recording if set.
</dl>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

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="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>Hewlett Packard 58503A GPS Receiver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Hewlett Packard 58503A GPS Receiver</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.26.<i>u</i><br>
Reference ID: <tt>GPS</tt><br>
Driver ID: <tt>GPS_HP</tt><br>
Serial Port: <tt>/dev/hpgps<i>u</i></tt>; 9600 baud, 8-bits, no parity</p>
<h4>Description</h4>
<p>This driver supports the HP 58503A Time and Frequency Reference Receiver. It uses HP SmartClock (TM) to implement an Enhanced GPS receiver. The receiver accuracy when locked to GPS in normal operation is better than 1 usec. The accuracy when operating in holdover is typically better than 10 us per day. It receiver should be operated with factory default settings. Initial driver operation: expects the receiver to be already locked to GPS, configured and able to output timecode format 2 messages.</p>
<p>The driver uses the poll sequence <tt>:PTIME:TCODE?</tt> to get a response from the receiver. The receiver responds with a timecode string of ASCII printing characters, followed by a &lt;cr&gt;&lt;lf&gt;, followed by a prompt string issued by the receiver, in the following format:</p>
<pre>T#yyyymmddhhmmssMFLRVcc&lt;cr&gt;&lt;lf&gt;</pre>
The driver processes the response at the &lt;cr&gt; and &lt;lf&gt;&lt;cr&gt; and &lt;lf&gt;, so what the driver sees is the prompt from the previous poll, followed by this timecode. The prompt from the current poll is (usually) left unread until the next poll. So (except on the very first poll) the driver sees this:
<pre>T#yyyymmddhhmmssMFLRVcc&lt;cr&gt;&lt;lf&gt;</pre>
<p>The T is the on-time character, at 980 msec. before the next 1PPS edge. The # is the timecode format type. We look for format 2. Without any of the CLK or PPS stuff, then, the receiver buffer timestamp at the &lt;cr&gt;y is 24 characters later, which is about 25 msec. at 9600 bps, so the first approximation for fudge time1 is nominally -0.955 seconds. This number probably needs adjusting for each machine / OS type, so far: -0.955000 on an HP 9000 Model 712/80 HP-UX 9.05 -0.953175 on an HP 9000 Model 370 HP-UX 9.10</p>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
<dt><tt>time2 <i>time</i></tt>
<dd>Not used by this driver.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt>refid <i>string</i></tt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag3 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag4 0 | 1</tt>
<dd>Not used by this driver.
</dl>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,249 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>Arcron MSF Receiver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Arcron MSF Receiver</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.27.<i>u</i><br>
Reference ID: <tt>MSFa</tt> / <tt>MSF</tt> / <tt>DCF</tt> / <tt>WWVB</tt><br>
Driver ID: <tt>MSF_ARCRON</tt><br>
Serial Port: <tt>/dev/arc<i>u</i></tt>; 300 baud, 8-bits, 2-stop, no parity<br>
Features: <tt>tty_clk</tt></p>
<h4>Description</h4>
<p>This driver supports the Arcron MSF, DCF and WWVB receivers. The clock reports its ID as ``<tt>MSFa</tt>'', ``<tt>MSF</tt>'', ``<tt>DCF</tt>'' or ``<tt>WWVB</tt>'' to indicate the time source.</p>
<p>This documentation describes v1.3 (2003/2/21) of the source and has been tested against ntpd 4.1.0 on linux x86. Changes from v1.1 and v1.2 include patches to work with the new ntp-4 code, clock support for DCF and WWVB configurable via mode flag, an option to ignore resync request (for those of us at the fringes of the WWVB signal, for instance), averaging of the signal quality poll and several bug fixes, code cleanup and standardizations. In all other respects, the driver works as per v1.1 if a mode is not specified.</p>
<p>To use the alternate modes, the mode flag must be specified. If the mode flag is 0, or unspecified, the original MSF version is assumed. This should assure backwards compatibility and should not break existing setups.</p>
<p>The previous documentation described version V1.1 (1997/06/23) of the source and had been tested (amongst others) against ntpd3-5.90 on Solaris-1 (SunOS 4.1.3_U1 on an SS1 serving as a router and firewall) and against ntpd3-5.90 on Solaris-2.5 (on a SS1+ and TurboSPARC 170MHz). That code will claimed increased stability, reduced jitter and more efficiency (fewer context switches) with the <tt>tty_clk</tt> discipline/STREAMS module installed, but this has not been tested. For a to-do list see the comments at the start of the code.</p>
<p>This code has been significantly slimmed down since the V1.0 version, roughly halving the memory footprint of its code and data.</p>
<p>This driver is designed to allow the unit to run from batteries as designed, for something approaching the 2.5 years expected in the usual stand-alone mode, but no battery-life measurements have been taken.</p>
<p>Much of this code is originally from the other refclock driver files with thanks. The code was originally made to work with the clock by <a href="mailto:derek@toybox.demon.co.uk">Derek Mulcahy</a>, with modifications by <a href="mailto:d@hd.org">Damon Hart-Davis</a>. Thanks also to <a href="mailto:lyndond@sentinet.co.uk">Lyndon David</a> for some of the specifications of the clock. <a href="mailto:palfille@partners.org">Paul Alfille</a> added support for the WWVB clock. <a href="mailto:cprice@cs-home.com">Christopher Price</a> added enhanced support for the MSF, DCF and WWVB clocks.</p>
<p>There is support for a Tcl/Tk monitor written by Derek Mulcahy that examines the output stats; see the <a href="http://www2.exnet.com/NTP/ARC/ARC.html">ARC Rugby MSF Receiver</a> page for more details and the code. Information on the WWVB version is available from <a href="http://www.arctime.com">Atomic Time</a> as their <a href="http://www.atomictime.com/Product17.html">Atomic Time PC</a>.</p>
<p>Look at the notes at the start of the code for further information; some of the more important details follow.</p>
<p>The driver interrogates the clock at each poll (ie every 64s by default) for a timestamp. The clock responds at the start of the next second (with the start bit of the first byte being on-time). In the default or original MSF mode, the time is in `local' format, including the daylight savings adjustment when it is in effect. The driver code converts the time back to UTC. In modes 1-3 the driver can be configured for UTC or local time depending on the setting of flag1.</p>
<p>The clock claims to be accurate to within about 20ms of the broadcast time, and given the low data transmission speed from clock to host, and the fact that the clock is not in continuous sync with MSF, it seems sensible to set the `precision' of this clock to -5 or -4, -4 being used in this code, which builds in a reported dispersion of over 63ms (ie says ``This clock is not very good.''). You can improve the reported precision to -4 (and thus reduce the base dispersion to about 31ms) by setting the fudge <tt>flag3</tt> to <tt>1</tt>.</p>
<p>Even a busy and slow IP link can yield lower dispersions than this from polls of primary time servers on the Internet, which reinforces the idea that this clock should be used as a backup in case of problems with such an IP link, or in the unfortunate event of failure of more accurate sources such as GPS.</p>
<p>By default this clock reports itself to be at stratum 2 rather than the usual stratum 0 for a refclock, because it is not really suited to be used as other than a backup source. The stratum reported can be changed with the <tt>stratum</tt> directive to be whatever you like. After careful monitoring of your clock, and appropriate choice of the <tt>time1</tt> fudge factor to remove systematic errors in the clock's reported time, you might fudge the clock to stratum 1 to allow a stratum-2 secondary server to sync to it.</p>
<p>In default mode, the driver code arranges to resync the clock to MSF at intervals of a little less than an hour (deliberately avoiding the same time each hour to avoid any systematic problems with the signal or host). Whilst resyncing, the driver supplements the normal polls for time from the clock with polls for the reception signal quality reported by the clock. If the signal quality is too low (0--2 out of a range of 0--5), we chose not to trust the clock until the next resync (which we bring forward by about half an hour). If we don't catch the resync, and so don't know the signal quality, we do trust the clock (because this would generally be when the signal is very good and a resync happens quickly), but we still bring the next resync forward and reduce the reported precision (and thus increase reported dispersion).</p>
<p>If we force resyncs to MSF too often we will needlessly exhaust the batteries the unit runs from. During clock resync this driver tries to take enough time samples to avoid <tt>ntpd</tt> losing sync in case this clock is the current peer. By default the clock would only resync to MSF about once per day, which would almost certainly not be acceptable for NTP purposes.</p>
<p>The driver does not force an immediate resync of the clock to MSF when it starts up to avoid excessive battery drain in case <tt>ntpd</tt> is going to be repeatedly restarted for any reason, and also to allow enough samples of the clock to be taken for <tt>ntpd</tt> to sync immediately to this clock (and not remain unsynchronised or to sync briefly to another configured peer, only to hop back in a few poll times, causing unnecessary disturbance). This behaviour should not cause problems because the driver will not accept the timestamps from the clock if the status flag delivered with the time code indicates that the last resync attempt was unsuccessful, so the initial timestamps will be close to reality, even if with up to a day's clock drift in the worst case (the clock by default resyncs to MSF once per day).</p>
<p>When alternate modes 1-3 are selected, the driver can be configured to ignore the resync requests by setting <tt>flag2</tt> to 1. This allows clocks at the fringe of the signal to resync at night when signals are stronger.</p>
<p>The clock has a peculiar RS232 arrangement where the transmit lines are powered from the receive lines, presumably to minimise battery drain. This arrangement has two consequences:</p>
<ul>
<li>Your RS232 interface must drive both +ve and -ve
<li>You must (in theory) wait for an echo and a further 10ms between characters
</ul>
<p>This driver, running on standard Sun and x86 hardware, seems to work fine; note the use of the <tt>send_slow()</tt> routine to queue up command characters to be sent once every two seconds.</p>
<p>Three commands are sent to the clock by this driver. Each command consists of a single letter (of which only the bottom four bits are significant), followed by a CR (ASCII 13). Each character sent to the clock should be followed by a delay to allow the unit to echo the character, and then by a further 10ms. Following the echo of the command string, there may be a response (ie in the case of the <tt>g</tt> and <tt>o</tt> commands below), which in the case of the <tt>o</tt> command may be delayed by up to 1 second so as the start bit of the first byte of the response can arrive on time. The commands and their responses are:</p>
<dl>
<dt><tt>g</tt> CR
<dd>Request for signal quality. Answer only valid during (late part of) resync to MSF signal. The response consists of two characters as follows:
<ol>
<dl compact>
<dt>bit 7
<dd>parity
<dt>bit 6
<dd>always 0
<dt>bit 5
<dd>always 1
<dt>bit 4
<dd>always 1
<dt>bit 3
<dd>always 0
<dt>bit 2
<dd>always 0
<dt>bit 1
<dd>always 1
<dt>bit 0
<dd>= 0 if no reception attempt at the moment, = 1 if reception attempt (ie resync) in progress
</dl>
<dl compact>
<dt>bit 7
<dd>parity
<dt>bit 6
<dd>always 0
<dt>bit 5
<dd>always 1
<dt>bit 4
<dd>always 1
<dt>bit 3
<dd>always 0
<dt>bit 2--0
<dd>reception signal quality in the range 0--5 (very poor to very good); if in the range 0--2 no successful reception is to be expected. The reported value drops to zero when not resyncing, ie when first returned byte is not `3'.
</dl>
</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
<dd>Request timestamp. Start bit of first byte of response is on-time, so may be delayed up to 1 second. Note that the driver will convert time to GMT, if required. The response data is as follows:
<ol>
<li>hours tens (hours range from 00 to 23)
<li>hours units
<li>minutes tens (minutes range from 00 to 59)
<li>minutes units
<li>seconds tens (seconds presumed to range from 00 to 60 to allow for leap second)
<li>seconds units
<li>day of week 1 (Monday) to 7 (Sunday)
<li>day of month tens (day ranges from 01 to 31)
<li>day of month units
<li>month tens (months range from 01 to 12)
<li>month units
<li>year tens (years range from 00 to 99)
<li>year units
<li>BST/UTC status (Ignored in WWVB version)
<dl compact>
<dt>bit 7
<dd>parity
<dt>bit 6
<dd>always 0
<dt>bit 5
<dd>always 1
<dt>bit 4
<dd>always 1
<dt>bit 3
<dd>(MSF) always 0<br>
(WWVB) Leap year indicator bit<br>
0 = non-leap year<br>
1 = leap year
<dt>bit 2
<dd>= (MSF) 1 if UTC is in effect (reverse of bit 1)<br>
(WWVB) Leap second warning bit
<dt>bit 1
<dd>= (MSF)1 if BST is in effect (reverse of bit 2)<br>
= (WWVB) 0 if ST is in effect, 1 if DST is in effect, 1 if transition from ST with bit 0 is set to 0
<dt>bit 0
<dd>= (MSF)1 if BST/UTC change pending<br>
= (WWVB) 0 if ST is in effect, 1 if DST is in effect, 0 if transition from DST with bit 1 is set to 0
</dl>
<li>clock status
<dl compact>
<dt>bit 7
<dd>parity
<dt>bit 6
<dd>always 0
<dt>bit 5
<dd>always 1
<dt>bit 4
<dd>always 1
<dt>bit 3
<dd>= 1 if low battery is detected
<dt>bit 2
<dd>= 1 if last resync failed (though officially undefined for the MSF clock, officially defined for WWVB)
<dt>bit 1
<dd>= 1 if at least one reception attempt was successful<br>
(MSF) since 0230<br>
(DCF) since 0300<br>
(WWVB) resets if not successful between 0300-0400
<dt>bit 0
<dd>= 1 if the clock has valid time---reset to zero when clock is reset (eg at power-up), and set to 1 after first successful resync attempt.
</dl>
</ol>
<p>The driver only accepts time from the clock if the bottom three bits of the status byte are <tt>011</tt> or <tt>flag2</tt> is set to 1 to ignore resync requests. For the MSF clock, if the UK parliament decides to move us to +0100/+0200 time as opposed to the current +0000/+0100 time, it is not clear what effect that will have on the time broadcast by MSF, and therefore on this driver's usefulness.</p>
</dl>
<p>A typical <tt>ntp.conf</tt> configuration file for this driver might be:</p>
<pre># hostname(n) means we expect (n) to be the stratum at which hostname runs.
#------------------------------------------------------------------------------
# SYNCHRONISATION PARTNERS
# ========================
# Default configuration (Original MSF mode)s...
server 127.127.27.0 mode 333 # ARCRON MSF radio clock
# Fudge stratum and other features as required.
# ADJUST time1 VALUE FOR YOUR HOST, CLOCK AND LOCATION!
fudge 127.127.27.0 stratum 1 time1 0.016 flag3 1
# WWVB users should change that line to:
server 127.127.27.0 mode 3 # ARCRON WWVB radio clock
fudge 127.127.27.0 stratum 1 time1 0.030 flag1 1 flag3 1
peer 11.22.33.9 # tick(1--2).
peer 11.22.33.4 # tock(3), boot/NFS server.
# This shouldn't get swept away unless left untouched for a long time.
driftfile /var/tmp/ntp.drift
#------------------------------------------------------------------------------
# RESTRICTIONS
# ============
# By default, don't trust and don't allow modifications.&nbsp; Ignore in fact.
restrict default ignore notrust nomodify
# Allow others in our subnet to check us out...
restrict 11.22.33.0 mask 255.255.255.0 nomodify notrust
# Trust our peers for time.&nbsp; Don't trust others in case they are insane.
restrict 127.127.27.0 nomodify
restrict 11.22.33.4 nomodify
restrict 11.22.33.9 nomodify
# Allow anything from the local host.
restrict 127.0.0.1</pre>
There are a few <tt>#define</tt>s in the code that you might wish to play with:
<dl>
<dt><tt>ARCRON_KEEN</tt>
<dd>With this defined, the code is relatively trusting of the clock, and assumes that you will have the clock as one of a few time sources, so will bend over backwards to use the time from the clock when available and avoid <tt>ntpd</tt> dropping sync from the clock where possible. You may wish to undefine this, especially if you have better sources of time or your reception is ropey. However, there are many checks built in even with this flag defined.
<dt><tt>ARCRON_MULTIPLE_SAMPLES</tt>
<dd>When is defined, we regard each character in the returned timecode as at a known delay from the start of the second, and use the smallest (most negative) offset implied by any such character, ie with the smallest kernel-induced display, and use that. This helps to reduce jitter and spikes.
<dt><tt>ARCRON_LEAPSECOND_KEEN</tt>
<dd>When is defined, we try to do a resync to MSF as soon as possible in the first hour of the morning of the first day of the first and seventh months, ie just after a leap-second insertion or deletion would happen if it is going to. This should help compensate for the fact that this clock does not continuously sample MSF, which compounds the fact that MSF itself gives no warning of an impending leap-second event. This code did not seem functional at the leap-second insertion of 30th June 1997 so is by default disabled.
<dt><tt>PRECISION</tt>
<dd>Currently set to <tt>-4</tt>, but you may wish to set it to <tt>-5</tt> if you are more conservative, or to <tt>-6</tt> if you have particularly good experience with the clock and you live on the edge. Note that the <tt>flag3</tt> fudge value will improve the reported dispersion one notch if clock signal quality is known good. So maybe just leave this alone.
</dl>
<h4>Monitor Data</h4>
<p>Each timecode is written to the <tt>clockstats</tt> file with a signal quality value appended (`0'--`5' as reported by the clock, or `6' for unknown).</p>
<p>Each resync and result (plus gaining or losing MSF sync) is logged to the system log at level <tt>LOG_NOTICE</tt>; note that each resync drains the unit's batteries, so the syslog entry seems justified.</p>
<p>Syslog entries are of the form:</p>
<pre>May 10 10:15:24 oolong ntpd[615]: ARCRON: unit 0: sending resync command
May 10 10:17:32 oolong ntpd[615]: ARCRON: sync finished, signal quality 5: OK, will use clock
May 10 11:13:01 oolong ntpd[615]: ARCRON: unit 0: sending resync command
May 10 11:14:06 oolong ntpd[615]: ARCRON: sync finished, signal quality -1: UNKNOWN, will use clock anyway
May 10 11:41:49 oolong ntpd[615]: ARCRON: unit 0: sending resync command
May 10 11:43:57 oolong ntpd[615]: ARCRON: sync finished, signal quality 5: OK, will use clock
May 10 12:39:26 oolong ntpd[615]: ARCRON: unit 0: sending resync command
May 10 12:41:34 oolong ntpd[615]: ARCRON: sync finished, signal quality 3: OK, will use clock</pre>
<h4>Fudge Factors</h4>
<p></p>
<dl>
<dt><tt>mode 0 | 1 | 2 | 3</tt></dt>
<dd>Specifies the clock hardware model. This parameter is optional, it defaults to the original mode of operation.
<dd>Supported modes of operation:
<dd>0 - Default, Original MSF
<dd>1 - Updated MSF
<dd>2 - New DCF77
<dd>3 - New WWVB
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. On a Sun SparcStation 1 running SunOS 4.1.3_U1, with the receiver in London, a value of 0.020 (20ms) seems to be appropriate.
<dt><tt>time2 <i>time</i></tt>
<dd>Not currently used by this driver.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 2. It is suggested that the clock be not be fudged higher than stratum 1 so that it is used a backup time source rather than a primary when more accurate sources are available.
<dt><tt>refid <i>string</i></tt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>MSFa</tt>. When used in modes 1-3, the driver will report either <tt>MSF</tt>, <tt>DCF</tt>, or <tt>WWVB</tt> respectively.
<dt><tt>flag1 0 | 1</tt>
<dd>(Modes 1-3) If set to 0 (the default), the clock is set to UTC time. If set to 1, the clock is set to localtime.
<dt><tt>flag2 0 | 1</tt>
<dd>(Modes 1-3) If set to 0 (the default), the clock will be forced to resync approximately every hour. If set to 1, the clock will resync per normal operations (approximately midnight).
<dt><tt>flag3 0 | 1</tt>
<dd>If set to 1, better precision is reported (and thus lower dispersion) while clock's received signal quality is known to be good.
<dt><tt>flag4 0 | 1</tt>
<dd>Not used by this driver.
</dl>
<h4>Additional Information</h4>
<p><a href="../refclock.html">Reference Clock Drivers</a><br>
<a href="http://www2.exnet.com/NTP/ARC/ARC.html">ARC Rugby MSF Receiver</a></p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,76 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>Shared memoy Driver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Shared Memory Driver</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.28.<i>u</i><br>
Reference ID: <tt>SHM</tt><br>
Driver ID: <tt>SHM</tt></p>
<h4>Description</h4>
<p>This driver receives its reference clock info from a shared memory-segment. The shared memory-segment is created with owner-only access for unit 0 and 1, and world access for unit 2 and 3</p>
<h4>Structure of shared memory-segment</h4>
<pre>struct shmTime {
&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;
};</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>
<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>
<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>SHM</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.
<h4>Additional Information</h4>
<p><a href="../refclock.html">Reference Clock Drivers</a></p>
</dl>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,797 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Trimble Palisade Receiver</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>
<hr>
</h1>
<h2><img src="../pic/driver29.gif" nosave height="100" width="420"></h2>
<h2><font size="+1">Synopsis</font></h2>
<table>
<tr>
<td>
<div align="right">
<tt>Address:&nbsp;</tt></div>
</td>
<td><b>127.127.29.<i>u</i></b></td>
</tr>
<tr>
<td>
<div align="right">
<tt>Reference ID:</tt></div>
</td>
<td><a name="REFID"></a><b>GPS</b></td>
</tr>
<tr>
<td>
<div align="right">
<tt>Driver ID:</tt></div>
</td>
<td><b>GPS_PALISADE</b></td>
</tr>
<tr>
<td>
<div align="right">
<tt>Serial Port:</tt></div>
</td>
<td><b>/dev/palisade<i>u</i></b></td>
</tr>
<tr>
<td>
<div align="right">
<tt><font size="+1">Serial I/O:</font></tt></div>
</td>
<td><b>9600 baud, 8-bits, 1-stop, odd parity</b></td>
</tr>
</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>
<h2><font size="+1">Operating System Compatibility</font></h2>
The Palisade driver has been tested on the following software and hardware platforms:<br>
&nbsp;
<center>
<table>
<tr>
<td valign="CENTER" width="23%">Platform</td>
<td valign="CENTER">Operating System</td>
<td>NTP Sources</td>
<td>Accuracy</td>
</tr>
<tr>
<td valign="CENTER" width="23%">i386 (PC)&nbsp;</td>
<td valign="CENTER">Linux</td>
<td>NTP Distribution</td>
<td>10 us</td>
</tr>
<tr>
<td>i386 (PC)&nbsp;</td>
<td>Windows NT</td>
<td><a href="ftp://ftp.trimble.com/pub/ntp">ftp://ftp.trimble.com/pub/ntp</a></td>
<td>1 ms</td>
</tr>
<tr>
<td valign="CENTER" width="23%">SUN</td>
<td valign="CENTER">Solaris 2.x</td>
<td>NTP Distribution</td>
<td>50 us</td>
</tr>
<tr>
<td valign="CENTER" width="23%">Hewlett-Packard</td>
<td valign="CENTER">HPUX 9, 10, 11</td>
<td><a href="http://us-support.external.hp.com">http://us-support.external.hp.com</a></td>
<td>50 us</td>
</tr>
<tr>
<td>Various</td>
<td>Free BSD</td>
<td>NTP Distribution</td>
<td>20 us</td>
</tr>
</table>
</center>
<h2><font size="+1">GPS Receiver</font></h2>
The Palisade GPS receiver is an 8-channel smart antenna, housing the GPS receiver, antenna and interface in a single unit, and is designed for rooftop deployment in static timing applications.
<p>Palisade generates a PPS synchronized to UTC within +/- 100 ns.&nbsp; The Palisade's external event input with 40 nanosecond resolution is utilized by the Palisade NTP driver for asynchronous precision time transfer.</p>
<p>No user initialization of the receiver is required. This driver is compatible with the following versions of Palisade:<br>
&nbsp;</p>
<center>
<table>
<tr>
<td valign="CENTER">
<center>
Version</center>
</td>
<td valign="TOP">
<center>
Event Input</center>
</td>
<td valign="CENTER">
<center>
Trimble Part Number</center>
</td>
</tr>
<tr>
<td valign="CENTER">
<center>
7.02</center>
</td>
<td valign="TOP">
<center>
No</center>
</td>
<td valign="CENTER">
<center>
26664-00</center>
</td>
</tr>
<tr>
<td align="CENTER" valign="CENTER">
<center>
7.02E</center>
</td>
<td valign="TOP">
<center>
Yes</center>
</td>
<td valign="CENTER">
<center>
26664-10</center>
</td>
</tr>
<tr>
<td valign="CENTER">
<center>
7.12</center>
</td>
<td valign="TOP">
<center>
Yes</center>
</td>
<td valign="CENTER">
<center>
38158-00</center>
</td>
</tr>
</table>
</center>
<dl>
<dl>
Note: When using Palisade 26664-00, you must set fudge flag2 to 1 in <b>ntp.conf</b>. See <a href="#Configuration">configuration</a>.
</dl>
<dl>
<h3><font size="+1">GPS&nbsp;<a name="Installation"></a>Installation</font></h3>
A location with unobstructed view of the horizon is recommended. Palisade is designed to be securely mounted atop standard 3/4 inch threaded pipe.
<p>The 12 conductor (dia. 10 mm)&nbsp; power and I/O cable must be routed from the rooftop site to the NTP server and properly strain relieved.</p>
<h3><font size="+1">GPS&nbsp;<a name="Connection"></a>Connection</font></h3>
The Palisade is equipped with dual (A &amp; B) RS-422 serial interfaces and a differential TTL PPS output. An RS-232 / RS-422 Interface Module is supplied with the Palisade NTP Synchronization Kit. Palisade <a href="#PortA">port A</a> must be connected to the NTP host server. Maximum antenna cable length is 500 meters. See the <a href="#Pinouts">pinouts</a> table for detailed connection Information.
<p>Palisade's <a href="#PortB">port B</a> provides a TSIP (Trimble Standard Interface Protocol) interface for diagnostics, configuration, and monitoring. Port B and the PPS output are not currently used by the Palisade NTP reference clock driver.<br>
&nbsp;</p>
</dl>
</dl>
<h2><font size="+1">O/S Serial Port Configuration</font></h2>
The driver attempts to open the device <b><tt><a href="#REFID">/dev/palisade<i>u</i></a></tt></b> where <b><i>u</i></b> is the NTP refclock unit number as defined by the LSB of the refclock address.&nbsp; Valid refclock unit numbers are 0 - 3.
<p>The user is expected to provide a symbolic link to an available serial port device.&nbsp; This is typically performed by a command such as:</p>
<blockquote>
<tt>ln -s /dev/ttyS0 /dev/palisade0</tt></blockquote>
Windows NT does not support symbolic links to device files. COM<b>x</b>: is used by the driver, based on the refclock unit number, where unit 1 corresponds to COM<b>1</b>: and unit 3 corresponds to COM3:<br>
&nbsp;
<h2><a name="Configuration"></a><font size="+1">NTP Configuration</font></h2>
Palisade NTP configuration file <b><tt>&quot;ntp.conf&quot;</tt></b> with event polling:<br>
<tt>#------------------------------------------------------------------------------</tt><br>
<tt># The Primary reference</tt><br>
<tt>server 127.127.29.0 # Trimble Palisade GPS Refclock Unit #0</tt><br>
<tt>peer terrapin.csc.ncsu.edu # internet server</tt><br>
<tt># Drift file for expedient re-synchronization after downtime or reboot.</tt><br>
<tt>driftfile /etc/ntp.drift</tt><br>
<tt>#------------------------------------------------------------------------------</tt>
<p>Configuration without event polling:<br>
<tt>#------------------------------------------------------------------------------</tt><br>
<tt># The Primary reference</tt><br>
<tt>server 127.127.29.0 # Trimble Palisade GPS (Stratum 1).</tt><br>
<tt># Set packet delay</tt><br>
<tt><a href="#time1">fudge 127.127.29.0 time1 0.020</a></tt><br>
<tt># and set flag2 to turn off event polling.</tt><br>
<tt><a href="#flag2">fudge 127.127.29.0 flag2 1</a></tt><br>
<tt>#------------------------------------------------------------------------------</tt><br>
&nbsp;</p>
<h2><a name="TimeTransfer"></a><font size="+1">Time Transfer and Polling</font></h2>
Time transfer to the NTP host is performed via the Palisade's comprehensive time packet output. The time packets are output once per second, and whenever an event timestamp is requested.
<p>The driver requests an event time stamp at the end of each polling interval, by pulsing the RTS (request to send) line on the serial port. The Palisade GPS responds with a time stamped event packet.</p>
<p>Time stamps are reported by the Palisade with respect to UTC time. The GPS receiver must download UTC offset information from GPS satellites. After an initial UTC download, the receiver will always start with correct UTC offset information.<br>
&nbsp;</p>
<h2><font size="+1">Run NTP in Debugging Mode</font></h2>
The following procedure is recommended for installing and testing a Palisade NTP driver:
<ol>
<li>Perform initial checkout procedures. Place the GPS receiver outdoors; with clear view of the sky. Allow the receiver to obtain an UTC almanac.
<li>Verify presence of timing packets by observing the 1 Hz (PPS) led on the interface module. It should flash once per second.
<li>Connect Palisade's port A to the NTP host.
<li>Configure NTP and the serial I/O port on the host system.
<li>Initially use <tt><a href="#flag2">fudge flag2</a></tt> in <b><a href="#Configuration">ntp.conf</a>,</b> to disable event polling (see configuration).
<li>Run NTP in debug mode (-d -d), to observe Palisade_receive events.
<li>The driver reports the <a href="#TrackingStatus">tracking status of the receiver</a>. Make sure it is tracking several satellites.
<li>Remove fudge flag2 and restart <b>ntpd</b> in debug mode to observe palisade_receive events.
<li>If event polling fails, verify the <a href="#Pinouts">connections</a> and that the host hardware supports RTS control.
</ol>
<h2><font size="+1">Event Logging</font></h2>
System and Event log entries are generated by NTP to report significant system events. Administrators should monitor the system log to observe NTP error messages. Log entries generated by the Palisade NTP reference clock driver will be of the form:
<blockquote>
<pre>Nov 14 16:16:21 terrapin ntpd[1127]: Palisade #0: <i>message</i></pre>
</blockquote>
<h2><font size="+1">Fudge Factors</font></h2>
<dl>
<dt><a name="time1"></a><tt><font size="+1"><a href="#Configuration">time1 <i>time</i></a></font></tt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. If event capture is not used, time1 should be set to 20 milliseconds to correct serial line and operating system delays incurred in capturing time stamps from the synchronous packets.
<dt><tt><font size="+1">stratum <i>number</i></font></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt><font size="+1"><a href="#REFID">refid <i>string</i></a></font></tt>
<dd>Specifies the driver reference identifier, <b>GPS</b>.
<dt><a name="flag2"></a><tt><font size="+1"><a href="#Configuration">flag2 0 | 1</a></font></tt>
<dd>When set to 1, driver does not use hardware event capture. The synchronous packet output by the receiver at the beginning of each second is time stamped by the driver. If triggering the event pulse fails, the driver falls back to this mode automatically.
</dl>
<h2><font size=+1>Mode Parameter</font></h2>
<dl>
<dt><tt><font size=+1>mode <i>number</i></font></tt></dt>
<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.
</dl>
<h2><font size="+1">DEFINEs</font></h2>
The following constants are defined in the driver source code. These defines may be modified to improve performance or adapt to new operating systems.<br>
&nbsp;
<center>
<table border>
<tr>
<td><b>Label</b></td>
<td>Definition</td>
<td>Default Value</td>
</tr>
<tr>
<td>DEVICE</td>
<td>The serial port device to be used by the driver</td>
<td>/dev/palisade<b><i>u</i></b></td>
</tr>
<tr>
<td>PRECISION</td>
<td>Accuracy of time transfer</td>
<td>1 microsecond</td>
</tr>
<tr>
<td>CURRENT_UTC</td>
<td>Valid GPS - UTC offset</td>
<td>13</td>
</tr>
<tr>
<td>SPEED232</td>
<td>Host RS-232 baud rate</td>
<td>B9600</td>
</tr>
<tr>
<td>TRMB_MINPOLL&nbsp;</td>
<td>Minimum polling interval</td>
<td>5 (32 seconds)</td>
</tr>
<tr>
<td>TRMB_MAXPOLL</td>
<td>Maximum interval between polls</td>
<td>7 (128 seconds)</td>
</tr>
</table>
</center>
<h2><a name="DataFormat"></a><font size="+1">Data Format</font></h2>
Palisade port A can output two synchronous time packets. The NTP driver can use either packet for synchronization. Packets are formatted as follows:
<h3><b><font size="+0">Packet 8F-AD (Primary NTP Packet)</font></b></h3>
<center>
<table>
<tr>
<td>Byte</td>
<td>Item</td>
<td>Type</td>
<td>Meaning</td>
</tr>
<tr>
<td>0</td>
<td>Sub-Packet ID</td>
<td>BYTE</td>
<td>Subcode 0xAD</td>
</tr>
<tr>
<td>1 - 2</td>
<td>Event Count</td>
<td>INTEGER</td>
<td>External event count recorded (0 = PPS)</td>
</tr>
<tr>
<td>3 - 10</td>
<td>Fractional Second</td>
<td>DOUBLE</td>
<td>Time elapsed in current second (s)</td>
</tr>
<tr>
<td>11</td>
<td>Hour</td>
<td>BYTE</td>
<td>Hour (0 - 23)</td>
</tr>
<tr>
<td>12</td>
<td>Minute</td>
<td>BYTE</td>
<td>Minute (0 - 59)</td>
</tr>
<tr>
<td>13</td>
<td>Second</td>
<td>BYTE</td>
<td>Second (0 - 59; 60 = leap)</td>
</tr>
<tr>
<td>14</td>
<td>Day</td>
<td>BYTE</td>
<td>Date (1 - 31)</td>
</tr>
<tr>
<td>15</td>
<td>Month</td>
<td>BYTE</td>
<td>Month (1 - 12)</td>
</tr>
<tr>
<td>16 - 17</td>
<td>Year</td>
<td>INTEGER</td>
<td>Year (4 digit)</td>
</tr>
<tr>
<td>18</td>
<td>Receiver Status</td>
<td>BYTE</td>
<td>Tracking Status</td>
</tr>
<tr>
<td>19</td>
<td>UTC Flags</td>
<td>BYTE</td>
<td>Leap Second Flags</td>
</tr>
<tr>
<td>20</td>
<td>Reserved</td>
<td>BYTE</td>
<td>Contains 0xFF</td>
</tr>
<tr>
<td>21</td>
<td>Reserved</td>
<td>BYTE</td>
<td>Contains 0xFF</td>
</tr>
</table>
</center>
<blockquote>
<h4>Leap Second Flag Definition:</h4>
Bit 0:&nbsp; (1) UTC Time is available<br>
Bits 1 - 3: Undefined<br>
Bit 4:&nbsp; (1) Leap Scheduled: Leap second pending asserted by GPS control segment.<br>
Bit 5:&nbsp; (1) Leap Pending: set 24 hours before, until beginning of leap second.<br>
Bit 6:&nbsp; (1) GPS Leap Warning: 6 hours before until 6 hours after leap event<br>
Bit 7:&nbsp; (1) Leap In Progress. Only set during the leap second.
<h4><a name="TrackingStatus"></a>Tracking Status Flag Definitions:</h4>
</blockquote>
<center>
<table width="712" border="0" cellspacing="0">
<tr>
<td valign="CENTER" width="5%">Code</td>
<td valign="CENTER" width="59%">Meaning</td>
<td>Accuracy</td>
<td>Receiver Mode</td>
</tr>
<tr>
<td>0</td>
<td>Receiver is Navigating</td>
<td>+/- 1 us</td>
<td>Self Survey</td>
</tr>
<tr>
<td valign="CENTER" width="5%">1</td>
<td valign="CENTER" width="59%">Static 1 Sat. Timing Mode&nbsp;</td>
<td>+/- 1 us</td>
<td>1-D Timing</td>
</tr>
<tr>
<td valign="CENTER" width="5%">2</td>
<td valign="CENTER" width="59%">Approximate Time</td>
<td>20 - 50 ms</td>
<td>Acquisition</td>
</tr>
<tr>
<td valign="CENTER" width="5%">3</td>
<td valign="CENTER" width="59%">Startup</td>
<td>N/A</td>
<td>Initialization</td>
</tr>
<tr>
<td valign="CENTER" width="5%">4</td>
<td valign="CENTER" width="59%">Startup</td>
<td>N/A</td>
<td>Initialization</td>
</tr>
<tr>
<td valign="CENTER" width="5%">5</td>
<td valign="CENTER" width="59%">Dilution of Position too High&nbsp;</td>
<td>5 ppm</td>
<td>Self Survey</td>
</tr>
<tr>
<td valign="CENTER" width="5%">6</td>
<td valign="CENTER" width="59%">Static 1 Sat. Timing: Sat. not usable</td>
<td>5 ppm</td>
<td>1-D Timing</td>
</tr>
<tr>
<td valign="CENTER" width="5%">7</td>
<td valign="CENTER" width="59%">No Satellites Usable</td>
<td>N/A</td>
<td>Self Survey</td>
</tr>
<tr>
<td valign="CENTER" width="5%">8</td>
<td valign="CENTER" width="59%">Only 1 Satellite Usable</td>
<td>20 - 50 ms</td>
<td>Self Survey</td>
</tr>
<tr>
<td valign="CENTER" width="5%">9</td>
<td valign="CENTER" width="59%">Only 2 Satellite Usable</td>
<td>20 - 50 ms</td>
<td>Self Survey</td>
</tr>
<tr>
<td valign="CENTER" width="5%">10</td>
<td valign="CENTER" width="59%">Only 3 Satellites Usable</td>
<td>20 - 50 ms</td>
<td>Self Survey</td>
</tr>
<tr>
<td valign="CENTER" width="5%">11</td>
<td valign="CENTER" width="59%">Invalid Solution</td>
<td>N/A</td>
<td>Error</td>
</tr>
<tr>
<td valign="CENTER" width="5%">12</td>
<td valign="CENTER" width="59%">Differential Corrections&nbsp;</td>
<td>N/A</td>
<td>N/A</td>
</tr>
<tr>
<td valign="CENTER" width="5%">13</td>
<td valign="CENTER" width="59%">Overdetermined Fixes</td>
<td>+/- 100 ns</td>
<td>Timing Steady State</td>
</tr>
</table>
</center>
<h3><b><font size="+0">Packet 8F-0B (Comprehensive Timing Packet)</font></b></h3>
<center>
<table border="0" cellspacing="0">
<tr>
<td valign="CENTER" width="9%">Byte</td>
<td valign="CENTER" width="27%">Item</td>
<td valign="CENTER" width="16%">Type</td>
<td valign="CENTER" width="48%">Meaning</td>
</tr>
<tr>
<td valign="CENTER" width="9%">0</td>
<td valign="CENTER" width="27%">Sub-Packet ID</td>
<td valign="CENTER" width="16%">BYTE</td>
<td valign="CENTER" width="48%">Subcode 0x0B</td>
</tr>
<tr>
<td valign="TOP" width="9%">1 - 2</td>
<td valign="TOP" width="27%">Event Count</td>
<td valign="TOP" width="16%">INTEGER</td>
<td valign="TOP" width="48%">External event count recorded (0 = PPS)</td>
</tr>
<tr>
<td valign="TOP" width="9%">3 - 10</td>
<td valign="TOP" width="27%">UTC / GPS TOW</td>
<td valign="TOP" width="16%">DOUBLE</td>
<td valign="TOP" width="48%">UTC / GPS time of week (seconds)</td>
</tr>
<tr>
<td valign="CENTER" width="9%">11</td>
<td valign="CENTER" width="27%">Date</td>
<td valign="CENTER" width="16%">BYTE</td>
<td valign="CENTER" width="48%">Day of Month</td>
</tr>
<tr>
<td valign="CENTER" width="9%">12</td>
<td valign="CENTER" width="27%">Month</td>
<td valign="CENTER" width="16%">BYTE</td>
<td valign="CENTER" width="48%">Month of Event</td>
</tr>
<tr>
<td valign="CENTER" width="9%">13 - 14</td>
<td valign="CENTER" width="27%">Year</td>
<td valign="CENTER" width="16%">INT</td>
<td valign="CENTER" width="48%">Year of event</td>
</tr>
<tr>
<td valign="TOP" width="9%">15</td>
<td valign="TOP" width="27%">Receiver Mode</td>
<td valign="TOP" width="16%">BYTE</td>
<td valign="TOP" width="48%">Receiver operating dimensions:&nbsp;<br>
0: Horizontal (2D)&nbsp;<br>
1: Full Position (3D)&nbsp;<br>
2: Single Satellite (0D)&nbsp;<br>
3: Automatic (2D / 3D)&nbsp;<br>
4: DGPS reference&nbsp;<br>
5: Clock hold (2D)&nbsp;<br>
6: Over determined Clock</td>
</tr>
<tr>
<td valign="CENTER" width="9%">15 - 17</td>
<td valign="CENTER" width="27%">UTC Offset</td>
<td valign="CENTER" width="16%">INTEGER</td>
<td valign="CENTER" width="48%">UTC Offset value (seconds)</td>
</tr>
<tr>
<td valign="CENTER" width="9%">18 - 25</td>
<td valign="CENTER" width="27%">Oscillator Bias</td>
<td valign="CENTER" width="16%">DOUBLE</td>
<td valign="CENTER" width="48%">Oscillator BIAS (meters)</td>
</tr>
<tr>
<td valign="TOP" width="9%">26 - 33</td>
<td valign="TOP" width="27%">Oscillator Drift Rate</td>
<td valign="TOP" width="16%">DOUBLE</td>
<td valign="TOP" width="48%">Oscillator Drift (meters / second)</td>
</tr>
<tr>
<td valign="CENTER" width="9%">34 - 37</td>
<td valign="CENTER" width="27%">Bias Uncertainty</td>
<td valign="CENTER" width="16%">SINGLE</td>
<td valign="CENTER" width="48%">Oscillator bias uncertainty (meters)</td>
</tr>
<tr>
<td valign="CENTER" width="9%">38 - 41</td>
<td valign="CENTER" width="27%">Drift Uncertainty</td>
<td valign="CENTER" width="16%">SINGLE</td>
<td valign="CENTER" width="48%">Oscillator bias rate uncertainty (m / sec)</td>
</tr>
<tr>
<td valign="CENTER" width="9%">42 - 49</td>
<td valign="CENTER" width="27%">Latitude</td>
<td valign="CENTER" width="16%">DOUBLE</td>
<td valign="CENTER" width="48%">Latitude in radians</td>
</tr>
<tr>
<td valign="CENTER" width="9%">50 - 57</td>
<td valign="CENTER" width="27%">Longitude</td>
<td valign="CENTER" width="16%">DOUBLE</td>
<td valign="CENTER" width="48%">Longitude in radians</td>
</tr>
<tr>
<td valign="CENTER" width="9%">58 - 65</td>
<td valign="CENTER" width="27%">Altitude</td>
<td valign="CENTER" width="16%">DOUBLE</td>
<td valign="CENTER" width="48%">Altitude above mean sea level, in meters</td>
</tr>
<tr>
<td valign="CENTER" width="9%">66 - 73</td>
<td valign="CENTER" width="27%">Satellite ID</td>
<td valign="CENTER" width="16%">BYTE</td>
<td valign="CENTER" width="48%">SV Id No. of tracked satellites</td>
</tr>
</table>
</center>
<h2><a name="Pinouts"></a><font size="+1">Pinouts</font></h2>
<a href="#Connection">The following connections are required when connecting Palisade with a host:</a><br>
&nbsp;<br>
&nbsp;
<center>
<table>
<tr>
<td><u>Description</u></td>
<td><b>Host</b></td>
<td></td>
<td></td>
<td><b>Palisade&nbsp;</b></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a name="PortA"></a><b>Port A</b></td>
<td><u>DB-9</u></td>
<td><u>DB-25</u></td>
<td></td>
<td><u>RS-232</u></td>
<td><u>RS-422</u></td>
<td><u>Palisade Pin</u></td>
</tr>
<tr>
<td>Receive Data&nbsp;</td>
<td>2</td>
<td>3</td>
<td>&lt;--&gt;</td>
<td>Green</td>
<td>Green / Blue</td>
<td>8 (T-) &amp; 10 (T+)</td>
</tr>
<tr>
<td>Request to Send</td>
<td>7</td>
<td>4</td>
<td>&lt;--&gt;</td>
<td>Gray</td>
<td>Gray / White</td>
<td>6 (R-) &amp; 7 (R+)</td>
</tr>
<tr>
<td>Signal Ground</td>
<td>5</td>
<td>7</td>
<td>&lt;--&gt;</td>
<td>Black</td>
<td>Black</td>
<td>9 (GND)</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a name="PortB"></a><b>Port B</b></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Receive Data&nbsp;</td>
<td>2</td>
<td>3</td>
<td>&lt;--&gt;</td>
<td>Brown</td>
<td>Brown / Yellow</td>
<td>4 (T-) &amp; 5 (T+)</td>
</tr>
<tr>
<td>Transmit Data</td>
<td>3</td>
<td>2</td>
<td>&lt;--&gt;</td>
<td>Violet</td>
<td>Orange/ Violet</td>
<td>2 (R-) &amp; 3 (R+)</td>
</tr>
<tr>
<td>Signal Ground</td>
<td>5</td>
<td>7</td>
<td>&lt;--&gt;</td>
<td>Black</td>
<td>Black</td>
<td>9 (GND)</td>
</tr>
</table>
</center>
<blockquote>
Note: If driving the RS-422 inputs on the Palisade single ended, i.e. using the Green and Gray connections only, does not work on all serial ports. Use of the Palisade NTP Synchronization Interface Module is recommended.</blockquote>
<blockquote>
The 12 pin connector pinout definition:<br>
Face the round 12 pin connector at the end of the cable, with the notch turned upwards.<br>
Pin 1 is to the left of the notch. Pins 2 - 8 wrap around the bottom, counterclockwise to pin 9 on the right of the notch. Pin 10 is just below the notch. Pins 10 (top), 11 (bottom left) and 12 (bottom right) form a triangle in the center of the connector.</blockquote>
<blockquote>
<a name="SIM"></a>Pinouts for the Palisade NTP host adapter (Trimble PN 37070) DB-25 M connector are as follows:</blockquote>
<center>
<table width="682" border="0" cellspacing="0">
<tr>
<td valign="CENTER" width="12%">DB-25M</td>
<td valign="CENTER" width="31%">Conductor&nbsp;</td>
<td valign="CENTER" width="16%">Palisade</td>
<td valign="CENTER" width="41%">Description</td>
</tr>
<tr>
<td valign="CENTER" width="12%">1&nbsp;</td>
<td valign="CENTER" width="31%">Red</td>
<td valign="CENTER" width="16%">1</td>
<td valign="CENTER" width="41%">Power</td>
</tr>
<tr>
<td valign="CENTER" width="12%">7&nbsp;</td>
<td valign="CENTER" width="31%">Black</td>
<td valign="CENTER" width="16%">9</td>
<td valign="CENTER" width="41%">Ground</td>
</tr>
<tr>
<td valign="CENTER" width="12%">9</td>
<td valign="CENTER" width="31%">Black/White</td>
<td valign="CENTER" width="16%">12</td>
<td valign="CENTER" width="41%">PPS -</td>
</tr>
<tr>
<td valign="CENTER" width="12%">10&nbsp;</td>
<td valign="CENTER" width="31%">Green</td>
<td valign="CENTER" width="16%">8</td>
<td valign="CENTER" width="41%">Transmit Port A (T-)</td>
</tr>
<tr>
<td valign="CENTER" width="12%">11&nbsp;</td>
<td valign="CENTER" width="31%">Brown</td>
<td valign="CENTER" width="16%">4</td>
<td valign="CENTER" width="41%">Transmit Port B (T-)</td>
</tr>
<tr>
<td valign="CENTER" width="12%">12&nbsp;</td>
<td valign="CENTER" width="31%">Gray</td>
<td valign="CENTER" width="16%">7</td>
<td valign="CENTER" width="41%">Receive Port A (R+)</td>
</tr>
<tr>
<td valign="CENTER" width="12%">13</td>
<td valign="CENTER" width="31%">Orange</td>
<td valign="CENTER" width="16%">3</td>
<td valign="CENTER" width="41%">Receive Port B (R+)</td>
</tr>
<tr>
<td valign="CENTER" width="12%">21</td>
<td valign="CENTER" width="31%">Orange/White</td>
<td valign="CENTER" width="16%">11</td>
<td valign="CENTER" width="41%">PPS +</td>
</tr>
<tr>
<td valign="CENTER" width="12%">22</td>
<td valign="CENTER" width="31%">Blue</td>
<td valign="CENTER" width="16%">10</td>
<td valign="CENTER" width="41%">Transmit Port A (T+)</td>
</tr>
<tr>
<td valign="CENTER" width="12%">23</td>
<td valign="CENTER" width="31%">Yellow</td>
<td valign="CENTER" width="16%">5</td>
<td valign="CENTER" width="41%">Transmit Port B (T+)</td>
</tr>
<tr>
<td valign="CENTER" width="12%">24</td>
<td valign="CENTER" width="31%">White</td>
<td valign="CENTER" width="16%">6</td>
<td valign="CENTER" width="41%">Receive Port A (R-)</td>
</tr>
<tr>
<td valign="CENTER" width="12%">25</td>
<td valign="CENTER" width="31%">Violet</td>
<td valign="CENTER" width="16%">2</td>
<td valign="CENTER" width="41%">Receive Port B (R-)</td>
</tr>
</table>
</center>
<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>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
;
</body>
</html>

View File

@ -0,0 +1,76 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>PSTI/Traconex 1020 WWV/WWVH Receiver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>PSTI/Traconex 1020 WWV/WWVH Receiver</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.3.<i>u</i><br>
Reference ID: <tt>WWV</tt><br>
Driver ID: <tt>WWV_PST</tt><br>
Serial Port: <tt>/dev/wwv<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
Features: <tt>tty_clk</tt></p>
<h4>Description</h4>
<p>This driver supports the PSTI 1010 and Traconex 1020 WWV/WWVH Receivers. No specific claim of accuracy is made for these receiver, but actual experience suggests that 10 ms would be a conservative assumption.</p>
<p>The DIP-switches should be set for 9600 bps line speed, 24-hour day-of-year format and UTC time zone. Automatic correction for DST should be disabled. It is very important that the year be set correctly in the DIP-switches; otherwise, the day of year will be incorrect after 28 April of a normal or leap year. The propagation delay DIP-switches should be set according to the distance from the transmitter for both WWV and WWVH, as described in the instructions. While the delay can be set only to within 11 ms, the fudge time1 parameter can be used for vernier corrections.</p>
<p>Using the poll sequence <tt>QTQDQM</tt>, the response timecode is in three sections totalling 50 ASCII printing characters, as concatenated by the driver, in the following format:</p>
<pre>
ahh:mm:ss.fffs&lt;cr&gt; yy/dd/mm/ddd&lt;cr&gt;
frdzycchhSSFTttttuuxx&lt;cr&gt;
on-time = first &lt;cr&gt;
hh:mm:ss.fff = hours, minutes, seconds, milliseconds
a = AM/PM indicator (' ' for 24-hour mode)
yy = year (from DIPswitches)
dd/mm/ddd = day of month, month, day of year
s = daylight-saving indicator (' ' for 24-hour mode)
f = frequency enable (O = all frequencies enabled)
r = baud rate (3 = 1200, 6 = 9600)
d = features indicator (@ = month/day display enabled)
z = time zone (0 = UTC)
y = year (5 = 91)
cc = WWV propagation delay (52 = 22 ms)
hh = WWVH propagation delay (81 = 33 ms)
SS = status (80 or 82 = operating correctly)
F = current receive frequency (4 = 15 MHz)
T = transmitter (C = WWV, H = WWVH)
tttt = time since last update (0000 = minutes)
uu = flush character (03 = ^c)
xx = 94 (unknown)</pre>
<p>The alarm condition is indicated by other than <tt>8</tt> at <tt>a</tt>, which occurs during initial synchronization and when received signal is lost for an extended period; unlock condition is indicated by other than <tt>0000</tt> in the <tt>tttt</tt> subfield.</p>
<h4>Monitor Data</h4>
<p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
<dt><tt>time2 <i>time</i></tt>
<dd>Not used by this driver.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt>refid <i>string</i></tt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>WWV</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag3 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag4 0 | 1</tt>
<dd>Not used by this driver.
</dl>
<h4>Additional Information</h4>
<p><a href="../refclock.html">Reference Clock Drivers</a></p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,84 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859- 1">
<meta name="GENERATOR" content="Mozilla/4.06 [en] (X11; I; FreeBSD 3.0-CURRENT i386) [Netscape]">
<title>Motorola Oncore GPS Receiver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Motorola Oncore GPS receiver</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.30.<i>u</i><br>
Reference ID: <tt>GPS</tt><br>
Driver ID: ONCORE<br>
Serial Port: <tt>/dev/oncore.serial.</tt><i>u</i>; &nbsp;9600 baud, 8-bits, no parity.<br>
PPS Port: <tt>/dev/oncore.pps.</tt><i>u</i>;&nbsp; <tt>PPS_CAPTUREASSERT</tt> required,&nbsp; <tt>PPS_OFFSETASSERT</tt> supported.<br>
Configuration File: <tt>/etc/ntp.oncore</tt>, or <tt>/etc/ntp.oncore.</tt><i>u</i>, or <tt>/etc/ntp.oncore</tt><i>u</i>.</p>
<h4>Description</h4>
<p>This driver supports most models of the <a href="http://www.mot.com/AECS/PNSB/products">Motorola Oncore GPS receivers</a> (Basic, PVT6, VP, UT, UT+, GT, GT+, SL, M12), as long as they support the <i>Motorola Binary Protocol</i>.</p>
<p>The interesting versions of the Oncore are the VP, the UT+, the &quot;Remote&quot; which is a prepackaged UT+, and the M12 Timing. The VP is no longer available new, and the UT, GT, and SL are at end-of-life. The Motorola evaluation kit can be recommended. It interfaces to a PC straightaway, using the serial (DCD) or parallel port for PPS input and packs the receiver in a nice and sturdy box. Less expensive interface kits are available from <a href="http://www.tapr.org">TAPR</a> and <a href="http://www.synergy-gps.com">Synergy</a>.<br>
&nbsp;</p>
<center>
<table>
<tr>
<td><img src="../pic/oncore_utplusbig.gif" alt="gif" height="124" width="210"></td>
<td><img src="../pic/oncore_evalbig.gif" alt="gif" height="124" width="182"></td>
<td><img src="../pic/oncore_remoteant.jpg" alt="gif" height="188" width="178"></td>
</tr>
<tr>
<td>
<center>
UT+ oncore</center>
</td>
<td>
<center>
Evaluation kit</center>
</td>
<td>
<center>
Oncore Remote</center>
</td>
</tr>
</table>
</center>
<p>The driver requires a standard <tt>PPS</tt> interface for the pulse-per-second output from the receiver. The serial data stream alone does not provide precision time stamps (0-50msec variance, according to the manual), whereas the PPS output is precise down to 50 nsec (1 sigma) for the VP/UT models and 25 nsec for the M12 Timing. If you do not have the PPS signal available, then you should probably be using the NMEA driver rather than the Oncore driver.</p>
<p>The driver will use the &quot;position hold&quot; mode with user provided coordinates, the receivers built-in site-survey, or a similar algorithm implemented in this driver to determine the antenna position.</p>
<h4>Monitor Data</h4>
The driver always puts a lot of useful information on the clockstats file, and when run with debugging can be quite chatty on stdout. When first starting to use the driver you should definitely review the information written to the clockstats file to verify that the driver is running correctly.
<p>In addition, on platforms supporting Shared Memory, all of the messages received from the Oncore receiver are made available in shared memory for use by other programs. See the <a href="oncore-shmem.html">Oncore-SHMEM</a> manual page for information on how to use this option. For either debugging or using the SHMEM option, an Oncore Reference Manual for the specific receiver in use will be required.</p>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
<dt><tt>time2 <i>time</i></tt>
<dd>Not used by this driver.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt>refid <i>string</i></tt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>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>The driver was initially developed on FreeBSD, and has since been tested on Linux, SunOS and Solaris.</p>
<p><b>Configuration</b></p>
<p>There is a driver specific configuration file <tt>/etc/ntp.oncore</tt> (or <tt>/etc/ntp.oncore.</tt><i>u</i> or <tt>/etc/ntp.oncore</tt><i>u</i> if you must distinguish between more than one Oncore receiver) that contains information on the startup mode, the location of the GPS receiver, an offset of the PPS signal from zero, and the cable delay. The offset shifts the PPS signal to avoid interrupt pileups `on' the second, and adjust the timestamp accordingly. See the driver source for information on this file. The default with no file is: no delay, no offset, and a site survey is done to get the location of the gps receiver.</p>
<p>The edge of the PPS signal that is `on-time' can be set with either flag2 or in the driver specific configuration file with the keywords [ASSERT/CLEAR]. Flag3 (or the word HARDPPS in the driver specific configuration file) will cause the PPS signal to control the kernel PLL.</p>
<p><b>Performance</b></p>
<p>Really good. With the VP/UT+, the generated PPS pulse is referenced to UTC(GPS)&nbsp;with better than 50 nsec (1 sigma) accuracy. The limiting factor will be the timebase of the computer and the precision with which you can timestamp the rising flank of the PPS signal. Using FreeBSD, a FPGA&nbsp;based Timecounter/PPS&nbsp;interface, and an ovenized quartz oscillator, that performance has been reproduced. For more details on this aspect: <a href="http://phk.freebsd.dk/rover.html">Sub-Microsecond timekeeping under FreeBSD</a>.</p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,38 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
<title>Chrono-log K-series WWVB receiver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Chrono-log K-series WWVB receiver</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.32.<i>u</i><br>
Reference ID: <tt>CHRONOLOG</tt><br>
Driver ID: <tt>CHRONOLOG</tt><br>
Serial Port: <tt>/dev/chronolog<i>u</i></tt>; 2400 bps, 8-bits, no parity<br>
<br>
Features: <tt>(none)</tt></p>
<h4>Description</h4>
<p>This driver supports the Chrono-log K-series WWVB receiver. This is a very old receiver without provisions for leap seconds, quality codes, etc. It assumes output in the local time zone, and that the C library mktime()/localtime() routines will correctly convert back and forth between local and UTC. There is a hack in the driver for permitting UTC, but it has not been tested.</p>
<p>Most of this code is originally from refclock_wwvb.c with thanks. It has been so mangled that wwvb is not a recognizable ancestor.</p>
<pre>
Timecode format: Y yy/mm/ddCLZhh:mm:ssCL
Y - year/month/date line indicator
yy/mm/dd -- two-digit year/month/day
C - \r (carriage return)
L - \n (newline)
Z - timestamp indicator
hh:mm:ss - local time
</pre>
<!-- hhmts start -->Last modified: Sun Feb 14 11:57:27 EST 1999 <!-- hhmts end -->
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
<title>Dumb Clock</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Dumb Clock</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.33.<i>u</i><br>
Reference ID: <tt>DUMBCLOCK</tt><br>
Driver ID: <tt>DUMBCLOCK</tt><br>
Serial Port: <tt>/dev/dumbclock<i>u</i></tt>; 9600 bps, 8-bits, no parity<br>
Features: <tt>(none)</tt></p>
<h4>Description</h4>
<p>This driver supports a dumb ASCII clock that only emits localtime at a reliable interval. This has no provisions for leap seconds, quality codes, etc. It assumes output in the local time zone, and that the C library mktime()/localtime() routines will correctly convert back and forth between local and UTC.</p>
<p>Most of this code is originally from refclock_wwvb.c with thanks. It has been so mangled that wwvb is not a recognizable ancestor.</p>
<pre>
Timecode format: hh:mm:ssCL
hh:mm:ss - local time
C - \r (carriage return)
L - \n (newline)
</pre>
<hr>
<!-- hhmts start -->Last modified: Sun Feb 14 12:07:01 EST 1999 <!-- hhmts end -->
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,88 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso8859-1">
<title>Ultralink Clock</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Ultralink Clock</h3>
<hr>
<h4>Synopsis</h4>
Address: 127.127.34.<i>u</i><br>
Reference ID: <tt>WWVB</tt><br>
Driver ID: <tt>ULINK</tt><br>
Serial Port: <tt>/dev/wwvb<i>u</i></tt>; 9600 bps, 8-bits, no parity<br>
<br>
Features: <tt>(none)</tt>
<h4>Description</h4>
<p>This driver supports the Ultralink Model 320 RS-232 powered WWVB receiver. PDF specs available on <a href="http://www.ulio.com">www.ulio.com</a>. This driver also supports the Model 330,331,332 decoders in both polled or continous time code mode. Leap second and quality are supported.</p>
<p>Most of this code is originally from refclock_wwvb.c with thanks. Any mistakes are mine. Any improvements are welcome.</p>
<hr>
<pre>
The Model 320 timecode format is:
&lt;cr&gt;&lt;lf&gt;SQRYYYYDDD+HH:MM:SS.mmLT&lt;cr&gt;
where:
S = 'S' -- sync'd in last hour, '0'-'9' - hours x 10 since last update, else '?'
Q = Number of correlating time-frames, from 0 to 5
R = 'R' -- reception in progress, 'N' -- Noisy reception, ' ' -- standby mode
YYYY = year from 1990 to 2089
DDD = current day from 1 to 366
+ = '+' if current year is a leap year, else ' '
HH = UTC hour 0 to 23
MM = Minutes of current hour from 0 to 59
SS = Seconds of current minute from 0 to 59
mm = 10's milliseconds of the current second from 00 to 99
L = Leap second pending at end of month -- 'I' = inset, 'D'=delete
T = DST &lt;-&gt; STD transition indicators
</pre>
<p>Note that this driver does not do anything with the T flag.</p>
<p>The M320 also has a 'U' command which returns UT1 correction information. It is not used in this driver.</p>
<hr>
<pre>
The Model 33x timecode format is:
S9+D 00 YYYY+DDDUTCS HH:MM:SSl+5
Where:
S = sync indicator S insync N not in sync
the sync flag is WWVB decoder sync
nothing to do with time being correct
9+ = signal level 0 thru 9+ If over 9 indicated as 9+
D = data bit ( fun to watch but useless ;-)
space
00 = hours since last GOOD WWVB frame sync
space
YYYY = current year
+ = leap year indicator
DDD = day of year
UTC = timezone (always UTC)
S = daylight savings indicator
space
HH = hours
: = This is the REAL in sync indicator (: = insync)
MM = minutes
: = : = in sync ? = NOT in sync
SS = seconds
L = leap second flag
+5 = UT1 correction (sign + digit ))
</pre>
<p>This driver ignores UT1 correction,DST indicator,Leap year and signal level.</p>
<hr>
<h4>Fudge factors</h4>
<p>flag1 polling enable (1=poll 0=no poll)</p>
<hr>
<address><a href="mailto:dstrout@linuxfoundary.com">mail</a></address>
<!-- hhmts start -->Last modified: Tue Sep 14 05:53:08 EDT 1999 <!-- hhmts end -->
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,47 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Conrad parallel port radio clock</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Conrad parallel port radio clock</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.35.<i>u</i><br>
Reference ID: <tt>PCF</tt><br>
Driver ID: <tt>PCF</tt><br>
Parallel Port: <tt>/dev/pcfclocks/<i>u</i></tt> or <tt>/dev/pcfclock<i>u</i></tt></p>
<h4>Description</h4>
<p>This driver supports the parallel port radio clock sold by <a href="http://www.conrad-electronic.com/">Conrad Electronic</a> under order numbers 967602 and 642002. This clock is put between a parallel port and your printer. It receives the legal German time, which is either CET or CEST, from the DCF77 transmitter and uses it to set its internal quartz clock. The DCF77 transmitter is located near to Frankfurt/Main and covers a radius of more than 1500 kilometers.</p>
<p>The pcfclock device driver is required in order to use this reference clock driver. Currently device drivers for <a href="http://home.pages.de/%7evoegele/pcf.html">Linux</a> and <a href="http://schumann.cx/pcfclock/">FreeBSD</a> are available.</p>
<p>This driver uses C library functions to convert the received timecode to UTC and thus requires that the local timezone be CET or CEST. If your server is not located in Central Europe you have to set the environment variable TZ to CET before starting <tt>ntpd</tt>.</p>
<h4>Monitor Data</h4>
<p>Each timecode is written to the <tt>clockstats</tt> file in the format <tt>YYYY MM DD HH MI SS</tt>.</p>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.1725.
<dt><tt>time2 <i>time</i></tt>
<dd>Not used by this driver.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt>refid <i>string</i></tt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>PCF</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>If set to 1, the radio clock's synchronisation status bit is ignored, ie the timecode is used without a check.
<dt><tt>flag3 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag4 0 | 1</tt>
<dd>Not used by this driver.
</dl>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,262 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Radio WWV/H Audio Demodulator/Decoder</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Radio WWV/H Audio Demodulator/Decoder</h3>
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="../scripts/links8.txt"></script>
<hr>
<h4>Synopsis</h4>
Address: 127.127.36.<i>u</i><br>
Reference ID: <tt>NONE</tt>, <tt>WV<i>f</i></tt> or <tt>WH<i>f</i></tt><br>
Driver ID: <tt>WWV_AUDIO</tt><br>
Autotune Port: <tt>/dev/icom</tt>; 1200/9600 baud, 8-bits, no parity<br>
Audio Device: <tt>/dev/audio</tt> and <tt>/dev/audioctl</tt>
<h4>Description</h4>
This driver synchronizes the computer time using data encoded in shortwave radio transmissions from NIST time/frequency stations <a href="http://www.bldrdoc.gov/timefreq/stations/wwv.html">WWV</a> in Ft. Collins, CO, and <a href="http://www.bldrdoc.gov/timefreq/stations/wwvh.htm">WWVH</a> in Kauai, HI. Transmissions are made continuously on 2.5, 5, 10 and 15 MHz from both stations and on 20 MHz from WWV. An ordinary shortwave receiver can be tuned manually to one of these frequencies or, in the case of ICOM receivers, the receiver can be tuned automatically by the driver as propagation conditions change throughout the day and night. The performance of this driver when tracking one of the stations is ordinarily better than 1 ms in time with frequency drift less than 0.5 PPM when not tracking either station.
<p>The demodulation and decoding algorithms used by this driver are based on a machine language program developed for the TAPR DSP93 DSP unit, which uses the TI 320C25 DSP chip. The analysis, design and performance of the program running on this unit is described in: Mills, D.L. A precision radio clock for WWV transmissions. Electrical Engineering Report 97-8-1, University of Delaware, August 1997, 25 pp. Available from <a href="http://www.eecis.udel.edu/%7emills/reports.html">www.eecis.udel.edu/~mills/reports.htm</a>. For use in this driver, the original program was rebuilt in the C language and adapted to the NTP driver interface. The algorithms have been modified somewhat to improve performance under weak signal conditions and to provide an automatic station identification feature.</p>
<p>This driver incorporates several features in common with other audio drivers such as described in the <a href="driver7.html">Radio CHU Audio Demodulator/Decoder</a> and the <a href="driver6.html">IRIG Audio Decoder</a> pages. They include automatic gain control (AGC), selectable audio codec port and signal monitoring capabilities. For a discussion of these common features, as well as a guide to hookup, debugging and monitoring, see the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
<p>The WWV signal format is described in NIST Special Publication 432 (Revised 1990). It consists of three elements, a 5-ms, 1000-Hz pulse, which occurs at the beginning of each second, a 800-ms, 1000-Hz pulse, which occurs at the beginning of each minute, and a pulse-width modulated 100-Hz subcarrier for the data bits, one bit per second. The WWVH format is identical, except that the 1000-Hz pulses are sent at 1200 Hz. Each minute encodes nine BCD digits for the time of century plus seven bits for the daylight savings time (DST) indicator, leap warning indicator and DUT1 correction.</p>
<h4>Program Architecture</h4>
<p>As in the original program, the clock discipline is modelled as a Markov process, with probabilistic state transitions corresponding to a conventional clock and the probabilities of received decimal digits. The result is a performance level which results in very high accuracy and reliability, even under conditions when the minute beep of the signal, normally its most prominent feature, can barely be detected by ear with a communications receiver.</p>
<p>The analog audio signal from the shortwave radio is sampled at 8000 Hz and converted to digital representation. The 1000/1200-Hz pulses and 100-Hz subcarrier are first separated using two IIR filters, a 600-Hz bandpass filter centered on 1100 Hz and a 150-Hz lowpass filter. The minute sync pulse is extracted using a 800-ms synchronous matched filter and pulse grooming logic which discriminates between WWV and WWVH signals and noise. The second sync pulse is extracted using a 5-ms FIR matched filter and 8000-stage comb filter.</p>
<p>The phase of the 100-Hz subcarrier relative to the second sync pulse is fixed at the transmitter; however, the audio stage in many radios affects the phase response at 100 Hz in unpredictable ways. The driver adjusts for each radio using two 170-ms synchronous matched filters. The I (in-phase) filter is used to demodulate the subcarrier envelope, while the Q (quadrature-phase) filter is used in a tracking loop to discipline the codec sample clock and thus the demodulator phase.</p>
<p>The data bit probabilities are determined from the subcarrier envelope using a threshold-corrected slicer. The averaged envelope amplitude 30 ms from the beginning of the second establishes the minimum (noise floor) value, while the amplitude 200 ms from the beginning establishes the maximum (signal peak) value. The slice level is midway between these two values. The negative-going envelope transition at the slice level establishes the length of the data pulse, which in turn establish probabilities for binary zero (P0) and binary one (P1). The data values are established by linear interpolation between the pulse lengths for P0 (-1) and P1 (+1). If the driver has not synchronized to the minute pulse, or if the data bit amplitude, signal/noise ratio (SNR) or length are below thresholds, the bit is considered invalid and the data value is ignored.</p>
<p>The difference between the P1 and P0 data values, or likelihood, for each data bit is exponentially averaged in a set of 60 accumulators, one for each second, to determine the semi-static miscellaneous bits, such as DST indicator, leap second warning and DUT1 correction. In this design a data average value larger than a positive threshold is interpreted as +1 (hit) and a value smaller than a negative threshold as a -1 (miss). Values between the two thresholds, which can occur due to signal fades or loss of signal, are interpreted as an erasure and result in no change of indication.</p>
<p>The BCD digit in each digit position of the timecode is represented as four data bits, all of which must be valid for the digit itself to be considered valid. If so, the bits are correlated with the bits corresponding to each of the valid decimal digits in this position. If the digit is invalid, the correlated value for all digits in this position is assumed zero. In either case, the values for all digits are exponentially averaged in a likelihood vector associated with this position. The digit associated with the maximum over all averaged values then becomes the maximum likelihood selection for this position and the ratio of the maximum over the next lower value becomes the likelihood ratio.</p>
<p>The decoding matrix contains nine row vectors, one for each digit position. Each row vector includes the maximum likelihood digit, likelihood vector and other related data. The maximum likelihood digit for each of the nine digit positions becomes the maximum likelihood time of the century. A built-in transition function implements a conventional clock with decimal digits that count the minutes, hours, days and years, as corrected for leap seconds and leap years. The counting operation also rotates the likelihood vector corresponding to each digit as it advances. Thus, once the clock is set, each clock digit should correspond to the maximum likelihood digit as transmitted.</p>
<p>Each row of the decoding matrix also includes a compare counter and the difference (modulo the radix) between the current clock digit and most recently determined maximum likelihood digit. If a digit likelihood exceeds the decision level and the difference is constant for a number of successive minutes in any row, the maximum likelihood digit replaces the clock digit in that row. When this condition is true for all rows and the second epoch has been reliably determined, the clock is set (or verified if it has already been set) and delivers correct time to the integral second. The fraction within the second is derived from the logical master clock, which runs at 8000 Hz and drives all system timing functions.</p>
<p>The logical master clock is derived from the audio codec clock. Its frequency is disciplined by a frequency-lock loop (FLL) which operates independently of the data recovery functions. At averaging intervals determined by the measured jitter, the frequency error is calculated as the difference between the most recent and the current second epoch divided by the interval. The sample clock frequency is then corrected by this amount. When first started, the frequency averaging interval is eight seconds, in order to compensate for intrinsic codec clock frequency offsets up to 125 PPM. Under most conditions, the averaging interval doubles in stages from the initial value to over 1000 seconds, which results in an ultimate frequency precision of 0.125 PPM, or about 11 ms/day.</p>
<p>It is important that the logical clock frequency is stable and accurately determined, since in most applications the shortwave radio will be tuned to a fixed frequency where WWV or WWVH signals are not available throughout the day. In addition, in some parts of the US, especially on the west coast, signals from either or both WWV and WWVH may be available at different times or even at the same time. Since the propagation times from either station are almost always different, each station must be reliably identified before attempting to set the clock.</p>
<p>Station identification uses the 800-ms minute pulse transmitted by each station. In the acquisition phase the entire minute is searched using both the WWV and WWVH matched filters and a pulse gate discriminator similar to that found in radar acquisition and tracking receivers. The peak amplitude found determines a range gate and window where the next pulse is expected to be found. The minute is scanned again to verify the peak is indeed in the window and with acceptable amplitude, SNR and jitter. At this point the receiver begins to track the second sync pulse and operate as above until the clock is set. Once the minute is synchronized, the range gate is fixed and only energy within the window is considered for the minute sync pulse.</p>
<p>It is very important to be able to reliably discriminate between very weak signals in noise and noise alone. The driver very aggresively soaks up every scrap of signal information, but has to be careful to avoid making pseudo-sense of noise alone. The signal quality metric depends on the minute pulse amplitude and SNR together with the data subcarrier amplitude and SNR. If all four values are above defined thresholds a hit is declared, otherwise a miss. The number of hits declared in the last six intervals is the high order bits of the metric value, while the current minute sync pulse amplitude is the low order bits. The metric value is represented on a scale from zero to 100. This is used as a quality indicator and reported in the timecode and also for the autotune function described below.</p>
<h4>Performance</h4>
<p>It is the intent of the design that the accuracy and stability of the indicated time be limited only by the characteristics of the ionospheric propagation medium. Conventional wisdom is that synchronization via the HF medium is good only to a millisecond under the best propagation conditions. The performance of the NTP daemon disciplined by the driver is clearly better than this, even under marginal conditions. Ordinarily, with marginal to good signals and a frequency averaging interval of 1024 s, the frequency is stabilized within 0.1 PPM and the time within 125 <font face="Symbol">m</font>s. The frequency stability characteristic is highly important, since the clock may have to free-run for several hours before reacquiring the WWV/H signal.</p>
<p>The expected accuracy over a typical day was determined using the DSP93 and an oscilloscope and cesium oscillator calibrated with a GPS receiver. With marginal signals and allowing 15 minutes for initial synchronization and frequency compensation, the time accuracy determined from the WWV/H second sync pulse was reliably within 125 <font face="Symbol">m</font>s. In the particular DSP-93 used for program development, the uncorrected CPU clock frequency offset was 45.8&plusmn;0.1 PPM. Over the first hour after initial synchronization, the clock frequency drifted about 1 PPM as the frequency averaging interval increased to the maximum 1024 s. Once reaching the maximum, the frequency wandered over the day up to 1 PPM, but it is not clear whether this is due to the stability of the DSP-93 clock oscillator or the changing height of the ionosphere. Once the frequency had stabilized and after loss of the WWV/H signal, the frequency drift was less than 0.5 PPM, which is equivalent to 1.8 ms/h or 43 ms/d. This resulted in a step phase correction up to several milliseconds when the signal returned.</p>
<p>The measured propagation delay from the WWV transmitter at Boulder, CO, to the receiver at Newark, DE, is 23.5&plusmn;0.1 ms. This is measured to the peak of the pulse after the second sync comb filter and includes components due to the ionospheric propagation delay, nominally 8.9 ms, communications receiver delay and program delay. The propagation delay can be expected to change about 0.2 ms over the day, as the result of changing ionosphere height. The DSP93 program delay was measured at 5.5 ms, most of which is due to the 400-Hz bandpass filter and 5-ms matched filter. Similar delays can be expected of this driver.</p>
<h4>Program Operation</h4>
The driver begins operation immediately upon startup. It first searches for one or both of the stations WWV and WWVH and attempts to acquire minute sync. This may take some fits and starts, as the driver expects to see three consecutive minutes with good signals and low jitter. If the autotune function is active, the driver will rotate over all five frequencies and both WWV and WWVH stations until three good minutes are found.
<p>When a minute sync candidate has been found, the driver acquires second sync, which can take up to several minutes, depending on signal quality. At the same time the driver accumulates likelihood values for each of the nine digits of the clock, plus the seven miscellaneous bits included in the WWV/H transmission format. When five repetitions of all nine digits have decoded correctly, which normally takes 15 minutes with good signals and up to an hour when buried in noise, and the second sync alarm has not been raised for two minutes, the clock is set (or verified) and is selectable to discipline the system clock.</p>
<p>As long as the clock is set or verified, the system clock offsets are provided once each second to the reference clock interface, where they are saved in a buffer. At the end of each minute the buffer samples are groomed by the median filter and trimmed-mean averaging functions. Using these functions, the system clock can in principle be disciplined to a much finer resolution than the 125-<font face="Symbol">m</font>s sample interval would suggest, although the ultimate accuracy is probably limited by propagation delay variations as the ionspheric height varies throughout the day and night.</p>
<p>The codec clock frequency is disciplined during times when WWV/H signals are available. The algorithm refines the frequency offset using increasingly longer averaging intervals to 1024 s, where the precision is about 0.1 PPM. With good signals, it takes well over two hours to reach this degree of precision; however, it can take many more hours than this in case of marginal signals. Once reaching the limit, the algorithm will follow frequency variations due to temperature fluctuations and ionospheric height variations.</p>
<p>It may happen as the hours progress around the clock that WWV and WWVH signals may appear alone, together or not at all. When the driver is first started, the NTP reference identifier appears as <tt>NONE</tt>. When the driver has mitigated which station and frequency is best, it sets the reference identifier to the string WV<i>f</i> for WWV and WH<i>f</i> for WWVH, where <i>f</i> is the frequency in megahertz. If the propagation delays have been properly set with the <tt>fudge time1</tt> (WWV) and <tt>fudge time2</tt> (WWVH) commands in the configuration file, handover from one station to the other is seamless.</p>
<p>Once the clock has been set for the first time, it will appear reachable and selectable to discipline the system clock, even if the broadcast signal fades to obscurity. A consequence of this design is that, once the clock is set, the time and frequency are disciplined only by the second sync pulse and the clock digits themselves are driven by the clock state machine. If for some reason the state machine drifts to the wrong second, it would never reresynchronize. To protect against this most unlikely situation, if after two days with no signals, the clock is considered unset and resumes the synchronization procedure from the beginning.</p>
<p>However, as long as the clock has once been set correctly and allowed to converge on the intrinsic codec clock frequency, it will continue to read correctly after a period of signal loss. Assuming the clock frequency can be disciplined within 1 PPM, it can coast without signals for several days without exceeding that NTP step threshold of 128 ms. During such periods the root dispersion increases at 5 <font face="Symbol">m</font>s per second, which makes the driver appears less likely for selection as time goes on. Eventually, when the dispersion due all causes exceeds 1 s, it is no longer suitable for synchronization at all.</p>
<p>To work well, the driver needs a shortwave receiver with good audio response at 100 Hz. Most shortwave and communications receivers roll off the audio response below 250 Hz, so this can be a problem, especially with receivers using DSP technology, since DSP filters can have very fast rolloff outside the passband. Some DSP transceivers, in particular the ICOM 775, have a programmable low frequency cutoff which can be set as low as 80 Hz. However, this particular radio has a strong low frequency buzz at about 10 Hz which appears in the audio output and can affect data recovery under marginal conditions. Although not tested, it would seem very likely that a cheap shortwave receiver could function just as well as an expensive communications receiver.</p>
<h4>Autotune</h4>
<p>The driver includes provisions to automatically tune the radio in response to changing radio propagation conditions throughout the day and night. The radio interface is compatible with the ICOM CI-V standard, which is a bidirectional serial bus operating at TTL levels. The bus can be connected to a serial port using a level converter such as the CT-17.</p>
<p>Each ICOM radio is assigned a unique 8-bit ID select code, usually expressed in hex format. To activate the CI-V interface, the <tt>mode</tt> keyword of the <tt>server</tt> configuration command specifies a nonzero select code in decimal format. A table of ID select codes for the known ICOM radios is given below. 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. A missing <tt>mode</tt> keyword or a zero argument leaves the interface disabled.</p>
<p>If specified, the driver will attempt to open the device <tt>/dev/icom</tt> and, if successful will activate the autotune function and tune the radio to each operating frequency in turn while attempting to acquire minute sync from either WWV or WWVH. However, the driver is liberal in what it assumes of the configuration. If the <tt>/dev/icom</tt> link is not present or the open fails or the CI-V bus or radio is inoperative, the driver quietly gives up with no harm done.</p>
<p>Once acquiring minute sync, the driver operates as described above to set the clock. However, during seconds 59, 0 and 1 of each minute it tunes the radio to one of the five broadcast frequencies to measure the sync pulse and data pulse amplitudes and SNR and update the signal metric. Each of the five frequencies are probed in a five-minute rotation to build a database of current propagation conditions for all signals that can be heard at the time. At the end of each probe a mitigation procedure scans the database and retunes the radio to the best frequency and station found. For this to work well, the radio should be set for a fast AGC recovery time. This is most important while tracking a strong signal, which is normally the case, and then probing another frequency, which may have much weaker signals.</p>
<p>Reception conditions for each frequency and station are evaluated according to the signal metric, which uses the minute sync pulse amplitude and SNR and data subcarrier amplitude and SNR. The minute pulse is evaluated at second 0, while the data pulse is evaluated at second 1. In principle, the data pulse in second 58 is usable, but the AGC in most radios is not fast enough for a reliable measurement.</p>
<p>The results are summarized in a scoreboard which drives the mitigation function.</p>
<dl>
<dt><tt>0x0001</tt>
<dd>Minute pulse error. For the minute sync pulse in second 0, either the amplitude or SNR is below threshold (2000 and 20 dB, respectively).
<dt><tt>0x0002</tt>
<dd>Data pulse error. For the data pulse in second 1, either the amplitude or SNR is below threshold (1000 and 10 dB, respectively).
<dt><tt>0x0004</tt>
<dd>Probe pulse error. Two or more decoding errors have occurred for the data pulses in seconds 58, 59 and 1.
</dl>
<p>If none of the scoreboard bits are set, a hit is declared, otherwise a miss. At the end of each probe, the frequency and station with the maximum metric is chosen, with ties going first to the highest frequency and then to WWV in order. During the acquisition phase a station is considered valid only if the metric is above 13; after the clock is synchronized a station is valid only if the metric is above 50. If no stations are valid, the driver ignores all signals and sets the reference ID field to NONE.</p>
<h4>Diagnostics</h4>
<p>The autotune process produces diagnostic information along with the timecode. This is very useful for evaluating the performance of the algorithms, as well as radio propagation conditions in general. The message is produced once each minute for each frequency in turn after minute sync has been acquired.</p>
<p><tt>wwv5 port status agc epoch count wwv wwvh</tt></p>
<p>where <tt>port</tt> and <tt>agc</tt> are the audio port and gain, respectively, for this frequency and <tt>wwv</tt> and <tt>wwvh</tt> are two sets of fields, one each for WWV and WWVH. Each of the two fields has the format</p>
<p><tt>ident score metric sync/snr</tt></p>
<p>where <tt>ident </tt>encodes the station (<tt>C</tt> for WWV, <tt>H</tt> for WWVH) and frequency (2, 5, 10, 15 or 20), <tt>score</tt> is a 32-bit shift register recording the hits (1) and misses (0) of the last 32 probes (hits and misses enter from the right), <tt>metric</tt> is as described above, <tt>sync</tt> is the minute sync pulse amplitude and <tt>snr</tt> is the SNR. An example is:</p>
<p><tt>wwv5 2 110d 111 5753 2 WV20 bdeff 100 8348/30.0/-3 WH20 0000 1 22/-12.4</tt></p>
<p>Here the radio is tuned to 20 MHz and the line-in port AGC is currently 111 at that frequency. The message contains a report for WWV (<tt>WV20</tt>) and WWVH (<tt>WH20</tt>). The WWV report <tt>score</tt> is <tt>bdeff</tt> and the metric is 100, which suggests very good reception conditions, and the minute sync amplitude and SNR are well above thresholds (2000 and 20 dB, respectively). While the message shows solid reception conditions from WWV, this is not the case for WWVH. Both the minute sync amplitude and SNR are below thresholds and the station has not been heard during the last 160 minutes.</p>
<h4>Debugging Aids</h4>
<p>The most convenient way to track the driver status is using the <tt>ntpq</tt> program and the <tt>clockvar</tt> command. This displays the last determined timecode and related status and error counters, even when the driver is not disciplining the system clock. If the debugging trace feature (<tt>-d</tt> on the <tt>ntpd</tt> command line)is enabled, the driver produces detailed status messages as it operates. If the <tt>fudge flag 4</tt> is set, these messages are written to the <tt>clockstats</tt> file. All messages produced by this driver have the prefix <tt>wwv</tt> for convenient filtering with the Unix <tt>grep</tt> command.</p>
<p>In the following descriptions the units of amplitude, phase, probability and likelihood are normalized to the range 0-6000 for convenience. In addition, the signal/noise ratio (SNR) and likelihood ratio are measured in decibels and the words with bit fields are in hex. Most messages begin with a leader in the following format:</p>
<p><tt>wwvn ss stat sigl</tt></p>
<p>where <tt>wwvn</tt> is the message code, <tt>ss</tt> the second of minute, <tt>stat</tt> the driver status word and <tt>sigl</tt> the second sync pulse amplitude. A full explanation of the status bits is contained in the driver source listing; however, the following are the most useful for debugging.</p>
<dl>
<dt><tt>0x0001</tt>
<dd>Minute sync. Set when the decoder has identified a station and acquired the minute sync pulse.
<dt><tt>0x0002</tt>
<dd>Second sync. Set when the decoder has acquired the second sync pulse and within 125 <font face="Symbol">m</font>s of the correct phase.
<dt><tt>0x0004</tt>
<dd>digit sync. Set when the decoder has reliably determined at least one digit of the minute. <dt><tt>0x0008</tt>
<dd>Clock set. Set when the decoder has reliably determined all nine digits of the timecode and is selectable to discipline the system clock.
</dl>
<p>With debugging enabled the driver produces messages in the following formats:</p>
<p>Format <tt>wwv8</tt> messages are produced once per minute by the WWV and WWVH station processes before minute sync has been acquired. They show the progress of identifying and tracking the minute pulse of each station.</p>
<p><tt>wwv8 port agc ident comp ampl snr epoch jitr offs</tt></p>
<p>where <tt>port</tt> and <tt>agc</tt> are the audio port and gain, respectively. The <tt>ident</tt>encodes the station (<tt>C</tt> for WWV, <tt>H</tt> for WWVH) and frequency (2, 5, 10, 15 or 20). For the encoded frequency, <tt>comp</tt> is the hit counter, <tt>ampl</tt> the pulse amplitude, <tt>snr</tt> the SNR, <tt>epoch</tt> the sample number of the minute pulse in the minute, <tt>jitr</tt> the change since the last <tt>epoch</tt> and <tt>offs</tt> the minute pulse offset relative to the second pulse. An example is:</p>
<p><tt>wwv8 2 127 WV15 2 9247 30.0 18843 -1 1</tt><br>
<tt>wwv8 2 127 WH15 0 134 -2.9 19016 193 174</tt></p>
<p>Here the radio is tuned to WWV at 15 MHz, using the line-in port and the AGC is currently 127. The driver has not yet acquired minute sync, the station has been heard for at least two minutes, and WWVH is in the noise. The WWV minute pulse amplitude and SNR are well above the threshold (2000 and 6 dB, respectively) and the minute epoch has been determined -1 sample relative to the last one and 1 sample relative to the second sync pulse. The hit counter has incrmented to two; when it gets to three, minute sync has been acquired.</p>
<p>Format <tt>wwv3</tt> messages are produced after minute sync has been acquired and until the seconds unit digit is determined. They show the results of decoding each bit of the transmitted timecode.</p>
<p><tt>wwv3 ss stat sigl ssnr ampl dsnr like</tt></p>
<p>where <tt>ss</tt>, <tt>stat</tt> and <tt>sigl</tt> are as above, <tt>ssnr</tt> is the seconds sync SNR, <tt>ampl</tt> the subcarrier amplitude, <tt>dsnr</tt> the subcarrier SNR and <tt>like</tt> the bit likelihood. An example is:</p>
<p><tt>wwv3 28 0123 4122 30.0 4286 24.8 -5545</tt></p>
<p>Here the driver has acquired minute and second sync, but has not yet determined the seconds unit digit. However, it has just decoded bit 28 of the minute. The results show the second sync pulse amplitude well over the threshold (500), subcarrier amplitude well above the threshold (1000), good SNR well above the threshold (10 dB). The bit is almost certainly a zero and the likelihood of a zero in this second is very high.</p>
<p>Format <tt>wwv4</tt> messages are produced for each of the nine BCD timecode digits until the clock has been set or verified. They show the results of decoding each digit of the transmitted timecode.</p>
<p><tt>wwv4 ss stat sigl radx ckdig mldig diff cnt like snr</tt></p>
<p>where <tt>ss</tt>, <tt>stat</tt> and <tt>sigl</tt> are as above, <tt>radx</tt> is the digit radix (3, 4, 6, 10), <tt>ckdig</tt> the current clock digit, <tt>mldig</tt> the maximum likelihood digit, <tt>diff</tt> the difference between these two digits modulo the radix, <tt>cnt</tt> the compare counter, <tt>like</tt> the digit likelihood and <tt>snr</tt> the likelihood ratio. An example is:</p>
<p><tt>wwv4 8 010f 5772 10 9 9 0 6 4615 6.1</tt></p>
<p>Here the driver has previousl set or verified the clock. It has just decoded the digit preceding second 8 of the minute. The digit radix is 10, the current clock and maximum likelihood digits are both 9, the likelihood is well above the threshold (1000) and the likelihood function well above threshold (3.0 dB). Short of a hugely unlikely probability conspiracy, the clock digit is most certainly a 9.</p>
<p>Format <tt>wwv2</tt> messages are produced at each master oscillator frequency update, which starts at 8 s, but eventually climbs to 1024 s. They show the progress of the algorithm as it refines the frequency measurement to a precision of 0.1 PPM.</p>
<p><tt>wwv2 ss stat sigl epoch maxrun jitr avinc avint wiggle freq</tt></p>
<p>where <tt>ss</tt>, <tt>stat</tt> and <tt>sigl</tt> are as above, <tt>epoch</tt> the codec clock at the seconds epoch, <tt>maxrun </tt>the maximum run length, <tt>jitr</tt> the jitter counter, <tt>avinc</tt> the increment counter, <tt>avint</tt> the averaging interval, <tt>phase</tt> the phase correction and <tt>freq</tt> the current frequency (PPM). An example is:</p>
<p><tt>wwv2 22 030f 5795 7433 223 0 3 256 0 49.0</tt></p>
<p>Here the driver has acquired minute and second sync and set the clock. The averaging interval has increased to 256 s on the way to 1024 s, has stayed at that interval for 3 averaging intervals and the current frequency is 49.0 PPM.</p>
<p>If the CI-V interface for ICOM radios is active, a debug level greater than 1 will produce a trace of the CI-V command and response messages. Interpretation of these messages requires knowledge of the CI-V protocol, which is beyond the scope of this document.</p>
<h4>Monitor Data</h4>
When enabled by the <tt>filegen</tt> facility, every received timecode is written to the <tt>clockstats</tt> file in the following format:
<pre>
sq yyyy ddd hh:mm:ss ld du lset agc ident metric errs freq cons
s sync indicator (?&nbsp;or space)
q quality character (see below)
yyyy Gregorian year
ddd day of year
hh hour of day
mm minute of hour
l leap second warning
d DST state
dut DUT sign and magnitude
lset minutes since last set
agc audio gain
ident station identifier and frequency
metric signal metric (0-100)
errs data bit error counter
freq frequency offset
avgt frequency averaging interval
</pre>
The fields beginning with <tt>year</tt> and extending through <tt>dut</tt> are decoded from the received data and are in fixed-length format. The <tt>agc</tt> and <tt>lset</tt> fields, as well as the following driver-dependent fields, are in variable-length format.
<dl>
<dt><tt>s</tt>
<dd>The sync indicator is initially <tt>?</tt> before the clock is set, but turns to space when all nine digits of the timecode are correctly set and the decoder is synchronized to the station within 125 <font face="Symbol">m</font>s. <dt><tt>q</tt>
<dd>The quality character is a four-bit hexadecimal code showing which alarms have been raised. Each bit is associated with a specific alarm condition according to the following: <dl>
<dt><tt>0x8</tt>
<dd>Sync alarm. The decoder is not synchronized to the station within 125 <font face="Symbol">m</font>s. <dt><tt>0x4</tt>
<dd>Error alarm. More than 30 data bit errors occurred in the last minute.
<dt><tt>0x2</tt>
<dd>Symbol alarm. The probability of correct decoding for a digit or miscellaneous bit has fallen below the threshold.
<dt><tt>0x1</tt>
<dd>Decoding alarm. A maximum likelihood digit fails to agree with the current associated clock digit.
</dl>It is important to note that one or more of the above alarms does not necessarily indicate a clock error, but only that the decoder has detected a condition that may eventually result in an error. <dt><tt>yyyy ddd hh:mm:ss</tt>
<dd>The timecode format itself is self explanatory. Since the driver latches the on-time epoch directly from the second sync pulse, the seconds fraction is always zero. Although the transmitted timecode includes only the year of century, the Gregorian year is augmented by 2000. <dt><tt>l</tt>
<dd>The leap second warning is normally space, but changes to <tt>L</tt> if a leap second is to occur at the end of the month of June or December.
<dt><tt>d</tt>
<dd>The DST state is <tt>S</tt> or <tt>D</tt> when standard time or daylight time is in effect, respectively. The state is <tt>I</tt> or <tt>O</tt> when daylight time is about to go into effect or out of effect, respectively.
<dt><tt>dut</tt>
<dd>The DUT sign and magnitude shows the current UT1 offset relative to the displayed UTC time, in deciseconds.
<dt><tt>lset</tt>
<dd>Before the clock is set, the interval since last set is the number of minutes since the driver was started; after the clock is set, this is number of minutes since the decoder was last synchronized to the station within 125 <font face="Symbol">m</font>s. <dt><tt>agc</tt>
<dd>The audio gain shows the current codec gain setting in the range 0 to 255. Ordinarily, the receiver audio gain control or IRIG level control should be set for a value midway in this range.
<dt><tt>ident</tt>
<dd>The station identifier shows the station, <tt>C</tt> for WWV or <tt>H</tt> for WWVH, and frequency being tracked. If neither station is heard on any frequency, the reference identifier shows <tt>NONE</tt>.
<dt><tt>metric</tt>
<dd>The signal metric described above from 0 (no signal) to 100 (best).
<dt><tt>errs</tt>
<dd>The bit error counter is useful to determine the quality of the data signal received in the most recent minute. It is normal to drop a couple of data bits under good signal conditions and increasing numbers as conditions worsen. While the decoder performs moderately well even with half the bits are in error in any minute, usually by that point the metric drops below threshold and the decoder switches to a different frequency. <dt><tt>freq</tt>
<dd>The frequency offset is the current estimate of the codec frequency offset to within 0.1 PPM. This may wander a bit over the day due to local temperature fluctuations and propagation conditions.
<dt><tt>avgt</tt>
<dd>The averaging time is the interval between frequency updates in powers of two to a maximum of 1024 s. Attainment of the maximum indicates the driver is operating at the best possible resolution in time and frequency.
</dl>
<p>An example timecode is:</p>
<p><tt>0 2000 006 22:36:00 S +3 1 115 WV20 86 5 66.4 1024</tt></p>
<p>Here the clock has been set and no alarms are raised. The year, day and time are displayed along with no leap warning, standard time and DUT +0.3 s. The clock was set on the last minute, the AGC is safely in the middle ot the range 0-255, and the receiver is tracking WWV on 20 MHz. Good receiving conditions prevail, as indicated by the metric 86 and 5 bit errors during the last minute. The current frequency is 66.4 PPM and the averaging interval is 1024 s, indicating the maximum precision available.</p>
<h4>Modes</h4>
<p>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. Following are the ID select codes for the known radios. These codes are for 9600 baud rate; for 1200 baud rate add 128.</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>IC725</td>
<td>0x28</td>
<td>40</td>
<td>IC781</td>
<td>0x26</td>
<td>38</td>
</tr>
<tr>
<td>IC726</td>
<td>0x30</td>
<td>48</td>
<td>R7000</td>
<td>0x08</td>
<td>8</td>
</tr>
<tr>
<td>IC735</td>
<td>0x04</td>
<td>4</td>
<td>R71</td>
<td>0x1A</td>
<td>26</td>
</tr>
<tr>
<td>IC751</td>
<td>0x1c</td>
<td>28</td>
<td>R7100</td>
<td>0x34</td>
<td>52</td>
</tr>
<tr>
<td>IC761</td>
<td>0x1e</td>
<td>30</td>
<td>R72</td>
<td>0x32</td>
<td>50</td>
</tr>
<tr>
<td>IC765</td>
<td>0x2c</td>
<td>44</td>
<td>R8500</td>
<td>0x4a</td>
<td>74</td>
</tr>
<tr>
<td>IC775</td>
<td>0x46</td>
<td>68</td>
<td>R9000</td>
<td>0x2a</td>
<td>42</td>
</tr>
</table>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the propagation delay for WWV (40:40:49.0N 105:02:27.0W), in seconds and fraction, with default 0.0.
<dt><tt>time2 <i>time</i></tt>
<dd>Specifies the propagation delay for WWVH (21:59:26.0N 159:46:00.0W), in seconds and fraction, with default 0.0.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt>refid <i>string</i></tt>
<dd>Ordinarily, this field specifies the driver reference identifier; however, the driver sets the reference identifier automatically as described above.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>Specifies the microphone port if set to zero or the line-in port if set to one. It does not seem useful to specify the compact disc player port.
<dt><tt>flag3 0 | 1</tt>
<dd>Enables audio monitoring of the input signal. For this purpose, the speaker volume must be set before the driver is started.
<dt><tt>flag4 0 | 1</tt>
<dd>Enable verbose <tt>clockstats</tt> recording if set.
</dl>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,50 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Forum Graphic GPS Dating station</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Forum Graphic GPS Dating station</h3>
<hr>
<h4>Synopsis</h4>
<p>Address: 127.127.37.<i>u</i><br>
Reference ID: <tt>GPS</tt><br>
Driver ID: <tt>GPS</tt><br>
Parallel Port: <tt>/dev/fgclock<i>u</i></tt></p>
<h4>Description</h4>
<p>This driver supports the Forum Graphic GPS Dating station sold by <a href="http://www.emr.fr/gpsclock.html">EMR company</a>.</p>
<p>Unfortunately sometime FG GPS start continues reporting of the same date. The only way to fix this problem is GPS power cycling and ntpd restart after GPS power-up.</p>
<p>After Jan,10 2000 my FG GPS unit start send a wrong answer after 10:00am till 11:00am. It repeat hour value in result string twice. I wroite a small code to avoid such problem. Unfortunately I have no second FG GPS unit to evaluate this problem. Please let me know if your GPS has no problems after Y2K.</p>
<p></p>
<h4>Monitor Data</h4>
<p>Each timecode is written to the <tt>clockstats</tt> file in the format <tt>YYYY YD HH MI SS</tt>.</p>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
<dt><tt>time2 <i>time</i></tt>
<dd>Not used by this driver.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt>refid <i>string</i></tt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>FG</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag3 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag4 0 | 1</tt>
<dd>Not used by this driver.
</dl>
<hr>
<address>Dmitry Smirnov (das@amt.ru)</address>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,138 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>hopf clock drivers by ATLSoft</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<h1><font face="Arial"><i><blink><font size="5">hopf</font></blink></i><font size="+2"> </font><font size="3">Serial Line Receivers (6021 and&nbsp; kompatible)</font></font></h1>
<hr>
<h2><font size="+1">Synopsis</font></h2>
<table width="100%" border="0" cellspacing cellpadding>
<tr>
<td>
<table border="0" cellpadding="3" bgcolor="#C0C0C0">
<tr>
<td height="21">
<div align="right">
<tt>Address:&nbsp;&nbsp;</tt></div>
</td>
<td><b>127.127.38.<i>X</i></b></td>
</tr>
<tr>
<td height="1">
<div align="right">
<tt>Reference ID:&nbsp;&nbsp;</tt></div>
</td>
<td height="1"><a name="REFID"></a><b>.hopf. </b>(default)<b>, GPS, DCF</b></td>
</tr>
<tr>
<td height="21">
<div align="right">
<tt>Driver ID:&nbsp;&nbsp;</tt></div>
</td>
<td height="21"><b>HOPF_S</b></td>
</tr>
<tr>
<td height="16">
<div align="right">
<tt>Serial Port:&nbsp;&nbsp;</tt></div>
</td>
<td height="16"><b>/dev/hopfclock<i>X</i></b></td>
</tr>
<tr>
<td height="23">
<div align="right">
<tt><font size="+1">Serial I/O</font>:&nbsp;&nbsp;</tt></div>
</td>
<td height="23"><b>9600 baud, 8-bits, 1-stop, no parity</b></td>
</tr>
</table>
</td>
<td align="center"><img src="../pic/fg6021.gif" height="207" width="238" border="0"></td>
</tr>
</table>
<hr>
<h2><font size="+1">Description</font></h2>
<p>The <b>refclock_hopf_serial</b> driver supports <a href="http://www.hopf.com">hopf electronic receivers</a> with serial Interface kompatibel 6021.<br>
</p>
<p>Additional software and information about the software drivers is available from: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a>.<br>
</p>
<p>Latest NTP driver source, executables and documentation is maintained at: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a></p>
<hr>
<h2><font size="+1">Operating System Compatibility</font></h2>
<p align="left">The hopf clock driver has been tested on the following software and hardware platforms:<br>
&nbsp;</p>
<table bgcolor="#C0C0C0">
<tr>
<td valign="CENTER" nowrap width="23%">
<p align="left"><b>Platform</b></p>
</td>
<td valign="CENTER" nowrap>
<p align="left"><b>Operating System</b></p>
</td>
</tr>
<tr>
<td valign="CENTER" nowrap width="23%">
<p align="left">i386 (PC)&nbsp;</p>
</td>
<td valign="CENTER" nowrap>
<p align="left">Linux</p>
</td>
</tr>
<tr>
<td nowrap>
<p align="left">i386 (PC)&nbsp;</p>
</td>
<td nowrap>
<p align="left">Windows NT</p>
</td>
</tr>
<tr>
<td nowrap>
<p align="left">i386 (PC)&nbsp;</p>
</td>
<center>
<td nowrap>Windows 2000</td>
</center>
</tr>
</table>
<hr>
<h2><font size="+1">O/S Serial Port Configuration</font></h2>
The driver attempts to open the device <b><tt><a href="#REFID">/dev/hopfclock<i>X</i></a></tt></b> where <i><b>X</b></i> is the NTP refclock unit number as defined by the LSB of the refclock address.&nbsp; Valid refclock unit numbers are 0 - 3.
<p>The user is expected to provide a symbolic link to an available serial port device.&nbsp; This is typically performed by a command such as:</p>
<blockquote>
<tt>ln -s /dev/ttyS0 /dev/hopfclock0</tt></blockquote>
Windows NT does not support symbolic links to device files.&nbsp;<br>
<b>COMx</b>: is used by the driver, based on the refclock unit number, where <b>unit 1</b> corresponds to <b>COM1</b>: and <b>unit 3</b> corresponds to <b>COM3</b>:<br>
&nbsp;
<hr>
<h2><font size="+1">Fudge Factors</font></h2>
<dl>
<dt><b><a name="time1"></a><tt><font size="+1"><a href="#Configuration">time1 <i>time</i></a></font></tt></b>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0. Should be set to 20 milliseconds to correct serial line and operating system delays incurred in capturing time stamps from the synchronous packets.
<dt><tt><font size="+1"><a href="#REFID"><b>refid <i>string</i></b></a></font></tt>
<dd>Specifies the driver reference identifier, <b>GPS </b><i>or</i> <b>DCF</b>.
<dt><tt><font size="+1"><b>flag1 0 | 1</b></font></tt>
<dd>When set to 1, driver sync's even if only crystal driven.
</dl>
<hr>
<h2><a name="DataFormat"></a><font size="+1">Data Format</font></h2>
<p>as specified in clock manual under pt. <u>[ <span style="font-size:10.0pt;font-family:
Arial;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Times New Roman&quot;;
mso-ansi-language:EN-GB;mso-fareast-language:DE;mso-bidi-language:AR-SA" lang="EN-GB"><b>Data String for NTP</b> ( <b><i>Network Time Protocol </i></b>) </span>]</u></p>
<hr>
<h3>Questions or Comments:</h3>
<p><a href="mailto:altmeier@atlsoft.de">Bernd Altmeier</a><a href="http://www.ATLSoft.de"><br>
Ing.-B&uuml;ro f&uuml;r Software www.ATLSoft.de</a></p>
<p>(last updated 02/28/2001)<br>
&nbsp;</p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,116 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>hopf clock drivers by ATLSoft</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<h1><font face="Arial"><i><blink><font size="5">hopf</font></blink></i><font size="+2"> </font><font size="3">PCI-Bus Receiver (6039 GPS/DCF77)</font></font></h1>
<hr>
<div align="center">
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%">
<h2><font size="+1">Synopsis</font></h2>
<table border="0" cellpadding="3" bgcolor="#C0C0C0">
<tr>
<td height="21">
<div align="right">
<tt>Address:&nbsp;&nbsp;</tt></div>
</td>
<td height="21"><b>127.127.39.<i>X</i></b></td>
</tr>
<tr>
<td height="21">
<div align="right">
<tt>Reference ID:&nbsp;&nbsp;</tt></div>
</td>
<td height="21"><a name="REFID"></a><b>.hopf. </b>(default)<b>, GPS, DCF</b></td>
</tr>
<tr>
<td height="21">
<div align="right">
<tt>Driver ID:&nbsp;&nbsp;</tt></div>
</td>
<td height="21"><b>HOPF_P</b></td>
</tr>
</table>
</td>
<td align="center" valign="middle"><font face="Arial"><i><blink><font size="5"><img src="../pic/fg6039.jpg" height="140" width="141" border="0"></font></blink></i></font></td>
</tr>
</table>
</center>
</div>
<hr>
<h2><font size="+1">Description</font></h2>
The <b>refclock_hopf_pci </b>driver supports the <a href="http://www.hopf.com">hopf</a> PCI-bus interface 6039 GPS/DCF77.<br>
Additional software and information about the software drivers maybe available from: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a>.<br>
Latest NTP driver source, executables and documentation is maintained at: <a href="http://www.ATLSoft.de/ntp">http://www.ATLSoft.de/ntp</a>
<hr>
<h2><font size="+1">Operating System Compatibility</font></h2>
<p align="left">The hopf clock driver has been tested on the following software and hardware platforms:<br>
&nbsp;</p>
<table bgcolor="#C0C0C0">
<tr>
<td valign="CENTER" nowrap width="23%">
<p align="left"><b>Platform</b></p>
</td>
<td valign="CENTER" nowrap>
<p align="left"><b>Operating System</b></p>
</td>
</tr>
<tr>
<td valign="CENTER" nowrap width="23%">
<p align="left">i386 (PC)&nbsp;</p>
</td>
<td valign="CENTER" nowrap>
<p align="left">Linux</p>
</td>
</tr>
<tr>
<td nowrap>
<p align="left">i386 (PC)&nbsp;</p>
</td>
<td nowrap>
<p align="left">Windows NT</p>
</td>
</tr>
<tr>
<td nowrap>
<p align="left">i386 (PC)&nbsp;</p>
</td>
<center>
<td nowrap>Windows 2000</td>
</center>
</tr>
</table>
<hr>
<h2><font size="+1">O/S System Configuration</font></h2>
<p><b>UNIX</b></p>
The driver attempts to open the device <b><tt><a href="#REFID">/dev/hopf6039</a></tt></b> . The device entry will be made by the installation process of the kernel module for the PCI-bus board. The driver sources belongs to the delivery equipment of the PCI-board.
<p><b>Windows NT/2000</b></p>
<p>The driver attempts to open the device by calling the function &quot;OpenHopfDevice()&quot;. This function will be installed by the Device Driver for the PCI-bus board. The driver belongs to the delivery equipment of the PCI-board.</p>
<hr>
<h2><font size="+1">Fudge Factors</font></h2>
<dl>
<dt><tt><font size="+1"><a href="#REFID"><b>refid <i>string</i></b></a></font></tt>
<dd>Specifies the driver reference identifier, <b>GPS </b><i>or</i> <b>DCF</b>.
<dt><tt><font size="+1"><b>flag1 0 | 1</b></font></tt>
<dd>When set to 1, driver sync's even if only crystal driven.
</dl>
<hr>
<h3>Questions or Comments:</h3>
<p><a href="mailto:altmeier@atlsoft.de">Bernd Altmeier</a><a href="http://www.ATLSoft.de"><br>
Ing.-B&uuml;ro f&uuml;r Software www.ATLSoft.de</a></p>
<p>(last updated 03/02/2001)<br>
&nbsp;</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>
<title>Spectracom 8170 and Netclock/2 WWVB Receivers</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Spectracom 8170 and Netclock/2 WWVB Receivers</h3>
<hr>
<h4>Synopsis</h4>
Address: 127.127.4.<i>u</i><br>
Reference ID: <tt>WWVB</tt><br>
Driver ID: <tt>WWVB_SPEC</tt><br>
Serial Port: <tt>/dev/wwvb<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
Features: <tt>tty_clk</tt>
<h4>Description</h4>
<p>This driver supports all known Spectracom radio and satellite clocks, including the Model 8170 and Netclock/2 WWVB Synchronized Clocks and the Netclock/GPS GPS Master Clock. The claimed accuracy of the WWVB clocks is 100 usec relative to the broadcast signal. These clocks have proven a reliable source of time, except in some parts of the country with high levels of conducted RF interference. WIth the GPS clock the claimed accuracy is 130 ns. However, in most cases the actual accuracy is limited by the precision of the timecode and the latencies of the serial interface and operating system.</p>
<p>The DIPswitches on these clocks should be set to 24-hour display, AUTO DST off, data format 0 or 2 (see below) and baud rate 9600. If this clock is used as the source for the IRIG Audio Decoder (<tt>refclock_irig.c</tt> in this distribution), set the DIPswitches for AM IRIG output and IRIG format 1 (IRIG B with signature control).</p>
<p>There are two timecode formats used by these clocks. Format 0, which is available with all clocks, and format 2, which is available with all clocks except the original (unmodified) Model 8170.</p>
<p>Format 0 (22 ASCII printing characters):<br>
&lt;cr&gt;&lt;lf&gt;i ddd hh:mm:ss TZ=zz&lt;cr&gt;&lt;lf&gt;</p>
<p>on-time = first &lt;cr&gt;<br>
i = synchronization flag (' ' = in synch, '?' = out synch)<br>
hh:mm:ss = hours, minutes, seconds</p>
<p>The alarm condition is indicated by other than ' ' at <tt>i</tt>, which occurs during initial synchronization and when received signal is lost for about ten hours.</p>
<p>Format 2 (24 ASCII printing characters):<br>
lt;cr&gt;lf&gt;iqyy ddd hh:mm:ss.fff ld</p>
<p>on-time = &lt;cr&gt;<br>
i = synchronization flag (' ' = in synch, '?' = out synch)<br>
q = quality indicator (' ' = locked, 'A'...'D' = unlocked)<br>
yy = year (as broadcast)<br>
ddd = day of year<br>
hh:mm:ss.fff = hours, minutes, seconds, milliseconds</p>
<p>The alarm condition is indicated by other than ' ' at <tt>i</tt>, which occurs during initial synchronization and when received signal is lost for about ten hours. The unlock condition is indicated by other than ' ' at <tt>q</tt>.</p>
<p>The <tt>q</tt> is normally ' ' when the time error is less than 1 ms and a character in the set <tt>A...D</tt> when the time error is less than 10, 100, 500 and greater than 500 ms respectively. The <tt>l</tt> is normally ' ', but is set to <tt>L</tt> early in the month of an upcoming UTC leap second and reset to ' ' on the first day of the following month. The <tt>d</tt> is set to <tt>S</tt> for standard time <tt>S</tt>, <tt>I</tt> on the day preceding a switch to daylight time, <tt>D</tt> for daylight time and <tt>O</tt> on the day preceding a switch to standard time. The start bit of the first &lt;cr&gt; is synchronized to the indicated time as returned.</p>
<p>This driver does not need to be told which format is in use - it figures out which one from the length of the message. A three-stage median filter is used to reduce jitter and provide a dispersion measure. The driver makes no attempt to correct for the intrinsic jitter of the radio itself, which is a known problem with the older radios.</p>
<h4>Monitor Data</h4>
<p>The driver writes each timecode as received to the <tt>clockstats</tt> file. When enabled by the <tt>flag4</tt> fudge flag, a table of quality data maintained internally by the Netclock/2 is retrieved and written to the <tt>clockstats</tt> file when the first timecode message of a new dayis received.</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>WWVB</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>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,99 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>JJY Receivers</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>JJY Receivers</h3>
<hr>
<h4>Synopsis</h4>
Address: 127.127.40.<i>u</i><br>
Reference ID: <tt>JJY</tt><br>
Driver ID: <tt>JJY</tt><br>
Serial Port: <tt>/dev/jjy<i>u</i></tt>; 9600 baud, 8-bits, no parity, 1 stop bit
<h4>Description</h4>
<p>This driver supports the following JJY receivers sold in Japan.</p>
<ul>
<li>Tristate Ltd. JJY01 <a href="http://www.tristate.ne.jp/rf-clock.html">http://www.tristate.ne.jp/rf-clock.htm</a> (Japanese only)<br>
<dl>
<dt>Time code format
<dd><br>
<table>
<tr>
<td>Command</td>
<td>&nbsp;</td>
<td>Reply</td>
</tr>
<tr>
<td><tt>date&lt;CR&gt;&lt;LF&gt;</tt></td>
<td>&nbsp;</td>
<td><tt>YYYY/MM/DD WWW&lt;CR&gt;&lt;LF&gt;</tt></td>
</tr>
<tr>
<td><tt>stim&lt;CR&gt;&lt;LF&gt;</tt></td>
<td>&nbsp;</td>
<td><tt>HH:MM:SS&lt;CR&gt;&lt;LF&gt;</tt></td>
</tr>
</table>
<br>
<dt>NTP configuration ( ntp.conf )
<dd>
<p>server 127.127.40.X mode 1</p>
</dl>
<li>C-DEX Co.,Ltd. JST2000 <a href="http://www.c-dex.co.jp/">http://www.c-dex.co.jp/</a> (Japanese only)<br>
<dl>
<dt>Time code format
<dd><br>
<table>
<tr>
<td>Command</td>
<td>&nbsp;</td>
<td>Reply</td>
</tr>
<tr>
<td><tt>&lt;ENQ&gt;1J&lt;ETX&gt;</tt></td>
<td>&nbsp;</td>
<td><tt>&lt;STX&gt;JYYMMDD HHMMSSS&lt;ETX&gt;</tt></td>
</tr>
</table>
<br>
<dt>NTP configuration ( ntp.conf )
<dd>
<p>server 127.127.40.X mode 2</p>
</dl>
</ul>
<p>JJY is the radio station which transmites the JST (Japan Standard Time) in long wave radio. The station JJY is operated by the Communication Research Laboratory. An operating announcement and some information are avaiable from <a href="http://www.crl.go.jp/">http://www.crl.go.jp/</a> (English and Japanese) and <a href="http://jjy.crl.go.jp/">http://jjy.crl.go.jp/</a> (Written in Japanese only)</p>
<p>The user is expected to provide a symbolic link to an available serial port device. This is typically performed by a command such as:</p>
<p><tt>ln -s /dev/ttyS0 /dev/jjy0</tt></p>
<p>Windows NT does not support symbolic links to device files. COM<i>X</i>: is the unit used by the driver, based on the refclock unit number, where unit 1 corresponds to COM1: and unit 3 corresponds to COM3:</p>
<h4>Monitor Data</h4>
<p>The driver writes each timecode as received to the <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>WWVB</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>
<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>
<title>Zyfer GPStarplus Receiver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Zyfer GPStarplus Receiver</h3>
<hr>
<h4>Synopsis</h4>
Address: 127.127.42.<i>u</i><br>
Reference ID: <tt>GPS</tt><br>
Driver ID: <tt>Zyfer GPStarplus</tt><br>
Serial Port: <tt>/dev/zyfer<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
Features: <tt>(none)</tt>
<h4>Description</h4>
<p>This driver supports the <a href="http://www.zyfer.com/">Zyfer GPStarplus</a> receiver.</p>
<p>The receiver has a DB15 port on the back which has input TxD and RxD lines for configuration and control, and a separate TxD line for the once-per-second timestamp.</p>
<p>Additionally, there are BNC connectors on the back for things like PPS and IRIG output.</p>
<h4>Additional Information</h4>
<p><a href="../refclock.html">Reference Clock Drivers</a></p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,64 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>RIPE NCC interface for Trimble Palisade</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>RIPE NCC interface for Trimble Palisade</h3>
<hr>
<img src="../pic/driver43_2.jpg" alt="Trimble Acutime 2000" align="right">
<h4>Synopsis</h4>
Address: 127.127.43.<i>u</i><br>
Reference ID: <tt>RIPENCC</tt><br>
Driver ID: <tt>RIPENCC</tt>
<h4>Description</h4>
<p>This is a special driver developed to be used in conjuction with the RIPE NCC clock card in the RIPE NCC Test Traffic Measurements project.</p>
<h4>Why this driver?</h4>
<p>The reason why we created a seperated driver for an antenna for which already a (vendor supplied) driver exist is a design decision. To be more specific, the standard Trimble interface uses a 12 pin connector. The cable sold by Trimble to connect to this wire is a very thick cable. Certainly not something you wish to run for several 100 meters through your building. And if you wanted to run it for 100 meters, you always would have to really run the cable, and didn't have the option to use existing wiring.<br>
</p>
<p>This is where we wanted more flexibility. We wanted to be able to use existing wiring in buildings. That leaded us to CAT-5(UTP) which only gives us 8 wires. Therefor we decided to redesing the use of the Trimble antenna. The Trimble supports two modes: EVENT driver and PPS mode. The default is to use the EVENT mode which needs all 12 wires. We only use the PPS timestamps for which we have enough with 8 wires. For our purposes this is more than fine.</p>
More information about the project can be found on the <a href="http://www.ripe.net/test-traffic" target="_new">Test Traffic Measurements</a> website. <img src="../pic/driver43_1.gif" alt="RIPE NCC clock card" align="right">
<h4>RIPE NCC clock card</h4>
<p>The card is very a simple PCI card. The only feature on the bus it uses is the power supply. It uses this power supply to power the Trimble GPS antenna.</p>
<p>The card basicly just is a RS422 to RS232 converter. It gets the Trimble's RS422 signal on a RJ45 connector and transforms that to RS232 on a DIN9 connector. This connector should be loopbacked on the back of the machine to the serial port. As said, the card doesn't do any PCI data transfers.</p>
<p>The schematics of the interface card is available here: <a href="http://www.ripe.net/ripencc/mem-services/ttm/Documents/gps_interface_schematic.pdf">gps_interface_schematic.pdf</a>. You are free to create this card yourself as long as you give some credit or reference to us. Note that we don't sell these cards on a commercial basis, but for interested parties we do have some spares to share.</p>
<p></p>
<h4>Monitor Data</h4>
<p>In the <tt>filegen clockstats</tt> file the following (example) data is collected:</p>
<pre>
52445 41931.275 127.127.40.0 U1 20.6.2002 11:38:51 13 11
52445 41931.395 127.127.40.0 C1 20062002 113851 6 364785 110.2 450 6.7 13 5222.374737 N 0453.268013 E 48 7 11 0 1 -14 20 0 -25
52445 41931.465 127.127.40.0 S1 07 1 1 02 59.3 291.5 39.3
52445 41931.485 127.127.40.0 S1 11 2 1 02 59.9 138.0 60.2
52445 41931.525 127.127.40.0 S1 01 4 1 02 48.4 185.7 28.3
52445 41931.555 127.127.40.0 S1 14 5 2 02 32.7 41.0 15.4
52445 41931.585 127.127.40.0 S1 20 6 1 02 59.9 256.6 78.0
52445 41931.615 127.127.40.0 S1 25 8 2 00 0.0 86.6 20.1
</pre>
<p>This is in the form of:</p>
<pre>
All output lines consist of a prefix and a message, the prefix is:
[days since epoch] [sec.ms since start of day] [peer address]
And all individual messages:
*Primary UTC time packet:
U1 [date] [time] [trackstat] [utcflags]
*Comprehensive time packet:
C1 [date] [time] [mode] [bias] [biasunc] [rate] [rateunc] [utcoff] [latitude] [longtitude] [alt] [vis sat](x8)
*Tracking status packet:
S1 [prn] [channel] [aqflag] [ephstat] [snr] [azinuth] [elevation]
</pre>
<h4>Additional Information</h4>
<p><a href="../refclock.html">Reference Clock Drivers</a></p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,92 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>NeoClock4X</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body>
<h1>NeoClock4X - DCF77 / TDF serial line receiver<br>
</h1>
<hr size="2" width="100%">
<h2>Synopsis</h2>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top">Adress<br>
</td>
<td valign="top">127.127.44.u<br>
</td>
</tr>
<tr>
<td valign="top">Reference ID<br>
</td>
<td valign="top">neol<br>
</td>
</tr>
<tr>
<td valign="top">Driver ID<br>
</td>
<td valign="top">NEOCLK4X<br>
</td>
</tr>
<tr>
<td valign="top">Serial Port<br>
</td>
<td valign="top">/dev/neoclock4x-u<br>
</td>
</tr>
</tbody>
</table>
<br>
</td>
<td align="right" valign="top"><a href="http://www.linum.com"><img src="../pic/neoclock4x.gif" alt="NeoClock4X - DCF77 receiver" height="195" width="150"> </a><br>
</td>
</tr>
</tbody>
</table>
<hr size="2" width="100%">
<h2>Description</h2>
The refclock_neoclock4x driver supports the NeoClock4X receiver available from <a href="http://www.linum.com">Linum Software GmbH</a>. The receiver is available as a <a href="http://www.dcf77.de">DCF77</a> or TDF receiver. Both receivers have the same output string. For more information about the NeoClock4X receiver please visit <a href="http://www.linux-funkuhr.de">http://www.linux-funkuhr.de</a>. &nbsp;
<hr size="2" width="100%">
<h2>Fudge Factors</h2>
<dl>
<dt><b><a href="../clockopt.html">time1 time</a></b>
<dd>Specifies the time offset calibration factor with the default value off 0.16958333 seconds. This offset is used&nbsp; to correct serial line and operating system delays incurred in capturing time stamps. If you want to fudge the time1 offset <b>ALWAYS</b> add a value off 0.16958333. This is neccessary to compensate to delay that is caused by transmit the timestamp at 2400 Baud. If you want to compensate the delay that the DCF77 or TDF radio signal takes to travel to your site simply add the needed millisecond delay to the given value. Note that the time here is given in seconds.
<dd>Default setting is 0.16958333 seconds.<br>
</dl>
<dl>
<dt><b><a href="../clockopt.html">time2 time</a></b>
<dd>Not used by this driver.
</dl>
<dl>
<dt><a href="../clockopt.html"><b>flag1 0 | 1</b></a>
<dd>When set to 1 the driver will feed ntp with timestampe even if the radio signal is lost. In this case an internal backup clock generates the timestamps. This is ok as long as the receiver is synced once since the receiver is able to keep time for a long period.
<dd>Default setting is 0 = don't synchronize to CMOS clock.
<dd>
<dt><a href="../clockopt.html"><b>flag2 0 | 1</b></a>
<dd>You can allow the NeoClock4X driver to use the quartz clock even if it is never synchronized to a radio clock. This is usally not a good idea if you want preceise timestamps since the CMOS clock is maybe not adjusted to a dst status change. So <b>PLEASE</b> switch this only on if you now what you're doing.
<dd>Default setting is 0 = don't synchronize to unsynchronized CMOS clock.
<dt>
<dt><a href="../clockopt.html"><b>flag3 0 | 1</b></a>
<dd>Not used by this driver.<tt><tt><tt><tt><tt><tt> </tt></tt></tt></tt></tt></tt>
<dd>
<dt><a href="../clockopt.html"><b>flag4 0 | 1</b></a>
<dd>It is recommended to allow extensive logging while you setup the NeoClock4X receiver. If you activate flag4 every received data is logged. You should turn off flag4 as soon as the clock works as expected to reduce logfile cluttering.
<dd>Default setting is 0 = don't log received data and converted utc time.
</dl>
<hr size="2" width="100%">
Please send any comments or question to <a href="mailto:neoclock4@linum.com">neoclock4x@linum.com</a>.
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,72 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>TrueTime GPS/GOES/OMEGA Receivers</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>TrueTime GPS/GOES/OMEGA Receivers</h3>
<hr>
<h4>Synopsis</h4>
Address: 127.127.5.<i>u</i><br>
Reference ID: <tt>GPS, OMEGA, GOES</tt><br>
Driver ID: <tt>TRUETIME</tt><br>
Serial Port: <tt>/dev/true<i>u</i></tt>; 9600 baud, 8-bits, no parity<br>
Features: <tt>tty_clk</tt>
<h4>Description</h4>
<p>This driver supports several models models of Kinemetrics/TrueTime timing receivers, including 468-DC MK III GOES Synchronized Clock, GPS- DC MK III and GPS/TM-TMD GPS Synchronized Clock, XL-DC (a 151-602-210, reported by the driver as a GPS/TM-TMD), GPS-800 TCU (an 805-957 with the RS232 Talker/Listener module), OM-DC OMEGA Synchronized Clock, and very likely others in the same model family that use the same timecode formats.</p>
<p>Most of this code is originally from refclock_wwvb.c with thanks. It has been so mangled that wwvb is not a recognizable ancestor.</p>
<p>Timcode format: <tt>ADDD:HH:MM:SSQCL</tt> A - control A (this is stripped before we see it) Q - Quality indication (see below) C - Carriage return L - Line feed Quality codes indicate possible error of</p>
<dl>
<dt>468-DC GOES Receiver<br>
GPS-TM/TMD Receiver
<dd>? +/- 500 milliseconds # +/- 50 milliseconds<br>
* +/- 5 milliseconds . +/- 1 millisecond<br>
space less than 1 millisecond
<dt>OM-DC OMEGA Receiver:
<dd>&gt; +/- 5 seconds<br>
? +/- 500 milliseconds # +/- 50 milliseconds<br>
* +/- 5 milliseconds . +/- 1 millisecond<br>
A-H less than 1 millisecond. Character indicates which station is being received as follows<br>
A = Norway, B = Liberia, C = Hawaii, D = North Dakota, E = La Reunion, F = Argentina, G = Australia, H = Japan<br>
The carriage return start bit begins on 0 seconds and extends to 1 bit time.
</dl>
<h4>Notes on 468-DC and OMEGA receiver:</h4>
<p>Send the clock a <tt>R</tt> or <tt>C</tt> and once per second a timestamp will appear. Send a <tt>R</tt> to get the satellite position once (GOES only).</p>
<h4>Notes on the 468-DC receiver:</h4>
<p>Since the old east/west satellite locations are only historical, you can't set your clock propagation delay settings correctly and still use automatic mode. The manual says to use a compromise when setting the switches. This results in significant errors. The solution; use fudge time1 and time2 to incorporate corrections. If your clock is set for 50 and it should be 58 for using the west and 46 for using the east, use the line</p>
<p><tt>fudge 127.127.5.0 time1 +0.008 time2 -0.004</tt></p>
<p>This corrects the 4 milliseconds advance and 8 milliseconds retard needed. The software will ask the clock which satellite it sees.</p>
<p>The PCL720 from PC Labs has an Intel 8253 look-alike, as well as a bunch of TTL input and output pins, all brought out to the back panel. If you wire a PPS signal (such as the TTL PPS coming out of a GOES or other Kinemetrics/Truetime clock) to the 8253's GATE0, and then also wire the 8253's OUT0 to the PCL720's INPUT3.BIT0, then we can read CTR0 to get the number of microseconds since the last PPS upward edge, mediated by reading OUT0 to find out if the counter has wrapped around (this happens if more than 65535us (65ms) elapses between the PPS event and our being called.)</p>
<h4>Monitor Data</h4>
<p>When enabled by the <tt>flag4</tt> fudge flag, every received timecode is written as-is to the <tt>clockstats</tt> file.</p>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, to be used for the West satellite, with default 0.0.
<dt><tt>time2 <i>time</i></tt>
<dd>. Specifies the time offset calibration factor, in seconds and fraction, to be used for the East satellite, with default 0.0.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt>refid <i>string</i></tt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>TRUE</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Silence the clock side of ntpd, just reading the clock without trying to write to it.
<dt><tt>flag2 0 | 1</tt>
<dd>Generate a debug file /tmp/true%d.
<dt><tt>flag3 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag4 0 | 1</tt>
<dd>Not used by this driver.
</dl>
<h4>Additional Information</h4>
<p><a href="../refclock.html">Reference Clock Drivers</a> <a href="../index.html"></a></p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,89 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>IRIG Audio Decoder</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>IRIG Audio Decoder</h3>
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="../scripts/links8.txt"></script>
<hr>
<h4>Synopsis</h4>
Address: 127.127.6.<i>u</i><br>
Reference ID: <tt>IRIG</tt><br>
Driver ID: <tt>IRIG_AUDIO</tt><br>
Audio Device: <tt>/dev/audio</tt> and <tt>/dev/audioctl</tt>
<p>Note: This driver supersedes an older one of the same name, address and ID which required replacing the original kernel audio driver with another which worked only on older Sun SPARC architectures and SunOS operating systems. The new driver requires no modification of the operating system and works on FreeBSD, SunOS and Solaris. While it is generic and likely portable to other systems, it is somewhat slower than the original, since the extensive signal conditioning, filtering and decoding is done in user space, not kernel space.</p>
<h4>Description</h4>
<p>This driver supports the Inter-Range Instrumentation Group (IRIG) standard time distribution signal using the audio codec native to some workstations. This signal is generated by several radio clocks, including those made by Arbiter, Austron, Bancomm, Odetics, Spectracom and TrueTime, among others, although it is often an add-on option. The signal is connected via an optional attenuator box and cable to either the microphone or line-in port. The driver receives, demodulates and decodes the IRIG-B and IRIG-E signal formats using internal filters designed to reduce the effects of noise and interference.</p>
<p>This driver incorporates several features in common with other audio drivers such as described in the <a href="driver7.html">Radio CHU Audio Demodulator/Decoder</a> and the <a href="driver36.html">Radio WWV/H Audio Demodulator/Decoder</a> pages. They include automatic gain control (AGC), selectable audio codec port and signal monitoring capabilities. For a discussion of these common features, as well as a guide to hookup, debugging and monitoring, see the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
<p>The IRIG signal format uses an amplitude-modulated carrier with pulse-width modulated data bits. For IRIG-B, the carrier frequency is 1000 Hz and bit rate 100 b/s; for IRIG-E, the carrier frequenchy is 100 Hz and bit rate 10 b/s. While IRIG-B provides the best accuracy, generally within a few tens of microseconds relative to IRIG time, it can also generate a significant load on the processor with older workstations. Generally, the accuracy with IRIG-E is about ten times worse than IRIG-B, but the processor load is ten times less.</p>
<p>The program processes 8000-Hz <font face="symbol">m</font>-law companded samples using separate signal filters for IRIG-B and IRIG-E, a comb filter, envelope detector and automatic threshold corrector. Cycle crossings relative to the corrected slice level determine the width of each pulse and its value - zero, one or position identifier. The data encode 20 BCD digits which determine the second, minute, hour and day of the year and sometimes the year and synchronization condition. The comb filter exponentially averages the corresponding samples of successive baud intervals in order to reliably identify the reference carrier cycle. A type-II phase-lock loop (PLL) performs additional integration and interpolation to accurately determine the zero crossing of that cycle, which determines the reference timestamp. A pulse-width discriminator demodulates the data pulses, which are then encoded as the BCD digits of the timecode. The timecode and reference timestamp are updated once each second with IRIG-B (ten seconds with IRIG-E) and local clock offset samples saved for later processing. At poll intervals of 64 s, the saved samples are processed by a trimmed-mean filter and used to update the system clock.</p>
<p>Infinite impulse response (IIR) filters are used with both IRIG-B and IRIG-E formats. An 800-Hz highpass filter is used for IRIG-B and a 130-Hz lowpass filter for IRIG-E. These are intended for use with noisy signals, such as might be received over a telephone line or radio circuit, or when interfering signals may be present in the audio passband. The driver determines which IRIG format is in use by sampling the amplitude of each filter output and selecting the one with maximum signal. An automatic gain control feature provides protection against overdriven or underdriven input signal amplitudes. It is designed to maintain adequate demodulator signal amplitude while avoiding occasional noise spikes. In order to assure reliable capture, the decompanded input signal amplitude must be greater than 100 units and the codec sample frequency error less than 250 PPM (.025 percent).</p>
<p>The program performs a number of error checks to protect against overdriven or underdriven input signal levels, incorrect signal format or improper hardware configuration. The specific checks are detailed later in this page. Note that additional checks are done elsewhere in the reference clock interface routines.</p>
<p>Unlike other drivers, which can have multiple instantiations, this one supports only one. It does not seem likely that more than one audio codec would be useful in a single machine. More than one would probably chew up too much CPU time anyway.</p>
<h4>IRIG-B Timecode Format</h4>
<p>The 100 elements of the IRIG timecode are numbered from 0 through 99. Position identifiers occur at elements 0, 9, 19 and every ten thereafter to 99. The control function (CF) elements begin at element 50 (CF 1) and extend to element 78 (CF 27). The straight-binary-seconds (SBS) field, which encodes the seconds of the UTC day, begins at element 80 (CF 28) and extends to element 97 (CF 44). The encoding of elements 50 (CF 1) through 78 (CF 27) is device dependent. This driver presently decodes the CF elements, but does nothing with them.</p>
<p>Where feasible, the IRIG signal source should be operated with signature control so that, if the signal is lost or mutilated, the source produces an unmodulated signal, rather than possibly random digits. The driver will automatically reject the data and declare itself unsynchronized in this case. Some devices, in particular Spectracom radio/satellite clocks, provide additional year and status indication in the format:</p>
<pre>
Element CF Function
-------------------------------------
55 6 time sync status
60-63 10-13 BCD year units
65-68 15-18 BCD year tens
</pre>
Other devices set these elements to zero.
<h4>Performance and Horror Stories</h4>
<p>The <font face="symbol">m</font>-law companded data format allows considerable latitude in signal levels; however, an automatic gain control (AGC) function is implemented to further compensate for varying input signal levels and to avoid signal distortion. For proper operation, the IRIG signal source should be configured for analog signal levels, NOT digital TTL levels.</p>
<p>The accuracy of the system clock synchronized to the IRIG-B source with this driver and the <tt>ntpd</tt> daemon is 10-20 <font face="symbol">m</font>s with a Sun UltraSPARC II running Solaris 2.6 and maybe twice that with a Sun SPARC IPC running SunOS 4.1.3. Be however acutely aware that the accuracy with Solaris 2.8 and presumably beyond has seriously degraded to the order of several milliseconds. The Sun kernel driver has a sawtooth modulation with amplitude over 5 ms peak-peak and period 5.5 s. The crafty IRIG&nbsp;driver uses a transverse filter to remove the modulation and something called a botttom-fisher to remove incidental positive spikes especially prevalent with Sun Blade 1000 and possibly other systems. The result is nominal accuracy and jitter something less than 0.5 ms, but the this is still far inferior to the performance with older systems.</p>
<p>The processor resources consumed by the daemon can be significant, ranging from about 1.2 percent on the faster UltraSPARC II to 38 percent on the slower SPARC IPC. However, the overall timing accuracy is limited by the resolution and stability of the CPU clock oscillator and the interval between clock corrections, which is 64 s with this driver. This performance, while probably the best that can be achieved by the daemon itself, can be improved with assist from the PPS discipline as described elsewhere in this documentation.</p>
<h4>Monitor Data</h4>
The timecode format used for debugging and data recording includes data helpful in diagnosing problems with the IRIG signal and codec connections. With debugging enabled (-d on the ntpd command line), the driver produces one line for each timecode in the following format:
<p><tt>00 1 98 23 19:26:52 721 143 0.694 47 20 0.083 66.5 3094572411.00027</tt></p>
<p>The first field containes the error flags in hex, where the hex bits are interpreted as below. This is followed by the IRIG status indicator, year of century, day of year and time of day. The status indicator and year are not produced by some IRIG devices. Following these fields are the carrier amplitude (0-8100), codec gain (0-255), field phase (0-79), time constant (2-20), modulation index (0-1), carrier phase error (0&plusmn;0.5) and carrier frequency error (PPM). The last field is the on-time timestamp in NTP format. The fraction part is a good indicator of how well the driver is doing. With an UltrSPARC 30, this is normally within a few tens of microseconds relative to the IRIG-B signal and within a few hundred microseconds with IRIG-E.</p>
<p>The error flags are defined as follows in hex:</p>
<dl>
<dt><tt>x01</tt>
<dd>Low signal. The carrier amplitude is less than 100 units. This is usually the result of no signal or wrong input port.
<dt><tt>x02</tt>
<dd>Frequency error. The codec frequency error is greater than 250 PPM. This may be due to wrong signal format or (rarely) defective codec.
<dt><tt>x04</tt>
<dd>Modulation error. The IRIG modulation index is less than 0.5. This is usually the result of an overdriven codec, wrong signal format or wrong input port.
<dt><tt>x08</tt>
<dd>Frame synch error. The decoder frame does not match the IRIG frame. This is usually the result of an overdriven codec, wrong signal format or noisy IRIG signal. It may also be the result of an IRIG signature check which indicates a failure of the IRIG signal synchronization source.
<dt><tt>x10</tt>
<dd>Data bit error. The data bit length is out of tolerance. This is usually the result of an overdriven codec, wrong signal format or noisy IRIG signal.
<dt><tt>x20</tt>
<dd>Seconds numbering discrepancy. The decoder second does not match the IRIG second. This is usually the result of an overdriven codec, wrong signal format or noisy IRIG signal.
<dt><tt>x40</tt>
<dd>Codec error (overrun). The machine is not fast enough to keep up with the codec.
</dl>
<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>Specifies the microphone port if set to zero or the line-in port if set to one. It does not seem useful to specify the compact disc player port.
<dt><tt>flag3 0 | 1</tt>
<dd>Enables audio monitoring of the input signal. For this purpose, the speaker volume must be set before the driver is started.
<dt><tt>flag4 0 | 1</tt>
<dd>Enable verbose <tt>clockstats</tt> recording if set.
</dl>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,235 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>Radio CHU Audio Demodulator/Decoder</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Radio CHU Audio Demodulator/Decoder</h3>
<h4>Related Links</h4>
<script type="text/javascript" language="javascript" src="../scripts/links8.txt"></script>
<hr>
<h4>Synopsis</h4>
Address: 127.127.7.<i>u</i><br>
Reference ID: <tt>CHU</tt><br>
Driver ID: <tt>CHU</tt><br>
Modem Port: <tt>/dev/chu<i>u</i></tt>; 300 baud, 8-bits, no parity<br>
Autotune Port: <tt>/dev/icom</tt>; 1200/9600 baud, 8-bits, no parity<br>
Audio Device: <tt>/dev/chu_audio</tt> and <tt>/dev/audioctl</tt>
<h4>Description</h4>
<p>This driver synchronizes the computer time using data encoded in radio transmissions from Canadian time/frequency station CHU in Ottawa, Ontario. It replaces an earlier one, built by Dennis Ferguson in 1988, which required a special line discipline to preprocessed the signal. The new driver includes more powerful algorithms implemented directly in the driver and requires no preprocessing.</p>
<p>CHU transmissions are made continuously on 3330 kHz, 7335 kHz and 14670 kHz in upper sideband, compatible AM mode. An ordinary shortwave receiver can be tuned manually to one of these frequencies or, in the case of ICOM receivers, the receiver can be tuned automatically as propagation conditions change throughout the day and night. The performance of this driver when tracking the station is ordinarily better than 1 ms in time with frequency drift less than 0.5 PPM when not tracking the station.</p>
<p>While there are currently no known commercial CHU receivers, a simple but effective receiver/demodulator can be constructed from an ordinary shortwave receiver and Bell 103 compatible, 300-b/s modem or modem chip, as described on the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page. The driver can use the modem to receive the radio signal and demodulate the data or, if available, the driver can use the audio codec of the Sun workstation or another with compatible audio interface. In the latter case, the driver implements the modem using DSP routines, so the radio can be connected directly to either the microphone or line input port.</p>
<p>This driver incorporates several features in common with other audio drivers such as described in the <a href="driver36.html">Radio WWV/H Audio Demodulator/Decoder</a> and the <a href="driver6.html">IRIG Audio Decoder</a> pages. They include automatic gain control (AGC), selectable audio codec port and signal monitoring capabilities. For a discussion of these common features, as well as a guide to hookup, debugging and monitoring, see the <a href="../audio.html">Reference Clock Audio Drivers</a> page.</p>
<p>Ordinarily, the driver poll interval is set to 14 (about 4.5 h), although this can be changed with configuration commands. As long as the clock is set or verified at least once during this interval, the NTP algorithms will consider the source reachable and selectable to discipline the system clock. However, if this does not happen for eight poll intervals, the algorithms will consider the source unreachable and some other source will be chosen (if available) to discipline the system clock.</p>
<p>The decoding algorithms process the data using maximum-likelihood techniques which exploit the considerable degree of redundancy available in each broadcast message or burst. As described below, every character is sent twice and, in the case of format A bursts, the burst is sent eight times every minute. In the case of format B bursts, which are sent once each minute, the burst is considered correct only if every character matches its repetition in the burst. In the case of format A messages, a majority decoder requires at least six repetitions for each digit in the timecode and more than half of the repetitions decode to the same digit. Every character in every burst provides an independent timestamp upon arrival with a potential total of over 60 timestamps for each minute.</p>
<p>A timecode in the format described below is assembled when all bursts have been received in the minute. The timecode is considered valid and the clock set when at least one valid format B burst has been decoded and the above requirements are met. The <tt>yyyy</tt> year field in the timecode indicates whether a valid format B burst has been received. Upon startup, this field is initialized at zero; when a valid format B burst is received, it is set to the current Gregorian year. The <tt>q</tt> quality character field in the timecode indicates whether a valid timecode has been determined. If any of the high order three bits of this character are set, the timecode is invalid.</p>
<p>Once the clock has been set for the first time, it will appear reachable and selectable to discipline the system clock, even if the broadcast signal is lost. Since the signals are almost always available during some period of the day and the NTP clock discipline algorithms are designed to work well even in this case, it is unlikely that the system clock could drift more than a few tens of milliseconds during periods of signal loss. To protect against this most unlikely situation, if after four days with no signals, the clock is considered unset and resumes the synchronization procedure from the beginning.</p>
<p>The last three fields in the timecode are useful in assessing the quality of the radio channel during the most recent minute bursts were received. The <tt>bcnt</tt> field shows the number of format A bursts in the range 1-8. The <tt>dist</tt> field shows the majority decoder distance, or the minimum number of sample repetitions for each digit of the timecode in the range 0-16. The <tt>tsmp</tt> field shows the number of timestamps determined in the range 0-60. For a valid timecode, <tt>bcnt</tt> must be at least 3, <tt>dist</tt> must be greater than <tt>bcnt</tt> and <tt>tsmp</tt> must be at least 20.</p>
<h4>Program Operation</h4>
<p>The program consists of four major parts: the DSP modem, maximum likelihood UART, burst assembler and majority decoder. The DSP modem demodulates Bell 103 modem answer-frequency signals; that is, frequency-shift keyed (FSK) tones of 2225 Hz (mark) and 2025 Hz (space). This is done using a 4th-order IIR filter and limiter/discriminator with 500-Hz bandpass centered on 2125 Hz and followed by a FIR raised-cosine lowpass filter optimized for the 300-b/s data rate. Alternately, the driver can be compiled to delete the modem and input 300 b/s data directly from an external modem via a serial port.</p>
<p>The maximum likelihood UART is implemented using a set of eight 11-stage shift registers, one for each of eight phases of the 300-b/s bit clock. At each phase a new baseband signal value from the DSP modem is shifted into the corresponding register and the maximum and minimum over all 11 samples computed. This establishes a slice level midway between the maximum and minimum over all stages. For each stage, a signal level above this level is a mark (1) and below is a space (0). A quality metric is calculated for each register with respect to the slice level and the a-priori signal consisting of a mark bit (previous stop bit), space (start) bit, eight arbitrary information bits and the first of the two mark (stop) bits.</p>
<p>The shift registers are processed in round-robin order as each modem value arrives until one of them shows a valid framing pattern consisting of a mark bit, space bit, eight arbitrary data bits and a mark bit. When found, the data bits from the register with the best metric is chosen as the maximum likelihood character and the UART begins to process the next character.</p>
<p>The burst assembler processes characters either from the maximum likelihood UART or directly from the serial port as configured. A burst begins when a character is received and is processed after a timeout interval when no characters are received. If the interval between characters is greater than two characters, but less than the timeout interval, the burst is rejected as a runt and a new burst begun. As each character is received, a timestamp is captured and saved for later processing.</p>
<p>A valid burst consists of ten characters in two replicated five-character blocks. A format B block contains the year and other information in ten hexadecimal digits. A format A block contains the timecode in ten decimal digits, the first of which is a framing code (6). The burst assembler must deal with cases where the first character of a format A burst is lost or is noise. This is done using the framing code to correct the phase, either one character early or one character late.</p>
<p>The burst distance is incremented by one for each bit in the first block that matches the corresponding bit in the second block and decremented by one otherwise. In a format B burst the second block is bit-inverted relative to the first, so a perfect burst of five 8-bit characters has distance -40. In a format A block the two blocks are identical, so a perfect burst has distance +40. Format B bursts must be perfect to be acceptable; however, format A bursts, which are further processed by the majority decoder, are acceptable if the distance is at least 28.</p>
<p>Each minute of transmission includes eight format A bursts containing two timecodes for each second from 31 through 39. The majority decoder uses a decoding matrix of ten rows, one for each digit position in the timecode, and 16 columns, one for each 4-bit code combination that might be decoded at that position. In order to use the character timestamps, it is necessary to reliably determine the second number of each burst. In a valid burst, the last digit of the two timecodes in the block must match and the value must be in the range 2-9 and greater than in the previous burst.</p>
<p>As each hex digit of a valid burst is processed, the value at the row corresponding to the digit position in the timecode and column corresponding to the code found at that position is incremented. At the end of each minute of transmission, each row of the decoding matrix encodes the number of occurrences of each code found at the corresponding position of the timecode. However, the first digit (framing code) is always 6, the ninth (second tens) is always 3 and the last (second units) changes for each burst, so are not used.</p>
<p>The maximum over all occurrences at each timecode digit position is the distance for that position and the corresponding code is the maximum likelihood candidate. If the distance is zero, the decoder assumes a miss; if the distance is not more than half the total number of occurrences, the decoder assumes a soft error; if two different codes with the same distance are found, the decoder assumes a hard error. In all these cases the decoder encodes a non-decimal character which will later cause a format error when the timecode is reformatted. The decoding distance is defined as the minimum distance over the first nine digits; the tenth digit varies over the seconds and is uncounted.</p>
<p>The result of the majority decoder is a nine-digit timecode representing the maximum likelihood candidate for the transmitted timecode in that minute. Note that the second and fraction within the minute are always zero and that the actual reference point to calculate timestamp offsets is backdated to the first second of the minute. At this point the timecode block is reformatted and the year, days, hours and minutes extracted along with other information from the format B burst, including DST state, DUT1 correction and leap warning. The reformatting operation checks the timecode for invalid code combinations that might have been left by the majority decoder and rejects the entire timecode if found.</p>
<p>If the timecode is valid, it is passed to the reference clock interface along with the backdated timestamp offsets accumulated over the minute. A perfect set of nine bursts could generate as many as 90 timestamps, but the maximum the interface can handle is 60. These are processed by the interface using a median filter and trimmed-mean average, so the resulting system clock correction is usually much better than would otherwise be the case with radio noise, UART jitter and occasional burst errors.</p>
<h4>Autotune</h4>
<p>The driver includes provisions to automatically tune the radio in response to changing radio propagation conditions throughout the day and night. The radio interface is compatible with the ICOM CI-V standard, which is a bidirectional serial bus operating at TTL levels. The bus can be connected to a standard serial port using a level converter such as the CT-17.</p>
<p>Each ICOM radio is assigned a unique 8-bit ID select code, usually expressed in hex format. To activate the CI-V interface, the <tt>mode</tt> keyword of the <tt>server</tt> configuration command specifies a nonzero select code in decimal format. A table of ID select codes for the known ICOM radios is given below. 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. A missing <tt>mode</tt> keyword or a zero argument leaves the interface disabled.</p>
<p>If specified, the driver will attempt to open the device <tt>/dev/icom</tt> and, if successful will tune the radio to 3.330 MHz. If after five minutes at this frequency not more than two format A bursts have been received for any minute, the driver will tune to 7.335 MHz, then to 14.670 MHz, then return to 3.330 MHz and continue in this cycle. However, the driver is liberal in what it assumes of the configuration. If the <tt>/dev/icom</tt> link is not present or the open fails or the CI-V bus or radio is inoperative, the driver quietly gives up with no harm done.</p>
<h4>Radio Broadcast Format</h4>
<p>The CHU time broadcast includes an audio signal compatible with the Bell 103 modem standard (mark = 2225 Hz, space = 2025 Hz). It consist of nine, ten-character bursts transmitted at 300 b/s and beginning each second from second 31 to second 39 of the minute. Each character consists of eight data bits plus one start bit and two stop bits to encode two hex digits. The burst data consist of five characters (ten hex digits) followed by a repeat of these characters. In format A, the characters are repeated in the same polarity; in format B, the characters are repeated in the opposite polarity.</p>
<p>Format A bursts are sent at seconds 32 through 39 of the minute in hex digits</p>
<p><tt>6dddhhmmss6dddhhmmss</tt></p>
<p>The first ten digits encode a frame marker (<tt>6</tt>) followed by the day (<tt>ddd</tt>), hour (<tt>hh</tt>), minute (<tt>mm</tt>) and second (<tt>ss</tt>). Since format A bursts are sent during the third decade of seconds the tens digit of <tt>ss</tt> is always 3. The driver uses this to determine correct burst synchronization. These digits are then repeated with the same polarity.</p>
<p>Format B bursts are sent at second 31 of the minute in hex digits</p>
<p><tt>xdyyyyttaaxdyyyyttaa</tt></p>
<p>The first ten digits encode a code (<tt>x</tt> described below) followed by the DUT1 (<tt>d</tt> in deciseconds), Gregorian year (<tt>yyyy</tt>), difference TAI - UTC (<tt>tt</tt>) and daylight time indicator (<tt>aa</tt>) peculiar to Canada. These digits are then repeated with inverted polarity.</p>
<p>The <tt>x</tt> is coded</p>
<dl>
<dt><tt>1</tt>
<dd>Sign of DUT (0 = +)/dd&gt;
<dt><tt>2</tt>
<dd>Leap second warning. One second will be added.
<dt><tt>4</tt>
<dd>Leap second warning. One second will be subtracted. This is not likely to happen in our universe.
<dt><tt>8</tt>
<dd>Even parity bit for this nibble.
</dl>
<p>By design, the last stop bit of the last character in the burst coincides with 0.5 second. Since characters have 11 bits and are transmitted at 300 b/s, the last stop bit of the first character coincides with 0.5 - 10 * 11/300 = 0.133 second. Depending on the UART, character interrupts can vary somewhere between the beginning of bit 9 and end of bit 11. These eccentricities can be corrected along with the radio propagation delay using the <tt>fudge time1</tt> variable.</p>
<h4>Debugging Aids</h4>
<p>The most convenient way to track the program status is using the <tt>ntpq</tt> program and the <tt>clockvar</tt> command. This displays the last determined timecode and related status and error counters, even when the program is not discipline the system clock. If the debugging trace feature (<tt>-d</tt> on the <tt>ntpd</tt> command line)is enabled, the program produces detailed status messages as it operates. If the <tt>fudge flag 4</tt> is set, these messages are written to the <tt>clockstats</tt> file. All messages produced by this driver have the prefix <tt>chu</tt> for convenient filtering with the Unix <tt>grep</tt> command.</p>
<p>With debugging enabled the driver produces messages in the following formats:</p>
<p>A format <tt>chuA</tt> message is produced for each format A burst received in seconds 32 through 39 of the minute:</p>
<p><tt>chuA n b s code</tt></p>
<p>where <tt>n</tt> is the number of characters in the burst (0-11), <tt>b</tt> the burst distance (0-40), <tt>s</tt> the synchronization distance (0-40) and <tt>code</tt> the burst characters as received. Note that the hex digits in each character are reversed and the last ten digits inverted, so the burst</p>
<p><tt>11 40 1091891300ef6e76ecff</tt></p>
<p>is interpreted as containing 11 characters with burst distance 40. The nibble-swapped timecode shows DUT1 +0.1 second, year 1998 and TAI -UTC 31 seconds.</p>
<p>A format <tt>chuB</tt> message is produced for each format B burst received in second 31 of the minute:</p>
<p><tt>chuB n b f s m code</tt></p>
<p>where <tt>n</tt> is the number of characters in the burst (0-11), <tt>b</tt> the burst distance (0-40), <tt>f</tt> the field alignment (-1, 0, 1), <tt>s</tt>the synchronization distance (0-16), <tt>m</tt>the burst number (2-9) and <tt>code</tt> the burst characters as received. Note that the hex digits in each character are reversed, so the burst</p>
<p><tt>10 38 0 16 9 06851292930685129293</tt></p>
<p>is interpreted as containing 11 characters with burst distance 38, field alignment 0, synchronization distance 16 and burst number 9. The nibble-swapped timecode shows day 58, hour 21, minute 29 and second 39.</p>
<p>If the CI-V interface for ICOM radios is active, a debug level greater than 1 will produce a trace of the CI-V command and response messages. Interpretation of these messages requires knowledge of the CI-V protocol, which is beyond the scope of this document.</p>
<h4>Monitor Data</h4>
When enabled by the <tt>filegen</tt> facility, every received timecode is written to the <tt>clockstats</tt> file in the following format:
<pre>
sq yy ddd hh:mm:ss.fff ld dut lset agc rfrq bcnt dist tsmp
s sync indicator
q quality character
yyyy Gregorian year
ddd day of year
hh hour of day
mm minute of hour
ss second of minute
fff millisecond of second
l leap second warning
d DST state
dut DUT sign and magnitude in deciseconds
lset minutes since last set
agc audio gain (0-255)
rfrq radio frequency
bcnt burst count
dist decoding distance
tsmp timestamps captured
</pre>
The fields beginning with <tt>year</tt> and extending through <tt>dut</tt> are decoded from the received data and are in fixed-length format. The <tt>agc</tt> and <tt>lset</tt> fields, as well as the following driver-dependent fields, are in variable-length format.
<dl>
<dt><tt>s</tt>
<dd>The sync indicator is initially <tt>?</tt> before the clock is set, but turns to space when the clock is correctly set.
<dt><tt>q</tt>
<dd>The quality character is a four-bit hexadecimal code showing which alarms have been raised during the most recent minute. Each bit is associated with a specific alarm condition according to the following:
<dl>
<dt><tt>8</tt>
<dd>Decoder alarm. A majority of repetitions for at least one digit of the timecode fails to agree.
<dt><tt>4</tt>
<dd>Timestamp alarm. Fewer than 20 timestamps have been determined.
<dt><tt>2</tt>
<dd>Format alarm. The majority timecode contains invalid bit combinations.
<dt><tt>1</tt>
<dd>Frame alarm. A framing or format error occurred on at least one burst during the minute.
</dl>
<p>It is important to note that one or more of the above alarms does not necessarily indicate a clock error, but only that the decoder has detected a condition that may in future result in an error.</p>
<dt><tt>yyyy ddd hh:mm:ss.fff</tt>
<dd>The timecode format itself is self explanatory. Note that the Gregorian year is decoded directly from the transmitted timecode.
<dt><tt>l</tt>
<dd>The leap second warning is normally space, but changes to <tt>L</tt> if a leap second is to occur at the end of the month of June or December.
<dt><tt>d</tt>
<dd>The DST code for Canada encodes the state for all provinces.
<dt><tt>dut</tt>
<dd>The DUT sign and magnitude shows the current UT1 offset relative to the displayed UTC time, in deciseconds.
<dt><tt>lset</tt>
<dd>Before the clock is set, the interval since last set is the number of minutes since the program was started; after the clock is set, this is number of minutes since the time was last verified relative to the broadcast signal.
<dt><tt>agc</tt>
<dd>The audio gain shows the current codec gain setting in the range 0 to 255. Ordinarily, the receiver audio gain control or IRIG level control should be set for a value midway in this range.
<dt><tt>rfrq</tt>
<dd>The current radio frequency, if the CI-V interface is active, or 'X' if not.
<dt><tt>bcnt</tt>
<dd>The number of format A bursts received during the most recent minute bursts were received.
<dt><tt>dist</tt>
<dd>The minimum decoding distance determined during the most recent minute bursts were received.
<dt><tt>tsmp</tt>
<dd>The number of timestamps determined during the most recent minute bursts were received.
</dl>
<h4>Modes</h4>
<p>The <tt>mode</tt> keyword of the <tt>server</tt> configuration command specifies the ICOM ID select code. A missing or zero argument disables the CI-V interface. 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>IC725</td>
<td>0x28</td>
<td>40</td>
<td>IC781</td>
<td>0x26</td>
<td>38</td>
</tr>
<tr>
<td>IC726</td>
<td>0x30</td>
<td>48</td>
<td>R7000</td>
<td>0x08</td>
<td>8</td>
</tr>
<tr>
<td>IC735</td>
<td>0x04</td>
<td>4</td>
<td>R71</td>
<td>0x1A</td>
<td>26</td>
</tr>
<tr>
<td>IC751</td>
<td>0x1c</td>
<td>28</td>
<td>R7100</td>
<td>0x34</td>
<td>52</td>
</tr>
<tr>
<td>IC761</td>
<td>0x1e</td>
<td>30</td>
<td>R72</td>
<td>0x32</td>
<td>50</td>
</tr>
<tr>
<td>IC765</td>
<td>0x2c</td>
<td>44</td>
<td>R8500</td>
<td>0x4a</td>
<td>74</td>
</tr>
<tr>
<td>IC775</td>
<td>0x46</td>
<td>68</td>
<td>R9000</td>
<td>0x2a</td>
<td>42</td>
</tr>
</table>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the propagation delay for CHU (45:18N 75:45N), 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>CHU</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>When the audio driver is compiled, this flag selects the audio input port, where 0 is the mike port (default) and 1 is the line-in port. It does not seem useful to select the compact disc player port.
<dt><tt>flag3 0 | 1</tt>
<dd>When the audio driver is compiled, this flag enables audio monitoring of the input signal. For this purpose, the speaker volume must be set before the driver is started.
<dt><tt>flag4 0 | 1</tt>
<dd>Enable verbose <tt>clockstats</tt> recording if set.
</dl>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,136 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Generic Reference Driver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Generic Reference Driver</h3>
<hr>
<h4>Synopsis</h4>
Address: 127.127.8.<i>u</i><br>
Reference ID: <tt>PARSE</tt><br>
Driver ID: <tt>GENERIC</tt><br>
Serial Port: <tt>/dev/refclock-<i>u</i></tt>; TTY mode according to clock type
<h4>Description</h4>
<p>The timecode of these receivers is sampled via a STREAMS module in the kernel (The STREAMS module has been designed for use with SUN Systems under SunOS 4.1.x or Solaris 2.3 - 2.6. It can be linked directly into the kernel or loaded via the loadable driver mechanism). This STREAMS module can be adapted to be able to convert different time code formats. If the daemon is compiled without the STREAM definition synchronization will work without the Sun streams module, though accuracy is significantly degraded. This feature allows to use PARSE also on non Sun machines.</p>
<p>The actual receiver status is mapped into various synchronization states generally used by receivers. The STREAMS module is configured to interpret the time codes of DCF C51, PZF535, PZF509, GPS166, Trimble SV6 GPS, ELV DCF7000, Schmid, Wharton 400A and low cost receivers (see list below).</p>
<p>The reference clock support in ntp contains the necessary configuration tables for those receivers. In addition to supporting several different clock types and 4 devices, the generation a a PPS signal is also provided as an configuration option. The PPS configuration option uses the receiver generated time stamps for feeding the PPS loopfilter control for much finer clock synchronization.</p>
<p>CAUTION: The PPS configuration option is different from the hardware PPS signal, which is also supported (see below), as it controls the way ntpd is synchronized to the reference clock, while the hardware PPS signal controls the way time offsets are determined.</p>
<p>The use of the PPS option requires receivers with an accuracy of better than 1ms.</p>
<p>Fudge factors</p>
<p>Only two fudge factors are utilized. The time1 fudge factor defines the phase offset of the synchronization character to the actual time. On the availability of PPS information the time2 fudge factor defines the skew between the PPS time stamp and the receiver timestamp of the PPS signal. This parameter is usually zero, as usually the PPS signal is believed in time and OS delays should be corrected in the machine specific section of the kernel driver. time2 needs only be set when the actual PPS signal is delayed for some reason. The flag1 enables input filtering. This a median filter with continuous sampling. The flag2 selects averaging of the samples remaining after the filtering. Leap second-handling is controlled with the flag3. When set a leap second will be deleted on receipt of a leap second indication from the receiver. Otherwise the leap second will be added, (which is the default). flag3 should never be set. PPS handling is enabled by adding 128 to the mode parameter in the server/peer command.</p>
<p>ntpq (8)</p>
<p>timecode variable</p>
<p>The ntpq program can read clock variables command list several variables. These hold the following information: refclock_time is the local time with the offset to UTC (format HHMM). The currently active receiver flags are listed in refclock_status. Additional feature flags of the receiver are optionally listed in parentheses. The actual time code is listed in timecode. A qualification of the decoded time code format is following in refclock_format. The last piece of information is the overall running time and the accumulated times for the clock event states in refclock_states. When PPS information is present additional variable are available. refclock_ppstime lists then the PPS timestamp and refclock_ppsskew lists the difference between RS232 derived timestamp and the PPS timestamp.</p>
<p>Currently, eighteen clock types (devices /dev/refclock-0 - /dev/refclock-3) are supported by the PARSE driver.<br>
A note on the implementations:</p>
<ul>
<li>These implementations where mainly done <b><i>WITHOUT</i></b> actual access to the hardware. Thus not all implementations provide full support. The development was done with the help of many souls who had the hardware and where so kind to borrow me their time an patience during the development and debugging cycle. Thus for continued support and quality direct access to the receivers is a big help. Nevertheless i am not prepared to buy these reference clocks - donations to <a href="http://www4.informatik.uni-erlangen.de/%7ekardel">me</a> (<a href="mailto:%20kardel@acm.org">kardel@acm.org</a>) are welcome as long as they work within Europe 8-).
<p>Verified implementations are:</p>
<ul>
<li>RAWDCF variants
<p>These variants are tested for the decoding with my own homegrown receivers. Interfacing with specific commercial products may involve some fiddeling with cables. Especially commericial RAWDCF receivers have a seemingly unlimited number of ways to draw power from the RS232 port and to encode the DCF77 datastream. You are mainly on your own here unless i have a sample of the receiver.</p>
<li><a href="http://www.meinberg.de">Meinberg clocks</a>
<p>These implementations are verified by the Meinberg people themselves and i have access to one of these clocks.</p>
</ul>
</ul>
<p>The pictures below refer to the respective clock and where taken from the vendors web pages. They are linked to the respective vendors.</p>
<ul>
<li><b><tt>server 127.127.8.0-3 mode 0</tt></b>
<p><b><tt><a href="http://www.meinberg.de">Meinberg </a>PZF535/<a href="http://www.meinberg.de/english/products/pzf509.htm">PZF509 receiver</a> (FM demodulation/TCXO / 50us)</tt></b><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 1</tt></b>
<p><b><tt><a href="http://www.meinberg.de">Meinberg </a>PZF535/<a href="http://www.meinberg.de/english/products/pzf509.htm">PZF509 receiver</a> (FM demodulation/OCXO / 50us)</tt></b><br>
<a href="http://www.meinberg.de/english/products/pzf509.htm"><img src="../pic/pzf509.jpg" alt="BILD PZF509" height="300" width="260" align="TEXTTOP"></a><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 2</tt></b>
<p><b><tt><a href="http://www.meinberg.de">Meinberg </a>DCF U/A 31/<a href="http://www.meinberg.de/english/products/c51.htm">DCF C51 receiver</a> (AM demodulation / 4ms)</tt></b><br>
<a href="http://www.meinberg.de/english/products/c51.htm"><img src="../pic/c51.jpg" alt="BILD C51" height="180" width="330" align="TEXTTOP"></a><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 3</tt></b>
<p><b><tt><a href="http://www.elv.de">ELV</a> DCF7000 (sloppy AM demodulation / 50ms)</tt></b><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 4</tt></b>
<p><b><tt>Walter Schmid DCF receiver Kit (AM demodulation / 1ms)</tt></b><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 5</tt></b>
<p><b><tt>RAW DCF77 100/200ms pulses (Conrad DCF77 receiver module / 5ms)</tt></b><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 6</tt></b>
<p><b><tt>RAW DCF77 100/200ms pulses (TimeBrick DCF77 receiver module / 5ms)</tt></b><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 7</tt></b>
<p><b><tt><a href="http://www.meinberg.de">Meinberg </a><a href="http://www.meinberg.de/english/products/gps167.htm">GPS166/GPS167 receiver</a> (GPS / &lt;&lt;1us)</tt></b><br>
<a href="http://www.meinberg.de/english/products/gps167.htm"><img src="../pic/gps167.jpg" alt="BILD GPS167" height="300" width="280" align="TEXTTOP"></a><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 8</tt></b>
<p><b><tt><a href="http://www.igel.de">IGEL</a> <a href="http://www.igel.de/eigelmn.html">clock</a></tt></b><br>
<a href="http://www.igel.de/eigelmn.html"><img src="../pic/igclock.gif" height="174" width="200"></a><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 9</tt></b>
<p><b><tt><a href="http://www.trimble.com">Trimble</a> <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html">SVeeSix GPS receiver</a>TAIP protocol (GPS / &lt;&lt;1us)</tt></b><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 10</tt></b>
<p><b><tt><a href="http://www.trimble.com">Trimble</a> <a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html">SVeeSix GPS receiver</a> TSIP protocol (GPS / &lt;&lt;1us) (no kernel support yet)</tt></b><br>
<a href="http://www.trimble.com/cgi/omprod.cgi/pd_om011.html"><img src="../pic/pd_om011.gif" alt="SVeeSix-CM3" height="100" width="420" align="TEXTTOP" border="0"></a><br>
<a href="http://www.trimble.com/cgi/omprod.cgi/pd_om006.html"><img src="../pic/pd_om006.gif" alt="Lassen-SK8" height="100" width="420" border="0"></a><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 11</tt></b>
<p><b><tt>Radiocode Clocks Ltd RCC 8000 Intelligent Off-Air Master Clock support </tt></b><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 12</tt></b>
<p><b><tt><a href="http://www.hopf-time.com">HOPF</a> <a href="http://www.hopf-time.com/kart6021.html">Funkuhr 6021</a></tt></b><br>
<a href="http://www.hopf-time.com/engl/kart6021.html"><img src="../pic/fg6021.gif" alt="DCF77-Interface Board" height="207" width="238" align="TEXTTOP"></a><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 13</tt></b>
<p><b><tt>Diem's Computime Radio Clock</tt></b><br>
</p>
<li><b><tt>server 127.127.8.0-3 mode 14</tt></b>
<p><b><tt>RAWDCF receiver (DTR=high/RTS=low)</tt></b></p>
<li><b><tt>server 127.127.8.0-3 mode 15</tt></b>
<p><b><tt>WHARTON 400A Series Clocks with a 404.2 Serial Interface</tt></b></p>
<li><b><tt>server 127.127.8.0-3 mode 16</tt></b>
<p><b><tt>RAWDCF receiver (DTR=low/RTS=high) </tt></b></p>
<li><b><tt>server 127.127.8.0-3 mode 17</tt></b>
<p><b><tt>VARITEXT Receiver (MSF) </tt></b></p>
</ul>
<p>Actual data formats and set-up requirements of the various clocks can be found in <a href="../parsedata.html">NTP PARSE clock data formats</a>.</p>
<p>The reference clock support carefully monitors the state transitions of the receiver. All state changes and exceptional events such as loss of time code transmission are logged via the syslog facility. Every hour a summary of the accumulated times for the clock states is listed via syslog.</p>
<p>PPS support is only available when the receiver is completely synchronized. The receiver is believed to deliver correct time for an additional period of time after losing synchronizations, unless a disruption in time code transmission is detected (possible power loss). The trust period is dependent on the receiver oscillator and thus a function of clock type. This is one of the parameters in the clockinfo field of the reference clock implementation. This parameter cannot be configured by ntpdc.</p>
<p>In addition to the PPS loopfilter control a true PPS hardware signal can be applied on Sun Sparc stations via the CPU serial ports on the CD pin. This signal is automatically detected and will be used for offset calculation. The input signal must be the time mark for the following time code. (The edge sensitivity can be selected - look into the appropriate kernel/parsestreams.c for details). Meinberg receivers can be connected by feeding the PPS pulse of the receiver via a 1488 level converter to Pin 8 (CD) of a Sun serial zs-port. To select PPS support the STREAMS driver for PARSE must be loaded and the mode parameter ist the mode value of above plus 128. If 128 is not added to the mode value PPS will be detected to be available but it will not be used. For PPS to be used you MUST add 128 to the mode parameter.</p>
<p>For the Meinberg GPS166/GPS167 receiver is also a special firmware release available (Uni-Erlangen). This release should be used for proper operation.</p>
<p>The raw DCF77 pulses can be fed via a level converter directly into Pin 3 (Rx) of the Sun. The telegrams will be decoded an used for synchronization. AM DCF77 receivers are running as low as $25. The accuracy is dependent on the receiver and is somewhere between 2ms (expensive) to 10ms (cheap). Upon bad signal reception of DCF77 synchronizations will cease as no backup oscillator is available as usually found in other reference clock receivers. So it is important to have a good place for the DCF77 antenna. For transmitter shutdowns you are out of luck unless you have other NTP servers with alternate time sources available.</p>
<h4>Monitor Data</h4>
<p>Clock states statistics are written hourly the the syslog service. Online information can be found by examining the clock variable via the ntpq cv command.</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 depending on clock type.
<dt><tt>time2 <i>time</i></tt>
<dd>Specifies the offset if the PPS signal to the actual time. (PPS fine tuning).
<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 according to current clock type.
<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>delete next leap second instead of adding it.
<dt><tt>flag4 0 | 1</tt>
<dd>Delete next leap second instead of adding it - flag will be re- defined soon - so don't use it. Statistics are provided by more common means (syslog, clock variable via ntpq)
</dl>
<h4>Making your own PARSE clocks</h4>
<p>The parse clock mechanismis deviated from the way other ntp reference clocks work. For a short description how to build parse reference clocks see <a href="../parsenew.html">making PARSE clocks</a></p>
<p>Additional Information</p>
<p><a href="../refclock.html">Reference Clock Drivers</a></p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,58 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>Magnavox MX4200 GPS Receiver</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Magnavox MX4200 GPS Receiver</h3>
<hr>
<h4>Synopsis</h4>
Address: 127.127.9.<i>u</i><br>
Reference ID: <tt>GPS</tt><br>
Driver ID: <tt>GPS_MX4200</tt><br>
Serial Port: <tt>/dev/gps<i>u</i></tt>; 4800 baud, 8-bits, no parity<br>
Features: <tt>ppsclock</tt> (required)
<h4>Description</h4>
<p>This driver supports the Magnavox MX4200 Navigation Receiver adapted to precision timing applications. It requires the <tt>ppsclock</tt> line discipline or streams module described in the <a href="../ldisc.html">Line Disciplines and Streams Modules</a> page. It also requires a level converter such as described in the <a href="../pps.html">Pulse-per-second (PPS) Signal Interfacing</a> page.</p>
<p>This driver supports all compatible receivers such as the 6-channel MX4200, MX4200D, and the 12-channel MX9212, MX9012R, MX9112.</p>
<p><a href="http://www.leica-gps.com/"><img src="../pic/9400n.jpg" alt="Leica MX9400N Navigator" height="143" width="180" align="left"></a> <a href="http://www.leica-gps.com/">Leica Geosystems</a> acquired the Magnavox commercial GPS technology business in February of 1994. They now market and support former Magnavox GPS products such as the MX4200 and its successors.</p>
<br clear="LEFT">
<p>Leica MX9400N Navigator.</p>
<h4>Operating Modes</h4>
<p>This driver supports two modes of operation, static and mobile, controlled by clock flag 2.</p>
<p>In static mode (the default) the driver assumes that the GPS antenna is in a fixed location. The receiver is initially placed in a &quot;Static, 3D Nav&quot; mode, where latitude, longitude, elevation and time are calculated for a fixed station. An average position is calculated from this data. After 24 hours, the receiver is placed into a &quot;Known Position&quot; mode, initialized with the calculated position, and then solves only for time.</p>
<p>In mobile mode, the driver assumes the GPS antenna is mounted on a moving platform such as a car, ship, or aircraft. The receiver is placed in &quot;Dynamic, 3D Nav&quot; mode and solves for position, altitude and time while moving. No position averaging is performed.</p>
<h4>Monitor Data</h4>
<p>The driver writes each timecode as received to the <tt>clockstats</tt> file. Documentation for the <cite>NMEA-0183</cite> proprietary sentences produced by the MX4200 can be found in <a href="../mx4200data.html">MX4200 Receiver Data Format</a>.</p>
<h4>Fudge Factors</h4>
<dl>
<dt><tt>time1 <i>time</i></tt>
<dd>Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.
<dt><tt>time2 <i>time</i></tt>
<dd>Not used by this driver.
<dt><tt>stratum <i>number</i></tt>
<dd>Specifies the driver stratum, in decimal from 0 to 15, with default 0.
<dt><tt>refid <i>string</i></tt>
<dd>Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>GPS</tt>.
<dt><tt>flag1 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag2 0 | 1</tt>
<dd>Assume GPS receiver is on a mobile platform if set.
<dt><tt>flag3 0 | 1</tt>
<dd>Not used by this driver.
<dt><tt>flag4 0 | 1</tt>
<dd>Not used by this driver.
</dl>
<h4>Additional Information</h4>
<p><a href="../refclock.html">Reference Clock Drivers</a>&nbsp;</p>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

View File

@ -0,0 +1,158 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ONCORE - SHMEM</title>
<link href="../scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>Motorola ONCORE - The Shared Memory Interface</h3>
<hr>
<h4>Introduction</h4>
<p>In NMEA mode, the Oncore GPS receiver provides the user with the same information as other GPS receivers. In BINARY mode, it can provide a lot of additional information.</p>
<p>In particular, you can ask for satellite positions, satellite health, signal levels, the ephemeris and the almanac, and you can set many operational parameters. In the case of the VP, you can get the pseudorange corrections necessary to act as a DGPS base station, and you can see the raw satellite data messages themselves.</p>
<p>When using the Oncore GPS receiver with NTP, this additional information is usually not available since the receiver is only talking to the oncore driver in NTPD. To make this information available for use in other programs, (say graphic displays of satellites positions, plots of SA, etc.), a shared memory interface (SHMEM) has been added to the refclock_oncore driver on those operating systems that support shared memory.</p>
<p>To make use of this information you will need an Oncore Reference Manual for the Oncore GPS receiver that you have. The Manual for the VP only exists as a paper document, the UT+/GT+/M12 manuals are available as a pdf documents at <a href="http://www.synergy-gps.com/Mot_Manuals.html">Synergy</a> .</p>
<p>This interface was written by Poul-Henning Kamp (phk@FreeBSD.org), and modified by Reg Clemens (reg@dwf.com). The interface is known to work in FreeBSD, Linux, and Solaris.</p>
<h4>Activating the Interface</h4>
<p>Although the Shared Memory Interface will be compiled into the Oncore driver on those systems where Shared Memory is supported, to activate this interface you must include a <b>STATUS</b> or <b>SHMEM</b> line in the <tt>/etc/ntp.oncore</tt> data file that looks like</p>
<pre>
STATUS &lt; file_name &gt;<br>
or<br>
SHMEM &lt; file_name &gt;
</pre>
Thus a line like
<pre>
SHMEM /var/adm/ntpstats/ONCORE
</pre>
<p>would be acceptable. This file name will be used to access the Shared Memory.</p>
<p>In addition, one the two keywords <b>Posn2D</b> and <b>Posn3D</b> can be added to see @@Ea records containing the 2D or 3D position of the station (see below). Thus to activate the interface, and see 3D positions, something like</p>
<pre>
SHMEM /var/adm/ntpstats/ONCORE
Posn3D
</pre>
<p>would be required.</p>
<h4>Storage of Messages in Shared Memory</h4>
<p>With the shared memory interface, the oncore driver (refclock_oncore) allocates space for all of the messages that it is configured to receive, and then puts each message in the appropriate slot in shared memory as it arrives from the receiver. Since there is no easy way for a client program to know when the shared memory has been updated, a sequence number is associated with each message, and is incremented when a new message arrives. With the sequence number it is easy to check through the shared memory segment for messages that have changed.</p>
<p>The Oncore binary messages are kept in their full length, as described in the Reference manual, that is everything from the @@ prefix thru the &lt;checksum&gt;&lt;CR&gt;&lt;LF&gt;.</p>
<p>The data starts at location ONE of SHMEM (NOT location ZERO).</p>
<p>The messages are stacked in a series of variable length structures, that look like</p>
<pre>
struct message {
u_int length;
u_char sequence;
u_char message[length];
}
</pre>
<p>if something like that were legal. That is, there are two bytes (caution, these may NOT be aligned with word boundaries, so the field needs to be treated as a pair of u_char), that contains the length of the next message. This is followed by a u_char sequence number, that is incremented whenever a new message of this type is received. This is followed by 'length' characters of the actual message.</p>
<p>The next structure starts immediately following the last char of the previous message (no alignment). Thus, each structure starts a distance of 'length+3' from the previous structure.</p>
<p>Following the last structure, is a u_int containing a zero length to indicate the end of the data.</p>
<p>The messages are recognized by reading the headers in the data itself, viz @@Ea or whatever.</p>
<p>There are two special cases.</p>
<p>(1) The almanac takes a total of 34 submessages all starting with @@Cb.<br>
35 slots are allocated in shared memory. Each @@Cb message is initially placed in the first of these locations, and then later it is moved to the appropriate location for that submessage. The submessages can be distinguished by the first two characters following the @@Cb header, and new data is received only when the almanac changes.</p>
<p>(2) The @@Ea message contains the calculated location of the antenna, and is received once per second. However, when in timekeeping mode, the receiver is normally put in 0D mode, with the position fixed, to get better accuracy. In 0D mode no position is calculated.</p>
<p>When the SHMEM option is active, and if one of <b>Posn2D</b> or <b>Posn3D</b> is specified, one @@Ea record is hijacked each 15s, and the receiver is put back in 2D/3D mode so the the current location can be determined (for position determination, or for tracking SA). The timekeeping code is careful NOT to use the time associated with this (less accurate) 2D/3D tick in its timekeeping functions.</p>
<p>Following the initial @@Ea message are 3 additional slots for a total of four. As with the almanac, the first gets filled each time a new record becomes available, later in the code, the message is distributed to the appropriate slot. The additional slots are for messages containing 0D, 2D and 3D positions. These messages can be distinguished by different bit patterns in the last data byte of the record.</p>
<h4>Opening the Shared Memory File</h4>
<p>The shared memory segment is accessed through a file name given on a <b>SHMEM</b> card in the <tt>/etc/ntp.oncore</tt> input file. The following code could be used to open the Shared Memory Segment:</p>
<pre>
char *Buf, *file;
int size, fd;
struct stat statbuf;
file = &quot;/var/adm/ntpstats/ONCORE&quot;; /* the file name on my ACCESS card */
if ((fd=open(file, O_RDONLY)) &lt; 0) {
fprintf(stderr, &quot;Cant open %s\n&quot;, file);
exit(1);
}
if (stat(file, &amp;statbuf) &lt; 0) {
fprintf(stderr, &quot;Cant stat %s\n&quot;, file);
exit(1);
}
size = statbuf.st_size;
if ((Buf=mmap(0, size, PROT_READ, MAP_SHARED, fd, (off_t) 0)) &lt; 0) {
fprintf(stderr, &quot;MMAP failed\n&quot;);
exit(1);
}
</pre>
<h4>Accessing the data</h4>
<p>The following code shows how to get to the individual records.</p>
<pre>
void oncore_msg_Ea(), oncore_msg_As(), oncore_msg_Bb();
struct Msg {
char c[5];
unsigned int seq;
void (*go_to)(uchar *);
};
struct Msg Hdr[] = { {&quot;@@Bb&quot;, 0, &amp;oncore_msg_Bb},
{&quot;@@Ea&quot;, 0, &amp;oncore_msg_Ea},
{&quot;@@As&quot;, 0, &amp;oncore_msg_As}};
void
read_data()
{
int i, j, k, n, iseq, jseq;
uchar *cp, *cp1;
for(cp=Buf+1; (n = 256*(*cp) + *(cp+1)) != 0; cp+=(n+3)) {
for (k=0; k &lt; sizeof(Hdr)/sizeof(Hdr[0]); k++) {
if (!strncmp(cp+3, Hdr[k].c, 4)) { /* am I interested? */
iseq = *(cp+2);
jseq = Hdr[k].seq;
Hdr[k].seq = iseq;
if (iseq &gt; jseq) { /* has it changed? */
/* verify checksum */
j = 0;
cp1 = cp+3; /* points to start of oncore response */
for (i=2; i &lt; n-3; i++)
j ^= cp1[i];
if (j == cp1[n-3]) { /* good checksum */
Hdr[k].go_to(cp1);
} else {
fprintf(stderr, &quot;Bad Checksum for %s\n&quot;, Hdr[k].c);
break;
}
}
}
}
if (!strncmp(cp+3, &quot;@@Ea&quot;, 4))
cp += 3*(n+3);
if (!strncmp(cp+3, &quot;@@Cb&quot;, 4))
cp += 34*(n+3);
}
}
oncore_msg_Bb(uchar *buf)
{
/* process Bb messages */
}
oncore_msg_Ea(uchar *buf)
{
/* process Ea messages */
}
oncore_msg_As(uchar *buf)
{
/* process As messages */
}
</pre>
<p>The structure Hdr contains the Identifying string for each of the messages that we want to examine, and the name of a program to call when a new message of that type is arrives. The loop can be run every few seconds to check for new data.</p>
<h4>Examples</h4>
<p>There are two complete examples available. The first plots satellite positions and the station position as affected by SA, and keeps track of the mean station position, so you can run it for periods of days to get a better station position. The second shows the effective horizon by watching satellite tracks. The examples will be found in the GNU-zipped tar file <a href="ftp://ftp.udel.edu/pub/ntp/software/OncorePlot.tar.gz">ftp://ftp.udel.edu/pub/ntp/software/OncorePlot.tar.gz</a>.</p>
<p>Try the new interface, enjoy.</p>
<hr>
<address>Reg.Clemens (reg@dwf.com), Poul-Henning Kamp (phk@FreeBSD.org)</address>
<hr>
<script type="text/javascript" language="javascript" src="../scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,32 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<title>External Clock Discipline and the Local Clock Driver</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<h3>External Clock Discipline and the Local Clock Driver</h3>
<p>Last update: <csobj format="ShortTime" h="24" locale="00000409" region="0" t="DateTime" w="50">15:41</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="240">Sunday, February 02, 2003</csobj></p>
<hr>
<p>The NTPv4 implementation includes provisions for an external clock, where the system clock is implemented by some external hardware device. One implementation might take the form of a bus peripheral with a high resolution counter disciplined by a GPS receiver, for example. Another implementation might involve another synchronization protocol, such as the Digital Time Synchronization Service (DTSS), where the system time is disciplined to this protocol and NTP clients of the server obtain synchronization indirectly via the server. A third implementation might be a completely separate clock discipline algorithm and synchronization protocol, such as the <tt>Lockclock</tt> algorithm used with NIST Automated Computer Time Service (ACTS) modem synchronized time.</p>
<p>When external clocks are used in conjunction with NTP service, some way needs to be provided for the external clock driver and NTP daemon <tt>ntpd</tt> to communicate and determine which discipline is in control. This is necessary in order to provide backup, for instance if the external clock or protocol were to fail and synchronization service fall back to other means, such as a local reference clock or another NTP server. In addition, when the external clock and driver are in control, some means needs to be provided for the clock driver to pass on status information and error statistics to the NTP daemon.</p>
<p>Control and monitoring functions for the external clock and driver are implemented using the <a href="drivers/driver1.html">Local Clock (type 1) driver</a> and the <tt>ntp_adjtime()</tt> system call. This system call is implemented by special kernel provisions included in the kernel of several operating systems, including Solaris, Tru64, FreeBSD and Linux, and possibly others. When the external clock is disabled or not implemented, the system call is used to pass time and frequency information, as well as error statistics, to the kernel. Besides disciplining the system time, the same interface can be used by other applications to determine the operating parameters of the discipline.</p>
<p>When the external clock is enabled, <tt>ntpd</tt> does not discipline the system clock, nor does it maintain the error statistics. In this case, the external clock and driver do this using mechanisms unknown to <tt>ntpd</tt>; however, in this case the kernel state variables are retrieved at 64-s intervals by the Local Clock driver and used by the clock selection and mitigation algorithms to determine the system variables presented to other NTP clients and peers. In this way, downstream clients and servers in the NTP subnet can make an intelligent choice when more than one server is available.</p>
<p>In order to implement a reliable mitigation between ordinary NTP sources and the external clock source, a protocol is necessary between the local clock driver and the external clock driver. This is implemented using Boolean variables and certain bits in the kernel clock status word. The Boolean variables include the following:</p>
<p><tt>ntp_enable</tt>. set/reset by the <tt>enable</tt> command. enables ntp clock discipline</p>
<p><tt>ntp_contro</tt>l. set during initial configuration if kernel support is available</p>
<p><tt>kern_enable</tt> Set/reset by the <tt>enable</tt> command</p>
<p>If the <tt>kern_enable</tt> switch is set, the daemon computes the offset, frequency, maximum error, estimated error, time constand and status bits, then provides them to the kernel via <tt>ntp_adjtime()</tt>. If this switch is not set, these values are not passed to the kernel; however, the daemon retrieves their present values and uses them in place of the values computed by the daemon.</p>
<p>The <tt>pps_update</tt> bit set in the protocol routine if the prefer peer has survived and has offset less than 128 ms; otherwise set to zero.</p>
<p>The <tt>pps_contro</tt>l Updated to the current time by kernel support if the PPS signal is enabled and working correctly. Set to zero in the adjust routine if the interval since the last update exceeds 120 s.</p>
<p>The <tt>ntp_enable</tt> and <tt>kern_enable</tt> are set by the configuration module. Normally, both switches default on, so the daemon can control the time and the kernel discipline can be used, if available. The <tt>pps_update</tt> switch is set by the protocol module when it believes the PPS provider source is legitimate and operating within nominals. The <tt>ntp_control</tt> switch is set during configuration by interrogating the kernel. If both the <tt>kern_enable</tt> and <tt>ntp_control</tt> switches are set, the daemon disciplines the clock via the kernel and the internal daemon discipline is disabled.</p>
<p>The external clock driver controls the system time and clock selection in the following way. Normally, the driver adjusts the kernel time using the <tt>ntp_adjtime()</tt> system call in the same way as the daemon. In the case where the kernel discipline is to be used intact, the clock offset is provided in this call and the loop operates as specified. In the case where the driver steers only the frequency, the offset is specified as zero.</p>
<hr>
<script type="text/javascript" language="javascript" src="scripts/footer.txt"></script>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!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"><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="24" locale="00000409" region="0" t="DateTime" w="50">20:27</csobj> UTC <csobj format="LongDate" h="24" locale="00000409" region="0" t="DateTime" w="257">Monday, December 02, 2002</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

@ -0,0 +1,37 @@
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.

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