aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1995-12-30 19:02:48 +0000
committerPeter Wemm <peter@FreeBSD.org>1995-12-30 19:02:48 +0000
commit5d9a77686cc42fd6071322f14b7d3d5a7bdb9b11 (patch)
treeec3f7da41df0bbda6880d33956455b26f48e796a
parentdaa35edbd086b27357d8f048ede7c84dcc520748 (diff)
downloadsrc-vendor/ntpd.tar.gz
src-vendor/ntpd.zip
recording cvs-1.6 file deathvendor/ntpd
Notes
Notes: svn path=/cvs2svn/branches/UDEL/; revision=13122
-rw-r--r--usr.sbin/xntpd/Config200
-rw-r--r--usr.sbin/xntpd/Config.local198
-rw-r--r--usr.sbin/xntpd/Config.local.dist198
-rw-r--r--usr.sbin/xntpd/Config.sed14
-rw-r--r--usr.sbin/xntpd/adjtime/Makefile.tmpl53
-rw-r--r--usr.sbin/xntpd/adjtime/README23
-rw-r--r--usr.sbin/xntpd/adjtime/adjtime.c101
-rw-r--r--usr.sbin/xntpd/adjtime/adjtime.h63
-rw-r--r--usr.sbin/xntpd/adjtime/adjtimed.c496
-rw-r--r--usr.sbin/xntpd/authstuff/Makefile.tmpl92
-rw-r--r--usr.sbin/xntpd/clockstuff/Makefile.tmpl60
-rw-r--r--usr.sbin/xntpd/compilers/README5
-rw-r--r--usr.sbin/xntpd/compilers/aux2.gcc1
-rw-r--r--usr.sbin/xntpd/compilers/aux3.gcc1
-rw-r--r--usr.sbin/xntpd/compilers/decosf1.gcc1
-rw-r--r--usr.sbin/xntpd/compilers/domainos.cc1
-rw-r--r--usr.sbin/xntpd/compilers/hpux-adj.cc1
-rw-r--r--usr.sbin/xntpd/compilers/hpux-adj.gcc1
-rw-r--r--usr.sbin/xntpd/compilers/hpux.cc1
-rw-r--r--usr.sbin/xntpd/compilers/hpux.gcc1
-rw-r--r--usr.sbin/xntpd/compilers/hpux10+.cc1
-rw-r--r--usr.sbin/xntpd/compilers/irix4.cc2
-rw-r--r--usr.sbin/xntpd/compilers/linux.gcc2
-rw-r--r--usr.sbin/xntpd/compilers/mips.cc1
-rw-r--r--usr.sbin/xntpd/compilers/sinix-m.cc1
-rw-r--r--usr.sbin/xntpd/compilers/sinix-m.gcc2
-rw-r--r--usr.sbin/xntpd/compilers/sunos4.bsd.cc1
-rw-r--r--usr.sbin/xntpd/compilers/sunos4.bsd.gcc1
-rw-r--r--usr.sbin/xntpd/compilers/sunos4.posix.gcc1
-rw-r--r--usr.sbin/xntpd/compilers/sunos5.1.gcc2
-rw-r--r--usr.sbin/xntpd/compilers/sunos5.2.gcc2
-rw-r--r--usr.sbin/xntpd/compilers/ultrix.bsd.cc2
-rw-r--r--usr.sbin/xntpd/compilers/ultrix.bsd.gcc1
-rw-r--r--usr.sbin/xntpd/compilers/ultrix.posix.cc2
-rw-r--r--usr.sbin/xntpd/compilers/ultrix.posix.gcc1
-rw-r--r--usr.sbin/xntpd/gadget/README84
-rw-r--r--usr.sbin/xntpd/gadget/adt0127.lpr1427
-rw-r--r--usr.sbin/xntpd/gadget/art01.lpr890
-rw-r--r--usr.sbin/xntpd/gadget/art02.lpr893
-rw-r--r--usr.sbin/xntpd/gadget/dd0124.lpr813
-rw-r--r--usr.sbin/xntpd/gadget/gadget.lst332
-rw-r--r--usr.sbin/xntpd/gadget/gadget.s012277
-rw-r--r--usr.sbin/xntpd/gadget/gadget.s02288
-rw-r--r--usr.sbin/xntpd/gadget/gen0102.lpr1973
-rw-r--r--usr.sbin/xntpd/gadget/sm0228.lpr744
-rw-r--r--usr.sbin/xntpd/gadget/sst0126.lpr1118
-rw-r--r--usr.sbin/xntpd/hints/README12
-rw-r--r--usr.sbin/xntpd/hints/aux159
-rw-r--r--usr.sbin/xntpd/hints/bsdi61
-rw-r--r--usr.sbin/xntpd/hints/decosf140
-rw-r--r--usr.sbin/xntpd/hints/hpux92
-rw-r--r--usr.sbin/xntpd/hints/linux9
-rw-r--r--usr.sbin/xntpd/hints/notes-xntp-v3119
-rw-r--r--usr.sbin/xntpd/hints/parse105
-rw-r--r--usr.sbin/xntpd/hints/refclocks32
-rw-r--r--usr.sbin/xntpd/hints/rs600056
-rw-r--r--usr.sbin/xntpd/hints/sgi74
-rw-r--r--usr.sbin/xntpd/hints/solaris87
-rw-r--r--usr.sbin/xntpd/hints/sun417
-rw-r--r--usr.sbin/xntpd/hints/svr4-dell6
-rw-r--r--usr.sbin/xntpd/kernel/Makefile.tmpl59
-rw-r--r--usr.sbin/xntpd/kernel/README90
-rw-r--r--usr.sbin/xntpd/kernel/README.streams86
-rw-r--r--usr.sbin/xntpd/kernel/tty_chu.c276
-rw-r--r--usr.sbin/xntpd/kernel/tty_chu_STREAMS.c603
-rw-r--r--usr.sbin/xntpd/kernel/tty_clk.c317
-rw-r--r--usr.sbin/xntpd/kernel/tty_clk_STREAMS.c266
-rw-r--r--usr.sbin/xntpd/lib/Makefile.tmpl75
-rw-r--r--usr.sbin/xntpd/lib/authdes.c845
-rw-r--r--usr.sbin/xntpd/machines/README5
-rw-r--r--usr.sbin/xntpd/machines/aix3.210
-rw-r--r--usr.sbin/xntpd/machines/aux29
-rw-r--r--usr.sbin/xntpd/machines/aux39
-rw-r--r--usr.sbin/xntpd/machines/bsdi8
-rw-r--r--usr.sbin/xntpd/machines/convexos1010
-rw-r--r--usr.sbin/xntpd/machines/convexos99
-rw-r--r--usr.sbin/xntpd/machines/decosf19
-rw-r--r--usr.sbin/xntpd/machines/dell.svr49
-rw-r--r--usr.sbin/xntpd/machines/domainos7
-rw-r--r--usr.sbin/xntpd/machines/freebsd8
-rw-r--r--usr.sbin/xntpd/machines/hpux8
-rw-r--r--usr.sbin/xntpd/machines/hpux-adj8
-rw-r--r--usr.sbin/xntpd/machines/hpux10+8
-rw-r--r--usr.sbin/xntpd/machines/i3867
-rw-r--r--usr.sbin/xntpd/machines/i386svr49
-rw-r--r--usr.sbin/xntpd/machines/irix49
-rw-r--r--usr.sbin/xntpd/machines/irix59
-rw-r--r--usr.sbin/xntpd/machines/linux8
-rw-r--r--usr.sbin/xntpd/machines/mips9
-rw-r--r--usr.sbin/xntpd/machines/netbsd8
-rw-r--r--usr.sbin/xntpd/machines/next9
-rw-r--r--usr.sbin/xntpd/machines/ptx8
-rw-r--r--usr.sbin/xntpd/machines/sequent8
-rw-r--r--usr.sbin/xntpd/machines/sinix-m11
-rw-r--r--usr.sbin/xntpd/machines/sony6
-rw-r--r--usr.sbin/xntpd/machines/sunos4.bsd11
-rw-r--r--usr.sbin/xntpd/machines/sunos4.posix11
-rw-r--r--usr.sbin/xntpd/machines/sunos5.111
-rw-r--r--usr.sbin/xntpd/machines/sunos5.211
-rw-r--r--usr.sbin/xntpd/machines/svr410
-rw-r--r--usr.sbin/xntpd/machines/ultrix.bsd7
-rw-r--r--usr.sbin/xntpd/machines/ultrix.posix7
-rw-r--r--usr.sbin/xntpd/machines/univel10
-rw-r--r--usr.sbin/xntpd/machines/unixware110
-rw-r--r--usr.sbin/xntpd/machines/vax6
-rw-r--r--usr.sbin/xntpd/ntpdate/Makefile.tmpl70
-rw-r--r--usr.sbin/xntpd/ntpq/Makefile.tmpl68
-rw-r--r--usr.sbin/xntpd/ntptrace/Makefile.tmpl70
-rw-r--r--usr.sbin/xntpd/parse/Makefile.kernel76
-rw-r--r--usr.sbin/xntpd/parse/Makefile.tmpl111
-rw-r--r--usr.sbin/xntpd/patches/patch.1790
-rw-r--r--usr.sbin/xntpd/patches/patch.101925
-rw-r--r--usr.sbin/xntpd/patches/patch.11536
-rw-r--r--usr.sbin/xntpd/patches/patch.1266
-rw-r--r--usr.sbin/xntpd/patches/patch.1368
-rw-r--r--usr.sbin/xntpd/patches/patch.14116
-rw-r--r--usr.sbin/xntpd/patches/patch.1539
-rw-r--r--usr.sbin/xntpd/patches/patch.16267
-rw-r--r--usr.sbin/xntpd/patches/patch.1750
-rw-r--r--usr.sbin/xntpd/patches/patch.1899
-rw-r--r--usr.sbin/xntpd/patches/patch.19599
-rw-r--r--usr.sbin/xntpd/patches/patch.2129
-rw-r--r--usr.sbin/xntpd/patches/patch.201031
-rw-r--r--usr.sbin/xntpd/patches/patch.2154
-rw-r--r--usr.sbin/xntpd/patches/patch.22296
-rw-r--r--usr.sbin/xntpd/patches/patch.2380
-rw-r--r--usr.sbin/xntpd/patches/patch.24474
-rw-r--r--usr.sbin/xntpd/patches/patch.25474
-rw-r--r--usr.sbin/xntpd/patches/patch.2636
-rw-r--r--usr.sbin/xntpd/patches/patch.2786
-rw-r--r--usr.sbin/xntpd/patches/patch.28454
-rw-r--r--usr.sbin/xntpd/patches/patch.2952
-rw-r--r--usr.sbin/xntpd/patches/patch.33032
-rw-r--r--usr.sbin/xntpd/patches/patch.3073
-rw-r--r--usr.sbin/xntpd/patches/patch.3183
-rw-r--r--usr.sbin/xntpd/patches/patch.3289
-rw-r--r--usr.sbin/xntpd/patches/patch.3375
-rw-r--r--usr.sbin/xntpd/patches/patch.34303
-rw-r--r--usr.sbin/xntpd/patches/patch.35914
-rw-r--r--usr.sbin/xntpd/patches/patch.3642
-rw-r--r--usr.sbin/xntpd/patches/patch.37204
-rw-r--r--usr.sbin/xntpd/patches/patch.38226
-rw-r--r--usr.sbin/xntpd/patches/patch.3978
-rw-r--r--usr.sbin/xntpd/patches/patch.44719
-rw-r--r--usr.sbin/xntpd/patches/patch.4092
-rw-r--r--usr.sbin/xntpd/patches/patch.4150
-rw-r--r--usr.sbin/xntpd/patches/patch.4238
-rw-r--r--usr.sbin/xntpd/patches/patch.4348
-rw-r--r--usr.sbin/xntpd/patches/patch.549
-rw-r--r--usr.sbin/xntpd/patches/patch.6550
-rw-r--r--usr.sbin/xntpd/patches/patch.7274
-rw-r--r--usr.sbin/xntpd/patches/patch.844
-rw-r--r--usr.sbin/xntpd/patches/patch.983
-rw-r--r--usr.sbin/xntpd/scripts/hpadjtime.sh18
-rw-r--r--usr.sbin/xntpd/util/Makefile.tmpl62
-rw-r--r--usr.sbin/xntpd/xntpd/Makefile.tmpl168
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_new/refclock_datum.c593
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_new/refclock_gpstm.c999
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_new/refclock_leitch.c718
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_new/refclock_msfees.c1575
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_new/refclock_mx4200.c977
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_new/refclock_omega.c999
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_new/refclock_parse.c3617
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_old/refclock_datum.c645
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_old/refclock_gpstm.c998
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_old/refclock_leitch.c709
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_old/refclock_msfees.c1575
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_old/refclock_mx4200.c1342
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_old/refclock_omega.c999
-rw-r--r--usr.sbin/xntpd/xntpd/refclock_old/refclock_parse.c3605
-rw-r--r--usr.sbin/xntpd/xntpdc/Makefile.tmpl68
-rw-r--r--usr.sbin/xntpd/xntpres/Makefile.tmpl68
-rw-r--r--usr.sbin/xntpd/xntpres/README6
-rw-r--r--usr.sbin/xntpd/xntpres/xntpres.c850
174 files changed, 0 insertions, 55943 deletions
diff --git a/usr.sbin/xntpd/Config b/usr.sbin/xntpd/Config
deleted file mode 100644
index c15ec053a520..000000000000
--- a/usr.sbin/xntpd/Config
+++ /dev/null
@@ -1,200 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL=-DREFCLOCK
-DEFS= -DSYS_FREEBSD -DSYS_386BSD
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lcrypt
-RESLIB=
-COPTS= -O2
-COMPILER= gcc
-LIBDEFS= -DXNTP_LITTLE_ENDIAN
-# This is the local configure file (distribution version).
-# You must modify it to fit your particular configuration
-# and name it Config.local
-# The following configuratiions can be auto-generated:
-#
-# make Config.local.green
-# make a Config.local that supports a local clock
-# (i.e. allow fallback to use of the CPU's own clock)
-# make Config.local.NO.clock
-# make a Config.local that supports no clocks
-#
-#
-# NOTE TO GREENHORNS
-#
-# For plug-'n-play and no radios or other complicated gadgetry,
-# use "make Config.local.green" as above.
-#
-# Following defines can be set in the DEFS_OPT= define:
-#
-# The flag -DDEBUG includes some debugging code. To use this, include
-# the define and start the daemon with one or more -d flags, depending
-# on your calibration of pearannoya. The daemon will not detach your
-# terminal in this case. Judicious use of grep will reduce the speaker
-# volume to bearable levels.
-#
-# To change the location of the configuration file, use a
-# -DCONFIG_FILE=\\"/local/etc/ntp.conf\\" or something similar.
-#
-# The -DSYSLOG_FILE defines allows logging messages that are normally
-# reported via syslof() in a file. The file name can be configured using
-# the configuration line "logfile <filename>" in CONFIG_FILE.
-#
-# There are three serial port system software interfaces, each of
-# which is peculiar to one or more Unix versions. Define
-# -DHAVE_SYSV_TTYS for basic System V compatibility; define -DSTREAM
-# for POSIX compatibility including System V Streams, and
-# HAVE_BSD_TTYS for 4.3bsd compatibility. Only one of these three
-# should be defined. If none are defined, HAVE_BSD_TTYS is assumed.
-# Usually these defines are already set correctly.
-#
-DEFS_OPT=-DDEBUG
-
-#
-# The DEFS_LOCAL define picks up all flags from DEFS_OPT (do not delete that)
-# and one of the following:
-#
-# The flag -DREFCLOCK causes the basic reference clock support to be
-# compiled into the daemon. If you set this you may also want to
-# configure the particular clock drivers you want in the CLOCKDEFS= line
-# below. This flag affects xntpd only. This define is included by
-# default when using the "make makeconfig" script.
-#
-# The next two sets of defines are meaningful only when radio clock
-# drivers or special 1-pps signals are to be used. For systems without
-# these features, these delicious complexities can be avoided. Ordinarily,
-# the "make makeconfig" script figures out which ones to use, but your
-# mileage may vary.
-#
-# There are three ways to utilize external 1-pps signals. Define
-# -DPPS to include just the pps routine, such as used by the DCF77(PARSE)
-# clock driver. Define -DPPSCLK to include a serial device driver
-# which avoids much of the jitter due to upper level port
-# processing. This requires a dedicated serial port and either the
-# tty_clock line discipline or tty_clk_streams module, both of
-# which are in the ./kernel directory. Define -DPPSCD to include a
-# special driver which intercepts carrier-detect transitions
-# generated by the pps signal. This requires a nondedicated serial
-# port and the ppsclock streams module in the ./kernel directory.
-# Only one of these three flags should be defined.
-#
-# The flag KERNEL_PLL causes code to be compiled for a special feature of
-# the kernel that (a) implements the phase-lock loop and (b) provides
-# a user interface to learn time, maximum error and estimated error.
-# See the file README.kern in the doc directory for further info.
-# This code is activated only if the relevant kernel features have
-# been configured; it does not affect operation of unmodified kernels.
-# To compile it, however, requires a few header files from the
-# special distribution.
-#
-# Note: following line must always start with DEFS_LOCAL= $(DEFS_OPT)
-DEFS_LOCAL= $(DEFS_OPT) -DREFCLOCK -DPPSPPS -DKERNEL_PLL
-
-#
-# Radio clock support definitions (these only make sense if -DREFCLOCK
-# used), which is normally the case. Note that a configuration can include
-# no clocks, more than one type of clock and even multiple clocks of the
-# same type.
-#
-# For most radio clocks operating with serial ports, accuracy can
-# be considerably improved through use of the tty_clk line
-# discipline or tty_clk_STREAMS streams module found in the
-# ./kernel directory. These gizmos capture a timestamp upon
-# occurrence of an intercept character and stuff it in the data
-# stream for the clock driver to munch. To select this mode,
-# postfix the driver name with the string CLK; that is, WWVB
-# becomes WWVBCLK. If more than one clock is in use, the CLK
-# postfix can be used with any or all of them.
-#
-# Alternatively, for the best accuracy, use the ppsclock streams
-# module in the ./ppsclock directory to steal the carrier-detect
-# transition and capture a precision timestamp. At present this
-# works only with SunOS 4.1.1 or later. To select this mode,
-# postfix the driver name with the string PPS; that is, AS2201
-# becomes AS2201PPS. If more than one clock is in use, the PPS
-# postfix should be used with only one of them. If any PPS
-# postfix is defined, the -DPPSPPS define should be used on the
-# DEFS above.
-#
-# Define -DLOCAL_CLOCK for a local pseudo-clock to masquerade as a
-# reference clock for those subnets without access to the real thing.
-# Works in all systems and requires no hardware support. This is defined
-# by default when using the "make makeconfig" script and greenhorn
-# configuraiton.
-#
-# Define -DPST for a PST/Traconex 1020 WWV/H receiver. The driver
-# supports both the CLK and PPS modes. It should work in all systems
-# with a serial port.
-#
-# Define -DWWVB for a Spectracom 8170 or Netclock/2 WWVB receiver. It
-# should work in all systems with a serial port. The driver supports
-# both the CLK and PPS modes if the requisite kernel support is installed.
-#
-# Define -DCHU for a special CHU receiver using an ordinary shortwave
-# radio. This requires the chu_clk line discipline or chu_clk_STREAMS
-# module in the ./kernel directory. At present, this driver works only
-# on SunOS4.1.x; operation in other systems has not been confirmed.
-# Construction details for a suitable modem can be found in the ./gadget
-# directory. The driver supports # neither the CLK nor PPS modes.
-#
-# Define -DPARSE for a DCF77/GPS(GENERIC) receiver. For best performance
-# this requires a special parsestreams STREAMS (SunOS 4.x) module in the
-# ./parse directory. Define -DPARSEPPS for PPS support via the
-# DCF77/GPS (GENERIC) receiver; also, define -DPPS in the DEFS above.
-# Define: -DCLOCK_MEINBERG for Meinberg clocks
-# -DCLOCK_SCHMID for Schmid receivers
-# -DCLOCK_DCF7000 for ELV DCF7000
-# -DCLOCK_RAWDCF for simple receivers (100/200ms pulses on Rx)
-# -DCLOCK_TRIMSV6 for Trimble SV6 GPS receiver
-#
-# Define -DMX4200PPS for a Magnavox 4200 GPS receiver. At present, this
-# driver works only on SunOS4.1.x with CPU serial ports only. The PPS
-# mode is required.
-#
-# Define -DAS2201 for an Austron 2200A or 2201A GPS receiver. It should
-# work in all systems with a serial port. The driver does not support the
-# CLK mode, but does support the PPS mode. If the radio is connected to
-# more than one machine, the PPS mode is required.
-#
-# Define -DGOES for a Kinemetrics/TrueTime 468-DC GOES receiver. This
-# driver is known to work with some other TrueTime products as well,
-# including the GPS-DC GPS receiver. It should work in all systems with
-# a serial port. The driver does not support the CLK mode, but does
-# support the PPS mode.
-#
-# Define -DOMEGA for a Kinemetrics/TrueTime OM-DC OMEGA receiver. It
-# should work in all systems with a serial port. The driver does not
-# support the CLK mode, but does support the PPS mode.
-#
-# Define -DTPRO for a KSI/Odetics TPRO-S IRIG-B timecode reader. This
-# requires the SunOS interface driver available from KSI. The driver
-# supports neither the CLK nor PPS modes.
-#
-# Define -DLEITCH for a Leitch CSD 5300 Master Clock System Driver for
-# the HP 5061B Cesium Clock. It should work in all systems with a serial
-# port. The driver does not support the CLK mode, but does support the
-# PPS mode.
-#
-# Define -DMSFEESPPS for an EES M201 MSF receiver. It currently only works
-# under SunOS 4.x with the PPSCD (ppsclock) STREAMS module, but the RCS
-# files on cl.cam.ac.uk still has support for CLK and CBREAK modes.
-#
-# Define -DIRIG for a IRIG-B timecode timecode using the audio codec of
-# the Sun SPARCstations. This requires a modified BSD audio driver and
-# exclusive access to the audio port. A memo describing how it works and
-# how to install the driver is in the README.irig file in the ./doc
-# directory.
-#
-# Note: The following defines result in compilation of all the above radio
-# clocks. This works on a Sun 4.1.x system which has tty_clk, chu_clk and
-# ppsclock STREAMS modules installed. If the trailing CLK and PPS suffixes
-# are removed and the IRIG, PARSE* and CLOCK* deleted, all of the rest compile
-# under Ultrix 4.2a/3. If the MX4200 is removed, all the rest compile on a DEC
-# OSF/1 Alpha.
-#
-CLOCKDEFS= -DLOCAL_CLOCK -DAS2201PPS -DCHU -DGOES -DIRIG -DMX4200PPS -DOMEGA -DPSTCLK -DTPRO -DWWVBCLK -DMSFEESPPS -DLEITCH
-
-#
-# Directory into which binaries should be installed (default /usr/local)
-#
-BINDIR= /usr/local/bin
diff --git a/usr.sbin/xntpd/Config.local b/usr.sbin/xntpd/Config.local
deleted file mode 100644
index 50bbe3a85f9e..000000000000
--- a/usr.sbin/xntpd/Config.local
+++ /dev/null
@@ -1,198 +0,0 @@
-# This is the local configure file (distribution version).
-# You must modify it to fit your particular configuration
-# and name it Config.local
-# The following configuratiions can be auto-generated:
-#
-# make Config.local.green
-# make a Config.local that supports a local clock
-# (i.e. allow fallback to use of the CPU's own clock)
-# make Config.local.NO.clock
-# make a Config.local that supports no clocks
-#
-#
-# NOTE TO GREENHORNS
-#
-# For plug-'n-play and no radios or other complicated gadgetry,
-# use "make Config.local.green" as above.
-#
-# Following defines can be set in the DEFS_OPT= define:
-#
-# The flag -DDEBUG includes some debugging code. To use this, include
-# the define and start the daemon with one or more -d flags, depending
-# on your calibration of pearannoya. The daemon will not detach your
-# terminal in this case. Judicious use of grep will reduce the speaker
-# volume to bearable levels.
-#
-# To change the location of the configuration file, use a
-# -DCONFIG_FILE=\\"/local/etc/ntp.conf\\" or something similar.
-#
-# The -DSYSLOG_FILE defines allows logging messages that are normally
-# reported via syslog() in a file. The file name can be configured using
-# the configuration line "logfile <filename>" in CONFIG_FILE.
-#
-# There are three serial port system software interfaces, each of
-# which is peculiar to one or more Unix versions. Define
-# -DHAVE_SYSV_TTYS for basic System V compatibility; define -DSTREAM
-# for POSIX compatibility including System V Streams, and
-# HAVE_BSD_TTYS for 4.3bsd compatibility.
-# Use HAVE_TERMIOS for POSIX (termios.h) without System V Streams.
-# Only one of these three should be defined. If none are defined,
-# HAVE_BSD_TTYS is assumed.
-# Usually these defines are already set correctly.
-#
-DEFS_OPT=-DDEBUG
-
-#
-# The DEFS_LOCAL define picks up all flags from DEFS_OPT (do not delete that)
-# and one of the following:
-#
-# The flag -DREFCLOCK causes the basic reference clock support to be
-# compiled into the daemon. If you set this you may also want to
-# configure the particular clock drivers you want in the CLOCKDEFS= line
-# below. This flag affects xntpd only. This define is included by
-# default when using the "make makeconfig" script.
-#
-# The next two sets of defines are meaningful only when radio clock
-# drivers or special 1-pps signals are to be used. For systems without
-# these features, these delicious complexities can be avoided. Ordinarily,
-# the "make makeconfig" script figures out which ones to use, but your
-# mileage may vary.
-#
-# There are three ways to utilize external 1-pps signals. Define
-# -DPPS to include just the pps routine, such as used by the DCF77(PARSE)
-# clock driver. Define -DPPSCLK to include a serial device driver
-# which avoids much of the jitter due to upper level port
-# processing. This requires a dedicated serial port and either the
-# tty_clock line discipline or tty_clk_streams module, both of
-# which are in the ./kernel directory. Define -DPPSCD to include a
-# special driver which intercepts carrier-detect transitions
-# generated by the pps signal. This requires a nondedicated serial
-# port and the ppsclock streams module in the ./kernel directory.
-# Only one of these three flags should be defined.
-#
-# The flag KERNEL_PLL causes code to be compiled for a special feature of
-# the kernel that (a) implements the phase-lock loop and (b) provides
-# a user interface to learn time, maximum error and estimated error.
-# See the file README.kern in the doc directory for further info.
-# This code is activated only if the relevant kernel features have
-# been configured; it does not affect operation of unmodified kernels.
-# To compile it, however, requires a few header files from the
-# special distribution.
-#
-# Note: following line must always start with DEFS_LOCAL= $(DEFS_OPT)
-DEFS_LOCAL= $(DEFS_OPT) -DREFCLOCK #TEST -DPPSPPS -DKERNEL_PLL
-
-#
-# Radio clock support definitions (these only make sense if -DREFCLOCK
-# used), which is normally the case. Note that a configuration can include
-# no clocks, more than one type of clock and even multiple clocks of the
-# same type.
-#
-# For most radio clocks operating with serial ports, accuracy can
-# be considerably improved through use of the tty_clk line
-# discipline or tty_clk_STREAMS streams module found in the
-# ./kernel directory. These gizmos capture a timestamp upon
-# occurrence of an intercept character and stuff it in the data
-# stream for the clock driver to munch. To select this mode,
-# postfix the driver name with the string CLK; that is, WWVB
-# becomes WWVBCLK. If more than one clock is in use, the CLK
-# postfix can be used with any or all of them.
-#
-# Alternatively, for the best accuracy, use the ppsclock streams
-# module in the ./ppsclock directory to steal the carrier-detect
-# transition and capture a precision timestamp. At present this
-# works only with SunOS 4.1.1 or later. To select this mode,
-# postfix the driver name with the string PPS; that is, AS2201
-# becomes AS2201PPS. If more than one clock is in use, the PPS
-# postfix should be used with only one of them. If any PPS
-# postfix is defined, the -DPPSPPS define should be used on the
-# DEFS above.
-#
-# Define -DLOCAL_CLOCK for a local pseudo-clock to masquerade as a
-# reference clock for those subnets without access to the real thing.
-# Works in all systems and requires no hardware support. This is defined
-# by default when using the "make makeconfig" script and greenhorn
-# configuraiton.
-#
-# Define -DAS2201 for an Austron 2200A or 2201A GPS receiver. It should
-# work in all systems with a serial port. The driver does not support the
-# CLK mode, but does support the PPS mode. If the radio is connected to
-# more than one machine, the PPS mode is required.
-#
-# Define -DCHU for a special CHU receiver using an ordinary shortwave
-# radio. This requires the chu_clk line discipline or chu_clk_STREAMS
-# module in the ./kernel directory. At present, this driver works only
-# on SunOS4.1.x; operation in other systems has not been confirmed.
-# Construction details for a suitable modem can be found in the ./gadget
-# directory. The driver supports # neither the CLK nor PPS modes.
-#
-# Define -DGOES for a Kinemetrics/TrueTime 468-DC GOES receiver. This
-# driver is known to work with some other TrueTime products as well,
-# including the GPS-DC GPS receiver. It should work in all systems with
-# a serial port. The driver does not support the CLK mode, but does
-# support the PPS mode.
-#
-# Define -DGPSTM for a Kinemetrics/TrueTime GPS-TM/TMD receiver. It
-# should work in all systems with a serial port.
-#
-# Define -DIRIG for a IRIG-B timecode timecode using the audio codec of
-# the Sun SPARCstations. This requires a modified BSD audio driver and
-# exclusive access to the audio port. A memo describing how it works and
-# how to install the driver is in the README.irig file in the ./doc
-# directory.
-#
-# Define -DLEITCH for a Leitch CSD 5300 Master Clock System Driver for
-# the HP 5061B Cesium Clock. It should work in all systems with a serial
-# port. The driver does not support the CLK mode, but does support the
-# PPS mode.
-#
-# Define -DMX4200PPS for a Magnavox 4200 GPS receiver. At present, this
-# driver works only on SunOS4.1.x with CPU serial ports only. The PPS
-# mode is required.
-#
-# Define -DMSFEESPPS for an EES M201 MSF receiver. It currently only works
-# under SunOS 4.x with the PPSCD (ppsclock) STREAMS module, but the RCS
-# files on cl.cam.ac.uk still has support for CLK and CBREAK modes.
-#
-# Define -DOMEGA for a Kinemetrics/TrueTime OM-DC OMEGA receiver. It
-# should work in all systems with a serial port. The driver does not
-# support the CLK mode, but does support the PPS mode.
-#
-# Define -DPARSE for a DCF77/GPS(GENERIC) receiver. For best performance
-# this requires a special parsestreams STREAMS (SunOS 4.x) module in the
-# ./parse directory. Define -DPARSEPPS for PPS support via the
-# DCF77/GPS (GENERIC) receiver; also, define -DPPS in the DEFS above.
-# Define: -DCLOCK_MEINBERG for Meinberg clocks
-# -DCLOCK_SCHMID for Schmid receivers
-# -DCLOCK_DCF7000 for ELV DCF7000
-# -DCLOCK_RAWDCF for simple receivers (100/200ms pulses on Rx)
-# -DCLOCK_TRIMSV6 for Trimble SV6 GPS receiver
-#
-# Define -DPST for a PST/Traconex 1020 WWV/H receiver. The driver
-# supports both the CLK and PPS modes. It should work in all systems
-# with a serial port.
-#
-# Define -DTPRO for a KSI/Odetics TPRO-S IRIG-B timecode reader. This
-# requires the SunOS interface driver available from KSI. The driver
-# supports neither the CLK nor PPS modes.
-#
-# Define -DTRAK for a 8810 GPS Receiver with Buffered RS-232-C Interface
-# Module. The driver supports both the CLK and PPS modes. It should work
-# in all systems with a serial port.
-#
-# Define -DWWVB for a Spectracom 8170 or Netclock/2 WWVB receiver. It
-# should work in all systems with a serial port. The driver supports
-# both the CLK and PPS modes if the requisite kernel support is installed.
-#
-# Note: The following defines result in compilation of all the above radio
-# clocks. This works on a Sun 4.1.x system which has tty_clk, chu_clk and
-# ppsclock STREAMS modules installed. If the trailing CLK and PPS suffixes
-# are removed and the IRIG, PARSE* and CLOCK* deleted, all of the rest compile
-# under Ultrix 4.2a/3 and DEC # OSF/1 Alpha.
-#
-CLOCKDEFS= -DLOCAL_CLOCK #TEST -DAS2201PPS -DCHU -DATUM -DGOES -DGPSTM -DIRIG -DLEITCH -DMSFEES -DMX4200PPS -DOMEGA -DPST -DTPRO -TRAK -DWWVB -DPARSE -DPARSEPPS -DCLOCK_MEINBERG -DCLOCK_RAWDCF -DCLOCK_SCHMID -DCLOCK_DCF7000 -DCLOCK_TRIMSV6
-
-#
-# Directory into which binaries should be installed (default /usr/local)
-#
-BINDIR= /usr/local/bin
diff --git a/usr.sbin/xntpd/Config.local.dist b/usr.sbin/xntpd/Config.local.dist
deleted file mode 100644
index 2f7386687d87..000000000000
--- a/usr.sbin/xntpd/Config.local.dist
+++ /dev/null
@@ -1,198 +0,0 @@
-# This is the local configure file (distribution version).
-# You must modify it to fit your particular configuration
-# and name it Config.local
-# The following configuratiions can be auto-generated:
-#
-# make Config.local.green
-# make a Config.local that supports a local clock
-# (i.e. allow fallback to use of the CPU's own clock)
-# make Config.local.NO.clock
-# make a Config.local that supports no clocks
-#
-#
-# NOTE TO GREENHORNS
-#
-# For plug-'n-play and no radios or other complicated gadgetry,
-# use "make Config.local.green" as above.
-#
-# Following defines can be set in the DEFS_OPT= define:
-#
-# The flag -DDEBUG includes some debugging code. To use this, include
-# the define and start the daemon with one or more -d flags, depending
-# on your calibration of pearannoya. The daemon will not detach your
-# terminal in this case. Judicious use of grep will reduce the speaker
-# volume to bearable levels.
-#
-# To change the location of the configuration file, use a
-# -DCONFIG_FILE=\\"/local/etc/ntp.conf\\" or something similar.
-#
-# The -DSYSLOG_FILE defines allows logging messages that are normally
-# reported via syslog() in a file. The file name can be configured using
-# the configuration line "logfile <filename>" in CONFIG_FILE.
-#
-# There are three serial port system software interfaces, each of
-# which is peculiar to one or more Unix versions. Define
-# -DHAVE_SYSV_TTYS for basic System V compatibility; define -DSTREAM
-# for POSIX compatibility including System V Streams, and
-# HAVE_BSD_TTYS for 4.3bsd compatibility.
-# Use HAVE_TERMIOS for POSIX (termios.h) without System V Streams.
-# Only one of these three should be defined. If none are defined,
-# HAVE_BSD_TTYS is assumed.
-# Usually these defines are already set correctly.
-#
-DEFS_OPT=-DDEBUG
-
-#
-# The DEFS_LOCAL define picks up all flags from DEFS_OPT (do not delete that)
-# and one of the following:
-#
-# The flag -DREFCLOCK causes the basic reference clock support to be
-# compiled into the daemon. If you set this you may also want to
-# configure the particular clock drivers you want in the CLOCKDEFS= line
-# below. This flag affects xntpd only. This define is included by
-# default when using the "make makeconfig" script.
-#
-# The next two sets of defines are meaningful only when radio clock
-# drivers or special 1-pps signals are to be used. For systems without
-# these features, these delicious complexities can be avoided. Ordinarily,
-# the "make makeconfig" script figures out which ones to use, but your
-# mileage may vary.
-#
-# There are three ways to utilize external 1-pps signals. Define
-# -DPPS to include just the pps routine, such as used by the DCF77(PARSE)
-# clock driver. Define -DPPSCLK to include a serial device driver
-# which avoids much of the jitter due to upper level port
-# processing. This requires a dedicated serial port and either the
-# tty_clock line discipline or tty_clk_streams module, both of
-# which are in the ./kernel directory. Define -DPPSCD to include a
-# special driver which intercepts carrier-detect transitions
-# generated by the pps signal. This requires a nondedicated serial
-# port and the ppsclock streams module in the ./kernel directory.
-# Only one of these three flags should be defined.
-#
-# The flag KERNEL_PLL causes code to be compiled for a special feature of
-# the kernel that (a) implements the phase-lock loop and (b) provides
-# a user interface to learn time, maximum error and estimated error.
-# See the file README.kern in the doc directory for further info.
-# This code is activated only if the relevant kernel features have
-# been configured; it does not affect operation of unmodified kernels.
-# To compile it, however, requires a few header files from the
-# special distribution.
-#
-# Note: following line must always start with DEFS_LOCAL= $(DEFS_OPT)
-DEFS_LOCAL= $(DEFS_OPT) #GREEN -DREFCLOCK #TEST -DPPSPPS -DKERNEL_PLL
-
-#
-# Radio clock support definitions (these only make sense if -DREFCLOCK
-# used), which is normally the case. Note that a configuration can include
-# no clocks, more than one type of clock and even multiple clocks of the
-# same type.
-#
-# For most radio clocks operating with serial ports, accuracy can
-# be considerably improved through use of the tty_clk line
-# discipline or tty_clk_STREAMS streams module found in the
-# ./kernel directory. These gizmos capture a timestamp upon
-# occurrence of an intercept character and stuff it in the data
-# stream for the clock driver to munch. To select this mode,
-# postfix the driver name with the string CLK; that is, WWVB
-# becomes WWVBCLK. If more than one clock is in use, the CLK
-# postfix can be used with any or all of them.
-#
-# Alternatively, for the best accuracy, use the ppsclock streams
-# module in the ./ppsclock directory to steal the carrier-detect
-# transition and capture a precision timestamp. At present this
-# works only with SunOS 4.1.1 or later. To select this mode,
-# postfix the driver name with the string PPS; that is, AS2201
-# becomes AS2201PPS. If more than one clock is in use, the PPS
-# postfix should be used with only one of them. If any PPS
-# postfix is defined, the -DPPSPPS define should be used on the
-# DEFS above.
-#
-# Define -DLOCAL_CLOCK for a local pseudo-clock to masquerade as a
-# reference clock for those subnets without access to the real thing.
-# Works in all systems and requires no hardware support. This is defined
-# by default when using the "make makeconfig" script and greenhorn
-# configuraiton.
-#
-# Define -DAS2201 for an Austron 2200A or 2201A GPS receiver. It should
-# work in all systems with a serial port. The driver does not support the
-# CLK mode, but does support the PPS mode. If the radio is connected to
-# more than one machine, the PPS mode is required.
-#
-# Define -DCHU for a special CHU receiver using an ordinary shortwave
-# radio. This requires the chu_clk line discipline or chu_clk_STREAMS
-# module in the ./kernel directory. At present, this driver works only
-# on SunOS4.1.x; operation in other systems has not been confirmed.
-# Construction details for a suitable modem can be found in the ./gadget
-# directory. The driver supports # neither the CLK nor PPS modes.
-#
-# Define -DGOES for a Kinemetrics/TrueTime 468-DC GOES receiver. This
-# driver is known to work with some other TrueTime products as well,
-# including the GPS-DC GPS receiver. It should work in all systems with
-# a serial port. The driver does not support the CLK mode, but does
-# support the PPS mode.
-#
-# Define -DGPSTM for a Kinemetrics/TrueTime GPS-TM/TMD receiver. It
-# should work in all systems with a serial port.
-#
-# Define -DIRIG for a IRIG-B timecode timecode using the audio codec of
-# the Sun SPARCstations. This requires a modified BSD audio driver and
-# exclusive access to the audio port. A memo describing how it works and
-# how to install the driver is in the README.irig file in the ./doc
-# directory.
-#
-# Define -DLEITCH for a Leitch CSD 5300 Master Clock System Driver for
-# the HP 5061B Cesium Clock. It should work in all systems with a serial
-# port. The driver does not support the CLK mode, but does support the
-# PPS mode.
-#
-# Define -DMX4200PPS for a Magnavox 4200 GPS receiver. At present, this
-# driver works only on SunOS4.1.x with CPU serial ports only. The PPS
-# mode is required.
-#
-# Define -DMSFEESPPS for an EES M201 MSF receiver. It currently only works
-# under SunOS 4.x with the PPSCD (ppsclock) STREAMS module, but the RCS
-# files on cl.cam.ac.uk still has support for CLK and CBREAK modes.
-#
-# Define -DOMEGA for a Kinemetrics/TrueTime OM-DC OMEGA receiver. It
-# should work in all systems with a serial port. The driver does not
-# support the CLK mode, but does support the PPS mode.
-#
-# Define -DPARSE for a DCF77/GPS(GENERIC) receiver. For best performance
-# this requires a special parsestreams STREAMS (SunOS 4.x) module in the
-# ./parse directory. Define -DPARSEPPS for PPS support via the
-# DCF77/GPS (GENERIC) receiver; also, define -DPPS in the DEFS above.
-# Define: -DCLOCK_MEINBERG for Meinberg clocks
-# -DCLOCK_SCHMID for Schmid receivers
-# -DCLOCK_DCF7000 for ELV DCF7000
-# -DCLOCK_RAWDCF for simple receivers (100/200ms pulses on Rx)
-# -DCLOCK_TRIMSV6 for Trimble SV6 GPS receiver
-#
-# Define -DPST for a PST/Traconex 1020 WWV/H receiver. The driver
-# supports both the CLK and PPS modes. It should work in all systems
-# with a serial port.
-#
-# Define -DTPRO for a KSI/Odetics TPRO-S IRIG-B timecode reader. This
-# requires the SunOS interface driver available from KSI. The driver
-# supports neither the CLK nor PPS modes.
-#
-# Define -DTRAK for a 8810 GPS Receiver with Buffered RS-232-C Interface
-# Module. The driver supports both the CLK and PPS modes. It should work
-# in all systems with a serial port.
-#
-# Define -DWWVB for a Spectracom 8170 or Netclock/2 WWVB receiver. It
-# should work in all systems with a serial port. The driver supports
-# both the CLK and PPS modes if the requisite kernel support is installed.
-#
-# Note: The following defines result in compilation of all the above radio
-# clocks. This works on a Sun 4.1.x system which has tty_clk, chu_clk and
-# ppsclock STREAMS modules installed. If the trailing CLK and PPS suffixes
-# are removed and the IRIG, PARSE* and CLOCK* deleted, all of the rest compile
-# under Ultrix 4.2a/3 and DEC # OSF/1 Alpha.
-#
-CLOCKDEFS= #GREEN -DLOCAL_CLOCK #TEST -DAS2201PPS -DCHU -DATUM -DGOES -DGPSTM -DIRIG -DLEITCH -DMSFEES -DMX4200PPS -DOMEGA -DPST -DTPRO -TRAK -DWWVB -DPARSE -DPARSEPPS -DCLOCK_MEINBERG -DCLOCK_RAWDCF -DCLOCK_SCHMID -DCLOCK_DCF7000 -DCLOCK_TRIMSV6
-
-#
-# Directory into which binaries should be installed (default /usr/local)
-#
-BINDIR= /usr/local/bin
diff --git a/usr.sbin/xntpd/Config.sed b/usr.sbin/xntpd/Config.sed
deleted file mode 100644
index fe5a9b7927bd..000000000000
--- a/usr.sbin/xntpd/Config.sed
+++ /dev/null
@@ -1,14 +0,0 @@
-s~^RANLIB=.*~RANLIB= ranlib~
-s~^DEFS_LOCAL=.*~DEFS_LOCAL=-DREFCLOCK~
-s~^DEFS=.*~DEFS= -DSYS_FREEBSD -DSYS_386BSD~
-s~^AUTHDEFS=.*~AUTHDEFS= -DDES -DMD5~
-s~^CLOCKDEFS=.*~CLOCKDEFS= -DLOCAL_CLOCK~
-s~^DAEMONLIBS=.*~DAEMONLIBS= -lcrypt~
-s~^RESLIB=.*~RESLIB=~
-s~^COPTS=.*~COPTS= -O2~
-s~^COMPILER=.*~COMPILER= gcc~
-s~^LIBDEFS=.*~LIBDEFS= -DXNTP_LITTLE_ENDIAN~
-s~^DEFS_OPT=.*~DEFS_OPT=-DDEBUG~
-s~^DEFS_LOCAL=.*~DEFS_LOCAL= $(DEFS_OPT) -DREFCLOCK -DPPSPPS -DKERNEL_PLL~
-s~^CLOCKDEFS=.*~CLOCKDEFS= -DLOCAL_CLOCK -DAS2201PPS -DCHU -DGOES -DIRIG -DMX4200PPS -DOMEGA -DPSTCLK -DTPRO -DWWVBCLK -DMSFEESPPS -DLEITCH~
-s~^BINDIR=.*~BINDIR= /usr/local/bin~
diff --git a/usr.sbin/xntpd/adjtime/Makefile.tmpl b/usr.sbin/xntpd/adjtime/Makefile.tmpl
deleted file mode 100644
index c2e8381165b8..000000000000
--- a/usr.sbin/xntpd/adjtime/Makefile.tmpl
+++ /dev/null
@@ -1,53 +0,0 @@
-#########################################################################
-## (c) Copyright 1988, Hewlett-Packard Co. All Rights Reserved. ##
-## ##
-## Author: Tai Jin, Hewlett-Packard Laboratories. ##
-#########################################################################
-
-## Makefile.tmpl,v 3.1 1993/07/06 01:04:40 jbj Exp
-
-#
-PROGRAM = adjtimed
-COMPILER= cc
-CC= $(COMPILER)
-BINDIR= /usr/local/etc
-COPTS= -O
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-INCL= -I../include
-LLIBS=
-INSTALL= install
-
-
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-LDFLAGS=
-LIBS= $(LLIBS) -lc
-OBJ= adjtime.o adjtimed.o
-ALL= libadjtime.a adjtimed
-
-all: $(ALL)
-
-libadjtime.a: adjtime.o
- ar vr libadjtime.a $?
-
-adjtimed: adjtimed.o ../lib/libntp.a
- $(CC) $(LDFLAGS) -o adjtimed adjtimed.o ../lib/libntp.a $(LIBS)
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)"
-
-install: $(BINDIR)/$(PROGRAM)
-
-$(BINDIR)/$(PROGRAM): $(PROGRAM)
- $(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)
-
-clean:
- -@rm -f *.a *.o adjtimed
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-install: $(PROGRAM)
- cp $(PROGRAM) $(BINDIR)
diff --git a/usr.sbin/xntpd/adjtime/README b/usr.sbin/xntpd/adjtime/README
deleted file mode 100644
index fe8b7e51e78a..000000000000
--- a/usr.sbin/xntpd/adjtime/README
+++ /dev/null
@@ -1,23 +0,0 @@
-------------------------------------------------------------------------------
-The adjtimed daemon emulates the BSD adjtime(2) system call. The
-adjtime() routine communicates with this daemon via SYSV messages.
-
-The emulation uses an undocumented kernel variable (as of 6.0/2.0
-and later releases) and as such it cannot be guaranteed to work in
-future HP-UX releases. Perhaps HP-UX will have a real adjtime(2)
-system call in the future.
-
-Author: Tai Jin (tai@sde.hp.com)
-------------------------------------------------------------------------------
-
-IMPORTANT NOTE: This stuff must be compiled with no optimization !!
-
-NOTE: This code is known to work as of 8.0 on s300's, s700's and s800's.
- PLEASE do not modify it unless you have access to kernel sources
- and fully understand the implications of any changes you are making.
- One person already has trashed adjtimed by making it do "the right
- thing". This is not an exact replacement for BSD adjtime(2), don't
- try to make it into one.
-
- -- Ken
-
diff --git a/usr.sbin/xntpd/adjtime/adjtime.c b/usr.sbin/xntpd/adjtime/adjtime.c
deleted file mode 100644
index 5b0475e1d31b..000000000000
--- a/usr.sbin/xntpd/adjtime/adjtime.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/*************************************************************************/
-/* (c) Copyright Tai Jin, 1988. All Rights Reserved. */
-/* Hewlett-Packard Laboratories. */
-/* */
-/* Permission is hereby granted for unlimited modification, use, and */
-/* distribution. This software is made available with no warranty of */
-/* any kind, express or implied. This copyright notice must remain */
-/* intact in all versions of this software. */
-/* */
-/* The author would appreciate it if any bug fixes and enhancements were */
-/* to be sent back to him for incorporation into future versions of this */
-/* software. Please send changes to tai@iag.hp.com or ken@sdd.hp.com. */
-/*************************************************************************/
-
-#ifndef lint
-static char RCSid[] = "adjtime.c,v 3.1 1993/07/06 01:04:42 jbj Exp";
-#endif
-
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-#include <time.h>
-#include <signal.h>
-#include "adjtime.h"
-
-#define abs(x) ((x) < 0 ? -(x) : (x))
-static LONG adjthresh = 400L;
-static LONG saveup;
-
-
-_clear_adjtime()
-{
- saveup = 0L;
-}
-
-
-adjtime(delta, olddelta)
- register struct timeval *delta;
- register struct timeval *olddelta;
-{
- struct timeval newdelta;
-
- /* If they are giving us seconds, ignore up to current threshold saved */
- if (delta->tv_sec) {
- saveup = 0L;
- return(_adjtime(delta, olddelta));
- }
-
- /* add in, needs check for overflow ? */
- saveup += delta->tv_usec;
-
- /* Broke the threshold, call adjtime() */
- if (abs(saveup) > adjthresh) {
- newdelta.tv_sec = 0L;
- newdelta.tv_usec = saveup;
- saveup = 0L;
- return(_adjtime(&newdelta, olddelta));
- }
-
- if (olddelta)
- olddelta->tv_sec = olddelta->tv_usec = 0L;
- return(0);
-}
-
-
-_adjtime(delta, olddelta)
- register struct timeval *delta;
- register struct timeval *olddelta;
-{
- register int mqid;
- MsgBuf msg;
- register MsgBuf *msgp = &msg;
-
- /*
- * get the key to the adjtime message queue
- * (note that we must get it every time because the queue might have been
- * removed and recreated)
- */
- if ((mqid = msgget(KEY, 0)) == -1)
- return (-1);
-
- msgp->msgb.mtype = CLIENT;
- msgp->msgb.tv = *delta;
-
- if (olddelta)
- msgp->msgb.code = DELTA2;
- else
- msgp->msgb.code = DELTA1;
-
- if (msgsnd(mqid, &msgp->msgp, MSGSIZE, 0) == -1)
- return (-1);
-
- if (olddelta) {
- if (msgrcv(mqid, &msgp->msgp, MSGSIZE, SERVER, 0) == -1)
- return (-1);
-
- *olddelta = msgp->msgb.tv;
- }
-
- return (0);
-}
diff --git a/usr.sbin/xntpd/adjtime/adjtime.h b/usr.sbin/xntpd/adjtime/adjtime.h
deleted file mode 100644
index f063a4777bf1..000000000000
--- a/usr.sbin/xntpd/adjtime/adjtime.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*************************************************************************/
-/* (c) Copyright Tai Jin, 1988. All Rights Reserved. */
-/* Hewlett-Packard Laboratories. */
-/* */
-/* Permission is hereby granted for unlimited modification, use, and */
-/* distribution. This software is made available with no warranty of */
-/* any kind, express or implied. This copyright notice must remain */
-/* intact in all versions of this software. */
-/* */
-/* The author would appreciate it if any bug fixes and enhancements were */
-/* to be sent back to him for incorporation into future versions of this */
-/* software. Please send changes to tai@iag.hp.com or ken@sdd.hp.com. */
-/*************************************************************************/
-
-/* "adjtime.h,v 3.1 1993/07/06 01:04:43 jbj Exp" */
-/* adjtime.h,v
- * Revision 3.1 1993/07/06 01:04:43 jbj
- * XNTP release 3.1
- *
- *
- * Revision 1.5 90/02/07 15:34:18 15:34:18 src (Source Hacker)
- * CHANGED KEY !!!
- *
- * Revision 1.4 89/02/09 12:26:35 12:26:35 tai (Tai Jin (Guest))
- * *** empty log message ***
- *
- * Revision 1.4 89/02/09 12:26:35 12:26:35 tai (Tai Jin)
- * added comment
- *
- * Revision 1.3 88/08/30 01:08:29 01:08:29 tai (Tai Jin)
- * fix copyright notice again
- *
- * Revision 1.2 88/08/30 00:51:55 00:51:55 tai (Tai Jin)
- * fix copyright notice
- *
- * Revision 1.1 88/04/02 14:56:54 14:56:54 tai (Tai Jin)
- * Initial revision
- * */
-
-#include "ntp_types.h"
-
-#define KEY 659847L
-
-typedef union {
- struct msgbuf msgp;
- struct {
- LONG mtype;
- int code;
- struct timeval tv;
- } msgb;
-} MsgBuf;
-
-#define MSGSIZE (sizeof(int) + sizeof(struct timeval))
-/*
- * mtype values
- */
-#define CLIENT 1L
-#define SERVER 2L
-/*
- * code values
- */
-#define DELTA1 0
-#define DELTA2 1
diff --git a/usr.sbin/xntpd/adjtime/adjtimed.c b/usr.sbin/xntpd/adjtime/adjtimed.c
deleted file mode 100644
index 44e544441693..000000000000
--- a/usr.sbin/xntpd/adjtime/adjtimed.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/*************************************************************************/
-/* (c) Copyright Tai Jin, 1988. All Rights Reserved. */
-/* Hewlett-Packard Laboratories. */
-/* */
-/* Permission is hereby granted for unlimited modification, use, and */
-/* distribution. This software is made available with no warranty of */
-/* any kind, express or implied. This copyright notice must remain */
-/* intact in all versions of this software. */
-/* */
-/* The author would appreciate it if any bug fixes and enhancements were */
-/* to be sent back to him for incorporation into future versions of this */
-/* software. Please send changes to tai@iag.hp.com or ken@sdd.hp.com. */
-/*************************************************************************/
-
-#ifndef lint
-static char RCSid[] = "adjtimed.c,v 3.1 1993/07/06 01:04:45 jbj Exp";
-#endif
-
-/*
- * Adjust time daemon.
- * This deamon adjusts the rate of the system clock a la BSD's adjtime().
- * The adjtime() routine uses SYSV messages to communicate with this daemon.
- *
- * Caveat: This emulation uses an undocumented kernel variable. As such, it
- * cannot be guaranteed to work in future HP-UX releases. Perhaps a real
- * adjtime(2) will be supported in the future.
- */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/msg.h>
-#include <sys/lock.h>
-#include <time.h>
-#include <signal.h>
-#include <nlist.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <errno.h>
-#include "ntp_syslog.h"
-#include "adjtime.h"
-
-double atof();
-extern int ntp_optind;
-extern char *ntp_optarg;
-
-int InitClockRate();
-int AdjustClockRate();
-#ifdef notdef
-LONG GetClockRate();
-#endif
-int SetClockRate();
-void ResetClockRate();
-void Cleanup();
-void Exit();
-
-#define MILLION 1000000L
-
-#define tvtod(tv) ((double)(LONG)tv.tv_sec + \
- ((double)tv.tv_usec / (double)MILLION))
-
-char *progname = NULL;
-int verbose = 0;
-int sysdebug = 0;
-static int mqid;
-static double oldrate = 0.0;
-static double RATE = 0.25;
-static double PERIOD = 6.666667;
-
-
-main(argc, argv)
- int argc;
- char **argv;
-{
- struct timeval remains;
- struct sigvec vec;
- MsgBuf msg;
- char ch;
- int nofork = 0;
- int fd;
-
- progname = argv[0];
-
-#ifdef LOG_LOCAL6
- openlog("adjtimed", LOG_PID, LOG_LOCAL6);
-#else
- openlog("adjtimed", LOG_PID);
-#endif
-
- while ((ch = ntp_getopt(argc, argv, "hkrvdfp:")) != EOF) {
- switch (ch) {
- case 'k':
- case 'r':
- if ((mqid = msgget(KEY, 0)) != -1) {
- if (msgctl(mqid, IPC_RMID, (struct msqid_ds *)0) == -1) {
- syslog(LOG_ERR, "remove old message queue: %m");
- perror("adjtimed: remove old message queue");
- exit(1);
- }
- }
-
- if (ch == 'k')
- exit(0);
-
- break;
-
- case 'v':
- ++verbose, nofork = 1;
- break;
-
- case 'd':
- ++sysdebug;
- break;
-
- case 'f':
- nofork = 1;
- break;
-
- case 'p':
- if ((RATE = atof(ntp_optarg)) <= 0.0 || RATE >= 100.0) {
- fputs("adjtimed: percentage must be between 0.0 and 100.0\n", stderr);
- exit(1);
- }
-
- RATE /= 100.0;
- PERIOD = 1.0 / RATE;
- break;
-
- default:
- puts("usage: adjtimed -hkrvdf -p rate");
- puts("-h\thelp");
- puts("-k\tkill existing adjtimed, if any");
- puts("-r\trestart (kills existing adjtimed, if any)");
- puts("-v\tdebug output (repeat for more output)");
- puts("-d\tsyslog output (repeat for more output)");
- puts("-f\tno fork");
- puts("-p rate\tpercent rate of change");
- syslog(LOG_ERR, "usage error");
- exit(1);
- } /* switch */
- } /* while */
-
- if (!nofork) {
- switch (fork()) {
- case 0:
- close(fileno(stdin));
- close(fileno(stdout));
- close(fileno(stderr));
-
-#ifdef TIOCNOTTY
- if ((fd = open("/dev/tty")) != -1) {
- ioctl(fd, TIOCNOTTY, 0);
- close(fd);
- }
-#else
- setpgrp();
-#endif
- break;
-
- case -1:
- syslog(LOG_ERR, "fork: %m");
- perror("adjtimed: fork");
- exit(1);
-
- default:
- exit(0);
- } /* switch */
- } /* if */
-
- if (nofork) {
- setvbuf(stdout, NULL, _IONBF, BUFSIZ);
- setvbuf(stderr, NULL, _IONBF, BUFSIZ);
- }
-
- syslog(LOG_INFO, "started (rate %.2f%%)", RATE * 100.0);
- if (verbose) printf("adjtimed: started (rate %.2f%%)\n", RATE * 100.0);
-
- if (InitClockRate() == -1)
- Exit(2);
-
- (void)signal(SIGHUP, SIG_IGN);
- (void)signal(SIGINT, SIG_IGN);
- (void)signal(SIGQUIT, SIG_IGN);
- (void)signal(SIGTERM, Cleanup);
-
- vec.sv_handler = ResetClockRate;
- vec.sv_flags = 0;
- vec.sv_mask = ~0;
- sigvector(SIGALRM, &vec, (struct sigvec *)0);
-
- if (msgget(KEY, IPC_CREAT|IPC_EXCL) == -1) {
- if (errno == EEXIST) {
- syslog(LOG_ERR, "message queue already exists, use -r to remove it");
- fputs("adjtimed: message queue already exists, use -r to remove it\n",
- stderr);
- Exit(1);
- }
-
- syslog(LOG_ERR, "create message queue: %m");
- perror("adjtimed: create message queue");
- Exit(1);
- }
-
- if ((mqid = msgget(KEY, 0)) == -1) {
- syslog(LOG_ERR, "get message queue id: %m");
- perror("adjtimed: get message queue id");
- Exit(1);
- }
-
- if (plock(PROCLOCK)) {
- syslog(LOG_ERR, "plock: %m");
- perror("adjtimed: plock");
- Cleanup();
- }
-
- for (;;) {
- if (msgrcv(mqid, &msg.msgp, MSGSIZE, CLIENT, 0) == -1) {
- if (errno == EINTR) continue;
- syslog(LOG_ERR, "read message: %m");
- perror("adjtimed: read message");
- Cleanup();
- }
-
- switch (msg.msgb.code) {
- case DELTA1:
- case DELTA2:
- AdjustClockRate(&msg.msgb.tv, &remains);
-
- if (msg.msgb.code == DELTA2) {
- msg.msgb.tv = remains;
- msg.msgb.mtype = SERVER;
-
- while (msgsnd(mqid, &msg.msgp, MSGSIZE, 0) == -1) {
- if (errno == EINTR) continue;
- syslog(LOG_ERR, "send message: %m");
- perror("adjtimed: send message");
- Cleanup();
- }
- }
-
- if (remains.tv_sec + remains.tv_usec != 0L) {
- if (verbose) {
- printf("adjtimed: previous correction remaining %.6fs\n",
- tvtod(remains));
- }
- if (sysdebug) {
- syslog(LOG_INFO, "previous correction remaining %.6fs",
- tvtod(remains));
- }
- }
- break;
-
- default:
- fprintf(stderr, "adjtimed: unknown message code %d\n", msg.msgb.code);
- syslog(LOG_ERR, "unknown message code %d", msg.msgb.code);
- } /* switch */
- } /* loop */
-} /* main */
-
-/*
- * Default clock rate (old_tick).
- */
-#define DEFAULT_RATE (MILLION / HZ)
-#define UNKNOWN_RATE 0L
-#define SLEW_RATE (MILLION / DEFAULT_RATE)
-#define MIN_DELTA SLEW_RATE
-/*
-#define RATE 0.005
-#define PERIOD (1.0 / RATE)
-*/
-static LONG default_rate = DEFAULT_RATE;
-static LONG slew_rate = SLEW_RATE;
-
-AdjustClockRate(delta, olddelta)
- register struct timeval *delta, *olddelta;
-{
- register LONG rate, dt;
- struct itimerval period, remains;
- static LONG leftover = 0;
-/*
- * rate of change
- */
- dt = (delta->tv_sec * MILLION) + delta->tv_usec + leftover;
-
- if (dt < MIN_DELTA && dt > -MIN_DELTA) {
- leftover += delta->tv_usec;
-
- if (olddelta) {
- getitimer(ITIMER_REAL, &remains);
- dt = ((remains.it_value.tv_sec * MILLION) + remains.it_value.tv_usec) *
- oldrate;
- olddelta->tv_sec = dt / MILLION;
- olddelta->tv_usec = dt - (olddelta->tv_sec * MILLION);
- }
-
- if (verbose > 2) printf("adjtimed: delta is too small: %dus\n", dt);
- if (sysdebug > 2) syslog(LOG_INFO, "delta is too small: %dus", dt);
- return (1);
- }
-
- leftover = dt % MIN_DELTA;
- dt -= leftover;
-
- if (verbose)
- printf("adjtimed: new correction %.6fs\n", (double)dt / (double)MILLION);
- if (sysdebug)
- syslog(LOG_INFO, "new correction %.6fs", (double)dt / (double)MILLION);
- if (verbose > 2) printf("adjtimed: leftover %dus\n", leftover);
- if (sysdebug > 2) syslog(LOG_INFO, "leftover %dus", leftover);
- rate = dt * RATE;
-
- if (rate < slew_rate && rate > -slew_rate) {
- rate = (rate < 0L ? -slew_rate : slew_rate);
- dt = abs(dt * (MILLION / slew_rate));
- period.it_value.tv_sec = dt / MILLION;
- } else {
- period.it_value.tv_sec = (LONG)PERIOD;
- }
-/*
- * The adjustment will always be a multiple of the minimum adjustment.
- * So the period will always be a whole second value.
- */
- period.it_value.tv_usec = 0;
-
- if (verbose > 1)
- printf("adjtimed: will be complete in %ds\n", period.it_value.tv_sec);
- if (sysdebug > 1)
- syslog(LOG_INFO, "will be complete in %ds", period.it_value.tv_sec);
-/*
- * adjust the clock rate
- */
- if (SetClockRate((rate / slew_rate) + default_rate) == -1) {
- syslog(LOG_ERR, "set clock rate: %m");
- perror("adjtimed: set clock rate");
- }
-/*
- * start the timer
- * (do this after changing the rate because the period has been rounded down)
- */
- period.it_interval.tv_sec = period.it_interval.tv_usec = 0L;
- setitimer(ITIMER_REAL, &period, &remains);
-/*
- * return old delta
- */
- if (olddelta) {
- dt = ((remains.it_value.tv_sec * MILLION) + remains.it_value.tv_usec) *
- oldrate;
- olddelta->tv_sec = dt / MILLION;
- olddelta->tv_usec = dt - (olddelta->tv_sec * MILLION);
- }
-
- oldrate = (double)rate / (double)MILLION;
-} /* AdjustClockRate */
-
-static struct nlist nl[] = {
-#ifdef hp9000s800
-#ifdef PRE7_0
- { "tick" },
-#else
- { "old_tick" },
-#endif
-#else
- { "_old_tick" },
-#endif
- { "" }
-};
-
-static int kmem;
-
-/*
- * The return value is the clock rate in old_tick units or -1 if error.
- */
-LONG
-GetClockRate()
-{
- LONG rate, mask;
-
- if (lseek(kmem, (LONG)nl[0].n_value, 0) == -1L)
- return (-1L);
-
- mask = sigblock(sigmask(SIGALRM));
-
- if (read(kmem, (caddr_t)&rate, sizeof(rate)) != sizeof(rate))
- rate = UNKNOWN_RATE;
-
- sigsetmask(mask);
- return (rate);
-} /* GetClockRate */
-
-/*
- * The argument is the new rate in old_tick units.
- */
-SetClockRate(rate)
- LONG rate;
-{
- LONG mask;
-
- if (lseek(kmem, (LONG)nl[0].n_value, 0) == -1L)
- return (-1);
-
- mask = sigblock(sigmask(SIGALRM));
-
- if (write(kmem, (caddr_t)&rate, sizeof(rate)) != sizeof(rate)) {
- sigsetmask(mask);
- return (-1);
- }
-
- sigsetmask(mask);
-
- if (rate != default_rate) {
- if (verbose > 3) {
- printf("adjtimed: clock rate (%lu) %ldus/s\n", rate,
- (rate - default_rate) * slew_rate);
- }
- if (sysdebug > 3) {
- syslog(LOG_INFO, "clock rate (%lu) %ldus/s", rate,
- (rate - default_rate) * slew_rate);
- }
- }
-
- return (0);
-} /* SetClockRate */
-
-InitClockRate()
-{
- if ((kmem = open("/dev/kmem", O_RDWR)) == -1) {
- syslog(LOG_ERR, "open(/dev/kmem): %m");
- perror("adjtimed: open(/dev/kmem)");
- return (-1);
- }
-
- nlist("/hp-ux", nl);
-
- if (nl[0].n_type == 0) {
- fputs("adjtimed: /hp-ux has no symbol table\n", stderr);
- syslog(LOG_ERR, "/hp-ux has no symbol table");
- return (-1);
- }
-/*
- * Set the default to the system's original value
- */
- default_rate = GetClockRate();
- if (default_rate == UNKNOWN_RATE) default_rate = DEFAULT_RATE;
- slew_rate = (MILLION / default_rate);
-
- return (0);
-} /* InitClockRate */
-
-/*
- * Reset the clock rate to the default value.
- */
-void
-ResetClockRate()
-{
- struct itimerval it;
-
- it.it_value.tv_sec = it.it_value.tv_usec = 0L;
- setitimer(ITIMER_REAL, &it, (struct itimerval *)0);
-
- if (verbose > 2) puts("adjtimed: resetting the clock");
- if (sysdebug > 2) syslog(LOG_INFO, "resetting the clock");
-
- if (GetClockRate() != default_rate) {
- if (SetClockRate(default_rate) == -1) {
- syslog(LOG_ERR, "set clock rate: %m");
- perror("adjtimed: set clock rate");
- }
- }
-
- oldrate = 0.0;
-} /* ResetClockRate */
-
-void
-Cleanup()
-{
- ResetClockRate();
-
- if (msgctl(mqid, IPC_RMID, (struct msqid_ds *)0) == -1) {
- if (errno != EINVAL) {
- syslog(LOG_ERR, "remove message queue: %m");
- perror("adjtimed: remove message queue");
- }
- }
-
- Exit(2);
-} /* Cleanup */
-
-void
-Exit(status)
- int status;
-{
- syslog(LOG_ERR, "terminated");
- closelog();
- if (kmem != -1) close(kmem);
- exit(status);
-} /* Exit */
diff --git a/usr.sbin/xntpd/authstuff/Makefile.tmpl b/usr.sbin/xntpd/authstuff/Makefile.tmpl
deleted file mode 100644
index ccafc5b6b25f..000000000000
--- a/usr.sbin/xntpd/authstuff/Makefile.tmpl
+++ /dev/null
@@ -1,92 +0,0 @@
-#
-# Makefile.tmpl
-#
-PROGRAM= authcert authspeed md5
-#
-# authcert, authspeed - authentication utilities
-#
-COMPILER= cc
-COPTS= -O
-BINDIR= /usr/local
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-COMPAT=
-RESLIB=
-#
-INCL= -I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-LIB= ../lib/libntp.a
-MAKE= make
-#
-CRTOBJS= authcert.o
-SPDOBJS= authspeed.o
-PAROBJS= keyparity.o
-IFPOBJS= makeIPFP.o
-PC1OBJS= makePC1.o
-PC2OBJS= makePC2.o
-SPOBJS= makeSP.o
-RNDOBJS= mkrandkeys.o
-OIFOBJS= omakeIPFP.o
-UNXOBJS= unixcert.o
-MD5OBJS= md5driver.o
-
-SOURCE= authcert.c authspeed.c keyparity.c makeIPFP.c makePC1.c \
- makePC2.c makeSP.c mkrandkeys.c omakeIPFP.c unixcert.c md5driver.c
-
-all: $(PROGRAM)
-
-authcert: $(CRTOBJS) $(LIB)
- $(CC) $(COPTS) -o $@ $(CRTOBJS) $(LIB) $(COMPAT) $(RESLIB)
-
-authspeed: $(SPDOBJS) $(LIB)
- $(CC) $(COPTS) -o $@ $(SPDOBJS) $(LIB) $(COMPAT) $(RESLIB)
-
-keyparity: $(PAROBJS) $(LIB)
- $(CC) $(COPTS) -o $@ $(PAROBJS) $(LIB) $(COMPAT) $(RESLIB)
-
-makeIPFP: $(IFPOBJS)
- $(CC) $(COPTS) -o $@ $(IFPOBJS)
-
-makePC1: $(PC1OBJS)
- $(CC) $(COPTS) -o $@ $(PC1OBJS)
-
-makePC2: $(PC2OBJS)
- $(CC) $(COPTS) -o $@ $(PC2OBJS)
-
-makeSP: $(SPOBJS)
- $(CC) $(COPTS) -o $@ $(SPOBJS)
-
-mkrandkeys: $(RNDOBJS) $(LIB)
- $(CC) $(COPTS) -o $@ $(RNDOBJS) $(LIB)
-
-omakeIPFP: $(OIFBJS)
- $(CC) $(COPTS) -o $@ $(OIFBJS)
-
-unixcert: $(UNXBJS)
- $(CC) $(COPTS) -o $@ $(UNXBJS)
-
-md5: $(MD5OBJS)
- $(CC) $(COPTS) -o $@ $(MD5OBJS) $(LIB) $(COMPAT) $(RESLIB)
-
-tags:
- ctags *.c *.h
-
-install:
- # Don't install any of this shit
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(PROGRAM) *.o *.out tags make.log Makefile.bak keyparity \
- makeIPFP makePC1 makePC2 makeSP mkrandkeys omakeIPFP unixcert \
- lint.errs md5cert
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
diff --git a/usr.sbin/xntpd/clockstuff/Makefile.tmpl b/usr.sbin/xntpd/clockstuff/Makefile.tmpl
deleted file mode 100644
index 9a0f9c184b43..000000000000
--- a/usr.sbin/xntpd/clockstuff/Makefile.tmpl
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Makefile.tmpl,v 3.1 1993/07/06 01:05:19 jbj Exp
-#
-PROGRAM= propdelay
-#
-# Makefile for clock miscellany
-#
-COMPILER= cc
-COPTS= -O
-BINDIR= /usr/local
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-COMPAT=
-#
-INCL= -I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-LIB= ../lib/libntp.a
-LINTLIB= ../lib/llib-llibntp.ln
-MAKE= make
-INSTALL= install
-#
-SOURCE= chutest.c propdelay.c
-OBJS= propdelay.o
-CHUOBJS= chutest.o
-CLKOBJS= clktest.o
-
-all: $(PROGRAM)
-
-$(PROGRAM): $(OBJS)
- $(CC) $(COPTS) -o $@ $(OBJS) -lm $(COMPAT)
-
-chutest: $(CHUOBJS) $(LIB)
- $(CC) $(COPTS) -o $@ $(CHUOBJS) $(LIB)
-
-clktest: $(CLKOBJS) $(LIB)
- $(CC) $(COPTS) -o $@ $(CLKOBJS) $(LIB)
-
-install: $(BINDIR)/$(PROGRAM)
-
-$(BINDIR)/$(PROGRAM): $(PROGRAM)
-# $(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)
-
-tags:
- ctags *.c *.h
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(PROGRAM) *.o *.out tags make.log Makefile.bak chutest clktest \
- lint.errs
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
diff --git a/usr.sbin/xntpd/compilers/README b/usr.sbin/xntpd/compilers/README
deleted file mode 100644
index 46794dc5399c..000000000000
--- a/usr.sbin/xntpd/compilers/README
+++ /dev/null
@@ -1,5 +0,0 @@
-README file for directory ./compilers of the NTP Version 3 distribution
-
-This directory contains configuration files for the various machines
-and compilers supported by the distribution. README and RELNOTES files in the
-parent directory for directions on how to use these files.
diff --git a/usr.sbin/xntpd/compilers/aux2.gcc b/usr.sbin/xntpd/compilers/aux2.gcc
deleted file mode 100644
index 53672c45366e..000000000000
--- a/usr.sbin/xntpd/compilers/aux2.gcc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER=gcc -O -pipe -finline-functions -fomit-frame-pointer -D_POSIX_SOURCE
diff --git a/usr.sbin/xntpd/compilers/aux3.gcc b/usr.sbin/xntpd/compilers/aux3.gcc
deleted file mode 100644
index 53672c45366e..000000000000
--- a/usr.sbin/xntpd/compilers/aux3.gcc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER=gcc -O -pipe -finline-functions -fomit-frame-pointer -D_POSIX_SOURCE
diff --git a/usr.sbin/xntpd/compilers/decosf1.gcc b/usr.sbin/xntpd/compilers/decosf1.gcc
deleted file mode 100644
index d071385d7a79..000000000000
--- a/usr.sbin/xntpd/compilers/decosf1.gcc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER= gcc -Wall -O2 -finline-functions
diff --git a/usr.sbin/xntpd/compilers/domainos.cc b/usr.sbin/xntpd/compilers/domainos.cc
deleted file mode 100644
index eb4dd629860a..000000000000
--- a/usr.sbin/xntpd/compilers/domainos.cc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER= cc
diff --git a/usr.sbin/xntpd/compilers/hpux-adj.cc b/usr.sbin/xntpd/compilers/hpux-adj.cc
deleted file mode 100644
index cf058ef46b5c..000000000000
--- a/usr.sbin/xntpd/compilers/hpux-adj.cc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER=cc +O1
diff --git a/usr.sbin/xntpd/compilers/hpux-adj.gcc b/usr.sbin/xntpd/compilers/hpux-adj.gcc
deleted file mode 100644
index e085a80112dd..000000000000
--- a/usr.sbin/xntpd/compilers/hpux-adj.gcc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER=gcc -O2
diff --git a/usr.sbin/xntpd/compilers/hpux.cc b/usr.sbin/xntpd/compilers/hpux.cc
deleted file mode 100644
index cf058ef46b5c..000000000000
--- a/usr.sbin/xntpd/compilers/hpux.cc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER=cc +O1
diff --git a/usr.sbin/xntpd/compilers/hpux.gcc b/usr.sbin/xntpd/compilers/hpux.gcc
deleted file mode 100644
index e085a80112dd..000000000000
--- a/usr.sbin/xntpd/compilers/hpux.gcc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER=gcc -O2
diff --git a/usr.sbin/xntpd/compilers/hpux10+.cc b/usr.sbin/xntpd/compilers/hpux10+.cc
deleted file mode 100644
index cf058ef46b5c..000000000000
--- a/usr.sbin/xntpd/compilers/hpux10+.cc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER=cc +O1
diff --git a/usr.sbin/xntpd/compilers/irix4.cc b/usr.sbin/xntpd/compilers/irix4.cc
deleted file mode 100644
index c5ae3af3ed42..000000000000
--- a/usr.sbin/xntpd/compilers/irix4.cc
+++ /dev/null
@@ -1,2 +0,0 @@
-COMPILER= cc -cckr
-COPTS= -O2
diff --git a/usr.sbin/xntpd/compilers/linux.gcc b/usr.sbin/xntpd/compilers/linux.gcc
deleted file mode 100644
index 1051fcb8e68d..000000000000
--- a/usr.sbin/xntpd/compilers/linux.gcc
+++ /dev/null
@@ -1,2 +0,0 @@
-COMPILER= gcc -DUSE_PROTOTYPES -Wall
-COPTS= -O2 -finline-functions -fomit-frame-pointer
diff --git a/usr.sbin/xntpd/compilers/mips.cc b/usr.sbin/xntpd/compilers/mips.cc
deleted file mode 100644
index dcd8697077ab..000000000000
--- a/usr.sbin/xntpd/compilers/mips.cc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER= cc -systype bsd43
diff --git a/usr.sbin/xntpd/compilers/sinix-m.cc b/usr.sbin/xntpd/compilers/sinix-m.cc
deleted file mode 100644
index e4712dc89ed6..000000000000
--- a/usr.sbin/xntpd/compilers/sinix-m.cc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER= /usr/ucb/cc
diff --git a/usr.sbin/xntpd/compilers/sinix-m.gcc b/usr.sbin/xntpd/compilers/sinix-m.gcc
deleted file mode 100644
index fe6af589c439..000000000000
--- a/usr.sbin/xntpd/compilers/sinix-m.gcc
+++ /dev/null
@@ -1,2 +0,0 @@
-COMPILER= gcc -traditional
-
diff --git a/usr.sbin/xntpd/compilers/sunos4.bsd.cc b/usr.sbin/xntpd/compilers/sunos4.bsd.cc
deleted file mode 100644
index eb4dd629860a..000000000000
--- a/usr.sbin/xntpd/compilers/sunos4.bsd.cc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER= cc
diff --git a/usr.sbin/xntpd/compilers/sunos4.bsd.gcc b/usr.sbin/xntpd/compilers/sunos4.bsd.gcc
deleted file mode 100644
index 09e841a2b4de..000000000000
--- a/usr.sbin/xntpd/compilers/sunos4.bsd.gcc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER= gcc -DUSE_PROTOTYPES -Wall -O2 -finline-functions -fdelayed-branch -fomit-frame-pointer
diff --git a/usr.sbin/xntpd/compilers/sunos4.posix.gcc b/usr.sbin/xntpd/compilers/sunos4.posix.gcc
deleted file mode 100644
index 09e841a2b4de..000000000000
--- a/usr.sbin/xntpd/compilers/sunos4.posix.gcc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER= gcc -DUSE_PROTOTYPES -Wall -O2 -finline-functions -fdelayed-branch -fomit-frame-pointer
diff --git a/usr.sbin/xntpd/compilers/sunos5.1.gcc b/usr.sbin/xntpd/compilers/sunos5.1.gcc
deleted file mode 100644
index fe6af589c439..000000000000
--- a/usr.sbin/xntpd/compilers/sunos5.1.gcc
+++ /dev/null
@@ -1,2 +0,0 @@
-COMPILER= gcc -traditional
-
diff --git a/usr.sbin/xntpd/compilers/sunos5.2.gcc b/usr.sbin/xntpd/compilers/sunos5.2.gcc
deleted file mode 100644
index fe6af589c439..000000000000
--- a/usr.sbin/xntpd/compilers/sunos5.2.gcc
+++ /dev/null
@@ -1,2 +0,0 @@
-COMPILER= gcc -traditional
-
diff --git a/usr.sbin/xntpd/compilers/ultrix.bsd.cc b/usr.sbin/xntpd/compilers/ultrix.bsd.cc
deleted file mode 100644
index 06f68830e503..000000000000
--- a/usr.sbin/xntpd/compilers/ultrix.bsd.cc
+++ /dev/null
@@ -1,2 +0,0 @@
-COMPILER= cc -Olimit 800
-
diff --git a/usr.sbin/xntpd/compilers/ultrix.bsd.gcc b/usr.sbin/xntpd/compilers/ultrix.bsd.gcc
deleted file mode 100644
index 5ed9d554abc8..000000000000
--- a/usr.sbin/xntpd/compilers/ultrix.bsd.gcc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER= gcc -Wall -O2 -finline-functions -fdelayed-branch
diff --git a/usr.sbin/xntpd/compilers/ultrix.posix.cc b/usr.sbin/xntpd/compilers/ultrix.posix.cc
deleted file mode 100644
index 06f68830e503..000000000000
--- a/usr.sbin/xntpd/compilers/ultrix.posix.cc
+++ /dev/null
@@ -1,2 +0,0 @@
-COMPILER= cc -Olimit 800
-
diff --git a/usr.sbin/xntpd/compilers/ultrix.posix.gcc b/usr.sbin/xntpd/compilers/ultrix.posix.gcc
deleted file mode 100644
index 5ed9d554abc8..000000000000
--- a/usr.sbin/xntpd/compilers/ultrix.posix.gcc
+++ /dev/null
@@ -1 +0,0 @@
-COMPILER= gcc -Wall -O2 -finline-functions -fdelayed-branch
diff --git a/usr.sbin/xntpd/gadget/README b/usr.sbin/xntpd/gadget/README
deleted file mode 100644
index 35bbc18ad2b8..000000000000
--- a/usr.sbin/xntpd/gadget/README
+++ /dev/null
@@ -1,84 +0,0 @@
-Gadget Box
-
-The gadget box is a 5"x3"x2" aluminum minibox containing level-converter
-and modem circuitry and intended for use with host time servers
-supporting the Network Time Protocol. It includes two subcircuits. One
-of these converts a TTL positive edge into a fixed-width pulse at EIA
-levels and is for use with a timecode receiver or oscillator including a
-TTL one-pulse-per-second (1-pps) output. The other converts the timecode
-modulation broadcast by Canadian time/frequency standard station CHU
-into a 300-bps serial character stream at EIA levels and is for use with
-the clk_chu.c or clk_chu_STREAMS.c modules in the xntp3 distribution.
-
-This archive contains complete construction details for the gadget box,
-including schematic, parts list and artwork for a two-sided, printed-
-circuit board. All files are in PostScript, with the exception of this
-file and an information file, which are in ASCII. The artwork is in the
-1:1 scale and is suitable for direct printing on photographic resist for
-each side of the board. While a plated-through-holes process is most
-convenient, it is possible to bridge the two sides using soldered wires
-where necessary.
-
-Following is a brief functional description of the device. See the
-schematic diagram gadget.s01 for reference. The audio output of a
-shortwave radio tuned to CHU at 3330, 7335 or 14670 kHz is connected to
-J2. A level of at least 30 mV peak-peak is required, such as provided by
-the recorder output on many receivers. The input level is adjusted by
-potentiometer R8 so that the timecode modulation broadcast at 31-39
-seconds past the minute reliably lights green LED1, but the signals
-broadcast during other seconds of the minute do not.
-
-Opamp U4A provides low-impedance drive for the bridged-tee bandpass
-filter U4B. The filter has a bandpass of about 600 Hz at the 6-dB points
-and a center frequency of about 2150 Hz. It is designed to avoid
-aliasing effects with receivers of relatively wide bandpass
-characteristics. The modem itself is implemented by U2 and its
-associated circuitry. Resistors R4 and R1 are a 40-dB pad which matches
-the filter output to the modem input. U2 is a TTL/EIA level converter
-with integral power supply for bipolar signals. The modem output is
-available at pin 3 (receive data) of DB25 connector J1.
-
-The TTL 1-pps signal is connected via J3 to a retriggerable one-shot
-U3A, which generates a TTL pulse of width determined by potentiometer
-R7. The pulse width is determined by the bit rate of the attached serial
-port. In the common case the width is one bit-time, such as 26 us for
-38.4 kbps, for example. This appears to the port as a single start bit
-of zero followed by eight bits of ones and a stop bit of one. The second
-one-shot U3B generates a 200-ms pulse suitable for driving the amber
-LED3 as a visual monitor. The output of U3A is converted to EIA levels
-by U1 and appears at pin 12 (secondary receive data) of J1.
-
-If only the 1-pps circuit is required, U2 and U4 can be deleted and the
-gadget box powered from the EIA modem-control signal at pin 20 (terminal
-ready) of J1, assuming this signal is placed in the on (positive
-voltage) condition by the computer program. J1 is wired to keep most
-finicky UARTs and terminal-driver programs happy. If the CHU circuit is
-required, an external 12-volt AC transformer or 9-12-volt DC supply
-connected to J4 is required. Red LED2 indicates power is supplied to the
-box.
-
-Following is a list of files included in this archive. All files are in
-PostScript, except this one (README) and the information file
-(gadget.lst), which are in ASCII. The files gadget.s01, gadget.s02 and
-gadget.lst were generated using the Schema schematic-capture program
-from Omation. The printed-circuit files *.lpr were generated using
-Schema-PCB, also from Omation.
-
-Files
-----------------------------------------
-README this file
-gadget.s01 circuit schematic
-gadget.s02 minibox assembly drawing
-gadget.lst net list, pin list, parts list, etc.
-gen0102.lpr pcb x-ray diagram
-art01.lpr pcb artword side 1
-art02.lpr pcb artwork side 2
-adt0127.lpr pcb assembly drawing
-dd0124.lpr pcb drill drawing
-sm0228.lpr pcb solder mask (side 2)
-sst0126.lpr pcb silkscreen mask (side 1)
-
-Dave Mills
-University of Delaware
-6 July 1992
-Revised 21 August 1992
diff --git a/usr.sbin/xntpd/gadget/adt0127.lpr b/usr.sbin/xntpd/gadget/adt0127.lpr
deleted file mode 100644
index f0359e897d5a..000000000000
--- a/usr.sbin/xntpd/gadget/adt0127.lpr
+++ /dev/null
@@ -1,1427 +0,0 @@
-%!PS-Adobe-2.0
-%%Title: PADS Postscript Driver Header
-%%Creator: Andy Montalvo, 18 Lupine St., Lowell, MA 01851
-%%CreationDate: 06/08/90
-%%For: CAD Software, Littleton, MA
-%%EndComments
-%%BeginProcSet: Markers 1.0 0
-% marker attributes
-/MAttr_Width 1 def
-/MAttr_Size 0 def
-/MAttr_Type /M1 def
-% procedures
-/M1 { %def
-% draw marker 1: plus
-% Stack: - M1 -
- -2 0 rmoveto
- 4 0 rlineto
- -2 2 rmoveto
- 0 -4 rlineto
-} bind def
-/M2 { %def
-% draw marker 2: cross
-% Stack: - M2 -
- -2 -2 rmoveto
- 4 4 rlineto
- -4 0 rmoveto
- 4 -4 rlineto
-} bind def
-/M3 { %def
-% draw marker 3: square
-% Stack: - M3 -
- 0 2 rlineto
- 2 0 rlineto
- 0 -4 rlineto
- -4 0 rlineto
- 0 4 rlineto
- 2 0 rlineto
-} bind def
-/M4 { %def
-% draw marker 4: diamond
-% Stack: - M4 -
- 0 2 rlineto
- 2 -2 rlineto
- -2 -2 rlineto
- -2 2 rlineto
- 2 2 rlineto
-} bind def
-/M5 { %def
-% draw marker 5: hourglass
-% Stack: - M5 -
- 2 2 rlineto
- -4 0 rlineto
- 4 -4 rlineto
- -4 0 rlineto
- 2 2 rlineto
-} bind def
-/M6 { %def
-% draw marker 6: bowtie
-% Stack: - M6 -
- 2 2 rlineto
- 0 -4 rlineto
- -4 4 rlineto
- 0 -4 rlineto
- 2 2 rlineto
-} bind def
-/M7 { %def
-% draw marker 7: small plus (goes with char marker)
-% Stack: - M7 -
- -1 0 rmoveto
- 2 0 rlineto
- -1 1 rmoveto
- 0 -2 rlineto
-} bind def
-/Marker { %def
-% Command from driver: draw marker
-% STACK: x y Marker -
- MAttr_Size 0 gt
- {
- gsave
- moveto
- MAttr_Size 4 div dup scale
- MAttr_Type load exec
- 4 MAttr_Size div dup scale
- MAttr_Width setlinewidth
- stroke
- grestore
- } if
-} def
-%%EndProcSet: Markers 1.0 0
-%%BeginProcSet: Lib 1.0 0
-/sg { %def
-% Command from driver: set the gray scale 0 - 100
-% STACK: greylevel sg
- 100 div dup setgray /glev exch def
-} bind def
-/Circle { %def
-% draw a circle
-% STACK: x y radius Circle -
- 0 360 arc
-} bind def
-/RndAper { %def
-% select a round aperture
-% STACK: - RndAper -
- 1 setlinejoin
- 1 setlinecap
-} bind def
-/SqrAper { %def
-% select a square aperture
-% STACK: - SqrAper -
- 0 setlinejoin
- 2 setlinecap
-} bind def
-/Line { %def
-% draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] Line -
- 3 1 roll
- moveto
- true
- exch
- % This pushes the x then the y then does lineto
- { exch { false } { lineto true } ifelse } forall
- pop
-} bind def
-/Clipto { %def
-% set clipping rectangle from 0,0 to new values
-% STACK: x y Clipto -
- 0 0 moveto
- dup 0 exch lineto
- 2 copy lineto
- pop
- 0 lineto
- closepath
- clip
- newpath
-} bind def
-/Clip4 { %def
-% set clipping rectangle from xmin,ymin to xmax,ymax
-% STACK: xmin ymin xmax ymax Clip4 -
- 4 copy pop pop moveto
- 4 copy pop exch lineto pop
- 2 copy lineto
- exch pop exch pop lineto
- closepath
- clip
- newpath
-} bind def
-%%EndProcSet: Lib 1.0 0
-%%BeginProcSet: Lines 1.0 0
-% line attributes %
-/LAttr_Width 1 def
-% line procedures
-/PLine { %def
-% Cammand from driver: draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- LAttr_Width setlinewidth
- stroke
-} bind def % PLine
-/Char { %def
-% Command from driver: draw a character at the current position
-% STACK: type x y stroke_array Char -
-% stroke array -- [ stroke1 stroke2 ... stroken ]
-% stroke -- connected staight lines
-% type = 0 if text 1 if marker
- gsave
- 4 1 roll
- translate
- 0 eq { TAttr_Width } { MAttr_Width } ifelse setlinewidth
- {
- dup length 2 gt
- {
- dup dup 0 get exch 1 get % get starting point
- 3 -1 roll % put x y before array
- dup length 2 sub 2 exch getinterval % delete first items from array
- Line
- stroke
- }
- {
- aload pop currentlinewidth 2 div Circle fill
- } ifelse
- } forall
- grestore
-} bind def % Char
-/PArc { %def
-% Command from driver: draw an arc
-% STACK: x y radius startangle deltaangle Arc -
- 10 div exch 10 div exch
- 2 copy pop add
- arc
- LAttr_Width setlinewidth
- stroke
-} bind def
-/PCircle { %def
-% Command from driver: draw an circle
-% STACK: x y radius PCircle -
- Circle
- LAttr_Width setlinewidth
- stroke
-} bind def
-%%EndProcSet: Lines 1.0 0
-%%BeginProcSet: Polygon 1.0 0
-% polygon attributes %
-/PAttr_ExtWidth 1 def
-/PAttr_IntWidth 1 def
-/PAttr_Grid 1 def
-% polygon procedures
-/LoopSet { %def
-% set up for loop condition
-% STACK: start end LoopSet low gridwidth high
- 2 copy lt { exch } if
- % make grid line up to absolute coordinates
- PAttr_Grid div truncate PAttr_Grid mul exch
- PAttr_Grid exch
-} bind def
-/Hatch { %def
-% draw cross hatch pattern in current path
-% STACK: - Hatch -
- pathbbox
- /ury exch def
- /urx exch def
- /lly exch def
- /llx exch def
- clip
- newpath
- llx urx LoopSet
- { % x loop
- dup lly exch ury moveto lineto
- } for
- lly ury LoopSet
- { % y loop
- llx exch dup urx exch moveto lineto
- } for
- PAttr_IntWidth setlinewidth
- stroke
-} bind def
-/PPoly { %def
-% Command from driver: draw a plygon
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- closepath
- gsave
- PAttr_IntWidth PAttr_Grid ge {fill} {Hatch} ifelse
- grestore
- PAttr_ExtWidth setlinewidth
- stroke
-} bind def
-%%EndProcSet: Polygon 1.0 0
-%%BeginProcSet: Text 1.0 0
-% text attributes %
-/TAttr_Mirr 0 def
-/TAttr_Orient 0 def
-/TAttr_Width 1 def
-% text procedures
-/Text { %def
-% Command from driver: Draw text
-% STACK: x y width string Text -
- gsave
- 4 2 roll
- translate
- TAttr_Mirr 0 gt
- {
- -1 1 scale
- } if
- TAttr_Orient rotate
- 0 0 moveto
- dup length dup 1 gt
- {
- exch dup stringwidth pop
- 4 -1 roll
- exch 2 copy
- lt
- {
- div 1 scale show
- }
- {
- sub
- 3 -1 roll 1 sub div
- 0 3 -1 roll ashow
- }
- ifelse
- }
- {
- pop
- show
- } ifelse
- grestore
-} bind def
-%%EndProcSet: Text 1.0 0
-%%BeginProcSet: FlashSymbols 1.0 0
-% flash symbol attributes %
-/FAttr_Type /PRndPad def
-/FAttr_Width 0 def
-/FAttr_Length 1 def
-/FAttr_Orient 0 def
-% flash symbol procedures
-/PRndPad { %def
-% Command from driver: draw an circular pad
-% STACK: - PCirclePad -
- FAttr_Width dup scale
- 0 0 .5 Circle
- fill
-} bind def
-/PSqrPad { %def
-% Draw an Square pad
-% STACK: - PRectPad -
- FAttr_Width dup scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/PRectPad { %def
-% Draw an rectangular pad
-% STACK: - PRectPad -
- FAttr_Length FAttr_Width scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/POvalPad { %def
-% Draw an oval pad
-% STACK: - POvalPad -
- FAttr_Width setlinewidth
- FAttr_Length FAttr_Width sub 2 div dup
- neg 0 moveto
- 0 lineto
- RndAper
- stroke
-} bind def
-/Anl { %def
- 0 0 .5 Circle
- fill
- FAttr_Length FAttr_Width lt
- { % inner circle
- 0 0
- FAttr_Length 0 gt { FAttr_Length FAttr_Width div } { .5 } ifelse
- 2 div Circle
- 1 setgray
- fill
- glev setgray
- } if
-} bind def
-/PAnlPad { %def
-% Draw an annular pad
-% STACK: - PAnlPad -
- FAttr_Width dup scale
- Anl
-} bind def
-/PRelPad { %def
-% Draw an thermal relief pad
-% STACK: - PRelPad -
- PAnlPad
- 1 setgray
- .17 setlinewidth
- 0 setlinecap % the x
- 45 rotate
- .5 0 moveto -.5 0 lineto
- 0 .5 moveto 0 -.5 lineto
- stroke
- glev setgray
-} bind def
-/Flash { %def
-% Command from driver: Flash a symbol
-% STACK: x y Flash -
- FAttr_Width 0 gt
- {
- gsave
- translate
- FAttr_Orient rotate
- FAttr_Type load exec
- grestore
- } if
-} def
-%%EndProcSet: FlashSymbols 1.0 0
-%%BeginProcSet: SetAttr 1.0 0
-/SetLine { %def
-% Set the width of the lines
-% STACK: linewidth SetLine -
- /LAttr_Width exch def
- RndAper
-} bind def
-/SetPoly { %def
-% Set attribute of polygon
-% STACK: external_width internal_grid_width grid_spacing SetPoly -
- /PAttr_Grid exch def
- /PAttr_IntWidth exch def
- /PAttr_ExtWidth exch def
- RndAper
-} bind def
-/SetFlash { %def
-% Set Attributed of flash pad
-% STACK: orientation_angle length width aperture_type SetFlash -
- /FAttr_Type exch def
- FAttr_Type /PSqrPad eq FAttr_Type /PRectPad eq or
- { SqrAper } { RndAper } ifelse
- /FAttr_Width exch def
- /FAttr_Length exch def
- /FAttr_Orient exch 10 div def
-} bind def
-/SetMkr { %def
-% Set attributes of markers
-% STACK: linewidth size type SetMkr -
- /MAttr_Type exch def
- /MAttr_Size exch def
- /MAttr_Width exch def
- RndAper
-} bind def
-/SetText1 { %def
-% Set attributes of text
-% STACK: fontname height orient mirror SetMkr -
- /TAttr_Mirr exch def
- /TAttr_Orient exch 10 div def
- exch findfont exch scalefont setfont
- RndAper
-} bind def
-/SetText2 { %def
-% Set attributes of text
-% STACK: linewidth height mirror orient SetMkr -
- /TAttr_Width exch def
- RndAper
-} bind def
-%%EndProcSet: SetAttr 1.0 0
-%%BeginProcSet: Initialize 1.0 0
-/Init { %def
-% Initialize the driver
-% STACK: Init -
- 72 1000 div dup scale % Scale to 1/1000 inch
- 250 250 translate % make origin 1/4 inch from bottom left
- 1.5 setmiterlimit 1 RndAper % set line defaults
- 0 setgray % set color default
- /glev 0 def
-} def
-%%EndProcSet: Initialize 1.0 0
-%%EndProlog
-/Helvetica findfont 12 scalefont setfont
-35 760 moveto
-(gadget.job - Fri Aug 21 03:35:14 1992) show
-gsave
-Init
-8000 10500 Clipto
-4025 2626 translate
-0 rotate
-1 1 div dup scale
-75 sg
-50 sg
-25 sg
-0 sg
-10 SetLine
--1350 0 [ -1350 4900 ] PLine
--1350 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 0 ] PLine
-1350 0 [ -1350 0 ] PLine
-10 SetLine
--1350 4700 [ -1350 4900 ] PLine
--1350 4900 [ -1150 4900 ] PLine
-10 SetLine
-1150 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 4700 ] PLine
-10 SetLine
-1150 0 [ 1350 0 ] PLine
-1350 0 [ 1350 200 ] PLine
-10 SetLine
--1350 200 [ -1350 0 ] PLine
--1350 0 [ -1150 0 ] PLine
-10 SetLine
-400 5100 [ 1350 5100 ] PLine
-10 SetLine
-1350 5100 [ 1300 5150 ] PLine
-10 SetLine
-1350 5100 [ 1300 5050 ] PLine
-10 SetLine
--1525 4900 [ -1375 4900 ] PLine
-10 SetLine
--1350 5100 [ -375 5100 ] PLine
-10 SetLine
--1350 5100 [ -1300 5150 ] PLine
-10 SetLine
--1350 5100 [ -1300 5050 ] PLine
-10 SetLine
--1542 0 [ -1367 0 ] PLine
-10 SetLine
--1500 0 [ -1500 1965 ] PLine
-10 SetLine
--1500 0 [ -1450 50 ] PLine
-10 SetLine
--1500 0 [ -1550 50 ] PLine
-10 SetLine
--1500 4900 [ -1450 4850 ] PLine
-10 SetLine
--1500 4900 [ -1550 4850 ] PLine
-10 SetLine
-1350 5150 [ 1350 4925 ] PLine
-10 SetLine
--1350 5150 [ -1350 4925 ] PLine
-10 SetLine
--1500 4900 [ -1500 2750 ] PLine
-10 SetLine
--1050 1400 [ -1050 1200 ] PLine
--1050 1200 [ -1150 1200 ] PLine
--1150 1200 [ -1150 1400 ] PLine
--1150 1400 [ -1050 1400 ] PLine
-10 SetLine
--50 3300 [ -100 3300 ] PLine
-10 SetLine
-250 3235 [ -50 3235 ] PLine
--50 3235 [ -50 3365 ] PLine
--50 3365 [ 250 3365 ] PLine
-250 3365 [ 250 3235 ] PLine
-10 SetLine
-300 3300 [ 250 3300 ] PLine
-10 SetLine
-250 3100 [ 300 3100 ] PLine
-10 SetLine
--50 3165 [ 250 3165 ] PLine
-250 3165 [ 250 3035 ] PLine
-250 3035 [ -50 3035 ] PLine
--50 3035 [ -50 3165 ] PLine
-10 SetLine
--100 3100 [ -50 3100 ] PLine
-10 SetLine
--50 3500 [ -100 3500 ] PLine
-10 SetLine
-250 3435 [ -50 3435 ] PLine
--50 3435 [ -50 3565 ] PLine
--50 3565 [ 250 3565 ] PLine
-250 3565 [ 250 3435 ] PLine
-10 SetLine
-300 3500 [ 250 3500 ] PLine
-10 SetLine
--1150 3700 [ -1200 3700 ] PLine
-10 SetLine
--450 3575 [ -1150 3575 ] PLine
--1150 3575 [ -1150 3825 ] PLine
--1150 3825 [ -450 3825 ] PLine
--450 3825 [ -450 3575 ] PLine
-10 SetLine
--400 3700 [ -450 3700 ] PLine
-10 SetLine
--850 1300 [ -900 1300 ] PLine
-10 SetLine
--150 1175 [ -850 1175 ] PLine
--850 1175 [ -850 1425 ] PLine
--850 1425 [ -150 1425 ] PLine
--150 1425 [ -150 1175 ] PLine
-10 SetLine
--100 1300 [ -150 1300 ] PLine
-10 SetLine
-550 2800 [ 600 2800 ] PLine
-10 SetLine
--150 2925 [ 550 2925 ] PLine
-550 2925 [ 550 2675 ] PLine
-550 2675 [ -150 2675 ] PLine
--150 2675 [ -150 2925 ] PLine
-10 SetLine
--200 2800 [ -150 2800 ] PLine
-10 SetLine
--450 2800 [ -400 2800 ] PLine
-10 SetLine
--1150 2925 [ -450 2925 ] PLine
--450 2925 [ -450 2675 ] PLine
--450 2675 [ -1150 2675 ] PLine
--1150 2675 [ -1150 2925 ] PLine
-10 SetLine
--1200 2800 [ -1150 2800 ] PLine
-10 SetLine
-0 2150 [ 0 2100 ] PLine
-10 SetLine
-65 2450 [ 65 2150 ] PLine
-65 2150 [ -65 2150 ] PLine
--65 2150 [ -65 2450 ] PLine
--65 2450 [ 65 2450 ] PLine
-10 SetLine
-0 2500 [ 0 2450 ] PLine
-10 SetLine
--1200 3050 [ -1200 3000 ] PLine
-10 SetLine
--1135 3350 [ -1135 3050 ] PLine
--1135 3050 [ -1265 3050 ] PLine
--1265 3050 [ -1265 3350 ] PLine
--1265 3350 [ -1135 3350 ] PLine
-10 SetLine
--1200 3400 [ -1200 3350 ] PLine
-10 SetLine
--950 2250 [ -1150 2250 ] PLine
--1150 2250 [ -1150 2350 ] PLine
--1150 2350 [ -950 2350 ] PLine
--950 2350 [ -950 2250 ] PLine
-10 SetLine
--1150 2550 [ -950 2550 ] PLine
--950 2550 [ -950 2450 ] PLine
--950 2450 [ -1150 2450 ] PLine
--1150 2450 [ -1150 2550 ] PLine
-10 SetLine
-850 2850 [ 1050 2850 ] PLine
-1050 2850 [ 1050 2750 ] PLine
-1050 2750 [ 850 2750 ] PLine
-850 2750 [ 850 2850 ] PLine
-10 SetLine
-500 1900 [ 450 1900 ] PLine
-10 SetLine
-1200 1775 [ 500 1775 ] PLine
-500 1775 [ 500 2025 ] PLine
-500 2025 [ 1200 2025 ] PLine
-1200 2025 [ 1200 1775 ] PLine
-10 SetLine
-1250 1900 [ 1200 1900 ] PLine
-10 SetLine
--1150 900 [ -1200 900 ] PLine
-10 SetLine
--150 725 [ -1150 725 ] PLine
--1150 725 [ -1150 1075 ] PLine
--1150 1075 [ -150 1075 ] PLine
--150 1075 [ -150 725 ] PLine
-10 SetLine
--100 900 [ -150 900 ] PLine
-10 SetLine
--1050 4000 [ -1100 4000 ] PLine
-10 SetLine
--750 3935 [ -1050 3935 ] PLine
--1050 3935 [ -1050 4065 ] PLine
--1050 4065 [ -750 4065 ] PLine
--750 4065 [ -750 3935 ] PLine
-10 SetLine
--700 4000 [ -750 4000 ] PLine
-10 SetLine
-750 3000 [ 700 3000 ] PLine
-10 SetLine
-1050 2935 [ 750 2935 ] PLine
-750 2935 [ 750 3065 ] PLine
-750 3065 [ 1050 3065 ] PLine
-1050 3065 [ 1050 2935 ] PLine
-10 SetLine
-1100 3000 [ 1050 3000 ] PLine
-10 SetLine
--250 3750 [ -50 3750 ] PLine
--50 3750 [ -50 3650 ] PLine
--50 3650 [ -250 3650 ] PLine
--250 3650 [ -250 3750 ] PLine
-10 SetLine
-200 900 [ 150 900 ] PLine
-10 SetLine
-270 950 [ 270 850 ] PLine
-10 SetLine
-200 850 [ 200 950 ] PLine
-200 950 [ 500 950 ] PLine
-500 950 [ 500 850 ] PLine
-500 850 [ 200 850 ] PLine
-10 SetLine
-500 900 [ 550 900 ] PLine
-10 SetLine
-250 850 [ 250 950 ] PLine
-10 SetLine
-260 850 [ 260 950 ] PLine
-10 SetLine
-600 3700 [ 650 3700 ] PLine
-10 SetLine
-530 3650 [ 530 3750 ] PLine
-10 SetLine
-600 3750 [ 600 3650 ] PLine
-600 3650 [ 300 3650 ] PLine
-300 3650 [ 300 3750 ] PLine
-300 3750 [ 600 3750 ] PLine
-10 SetLine
-300 3700 [ 250 3700 ] PLine
-10 SetLine
-550 3750 [ 550 3650 ] PLine
-10 SetLine
-540 3750 [ 540 3650 ] PLine
-10 SetLine
--750 550 100 PCircle
-10 SetLine
-0 550 100 PCircle
-10 SetLine
-750 550 100 PCircle
-10 SetLine
-768 5000 [ 768 5248 ] PLine
-768 5248 [ -768 5248 ] PLine
--768 5248 [ -768 5000 ] PLine
-10 SetLine
-1058 4900 [ -1058 4900 ] PLine
-10 SetLine
-1058 5000 [ 1058 4408 ] PLine
-1058 4408 [ -1058 4408 ] PLine
--1058 4408 [ -1058 5000 ] PLine
--1058 5000 [ 1058 5000 ] PLine
-10 SetLine
-1058 5000 [ -1058 5000 ] PLine
-10 SetLine
-768 4900 [ 768 4408 ] PLine
-10 SetLine
--768 4900 [ -768 4408 ] PLine
-10 SetLine
-900 200 [ 1100 200 ] PLine
-1100 200 [ 1100 100 ] PLine
-1100 100 [ 900 100 ] PLine
-900 100 [ 900 200 ] PLine
-10 SetLine
--100 200 [ 100 200 ] PLine
-100 200 [ 100 100 ] PLine
-100 100 [ -100 100 ] PLine
--100 100 [ -100 200 ] PLine
-10 SetLine
--1100 200 [ -900 200 ] PLine
--900 200 [ -900 100 ] PLine
--900 100 [ -1100 100 ] PLine
--1100 100 [ -1100 200 ] PLine
-10 SetLine
-916 3493 [ 900 3456 ] PLine
-900 3456 [ 939 3442 ] PLine
-939 3442 [ 953 3477 ] PLine
-10 SetLine
-988 3612 140 PCircle
-10 SetLine
--1000 1529 [ -1039 1490 ] PLine
-10 SetLine
--1000 1490 [ -1000 1910 ] PLine
--1000 1910 [ -1300 1910 ] PLine
--1300 1910 [ -1300 1490 ] PLine
--1300 1490 [ -1000 1490 ] PLine
-10 SetLine
-200 1730 [ 200 1670 ] PLine
-200 1670 [ 0 1670 ] PLine
-0 1670 [ 0 1730 ] PLine
-0 1730 [ 200 1730 ] PLine
-10 SetLine
-200 1700 [ 260 1700 ] PLine
-10 SetLine
-0 1700 [ -50 1700 ] PLine
-10 SetLine
-300 1270 [ 300 1330 ] PLine
-300 1330 [ 500 1330 ] PLine
-500 1330 [ 500 1270 ] PLine
-500 1270 [ 300 1270 ] PLine
-10 SetLine
-300 1300 [ 240 1300 ] PLine
-10 SetLine
-500 1300 [ 550 1300 ] PLine
-10 SetLine
--600 2270 [ -600 2330 ] PLine
--600 2330 [ -400 2330 ] PLine
--400 2330 [ -400 2270 ] PLine
--400 2270 [ -600 2270 ] PLine
-10 SetLine
--600 2300 [ -660 2300 ] PLine
-10 SetLine
--400 2300 [ -350 2300 ] PLine
-10 SetLine
--800 4230 [ -800 4170 ] PLine
--800 4170 [ -1000 4170 ] PLine
--1000 4170 [ -1000 4230 ] PLine
--1000 4230 [ -800 4230 ] PLine
-10 SetLine
--800 4200 [ -740 4200 ] PLine
-10 SetLine
--1000 4200 [ -1050 4200 ] PLine
-10 SetLine
-1000 3230 [ 1000 3170 ] PLine
-1000 3170 [ 800 3170 ] PLine
-800 3170 [ 800 3230 ] PLine
-800 3230 [ 1000 3230 ] PLine
-10 SetLine
-1000 3200 [ 1060 3200 ] PLine
-10 SetLine
-800 3200 [ 750 3200 ] PLine
-10 SetLine
--600 2470 [ -600 2530 ] PLine
--600 2530 [ -400 2530 ] PLine
--400 2530 [ -400 2470 ] PLine
--400 2470 [ -600 2470 ] PLine
-10 SetLine
--600 2500 [ -660 2500 ] PLine
-10 SetLine
--400 2500 [ -350 2500 ] PLine
-10 SetLine
--600 2070 [ -600 2130 ] PLine
--600 2130 [ -400 2130 ] PLine
--400 2130 [ -400 2070 ] PLine
--400 2070 [ -600 2070 ] PLine
-10 SetLine
--600 2100 [ -660 2100 ] PLine
-10 SetLine
--400 2100 [ -350 2100 ] PLine
-10 SetLine
--900 2130 [ -900 2070 ] PLine
--900 2070 [ -1100 2070 ] PLine
--1100 2070 [ -1100 2130 ] PLine
--1100 2130 [ -900 2130 ] PLine
-10 SetLine
--900 2100 [ -840 2100 ] PLine
-10 SetLine
--1100 2100 [ -1150 2100 ] PLine
-10 SetLine
-500 1130 [ 500 1070 ] PLine
-500 1070 [ 300 1070 ] PLine
-300 1070 [ 300 1130 ] PLine
-300 1130 [ 500 1130 ] PLine
-10 SetLine
-500 1100 [ 560 1100 ] PLine
-10 SetLine
-300 1100 [ 250 1100 ] PLine
-10 SetLine
-1000 2521 [ 1039 2560 ] PLine
-10 SetLine
-1000 2560 [ 1000 2140 ] PLine
-1000 2140 [ 1300 2140 ] PLine
-1300 2140 [ 1300 2560 ] PLine
-1300 2560 [ 1000 2560 ] PLine
-10 SetLine
-0 1870 [ 0 1930 ] PLine
-0 1930 [ 200 1930 ] PLine
-200 1930 [ 200 1870 ] PLine
-200 1870 [ 0 1870 ] PLine
-10 SetLine
-0 1900 [ -60 1900 ] PLine
-10 SetLine
-200 1900 [ 250 1900 ] PLine
-10 SetLine
-100 1470 [ 100 1530 ] PLine
-100 1530 [ 300 1530 ] PLine
-300 1530 [ 300 1470 ] PLine
-300 1470 [ 100 1470 ] PLine
-10 SetLine
-100 1500 [ 40 1500 ] PLine
-10 SetLine
-300 1500 [ 350 1500 ] PLine
-10 SetLine
--950 1650 [ -250 1650 ] PLine
--250 1650 [ -250 1850 ] PLine
--250 1850 [ -950 1850 ] PLine
--950 1850 [ -950 1775 ] PLine
--950 1775 [ -900 1775 ] PLine
--900 1775 [ -900 1725 ] PLine
--900 1725 [ -950 1725 ] PLine
--950 1725 [ -950 1650 ] PLine
-10 SetLine
-150 2250 [ 950 2250 ] PLine
-950 2250 [ 950 2450 ] PLine
-950 2450 [ 150 2450 ] PLine
-150 2450 [ 150 2375 ] PLine
-150 2375 [ 200 2375 ] PLine
-200 2375 [ 200 2325 ] PLine
-200 2325 [ 150 2325 ] PLine
-150 2325 [ 150 2250 ] PLine
-10 SetLine
-150 3950 [ 1150 3950 ] PLine
-1150 3950 [ 1150 4150 ] PLine
-1150 4150 [ 150 4150 ] PLine
-150 4150 [ 150 4075 ] PLine
-150 4075 [ 200 4075 ] PLine
-200 4075 [ 200 4025 ] PLine
-200 4025 [ 150 4025 ] PLine
-150 4025 [ 150 3950 ] PLine
-10 SetLine
--1050 3150 [ -250 3150 ] PLine
--250 3150 [ -250 3350 ] PLine
--250 3350 [ -1050 3350 ] PLine
--1050 3350 [ -1050 3275 ] PLine
--1050 3275 [ -1000 3275 ] PLine
--1000 3275 [ -1000 3225 ] PLine
--1000 3225 [ -1050 3225 ] PLine
--1050 3225 [ -1050 3150 ] PLine
-10 SetLine
-800 1075 [ 800 1675 ] PLine
-800 1675 [ 1200 1675 ] PLine
-1200 1675 [ 1200 1075 ] PLine
-1200 1075 [ 800 1075 ] PLine
-10 SetLine
-875 1075 [ 875 825 ] PLine
-875 825 [ 925 825 ] PLine
-925 825 [ 925 1075 ] PLine
-10 SetLine
-1075 1075 [ 1075 825 ] PLine
-1075 825 [ 1125 825 ] PLine
-1125 825 [ 1125 1075 ] PLine
-10 SetLine
-975 1075 [ 975 825 ] PLine
-975 825 [ 1025 825 ] PLine
-1025 825 [ 1025 1075 ] PLine
-10 SetLine
-996 1549 75 PCircle
-10 SetLine
-800 1425 [ 1200 1425 ] PLine
-10 SetLine
--100 4200 [ -25 4200 ] PLine
-10 SetLine
--100 3900 [ -100 4300 ] PLine
--100 4300 [ -500 4300 ] PLine
--500 4300 [ -500 3900 ] PLine
--500 3900 [ -100 3900 ] PLine
-10 SetLine
--100 4000 [ -25 4000 ] PLine
-10 SetLine
--1100 450 100 PCircle
-10 SetLine
-1100 450 100 PCircle
-10 SetLine
-1000 3430 [ 1000 3370 ] PLine
-1000 3370 [ 800 3370 ] PLine
-800 3370 [ 800 3430 ] PLine
-800 3430 [ 1000 3430 ] PLine
-10 SetLine
-1000 3400 [ 1060 3400 ] PLine
-10 SetLine
-800 3400 [ 750 3400 ] PLine
-10 SetText2
-0 -1175 1225 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -1175 1279 [ [ -53 0 -56 4 -65 11 0 11 ] ] Char
-0 -1175 1310 [ [ -65 29 -65 6 -37 4 -40 6 -43 13 -43 20 -40 27 -34 31 -25 34 -18 31 -9 29 -3 25 0 18 0 11 -3 4 -6 2 -12 0 ] ] Char
-10 SetText2
-0 75 3375 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 129 3375 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-10 SetText2
-0 75 3175 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 129 3175 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-10 SetText2
-0 75 3575 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 129 3575 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -825 3850 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -771 3850 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -575 1450 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -521 1450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -490 1450 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-10 SetText2
-0 125 2950 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 179 2950 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 210 2950 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -825 2950 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -771 2950 [ [ 29 43 27 34 22 28 15 25 13 25 6 28 2 34 0 43 0 46 2 56 6 62 13 65 15 65 22 62 27 56 29 43 29 28 27 12 22 3 15 0 11 0 4 3 2 9 ] ] Char
-10 SetText2
-0 -100 2250 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -100 2304 [ [ -53 0 -56 4 -65 11 0 11 ] ] Char
-0 -100 2335 [ [ -65 4 -65 29 -40 15 -40 22 -37 27 -34 29 -25 31 -18 31 -9 29 -3 25 0 18 0 11 -3 4 -6 2 -12 0 ] ] Char
-10 SetText2
-0 -1275 3200 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -1275 3254 [ [ -50 2 -53 2 -59 4 -62 6 -65 11 -65 20 -62 25 -59 27 -53 29 -46 29 -40 27 -31 22 0 0 0 31 ] ] Char
-10 SetText2
-0 -1100 2375 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -1046 2375 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -1015 2375 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1100 2575 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -1046 2575 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -1015 2575 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 900 2875 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 954 2875 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 985 2875 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 800 2050 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 854 2050 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 885 2050 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-10 SetText2
-0 -675 1100 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -621 1100 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -590 1100 [ [ 11 65 4 62 2 56 2 50 4 43 9 40 18 37 25 34 29 28 31 21 31 12 29 6 27 3 20 0 11 0 4 3 2 6 0 12 0 21 2 28 6 34 13 37 22 40 27 43 29 50 29 56 27 62 20 65 11 65 ] ] Char
-10 SetText2
-0 -925 4075 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -871 4075 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 875 3075 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 929 3075 [ [ 11 65 4 62 2 56 2 50 4 43 9 40 18 37 25 34 29 28 31 21 31 12 29 6 27 3 20 0 11 0 4 3 2 6 0 12 0 21 2 28 6 34 13 37 22 40 27 43 29 50 29 56 27 62 20 65 11 65 ] ] Char
-10 SetText2
-0 -200 3775 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -146 3775 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 325 975 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 377 975 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 450 3775 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 502 3775 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -775 675 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 -732 675 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -50 675 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 -7 675 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 700 675 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 743 675 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 -1175 4650 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 -1132 4650 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1125 125 [ [ 0 65 0 0 27 0 ] ] Char
-0 1172 125 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 1222 125 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 1274 125 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 125 125 [ [ 0 65 0 0 27 0 ] ] Char
-0 172 125 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 222 125 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 274 125 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -875 125 [ [ 0 65 0 0 27 0 ] ] Char
-0 -828 125 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -778 125 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -726 125 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1075 3425 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] [ 20 12 34 -6 ] ] Char
-0 1131 3425 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1075 1475 [ [ 0 -65 0 0 ] [ 0 -65 -20 -65 -27 -62 -29 -59 -31 -53 -31 -46 -29 -40 -27 -37 -20 -34 0 -34 ] [ -15 -34 -31 0 ] ] Char
-0 -1127 1475 [ [ -11 -65 -4 -62 -2 -56 -2 -50 -4 -43 -9 -40 -18 -37 -25 -34 -29 -28 -31 -21 -31 -12 -29 -6 -27 -3 -20 0 -11 0 -4 -3 -2 -6 0 -12 0 -21 -2 -28 -6 -34 -13 -37 -22 -40 -27 -43 -29 -50 -29 -56 -27 -62 -20 -65 -11 -65 ] ] Char
-10 SetText2
-0 25 1750 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 77 1750 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 108 1750 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 350 1350 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 402 1350 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 433 1350 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -550 2350 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -498 2350 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 -925 4250 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -873 4250 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 850 3250 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 902 3250 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -550 2550 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -498 2550 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -550 2150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -498 2150 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-10 SetText2
-0 -1025 2150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -973 2150 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 350 1150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 402 1150 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 433 1150 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 1200 2125 [ [ 0 -65 0 0 ] [ 0 -65 -20 -65 -27 -62 -29 -59 -31 -53 -31 -46 -29 -40 -27 -37 -20 -34 0 -34 ] [ -15 -34 -31 0 ] ] Char
-0 1148 2125 [ [ -31 -65 -9 0 ] [ 0 -65 -31 -65 ] ] Char
-10 SetText2
-0 50 1950 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 102 1950 [ [ 29 43 27 34 22 28 15 25 13 25 6 28 2 34 0 43 0 46 2 56 6 62 13 65 15 65 22 62 27 56 29 43 29 28 27 12 22 3 15 0 11 0 4 3 2 9 ] ] Char
-10 SetText2
-0 150 1550 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 202 1550 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 233 1550 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -675 1950 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -623 1950 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 450 2550 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 502 2550 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 500 4275 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 552 4275 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -675 3450 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -623 3450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 950 1700 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 1002 1700 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -350 4325 [ [ 0 65 31 0 ] [ 31 65 0 0 ] ] Char
-0 -298 4325 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1225 600 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 -1169 600 [ [ 0 65 0 0 ] [ 31 65 31 0 ] [ 0 34 31 34 ] ] Char
-0 -1117 600 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1125 600 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 1181 600 [ [ 0 65 0 0 ] [ 31 65 31 0 ] [ 0 34 31 34 ] ] Char
-0 1233 600 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 800 3450 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 852 3450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 883 3450 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 -1075 1225 [ [ -65 0 0 0 ] [ -65 0 -65 15 -62 22 -56 27 -50 29 -40 31 -25 31 -15 29 -9 27 -3 22 0 15 0 0 ] ] Char
-0 -1075 1277 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -1075 1331 [ [ -65 18 0 0 ] [ -65 18 0 36 ] [ -21 6 -21 29 ] ] Char
-0 -1075 1387 [ [ -65 0 0 0 ] [ -65 0 -65 20 -62 27 -59 29 -53 31 -43 31 -37 29 -34 27 -31 20 -31 0 ] ] Char
-10 SetText2
-0 75 3275 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 127 3275 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 181 3275 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 237 3275 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 289 3275 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-10 SetText2
-0 75 3075 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 127 3075 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 181 3075 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 237 3075 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 289 3075 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-10 SetText2
-0 75 3475 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 127 3475 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 181 3475 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 237 3475 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 289 3475 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-10 SetText2
-0 -825 3750 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -771 3750 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -715 3750 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 -663 3750 [ [ 0 78 40 -21 ] ] Char
-0 -602 3750 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 -546 3750 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -490 3750 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-0 -436 3750 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 -575 1350 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -521 1350 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -465 1350 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 -413 1350 [ [ 0 78 40 -21 ] ] Char
-0 -352 1350 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 -296 1350 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -240 1350 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-0 -186 1350 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 125 2850 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 179 2850 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 235 2850 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 287 2850 [ [ 0 78 40 -21 ] ] Char
-0 348 2850 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 404 2850 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 460 2850 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-0 514 2850 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 -825 2850 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -771 2850 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -715 2850 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 -663 2850 [ [ 0 78 40 -21 ] ] Char
-0 -602 2850 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 -546 2850 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -490 2850 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-0 -436 2850 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 0 2250 [ [ -65 0 0 0 ] [ -65 0 -65 15 -62 22 -56 27 -50 29 -40 31 -25 31 -15 29 -9 27 -3 22 0 15 0 0 ] ] Char
-0 0 2302 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 0 2356 [ [ -65 18 0 0 ] [ -65 18 0 36 ] [ -21 6 -21 29 ] ] Char
-0 0 2412 [ [ -65 0 0 0 ] [ -65 0 -65 20 -62 27 -59 29 -53 31 -43 31 -37 29 -34 27 -31 20 -31 0 ] ] Char
-0 0 2464 [ [ -65 0 0 0 ] [ -65 0 -65 29 ] [ -34 0 -34 18 ] [ 0 0 0 29 ] ] Char
-10 SetText2
-0 -1175 3200 [ [ -65 0 0 0 ] [ -65 0 -65 15 -62 22 -56 27 -50 29 -40 31 -25 31 -15 29 -9 27 -3 22 0 15 0 0 ] ] Char
-0 -1175 3252 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -1175 3306 [ [ -65 18 0 0 ] [ -65 18 0 36 ] [ -21 6 -21 29 ] ] Char
-0 -1175 3362 [ [ -65 0 0 0 ] [ -65 0 -65 20 -62 27 -59 29 -53 31 -43 31 -37 29 -34 27 -31 20 -31 0 ] ] Char
-0 -1175 3414 [ [ -65 0 0 0 ] [ -65 0 -65 29 ] [ -34 0 -34 18 ] [ 0 0 0 29 ] ] Char
-10 SetText2
-0 -1100 2275 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -1048 2275 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -994 2275 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -938 2275 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-10 SetText2
-0 -1100 2475 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -1048 2475 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -994 2475 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -938 2475 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-10 SetText2
-0 900 2775 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 952 2775 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 1006 2775 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 1062 2775 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-10 SetText2
-0 800 1950 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 854 1950 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 910 1950 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 962 1950 [ [ 0 78 40 -21 ] ] Char
-0 1023 1950 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 1079 1950 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 1135 1950 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-0 1189 1950 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 -675 1000 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -621 1000 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -565 1000 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 -513 1000 [ [ 0 78 40 -21 ] ] Char
-0 -452 1000 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 -396 1000 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -340 1000 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-0 -290 1000 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 -925 3975 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -873 3975 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -819 3975 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -763 3975 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 -711 3975 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-10 SetText2
-0 875 2975 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 927 2975 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 981 2975 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 1037 2975 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 1089 2975 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-10 SetText2
-0 -200 3675 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -148 3675 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -94 3675 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -38 3675 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-10 SetText2
-0 325 875 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 377 875 [ [ 0 65 0 0 ] ] Char
-0 397 875 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-0 453 875 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 505 875 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-10 SetText2
-0 450 3675 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 502 3675 [ [ 0 65 0 0 ] ] Char
-0 522 3675 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-0 578 3675 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 630 3675 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-10 SetText2
-0 -775 575 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -723 575 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 ] [ 0 34 20 34 27 31 29 28 31 21 31 12 29 6 27 3 20 0 0 0 ] ] Char
-0 -671 575 [ [ 0 65 0 0 ] [ 0 65 31 0 ] [ 31 65 31 0 ] ] Char
-0 -619 575 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-10 SetText2
-0 -50 575 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 2 575 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 ] [ 0 34 20 34 27 31 29 28 31 21 31 12 29 6 27 3 20 0 0 0 ] ] Char
-0 54 575 [ [ 0 65 0 0 ] [ 0 65 31 0 ] [ 31 65 31 0 ] ] Char
-0 106 575 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-10 SetText2
-0 700 575 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 752 575 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 ] [ 0 34 20 34 27 31 29 28 31 21 31 12 29 6 27 3 20 0 0 0 ] ] Char
-0 804 575 [ [ 0 65 0 0 ] [ 0 65 31 0 ] [ 31 65 31 0 ] ] Char
-0 856 575 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-10 SetText2
-0 -1175 4550 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -1121 4550 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-0 -1065 4550 [ [ 0 65 0 0 ] [ 0 65 31 0 ] [ 31 65 31 0 ] ] Char
-0 -1013 4550 [ [ 0 78 40 -21 ] ] Char
-0 -952 4550 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -900 4550 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 ] [ 0 34 20 34 27 31 29 28 31 21 31 12 29 6 27 3 20 0 0 0 ] ] Char
-0 -848 4550 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-0 -796 4550 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-0 -742 4550 [ [ 0 65 0 0 ] [ 31 65 31 0 ] [ 0 34 31 34 ] ] Char
-0 -690 4550 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] ] Char
-10 SetText2
-0 1125 25 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 1177 25 [ [ 0 65 0 0 27 0 ] ] Char
-0 1224 25 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 1274 25 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-10 SetText2
-0 125 25 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 177 25 [ [ 0 65 0 0 27 0 ] ] Char
-0 224 25 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 274 25 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-10 SetText2
-0 -875 25 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -823 25 [ [ 0 65 0 0 27 0 ] ] Char
-0 -776 25 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -726 25 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-10 SetText2
-0 1075 3325 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-0 1127 3325 [ [ 0 65 0 0 ] [ 0 65 31 0 ] [ 31 65 31 0 ] ] Char
-0 1179 3325 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-0 1231 3325 [ [ 29 43 27 34 22 28 15 25 13 25 6 28 2 34 0 43 0 46 2 56 6 62 13 65 15 65 22 62 27 56 29 43 29 28 27 12 22 3 15 0 11 0 4 3 2 9 ] ] Char
-0 1281 3325 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-0 1333 3325 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-10 SetText2
-0 -1075 1575 [ [ 0 -65 0 0 ] [ 0 -65 -15 -65 -22 -62 -27 -56 -29 -50 -31 -40 -31 -25 -29 -15 -27 -9 -22 -3 -15 0 0 0 ] ] Char
-0 -1127 1575 [ [ 0 -65 0 0 ] [ 0 -65 -20 -65 -27 -62 -29 -59 -31 -53 -31 -43 -29 -37 -27 -34 -20 -31 0 -31 ] ] Char
-0 -1179 1575 [ [ -13 -65 -9 -62 -4 -56 -2 -50 0 -40 0 -25 -2 -15 -4 -9 -9 -3 -13 0 -22 0 -27 -3 -31 -9 -34 -15 -36 -25 -36 -40 -34 -50 -31 -56 -27 -62 -22 -65 -13 -65 ] ] Char
-0 -1235 1575 [ [ -15 -65 -15 0 ] [ 0 -65 -31 -65 ] ] Char
-10 SetText2
-0 25 1650 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 77 1650 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 129 1650 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 179 1650 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 350 1250 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 402 1250 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 454 1250 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 504 1250 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 -550 2250 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -498 2250 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -446 2250 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -396 2250 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 -925 4150 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -873 4150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -821 4150 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -771 4150 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 850 3150 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 902 3150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 954 3150 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 1004 3150 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 -550 2450 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -498 2450 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -446 2450 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -396 2450 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 -550 2050 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -498 2050 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -446 2050 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -396 2050 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 -1025 2050 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -973 2050 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -921 2050 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -871 2050 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 350 1050 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 402 1050 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 454 1050 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 504 1050 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 1200 2225 [ [ 0 -65 0 0 ] [ 0 -65 -15 -65 -22 -62 -27 -56 -29 -50 -31 -40 -31 -25 -29 -15 -27 -9 -22 -3 -15 0 0 0 ] ] Char
-0 1148 2225 [ [ 0 -65 0 0 ] [ 0 -65 -20 -65 -27 -62 -29 -59 -31 -53 -31 -43 -29 -37 -27 -34 -20 -31 0 -31 ] ] Char
-0 1096 2225 [ [ -13 -65 -9 -62 -4 -56 -2 -50 0 -40 0 -25 -2 -15 -4 -9 -9 -3 -13 0 -22 0 -27 -3 -31 -9 -34 -15 -36 -25 -36 -40 -34 -50 -31 -56 -27 -62 -22 -65 -13 -65 ] ] Char
-0 1040 2225 [ [ -15 -65 -15 0 ] [ 0 -65 -31 -65 ] ] Char
-10 SetText2
-0 50 1850 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 102 1850 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 154 1850 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 204 1850 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 150 1450 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 202 1450 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 254 1450 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 304 1450 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 -675 1850 [ [ 0 65 0 0 27 0 ] ] Char
-0 -628 1850 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 -572 1850 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-0 -520 1850 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-0 -468 1850 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 450 2450 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-0 502 2450 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-0 556 2450 [ [ 0 65 0 0 27 0 ] ] Char
-0 603 2450 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-0 655 2450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 686 2450 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-0 738 2450 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 500 4175 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 556 4175 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 610 4175 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 641 4175 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-0 695 4175 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-0 749 4175 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-0 803 4175 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-0 857 4175 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -675 3350 [ [ 0 65 0 0 ] ] Char
-0 -655 3350 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -601 3350 [ [ 0 65 0 0 27 0 ] ] Char
-0 -554 3350 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-0 -502 3350 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-0 -450 3350 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 950 1600 [ [ 0 65 0 0 27 0 ] ] Char
-0 997 1600 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 1053 1600 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-0 1105 1600 [ [ 11 65 4 62 2 56 2 50 4 43 9 40 18 37 25 34 29 28 31 21 31 12 29 6 27 3 20 0 11 0 4 3 2 6 0 12 0 21 2 28 6 34 13 37 22 40 27 43 29 50 29 56 27 62 20 65 11 65 ] ] Char
-0 1157 1600 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-0 1209 1600 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -350 4225 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -298 4225 [ [ 0 65 31 0 ] [ 31 65 0 0 ] ] Char
-0 -246 4225 [ [ 15 65 15 0 ] [ 0 65 31 65 ] ] Char
-0 -194 4225 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -138 4225 [ [ 0 65 0 0 27 0 ] ] Char
-10 SetText2
-0 -1225 500 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 -1169 500 [ [ 15 65 15 0 ] [ 0 65 31 65 ] ] Char
-0 -1117 500 [ [ 0 65 0 0 ] [ 31 65 31 0 ] [ 0 34 31 34 ] ] Char
-0 -1065 500 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-0 -1009 500 [ [ 0 65 0 0 27 0 ] ] Char
-0 -962 500 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -912 500 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-0 -860 500 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 1125 500 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 1181 500 [ [ 15 65 15 0 ] [ 0 65 31 65 ] ] Char
-0 1233 500 [ [ 0 65 0 0 ] [ 31 65 31 0 ] [ 0 34 31 34 ] ] Char
-0 1285 500 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-0 1341 500 [ [ 0 65 0 0 27 0 ] ] Char
-0 1388 500 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 1438 500 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-0 1490 500 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 800 3350 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 852 3350 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 904 3350 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 954 3350 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 -300 4725 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-0 -248 4725 [ [ 0 65 0 0 ] ] Char
-0 -228 4725 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -176 4725 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -74 4725 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -300 5075 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-0 -248 5075 [ [ 2 6 0 3 2 0 4 3 2 6 ] ] Char
-0 -223 5075 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-0 -171 5075 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-0 -119 5075 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-0 -15 5075 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-0 46 5075 [ [ 40 78 0 -21 ] ] Char
-0 107 5075 [ [ 0 28 40 28 ] ] Char
-0 220 5075 [ [ 2 6 0 3 2 0 4 3 2 6 ] ] Char
-0 245 5075 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-0 297 5075 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-0 349 5075 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1475 2025 [ [ -65 22 -21 0 -21 34 ] [ -65 22 0 22 ] ] Char
-0 -1475 2079 [ [ -6 2 -3 0 0 2 -3 4 -6 2 ] ] Char
-0 -1475 2104 [ [ -43 29 -34 27 -28 22 -25 15 -25 13 -28 6 -34 2 -43 0 -46 0 -56 2 -62 6 -65 13 -65 15 -62 22 -56 27 -43 29 -28 29 -12 27 -3 22 0 15 0 11 -3 4 -9 2 ] ] Char
-0 -1475 2154 [ [ -65 13 -62 6 -53 2 -37 0 -28 0 -12 2 -3 6 0 13 0 18 -3 25 -12 29 -28 31 -37 31 -53 29 -62 25 -65 18 -65 13 ] ] Char
-0 -1475 2206 [ [ -65 13 -62 6 -53 2 -37 0 -28 0 -12 2 -3 6 0 13 0 18 -3 25 -12 29 -28 31 -37 31 -53 29 -62 25 -65 18 -65 13 ] ] Char
-0 -1475 2310 [ [ -56 20 0 20 ] [ -28 0 -28 40 ] ] Char
-0 -1475 2371 [ [ -78 40 21 0 ] ] Char
-0 -1475 2432 [ [ -28 0 -28 40 ] ] Char
-0 -1475 2545 [ [ -6 2 -3 0 0 2 -3 4 -6 2 ] ] Char
-0 -1475 2570 [ [ -65 13 -62 6 -53 2 -37 0 -28 0 -12 2 -3 6 0 13 0 18 -3 25 -12 29 -28 31 -37 31 -53 29 -62 25 -65 18 -65 13 ] ] Char
-0 -1475 2622 [ [ -65 13 -62 6 -53 2 -37 0 -28 0 -12 2 -3 6 0 13 0 18 -3 25 -12 29 -28 31 -37 31 -53 29 -62 25 -65 18 -65 13 ] ] Char
-0 -1475 2674 [ [ -53 0 -56 4 -65 11 0 11 ] ] Char
-grestore
-showpage
diff --git a/usr.sbin/xntpd/gadget/art01.lpr b/usr.sbin/xntpd/gadget/art01.lpr
deleted file mode 100644
index d770fed357b2..000000000000
--- a/usr.sbin/xntpd/gadget/art01.lpr
+++ /dev/null
@@ -1,890 +0,0 @@
-%!PS-Adobe-2.0
-%%Title: PADS Postscript Driver Header
-%%Creator: Andy Montalvo, 18 Lupine St., Lowell, MA 01851
-%%CreationDate: 06/08/90
-%%For: CAD Software, Littleton, MA
-%%EndComments
-%%BeginProcSet: Markers 1.0 0
-% marker attributes
-/MAttr_Width 1 def
-/MAttr_Size 0 def
-/MAttr_Type /M1 def
-% procedures
-/M1 { %def
-% draw marker 1: plus
-% Stack: - M1 -
- -2 0 rmoveto
- 4 0 rlineto
- -2 2 rmoveto
- 0 -4 rlineto
-} bind def
-/M2 { %def
-% draw marker 2: cross
-% Stack: - M2 -
- -2 -2 rmoveto
- 4 4 rlineto
- -4 0 rmoveto
- 4 -4 rlineto
-} bind def
-/M3 { %def
-% draw marker 3: square
-% Stack: - M3 -
- 0 2 rlineto
- 2 0 rlineto
- 0 -4 rlineto
- -4 0 rlineto
- 0 4 rlineto
- 2 0 rlineto
-} bind def
-/M4 { %def
-% draw marker 4: diamond
-% Stack: - M4 -
- 0 2 rlineto
- 2 -2 rlineto
- -2 -2 rlineto
- -2 2 rlineto
- 2 2 rlineto
-} bind def
-/M5 { %def
-% draw marker 5: hourglass
-% Stack: - M5 -
- 2 2 rlineto
- -4 0 rlineto
- 4 -4 rlineto
- -4 0 rlineto
- 2 2 rlineto
-} bind def
-/M6 { %def
-% draw marker 6: bowtie
-% Stack: - M6 -
- 2 2 rlineto
- 0 -4 rlineto
- -4 4 rlineto
- 0 -4 rlineto
- 2 2 rlineto
-} bind def
-/M7 { %def
-% draw marker 7: small plus (goes with char marker)
-% Stack: - M7 -
- -1 0 rmoveto
- 2 0 rlineto
- -1 1 rmoveto
- 0 -2 rlineto
-} bind def
-/Marker { %def
-% Command from driver: draw marker
-% STACK: x y Marker -
- MAttr_Size 0 gt
- {
- gsave
- moveto
- MAttr_Size 4 div dup scale
- MAttr_Type load exec
- 4 MAttr_Size div dup scale
- MAttr_Width setlinewidth
- stroke
- grestore
- } if
-} def
-%%EndProcSet: Markers 1.0 0
-%%BeginProcSet: Lib 1.0 0
-/sg { %def
-% Command from driver: set the gray scale 0 - 100
-% STACK: greylevel sg
- 100 div dup setgray /glev exch def
-} bind def
-/Circle { %def
-% draw a circle
-% STACK: x y radius Circle -
- 0 360 arc
-} bind def
-/RndAper { %def
-% select a round aperture
-% STACK: - RndAper -
- 1 setlinejoin
- 1 setlinecap
-} bind def
-/SqrAper { %def
-% select a square aperture
-% STACK: - SqrAper -
- 0 setlinejoin
- 2 setlinecap
-} bind def
-/Line { %def
-% draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] Line -
- 3 1 roll
- moveto
- true
- exch
- % This pushes the x then the y then does lineto
- { exch { false } { lineto true } ifelse } forall
- pop
-} bind def
-/Clipto { %def
-% set clipping rectangle from 0,0 to new values
-% STACK: x y Clipto -
- 0 0 moveto
- dup 0 exch lineto
- 2 copy lineto
- pop
- 0 lineto
- closepath
- clip
- newpath
-} bind def
-/Clip4 { %def
-% set clipping rectangle from xmin,ymin to xmax,ymax
-% STACK: xmin ymin xmax ymax Clip4 -
- 4 copy pop pop moveto
- 4 copy pop exch lineto pop
- 2 copy lineto
- exch pop exch pop lineto
- closepath
- clip
- newpath
-} bind def
-%%EndProcSet: Lib 1.0 0
-%%BeginProcSet: Lines 1.0 0
-% line attributes %
-/LAttr_Width 1 def
-% line procedures
-/PLine { %def
-% Cammand from driver: draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- LAttr_Width setlinewidth
- stroke
-} bind def % PLine
-/Char { %def
-% Command from driver: draw a character at the current position
-% STACK: type x y stroke_array Char -
-% stroke array -- [ stroke1 stroke2 ... stroken ]
-% stroke -- connected staight lines
-% type = 0 if text 1 if marker
- gsave
- 4 1 roll
- translate
- 0 eq { TAttr_Width } { MAttr_Width } ifelse setlinewidth
- {
- dup length 2 gt
- {
- dup dup 0 get exch 1 get % get starting point
- 3 -1 roll % put x y before array
- dup length 2 sub 2 exch getinterval % delete first items from array
- Line
- stroke
- }
- {
- aload pop currentlinewidth 2 div Circle fill
- } ifelse
- } forall
- grestore
-} bind def % Char
-/PArc { %def
-% Command from driver: draw an arc
-% STACK: x y radius startangle deltaangle Arc -
- 10 div exch 10 div exch
- 2 copy pop add
- arc
- LAttr_Width setlinewidth
- stroke
-} bind def
-/PCircle { %def
-% Command from driver: draw an circle
-% STACK: x y radius PCircle -
- Circle
- LAttr_Width setlinewidth
- stroke
-} bind def
-%%EndProcSet: Lines 1.0 0
-%%BeginProcSet: Polygon 1.0 0
-% polygon attributes %
-/PAttr_ExtWidth 1 def
-/PAttr_IntWidth 1 def
-/PAttr_Grid 1 def
-% polygon procedures
-/LoopSet { %def
-% set up for loop condition
-% STACK: start end LoopSet low gridwidth high
- 2 copy lt { exch } if
- % make grid line up to absolute coordinates
- PAttr_Grid div truncate PAttr_Grid mul exch
- PAttr_Grid exch
-} bind def
-/Hatch { %def
-% draw cross hatch pattern in current path
-% STACK: - Hatch -
- pathbbox
- /ury exch def
- /urx exch def
- /lly exch def
- /llx exch def
- clip
- newpath
- llx urx LoopSet
- { % x loop
- dup lly exch ury moveto lineto
- } for
- lly ury LoopSet
- { % y loop
- llx exch dup urx exch moveto lineto
- } for
- PAttr_IntWidth setlinewidth
- stroke
-} bind def
-/PPoly { %def
-% Command from driver: draw a plygon
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- closepath
- gsave
- PAttr_IntWidth PAttr_Grid ge {fill} {Hatch} ifelse
- grestore
- PAttr_ExtWidth setlinewidth
- stroke
-} bind def
-%%EndProcSet: Polygon 1.0 0
-%%BeginProcSet: Text 1.0 0
-% text attributes %
-/TAttr_Mirr 0 def
-/TAttr_Orient 0 def
-/TAttr_Width 1 def
-% text procedures
-/Text { %def
-% Command from driver: Draw text
-% STACK: x y width string Text -
- gsave
- 4 2 roll
- translate
- TAttr_Mirr 0 gt
- {
- -1 1 scale
- } if
- TAttr_Orient rotate
- 0 0 moveto
- dup length dup 1 gt
- {
- exch dup stringwidth pop
- 4 -1 roll
- exch 2 copy
- lt
- {
- div 1 scale show
- }
- {
- sub
- 3 -1 roll 1 sub div
- 0 3 -1 roll ashow
- }
- ifelse
- }
- {
- pop
- show
- } ifelse
- grestore
-} bind def
-%%EndProcSet: Text 1.0 0
-%%BeginProcSet: FlashSymbols 1.0 0
-% flash symbol attributes %
-/FAttr_Type /PRndPad def
-/FAttr_Width 0 def
-/FAttr_Length 1 def
-/FAttr_Orient 0 def
-% flash symbol procedures
-/PRndPad { %def
-% Command from driver: draw an circular pad
-% STACK: - PCirclePad -
- FAttr_Width dup scale
- 0 0 .5 Circle
- fill
-} bind def
-/PSqrPad { %def
-% Draw an Square pad
-% STACK: - PRectPad -
- FAttr_Width dup scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/PRectPad { %def
-% Draw an rectangular pad
-% STACK: - PRectPad -
- FAttr_Length FAttr_Width scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/POvalPad { %def
-% Draw an oval pad
-% STACK: - POvalPad -
- FAttr_Width setlinewidth
- FAttr_Length FAttr_Width sub 2 div dup
- neg 0 moveto
- 0 lineto
- RndAper
- stroke
-} bind def
-/Anl { %def
- 0 0 .5 Circle
- fill
- FAttr_Length FAttr_Width lt
- { % inner circle
- 0 0
- FAttr_Length 0 gt { FAttr_Length FAttr_Width div } { .5 } ifelse
- 2 div Circle
- 1 setgray
- fill
- glev setgray
- } if
-} bind def
-/PAnlPad { %def
-% Draw an annular pad
-% STACK: - PAnlPad -
- FAttr_Width dup scale
- Anl
-} bind def
-/PRelPad { %def
-% Draw an thermal relief pad
-% STACK: - PRelPad -
- PAnlPad
- 1 setgray
- .17 setlinewidth
- 0 setlinecap % the x
- 45 rotate
- .5 0 moveto -.5 0 lineto
- 0 .5 moveto 0 -.5 lineto
- stroke
- glev setgray
-} bind def
-/Flash { %def
-% Command from driver: Flash a symbol
-% STACK: x y Flash -
- FAttr_Width 0 gt
- {
- gsave
- translate
- FAttr_Orient rotate
- FAttr_Type load exec
- grestore
- } if
-} def
-%%EndProcSet: FlashSymbols 1.0 0
-%%BeginProcSet: SetAttr 1.0 0
-/SetLine { %def
-% Set the width of the lines
-% STACK: linewidth SetLine -
- /LAttr_Width exch def
- RndAper
-} bind def
-/SetPoly { %def
-% Set attribute of polygon
-% STACK: external_width internal_grid_width grid_spacing SetPoly -
- /PAttr_Grid exch def
- /PAttr_IntWidth exch def
- /PAttr_ExtWidth exch def
- RndAper
-} bind def
-/SetFlash { %def
-% Set Attributed of flash pad
-% STACK: orientation_angle length width aperture_type SetFlash -
- /FAttr_Type exch def
- FAttr_Type /PSqrPad eq FAttr_Type /PRectPad eq or
- { SqrAper } { RndAper } ifelse
- /FAttr_Width exch def
- /FAttr_Length exch def
- /FAttr_Orient exch 10 div def
-} bind def
-/SetMkr { %def
-% Set attributes of markers
-% STACK: linewidth size type SetMkr -
- /MAttr_Type exch def
- /MAttr_Size exch def
- /MAttr_Width exch def
- RndAper
-} bind def
-/SetText1 { %def
-% Set attributes of text
-% STACK: fontname height orient mirror SetMkr -
- /TAttr_Mirr exch def
- /TAttr_Orient exch 10 div def
- exch findfont exch scalefont setfont
- RndAper
-} bind def
-/SetText2 { %def
-% Set attributes of text
-% STACK: linewidth height mirror orient SetMkr -
- /TAttr_Width exch def
- RndAper
-} bind def
-%%EndProcSet: SetAttr 1.0 0
-%%BeginProcSet: Initialize 1.0 0
-/Init { %def
-% Initialize the driver
-% STACK: Init -
- 72 1000 div dup scale % Scale to 1/1000 inch
- 250 250 translate % make origin 1/4 inch from bottom left
- 1.5 setmiterlimit 1 RndAper % set line defaults
- 0 setgray % set color default
- /glev 0 def
-} def
-%%EndProcSet: Initialize 1.0 0
-%%EndProlog
-/Helvetica findfont 12 scalefont setfont
-35 760 moveto
-(gadget.job - Fri Aug 21 03:34:56 1992) show
-gsave
-Init
-8000 10500 Clipto
-4000 2800 translate
-0 rotate
-1 1 div dup scale
-75 sg
-50 sg
-25 sg
-0 sg
-10 SetLine
--1350 4700 [ -1350 4900 ] PLine
--1350 4900 [ -1150 4900 ] PLine
-10 SetLine
-1150 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 4700 ] PLine
-10 SetLine
-1150 0 [ 1350 0 ] PLine
-1350 0 [ 1350 200 ] PLine
-10 SetLine
--1350 200 [ -1350 0 ] PLine
--1350 0 [ -1150 0 ] PLine
-0 0 60 /PRndPad SetFlash
--1100 1450 Flash
--1100 1150 Flash
-300 3300 Flash
--100 3300 Flash
--100 3100 Flash
-300 3100 Flash
-300 3500 Flash
--100 3500 Flash
--400 3700 Flash
--1200 3700 Flash
--100 1300 Flash
--900 1300 Flash
--200 2800 Flash
-600 2800 Flash
--1200 2800 Flash
--400 2800 Flash
-0 2500 Flash
-0 2100 Flash
--1200 3400 Flash
--1200 3000 Flash
--900 2300 Flash
--1200 2300 Flash
--1200 2500 Flash
--900 2500 Flash
-800 2800 Flash
-1100 2800 Flash
-1250 1900 Flash
-450 1900 Flash
--100 900 Flash
--1200 900 Flash
--700 4000 Flash
--1100 4000 Flash
-1100 3000 Flash
-700 3000 Flash
--300 3700 Flash
-0 3700 Flash
-0 0 60 /PSqrPad SetFlash
-100 900 Flash
-0 0 60 /PRndPad SetFlash
-600 900 Flash
-0 0 60 /PSqrPad SetFlash
-700 3700 Flash
-0 0 60 /PRndPad SetFlash
-200 3700 Flash
-0 0 70 /PRndPad SetFlash
--750 550 Flash
--750 450 Flash
-0 550 Flash
-0 450 Flash
-750 550 Flash
-750 450 Flash
--648 4479 Flash
--540 4479 Flash
--432 4479 Flash
--324 4479 Flash
--216 4479 Flash
--108 4479 Flash
-0 4479 Flash
-108 4479 Flash
-216 4479 Flash
-324 4479 Flash
-432 4479 Flash
-540 4479 Flash
-648 4479 Flash
--594 4593 Flash
--486 4593 Flash
--378 4593 Flash
--270 4593 Flash
--162 4593 Flash
--54 4593 Flash
-54 4593 Flash
-162 4593 Flash
-270 4593 Flash
-378 4593 Flash
-486 4593 Flash
-594 4593 Flash
-0 0 177 /PRndPad SetFlash
-940 4536 Flash
--940 4536 Flash
-0 0 60 /PSqrPad SetFlash
-950 150 Flash
-0 0 60 /PRndPad SetFlash
-1050 150 Flash
-0 0 60 /PSqrPad SetFlash
--50 150 Flash
-0 0 60 /PRndPad SetFlash
-50 150 Flash
-0 0 60 /PSqrPad SetFlash
--1050 150 Flash
-0 0 60 /PRndPad SetFlash
--950 150 Flash
-0 0 50 /PRndPad SetFlash
-950 3524 Flash
-1026 3612 Flash
-950 3700 Flash
-0 0 60 /PSqrPad SetFlash
--1200 1600 Flash
-0 0 60 /PRndPad SetFlash
--1100 1700 Flash
--1200 1800 Flash
-300 1700 Flash
--100 1700 Flash
-200 1300 Flash
-600 1300 Flash
--700 2300 Flash
--300 2300 Flash
--700 4200 Flash
--1100 4200 Flash
-1100 3200 Flash
-700 3200 Flash
--700 2500 Flash
--300 2500 Flash
--700 2100 Flash
--300 2100 Flash
--800 2100 Flash
--1200 2100 Flash
-600 1100 Flash
-200 1100 Flash
-0 0 60 /PSqrPad SetFlash
-1200 2450 Flash
-0 0 60 /PRndPad SetFlash
-1100 2350 Flash
-1200 2250 Flash
--100 1900 Flash
-300 1900 Flash
-0 1500 Flash
-400 1500 Flash
-0 0 60 /PSqrPad SetFlash
--900 1600 Flash
-0 0 60 /PRndPad SetFlash
--800 1600 Flash
--700 1600 Flash
--600 1600 Flash
--500 1600 Flash
--400 1600 Flash
--300 1600 Flash
--300 1900 Flash
--400 1900 Flash
--500 1900 Flash
--600 1900 Flash
--700 1900 Flash
--800 1900 Flash
--900 1900 Flash
-0 0 60 /PSqrPad SetFlash
-200 2200 Flash
-0 0 60 /PRndPad SetFlash
-300 2200 Flash
-400 2200 Flash
-500 2200 Flash
-600 2200 Flash
-700 2200 Flash
-800 2200 Flash
-900 2200 Flash
-900 2500 Flash
-800 2500 Flash
-700 2500 Flash
-600 2500 Flash
-500 2500 Flash
-400 2500 Flash
-300 2500 Flash
-200 2500 Flash
-0 0 60 /PSqrPad SetFlash
-200 3900 Flash
-0 0 60 /PRndPad SetFlash
-300 3900 Flash
-400 3900 Flash
-500 3900 Flash
-600 3900 Flash
-700 3900 Flash
-800 3900 Flash
-900 3900 Flash
-1000 3900 Flash
-1100 3900 Flash
-1100 4200 Flash
-1000 4200 Flash
-900 4200 Flash
-800 4200 Flash
-700 4200 Flash
-600 4200 Flash
-500 4200 Flash
-400 4200 Flash
-300 4200 Flash
-200 4200 Flash
-0 0 60 /PSqrPad SetFlash
--1000 3100 Flash
-0 0 60 /PRndPad SetFlash
--900 3100 Flash
--800 3100 Flash
--700 3100 Flash
--600 3100 Flash
--500 3100 Flash
--400 3100 Flash
--300 3100 Flash
--300 3400 Flash
--400 3400 Flash
--500 3400 Flash
--600 3400 Flash
--700 3400 Flash
--800 3400 Flash
--900 3400 Flash
--1000 3400 Flash
-0 0 70 /PRndPad SetFlash
-900 800 Flash
-1100 800 Flash
-1000 800 Flash
-0 0 177 /PRndPad SetFlash
-1000 1550 Flash
-0 0 60 /PRndPad SetFlash
-0 4000 Flash
-0 4200 Flash
-0 0 250 /PRndPad SetFlash
--1100 450 Flash
-1100 450 Flash
-0 0 60 /PRndPad SetFlash
-1100 3400 Flash
-700 3400 Flash
-10 SetText2
-0 -300 4725 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-0 -248 4725 [ [ 0 65 0 0 ] ] Char
-0 -228 4725 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -176 4725 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -74 4725 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-12 SetLine
--100 900 [ -100 800 ] PLine
--100 800 [ 100 800 ] PLine
-100 900 [ 100 800 ] PLine
-100 800 [ 900 800 ] PLine
-300 1100 [ 600 1100 ] PLine
--1100 1150 [ -700 1150 ] PLine
--700 1150 [ -700 1600 ] PLine
-175 3300 [ -100 3300 ] PLine
-700 3000 [ 300 3000 ] PLine
-300 3000 [ 300 3100 ] PLine
-300 2500 [ 300 2650 ] PLine
-300 2650 [ 800 2650 ] PLine
-800 2800 [ 800 2650 ] PLine
-800 2650 [ 1000 2650 ] PLine
-400 2500 [ 400 2600 ] PLine
-400 2600 [ 1100 2600 ] PLine
-1100 2600 [ 1100 2800 ] PLine
--900 2300 [ -700 2100 ] PLine
--700 2100 [ -450 2100 ] PLine
-500 2500 [ 550 2550 ] PLine
-550 2550 [ 750 2550 ] PLine
-750 2550 [ 800 2500 ] PLine
--650 2600 [ -100 2600 ] PLine
--100 2250 [ 450 2250 ] PLine
-450 2250 [ 500 2200 ] PLine
--1200 2300 [ -1050 2300 ] PLine
--1050 2300 [ -1050 2100 ] PLine
--1050 2100 [ -800 2100 ] PLine
--900 2500 [ -700 2300 ] PLine
--700 2300 [ -700 2200 ] PLine
--700 2200 [ -300 2200 ] PLine
--300 2200 [ -300 2100 ] PLine
-1250 1900 [ 1250 1800 ] PLine
-1250 1800 [ 800 1800 ] PLine
-300 1900 [ 300 1800 ] PLine
-300 1800 [ 800 1800 ] PLine
-700 1900 [ 450 1900 ] PLine
-300 1700 [ 600 1700 ] PLine
-500 1600 [ -100 1600 ] PLine
--100 1600 [ -100 1700 ] PLine
-1000 3900 [ 1050 3950 ] PLine
-1050 3950 [ 1050 4050 ] PLine
-1050 4050 [ 50 4050 ] PLine
-50 4050 [ 0 4000 ] PLine
-0 4100 [ 900 4100 ] PLine
-800 3000 [ 1100 3000 ] PLine
-0 3700 [ 0 3850 ] PLine
-0 3850 [ 450 3850 ] PLine
-450 3850 [ 500 3900 ] PLine
--400 3400 [ -400 3600 ] PLine
--400 3600 [ 300 3600 ] PLine
-300 3600 [ 300 3700 ] PLine
-300 3700 [ 600 3700 ] PLine
-450 2700 [ -400 2700 ] PLine
--400 2300 [ -300 2300 ] PLine
--700 4200 [ -650 4250 ] PLine
--650 4250 [ 550 4250 ] PLine
-550 4250 [ 600 4200 ] PLine
-350 3800 [ 1100 3800 ] PLine
-1100 3800 [ 1100 3900 ] PLine
--800 3100 [ -800 2800 ] PLine
--800 2800 [ -400 2800 ] PLine
--850 3700 [ -400 3700 ] PLine
-400 1300 [ 600 1300 ] PLine
--1100 4200 [ -1050 4150 ] PLine
--1050 4150 [ 650 4150 ] PLine
-650 4150 [ 700 4200 ] PLine
--300 3400 [ -250 3350 ] PLine
--250 3350 [ 1200 3350 ] PLine
-1200 3350 [ 1200 4200 ] PLine
-1200 4200 [ 1100 4200 ] PLine
--700 3100 [ -700 2875 ] PLine
--700 2875 [ -200 2875 ] PLine
--200 2875 [ -200 2800 ] PLine
--600 3100 [ -600 2950 ] PLine
--600 2950 [ 600 2950 ] PLine
-600 2950 [ 600 2800 ] PLine
--750 550 [ -750 1050 ] PLine
--750 1050 [ -1050 1050 ] PLine
-950 3200 [ 700 3200 ] PLine
-850 1200 [ -600 1200 ] PLine
--550 3900 [ -350 3900 ] PLine
-540 4479 [ 540 4300 ] PLine
-540 4300 [ -800 4300 ] PLine
-432 4479 [ 432 4350 ] PLine
-432 4350 [ -750 4350 ] PLine
-400 3400 [ 700 3400 ] PLine
-50 SetLine
--1000 3400 [ -1000 3250 ] PLine
--1000 3250 [ -200 3250 ] PLine
--200 3250 [ -200 3100 ] PLine
--200 3100 [ -100 3100 ] PLine
-0 2500 [ 0 2350 ] PLine
-0 2350 [ 200 2350 ] PLine
-200 2350 [ 200 2500 ] PLine
-0 2350 [ -200 2350 ] PLine
--1000 3400 [ -1200 3400 ] PLine
-200 2350 [ 1100 2350 ] PLine
-1100 2350 [ 1100 2450 ] PLine
-1100 2450 [ 1200 2450 ] PLine
--600 1600 [ -600 1750 ] PLine
--600 1750 [ -200 1750 ] PLine
--1200 3700 [ -1000 3700 ] PLine
--1000 3700 [ -1000 3400 ] PLine
-1100 3200 [ 1250 3200 ] PLine
-1250 3200 [ 1250 2450 ] PLine
-1250 2450 [ 1200 2450 ] PLine
-900 4200 [ 900 4300 ] PLine
-900 4300 [ 1250 4300 ] PLine
-1250 4300 [ 1250 3200 ] PLine
--700 4000 [ -1000 4000 ] PLine
--1000 4000 [ -1000 3700 ] PLine
-900 4200 [ 800 4200 ] PLine
-200 1400 [ 1100 1400 ] PLine
-1100 1400 [ 1100 800 ] PLine
--50 450 [ -50 150 ] PLine
-950 150 [ 1100 450 ] PLine
-1100 450 [ 1000 800 ] PLine
--250 450 [ -250 1000 ] PLine
--250 1000 [ 200 1000 ] PLine
-200 1000 [ 200 1100 ] PLine
-0 450 [ -750 450 ] PLine
--750 450 [ -1100 450 ] PLine
-0 4475 [ 0 4400 ] PLine
-0 4400 [ -648 4400 ] PLine
--648 4400 [ -648 4479 ] PLine
-75 4000 [ 300 4000 ] PLine
-300 4000 [ 300 3900 ] PLine
-1100 450 [ 750 450 ] PLine
-750 450 [ 0 450 ] PLine
-900 2200 [ 900 2000 ] PLine
-900 2000 [ 75 2000 ] PLine
-75 2000 [ 75 2200 ] PLine
-75 2200 [ 200 2200 ] PLine
-300 4000 [ 1000 4000 ] PLine
--1100 450 [ -1050 150 ] PLine
--600 1900 [ -600 2000 ] PLine
--600 2000 [ 75 2000 ] PLine
-75 2100 [ 0 2100 ] PLine
-0 0 55 /PRndPad SetFlash
--200 2350 Flash
--200 1750 Flash
-200 1400 Flash
-0 0 55 /PRndPad SetFlash
-300 1100 Flash
-0 0 55 /PRndPad SetFlash
-175 3300 Flash
-0 0 55 /PRndPad SetFlash
-1000 2650 Flash
-0 0 55 /PRndPad SetFlash
--450 2100 Flash
-0 0 55 /PRndPad SetFlash
--650 2600 Flash
--100 2600 Flash
--100 2250 Flash
-0 0 55 /PRndPad SetFlash
-800 1800 Flash
-0 0 55 /PRndPad SetFlash
-700 1900 Flash
-0 0 55 /PRndPad SetFlash
-600 1700 Flash
-0 0 55 /PRndPad SetFlash
-500 1600 Flash
-0 0 55 /PRndPad SetFlash
-0 4100 Flash
-900 4100 Flash
-0 0 55 /PRndPad SetFlash
-800 3000 Flash
-0 0 55 /PRndPad SetFlash
-600 3700 Flash
-0 0 55 /PRndPad SetFlash
-450 2700 Flash
--400 2700 Flash
--400 2300 Flash
-0 0 55 /PRndPad SetFlash
-350 3800 Flash
-0 0 55 /PRndPad SetFlash
--850 3700 Flash
-0 0 55 /PRndPad SetFlash
-400 1300 Flash
-0 0 55 /PRndPad SetFlash
--1050 1050 Flash
-0 0 55 /PRndPad SetFlash
-0 4475 Flash
-75 4000 Flash
-1000 4000 Flash
-0 0 55 /PRndPad SetFlash
-950 3200 Flash
-0 0 55 /PRndPad SetFlash
-850 1200 Flash
--600 1200 Flash
-0 0 55 /PRndPad SetFlash
--550 3900 Flash
--350 3900 Flash
-0 0 55 /PRndPad SetFlash
--800 4300 Flash
-0 0 55 /PRndPad SetFlash
--750 4350 Flash
-0 0 55 /PRndPad SetFlash
-400 3400 Flash
-grestore
-showpage
diff --git a/usr.sbin/xntpd/gadget/art02.lpr b/usr.sbin/xntpd/gadget/art02.lpr
deleted file mode 100644
index 1b336f378254..000000000000
--- a/usr.sbin/xntpd/gadget/art02.lpr
+++ /dev/null
@@ -1,893 +0,0 @@
-%!PS-Adobe-2.0
-%%Title: PADS Postscript Driver Header
-%%Creator: Andy Montalvo, 18 Lupine St., Lowell, MA 01851
-%%CreationDate: 06/08/90
-%%For: CAD Software, Littleton, MA
-%%EndComments
-%%BeginProcSet: Markers 1.0 0
-% marker attributes
-/MAttr_Width 1 def
-/MAttr_Size 0 def
-/MAttr_Type /M1 def
-% procedures
-/M1 { %def
-% draw marker 1: plus
-% Stack: - M1 -
- -2 0 rmoveto
- 4 0 rlineto
- -2 2 rmoveto
- 0 -4 rlineto
-} bind def
-/M2 { %def
-% draw marker 2: cross
-% Stack: - M2 -
- -2 -2 rmoveto
- 4 4 rlineto
- -4 0 rmoveto
- 4 -4 rlineto
-} bind def
-/M3 { %def
-% draw marker 3: square
-% Stack: - M3 -
- 0 2 rlineto
- 2 0 rlineto
- 0 -4 rlineto
- -4 0 rlineto
- 0 4 rlineto
- 2 0 rlineto
-} bind def
-/M4 { %def
-% draw marker 4: diamond
-% Stack: - M4 -
- 0 2 rlineto
- 2 -2 rlineto
- -2 -2 rlineto
- -2 2 rlineto
- 2 2 rlineto
-} bind def
-/M5 { %def
-% draw marker 5: hourglass
-% Stack: - M5 -
- 2 2 rlineto
- -4 0 rlineto
- 4 -4 rlineto
- -4 0 rlineto
- 2 2 rlineto
-} bind def
-/M6 { %def
-% draw marker 6: bowtie
-% Stack: - M6 -
- 2 2 rlineto
- 0 -4 rlineto
- -4 4 rlineto
- 0 -4 rlineto
- 2 2 rlineto
-} bind def
-/M7 { %def
-% draw marker 7: small plus (goes with char marker)
-% Stack: - M7 -
- -1 0 rmoveto
- 2 0 rlineto
- -1 1 rmoveto
- 0 -2 rlineto
-} bind def
-/Marker { %def
-% Command from driver: draw marker
-% STACK: x y Marker -
- MAttr_Size 0 gt
- {
- gsave
- moveto
- MAttr_Size 4 div dup scale
- MAttr_Type load exec
- 4 MAttr_Size div dup scale
- MAttr_Width setlinewidth
- stroke
- grestore
- } if
-} def
-%%EndProcSet: Markers 1.0 0
-%%BeginProcSet: Lib 1.0 0
-/sg { %def
-% Command from driver: set the gray scale 0 - 100
-% STACK: greylevel sg
- 100 div dup setgray /glev exch def
-} bind def
-/Circle { %def
-% draw a circle
-% STACK: x y radius Circle -
- 0 360 arc
-} bind def
-/RndAper { %def
-% select a round aperture
-% STACK: - RndAper -
- 1 setlinejoin
- 1 setlinecap
-} bind def
-/SqrAper { %def
-% select a square aperture
-% STACK: - SqrAper -
- 0 setlinejoin
- 2 setlinecap
-} bind def
-/Line { %def
-% draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] Line -
- 3 1 roll
- moveto
- true
- exch
- % This pushes the x then the y then does lineto
- { exch { false } { lineto true } ifelse } forall
- pop
-} bind def
-/Clipto { %def
-% set clipping rectangle from 0,0 to new values
-% STACK: x y Clipto -
- 0 0 moveto
- dup 0 exch lineto
- 2 copy lineto
- pop
- 0 lineto
- closepath
- clip
- newpath
-} bind def
-/Clip4 { %def
-% set clipping rectangle from xmin,ymin to xmax,ymax
-% STACK: xmin ymin xmax ymax Clip4 -
- 4 copy pop pop moveto
- 4 copy pop exch lineto pop
- 2 copy lineto
- exch pop exch pop lineto
- closepath
- clip
- newpath
-} bind def
-%%EndProcSet: Lib 1.0 0
-%%BeginProcSet: Lines 1.0 0
-% line attributes %
-/LAttr_Width 1 def
-% line procedures
-/PLine { %def
-% Cammand from driver: draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- LAttr_Width setlinewidth
- stroke
-} bind def % PLine
-/Char { %def
-% Command from driver: draw a character at the current position
-% STACK: type x y stroke_array Char -
-% stroke array -- [ stroke1 stroke2 ... stroken ]
-% stroke -- connected staight lines
-% type = 0 if text 1 if marker
- gsave
- 4 1 roll
- translate
- 0 eq { TAttr_Width } { MAttr_Width } ifelse setlinewidth
- {
- dup length 2 gt
- {
- dup dup 0 get exch 1 get % get starting point
- 3 -1 roll % put x y before array
- dup length 2 sub 2 exch getinterval % delete first items from array
- Line
- stroke
- }
- {
- aload pop currentlinewidth 2 div Circle fill
- } ifelse
- } forall
- grestore
-} bind def % Char
-/PArc { %def
-% Command from driver: draw an arc
-% STACK: x y radius startangle deltaangle Arc -
- 10 div exch 10 div exch
- 2 copy pop add
- arc
- LAttr_Width setlinewidth
- stroke
-} bind def
-/PCircle { %def
-% Command from driver: draw an circle
-% STACK: x y radius PCircle -
- Circle
- LAttr_Width setlinewidth
- stroke
-} bind def
-%%EndProcSet: Lines 1.0 0
-%%BeginProcSet: Polygon 1.0 0
-% polygon attributes %
-/PAttr_ExtWidth 1 def
-/PAttr_IntWidth 1 def
-/PAttr_Grid 1 def
-% polygon procedures
-/LoopSet { %def
-% set up for loop condition
-% STACK: start end LoopSet low gridwidth high
- 2 copy lt { exch } if
- % make grid line up to absolute coordinates
- PAttr_Grid div truncate PAttr_Grid mul exch
- PAttr_Grid exch
-} bind def
-/Hatch { %def
-% draw cross hatch pattern in current path
-% STACK: - Hatch -
- pathbbox
- /ury exch def
- /urx exch def
- /lly exch def
- /llx exch def
- clip
- newpath
- llx urx LoopSet
- { % x loop
- dup lly exch ury moveto lineto
- } for
- lly ury LoopSet
- { % y loop
- llx exch dup urx exch moveto lineto
- } for
- PAttr_IntWidth setlinewidth
- stroke
-} bind def
-/PPoly { %def
-% Command from driver: draw a plygon
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- closepath
- gsave
- PAttr_IntWidth PAttr_Grid ge {fill} {Hatch} ifelse
- grestore
- PAttr_ExtWidth setlinewidth
- stroke
-} bind def
-%%EndProcSet: Polygon 1.0 0
-%%BeginProcSet: Text 1.0 0
-% text attributes %
-/TAttr_Mirr 0 def
-/TAttr_Orient 0 def
-/TAttr_Width 1 def
-% text procedures
-/Text { %def
-% Command from driver: Draw text
-% STACK: x y width string Text -
- gsave
- 4 2 roll
- translate
- TAttr_Mirr 0 gt
- {
- -1 1 scale
- } if
- TAttr_Orient rotate
- 0 0 moveto
- dup length dup 1 gt
- {
- exch dup stringwidth pop
- 4 -1 roll
- exch 2 copy
- lt
- {
- div 1 scale show
- }
- {
- sub
- 3 -1 roll 1 sub div
- 0 3 -1 roll ashow
- }
- ifelse
- }
- {
- pop
- show
- } ifelse
- grestore
-} bind def
-%%EndProcSet: Text 1.0 0
-%%BeginProcSet: FlashSymbols 1.0 0
-% flash symbol attributes %
-/FAttr_Type /PRndPad def
-/FAttr_Width 0 def
-/FAttr_Length 1 def
-/FAttr_Orient 0 def
-% flash symbol procedures
-/PRndPad { %def
-% Command from driver: draw an circular pad
-% STACK: - PCirclePad -
- FAttr_Width dup scale
- 0 0 .5 Circle
- fill
-} bind def
-/PSqrPad { %def
-% Draw an Square pad
-% STACK: - PRectPad -
- FAttr_Width dup scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/PRectPad { %def
-% Draw an rectangular pad
-% STACK: - PRectPad -
- FAttr_Length FAttr_Width scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/POvalPad { %def
-% Draw an oval pad
-% STACK: - POvalPad -
- FAttr_Width setlinewidth
- FAttr_Length FAttr_Width sub 2 div dup
- neg 0 moveto
- 0 lineto
- RndAper
- stroke
-} bind def
-/Anl { %def
- 0 0 .5 Circle
- fill
- FAttr_Length FAttr_Width lt
- { % inner circle
- 0 0
- FAttr_Length 0 gt { FAttr_Length FAttr_Width div } { .5 } ifelse
- 2 div Circle
- 1 setgray
- fill
- glev setgray
- } if
-} bind def
-/PAnlPad { %def
-% Draw an annular pad
-% STACK: - PAnlPad -
- FAttr_Width dup scale
- Anl
-} bind def
-/PRelPad { %def
-% Draw an thermal relief pad
-% STACK: - PRelPad -
- PAnlPad
- 1 setgray
- .17 setlinewidth
- 0 setlinecap % the x
- 45 rotate
- .5 0 moveto -.5 0 lineto
- 0 .5 moveto 0 -.5 lineto
- stroke
- glev setgray
-} bind def
-/Flash { %def
-% Command from driver: Flash a symbol
-% STACK: x y Flash -
- FAttr_Width 0 gt
- {
- gsave
- translate
- FAttr_Orient rotate
- FAttr_Type load exec
- grestore
- } if
-} def
-%%EndProcSet: FlashSymbols 1.0 0
-%%BeginProcSet: SetAttr 1.0 0
-/SetLine { %def
-% Set the width of the lines
-% STACK: linewidth SetLine -
- /LAttr_Width exch def
- RndAper
-} bind def
-/SetPoly { %def
-% Set attribute of polygon
-% STACK: external_width internal_grid_width grid_spacing SetPoly -
- /PAttr_Grid exch def
- /PAttr_IntWidth exch def
- /PAttr_ExtWidth exch def
- RndAper
-} bind def
-/SetFlash { %def
-% Set Attributed of flash pad
-% STACK: orientation_angle length width aperture_type SetFlash -
- /FAttr_Type exch def
- FAttr_Type /PSqrPad eq FAttr_Type /PRectPad eq or
- { SqrAper } { RndAper } ifelse
- /FAttr_Width exch def
- /FAttr_Length exch def
- /FAttr_Orient exch 10 div def
-} bind def
-/SetMkr { %def
-% Set attributes of markers
-% STACK: linewidth size type SetMkr -
- /MAttr_Type exch def
- /MAttr_Size exch def
- /MAttr_Width exch def
- RndAper
-} bind def
-/SetText1 { %def
-% Set attributes of text
-% STACK: fontname height orient mirror SetMkr -
- /TAttr_Mirr exch def
- /TAttr_Orient exch 10 div def
- exch findfont exch scalefont setfont
- RndAper
-} bind def
-/SetText2 { %def
-% Set attributes of text
-% STACK: linewidth height mirror orient SetMkr -
- /TAttr_Width exch def
- RndAper
-} bind def
-%%EndProcSet: SetAttr 1.0 0
-%%BeginProcSet: Initialize 1.0 0
-/Init { %def
-% Initialize the driver
-% STACK: Init -
- 72 1000 div dup scale % Scale to 1/1000 inch
- 250 250 translate % make origin 1/4 inch from bottom left
- 1.5 setmiterlimit 1 RndAper % set line defaults
- 0 setgray % set color default
- /glev 0 def
-} def
-%%EndProcSet: Initialize 1.0 0
-%%EndProlog
-/Helvetica findfont 12 scalefont setfont
-35 760 moveto
-(gadget.job - Fri Aug 21 03:35:02 1992) show
-gsave
-Init
-8000 10500 Clipto
-4000 2800 translate
--1 1 scale
-0 rotate
-1 1 div dup scale
-75 sg
-50 sg
-25 sg
-0 sg
-10 SetLine
--1350 4700 [ -1350 4900 ] PLine
--1350 4900 [ -1150 4900 ] PLine
-10 SetLine
-1150 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 4700 ] PLine
-10 SetLine
-1150 0 [ 1350 0 ] PLine
-1350 0 [ 1350 200 ] PLine
-10 SetLine
--1350 200 [ -1350 0 ] PLine
--1350 0 [ -1150 0 ] PLine
-0 0 60 /PRndPad SetFlash
--1100 1450 Flash
--1100 1150 Flash
-300 3300 Flash
--100 3300 Flash
--100 3100 Flash
-300 3100 Flash
-300 3500 Flash
--100 3500 Flash
--400 3700 Flash
--1200 3700 Flash
--100 1300 Flash
--900 1300 Flash
--200 2800 Flash
-600 2800 Flash
--1200 2800 Flash
--400 2800 Flash
-0 2500 Flash
-0 2100 Flash
--1200 3400 Flash
--1200 3000 Flash
--900 2300 Flash
--1200 2300 Flash
--1200 2500 Flash
--900 2500 Flash
-800 2800 Flash
-1100 2800 Flash
-1250 1900 Flash
-450 1900 Flash
--100 900 Flash
--1200 900 Flash
--700 4000 Flash
--1100 4000 Flash
-1100 3000 Flash
-700 3000 Flash
--300 3700 Flash
-0 3700 Flash
-0 0 60 /PSqrPad SetFlash
-100 900 Flash
-0 0 60 /PRndPad SetFlash
-600 900 Flash
-0 0 60 /PSqrPad SetFlash
-700 3700 Flash
-0 0 60 /PRndPad SetFlash
-200 3700 Flash
-0 0 70 /PRndPad SetFlash
--750 550 Flash
--750 450 Flash
-0 550 Flash
-0 450 Flash
-750 550 Flash
-750 450 Flash
--648 4479 Flash
--540 4479 Flash
--432 4479 Flash
--324 4479 Flash
--216 4479 Flash
--108 4479 Flash
-0 4479 Flash
-108 4479 Flash
-216 4479 Flash
-324 4479 Flash
-432 4479 Flash
-540 4479 Flash
-648 4479 Flash
--594 4593 Flash
--486 4593 Flash
--378 4593 Flash
--270 4593 Flash
--162 4593 Flash
--54 4593 Flash
-54 4593 Flash
-162 4593 Flash
-270 4593 Flash
-378 4593 Flash
-486 4593 Flash
-594 4593 Flash
-0 0 177 /PRndPad SetFlash
-940 4536 Flash
--940 4536 Flash
-0 0 60 /PSqrPad SetFlash
-950 150 Flash
-0 0 60 /PRndPad SetFlash
-1050 150 Flash
-0 0 60 /PSqrPad SetFlash
--50 150 Flash
-0 0 60 /PRndPad SetFlash
-50 150 Flash
-0 0 60 /PSqrPad SetFlash
--1050 150 Flash
-0 0 60 /PRndPad SetFlash
--950 150 Flash
-0 0 50 /PRndPad SetFlash
-950 3524 Flash
-1026 3612 Flash
-950 3700 Flash
-0 0 60 /PSqrPad SetFlash
--1200 1600 Flash
-0 0 60 /PRndPad SetFlash
--1100 1700 Flash
--1200 1800 Flash
-300 1700 Flash
--100 1700 Flash
-200 1300 Flash
-600 1300 Flash
--700 2300 Flash
--300 2300 Flash
--700 4200 Flash
--1100 4200 Flash
-1100 3200 Flash
-700 3200 Flash
--700 2500 Flash
--300 2500 Flash
--700 2100 Flash
--300 2100 Flash
--800 2100 Flash
--1200 2100 Flash
-600 1100 Flash
-200 1100 Flash
-0 0 60 /PSqrPad SetFlash
-1200 2450 Flash
-0 0 60 /PRndPad SetFlash
-1100 2350 Flash
-1200 2250 Flash
--100 1900 Flash
-300 1900 Flash
-0 1500 Flash
-400 1500 Flash
-0 0 60 /PSqrPad SetFlash
--900 1600 Flash
-0 0 60 /PRndPad SetFlash
--800 1600 Flash
--700 1600 Flash
--600 1600 Flash
--500 1600 Flash
--400 1600 Flash
--300 1600 Flash
--300 1900 Flash
--400 1900 Flash
--500 1900 Flash
--600 1900 Flash
--700 1900 Flash
--800 1900 Flash
--900 1900 Flash
-0 0 60 /PSqrPad SetFlash
-200 2200 Flash
-0 0 60 /PRndPad SetFlash
-300 2200 Flash
-400 2200 Flash
-500 2200 Flash
-600 2200 Flash
-700 2200 Flash
-800 2200 Flash
-900 2200 Flash
-900 2500 Flash
-800 2500 Flash
-700 2500 Flash
-600 2500 Flash
-500 2500 Flash
-400 2500 Flash
-300 2500 Flash
-200 2500 Flash
-0 0 60 /PSqrPad SetFlash
-200 3900 Flash
-0 0 60 /PRndPad SetFlash
-300 3900 Flash
-400 3900 Flash
-500 3900 Flash
-600 3900 Flash
-700 3900 Flash
-800 3900 Flash
-900 3900 Flash
-1000 3900 Flash
-1100 3900 Flash
-1100 4200 Flash
-1000 4200 Flash
-900 4200 Flash
-800 4200 Flash
-700 4200 Flash
-600 4200 Flash
-500 4200 Flash
-400 4200 Flash
-300 4200 Flash
-200 4200 Flash
-0 0 60 /PSqrPad SetFlash
--1000 3100 Flash
-0 0 60 /PRndPad SetFlash
--900 3100 Flash
--800 3100 Flash
--700 3100 Flash
--600 3100 Flash
--500 3100 Flash
--400 3100 Flash
--300 3100 Flash
--300 3400 Flash
--400 3400 Flash
--500 3400 Flash
--600 3400 Flash
--700 3400 Flash
--800 3400 Flash
--900 3400 Flash
--1000 3400 Flash
-0 0 70 /PRndPad SetFlash
-900 800 Flash
-1100 800 Flash
-1000 800 Flash
-0 0 177 /PRndPad SetFlash
-1000 1550 Flash
-0 0 60 /PRndPad SetFlash
-0 4000 Flash
-0 4200 Flash
-0 0 250 /PRndPad SetFlash
--1100 450 Flash
-1100 450 Flash
-0 0 60 /PRndPad SetFlash
-1100 3400 Flash
-700 3400 Flash
-10 SetText2
-0 300 4725 [ [ -31 56 -27 62 -20 65 -11 65 -4 62 0 56 0 50 -2 43 -4 40 -9 37 -22 31 -27 28 -29 25 -31 18 -31 9 -27 3 -20 0 -11 0 -4 3 0 9 ] ] Char
-0 248 4725 [ [ 0 65 0 0 ] ] Char
-0 228 4725 [ [ 0 65 0 0 ] [ 0 65 -15 65 -22 62 -27 56 -29 50 -31 40 -31 25 -29 15 -27 9 -22 3 -15 0 0 0 ] ] Char
-0 176 4725 [ [ 0 65 0 0 ] [ 0 65 -29 65 ] [ 0 34 -18 34 ] [ 0 0 -29 0 ] ] Char
-0 74 4725 [ [ -2 50 -2 53 -4 59 -6 62 -11 65 -20 65 -25 62 -27 59 -29 53 -29 46 -27 40 -22 31 0 0 -31 0 ] ] Char
-12 SetLine
-700 3700 [ 750 3650 ] PLine
-750 3650 [ 750 800 ] PLine
-750 800 [ 900 800 ] PLine
-0 550 [ 300 550 ] PLine
-300 550 [ 300 1100 ] PLine
-300 2200 [ 250 2150 ] PLine
-250 2150 [ 250 1600 ] PLine
-250 1600 [ 300 1550 ] PLine
-300 1550 [ 300 1100 ] PLine
--700 2500 [ -550 2500 ] PLine
--550 2500 [ -550 1700 ] PLine
--550 1700 [ -700 1700 ] PLine
--700 1700 [ -700 1600 ] PLine
-300 3500 [ 175 3500 ] PLine
-175 3500 [ 175 3100 ] PLine
-175 3100 [ 300 3100 ] PLine
-300 4200 [ 250 4150 ] PLine
-250 4150 [ 250 3800 ] PLine
-250 3800 [ 300 3750 ] PLine
-300 3750 [ 300 3500 ] PLine
--300 2500 [ -250 2550 ] PLine
--250 2550 [ -250 3300 ] PLine
--250 3300 [ -100 3300 ] PLine
-300 4200 [ 400 4200 ] PLine
--900 1600 [ -800 1600 ] PLine
--800 1600 [ -800 1500 ] PLine
--800 1500 [ -500 1500 ] PLine
--500 1500 [ -500 1600 ] PLine
-1000 2650 [ 1000 2250 ] PLine
-1000 2250 [ 1200 2250 ] PLine
-400 1500 [ 400 2200 ] PLine
-400 2200 [ 400 2300 ] PLine
-400 2300 [ 700 2300 ] PLine
-700 2300 [ 700 2500 ] PLine
--450 2100 [ -450 1650 ] PLine
--450 1650 [ -400 1600 ] PLine
--500 3400 [ -500 3150 ] PLine
--500 3150 [ -650 3150 ] PLine
--650 3150 [ -650 2600 ] PLine
--100 2600 [ -100 2250 ] PLine
--1200 2500 [ -1200 2300 ] PLine
--300 2100 [ -250 2050 ] PLine
--250 2050 [ -250 1650 ] PLine
--250 1650 [ -300 1600 ] PLine
-800 1800 [ 800 2200 ] PLine
-600 900 [ 600 550 ] PLine
-600 550 [ 750 550 ] PLine
-700 2200 [ 700 1900 ] PLine
-600 1700 [ 600 2200 ] PLine
-1050 150 [ 1050 250 ] PLine
-1050 250 [ 500 250 ] PLine
-500 250 [ 500 1600 ] PLine
-0 4200 [ 0 4100 ] PLine
-900 4100 [ 900 3900 ] PLine
-800 3900 [ 800 3000 ] PLine
-600 3700 [ 600 3900 ] PLine
-600 4200 [ 600 4075 ] PLine
-600 4075 [ 450 4075 ] PLine
-450 4075 [ 450 2700 ] PLine
--400 2700 [ -400 2300 ] PLine
-300 3300 [ 350 3350 ] PLine
-350 3350 [ 350 3800 ] PLine
--1200 2800 [ -1000 2800 ] PLine
--1000 2800 [ -1000 3100 ] PLine
--900 3100 [ -850 3150 ] PLine
--850 3150 [ -850 3700 ] PLine
-50 150 [ 400 150 ] PLine
-400 150 [ 400 1300 ] PLine
--500 3100 [ -500 3000 ] PLine
--500 3000 [ -350 3000 ] PLine
--350 3000 [ -350 1300 ] PLine
--350 1300 [ -100 1300 ] PLine
-200 3700 [ 150 3750 ] PLine
-150 3750 [ 150 4425 ] PLine
-150 4425 [ 108 4479 ] PLine
-108 4479 [ 54 4593 ] PLine
--108 4479 [ 50 4600 ] PLine
-50 4600 [ 54 4593 ] PLine
--324 4479 [ -216 4479 ] PLine
--1100 1700 [ -1100 1450 ] PLine
--1050 1050 [ -1050 1800 ] PLine
--1050 1800 [ -1200 1800 ] PLine
-950 3524 [ 950 3200 ] PLine
-950 3700 [ 850 3700 ] PLine
-850 3700 [ 850 1200 ] PLine
--600 1200 [ -600 150 ] PLine
--600 150 [ -950 150 ] PLine
--540 4479 [ -550 4479 ] PLine
--550 4479 [ -550 3900 ] PLine
--350 3900 [ -350 3150 ] PLine
--350 3150 [ -300 3100 ] PLine
--432 4479 [ -450 4479 ] PLine
--450 4479 [ -450 3150 ] PLine
--450 3150 [ -382 3100 ] PLine
--382 3100 [ -400 3100 ] PLine
--800 4300 [ -800 3400 ] PLine
--750 4350 [ -750 3450 ] PLine
--750 3450 [ -700 3400 ] PLine
-400 3900 [ 400 3400 ] PLine
-1100 3400 [ 1100 3600 ] PLine
-1100 3600 [ 1026 3600 ] PLine
-1026 3600 [ 1026 3612 ] PLine
-50 SetLine
--100 3100 [ 0 3100 ] PLine
-0 3100 [ 0 2500 ] PLine
--200 2350 [ -200 1900 ] PLine
--200 1900 [ -100 1900 ] PLine
--200 1900 [ -200 1500 ] PLine
--200 1500 [ 0 1500 ] PLine
-0 1500 [ 200 1500 ] PLine
-200 1500 [ 200 1300 ] PLine
-800 4200 [ 800 4050 ] PLine
-800 4050 [ 700 4050 ] PLine
-700 4050 [ 700 3900 ] PLine
--750 450 [ -900 450 ] PLine
--900 450 [ -900 1300 ] PLine
--1200 1600 [ -1275 1600 ] PLine
--1275 1600 [ -1275 900 ] PLine
--900 900 [ -1275 900 ] PLine
--600 1900 [ -600 1750 ] PLine
--600 1750 [ -975 1750 ] PLine
--975 1750 [ -975 1300 ] PLine
--975 1300 [ -900 1300 ] PLine
--1200 2100 [ -1275 2100 ] PLine
--1275 2100 [ -1275 1600 ] PLine
--1200 3000 [ -1275 3000 ] PLine
--1275 3000 [ -1275 2100 ] PLine
--900 3400 [ -900 3525 ] PLine
--900 3525 [ -1275 3525 ] PLine
--1100 4000 [ -1275 4000 ] PLine
--1275 4000 [ -1275 3000 ] PLine
-75 3500 [ 75 2100 ] PLine
-75 2100 [ 0 2100 ] PLine
-75 2200 [ 200 2200 ] PLine
-0 4479 [ 0 4400 ] PLine
-0 4400 [ 75 4400 ] PLine
-75 4400 [ 75 3500 ] PLine
--300 3700 [ -300 3500 ] PLine
--300 3500 [ 75 3500 ] PLine
-900 2500 [ 900 2200 ] PLine
-1000 4000 [ 1000 4200 ] PLine
-0 0 55 /PRndPad SetFlash
--200 2350 Flash
--200 1750 Flash
-200 1400 Flash
-0 0 55 /PRndPad SetFlash
-300 1100 Flash
-0 0 55 /PRndPad SetFlash
-175 3300 Flash
-0 0 55 /PRndPad SetFlash
-1000 2650 Flash
-0 0 55 /PRndPad SetFlash
--450 2100 Flash
-0 0 55 /PRndPad SetFlash
--650 2600 Flash
--100 2600 Flash
--100 2250 Flash
-0 0 55 /PRndPad SetFlash
-800 1800 Flash
-0 0 55 /PRndPad SetFlash
-700 1900 Flash
-0 0 55 /PRndPad SetFlash
-600 1700 Flash
-0 0 55 /PRndPad SetFlash
-500 1600 Flash
-0 0 55 /PRndPad SetFlash
-0 4100 Flash
-900 4100 Flash
-0 0 55 /PRndPad SetFlash
-800 3000 Flash
-0 0 55 /PRndPad SetFlash
-600 3700 Flash
-0 0 55 /PRndPad SetFlash
-450 2700 Flash
--400 2700 Flash
--400 2300 Flash
-0 0 55 /PRndPad SetFlash
-350 3800 Flash
-0 0 55 /PRndPad SetFlash
--850 3700 Flash
-0 0 55 /PRndPad SetFlash
-400 1300 Flash
-0 0 55 /PRndPad SetFlash
--1050 1050 Flash
-0 0 55 /PRndPad SetFlash
-0 4475 Flash
-75 4000 Flash
-1000 4000 Flash
-0 0 55 /PRndPad SetFlash
-950 3200 Flash
-0 0 55 /PRndPad SetFlash
-850 1200 Flash
--600 1200 Flash
-0 0 55 /PRndPad SetFlash
--550 3900 Flash
--350 3900 Flash
-0 0 55 /PRndPad SetFlash
--800 4300 Flash
-0 0 55 /PRndPad SetFlash
--750 4350 Flash
-0 0 55 /PRndPad SetFlash
-400 3400 Flash
-grestore
-showpage
diff --git a/usr.sbin/xntpd/gadget/dd0124.lpr b/usr.sbin/xntpd/gadget/dd0124.lpr
deleted file mode 100644
index f6474d43864d..000000000000
--- a/usr.sbin/xntpd/gadget/dd0124.lpr
+++ /dev/null
@@ -1,813 +0,0 @@
-%!PS-Adobe-2.0
-%%Title: PADS Postscript Driver Header
-%%Creator: Andy Montalvo, 18 Lupine St., Lowell, MA 01851
-%%CreationDate: 06/08/90
-%%For: CAD Software, Littleton, MA
-%%EndComments
-%%BeginProcSet: Markers 1.0 0
-% marker attributes
-/MAttr_Width 1 def
-/MAttr_Size 0 def
-/MAttr_Type /M1 def
-% procedures
-/M1 { %def
-% draw marker 1: plus
-% Stack: - M1 -
- -2 0 rmoveto
- 4 0 rlineto
- -2 2 rmoveto
- 0 -4 rlineto
-} bind def
-/M2 { %def
-% draw marker 2: cross
-% Stack: - M2 -
- -2 -2 rmoveto
- 4 4 rlineto
- -4 0 rmoveto
- 4 -4 rlineto
-} bind def
-/M3 { %def
-% draw marker 3: square
-% Stack: - M3 -
- 0 2 rlineto
- 2 0 rlineto
- 0 -4 rlineto
- -4 0 rlineto
- 0 4 rlineto
- 2 0 rlineto
-} bind def
-/M4 { %def
-% draw marker 4: diamond
-% Stack: - M4 -
- 0 2 rlineto
- 2 -2 rlineto
- -2 -2 rlineto
- -2 2 rlineto
- 2 2 rlineto
-} bind def
-/M5 { %def
-% draw marker 5: hourglass
-% Stack: - M5 -
- 2 2 rlineto
- -4 0 rlineto
- 4 -4 rlineto
- -4 0 rlineto
- 2 2 rlineto
-} bind def
-/M6 { %def
-% draw marker 6: bowtie
-% Stack: - M6 -
- 2 2 rlineto
- 0 -4 rlineto
- -4 4 rlineto
- 0 -4 rlineto
- 2 2 rlineto
-} bind def
-/M7 { %def
-% draw marker 7: small plus (goes with char marker)
-% Stack: - M7 -
- -1 0 rmoveto
- 2 0 rlineto
- -1 1 rmoveto
- 0 -2 rlineto
-} bind def
-/Marker { %def
-% Command from driver: draw marker
-% STACK: x y Marker -
- MAttr_Size 0 gt
- {
- gsave
- moveto
- MAttr_Size 4 div dup scale
- MAttr_Type load exec
- 4 MAttr_Size div dup scale
- MAttr_Width setlinewidth
- stroke
- grestore
- } if
-} def
-%%EndProcSet: Markers 1.0 0
-%%BeginProcSet: Lib 1.0 0
-/sg { %def
-% Command from driver: set the gray scale 0 - 100
-% STACK: greylevel sg
- 100 div dup setgray /glev exch def
-} bind def
-/Circle { %def
-% draw a circle
-% STACK: x y radius Circle -
- 0 360 arc
-} bind def
-/RndAper { %def
-% select a round aperture
-% STACK: - RndAper -
- 1 setlinejoin
- 1 setlinecap
-} bind def
-/SqrAper { %def
-% select a square aperture
-% STACK: - SqrAper -
- 0 setlinejoin
- 2 setlinecap
-} bind def
-/Line { %def
-% draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] Line -
- 3 1 roll
- moveto
- true
- exch
- % This pushes the x then the y then does lineto
- { exch { false } { lineto true } ifelse } forall
- pop
-} bind def
-/Clipto { %def
-% set clipping rectangle from 0,0 to new values
-% STACK: x y Clipto -
- 0 0 moveto
- dup 0 exch lineto
- 2 copy lineto
- pop
- 0 lineto
- closepath
- clip
- newpath
-} bind def
-/Clip4 { %def
-% set clipping rectangle from xmin,ymin to xmax,ymax
-% STACK: xmin ymin xmax ymax Clip4 -
- 4 copy pop pop moveto
- 4 copy pop exch lineto pop
- 2 copy lineto
- exch pop exch pop lineto
- closepath
- clip
- newpath
-} bind def
-%%EndProcSet: Lib 1.0 0
-%%BeginProcSet: Lines 1.0 0
-% line attributes %
-/LAttr_Width 1 def
-% line procedures
-/PLine { %def
-% Cammand from driver: draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- LAttr_Width setlinewidth
- stroke
-} bind def % PLine
-/Char { %def
-% Command from driver: draw a character at the current position
-% STACK: type x y stroke_array Char -
-% stroke array -- [ stroke1 stroke2 ... stroken ]
-% stroke -- connected staight lines
-% type = 0 if text 1 if marker
- gsave
- 4 1 roll
- translate
- 0 eq { TAttr_Width } { MAttr_Width } ifelse setlinewidth
- {
- dup length 2 gt
- {
- dup dup 0 get exch 1 get % get starting point
- 3 -1 roll % put x y before array
- dup length 2 sub 2 exch getinterval % delete first items from array
- Line
- stroke
- }
- {
- aload pop currentlinewidth 2 div Circle fill
- } ifelse
- } forall
- grestore
-} bind def % Char
-/PArc { %def
-% Command from driver: draw an arc
-% STACK: x y radius startangle deltaangle Arc -
- 10 div exch 10 div exch
- 2 copy pop add
- arc
- LAttr_Width setlinewidth
- stroke
-} bind def
-/PCircle { %def
-% Command from driver: draw an circle
-% STACK: x y radius PCircle -
- Circle
- LAttr_Width setlinewidth
- stroke
-} bind def
-%%EndProcSet: Lines 1.0 0
-%%BeginProcSet: Polygon 1.0 0
-% polygon attributes %
-/PAttr_ExtWidth 1 def
-/PAttr_IntWidth 1 def
-/PAttr_Grid 1 def
-% polygon procedures
-/LoopSet { %def
-% set up for loop condition
-% STACK: start end LoopSet low gridwidth high
- 2 copy lt { exch } if
- % make grid line up to absolute coordinates
- PAttr_Grid div truncate PAttr_Grid mul exch
- PAttr_Grid exch
-} bind def
-/Hatch { %def
-% draw cross hatch pattern in current path
-% STACK: - Hatch -
- pathbbox
- /ury exch def
- /urx exch def
- /lly exch def
- /llx exch def
- clip
- newpath
- llx urx LoopSet
- { % x loop
- dup lly exch ury moveto lineto
- } for
- lly ury LoopSet
- { % y loop
- llx exch dup urx exch moveto lineto
- } for
- PAttr_IntWidth setlinewidth
- stroke
-} bind def
-/PPoly { %def
-% Command from driver: draw a plygon
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- closepath
- gsave
- PAttr_IntWidth PAttr_Grid ge {fill} {Hatch} ifelse
- grestore
- PAttr_ExtWidth setlinewidth
- stroke
-} bind def
-%%EndProcSet: Polygon 1.0 0
-%%BeginProcSet: Text 1.0 0
-% text attributes %
-/TAttr_Mirr 0 def
-/TAttr_Orient 0 def
-/TAttr_Width 1 def
-% text procedures
-/Text { %def
-% Command from driver: Draw text
-% STACK: x y width string Text -
- gsave
- 4 2 roll
- translate
- TAttr_Mirr 0 gt
- {
- -1 1 scale
- } if
- TAttr_Orient rotate
- 0 0 moveto
- dup length dup 1 gt
- {
- exch dup stringwidth pop
- 4 -1 roll
- exch 2 copy
- lt
- {
- div 1 scale show
- }
- {
- sub
- 3 -1 roll 1 sub div
- 0 3 -1 roll ashow
- }
- ifelse
- }
- {
- pop
- show
- } ifelse
- grestore
-} bind def
-%%EndProcSet: Text 1.0 0
-%%BeginProcSet: FlashSymbols 1.0 0
-% flash symbol attributes %
-/FAttr_Type /PRndPad def
-/FAttr_Width 0 def
-/FAttr_Length 1 def
-/FAttr_Orient 0 def
-% flash symbol procedures
-/PRndPad { %def
-% Command from driver: draw an circular pad
-% STACK: - PCirclePad -
- FAttr_Width dup scale
- 0 0 .5 Circle
- fill
-} bind def
-/PSqrPad { %def
-% Draw an Square pad
-% STACK: - PRectPad -
- FAttr_Width dup scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/PRectPad { %def
-% Draw an rectangular pad
-% STACK: - PRectPad -
- FAttr_Length FAttr_Width scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/POvalPad { %def
-% Draw an oval pad
-% STACK: - POvalPad -
- FAttr_Width setlinewidth
- FAttr_Length FAttr_Width sub 2 div dup
- neg 0 moveto
- 0 lineto
- RndAper
- stroke
-} bind def
-/Anl { %def
- 0 0 .5 Circle
- fill
- FAttr_Length FAttr_Width lt
- { % inner circle
- 0 0
- FAttr_Length 0 gt { FAttr_Length FAttr_Width div } { .5 } ifelse
- 2 div Circle
- 1 setgray
- fill
- glev setgray
- } if
-} bind def
-/PAnlPad { %def
-% Draw an annular pad
-% STACK: - PAnlPad -
- FAttr_Width dup scale
- Anl
-} bind def
-/PRelPad { %def
-% Draw an thermal relief pad
-% STACK: - PRelPad -
- PAnlPad
- 1 setgray
- .17 setlinewidth
- 0 setlinecap % the x
- 45 rotate
- .5 0 moveto -.5 0 lineto
- 0 .5 moveto 0 -.5 lineto
- stroke
- glev setgray
-} bind def
-/Flash { %def
-% Command from driver: Flash a symbol
-% STACK: x y Flash -
- FAttr_Width 0 gt
- {
- gsave
- translate
- FAttr_Orient rotate
- FAttr_Type load exec
- grestore
- } if
-} def
-%%EndProcSet: FlashSymbols 1.0 0
-%%BeginProcSet: SetAttr 1.0 0
-/SetLine { %def
-% Set the width of the lines
-% STACK: linewidth SetLine -
- /LAttr_Width exch def
- RndAper
-} bind def
-/SetPoly { %def
-% Set attribute of polygon
-% STACK: external_width internal_grid_width grid_spacing SetPoly -
- /PAttr_Grid exch def
- /PAttr_IntWidth exch def
- /PAttr_ExtWidth exch def
- RndAper
-} bind def
-/SetFlash { %def
-% Set Attributed of flash pad
-% STACK: orientation_angle length width aperture_type SetFlash -
- /FAttr_Type exch def
- FAttr_Type /PSqrPad eq FAttr_Type /PRectPad eq or
- { SqrAper } { RndAper } ifelse
- /FAttr_Width exch def
- /FAttr_Length exch def
- /FAttr_Orient exch 10 div def
-} bind def
-/SetMkr { %def
-% Set attributes of markers
-% STACK: linewidth size type SetMkr -
- /MAttr_Type exch def
- /MAttr_Size exch def
- /MAttr_Width exch def
- RndAper
-} bind def
-/SetText1 { %def
-% Set attributes of text
-% STACK: fontname height orient mirror SetMkr -
- /TAttr_Mirr exch def
- /TAttr_Orient exch 10 div def
- exch findfont exch scalefont setfont
- RndAper
-} bind def
-/SetText2 { %def
-% Set attributes of text
-% STACK: linewidth height mirror orient SetMkr -
- /TAttr_Width exch def
- RndAper
-} bind def
-%%EndProcSet: SetAttr 1.0 0
-%%BeginProcSet: Initialize 1.0 0
-/Init { %def
-% Initialize the driver
-% STACK: Init -
- 72 1000 div dup scale % Scale to 1/1000 inch
- 250 250 translate % make origin 1/4 inch from bottom left
- 1.5 setmiterlimit 1 RndAper % set line defaults
- 0 setgray % set color default
- /glev 0 def
-} def
-%%EndProcSet: Initialize 1.0 0
-%%EndProlog
-/Helvetica findfont 12 scalefont setfont
-35 760 moveto
-(gadget.job - Fri Aug 21 03:35:28 1992) show
-gsave
-Init
-8000 10500 Clipto
-4002 3763 translate
-0 rotate
-1 1 div dup scale
-75 sg
-50 sg
-25 sg
-0 sg
-10 SetLine
--1350 0 [ -1350 4900 ] PLine
--1350 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 0 ] PLine
-1350 0 [ -1350 0 ] PLine
-10 SetLine
--1350 4700 [ -1350 4900 ] PLine
--1350 4900 [ -1150 4900 ] PLine
-10 SetLine
-1150 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 4700 ] PLine
-10 SetLine
-1150 0 [ 1350 0 ] PLine
-1350 0 [ 1350 200 ] PLine
-10 SetLine
--1350 200 [ -1350 0 ] PLine
--1350 0 [ -1150 0 ] PLine
-10 80 /M4 SetMkr
--1100 1450 Marker
--1100 1150 Marker
-300 3300 Marker
--100 3300 Marker
--100 3100 Marker
-300 3100 Marker
-300 3500 Marker
--100 3500 Marker
--400 3700 Marker
--1200 3700 Marker
--100 1300 Marker
--900 1300 Marker
--200 2800 Marker
-600 2800 Marker
--1200 2800 Marker
--400 2800 Marker
-0 2500 Marker
-0 2100 Marker
--1200 3400 Marker
--1200 3000 Marker
--900 2300 Marker
--1200 2300 Marker
--1200 2500 Marker
--900 2500 Marker
-800 2800 Marker
-1100 2800 Marker
-1250 1900 Marker
-450 1900 Marker
--100 900 Marker
--1200 900 Marker
--700 4000 Marker
--1100 4000 Marker
-1100 3000 Marker
-700 3000 Marker
--300 3700 Marker
-0 3700 Marker
-10 80 /M7 SetMkr
-100 900 Marker
-1 113 913 [ [ 25 52 0 0 ] [ 0 52 25 52 ] [ 0 0 25 0 ] ] Char
-600 900 Marker
-1 613 913 [ [ 25 52 0 0 ] [ 0 52 25 52 ] [ 0 0 25 0 ] ] Char
-700 3700 Marker
-1 713 3713 [ [ 25 52 0 0 ] [ 0 52 25 52 ] [ 0 0 25 0 ] ] Char
-200 3700 Marker
-1 213 3713 [ [ 25 52 0 0 ] [ 0 52 25 52 ] [ 0 0 25 0 ] ] Char
-10 80 /M4 SetMkr
--750 550 Marker
--750 450 Marker
-0 550 Marker
-0 450 Marker
-750 550 Marker
-750 450 Marker
--648 4479 Marker
--540 4479 Marker
--432 4479 Marker
--324 4479 Marker
--216 4479 Marker
--108 4479 Marker
-0 4479 Marker
-108 4479 Marker
-216 4479 Marker
-324 4479 Marker
-432 4479 Marker
-540 4479 Marker
-648 4479 Marker
--594 4593 Marker
--486 4593 Marker
--378 4593 Marker
--270 4593 Marker
--162 4593 Marker
--54 4593 Marker
-54 4593 Marker
-162 4593 Marker
-270 4593 Marker
-378 4593 Marker
-486 4593 Marker
-594 4593 Marker
-10 80 /M7 SetMkr
-940 4536 Marker
-1 953 4549 [ [ 0 52 14 27 14 0 ] [ 29 52 14 27 ] ] Char
--940 4536 Marker
-1 -927 4549 [ [ 0 52 14 27 14 0 ] [ 29 52 14 27 ] ] Char
-10 80 /M4 SetMkr
-950 150 Marker
-1050 150 Marker
--50 150 Marker
-50 150 Marker
--1050 150 Marker
--950 150 Marker
-10 80 /M7 SetMkr
-950 3524 Marker
-1 963 3537 [ [ 0 52 25 0 ] [ 25 52 0 0 ] ] Char
-1026 3612 Marker
-1 1039 3625 [ [ 0 52 25 0 ] [ 25 52 0 0 ] ] Char
-950 3700 Marker
-1 963 3713 [ [ 0 52 25 0 ] [ 25 52 0 0 ] ] Char
-10 80 /M7 SetMkr
--1200 1600 Marker
-1 -1187 1613 [ [ 0 52 9 0 ] [ 18 52 9 0 ] [ 18 52 27 0 ] [ 36 52 27 0 ] ] Char
--1100 1700 Marker
-1 -1087 1713 [ [ 0 52 9 0 ] [ 18 52 9 0 ] [ 18 52 27 0 ] [ 36 52 27 0 ] ] Char
--1200 1800 Marker
-1 -1187 1813 [ [ 0 52 9 0 ] [ 18 52 9 0 ] [ 18 52 27 0 ] [ 36 52 27 0 ] ] Char
-10 80 /M4 SetMkr
-300 1700 Marker
--100 1700 Marker
-200 1300 Marker
-600 1300 Marker
--700 2300 Marker
--300 2300 Marker
--700 4200 Marker
--1100 4200 Marker
-1100 3200 Marker
-700 3200 Marker
--700 2500 Marker
--300 2500 Marker
--700 2100 Marker
--300 2100 Marker
--800 2100 Marker
--1200 2100 Marker
-600 1100 Marker
-200 1100 Marker
-10 80 /M7 SetMkr
-1200 2450 Marker
-1 1213 2463 [ [ 0 52 9 0 ] [ 18 52 9 0 ] [ 18 52 27 0 ] [ 36 52 27 0 ] ] Char
-1100 2350 Marker
-1 1113 2363 [ [ 0 52 9 0 ] [ 18 52 9 0 ] [ 18 52 27 0 ] [ 36 52 27 0 ] ] Char
-1200 2250 Marker
-1 1213 2263 [ [ 0 52 9 0 ] [ 18 52 9 0 ] [ 18 52 27 0 ] [ 36 52 27 0 ] ] Char
-10 80 /M4 SetMkr
--100 1900 Marker
-300 1900 Marker
-0 1500 Marker
-400 1500 Marker
--900 1600 Marker
--800 1600 Marker
--700 1600 Marker
--600 1600 Marker
--500 1600 Marker
--400 1600 Marker
--300 1600 Marker
--300 1900 Marker
--400 1900 Marker
--500 1900 Marker
--600 1900 Marker
--700 1900 Marker
--800 1900 Marker
--900 1900 Marker
-200 2200 Marker
-300 2200 Marker
-400 2200 Marker
-500 2200 Marker
-600 2200 Marker
-700 2200 Marker
-800 2200 Marker
-900 2200 Marker
-900 2500 Marker
-800 2500 Marker
-700 2500 Marker
-600 2500 Marker
-500 2500 Marker
-400 2500 Marker
-300 2500 Marker
-200 2500 Marker
-200 3900 Marker
-300 3900 Marker
-400 3900 Marker
-500 3900 Marker
-600 3900 Marker
-700 3900 Marker
-800 3900 Marker
-900 3900 Marker
-1000 3900 Marker
-1100 3900 Marker
-1100 4200 Marker
-1000 4200 Marker
-900 4200 Marker
-800 4200 Marker
-700 4200 Marker
-600 4200 Marker
-500 4200 Marker
-400 4200 Marker
-300 4200 Marker
-200 4200 Marker
--1000 3100 Marker
--900 3100 Marker
--800 3100 Marker
--700 3100 Marker
--600 3100 Marker
--500 3100 Marker
--400 3100 Marker
--300 3100 Marker
--300 3400 Marker
--400 3400 Marker
--500 3400 Marker
--600 3400 Marker
--700 3400 Marker
--800 3400 Marker
--900 3400 Marker
--1000 3400 Marker
-900 800 Marker
-1100 800 Marker
-1000 800 Marker
-10 80 /M7 SetMkr
-1000 1550 Marker
-1 1013 1563 [ [ 0 52 14 27 14 0 ] [ 29 52 14 27 ] ] Char
-10 80 /M4 SetMkr
-0 4000 Marker
-0 4200 Marker
-10 80 /M7 SetMkr
--1100 450 Marker
-1 -1087 463 [ [ 0 52 14 27 14 0 ] [ 29 52 14 27 ] ] Char
-1100 450 Marker
-1 1113 463 [ [ 0 52 14 27 14 0 ] [ 29 52 14 27 ] ] Char
-10 80 /M4 SetMkr
-1100 3400 Marker
-700 3400 Marker
-10 80 /M4 SetMkr
--200 2350 Marker
--200 1750 Marker
-200 1400 Marker
-10 80 /M4 SetMkr
-300 1100 Marker
-10 80 /M4 SetMkr
-175 3300 Marker
-10 80 /M4 SetMkr
-1000 2650 Marker
-10 80 /M4 SetMkr
--450 2100 Marker
-10 80 /M4 SetMkr
--650 2600 Marker
--100 2600 Marker
--100 2250 Marker
-10 80 /M4 SetMkr
-800 1800 Marker
-10 80 /M4 SetMkr
-700 1900 Marker
-10 80 /M4 SetMkr
-600 1700 Marker
-10 80 /M4 SetMkr
-500 1600 Marker
-10 80 /M4 SetMkr
-0 4100 Marker
-900 4100 Marker
-10 80 /M4 SetMkr
-800 3000 Marker
-10 80 /M4 SetMkr
-600 3700 Marker
-10 80 /M4 SetMkr
-450 2700 Marker
--400 2700 Marker
--400 2300 Marker
-10 80 /M4 SetMkr
-350 3800 Marker
-10 80 /M4 SetMkr
--850 3700 Marker
-10 80 /M4 SetMkr
-400 1300 Marker
-10 80 /M4 SetMkr
--1050 1050 Marker
-10 80 /M4 SetMkr
-0 4475 Marker
-75 4000 Marker
-1000 4000 Marker
-10 80 /M4 SetMkr
-950 3200 Marker
-10 80 /M4 SetMkr
-850 1200 Marker
--600 1200 Marker
-10 80 /M4 SetMkr
--550 3900 Marker
--350 3900 Marker
-10 80 /M4 SetMkr
--800 4300 Marker
-10 80 /M4 SetMkr
--750 4350 Marker
-10 80 /M4 SetMkr
-400 3400 Marker
-10 SetLine
--1355 -485 [ -275 -485 ] PLine
--1355 -725 [ -275 -725 ] PLine
--1355 -965 [ -275 -965 ] PLine
--1355 -1205 [ -275 -1205 ] PLine
--1355 -1445 [ -275 -1445 ] PLine
--1355 -1685 [ -275 -1685 ] PLine
--1355 -1925 [ -275 -1925 ] PLine
--1355 -485 [ -1355 -1925 ] PLine
--995 -485 [ -995 -1925 ] PLine
--635 -485 [ -635 -1925 ] PLine
--275 -485 [ -275 -1925 ] PLine
-10 SetText2
-0 -1295 -665 [ [ 38 67 32 75 24 78 13 78 5 75 0 67 0 60 2 52 5 48 10 45 27 37 32 33 35 30 38 22 38 11 32 3 24 0 13 0 5 3 0 11 ] ] Char
-0 -1233 -665 [ [ 0 78 0 0 ] ] Char
-0 -1209 -665 [ [ 38 78 0 0 ] [ 0 78 38 78 ] [ 0 0 38 0 ] ] Char
-0 -1147 -665 [ [ 0 78 0 0 ] [ 0 78 35 78 ] [ 0 41 21 41 ] [ 0 0 35 0 ] ] Char
-10 SetText2
-0 -873 -665 [ [ 16 78 10 75 5 67 2 60 0 48 0 30 2 18 5 11 10 3 16 0 27 0 32 3 38 11 40 18 43 30 43 48 40 60 38 67 32 75 27 78 16 78 ] [ 24 15 40 -7 ] ] Char
-0 -805 -665 [ [ 19 78 19 0 ] [ 0 78 38 78 ] ] Char
-0 -743 -665 [ [ 0 78 21 41 21 0 ] [ 43 78 21 41 ] ] Char
-10 SetText2
-0 -575 -665 [ [ 38 67 32 75 24 78 13 78 5 75 0 67 0 60 2 52 5 48 10 45 27 37 32 33 35 30 38 22 38 11 32 3 24 0 13 0 5 3 0 11 ] ] Char
-0 -513 -665 [ [ 0 78 21 41 21 0 ] [ 43 78 21 41 ] ] Char
-0 -445 -665 [ [ 0 78 0 0 ] [ 0 78 21 0 ] [ 43 78 21 0 ] [ 43 78 43 0 ] ] Char
-10 SetText2
-0 -1233 -905 [ [ 5 78 35 78 19 48 27 48 32 45 35 41 38 30 38 22 35 11 30 3 21 0 13 0 5 3 2 7 0 15 ] ] Char
-0 -1171 -905 [ [ 38 78 10 0 ] [ 0 78 38 78 ] ] Char
-10 SetText2
-0 -873 -905 [ [ 2 60 2 63 5 71 8 75 13 78 24 78 30 75 32 71 35 63 35 56 32 48 27 37 0 0 38 0 ] ] Char
-0 -811 -905 [ [ 16 78 8 75 2 63 0 45 0 33 2 15 8 3 16 0 21 0 30 3 35 15 38 33 38 45 35 63 30 75 21 78 16 78 ] ] Char
-0 -749 -905 [ [ 27 78 0 26 40 26 ] [ 27 78 27 0 ] ] Char
-10 120 /M4 SetMkr
--455 -845 Marker
-10 SetText2
-0 -1233 -1145 [ [ 27 78 0 26 40 26 ] [ 27 78 27 0 ] ] Char
-0 -1168 -1145 [ [ 0 63 5 67 13 78 13 0 ] ] Char
-10 SetText2
-0 -749 -1145 [ [ 32 67 30 75 21 78 16 78 8 75 2 63 0 45 0 26 2 11 8 3 16 0 19 0 27 3 32 11 35 22 35 26 32 37 27 45 19 48 16 48 8 45 2 37 0 26 ] ] Char
-10 SetText2
-0 -515 -1145 [ [ 0 78 13 0 ] [ 27 78 13 0 ] [ 27 78 40 0 ] [ 54 78 40 0 ] ] Char
-10 SetText2
-0 -1233 -1385 [ [ 5 78 35 78 19 48 27 48 32 45 35 41 38 30 38 22 35 11 30 3 21 0 13 0 5 3 2 7 0 15 ] ] Char
-0 -1171 -1385 [ [ 2 60 2 63 5 71 8 75 13 78 24 78 30 75 32 71 35 63 35 56 32 48 27 37 0 0 38 0 ] ] Char
-10 SetText2
-0 -749 -1385 [ [ 5 78 35 78 19 48 27 48 32 45 35 41 38 30 38 22 35 11 30 3 21 0 13 0 5 3 2 7 0 15 ] ] Char
-10 SetText2
-0 -515 -1385 [ [ 0 78 38 0 ] [ 38 78 0 0 ] ] Char
-10 SetText2
-0 -1295 -1625 [ [ 0 63 5 67 13 78 13 0 ] ] Char
-0 -1257 -1625 [ [ 2 60 2 63 5 71 8 75 13 78 24 78 30 75 32 71 35 63 35 56 32 48 27 37 0 0 38 0 ] ] Char
-0 -1195 -1625 [ [ 16 78 8 75 2 63 0 45 0 33 2 15 8 3 16 0 21 0 30 3 35 15 38 33 38 45 35 63 30 75 21 78 16 78 ] ] Char
-10 SetText2
-0 -749 -1625 [ [ 35 78 8 78 5 45 8 48 16 52 24 52 32 48 38 41 40 30 38 22 35 11 30 3 21 0 13 0 5 3 2 7 0 15 ] ] Char
-10 SetText2
-0 -515 -1625 [ [ 0 78 21 41 21 0 ] [ 43 78 21 41 ] ] Char
-10 SetText2
-0 -1233 -1865 [ [ 5 78 35 78 19 48 27 48 32 45 35 41 38 30 38 22 35 11 30 3 21 0 13 0 5 3 2 7 0 15 ] ] Char
-0 -1171 -1865 [ [ 35 78 8 78 5 45 8 48 16 52 24 52 32 48 38 41 40 30 38 22 35 11 30 3 21 0 13 0 5 3 2 7 0 15 ] ] Char
-10 SetText2
-0 -749 -1865 [ [ 27 78 0 26 40 26 ] [ 27 78 27 0 ] ] Char
-10 SetText2
-0 -515 -1865 [ [ 38 78 0 0 ] [ 0 78 38 78 ] [ 0 0 38 0 ] ] Char
-grestore
-showpage
diff --git a/usr.sbin/xntpd/gadget/gadget.lst b/usr.sbin/xntpd/gadget/gadget.lst
deleted file mode 100644
index a10aff3054a8..000000000000
--- a/usr.sbin/xntpd/gadget/gadget.lst
+++ /dev/null
@@ -1,332 +0,0 @@
-
-
-
----------------------------------------------------------------------------
- DESIGN RULE CHECK Tue Sep 15 01:23:56 1992 PAGE 1
- 1-PPS/RS232 CONVERTER 100-0001-001 REV 1A 26 JUNE 1992
----------------------------------------------------------------------------
-
-
-
-FLOATING INPUTS:
- NONE FOUND
-
-NETS WITH NO DRIVING SOURCE:
- NONE FOUND
-
-NETS WITH MULTIPLE DRIVING SOURCES:
- NONE FOUND
-
-NETS WITH MORE THAN ONE LABEL:
- NONE FOUND
-
-NETS WITH A SINGLE PIN:
- NONE FOUND
-
-REFERENCE DESIGNATORS USED TWO OR MORE TIMES:
- NONE FOUND
-
-
-
----------------------------------------------------------------------------
- REPORT REF. DES. Tue Sep 15 01:23:56 1992 PAGE 1
- 1-PPS/RS232 CONVERTER 100-0001-001 REV 1A 26 JUNE 1992
----------------------------------------------------------------------------
-
-
-C1 DCAP A/01
-C10 DCAP A/01
-C11 DCAP A/01
-C12 DCAPE A/01
-C13 DCAP A/01
-C14 DCAP A/01
-C15 DCAP A/01
-C16 DCAPE A/01
-C17 DCAPE A/01
-C18 DCAPE A/01
-C2 DCAP A/01
-C3 DCAPE A/01
-C4 DCAP A/01
-C5 DCAP A/01
-C6 DCAP A/01
-C7 DCAP A/01
-C8 DCAP A/01
-C9 DCAPE A/01
-D1 DDIODE A/01
-D2 DDIODE A/01
-J1 DB25 A/01
-J2 DBNC A/01
-J3 DBNC A/01
-J4 DBNC A/01
-LED1 DLED A/01
-LED2 DLED A/01
-LED3 DLED A/01
-Q1 DPNP A/01
-R1 DRES A/01
-R10 DRES A/01
-R11 DRES A/01
-R12 DRES A/01
-R13 DRES A/01
-R14 DRES A/01
-R2 DRES A/01
-R3 DRES A/01
-R4 DRES A/01
-R5 DRES A/01
-R6 DRES A/01
-R7 DPOT A/01
-R8 DPOT A/01
-R9 DRES A/01
-U1 ICL232 A/01
-U2 MC145443 A/01
-U3A 74LS123 A/01
-U3B 74LS123 B/01
-U4A LM324 A/01
-U4B LM324 B/01
-
-
-
----------------------------------------------------------------------------
- REPORT REF. DES. Tue Sep 15 01:23:57 1992 PAGE 2
- 1-PPS/RS232 CONVERTER 100-0001-001 REV 1A 26 JUNE 1992
----------------------------------------------------------------------------
-
-
-U5 LM7805 A/01
-X1 DXTAL A/01
-
-
-
----------------------------------------------------------------------------
- REPORT LABEL Tue Sep 15 01:23:57 1992 PAGE 1
- 1-PPS/RS232 CONVERTER 100-0001-001 REV 1A 26 JUNE 1992
----------------------------------------------------------------------------
-
-
-+12 01
-+5 01
-AGND 01
-CGND 01
-GND 01
-VCC 01
-
-
-
----------------------------------------------------------------------------
- WIRE LIST Tue Sep 15 01:23:57 1992 PAGE 1
- 1-PPS/RS232 CONVERTER 100-0001-001 REV 1A 26 JUNE 1992
----------------------------------------------------------------------------
-
-
-1 +12 C18-T D1-C D2-C
- U5-1
-
-2 +5 C1-T C13-T C2-T
- C3-B C7-T R11-T
- R12-L R2-T R7-1
- R7-2 R9-L U1-16
- U2-13 U2-14 U2-6
- U3A-16 U3B-16 U5-3
-
-3 01007018 J2-1 R8-1
-
-4 01007039 J3-1 R13-T U3A-2
-
-5 01011019 C15-L R8-2
-
-6 01013019 C15-R R3-T U4A-3
-
-7 01013024 C5-T C6-B C7-B
- C8-B R3-B U2-18
- U2-19
-
-8 01015020 U4A-1 U4A-2 U4B-5
-
-9 01017033 C14-T R7-3 U3A-15
-
-10 01019043 R11-B U3A-3 U3B-11
-
-11 01020035 C14-B U3A-14
-
-12 01022016 C11-L R6-L U4B-6
-
-13 01022039 U3A-13 U3B-10
-
-14 01022040 U1-11 U3A-4
-
-15 01024023 C10-L C11-R R5-T
-
-16 01027016 C10-R R4-L R6-R
- U4B-7
-
-17 01029043 C17-T R9-R U3B-7
-
-18 01030057 D2-A J4-1
-
-19 01031045 C17-B U3B-6
-
-20 01033049 R10-L U3B-5
-
-21 01036049 LED3-A R10-R
-
-
-
-
----------------------------------------------------------------------------
- WIRE LIST Tue Sep 15 01:23:57 1992 PAGE 2
- 1-PPS/RS232 CONVERTER 100-0001-001 REV 1A 26 JUNE 1992
----------------------------------------------------------------------------
-
-
-22 01037023 U2-9 X1-L
-
-23 01038014 Q1-E R2-B
-
-24 01038017 LED1-A Q1-C
-
-25 01040015 Q1-B R14-L
-
-26 01041023 U2-8 X1-R
-
-27 01042022 C8-T U2-7
-
-28 01045015 C4-B U2-4
-
-29 01045018 R14-R U2-3
-
-30 01045020 U1-10 U2-5
-
-31 01046010 R1-L R4-R U2-16
-
-32 01046025 C6-T U2-10
-
-33 01047042 C9-T U1-1
-
-34 01047044 C9-B U1-3
-
-35 01048033 J1-2 U1-8
-
-36 01049034 J1-11 U1-13
-
-37 01051047 C3-T U1-2
-
-38 01052057 LED2-A R12-R
-
-39 01054021 R1-R U2-15
-
-40 01054025 U1-9 U2-11
-
-41 01054047 C16-T U1-6
-
-42 01055053 D1-A J1-20 J1-6
- J1-8
-
-43 01057040 J1-12 U1-14
-
-44 01057041 J1-3 U1-7
-
-45 01057042 C12-T U1-4
-
-46 01057044 C12-B U1-5
-
-
-
-
----------------------------------------------------------------------------
- WIRE LIST Tue Sep 15 01:23:57 1992 PAGE 3
- 1-PPS/RS232 CONVERTER 100-0001-001 REV 1A 26 JUNE 1992
----------------------------------------------------------------------------
-
-
-47 01068042 J1-4 J1-5
-
-48 AGND C4-T C5-B LED1-C
- R5-B R8-3 U2-2
- U4A-11 U4B-11
-
-49 CGND J2-2 J3-2 J4-2
-
-50 GND C1-B C13-B C16-B
- C18-B C2-B J1-1
- J1-7 LED2-C LED3-C
- R13-B U1-15 U2-12
- U3A-1 U3A-8 U3B-8
- U3B-9 U5-2
-
-51 VCC U4A-4 U4B-4
-
-
-
-
----------------------------------------------------------------------------------------------------------------
-BILL OF MATERIALS XYZ COMPUTER CORP. LORAN 150-0001-001 REV 1A Tue Sep 15 01:23:57 1992 PAGE 1
----------------------------------------------------------------------------------------------------------------
-
-
- ITEM QUAN. PART NUMBER DESCRIPTION REF. DES.
-
- 1 7 CAPACITOR,100N, C1,C13,C2,C5,C6
- C7,C8
-
- 2 1 CAPACITOR,100U C18
-
- 3 5 CAPACITOR,10N, C10,C11,C14,C15
- C4
-
- 4 5 CAPACITOR,22U C12,C16,C17,C3
- C9
-
- 5 1 CRYSTAL, 3.59MHZ X1
-
- 6 2 DIODE, 1N4002 D1,D2
-
- 7 1 LIGHT EMITTING DIODE, AMBER LED3
-
- 8 1 LIGHT EMITTING DIODE, GRN LED1
-
- 9 1 LIGHT EMITTING DIODE, RED LED2
-
- 10 1 PNP TRANSISTOR, 2N2907 Q1
-
- 11 1 POTENTIOMETER, 10K R8
-
- 12 1 POTENTIOMETER, 20K R7
-
- 13 2 RESISTOR,100K, R13,R3
-
- 14 1 RESISTOR,10K, R1
-
- 15 1 RESISTOR,1MEG, R4
-
- 16 2 RESISTOR,3.3K, R11,R14
-
- 17 3 RESISTOR,330, R10,R12,R2
-
- 18 1 RESISTOR,33K, R9
-
- 19 1 RESISTOR,680, R5
-
- 20 1 RESISTOR,68K, R6
-
- 21 3 010-0002-001 CONNECTOR, BNC CHASSIS J2,J3,J4
-
- 22 1 010-DB25-001 DB25 - 25-PIN CONNECTOR J1
-
- 23 2 300-0123-001 74LS123 - LS TTL RETRIG MONOSTABLE MULTIVIBRATORS U3A,U3B
-
-
-
----------------------------------------------------------------------------------------------------------------
-BILL OF MATERIALS XYZ COMPUTER CORP. LORAN 150-0001-001 REV 1A Tue Sep 15 01:23:57 1992 PAGE 2
----------------------------------------------------------------------------------------------------------------
-
-
- ITEM QUAN. PART NUMBER DESCRIPTION REF. DES.
-
- 24 2 302-0324-001 LM324A - LOW POWER QUAD OP-AMP U4A,U4B
-
- 25 1 302-7805-001 LM7805C - VOLTAGE REGULATOR, +5VDC U5
-
- 26 1 306-5443-001 MC145443 - 300-BPS MODEM U2
-
- 27 1 310-0232-001 ICL232 - POWERED RS232 TRANSMITTER/RECEIVER U1
-
diff --git a/usr.sbin/xntpd/gadget/gadget.s01 b/usr.sbin/xntpd/gadget/gadget.s01
deleted file mode 100644
index 314f7ba18a62..000000000000
--- a/usr.sbin/xntpd/gadget/gadget.s01
+++ /dev/null
@@ -1,2277 +0,0 @@
-%!PS-Adobe-23.0 EPSF-1.2
-%%Creator: SCHEMA
-%%BoundingBox: 0 0 1343.0 1023.0
-/scl 511804.0 0.072 mul 65536.0 div def
-scl scl scale
-
-% Landscape Orientation
-/xoff 256.0 65536.0 mul 511804.0 div def
-/yoff 1343.0 -256.0 65536.0 mul 511804.0 div sub def
-xoff yoff translate
--90 rotate
-
-0 setgray
-
-/a { 1 setlinewidth newpath arcn stroke } def
-/fa { 3 setlinewidth newpath arcn stroke } def
-/c { 1 setlinewidth newpath 0 360 arc stroke } def
-/fc { 1 setlinewidth newpath 0 360 arc fill } def
-/l { 1 setlinewidth newpath moveto lineto stroke } def
-/t { 3 setlinewidth newpath moveto lineto stroke } def
-/ds { [4 4] 0 setdash 1 setlinewidth
- newpath moveto lineto stroke [] 0 setdash } def
-/dt { [2 2] 0 setdash 1 setlinewidth
- newpath moveto lineto stroke [] 0 setdash } def
-
-8 7 8 1015 t
-1328 7 912 7 t
-1336 1015 8 1015 t
-1336 7 1336 1015 t
-912 7 8 7 t
-1336 7 1328 7 t
-
-/reencsmalldict 12 dict def %% Schema font definitions
-/ReEncodeSmall
- { reencsmalldict begin
- /newcodesandnames exch def
- /newfontname exch def
- /basefontname exch def
- /basefontdict basefontname findfont def
- /newfont basefontdict maxlength dict def
- basefontdict
- { exch dup /FID ne
- { dup /Encoding eq
- { exch dup length array copy newfont 3 1 roll put }
- { exch newfont 3 1 roll put }
- ifelse
- }
- { pop pop }
- ifelse
- } forall
- newfont /FontName newfontname put
- newcodesandnames aload pop
- newcodesandnames length 2 idiv
- { newfont /Encoding get 3 1 roll put }
- repeat
- newfontname newfont definefont pop
- end
- } def
-/schfontvec [ 8#200 /Ccedilla 8#201 /udieresis 8#202 /eacute 8#203 /acircumflex
-8#204 /adieresis 8#205 /agrave 8#207 /ccedilla 8#210 /ecircumflex
-8#211 /edieresis 8#212 /egrave 8#213 /idieresis 8#214 /icircumflex
-8#215 /igrave 8#216 /Adieresis 8#220 /Eacute 8#223 /ocircumflex
-8#224 /odieresis 8#225 /ograve 8#226 /ucircumflex 8#227 /ugrave
-8#230 /ydieresis 8#231 /Odieresis 8#232 /Udieresis 8#240 /aacute 8#241 /iacute
-8#242 /oacute 8#243 /uacute 8#244 /ntilde 8#245 /Ntilde ] def
-/schsymbvec [ 8#341 /beta 8#346 /mu 8#352 /Omega ] def
-/Courier-Bold /Schfont schfontvec ReEncodeSmall
-/Symbol /Schsymb schsymbvec ReEncodeSmall
-
-
-/htdict 4 dict def %% HTEXT - variable spacing horizontal text routine
-/ht
- { htdict begin
- /textstring exch def
- /xskip exch def
- 0 text_height neg rmoveto
- /Schfont findfont text_height scalefont setfont
- textstring
- {
- /charcode exch def
- /thechar ( ) dup 0 charcode put def
- gsave
- charcode 8#245 gt
- { /Schsymb findfont text_height scalefont setfont
- thechar show
- /Schfont findfont text_height scalefont setfont }
- { thechar show }
- ifelse
- grestore
- currentpoint moveto
- xskip 0 rmoveto
- } forall
- end
- } def
-
-/text_height 12 def
-/text_width 6 def
-1304 27 moveto 9 (2) ht
-/text_height 12 def
-/text_width 6 def
-1272 27 moveto 9 (OF) ht
-/text_height 12 def
-/text_width 6 def
-1248 27 moveto 9 (1) ht
-/text_height 12 def
-/text_width 6 def
-1192 27 moveto 9 (SHEET) ht
-1176 31 1176 7 l
-1336 55 992 55 l
-1336 31 992 31 l
-992 7 992 87 t
-1336 87 992 87 t
-/text_height 20 def
-/text_width 9 def
-1032 87 moveto 13 (1-PPS/RS232 Converter) ht
-/text_height 12 def
-/text_width 6 def
-1040 27 moveto 9 (26 June 1992) ht
-1176 55 1176 31 l
-/text_height 12 def
-/text_width 6 def
-1032 51 moveto 9 (100-0001-001) ht
-/text_height 12 def
-/text_width 6 def
-1216 51 moveto 9 (REV) ht
-/text_height 12 def
-/text_width 6 def
-1264 51 moveto 9 (1A) ht
-584 54 568 54 l
-576 54 576 63 l
-581 51 571 51 l
-578 48 574 48 l
-/b { newpath 0.5 0 360 arc fill } def
-576 45 b
-760 54 744 54 l
-752 54 752 63 l
-757 51 747 51 l
-754 48 750 48 l
-752 45 b
-752 103 752 95 l
-752 103 2 fc
-288 487 288 455 l
-320 487 288 487 l
-288 487 2 fc
-248 383 248 367 l
-456 103 8 c
-456 71 456 95 l
-/text_height 12 def
-/text_width 6 def
-441 129 moveto 9 (J4) ht
-456 105 b
-457 105 b
-455 104 b
-456 104 b
-457 104 b
-458 104 b
-455 103 b
-456 103 b
-457 103 b
-458 103 b
-456 102 b
-457 102 b
-480 103 456 103 l
-583 81 569 81 l
-576 59 18 111 69 a
-576 81 576 95 l
-576 63 576 77 l
-/text_height 12 def
-/text_width 6 def
-589 81 moveto 9 (100U) ht
-/text_height 12 def
-/text_width 6 def
-590 94 moveto 9 (C18) ht
-/text_height 12 def
-/text_width 6 def
-561 96 moveto 9 (+) ht
-/text_height 12 def
-/text_width 6 def
-765 94 moveto 9 (C1) ht
-/text_height 12 def
-/text_width 6 def
-765 81 moveto 9 (100N) ht
-759 81 745 81 l
-752 59 18 111 69 a
-752 81 752 95 l
-752 63 752 77 l
-509 109 b
-509 108 b
-510 108 b
-515 108 b
-509 107 b
-510 107 b
-511 107 b
-515 107 b
-509 106 b
-510 106 b
-511 106 b
-512 106 b
-515 106 b
-509 105 b
-510 105 b
-511 105 b
-512 105 b
-513 105 b
-515 105 b
-509 104 b
-510 104 b
-511 104 b
-512 104 b
-513 104 b
-514 104 b
-515 104 b
-509 103 b
-510 103 b
-511 103 b
-512 103 b
-513 103 b
-514 103 b
-515 103 b
-509 102 b
-510 102 b
-511 102 b
-512 102 b
-513 102 b
-514 102 b
-515 102 b
-509 101 b
-510 101 b
-511 101 b
-512 101 b
-513 101 b
-515 101 b
-509 100 b
-510 100 b
-511 100 b
-512 100 b
-515 100 b
-509 99 b
-510 99 b
-511 99 b
-515 99 b
-509 98 b
-510 98 b
-515 98 b
-509 97 b
-516 103 b
-510 103 496 103 l
-528 103 517 103 l
-/text_height 12 def
-/text_width 6 def
-496 99 moveto 9 (1N4002) ht
-/text_height 12 def
-/text_width 6 def
-497 124 moveto 9 (D2) ht
-576 103 576 95 l
-560 103 528 103 l
-560 103 2 fc
-592 103 576 103 l
-576 103 560 103 l
-576 103 2 fc
-496 103 480 103 l
-240 695 240 671 l
-328 671 240 671 l
-328 703 328 671 l
-240 711 208 711 l
-208 711 208 687 l
-384 703 328 703 l
-136 735 112 735 l
-392 767 352 767 l
-384 687 352 687 l
-408 647 408 631 l
-208 676 208 687 l
-/text_height 12 def
-/text_width 6 def
-218 677 moveto 9 (R3) ht
-/text_height 12 def
-/text_width 6 def
-218 664 moveto 9 (100K) ht
-213 673 208 675 l
-213 657 204 653 l
-213 657 204 661 l
-213 665 204 669 l
-213 665 204 661 l
-208 649 208 651 l
-208 652 204 653 l
-208 639 208 650 l
-213 673 204 669 l
-208 675 208 677 l
-208 650 208 652 l
-208 711 2 fc
-328 703 2 fc
-352 687 352 647 l
-352 767 352 687 l
-352 687 2 fc
-432 647 408 647 l
-408 647 384 647 l
-408 647 2 fc
-904 751 872 751 l
-904 735 872 735 l
-968 687 872 687 l
-968 703 968 687 l
-/text_height 12 def
-/text_width 6 def
-616 695 moveto 9 (X1) ht
-/text_height 12 def
-/text_width 6 def
-616 683 moveto 9 (3.59MHZ) ht
-628 645 628 665 l
-637 645 637 665 l
-634 667 631 667 l
-634 643 634 667 l
-634 643 631 643 l
-631 643 631 667 l
-628 655 600 655 l
-664 655 637 655 l
-920 607 904 607 l
-920 655 920 647 l
-744 575 744 559 l
-752 623 744 623 l
-744 623 744 607 l
-752 671 696 671 l
-752 655 664 655 l
-600 655 600 639 l
-752 639 600 639 l
-680 575 680 559 l
-680 671 680 607 l
-752 703 728 703 l
-712 815 712 751 l
-752 751 712 751 l
-728 783 728 719 l
-752 719 728 719 l
-696 671 680 671 l
-888 863 736 863 l
-688 863 480 863 l
-/text_height 12 def
-/text_width 6 def
-590 855 moveto 9 (+5) ht
-744 559 2 fc
-904 607 2 fc
-920 655 872 655 l
-920 655 2 fc
-920 703 888 703 l
-888 703 872 703 l
-888 703 2 fc
-728 815 712 815 l
-712 815 696 815 l
-712 815 2 fc
-888 863 888 703 l
-904 607 904 559 l
-904 735 904 607 l
-904 751 904 735 l
-904 735 2 fc
-248 399 128 399 l
-128 399 2 fc
-136 342 120 342 l
-128 342 128 351 l
-133 339 123 339 l
-130 336 126 336 l
-128 333 b
-256 358 240 358 l
-248 358 248 367 l
-253 355 243 355 l
-250 352 246 352 l
-248 349 b
-560 175 560 103 l
-464 327 464 295 l
-496 327 464 327 l
-880 94 864 94 l
-872 94 872 103 l
-877 91 867 91 l
-874 88 870 88 l
-872 85 b
-872 103 864 103 l
-424 223 424 207 l
-416 327 400 327 l
-400 327 400 303 l
-400 255 400 167 l
-480 167 400 167 l
-432 198 416 198 l
-424 198 424 207 l
-429 195 419 195 l
-426 192 422 192 l
-424 189 b
-464 327 2 fc
-480 767 440 767 l
-480 767 480 695 l
-480 863 480 767 l
-480 767 2 fc
-480 695 480 647 l
-480 647 464 647 l
-480 695 2 fc
-88 735 8 c
-88 703 88 727 l
-/text_height 12 def
-/text_width 6 def
-73 761 moveto 9 (J2) ht
-88 737 b
-89 737 b
-87 736 b
-88 736 b
-89 736 b
-90 736 b
-87 735 b
-88 735 b
-89 735 b
-90 735 b
-88 734 b
-89 734 b
-112 735 88 735 l
-/text_height 12 def
-/text_width 6 def
-333 486 moveto 9 (C14) ht
-/text_height 12 def
-/text_width 6 def
-333 473 moveto 9 (10N) ht
-327 473 313 473 l
-320 451 18 111 69 a
-320 473 320 487 l
-320 455 320 469 l
-698 863 688 863 l
-736 863 726 863 l
-/text_height 12 def
-/text_width 6 def
-691 883 moveto 9 (1MEG) ht
-/text_height 12 def
-/text_width 6 def
-691 895 moveto 9 (R4) ht
-702 868 700 863 l
-706 859 702 868 l
-710 868 706 859 l
-714 859 710 868 l
-718 868 714 859 l
-722 859 718 868 l
-724 863 722 859 l
-726 863 724 863 l
-700 863 699 863 l
-930 703 920 703 l
-968 703 958 703 l
-/text_height 12 def
-/text_width 6 def
-923 723 moveto 9 (10K) ht
-/text_height 12 def
-/text_width 6 def
-923 735 moveto 9 (R1) ht
-934 708 932 703 l
-938 699 934 708 l
-942 708 938 699 l
-946 699 942 708 l
-950 708 946 699 l
-954 699 950 708 l
-956 703 954 699 l
-958 703 956 703 l
-932 703 931 703 l
-784 103 768 103 l
-768 103 752 103 l
-288 487 272 487 l
-480 695 472 695 l
-920 607 920 599 l
-920 615 920 607 l
-920 607 2 fc
-792 399 776 399 l
-792 383 360 383 l
-728 703 728 367 l
-792 367 728 367 l
-400 292 400 303 l
-/text_height 12 def
-/text_width 6 def
-410 293 moveto 9 (R11) ht
-/text_height 12 def
-/text_width 6 def
-410 280 moveto 9 (3.3K) ht
-405 289 400 291 l
-405 273 396 269 l
-405 273 396 277 l
-405 281 396 285 l
-405 281 396 277 l
-400 265 400 267 l
-400 268 396 269 l
-400 255 400 266 l
-405 289 396 285 l
-400 291 400 293 l
-400 266 400 268 l
-128 388 128 399 l
-/text_height 12 def
-/text_width 6 def
-138 389 moveto 9 (R13) ht
-/text_height 12 def
-/text_width 6 def
-138 376 moveto 9 (100K) ht
-133 385 128 387 l
-133 369 124 365 l
-133 369 124 373 l
-133 377 124 381 l
-133 377 124 373 l
-128 361 128 363 l
-128 364 124 365 l
-128 351 128 362 l
-133 385 124 381 l
-128 387 128 389 l
-128 362 128 364 l
-88 399 8 c
-88 367 88 391 l
-/text_height 12 def
-/text_width 6 def
-73 425 moveto 9 (J3) ht
-88 401 b
-89 401 b
-87 400 b
-88 400 b
-89 400 b
-90 400 b
-87 399 b
-88 399 b
-89 399 b
-90 399 b
-88 398 b
-89 398 b
-112 399 88 399 l
-128 399 112 399 l
-376 399 360 399 l
-376 399 376 239 l
-424 239 376 239 l
-608 836 608 847 l
-/text_height 12 def
-/text_width 6 def
-618 837 moveto 9 (R2) ht
-/text_height 12 def
-/text_width 6 def
-618 824 moveto 9 (330) ht
-613 833 608 835 l
-613 817 604 813 l
-613 817 604 821 l
-613 825 604 829 l
-613 825 604 821 l
-608 809 608 811 l
-608 812 604 813 l
-608 799 608 810 l
-613 833 604 829 l
-608 835 608 837 l
-608 810 608 812 l
-224 487 208 487 l
-400 327 360 327 l
-224 487 2 fc
-400 327 2 fc
-/text_height 12 def
-/text_width 6 def
-190 495 moveto 9 (+5) ht
-/text_height 12 def
-/text_width 6 def
-342 335 moveto 9 (+5) ht
-944 655 920 655 l
-680 559 208 559 l
-744 559 680 559 l
-208 639 208 559 l
-680 559 2 fc
-/text_height 12 def
-/text_width 6 def
-947 663 moveto 9 (+5) ht
-768 127 768 103 l
-768 103 2 fc
-
-/vtdict 4 dict def %% VTEXT - variable spacing verticle text routine
-/vt
- { vtdict begin
- /thestring exch def
- /yskip exch def
- 0 text_height neg rmoveto
- /Schfont findfont text_height scalefont setfont
- thestring
- {
- /charcode exch def
- /thechar ( ) dup 0 charcode put def
- gsave
- charcode 8#245 gt
- { /Schsymb findfont text_height scalefont setfont
- thechar show
- /Schfont findfont text_height scalefont setfont }
- { thechar show }
- ifelse
- grestore
- currentpoint moveto
- 0 yskip neg rmoveto
- } forall
- end
- } def
-
-/text_height 12 def
-/text_width 6 def
-765 153 moveto 11 (+5) vt
-234 487 224 487 l
-272 487 262 487 l
-238 492 b
-238 491 b
-237 490 b
-239 490 b
-237 489 b
-239 489 b
-236 488 b
-240 488 b
-235 487 b
-236 487 b
-240 487 b
-241 486 b
-241 485 b
-246 492 b
-246 491 b
-245 490 b
-247 490 b
-245 489 b
-247 489 b
-244 488 b
-248 488 b
-244 487 b
-248 487 b
-243 486 b
-243 485 b
-242 484 b
-242 483 b
-254 492 b
-254 491 b
-253 490 b
-255 490 b
-253 489 b
-255 489 b
-252 488 b
-252 487 b
-249 486 b
-251 486 b
-249 485 b
-251 485 b
-250 484 b
-250 483 b
-256 488 b
-256 487 b
-260 487 b
-261 487 b
-257 486 b
-259 486 b
-257 485 b
-259 485 b
-258 484 b
-258 483 b
-248 463 248 479 l
-248 481 b
-247 480 b
-248 480 b
-249 480 b
-246 479 b
-247 479 b
-248 479 b
-249 479 b
-250 479 b
-245 478 b
-246 478 b
-247 478 b
-248 478 b
-249 478 b
-250 478 b
-244 477 b
-245 477 b
-246 477 b
-247 477 b
-248 477 b
-249 477 b
-250 477 b
-251 478 b
-251 477 b
-252 477 b
-/text_height 12 def
-/text_width 6 def
-233 508 moveto 9 (R7) ht
-/text_height 12 def
-/text_width 6 def
-225 488 moveto 9 (1) ht
-/text_height 12 def
-/text_width 6 def
-238 478 moveto 9 (2) ht
-/text_height 12 def
-/text_width 6 def
-263 488 moveto 9 (3) ht
-/text_height 12 def
-/text_width 6 def
-257 475 moveto 9 (20K) ht
-752 103 736 103 l
-672 54 656 54 l
-664 54 664 63 l
-669 51 659 51 l
-666 48 662 48 l
-664 45 b
-/text_height 12 def
-/text_width 6 def
-272 811 moveto 9 (2000+-500 Hz) ht
-/text_height 12 def
-/text_width 6 def
-256 827 moveto 9 (bandpass filter) ht
-/text_height 12 def
-/text_width 6 def
-272 515 moveto 9 (\(for 38.4 baud\)) ht
-/text_height 12 def
-/text_width 6 def
-280 531 moveto 9 (26-us one-shot) ht
-/text_height 12 def
-/text_width 6 def
-448 363 moveto 9 (200-ms one shot) ht
-224 487 224 463 l
-248 463 224 463 l
-304 327 304 167 l
-400 167 304 167 l
-400 167 2 fc
-/text_height 12 def
-/text_width 6 def
-384 99 moveto 9 (\(6-12V\)) ht
-/text_height 12 def
-/text_width 6 def
-32 731 moveto 9 (\(BNC\)) ht
-/text_height 12 def
-/text_width 6 def
-32 747 moveto 9 (audio) ht
-/text_height 12 def
-/text_width 6 def
-40 411 moveto 9 (1pps) ht
-/text_height 12 def
-/text_width 6 def
-32 395 moveto 9 (\(BNC\)) ht
-/text_height 12 def
-/text_width 6 def
-400 115 moveto 9 (power) ht
-767 337 753 337 l
-760 315 18 111 69 a
-760 337 760 351 l
-760 319 760 333 l
-/text_height 12 def
-/text_width 6 def
-773 337 moveto 9 (22U) ht
-/text_height 12 def
-/text_width 6 def
-774 350 moveto 9 (C9) ht
-/text_height 12 def
-/text_width 6 def
-745 352 moveto 9 (+) ht
-935 337 921 337 l
-928 315 18 111 69 a
-928 337 928 351 l
-928 319 928 333 l
-/text_height 12 def
-/text_width 6 def
-941 337 moveto 9 (22U) ht
-/text_height 12 def
-/text_width 6 def
-942 350 moveto 9 (C12) ht
-/text_height 12 def
-/text_width 6 def
-913 352 moveto 9 (+) ht
-880 257 880 271 l
-880 239 880 253 l
-/text_height 12 def
-/text_width 6 def
-893 257 moveto 9 (22U) ht
-/text_height 12 def
-/text_width 6 def
-894 270 moveto 9 (C16) ht
-873 259 b
-874 259 b
-875 258 b
-876 258 b
-877 258 b
-878 257 b
-879 257 b
-873 254 b
-874 254 b
-875 254 b
-876 254 b
-877 254 b
-878 254 b
-879 254 b
-886 259 b
-883 258 b
-884 258 b
-885 258 b
-880 257 b
-881 257 b
-882 257 b
-880 254 b
-881 254 b
-882 254 b
-883 254 b
-884 254 b
-885 254 b
-886 254 b
-887 259 b
-887 254 b
-/text_height 12 def
-/text_width 6 def
-865 255 moveto 9 (+) ht
-831 257 817 257 l
-824 235 18 111 69 a
-824 257 824 271 l
-824 239 824 253 l
-/text_height 12 def
-/text_width 6 def
-837 257 moveto 9 (22U) ht
-/text_height 12 def
-/text_width 6 def
-838 270 moveto 9 (C3) ht
-/text_height 12 def
-/text_width 6 def
-809 272 moveto 9 (+) ht
-888 230 872 230 l
-880 230 880 239 l
-885 227 875 227 l
-882 224 878 224 l
-880 221 b
-792 351 760 351 l
-792 319 760 319 l
-928 351 912 351 l
-928 319 912 319 l
-832 271 824 271 l
-880 271 872 271 l
-/text_height 12 def
-/text_width 6 def
-821 240 moveto 11 (+5) vt
-/text_height 12 def
-/text_width 6 def
-624 307 moveto 9 (EIA level converter) ht
-936 399 912 399 l
-872 671 872 655 l
-872 655 2 fc
-/text_height 12 def
-/text_width 6 def
-752 835 moveto 9 (300-baud modem) ht
-88 359 88 367 l
-81 357 b
-80 356 b
-79 355 b
-78 354 b
-77 353 b
-76 352 b
-75 351 b
-82 358 b
-88 357 b
-87 356 b
-86 355 b
-85 354 b
-84 353 b
-83 352 b
-82 351 b
-89 358 b
-95 357 b
-94 356 b
-93 355 b
-92 354 b
-91 353 b
-90 352 b
-89 351 b
-96 358 b
-96 358 82 358 l
-88 695 88 703 l
-81 693 b
-80 692 b
-79 691 b
-78 690 b
-77 689 b
-76 688 b
-75 687 b
-82 694 b
-88 693 b
-87 692 b
-86 691 b
-85 690 b
-84 689 b
-83 688 b
-82 687 b
-89 694 b
-95 693 b
-94 692 b
-93 691 b
-92 690 b
-91 689 b
-90 688 b
-89 687 b
-96 694 b
-96 694 82 694 l
-456 63 456 71 l
-449 61 b
-448 60 b
-447 59 b
-446 58 b
-445 57 b
-444 56 b
-443 55 b
-450 62 b
-456 61 b
-455 60 b
-454 59 b
-453 58 b
-452 57 b
-451 56 b
-450 55 b
-457 62 b
-463 61 b
-462 60 b
-461 59 b
-460 58 b
-459 57 b
-458 56 b
-457 55 b
-464 62 b
-464 62 450 62 l
-696 807 696 815 l
-688 806 b
-689 806 b
-690 806 b
-691 806 b
-692 806 b
-693 806 b
-694 806 b
-689 805 b
-690 804 b
-691 803 b
-692 802 b
-693 801 b
-694 800 b
-696 807 b
-695 806 b
-696 806 b
-697 806 b
-698 806 b
-699 806 b
-700 806 b
-701 806 b
-701 803 b
-700 802 b
-699 801 b
-698 800 b
-695 799 b
-697 799 b
-696 798 b
-702 806 b
-703 806 b
-704 806 b
-703 805 b
-702 804 b
-920 559 920 567 l
-912 558 b
-913 558 b
-914 558 b
-915 558 b
-916 558 b
-917 558 b
-918 558 b
-913 557 b
-914 556 b
-915 555 b
-916 554 b
-917 553 b
-918 552 b
-920 559 b
-919 558 b
-920 558 b
-921 558 b
-922 558 b
-923 558 b
-924 558 b
-925 558 b
-925 555 b
-924 554 b
-923 553 b
-922 552 b
-919 551 b
-921 551 b
-920 550 b
-926 558 b
-927 558 b
-928 558 b
-927 557 b
-926 556 b
-136 679 136 687 l
-128 678 b
-129 678 b
-130 678 b
-131 678 b
-132 678 b
-133 678 b
-134 678 b
-129 677 b
-130 676 b
-131 675 b
-132 674 b
-133 673 b
-134 672 b
-136 679 b
-135 678 b
-136 678 b
-137 678 b
-138 678 b
-139 678 b
-140 678 b
-141 678 b
-141 675 b
-140 674 b
-139 673 b
-138 672 b
-135 671 b
-137 671 b
-136 670 b
-142 678 b
-143 678 b
-144 678 b
-143 677 b
-142 676 b
-408 575 408 583 l
-400 574 b
-401 574 b
-402 574 b
-403 574 b
-404 574 b
-405 574 b
-406 574 b
-401 573 b
-402 572 b
-403 571 b
-404 570 b
-405 569 b
-406 568 b
-408 575 b
-407 574 b
-408 574 b
-409 574 b
-410 574 b
-411 574 b
-412 574 b
-413 574 b
-413 571 b
-412 570 b
-411 569 b
-410 568 b
-407 567 b
-409 567 b
-408 566 b
-414 574 b
-415 574 b
-416 574 b
-415 573 b
-414 572 b
-794 103 784 103 l
-832 103 822 103 l
-/text_height 12 def
-/text_width 6 def
-787 123 moveto 9 (330) ht
-/text_height 12 def
-/text_width 6 def
-787 135 moveto 9 (R12) ht
-798 108 796 103 l
-802 99 798 108 l
-806 108 802 99 l
-810 99 806 108 l
-814 108 810 99 l
-818 99 814 108 l
-820 103 818 99 l
-822 103 820 103 l
-796 103 795 103 l
-/text_height 12 def
-/text_width 6 def
-528 118 moveto 9 (+12) ht
-712 119 616 119 l
-712 87 712 119 l
-616 87 616 119 l
-712 87 616 87 l
-616 103 592 103 l
-664 63 664 87 l
-/text_height 12 def
-/text_width 6 def
-652 101 moveto 9 (GND) ht
-/text_height 12 def
-/text_width 6 def
-619 111 moveto 9 (IN) ht
-/text_height 12 def
-/text_width 6 def
-685 111 moveto 9 (OUT) ht
-/text_height 12 def
-/text_width 6 def
-602 118 moveto 9 (1) ht
-/text_height 12 def
-/text_width 6 def
-640 136 moveto 9 (LM7805) ht
-/text_height 12 def
-/text_width 6 def
-640 149 moveto 9 (U5) ht
-/text_height 12 def
-/text_width 6 def
-667 83 moveto 9 (2) ht
-736 103 712 103 l
-/text_height 12 def
-/text_width 6 def
-720 118 moveto 9 (3) ht
-862 180 b
-867 180 b
-862 179 b
-866 179 b
-867 179 b
-862 178 b
-865 178 b
-866 178 b
-867 178 b
-862 177 b
-864 177 b
-865 177 b
-866 177 b
-867 177 b
-862 176 b
-863 176 b
-864 176 b
-865 176 b
-866 176 b
-867 176 b
-861 175 b
-862 175 b
-863 175 b
-864 175 b
-865 175 b
-866 175 b
-867 175 b
-862 174 b
-863 174 b
-864 174 b
-865 174 b
-866 174 b
-867 174 b
-862 173 b
-864 173 b
-865 173 b
-866 173 b
-867 173 b
-862 172 b
-865 172 b
-866 172 b
-867 172 b
-862 171 b
-866 171 b
-867 171 b
-862 170 b
-867 170 b
-868 181 b
-868 180 b
-868 179 b
-868 178 b
-868 177 b
-868 176 b
-868 175 b
-868 174 b
-868 173 b
-868 172 b
-868 171 b
-868 170 b
-868 169 b
-862 175 848 175 l
-880 175 867 175 l
-/text_height 12 def
-/text_width 6 def
-850 196 moveto 9 (D1) ht
-/text_height 12 def
-/text_width 6 def
-849 171 moveto 9 (1N4002) ht
-848 175 560 175 l
-810 383 792 383 l
-813 383 3 c
-810 367 792 367 l
-813 367 3 c
-816 415 792 415 l
-816 399 792 399 l
-891 399 3 c
-912 399 894 399 l
-912 383 888 383 l
-912 367 888 367 l
-891 415 3 c
-912 415 894 415 l
-/text_height 12 def
-/text_width 6 def
-903 430 moveto 16 (2 4) vt
-/text_height 12 def
-/text_width 6 def
-796 430 moveto 16 (1 11) vt
-/text_height 12 def
-/text_width 6 def
-870 424 moveto 16 (12122 2) vt
-912 351 888 351 l
-912 319 888 319 l
-816 351 792 351 l
-816 319 792 319 l
-/text_height 12 def
-/text_width 6 def
-804 430 moveto 16 (38101 3) vt
-888 431 816 431 l
-/text_height 12 def
-/text_width 6 def
-879 424 moveto 16 (OOOO+ -) vt
-/text_height 12 def
-/text_width 6 def
-895 430 moveto 16 (19174 5) vt
-/text_height 12 def
-/text_width 6 def
-836 288 moveto 9 (2) ht
-/text_height 12 def
-/text_width 6 def
-875 288 moveto 9 (6) ht
-888 295 816 295 l
-832 271 832 295 l
-872 271 872 295 l
-816 295 816 431 l
-888 295 888 431 l
-/text_height 12 def
-/text_width 6 def
-820 447 moveto 9 (ICL232) ht
-/text_height 12 def
-/text_width 6 def
-831 460 moveto 9 (U1) ht
-/text_height 12 def
-/text_width 6 def
-820 424 moveto 16 (RRTTC C) vt
-/text_height 12 def
-/text_width 6 def
-829 424 moveto 16 (12121 1) vt
-/text_height 12 def
-/text_width 6 def
-837 424 moveto 16 (IIII+ -) vt
-/text_height 12 def
-/text_width 6 def
-861 424 moveto 16 (RRTTC C) vt
-/text_height 12 def
-/text_width 6 def
-827 313 moveto 9 (V+) ht
-/text_height 12 def
-/text_width 6 def
-865 313 moveto 9 (V-) ht
-992 471 792 471 l
-776 487 776 399 l
-792 471 792 415 l
-936 503 936 399 l
-776 655 752 655 l
-776 703 752 703 l
-776 671 752 671 l
-848 607 776 607 l
-872 735 848 735 l
-872 719 848 719 l
-/text_height 12 def
-/text_width 6 def
-780 776 moveto 16 (DLCCR CXXF) vt
-776 623 752 623 l
-776 639 752 639 l
-776 767 752 767 l
-/text_height 12 def
-/text_width 6 def
-764 782 moveto 16 (12345 7890) vt
-776 719 752 719 l
-770 751 752 751 l
-773 751 3 c
-/text_height 12 def
-/text_width 6 def
-756 782 moveto 16 ( 1) vt
-770 735 752 735 l
-773 735 3 c
-872 751 848 751 l
-872 703 848 703 l
-872 687 848 687 l
-872 671 848 671 l
-872 655 848 655 l
-872 623 848 623 l
-/text_height 12 def
-/text_width 6 def
-852 782 moveto 16 (21111111 1) vt
-/text_height 12 def
-/text_width 6 def
-860 782 moveto 16 (09876543 1) vt
-872 767 848 767 l
-/text_height 12 def
-/text_width 6 def
-821 776 moveto 16 (TUETRRSO T) vt
-/text_height 12 def
-/text_width 6 def
-797 776 moveto 16 (I TD A) vt
-/text_height 12 def
-/text_width 6 def
-788 776 moveto 16 (SBDDX DIOB) vt
-/text_height 12 def
-/text_width 6 def
-812 664 moveto 9 (M) ht
-848 783 776 783 l
-776 607 776 783 l
-848 607 848 783 l
-/text_height 12 def
-/text_width 6 def
-779 799 moveto 9 (MC145443) ht
-/text_height 12 def
-/text_width 6 def
-790 812 moveto 9 (U2) ht
-/text_height 12 def
-/text_width 6 def
-839 776 moveto 16 (AGLA12TE D) vt
-/text_height 12 def
-/text_width 6 def
-830 776 moveto 16 (LAXXXXQD X) vt
-904 559 744 559 l
-880 623 872 623 l
-880 623 880 503 l
-936 503 880 503 l
-1040 726 1024 726 l
-1032 726 1032 735 l
-1037 723 1027 723 l
-1034 720 1030 720 l
-1032 717 b
-1096 726 1080 726 l
-1088 726 1088 735 l
-1093 723 1083 723 l
-1090 720 1086 720 l
-1088 717 b
-1088 767 1032 767 l
-1088 799 1088 767 l
-/text_height 12 def
-/text_width 6 def
-1085 825 moveto 11 (+5) vt
-1088 767 2 fc
-/text_height 12 def
-/text_width 6 def
-1024 715 moveto 9 (U2) ht
-/text_height 12 def
-/text_width 6 def
-1080 715 moveto 9 (U4) ht
-1096 351 1096 335 l
-1096 319 1032 319 l
-1096 287 1032 287 l
-1032 319 1032 287 l
-1032 287 2 fc
-1032 287 1032 175 l
-/text_height 12 def
-/text_width 6 def
-1072 363 moveto 9 (RS) ht
-/text_height 12 def
-/text_width 6 def
-1072 347 moveto 9 (CS) ht
-/text_height 12 def
-/text_width 6 def
-1040 451 moveto 9 (\(DB25 female DCE\)) ht
-1096 303 1064 303 l
-1008 487 776 487 l
-1072 270 1056 270 l
-1064 270 1064 279 l
-1069 267 1059 267 l
-1066 264 1062 264 l
-1064 261 b
-1064 303 1064 279 l
-1064 303 2 fc
-1184 175 1032 175 l
-1032 175 880 175 l
-1032 175 2 fc
-1096 399 1064 399 l
-1064 399 1064 303 l
-/text_height 12 def
-/text_width 6 def
-1112 467 moveto 9 (modem) ht
-/text_height 12 def
-/text_width 6 def
-1074 415 moveto 9 (FG) ht
-/text_height 12 def
-/text_width 6 def
-1074 398 moveto 9 (TD) ht
-/text_height 12 def
-/text_width 6 def
-1074 383 moveto 9 (RD) ht
-/text_height 12 def
-/text_width 6 def
-1073 334 moveto 9 (MR) ht
-/text_height 12 def
-/text_width 6 def
-1073 318 moveto 9 (CG) ht
-/text_height 12 def
-/text_width 6 def
-1073 302 moveto 9 (CD) ht
-/text_height 12 def
-/text_width 6 def
-1069 254 moveto 9 (STD) ht
-1114 367 1096 367 l
-1117 367 3 c
-1114 351 1096 351 l
-1117 351 3 c
-1114 335 1096 335 l
-1117 335 3 c
-1114 319 1096 319 l
-1117 319 3 c
-1114 303 1096 303 l
-1117 303 3 c
-1114 287 1096 287 l
-1117 287 3 c
-1114 239 1096 239 l
-1117 239 3 c
-1114 223 1096 223 l
-1117 223 3 c
-1114 271 1096 271 l
-1117 271 3 c
-1131 375 3 c
-1152 375 1134 375 l
-1131 359 3 c
-1152 359 1134 359 l
-1131 343 3 c
-1152 343 1134 343 l
-1131 327 3 c
-1152 327 1134 327 l
-1131 311 3 c
-1152 311 1134 311 l
-1131 295 3 c
-1152 295 1134 295 l
-1131 263 3 c
-1152 263 1134 263 l
-1131 247 3 c
-1152 247 1134 247 l
-1131 231 3 c
-1152 231 1134 231 l
-1131 215 3 c
-1152 215 1134 215 l
-/text_height 12 def
-/text_width 6 def
-1097 270 moveto 16 (1111) vt
-/text_height 12 def
-/text_width 6 def
-1136 405 moveto 16 (111111222222) vt
-/text_height 12 def
-/text_width 6 def
-1144 405 moveto 16 (456789012345) vt
-/text_height 12 def
-/text_width 6 def
-1105 414 moveto 16 (1234567890123) vt
-1131 391 3 c
-1152 391 1134 391 l
-1114 255 1096 255 l
-1117 255 3 c
-1114 207 1096 207 l
-1117 207 3 c
-1114 383 1096 383 l
-1117 383 3 c
-1114 399 1096 399 l
-1117 399 3 c
-1131 279 3 c
-1152 279 1134 279 l
-/text_height 12 def
-/text_width 6 def
-1118 420 moveto 9 (DB25) ht
-/text_height 12 def
-/text_width 6 def
-1118 432 moveto 9 (J1) ht
-/text_height 12 def
-/text_width 6 def
-1069 238 moveto 9 (SRD) ht
-1184 295 1152 295 l
-/text_height 12 def
-/text_width 6 def
-1160 315 moveto 9 (TR) ht
-1184 295 1184 175 l
-190 704 190 718 l
-213 711 18 201 159 a
-190 711 176 711 l
-208 711 195 711 l
-/text_height 12 def
-/text_width 6 def
-179 734 moveto 9 (C15) ht
-/text_height 12 def
-/text_width 6 def
-173 704 moveto 9 (10N) ht
-366 640 366 654 l
-389 647 18 201 159 a
-366 647 352 647 l
-384 647 371 647 l
-/text_height 12 def
-/text_width 6 def
-355 670 moveto 9 (C11) ht
-/text_height 12 def
-/text_width 6 def
-349 640 moveto 9 (10N) ht
-446 640 446 654 l
-469 647 18 201 159 a
-446 647 432 647 l
-464 647 451 647 l
-/text_height 12 def
-/text_width 6 def
-435 670 moveto 9 (C10) ht
-/text_height 12 def
-/text_width 6 def
-429 640 moveto 9 (10N) ht
-/text_height 12 def
-/text_width 6 def
-693 606 moveto 9 (C8) ht
-/text_height 12 def
-/text_width 6 def
-693 593 moveto 9 (100N) ht
-687 593 673 593 l
-680 571 18 111 69 a
-680 593 680 607 l
-680 575 680 589 l
-/text_height 12 def
-/text_width 6 def
-933 598 moveto 9 (C5) ht
-/text_height 12 def
-/text_width 6 def
-933 585 moveto 9 (100N) ht
-927 585 913 585 l
-920 563 18 111 69 a
-920 585 920 599 l
-920 567 920 581 l
-/text_height 12 def
-/text_width 6 def
-933 646 moveto 9 (C7) ht
-/text_height 12 def
-/text_width 6 def
-933 633 moveto 9 (100N) ht
-927 633 913 633 l
-920 611 18 111 69 a
-920 633 920 647 l
-920 615 920 629 l
-/text_height 12 def
-/text_width 6 def
-741 814 moveto 9 (C4) ht
-/text_height 12 def
-/text_width 6 def
-741 801 moveto 9 (10N) ht
-735 801 721 801 l
-728 779 18 111 69 a
-728 801 728 815 l
-728 783 728 797 l
-/text_height 12 def
-/text_width 6 def
-757 606 moveto 9 (C6) ht
-/text_height 12 def
-/text_width 6 def
-757 593 moveto 9 (100N) ht
-751 593 737 593 l
-744 571 18 111 69 a
-744 593 744 607 l
-744 575 744 589 l
-/text_height 12 def
-/text_width 6 def
-1045 766 moveto 9 (C13) ht
-/text_height 12 def
-/text_width 6 def
-1045 753 moveto 9 (100N) ht
-1039 753 1025 753 l
-1032 731 18 111 69 a
-1032 753 1032 767 l
-1032 735 1032 749 l
-/text_height 12 def
-/text_width 6 def
-1101 766 moveto 9 (C2) ht
-/text_height 12 def
-/text_width 6 def
-1101 753 moveto 9 (100N) ht
-1095 753 1081 753 l
-1088 731 18 111 69 a
-1088 753 1088 767 l
-1088 735 1088 749 l
-546 239 536 239 l
-584 239 574 239 l
-/text_height 12 def
-/text_width 6 def
-539 259 moveto 9 (330) ht
-/text_height 12 def
-/text_width 6 def
-539 271 moveto 9 (R10) ht
-550 244 548 239 l
-554 235 550 244 l
-558 244 554 235 l
-562 235 558 244 l
-566 244 562 235 l
-570 235 566 244 l
-572 239 570 235 l
-574 239 572 239 l
-548 239 547 239 l
-845 109 b
-845 108 b
-846 108 b
-851 108 b
-845 107 b
-846 107 b
-847 107 b
-851 107 b
-845 106 b
-846 106 b
-847 106 b
-848 106 b
-851 106 b
-845 105 b
-846 105 b
-847 105 b
-848 105 b
-849 105 b
-851 105 b
-845 104 b
-846 104 b
-847 104 b
-848 104 b
-849 104 b
-850 104 b
-851 104 b
-845 103 b
-846 103 b
-847 103 b
-848 103 b
-849 103 b
-850 103 b
-851 103 b
-845 102 b
-846 102 b
-847 102 b
-848 102 b
-849 102 b
-850 102 b
-851 102 b
-845 101 b
-846 101 b
-847 101 b
-848 101 b
-849 101 b
-851 101 b
-845 100 b
-846 100 b
-847 100 b
-848 100 b
-851 100 b
-845 99 b
-846 99 b
-847 99 b
-851 99 b
-845 98 b
-846 98 b
-851 98 b
-845 97 b
-852 103 b
-846 103 832 103 l
-864 103 853 103 l
-/text_height 12 def
-/text_width 6 def
-832 131 moveto 9 (LED2) ht
-859 116 b
-857 115 b
-858 115 b
-857 114 b
-858 114 b
-856 113 b
-855 112 b
-855 111 b
-856 111 b
-857 111 b
-858 111 b
-859 111 b
-860 111 b
-860 110 b
-859 109 b
-858 108 b
-857 107 b
-/text_height 12 def
-/text_width 6 def
-833 97 moveto 9 (RED) ht
-/text_height 12 def
-/text_width 6 def
-584 219 moveto 9 (1 pps) ht
-/text_height 12 def
-/text_width 6 def
-832 83 moveto 9 (power) ht
-328 703 304 703 l
-264 679 264 727 l
-264 711 240 711 l
-264 695 240 695 l
-/text_height 12 def
-/text_width 6 def
-267 719 moveto 9 (+) ht
-/text_height 12 def
-/text_width 6 def
-267 703 moveto 9 (-) ht
-/text_height 12 def
-/text_width 6 def
-250 726 moveto 9 (3) ht
-/text_height 12 def
-/text_width 6 def
-250 710 moveto 9 (2) ht
-/text_height 12 def
-/text_width 6 def
-312 718 moveto 9 (1) ht
-/text_height 12 def
-/text_width 6 def
-264 744 moveto 9 (LM324) ht
-/text_height 12 def
-/text_width 6 def
-264 757 moveto 9 (U4A) ht
-304 703 264 727 l
-304 703 264 679 l
-472 695 448 695 l
-408 671 408 719 l
-/text_height 12 def
-/text_width 6 def
-411 711 moveto 9 (+) ht
-/text_height 12 def
-/text_width 6 def
-411 695 moveto 9 (-) ht
-/text_height 12 def
-/text_width 6 def
-408 736 moveto 9 (LM324) ht
-/text_height 12 def
-/text_width 6 def
-408 749 moveto 9 (U4B) ht
-408 703 384 703 l
-408 687 384 687 l
-/text_height 12 def
-/text_width 6 def
-394 718 moveto 9 (5) ht
-/text_height 12 def
-/text_width 6 def
-394 702 moveto 9 (6) ht
-/text_height 12 def
-/text_width 6 def
-456 710 moveto 9 (7) ht
-448 695 408 719 l
-448 695 408 671 l
-336 431 272 431 l
-272 351 272 431 l
-336 351 272 351 l
-336 351 336 431 l
-272 399 248 399 l
-266 383 248 383 l
-269 383 3 c
-360 399 336 399 l
-288 431 288 455 l
-320 431 320 455 l
-304 345 304 327 l
-304 348 3 c
-/text_height 12 def
-/text_width 6 def
-275 407 moveto 16 (BA) vt
-/text_height 12 def
-/text_width 6 def
-277 433 moveto 9 (R/C) ht
-/text_height 12 def
-/text_width 6 def
-313 433 moveto 9 (CE) ht
-/text_height 12 def
-/text_width 6 def
-297 366 moveto 9 (CL) ht
-/text_height 12 def
-/text_width 6 def
-258 414 moveto 16 (21) vt
-/text_height 12 def
-/text_width 6 def
-344 414 moveto 9 (13) ht
-/text_height 12 def
-/text_width 6 def
-344 398 moveto 9 (4) ht
-/text_height 12 def
-/text_width 6 def
-307 347 moveto 9 (3) ht
-/text_height 12 def
-/text_width 6 def
-344 448 moveto 9 (74LS123) ht
-/text_height 12 def
-/text_width 6 def
-344 461 moveto 9 (U3A) ht
-/text_height 12 def
-/text_width 6 def
-292 457 moveto 11 (15) vt
-/text_height 12 def
-/text_width 6 def
-324 457 moveto 11 (14) vt
-/text_height 12 def
-/text_width 6 def
-327 407 moveto 16 (QQ) vt
-/text_height 12 def
-/text_width 6 def
-326 403 moveto 9 (_) ht
-339 383 3 c
-360 383 342 383 l
-512 271 448 271 l
-448 191 448 271 l
-512 191 448 191 l
-512 191 512 271 l
-464 271 464 295 l
-496 271 496 295 l
-/text_height 12 def
-/text_width 6 def
-451 247 moveto 16 (BA) vt
-/text_height 12 def
-/text_width 6 def
-453 273 moveto 9 (R/C) ht
-/text_height 12 def
-/text_width 6 def
-489 273 moveto 9 (CE) ht
-/text_height 12 def
-/text_width 6 def
-473 206 moveto 9 (CL) ht
-480 185 480 167 l
-480 188 3 c
-536 239 512 239 l
-448 239 424 239 l
-442 223 424 223 l
-445 223 3 c
-/text_height 12 def
-/text_width 6 def
-425 254 moveto 9 (10) ht
-/text_height 12 def
-/text_width 6 def
-434 238 moveto 9 (9) ht
-/text_height 12 def
-/text_width 6 def
-520 238 moveto 9 (12) ht
-/text_height 12 def
-/text_width 6 def
-520 254 moveto 9 (5) ht
-/text_height 12 def
-/text_width 6 def
-483 198 moveto 11 ( 11) vt
-/text_height 12 def
-/text_width 6 def
-467 291 moveto 9 (7) ht
-/text_height 12 def
-/text_width 6 def
-499 291 moveto 9 (6) ht
-/text_height 12 def
-/text_width 6 def
-520 288 moveto 9 (74LS123) ht
-/text_height 12 def
-/text_width 6 def
-520 301 moveto 9 (U3B) ht
-/text_height 12 def
-/text_width 6 def
-503 247 moveto 16 (QQ) vt
-/text_height 12 def
-/text_width 6 def
-502 243 moveto 9 (_) ht
-515 223 3 c
-536 223 518 223 l
-136 724 b
-136 723 b
-137 723 b
-138 722 b
-138 720 b
-136 719 b
-137 719 b
-134 718 b
-135 718 b
-132 717 b
-133 717 b
-134 716 b
-135 716 b
-136 715 b
-137 715 b
-138 714 b
-138 712 b
-136 711 b
-137 711 b
-134 710 b
-135 710 b
-132 709 b
-133 709 b
-134 708 b
-135 708 b
-136 707 b
-137 707 b
-138 706 b
-138 704 b
-136 703 b
-137 703 b
-134 702 b
-135 702 b
-132 701 b
-133 701 b
-134 700 b
-135 700 b
-136 699 b
-139 722 b
-140 721 b
-141 721 b
-139 720 b
-139 714 b
-140 713 b
-141 713 b
-139 712 b
-139 706 b
-140 705 b
-141 705 b
-139 704 b
-136 724 136 735 l
-136 687 136 698 l
-176 711 152 711 l
-147 715 b
-146 714 b
-147 714 b
-145 713 b
-146 713 b
-147 713 b
-144 712 b
-145 712 b
-146 712 b
-147 712 b
-143 711 b
-144 711 b
-145 711 b
-146 711 b
-147 711 b
-148 711 b
-149 711 b
-144 710 b
-145 710 b
-146 710 b
-147 710 b
-145 709 b
-146 709 b
-147 709 b
-146 708 b
-147 708 b
-147 707 b
-150 711 b
-151 711 b
-152 711 b
-153 711 b
-/text_height 12 def
-/text_width 6 def
-148 708 moveto 9 (10K) ht
-/text_height 12 def
-/text_width 6 def
-128 736 moveto 9 (1) ht
-/text_height 12 def
-/text_width 6 def
-126 702 moveto 9 (3) ht
-/text_height 12 def
-/text_width 6 def
-150 726 moveto 9 (2) ht
-/text_height 12 def
-/text_width 6 def
-144 738 moveto 9 (R8) ht
-608 751 608 762 l
-640 775 616 775 l
-616 767 616 783 l
-608 788 608 799 l
-614 768 b
-613 767 b
-612 766 b
-611 765 b
-610 764 b
-609 763 b
-608 762 b
-616 770 b
-615 769 b
-608 788 b
-609 787 b
-610 786 b
-613 786 b
-611 785 b
-612 785 b
-613 785 b
-611 784 b
-612 784 b
-613 784 b
-610 783 b
-611 783 b
-612 783 b
-613 783 b
-614 783 b
-613 782 b
-614 782 b
-615 781 b
-616 780 b
-613 775 16 c
-/text_height 12 def
-/text_width 6 def
-632 795 moveto 9 (2N2907) ht
-/text_height 12 def
-/text_width 6 def
-632 808 moveto 9 (Q1) ht
-608 711 608 719 l
-600 710 b
-601 710 b
-602 710 b
-603 710 b
-604 710 b
-605 710 b
-606 710 b
-601 709 b
-602 708 b
-603 707 b
-604 706 b
-605 705 b
-606 704 b
-608 711 b
-607 710 b
-608 710 b
-609 710 b
-610 710 b
-611 710 b
-612 710 b
-613 710 b
-613 707 b
-612 706 b
-611 705 b
-610 704 b
-607 703 b
-609 703 b
-608 702 b
-614 710 b
-615 710 b
-616 710 b
-615 709 b
-614 708 b
-/text_height 12 def
-/text_width 6 def
-624 723 moveto 9 (car det) ht
-664 775 664 735 l
-664 775 640 775 l
-1096 367 912 367 l
-1008 487 1008 383 l
-1096 383 1008 383 l
-992 471 992 239 l
-1096 239 992 239 l
-976 383 912 383 l
-976 383 976 223 l
-1096 223 976 223 l
-602 738 b
-603 738 b
-604 738 b
-605 738 b
-606 738 b
-607 738 b
-608 738 b
-603 737 b
-604 737 b
-605 737 b
-606 737 b
-607 737 b
-608 737 b
-604 736 b
-605 736 b
-606 736 b
-607 736 b
-608 736 b
-605 735 b
-606 735 b
-607 735 b
-608 735 b
-606 734 b
-607 734 b
-608 734 b
-607 733 b
-608 733 b
-603 732 b
-604 732 b
-605 732 b
-606 732 b
-607 732 b
-608 732 b
-608 731 b
-609 738 b
-610 738 b
-611 738 b
-612 738 b
-613 738 b
-614 738 b
-609 737 b
-610 737 b
-611 737 b
-612 737 b
-613 737 b
-609 736 b
-610 736 b
-611 736 b
-612 736 b
-609 735 b
-610 735 b
-611 735 b
-609 734 b
-610 734 b
-609 733 b
-609 732 b
-610 732 b
-611 732 b
-612 732 b
-613 732 b
-608 738 608 751 l
-608 719 608 731 l
-593 738 b
-592 737 b
-591 736 b
-591 735 b
-592 735 b
-593 735 b
-594 735 b
-595 735 b
-595 734 b
-593 733 b
-594 733 b
-593 732 b
-594 732 b
-592 731 b
-/text_height 12 def
-/text_width 6 def
-619 737 moveto 9 (GRN) ht
-/text_height 12 def
-/text_width 6 def
-619 750 moveto 9 (LED1) ht
-682 735 672 735 l
-720 735 710 735 l
-/text_height 12 def
-/text_width 6 def
-675 755 moveto 9 (3.3K) ht
-/text_height 12 def
-/text_width 6 def
-675 767 moveto 9 (R14) ht
-686 740 684 735 l
-690 731 686 740 l
-694 740 690 731 l
-698 731 694 740 l
-702 740 698 731 l
-706 731 702 740 l
-708 735 706 731 l
-710 735 708 735 l
-684 735 683 735 l
-672 735 664 735 l
-752 735 720 735 l
-597 245 b
-597 244 b
-598 244 b
-603 244 b
-597 243 b
-598 243 b
-599 243 b
-603 243 b
-597 242 b
-598 242 b
-599 242 b
-600 242 b
-603 242 b
-597 241 b
-598 241 b
-599 241 b
-600 241 b
-601 241 b
-603 241 b
-597 240 b
-598 240 b
-599 240 b
-600 240 b
-601 240 b
-602 240 b
-603 240 b
-597 239 b
-598 239 b
-599 239 b
-600 239 b
-601 239 b
-602 239 b
-603 239 b
-597 238 b
-598 238 b
-599 238 b
-600 238 b
-601 238 b
-602 238 b
-603 238 b
-597 237 b
-598 237 b
-599 237 b
-600 237 b
-601 237 b
-603 237 b
-597 236 b
-598 236 b
-599 236 b
-600 236 b
-603 236 b
-597 235 b
-598 235 b
-599 235 b
-603 235 b
-597 234 b
-598 234 b
-603 234 b
-597 233 b
-604 239 b
-598 239 584 239 l
-616 239 605 239 l
-/text_height 12 def
-/text_width 6 def
-584 267 moveto 9 (LED3) ht
-611 252 b
-609 251 b
-610 251 b
-609 250 b
-610 250 b
-608 249 b
-607 248 b
-607 247 b
-608 247 b
-609 247 b
-610 247 b
-611 247 b
-612 247 b
-612 246 b
-611 245 b
-610 244 b
-609 243 b
-/text_height 12 def
-/text_width 6 def
-585 233 moveto 9 (AMBER) ht
-648 230 632 230 l
-640 230 640 239 l
-645 227 635 227 l
-642 224 638 224 l
-640 221 b
-640 239 616 239 l
-402 767 392 767 l
-440 767 430 767 l
-/text_height 12 def
-/text_width 6 def
-395 787 moveto 9 (68K) ht
-/text_height 12 def
-/text_width 6 def
-395 799 moveto 9 (R6) ht
-406 772 404 767 l
-410 763 406 772 l
-414 772 410 763 l
-418 763 414 772 l
-422 772 418 763 l
-426 763 422 772 l
-428 767 426 763 l
-430 767 428 767 l
-404 767 403 767 l
-408 620 408 631 l
-/text_height 12 def
-/text_width 6 def
-418 621 moveto 9 (R5) ht
-/text_height 12 def
-/text_width 6 def
-418 608 moveto 9 (680) ht
-413 617 408 619 l
-413 601 404 597 l
-413 601 404 605 l
-413 609 404 613 l
-413 609 404 605 l
-408 593 408 595 l
-408 596 404 597 l
-408 583 408 594 l
-413 617 404 613 l
-408 619 408 621 l
-408 594 408 596 l
-426 327 416 327 l
-464 327 454 327 l
-/text_height 12 def
-/text_width 6 def
-419 347 moveto 9 (33K) ht
-/text_height 12 def
-/text_width 6 def
-419 359 moveto 9 (R9) ht
-430 332 428 327 l
-434 323 430 332 l
-438 332 434 323 l
-442 323 438 332 l
-446 332 442 323 l
-450 323 446 332 l
-452 327 450 323 l
-454 327 452 327 l
-428 327 427 327 l
-503 313 489 313 l
-496 291 18 111 69 a
-496 313 496 327 l
-496 295 496 309 l
-/text_height 12 def
-/text_width 6 def
-509 313 moveto 9 (22U) ht
-/text_height 12 def
-/text_width 6 def
-510 326 moveto 9 (C17) ht
-/text_height 12 def
-/text_width 6 def
-481 328 moveto 9 (+) ht
-
-showpage
diff --git a/usr.sbin/xntpd/gadget/gadget.s02 b/usr.sbin/xntpd/gadget/gadget.s02
deleted file mode 100644
index 6af4a6ec77e6..000000000000
--- a/usr.sbin/xntpd/gadget/gadget.s02
+++ /dev/null
@@ -1,288 +0,0 @@
-%!PS-Adobe-23.0 EPSF-1.2
-%%Creator: SCHEMA
-%%BoundingBox: 0 0 1343.0 1023.0
-/scl 511804.0 0.072 mul 65536.0 div def
-scl scl scale
-
-% Landscape Orientation
-/xoff 256.0 65536.0 mul 511804.0 div def
-/yoff 1343.0 -256.0 65536.0 mul 511804.0 div sub def
-xoff yoff translate
--90 rotate
-
-0 setgray
-
-/a { 1 setlinewidth newpath arcn stroke } def
-/fa { 3 setlinewidth newpath arcn stroke } def
-/c { 1 setlinewidth newpath 0 360 arc stroke } def
-/fc { 1 setlinewidth newpath 0 360 arc fill } def
-/l { 1 setlinewidth newpath moveto lineto stroke } def
-/t { 3 setlinewidth newpath moveto lineto stroke } def
-/ds { [4 4] 0 setdash 1 setlinewidth
- newpath moveto lineto stroke [] 0 setdash } def
-/dt { [2 2] 0 setdash 1 setlinewidth
- newpath moveto lineto stroke [] 0 setdash } def
-
-8 7 8 1015 t
-1328 7 912 7 t
-1336 1015 8 1015 t
-1336 7 1336 1015 t
-912 7 8 7 t
-1336 7 1328 7 t
-
-/reencsmalldict 12 dict def %% Schema font definitions
-/ReEncodeSmall
- { reencsmalldict begin
- /newcodesandnames exch def
- /newfontname exch def
- /basefontname exch def
- /basefontdict basefontname findfont def
- /newfont basefontdict maxlength dict def
- basefontdict
- { exch dup /FID ne
- { dup /Encoding eq
- { exch dup length array copy newfont 3 1 roll put }
- { exch newfont 3 1 roll put }
- ifelse
- }
- { pop pop }
- ifelse
- } forall
- newfont /FontName newfontname put
- newcodesandnames aload pop
- newcodesandnames length 2 idiv
- { newfont /Encoding get 3 1 roll put }
- repeat
- newfontname newfont definefont pop
- end
- } def
-/schfontvec [ 8#200 /Ccedilla 8#201 /udieresis 8#202 /eacute 8#203 /acircumflex
-8#204 /adieresis 8#205 /agrave 8#207 /ccedilla 8#210 /ecircumflex
-8#211 /edieresis 8#212 /egrave 8#213 /idieresis 8#214 /icircumflex
-8#215 /igrave 8#216 /Adieresis 8#220 /Eacute 8#223 /ocircumflex
-8#224 /odieresis 8#225 /ograve 8#226 /ucircumflex 8#227 /ugrave
-8#230 /ydieresis 8#231 /Odieresis 8#232 /Udieresis 8#240 /aacute 8#241 /iacute
-8#242 /oacute 8#243 /uacute 8#244 /ntilde 8#245 /Ntilde ] def
-/schsymbvec [ 8#341 /beta 8#346 /mu 8#352 /Omega ] def
-/Courier-Bold /Schfont schfontvec ReEncodeSmall
-/Symbol /Schsymb schsymbvec ReEncodeSmall
-
-
-/htdict 4 dict def %% HTEXT - variable spacing horizontal text routine
-/ht
- { htdict begin
- /textstring exch def
- /xskip exch def
- 0 text_height neg rmoveto
- /Schfont findfont text_height scalefont setfont
- textstring
- {
- /charcode exch def
- /thechar ( ) dup 0 charcode put def
- gsave
- charcode 8#245 gt
- { /Schsymb findfont text_height scalefont setfont
- thechar show
- /Schfont findfont text_height scalefont setfont }
- { thechar show }
- ifelse
- grestore
- currentpoint moveto
- xskip 0 rmoveto
- } forall
- end
- } def
-
-/text_height 12 def
-/text_width 6 def
-1304 27 moveto 9 (2) ht
-/text_height 12 def
-/text_width 6 def
-1272 27 moveto 9 (OF) ht
-/text_height 12 def
-/text_width 6 def
-1192 27 moveto 9 (SHEET) ht
-1176 31 1176 7 l
-1336 55 992 55 l
-1336 31 992 31 l
-992 7 992 87 t
-1336 87 992 87 t
-/text_height 20 def
-/text_width 9 def
-1032 87 moveto 13 (1-PPS/RS232 Converter) ht
-/text_height 12 def
-/text_width 6 def
-1040 27 moveto 9 (26 June 1992) ht
-1176 55 1176 31 l
-/text_height 12 def
-/text_width 6 def
-1032 51 moveto 9 (100-0001-001) ht
-/text_height 12 def
-/text_width 6 def
-1216 51 moveto 9 (REV) ht
-/text_height 12 def
-/text_width 6 def
-1264 51 moveto 9 (1A) ht
-640 303 240 303 l
-240 463 240 303 l
-640 463 240 463 l
-640 463 640 303 l
-240 783 240 543 l
-640 543 240 543 l
-640 783 640 543 l
-640 783 240 783 l
-1040 463 800 463 l
-800 463 800 303 l
-1040 463 1040 303 l
-1040 303 800 303 l
-632 327 248 327 l
-632 335 632 327 l
-248 335 248 327 l
-632 335 248 335 l
-656 367 640 367 l
-656 367 656 351 l
-656 351 640 351 l
-640 367 624 367 l
-624 367 624 351 l
-640 351 624 351 l
-248 335 240 335 l
-224 367 224 335 l
-240 335 224 335 l
-624 359 616 359 l
-616 359 616 335 l
-288 367 288 335 l
-288 367 224 367 l
-624 327 624 303 l
-592 327 592 303 l
-844 419 20 c
-996 419 20 c
-1032 335 808 335 ds
-1032 327 1032 335 ds
-808 327 808 335 ds
-1032 327 808 327 ds
-816 303 816 327 ds
-848 303 848 327 ds
-1024 303 1024 327 ds
-992 303 992 327 ds
-632 775 248 775 l
-632 775 632 551 l
-632 551 248 551 l
-248 775 248 551 l
-288 751 248 751 l
-288 575 248 575 l
-288 751 288 575 l
-600 751 16 c
-/text_height 20 def
-/text_width 9 def
-344 223 moveto 13 (Assembly Drawing) ht
-/text_height 12 def
-/text_width 6 def
-896 283 moveto 9 (End View) ht
-/text_height 12 def
-/text_width 6 def
-280 163 moveto 9 (Material: 2" x 3" x 5" aluminum minibox) ht
-600 575 16 c
-842 357 10 c
-1002 357 10 c
-920 418 20 c
-921 358 10 c
-/text_height 12 def
-/text_width 6 def
-976 395 moveto 9 (POWER) ht
-/text_height 12 def
-/text_width 6 def
-824 395 moveto 9 (AUDIO) ht
-/text_height 12 def
-/text_width 6 def
-912 395 moveto 9 (PPS) ht
-384 735 224 735 ds
-384 591 224 591 ds
-600 751 520 751 ds
-600 575 520 575 ds
-272 399 200 399 l
-272 439 200 439 l
-272 439 272 399 l
-200 439 200 399 l
-280 423 272 423 l
-272 759 200 759 l
-288 599 224 599 l
-272 607 272 567 l
-288 727 224 727 l
-272 719 200 719 l
-272 759 272 719 l
-200 759 200 719 l
-656 575 624 575 l
-656 591 656 575 l
-656 591 624 591 l
-624 591 624 575 l
-656 751 624 751 l
-656 751 656 735 l
-656 735 624 735 l
-624 751 624 735 l
-656 655 624 655 l
-656 671 656 655 l
-624 671 624 655 l
-656 671 624 671 l
-280 423 280 415 l
-280 415 272 415 l
-280 591 272 591 l
-280 591 280 583 l
-280 583 272 583 l
-272 663 272 655 l
-272 743 272 735 l
-280 735 272 735 l
-280 743 280 735 l
-280 743 272 743 l
-273 683 201 683 l
-201 682 201 642 l
-272 683 272 643 l
-273 643 201 643 l
-281 667 273 667 l
-280 658 272 658 l
-280 666 280 658 l
-232 607 232 567 l
-272 607 232 607 l
-272 567 232 567 l
-232 439 232 399 l
-/text_height 12 def
-/text_width 6 def
-672 587 moveto 9 (LED1 \(green\)) ht
-/text_height 12 def
-/text_width 6 def
-136 355 moveto 9 (J1 \(DB25\)) ht
-/text_height 12 def
-/text_width 6 def
-120 747 moveto 9 (J2 \(BNC\)) ht
-/text_height 12 def
-/text_width 6 def
-120 675 moveto 9 (J3 \(BNC\)) ht
-/text_height 12 def
-/text_width 6 def
-128 611 moveto 9 (J4 \(power\)) ht
-224 727 224 599 l
-/text_height 12 def
-/text_width 6 def
-352 283 moveto 9 (Side View \(cover removed\)) ht
-/text_height 12 def
-/text_width 6 def
-344 523 moveto 9 (Top View \(cover removed\)) ht
-384 591 384 735 ds
-528 575 528 751 ds
-608 599 608 727 ds
-/text_height 12 def
-/text_width 6 def
-416 619 moveto 9 (#4 x 1/4" spacers \(2\)) ht
-/text_height 12 def
-/text_width 6 def
-400 699 moveto 9 (#4 screws \(4\)) ht
-/text_height 12 def
-/text_width 6 def
-1248 27 moveto 9 (2) ht
-/text_height 12 def
-/text_width 6 def
-672 667 moveto 9 (LED2 \(red\)) ht
-/text_height 12 def
-/text_width 6 def
-672 747 moveto 9 (LED3 \(amber\)) ht
-
-showpage
diff --git a/usr.sbin/xntpd/gadget/gen0102.lpr b/usr.sbin/xntpd/gadget/gen0102.lpr
deleted file mode 100644
index cc4fd8e5a38d..000000000000
--- a/usr.sbin/xntpd/gadget/gen0102.lpr
+++ /dev/null
@@ -1,1973 +0,0 @@
-%!PS-Adobe-2.0
-%%Title: PADS Postscript Driver Header
-%%Creator: Andy Montalvo, 18 Lupine St., Lowell, MA 01851
-%%CreationDate: 06/08/90
-%%For: CAD Software, Littleton, MA
-%%EndComments
-%%BeginProcSet: Markers 1.0 0
-% marker attributes
-/MAttr_Width 1 def
-/MAttr_Size 0 def
-/MAttr_Type /M1 def
-% procedures
-/M1 { %def
-% draw marker 1: plus
-% Stack: - M1 -
- -2 0 rmoveto
- 4 0 rlineto
- -2 2 rmoveto
- 0 -4 rlineto
-} bind def
-/M2 { %def
-% draw marker 2: cross
-% Stack: - M2 -
- -2 -2 rmoveto
- 4 4 rlineto
- -4 0 rmoveto
- 4 -4 rlineto
-} bind def
-/M3 { %def
-% draw marker 3: square
-% Stack: - M3 -
- 0 2 rlineto
- 2 0 rlineto
- 0 -4 rlineto
- -4 0 rlineto
- 0 4 rlineto
- 2 0 rlineto
-} bind def
-/M4 { %def
-% draw marker 4: diamond
-% Stack: - M4 -
- 0 2 rlineto
- 2 -2 rlineto
- -2 -2 rlineto
- -2 2 rlineto
- 2 2 rlineto
-} bind def
-/M5 { %def
-% draw marker 5: hourglass
-% Stack: - M5 -
- 2 2 rlineto
- -4 0 rlineto
- 4 -4 rlineto
- -4 0 rlineto
- 2 2 rlineto
-} bind def
-/M6 { %def
-% draw marker 6: bowtie
-% Stack: - M6 -
- 2 2 rlineto
- 0 -4 rlineto
- -4 4 rlineto
- 0 -4 rlineto
- 2 2 rlineto
-} bind def
-/M7 { %def
-% draw marker 7: small plus (goes with char marker)
-% Stack: - M7 -
- -1 0 rmoveto
- 2 0 rlineto
- -1 1 rmoveto
- 0 -2 rlineto
-} bind def
-/Marker { %def
-% Command from driver: draw marker
-% STACK: x y Marker -
- MAttr_Size 0 gt
- {
- gsave
- moveto
- MAttr_Size 4 div dup scale
- MAttr_Type load exec
- 4 MAttr_Size div dup scale
- MAttr_Width setlinewidth
- stroke
- grestore
- } if
-} def
-%%EndProcSet: Markers 1.0 0
-%%BeginProcSet: Lib 1.0 0
-/sg { %def
-% Command from driver: set the gray scale 0 - 100
-% STACK: greylevel sg
- 100 div dup setgray /glev exch def
-} bind def
-/Circle { %def
-% draw a circle
-% STACK: x y radius Circle -
- 0 360 arc
-} bind def
-/RndAper { %def
-% select a round aperture
-% STACK: - RndAper -
- 1 setlinejoin
- 1 setlinecap
-} bind def
-/SqrAper { %def
-% select a square aperture
-% STACK: - SqrAper -
- 0 setlinejoin
- 2 setlinecap
-} bind def
-/Line { %def
-% draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] Line -
- 3 1 roll
- moveto
- true
- exch
- % This pushes the x then the y then does lineto
- { exch { false } { lineto true } ifelse } forall
- pop
-} bind def
-/Clipto { %def
-% set clipping rectangle from 0,0 to new values
-% STACK: x y Clipto -
- 0 0 moveto
- dup 0 exch lineto
- 2 copy lineto
- pop
- 0 lineto
- closepath
- clip
- newpath
-} bind def
-/Clip4 { %def
-% set clipping rectangle from xmin,ymin to xmax,ymax
-% STACK: xmin ymin xmax ymax Clip4 -
- 4 copy pop pop moveto
- 4 copy pop exch lineto pop
- 2 copy lineto
- exch pop exch pop lineto
- closepath
- clip
- newpath
-} bind def
-%%EndProcSet: Lib 1.0 0
-%%BeginProcSet: Lines 1.0 0
-% line attributes %
-/LAttr_Width 1 def
-% line procedures
-/PLine { %def
-% Cammand from driver: draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- LAttr_Width setlinewidth
- stroke
-} bind def % PLine
-/Char { %def
-% Command from driver: draw a character at the current position
-% STACK: type x y stroke_array Char -
-% stroke array -- [ stroke1 stroke2 ... stroken ]
-% stroke -- connected staight lines
-% type = 0 if text 1 if marker
- gsave
- 4 1 roll
- translate
- 0 eq { TAttr_Width } { MAttr_Width } ifelse setlinewidth
- {
- dup length 2 gt
- {
- dup dup 0 get exch 1 get % get starting point
- 3 -1 roll % put x y before array
- dup length 2 sub 2 exch getinterval % delete first items from array
- Line
- stroke
- }
- {
- aload pop currentlinewidth 2 div Circle fill
- } ifelse
- } forall
- grestore
-} bind def % Char
-/PArc { %def
-% Command from driver: draw an arc
-% STACK: x y radius startangle deltaangle Arc -
- 10 div exch 10 div exch
- 2 copy pop add
- arc
- LAttr_Width setlinewidth
- stroke
-} bind def
-/PCircle { %def
-% Command from driver: draw an circle
-% STACK: x y radius PCircle -
- Circle
- LAttr_Width setlinewidth
- stroke
-} bind def
-%%EndProcSet: Lines 1.0 0
-%%BeginProcSet: Polygon 1.0 0
-% polygon attributes %
-/PAttr_ExtWidth 1 def
-/PAttr_IntWidth 1 def
-/PAttr_Grid 1 def
-% polygon procedures
-/LoopSet { %def
-% set up for loop condition
-% STACK: start end LoopSet low gridwidth high
- 2 copy lt { exch } if
- % make grid line up to absolute coordinates
- PAttr_Grid div truncate PAttr_Grid mul exch
- PAttr_Grid exch
-} bind def
-/Hatch { %def
-% draw cross hatch pattern in current path
-% STACK: - Hatch -
- pathbbox
- /ury exch def
- /urx exch def
- /lly exch def
- /llx exch def
- clip
- newpath
- llx urx LoopSet
- { % x loop
- dup lly exch ury moveto lineto
- } for
- lly ury LoopSet
- { % y loop
- llx exch dup urx exch moveto lineto
- } for
- PAttr_IntWidth setlinewidth
- stroke
-} bind def
-/PPoly { %def
-% Command from driver: draw a plygon
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- closepath
- gsave
- PAttr_IntWidth PAttr_Grid ge {fill} {Hatch} ifelse
- grestore
- PAttr_ExtWidth setlinewidth
- stroke
-} bind def
-%%EndProcSet: Polygon 1.0 0
-%%BeginProcSet: Text 1.0 0
-% text attributes %
-/TAttr_Mirr 0 def
-/TAttr_Orient 0 def
-/TAttr_Width 1 def
-% text procedures
-/Text { %def
-% Command from driver: Draw text
-% STACK: x y width string Text -
- gsave
- 4 2 roll
- translate
- TAttr_Mirr 0 gt
- {
- -1 1 scale
- } if
- TAttr_Orient rotate
- 0 0 moveto
- dup length dup 1 gt
- {
- exch dup stringwidth pop
- 4 -1 roll
- exch 2 copy
- lt
- {
- div 1 scale show
- }
- {
- sub
- 3 -1 roll 1 sub div
- 0 3 -1 roll ashow
- }
- ifelse
- }
- {
- pop
- show
- } ifelse
- grestore
-} bind def
-%%EndProcSet: Text 1.0 0
-%%BeginProcSet: FlashSymbols 1.0 0
-% flash symbol attributes %
-/FAttr_Type /PRndPad def
-/FAttr_Width 0 def
-/FAttr_Length 1 def
-/FAttr_Orient 0 def
-% flash symbol procedures
-/PRndPad { %def
-% Command from driver: draw an circular pad
-% STACK: - PCirclePad -
- FAttr_Width dup scale
- 0 0 .5 Circle
- fill
-} bind def
-/PSqrPad { %def
-% Draw an Square pad
-% STACK: - PRectPad -
- FAttr_Width dup scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/PRectPad { %def
-% Draw an rectangular pad
-% STACK: - PRectPad -
- FAttr_Length FAttr_Width scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/POvalPad { %def
-% Draw an oval pad
-% STACK: - POvalPad -
- FAttr_Width setlinewidth
- FAttr_Length FAttr_Width sub 2 div dup
- neg 0 moveto
- 0 lineto
- RndAper
- stroke
-} bind def
-/Anl { %def
- 0 0 .5 Circle
- fill
- FAttr_Length FAttr_Width lt
- { % inner circle
- 0 0
- FAttr_Length 0 gt { FAttr_Length FAttr_Width div } { .5 } ifelse
- 2 div Circle
- 1 setgray
- fill
- glev setgray
- } if
-} bind def
-/PAnlPad { %def
-% Draw an annular pad
-% STACK: - PAnlPad -
- FAttr_Width dup scale
- Anl
-} bind def
-/PRelPad { %def
-% Draw an thermal relief pad
-% STACK: - PRelPad -
- PAnlPad
- 1 setgray
- .17 setlinewidth
- 0 setlinecap % the x
- 45 rotate
- .5 0 moveto -.5 0 lineto
- 0 .5 moveto 0 -.5 lineto
- stroke
- glev setgray
-} bind def
-/Flash { %def
-% Command from driver: Flash a symbol
-% STACK: x y Flash -
- FAttr_Width 0 gt
- {
- gsave
- translate
- FAttr_Orient rotate
- FAttr_Type load exec
- grestore
- } if
-} def
-%%EndProcSet: FlashSymbols 1.0 0
-%%BeginProcSet: SetAttr 1.0 0
-/SetLine { %def
-% Set the width of the lines
-% STACK: linewidth SetLine -
- /LAttr_Width exch def
- RndAper
-} bind def
-/SetPoly { %def
-% Set attribute of polygon
-% STACK: external_width internal_grid_width grid_spacing SetPoly -
- /PAttr_Grid exch def
- /PAttr_IntWidth exch def
- /PAttr_ExtWidth exch def
- RndAper
-} bind def
-/SetFlash { %def
-% Set Attributed of flash pad
-% STACK: orientation_angle length width aperture_type SetFlash -
- /FAttr_Type exch def
- FAttr_Type /PSqrPad eq FAttr_Type /PRectPad eq or
- { SqrAper } { RndAper } ifelse
- /FAttr_Width exch def
- /FAttr_Length exch def
- /FAttr_Orient exch 10 div def
-} bind def
-/SetMkr { %def
-% Set attributes of markers
-% STACK: linewidth size type SetMkr -
- /MAttr_Type exch def
- /MAttr_Size exch def
- /MAttr_Width exch def
- RndAper
-} bind def
-/SetText1 { %def
-% Set attributes of text
-% STACK: fontname height orient mirror SetMkr -
- /TAttr_Mirr exch def
- /TAttr_Orient exch 10 div def
- exch findfont exch scalefont setfont
- RndAper
-} bind def
-/SetText2 { %def
-% Set attributes of text
-% STACK: linewidth height mirror orient SetMkr -
- /TAttr_Width exch def
- RndAper
-} bind def
-%%EndProcSet: SetAttr 1.0 0
-%%BeginProcSet: Initialize 1.0 0
-/Init { %def
-% Initialize the driver
-% STACK: Init -
- 72 1000 div dup scale % Scale to 1/1000 inch
- 250 250 translate % make origin 1/4 inch from bottom left
- 1.5 setmiterlimit 1 RndAper % set line defaults
- 0 setgray % set color default
- /glev 0 def
-} def
-%%EndProcSet: Initialize 1.0 0
-%%EndProlog
-/Helvetica findfont 12 scalefont setfont
-35 760 moveto
-(gadget.job - Fri Aug 21 03:34:44 1992) show
-gsave
-Init
-8000 10500 Clipto
-4015 2626 translate
-0 rotate
-1 1 div dup scale
-75 sg
-50 sg
-12 SetLine
--100 900 [ -100 800 ] PLine
--100 800 [ 100 800 ] PLine
-100 900 [ 100 800 ] PLine
-100 800 [ 900 800 ] PLine
-300 1100 [ 600 1100 ] PLine
--1100 1150 [ -700 1150 ] PLine
--700 1150 [ -700 1600 ] PLine
-175 3300 [ -100 3300 ] PLine
-700 3000 [ 300 3000 ] PLine
-300 3000 [ 300 3100 ] PLine
-300 2500 [ 300 2650 ] PLine
-300 2650 [ 800 2650 ] PLine
-800 2800 [ 800 2650 ] PLine
-800 2650 [ 1000 2650 ] PLine
-400 2500 [ 400 2600 ] PLine
-400 2600 [ 1100 2600 ] PLine
-1100 2600 [ 1100 2800 ] PLine
--900 2300 [ -700 2100 ] PLine
--700 2100 [ -450 2100 ] PLine
-500 2500 [ 550 2550 ] PLine
-550 2550 [ 750 2550 ] PLine
-750 2550 [ 800 2500 ] PLine
--650 2600 [ -100 2600 ] PLine
--100 2250 [ 450 2250 ] PLine
-450 2250 [ 500 2200 ] PLine
--1200 2300 [ -1050 2300 ] PLine
--1050 2300 [ -1050 2100 ] PLine
--1050 2100 [ -800 2100 ] PLine
--900 2500 [ -700 2300 ] PLine
--700 2300 [ -700 2200 ] PLine
--700 2200 [ -300 2200 ] PLine
--300 2200 [ -300 2100 ] PLine
-1250 1900 [ 1250 1800 ] PLine
-1250 1800 [ 800 1800 ] PLine
-300 1900 [ 300 1800 ] PLine
-300 1800 [ 800 1800 ] PLine
-700 1900 [ 450 1900 ] PLine
-300 1700 [ 600 1700 ] PLine
-500 1600 [ -100 1600 ] PLine
--100 1600 [ -100 1700 ] PLine
-1000 3900 [ 1050 3950 ] PLine
-1050 3950 [ 1050 4050 ] PLine
-1050 4050 [ 50 4050 ] PLine
-50 4050 [ 0 4000 ] PLine
-0 4100 [ 900 4100 ] PLine
-800 3000 [ 1100 3000 ] PLine
-0 3700 [ 0 3850 ] PLine
-0 3850 [ 450 3850 ] PLine
-450 3850 [ 500 3900 ] PLine
--400 3400 [ -400 3600 ] PLine
--400 3600 [ 300 3600 ] PLine
-300 3600 [ 300 3700 ] PLine
-300 3700 [ 600 3700 ] PLine
-450 2700 [ -400 2700 ] PLine
--400 2300 [ -300 2300 ] PLine
--700 4200 [ -650 4250 ] PLine
--650 4250 [ 550 4250 ] PLine
-550 4250 [ 600 4200 ] PLine
-350 3800 [ 1100 3800 ] PLine
-1100 3800 [ 1100 3900 ] PLine
--800 3100 [ -800 2800 ] PLine
--800 2800 [ -400 2800 ] PLine
--850 3700 [ -400 3700 ] PLine
-400 1300 [ 600 1300 ] PLine
--1100 4200 [ -1050 4150 ] PLine
--1050 4150 [ 650 4150 ] PLine
-650 4150 [ 700 4200 ] PLine
--300 3400 [ -250 3350 ] PLine
--250 3350 [ 1200 3350 ] PLine
-1200 3350 [ 1200 4200 ] PLine
-1200 4200 [ 1100 4200 ] PLine
--700 3100 [ -700 2875 ] PLine
--700 2875 [ -200 2875 ] PLine
--200 2875 [ -200 2800 ] PLine
--600 3100 [ -600 2950 ] PLine
--600 2950 [ 600 2950 ] PLine
-600 2950 [ 600 2800 ] PLine
--750 550 [ -750 1050 ] PLine
--750 1050 [ -1050 1050 ] PLine
-950 3200 [ 700 3200 ] PLine
-850 1200 [ -600 1200 ] PLine
--550 3900 [ -350 3900 ] PLine
-540 4479 [ 540 4300 ] PLine
-540 4300 [ -800 4300 ] PLine
-432 4479 [ 432 4350 ] PLine
-432 4350 [ -750 4350 ] PLine
-400 3400 [ 700 3400 ] PLine
-50 SetLine
--1000 3400 [ -1000 3250 ] PLine
--1000 3250 [ -200 3250 ] PLine
--200 3250 [ -200 3100 ] PLine
--200 3100 [ -100 3100 ] PLine
-0 2500 [ 0 2350 ] PLine
-0 2350 [ 200 2350 ] PLine
-200 2350 [ 200 2500 ] PLine
-0 2350 [ -200 2350 ] PLine
--1000 3400 [ -1200 3400 ] PLine
-200 2350 [ 1100 2350 ] PLine
-1100 2350 [ 1100 2450 ] PLine
-1100 2450 [ 1200 2450 ] PLine
--600 1600 [ -600 1750 ] PLine
--600 1750 [ -200 1750 ] PLine
--1200 3700 [ -1000 3700 ] PLine
--1000 3700 [ -1000 3400 ] PLine
-1100 3200 [ 1250 3200 ] PLine
-1250 3200 [ 1250 2450 ] PLine
-1250 2450 [ 1200 2450 ] PLine
-900 4200 [ 900 4300 ] PLine
-900 4300 [ 1250 4300 ] PLine
-1250 4300 [ 1250 3200 ] PLine
--700 4000 [ -1000 4000 ] PLine
--1000 4000 [ -1000 3700 ] PLine
-900 4200 [ 800 4200 ] PLine
-200 1400 [ 1100 1400 ] PLine
-1100 1400 [ 1100 800 ] PLine
--50 450 [ -50 150 ] PLine
-950 150 [ 1100 450 ] PLine
-1100 450 [ 1000 800 ] PLine
--250 450 [ -250 1000 ] PLine
--250 1000 [ 200 1000 ] PLine
-200 1000 [ 200 1100 ] PLine
-0 450 [ -750 450 ] PLine
--750 450 [ -1100 450 ] PLine
-0 4475 [ 0 4400 ] PLine
-0 4400 [ -648 4400 ] PLine
--648 4400 [ -648 4479 ] PLine
-75 4000 [ 300 4000 ] PLine
-300 4000 [ 300 3900 ] PLine
-1100 450 [ 750 450 ] PLine
-750 450 [ 0 450 ] PLine
-900 2200 [ 900 2000 ] PLine
-900 2000 [ 75 2000 ] PLine
-75 2000 [ 75 2200 ] PLine
-75 2200 [ 200 2200 ] PLine
-300 4000 [ 1000 4000 ] PLine
--1100 450 [ -1050 150 ] PLine
--600 1900 [ -600 2000 ] PLine
--600 2000 [ 75 2000 ] PLine
-75 2100 [ 0 2100 ] PLine
-12 SetLine
-700 3700 [ 750 3650 ] PLine
-750 3650 [ 750 800 ] PLine
-750 800 [ 900 800 ] PLine
-0 550 [ 300 550 ] PLine
-300 550 [ 300 1100 ] PLine
-300 2200 [ 250 2150 ] PLine
-250 2150 [ 250 1600 ] PLine
-250 1600 [ 300 1550 ] PLine
-300 1550 [ 300 1100 ] PLine
--700 2500 [ -550 2500 ] PLine
--550 2500 [ -550 1700 ] PLine
--550 1700 [ -700 1700 ] PLine
--700 1700 [ -700 1600 ] PLine
-300 3500 [ 175 3500 ] PLine
-175 3500 [ 175 3100 ] PLine
-175 3100 [ 300 3100 ] PLine
-300 4200 [ 250 4150 ] PLine
-250 4150 [ 250 3800 ] PLine
-250 3800 [ 300 3750 ] PLine
-300 3750 [ 300 3500 ] PLine
--300 2500 [ -250 2550 ] PLine
--250 2550 [ -250 3300 ] PLine
--250 3300 [ -100 3300 ] PLine
-300 4200 [ 400 4200 ] PLine
--900 1600 [ -800 1600 ] PLine
--800 1600 [ -800 1500 ] PLine
--800 1500 [ -500 1500 ] PLine
--500 1500 [ -500 1600 ] PLine
-1000 2650 [ 1000 2250 ] PLine
-1000 2250 [ 1200 2250 ] PLine
-400 1500 [ 400 2200 ] PLine
-400 2200 [ 400 2300 ] PLine
-400 2300 [ 700 2300 ] PLine
-700 2300 [ 700 2500 ] PLine
--450 2100 [ -450 1650 ] PLine
--450 1650 [ -400 1600 ] PLine
--500 3400 [ -500 3150 ] PLine
--500 3150 [ -650 3150 ] PLine
--650 3150 [ -650 2600 ] PLine
--100 2600 [ -100 2250 ] PLine
--1200 2500 [ -1200 2300 ] PLine
--300 2100 [ -250 2050 ] PLine
--250 2050 [ -250 1650 ] PLine
--250 1650 [ -300 1600 ] PLine
-800 1800 [ 800 2200 ] PLine
-600 900 [ 600 550 ] PLine
-600 550 [ 750 550 ] PLine
-700 2200 [ 700 1900 ] PLine
-600 1700 [ 600 2200 ] PLine
-1050 150 [ 1050 250 ] PLine
-1050 250 [ 500 250 ] PLine
-500 250 [ 500 1600 ] PLine
-0 4200 [ 0 4100 ] PLine
-900 4100 [ 900 3900 ] PLine
-800 3900 [ 800 3000 ] PLine
-600 3700 [ 600 3900 ] PLine
-600 4200 [ 600 4075 ] PLine
-600 4075 [ 450 4075 ] PLine
-450 4075 [ 450 2700 ] PLine
--400 2700 [ -400 2300 ] PLine
-300 3300 [ 350 3350 ] PLine
-350 3350 [ 350 3800 ] PLine
--1200 2800 [ -1000 2800 ] PLine
--1000 2800 [ -1000 3100 ] PLine
--900 3100 [ -850 3150 ] PLine
--850 3150 [ -850 3700 ] PLine
-50 150 [ 400 150 ] PLine
-400 150 [ 400 1300 ] PLine
--500 3100 [ -500 3000 ] PLine
--500 3000 [ -350 3000 ] PLine
--350 3000 [ -350 1300 ] PLine
--350 1300 [ -100 1300 ] PLine
-200 3700 [ 150 3750 ] PLine
-150 3750 [ 150 4425 ] PLine
-150 4425 [ 108 4479 ] PLine
-108 4479 [ 54 4593 ] PLine
--108 4479 [ 50 4600 ] PLine
-50 4600 [ 54 4593 ] PLine
--324 4479 [ -216 4479 ] PLine
--1100 1700 [ -1100 1450 ] PLine
--1050 1050 [ -1050 1800 ] PLine
--1050 1800 [ -1200 1800 ] PLine
-950 3524 [ 950 3200 ] PLine
-950 3700 [ 850 3700 ] PLine
-850 3700 [ 850 1200 ] PLine
--600 1200 [ -600 150 ] PLine
--600 150 [ -950 150 ] PLine
--540 4479 [ -550 4479 ] PLine
--550 4479 [ -550 3900 ] PLine
--350 3900 [ -350 3150 ] PLine
--350 3150 [ -300 3100 ] PLine
--432 4479 [ -450 4479 ] PLine
--450 4479 [ -450 3150 ] PLine
--450 3150 [ -382 3100 ] PLine
--382 3100 [ -400 3100 ] PLine
--800 4300 [ -800 3400 ] PLine
--750 4350 [ -750 3450 ] PLine
--750 3450 [ -700 3400 ] PLine
-400 3900 [ 400 3400 ] PLine
-1100 3400 [ 1100 3600 ] PLine
-1100 3600 [ 1026 3600 ] PLine
-1026 3600 [ 1026 3612 ] PLine
-50 SetLine
--100 3100 [ 0 3100 ] PLine
-0 3100 [ 0 2500 ] PLine
--200 2350 [ -200 1900 ] PLine
--200 1900 [ -100 1900 ] PLine
--200 1900 [ -200 1500 ] PLine
--200 1500 [ 0 1500 ] PLine
-0 1500 [ 200 1500 ] PLine
-200 1500 [ 200 1300 ] PLine
-800 4200 [ 800 4050 ] PLine
-800 4050 [ 700 4050 ] PLine
-700 4050 [ 700 3900 ] PLine
--750 450 [ -900 450 ] PLine
--900 450 [ -900 1300 ] PLine
--1200 1600 [ -1275 1600 ] PLine
--1275 1600 [ -1275 900 ] PLine
--900 900 [ -1275 900 ] PLine
--600 1900 [ -600 1750 ] PLine
--600 1750 [ -975 1750 ] PLine
--975 1750 [ -975 1300 ] PLine
--975 1300 [ -900 1300 ] PLine
--1200 2100 [ -1275 2100 ] PLine
--1275 2100 [ -1275 1600 ] PLine
--1200 3000 [ -1275 3000 ] PLine
--1275 3000 [ -1275 2100 ] PLine
--900 3400 [ -900 3525 ] PLine
--900 3525 [ -1275 3525 ] PLine
--1100 4000 [ -1275 4000 ] PLine
--1275 4000 [ -1275 3000 ] PLine
-75 3500 [ 75 2100 ] PLine
-75 2100 [ 0 2100 ] PLine
-75 2200 [ 200 2200 ] PLine
-0 4479 [ 0 4400 ] PLine
-0 4400 [ 75 4400 ] PLine
-75 4400 [ 75 3500 ] PLine
--300 3700 [ -300 3500 ] PLine
--300 3500 [ 75 3500 ] PLine
-900 2500 [ 900 2200 ] PLine
-1000 4000 [ 1000 4200 ] PLine
-25 sg
-0 sg
-10 SetLine
--1350 0 [ -1350 4900 ] PLine
--1350 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 0 ] PLine
-1350 0 [ -1350 0 ] PLine
-10 SetLine
--1350 4700 [ -1350 4900 ] PLine
--1350 4900 [ -1150 4900 ] PLine
-10 SetLine
-1150 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 4700 ] PLine
-10 SetLine
-1150 0 [ 1350 0 ] PLine
-1350 0 [ 1350 200 ] PLine
-10 SetLine
--1350 200 [ -1350 0 ] PLine
--1350 0 [ -1150 0 ] PLine
-10 SetLine
--1050 1400 [ -1050 1200 ] PLine
--1050 1200 [ -1150 1200 ] PLine
--1150 1200 [ -1150 1400 ] PLine
--1150 1400 [ -1050 1400 ] PLine
-10 SetLine
--50 3300 [ -100 3300 ] PLine
-10 SetLine
-250 3235 [ -50 3235 ] PLine
--50 3235 [ -50 3365 ] PLine
--50 3365 [ 250 3365 ] PLine
-250 3365 [ 250 3235 ] PLine
-10 SetLine
-300 3300 [ 250 3300 ] PLine
-10 SetLine
-250 3100 [ 300 3100 ] PLine
-10 SetLine
--50 3165 [ 250 3165 ] PLine
-250 3165 [ 250 3035 ] PLine
-250 3035 [ -50 3035 ] PLine
--50 3035 [ -50 3165 ] PLine
-10 SetLine
--100 3100 [ -50 3100 ] PLine
-10 SetLine
--50 3500 [ -100 3500 ] PLine
-10 SetLine
-250 3435 [ -50 3435 ] PLine
--50 3435 [ -50 3565 ] PLine
--50 3565 [ 250 3565 ] PLine
-250 3565 [ 250 3435 ] PLine
-10 SetLine
-300 3500 [ 250 3500 ] PLine
-10 SetLine
--1150 3700 [ -1200 3700 ] PLine
-10 SetLine
--450 3575 [ -1150 3575 ] PLine
--1150 3575 [ -1150 3825 ] PLine
--1150 3825 [ -450 3825 ] PLine
--450 3825 [ -450 3575 ] PLine
-10 SetLine
--400 3700 [ -450 3700 ] PLine
-10 SetLine
--850 1300 [ -900 1300 ] PLine
-10 SetLine
--150 1175 [ -850 1175 ] PLine
--850 1175 [ -850 1425 ] PLine
--850 1425 [ -150 1425 ] PLine
--150 1425 [ -150 1175 ] PLine
-10 SetLine
--100 1300 [ -150 1300 ] PLine
-10 SetLine
-550 2800 [ 600 2800 ] PLine
-10 SetLine
--150 2925 [ 550 2925 ] PLine
-550 2925 [ 550 2675 ] PLine
-550 2675 [ -150 2675 ] PLine
--150 2675 [ -150 2925 ] PLine
-10 SetLine
--200 2800 [ -150 2800 ] PLine
-10 SetLine
--450 2800 [ -400 2800 ] PLine
-10 SetLine
--1150 2925 [ -450 2925 ] PLine
--450 2925 [ -450 2675 ] PLine
--450 2675 [ -1150 2675 ] PLine
--1150 2675 [ -1150 2925 ] PLine
-10 SetLine
--1200 2800 [ -1150 2800 ] PLine
-10 SetLine
-0 2150 [ 0 2100 ] PLine
-10 SetLine
-65 2450 [ 65 2150 ] PLine
-65 2150 [ -65 2150 ] PLine
--65 2150 [ -65 2450 ] PLine
--65 2450 [ 65 2450 ] PLine
-10 SetLine
-0 2500 [ 0 2450 ] PLine
-10 SetLine
--1200 3050 [ -1200 3000 ] PLine
-10 SetLine
--1135 3350 [ -1135 3050 ] PLine
--1135 3050 [ -1265 3050 ] PLine
--1265 3050 [ -1265 3350 ] PLine
--1265 3350 [ -1135 3350 ] PLine
-10 SetLine
--1200 3400 [ -1200 3350 ] PLine
-10 SetLine
--950 2250 [ -1150 2250 ] PLine
--1150 2250 [ -1150 2350 ] PLine
--1150 2350 [ -950 2350 ] PLine
--950 2350 [ -950 2250 ] PLine
-10 SetLine
--1150 2550 [ -950 2550 ] PLine
--950 2550 [ -950 2450 ] PLine
--950 2450 [ -1150 2450 ] PLine
--1150 2450 [ -1150 2550 ] PLine
-10 SetLine
-850 2850 [ 1050 2850 ] PLine
-1050 2850 [ 1050 2750 ] PLine
-1050 2750 [ 850 2750 ] PLine
-850 2750 [ 850 2850 ] PLine
-10 SetLine
-500 1900 [ 450 1900 ] PLine
-10 SetLine
-1200 1775 [ 500 1775 ] PLine
-500 1775 [ 500 2025 ] PLine
-500 2025 [ 1200 2025 ] PLine
-1200 2025 [ 1200 1775 ] PLine
-10 SetLine
-1250 1900 [ 1200 1900 ] PLine
-10 SetLine
--1150 900 [ -1200 900 ] PLine
-10 SetLine
--150 725 [ -1150 725 ] PLine
--1150 725 [ -1150 1075 ] PLine
--1150 1075 [ -150 1075 ] PLine
--150 1075 [ -150 725 ] PLine
-10 SetLine
--100 900 [ -150 900 ] PLine
-10 SetLine
--1050 4000 [ -1100 4000 ] PLine
-10 SetLine
--750 3935 [ -1050 3935 ] PLine
--1050 3935 [ -1050 4065 ] PLine
--1050 4065 [ -750 4065 ] PLine
--750 4065 [ -750 3935 ] PLine
-10 SetLine
--700 4000 [ -750 4000 ] PLine
-10 SetLine
-750 3000 [ 700 3000 ] PLine
-10 SetLine
-1050 2935 [ 750 2935 ] PLine
-750 2935 [ 750 3065 ] PLine
-750 3065 [ 1050 3065 ] PLine
-1050 3065 [ 1050 2935 ] PLine
-10 SetLine
-1100 3000 [ 1050 3000 ] PLine
-10 SetLine
--250 3750 [ -50 3750 ] PLine
--50 3750 [ -50 3650 ] PLine
--50 3650 [ -250 3650 ] PLine
--250 3650 [ -250 3750 ] PLine
-10 SetLine
-200 900 [ 150 900 ] PLine
-10 SetLine
-270 950 [ 270 850 ] PLine
-10 SetLine
-200 850 [ 200 950 ] PLine
-200 950 [ 500 950 ] PLine
-500 950 [ 500 850 ] PLine
-500 850 [ 200 850 ] PLine
-10 SetLine
-500 900 [ 550 900 ] PLine
-10 SetLine
-250 850 [ 250 950 ] PLine
-10 SetLine
-260 850 [ 260 950 ] PLine
-10 SetLine
-600 3700 [ 650 3700 ] PLine
-10 SetLine
-530 3650 [ 530 3750 ] PLine
-10 SetLine
-600 3750 [ 600 3650 ] PLine
-600 3650 [ 300 3650 ] PLine
-300 3650 [ 300 3750 ] PLine
-300 3750 [ 600 3750 ] PLine
-10 SetLine
-300 3700 [ 250 3700 ] PLine
-10 SetLine
-550 3750 [ 550 3650 ] PLine
-10 SetLine
-540 3750 [ 540 3650 ] PLine
-10 SetLine
--750 550 100 PCircle
-10 SetLine
-0 550 100 PCircle
-10 SetLine
-750 550 100 PCircle
-10 SetLine
-768 5000 [ 768 5248 ] PLine
-768 5248 [ -768 5248 ] PLine
--768 5248 [ -768 5000 ] PLine
-10 SetLine
-1058 4900 [ -1058 4900 ] PLine
-10 SetLine
-1058 5000 [ 1058 4408 ] PLine
-1058 4408 [ -1058 4408 ] PLine
--1058 4408 [ -1058 5000 ] PLine
--1058 5000 [ 1058 5000 ] PLine
-10 SetLine
-1058 5000 [ -1058 5000 ] PLine
-10 SetLine
-768 4900 [ 768 4408 ] PLine
-10 SetLine
--768 4900 [ -768 4408 ] PLine
-10 SetLine
-900 200 [ 1100 200 ] PLine
-1100 200 [ 1100 100 ] PLine
-1100 100 [ 900 100 ] PLine
-900 100 [ 900 200 ] PLine
-10 SetLine
--100 200 [ 100 200 ] PLine
-100 200 [ 100 100 ] PLine
-100 100 [ -100 100 ] PLine
--100 100 [ -100 200 ] PLine
-10 SetLine
--1100 200 [ -900 200 ] PLine
--900 200 [ -900 100 ] PLine
--900 100 [ -1100 100 ] PLine
--1100 100 [ -1100 200 ] PLine
-10 SetLine
-916 3493 [ 900 3456 ] PLine
-900 3456 [ 939 3442 ] PLine
-939 3442 [ 953 3477 ] PLine
-10 SetLine
-988 3612 140 PCircle
-10 SetLine
--1000 1529 [ -1039 1490 ] PLine
-10 SetLine
--1000 1490 [ -1000 1910 ] PLine
--1000 1910 [ -1300 1910 ] PLine
--1300 1910 [ -1300 1490 ] PLine
--1300 1490 [ -1000 1490 ] PLine
-10 SetLine
-200 1730 [ 200 1670 ] PLine
-200 1670 [ 0 1670 ] PLine
-0 1670 [ 0 1730 ] PLine
-0 1730 [ 200 1730 ] PLine
-10 SetLine
-200 1700 [ 260 1700 ] PLine
-10 SetLine
-0 1700 [ -50 1700 ] PLine
-10 SetLine
-300 1270 [ 300 1330 ] PLine
-300 1330 [ 500 1330 ] PLine
-500 1330 [ 500 1270 ] PLine
-500 1270 [ 300 1270 ] PLine
-10 SetLine
-300 1300 [ 240 1300 ] PLine
-10 SetLine
-500 1300 [ 550 1300 ] PLine
-10 SetLine
--600 2270 [ -600 2330 ] PLine
--600 2330 [ -400 2330 ] PLine
--400 2330 [ -400 2270 ] PLine
--400 2270 [ -600 2270 ] PLine
-10 SetLine
--600 2300 [ -660 2300 ] PLine
-10 SetLine
--400 2300 [ -350 2300 ] PLine
-10 SetLine
--800 4230 [ -800 4170 ] PLine
--800 4170 [ -1000 4170 ] PLine
--1000 4170 [ -1000 4230 ] PLine
--1000 4230 [ -800 4230 ] PLine
-10 SetLine
--800 4200 [ -740 4200 ] PLine
-10 SetLine
--1000 4200 [ -1050 4200 ] PLine
-10 SetLine
-1000 3230 [ 1000 3170 ] PLine
-1000 3170 [ 800 3170 ] PLine
-800 3170 [ 800 3230 ] PLine
-800 3230 [ 1000 3230 ] PLine
-10 SetLine
-1000 3200 [ 1060 3200 ] PLine
-10 SetLine
-800 3200 [ 750 3200 ] PLine
-10 SetLine
--600 2470 [ -600 2530 ] PLine
--600 2530 [ -400 2530 ] PLine
--400 2530 [ -400 2470 ] PLine
--400 2470 [ -600 2470 ] PLine
-10 SetLine
--600 2500 [ -660 2500 ] PLine
-10 SetLine
--400 2500 [ -350 2500 ] PLine
-10 SetLine
--600 2070 [ -600 2130 ] PLine
--600 2130 [ -400 2130 ] PLine
--400 2130 [ -400 2070 ] PLine
--400 2070 [ -600 2070 ] PLine
-10 SetLine
--600 2100 [ -660 2100 ] PLine
-10 SetLine
--400 2100 [ -350 2100 ] PLine
-10 SetLine
--900 2130 [ -900 2070 ] PLine
--900 2070 [ -1100 2070 ] PLine
--1100 2070 [ -1100 2130 ] PLine
--1100 2130 [ -900 2130 ] PLine
-10 SetLine
--900 2100 [ -840 2100 ] PLine
-10 SetLine
--1100 2100 [ -1150 2100 ] PLine
-10 SetLine
-500 1130 [ 500 1070 ] PLine
-500 1070 [ 300 1070 ] PLine
-300 1070 [ 300 1130 ] PLine
-300 1130 [ 500 1130 ] PLine
-10 SetLine
-500 1100 [ 560 1100 ] PLine
-10 SetLine
-300 1100 [ 250 1100 ] PLine
-10 SetLine
-1000 2521 [ 1039 2560 ] PLine
-10 SetLine
-1000 2560 [ 1000 2140 ] PLine
-1000 2140 [ 1300 2140 ] PLine
-1300 2140 [ 1300 2560 ] PLine
-1300 2560 [ 1000 2560 ] PLine
-10 SetLine
-0 1870 [ 0 1930 ] PLine
-0 1930 [ 200 1930 ] PLine
-200 1930 [ 200 1870 ] PLine
-200 1870 [ 0 1870 ] PLine
-10 SetLine
-0 1900 [ -60 1900 ] PLine
-10 SetLine
-200 1900 [ 250 1900 ] PLine
-10 SetLine
-100 1470 [ 100 1530 ] PLine
-100 1530 [ 300 1530 ] PLine
-300 1530 [ 300 1470 ] PLine
-300 1470 [ 100 1470 ] PLine
-10 SetLine
-100 1500 [ 40 1500 ] PLine
-10 SetLine
-300 1500 [ 350 1500 ] PLine
-10 SetLine
--950 1650 [ -250 1650 ] PLine
--250 1650 [ -250 1850 ] PLine
--250 1850 [ -950 1850 ] PLine
--950 1850 [ -950 1775 ] PLine
--950 1775 [ -900 1775 ] PLine
--900 1775 [ -900 1725 ] PLine
--900 1725 [ -950 1725 ] PLine
--950 1725 [ -950 1650 ] PLine
-10 SetLine
-150 2250 [ 950 2250 ] PLine
-950 2250 [ 950 2450 ] PLine
-950 2450 [ 150 2450 ] PLine
-150 2450 [ 150 2375 ] PLine
-150 2375 [ 200 2375 ] PLine
-200 2375 [ 200 2325 ] PLine
-200 2325 [ 150 2325 ] PLine
-150 2325 [ 150 2250 ] PLine
-10 SetLine
-150 3950 [ 1150 3950 ] PLine
-1150 3950 [ 1150 4150 ] PLine
-1150 4150 [ 150 4150 ] PLine
-150 4150 [ 150 4075 ] PLine
-150 4075 [ 200 4075 ] PLine
-200 4075 [ 200 4025 ] PLine
-200 4025 [ 150 4025 ] PLine
-150 4025 [ 150 3950 ] PLine
-10 SetLine
--1050 3150 [ -250 3150 ] PLine
--250 3150 [ -250 3350 ] PLine
--250 3350 [ -1050 3350 ] PLine
--1050 3350 [ -1050 3275 ] PLine
--1050 3275 [ -1000 3275 ] PLine
--1000 3275 [ -1000 3225 ] PLine
--1000 3225 [ -1050 3225 ] PLine
--1050 3225 [ -1050 3150 ] PLine
-10 SetLine
-800 1075 [ 800 1675 ] PLine
-800 1675 [ 1200 1675 ] PLine
-1200 1675 [ 1200 1075 ] PLine
-1200 1075 [ 800 1075 ] PLine
-10 SetLine
-875 1075 [ 875 825 ] PLine
-875 825 [ 925 825 ] PLine
-925 825 [ 925 1075 ] PLine
-10 SetLine
-1075 1075 [ 1075 825 ] PLine
-1075 825 [ 1125 825 ] PLine
-1125 825 [ 1125 1075 ] PLine
-10 SetLine
-975 1075 [ 975 825 ] PLine
-975 825 [ 1025 825 ] PLine
-1025 825 [ 1025 1075 ] PLine
-10 SetLine
-996 1549 75 PCircle
-10 SetLine
-800 1425 [ 1200 1425 ] PLine
-10 SetLine
--100 4200 [ -25 4200 ] PLine
-10 SetLine
--100 3900 [ -100 4300 ] PLine
--100 4300 [ -500 4300 ] PLine
--500 4300 [ -500 3900 ] PLine
--500 3900 [ -100 3900 ] PLine
-10 SetLine
--100 4000 [ -25 4000 ] PLine
-10 SetLine
--1100 450 100 PCircle
-10 SetLine
-1100 450 100 PCircle
-10 SetLine
-1000 3430 [ 1000 3370 ] PLine
-1000 3370 [ 800 3370 ] PLine
-800 3370 [ 800 3430 ] PLine
-800 3430 [ 1000 3430 ] PLine
-10 SetLine
-1000 3400 [ 1060 3400 ] PLine
-10 SetLine
-800 3400 [ 750 3400 ] PLine
-10 SetText2
-0 -1175 1225 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -1175 1279 [ [ -53 0 -56 4 -65 11 0 11 ] ] Char
-0 -1175 1310 [ [ -65 29 -65 6 -37 4 -40 6 -43 13 -43 20 -40 27 -34 31 -25 34 -18 31 -9 29 -3 25 0 18 0 11 -3 4 -6 2 -12 0 ] ] Char
-10 SetText2
-0 75 3375 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 129 3375 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-10 SetText2
-0 75 3175 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 129 3175 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-10 SetText2
-0 75 3575 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 129 3575 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -825 3850 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -771 3850 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -575 1450 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -521 1450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -490 1450 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-10 SetText2
-0 125 2950 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 179 2950 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 210 2950 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -825 2950 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -771 2950 [ [ 29 43 27 34 22 28 15 25 13 25 6 28 2 34 0 43 0 46 2 56 6 62 13 65 15 65 22 62 27 56 29 43 29 28 27 12 22 3 15 0 11 0 4 3 2 9 ] ] Char
-10 SetText2
-0 -100 2250 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -100 2304 [ [ -53 0 -56 4 -65 11 0 11 ] ] Char
-0 -100 2335 [ [ -65 4 -65 29 -40 15 -40 22 -37 27 -34 29 -25 31 -18 31 -9 29 -3 25 0 18 0 11 -3 4 -6 2 -12 0 ] ] Char
-10 SetText2
-0 -1275 3200 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -1275 3254 [ [ -50 2 -53 2 -59 4 -62 6 -65 11 -65 20 -62 25 -59 27 -53 29 -46 29 -40 27 -31 22 0 0 0 31 ] ] Char
-10 SetText2
-0 -1100 2375 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -1046 2375 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -1015 2375 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1100 2575 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -1046 2575 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -1015 2575 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 900 2875 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 954 2875 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 985 2875 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 800 2050 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 854 2050 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 885 2050 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-10 SetText2
-0 -675 1100 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -621 1100 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -590 1100 [ [ 11 65 4 62 2 56 2 50 4 43 9 40 18 37 25 34 29 28 31 21 31 12 29 6 27 3 20 0 11 0 4 3 2 6 0 12 0 21 2 28 6 34 13 37 22 40 27 43 29 50 29 56 27 62 20 65 11 65 ] ] Char
-10 SetText2
-0 -925 4075 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -871 4075 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 875 3075 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 929 3075 [ [ 11 65 4 62 2 56 2 50 4 43 9 40 18 37 25 34 29 28 31 21 31 12 29 6 27 3 20 0 11 0 4 3 2 6 0 12 0 21 2 28 6 34 13 37 22 40 27 43 29 50 29 56 27 62 20 65 11 65 ] ] Char
-10 SetText2
-0 -200 3775 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -146 3775 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 325 975 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 377 975 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 450 3775 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 502 3775 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -775 675 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 -732 675 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -50 675 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 -7 675 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 700 675 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 743 675 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 -1175 4650 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 -1132 4650 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1125 125 [ [ 0 65 0 0 27 0 ] ] Char
-0 1172 125 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 1222 125 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 1274 125 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 125 125 [ [ 0 65 0 0 27 0 ] ] Char
-0 172 125 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 222 125 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 274 125 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -875 125 [ [ 0 65 0 0 27 0 ] ] Char
-0 -828 125 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -778 125 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -726 125 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1075 3425 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] [ 20 12 34 -6 ] ] Char
-0 1131 3425 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1075 1475 [ [ 0 -65 0 0 ] [ 0 -65 -20 -65 -27 -62 -29 -59 -31 -53 -31 -46 -29 -40 -27 -37 -20 -34 0 -34 ] [ -15 -34 -31 0 ] ] Char
-0 -1127 1475 [ [ -11 -65 -4 -62 -2 -56 -2 -50 -4 -43 -9 -40 -18 -37 -25 -34 -29 -28 -31 -21 -31 -12 -29 -6 -27 -3 -20 0 -11 0 -4 -3 -2 -6 0 -12 0 -21 -2 -28 -6 -34 -13 -37 -22 -40 -27 -43 -29 -50 -29 -56 -27 -62 -20 -65 -11 -65 ] ] Char
-10 SetText2
-0 25 1750 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 77 1750 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 108 1750 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 350 1350 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 402 1350 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 433 1350 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -550 2350 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -498 2350 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 -925 4250 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -873 4250 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 850 3250 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 902 3250 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -550 2550 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -498 2550 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -550 2150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -498 2150 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-10 SetText2
-0 -1025 2150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -973 2150 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 350 1150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 402 1150 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 433 1150 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 1200 2125 [ [ 0 -65 0 0 ] [ 0 -65 -20 -65 -27 -62 -29 -59 -31 -53 -31 -46 -29 -40 -27 -37 -20 -34 0 -34 ] [ -15 -34 -31 0 ] ] Char
-0 1148 2125 [ [ -31 -65 -9 0 ] [ 0 -65 -31 -65 ] ] Char
-10 SetText2
-0 50 1950 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 102 1950 [ [ 29 43 27 34 22 28 15 25 13 25 6 28 2 34 0 43 0 46 2 56 6 62 13 65 15 65 22 62 27 56 29 43 29 28 27 12 22 3 15 0 11 0 4 3 2 9 ] ] Char
-10 SetText2
-0 150 1550 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 202 1550 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 233 1550 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -675 1950 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -623 1950 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 450 2550 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 502 2550 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 500 4275 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 552 4275 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -675 3450 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -623 3450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 950 1700 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 1002 1700 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -350 4325 [ [ 0 65 31 0 ] [ 31 65 0 0 ] ] Char
-0 -298 4325 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1225 600 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 -1169 600 [ [ 0 65 0 0 ] [ 31 65 31 0 ] [ 0 34 31 34 ] ] Char
-0 -1117 600 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1125 600 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 1181 600 [ [ 0 65 0 0 ] [ 31 65 31 0 ] [ 0 34 31 34 ] ] Char
-0 1233 600 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 800 3450 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 852 3450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 883 3450 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-0 0 60 /PRndPad SetFlash
--1100 1450 Flash
--1100 1150 Flash
-300 3300 Flash
--100 3300 Flash
--100 3100 Flash
-300 3100 Flash
-300 3500 Flash
--100 3500 Flash
--400 3700 Flash
--1200 3700 Flash
--100 1300 Flash
--900 1300 Flash
--200 2800 Flash
-600 2800 Flash
--1200 2800 Flash
--400 2800 Flash
-0 2500 Flash
-0 2100 Flash
--1200 3400 Flash
--1200 3000 Flash
--900 2300 Flash
--1200 2300 Flash
--1200 2500 Flash
--900 2500 Flash
-800 2800 Flash
-1100 2800 Flash
-1250 1900 Flash
-450 1900 Flash
--100 900 Flash
--1200 900 Flash
--700 4000 Flash
--1100 4000 Flash
-1100 3000 Flash
-700 3000 Flash
--300 3700 Flash
-0 3700 Flash
-0 0 60 /PSqrPad SetFlash
-100 900 Flash
-0 0 60 /PRndPad SetFlash
-600 900 Flash
-0 0 60 /PSqrPad SetFlash
-700 3700 Flash
-0 0 60 /PRndPad SetFlash
-200 3700 Flash
-0 0 70 /PRndPad SetFlash
--750 550 Flash
--750 450 Flash
-0 550 Flash
-0 450 Flash
-750 550 Flash
-750 450 Flash
--648 4479 Flash
--540 4479 Flash
--432 4479 Flash
--324 4479 Flash
--216 4479 Flash
--108 4479 Flash
-0 4479 Flash
-108 4479 Flash
-216 4479 Flash
-324 4479 Flash
-432 4479 Flash
-540 4479 Flash
-648 4479 Flash
--594 4593 Flash
--486 4593 Flash
--378 4593 Flash
--270 4593 Flash
--162 4593 Flash
--54 4593 Flash
-54 4593 Flash
-162 4593 Flash
-270 4593 Flash
-378 4593 Flash
-486 4593 Flash
-594 4593 Flash
-0 0 177 /PRndPad SetFlash
-940 4536 Flash
--940 4536 Flash
-0 0 60 /PSqrPad SetFlash
-950 150 Flash
-0 0 60 /PRndPad SetFlash
-1050 150 Flash
-0 0 60 /PSqrPad SetFlash
--50 150 Flash
-0 0 60 /PRndPad SetFlash
-50 150 Flash
-0 0 60 /PSqrPad SetFlash
--1050 150 Flash
-0 0 60 /PRndPad SetFlash
--950 150 Flash
-0 0 50 /PRndPad SetFlash
-950 3524 Flash
-1026 3612 Flash
-950 3700 Flash
-0 0 60 /PSqrPad SetFlash
--1200 1600 Flash
-0 0 60 /PRndPad SetFlash
--1100 1700 Flash
--1200 1800 Flash
-300 1700 Flash
--100 1700 Flash
-200 1300 Flash
-600 1300 Flash
--700 2300 Flash
--300 2300 Flash
--700 4200 Flash
--1100 4200 Flash
-1100 3200 Flash
-700 3200 Flash
--700 2500 Flash
--300 2500 Flash
--700 2100 Flash
--300 2100 Flash
--800 2100 Flash
--1200 2100 Flash
-600 1100 Flash
-200 1100 Flash
-0 0 60 /PSqrPad SetFlash
-1200 2450 Flash
-0 0 60 /PRndPad SetFlash
-1100 2350 Flash
-1200 2250 Flash
--100 1900 Flash
-300 1900 Flash
-0 1500 Flash
-400 1500 Flash
-0 0 60 /PSqrPad SetFlash
--900 1600 Flash
-0 0 60 /PRndPad SetFlash
--800 1600 Flash
--700 1600 Flash
--600 1600 Flash
--500 1600 Flash
--400 1600 Flash
--300 1600 Flash
--300 1900 Flash
--400 1900 Flash
--500 1900 Flash
--600 1900 Flash
--700 1900 Flash
--800 1900 Flash
--900 1900 Flash
-0 0 60 /PSqrPad SetFlash
-200 2200 Flash
-0 0 60 /PRndPad SetFlash
-300 2200 Flash
-400 2200 Flash
-500 2200 Flash
-600 2200 Flash
-700 2200 Flash
-800 2200 Flash
-900 2200 Flash
-900 2500 Flash
-800 2500 Flash
-700 2500 Flash
-600 2500 Flash
-500 2500 Flash
-400 2500 Flash
-300 2500 Flash
-200 2500 Flash
-0 0 60 /PSqrPad SetFlash
-200 3900 Flash
-0 0 60 /PRndPad SetFlash
-300 3900 Flash
-400 3900 Flash
-500 3900 Flash
-600 3900 Flash
-700 3900 Flash
-800 3900 Flash
-900 3900 Flash
-1000 3900 Flash
-1100 3900 Flash
-1100 4200 Flash
-1000 4200 Flash
-900 4200 Flash
-800 4200 Flash
-700 4200 Flash
-600 4200 Flash
-500 4200 Flash
-400 4200 Flash
-300 4200 Flash
-200 4200 Flash
-0 0 60 /PSqrPad SetFlash
--1000 3100 Flash
-0 0 60 /PRndPad SetFlash
--900 3100 Flash
--800 3100 Flash
--700 3100 Flash
--600 3100 Flash
--500 3100 Flash
--400 3100 Flash
--300 3100 Flash
--300 3400 Flash
--400 3400 Flash
--500 3400 Flash
--600 3400 Flash
--700 3400 Flash
--800 3400 Flash
--900 3400 Flash
--1000 3400 Flash
-0 0 70 /PRndPad SetFlash
-900 800 Flash
-1100 800 Flash
-1000 800 Flash
-0 0 177 /PRndPad SetFlash
-1000 1550 Flash
-0 0 60 /PRndPad SetFlash
-0 4000 Flash
-0 4200 Flash
-0 0 250 /PRndPad SetFlash
--1100 450 Flash
-1100 450 Flash
-0 0 60 /PRndPad SetFlash
-1100 3400 Flash
-700 3400 Flash
-0 0 60 /PRndPad SetFlash
--1100 1450 Flash
--1100 1150 Flash
-300 3300 Flash
--100 3300 Flash
--100 3100 Flash
-300 3100 Flash
-300 3500 Flash
--100 3500 Flash
--400 3700 Flash
--1200 3700 Flash
--100 1300 Flash
--900 1300 Flash
--200 2800 Flash
-600 2800 Flash
--1200 2800 Flash
--400 2800 Flash
-0 2500 Flash
-0 2100 Flash
--1200 3400 Flash
--1200 3000 Flash
--900 2300 Flash
--1200 2300 Flash
--1200 2500 Flash
--900 2500 Flash
-800 2800 Flash
-1100 2800 Flash
-1250 1900 Flash
-450 1900 Flash
--100 900 Flash
--1200 900 Flash
--700 4000 Flash
--1100 4000 Flash
-1100 3000 Flash
-700 3000 Flash
--300 3700 Flash
-0 3700 Flash
-0 0 60 /PSqrPad SetFlash
-100 900 Flash
-0 0 60 /PRndPad SetFlash
-600 900 Flash
-0 0 60 /PSqrPad SetFlash
-700 3700 Flash
-0 0 60 /PRndPad SetFlash
-200 3700 Flash
-0 0 70 /PRndPad SetFlash
--750 550 Flash
--750 450 Flash
-0 550 Flash
-0 450 Flash
-750 550 Flash
-750 450 Flash
--648 4479 Flash
--540 4479 Flash
--432 4479 Flash
--324 4479 Flash
--216 4479 Flash
--108 4479 Flash
-0 4479 Flash
-108 4479 Flash
-216 4479 Flash
-324 4479 Flash
-432 4479 Flash
-540 4479 Flash
-648 4479 Flash
--594 4593 Flash
--486 4593 Flash
--378 4593 Flash
--270 4593 Flash
--162 4593 Flash
--54 4593 Flash
-54 4593 Flash
-162 4593 Flash
-270 4593 Flash
-378 4593 Flash
-486 4593 Flash
-594 4593 Flash
-0 0 177 /PRndPad SetFlash
-940 4536 Flash
--940 4536 Flash
-0 0 60 /PSqrPad SetFlash
-950 150 Flash
-0 0 60 /PRndPad SetFlash
-1050 150 Flash
-0 0 60 /PSqrPad SetFlash
--50 150 Flash
-0 0 60 /PRndPad SetFlash
-50 150 Flash
-0 0 60 /PSqrPad SetFlash
--1050 150 Flash
-0 0 60 /PRndPad SetFlash
--950 150 Flash
-0 0 50 /PRndPad SetFlash
-950 3524 Flash
-1026 3612 Flash
-950 3700 Flash
-0 0 60 /PSqrPad SetFlash
--1200 1600 Flash
-0 0 60 /PRndPad SetFlash
--1100 1700 Flash
--1200 1800 Flash
-300 1700 Flash
--100 1700 Flash
-200 1300 Flash
-600 1300 Flash
--700 2300 Flash
--300 2300 Flash
--700 4200 Flash
--1100 4200 Flash
-1100 3200 Flash
-700 3200 Flash
--700 2500 Flash
--300 2500 Flash
--700 2100 Flash
--300 2100 Flash
--800 2100 Flash
--1200 2100 Flash
-600 1100 Flash
-200 1100 Flash
-0 0 60 /PSqrPad SetFlash
-1200 2450 Flash
-0 0 60 /PRndPad SetFlash
-1100 2350 Flash
-1200 2250 Flash
--100 1900 Flash
-300 1900 Flash
-0 1500 Flash
-400 1500 Flash
-0 0 60 /PSqrPad SetFlash
--900 1600 Flash
-0 0 60 /PRndPad SetFlash
--800 1600 Flash
--700 1600 Flash
--600 1600 Flash
--500 1600 Flash
--400 1600 Flash
--300 1600 Flash
--300 1900 Flash
--400 1900 Flash
--500 1900 Flash
--600 1900 Flash
--700 1900 Flash
--800 1900 Flash
--900 1900 Flash
-0 0 60 /PSqrPad SetFlash
-200 2200 Flash
-0 0 60 /PRndPad SetFlash
-300 2200 Flash
-400 2200 Flash
-500 2200 Flash
-600 2200 Flash
-700 2200 Flash
-800 2200 Flash
-900 2200 Flash
-900 2500 Flash
-800 2500 Flash
-700 2500 Flash
-600 2500 Flash
-500 2500 Flash
-400 2500 Flash
-300 2500 Flash
-200 2500 Flash
-0 0 60 /PSqrPad SetFlash
-200 3900 Flash
-0 0 60 /PRndPad SetFlash
-300 3900 Flash
-400 3900 Flash
-500 3900 Flash
-600 3900 Flash
-700 3900 Flash
-800 3900 Flash
-900 3900 Flash
-1000 3900 Flash
-1100 3900 Flash
-1100 4200 Flash
-1000 4200 Flash
-900 4200 Flash
-800 4200 Flash
-700 4200 Flash
-600 4200 Flash
-500 4200 Flash
-400 4200 Flash
-300 4200 Flash
-200 4200 Flash
-0 0 60 /PSqrPad SetFlash
--1000 3100 Flash
-0 0 60 /PRndPad SetFlash
--900 3100 Flash
--800 3100 Flash
--700 3100 Flash
--600 3100 Flash
--500 3100 Flash
--400 3100 Flash
--300 3100 Flash
--300 3400 Flash
--400 3400 Flash
--500 3400 Flash
--600 3400 Flash
--700 3400 Flash
--800 3400 Flash
--900 3400 Flash
--1000 3400 Flash
-0 0 70 /PRndPad SetFlash
-900 800 Flash
-1100 800 Flash
-1000 800 Flash
-0 0 177 /PRndPad SetFlash
-1000 1550 Flash
-0 0 60 /PRndPad SetFlash
-0 4000 Flash
-0 4200 Flash
-0 0 250 /PRndPad SetFlash
--1100 450 Flash
-1100 450 Flash
-0 0 60 /PRndPad SetFlash
-1100 3400 Flash
-700 3400 Flash
-10 SetText2
-0 -225 875 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 1125 1875 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 -125 2775 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 -1125 2775 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 -525 3675 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 -700 4325 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -750 275 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 34 25 ] [ 22 25 34 25 ] ] Char
-0 -696 275 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -640 275 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -588 275 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 34 25 ] [ 22 25 34 25 ] ] Char
-0 -534 275 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -484 275 [ [ 15 65 15 0 ] [ 0 65 31 65 ] ] Char
-0 -380 275 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 ] [ 0 34 20 34 27 31 29 28 31 21 31 12 29 6 27 3 20 0 0 0 ] ] Char
-0 -328 275 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-0 -272 275 [ [ 0 65 31 0 ] [ 31 65 0 0 ] ] Char
-0 -168 275 [ [ 0 28 40 28 ] ] Char
-0 -55 275 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -3 275 [ [ 0 65 0 0 ] [ 0 65 31 0 ] [ 31 65 31 0 ] ] Char
-0 49 275 [ [ 0 65 0 0 ] ] Char
-0 69 275 [ [ 0 65 18 0 ] [ 36 65 18 0 ] ] Char
-0 177 275 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-0 233 275 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] ] Char
-0 335 275 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 387 275 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 437 275 [ [ 0 65 0 0 27 0 ] ] Char
-0 484 275 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 540 275 [ [ 0 65 11 0 ] [ 22 65 11 0 ] [ 22 65 34 0 ] [ 45 65 34 0 ] ] Char
-0 605 275 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 661 275 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 713 275 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-10 SetText2
-0 125 600 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 177 600 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 229 600 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 500 600 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-0 561 600 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 592 600 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -625 600 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -569 600 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -517 600 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -465 600 [ [ 0 65 0 0 ] ] Char
-0 -445 600 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-10 SetText2
-0 -300 4725 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-0 -248 4725 [ [ 0 65 0 0 ] ] Char
-0 -228 4725 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -176 4725 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -74 4725 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 300 4725 [ [ -31 56 -27 62 -20 65 -11 65 -4 62 0 56 0 50 -2 43 -4 40 -9 37 -22 31 -27 28 -29 25 -31 18 -31 9 -27 3 -20 0 -11 0 -4 3 0 9 ] ] Char
-0 248 4725 [ [ 0 65 0 0 ] ] Char
-0 228 4725 [ [ 0 65 0 0 ] [ 0 65 -15 65 -22 62 -27 56 -29 50 -31 40 -31 25 -29 15 -27 9 -22 3 -15 0 0 0 ] ] Char
-0 176 4725 [ [ 0 65 0 0 ] [ 0 65 -29 65 ] [ 0 34 -18 34 ] [ 0 0 -29 0 ] ] Char
-0 74 4725 [ [ -2 50 -2 53 -4 59 -6 62 -11 65 -20 65 -25 62 -27 59 -29 53 -29 46 -27 40 -22 31 0 0 -31 0 ] ] Char
-10 SetText2
-0 1100 2075 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1050 1925 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 875 675 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1075 675 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 975 675 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -925 1475 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 175 3775 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1050 2975 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 625 4325 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 656 4325 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -825 1275 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-0 0 55 /PRndPad SetFlash
--200 2350 Flash
--200 1750 Flash
-200 1400 Flash
-0 0 55 /PRndPad SetFlash
--200 2350 Flash
--200 1750 Flash
-200 1400 Flash
-0 0 55 /PRndPad SetFlash
-300 1100 Flash
-0 0 55 /PRndPad SetFlash
-300 1100 Flash
-0 0 55 /PRndPad SetFlash
-175 3300 Flash
-0 0 55 /PRndPad SetFlash
-175 3300 Flash
-0 0 55 /PRndPad SetFlash
-1000 2650 Flash
-0 0 55 /PRndPad SetFlash
-1000 2650 Flash
-0 0 55 /PRndPad SetFlash
--450 2100 Flash
-0 0 55 /PRndPad SetFlash
--450 2100 Flash
-0 0 55 /PRndPad SetFlash
--650 2600 Flash
--100 2600 Flash
--100 2250 Flash
-0 0 55 /PRndPad SetFlash
--650 2600 Flash
--100 2600 Flash
--100 2250 Flash
-0 0 55 /PRndPad SetFlash
-800 1800 Flash
-0 0 55 /PRndPad SetFlash
-800 1800 Flash
-0 0 55 /PRndPad SetFlash
-700 1900 Flash
-0 0 55 /PRndPad SetFlash
-700 1900 Flash
-0 0 55 /PRndPad SetFlash
-600 1700 Flash
-0 0 55 /PRndPad SetFlash
-600 1700 Flash
-0 0 55 /PRndPad SetFlash
-500 1600 Flash
-0 0 55 /PRndPad SetFlash
-500 1600 Flash
-0 0 55 /PRndPad SetFlash
-0 4100 Flash
-900 4100 Flash
-0 0 55 /PRndPad SetFlash
-0 4100 Flash
-900 4100 Flash
-0 0 55 /PRndPad SetFlash
-800 3000 Flash
-0 0 55 /PRndPad SetFlash
-800 3000 Flash
-0 0 55 /PRndPad SetFlash
-600 3700 Flash
-0 0 55 /PRndPad SetFlash
-600 3700 Flash
-0 0 55 /PRndPad SetFlash
-450 2700 Flash
--400 2700 Flash
--400 2300 Flash
-0 0 55 /PRndPad SetFlash
-450 2700 Flash
--400 2700 Flash
--400 2300 Flash
-0 0 55 /PRndPad SetFlash
-350 3800 Flash
-0 0 55 /PRndPad SetFlash
-350 3800 Flash
-0 0 55 /PRndPad SetFlash
--850 3700 Flash
-0 0 55 /PRndPad SetFlash
--850 3700 Flash
-0 0 55 /PRndPad SetFlash
-400 1300 Flash
-0 0 55 /PRndPad SetFlash
-400 1300 Flash
-0 0 55 /PRndPad SetFlash
--1050 1050 Flash
-0 0 55 /PRndPad SetFlash
--1050 1050 Flash
-0 0 55 /PRndPad SetFlash
-0 4475 Flash
-75 4000 Flash
-1000 4000 Flash
-0 0 55 /PRndPad SetFlash
-0 4475 Flash
-75 4000 Flash
-1000 4000 Flash
-0 0 55 /PRndPad SetFlash
-950 3200 Flash
-0 0 55 /PRndPad SetFlash
-950 3200 Flash
-0 0 55 /PRndPad SetFlash
-850 1200 Flash
--600 1200 Flash
-0 0 55 /PRndPad SetFlash
-850 1200 Flash
--600 1200 Flash
-0 0 55 /PRndPad SetFlash
--550 3900 Flash
--350 3900 Flash
-0 0 55 /PRndPad SetFlash
--550 3900 Flash
--350 3900 Flash
-0 0 55 /PRndPad SetFlash
--800 4300 Flash
-0 0 55 /PRndPad SetFlash
--800 4300 Flash
-0 0 55 /PRndPad SetFlash
--750 4350 Flash
-0 0 55 /PRndPad SetFlash
--750 4350 Flash
-0 0 55 /PRndPad SetFlash
-400 3400 Flash
-0 0 55 /PRndPad SetFlash
-400 3400 Flash
-grestore
-showpage
diff --git a/usr.sbin/xntpd/gadget/sm0228.lpr b/usr.sbin/xntpd/gadget/sm0228.lpr
deleted file mode 100644
index cd39c9ca9291..000000000000
--- a/usr.sbin/xntpd/gadget/sm0228.lpr
+++ /dev/null
@@ -1,744 +0,0 @@
-%!PS-Adobe-2.0
-%%Title: PADS Postscript Driver Header
-%%Creator: Andy Montalvo, 18 Lupine St., Lowell, MA 01851
-%%CreationDate: 06/08/90
-%%For: CAD Software, Littleton, MA
-%%EndComments
-%%BeginProcSet: Markers 1.0 0
-% marker attributes
-/MAttr_Width 1 def
-/MAttr_Size 0 def
-/MAttr_Type /M1 def
-% procedures
-/M1 { %def
-% draw marker 1: plus
-% Stack: - M1 -
- -2 0 rmoveto
- 4 0 rlineto
- -2 2 rmoveto
- 0 -4 rlineto
-} bind def
-/M2 { %def
-% draw marker 2: cross
-% Stack: - M2 -
- -2 -2 rmoveto
- 4 4 rlineto
- -4 0 rmoveto
- 4 -4 rlineto
-} bind def
-/M3 { %def
-% draw marker 3: square
-% Stack: - M3 -
- 0 2 rlineto
- 2 0 rlineto
- 0 -4 rlineto
- -4 0 rlineto
- 0 4 rlineto
- 2 0 rlineto
-} bind def
-/M4 { %def
-% draw marker 4: diamond
-% Stack: - M4 -
- 0 2 rlineto
- 2 -2 rlineto
- -2 -2 rlineto
- -2 2 rlineto
- 2 2 rlineto
-} bind def
-/M5 { %def
-% draw marker 5: hourglass
-% Stack: - M5 -
- 2 2 rlineto
- -4 0 rlineto
- 4 -4 rlineto
- -4 0 rlineto
- 2 2 rlineto
-} bind def
-/M6 { %def
-% draw marker 6: bowtie
-% Stack: - M6 -
- 2 2 rlineto
- 0 -4 rlineto
- -4 4 rlineto
- 0 -4 rlineto
- 2 2 rlineto
-} bind def
-/M7 { %def
-% draw marker 7: small plus (goes with char marker)
-% Stack: - M7 -
- -1 0 rmoveto
- 2 0 rlineto
- -1 1 rmoveto
- 0 -2 rlineto
-} bind def
-/Marker { %def
-% Command from driver: draw marker
-% STACK: x y Marker -
- MAttr_Size 0 gt
- {
- gsave
- moveto
- MAttr_Size 4 div dup scale
- MAttr_Type load exec
- 4 MAttr_Size div dup scale
- MAttr_Width setlinewidth
- stroke
- grestore
- } if
-} def
-%%EndProcSet: Markers 1.0 0
-%%BeginProcSet: Lib 1.0 0
-/sg { %def
-% Command from driver: set the gray scale 0 - 100
-% STACK: greylevel sg
- 100 div dup setgray /glev exch def
-} bind def
-/Circle { %def
-% draw a circle
-% STACK: x y radius Circle -
- 0 360 arc
-} bind def
-/RndAper { %def
-% select a round aperture
-% STACK: - RndAper -
- 1 setlinejoin
- 1 setlinecap
-} bind def
-/SqrAper { %def
-% select a square aperture
-% STACK: - SqrAper -
- 0 setlinejoin
- 2 setlinecap
-} bind def
-/Line { %def
-% draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] Line -
- 3 1 roll
- moveto
- true
- exch
- % This pushes the x then the y then does lineto
- { exch { false } { lineto true } ifelse } forall
- pop
-} bind def
-/Clipto { %def
-% set clipping rectangle from 0,0 to new values
-% STACK: x y Clipto -
- 0 0 moveto
- dup 0 exch lineto
- 2 copy lineto
- pop
- 0 lineto
- closepath
- clip
- newpath
-} bind def
-/Clip4 { %def
-% set clipping rectangle from xmin,ymin to xmax,ymax
-% STACK: xmin ymin xmax ymax Clip4 -
- 4 copy pop pop moveto
- 4 copy pop exch lineto pop
- 2 copy lineto
- exch pop exch pop lineto
- closepath
- clip
- newpath
-} bind def
-%%EndProcSet: Lib 1.0 0
-%%BeginProcSet: Lines 1.0 0
-% line attributes %
-/LAttr_Width 1 def
-% line procedures
-/PLine { %def
-% Cammand from driver: draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- LAttr_Width setlinewidth
- stroke
-} bind def % PLine
-/Char { %def
-% Command from driver: draw a character at the current position
-% STACK: type x y stroke_array Char -
-% stroke array -- [ stroke1 stroke2 ... stroken ]
-% stroke -- connected staight lines
-% type = 0 if text 1 if marker
- gsave
- 4 1 roll
- translate
- 0 eq { TAttr_Width } { MAttr_Width } ifelse setlinewidth
- {
- dup length 2 gt
- {
- dup dup 0 get exch 1 get % get starting point
- 3 -1 roll % put x y before array
- dup length 2 sub 2 exch getinterval % delete first items from array
- Line
- stroke
- }
- {
- aload pop currentlinewidth 2 div Circle fill
- } ifelse
- } forall
- grestore
-} bind def % Char
-/PArc { %def
-% Command from driver: draw an arc
-% STACK: x y radius startangle deltaangle Arc -
- 10 div exch 10 div exch
- 2 copy pop add
- arc
- LAttr_Width setlinewidth
- stroke
-} bind def
-/PCircle { %def
-% Command from driver: draw an circle
-% STACK: x y radius PCircle -
- Circle
- LAttr_Width setlinewidth
- stroke
-} bind def
-%%EndProcSet: Lines 1.0 0
-%%BeginProcSet: Polygon 1.0 0
-% polygon attributes %
-/PAttr_ExtWidth 1 def
-/PAttr_IntWidth 1 def
-/PAttr_Grid 1 def
-% polygon procedures
-/LoopSet { %def
-% set up for loop condition
-% STACK: start end LoopSet low gridwidth high
- 2 copy lt { exch } if
- % make grid line up to absolute coordinates
- PAttr_Grid div truncate PAttr_Grid mul exch
- PAttr_Grid exch
-} bind def
-/Hatch { %def
-% draw cross hatch pattern in current path
-% STACK: - Hatch -
- pathbbox
- /ury exch def
- /urx exch def
- /lly exch def
- /llx exch def
- clip
- newpath
- llx urx LoopSet
- { % x loop
- dup lly exch ury moveto lineto
- } for
- lly ury LoopSet
- { % y loop
- llx exch dup urx exch moveto lineto
- } for
- PAttr_IntWidth setlinewidth
- stroke
-} bind def
-/PPoly { %def
-% Command from driver: draw a plygon
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- closepath
- gsave
- PAttr_IntWidth PAttr_Grid ge {fill} {Hatch} ifelse
- grestore
- PAttr_ExtWidth setlinewidth
- stroke
-} bind def
-%%EndProcSet: Polygon 1.0 0
-%%BeginProcSet: Text 1.0 0
-% text attributes %
-/TAttr_Mirr 0 def
-/TAttr_Orient 0 def
-/TAttr_Width 1 def
-% text procedures
-/Text { %def
-% Command from driver: Draw text
-% STACK: x y width string Text -
- gsave
- 4 2 roll
- translate
- TAttr_Mirr 0 gt
- {
- -1 1 scale
- } if
- TAttr_Orient rotate
- 0 0 moveto
- dup length dup 1 gt
- {
- exch dup stringwidth pop
- 4 -1 roll
- exch 2 copy
- lt
- {
- div 1 scale show
- }
- {
- sub
- 3 -1 roll 1 sub div
- 0 3 -1 roll ashow
- }
- ifelse
- }
- {
- pop
- show
- } ifelse
- grestore
-} bind def
-%%EndProcSet: Text 1.0 0
-%%BeginProcSet: FlashSymbols 1.0 0
-% flash symbol attributes %
-/FAttr_Type /PRndPad def
-/FAttr_Width 0 def
-/FAttr_Length 1 def
-/FAttr_Orient 0 def
-% flash symbol procedures
-/PRndPad { %def
-% Command from driver: draw an circular pad
-% STACK: - PCirclePad -
- FAttr_Width dup scale
- 0 0 .5 Circle
- fill
-} bind def
-/PSqrPad { %def
-% Draw an Square pad
-% STACK: - PRectPad -
- FAttr_Width dup scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/PRectPad { %def
-% Draw an rectangular pad
-% STACK: - PRectPad -
- FAttr_Length FAttr_Width scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/POvalPad { %def
-% Draw an oval pad
-% STACK: - POvalPad -
- FAttr_Width setlinewidth
- FAttr_Length FAttr_Width sub 2 div dup
- neg 0 moveto
- 0 lineto
- RndAper
- stroke
-} bind def
-/Anl { %def
- 0 0 .5 Circle
- fill
- FAttr_Length FAttr_Width lt
- { % inner circle
- 0 0
- FAttr_Length 0 gt { FAttr_Length FAttr_Width div } { .5 } ifelse
- 2 div Circle
- 1 setgray
- fill
- glev setgray
- } if
-} bind def
-/PAnlPad { %def
-% Draw an annular pad
-% STACK: - PAnlPad -
- FAttr_Width dup scale
- Anl
-} bind def
-/PRelPad { %def
-% Draw an thermal relief pad
-% STACK: - PRelPad -
- PAnlPad
- 1 setgray
- .17 setlinewidth
- 0 setlinecap % the x
- 45 rotate
- .5 0 moveto -.5 0 lineto
- 0 .5 moveto 0 -.5 lineto
- stroke
- glev setgray
-} bind def
-/Flash { %def
-% Command from driver: Flash a symbol
-% STACK: x y Flash -
- FAttr_Width 0 gt
- {
- gsave
- translate
- FAttr_Orient rotate
- FAttr_Type load exec
- grestore
- } if
-} def
-%%EndProcSet: FlashSymbols 1.0 0
-%%BeginProcSet: SetAttr 1.0 0
-/SetLine { %def
-% Set the width of the lines
-% STACK: linewidth SetLine -
- /LAttr_Width exch def
- RndAper
-} bind def
-/SetPoly { %def
-% Set attribute of polygon
-% STACK: external_width internal_grid_width grid_spacing SetPoly -
- /PAttr_Grid exch def
- /PAttr_IntWidth exch def
- /PAttr_ExtWidth exch def
- RndAper
-} bind def
-/SetFlash { %def
-% Set Attributed of flash pad
-% STACK: orientation_angle length width aperture_type SetFlash -
- /FAttr_Type exch def
- FAttr_Type /PSqrPad eq FAttr_Type /PRectPad eq or
- { SqrAper } { RndAper } ifelse
- /FAttr_Width exch def
- /FAttr_Length exch def
- /FAttr_Orient exch 10 div def
-} bind def
-/SetMkr { %def
-% Set attributes of markers
-% STACK: linewidth size type SetMkr -
- /MAttr_Type exch def
- /MAttr_Size exch def
- /MAttr_Width exch def
- RndAper
-} bind def
-/SetText1 { %def
-% Set attributes of text
-% STACK: fontname height orient mirror SetMkr -
- /TAttr_Mirr exch def
- /TAttr_Orient exch 10 div def
- exch findfont exch scalefont setfont
- RndAper
-} bind def
-/SetText2 { %def
-% Set attributes of text
-% STACK: linewidth height mirror orient SetMkr -
- /TAttr_Width exch def
- RndAper
-} bind def
-%%EndProcSet: SetAttr 1.0 0
-%%BeginProcSet: Initialize 1.0 0
-/Init { %def
-% Initialize the driver
-% STACK: Init -
- 72 1000 div dup scale % Scale to 1/1000 inch
- 250 250 translate % make origin 1/4 inch from bottom left
- 1.5 setmiterlimit 1 RndAper % set line defaults
- 0 setgray % set color default
- /glev 0 def
-} def
-%%EndProcSet: Initialize 1.0 0
-%%EndProlog
-/Helvetica findfont 12 scalefont setfont
-35 760 moveto
-(gadget.job - Fri Aug 21 03:35:33 1992) show
-gsave
-Init
-8000 10500 Clipto
-4000 2800 translate
-0 rotate
-1 1 div dup scale
-75 sg
-50 sg
-25 sg
-0 sg
-10 SetLine
--1350 4700 [ -1350 4900 ] PLine
--1350 4900 [ -1150 4900 ] PLine
-10 SetLine
-1150 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 4700 ] PLine
-10 SetLine
-1150 0 [ 1350 0 ] PLine
-1350 0 [ 1350 200 ] PLine
-10 SetLine
--1350 200 [ -1350 0 ] PLine
--1350 0 [ -1150 0 ] PLine
-0 0 70 /PRndPad SetFlash
--1100 1450 Flash
--1100 1150 Flash
-300 3300 Flash
--100 3300 Flash
--100 3100 Flash
-300 3100 Flash
-300 3500 Flash
--100 3500 Flash
--400 3700 Flash
--1200 3700 Flash
--100 1300 Flash
--900 1300 Flash
--200 2800 Flash
-600 2800 Flash
--1200 2800 Flash
--400 2800 Flash
-0 2500 Flash
-0 2100 Flash
--1200 3400 Flash
--1200 3000 Flash
--900 2300 Flash
--1200 2300 Flash
--1200 2500 Flash
--900 2500 Flash
-800 2800 Flash
-1100 2800 Flash
-1250 1900 Flash
-450 1900 Flash
--100 900 Flash
--1200 900 Flash
--700 4000 Flash
--1100 4000 Flash
-1100 3000 Flash
-700 3000 Flash
--300 3700 Flash
-0 3700 Flash
-0 0 70 /PSqrPad SetFlash
-100 900 Flash
-0 0 70 /PRndPad SetFlash
-600 900 Flash
-0 0 70 /PSqrPad SetFlash
-700 3700 Flash
-0 0 70 /PRndPad SetFlash
-200 3700 Flash
-0 0 80 /PRndPad SetFlash
--750 550 Flash
--750 450 Flash
-0 550 Flash
-0 450 Flash
-750 550 Flash
-750 450 Flash
--648 4479 Flash
--540 4479 Flash
--432 4479 Flash
--324 4479 Flash
--216 4479 Flash
--108 4479 Flash
-0 4479 Flash
-108 4479 Flash
-216 4479 Flash
-324 4479 Flash
-432 4479 Flash
-540 4479 Flash
-648 4479 Flash
--594 4593 Flash
--486 4593 Flash
--378 4593 Flash
--270 4593 Flash
--162 4593 Flash
--54 4593 Flash
-54 4593 Flash
-162 4593 Flash
-270 4593 Flash
-378 4593 Flash
-486 4593 Flash
-594 4593 Flash
-0 0 187 /PRndPad SetFlash
-940 4536 Flash
--940 4536 Flash
-0 0 70 /PSqrPad SetFlash
-950 150 Flash
-0 0 70 /PRndPad SetFlash
-1050 150 Flash
-0 0 70 /PSqrPad SetFlash
--50 150 Flash
-0 0 70 /PRndPad SetFlash
-50 150 Flash
-0 0 70 /PSqrPad SetFlash
--1050 150 Flash
-0 0 70 /PRndPad SetFlash
--950 150 Flash
-0 0 60 /PRndPad SetFlash
-950 3524 Flash
-1026 3612 Flash
-950 3700 Flash
-0 0 70 /PSqrPad SetFlash
--1200 1600 Flash
-0 0 70 /PRndPad SetFlash
--1100 1700 Flash
--1200 1800 Flash
-300 1700 Flash
--100 1700 Flash
-200 1300 Flash
-600 1300 Flash
--700 2300 Flash
--300 2300 Flash
--700 4200 Flash
--1100 4200 Flash
-1100 3200 Flash
-700 3200 Flash
--700 2500 Flash
--300 2500 Flash
--700 2100 Flash
--300 2100 Flash
--800 2100 Flash
--1200 2100 Flash
-600 1100 Flash
-200 1100 Flash
-0 0 70 /PSqrPad SetFlash
-1200 2450 Flash
-0 0 70 /PRndPad SetFlash
-1100 2350 Flash
-1200 2250 Flash
--100 1900 Flash
-300 1900 Flash
-0 1500 Flash
-400 1500 Flash
-0 0 70 /PSqrPad SetFlash
--900 1600 Flash
-0 0 70 /PRndPad SetFlash
--800 1600 Flash
--700 1600 Flash
--600 1600 Flash
--500 1600 Flash
--400 1600 Flash
--300 1600 Flash
--300 1900 Flash
--400 1900 Flash
--500 1900 Flash
--600 1900 Flash
--700 1900 Flash
--800 1900 Flash
--900 1900 Flash
-0 0 70 /PSqrPad SetFlash
-200 2200 Flash
-0 0 70 /PRndPad SetFlash
-300 2200 Flash
-400 2200 Flash
-500 2200 Flash
-600 2200 Flash
-700 2200 Flash
-800 2200 Flash
-900 2200 Flash
-900 2500 Flash
-800 2500 Flash
-700 2500 Flash
-600 2500 Flash
-500 2500 Flash
-400 2500 Flash
-300 2500 Flash
-200 2500 Flash
-0 0 70 /PSqrPad SetFlash
-200 3900 Flash
-0 0 70 /PRndPad SetFlash
-300 3900 Flash
-400 3900 Flash
-500 3900 Flash
-600 3900 Flash
-700 3900 Flash
-800 3900 Flash
-900 3900 Flash
-1000 3900 Flash
-1100 3900 Flash
-1100 4200 Flash
-1000 4200 Flash
-900 4200 Flash
-800 4200 Flash
-700 4200 Flash
-600 4200 Flash
-500 4200 Flash
-400 4200 Flash
-300 4200 Flash
-200 4200 Flash
-0 0 70 /PSqrPad SetFlash
--1000 3100 Flash
-0 0 70 /PRndPad SetFlash
--900 3100 Flash
--800 3100 Flash
--700 3100 Flash
--600 3100 Flash
--500 3100 Flash
--400 3100 Flash
--300 3100 Flash
--300 3400 Flash
--400 3400 Flash
--500 3400 Flash
--600 3400 Flash
--700 3400 Flash
--800 3400 Flash
--900 3400 Flash
--1000 3400 Flash
-0 0 80 /PRndPad SetFlash
-900 800 Flash
-1100 800 Flash
-1000 800 Flash
-0 0 187 /PRndPad SetFlash
-1000 1550 Flash
-0 0 70 /PRndPad SetFlash
-0 4000 Flash
-0 4200 Flash
-0 0 260 /PRndPad SetFlash
--1100 450 Flash
-1100 450 Flash
-0 0 70 /PRndPad SetFlash
-1100 3400 Flash
-700 3400 Flash
-0 0 65 /PRndPad SetFlash
--200 2350 Flash
--200 1750 Flash
-200 1400 Flash
-0 0 65 /PRndPad SetFlash
-300 1100 Flash
-0 0 65 /PRndPad SetFlash
-175 3300 Flash
-0 0 65 /PRndPad SetFlash
-1000 2650 Flash
-0 0 65 /PRndPad SetFlash
--450 2100 Flash
-0 0 65 /PRndPad SetFlash
--650 2600 Flash
--100 2600 Flash
--100 2250 Flash
-0 0 65 /PRndPad SetFlash
-800 1800 Flash
-0 0 65 /PRndPad SetFlash
-700 1900 Flash
-0 0 65 /PRndPad SetFlash
-600 1700 Flash
-0 0 65 /PRndPad SetFlash
-500 1600 Flash
-0 0 65 /PRndPad SetFlash
-0 4100 Flash
-900 4100 Flash
-0 0 65 /PRndPad SetFlash
-800 3000 Flash
-0 0 65 /PRndPad SetFlash
-600 3700 Flash
-0 0 65 /PRndPad SetFlash
-450 2700 Flash
--400 2700 Flash
--400 2300 Flash
-0 0 65 /PRndPad SetFlash
-350 3800 Flash
-0 0 65 /PRndPad SetFlash
--850 3700 Flash
-0 0 65 /PRndPad SetFlash
-400 1300 Flash
-0 0 65 /PRndPad SetFlash
--1050 1050 Flash
-0 0 65 /PRndPad SetFlash
-0 4475 Flash
-75 4000 Flash
-1000 4000 Flash
-0 0 65 /PRndPad SetFlash
-950 3200 Flash
-0 0 65 /PRndPad SetFlash
-850 1200 Flash
--600 1200 Flash
-0 0 65 /PRndPad SetFlash
--550 3900 Flash
--350 3900 Flash
-0 0 65 /PRndPad SetFlash
--800 4300 Flash
-0 0 65 /PRndPad SetFlash
--750 4350 Flash
-0 0 65 /PRndPad SetFlash
-400 3400 Flash
-grestore
-showpage
diff --git a/usr.sbin/xntpd/gadget/sst0126.lpr b/usr.sbin/xntpd/gadget/sst0126.lpr
deleted file mode 100644
index c3f19867cde1..000000000000
--- a/usr.sbin/xntpd/gadget/sst0126.lpr
+++ /dev/null
@@ -1,1118 +0,0 @@
-%!PS-Adobe-2.0
-%%Title: PADS Postscript Driver Header
-%%Creator: Andy Montalvo, 18 Lupine St., Lowell, MA 01851
-%%CreationDate: 06/08/90
-%%For: CAD Software, Littleton, MA
-%%EndComments
-%%BeginProcSet: Markers 1.0 0
-% marker attributes
-/MAttr_Width 1 def
-/MAttr_Size 0 def
-/MAttr_Type /M1 def
-% procedures
-/M1 { %def
-% draw marker 1: plus
-% Stack: - M1 -
- -2 0 rmoveto
- 4 0 rlineto
- -2 2 rmoveto
- 0 -4 rlineto
-} bind def
-/M2 { %def
-% draw marker 2: cross
-% Stack: - M2 -
- -2 -2 rmoveto
- 4 4 rlineto
- -4 0 rmoveto
- 4 -4 rlineto
-} bind def
-/M3 { %def
-% draw marker 3: square
-% Stack: - M3 -
- 0 2 rlineto
- 2 0 rlineto
- 0 -4 rlineto
- -4 0 rlineto
- 0 4 rlineto
- 2 0 rlineto
-} bind def
-/M4 { %def
-% draw marker 4: diamond
-% Stack: - M4 -
- 0 2 rlineto
- 2 -2 rlineto
- -2 -2 rlineto
- -2 2 rlineto
- 2 2 rlineto
-} bind def
-/M5 { %def
-% draw marker 5: hourglass
-% Stack: - M5 -
- 2 2 rlineto
- -4 0 rlineto
- 4 -4 rlineto
- -4 0 rlineto
- 2 2 rlineto
-} bind def
-/M6 { %def
-% draw marker 6: bowtie
-% Stack: - M6 -
- 2 2 rlineto
- 0 -4 rlineto
- -4 4 rlineto
- 0 -4 rlineto
- 2 2 rlineto
-} bind def
-/M7 { %def
-% draw marker 7: small plus (goes with char marker)
-% Stack: - M7 -
- -1 0 rmoveto
- 2 0 rlineto
- -1 1 rmoveto
- 0 -2 rlineto
-} bind def
-/Marker { %def
-% Command from driver: draw marker
-% STACK: x y Marker -
- MAttr_Size 0 gt
- {
- gsave
- moveto
- MAttr_Size 4 div dup scale
- MAttr_Type load exec
- 4 MAttr_Size div dup scale
- MAttr_Width setlinewidth
- stroke
- grestore
- } if
-} def
-%%EndProcSet: Markers 1.0 0
-%%BeginProcSet: Lib 1.0 0
-/sg { %def
-% Command from driver: set the gray scale 0 - 100
-% STACK: greylevel sg
- 100 div dup setgray /glev exch def
-} bind def
-/Circle { %def
-% draw a circle
-% STACK: x y radius Circle -
- 0 360 arc
-} bind def
-/RndAper { %def
-% select a round aperture
-% STACK: - RndAper -
- 1 setlinejoin
- 1 setlinecap
-} bind def
-/SqrAper { %def
-% select a square aperture
-% STACK: - SqrAper -
- 0 setlinejoin
- 2 setlinecap
-} bind def
-/Line { %def
-% draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] Line -
- 3 1 roll
- moveto
- true
- exch
- % This pushes the x then the y then does lineto
- { exch { false } { lineto true } ifelse } forall
- pop
-} bind def
-/Clipto { %def
-% set clipping rectangle from 0,0 to new values
-% STACK: x y Clipto -
- 0 0 moveto
- dup 0 exch lineto
- 2 copy lineto
- pop
- 0 lineto
- closepath
- clip
- newpath
-} bind def
-/Clip4 { %def
-% set clipping rectangle from xmin,ymin to xmax,ymax
-% STACK: xmin ymin xmax ymax Clip4 -
- 4 copy pop pop moveto
- 4 copy pop exch lineto pop
- 2 copy lineto
- exch pop exch pop lineto
- closepath
- clip
- newpath
-} bind def
-%%EndProcSet: Lib 1.0 0
-%%BeginProcSet: Lines 1.0 0
-% line attributes %
-/LAttr_Width 1 def
-% line procedures
-/PLine { %def
-% Cammand from driver: draw a set of connected lines
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- LAttr_Width setlinewidth
- stroke
-} bind def % PLine
-/Char { %def
-% Command from driver: draw a character at the current position
-% STACK: type x y stroke_array Char -
-% stroke array -- [ stroke1 stroke2 ... stroken ]
-% stroke -- connected staight lines
-% type = 0 if text 1 if marker
- gsave
- 4 1 roll
- translate
- 0 eq { TAttr_Width } { MAttr_Width } ifelse setlinewidth
- {
- dup length 2 gt
- {
- dup dup 0 get exch 1 get % get starting point
- 3 -1 roll % put x y before array
- dup length 2 sub 2 exch getinterval % delete first items from array
- Line
- stroke
- }
- {
- aload pop currentlinewidth 2 div Circle fill
- } ifelse
- } forall
- grestore
-} bind def % Char
-/PArc { %def
-% Command from driver: draw an arc
-% STACK: x y radius startangle deltaangle Arc -
- 10 div exch 10 div exch
- 2 copy pop add
- arc
- LAttr_Width setlinewidth
- stroke
-} bind def
-/PCircle { %def
-% Command from driver: draw an circle
-% STACK: x y radius PCircle -
- Circle
- LAttr_Width setlinewidth
- stroke
-} bind def
-%%EndProcSet: Lines 1.0 0
-%%BeginProcSet: Polygon 1.0 0
-% polygon attributes %
-/PAttr_ExtWidth 1 def
-/PAttr_IntWidth 1 def
-/PAttr_Grid 1 def
-% polygon procedures
-/LoopSet { %def
-% set up for loop condition
-% STACK: start end LoopSet low gridwidth high
- 2 copy lt { exch } if
- % make grid line up to absolute coordinates
- PAttr_Grid div truncate PAttr_Grid mul exch
- PAttr_Grid exch
-} bind def
-/Hatch { %def
-% draw cross hatch pattern in current path
-% STACK: - Hatch -
- pathbbox
- /ury exch def
- /urx exch def
- /lly exch def
- /llx exch def
- clip
- newpath
- llx urx LoopSet
- { % x loop
- dup lly exch ury moveto lineto
- } for
- lly ury LoopSet
- { % y loop
- llx exch dup urx exch moveto lineto
- } for
- PAttr_IntWidth setlinewidth
- stroke
-} bind def
-/PPoly { %def
-% Command from driver: draw a plygon
-% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
- Line
- closepath
- gsave
- PAttr_IntWidth PAttr_Grid ge {fill} {Hatch} ifelse
- grestore
- PAttr_ExtWidth setlinewidth
- stroke
-} bind def
-%%EndProcSet: Polygon 1.0 0
-%%BeginProcSet: Text 1.0 0
-% text attributes %
-/TAttr_Mirr 0 def
-/TAttr_Orient 0 def
-/TAttr_Width 1 def
-% text procedures
-/Text { %def
-% Command from driver: Draw text
-% STACK: x y width string Text -
- gsave
- 4 2 roll
- translate
- TAttr_Mirr 0 gt
- {
- -1 1 scale
- } if
- TAttr_Orient rotate
- 0 0 moveto
- dup length dup 1 gt
- {
- exch dup stringwidth pop
- 4 -1 roll
- exch 2 copy
- lt
- {
- div 1 scale show
- }
- {
- sub
- 3 -1 roll 1 sub div
- 0 3 -1 roll ashow
- }
- ifelse
- }
- {
- pop
- show
- } ifelse
- grestore
-} bind def
-%%EndProcSet: Text 1.0 0
-%%BeginProcSet: FlashSymbols 1.0 0
-% flash symbol attributes %
-/FAttr_Type /PRndPad def
-/FAttr_Width 0 def
-/FAttr_Length 1 def
-/FAttr_Orient 0 def
-% flash symbol procedures
-/PRndPad { %def
-% Command from driver: draw an circular pad
-% STACK: - PCirclePad -
- FAttr_Width dup scale
- 0 0 .5 Circle
- fill
-} bind def
-/PSqrPad { %def
-% Draw an Square pad
-% STACK: - PRectPad -
- FAttr_Width dup scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/PRectPad { %def
-% Draw an rectangular pad
-% STACK: - PRectPad -
- FAttr_Length FAttr_Width scale
- .5 .5 moveto
- -.5 .5 lineto
- -.5 -.5 lineto
- .5 -.5 lineto
- closepath
- fill
-} bind def
-/POvalPad { %def
-% Draw an oval pad
-% STACK: - POvalPad -
- FAttr_Width setlinewidth
- FAttr_Length FAttr_Width sub 2 div dup
- neg 0 moveto
- 0 lineto
- RndAper
- stroke
-} bind def
-/Anl { %def
- 0 0 .5 Circle
- fill
- FAttr_Length FAttr_Width lt
- { % inner circle
- 0 0
- FAttr_Length 0 gt { FAttr_Length FAttr_Width div } { .5 } ifelse
- 2 div Circle
- 1 setgray
- fill
- glev setgray
- } if
-} bind def
-/PAnlPad { %def
-% Draw an annular pad
-% STACK: - PAnlPad -
- FAttr_Width dup scale
- Anl
-} bind def
-/PRelPad { %def
-% Draw an thermal relief pad
-% STACK: - PRelPad -
- PAnlPad
- 1 setgray
- .17 setlinewidth
- 0 setlinecap % the x
- 45 rotate
- .5 0 moveto -.5 0 lineto
- 0 .5 moveto 0 -.5 lineto
- stroke
- glev setgray
-} bind def
-/Flash { %def
-% Command from driver: Flash a symbol
-% STACK: x y Flash -
- FAttr_Width 0 gt
- {
- gsave
- translate
- FAttr_Orient rotate
- FAttr_Type load exec
- grestore
- } if
-} def
-%%EndProcSet: FlashSymbols 1.0 0
-%%BeginProcSet: SetAttr 1.0 0
-/SetLine { %def
-% Set the width of the lines
-% STACK: linewidth SetLine -
- /LAttr_Width exch def
- RndAper
-} bind def
-/SetPoly { %def
-% Set attribute of polygon
-% STACK: external_width internal_grid_width grid_spacing SetPoly -
- /PAttr_Grid exch def
- /PAttr_IntWidth exch def
- /PAttr_ExtWidth exch def
- RndAper
-} bind def
-/SetFlash { %def
-% Set Attributed of flash pad
-% STACK: orientation_angle length width aperture_type SetFlash -
- /FAttr_Type exch def
- FAttr_Type /PSqrPad eq FAttr_Type /PRectPad eq or
- { SqrAper } { RndAper } ifelse
- /FAttr_Width exch def
- /FAttr_Length exch def
- /FAttr_Orient exch 10 div def
-} bind def
-/SetMkr { %def
-% Set attributes of markers
-% STACK: linewidth size type SetMkr -
- /MAttr_Type exch def
- /MAttr_Size exch def
- /MAttr_Width exch def
- RndAper
-} bind def
-/SetText1 { %def
-% Set attributes of text
-% STACK: fontname height orient mirror SetMkr -
- /TAttr_Mirr exch def
- /TAttr_Orient exch 10 div def
- exch findfont exch scalefont setfont
- RndAper
-} bind def
-/SetText2 { %def
-% Set attributes of text
-% STACK: linewidth height mirror orient SetMkr -
- /TAttr_Width exch def
- RndAper
-} bind def
-%%EndProcSet: SetAttr 1.0 0
-%%BeginProcSet: Initialize 1.0 0
-/Init { %def
-% Initialize the driver
-% STACK: Init -
- 72 1000 div dup scale % Scale to 1/1000 inch
- 250 250 translate % make origin 1/4 inch from bottom left
- 1.5 setmiterlimit 1 RndAper % set line defaults
- 0 setgray % set color default
- /glev 0 def
-} def
-%%EndProcSet: Initialize 1.0 0
-%%EndProlog
-/Helvetica findfont 12 scalefont setfont
-35 760 moveto
-(gadget.job - Fri Aug 21 03:35:07 1992) show
-gsave
-Init
-8000 10500 Clipto
-4015 2626 translate
-0 rotate
-1 1 div dup scale
-75 sg
-50 sg
-25 sg
-0 sg
-10 SetLine
--1350 4700 [ -1350 4900 ] PLine
--1350 4900 [ -1150 4900 ] PLine
-10 SetLine
-1150 4900 [ 1350 4900 ] PLine
-1350 4900 [ 1350 4700 ] PLine
-10 SetLine
-1150 0 [ 1350 0 ] PLine
-1350 0 [ 1350 200 ] PLine
-10 SetLine
--1350 200 [ -1350 0 ] PLine
--1350 0 [ -1150 0 ] PLine
-10 SetLine
--1050 1400 [ -1050 1200 ] PLine
--1050 1200 [ -1150 1200 ] PLine
--1150 1200 [ -1150 1400 ] PLine
--1150 1400 [ -1050 1400 ] PLine
-10 SetLine
--50 3300 [ -100 3300 ] PLine
-10 SetLine
-250 3235 [ -50 3235 ] PLine
--50 3235 [ -50 3365 ] PLine
--50 3365 [ 250 3365 ] PLine
-250 3365 [ 250 3235 ] PLine
-10 SetLine
-300 3300 [ 250 3300 ] PLine
-10 SetLine
-250 3100 [ 300 3100 ] PLine
-10 SetLine
--50 3165 [ 250 3165 ] PLine
-250 3165 [ 250 3035 ] PLine
-250 3035 [ -50 3035 ] PLine
--50 3035 [ -50 3165 ] PLine
-10 SetLine
--100 3100 [ -50 3100 ] PLine
-10 SetLine
--50 3500 [ -100 3500 ] PLine
-10 SetLine
-250 3435 [ -50 3435 ] PLine
--50 3435 [ -50 3565 ] PLine
--50 3565 [ 250 3565 ] PLine
-250 3565 [ 250 3435 ] PLine
-10 SetLine
-300 3500 [ 250 3500 ] PLine
-10 SetLine
--1150 3700 [ -1200 3700 ] PLine
-10 SetLine
--450 3575 [ -1150 3575 ] PLine
--1150 3575 [ -1150 3825 ] PLine
--1150 3825 [ -450 3825 ] PLine
--450 3825 [ -450 3575 ] PLine
-10 SetLine
--400 3700 [ -450 3700 ] PLine
-10 SetLine
--850 1300 [ -900 1300 ] PLine
-10 SetLine
--150 1175 [ -850 1175 ] PLine
--850 1175 [ -850 1425 ] PLine
--850 1425 [ -150 1425 ] PLine
--150 1425 [ -150 1175 ] PLine
-10 SetLine
--100 1300 [ -150 1300 ] PLine
-10 SetLine
-550 2800 [ 600 2800 ] PLine
-10 SetLine
--150 2925 [ 550 2925 ] PLine
-550 2925 [ 550 2675 ] PLine
-550 2675 [ -150 2675 ] PLine
--150 2675 [ -150 2925 ] PLine
-10 SetLine
--200 2800 [ -150 2800 ] PLine
-10 SetLine
--450 2800 [ -400 2800 ] PLine
-10 SetLine
--1150 2925 [ -450 2925 ] PLine
--450 2925 [ -450 2675 ] PLine
--450 2675 [ -1150 2675 ] PLine
--1150 2675 [ -1150 2925 ] PLine
-10 SetLine
--1200 2800 [ -1150 2800 ] PLine
-10 SetLine
-0 2150 [ 0 2100 ] PLine
-10 SetLine
-65 2450 [ 65 2150 ] PLine
-65 2150 [ -65 2150 ] PLine
--65 2150 [ -65 2450 ] PLine
--65 2450 [ 65 2450 ] PLine
-10 SetLine
-0 2500 [ 0 2450 ] PLine
-10 SetLine
--1200 3050 [ -1200 3000 ] PLine
-10 SetLine
--1135 3350 [ -1135 3050 ] PLine
--1135 3050 [ -1265 3050 ] PLine
--1265 3050 [ -1265 3350 ] PLine
--1265 3350 [ -1135 3350 ] PLine
-10 SetLine
--1200 3400 [ -1200 3350 ] PLine
-10 SetLine
--950 2250 [ -1150 2250 ] PLine
--1150 2250 [ -1150 2350 ] PLine
--1150 2350 [ -950 2350 ] PLine
--950 2350 [ -950 2250 ] PLine
-10 SetLine
--1150 2550 [ -950 2550 ] PLine
--950 2550 [ -950 2450 ] PLine
--950 2450 [ -1150 2450 ] PLine
--1150 2450 [ -1150 2550 ] PLine
-10 SetLine
-850 2850 [ 1050 2850 ] PLine
-1050 2850 [ 1050 2750 ] PLine
-1050 2750 [ 850 2750 ] PLine
-850 2750 [ 850 2850 ] PLine
-10 SetLine
-500 1900 [ 450 1900 ] PLine
-10 SetLine
-1200 1775 [ 500 1775 ] PLine
-500 1775 [ 500 2025 ] PLine
-500 2025 [ 1200 2025 ] PLine
-1200 2025 [ 1200 1775 ] PLine
-10 SetLine
-1250 1900 [ 1200 1900 ] PLine
-10 SetLine
--1150 900 [ -1200 900 ] PLine
-10 SetLine
--150 725 [ -1150 725 ] PLine
--1150 725 [ -1150 1075 ] PLine
--1150 1075 [ -150 1075 ] PLine
--150 1075 [ -150 725 ] PLine
-10 SetLine
--100 900 [ -150 900 ] PLine
-10 SetLine
--1050 4000 [ -1100 4000 ] PLine
-10 SetLine
--750 3935 [ -1050 3935 ] PLine
--1050 3935 [ -1050 4065 ] PLine
--1050 4065 [ -750 4065 ] PLine
--750 4065 [ -750 3935 ] PLine
-10 SetLine
--700 4000 [ -750 4000 ] PLine
-10 SetLine
-750 3000 [ 700 3000 ] PLine
-10 SetLine
-1050 2935 [ 750 2935 ] PLine
-750 2935 [ 750 3065 ] PLine
-750 3065 [ 1050 3065 ] PLine
-1050 3065 [ 1050 2935 ] PLine
-10 SetLine
-1100 3000 [ 1050 3000 ] PLine
-10 SetLine
--250 3750 [ -50 3750 ] PLine
--50 3750 [ -50 3650 ] PLine
--50 3650 [ -250 3650 ] PLine
--250 3650 [ -250 3750 ] PLine
-10 SetLine
-200 900 [ 150 900 ] PLine
-10 SetLine
-270 950 [ 270 850 ] PLine
-10 SetLine
-200 850 [ 200 950 ] PLine
-200 950 [ 500 950 ] PLine
-500 950 [ 500 850 ] PLine
-500 850 [ 200 850 ] PLine
-10 SetLine
-500 900 [ 550 900 ] PLine
-10 SetLine
-250 850 [ 250 950 ] PLine
-10 SetLine
-260 850 [ 260 950 ] PLine
-10 SetLine
-600 3700 [ 650 3700 ] PLine
-10 SetLine
-530 3650 [ 530 3750 ] PLine
-10 SetLine
-600 3750 [ 600 3650 ] PLine
-600 3650 [ 300 3650 ] PLine
-300 3650 [ 300 3750 ] PLine
-300 3750 [ 600 3750 ] PLine
-10 SetLine
-300 3700 [ 250 3700 ] PLine
-10 SetLine
-550 3750 [ 550 3650 ] PLine
-10 SetLine
-540 3750 [ 540 3650 ] PLine
-10 SetLine
--750 550 100 PCircle
-10 SetLine
-0 550 100 PCircle
-10 SetLine
-750 550 100 PCircle
-10 SetLine
-768 5000 [ 768 5248 ] PLine
-768 5248 [ -768 5248 ] PLine
--768 5248 [ -768 5000 ] PLine
-10 SetLine
-1058 4900 [ -1058 4900 ] PLine
-10 SetLine
-1058 5000 [ 1058 4408 ] PLine
-1058 4408 [ -1058 4408 ] PLine
--1058 4408 [ -1058 5000 ] PLine
--1058 5000 [ 1058 5000 ] PLine
-10 SetLine
-1058 5000 [ -1058 5000 ] PLine
-10 SetLine
-768 4900 [ 768 4408 ] PLine
-10 SetLine
--768 4900 [ -768 4408 ] PLine
-10 SetLine
-900 200 [ 1100 200 ] PLine
-1100 200 [ 1100 100 ] PLine
-1100 100 [ 900 100 ] PLine
-900 100 [ 900 200 ] PLine
-10 SetLine
--100 200 [ 100 200 ] PLine
-100 200 [ 100 100 ] PLine
-100 100 [ -100 100 ] PLine
--100 100 [ -100 200 ] PLine
-10 SetLine
--1100 200 [ -900 200 ] PLine
--900 200 [ -900 100 ] PLine
--900 100 [ -1100 100 ] PLine
--1100 100 [ -1100 200 ] PLine
-10 SetLine
-916 3493 [ 900 3456 ] PLine
-900 3456 [ 939 3442 ] PLine
-939 3442 [ 953 3477 ] PLine
-10 SetLine
-988 3612 140 PCircle
-10 SetLine
--1000 1529 [ -1039 1490 ] PLine
-10 SetLine
--1000 1490 [ -1000 1910 ] PLine
--1000 1910 [ -1300 1910 ] PLine
--1300 1910 [ -1300 1490 ] PLine
--1300 1490 [ -1000 1490 ] PLine
-10 SetLine
-200 1730 [ 200 1670 ] PLine
-200 1670 [ 0 1670 ] PLine
-0 1670 [ 0 1730 ] PLine
-0 1730 [ 200 1730 ] PLine
-10 SetLine
-200 1700 [ 260 1700 ] PLine
-10 SetLine
-0 1700 [ -50 1700 ] PLine
-10 SetLine
-300 1270 [ 300 1330 ] PLine
-300 1330 [ 500 1330 ] PLine
-500 1330 [ 500 1270 ] PLine
-500 1270 [ 300 1270 ] PLine
-10 SetLine
-300 1300 [ 240 1300 ] PLine
-10 SetLine
-500 1300 [ 550 1300 ] PLine
-10 SetLine
--600 2270 [ -600 2330 ] PLine
--600 2330 [ -400 2330 ] PLine
--400 2330 [ -400 2270 ] PLine
--400 2270 [ -600 2270 ] PLine
-10 SetLine
--600 2300 [ -660 2300 ] PLine
-10 SetLine
--400 2300 [ -350 2300 ] PLine
-10 SetLine
--800 4230 [ -800 4170 ] PLine
--800 4170 [ -1000 4170 ] PLine
--1000 4170 [ -1000 4230 ] PLine
--1000 4230 [ -800 4230 ] PLine
-10 SetLine
--800 4200 [ -740 4200 ] PLine
-10 SetLine
--1000 4200 [ -1050 4200 ] PLine
-10 SetLine
-1000 3230 [ 1000 3170 ] PLine
-1000 3170 [ 800 3170 ] PLine
-800 3170 [ 800 3230 ] PLine
-800 3230 [ 1000 3230 ] PLine
-10 SetLine
-1000 3200 [ 1060 3200 ] PLine
-10 SetLine
-800 3200 [ 750 3200 ] PLine
-10 SetLine
--600 2470 [ -600 2530 ] PLine
--600 2530 [ -400 2530 ] PLine
--400 2530 [ -400 2470 ] PLine
--400 2470 [ -600 2470 ] PLine
-10 SetLine
--600 2500 [ -660 2500 ] PLine
-10 SetLine
--400 2500 [ -350 2500 ] PLine
-10 SetLine
--600 2070 [ -600 2130 ] PLine
--600 2130 [ -400 2130 ] PLine
--400 2130 [ -400 2070 ] PLine
--400 2070 [ -600 2070 ] PLine
-10 SetLine
--600 2100 [ -660 2100 ] PLine
-10 SetLine
--400 2100 [ -350 2100 ] PLine
-10 SetLine
--900 2130 [ -900 2070 ] PLine
--900 2070 [ -1100 2070 ] PLine
--1100 2070 [ -1100 2130 ] PLine
--1100 2130 [ -900 2130 ] PLine
-10 SetLine
--900 2100 [ -840 2100 ] PLine
-10 SetLine
--1100 2100 [ -1150 2100 ] PLine
-10 SetLine
-500 1130 [ 500 1070 ] PLine
-500 1070 [ 300 1070 ] PLine
-300 1070 [ 300 1130 ] PLine
-300 1130 [ 500 1130 ] PLine
-10 SetLine
-500 1100 [ 560 1100 ] PLine
-10 SetLine
-300 1100 [ 250 1100 ] PLine
-10 SetLine
-1000 2521 [ 1039 2560 ] PLine
-10 SetLine
-1000 2560 [ 1000 2140 ] PLine
-1000 2140 [ 1300 2140 ] PLine
-1300 2140 [ 1300 2560 ] PLine
-1300 2560 [ 1000 2560 ] PLine
-10 SetLine
-0 1870 [ 0 1930 ] PLine
-0 1930 [ 200 1930 ] PLine
-200 1930 [ 200 1870 ] PLine
-200 1870 [ 0 1870 ] PLine
-10 SetLine
-0 1900 [ -60 1900 ] PLine
-10 SetLine
-200 1900 [ 250 1900 ] PLine
-10 SetLine
-100 1470 [ 100 1530 ] PLine
-100 1530 [ 300 1530 ] PLine
-300 1530 [ 300 1470 ] PLine
-300 1470 [ 100 1470 ] PLine
-10 SetLine
-100 1500 [ 40 1500 ] PLine
-10 SetLine
-300 1500 [ 350 1500 ] PLine
-10 SetLine
--950 1650 [ -250 1650 ] PLine
--250 1650 [ -250 1850 ] PLine
--250 1850 [ -950 1850 ] PLine
--950 1850 [ -950 1775 ] PLine
--950 1775 [ -900 1775 ] PLine
--900 1775 [ -900 1725 ] PLine
--900 1725 [ -950 1725 ] PLine
--950 1725 [ -950 1650 ] PLine
-10 SetLine
-150 2250 [ 950 2250 ] PLine
-950 2250 [ 950 2450 ] PLine
-950 2450 [ 150 2450 ] PLine
-150 2450 [ 150 2375 ] PLine
-150 2375 [ 200 2375 ] PLine
-200 2375 [ 200 2325 ] PLine
-200 2325 [ 150 2325 ] PLine
-150 2325 [ 150 2250 ] PLine
-10 SetLine
-150 3950 [ 1150 3950 ] PLine
-1150 3950 [ 1150 4150 ] PLine
-1150 4150 [ 150 4150 ] PLine
-150 4150 [ 150 4075 ] PLine
-150 4075 [ 200 4075 ] PLine
-200 4075 [ 200 4025 ] PLine
-200 4025 [ 150 4025 ] PLine
-150 4025 [ 150 3950 ] PLine
-10 SetLine
--1050 3150 [ -250 3150 ] PLine
--250 3150 [ -250 3350 ] PLine
--250 3350 [ -1050 3350 ] PLine
--1050 3350 [ -1050 3275 ] PLine
--1050 3275 [ -1000 3275 ] PLine
--1000 3275 [ -1000 3225 ] PLine
--1000 3225 [ -1050 3225 ] PLine
--1050 3225 [ -1050 3150 ] PLine
-10 SetLine
-800 1075 [ 800 1675 ] PLine
-800 1675 [ 1200 1675 ] PLine
-1200 1675 [ 1200 1075 ] PLine
-1200 1075 [ 800 1075 ] PLine
-10 SetLine
-875 1075 [ 875 825 ] PLine
-875 825 [ 925 825 ] PLine
-925 825 [ 925 1075 ] PLine
-10 SetLine
-1075 1075 [ 1075 825 ] PLine
-1075 825 [ 1125 825 ] PLine
-1125 825 [ 1125 1075 ] PLine
-10 SetLine
-975 1075 [ 975 825 ] PLine
-975 825 [ 1025 825 ] PLine
-1025 825 [ 1025 1075 ] PLine
-10 SetLine
-996 1549 75 PCircle
-10 SetLine
-800 1425 [ 1200 1425 ] PLine
-10 SetLine
--100 4200 [ -25 4200 ] PLine
-10 SetLine
--100 3900 [ -100 4300 ] PLine
--100 4300 [ -500 4300 ] PLine
--500 4300 [ -500 3900 ] PLine
--500 3900 [ -100 3900 ] PLine
-10 SetLine
--100 4000 [ -25 4000 ] PLine
-10 SetLine
--1100 450 100 PCircle
-10 SetLine
-1100 450 100 PCircle
-10 SetLine
-1000 3430 [ 1000 3370 ] PLine
-1000 3370 [ 800 3370 ] PLine
-800 3370 [ 800 3430 ] PLine
-800 3430 [ 1000 3430 ] PLine
-10 SetLine
-1000 3400 [ 1060 3400 ] PLine
-10 SetLine
-800 3400 [ 750 3400 ] PLine
-10 SetText2
-0 -1175 1225 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -1175 1279 [ [ -53 0 -56 4 -65 11 0 11 ] ] Char
-0 -1175 1310 [ [ -65 29 -65 6 -37 4 -40 6 -43 13 -43 20 -40 27 -34 31 -25 34 -18 31 -9 29 -3 25 0 18 0 11 -3 4 -6 2 -12 0 ] ] Char
-10 SetText2
-0 75 3375 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 129 3375 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-10 SetText2
-0 75 3175 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 129 3175 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-10 SetText2
-0 75 3575 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 129 3575 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -825 3850 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -771 3850 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -575 1450 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -521 1450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -490 1450 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-10 SetText2
-0 125 2950 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 179 2950 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 210 2950 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -825 2950 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -771 2950 [ [ 29 43 27 34 22 28 15 25 13 25 6 28 2 34 0 43 0 46 2 56 6 62 13 65 15 65 22 62 27 56 29 43 29 28 27 12 22 3 15 0 11 0 4 3 2 9 ] ] Char
-10 SetText2
-0 -100 2250 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -100 2304 [ [ -53 0 -56 4 -65 11 0 11 ] ] Char
-0 -100 2335 [ [ -65 4 -65 29 -40 15 -40 22 -37 27 -34 29 -25 31 -18 31 -9 29 -3 25 0 18 0 11 -3 4 -6 2 -12 0 ] ] Char
-10 SetText2
-0 -1275 3200 [ [ -50 34 -56 31 -62 27 -65 22 -65 13 -62 9 -56 4 -50 2 -40 0 -25 0 -15 2 -9 4 -3 9 0 13 0 22 -3 27 -9 31 -15 34 ] ] Char
-0 -1275 3254 [ [ -50 2 -53 2 -59 4 -62 6 -65 11 -65 20 -62 25 -59 27 -53 29 -46 29 -40 27 -31 22 0 0 0 31 ] ] Char
-10 SetText2
-0 -1100 2375 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -1046 2375 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -1015 2375 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1100 2575 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -1046 2575 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -1015 2575 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 900 2875 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 954 2875 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 985 2875 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 800 2050 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 854 2050 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 885 2050 [ [ 31 65 9 0 ] [ 0 65 31 65 ] ] Char
-10 SetText2
-0 -675 1100 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -621 1100 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 -590 1100 [ [ 11 65 4 62 2 56 2 50 4 43 9 40 18 37 25 34 29 28 31 21 31 12 29 6 27 3 20 0 11 0 4 3 2 6 0 12 0 21 2 28 6 34 13 37 22 40 27 43 29 50 29 56 27 62 20 65 11 65 ] ] Char
-10 SetText2
-0 -925 4075 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -871 4075 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 875 3075 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 929 3075 [ [ 11 65 4 62 2 56 2 50 4 43 9 40 18 37 25 34 29 28 31 21 31 12 29 6 27 3 20 0 11 0 4 3 2 6 0 12 0 21 2 28 6 34 13 37 22 40 27 43 29 50 29 56 27 62 20 65 11 65 ] ] Char
-10 SetText2
-0 -200 3775 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 ] ] Char
-0 -146 3775 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 325 975 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 377 975 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 450 3775 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 502 3775 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -775 675 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 -732 675 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -50 675 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 -7 675 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 700 675 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 743 675 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 -1175 4650 [ [ 22 65 22 15 20 6 18 3 13 0 9 0 4 3 2 6 0 15 0 21 ] ] Char
-0 -1132 4650 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1125 125 [ [ 0 65 0 0 27 0 ] ] Char
-0 1172 125 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 1222 125 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 1274 125 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 125 125 [ [ 0 65 0 0 27 0 ] ] Char
-0 172 125 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 222 125 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 274 125 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -875 125 [ [ 0 65 0 0 27 0 ] ] Char
-0 -828 125 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -778 125 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -726 125 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1075 3425 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] [ 20 12 34 -6 ] ] Char
-0 1131 3425 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1075 1475 [ [ 0 -65 0 0 ] [ 0 -65 -20 -65 -27 -62 -29 -59 -31 -53 -31 -46 -29 -40 -27 -37 -20 -34 0 -34 ] [ -15 -34 -31 0 ] ] Char
-0 -1127 1475 [ [ -11 -65 -4 -62 -2 -56 -2 -50 -4 -43 -9 -40 -18 -37 -25 -34 -29 -28 -31 -21 -31 -12 -29 -6 -27 -3 -20 0 -11 0 -4 -3 -2 -6 0 -12 0 -21 -2 -28 -6 -34 -13 -37 -22 -40 -27 -43 -29 -50 -29 -56 -27 -62 -20 -65 -11 -65 ] ] Char
-10 SetText2
-0 25 1750 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 77 1750 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 108 1750 [ [ 13 65 6 62 2 53 0 37 0 28 2 12 6 3 13 0 18 0 25 3 29 12 31 28 31 37 29 53 25 62 18 65 13 65 ] ] Char
-10 SetText2
-0 350 1350 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 402 1350 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 433 1350 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -550 2350 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -498 2350 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 -925 4250 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -873 4250 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 850 3250 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 902 3250 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -550 2550 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -498 2550 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -550 2150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -498 2150 [ [ 27 56 25 62 18 65 13 65 6 62 2 53 0 37 0 21 2 9 6 3 13 0 15 0 22 3 27 9 29 18 29 21 27 31 22 37 15 40 13 40 6 37 2 31 0 21 ] ] Char
-10 SetText2
-0 -1025 2150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 -973 2150 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 350 1150 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 402 1150 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 433 1150 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 1200 2125 [ [ 0 -65 0 0 ] [ 0 -65 -20 -65 -27 -62 -29 -59 -31 -53 -31 -46 -29 -40 -27 -37 -20 -34 0 -34 ] [ -15 -34 -31 0 ] ] Char
-0 1148 2125 [ [ -31 -65 -9 0 ] [ 0 -65 -31 -65 ] ] Char
-10 SetText2
-0 50 1950 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 102 1950 [ [ 29 43 27 34 22 28 15 25 13 25 6 28 2 34 0 43 0 46 2 56 6 62 13 65 15 65 22 62 27 56 29 43 29 28 27 12 22 3 15 0 11 0 4 3 2 9 ] ] Char
-10 SetText2
-0 150 1550 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 202 1550 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 233 1550 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -675 1950 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -623 1950 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 450 2550 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 502 2550 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 500 4275 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 552 4275 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -675 3450 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -623 3450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 950 1700 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 1002 1700 [ [ 29 65 6 65 4 37 6 40 13 43 20 43 27 40 31 34 34 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -350 4325 [ [ 0 65 31 0 ] [ 31 65 0 0 ] ] Char
-0 -298 4325 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1225 600 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 -1169 600 [ [ 0 65 0 0 ] [ 31 65 31 0 ] [ 0 34 31 34 ] ] Char
-0 -1117 600 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1125 600 [ [ 0 65 0 0 ] [ 0 65 18 0 ] [ 36 65 18 0 ] [ 36 65 36 0 ] ] Char
-0 1181 600 [ [ 0 65 0 0 ] [ 31 65 31 0 ] [ 0 34 31 34 ] ] Char
-0 1233 600 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 800 3450 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 852 3450 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 883 3450 [ [ 22 65 0 21 34 21 ] [ 22 65 22 0 ] ] Char
-10 SetText2
-0 -225 875 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 1125 1875 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 -125 2775 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 -1125 2775 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 -525 3675 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-10 SetText2
-0 -700 4325 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -750 275 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 34 25 ] [ 22 25 34 25 ] ] Char
-0 -696 275 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -640 275 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -588 275 [ [ 34 50 31 56 27 62 22 65 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 34 25 ] [ 22 25 34 25 ] ] Char
-0 -534 275 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 -484 275 [ [ 15 65 15 0 ] [ 0 65 31 65 ] ] Char
-0 -380 275 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 ] [ 0 34 20 34 27 31 29 28 31 21 31 12 29 6 27 3 20 0 0 0 ] ] Char
-0 -328 275 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-0 -272 275 [ [ 0 65 31 0 ] [ 31 65 0 0 ] ] Char
-0 -168 275 [ [ 0 28 40 28 ] ] Char
-0 -55 275 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -3 275 [ [ 0 65 0 0 ] [ 0 65 31 0 ] [ 31 65 31 0 ] ] Char
-0 49 275 [ [ 0 65 0 0 ] ] Char
-0 69 275 [ [ 0 65 18 0 ] [ 36 65 18 0 ] ] Char
-0 177 275 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-0 233 275 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] ] Char
-0 335 275 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 387 275 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-0 437 275 [ [ 0 65 0 0 27 0 ] ] Char
-0 484 275 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 540 275 [ [ 0 65 11 0 ] [ 22 65 11 0 ] [ 22 65 34 0 ] [ 45 65 34 0 ] ] Char
-0 605 275 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 661 275 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 46 29 40 27 37 20 34 0 34 ] [ 15 34 31 0 ] ] Char
-0 713 275 [ [ 0 65 0 0 ] [ 0 65 29 65 ] [ 0 34 18 34 ] [ 0 0 29 0 ] ] Char
-10 SetText2
-0 125 600 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 177 600 [ [ 0 65 0 0 ] [ 0 65 20 65 27 62 29 59 31 53 31 43 29 37 27 34 20 31 0 31 ] ] Char
-0 229 600 [ [ 31 56 27 62 20 65 11 65 4 62 0 56 0 50 2 43 4 40 9 37 22 31 27 28 29 25 31 18 31 9 27 3 20 0 11 0 4 3 0 9 ] ] Char
-10 SetText2
-0 500 600 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-0 561 600 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 592 600 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 -625 600 [ [ 18 65 0 0 ] [ 18 65 36 0 ] [ 6 21 29 21 ] ] Char
-0 -569 600 [ [ 0 65 0 18 2 9 6 3 13 0 18 0 25 3 29 9 31 18 31 65 ] ] Char
-0 -517 600 [ [ 0 65 0 0 ] [ 0 65 15 65 22 62 27 56 29 50 31 40 31 25 29 15 27 9 22 3 15 0 0 0 ] ] Char
-0 -465 600 [ [ 0 65 0 0 ] ] Char
-0 -445 600 [ [ 13 65 9 62 4 56 2 50 0 40 0 25 2 15 4 9 9 3 13 0 22 0 27 3 31 9 34 15 36 25 36 40 34 50 31 56 27 62 22 65 13 65 ] ] Char
-10 SetText2
-0 1100 2075 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1050 1925 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 875 675 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 1075 675 [ [ 2 50 2 53 4 59 6 62 11 65 20 65 25 62 27 59 29 53 29 46 27 40 22 31 0 0 31 0 ] ] Char
-10 SetText2
-0 975 675 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -925 1475 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 175 3775 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 -1050 2975 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-10 SetText2
-0 625 4325 [ [ 0 53 4 56 11 65 11 0 ] ] Char
-0 656 4325 [ [ 4 65 29 65 15 40 22 40 27 37 29 34 31 25 31 18 29 9 25 3 18 0 11 0 4 3 2 6 0 12 ] ] Char
-10 SetText2
-0 -825 1275 [ [ 20 56 20 0 ] [ 0 28 40 28 ] ] Char
-grestore
-showpage
diff --git a/usr.sbin/xntpd/hints/README b/usr.sbin/xntpd/hints/README
deleted file mode 100644
index f7fdb72aaa6b..000000000000
--- a/usr.sbin/xntpd/hints/README
+++ /dev/null
@@ -1,12 +0,0 @@
-README file for directory ./hints of the NTP Version 3 distribution
-
-This directory contains files with hints for particular architectures.
-
-All files are derived from the earlier README.<machine> files.
-I have tried to adjust these files to match the current state of
-affairs of this xntp distribution. The information contained in the
-files may or may not be completely correct. But these files contain
-valuable hints for specific architectures.
-
-Frank Kardel 93/12/3
-
diff --git a/usr.sbin/xntpd/hints/aux b/usr.sbin/xntpd/hints/aux
deleted file mode 100644
index aa7ccbb2c420..000000000000
--- a/usr.sbin/xntpd/hints/aux
+++ /dev/null
@@ -1,159 +0,0 @@
-Last revision: 09-Aug-1993
-
-Included in this distribution of XNTP V3 is a configuration file suitable
-for use under Apple's A/UX Version 3.0.x While it may work with
-other versions, it has not been tested. To make the executables follow
-the steps outlined below.
-
-*** NOTE: You must have gcc installed to successfully compile the current
-distribution; the native cc supplied with A/UX will NOT correctly compile
-this source. See the FAQ in comp.unix.aux for places to obtain gcc from
-and how to install it.
-
-Now, you need to create the makefiles:
-
- % make refconf
-
-First of all, you need to edit Config.local to make sure that BINDIR is
-correct for where you wish the programs to be "installed". The default
-(and what I use) is /usr/local/etc. Make sure that DEFS_LOCAL and
-CLOCKDEFS are commented out!
-
-
-After this is done (you should be told that your system is A/UX 3), make
-xntpd (the options to 'gcc' are held in compilers/aux3.gcc):
-
- % make
-
-I do not normally use the `make install' option and so have not verified its
-compatibility with A/UX. Rather, I pull out each of the executables and
-place them in the locally appropriate locations.
-
-At this point you need to set things up so that 'xntpd' is started upon
-boot-up. You can do this in 1 of 2 ways: either add entries in /etc/inittab
-or create and use an /etc/rc.local file.
-
-By default, A/UX doesn't have one, so you'll need to add the following to
-/etc/inittab:
-
- net6:2:wait:/etc/syslogd # set to "wait" to run a syslog daemon
-+ jmj0:2:wait:/etc/rc.local 1>/dev/syscon 2>&1 # Local stuff
- dbg2::wait:/etc/telinit v # turn off init's verbose mode
-
-Now, the look of /etc/rc.local is as follows:
-
- #!/bin/sh
- :
- : rc.local
- :
- # @(#)Copyright Apple Computer 1987 Version 1.17 of rc.sh on 91/11/08 15:56:21 (ATT 1.12)
-
-
- # Push line discipline/set the device so it will print
- /etc/line_sane 1
- echo " "
- echo "Entering rc.local..."
-
- set `/bin/who -r`
- if [ "$7" = 2 ]
- then
- /bin/echo " now setting the time..."
- /usr/local/etc/ntpdate -s -b <host.domain>
- sleep 5
- #
- # start up xntpd if we want
- #
- if [ -f /etc/ntp.conf ]
- then
- /bin/echo " setting tick and tickadj..."
- /usr/local/etc/tickadj -t 16672 -a 54
- sleep 5
- /bin/echo " starting xntpd..."
- /usr/local/etc/xntpd <&- > /dev/null 2>&1
- sleep 5
- fi
- #
- fi
-
- echo "Leaving rc.local..."
-
-There are a few things to notice about the above:
-
- o When run, 'ntpdate' forces your clock to the time returned by the
- host(s) specified by <host.domain> (you'll need to replace this
- be the IP address(es) of your timehosts. This is good since it gets
- things close to start off with.
-
- o 'tickadj' is also called. This does two things: changes the
- default value of 'tick' (which the the amount of time, in ms, that
- is added to the clock every 1/60 seconds) and changes the value
- of 'tickadj' which the the amount that is added or subtracted
- from 'tickadj' when adjtime() is called.
-
- Now Mac clocks are pretty bad and tend to be slow. Sooo, instead of
- having A/UX add the default of 16666ms every 1/60th of a second,
- you want it to add more so that it keeps better time. The above
- value works for me but your "best" value may be different and will
- likely require some fooling around to find the best value.
-
- A/UX's default value of 'tickadj' is 1666 which is too big for
- 'xntpd'... so it also needs to be adjusted.
-
-
-Finally, before A/UX and 'xntpd' will work happily together, you need to
-patch the kernel. This is due to the fact that A/UX attempts to keep the
-UNIX-software clock and the Mac-hardware clock in sync. Now both of these
-are too good. Also, 'xntpd' will be attempting to adjust the software
-clock as well, so having A/UX muck around with it is asking for headaches.
-What you therefore need to do is tell the kernel _not_ to sync the s/w clock
-with the h/w one. This is done using 'adb'. The following is a shell script
-that will do the patch for you:
-
- #! /bin/sh
- adb -w /unix <<!
- init_time_fix_timeout?4i
- init_time_fix_timeout?w 0x4e75
- init_time_fix_timeout?4i
- $q
- !
-
-This must be done _every_ time you create a new kernel (via newconfig or
-newunix) or else 'xntpd' will go crazy.
-
-John Dundas was the original porter of xntpd and a lot of the additions
-and A/UX-ports are from him. I got involved when I wanted to run 'xntpd'
-on jagubox. It was also around this time that the base-patchlevel of
-'xntpd' changed relatively significantly so John may not be up on this
-version (called the "jones" version).
-
-The original kernel patch (which patched 'time_fix_timeout') was from
-Richard Todd. I suggest patching 'init_time_fix_timeout' which prevents
-'time_fix_timeout' from even being called.
-
-TECHNICAL NOTES:
-
- o As configured (see machines/aux3), 'xntpd' will log messages via syslogd
- using the LOC_LOCAL1 facility. I would suggest the following in
- /etc/syslog.conf:
-
- local1.notice /usr/adm/ntpd-syslog
-
- o As mentioned above, the clocks on A/UX and Macs are kinda bad. Not
- only that, but logging in and out of the MacOS mode as well as
- extensive floppy use causes A/UX to drop and lose clock interupts
- (these are sent every 1/60th of a second). So, if you do these
- activities a lot, you find out that you lose about 300ms of time
- (i.e., you become 300ms slow). 'xntpd' default way of handling this
- is to called 'settimeofday()' and step the clock to the correct
- time. I prefer having 'xntpd' slew the clock back into line by
- making gradual adjustments to the clock over a coupla minutes
- or so. It's for this reason that SLEWALWAYS is defined in
- include/ntp_machine.h for SYS_AUX3.
-
-Good luck! If you have problems under A/UX feel free to contact me (e-mail
-is preferred).
---
- Jim Jagielski | "That is no ordinary rabbit... 'tis the
- jim@jagubox.gsfc.nasa.gov | most foul, cruel and bad-tempered
- NASA/GSFC, Code 734.4 | rodent you ever set eyes on"
- Greenbelt, MD 20771 | Tim the Enchanter
diff --git a/usr.sbin/xntpd/hints/bsdi b/usr.sbin/xntpd/hints/bsdi
deleted file mode 100644
index 3ab518b0b63d..000000000000
--- a/usr.sbin/xntpd/hints/bsdi
+++ /dev/null
@@ -1,61 +0,0 @@
-README.bsdi
-
-Author: Bdale Garbee, bdale@gag.com
-Last revision: 16 July 1993
-
-Included in this distribution of XNTP is a configuration file suitable
-for use with the BSDI BSD/386 operation system. It has been tested against
-the version 1.0 "production release", but should work with any 0.9.X "gamma
-release" version if anyone still cares. I'm using the stock gcc provided
-with the OS.
-
-[ As the pmake is badly broken on these systems at the time of this writing
- the only way to compile is to call make like this "make -e MAKE=make [target]"
- - Frank Kardel - 93/12/3 ]
-
-To date, I haven't used this with any hardware clocks, but I will probably
-get around to trying a Spectracom WWVB receiver at some point, and I'm hacking
-on an interface for the Rockwell Navcore 5 GPS widget in my "copious spare
-time".
-
-The config file is Config.bsdi, and the following steps should be all that
-are required to install and use the bits.
-
-To build the software:
-
- rm -f Config.local
- make refconf
- make
-
-To install the software:
-
- make install
-
- This will place all of the executables in /usr/local/etc. The config
- file is expected to be /usr/local/etc/xntp.conf and the key file for
- the optional authentication is /etc/ntp.keys.
-
- Craft a config file and a key file, and put them in the right places.
- There is information on how to do this elsewhere in the documentation,
- the only thing I'll mention is that I put the drift file in
- /var/log/ntp.drift, and the authdelay on my 486DX/50 system is
- 0.000064. Your mileage will vary, learn to use the authspeed tools
- if you're going to authenticate.
-
- In the file /etc/rc.local, make sure that the invocation of ntpd is
- commented out, and add an invocation of xntpd. Here's what I'm using:
-
- echo -n 'starting local daemons:'
-
- if [ -f /etc/ntp.keys -a -f /usr/local/etc/xntp.conf ]; then
- echo -n ' xntpd'; /usr/local/etc/xntpd
- fi
-
- #XXX# echo -n ' ntpd'; /usr/libexec/ntpd -t
-
-At this point, you should be good to go. Try running /usr/local/etc/xntpd and
-using ntpq or xntpdc to see if things are working, then pay attention the next
-time you reboot to make sure that xntpd is being invoked, and use ntpq or
-xntpdc again to make sure all is well.
-
-Enjoy!
diff --git a/usr.sbin/xntpd/hints/decosf1 b/usr.sbin/xntpd/hints/decosf1
deleted file mode 100644
index bc4ce0bb294d..000000000000
--- a/usr.sbin/xntpd/hints/decosf1
+++ /dev/null
@@ -1,40 +0,0 @@
-Some major changes were necessary to make xntp v3 run on the DEC Alpha
-hardware running DEC OSF/1. All "long" and "u_long" declarations and
-casts in the code were changed to "LONG" and "U_LONG" and a new header
-file (include/ntp_types.h) was added. The new header file defines
-LONG as int and U_LONG as u_int for the Alpha hardware and as long
-and u_long for anything else. A couple of #ifs where changed in
-ntpq and xntpdc to get the result of a signal defined correctly. The
-Config.decosf1 file built the programs here with no problems.
-
-I don't have a radio clock here, so none of that code has been tested.
-I have run xntpd, xntpdc, xntpres, ntpq, ntpdate, and tickadj under
-DEC OSF/1 v1.2-2 (BL10).
-
-Mike Iglesias Internet: iglesias@draco.acs.uci.edu
-University of California, Irvine BITNET: iglesias@uci
-Office of Academic Computing uucp: ...!ucbvax!ucivax!iglesias
-Distributed Computing Support phone: (714) 856-6926
-
-Support for NTP Version 2 is included with the current OSF/1 release. If
-you are upgrading to NTP Version 3 with this distribution, you should not
-use the xntpd or ntpq programs that come with the OSF/1 release. The
-older programs should be replaced by the newer programs of the same name,
-either in situ or via a link to a tranquil spot like /usr/local/bin. The
-make install script in the this distribution don't work due to a silly
-install program incompatibility, so you will need to copy the programs by
-hand.
-
-Don't use the setup utility to install or configure the xntpd installation,
-as it will cheerfully clobber your painstakingly crafted ntp.conf program.
-However, assuming you put this file in /etc/ntp.conf, you can use the
-/sbin/init.d/xntpd script to start and stop the daemon.
-
-This distribution compiles with nominal mumur with the stock cc compiler
-that comes with OSF/1.
-
-Dave Mills
-Electrical Engineering Department
-Unibergisty of Delabunch
-mills@udel.edu
-
diff --git a/usr.sbin/xntpd/hints/hpux b/usr.sbin/xntpd/hints/hpux
deleted file mode 100644
index f0e231d0a4ca..000000000000
--- a/usr.sbin/xntpd/hints/hpux
+++ /dev/null
@@ -1,92 +0,0 @@
-Last update: Sun Mar 13 15:05:31 PST 1994
-
-This file hopefully describes the whatever and however of how to get xntp
-running on hpux 7.0 and later s300. s400, s700, and s800.
-
-First off, all the standard disclaimers hold here ... HP doesn't have anthing
-to do with this stuff. I fool with it in my spare time because we use it and
-because I like to. We just happen to have a lot of HP machines around here :-)
-Xntpd has been in use here for several years and has a fair amount of mileage
-on various HP platforms within the company. I can't really guarantee bug fixes
-but I'd certainly like to hear about bugs and I won't hestitate to look at
-any fixes sent to me.
-
-Now lets talk OS. If you don't have 7.0 or later, pretty much hang it up now.
-This stuff has run here on pretty much everything from 8.0 upward on s300,
-s700, and s800. It is known to run on 7.0 s300/s400 but all reports are
-from the field and not my personal experience.
-
-If you are lucky enough to have a s300 or s400 with 9.03, then you no longer
-have to worry about adjtimed as HP-UX now has adjtime(2). The rest of you
-will have to wait on 10.0 which will have adjtime(2) and a supported though
-a bit older version of xntpd.
-
-Next, let me explain a bit about how this stuff works on HP-UX's that do not
-have adjtime(2). The directory adjtime contains libadjtime.a and the adjtimed
-daemon. Instead of the adjtime(2) system call, we use a library routine to
-talk to adjtimed thru message queues. Adjtimed munges into /dev/kmem and
-causes the clock to skew properly as needed. PLEASE NOTE that the adjtime
-code provided here is NOT a general replacement for adjtime(2) ... use of
-this adjtime(3)/adjtimed(8) other than with xntpd may yield very odd results.
-
-What to do to get this stuff running ?
-
- * If you are running an OS less than 10.0 or do not have a s300/s400
- with 9.03 or better
- -> cd machines
- -> vi hpux
- -> (change -DSYS_HPUX=? to match whatever you are running [7,8,9])
- -> cd ..
-
- * Say "make makeconfig"
-
- * Say "make", sit back for a few minutes.
-
- * cd authstuff
- * Say "./authcert < certdata" and check the output. Every line should
- end with "OK" ... if not, we got trouble.
- * Now try "./authspeed auth.samplekeys". What we want to
- remember here is the "authentication delay in CPU time"
- * cd ..
-
- * Say "make install"
-
- * I'd suggest reading the xntp docs about now :-) ... seriously !!
-
- * One thing I have added to this version of xntpd is a way to select
- config files if you are sharing /usr/local thru NFS or whatever.
- If the file /usr/local/etc/xntp.conf happens to be a directory, the
- files in that directory are searched until a match is found. The
- rules for a match are:
-
- 1. Our hostname
- 2. default.<machine id> (as in default.375 or default.850)
- 3. default
-
- * Ok, make sure adjtimed is running (just start it up for now with
- "/usr/local/etc/adjtimed"). Using -z as an option will get you
- a usage message.
-
- * Now start up xntpd and watch it work.
-
- * Make sure that adjtimed gets started at boot right before xntpd.
- We do this in /etc/netbsdsrc. They must both run as root !!
-
-Possible problems ?
-
- * On some 320's and 835's we have had to run adjtimed with "-p 45" or
- so to get rid of syslog messages about "last adjust did not finish".
-
- * At 9.0, there is a problem with DIAGMON (patch available from the
- response center) which causes it to delete the message queue that
- adjtimed/xntpd use to communicate. (see next note for result)
-
- * Xntpd has been known to get really ticked off when adjtime() fails
- which is usually only while running the emulation code on HP-UX.
- When it gets mad, it usually jumps the clock into never never land.
- Possible reasons for this are adjtimed being killed or just never
- started or adjtimed being completely swapped out on a really busy
- machine (newer adjtimed try to lock themselves in memory to prevent
- this one).
-
-Anything else ... just drop me a line at ken@sdd.hp.com
diff --git a/usr.sbin/xntpd/hints/linux b/usr.sbin/xntpd/hints/linux
deleted file mode 100644
index 0efc12bb75fc..000000000000
--- a/usr.sbin/xntpd/hints/linux
+++ /dev/null
@@ -1,9 +0,0 @@
-
-Requirements: kernel 0.99.14y or newer, libc 4.5.21 or newer
-------------
-
- With this configuration, xntp should build an run right out of the box
-(see generic hints for how-to). If you really need to run xntp on any earlier
-versions of the kernel or libc, or have any other question not covered in the
-READMEs / hint files (sorry, necessary comment in the Linux community ;-) feel
-free to ask me (duwe@informatik.uni-erlangen.de)
diff --git a/usr.sbin/xntpd/hints/notes-xntp-v3 b/usr.sbin/xntpd/hints/notes-xntp-v3
deleted file mode 100644
index ba027f2105fe..000000000000
--- a/usr.sbin/xntpd/hints/notes-xntp-v3
+++ /dev/null
@@ -1,119 +0,0 @@
-Notes for NTP Version 3
-
-This version operates in much the same manner as Version 2 with the
-following changes and additions:
-
-1. The protocol machinery operates in conformance with the RFC1305 NTP
- Version 3 specification. The most visible characteristic of this
- version is that the poll intervals for all polls, even selected
- ones, is significantly increased. This is especially desirable when
- serving a large client population. This implementation supports
- previous versions as non-configured peers; for version-2 configured
- peers a "version 2" keyword should be included on the "peer" line.
-
-2. The configuration file has a new keyword: statfile <file>, where
- <file> is the name of a statistics file." When present, each clock
- update generates an entry of the form:
-
- <day> <sec>.<frac> <addr> <status> <offset> <delay> <disp>
-
- where <day> is the modified Julian day, <sec>.<frac> is the time of
- day, <addr> is the peer address and <status> is the peer status.
- The <offset>, <delay> and <disp> are the measured offset, delay and
- dispersion, respectively, of the peer clock relative to the local
- clock. About once per day the current file is closed and a new one
- created with names <file>.<gen>, where <gen> starts at one and
- increments for each new generation.
-
-3. A number of additional platforms are supported. See ./Config file
- for details.
-
-4. A driver for the TrueTime 468DC GOES Synchronized Clock is
- included. This driver (refclock_goes.c) should also work for other
- TrueTime radio clocks, since all use the same format.
-
-5. A replacement driver for the Spectracom 8170 WWVB Synchronized
- Clock is included. This driver (refclock_wwvb.c) (a) does not
- require a 1-pulse-per-second signal, (b) supports both format 0
- (original 8170) and format 2 (Netclock/2 and upgraded 8170), (c)
- can be connected to more than one computer and (d) automatically
- compensates for all serial baud rates.
-
-6. A driver for the German time/frequency station DCF77 is included.
- This requires a special STREAMS module.
-
-7. In Version 2 special line-discipline modules were required for the
- CHU and WWVB drivers. This code continues to work in Version 3,
- although it is no longer needed for the WWVB driver. However, this
- code does not work under STREAMS, as used in SunOS 4.1.1.
- Equivalent STREAMS modules are supplied with Version 3.
-
-8. Support for an external 1-pulse-per-second (pps) signal is
- provided. The signal is connected to a serial port (see
- xntpd/ntp_loopfilter.c for details). When present the leading edge
- of the pulse establishes the on-time epoch within an interval
- established by the selected radio clock or other NTP time server.
- Use of the pps is indicated when the tattletale displayed by ntpq
- changes from "*" to "o".
-
-9. The clock-selection and poll-update procedures have been modified
- slightly in order to achieve better performance on high speed LANs
- with compromise in performance on typical WANs.
-
-10. In order to comply with U.S. Commerce Department regulations, the DES
- encryption routine lib/authdes.c cannot be exported. For exportable
- versions of this distribution a DES-encrypted version of this routine
- lib/authdes.c.des is included along with an unencrypted version
- lib/authdes.c.export, which allows normal operation, but without the
- NTP authentication feature. Further information is available in the
- lib/authdes.c.export file.
-
-11. As an alternative to the DES-based authentication mechanism, an
- implementation of the RSA Message Digest 5 algorithm is provided.
- (see applicable copyright information in the library files).
-
-12. A driver for the Magnavox MX4200 GPS clock.
-
-13. A STREAMS module which captures carrier-detect data-lead transitions to
- connect a precision source of 1-pps, yet avoid the ugly overhead in the
- usual STREAMS processing. See the ppsclock subdirectory.
-
-14. Support for the Apple A/UX operating system and enhanced support for the
- Hewlet-Packard HP/UX operating system. See the various README and Config
- files for further information.
-
-See the COPYRIGHT file for authors and copyright information. Note that some
-modules in this distribution contain copyright information that supersedes
-the copyright information in that file.
-
-If I missed something or neglected to give due credit, please advise.
-
-David L. Mills
-University of Delaware
-31 May 1992, amended 23 July 1992, 25 October 1992
-
-Bugs and notes
-
-A bug in the original tty_clk_STREAMS.c module has been fixed.
-
-The poll-interval randomization feature of poll_update (in
-xntpd/ntp_proto.c) has been extended to apply when the poll interval is
-increased, as well as reduced. This spreads the update messages in time
-and helps avoid unpleasant bursts of messages.
-
-In the clock_select algorithm the peers selected for combining are
-limited to those survivors at the lowest stratum, not the entire list.
-This helps avoid whiplash when large numbers of peers are at the same
-stratum.
-
-The number formerly displayed by ntpq as "compliance" is now the time
-constant of integration.
-
-The DNS resolver xntpd/ntp_intres.c is now integrated into xntpd, making
-configuration of multiple hosts easier.
-
-System and peer event are now written to the system log at priority
-LOG_INFO.
-
-The leap-second code was fixed to avoid broadcasting leap warnings on
-all except the last day of June and December.
diff --git a/usr.sbin/xntpd/hints/parse b/usr.sbin/xntpd/hints/parse
deleted file mode 100644
index d2523515e839..000000000000
--- a/usr.sbin/xntpd/hints/parse
+++ /dev/null
@@ -1,105 +0,0 @@
-Compilation:
- Usual thing: rm -f Config.local ; make for vanilla
- make refconf for reference clock (e. g. DCF77)
-
-Directory contents:
-
- hints/PARSE - this file
-
- xntpd/refclock_parse.c
- - reference clock support for DCF77/GPS in xntp
- parse/parse.c
- - Reference clock data parser framework
- parse/parse_conf.c
- - parser configuration (clock types)
- parse/clk_meinberg.c
- - Meinberg clock formats (DCF U/A 31, PZF 535, GPS166)
- parse/clk_schmid.c
- - Schmid receiver (DCF77)
- parse/clk_rawdcf.c
- - 100/200ms pulses via 50 Baud line (DCF77)
- parse/clk_dcf7000.c
- - ELV DCF7000 (DCF77)
- parse/clk_trimble.c
- - Trimble SV6 GPS receiver
-
- If you want to add new clock types please check
- with kardel@informatik.uni-erlangen.de. These files
- implement the conversion of RS232 data streams into
- timing information used by refclock_parse.c which is
- mostly generic except for NTP configuration constants.
-
- parse/Makefile.kernel
- - *SIMPLE* makefile to build a loadable STREAMS
- module for SunOS 4.x / SunOS 5.x systems
-
- parse/parsestreams.c
- - SUN Streams module (loadable) for radio clocks
- This streams module is designed for SunOS 4.1.X.
-
- parse/parsesolaris.c
- - SUN Streams module (loadable) for radio clocks.
- This streams module is designed for SunOS 5.x
- Beware this is still new - so it might crash
- your machine (we have seen it working, though).
-
- parse/parsetest.c
- - simple test program for STREAMS module. Its so simple,
- that it doesn't even set TTY-modes, thus they got to
- be correct on startup - works for Meinberg receivers
-
- parse/testdcf.c
- - test program for raw DCF77 (100/200ms pulses)
- receivers
-
- include/parse.h - interface to "parse" module and more
- include/parse_conf.h
- - interface to "parse" configuration
-
- include/sys/parsestreams.h
- - STREAMS specific definitions
-
- scripts/support
- - scripts (perl & sh) for statistics and rc startup
- the startup scripts are used in Erlangen for
- starting the daemon on a variety of Suns and HPs
- and for Reference Clock startup on Suns
- These scripts may or may not be helpful to you.
-
-Supported clocks:
- Meinberg DCF U/A 31
- Meinberg PZF535/TCXO (Software revision PZFUERL 4.6)
- Meinberg PZF535/OCXO (Software revision PZFUERL 4.6)
- Meinberg GPS166 (Software version for Uni-Erlangen)
- ELV DCF7000 (not recommended - casual/emergency use only)
- Conrad DCF77 receiver (email: time@informatik.uni-erlangen.de)
- + level converter
- TimeBrick (email: time@informatik.uni-erlangen.de)
- Schmid Receiver Kit
- Trimble SV6 GPS receiver
-
-Addresses:
- Meinberg Funkuhren
- Auf der Landwehr 22
- 31812 Bad Pyrmont
- Germany
- Tel.: 05281/20 18
- FAX: 05281/60 81 80
-
- ELV Kundenservice
- Postfach 1000
- 26787 Leer
- Germany
- Tel.: 0491/60 08 88
-
- Walter Schmidt
- Eichwisrain 14
- 8634 Hombrechtikon
- Switzerland
-
-If you have problems mail to:
-
- time@informatik.uni-erlangen.de
-
-We'll help (conditions permitting)
-
diff --git a/usr.sbin/xntpd/hints/refclocks b/usr.sbin/xntpd/hints/refclocks
deleted file mode 100644
index 34b2ea934446..000000000000
--- a/usr.sbin/xntpd/hints/refclocks
+++ /dev/null
@@ -1,32 +0,0 @@
-This is a short overview for the reference clocks currently supported
-by xntp V3. (Ultimate wisdom can be obtained from xntpd/refclock_*.c
-this file was derived from that information - unfortunately some comments
-in the files tend to get stale - so use with caution)
-
-Refclock address Type
-127.127.0.x no clock (fails to configure)
-127.127.1.x local clock - use local clock as reference
-127.127.2.x no clock (fails to configure)
-127.127.3.x PSTI 1010/1020 WWV Clock
-127.127.4.x SPECTRACOM WWVB receiver 8170 and Netclock/2
-127.127.5.x Kinimetric Truetime 468-DC GOES receiver
-127.127.6.x IRIG audio decode (Sun & modified BSD audio driver)
-127.127.7.x CHU Timecode (via normal receiver & Bell 103 modem)
-127.127.8.x PARSE (generic driver for a bunch of DCF/GPS clocks
- can be extended for other clocks too)
- 8.0-3 Meinberg PZF535/TCXO
- 8.4-7 Meinberg PZF535/OCXO
- 8.8-11 Meinberg DCF U/A 31
- 8.12-15 ELV DCF7000
- 8.16-19 Walter Schmid DCF receiver (Kit)
- 8.20-23 Conrad DCF77 receiver module + level converter (Kit)
- 8.24-27 TimeBrick (limited availability ask
- time@informatik.uni-erlangen.de)
- 8.28-31 Meinberg GPS166
- 8.32-35 Trimble SV6 GPS receiver
-127.127.9.x MX4200 GPS receiver
-127.127.10.x Austron 2201A GPS Timing Receiver
-127.127.11.x Kinemetrics Truetime OM-DC OMEGA Receiver
-127.127.12.x KSI/Odetecs TPRO-S IRIG-B / TPRO-SAT GPS
-127.127.13.x Leitch: CSD 5300 Master Clock System Driver
-127.127.14.x MSFEES
diff --git a/usr.sbin/xntpd/hints/rs6000 b/usr.sbin/xntpd/hints/rs6000
deleted file mode 100644
index 8561ac29b1b0..000000000000
--- a/usr.sbin/xntpd/hints/rs6000
+++ /dev/null
@@ -1,56 +0,0 @@
-15.7.1993
-xntp3 compiles now again on AIX. I have disabled prototyping and added
-the switch -D_NO_PROTO which disables prototyping in the system include
-files.
-
-Matthias Ernst maer@nmr.lpc.ethz.ch
---------------------------------------------------------------------------------
-Xntp version 3 now support the cc compiler for AIX.
-The Config.aix will now use cc by default. You can still compile xntp
-with the bsd compiler by changing "COMP= cc" to "COMP= bsdcc" and
-and removing the "-DSTUPID_SIGNAL" option from the "DEFS" option.
-
-xntp and tickadj was also modified so that the value of tickadj is read
-form the kernel and can be set by tickadj. For now I would not set
-tickadj below 40 us.
-
-Bill Jones
-jones@chpc.utexas.edu
--------------------------------------------------------------------------------
-
-This is a modified version of xntp version 3 for the RS6000. It works for
-AIX 3.2 and these are the same changes as have been applied tothe version 2
-implementation of xntp. It works fine for us but I have not tested all of
-the features, especially the local clock support for the RS6000 is not tested
-at all.
-
-Matthias Ernst, ETH-Zuerich, Switzerland - maer@nmr.lpc.ethz.ch
-
---------------------------------------------------------------------------------
-
-Here the original README.rs6000 for the version 2 implementation:
-
-A hacked version of xntp for the IBM RS/6000 under AIX 3.1 can be found
-in xntp.rs6000.tar.Z. [ if still available at all - Frank Kardel 93/12/3 ]
-
-This will not work on older versions of AIX due to a kernel bug; to find
-out whether you have the kernel bug, compile and run testrs6000.c (see
-comments in the code for instructions).
-
-xntp and testrs6000 require "bsdcc" to compile. This is simply another
-entry point into the xlc compiler with various options set for BSD
-compatibility. If your system does not have bsdcc, do the following:
-
-link /bin/bsdcc to /bin/xlc
-
-put the following into /etc/xlc.cfg:
-
-* BSD compatibility
-bsdcc: use = DEFLT
- crt = /lib/crt0.o
- mcrt = /lib/mcrt0.o
- gcrt = /lib/gcrt0.o
- libraries = -lbsd, -lc
- proflibs = -L/lib/profiled,-L/usr/lib/profiled
- options = -H512,-T512, -qlanglvl=extended, -qnoro, -D_BSD, -D_NONSTD_TYPES, -D_NO_PROTO, -tp,-B/lib/
-
diff --git a/usr.sbin/xntpd/hints/sgi b/usr.sbin/xntpd/hints/sgi
deleted file mode 100644
index 5e4f7de6d597..000000000000
--- a/usr.sbin/xntpd/hints/sgi
+++ /dev/null
@@ -1,74 +0,0 @@
-adjtime, tick and tickadj:
---------------------------
-
-The SGI value for HZ is 100 under Irix 4, with the system clock running
-in nominal mode (ftimer off), so the value for tick is 10000 usec.
-Tickadj is a bit more tricky because of the behaviour of adjtime(),
-which seems to try to perform the correction over 100-200 seconds, with
-a rate limit of 0.04 secs/sec for large corrections. Corrections of
-less than 0.017 seconds generally complete in less than a second,
-however.
-
-Some measured rates are as follows:
-
- Delta Rate (sec/sec)
-
- > 1 0.04
- 0.75 0.04
- 0.6 0.004
- 0.5 0.004
- 0.4 0.0026
- 0.3 0.0026
- 0.2 0.0013
- 0.1 0.0015
- 0.05 0.0015
- 0.02 0.0003
- 0.01 0.015
-Strange. Anyway, since adjtime will complete adjustments of less than
-17msec in less than a second, whether the fast clock is on or off, I
-have used a value of 150usec/tick for the tickadj value.
-
-Fast clock:
------------
-
-I get smoother timekeeping if I turn on the fast clock, thereby making
-the clock tick at 1kHz rather than 100Hz. With the fast clock off, I
-see a sawtooth clock offset with an amplitude of 5msec. With it on,
-the amplitude drops to 0.5msec (surprise!). This may be a consequence
-of having a local reference clock which spits out the time at exactly
-one-second intervals - I am probably seeing sampling aliasing between
-that and the machine clock. This may all be irrelevant for machines
-without a local reference clock. Fiddling with the fast clock doesn't
-seem to compromise the above choices for tick and tickadj.
-
-I use the "ftimer" program to switch the fast clock on when the system
-goes into multiuser mode, but you can set the "fastclock" flag in
-/usr/sysgen/master.d/kernel to have it on by default. See ftimer(1).
-
-timetrim:
----------
-
-Irix has a kernel variable called timetrim which adjusts the system
-time increment, effectively trimming the clock frequency. Xntpd could
-use this rather than adjtime() to do it's frequency trimming, but I
-haven't the time to explore this. There is a utility program,
-"timetrim", in the util directory which allows manipulation of the
-timetrim value in both SGI and xntpd native units. You can fiddle with
-default timetrim value in /usr/sysgen/master.d/kernel, but I think
-that's ugly. I just use xntpd to figure out the right value for
-timetrim for a particular CPU and then set it using "timetrim" when
-going to multiuser mode.
-
-Serial I/O latency:
--------------------
-
-If you use a local clock on an RS-232 line, look into the kernel
-configuration stuff with regard to improving the input latency (check
-out /usr/sysgen/master.d/[sduart|cdsio]). I have a Kinemetrics OM-DC
-hooked onto /dev/ttyd2 (the second CPU board RS-232 port) on an SGI
-Crimson, and setting the duart_rsrv_duration flag to 0 improves things
-a bit.
-
-
-12 Jan 93
-Steve Clift, CSIRO Marine Labs, Hobart, Australia (clift@ml.csiro.au)
diff --git a/usr.sbin/xntpd/hints/solaris b/usr.sbin/xntpd/hints/solaris
deleted file mode 100644
index 1d0e47fc473e..000000000000
--- a/usr.sbin/xntpd/hints/solaris
+++ /dev/null
@@ -1,87 +0,0 @@
- A quick summary of how to compile under Solaris:
-
- If you are running Solaris 2.0, you should upgrade to a later version of
-Solaris immediately.
- If you are running Solaris 2.1 or later, all should be fine (i hope)
-
- Solaris 2.1 contains fairly traditional clock code, with tick and tickadj.
-Solaris 2.2 and later contains completely re-written clock code to provide
-high resolution microsecond timers. A benefit of the re-written clock code
-is that adjtime does not round off its adjustments, so xntp does not have to
-compensate for this rounding. On Solaris 2.2 and later we #define
-ADJTIME_IS_ACCURATE, and do not look for the tickadj kernel variable.
-
- If you are running both Solaris 2.1 and 2.2 on your net, you will need to
-maintain two sets of xntp binaries. The Config.solaris2.2 file will compile
-on Solaris 2.1, but the resulting binaries will not work correctly.
-
-ADDITIONAL NOTES FOR SOLARIS 2.1
-(by William L. Jones jones@chpc.utexas.edu)
-
-Since settimeofday under Solaris 2.1 only sets the seconds part of timeval
-care must be used in starting xntpd. I suggest the following start
-up script:
-
- tickadj -s -a 1000
- ntpdate -v server1 server2
- sleep 20
- ntpdate -v server1 server2
- sleep 20
- tickadj -a 200
- xntpd
-
-The first tickadj turns of the time of day clock and sets the tick adjust
-value to 1 ms. This will insure that an adjtime value of at most 2
-seconds will complete in 20 seconds.
-
-The first ntpdate will set the time to within two seconds
-using settimeofday or it will adjust time using adjtime.
-
-The first sleep insures the adjtime has completed for the first ntpdate.
-
-The second ntpdate will use adjtime to set the time of day since the
-clock should be within 2 seconds of the correct time.
-
-The second tickadj set the tick adjust system value to 5 us.
-
-The second sleeps insure that adjtime will complete before starting
-the next xntpd.
-
-I tried running with a tickadj of 5 us with out much success.
-200 us seems to work well.
-
-
-ADDITIONAL NOTES FOR SOLARIS 2.2 AND LATER:
- You still need to turn off dosynctodr for XNTP to be able to keep accurate
-time. You can either do this in the /etc/system file (consulted at boot to set
-various kernel variables) by putting in the following line:
-set dosynctodr=0
-or you can use the tickadj program to force the variable to 0 in the running
-kernel. Fiddling with a running kernel is almost never a good idea, I'd
-recommend using /etc/system.
- I would recommend starting xntp from the following script, placed in
-/etc/rc2.d and named S99xntpd
-
-#!/bin/sh
-
-if [ $1 = "start" ]; then
- if [ -x /usr/local/bin/xntpd ]; then
- echo "Starting NTP daemon, takes about 1 minute... "
- # The following line is unnecessary if you turn off
- # dosynctodr in /etc/system.
- /usr/local/bin/tickadj -s
- /usr/local/bin/ntpdate -v server1 server2
- sleep 5
- /usr/local/bin/xntpd
- fi
-else
- if [ $1 = "stop" ]; then
- pid=`/usr/bin/ps -e | /usr/bin/grep xntpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
- if [ "${pid}" != "" ]; then
- echo "Stopping Network Time Protocol daemon "
- /usr/bin/kill ${pid}
- fi
- fi
-fi
-
-Denny Gentry denny@eng.sun.com
diff --git a/usr.sbin/xntpd/hints/sun4 b/usr.sbin/xntpd/hints/sun4
deleted file mode 100644
index 6dc36ea5429d..000000000000
--- a/usr.sbin/xntpd/hints/sun4
+++ /dev/null
@@ -1,17 +0,0 @@
-Notes on CPU clock oscillator tolerance with SunOS 4.1.1 and 4.1.3
-
-A bug in SunOS 4.1.1 results in the kernel time losing 1 microsecond
-per tick of the system clock. The bug was fixed (bugid 1094383) for
-SunOS 4.1.1 and corrected in SunOS 4.1.3. The easiest way to fix this
-is to replace the 4.1.1 binary clock.o with the corresponding 4.1.3
-binary. Without this change it is necessary to use the tickadj program
-included in this distribution with the -t 9999 option.
-
-The tickadj option will work in all cases except when the kernel has
-been modified to correct the CPU clock oscillator frequency using a
-1-pps signal from a precision source. The bugfix must be installed for
-this wrinkle to work properly.
-
-Dave Mills (mills@udle.edu)
-
-
diff --git a/usr.sbin/xntpd/hints/svr4-dell b/usr.sbin/xntpd/hints/svr4-dell
deleted file mode 100644
index b6d015752dd7..000000000000
--- a/usr.sbin/xntpd/hints/svr4-dell
+++ /dev/null
@@ -1,6 +0,0 @@
-Notes on the DELL SVR4.
-
-You should use -DSETTIMEOFDAY_BROKEN.
-
-Philip.Gladstone@mail.citicorp.com
-
diff --git a/usr.sbin/xntpd/kernel/Makefile.tmpl b/usr.sbin/xntpd/kernel/Makefile.tmpl
deleted file mode 100644
index 8b40f4a92e05..000000000000
--- a/usr.sbin/xntpd/kernel/Makefile.tmpl
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# /src/NTP/REPOSITORY/v3/kernel/Makefile.tmpl,v 3.6 1994/01/25 19:04:35 kardel Exp
-#
-# parse routine that could be used in two places
-#
-COMPILER= cc
-COPTS= -O
-AUTHDEFS=-DDES
-LIBDEFS= -DBIG_ENDIAN
-RANLIB= ranlib
-INSTALL= install
-CLOCKDEFS=
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-CLK_VDOBJS=clkinit.o tty_clk_STREAMS.o
-CHU_VDOBJS=chuinit.o tty_chu_STREAMS.o
-INCL=-I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL) -DKERNEL
-CC= $(COMPILER)
-#
-
-all:
- @echo $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) | \
- awk '/-DREFCLOCK/ && ( /-D.*CLK/ || /-D.*PPS/ ) { makeit=1; }\
- END { if (makeit) \
- { print ""; \
- print "### STREAMS kernel modules ppsclock, ppsclocd or line disciplines must"; \
- print "### be installed manually if needed"; \
- print "### see kernel/README* for details"; \
- print "### The parse refclock implementation has their own support in"; \
- print "### parse/*."; } }'
-
-loadable: clk.o chu.o
-
-clk.o: ${CLK_VDOBJS}
- ld -r ${OBJS} -o clk.o
-
-clk.h:
- echo "#define NCLK 2" > clk.h
-
-tty_clk_STREAMS.o: clk.h tty_clk_STREAMS.c
- cc ${CFLAGS} tty_clk_STREAMS.c -c tty_clk_STREAMS.o
-
-chu.o: ${CHU_VDOBJS}
- ld -r ${OBJS} -o chu.o
-
-chu.h:
- echo "#define NCHU 2" > chu.h
-
-tty_chu_STREAMS.o: chu.h tty_chu_STREAMS.c
- cc ${CFLAGS} tty_chu_STREAMS.c -c tty_chu_STREAMS.o
-
-clean:
- -@rm -f *~ *.o *.out *.ln make.log Makefile.bak \
- lintlib.errs lint.errs
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
diff --git a/usr.sbin/xntpd/kernel/README b/usr.sbin/xntpd/kernel/README
deleted file mode 100644
index cf69b137286b..000000000000
--- a/usr.sbin/xntpd/kernel/README
+++ /dev/null
@@ -1,90 +0,0 @@
-This directory contains code for two line disciplines which may
-work with BSD-style terminal drivers. While I'll try to cover
-installation details for the more useful one here as best I can,
-you really should know what you are doing before attempting to
-put one of these in your kernel since the details seem to vary
-from BSD variant to BSD variant.
-
-Tty_clk.c contains a generic clock support line discipline.
-The terminal driver is actually run in raw mode, giving you an
-eight bit data path. Instead of delivering the data
-character-by-character, however, the line discipline collects
-characters until one of two magic characters (your current erase
-and kill characters. Don't throw up) is received. A timestamp
-is then taken (by calling microtime()), inserted in the input
-buffer after the magic character, and the whole mess made available
-for input by the application. Both select() and SIGIO are supported
-by the discipline.
-
-Tty_chu.c is a special purpose line discipline for receiving
-the CHU time code. It understands enough about the format of the
-code CHU transmits to filter out errors, and delivers an entire
-ten character code group to the application all at once, including
-a timestamp for each character. The structure the code group is
-delivered in is defined in chudefs.h. Note that this line discipline
-is old and could use some rewriting for better portability. Please
-drop me a line if you are interested in using this.
-
-To install the clock line discipline, do something like the following:
-
-(1) Copy tty_clk.c into /sys/sys
-
-(2) Edit /sys/sys/tty_conf.c. You will want to include some facsimile
- of the following lines:
-
-#include "clk.h"
-#if NCLK > 0
-int clkopen(), clkclose(), clkwrite(), clkinput(), clkioctl();
-#endif
-
-#if NCLK > 0
- { clkopen, clkclose, ttread, clkwrite, clkioctl,
- clkinput, nodev, nulldev, ttstart, nullmodem, /* 10- CLKLDISC */
- ttselect },
-#else
- { nodev, nodev, nodev, nodev, nodev,
- nodev, nodev, nodev, nodev, nodev,
- nodev },
-#endif
-
- In Ultrix 4.2a and 4.3 the file to edit is /sys/data/tty_conf_data.c.
- The lines should be
-
-#if NCLK > 0
- clkopen, clkclose, ttread, clkwrite, clkioctl, /* 10 */
- clkinput, nodev, nulldev, ttstart, nulldev,
-#else
- nodev, nodev, nodev, nodev, nodev,
- nodev, nodev, nodev, nodev, nodev,
-#endif
-
- Note that if your kernel doesn't include the ??select() entry in
- the structure (i.e. there are only 10 entry points in the structure)
- just leave it out. Also note that the number you give the line
- discipline (10 in my kernel) will be specific to your kernel and
- will depend on what is in there already. The entries sould be in
- order with no missing space; that is, if there are only seven
- disciplines already defined and you want to use 10 for good reason,
- you should define a dummy 9th entry like this
-
- nodev, nodev, nodev, nodev, nodev, /* 9 */
- nodev, nodev, nodev, nodev, nodev,
-
-(3) Edit /sys/h/ioctl.h and include a line (somewhere near where other
- line disciplines are defined) like:
-
-#define CLKLDISC 10 /* clock line discipline */
-
- The `10' should match what you used in /sys/sys/tty_conf.c.
-
-(4) Edit /sys/conf/files and add a line which looks like:
-
-sys/tty_clk.c optional clk
-
-(5) Edit the configuration file for the machine you want to use
- the clock line discipline on to include the following:
-
-pseudo-device clk 4
-
-(6) Run config, then make clean, then make depend, then make vmunix.
- Then reboot the new kernel.
diff --git a/usr.sbin/xntpd/kernel/README.streams b/usr.sbin/xntpd/kernel/README.streams
deleted file mode 100644
index 26c2825b50df..000000000000
--- a/usr.sbin/xntpd/kernel/README.streams
+++ /dev/null
@@ -1,86 +0,0 @@
-Some kernels don't support additional user defined line disciplines.
-Especially notable in this regard is SunOS and System V. They
-provide similar support in the form of "Streams". Accordingly,
-included in this directory is a pair of STREAMS modules to
-replace the line disciplines that provide clock support for
-xntpd. Notice that the "clkdefs.h" file is not used in the
-original line discipline, but the "chudefs.h" file is the
-same one used in the original line discipline.
-
-TO INSTALL A NEW STREAMS DRIVER:
-
-1. Copy your choice to /sys/os, removing the "_STREAMS" in the
-filename.
-
-2. Copy the appropriate *defs.h file to /usr/include/sys,
-then link it (with ln) to /sys/sys.
-
-In the following steps, substitute "clk" for "chu" if you're
-installing the clk driver.
-
-3. Append to /sys/conf.common/files.cmn:
-
-os/tty_chu.c optional chu
-
-4. Edit /sys/sun/str_conf.c. You'll want to add lines in three
-places. It'll be sort of clear where when you see the file.
-
-.
-.
-.
-#include "chu.h"
-.
-.
-.
-#if NCHU > 0
-extern struct streamtab chuinfo;
-#endif
-.
-.
-.
-#if NCHU > 0
- { "chu", &chuinfo },
-#endif
-.
-.
-.
-
-At this point, the kernel-making "config [k-name] ; cd ../[k-name] ; make"
-should produce a kernel just as it did before. If it fouls up,
-something's wrong.
-
-5. Edit /sys/[arch]/conf/[k-name] (substituting the architecture and
-kernel name) to stick in:
-
-pseudo-device chu4 # CHU clock support
-
-You can change 4 to anything you like. It will limit the number
-of instantiations of the chu driver you can use at the same time.
-
-6. Make a new kernel and boot it.
-
-HOW TO USE THE CHU STREAMS DRIVER:
-
-The driver should act exactly like the line discipline.
-After setting the raw mode, and exclusive access (if you want),
-pop off all the extra streams, then push the chu module
-on. From then on, any reads from the file in question
-will return chucode structures as defined in chudefs.h.
-Depending on the settings of PEDANTIC and ANAL_RETENTIVE
-used when compiling the kernel, some checking of the
-data may or may not be necessary.
-
-HOW TO USE THE CLK STREAMS DRIVER:
-
-First, it should be noted that a new ioctl() has been defined.
-The CLK_SETSTR ioctl takes a pointer to a string of no more
-than CLK_MAXSTRSIZE characters. Until the first CLK_SETSTR
-is performed, the driver will simply pass through characters.
-Once it is passed a string, then any character in that string
-will be immediately followed by a struct timeval. You can
-change the string whenever you want by doing another
-CLK_SETSTR. The character must be an exact, 8 bit match.
-The character '\000' cannot, unfortunately, be stamped.
-Passing an empty string to CLK_SETSTR turns off stamping.
-Passing NULL will produce undefined results.
-
diff --git a/usr.sbin/xntpd/kernel/tty_chu.c b/usr.sbin/xntpd/kernel/tty_chu.c
deleted file mode 100644
index 4615875e77e0..000000000000
--- a/usr.sbin/xntpd/kernel/tty_chu.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/* tty_chu.c,v 3.1 1993/07/06 01:07:30 jbj Exp
- * tty_chu.c - CHU line driver
- */
-
-#include "chu.h"
-#if NCHU > 0
-
-#include "../h/param.h"
-#include "../h/types.h"
-#include "../h/systm.h"
-#include "../h/dir.h"
-#include "../h/user.h"
-#include "../h/ioctl.h"
-#include "../h/tty.h"
-#include "../h/proc.h"
-#include "../h/file.h"
-#include "../h/conf.h"
-#include "../h/buf.h"
-#include "../h/uio.h"
-
-#include "../h/chudefs.h"
-
-/*
- * Line discipline for receiving CHU time codes.
- * Does elementary noise elimination, takes time stamps after
- * the arrival of each character, returns a buffer full of the
- * received 10 character code and the associated time stamps.
- */
-#define NUMCHUBUFS 3
-
-struct chudata {
- u_char used; /* Set to 1 when structure in use */
- u_char lastindex; /* least recently used buffer */
- u_char curindex; /* buffer to use */
- u_char sleeping; /* set to 1 when we're sleeping on a buffer */
- struct chucode chubuf[NUMCHUBUFS];
-} chu_data[NCHU];
-
-/*
- * Number of microseconds we allow between
- * character arrivals. The speed is 300 baud
- * so this should be somewhat more than 30 msec
- */
-#define CHUMAXUSEC (50*1000) /* 50 msec */
-
-int chu_debug = 0;
-
-/*
- * Open as CHU time discipline. Called when discipline changed
- * with ioctl, and changes the interpretation of the information
- * in the tty structure.
- */
-/*ARGSUSED*/
-chuopen(dev, tp)
- dev_t dev;
- register struct tty *tp;
-{
- register struct chudata *chu;
-
- /*
- * Don't allow multiple opens. This will also protect us
- * from someone opening /dev/tty
- */
- if (tp->t_line == CHULDISC)
- return (EBUSY);
- ttywflush(tp);
- for (chu = chu_data; chu < &chu_data[NCHU]; chu++)
- if (!chu->used)
- break;
- if (chu >= &chu[NCHU])
- return (EBUSY);
- chu->used++;
- chu->lastindex = chu->curindex = 0;
- chu->sleeping = 0;
- chu->chubuf[0].ncodechars = 0;
- tp->T_LINEP = (caddr_t) chu;
- return (0);
-}
-
-/*
- * Break down... called when discipline changed or from device
- * close routine.
- */
-chuclose(tp)
- register struct tty *tp;
-{
- register int s = spl5();
-
- ((struct chudata *) tp->T_LINEP)->used = 0;
- tp->t_cp = 0;
- tp->t_inbuf = 0;
- tp->t_rawq.c_cc = 0; /* clear queues -- paranoid */
- tp->t_canq.c_cc = 0;
- tp->t_line = 0; /* paranoid: avoid races */
- splx(s);
-}
-
-/*
- * Read a CHU buffer. Sleep on the current buffer
- */
-churead(tp, uio)
- register struct tty *tp;
- struct uio *uio;
-{
- register struct chudata *chu;
- register struct chucode *chucode;
- register int s;
-
- if ((tp->t_state&TS_CARR_ON)==0)
- return (EIO);
-
- chu = (struct chudata *) (tp->T_LINEP);
-
- s = spl5();
- chucode = &(chu->chubuf[chu->lastindex]);
- while (chu->curindex == chu->lastindex) {
- chu->sleeping = 1;
- sleep((caddr_t)chucode, TTIPRI);
- }
- chu->sleeping = 0;
- if (++(chu->lastindex) >= NUMCHUBUFS)
- chu->lastindex = 0;
- splx(s);
-
- return (uiomove((caddr_t)chucode, sizeof(*chucode), UIO_READ, uio));
-}
-
-/*
- * Low level character input routine.
- * If the character looks okay, grab a time stamp. If the stuff in
- * the buffer is too old, dump it and start fresh. If the character is
- * non-BCDish, everything in the buffer too.
- */
-chuinput(c, tp)
- register int c;
- register struct tty *tp;
-{
- register struct chudata *chu = (struct chudata *) tp->T_LINEP;
- register struct chucode *chuc;
- register int i;
- long sec, usec;
- struct timeval tv;
-
- /*
- * Do a check on the BSDness of the character. This delays
- * the time stamp a bit but saves a fair amount of overhead
- * when the static is bad.
- */
- if (((c) & 0xf) > 9 || (((c)>>4) & 0xf) > 9) {
- chuc = &(chu->chubuf[chu->curindex]);
- chuc->ncodechars = 0; /* blow all previous away */
- return;
- }
-
- /*
- * Call microtime() to get the current time of day
- */
- microtime(&tv);
-
- /*
- * Compute the difference in this character's time stamp
- * and the last. If it exceeds the margin, blow away all
- * the characters currently in the buffer.
- */
- chuc = &(chu->chubuf[chu->curindex]);
- i = (int)chuc->ncodechars;
- if (i > 0) {
- sec = tv.tv_sec - chuc->codetimes[i-1].tv_sec;
- usec = tv.tv_usec - chuc->codetimes[i-1].tv_usec;
- if (usec < 0) {
- sec -= 1;
- usec += 1000000;
- }
- if (sec != 0 || usec > CHUMAXUSEC) {
- i = 0;
- chuc->ncodechars = 0;
- }
- }
-
- /*
- * Store the character. If we're done, have to tell someone
- */
- chuc->codechars[i] = (u_char)c;
- chuc->codetimes[i] = tv;
-
- if (++i < NCHUCHARS) {
- /*
- * Not much to do here. Save the count and wait
- * for another character.
- */
- chuc->ncodechars = (u_char)i;
- } else {
- /*
- * Mark this buffer full and point at next. If the
- * next buffer is full we overwrite it by bumping the
- * next pointer.
- */
- chuc->ncodechars = NCHUCHARS;
- if (++(chu->curindex) >= NUMCHUBUFS)
- chu->curindex = 0;
- if (chu->curindex == chu->lastindex)
- if (++(chu->lastindex) >= NUMCHUBUFS)
- chu->lastindex = 0;
- chu->chubuf[chu->curindex].ncodechars = 0;
-
- /*
- * Wake up anyone sleeping on this. Also wake up
- * selectors and/or deliver a SIGIO as required.
- */
- if (tp->t_rsel) {
- selwakeup(tp->t_rsel, tp->t_state&TS_RCOLL);
- tp->t_state &= ~TS_RCOLL;
- tp->t_rsel = 0;
- }
- if (tp->t_state & TS_ASYNC)
- gsignal(tp->t_pgrp, SIGIO);
- if (chu->sleeping)
- (void) wakeup((caddr_t)chuc);
- }
-}
-
-/*
- * Handle ioctls. We reject all tty-style except those that
- * change the line discipline.
- */
-chuioctl(tp, cmd, data, flag)
- struct tty *tp;
- int cmd;
- caddr_t data;
- int flag;
-{
-
- if ((cmd>>8) != 't')
- return (-1);
- switch (cmd) {
- case TIOCSETD:
- case TIOCGETD:
- case TIOCGETP:
- case TIOCGETC:
- return (-1);
- }
- return (ENOTTY); /* not quite appropriate */
-}
-
-
-chuselect(dev, rw)
- dev_t dev;
- int rw;
-{
- register struct tty *tp = &cdevsw[major(dev)].d_ttys[minor(dev)];
- struct chudata *chu;
- int s = spl5();
-
- chu = (struct chudata *) (tp->T_LINEP);
-
- switch (rw) {
-
- case FREAD:
- if (chu->curindex != chu->lastindex)
- goto win;
- if (tp->t_rsel && tp->t_rsel->p_wchan == (caddr_t)&selwait)
- tp->t_state |= TS_RCOLL;
- else
- tp->t_rsel = u.u_procp;
- break;
-
- case FWRITE:
- goto win;
- }
- splx(s);
- return (0);
-win:
- splx(s);
- return (1);
-}
-#endif NCHU
diff --git a/usr.sbin/xntpd/kernel/tty_chu_STREAMS.c b/usr.sbin/xntpd/kernel/tty_chu_STREAMS.c
deleted file mode 100644
index f46e25d2ab51..000000000000
--- a/usr.sbin/xntpd/kernel/tty_chu_STREAMS.c
+++ /dev/null
@@ -1,603 +0,0 @@
-/*
- * CHU STREAMS module for SunOS
- *
- * Version 2.6
- *
- * Copyright 1991-1994, Nick Sayer
- *
- * Special thanks to Greg Onufer for his debug assists.
- * Special thanks to Matthias Urlichs for the 4.1.x loadable driver support
- * code.
- * Special wet-noodle whippings to Sun for not properly documenting
- * ANYTHING that makes this stuff at all possible.
- *
- * Should be PUSHed directly on top of a serial I/O channel.
- * Provides complete chucode structures to user space.
- *
- * COMPILATION:
- *
- *
- * To make a SunOS 4.1.x compatable loadable module (from the ntp kernel
- * directory):
- *
- * % cc -c -I../include -DLOADABLE tty_chu_STREAMS.c
- *
- * The resulting .o file is the loadable module. Modload it
- * thusly:
- *
- * % modload tty_chu_STREAMS.o -entry _chuinit
- *
- * When none of the instances are pushed in a STREAM, you can
- * modunload the driver in the usual manner if you wish.
- *
- * As an alternative to loading it dynamically you can compile it
- * directly into the kernel by hacking str_conf.c. See the README
- * file for more details on doing it the old fashioned way.
- *
- *
- * To make a Solaris 2.x compatable module (from the ntp kernel
- * directory):
- *
- * % {gcc,cc} -c -I../include -DSOLARIS2 tty_chu_STREAMS.c
- * % ld -r -o /usr/kernel/strmod/chu tty_chu_STREAMS.o
- * % chmod 755 /usr/kernel/strmod/chu
- *
- * The OS will load it for you automagically when it is first pushed.
- *
- * If you get syntax errors from <sys/timer.h> (really references
- * to types that weren't typedef'd in gcc's version of types.h),
- * add -D_SYS_TIMER_H to blot out the miscreants.
- *
- * Under Solaris 2.2 and previous, do not attempt to modunload the
- * module unless you're SURE it's not in use. I haven't tried it, but
- * I've been told it won't do the right thing. Under Solaris 2.3 (and
- * presumably future revs) an attempt to unload the module when it's in
- * use will properly refuse with a "busy" message.
- *
- *
- * HISTORY:
- *
- * v2.6 - Mutexed the per-instance chucode just to be safe.
- * v2.5 - Fixed show-stopper bug in Solaris 2.x - qprocson().
- * v2.4 - Added dynamic allocation support for Solaris 2.x.
- * v2.3 - Added support for Solaris 2.x.
- * v2.2 - Added SERVICE IMMEDIATE hack.
- * v2.1 - Added 'sixth byte' heuristics.
- * v2.0 - first version with an actual version number.
- * Added support for new CHU 'second 31' data format.
- * Deleted PEDANTIC and ANAL_RETENTIVE.
- *
- */
-
-#ifdef SOLARIS2
-# ifndef NCHU
-# define NCHU 1
-# endif
-# define _KERNEL
-#elif defined(LOADABLE)
-# ifndef NCHU
-# define NCHU 3
-# define KERNEL
-# endif
-#else
-# include "chu.h"
-#endif
-
-#if NCHU > 0
-
-/*
- * Number of microseconds we allow between
- * character arrivals. The speed is 300 baud
- * so this should be somewhat more than 30 msec
- */
-#define CHUMAXUSEC (60*1000) /* 60 msec */
-
-#include <sys/types.h>
-#include <sys/stream.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/errno.h>
-#include <sys/user.h>
-#include <syslog.h>
-#include <sys/tty.h>
-
-#include <sys/chudefs.h>
-
-#ifdef SOLARIS2
-
-#include <sys/ksynch.h>
-#include <sys/kmem.h>
-#include <sys/cmn_err.h>
-#include <sys/conf.h>
-#include <sys/strtty.h>
-#include <sys/modctl.h>
-#include <sys/ddi.h>
-#include <sys/sunddi.h>
-
-#endif
-
-#ifdef LOADABLE
-
-#include <sys/kernel.h>
-#include <sys/conf.h>
-#include <sys/buf.h>
-#include <sundev/mbvar.h>
-#include <sun/autoconf.h>
-#include <sun/vddrv.h>
-
-#endif
-
-
-static struct module_info rminfo = { 0, "chu", 0, INFPSZ, 0, 0 };
-static struct module_info wminfo = { 0, "chu", 0, INFPSZ, 0, 0 };
-static int chuopen(), churput(), chuwput(), chuclose();
-
-static struct qinit rinit = { churput, NULL, chuopen, chuclose, NULL,
- &rminfo, NULL };
-
-static struct qinit winit = { chuwput, NULL, NULL, NULL, NULL,
- &wminfo, NULL };
-
-struct streamtab chuinfo = { &rinit, &winit, NULL, NULL };
-
-/*
- * Here's our private data type and structs
- */
-struct priv_data
-{
-#ifdef SOLARIS2
- kmutex_t chucode_mutex;
-#else
- char in_use;
-#endif
- struct chucode chu_struct;
-};
-
-#ifndef SOLARIS2
-struct priv_data our_priv_data[NCHU];
-#endif
-
-#ifdef SOLARIS2
-
-static struct fmodsw fsw =
-{
- "chu",
- &chuinfo,
- D_NEW | D_MP
-};
-
-extern struct mod_ops mod_strmodops;
-
-static struct modlstrmod modlstrmod =
-{
- &mod_strmodops,
- "CHU timecode decoder v2.6",
- &fsw
-};
-
-static struct modlinkage modlinkage =
-{
- MODREV_1,
- (void*) &modlstrmod,
- NULL
-};
-
-int _init()
-{
- return mod_install(&modlinkage);
-}
-
-int _info(foo)
-struct modinfo *foo;
-{
- return mod_info(&modlinkage,foo);
-}
-
-int _fini()
-{
- return mod_remove(&modlinkage);
-}
-
-#endif /* SOLARIS2 */
-
-#ifdef LOADABLE
-
-# ifdef sun
-
-static struct vdldrv vd =
-{
- VDMAGIC_PSEUDO,
- "chu",
- NULL, NULL, NULL, 0, 0, NULL, NULL, 0, 0,
-};
-
-static struct fmodsw *chu_fmod;
-
-/*ARGSUSED*/
-chuinit (fc, vdp, vdi, vds)
- unsigned int fc;
- struct vddrv *vdp;
- addr_t vdi;
- struct vdstat *vds;
-{
- switch (fc) {
- case VDLOAD:
- {
- int dev, i;
-
- /* Find free entry in fmodsw */
- for (dev = 0; dev < fmodcnt; dev++) {
- if (fmodsw[dev].f_str == NULL)
- break;
- }
- if (dev == fmodcnt)
- return (ENODEV);
- chu_fmod = &fmodsw[dev];
-
- /* If you think a kernel would have strcpy() you're mistaken. */
- for (i = 0; i <= FMNAMESZ; i++)
- chu_fmod->f_name[i] = wminfo.mi_idname[i];
-
- chu_fmod->f_str = &chuinfo;
- }
- vdp->vdd_vdtab = (struct vdlinkage *) & vd;
-
- {
- int i;
-
- for (i=0; i<NCHU; i++)
- our_priv_data[i].in_use=0;
- }
-
- return 0;
- case VDUNLOAD:
- {
- int dev;
-
- for (dev = 0; dev < NCHU; dev++)
- if (our_priv_data[dev].in_use) {
- /* One of the modules is still open */
- return (EBUSY);
- }
- }
- chu_fmod->f_name[0] = '\0';
- chu_fmod->f_str = NULL;
- return 0;
- case VDSTAT:
- return 0;
- default:
- return EIO;
- }
-}
-
-# endif /* sun */
-
-#endif /* LOADABLE */
-
-#if !defined(LOADABLE) && !defined(SOLARIS2)
-
-char chu_first_open=1;
-
-#endif
-
-/*ARGSUSED*/
-static int chuopen(q, dev, flag, sflag)
-queue_t *q;
-dev_t dev;
-int flag;
-int sflag;
-{
- int i;
-
-#if !defined(LOADABLE) && !defined(SOLARIS2)
- if (chu_first_open)
- {
- chu_first_open=0;
-
- for(i=0;i<NCHU;i++)
- our_priv_data[i].in_use=0;
- }
-#endif
-
-#ifdef SOLARIS2
- /* According to the docs, calling with KM_SLEEP can never
- fail */
-
- q->q_ptr = kmem_alloc( sizeof(struct priv_data), KM_SLEEP );
- ((struct priv_data *) q->q_ptr)->chu_struct.ncodechars = 0;
-
- mutex_init(&((struct priv_data *) q->q_ptr)->chucode_mutex,"Chucode Mutex",MUTEX_DRIVER,NULL);
- qprocson(q);
-
- if (!putnextctl1(WR(q), M_CTL, MC_SERVICEIMM))
- {
- qprocsoff(q);
- mutex_destroy(&((struct priv_data *)q->q_ptr)->chucode_mutex);
- kmem_free(q->q_ptr, sizeof(struct chucode) );
- return (EFAULT);
- }
-
- return 0;
-
-#else
- for(i=0;i<NCHU;i++)
- if (!our_priv_data[i].in_use)
- {
- ((struct priv_data *) (q->q_ptr))=&(our_priv_data[i]);
- our_priv_data[i].in_use++;
- our_priv_data[i].chu_struct.ncodechars = 0;
- if (!putctl1(WR(q)->q_next, M_CTL, MC_SERVICEIMM))
- {
- our_priv_data[i].in_use=0;
- u.u_error = EFAULT;
- return (OPENFAIL);
- }
- return 0;
- }
-
- u.u_error = EBUSY;
- return (OPENFAIL);
-#endif
-
-}
-
-/*ARGSUSED*/
-static int chuclose(q, flag)
-queue_t *q;
-int flag;
-{
-#ifdef SOLARIS2
- qprocsoff(q);
- mutex_destroy(&((struct priv_data *)q->q_ptr)->chucode_mutex);
- kmem_free(q->q_ptr, sizeof(struct chucode) );
-#else
- ((struct priv_data *) (q->q_ptr))->in_use=0;
-#endif
- return (0);
-}
-
-/*
- * Now the crux of the biscuit.
- *
- * We will be passed data from the man downstairs. If it's not a data
- * packet, it must be important, so pass it along unmunged. If, however,
- * it is a data packet, we're gonna do special stuff to it. We're going
- * to pass each character we get to the old line discipline code we
- * include below for just such an occasion. When the old ldisc code
- * gets a full chucode struct, we'll hand it back upstairs.
- *
- * chuinput takes a single character and q (as quickly as possible).
- * passback takes a pointer to a chucode struct and q and sends it upstream.
- */
-
-void chuinput();
-void passback();
-
-static int churput(q, mp)
-queue_t *q;
-mblk_t *mp;
-{
- mblk_t *bp;
-
- switch(mp->b_datap->db_type)
- {
- case M_DATA:
- for(bp=mp; bp!=NULL; bp=bp->b_cont)
- {
- while(bp->b_rptr < bp->b_wptr)
- chuinput( ((u_char)*(bp->b_rptr++)) , q );
- }
- freemsg(mp);
- break;
- default:
- putnext(q,mp);
- break;
- }
-
-}
-
-/*
- * Writing to a chu device doesn't make sense, but we'll pass them
- * through in case they're important.
- */
-
-static int chuwput(q, mp)
-queue_t *q;
-mblk_t *mp;
-{
- putnext(q,mp);
-}
-
-/*
- * Take a pointer to a filled chucode struct and a queue and
- * send the chucode stuff upstream
- */
-
-void passback(outdata,q)
-struct chucode *outdata;
-queue_t *q;
-{
- mblk_t *mp;
- int j;
-
- mp=(mblk_t*) allocb(sizeof(struct chucode),BPRI_LO);
-
- if (mp==NULL)
- {
-#ifdef SOLARIS2
- cmn_err(CE_WARN,"chu module couldn't allocate message block");
-#else
- log(LOG_ERR,"chu: cannot allocate message");
-#endif
- return;
- }
-
- for(j=0;j<sizeof(struct chucode); j++)
- *mp->b_wptr++ = *( ((char*)outdata) + j );
-
- putnext(q,mp);
-}
-
-/*
- * This routine was copied nearly verbatim from the old line discipline.
- */
-void chuinput(c,q)
-register u_char c;
-queue_t *q;
-{
- register struct chucode *chuc;
- register int i;
- long sec, usec;
- struct timeval tv;
-
- /*
- * Quick, Batman, get a timestamp! We need to do this
- * right away. The time between the end of the stop bit
- * and this point is critical, and should be as nearly
- * constant and as short as possible. (Un)fortunately,
- * the Sun's clock granularity is so big this isn't a
- * major problem.
- *
- * uniqtime() is totally undocumented, but there you are.
- */
- uniqtime(&tv);
-
-#ifdef SOLARIS2
- mutex_enter(&((struct priv_data *)q->q_ptr)->chucode_mutex);
-#endif
-
- /*
- * Now, locate the chu struct once so we don't have to do it
- * over and over.
- */
- chuc=&(((struct priv_data *) (q->q_ptr))->chu_struct);
-
- /*
- * Compute the difference in this character's time stamp
- * and the last. If it exceeds the margin, blow away all
- * the characters currently in the buffer.
- */
- i = (int)chuc->ncodechars;
- if (i > 0)
- {
- sec = tv.tv_sec - chuc->codetimes[i-1].tv_sec;
- usec = tv.tv_usec - chuc->codetimes[i-1].tv_usec;
- if (usec < 0)
- {
- sec -= 1;
- usec += 1000000;
- }
- if (sec != 0 || usec > CHUMAXUSEC)
- {
- i = 0;
- chuc->ncodechars = 0;
- }
- }
-
- /*
- * Store the character.
- */
- chuc->codechars[i] = (u_char)c;
- chuc->codetimes[i] = tv;
-
- /*
- * Now we perform the 'sixth byte' heuristics.
- *
- * This is a long story.
- *
- * We used to be able to count on the first byte of the code
- * having a '6' in the LSD. This prevented most code framing
- * errors (garbage before the first byte wouldn't typically
- * have a 6 in the LSD). That's no longer the case.
- *
- * We can get around this, however, by noting that the 6th byte
- * must be either equal to or one's complement of the first.
- * If we get a sixth byte that ISN'T like that, then it may
- * well be that the first byte is garbage. The right thing
- * to do is to left-shift the whole buffer one count and
- * continue to wait for the sixth byte.
- */
- if (i == NCHUCHARS/2)
- {
- register u_char temp_byte;
-
- temp_byte=chuc->codechars[i] ^ chuc->codechars[0];
-
- if ( (temp_byte) && (temp_byte!=0xff) )
- {
- register int t;
- /*
- * No match. Left-shift the buffer and try again
- */
- for(t=0;t<=NCHUCHARS/2;t++)
- {
- chuc->codechars[t]=chuc->codechars[t+1];
- chuc->codetimes[t]=chuc->codetimes[t+1];
- }
-
- i--; /* This is because of the ++i immediately following */
- }
- }
-
- /*
- * We done yet?
- */
- if (++i < NCHUCHARS)
- {
- /*
- * We're not done. Not much to do here. Save the count and wait
- * for another character.
- */
- chuc->ncodechars = (u_char)i;
- }
- else
- {
- /*
- * We are done. Mark this buffer full and pass it along.
- */
- chuc->ncodechars = NCHUCHARS;
-
- /*
- * Now we have a choice. Either the front half and back half
- * have to match, or be one's complement of each other.
- *
- * So let's try the first byte and see
- */
-
- if(chuc->codechars[0] == chuc->codechars[NCHUCHARS/2])
- {
- chuc->chutype = CHU_TIME;
- for( i=0; i<(NCHUCHARS/2); i++)
- if (chuc->codechars[i] != chuc->codechars[i+(NCHUCHARS/2)])
- {
- chuc->ncodechars = 0;
-#ifdef SOLARIS2
- mutex_exit(&((struct priv_data *)q->q_ptr)->chucode_mutex);
-#endif
- return;
- }
- }
- else
- {
- chuc->chutype = CHU_YEAR;
- for( i=0; i<(NCHUCHARS/2); i++)
- if (((chuc->codechars[i] ^ chuc->codechars[i+(NCHUCHARS/2)]) & 0xff)
- != 0xff )
- {
- chuc->ncodechars = 0;
-#ifdef SOLARIS2
- mutex_exit(&((struct priv_data *)q->q_ptr)->chucode_mutex);
-#endif
- return;
- }
- }
-
- passback(chuc,q); /* We're done! */
- chuc->ncodechars = 0; /* Start all over again! */
- }
-#ifdef SOLARIS2
- mutex_exit(&((struct priv_data *)q->q_ptr)->chucode_mutex);
-#endif
-}
-
-#endif /* NCHU > 0 */
diff --git a/usr.sbin/xntpd/kernel/tty_clk.c b/usr.sbin/xntpd/kernel/tty_clk.c
deleted file mode 100644
index 072061039bf3..000000000000
--- a/usr.sbin/xntpd/kernel/tty_clk.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/* tty_clk.c,v 3.1 1993/07/06 01:07:33 jbj Exp
- * tty_clk.c - Generic line driver for receiving radio clock timecodes
- */
-
-#include "clk.h"
-#if NCLK > 0
-
-#include "../h/param.h"
-#include "../h/types.h"
-#include "../h/systm.h"
-#include "../h/dir.h"
-#include "../h/user.h"
-#include "../h/ioctl.h"
-#include "../h/tty.h"
-#include "../h/proc.h"
-#include "../h/file.h"
-#include "../h/conf.h"
-#include "../h/buf.h"
-#include "../h/uio.h"
-#include "../h/clist.h"
-
-/*
- * This line discipline is intended to provide well performing
- * generic support for the reception and time stamping of radio clock
- * timecodes. Most radio clock devices return a string where a
- * particular character in the code (usually a \r) is on-time
- * synchronized with the clock. The idea here is to collect characters
- * until (one of) the synchronization character(s) (we allow two) is seen.
- * When the magic character arrives we take a timestamp by calling
- * microtime() and insert the eight bytes of struct timeval into the
- * buffer after the magic character. We then wake up anyone waiting
- * for the buffer and return the whole mess on the next read.
- *
- * To use this the calling program is expected to first open the
- * port, and then to set the port into raw mode with the speed
- * set appropriately with a TIOCSETP ioctl(), with the erase and kill
- * characters set to those to be considered magic (yes, I know this
- * is gross, but they were so convenient). If only one character is
- * magic you can set then both the same, or perhaps to the alternate
- * parity versions of said character. After getting all this set,
- * change the line discipline to CLKLDISC and you are on your way.
- *
- * The only other bit of magic we do in here is to flush the receive
- * buffers on writes if the CRMOD flag is set (hack, hack).
- */
-
-/*
- * We run this very much like a raw mode terminal, with the exception
- * that we store up characters locally until we hit one of the
- * magic ones and then dump it into the rawq all at once. We keep
- * the buffered data in clists since we can then often move it to
- * the rawq without copying. For sanity we limit the number of
- * characters between specials, and the total number of characters
- * before we flush the rawq, as follows.
- */
-#define CLKLINESIZE (256)
-#define NCLKCHARS (CLKLINESIZE*4)
-
-struct clkdata {
- int inuse;
- struct clist clkbuf;
-};
-#define clk_cc clkbuf.c_cc
-#define clk_cf clkbuf.c_cf
-#define clk_cl clkbuf.c_cl
-
-struct clkdata clk_data[NCLK];
-
-/*
- * Routine for flushing the internal clist
- */
-#define clk_bflush(clk) (ndflush(&((clk)->clkbuf), (clk)->clk_cc))
-
-int clk_debug = 0;
-
-/*ARGSUSED*/
-clkopen(dev, tp)
- dev_t dev;
- register struct tty *tp;
-{
- register struct clkdata *clk;
-
- /*
- * Don't allow multiple opens. This will also protect us
- * from someone opening /dev/tty
- */
- if (tp->t_line == CLKLDISC)
- return (EBUSY);
- ttywflush(tp);
- for (clk = clk_data; clk < &clk_data[NCLK]; clk++)
- if (!clk->inuse)
- break;
- if (clk >= &clk_data[NCLK])
- return (EBUSY);
- clk->inuse++;
- clk->clk_cc = 0;
- clk->clk_cf = clk->clk_cl = NULL;
- tp->T_LINEP = (caddr_t) clk;
- return (0);
-}
-
-
-/*
- * Break down... called when discipline changed or from device
- * close routine.
- */
-clkclose(tp)
- register struct tty *tp;
-{
- register struct clkdata *clk;
- register int s = spltty();
-
- clk = (struct clkdata *)tp->T_LINEP;
- if (clk->clk_cc > 0)
- clk_bflush(clk);
- clk->inuse = 0;
- tp->t_line = 0; /* paranoid: avoid races */
- splx(s);
-}
-
-
-/*
- * Receive a write request. We pass these requests on to the terminal
- * driver, except that if the CRMOD bit is set in the flags we
- * first flush the input queues.
- */
-clkwrite(tp, uio)
- register struct tty *tp;
- struct uio *uio;
-{
- if (tp->t_flags & CRMOD) {
- register struct clkdata *clk;
- int s;
-
- s = spltty();
- if (tp->t_rawq.c_cc > 0)
- ndflush(&tp->t_rawq, tp->t_rawq.c_cc);
- clk = (struct clkdata *) tp->T_LINEP;
- if (clk->clk_cc > 0)
- clk_bflush(clk);
- (void)splx(s);
- }
- ttwrite(tp, uio);
-}
-
-
-/*
- * Low level character input routine.
- * If the character looks okay, grab a time stamp. If the stuff in
- * the buffer is too old, dump it and start fresh. If the character is
- * non-BCDish, everything in the buffer too.
- */
-clkinput(c, tp)
- register int c;
- register struct tty *tp;
-{
- register struct clkdata *clk;
- register int i;
- register long s;
- struct timeval tv;
-
- /*
- * Check to see whether this isn't the magic character. If not,
- * save the character and return.
- */
-#ifdef ultrix
- if (c != tp->t_cc[VERASE] && c != tp->t_cc[VKILL]) {
-#else
- if (c != tp->t_erase && c != tp->t_kill) {
-#endif
- clk = (struct clkdata *) tp->T_LINEP;
- if (clk->clk_cc >= CLKLINESIZE)
- clk_bflush(clk);
- if (putc(c, &clk->clkbuf) == -1) {
- /*
- * Hopeless, no clists. Flush what we have
- * and hope things improve.
- */
- clk_bflush(clk);
- }
- return;
- }
-
- /*
- * Here we have a magic character. Get a timestamp and store
- * everything.
- */
- microtime(&tv);
- clk = (struct clkdata *) tp->T_LINEP;
-
- if (putc(c, &clk->clkbuf) == -1)
- goto flushout;
-
-#ifdef CLKLDISC
- /*
- * STREAMS people started writing timestamps this way.
- * It's not my fault, I am just going along with the flow...
- */
- for (i = 0; i < sizeof(struct timeval); i++)
- if (putc(*( ((char*)&tv) + i ), &clk->clkbuf) == -1)
- goto flushout;
-#else
- /*
- * This is a machine independant way of puting longs into
- * the datastream. It has fallen into disuse...
- */
- s = tv.tv_sec;
- for (i = 0; i < sizeof(long); i++) {
- if (putc((s >> 24) & 0xff, &clk->clkbuf) == -1)
- goto flushout;
- s <<= 8;
- }
-
- s = tv.tv_usec;
- for (i = 0; i < sizeof(long); i++) {
- if (putc((s >> 24) & 0xff, &clk->clkbuf) == -1)
- goto flushout;
- s <<= 8;
- }
-#endif
-
- /*
- * If the length of the rawq exceeds our sanity limit, dump
- * all the old crap in there before copying this in.
- */
- if (tp->t_rawq.c_cc > NCLKCHARS)
- ndflush(&tp->t_rawq, tp->t_rawq.c_cc);
-
- /*
- * Now copy the buffer in. There is a special case optimization
- * here. If there is nothing on the rawq at present we can
- * just copy the clists we own over. Otherwise we must concatenate
- * the present data on the end.
- */
- s = (long)spltty();
- if (tp->t_rawq.c_cc <= 0) {
- tp->t_rawq = clk->clkbuf;
- clk->clk_cc = 0;
- clk->clk_cl = clk->clk_cf = NULL;
- (void) splx((int)s);
- } else {
- (void) splx((int)s);
- catq(&clk->clkbuf, &tp->t_rawq);
- clk_bflush(clk);
- }
-
- /*
- * Tell the world
- */
- ttwakeup(tp);
- return;
-
-flushout:
- /*
- * It would be nice if this never happened. Flush the
- * internal clists and hope someone else frees some of them
- */
- clk_bflush(clk);
- return;
-}
-
-
-/*
- * Handle ioctls. We reject most tty-style except those that
- * change the line discipline and a couple of others..
- */
-clkioctl(tp, cmd, data, flag)
- struct tty *tp;
- int cmd;
- caddr_t data;
- int flag;
-{
- int flags;
- struct sgttyb *sg;
-
- if ((cmd>>8) != 't')
- return (-1);
- switch (cmd) {
- case TIOCSETD:
- case TIOCGETD:
- case TIOCGETP:
- case TIOCGETC:
- case TIOCOUTQ:
- return (-1);
-
- case TIOCSETP:
- /*
- * He likely wants to set new magic characters in.
- * Do this part.
- */
- sg = (struct sgttyb *)data;
-#ifdef ultrix
- tp->t_cc[VERASE] = sg->sg_erase;
- tp->t_cc[VKILL] = sg->sg_kill;
-#else
- tp->t_erase = sg->sg_erase;
- tp->t_kill = sg->sg_kill;
-#endif
- return (0);
-
- case TIOCFLUSH:
- flags = *(int *)data;
- if (flags == 0 || (flags & FREAD)) {
- register struct clkdata *clk;
-
- clk = (struct clkdata *) tp->T_LINEP;
- if (clk->clk_cc > 0)
- clk_bflush(clk);
- }
- return (-1);
-
- default:
- break;
- }
- return (ENOTTY); /* not quite appropriate */
-}
-#endif NCLK
diff --git a/usr.sbin/xntpd/kernel/tty_clk_STREAMS.c b/usr.sbin/xntpd/kernel/tty_clk_STREAMS.c
deleted file mode 100644
index 13b0a25f1d89..000000000000
--- a/usr.sbin/xntpd/kernel/tty_clk_STREAMS.c
+++ /dev/null
@@ -1,266 +0,0 @@
-/* tty_clk_STREAMS.c,v 3.1 1993/07/06 01:07:34 jbj Exp
- * Timestamp STREAMS module for SunOS 4.1
- *
- * Copyright 1991, Nick Sayer
- *
- * Special thanks to Greg Onufer for his debug assists.
- *
- * Should be PUSHed directly on top of a serial I/O channel.
- * For any character in a user-designated set, adds a kernel
- * timestamp to that character.
- *
- * BUGS:
- *
- * Only so many characters can be timestamped. This number, however,
- * is adjustable.
- *
- * The null character ($00) cannot be timestamped.
- *
- * The M_DATA messages passed upstream will not be the same
- * size as when they arrive from downstream, even if no
- * timestamp character is in the message. This, however,
- * should not affect anything.
- *
- */
-
-#include "clk.h"
-#if NCLK > 0
-/*
- * How big should the messages we pass upstream be?
- */
-#define MESSAGE_SIZE 128
-
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stream.h>
-#include <sys/param.h>
-#include <sys/time.h>
-#include <sys/kernel.h>
-#include <sys/user.h>
-#include <sys/errno.h>
-#include <sys/syslog.h>
-
-#include <sys/clkdefs.h>
-
-static struct module_info rminfo = { 0, "clk", 0, INFPSZ, 0, 0 };
-static struct module_info wminfo = { 0, "clk", 0, INFPSZ, 0, 0 };
-static int clkopen(), clkrput(), clkwput(), clkclose();
-
-static struct qinit rinit = { clkrput, NULL, clkopen, clkclose, NULL,
- &rminfo, NULL };
-
-static struct qinit winit = { clkwput, NULL, NULL, NULL, NULL,
- &wminfo, NULL };
-
-struct streamtab clkinfo = { &rinit, &winit, NULL, NULL };
-
-struct priv_data_type
-{
- char in_use;
- char string[CLK_MAXSTRSIZE];
-} priv_data[NCLK];
-
-char first_open=1;
-
-/*
- * God only knows why, but linking with strchr() fails
- * on my system, so here's a renamed copy.
- */
-
-u_char *str_chr(s,c)
-u_char *s;
-int c;
-{
- while (*s)
- if(*s++ == c)
- return (s-1);
- return NULL;
-}
-
-/*ARGSUSED*/
-static int clkopen(q, dev, flag, sflag)
-queue_t *q;
-dev_t dev;
-int flag;
-int sflag;
-{
- int i;
-
-/* Damn it! We can't even have the global data struct properly
- initialized! So we have a mark to tell us to init the global
- data on the first open */
-
- if (first_open)
- {
- first_open=0;
-
- for(i=0;i<NCLK;i++)
- priv_data[i].in_use=0;
- }
-
- for(i=0;i<NCLK;i++)
- if(!priv_data[i].in_use)
- {
- priv_data[i].in_use++;
- ((struct priv_data_type *) (q->q_ptr))=priv_data+i;
- priv_data[i].string[0]=0;
- return (0);
- }
- u.u_error = EBUSY;
- return (OPENFAIL);
-}
-
-/*ARGSUSED*/
-static int clkclose(q, flag)
-queue_t *q;
-int flag;
-{
- ((struct priv_data_type *) (q->q_ptr))->in_use=0;
-
- return (0);
-}
-
-/*
- * Now the crux of the biscuit.
- *
- * If it's an M_DATA package, we take each character and pass
- * it to clkchar.
- */
-
-void clkchar();
-
-static int clkrput(q, mp)
-queue_t *q;
-mblk_t *mp;
-{
- mblk_t *bp;
-
- switch(mp->b_datap->db_type)
- {
- case M_DATA:
- clkchar(0,q,2);
- for(bp=mp; bp!=NULL; bp=bp->b_cont)
- {
- while(bp->b_rptr < bp->b_wptr)
- clkchar( ((u_char)*(bp->b_rptr++)) , q , 0 );
- }
- clkchar(0,q,1);
- freemsg(mp);
- break;
- default:
- putnext(q,mp);
- break;
- }
-
-}
-
-/*
- * If it's a matching M_IOCTL, handle it.
- */
-
-static int clkwput(q, mp)
-queue_t *q;
-mblk_t *mp;
-{
- struct iocblk *iocp;
-
- switch(mp->b_datap->db_type)
- {
- case M_IOCTL:
- iocp=(struct iocblk*) mp->b_rptr;
- if (iocp->ioc_cmd==CLK_SETSTR)
- {
- strncpy( ((struct priv_data_type *) (RD(q)->q_ptr))->string,
- (char *) mp->b_cont->b_rptr,CLK_MAXSTRSIZE);
- /* make sure it's null terminated */
- ((struct priv_data_type *) (RD(q)->q_ptr))->string[CLK_MAXSTRSIZE-1]=0;
- mp->b_datap->db_type = M_IOCACK;
- qreply(q,mp);
- }
- else
- putnext(q,mp);
- break;
- default:
- putnext(q,mp);
- break;
- }
-}
-
-/*
- * Now clkchar. It takes a character, a queue pointer and an action
- * flag and depending on the flag either:
- *
- * 0 - adds the character to the current message. If there's a
- * timestamp to be done, do that too. If the message is less than
- * 8 chars from being full, link in a new one, and set it up for
- * the next call.
- *
- * 1 - sends the whole mess to Valhala.
- *
- * 2 - set things up.
- *
- * Yeah, it's an ugly hack. Complaints may be filed with /dev/null.
- */
-
-
-void clkchar(c,q,f)
- register u_char c;
- queue_t *q;
- char f;
-{
- static char error;
- static mblk_t *message,*mp;
- struct timeval tv;
-
-/* Get a timestamp ASAP! */
- uniqtime(&tv);
-
- switch(f)
- {
- case 1:
- if (!error)
- putnext(q,message);
- break;
- case 2:
- mp=message= (mblk_t*) allocb(MESSAGE_SIZE,BPRI_LO);
- error=(message==NULL);
- if (error)
- log(LOG_ERR,"clk: cannot allocate message - data lost");
- break;
- case 0:
- if (error) /* If we had an error, forget it. */
- return;
-
- *mp->b_wptr++=c; /* Put the char away first.
-
- /* If it's in the special string, append a struct timeval */
-
- if (str_chr( ((struct priv_data_type *) (q->q_ptr))->string ,
- c )!=NULL)
- {
- int i;
-
- for (i=0;i<sizeof(struct timeval);i++)
- *mp->b_wptr++= *( ((char*)&tv) + i );
- }
-
- /* If we don't have space for a complete struct timeval, and a
- char, it's time for a new mp block */
-
- if (((mp->b_wptr-mp->b_rptr)+sizeof(struct timeval)+2)>MESSAGE_SIZE)
- {
- mp->b_cont= (mblk_t*) allocb(MESSAGE_SIZE,BPRI_LO);
- error=(mp->b_cont==NULL);
- if (error)
- {
- log(LOG_ERR,"clk: cannot allocate message - data lost");
- freemsg(message);
- }
- mp=mp->b_cont;
- }
-
- break;
- }
-}
-
-#endif
diff --git a/usr.sbin/xntpd/lib/Makefile.tmpl b/usr.sbin/xntpd/lib/Makefile.tmpl
deleted file mode 100644
index 1a8d020bd886..000000000000
--- a/usr.sbin/xntpd/lib/Makefile.tmpl
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Makefile.tmpl
-#
-LIBNAME= libntp
-#
-# xntp routines which are used a lot of places
-#
-COMPILER= cc
-COPTS= -O
-AUTHDEFS=-DDES
-LIBDEFS= -DBIG_ENDIAN
-RANLIB= ranlib
-INSTALL= install
-CLOCKDEFS=
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-#
-INCL=-I../include
-CFLAGS= $(COPTS) $(AUTHDEFS) $(LIBDEFS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-#
-SOURCE= atoint.c atolfp.c atouint.c auth12crypt.c authdecrypt.c authdes.c \
- authencrypt.c authkeys.c authparity.c authreadkeys.c authusekey.c \
- buftvtots.c caljulian.c calleapwhen.c caltontp.c calyearstart.c \
- clocktime.c dofptoa.c dolfptoa.c emalloc.c fptoa.c fptoms.c getopt.c \
- gettstamp.c hextoint.c hextolfp.c humandate.c inttoa.c \
- lib_strbuf.c mfptoa.c mfptoms.c modetoa.c mstolfp.c \
- msutotsf.c numtoa.c refnumtoa.c numtohost.c octtoint.c \
- prettydate.c ranny.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
- uglydate.c uinttoa.c utvtoa.c machines.c clocktypes.c \
- md5.c a_md5encrypt.c a_md5decrypt.c \
- a_md512crypt.c decodenetnum.c systime.c msyslog.c syssignal.c \
- findconfig.c netof.c
-
-OBJS= atoint.o atolfp.o atouint.o auth12crypt.o authdecrypt.o authdes.o \
- authencrypt.o authkeys.o authparity.o authreadkeys.o authusekey.o \
- buftvtots.o caljulian.o calleapwhen.o caltontp.o calyearstart.o \
- clocktime.o dofptoa.o dolfptoa.o emalloc.o fptoa.o fptoms.o getopt.o \
- gettstamp.o hextoint.o hextolfp.o humandate.o inttoa.o \
- lib_strbuf.o mfptoa.o mfptoms.o modetoa.o mstolfp.o \
- msutotsf.o numtoa.o refnumtoa.o numtohost.o octtoint.o \
- prettydate.o ranny.o tsftomsu.o tstotv.o tvtoa.o tvtots.o \
- uglydate.o uinttoa.o utvtoa.o machines.o clocktypes.o \
- md5.o a_md5encrypt.o a_md5decrypt.o \
- a_md512crypt.o decodenetnum.o systime.o msyslog.o syssignal.o \
- findconfig.o netof.o
-
-$(LIBNAME).a: $(OBJS)
- ar rv $@ $?
- -rm -f $?
- @if ( ../scripts/hpadjtime.sh ) > /dev/null 2>&1; then \
- ( cd ../adjtime && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)" ) && ar rv $@ ../adjtime/adjtime.o; \
- else \
- :; \
- fi
- $(RANLIB) $@
-
-lintlib: llib-l$(LIBNAME).ln
-
-llib-l$(LIBNAME).ln: $(SOURCE)
- lint -C$(LIBNAME) $(INCL) $(CLOCKDEFS) $(AUTHDEFS) $(LIBDEFS) $(SOURCE) >lintlib.errs
-
-lint:
- lint -u $(DEFS) $(INCL) $(CLOCKDEFS) $(AUTHDEFS) $(LIBDEFS) $(SOURCE) >lint.errs
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(LIBNAME).a *.o *.out *.ln make.log Makefile.bak \
- lintlib.errs lint.errs
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
diff --git a/usr.sbin/xntpd/lib/authdes.c b/usr.sbin/xntpd/lib/authdes.c
deleted file mode 100644
index dd122decf6b6..000000000000
--- a/usr.sbin/xntpd/lib/authdes.c
+++ /dev/null
@@ -1,845 +0,0 @@
-/*
- * authdes.c - an implementation of the DES cipher algorithm for NTP
- */
-#include "ntp_stdlib.h"
-
-/*
- * There are two entries in here. auth_subkeys() called to
- * compute the encryption and decryption key schedules, while
- * auth_des() is called to do the actual encryption/decryption
- */
-
-/*
- * Key setup. Here we entirely permute a key, saving the results
- * for both the encryption and decryption. Note that while the
- * decryption subkeys are simply the encryption keys reordered,
- * we save both so that a common cipher routine may be used.
- */
-
-/*
- * Permuted choice 1 tables. These are used to extract bits
- * from the left and right parts of the key to form Ci and Di.
- * The code that uses these tables knows which bits from which
- * part of each key are used to form Ci and Di.
- */
-static U_LONG PC1_CL[8] = {
- 0x00000000, 0x00000010, 0x00001000, 0x00001010,
- 0x00100000, 0x00100010, 0x00101000, 0x00101010
-};
-
-static U_LONG PC1_DL[16] = {
- 0x00000000, 0x00100000, 0x00001000, 0x00101000,
- 0x00000010, 0x00100010, 0x00001010, 0x00101010,
- 0x00000001, 0x00100001, 0x00001001, 0x00101001,
- 0x00000011, 0x00100011, 0x00001011, 0x00101011
-};
-
-static U_LONG PC1_CR[16] = {
- 0x00000000, 0x00000001, 0x00000100, 0x00000101,
- 0x00010000, 0x00010001, 0x00010100, 0x00010101,
- 0x01000000, 0x01000001, 0x01000100, 0x01000101,
- 0x01010000, 0x01010001, 0x01010100, 0x01010101
-};
-
-static U_LONG PC1_DR[8] = {
- 0x00000000, 0x01000000, 0x00010000, 0x01010000,
- 0x00000100, 0x01000100, 0x00010100, 0x01010100
-};
-
-
-/*
- * At the start of some iterations of the key schedule we do
- * a circular left shift by one place, while for others we do a shift by
- * two places. This has bits set for the iterations where we do 2 bit
- * shifts, starting at the low order bit.
- */
-#define TWO_BIT_SHIFTS 0x7efc
-
-/*
- * Permuted choice 2 tables. The first actually produces the low order
- * 24 bits of the subkey Ki from the 28 bit value of Ci. The second produces
- * the high order 24 bits from Di. The tables are indexed by six bit
- * segments of Ci and Di respectively. The code is handcrafted to compute
- * the appropriate 6 bit chunks.
- *
- * Note that for ease of computation, the 24 bit values are produced with
- * six bits going into each byte.
- */
-static U_LONG PC2_C[4][64] = {
- { 0x00000000, 0x00040000, 0x01000000, 0x01040000,
- 0x00000400, 0x00040400, 0x01000400, 0x01040400,
- 0x00200000, 0x00240000, 0x01200000, 0x01240000,
- 0x00200400, 0x00240400, 0x01200400, 0x01240400,
- 0x00000001, 0x00040001, 0x01000001, 0x01040001,
- 0x00000401, 0x00040401, 0x01000401, 0x01040401,
- 0x00200001, 0x00240001, 0x01200001, 0x01240001,
- 0x00200401, 0x00240401, 0x01200401, 0x01240401,
- 0x02000000, 0x02040000, 0x03000000, 0x03040000,
- 0x02000400, 0x02040400, 0x03000400, 0x03040400,
- 0x02200000, 0x02240000, 0x03200000, 0x03240000,
- 0x02200400, 0x02240400, 0x03200400, 0x03240400,
- 0x02000001, 0x02040001, 0x03000001, 0x03040001,
- 0x02000401, 0x02040401, 0x03000401, 0x03040401,
- 0x02200001, 0x02240001, 0x03200001, 0x03240001,
- 0x02200401, 0x02240401, 0x03200401, 0x03240401 },
-
- { 0x00000000, 0x00000002, 0x00000800, 0x00000802,
- 0x08000000, 0x08000002, 0x08000800, 0x08000802,
- 0x00010000, 0x00010002, 0x00010800, 0x00010802,
- 0x08010000, 0x08010002, 0x08010800, 0x08010802,
- 0x00000100, 0x00000102, 0x00000900, 0x00000902,
- 0x08000100, 0x08000102, 0x08000900, 0x08000902,
- 0x00010100, 0x00010102, 0x00010900, 0x00010902,
- 0x08010100, 0x08010102, 0x08010900, 0x08010902,
- 0x00000010, 0x00000012, 0x00000810, 0x00000812,
- 0x08000010, 0x08000012, 0x08000810, 0x08000812,
- 0x00010010, 0x00010012, 0x00010810, 0x00010812,
- 0x08010010, 0x08010012, 0x08010810, 0x08010812,
- 0x00000110, 0x00000112, 0x00000910, 0x00000912,
- 0x08000110, 0x08000112, 0x08000910, 0x08000912,
- 0x00010110, 0x00010112, 0x00010910, 0x00010912,
- 0x08010110, 0x08010112, 0x08010910, 0x08010912 },
-
- { 0x00000000, 0x04000000, 0x00002000, 0x04002000,
- 0x10000000, 0x14000000, 0x10002000, 0x14002000,
- 0x00000020, 0x04000020, 0x00002020, 0x04002020,
- 0x10000020, 0x14000020, 0x10002020, 0x14002020,
- 0x00080000, 0x04080000, 0x00082000, 0x04082000,
- 0x10080000, 0x14080000, 0x10082000, 0x14082000,
- 0x00080020, 0x04080020, 0x00082020, 0x04082020,
- 0x10080020, 0x14080020, 0x10082020, 0x14082020,
- 0x20000000, 0x24000000, 0x20002000, 0x24002000,
- 0x30000000, 0x34000000, 0x30002000, 0x34002000,
- 0x20000020, 0x24000020, 0x20002020, 0x24002020,
- 0x30000020, 0x34000020, 0x30002020, 0x34002020,
- 0x20080000, 0x24080000, 0x20082000, 0x24082000,
- 0x30080000, 0x34080000, 0x30082000, 0x34082000,
- 0x20080020, 0x24080020, 0x20082020, 0x24082020,
- 0x30080020, 0x34080020, 0x30082020, 0x34082020 },
-
- { 0x00000000, 0x00100000, 0x00000008, 0x00100008,
- 0x00000200, 0x00100200, 0x00000208, 0x00100208,
- 0x00020000, 0x00120000, 0x00020008, 0x00120008,
- 0x00020200, 0x00120200, 0x00020208, 0x00120208,
- 0x00000004, 0x00100004, 0x0000000c, 0x0010000c,
- 0x00000204, 0x00100204, 0x0000020c, 0x0010020c,
- 0x00020004, 0x00120004, 0x0002000c, 0x0012000c,
- 0x00020204, 0x00120204, 0x0002020c, 0x0012020c,
- 0x00001000, 0x00101000, 0x00001008, 0x00101008,
- 0x00001200, 0x00101200, 0x00001208, 0x00101208,
- 0x00021000, 0x00121000, 0x00021008, 0x00121008,
- 0x00021200, 0x00121200, 0x00021208, 0x00121208,
- 0x00001004, 0x00101004, 0x0000100c, 0x0010100c,
- 0x00001204, 0x00101204, 0x0000120c, 0x0010120c,
- 0x00021004, 0x00121004, 0x0002100c, 0x0012100c,
- 0x00021204, 0x00121204, 0x0002120c, 0x0012120c }
-};
-
-static U_LONG PC2_D[4][64] = {
- { 0x00000000, 0x00000200, 0x00020000, 0x00020200,
- 0x00000001, 0x00000201, 0x00020001, 0x00020201,
- 0x08000000, 0x08000200, 0x08020000, 0x08020200,
- 0x08000001, 0x08000201, 0x08020001, 0x08020201,
- 0x00200000, 0x00200200, 0x00220000, 0x00220200,
- 0x00200001, 0x00200201, 0x00220001, 0x00220201,
- 0x08200000, 0x08200200, 0x08220000, 0x08220200,
- 0x08200001, 0x08200201, 0x08220001, 0x08220201,
- 0x00000002, 0x00000202, 0x00020002, 0x00020202,
- 0x00000003, 0x00000203, 0x00020003, 0x00020203,
- 0x08000002, 0x08000202, 0x08020002, 0x08020202,
- 0x08000003, 0x08000203, 0x08020003, 0x08020203,
- 0x00200002, 0x00200202, 0x00220002, 0x00220202,
- 0x00200003, 0x00200203, 0x00220003, 0x00220203,
- 0x08200002, 0x08200202, 0x08220002, 0x08220202,
- 0x08200003, 0x08200203, 0x08220003, 0x08220203 },
-
- { 0x00000000, 0x00000010, 0x20000000, 0x20000010,
- 0x00100000, 0x00100010, 0x20100000, 0x20100010,
- 0x00000800, 0x00000810, 0x20000800, 0x20000810,
- 0x00100800, 0x00100810, 0x20100800, 0x20100810,
- 0x04000000, 0x04000010, 0x24000000, 0x24000010,
- 0x04100000, 0x04100010, 0x24100000, 0x24100010,
- 0x04000800, 0x04000810, 0x24000800, 0x24000810,
- 0x04100800, 0x04100810, 0x24100800, 0x24100810,
- 0x00000004, 0x00000014, 0x20000004, 0x20000014,
- 0x00100004, 0x00100014, 0x20100004, 0x20100014,
- 0x00000804, 0x00000814, 0x20000804, 0x20000814,
- 0x00100804, 0x00100814, 0x20100804, 0x20100814,
- 0x04000004, 0x04000014, 0x24000004, 0x24000014,
- 0x04100004, 0x04100014, 0x24100004, 0x24100014,
- 0x04000804, 0x04000814, 0x24000804, 0x24000814,
- 0x04100804, 0x04100814, 0x24100804, 0x24100814 },
-
- { 0x00000000, 0x00001000, 0x00010000, 0x00011000,
- 0x02000000, 0x02001000, 0x02010000, 0x02011000,
- 0x00000020, 0x00001020, 0x00010020, 0x00011020,
- 0x02000020, 0x02001020, 0x02010020, 0x02011020,
- 0x00040000, 0x00041000, 0x00050000, 0x00051000,
- 0x02040000, 0x02041000, 0x02050000, 0x02051000,
- 0x00040020, 0x00041020, 0x00050020, 0x00051020,
- 0x02040020, 0x02041020, 0x02050020, 0x02051020,
- 0x00002000, 0x00003000, 0x00012000, 0x00013000,
- 0x02002000, 0x02003000, 0x02012000, 0x02013000,
- 0x00002020, 0x00003020, 0x00012020, 0x00013020,
- 0x02002020, 0x02003020, 0x02012020, 0x02013020,
- 0x00042000, 0x00043000, 0x00052000, 0x00053000,
- 0x02042000, 0x02043000, 0x02052000, 0x02053000,
- 0x00042020, 0x00043020, 0x00052020, 0x00053020,
- 0x02042020, 0x02043020, 0x02052020, 0x02053020 },
-
- { 0x00000000, 0x00000400, 0x01000000, 0x01000400,
- 0x00000100, 0x00000500, 0x01000100, 0x01000500,
- 0x10000000, 0x10000400, 0x11000000, 0x11000400,
- 0x10000100, 0x10000500, 0x11000100, 0x11000500,
- 0x00080000, 0x00080400, 0x01080000, 0x01080400,
- 0x00080100, 0x00080500, 0x01080100, 0x01080500,
- 0x10080000, 0x10080400, 0x11080000, 0x11080400,
- 0x10080100, 0x10080500, 0x11080100, 0x11080500,
- 0x00000008, 0x00000408, 0x01000008, 0x01000408,
- 0x00000108, 0x00000508, 0x01000108, 0x01000508,
- 0x10000008, 0x10000408, 0x11000008, 0x11000408,
- 0x10000108, 0x10000508, 0x11000108, 0x11000508,
- 0x00080008, 0x00080408, 0x01080008, 0x01080408,
- 0x00080108, 0x00080508, 0x01080108, 0x01080508,
- 0x10080008, 0x10080408, 0x11080008, 0x11080408,
- 0x10080108, 0x10080508, 0x11080108, 0x11080508 }
-};
-
-
-
-/*
- * Permute the key to give us our key schedule.
- */
-void
-DESauth_subkeys(key, encryptkeys, decryptkeys)
- const U_LONG *key;
- u_char *encryptkeys;
- u_char *decryptkeys;
-{
- register U_LONG tmp;
- register U_LONG c, d;
- register u_char *ek, *dk;
- register int two_bit_shifts;
- register int i;
-
- /*
- * The first permutted choice gives us the 28 bits for C0 and
- * 28 for D0. C0 gets 12 bits from the left key and 16 from
- * the right, while D0 gets 16 from the left and 12 from the
- * right. The code knows which bits go where.
- */
- tmp = *key; /* left part of key */
- c = PC1_CL[(tmp >> 29) & 0x7]
- | (PC1_CL[(tmp >> 21) & 0x7] << 1)
- | (PC1_CL[(tmp >> 13) & 0x7] << 2)
- | (PC1_CL[(tmp >> 5) & 0x7] << 3);
- d = PC1_DL[(tmp >> 25) & 0xf]
- | (PC1_DL[(tmp >> 17) & 0xf] << 1)
- | (PC1_DL[(tmp >> 9) & 0xf] << 2)
- | (PC1_DL[(tmp >> 1) & 0xf] << 3);
-
- tmp = *(key+1); /* right part of key */
- c |= PC1_CR[(tmp >> 28) & 0xf]
- | (PC1_CR[(tmp >> 20) & 0xf] << 1)
- | (PC1_CR[(tmp >> 12) & 0xf] << 2)
- | (PC1_CR[(tmp >> 4) & 0xf] << 3);
- d |= PC1_DR[(tmp >> 25) & 0x7]
- | (PC1_DR[(tmp >> 17) & 0x7] << 1)
- | (PC1_DR[(tmp >> 9) & 0x7] << 2)
- | (PC1_DR[(tmp >> 1) & 0x7] << 3);
-
- /*
- * Now iterate to compute the key schedule. Note that we
- * record the entire set of subkeys in 6 bit chunks since
- * they are used that way. At 6 bits/char, we need
- * 48/6 char's/subkey * 16 subkeys/encryption == 128 chars.
- * encryptkeys and decryptkeys must be this big.
- */
- ek = encryptkeys;
- dk = decryptkeys + (8 * 15);
- two_bit_shifts = TWO_BIT_SHIFTS;
- for (i = 16; i > 0; i--) {
- /*
- * Do the rotation. One bit and two bit rotations
- * are done separately. Note C and D are 28 bits.
- */
- if (two_bit_shifts & 0x1) {
- c = ((c << 2) & 0xffffffc) | (c >> 26);
- d = ((d << 2) & 0xffffffc) | (d >> 26);
- } else {
- c = ((c << 1) & 0xffffffe) | (c >> 27);
- d = ((d << 1) & 0xffffffe) | (d >> 27);
- }
- two_bit_shifts >>= 1;
-
- /*
- * Apply permutted choice 2 to C to get the first
- * 24 bits worth of keys. Note that bits 9, 18, 22
- * and 25 (using DES numbering) in C are unused. The
- * shift-mask stuff is done to delete these bits from
- * the indices, since this cuts the table size in half.
- */
- tmp = PC2_C[0][((c >> 22) & 0x3f)]
- | PC2_C[1][((c >> 15) & 0xf) | ((c >> 16) & 0x30)]
- | PC2_C[2][((c >> 4) & 0x3) | ((c >> 9) & 0x3c)]
- | PC2_C[3][((c ) & 0x7) | ((c >> 4) & 0x38)];
- *ek++ = *dk++ = (u_char)(tmp >> 24);
- *ek++ = *dk++ = (u_char)(tmp >> 16);
- *ek++ = *dk++ = (u_char)(tmp >> 8);
- *ek++ = *dk++ = (u_char)tmp;
-
- /*
- * Apply permutted choice 2 to D to get the other half.
- * Here, bits 7, 10, 15 and 26 go unused. The sqeezing
- * actually turns out to be cheaper here.
- */
- tmp = PC2_D[0][((d >> 22) & 0x3f)]
- | PC2_D[1][((d >> 14) & 0xf) | ((d >> 15) & 0x30)]
- | PC2_D[2][((d >> 7) & 0x3f)]
- | PC2_D[3][((d ) & 0x3) | ((d >> 1) & 0x3c)];
- *ek++ = *dk++ = (u_char)(tmp >> 24);
- *ek++ = *dk++ = (u_char)(tmp >> 16);
- *ek++ = *dk++ = (u_char)(tmp >> 8);
- *ek++ = *dk++ = (u_char)tmp;
-
- /*
- * We are filling in the decryption subkeys from the end.
- * Space it back 16 elements to get to the start of the
- * next set.
- */
- dk -= 16;
- }
-}
-
-/*
- * The DES algorithm. This is intended to be fairly speedy at the
- * expense of some memory.
- *
- * This uses all the standard hacks. The S boxes and the P permutation
- * are precomputed into one table. The E box never actually appears
- * explicitly since it is easy to apply this algorithmically. The
- * initial permutation and final (inverse initial) permuation are
- * computed from tables designed to permute four bits at a time. This
- * should run pretty fast on machines with 32 bit words and
- * bit field/multiple bit shift instructions which are fast.
- */
-
-/*
- * The initial permutation array. This is used to compute both the
- * left and the right halves of the initial permutation using bytes
- * from words made from the following operations:
- *
- * ((left & 0x55555555) << 1) | (right & 0x55555555) for left half
- * (left & 0xaaaaaaaa) | ((right & 0xaaaaaaaa) >> 1) for right half
- *
- * The scheme is that we index into the table using each byte. The
- * result from the high order byte is or'd with the result from the
- * next byte shifted left once is or'd with the result from the next
- * byte shifted left twice if or'd with the result from the low order
- * byte shifted left by three. Clear?
- */
-static U_LONG IP[256] = {
- 0x00000000, 0x00000010, 0x00000001, 0x00000011,
- 0x00001000, 0x00001010, 0x00001001, 0x00001011,
- 0x00000100, 0x00000110, 0x00000101, 0x00000111,
- 0x00001100, 0x00001110, 0x00001101, 0x00001111,
- 0x00100000, 0x00100010, 0x00100001, 0x00100011,
- 0x00101000, 0x00101010, 0x00101001, 0x00101011,
- 0x00100100, 0x00100110, 0x00100101, 0x00100111,
- 0x00101100, 0x00101110, 0x00101101, 0x00101111,
- 0x00010000, 0x00010010, 0x00010001, 0x00010011,
- 0x00011000, 0x00011010, 0x00011001, 0x00011011,
- 0x00010100, 0x00010110, 0x00010101, 0x00010111,
- 0x00011100, 0x00011110, 0x00011101, 0x00011111,
- 0x00110000, 0x00110010, 0x00110001, 0x00110011,
- 0x00111000, 0x00111010, 0x00111001, 0x00111011,
- 0x00110100, 0x00110110, 0x00110101, 0x00110111,
- 0x00111100, 0x00111110, 0x00111101, 0x00111111,
- 0x10000000, 0x10000010, 0x10000001, 0x10000011,
- 0x10001000, 0x10001010, 0x10001001, 0x10001011,
- 0x10000100, 0x10000110, 0x10000101, 0x10000111,
- 0x10001100, 0x10001110, 0x10001101, 0x10001111,
- 0x10100000, 0x10100010, 0x10100001, 0x10100011,
- 0x10101000, 0x10101010, 0x10101001, 0x10101011,
- 0x10100100, 0x10100110, 0x10100101, 0x10100111,
- 0x10101100, 0x10101110, 0x10101101, 0x10101111,
- 0x10010000, 0x10010010, 0x10010001, 0x10010011,
- 0x10011000, 0x10011010, 0x10011001, 0x10011011,
- 0x10010100, 0x10010110, 0x10010101, 0x10010111,
- 0x10011100, 0x10011110, 0x10011101, 0x10011111,
- 0x10110000, 0x10110010, 0x10110001, 0x10110011,
- 0x10111000, 0x10111010, 0x10111001, 0x10111011,
- 0x10110100, 0x10110110, 0x10110101, 0x10110111,
- 0x10111100, 0x10111110, 0x10111101, 0x10111111,
- 0x01000000, 0x01000010, 0x01000001, 0x01000011,
- 0x01001000, 0x01001010, 0x01001001, 0x01001011,
- 0x01000100, 0x01000110, 0x01000101, 0x01000111,
- 0x01001100, 0x01001110, 0x01001101, 0x01001111,
- 0x01100000, 0x01100010, 0x01100001, 0x01100011,
- 0x01101000, 0x01101010, 0x01101001, 0x01101011,
- 0x01100100, 0x01100110, 0x01100101, 0x01100111,
- 0x01101100, 0x01101110, 0x01101101, 0x01101111,
- 0x01010000, 0x01010010, 0x01010001, 0x01010011,
- 0x01011000, 0x01011010, 0x01011001, 0x01011011,
- 0x01010100, 0x01010110, 0x01010101, 0x01010111,
- 0x01011100, 0x01011110, 0x01011101, 0x01011111,
- 0x01110000, 0x01110010, 0x01110001, 0x01110011,
- 0x01111000, 0x01111010, 0x01111001, 0x01111011,
- 0x01110100, 0x01110110, 0x01110101, 0x01110111,
- 0x01111100, 0x01111110, 0x01111101, 0x01111111,
- 0x11000000, 0x11000010, 0x11000001, 0x11000011,
- 0x11001000, 0x11001010, 0x11001001, 0x11001011,
- 0x11000100, 0x11000110, 0x11000101, 0x11000111,
- 0x11001100, 0x11001110, 0x11001101, 0x11001111,
- 0x11100000, 0x11100010, 0x11100001, 0x11100011,
- 0x11101000, 0x11101010, 0x11101001, 0x11101011,
- 0x11100100, 0x11100110, 0x11100101, 0x11100111,
- 0x11101100, 0x11101110, 0x11101101, 0x11101111,
- 0x11010000, 0x11010010, 0x11010001, 0x11010011,
- 0x11011000, 0x11011010, 0x11011001, 0x11011011,
- 0x11010100, 0x11010110, 0x11010101, 0x11010111,
- 0x11011100, 0x11011110, 0x11011101, 0x11011111,
- 0x11110000, 0x11110010, 0x11110001, 0x11110011,
- 0x11111000, 0x11111010, 0x11111001, 0x11111011,
- 0x11110100, 0x11110110, 0x11110101, 0x11110111,
- 0x11111100, 0x11111110, 0x11111101, 0x11111111
-};
-
-/*
- * The final permutation array. Like the IP array, used
- * to compute both the left and right results from the nibbles
- * of words computed from:
- *
- * ((left & 0x0f0f0f0f) << 4) | (right & 0x0f0f0f0f) for left result
- * (left & 0xf0f0f0f0) | ((right & 0xf0f0f0f0) >> 4) for right result
- *
- * The result from the high order byte is shifted left 6 bits and
- * or'd with the result from the next byte shifted left 4 bits, which
- * is or'd with the result from the next byte shifted left 2 bits,
- * which is or'd with the result from the low byte.
- *
- * There is one of these for big end machines (the natural order for
- * DES) and a second for little end machines. One is a byte swapped
- * version of the other.
- */
-#ifndef XNTP_LITTLE_ENDIAN
- /*
- * Big end version
- */
-static U_LONG FP[256] = {
- 0x00000000, 0x02000000, 0x00020000, 0x02020000,
- 0x00000200, 0x02000200, 0x00020200, 0x02020200,
- 0x00000002, 0x02000002, 0x00020002, 0x02020002,
- 0x00000202, 0x02000202, 0x00020202, 0x02020202,
- 0x01000000, 0x03000000, 0x01020000, 0x03020000,
- 0x01000200, 0x03000200, 0x01020200, 0x03020200,
- 0x01000002, 0x03000002, 0x01020002, 0x03020002,
- 0x01000202, 0x03000202, 0x01020202, 0x03020202,
- 0x00010000, 0x02010000, 0x00030000, 0x02030000,
- 0x00010200, 0x02010200, 0x00030200, 0x02030200,
- 0x00010002, 0x02010002, 0x00030002, 0x02030002,
- 0x00010202, 0x02010202, 0x00030202, 0x02030202,
- 0x01010000, 0x03010000, 0x01030000, 0x03030000,
- 0x01010200, 0x03010200, 0x01030200, 0x03030200,
- 0x01010002, 0x03010002, 0x01030002, 0x03030002,
- 0x01010202, 0x03010202, 0x01030202, 0x03030202,
- 0x00000100, 0x02000100, 0x00020100, 0x02020100,
- 0x00000300, 0x02000300, 0x00020300, 0x02020300,
- 0x00000102, 0x02000102, 0x00020102, 0x02020102,
- 0x00000302, 0x02000302, 0x00020302, 0x02020302,
- 0x01000100, 0x03000100, 0x01020100, 0x03020100,
- 0x01000300, 0x03000300, 0x01020300, 0x03020300,
- 0x01000102, 0x03000102, 0x01020102, 0x03020102,
- 0x01000302, 0x03000302, 0x01020302, 0x03020302,
- 0x00010100, 0x02010100, 0x00030100, 0x02030100,
- 0x00010300, 0x02010300, 0x00030300, 0x02030300,
- 0x00010102, 0x02010102, 0x00030102, 0x02030102,
- 0x00010302, 0x02010302, 0x00030302, 0x02030302,
- 0x01010100, 0x03010100, 0x01030100, 0x03030100,
- 0x01010300, 0x03010300, 0x01030300, 0x03030300,
- 0x01010102, 0x03010102, 0x01030102, 0x03030102,
- 0x01010302, 0x03010302, 0x01030302, 0x03030302,
- 0x00000001, 0x02000001, 0x00020001, 0x02020001,
- 0x00000201, 0x02000201, 0x00020201, 0x02020201,
- 0x00000003, 0x02000003, 0x00020003, 0x02020003,
- 0x00000203, 0x02000203, 0x00020203, 0x02020203,
- 0x01000001, 0x03000001, 0x01020001, 0x03020001,
- 0x01000201, 0x03000201, 0x01020201, 0x03020201,
- 0x01000003, 0x03000003, 0x01020003, 0x03020003,
- 0x01000203, 0x03000203, 0x01020203, 0x03020203,
- 0x00010001, 0x02010001, 0x00030001, 0x02030001,
- 0x00010201, 0x02010201, 0x00030201, 0x02030201,
- 0x00010003, 0x02010003, 0x00030003, 0x02030003,
- 0x00010203, 0x02010203, 0x00030203, 0x02030203,
- 0x01010001, 0x03010001, 0x01030001, 0x03030001,
- 0x01010201, 0x03010201, 0x01030201, 0x03030201,
- 0x01010003, 0x03010003, 0x01030003, 0x03030003,
- 0x01010203, 0x03010203, 0x01030203, 0x03030203,
- 0x00000101, 0x02000101, 0x00020101, 0x02020101,
- 0x00000301, 0x02000301, 0x00020301, 0x02020301,
- 0x00000103, 0x02000103, 0x00020103, 0x02020103,
- 0x00000303, 0x02000303, 0x00020303, 0x02020303,
- 0x01000101, 0x03000101, 0x01020101, 0x03020101,
- 0x01000301, 0x03000301, 0x01020301, 0x03020301,
- 0x01000103, 0x03000103, 0x01020103, 0x03020103,
- 0x01000303, 0x03000303, 0x01020303, 0x03020303,
- 0x00010101, 0x02010101, 0x00030101, 0x02030101,
- 0x00010301, 0x02010301, 0x00030301, 0x02030301,
- 0x00010103, 0x02010103, 0x00030103, 0x02030103,
- 0x00010303, 0x02010303, 0x00030303, 0x02030303,
- 0x01010101, 0x03010101, 0x01030101, 0x03030101,
- 0x01010301, 0x03010301, 0x01030301, 0x03030301,
- 0x01010103, 0x03010103, 0x01030103, 0x03030103,
- 0x01010303, 0x03010303, 0x01030303, 0x03030303
-};
-#else
- /*
- * Byte swapped for little end machines.
- */
-static U_LONG FP[256] = {
- 0x00000000, 0x00000002, 0x00000200, 0x00000202,
- 0x00020000, 0x00020002, 0x00020200, 0x00020202,
- 0x02000000, 0x02000002, 0x02000200, 0x02000202,
- 0x02020000, 0x02020002, 0x02020200, 0x02020202,
- 0x00000001, 0x00000003, 0x00000201, 0x00000203,
- 0x00020001, 0x00020003, 0x00020201, 0x00020203,
- 0x02000001, 0x02000003, 0x02000201, 0x02000203,
- 0x02020001, 0x02020003, 0x02020201, 0x02020203,
- 0x00000100, 0x00000102, 0x00000300, 0x00000302,
- 0x00020100, 0x00020102, 0x00020300, 0x00020302,
- 0x02000100, 0x02000102, 0x02000300, 0x02000302,
- 0x02020100, 0x02020102, 0x02020300, 0x02020302,
- 0x00000101, 0x00000103, 0x00000301, 0x00000303,
- 0x00020101, 0x00020103, 0x00020301, 0x00020303,
- 0x02000101, 0x02000103, 0x02000301, 0x02000303,
- 0x02020101, 0x02020103, 0x02020301, 0x02020303,
- 0x00010000, 0x00010002, 0x00010200, 0x00010202,
- 0x00030000, 0x00030002, 0x00030200, 0x00030202,
- 0x02010000, 0x02010002, 0x02010200, 0x02010202,
- 0x02030000, 0x02030002, 0x02030200, 0x02030202,
- 0x00010001, 0x00010003, 0x00010201, 0x00010203,
- 0x00030001, 0x00030003, 0x00030201, 0x00030203,
- 0x02010001, 0x02010003, 0x02010201, 0x02010203,
- 0x02030001, 0x02030003, 0x02030201, 0x02030203,
- 0x00010100, 0x00010102, 0x00010300, 0x00010302,
- 0x00030100, 0x00030102, 0x00030300, 0x00030302,
- 0x02010100, 0x02010102, 0x02010300, 0x02010302,
- 0x02030100, 0x02030102, 0x02030300, 0x02030302,
- 0x00010101, 0x00010103, 0x00010301, 0x00010303,
- 0x00030101, 0x00030103, 0x00030301, 0x00030303,
- 0x02010101, 0x02010103, 0x02010301, 0x02010303,
- 0x02030101, 0x02030103, 0x02030301, 0x02030303,
- 0x01000000, 0x01000002, 0x01000200, 0x01000202,
- 0x01020000, 0x01020002, 0x01020200, 0x01020202,
- 0x03000000, 0x03000002, 0x03000200, 0x03000202,
- 0x03020000, 0x03020002, 0x03020200, 0x03020202,
- 0x01000001, 0x01000003, 0x01000201, 0x01000203,
- 0x01020001, 0x01020003, 0x01020201, 0x01020203,
- 0x03000001, 0x03000003, 0x03000201, 0x03000203,
- 0x03020001, 0x03020003, 0x03020201, 0x03020203,
- 0x01000100, 0x01000102, 0x01000300, 0x01000302,
- 0x01020100, 0x01020102, 0x01020300, 0x01020302,
- 0x03000100, 0x03000102, 0x03000300, 0x03000302,
- 0x03020100, 0x03020102, 0x03020300, 0x03020302,
- 0x01000101, 0x01000103, 0x01000301, 0x01000303,
- 0x01020101, 0x01020103, 0x01020301, 0x01020303,
- 0x03000101, 0x03000103, 0x03000301, 0x03000303,
- 0x03020101, 0x03020103, 0x03020301, 0x03020303,
- 0x01010000, 0x01010002, 0x01010200, 0x01010202,
- 0x01030000, 0x01030002, 0x01030200, 0x01030202,
- 0x03010000, 0x03010002, 0x03010200, 0x03010202,
- 0x03030000, 0x03030002, 0x03030200, 0x03030202,
- 0x01010001, 0x01010003, 0x01010201, 0x01010203,
- 0x01030001, 0x01030003, 0x01030201, 0x01030203,
- 0x03010001, 0x03010003, 0x03010201, 0x03010203,
- 0x03030001, 0x03030003, 0x03030201, 0x03030203,
- 0x01010100, 0x01010102, 0x01010300, 0x01010302,
- 0x01030100, 0x01030102, 0x01030300, 0x01030302,
- 0x03010100, 0x03010102, 0x03010300, 0x03010302,
- 0x03030100, 0x03030102, 0x03030300, 0x03030302,
- 0x01010101, 0x01010103, 0x01010301, 0x01010303,
- 0x01030101, 0x01030103, 0x01030301, 0x01030303,
- 0x03010101, 0x03010103, 0x03010301, 0x03010303,
- 0x03030101, 0x03030103, 0x03030301, 0x03030303
-};
-#endif
-
-
-/*
- * The SP table is actually the S boxes and the P permutation
- * table combined.
- */
-static U_LONG SP[8][64] = {
- { 0x00808200, 0x00000000, 0x00008000, 0x00808202,
- 0x00808002, 0x00008202, 0x00000002, 0x00008000,
- 0x00000200, 0x00808200, 0x00808202, 0x00000200,
- 0x00800202, 0x00808002, 0x00800000, 0x00000002,
- 0x00000202, 0x00800200, 0x00800200, 0x00008200,
- 0x00008200, 0x00808000, 0x00808000, 0x00800202,
- 0x00008002, 0x00800002, 0x00800002, 0x00008002,
- 0x00000000, 0x00000202, 0x00008202, 0x00800000,
- 0x00008000, 0x00808202, 0x00000002, 0x00808000,
- 0x00808200, 0x00800000, 0x00800000, 0x00000200,
- 0x00808002, 0x00008000, 0x00008200, 0x00800002,
- 0x00000200, 0x00000002, 0x00800202, 0x00008202,
- 0x00808202, 0x00008002, 0x00808000, 0x00800202,
- 0x00800002, 0x00000202, 0x00008202, 0x00808200,
- 0x00000202, 0x00800200, 0x00800200, 0x00000000,
- 0x00008002, 0x00008200, 0x00000000, 0x00808002 },
-
- { 0x40084010, 0x40004000, 0x00004000, 0x00084010,
- 0x00080000, 0x00000010, 0x40080010, 0x40004010,
- 0x40000010, 0x40084010, 0x40084000, 0x40000000,
- 0x40004000, 0x00080000, 0x00000010, 0x40080010,
- 0x00084000, 0x00080010, 0x40004010, 0x00000000,
- 0x40000000, 0x00004000, 0x00084010, 0x40080000,
- 0x00080010, 0x40000010, 0x00000000, 0x00084000,
- 0x00004010, 0x40084000, 0x40080000, 0x00004010,
- 0x00000000, 0x00084010, 0x40080010, 0x00080000,
- 0x40004010, 0x40080000, 0x40084000, 0x00004000,
- 0x40080000, 0x40004000, 0x00000010, 0x40084010,
- 0x00084010, 0x00000010, 0x00004000, 0x40000000,
- 0x00004010, 0x40084000, 0x00080000, 0x40000010,
- 0x00080010, 0x40004010, 0x40000010, 0x00080010,
- 0x00084000, 0x00000000, 0x40004000, 0x00004010,
- 0x40000000, 0x40080010, 0x40084010, 0x00084000 },
-
- { 0x00000104, 0x04010100, 0x00000000, 0x04010004,
- 0x04000100, 0x00000000, 0x00010104, 0x04000100,
- 0x00010004, 0x04000004, 0x04000004, 0x00010000,
- 0x04010104, 0x00010004, 0x04010000, 0x00000104,
- 0x04000000, 0x00000004, 0x04010100, 0x00000100,
- 0x00010100, 0x04010000, 0x04010004, 0x00010104,
- 0x04000104, 0x00010100, 0x00010000, 0x04000104,
- 0x00000004, 0x04010104, 0x00000100, 0x04000000,
- 0x04010100, 0x04000000, 0x00010004, 0x00000104,
- 0x00010000, 0x04010100, 0x04000100, 0x00000000,
- 0x00000100, 0x00010004, 0x04010104, 0x04000100,
- 0x04000004, 0x00000100, 0x00000000, 0x04010004,
- 0x04000104, 0x00010000, 0x04000000, 0x04010104,
- 0x00000004, 0x00010104, 0x00010100, 0x04000004,
- 0x04010000, 0x04000104, 0x00000104, 0x04010000,
- 0x00010104, 0x00000004, 0x04010004, 0x00010100 },
-
- { 0x80401000, 0x80001040, 0x80001040, 0x00000040,
- 0x00401040, 0x80400040, 0x80400000, 0x80001000,
- 0x00000000, 0x00401000, 0x00401000, 0x80401040,
- 0x80000040, 0x00000000, 0x00400040, 0x80400000,
- 0x80000000, 0x00001000, 0x00400000, 0x80401000,
- 0x00000040, 0x00400000, 0x80001000, 0x00001040,
- 0x80400040, 0x80000000, 0x00001040, 0x00400040,
- 0x00001000, 0x00401040, 0x80401040, 0x80000040,
- 0x00400040, 0x80400000, 0x00401000, 0x80401040,
- 0x80000040, 0x00000000, 0x00000000, 0x00401000,
- 0x00001040, 0x00400040, 0x80400040, 0x80000000,
- 0x80401000, 0x80001040, 0x80001040, 0x00000040,
- 0x80401040, 0x80000040, 0x80000000, 0x00001000,
- 0x80400000, 0x80001000, 0x00401040, 0x80400040,
- 0x80001000, 0x00001040, 0x00400000, 0x80401000,
- 0x00000040, 0x00400000, 0x00001000, 0x00401040 },
-
- { 0x00000080, 0x01040080, 0x01040000, 0x21000080,
- 0x00040000, 0x00000080, 0x20000000, 0x01040000,
- 0x20040080, 0x00040000, 0x01000080, 0x20040080,
- 0x21000080, 0x21040000, 0x00040080, 0x20000000,
- 0x01000000, 0x20040000, 0x20040000, 0x00000000,
- 0x20000080, 0x21040080, 0x21040080, 0x01000080,
- 0x21040000, 0x20000080, 0x00000000, 0x21000000,
- 0x01040080, 0x01000000, 0x21000000, 0x00040080,
- 0x00040000, 0x21000080, 0x00000080, 0x01000000,
- 0x20000000, 0x01040000, 0x21000080, 0x20040080,
- 0x01000080, 0x20000000, 0x21040000, 0x01040080,
- 0x20040080, 0x00000080, 0x01000000, 0x21040000,
- 0x21040080, 0x00040080, 0x21000000, 0x21040080,
- 0x01040000, 0x00000000, 0x20040000, 0x21000000,
- 0x00040080, 0x01000080, 0x20000080, 0x00040000,
- 0x00000000, 0x20040000, 0x01040080, 0x20000080 },
-
- { 0x10000008, 0x10200000, 0x00002000, 0x10202008,
- 0x10200000, 0x00000008, 0x10202008, 0x00200000,
- 0x10002000, 0x00202008, 0x00200000, 0x10000008,
- 0x00200008, 0x10002000, 0x10000000, 0x00002008,
- 0x00000000, 0x00200008, 0x10002008, 0x00002000,
- 0x00202000, 0x10002008, 0x00000008, 0x10200008,
- 0x10200008, 0x00000000, 0x00202008, 0x10202000,
- 0x00002008, 0x00202000, 0x10202000, 0x10000000,
- 0x10002000, 0x00000008, 0x10200008, 0x00202000,
- 0x10202008, 0x00200000, 0x00002008, 0x10000008,
- 0x00200000, 0x10002000, 0x10000000, 0x00002008,
- 0x10000008, 0x10202008, 0x00202000, 0x10200000,
- 0x00202008, 0x10202000, 0x00000000, 0x10200008,
- 0x00000008, 0x00002000, 0x10200000, 0x00202008,
- 0x00002000, 0x00200008, 0x10002008, 0x00000000,
- 0x10202000, 0x10000000, 0x00200008, 0x10002008 },
-
- { 0x00100000, 0x02100001, 0x02000401, 0x00000000,
- 0x00000400, 0x02000401, 0x00100401, 0x02100400,
- 0x02100401, 0x00100000, 0x00000000, 0x02000001,
- 0x00000001, 0x02000000, 0x02100001, 0x00000401,
- 0x02000400, 0x00100401, 0x00100001, 0x02000400,
- 0x02000001, 0x02100000, 0x02100400, 0x00100001,
- 0x02100000, 0x00000400, 0x00000401, 0x02100401,
- 0x00100400, 0x00000001, 0x02000000, 0x00100400,
- 0x02000000, 0x00100400, 0x00100000, 0x02000401,
- 0x02000401, 0x02100001, 0x02100001, 0x00000001,
- 0x00100001, 0x02000000, 0x02000400, 0x00100000,
- 0x02100400, 0x00000401, 0x00100401, 0x02100400,
- 0x00000401, 0x02000001, 0x02100401, 0x02100000,
- 0x00100400, 0x00000000, 0x00000001, 0x02100401,
- 0x00000000, 0x00100401, 0x02100000, 0x00000400,
- 0x02000001, 0x02000400, 0x00000400, 0x00100001 },
-
- { 0x08000820, 0x00000800, 0x00020000, 0x08020820,
- 0x08000000, 0x08000820, 0x00000020, 0x08000000,
- 0x00020020, 0x08020000, 0x08020820, 0x00020800,
- 0x08020800, 0x00020820, 0x00000800, 0x00000020,
- 0x08020000, 0x08000020, 0x08000800, 0x00000820,
- 0x00020800, 0x00020020, 0x08020020, 0x08020800,
- 0x00000820, 0x00000000, 0x00000000, 0x08020020,
- 0x08000020, 0x08000800, 0x00020820, 0x00020000,
- 0x00020820, 0x00020000, 0x08020800, 0x00000800,
- 0x00000020, 0x08020020, 0x00000800, 0x00020820,
- 0x08000800, 0x00000020, 0x08000020, 0x08020000,
- 0x08020020, 0x08000000, 0x00020000, 0x08000820,
- 0x00000000, 0x08020820, 0x00020020, 0x08000020,
- 0x08020000, 0x08000800, 0x08000820, 0x00000000,
- 0x08020820, 0x00020800, 0x00020800, 0x00000820,
- 0x00000820, 0x00020020, 0x08000000, 0x08020800 }
-};
-
-
-
-/*
- * DESauth_des - perform an in place DES encryption on 64 bits
- *
- * Note that the `data' argument is always in big-end-first
- * byte order, i.e. *(char *)data is the high order byte of
- * the 8 byte data word. We modify the initial and final
- * permutation computations for little-end-first machines to
- * swap bytes into the natural host order at the beginning and
- * back to big-end order at the end. This is unclean but avoids
- * a byte swapping performance penalty on Vaxes (which are slow already).
- */
-void
-DESauth_des(data, subkeys)
- U_LONG *data;
- u_char *subkeys;
-{
- register U_LONG left, right;
- register U_LONG temp;
- register u_char *kp;
- register int i;
-
- /*
- * Do the initial permutation. The first operation gets
- * all the bits which are used to form the left half of the
- * permutted result in one word, which is then used to
- * index the appropriate table a byte at a time.
- */
- temp = ((*data & 0x55555555) << 1) | (*(data+1) & 0x55555555);
-#ifdef XNTP_LITTLE_ENDIAN
- /*
- * Modify the computation to use the opposite set of bytes.
- */
- left = (IP[(temp >> 24) & 0xff] << 3)
- | (IP[(temp >> 16) & 0xff] << 2)
- | (IP[(temp >> 8) & 0xff] << 1)
- | IP[temp & 0xff];
-#else
- left = IP[(temp >> 24) & 0xff]
- | (IP[(temp >> 16) & 0xff] << 1)
- | (IP[(temp >> 8) & 0xff] << 2)
- | (IP[temp & 0xff] << 3);
-#endif
-
- /*
- * Same thing again except for the right half.
- */
- temp = (*data & 0xaaaaaaaa) | ((*(data+1) & 0xaaaaaaaa) >> 1);
-#ifdef XNTP_LITTLE_ENDIAN
- right = (IP[(temp >> 24) & 0xff] << 3)
- | (IP[(temp >> 16) & 0xff] << 2)
- | (IP[(temp >> 8) & 0xff] << 1)
- | IP[temp & 0xff];
-#else
- right = IP[(temp >> 24) & 0xff]
- | (IP[(temp >> 16) & 0xff] << 1)
- | (IP[(temp >> 8) & 0xff] << 2)
- | (IP[temp & 0xff] << 3);
-#endif
-
- /*
- * Do the 16 rounds through the cipher function. We actually
- * do two at a time, one on the left half and one on the right
- * half.
- */
- kp = subkeys;
- for (i = 0; i < 8; i++) {
- /*
- * The E expansion is easy to compute algorithmically.
- * Take a look at its form and compare it to
- * everything involving temp below. Note that
- * since SP[0-7] don't have any bits in common set
- * it is okay to do the successive xor's.
- */
- temp = (right >> 1) | ((right & 1) ? 0x80000000 : 0);
- left ^= SP[0][((temp >> 26) & 0x3f) ^ *kp++];
- left ^= SP[1][((temp >> 22) & 0x3f) ^ *kp++];
- left ^= SP[2][((temp >> 18) & 0x3f) ^ *kp++];
- left ^= SP[3][((temp >> 14) & 0x3f) ^ *kp++];
- left ^= SP[4][((temp >> 10) & 0x3f) ^ *kp++];
- left ^= SP[5][((temp >> 6) & 0x3f) ^ *kp++];
- left ^= SP[6][((temp >> 2) & 0x3f) ^ *kp++];
- left ^= SP[7][(((right << 1) | ((right & 0x80000000)?1:0))
- & 0x3f) ^ *kp++];
-
- /*
- * Careful here. Right now `right' is actually the
- * left side and `left' is the right side. Do the
- * same thing again, except swap `left' and `right'
- */
- temp = (left >> 1) | ((left & 1) ? 0x80000000 : 0);
- right ^= SP[0][((temp >> 26) & 0x3f) ^ *kp++];
- right ^= SP[1][((temp >> 22) & 0x3f) ^ *kp++];
- right ^= SP[2][((temp >> 18) & 0x3f) ^ *kp++];
- right ^= SP[3][((temp >> 14) & 0x3f) ^ *kp++];
- right ^= SP[4][((temp >> 10) & 0x3f) ^ *kp++];
- right ^= SP[5][((temp >> 6) & 0x3f) ^ *kp++];
- right ^= SP[6][((temp >> 2) & 0x3f) ^ *kp++];
- right ^= SP[7][(((left << 1) | ((left & 0x80000000)?1:0))
- & 0x3f) ^ *kp++];
-
- /*
- * By the time we get here, all is straightened out
- * again. `left' is left and `right' is right.
- */
- }
-
- /*
- * Now the final permutation. Note this is like the IP above
- * except that the data is computed from
- *
- * ((left & 0x0f0f0f0f) << 4) | (right & 0x0f0f0f0f) for left result
- * (left & 0xf0f0f0f0) | ((right & 0xf0f0f0f0) >> 4) for right result
- *
- * Just to confuse things more, we're supposed to swap the right
- * and the left halves before doing this. Instead, we'll just
- * switch which goes where when computing the temporary.
- *
- * This operation also byte swaps stuff back into big end byte
- * order. This is accomplished by modifying the FP table for
- * little end machines, however, so we don't have to worry about
- * it here.
- */
- temp = ((right & 0x0f0f0f0f) << 4) | (left & 0x0f0f0f0f);
- *data = (FP[(temp >> 24) & 0xff] << 6)
- | (FP[(temp >> 16) & 0xff] << 4)
- | (FP[(temp >> 8) & 0xff] << 2)
- | FP[temp & 0xff];
-
- temp = (right & 0xf0f0f0f0) | ((left & 0xf0f0f0f0) >> 4);
- *(data+1) = (FP[(temp >> 24) & 0xff] << 6)
- | (FP[(temp >> 16) & 0xff] << 4)
- | (FP[(temp >> 8) & 0xff] << 2)
- | FP[temp & 0xff];
-}
diff --git a/usr.sbin/xntpd/machines/README b/usr.sbin/xntpd/machines/README
deleted file mode 100644
index b12db88d9c61..000000000000
--- a/usr.sbin/xntpd/machines/README
+++ /dev/null
@@ -1,5 +0,0 @@
-README file for directory ./machines of the NTP Version 3 distribution
-
-This directory contains configuration files for the various machines
-and compilers supported by the distribution. README and RELNOTES files in the
-parent directory contain directions on how to use these files.
diff --git a/usr.sbin/xntpd/machines/aix3.2 b/usr.sbin/xntpd/machines/aix3.2
deleted file mode 100644
index 93a0181ca63d..000000000000
--- a/usr.sbin/xntpd/machines/aix3.2
+++ /dev/null
@@ -1,10 +0,0 @@
-RANLIB= :
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DRS6000 -DSYS_AIX -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
-INSTALL= /usr/ucb/install
-COPTS= -O
-COMPAT=
diff --git a/usr.sbin/xntpd/machines/aux2 b/usr.sbin/xntpd/machines/aux2
deleted file mode 100644
index 0aa8ee0528f8..000000000000
--- a/usr.sbin/xntpd/machines/aux2
+++ /dev/null
@@ -1,9 +0,0 @@
-RANLIB= true # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_AUX2 -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5 -DFASTMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
-COMPAT= -lposix -lbsd -lmalloc -s
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/aux3 b/usr.sbin/xntpd/machines/aux3
deleted file mode 100644
index 1c6313b37ec9..000000000000
--- a/usr.sbin/xntpd/machines/aux3
+++ /dev/null
@@ -1,9 +0,0 @@
-RANLIB= true # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_AUX3 -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5 -DFASTMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
-COMPAT= -lposix -lbsd -lmalloc -s
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/bsdi b/usr.sbin/xntpd/machines/bsdi
deleted file mode 100644
index 3145bd63984e..000000000000
--- a/usr.sbin/xntpd/machines/bsdi
+++ /dev/null
@@ -1,8 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL=-DREFCLOCK
-DEFS= -DSYS_BSDI -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lkvm
-RESLIB=
-COPTS= -g -O
diff --git a/usr.sbin/xntpd/machines/convexos10 b/usr.sbin/xntpd/machines/convexos10
deleted file mode 100644
index 39eb38456c6f..000000000000
--- a/usr.sbin/xntpd/machines/convexos10
+++ /dev/null
@@ -1,10 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL=-DREFCLOCK
-DEFS= -DSYS_CONVEXOS10 -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-RESLIB=
-COPTS= -O
-ADJLIB=
-COMPAT=
-
diff --git a/usr.sbin/xntpd/machines/convexos9 b/usr.sbin/xntpd/machines/convexos9
deleted file mode 100644
index a0276b8f4ca5..000000000000
--- a/usr.sbin/xntpd/machines/convexos9
+++ /dev/null
@@ -1,9 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL=-DREFCLOCK
-DEFS= -DSYS_CONVEXOS9 -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-RESLIB=
-COPTS= -O
-ADJLIB=
-COMPAT=
diff --git a/usr.sbin/xntpd/machines/decosf1 b/usr.sbin/xntpd/machines/decosf1
deleted file mode 100644
index 0f9235163d24..000000000000
--- a/usr.sbin/xntpd/machines/decosf1
+++ /dev/null
@@ -1,9 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSTREAM -DSYS_DECOSF1 -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
-COPTS=
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/dell.svr4 b/usr.sbin/xntpd/machines/dell.svr4
deleted file mode 100644
index 5b53a2b16a4f..000000000000
--- a/usr.sbin/xntpd/machines/dell.svr4
+++ /dev/null
@@ -1,9 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_SVR4 -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB= -lnsl -lsocket -lelf
-INSTALL= /usr/ucb/install
diff --git a/usr.sbin/xntpd/machines/domainos b/usr.sbin/xntpd/machines/domainos
deleted file mode 100644
index 0ca6713304c2..000000000000
--- a/usr.sbin/xntpd/machines/domainos
+++ /dev/null
@@ -1,7 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_DOMAINOS -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_POSIX_SOURCE -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-COMPAT=
diff --git a/usr.sbin/xntpd/machines/freebsd b/usr.sbin/xntpd/machines/freebsd
deleted file mode 100644
index 9380c0e8455d..000000000000
--- a/usr.sbin/xntpd/machines/freebsd
+++ /dev/null
@@ -1,8 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL=-DREFCLOCK
-DEFS= -DSYS_FREEBSD -DSYS_386BSD -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lcrypt
-RESLIB=
-COPTS= -O2
diff --git a/usr.sbin/xntpd/machines/hpux b/usr.sbin/xntpd/machines/hpux
deleted file mode 100644
index fdb07897c900..000000000000
--- a/usr.sbin/xntpd/machines/hpux
+++ /dev/null
@@ -1,8 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DHAVE_TERMIOS -DSYS_HPUX=8
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-COPTS=
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/hpux-adj b/usr.sbin/xntpd/machines/hpux-adj
deleted file mode 100644
index 0119b6329d7e..000000000000
--- a/usr.sbin/xntpd/machines/hpux-adj
+++ /dev/null
@@ -1,8 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DHAVE_TERMIOS -DSYS_HPUX=10
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-COPTS=
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/hpux10+ b/usr.sbin/xntpd/machines/hpux10+
deleted file mode 100644
index 0119b6329d7e..000000000000
--- a/usr.sbin/xntpd/machines/hpux10+
+++ /dev/null
@@ -1,8 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DHAVE_TERMIOS -DSYS_HPUX=10
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-COPTS=
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/i386 b/usr.sbin/xntpd/machines/i386
deleted file mode 100644
index c5d93572061d..000000000000
--- a/usr.sbin/xntpd/machines/i386
+++ /dev/null
@@ -1,7 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_I386 -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-COMPAT=
diff --git a/usr.sbin/xntpd/machines/i386svr4 b/usr.sbin/xntpd/machines/i386svr4
deleted file mode 100644
index bc3fadb96c36..000000000000
--- a/usr.sbin/xntpd/machines/i386svr4
+++ /dev/null
@@ -1,9 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_SVR4 -DSTREAMS_TLI -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB= -lnsl -lsocket -lelf
-INSTALL= /usr/ucb/install
diff --git a/usr.sbin/xntpd/machines/irix4 b/usr.sbin/xntpd/machines/irix4
deleted file mode 100644
index ae2bbf8ba8d8..000000000000
--- a/usr.sbin/xntpd/machines/irix4
+++ /dev/null
@@ -1,9 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DHAVE_SYSV_TTYS -DSYS_IRIX4
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lmld
-RESLIB=
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/irix5 b/usr.sbin/xntpd/machines/irix5
deleted file mode 100644
index a808b9767c49..000000000000
--- a/usr.sbin/xntpd/machines/irix5
+++ /dev/null
@@ -1,9 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DHAVE_SYSV_TTYS -DSYS_IRIX5
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lmld
-RESLIB=
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/linux b/usr.sbin/xntpd/machines/linux
deleted file mode 100644
index d7a8ac4e1871..000000000000
--- a/usr.sbin/xntpd/machines/linux
+++ /dev/null
@@ -1,8 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ranlib
-DEFS= -DSYS_LINUX -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-INCL= -I../include -I/usr/include/bsd
-CLOCKDEFS=
-DAEMONLIBS=
-COMPAT=
diff --git a/usr.sbin/xntpd/machines/mips b/usr.sbin/xntpd/machines/mips
deleted file mode 100644
index a624e8f9f866..000000000000
--- a/usr.sbin/xntpd/machines/mips
+++ /dev/null
@@ -1,9 +0,0 @@
-#RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_MIPS -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lmld
-RESLIB=
-COMPAT=
-
diff --git a/usr.sbin/xntpd/machines/netbsd b/usr.sbin/xntpd/machines/netbsd
deleted file mode 100644
index 1cfd8e1080ad..000000000000
--- a/usr.sbin/xntpd/machines/netbsd
+++ /dev/null
@@ -1,8 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL=-DREFCLOCK
-DEFS= -DSYS_NETBSD -DSYS_386BSD -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lcrypt -lutil
-RESLIB=
-COPTS= -O
diff --git a/usr.sbin/xntpd/machines/next b/usr.sbin/xntpd/machines/next
deleted file mode 100644
index 9125f7d31dfb..000000000000
--- a/usr.sbin/xntpd/machines/next
+++ /dev/null
@@ -1,9 +0,0 @@
-RANLIB= ranlib -c -s
-DEFS= -DSYS_NEXT -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5 -DFAST_MD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
-COPTS= -O -pipe
-COMPAT=
-
diff --git a/usr.sbin/xntpd/machines/ptx b/usr.sbin/xntpd/machines/ptx
deleted file mode 100644
index 4759851a4724..000000000000
--- a/usr.sbin/xntpd/machines/ptx
+++ /dev/null
@@ -1,8 +0,0 @@
-RANLIB= :
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DREADKMEM -DSYS_PTX -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB= -lseq -lsocket -linet -lnsl
-COPTS= -O
diff --git a/usr.sbin/xntpd/machines/sequent b/usr.sbin/xntpd/machines/sequent
deleted file mode 100644
index 9962788cb981..000000000000
--- a/usr.sbin/xntpd/machines/sequent
+++ /dev/null
@@ -1,8 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DHAVE_READ_KMEM -DSYS_SEQUENT -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
-COPTS= -O
diff --git a/usr.sbin/xntpd/machines/sinix-m b/usr.sbin/xntpd/machines/sinix-m
deleted file mode 100644
index fb01a0135f41..000000000000
--- a/usr.sbin/xntpd/machines/sinix-m
+++ /dev/null
@@ -1,11 +0,0 @@
-RANLIB= :
-DEFS_LOCAL=-DREFCLOCK
-DEFS= -DSYS_SINIXM -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
-COPTS= -O
-ADJLIB=
-COMPAT= -lsocket -lnsl -lelf
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/sony b/usr.sbin/xntpd/machines/sony
deleted file mode 100644
index 890e9f539aa0..000000000000
--- a/usr.sbin/xntpd/machines/sony
+++ /dev/null
@@ -1,6 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_SONY -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lmld
diff --git a/usr.sbin/xntpd/machines/sunos4.bsd b/usr.sbin/xntpd/machines/sunos4.bsd
deleted file mode 100644
index f18ffda25e44..000000000000
--- a/usr.sbin/xntpd/machines/sunos4.bsd
+++ /dev/null
@@ -1,11 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_SUNOS4 -DHAVE_BSD_TTYS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lkvm
-RESLIB=
-COPTS= -O
-ADJLIB=
-COMPAT=
-
diff --git a/usr.sbin/xntpd/machines/sunos4.posix b/usr.sbin/xntpd/machines/sunos4.posix
deleted file mode 100644
index 86716e18c2ae..000000000000
--- a/usr.sbin/xntpd/machines/sunos4.posix
+++ /dev/null
@@ -1,11 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSTREAM -DSYS_SUNOS4 -DNTP_POSIX_SOURCE -DHAVE_SIGNALED_IO
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS= -lkvm
-RESLIB=
-COPTS= -O
-ADJLIB=
-COMPAT=
-
diff --git a/usr.sbin/xntpd/machines/sunos5.1 b/usr.sbin/xntpd/machines/sunos5.1
deleted file mode 100644
index 16ab8ff00872..000000000000
--- a/usr.sbin/xntpd/machines/sunos5.1
+++ /dev/null
@@ -1,11 +0,0 @@
-RANLIB= :
-DEFS_LOCAL=-DREFCLOCK
-DEFS= -DSTREAM -DSOLARIS -DSYS_SOLARIS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
-COPTS= -O
-ADJLIB=
-COMPAT= -lsocket -lnsl -lelf
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/sunos5.2 b/usr.sbin/xntpd/machines/sunos5.2
deleted file mode 100644
index 3e09c15714e0..000000000000
--- a/usr.sbin/xntpd/machines/sunos5.2
+++ /dev/null
@@ -1,11 +0,0 @@
-RANLIB= :
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSTREAM -DSOLARIS -DSYS_SOLARIS -DADJTIME_IS_ACCURATE
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
-COPTS= -O
-ADJLIB=
-COMPAT= -lsocket -lnsl -lelf
-INSTALL=$(TOP)scripts/install.sh
diff --git a/usr.sbin/xntpd/machines/svr4 b/usr.sbin/xntpd/machines/svr4
deleted file mode 100644
index 63997b6c2bda..000000000000
--- a/usr.sbin/xntpd/machines/svr4
+++ /dev/null
@@ -1,10 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS= -DSYS_SVR4 -DSTREAMS_TLI -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS=
-DAEMONLIBS= -lnet -lnsl -lsocket -lelf
-RESLIB= -lnet -lnsl -lsocket -lelf
-INSTALL=$(TOP)scripts/install.sh
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
diff --git a/usr.sbin/xntpd/machines/ultrix.bsd b/usr.sbin/xntpd/machines/ultrix.bsd
deleted file mode 100644
index a8e9f1dc340f..000000000000
--- a/usr.sbin/xntpd/machines/ultrix.bsd
+++ /dev/null
@@ -1,7 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_ULTRIX -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-COMPAT=
diff --git a/usr.sbin/xntpd/machines/ultrix.posix b/usr.sbin/xntpd/machines/ultrix.posix
deleted file mode 100644
index 7db6993e142f..000000000000
--- a/usr.sbin/xntpd/machines/ultrix.posix
+++ /dev/null
@@ -1,7 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_ULTRIX -DNTP_POSIX_SOURCE -DHAVE_SIGNALED_IO -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-COMPAT=
diff --git a/usr.sbin/xntpd/machines/univel b/usr.sbin/xntpd/machines/univel
deleted file mode 100644
index 23d683a661aa..000000000000
--- a/usr.sbin/xntpd/machines/univel
+++ /dev/null
@@ -1,10 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS= -DSYS_UNIVEL -DSTREAMS_TLI -DHAVE_TERMIOS
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS=
-DAEMONLIBS= -lnsl -lsocket -lelf
-RESLIB= -lnsl -lsocket -lelf
-INSTALL=$(TOP)scripts/install.sh
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
diff --git a/usr.sbin/xntpd/machines/unixware1 b/usr.sbin/xntpd/machines/unixware1
deleted file mode 100644
index 770737676d86..000000000000
--- a/usr.sbin/xntpd/machines/unixware1
+++ /dev/null
@@ -1,10 +0,0 @@
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS= -DSYS_UNIXWARE1 -DSTREAMS_TLI -DHAVE_TERMIOS -DCONFIG_FILE=\\"/usr/local/etc/ntp.conf\\"
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS=
-DAEMONLIBS= -lnsl -lsocket -lelf
-RESLIB= -lnsl -lsocket -lelf
-INSTALL=$(TOP)scripts/install.sh
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
diff --git a/usr.sbin/xntpd/machines/vax b/usr.sbin/xntpd/machines/vax
deleted file mode 100644
index 55e8c442cc40..000000000000
--- a/usr.sbin/xntpd/machines/vax
+++ /dev/null
@@ -1,6 +0,0 @@
-RANLIB= ranlib
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DSYS_VAX -DHAVE_BSD_TTYS
-CLOCKDEFS= -DLOCAL_CLOCK
-DAEMONLIBS=
-RESLIB=
diff --git a/usr.sbin/xntpd/ntpdate/Makefile.tmpl b/usr.sbin/xntpd/ntpdate/Makefile.tmpl
deleted file mode 100644
index 34f8f666c4a4..000000000000
--- a/usr.sbin/xntpd/ntpdate/Makefile.tmpl
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Makefile.tmpl
-#
-PROGRAM= ntpdate
-#
-# ntpdate - private mode query program for ntpdate
-#
-COMPILER= cc
-COPTS= -O
-BINDIR= /usr/local
-INSTALL= install
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-RESLIB=
-ADJLIB=
-COMPAT=
-#
-INCL= -I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-LIB= ../lib/libntp.a
-LINTLIB= ../lib/llib-llibntp.ln
-MAKE= make
-TOP=../
-#
-OBJS= ntpdate.o
-SOURCE= ntpdate.c
-
-all: $(PROGRAM)
-
-$(PROGRAM): $(OBJS) $(LIB) version.o
- $(CC) $(COPTS) -o $@ $(OBJS) version.o $(LIB) $(RESLIB) \
- $(ADJLIB) $(COMPAT)
-
-install: $(BINDIR)/$(PROGRAM)
-
-$(BINDIR)/$(PROGRAM): $(PROGRAM)
- $(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)
-
-tags:
- ctags *.c *.h
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(PROGRAM) *.o *.out tags make.log Makefile.bak lint.errs .version
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-lint: $(LINTLIB)
- lint -x -u $(DEFS) $(DEFS_LOCAL) $(INCL) $(LINTLIB) $(SOURCE) >lint.errs
-
-../lib/llib-llibntp.ln:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" lintlib
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
-#
-# we want to build the current version string here
-#
-version.o: ../VERSION
- ../scripts/mkversion $(PROGRAM)
- $(CC) $(COPTS) $(INCL) -c version.c
-
-../VERSION:
- -@rm -f .version
diff --git a/usr.sbin/xntpd/ntpq/Makefile.tmpl b/usr.sbin/xntpd/ntpq/Makefile.tmpl
deleted file mode 100644
index 76a09ad6b7e1..000000000000
--- a/usr.sbin/xntpd/ntpq/Makefile.tmpl
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Makefile.tmpl
-#
-PROGRAM= ntpq
-#
-# ntpq - control mode query program
-#
-COMPILER= cc
-COPTS= -O
-BINDIR= /usr/local
-INSTALL= install
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-RESLIB=
-COMPAT=
-#
-INCL= -I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-LIB= ../lib/libntp.a
-LINTLIB= ../lib/llib-llibntp.ln
-MAKE= make
-TOP=../
-#
-OBJS= ntpq.o ntpq_ops.o
-SOURCE= ntpq.c ntpq_ops.c
-
-all: $(PROGRAM)
-
-$(PROGRAM): $(OBJS) $(LIB) version.o
- $(CC) $(COPTS) -o $@ $(OBJS) version.o $(LIB) $(RESLIB) $(COMPAT)
-
-install: $(BINDIR)/$(PROGRAM)
-
-$(BINDIR)/$(PROGRAM): $(PROGRAM)
- $(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)
-
-tags:
- ctags *.c *.h
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(PROGRAM) *.o *.out tags make.log Makefile.bak lint.errs .version
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-lint: $(LINTLIB)
- lint -x -u $(DEFS) $(DEFS_LOCAL) $(INCL) $(LINTLIB) $(SOURCE) >lint.errs
-
-../lib/llib-llibntp.ln:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" lintlib
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
-#
-# we want to build the current version string here
-#
-version.o: ../VERSION
- ../scripts/mkversion $(PROGRAM)
- $(CC) $(COPTS) $(INCL) -c version.c
-
-../VERSION:
- -@rm -f .version
diff --git a/usr.sbin/xntpd/ntptrace/Makefile.tmpl b/usr.sbin/xntpd/ntptrace/Makefile.tmpl
deleted file mode 100644
index ca321f13931d..000000000000
--- a/usr.sbin/xntpd/ntptrace/Makefile.tmpl
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# Makefile.tmpl
-#
-PROGRAM= ntptrace
-#
-# ntptrace - private mode query program for ntptrace
-#
-COMPILER= cc
-COPTS= -O
-BINDIR= /usr/local
-INSTALL= install
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-RESLIB=
-ADJLIB=
-COMPAT=
-#
-INCL= -I../include
-CFLAGS= $(COPTS) $(DEFS) $(INCL)
-CC= $(COMPILER)
-LIB= ../lib/libntp.a
-LINTLIB= ../lib/llib-llibntp.ln
-MAKE= make
-TOP=../
-#
-OBJS= ntptrace.o
-SOURCE= ntptrace.c
-
-all: $(PROGRAM)
-
-$(PROGRAM): $(OBJS) $(LIB) version.o
- $(CC) $(COPTS) -o $@ $(OBJS) version.o $(LIB) $(RESLIB) \
- $(ADJLIB) $(COMPAT)
-
-install: $(BINDIR)/$(PROGRAM)
-
-$(BINDIR)/$(PROGRAM): $(PROGRAM)
- $(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)
-
-tags:
- ctags *.c *.h
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(PROGRAM) *.o *.out tags make.log Makefile.bak lint.errs .version
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-lint: $(LINTLIB)
- lint -x -u $(DEFS) $(DEFS_LOCAL) $(INCL) $(LINTLIB) $(SOURCE) >lint.errs
-
-../lib/llib-llibntp.ln:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" lintlib
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
-#
-# we want to build the current version string here
-#
-version.o: ../VERSION
- ../scripts/mkversion $(PROGRAM)
- $(CC) $(COPTS) $(INCL) -c version.c
-
-../VERSION:
- -@rm -f .version
diff --git a/usr.sbin/xntpd/parse/Makefile.kernel b/usr.sbin/xntpd/parse/Makefile.kernel
deleted file mode 100644
index 4cd0acede737..000000000000
--- a/usr.sbin/xntpd/parse/Makefile.kernel
+++ /dev/null
@@ -1,76 +0,0 @@
-#
-# very simple makefile (SunOS!)
-#
-# Possible defines:
-# DEBUG_PARSE: include debug code (STREAMS mechanism and parsing)
-# DEBUG_CD: include signal propagation to sun4c LED (sun4c only)
-#
-# Possible defines (parsestreams variants only):
-# KERNEL: must define
-# VDDRV: loadable driver support - recommended
-# KARCH: must define at make call for correct kernel module
-# (currently only needed for parsestreams variants)
-#
-KARCH=
-DEFS=-DSTREAM -DKERNEL -DVDDRV -D$(KARCH)
-MICROTIME=../ppsclock/sys/$(KARCH)/microtime.s
-
-all:
- @if [ -f /kernel/unix ]; then \
- $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" KARCH="`(arch -k) 2>/dev/null || uname -a | awk '{ print $5 }'`" -f Makefile.kernel parse; \
- else \
- $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" KARCH="`(arch -k) 2>/dev/null || uname -a | awk '{ print $5 }'`" -f Makefile.kernel parsestreams.o; \
- fi
-
-parse: parsesolaris.c libparse_kernel.a ../lib/libntp.a
- @echo "--- WARNING: SunOS5 support is fresh and hardly tested"
- @echo "--- This code could lead to kernel panics more"
- @echo "--- easily than other streams modules"
- $(CC) -c -I../include -D_KERNEL parsesolaris.c
- ld -r -o parse parsesolaris.o libparse_kernel.a ../lib/libntp.a
- @echo "--- Install 'parse' in /kernel/strmod for automatic loading"
-
-mparsestreams.o: mparsestreams.$(KARCH).o
- @echo "--- You may load mparsestreams.$(KARCH).o via 'modload mparsestreams.$(KARCH).o' into the kernel"
-
-mparsestreams.$(KARCH).o: parsestreams.c microtime.o ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c -DMICROTIME $(DEFS) -I../include parsestreams.c
- ld -r -o $@ parsestreams.o ../lib/libntp.a libparse_kernel.a \
- microtime.o
- rm -f parsestreams.o
-
-parsestreams.o: parsestreams.$(KARCH).o
- @echo "--- You may load parsestreams.$(KARCH).o via 'modload parsestreams.o' (put in e.g. /sys/<karch>/OBJ) into the kernel"
-
-parsestreams.$(KARCH).o: parsestreams.c ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c $(DEFS) -I../include parsestreams.c
- ld -r -o $@ parsestreams.o ../lib/libntp.a libparse_kernel.a
- rm -f parsestreams.o
-
-microtime.o: $(MICROTIME) assym.s
- cc -E -I. $(MICROTIME) | sed -e '/\.global _uniqtime/d' > $@.i
- as -o $@ $@.i
- rm -f $@.i assym.s
-
-assym.s: genassym
- ./genassym > $@
-
-genassym: ../ppsclock/sys/genassym/genassym.c
- cc -o $@ $?
-
-libparse_kernel.a:
- $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" libparse_kernel.a
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
-lint: parsestreams.c ../include/parse.h ../include/sys/parsestreams.h ../lib/llib-llibntp.ln
- lint -u -I../include $(DEFS) parsestreams.c ../lib/llib-llibntp.ln
-
-../lib/llib-llibntp.ln:
- cd ../lib && make lintlib
-
-clean:
- rm -f *.o genassym assym.s parsestreams
-
-distclean: clean
diff --git a/usr.sbin/xntpd/parse/Makefile.tmpl b/usr.sbin/xntpd/parse/Makefile.tmpl
deleted file mode 100644
index 781fed69e5d1..000000000000
--- a/usr.sbin/xntpd/parse/Makefile.tmpl
+++ /dev/null
@@ -1,111 +0,0 @@
-#
-# /src/NTP/REPOSITORY/v3/parse/Makefile.tmpl,v 3.6 1993/10/10 22:44:36 kardel Exp
-#
-LIBNAME= libparse
-KLIBNAME= libparse_kernel
-#
-# parse routine that could be used in two places
-#
-COMPILER= cc
-COPTS= -O
-AUTHDEFS=-DDES
-LIBDEFS= -DBIG_ENDIAN
-RANLIB= ranlib
-INSTALL= install
-CLOCKDEFS=
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-#
-INCL=-I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-#
-SOURCE= parse.c parse_conf.c clk_meinberg.c clk_schmid.c clk_rawdcf.c \
- clk_dcf7000.c clk_trimtaip.c clk_trimtsip.c
-
-OBJS= parse.o parse_conf.o clk_meinberg.o clk_schmid.o clk_rawdcf.o \
- clk_dcf7000.o clk_trimtaip.o clk_trimtsip.o
-
-all:
- @echo $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) | \
- awk '/-DREFCLOCK/ && /-DPARSE/ && /-DCLOCK_/ { makeit=1; }\
- END { if (makeit) \
- { print "echo ; echo --- creating parse libraries ; $(MAKE) $(MFLAGS) MFLAGS=\"$(MFLAGS)\" MAKE=\"$(MAKE)\" libs"; } \
- else \
- { print "echo ; echo --- creating parse placebo libraries ; $(MAKE) $(MFLAGS) MFLAGS=\"$(MFLAGS)\" MAKE=\"$(MAKE)\" emptyplacebolibs";} }' |\
- sh
- @echo $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) | \
- awk '/-DREFCLOCK/ && /-DPARSE/ && /-DCLOCK_/ {makeit=1; }\
- END { if (makeit) \
- { print "echo ; echo --- creating utility programs ; cd util && $(MAKE) $(MFLAGS) MFLAGS=\"$(MFLAGS)\" MAKE=\"$(MAKE)\" -k"; } \
- else \
- { print ":";} }' |\
- sh
- @if (sun) > /dev/null 2>&1; then \
- echo $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS); \
- else :; fi | \
- awk '/-DSTREAM/ && /-DREFCLOCK/ && /-DPARSE/ && /-DCLOCK_/ { makeit=1; }\
- END { if (makeit) \
- { print "echo ; echo --- creating kernel files ; $(MAKE) $(MFLAGS) MFLAGS=\"$(MFLAGS)\" MAKE=\"$(MAKE)\" -f Makefile.kernel"; } \
- else \
- { print ":";} }' |\
- sh
-
-emptyplacebolibs: empty.c
- @if [ ! -f "$(LIBNAME).a" -o ! -f "$(KLIBNAME).a" ]; then \
- $(CC) -c empty.c; \
- rm -f $(LIBNAME).a $(KLIBNAME).a; \
- ar r $(LIBNAME).a empty.o; \
- $(RANLIB) $(LIBNAME).a; \
- ar r $(KLIBNAME).a empty.o; \
- $(RANLIB) $(KLIBNAME).a; \
- rm -f empty.o; \
- else \
- : sorry guys - but i always get bitten by the broken ultrix sh; \
- fi
-
-libs: $(LIBNAME).a $(KLIBNAME).a
-
-$(LIBNAME).a: $(SOURCE)
- $(CC) -c $(CFLAGS) $(CLOCKDEFS) -UPARSESTREAM $(SOURCE)
- ar rv $@ $(OBJS)
- rm -f $(OBJS)
- $(RANLIB) $@
-
-$(KLIBNAME).a: $(SOURCE) $(LIBNAME).a
- $(CC) -c $(CFLAGS) $(CLOCKDEFS) -DPARSESTREAM $(SOURCE)
- ar rv $@ $(OBJS)
- rm -f $(OBJS)
- $(RANLIB) $@
-
-lintlib: llib-l$(LIBNAME).ln
-
-llib-l$(LIBNAME).ln: $(SOURCE)
- lint -C$(LIBNAME) $(INCL) $(CLOCKDEFS) $(AUTHDEFS) $(LIBDEFS) $(SOURCE) >lintlib.errs
-
-lint:
- lint -u $(DEFS) $(INCL) $(CLOCKDEFS) $(AUTHDEFS) $(LIBDEFS) $(SOURCE) >lint.errs
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(LIBNAME).a $(KLIBNAME).a *.o *.out *.ln make.log Makefile.bak \
- lintlib.errs lint.errs genassym assym.s parsestreams parse parsestreams.o.*
- -@cd util && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" -f Makefile.tmpl clean
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
- -@cd util && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" -f Makefile.tmpl distclean
-
-install: all
- @echo $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) | \
- awk '/-DREFCLOCK/ && /-DPARSE/ && /-DCLOCK_/ { makeit=1; }\
- END { if (makeit) \
- { print "echo --- installing utility programs ; cd util && $(MAKE) MAKE=\"$(MAKE)\" $@"; } \
- else \
- { print ":";} }' |\
- sh
- @echo "--- Kernel modules like "parse" or "parsestreams.o" must be installed manually"
- @echo "--- if applicable."
diff --git a/usr.sbin/xntpd/patches/patch.1 b/usr.sbin/xntpd/patches/patch.1
deleted file mode 100644
index a6089ffd321c..000000000000
--- a/usr.sbin/xntpd/patches/patch.1
+++ /dev/null
@@ -1,790 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa12064; 26 Jan 94 16:33 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa12284;
- 26 Jan 94 16:26 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA16418 (5.65c-6/7.3v-FAU); Wed, 26 Jan 1994 22:26:48 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA29418 (5.65c-6/7.3m-FAU); Wed, 26 Jan 1994 22:26:45 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199401262126.AA29418@faui43.informatik.uni-erlangen.de>
-Subject: Re: Solaribum
-To: Mills@udel.edu
-Date: Wed, 26 Jan 94 22:26:38 MET
-Cc: Frank.Kardel@informatik.uni-erlangen.de, Piete.Brooks@cl.cam.ac.uk,
- Paul_Vixie@corpmis.sjc.hw.sony.com
-In-Reply-To: <9401261207.aa10860@huey.udel.edu>; from "Mills@udel.edu" at Jan 26, 94 12:07 pm
-X-Mailer: ELM [version 2.3 PL11]
-
-
-> Frank,
-
-> Your command-line weenie sounds rather useful, especially in cases where
-> 1-pps signals, kernel mods, etc., are involved. Better be quick about
-> patches, though. Paul Vixie is burning rubber on changes.
-
-> Dave
-
-Ok, you overan me with 3.3c - thus the following patches will be
-relative to 3.3c around Jan 26th 11:something.
-
-The patches include additional sys and refclock variables, the
-adjtime fix from Lewis, doc fixes and a include botch fix for
-lib/numtohost.c.
-
-For examples how to add extra refclock variables see refclock_parse.c
-(as usual 8-). The variable mechanism is documented in doc/xntpd.8.
-
-Ok, here it goes...
-
-begin 644 patches-fau.Z
-M'YV09-*8,0.BQ1@05)X0>:(CA@N'#F<@5,APAHL:"E1HG+BPX<./,Q)<*4,&
-MA)(P;D#(L*$RA@X:-E[> !$C1PX:"EKHY/A$)$F3*%6RE.$2YDL<-&WBU,BT
-MJ5,5&3?&8%$#1%,%($",4!!"*T\6=D!8I)'TY@L8,5[(D!CC1L,<.F"P7!-&
-M#IDR;$ 4P0,'JU:_5-"DF0/"3!HV94",>>.&3I@T;@C#D?-&#.(VA->X>7,G
-M)9TW(.B@21RFCN@W<@B+#D,'Q!PZA_.Z*?/S,P@QB<DP+N/"[T@0=][485,R
-M#)S)9<:D89U8((@\PA4+)^X:3MW$<]ZT2?R&(/0Z<D*GV1X:-)LW;]:$1D.Y
-MSADT.7=.K:I3I]^M74=\#6NQ:DVS:*GE'UPPS*!##57191=>>O%U'V""$688
-M8M(U]EAD($Q6V669;=99>>N19AH:J*F&!FNNP<:&;+259!MN(.@V6V]9_1;<
-M<,4=)T=RR]'1G'?1+89C==>YIAUW0((G'GFVG9?>>NV]IT! Q5TD&YCO(!'
-M8W"0X0(.'D'T4 PQOI'EEG1T^:4.%A$5E0IEGLFEEV"*"5$,/I5T4DHKM233
-M@63]AU-]<6HYYY=Y L7G4$6YA6!92STE*51,@7 ##2S<D(-53,77@J68XD!?
-M?7YU <(6?KD@1$%TI)I$:'+4\1I):Y21AP(K@& JJKFJ6I =N(+@PJMVU+6<
-M964$NVNPOK9@!;/$&AL&LJ6F.@42(!!1Q!1#2)$$%%0D\803KH* Q9QO3GI5
-MI3'0 ,+[59U%:'MV@#OH_6UX-<<</!H1AX@A!%C&CN.\9D< +^8F*P_F8&:
-M8CNR!MD9*4K\6AIC2'A8&7.X"@>K(.#@5QAD% ="K0"[44<;N(5GFVB)T1'K
-MK"6A# (;@[7::Q(?MQ"6R+F2;/(<><S:!@C%RG$L8M#V;$7(P0H=L&M%^WAT
-MTDLGAC/-MP%\EQFEL=%J5BY<"X((0XQK1!)'5"%%$.&."\+:3!0!PA/@BNO$
-M%"*X*H6Y<X)P0L=9+>:&86> )S%CA6T,PF @[,B&Q';@!; 9.R;FL!QML.9"
-M5D-HMUUC<[ G&!CH %"YP#CEJZZ&KT) @TWL4#[IO/N5 ,,F-8P UGY0@CY
-M8FUT[D9)D%>6'6(^!GP\")NU%D:QATU+(63K05YY:FDPWEVY:*J9*A10,+OJ
-M'&70D32T2$M+[<ZG?ATV'5TP2WZP@0TO.DK%E4Q84$)+ VP8$X:\$,UH[5.:
-M]7B#D-&@+X%9(\P8@N*Z7#',1: )R&N4)@;3D*9D NR>&PKXN,.AIG,#3,D<
-MZI"Z@)F(-&,8 \<D\P:<C2$/GTN"&8(%,P@N$ 3="5%A*',T'HQP.S[H 0^*
-MQ88ZE,$'CY-0#<]SAY^((6&C89_\AJ.SD]DJ.'81(M9^>(?8W$9K.?M)&"13
-ME]8$L8=;%!O5C!:L,2*+,"C@4APB%Q;B&8\,*?A<8#CVP8"DD(1V1 QAT">'
-MRI5P<R@480&#!0?PP.$-Z",,8]B PP;:*F [@MX;6B,YYF!0B!KZS&+R,LK1
-MN.Q$K8$9P":8D@K>+(U>\N3)/)225)JIACZ\(W#,6, [A*%H0-Q>&N[B/( E
-MDF,Q*H-A9D.&.BXG1.Q#G_KJ$JSMI XE@VE#;WIUOUP-,I1%$DWFJL,C1+I/
-MD>M!D>$<@[T>'A&:02Q@7IX)Q!WFJH=S" -YSM >. @RB_ [X!>2]H6M=9%$
-MQ'DA] 2*3X+H<XY6"Z8B#YHL^/6K#')8:%T:FK-@090,$KVG)BVZH@S1)CS/
-M_-_S8,:^,9QG#&L0:4@=:M(:NF@T$]W.2H6X(S. M QND*%B;JJ>F(Y36/<C
-MVZIVM+SME>L%UA&-H=)$U?&5#W9.D5T,8)"#&<!KK&2Z2E9@LQT:W<TS0)W>
-M8R8GAL,($&!!)-\4'GG"Q<$U661[%5O+( .N%*8.9#B#YL)@L(?-@41W$"*5
-MC+JCI"8&-W2X@X^0*D2]+@D[CFG#Q_A'U.24 0XI-.Q@*R;:?@J1D<LQ8!K.
-M,$(V'!1RUI$#17T4'LA%K"2;!!AKK(9:U;S!L-K,'AMUNQW>#K.E,)KM9G;D
-M)0@!5EBO,L/DS@ #OR!U@82!3"5;,R'>3NRV_UL=29:3DO*"=)BBJ1!L5":<
-M10H4#CASPQDXZBF:Q$ &.#BKNPI"JK6.AS=^><)? T8]NMJ5#G@EB&<A TF_
-M8C.PGRUL5\R 6,46AK$'B^8TH0G06D46LU7D; \]N]K7W-=Y/TU,P4Z;VJZT
-M.+0?>R-0/3L'Z180O1FJRV[?"SE9U4&? (.!"T%@9"2K=L=0V&N/:4M"R.$&
-M9V6H'/(\<V 8WVVO=YD<,A\[G9+ :#%R*)B/JMF5>@*U<ZF##';ZI1S#' 1]
-M!A.A:WM8*SG,)B]D4-KV>M.58678L+,AB2;=P,DSNB9]IU-Q7/-,0A[[."^0
-M"_,Q&^;8(QDV8MEQ@UL'62[MAH&[WAVA,,5KFL:)#:3G;2#D!+:=@ 3%O>$I
-M8WSG"9DZU-<U]\WO?CWY.MB)=:PY."M1.!4[#.O1+X-=##.?Z57##O*STDX,
-M/]V<&#U&K@PD6ZJ9FOK.Q/B1M/.\T"*S#-));C@->$$I1QN7&O+"FSJ0Z^%-
-M2;A:[%7!#6G 0V'Z2H=YXYDQ)3%,O*/X9"29(;FVJ0(5A@ "%%2X-4A 0A.:
-M$$A=C@$\E:5#HT&<!D?.N.3O-?49_A=*AY($T67 0\%!$ 00'C(O1F4->#2W
-MW:'V\.3; R5W4"O)%0',Y5L.LFX;X\#!$%J7(#YR7E:;[2B" *DVQ>1/L(>2
-M,U!(#+K%:?H(PP,0^.!S00!!'*0N$(Q96,?)ZLI=LNVB+E?]XE9WV(HX,S$A
-M4OT-=YGWY%Z3(7@K-8@4)K@(#9MOH+YA>Q>-E1L KM_/>KF'C/UX&X9CRL]*
-M\97F9NK5*]>8BOEH#FYU051!\&\!7CVI@)]8M>G5K@#'H"TR(+!]G)VF.$#[
-MP%6G-MGNUY5K>_NWXL:I1J%Y[N<Y]-&0WV>Y4>])]!GVI /?>QD/QU?.^54'
-MAC5T4;..TR\,EO$2W??4NZQKU?6P.P^'=,0G7G&\9WSC@;0V4#^>9J2*7+AY
-M9G*FA7+AH7(LAT9< QGA]RKCQU1?X&)T("M/5W.&5'2% 6X1&$H&N&= !73O
-M521O0'0$9'2WE("])&1,QS%.IW\P%('\9G> UQR$@70EM(#8%H,3J'9L9V=O
-M1Q!PE!PQ6'?D<7<$EW=3Q'>5IX"%QH#21'XY=7%/=VV#UQIP8'A(TGV1Q#B-
-MQQW1EQ>21WD4LUJDA7DQM#*<MV:J=6"?)T1..'K^9WK0I(38]6UFX(0/Z!BG
-M]W17,!HI,6$FY'TI9'7(@3ZE%T WMWQ"QV!SM4!/)WY-Z(#'<3';85@.]4(+
-MQF)JB&,P9H,-.&Y?$(ES8&*4F#,2-5E'95EGE%FTD1)2, 5KD7MW(6BUD8DO
-M-H90ME>#Y6*BE7JKUWJM@76QIU_5-EE64D(VA5AE\ )<\@7S1!FVA09A\A%5
-M 1G'>!?*F";,R!@R4T,N (T680.R0XU-9(W+V(S<"(UV<A&)LB="X2<T ";+
-M)BC])8[(>(UPD(V-X8S=N(Y!T2=$<10Z$(]*46SJ(E8V8%9MD5:=DA4C\#5R
-ME@!#, 5?, 59, 544 1-D !M<1\..1L0*9%+4 19D 1$H)$BPY =608?^052
-M4 1&, 4A>04:F0.&U9#2]) 1^0564 2MJ#<)( /=E14UF9(KV01!@ 5IHRTK
-MN9,].2Y^X1<O !59814@ 4OM7R$445,=CP@Y6+'TU\Q<)#P<@-D$CPH>9,>
-MF9,4:9$8J9$WP)%HJ9(Y&9(C69(Q<)):090YV9(O&9,S.91Q"0(Y:05!( 5,
-MD 06^9-!"0* .6)%>91)601+69B':9%/F151Z1=4:97O%5/ L3!<66_\0Y"3
-M(CM B2E$D7MJE9=Q"9%0,)%%X 14D ), .%=9:..02O23<7*052\ 124)LS
-M )>YN9M,$ 374ILXD1]Z^9I$@)A00)LS@!',V9JZ^05&B90*(9G7^9Q34#Y"
-MB9E2F15P,@2BYYE:60>AZ975-)4J\ +]=9HL0!0289:L69RP*9O2>9OWB9.[
-MF01,T)N_&9PS,)RXZ9]?8 3'F9R_TYAR)IBO29B&B9BS.9U/F2LVB9_9&9FN
-MJ9.42:'! I7C297F.6Y8^9E;&8OLJ9GO29J28IHR( /S*0.XLY#]F99#D*!5
-M0 1'4 2$R00RH)&+F:$XF:,*&@1', 4:&0/$6:1?H"U6D 1#()G_]935F9LY
-MNJ';"9$Y"J526@27"0*9Z9[9@I8AY#T^"%0;Q$(9N##HLV6\55N-9AO8)S/&
-M@85^U1N$$J-FM19E66 W*I=&NJ,]^J-!.E9-BJ,)>IQ)NJ2)*JA/ZJ-?JI&%
-MA:$I*9@Y*J&5.9LQ8*",>:5.JJ5*.029^J&6&9YB.J)P0@1F&HAPER*Q8C [
-MQV1O6D)QBF0@4J>Z]3&)!X@BU!O$:!#&.([)N(P34@:*)6KH^!$1,:SU:*P;
-MDZS=R"8N\):50H_DB(W'*JW+*B8A,1)ZTH^, I Q"BGSF%3$:H]?L*U(M8_@
-MJBCM^(_O&)"Y)X]@M2Y2017,-IZ9V154":V(P:U@(18NP!+_,0-GD0-G02;_
-M6 ,N(0-DH2!AUB!]X9XL*F*0<:88LCD@()M0X&J)D:SMED*+5 ?'@1IC0YY@
-MJ:_VV:_D"3W:&JWMB@8#:Q$S(2@+*R!)$1<TT!!S41<3NQ<5J[)DVI$:NX8>
-M"[(@(+*Z1;*N8;*7) <I:Q53(A $(:S86JS8"&>",2/=^A&;DK7JRK5R-JT.
-M ;'AB*[/NK6,U;6\\;4.D0/\N"CN"(\W.Y"$(K;+2+9>.[?Q6A1V:Z[WVBGL
-MLA;P\CO[&J99@01!L)-?4 5.0*%$\ 78,I4% 0)-<$PP0F9# B.YY48$X;%?
-M 5/, 5)@ 43^01N,Z4@\ -AF@5!4F8@H :R0H6M]H,CMFA"I"TO>4NS44*K
-MT[9R-@<OP .8!$7'ZE:O(B,GT!H]AHHP@TXMATF@.S #<8JQE ?](D':486(
-M\4HH(C '9#5'TP:SA08I>R*58SK9P22PI!A!H1L90ADOH[U]1UJMU)7QU!JT
-M%#U M& !509',[X"K+Q+"VD"\TV1$3.@D5G+1 84TKY7V$.&@SB*$XBY)5!K
-MQ%O_P[_=NS&_1QYBL$8_P3C$@U\@]0)\:V[:45<C1 <]QAB$<46TVG>B 3E9
-M"[)/-P6T42&5@P>F\Q@"1UHKE!(5/%L7+$+KEAB0)1VBA1@"YWJ*57!AVJ*6
-M"Y:&VZE(89^:"0*,Z[B0*[F4:[F7F[EYL+DDTKF)\;FN);JD:[JH.P6J*P6L
-MZ[I"F2N\FP21&S=[,S? "0)K>9%- (F8 )5^9M3.@5R+ 7!DA46*04369&"
-M3,93^2E,Y$2N1<!74VZ-#,A4 ,E0@,C;LLAD;,D%A,E!I"$R- ?9 5.<G"M^
-M ;MU(!U#0KN$-UZ2%9>ZVT.\NU?YU1PIL<+$:[QS@+P;8\#,Z[S4&#.N1!K3
-M2WA!9(HA%QK:RWP?_+W[.S6:7+[GF[[34P;L>R393$ME,K^CU,#V6WGX&[TF
-M(D\HX;^, U!A(, 85<!^\2I3/#4*_$ O4T8E$\'B_*I'G#A-JV<9W#FSDAH!
-MX\&B!<(&)L(D#%Q&W+W?J\+"^[O$X\*L$<,80L.R8L,1XJS,E+R&Q<,L[ 8_
-M',0!YV5%7"$67- R_&A,S!E.C,)1W!I3C'I5#)]7/+BQPRXU(*,Q4 ,SD3N?
-M,M3V$I; Z@C@%14<A].[1Q1^05", 5$8!4\':@)\,5%0-56_061.Z7!,@("
-MP94$\<B1S)9-,-:7BM:!C)%G$\98\ )!<+I]@Z%1O4,,F=>I"@*M: ,P$-A8
-M'::9Z=.4(A4VD-1DF;CT<@,(B0-_NGM:W9)48+I'0 59 62:0=OL$R/F@"B
-MNY9#$ 1,P 1?T*.<:IN?'=H5.=JE_05!0 1*H)$T\)886M9?X\F0_-9K;:F!
-MZ=:2#-<B(-<O, 7J6;JSXP)X<-=:D==0?3P"0=B'/;ABA0-"C0-(8=1)(:-
-M&=GZ<J"_Z\:E>[JIN[I@"MZ)P=6P3054 )M4 5'( 7@&:A>W+A=#3?M'=9@
-M>MMF8-:ZG=:"S-:__<D +MS$;;J1BP4MT 1]L]?0[4_-_>#2?;'&[0;(70,/
-M 43A4>$7[@*Y]S!34$/&0A@RD.$@+N)*0^(>[J)/(58Y$&! *1':3113012;
-M8I]$^KOJC=_N#=_R_:CU[;@\KM] OJ.O>04 2@2C+063JRV'R919,-:X+4W_
-MS=L"/F)5'MR#/-P)7MPH#CDEOMQC[=P._M2H6M@^#:,U+@-%W2E[.@,W,)\P
-MH7O?3=_B#<?E3<?G3=\[SMX]'M_SW=02SM_^#=QJ?>4/:NB3S.6G^P*A@](Q
-M5[H-'N%/C=<2?N:J"@))X"U8D-R=3EJ;?KH@@.%XP.)A52EK40-RKF0S7@.H
-M:0.YA^.7VN?M/05%\-Z #N3J7=632^3HW;'O/;KC'<=S+-:$GMN*CI&(_KO)
-MON7$'>I8P-R";N:4'MV8;NKX"B<0&^<RX#N,O1,KD6QLOL5,/>OV[=6]_J6?
-M3=F6C=F:G0"<[=GH#=K!+MJDS002:9%$(.7]C>P$;N6^C>7-'M==7@5BHS1B
-M7N;1;>G4+J(7&P15@ 783K@;P>;<?0-M'CM[F@-Q/@,P,"J2G>/I?>Z\_@7L
-M79% S@1/< 1@_=X@H/(LK_*NS:2_KMZ6[02D7023*R[\7NC_KN7+GA@#S^AS
-M#?'1/N:77NUZS9CB.?$_7?$XT*<X4*,:OQ,S<'LL8)M*)NN!N>M?[>M\?NY.
-M\+CDPI#JF=MW3MYR;-X][^^[#?0!G^@_K]8$W^A.$'-T,.G3OO!*/^%DB@10
-M$/%./]UB@199+Q??_BD%*J._L_5,C1?65_/GWI*QO01-H.P*#^%DW>]4WNQ!
-MG^5T3_0O /@1+^UDWO?7;MBR<_53<?4LH=V_H^K369_EWO7G?IA"L 16L-:_
-MGO;$SO:2[[@E3^3'WOES'^!QS^S';^!=SNM)8/I)+_)!WM4E?_)3\-P-K_J5
-M8IL=;YN)+Q8V@"EP'NN 2I4%Q!@4TW[:[!C' [1!Q1V_2P;'! )=8<7TO8PD
-MHP:K]05?D/^#5>K!C_I]/757_,[:\NMM]&WH$3<FT&O$',.S=JB/Z:6JP;?Z
-M9D" ^1UD ?;=@ N( V8"U\-RZHWR$0'+A_GL7+![8VJOV.TYZ>?UTIVQTPI3
-MS@"^O4.7_(3> :Q[<TT%\#J]Y]P>X-)S>&1*6Z2-*6 $F)3VVPB_(]E,IPSH
-MYJQ>#I!1[L+QA;Q+Y?ORG%B;=ZR-6]R[?$<%]MV\:X%@C0#"0,XG PL< I1^
-M"K#+"<'2502A'[7;>S^PZ1U!.#&=+F#X^W[N E/0@$Y%YW3=Y"L"E>_R#3(@
-M)Y&& .."9'G,">@\"<@"2=X ?(&;S^?-0.27 &^@Z$L"%M &\,!!%P&!X,MJ
-M FD #G2,.0C^[ 6<4TA5[U/L055' ]9"'V1(SB$ED0$4L):PT[>8 BD R#F!
-M)T "!V$ 1'=A$!+&0-!'"=&@)21NH% 4ND$(" <G'"F$<V8%SE$]J$ H6B$K
-M1%SV:;#!0H(@"VEA18)-4: *Q"8JD M_X? 3@Y'0[9G!SY<&&QT/6SMOB CD
-M 8 C<&; )JQTG;#ID2EP(?%(H;N(<WM0-35!50CK;,<-D()U#L+TB]RFGJ8,
-M-7$-)$)J,9D'%!'IP Z -M6,(48&Z?(3SD/EJ0,-!?U=Q,S7]HS?)%1V-9 8
-M,C]W6 ;@8>GAA\MPZ35#5$4!*\4>!(BN4+O5-E:( Y;:% Q,NW BL0U%.+D,
-M86&*5$. "3!"<^>X1& O](/"[Q'NMS$H"==A2FR'<RW$N8$\< _YWDR4@&/J
-M91&F?ICF;.)*L!U7#P]V0-N1 T!>G9-^0?'FZ;PO8!0181%(BDO1]C5%0#@"
-M!6%>!(&.T 5.Q71H$JUB)3R)SJ[+C<68B/T@H(AB3/Z0!K#"1[&:I)_,6P*C
-M2Y0I,D)8D:R R4L"E^\)& $B$ 2BW*\S75J@JU$VMT$4OX >HVI5P @8 9Y4
-MDYQ;5ZA) L'M <*,1)NBDF[;C8_CB<$;PM";FH"XV"LM*C\,0_56'(^C@])Q
-MYZXYEJ[&*!-/7W_9'<G&8;&$#_B@+F-F? *)[/J=QL[X&4/C:"R-A# )I$:6
-M=.M8XUQ\C4(@-LY&1J8<R:!*7&N@2ODA1AQ8W(J&%9 "-* K5L>D5Q,W DS0
-M@S9@&E[';D<59L"-JWU8+@NZ-GPWD;I@D;-UWS$AN+MM4>2(P)%+<DNNR16!
-M)\>3HEP!O(_L\!BJP2=@E/28I$-Z^+ 9PC+^IAN# &], +[QD0''\8!?AB-"
-MX$G&$;FUJ!/)'(&D<TR)15(*!,GKYP.I8Y@BC&8@ ; [MK$AJU:5P%IJ*UO=
-MHTZ$4\P6L_H2(DUK;<E'-&ZFE440&=<J2XK)+\ EUX"7%!,XP&_Y(\ 5D)""
-M/,I;:E)=M4EW]1/8T9PD5W9R()'"&Z#J>F+BR@H)0.4Y@2-P6!)+EBD@,F D
-M@H $ !*_27C@/R$' LD*24DIF=&)" ]3B-TTAHO8%3JEI=Q*%V0+Q( N("G[
-M@*3,"6 QTTD!:7**E$H;2@(OX G *C:U<SX'ZZE5MD%#V(%E0AI2 F3@+6!#
-MJ:"8572Q?@ZMK"RV4O0$&@(D4V*,ILN5JP/P# <$0R@()0LPE/8I48X+1LEA
-M'"43B91^P51^2L4 <OR/IIP#G+)2KLM027HLHF%1EW4!5;XI4CDIUY3!4 PB
-M1Z=8A35@!TC*:]@!.!).&"(+Y)GLGZOT>R]K5E(6K!-Z3!2NU)7^LDWYRBH
-M+$&#L"26SL-6@91D>5G21XIQ \VR SU+BIE\U,.TW![54HA<S&Q)!K8EL+):
-MQ4AOI0DO ;<*5IBT1SS3(V"$-%F-Q&303$<V0$Z.JWDUG<P5GBR:0)-/ABNZ
-M):_ 1-.T5V4Q7S'!V-$5?..AH%G\(<,=K+-P \X"2T +<<$M%(C9)0;4 ,6Z
-M6%_S<D$!^C5*JMD:"A_5Q3UEM97E$_5%U\QT<?-3S,USIA"A"<?"FVY%&T+&
-MK*GM:MSK&X@M@2JX1>\B<T"*&X!WG8T,) !5-D/PT39B PD "J %) QO\T8
-ML ,=A""H --Q+%- "I"4>,]R8LYED@!V1-2B U] 5-*!T#DZCR7[DAELRJ6\
-M%Q7@.E]EKO":V,@<V9:#,"0G8*Z@2E, >,HJ#?0P[%1DF!R!R#$(DV7)68ZE
-MY20AFJR1P8EM ]U6V>7!>P,'$#V5P98K2J?!8 ,"<P\$BTY)9B1BMKF(N8)^
-M5L3"T'/PYZ0\E2K 1\@<__DPCR=4>)YPP@ALE_;11#B&^(1/-1 B!8&Q)P(3
-M S V@AZ$G0L7<%O,5%LJ 8M%(QII3(NVC3!05*&A0*Q+;GM"A-*!YP%QJT
-M"#P!*^!"<4!WF9&3K2>@@-%&0?EB+HR@5T"'\M OT$&3P$7ZH9--)NW0"<H>
-M8QL?&*)%](B&J%P1._U,X5B7<")@E R!*3I)I_3D7P$S:7 *T]$0.6))\(AG
-M@'4VAN(9+*IH2D :F=-R80[:H%.>3Q=UGV$T7Q+/U]E&*Z<5A:/+Q')I$RXZ
-M.O$H_!2C&L%T % RNA%I2T=$?VJ4#K!1*NI'WVB\*PE3:9 J%#':11?I5G*(
-MCU2_1-))&BMAUCTZEE3%!3#/K.9&9Z?F7$:HE&/P3A1P2=FH4 I6!T%LY1;T
-M\28_ DO0I76!EWJCAS"<B&:ZVJ5O*QHYA*3YKOSDTK2:!@MO[01@FAK>EM*L
-M6VPBFMZ$ @DGID+&XU=0P5_!B1<P!^1 EO!8+Z EH<"$( 6RP NP PB+F@K3
-MFO40ZI52R%FNL"T$) /Q\4X&T&(00HM%&1:JA$R[$3W]+Y "G[(%M[ 6XD*"
-M^*=Y(:!:+#(5.N! 'E :[Z$UH( QD *2PM2#%S;A7?R'J? ?A)I-0$@#B4P9
-M@:6C'I8 1)T;2H,D*(W4T0*" !3C'^^E]<!, 3+/6D,1D .30[\@E1;@!)R(
-MGVD99V!E>4! Y;*H$CDUIR\ G:K3\<9.W2D\?0'R]&T=5+9P3P-$M]M9O",@
-MD0F)!5 =A,42ITIGGH9-/HBSO.J X%EBU9\NB(AJ5HG6RZJH%[6;51R.ZE&3
-MS7\0J3:!I-H$DUI60.HV5:DL%02XU+D*4^'-M*2I-C7FX-3PH%.[$D^%-#\U
-MJ"8KHFI4W0!2Y:8T0=4MF\HX#/F?"FU%70T)\#\@9UH+$X94K5_@/@B$!! "
-M4$ WS"^2% 3P 3Z L:@)"N!_1\ )5($<]05<YT U/1A#,:Q+9,H>,L8RV0)=
-MH >(@((*-@D60FVK:2&?,E1^^E 9J]":&Q!/!$C*KRA;U>396$:%$_6@@;Y!
-M+T2K=Y.M]K&UHE;*M5I_G7Q]K?5U#-)6VQJ79B%N[:B[M;>2A-]ZVH0K<36N
-M_@JY'H13R5S-:8\A ]!5NE+7K9I0W2I8[5G+AJS2U8]A!,+K>+6.L-"\B@#T
-M:C>[4=]XAC9 ]AW$[S<#4FS6<VRO\&4A@9R!&O( ^)FH+VO" @L$ZM>RS&#0
-M,Q:!#U;8[%H5+FQ<E:MA1GR" "1725"P6 ,R@%[+AX$>K%FY;#D:-8U]PQ9
-MM2 1:,)V=:A90<->+$%A.J%L]4@M%@N7_DQDBH_,0"]U"-,H3[+9"F8F+T+:
-M@IISEC&XV9Y9 ZYIU603=VN;/LUC&DS+0)N5FO#J3S+-0!LIJ!N[R!2'<@*B
-MU:=Z3M];.BT"ZQ0X6=5X*F<+[:&MKF-ARVK7?9HVD6Q9'5I4"ZWFV<-A4,-F
-MH.BJ3=;+DEH8,!,T[-O$L20J!.75C+I7.^K!,JPX ;&BA);Z4E>J8YVI:*"F
-MWM30Q'H SDYU#)@5J':=H5I4+>=GI1>0MF6%TY=%::.JI9VJIJNJOE-.BV<]
-M+9T%M1=!U+[5L.H*;:U$55FJUMSJV59+L 8$D]59-0&NMMN7^FZI%D75M1@5
-M??7:LH!2#^O+6JG#5K$6VYCZ6)-M9,4#D[794LO+ZE.EK5!U YS5VH*4I$H*
-MA]I\0H7C"4J"@/O:U=*&$S "]#6VVM?1Y5I+KMI(N?!UO][6UJE;>6LW!*X&
-MEO\AV$R*AY+KJ20#8\ ,--<'&V&GJ[QEM>CVU=[;4=M0::VIW;#@M0J(5R=Y
-M[=KKQXVQ(I?DTL67"UM9*\N=KR87Y7;=;2AS^RL*^*\U5\#.0IP[7'5N+DRP
-M$,CGKDN@*W0=['.-KD:WFGY:>FIO:0 ^7;<85B*X6[X0=:<N2;QV:E9L'1"L
-M4F@W"+C!#&_69RK>HL%XJZGC%2CJE5K=GCN;KA8O,KV\D+=G,M,^*:ZP*0U0
-MNH-BFN9)S]MX9<;C5:]^EDZ>7L'%.&D"I%U-376<EM-*"P4N;:9MI^,6JZY>
-MROMY72_FI;=!5LE@5RXK:QLJ0AV\J';;$M36&S%"[T%5OK"6^>I3YYM[H*]
-M_;<6->!J5+Y:$S[J7S6L@O4)&M:"&VP/;F)=K!/+V,I4C.%PEVTLDKC/MJ?J
-M!8N[6:OM4=VX2C7&YEXQM7N];>\%MT94TP;?R4N\BF_U5:\'E4PLWZ^:;\.J
-MQWNZMQ;>YECJ^WJ1[YA0MT;V GM?7%N> *Y>W:B^]L7YU9"*?@TK866_%POA
-MN@%BRUCE;\-5MI*5V596[@%M*ZYFI;:=];-V7)0::15GS*VM,W>-IMV;6V#;
-M;G%]NSQ78BS8Y5IH,=[0O;L2E@,?7W0[5D3M0B6USY??\@7#FP^UPMFC<J?5
-MUH4D*: (F0!8(L+9T/X=8?XZ8OPKS0VP3#BX.N&=FQ7B[A3.E\C4"MM="(MW
-M'7 'YL(2./M28 +1LT2P&(8#9)B\FCW_EH:+P!INPU;R:AV$/O-G7D#FJA7)
-MBPX\,67J @2OY<0+GC@,@.)C)HKQ"[4"1Y6"$Z/B3WR3$(,+:,5L@!1_*])+
-M-67OIKB3.T$6LX%4O(IM,2Z.O0")=M!>1YNOONF#R \$&*I*54Q+517P517&
-MQ+@6\P9<S'>]L*R%<P="\#[B!_$IM@)#2JLR1CC,%V8F3V07C+@@P"NS>,S)
-ML<H>!.A@D5 0/&D'J 8QL#*VHY,K29%8][K>ZLQ\+W&IW@8T^)0_,3HJ3;U
-MNQ:V C?B[AJTZJHY]@K(-'*HXP>U&CR8&J-56\<S!(<,08\=*$/R"VFC">3C
-MNB$%^'$,R<3%"&>( 7):-0Z,*B7%75@FTV1)Q!O&@$>P5AM!)X\OF^R3T]%8
-M0<:[(RY@7T&[$X1R36XK8P IPP"EO(SOE6FR@/,)QE;&TY< ^L!3^A0)0*'8
-M(?BC35P _*P#:0 $\&.RG#Z^0!JXB&!9+#L@MEQPSC)!6,L#89": ;@L 1.
-M<T !_N_ H 3X/_L@.DP 6^@,'?4L@,#.JK\1)1AN6B<AS. F#>%^!)4L!T
-MH V4T+S*F1@B [9,%/L?'0 "2D ;$ %\%#(W$A+"CV$ O^S*5X<-1+Y)63N9
-MB%JF":]R&^8V;1$?X]L4 &R![5X>D,E<F5?>9?9-FCG_/:"G7 900 F8 RF
-M--/EV_R<GS,7< ,B@ 7<RP1@N=J &4 MB7ETYC\> -^0 MP"8TYB(%FTY$#
-M4@#KG .SX0S\ !'0 D2 #A !V7D[6ZZ5\9T_0QA 739+9N. &T&V#,;+97#
-M^0U09LN,F35S"2@)#[HT0V@R<)VS<\6AN87Y%A=,/*.=2V4"0 $8&C2K#PW]
-M!1C&&# =(%H))V81;0=(-(>^T&MT.Z]H_=>BU4>)QC.I6>GU-=Y<!7PS<&9U
-M>[-4_F4 G:%M-)ZA?ZTY[<[H$6VC3322!@&-F9 9,A30.?# %]@,V>B)I8_$
-M $4:LV/>SG. "E@!#3D%!O.2-LR$;$E#Y]><*&$;$2 "@UDN>R*Z?)C5-!_U
-MT EZ01OG*U"8(M>BU,QST\?^FL\<FD=':P@(9, -=.83QCS* &H>K[F1RO'H
-M(["=__)=Z" 4 XK0 "A,FR+S'"#.EGE2=VC:S)VGD@@(U,/RUP3F[8 ".BHU
-MHFA;VG10E64B=:CS'*C0H[I36R[UX9_-M&+.T<W00_]EG5"EK_0;R-(HK'GT
-M@-;<4?-T<69Y?)H-Z[$CD*MIDPBH%$X -+0!U) 83@"JMCSY;V DZD4-JWW$
-M"7C4Z=(K(\H=D8'< I8S6P@1WOE-P?C,![6Y<KJNB__Y57=G DSBZ[3BAD$
-M,.8O#9F=-8-&SF=C"'#F0]W NDS^JUV&FC2;9G2MFFUS:W[-?2 V/Q#YB:>+
-M!C.:RWDY?9CE$IV6\7+\P9UO&4Q[[+$<LNMRB;[+_>1DKRM.69M9,VY^DI&:
-M($SJOQ;8NDO'_M0*^ED?Y\Q\-I3S4&;5SSDZQ^SDPH^K\ZW&SM4Z 7AG\/R?
-M 3-H)L_F&3V[9RVJ!@ST>X[/\[D^W^?\[*$IY=3NU0$Z#0SHEKVN#/2=ILT&
-MVS@WZ+,1H>OVA,;5,#JW%ND-G1RB=HK6VRR:1)MH%$USS[2+[MMYFU/3)L/=
-MI''TAWUP.[H(]&:>+=CDL+ F"$0Z<!OIY/"DE4R 9=P%TTF' &8- C@VJ0[3
-M8_H)5#9?_:_3M/];T]NY3:_0.+VR0?;)!M@B&G:7[;]<K+$TH][29@=*?^FR
-M[:E!]9[NT],Z:I?JK'"J=T2JEA7@&C1#[#>$J!4U0TO6CAI8Y^QL(;E[=.SV
-MRYC[4KN'X+VIOW?Q#MJANGM3:_-MN9JWH(;>_+I5&Z-R#<Z^S8.MU4W[:9-M
-M4DV;=K4=Z-6(^5<_[J=&O(=U"^C=Q_IW*VMF;;[C-K1&WG^:?9MJ;*VMN;7@
-M^-:$6EQ;[YK6J,_UV^[47ME#Y^NNG"[9-7APU_!:7L-D8:5'[%$<N,GI""B9
-MTCC@PF]RF^@NE:*%ZQ$8_B6!DE0^$+]8FGX*'=Y[5.D/KP%!?)N2PFZ'\>93
-M#;!NWX^)<[LG3OLD6^U$5FGD4F+1,0 '..6.. -97+GJ43?0Q4LX%D]H8CP\
-MJ N[M3\IU\N/6MGE/R$BYTN_7 :?W];(#MIJMC$*NMXS_W#KJR!YO&C]*/J
-MAA/HXT)IB<.Z/G606)V-2@!W0#!0B(WZ,<H.&W\>A>Q"LS+K($-0P!J' QTU
-MDW_R)WT"N( <. %2VBIP<5)^G4^ <87,7'P%K !.2<9O\R4K Z\YDCL.2BZP
-M%4._P.2&;)2/;L'! ESY=E8!9%R6W^9/+LLYI2Z?Y+4<BMSR5#X8^ 5C:<XJ
-M((_ @?/L.LLA;2;C.H%3(O./P8]+.0PX 7 9W,&Z5X<- 14DE^2)@9=;\E]>
-M$C(YB-[DU]R3<_%0'LQ7^3 OY:<\E0OS<M[*7SEMCN6S/%W6<GY\RW,Y/-^K
-ME=R7.[54/CH'.C%WY6DWCJ^9G5NJ3??RUD%RO"1X 7Y<T9-YKN#'S'P%=-1E
-M+3A$@"M_S5DAA/?E9Q[/HSD#Q629O)IS<FRNS;FY0:=-X+P%B/.%+CBXP#F_
-MB&H6F6;CY"6,27'N4>H+^9@U]3,I.Z"Z*M;&+J"IQW"D[!)NC]/<"5:]&/,&
-M8<S5&T(B5N*UU^/9CL?9;"8E=6@!X:$%>,Q"BXZ7QXAS >8A#8@!-BN,78#
-M< $NX 7H9)G,)?QZN@0"R8%$G U"D00B@V-H*2< F:)R[/$"L/$&V=8)YV&4
-MAL\020[">2 9$V/2&1;1HH4A[QL@S8;X^!X$\S4&Z)=-!@V 7;#K==DN!@J[
-MP)#)?#TA^W5A$=BS:C?B[<(7:K)>RVM\0V^ZC"'%J 40 >/8+50W:+0;) %
-M]+*.V@*20&S/8:D=\OIC1/G6XSIH( % H*X7=]0#VP/[8-?KMOV6['5/V]<%
-M!A=(EQ^=M;OVMG)<UO71: $$(;N3]WN)V%,':*#/.T&6!:^CLZ)7AW['ZTCC
-MFIP S/[92P)I)^X/&*]/]L;0P("*,!;M7>' GW;Q'N$/0FP_[[4]3>QVW,[>
-M=?M?[^V=MIK^]NL^?!MP:5>OQ_T@"*OH/MT+@G5'\463PW=@?UPJNWM!^.[A
-M';P#=Q"?WDF\WFWO_#VQ_W="(>!9Q\TH\!H^P0N,!0]X&KR./[YO8,*_# N?
-MD$5[5I#OH^2UD^;HSMQ_4[BX?!UUC1 -<4(X_J>,MQO5_7.0>2EEYI\[@'TT
-M):$%=.L7P 5<@->I#"2D1 .<.#!87@ 90.50!+R[@#307]2ZPXJQ"<#'RW5T
-M7->_''E7[[G=S^"%W?[A9SMA%_%AX+ K^<6^$QJ[BX'LDAUX5?:$3$YE!F9/
-MGP'#-&@'*?SD0;M^P? &_L7C==+\X#/)>,?K+B"Z+X'"9 @Y=7]7[ #^4S3Y
-M^6?E>SW'^/5O(-BC@&%/QY! 1QV64Y[!%WAG#WK)N[2G]L5>RU?XQ'#A#<MH
-MU_#?GMA;>]2NZU<[QICOO*&\TW;:7N3U>J;_,YP>QQ-:%:\Z6+QP)[ZZ'CX@
-M2N0NK)1[F7?NEP\$T'B7A MMO+\G5E=>NZ=+20_D(_ZE[_0S^=,;E-MN[TN\
-MIK<M[AV^=^=W'^;I>PF_[_E=UQ^7VYCA53Z[A_ =.-H+>W5O[$=]L@<!RY[
-MAQMT/_.K_;57\-I^YZO\=._SQ;T0*?="J>7#?"Q/](O]R_?U'7[(>WKT#NHQ
-MO<?']R<^N.][80K<&7#EA?J'.,87HX7_DJC[C=?ZR,CBJ])[2?$5?GB/\AB?
-MWE=](X\^O@"2+Y6<HR"D_*5OVL,4F!\LNU[AHX"#?^:+0)IG97F S8O]%@#G
-MK;O@)_QV7K?B^8*PY_O\GQ]A>4'0IP%"?V ,/:)W^XM^A1\$I6Y3<@K=/8B!
-MC8>+B9E ^MF Z0^ZJ!\&V/"'@,,W0NM__68@]JO^CW #RGI8^NJ?XO9_@=/?
-MLXUX,RV]#:NK,UK0.A6RFXW:?&H7!?"EI @>EP _KSC=L!(#6)MK=BNQ7G&=
-MJ;P;4O\A@!F5G!&(_=Y\ '?;:?Q[-^W73T:E?_C#_N)_HL-F$H?(L7;[NH1'
-M/X)?UJ=Z6?$?\9?ZU7\$R_VG4#5?^]]8-8Z18'H!$_ TF'^Q'\VT+0E4V!:Y
-M$_+$0F;7]'<977]TF)PQ"VE_2UCWUW)]?]>?^.<=08 ]6_HG?>E>TMBW18V%
-M6]88PB+\"8"R'P&8?(%@%5@-4&KU?U3)_T>5!(#SWP!X?>& !((.Z'3Q@)G.
-MB/0 #@'G7\\F 3(-:1;.)*P(?]L!9(!4[7X. >M7:+T \5\5Z%EM7+/?YE4I
-M4(%E@!4(!A9E7U+O=_SU8@>"\@?\H6-<H.OW!7B!5V!4M@;^+6U@0Q HH77,
-M6#?U+45:T%\WI %6?QQ@]M=R;7_1G_<798!_F9P)6/UA)T6 'B,$\"1'@ HX
-M4+& !!D")FY=562@&2@'[!<V(.WGC>E_@ (&UF]E49?@4I%3T(%GX! X@7UA
-M#4O$L@#:551)$U &?H&?8,OTM)PL4@L%*!_\@3@.!EB'27\NR?AG_5%TAB!J
-MA0@F@[8."1C^F5W&("0H"5*"EN"D58"Q?P:9^]<)XH*@8 1&!#I4#8&2@00F
-M?0"@',@*?H*JE#<X@:U;.F 7A@1>++:@)T@QM"$K!"\XM4PW5IE-U"[8#C4!
-M'K0/MD+DCV1#E<Q8KT&-=6/1@G!"%W@+UH%@@9)E9?U8C$.012: 8&!5.ZAD
-M/%U*UM+E9 $A2<69-64AA#W6E05DB8+>& )8"F*$9 J9]61UA%(68R!0)75;
-M8/RG6]P!=!<66*W @3)A&$ 3!EVS'TTR!L:$<N!,6!.B@:N?[W?_]1?"GU#(
-M$]J!O!@>Z+"\!5496"%6_(&D%3>4 1:#&R R* (J@R'@,*@(XD(E(#3H';T-
-M5X#Y5PUR6]>@"]C^!5])H4XX%-)3>R#^IQ;4*P]+S^+5C8,^8$(8%+J%2R%<
-M*&K1A0&)7:@ >E=UE;\5,>F$V0(3:*]5$K)9Q:1\U(.WDR]XU "#3(TPZ $2
-M@T: ,5@(;H6VSC+(&6):BV!8. Q&@V2A6>CP6(,MX 'V B9@!YD,"!3F%$JA
-MFQ4*&H 161'8$'1?LV /F KFA#NA;$A/T89$5D5X&YJ"A:&LA!A"@*S?</!
-MT(-0"\HB4)%"04UVA+AH-]%A@[14"81P D%X,-A8WU<Y"!ORA;[ACA4Q^5A8
-MED6P*5"$.>!PB!'R6!IAF<42^A7B4Y5%'HZ$2,%?F!7<'H&A61=F0507BV&
-M!_P$GL6)<#P(&R^A%#CZO88/2.I@OG@)1"'OAQ/*@7. @KA,A(&U'YP@_$6(
-M:,"":!.J@4WAG_04RG# 6/"'(&*(&B)3.#4YA0_+4M9HY8/YBO/7U@6"5V%F
-MF!7:<\R@X=<57H9?(2-HR#B"Y-]$8@@91T3 6>A4I86JX5K("8Z($B*#^!N.
-M@@S5_O>S$(;1%SGX T*(26(Z:/\QB6+5@? D5F31%X63).J"D*%S:+%4@%B7
-M9>A;#8+DWV;H%1Z"-Z)OE2.*AI=A-,@M:!PDB9"("1I@!1D,V!J^?W%@3D$B
-M3HBA8!>V#@J'0PUQ&"7FA:I@@I@A HJNH"+&#C8$%-FIU1U"3U\B<V@//H>U
-M5UAB>VAED).F.)8 9-BA%T-C(0P'H6$X)?J)56+]YQ#.AQ$A23@H$HI%EIC%
-M'LJ%KM!*&&7!AU06F?(0EH<NP'GX"MZ'3:*6N!_.56.64N >WHIHELH"$U93
-M?:+YH32P#+98@WBV/(@YA<PP'B +LQ]09B$BB-8BM-B3.75EG4#"E(F(S&+\
-MURUBBR9BHC6N?(AGW8HH%3Y:;%W(928.6&CB,4@C?H:>X9J(6CF#C:!8^ A^
-M,J#1%& %V !VXD"&)VJ",2"?:"X^B^BB0T9PO0!CQ0MP@9$5+T'/(AD9BI,B
-MG$ %,(P4@L#($EB*D:'>](^5B5;A,%@OJHDX(IN(AWV&_.*.Z"_VB !C$^ Q
-M%HSKGUJ8#;*%W"+'V)/14XS6WT4HUEJY8::S,5Z+'>/ ""8VA[V@R-AQR05G
-M!<@%EC"-MT??=+%HAP9AQI@HGHO18D/(8^V*(^%,@![:AFW!L)ADS8H'H*WH
-M$;J$N>)X*!*VBBS!PQ@Q7F!0&EQP>KT$L2)_2*88#A7("%+3G(WMQ0)E4X ;
-M*D.7N"RB#^_?A@@'%E0^69#E$]I^6R#B2(IQB">BAU@7OH%*'>(8+J)>S!]5
-M^/S-B[/0R:@5ZHN=89LX8+V)IR%:F!KFB:RA-M@X%EI6HG45%QZ I" 2AS&2
-M*8@BXGA0O8Y>%2RX_VT*[^ ^5&B%!YC=M@3K%16UDF.X!DB&MI<%^!9QCIBA
-M9O@YIHQ<X<H(.H*&8&'I."2>C@CCGE@YLHZ!(G"(;]F&,AQ>F K:CFN5][B(
-M@8/A8]!XL4 !O^,3J#D\#,0CM&0\8HI]H$K W;B(JLK>1'8A8687VB4]7H9L
-MUX$%A=EQI](@!EW=9GD7+Q4HXH[Y7[ H.T)?D1B(!0.)6(M7>F5BQ2?W8XQE
-MA.V/':!OY3]R?\-@ .EV(1=_W!UG0)H*_%@"N3.6C]_@QQ.0B(./6 1)((58
-M.9X(4$&66.L5\]>I^%7MPM9$#<D'.Z2 <1W6.0/AJ,@=,H#DXZJX-J8$BN-]
-MZ"@ZD>CC12@KOBSMH=G8$J),:2-5PC6VBG>)$]D>FH2R(TKXLJB$'"&RN'A$
-M@5?2@<@LKEJRX>-X.!Y=;62054PQCFLD'+DAAHM]%U*X.NI==%:ZZ$SY"1]B
-M'MEQ:8XO(O/H.=Z+TV.^"#TV@Z&A]7@G8H-ZHNI81_*1\U:@:$^UA]N7#! 7
-MX(90XL52.]J1EB26&*-LDK,C2,@^5E.7DIZ%Q, TP8RV1"%P+/$CR^2$M'E4
-M"YD8#):,E^$A.:75B(JDFS@"-I)-#VJ8":Z&FZ!K.$G6?7TDA34HIH?[5B=)
-M.XZ/H*0R^40RD^*8,VE*MH\#31+#. 2/KR3\N#*A(K,D_<@BP@F0S;<4+_87
-MY>34HT%FAT9DJ9CIL)%6HA()$3*1Q)0722L66=2DV(@79(2TXD9H.)B1:"-(
-MN$72DPA529A)DI)B)%5"1OZ3?&.!F$:^D9:7I6<3D@7;8T0Y.:0X/6%5MT=F
-M$A*EM.@"T #AXD.F1QZ3'$-'&2XN?X.D,Q9,FH[#I)%H3!*.GU='Z1?^B@<E
-M[U!*ZH;QED5YUX6"#*3VQ5!IDC9E[_BRZ$@VTE[!3;Z/X4$L"4XR%;0DG$ +
-M'3=3 *ESN?@O' 8)<GJL&9=+!Y$'O!>X@3$12G0%GP)RLP0 *"R943G_7 S0
-M1;* ;0V1CJ3!"$FFCC@C26G7892S80NI _8)XF-.R5%>E$Y'7;E,@H];HJ3(
-M !*5,J/[.#Q^D]'2N-%45AP<3E2IW$R5H\1A854^>S_!IZ!5<I5E@%>9&("5
-M7X9B15;R)&8EP(!6Y@6N0\<E[L@+-LH&217E-K@5"4GK%9#.%2&&0,:4?"7J
-MP5.*DD"E+ @ERI -3]-#+YR6ZZ3^N%I2.:UE5T! KDLGY&S9>,F45^)?B3X&
-MEAL6;^D8R4&9HH,$+UR,N)<*4)@D*56 K4,$V#_'TLB5L= !M%3FY,V9;GU8
-M"5E LHINP &90IY)9-@5I4>5#E;!%& Z!%"2$JKB6\H'UF6\((!IEU( =^E=
-M@I>EAUL&<)"7M91?@%XJ6"8D>^E>G@WF87QYQZD ]*4*8%]:!?;2%6.YH#GU
-MX^VA*9P5AI)VXV'RD!W0.BDJ%H2DHM5(6^Z46J/:.$\6@/:DSR@<]@GK(179
-M3QZ+#646"2<,E 1+??@K-E^YI3[)!A2+-P&.>44ZE)H81 GVJ7:D&$M042Z9
-MVIWF55C\A'+EK^=1CEZ1X[KXL,2%(R5,V>Z%BUQF2AEIJ7]$(NI83/*)!UZ@
-MV"["CC_E#A@T2HG;(M]G6ZJ#BA@L"%0"C=:DJ0@G$)9&I2N)5-(AQ6/+M%@^
-ME1;.%$ #*#>YT%KY7Z:"-6.1>#,>B55FAW=079+WI'#HB.69J*!>^>Q)FFL5
-MI>DSIH>7)I=H-?*9AB4LB5@:CX-F8WEHX@&Y4,=E+Y0KJXEJ*7(5EPPF;$ET
-MH9!G0YI)9V*2;>81&$,.<-/E!%E#WI#;RP5)+[R: 2$1*8=M0_X-K7E<YDO)
-M90JI:W::=B6; $/NEL!F'"1L0GPV).5E0>:0IJ5HA19$6B0<)9,50#[7A;E9
-MNMU+Z>5KB5PZF+BF"" 1DF&E&@!585Z8^&6ZA*J4:AM$4F%1@6AF0!O0 O@
-M9L"51E&8#FW /6$Z& %- ,YS^4P!6@ ?]5N*F^\5HI2O43+H9A=#R7AT[29L
-M ,A]&TOD@REOUE/TIGRIQMV;]V6&.2GMF^FEG\'%Y0$ I\!)<!J<VP'"J7#.
-M#0VGC;0M1)P74<?5[=@>*X&,TRG^G/#"2@ J*ILGYG;H3EXLTZ8\R2L6E*\B
-MJ"E%\H=D8^YH9.** B5[:5U-A#]F3>DUBEDIH;%H1<*':&22J=29!H?!4L>*
-MC6(Q'!R(=BID5QU#YHH%65,F'4DXOIUJIS'&=O9P95U:%"*ZG2I"WKF-/3%]
-M9[N8.:*6+Z) UFB:F0GCV1EX1G5Z)WZQ:R(LMP?$>+,8"+_#<-C_760IV4JV
-MC_5C?D$OTP.L+)/320:-+9[9HR1Y=SZ><>?:*7E2F\ZE"^D@E9*<)SZFC[5D
-MH&=6('J*?H!GVDEW,8BD&$6Y!>*=OV<8.#39G<D(\1ET 9_I"$AY!TJ.; )7
-M-2[VGL-8\>E'(G\)8/09%1H;CY9**6FQE <C,=EX#I^!I_4I3?*:] JD>%-F
-MFB^+^;E629\WYD%9* J55 ER2!,$-FI!8(,99 C*(78P#Z4.E ' $5 $(O*/
-M ,,X: @$A4!1<6![HPX,( 24!B4!;$%"_#+>7"WY"[*5*^7UV%(^FB]E\EE^
-M+I^M8Y#5=WV:MF$KM'["F3$""!HHCJ"U(3AH@M*?JXIB>+/@GT )#+!_,H8/
-M!-&05+ 'C,%@8&$4H-M:+T$9)*!' RUU3>P.#RAB\6@H$'D!!2I.OHL;@6-C
-M5EP*CEQ;1Z:H>2L#.]8::"6&P_802P ?,0A\T;4($>I)P/$"2!P4QVEA)J@.
-M1&2.Y8R@/] $$[%,W!6N!2PR6[@>6V4PI7$F1U/)7^:$#)QY:'A0=M0$@0T4
-M9KG\H3Y ( H"K #\V%CAFO5&< (6((DJ%\\%H $:N!XJ0E[ P E3Y!JJ0]9
-M+G#"YD%XJ"\E$V<A,$0,)$A\1CDD!HIHU?$I!!HAR./0*G1+!4JF,&!D0R\+
-M%NJ^H A<*&/@A=X@S$3[P6UL)68H&GIU7!(M1!M*4+VA0A5A((<:$A&&2C P
-M@'&M02!*2Y(G\$F"Y8<R%8 HN"&(0@J&Z%2"B"JBC.C]^8@F3.;")'K#9"5F
-MA/R"B9H1FRA9D0$)EY\HF2**M@:DZ!EABGX;N(HJ"ALX$JUH&/J*4@:\2JLP
-M.'J@:>=5.1228E6!XYF0/GL+J7FH43*+>*="NA0RI'UG'DDH.*3#F$4J&V:D
-MVV=!TGV.F2N@6VDS1I)QY>KYD+X&;V'8U%,R79ID^HAIHJ >:0@*)M&4;:9,
-M*FHR@#V&EI88GG\S* R0?]J@DD'_&1H\>^8,$;J 'J$.* 2ZA,86ODL94('^
-MD),A!OI]:J#AITO))U:D$&E?V%Q.DR5HI+AA>9*I8$WJ5X*E+JA8FH'IF:X!
-MCT0AV)^.Z%!Z@QJE5V52REPLI0(#$NJ42J!-J)PQE?*>$:+24%R\ $> $\'*
-MN "/19/I&K1VH1 ,0Y@:IJA'8GHGR Z!:6-*O!2F,P1B*GHA99JD5_=W5J:#
-M*69ZF#X6G.EPB#5UF,#E:D*;/"\!QP'GS75JB<,,T0.PIGC 0??)0 [ )M6
-MQ& 2'17\\D"( "2 /52#0&8)P*$9 Q!/2PMD*EWMIG- @ 0"Y*:W*883 _2F
-MR:EL:D.J)YB$="H"/*<T6P* X2"G64%LRLHLI]CI'(#AR #;*73Z6\XG1R=\
-M1YNZIK>I>#H'S*892VW:!MRFT"F>5I[R 7/E8*"X)0 3Q&\:G&ZG"@AQ:IPB
-MI_(I>;H9-*?I:7<JG5*G">IUNJ!JI]QI=.H"@*?5Z7@JH6:G'DZ#"EHA<2Q
-MBD5NTB81ZFQ !X@!<P 9,.ET:M I9*8?> A"!(>A0C@&4@MA\"E$+\Z,MN'4
-ME C[RW:F'\@O_@LJVF@02XV!0(!%E('A 7*CGFPE%(5;09OH!T; @S+$T32O
-M@I.@'J (P@%,85DQ#J0%B= OP'?Z04<F2H@!@ ? @&Z" "?"3P$Y= Z-!%YP
-M'D!OQ%(8X*0F /K!JZ" ^B]EQ(I@PVAK_H>>T4.0'KI!>!!S]$C*P?_17P V
-M(6I[2IR6J.D#BJJBXJ<TVXM*T_00,FK%4*->+CAJ(@*H\J@=F8]:S@2IX 8)
-M0J3"!O]"B$ P=);8@WK2I(*I<X.4*DI$%E4J>G"ENA%*PD[%I3X/7NIU\:1F
-M,YL!F4H&F*F-(9H:;JRCP4N;NG? J7>!G,JJVJE' YX:&^RIZD61&L\ %9NJ
-MH,H7V! "!"?!>^)-ZLI 8Q-VD=QJ.:)*@H+4BIM0*82KR=.X^JW&2<_GNJA)
-MRHY_)[IZCWBKUR<;Z#M09:?I.+EDF14OSO=36-D$6->E$G:Q#:-+E$&;H"WS
-MSL#*\N1C1 #=()G\)!A!PJHV$*PPC\-ZL((C*9'"ZMY(* ?K6X*JB#P0R<O5
-M!"@$.@EHZ9/0/%I-V(6=D*QTR<'*_#5Q=XE E IY6;8'N.3.[0%G0]QU,60,
-MV1EMHK%:)' #A2*E[!5]@':&*.&LT]4R<:STK"'KR46P,JP.*PA0M*9+2.MD
-MMK2R #[KQ!KSK#Q1Z]2:/R&MVD32P+3^K+>.A"*U&JV3$M+*M#:M:P/+ [DL
-M ;O0%> $2*U^P<.4R*5U84G6 VL^?Z>/&S5A1JG'PZ.#.+1J^24E T AH/<$
-MO_1LJG'APQ<0@C@M*>2TX)/=!3J &: #K $Z0"X&!^@ <H ., ?H '3 ?9:;
-M,9C'4@(PQ7P&M4)D,$M%K:O3A*E(85&M:WBY1TE*=ESIBD*D#BC#+.5)E4XH
-M QA1$LRNC=Y=HK=*C8?7U5%)_:V0 1D@N,X6A*O&>8AB48@K1:&XJI=85./Z
-MN"HQ"*3DJ@-0KI8KYJJY<JZ>*^BJ ]@!.H 5(+J&*;5K8V"ZI@^H*U(Q!ZRN
-M^IA5\+KJ4?.K&A>[EA[ :\>97-FNK 'N:BOHKEC4[Q2KM :]*VKPN[)1S]"E
-MD/5 -B/J")<N_64@A1R@75 ,GQO1\3P,<W7!&<!7>70?6BU5&$P&QY(9X$7%
-M(G) M=:^R0JG1AD@L1$&6T!!( :4!+M",3+0K"N.0Q> MT6OVT&.1IO$' ($
-M"B #Z+ CW/7Z/%QLD*C]!FD(L:<$54&CXC3IP^/:4 PVA *<8PJ)"I!>N3DI
-M/;"86P0[P2II%FQ)@,%^@AOL=E9>+A,=U7>F-#0&(BQ+&L%J9BBL8K'"G@H%
-MP;0 P\*QPLH,>ZSH"G1L8H!U( PB2$J@:0 ,-BS4EI3>$Q]<!VM>?K!G+!V0
-MQM(!)*QFQ@70 8]L"XO?#1$MD1.15%P.-2P=JQ[8#'=L#-L"-*$*FM(2R*)K
-M'MH8"T@@LB'L"+O&G@V/;"1;$'P,54C"D<E*LN$!V+&B!:B'&EXP_WBRBP0>
-M KT%!&I&C:4K5&B%K"E;QH*P:*PJFV8XLI L'2#)QA(S U9I,WBR8<$!@8AX
-MLD]#'.&\(!/\Q"BKPR8 /"QY^<-R2D%L%WN;G:.^$55QQ)JSMH$2VT8<,)\!
-M:O'$MBC^$("!%@F=,RL-8)N@1<KC<;<NH0S'RB"'!3BL#F<1@,A-2GYK>(G$
-M<DI^*P#UN&:P;EQ#BT59 5NJ&\#0'J]5P!>@*#%*B4?_,R+8?;;",L$I.:P]
-MRMRJ K K%NU3$AF9%:<7_MA?M+2V@^P8+E$5ZPHYU[%4 :4-IT2*LDDE)1L0
-M=/!C.RU ZSC0<7?,I)29Y$]4"61PZN4% L-FX,=*$_,#(J+^$*M *.-@JV*1
-M*V?S9,B2L=5!(BO"_C*:657K!BP4%6T/P 6( -89?F8Z4+3< V/ 1^5/FI3'
-MEC2<77*& (L8N&L4Z HP%?@U3\!;RPAM;RV)'., =C5Z3&^"\[AAZUI/6SD8
-MF+=*7M"(9IL?*DP@.3F-A *"$.?4 (E-%0N;T7051V/6G8(=X,8:T)W.3P J
-M"2,XV $G /B1/Y6V#\0)8 6DMJ1M6-:6;5)U 8"&6F2P=BU28=O2J&= "J#7
-MF@Y2P!4@^8U.!P%+Y]IB=#\ ]V8$@ "DF9?FQM$FH*TJ-MI"9MKL0=BI:;%L
-MP!G0S#%_F=#ATHFJIKK:5(("R$MU00KP4<@!* .*1M[* >;M2V& ?+-6;*<6
-MW8JVL1M\-\*-<,9L89!UH \6!RB7SATU[@))M0<]2%9<>)L5C+>>4GE[WJ:W
-M%<=ZV]Z.3#T'?#O"0;<1 WW+\AUTIBW9*J85)N#'[H:Y47BI*]FA$ORG60$'
-M^]$Y<$.;\F9NCEB@P33'L82M^5+SD>=%I8\#;<&MJ:B%;*DFTUVWC6'L5N+Z
-MN)G4;"O7UK;M:V2@*G4!N:V[5N3. 4>N;[O7!K>ZE?DV.HU.(*[[&KS]L*E<
-M"+!!C &B!0JPY&X!,@"2>S9HLZ@9^)?<\B[,K?"6X\9TL=M\2[/=M^E2?EN'
-MG ?\[7?&1W5<IY>J$R]4H50I35#;"#6U33^;V()Q:!P Q<5Y<6><<Q%>E@$U
-M!*)+Z"JZI0>(Z\9]<6%<>*G1S7%0VNB:,.F;"53R:JE6+X9!O5$>I*[,'TS@
-M5]4VYR2B!.*>L\[<0X<"A ",;KRV;D)F1:Y#L06 N+(<KGGH;F><[:N+F,A0
-M3( ^!\IEN8C)=Q($3"G"+D='FR!T--M?]NL^ <'N)P?^/6:DVBA'T!UUMVFL
-M>YO% /^MG\OQW O]5+BTZA*UDU*O"^O6$ 0;;5;KY@RW+NJ:Z]YFNZZ'9NX^
-MN]'N/D?1A0#%K@J%[$J[&9VOL=']IY>N2$?2I71J63GGTKUM\)VS:^M N\EN
-MNMNI6;M%';9+G&J[C^VV.B=TJ]J(/N)1%HKRJN>D\9:K1M!&T/$J3]]JG]6N
-M I+\E.%)*(R\&2\W4J\ZA?P4I9DY^I"&!?(TK[:\R]-!]3#26F83E-;5=742
-M@1K0-JVE<(*XFH^XO)<+57%)S!2@@?*D7K R*6S,1(@4!SKH06"GB$(L2E9#
-MUIA7/ !+VCUT(SX W]0'_4UP4[IZ]"Y/22_'L/2>$DZO4!%0*!92[T2W1OR?
-ML()QT%1JO3E,U\O(?KUH0-A+"MD 4T%FJ]T OB&J5>J'N5( :L T7C@ALY3O
-MM"O]2VT2!"*_VBJVE-*#CM:+BM/A:T@)3&M<P#3%"! "S"RU^2)2]2NG0$K9
-M<9^4&?7D51Y"0F- 2'E1 RS =$CI497OX7M) :@XKZ#'+R0'HN\793JA3G6
-MZC1*Y6BV;^9TQ9$,=XC.\;[>4;YOP0#\"K^4+_'[QR&^OX5.$4'TOK&O\YLZ
-M3;ZMTYU;>T4]9P4^.YXD #AK4-22A$/; A6 M5I0=&M,]RI]"K!29O(I0$]?
-MU*S"L5A/GYJ%H3W!$]R3L=08?$\&1-4@P,!*5 GY%!"83V,(^@2%$, MRJ<P
-M^N9+\A-8!A+53Q[,7<"7Z4\H"_]T:L!+L!* BD4)4/;2I_ PP;^^Y<&U0-UR
-M'</\VP"GK$Q4!75!,2GEF%["1$51DLD)!2N!K"K4FS:MU5#=10S<FLA0-!0(
-M!4/!OSZP8_*;?&A#E B4:&HU0102/ -[4(;?#4R4!+=.< _E1$%14/ 2#"O%
-MOYG.%" ;S(*!+)PTW$,OM*U41?H%K,$!0',W 7_H9EQ*Y I?VJY44*PP2#"
-M-&$M@<"UVCV1.#7 .T%/Q +D @1=POH.HU'JV"2[V@Y6.MO@K5VFT;#=EJT
-MHJ-AH_U#_AK"7P!=0I(DPD_ (HPR+!..,-;J&W61DC#.NI<P?#$))KP(%Q6A
-M2&;9"4/"N$,VFK92PDR)Z3(NF,()@ @@UI*U;2UV=K:BHS)<* REK;] \"(L
-M EBQ=FNL1.%\P2>*5H+,M@8TC#8+HQT6>H >@/FQ$@M""9LM[0ARG1SPR<X0
-M4RE\0B^0%45G(%P(JR6(L)24"=?"FLPJ_ D7-5G-)#R7B"27L#FL"8>T*NHN
-M_ EG-^VP*"R1\"4P21%P!=#"(@ J;&*HP]U4*WPOZ<,>RH1BD0#$M.U.D3-T
-MPKY1+YP/_\*T23!<"P_#^5HQ'"QHOK[O^\3YXCW+V1P@,)%T#[ :EP*X9B%*
-M/;IG(L/HR1J3R'8-(D94FZ)!P]+P16' @A0()[>6#6_#K$PWS/SY#O>"@H0H
-MY22BT4MRZZ"M*PD1X"T8 >IONI23=)Z'R00UI6AG8-E@8K+.PNG28J(1TPO[
-M;*?"5IJ6W X,(+/VN6V!GLO ADNB\&MBZ\@F#+'_01"+!:K)1'R=\":8&7 "
-M$.,:E($<\!87*(J3.VR<("=(P%T\>*Q7]C =-(_.3VEQ0KRI ,3GK4YA,.4]
-M9VM?TS3YPN]"13Q#"</$\*NTQ"$(["F?&Y_\#JL.I"<*#RH\BH]"VL@H\G M
-M7"XI%N?26]R%^<*DRJ*"I-B7J;$(8("XQFF%7-RE2"I3<6U\%PQ+,H1K'!<C
-MQIB*8DRA ,1V"$/A4$#$W92,,Q%7Q@F 18R?9<8J;>T%8/0I@' 4)Y:P.59I
-M6 0](<.D!>?$RCP,1@O)4@8[$(E!GIH7*# >QOT+5(!Q>L"V=ALD9G;!'@Q!
-M#9=ED)4S[S0[M;!<PQB=2&A-* ,>C3+ R6<3(&M&BTPMK)YH!IP!=@8C\3T;
-M,?6:+VT0(;'5\& V._[3X@JK?"*4P2K3RES(!(Z '!X!)Z.K=ZPQ[BJ/;YM"
-M?8 OT%P$3!H'U.#41%9P!WH0Q#S/$R]S%^,0E+%*-ZG1SQ>'!"TE+$ 2#RP
-MI0?60 9(2A$P0GN\ E!L+4?#*<%/WUEH(%IHNG. KM%"!,E*PRD; <L'0 G0
-MR0<%#SZG#55TY@"$\$&G^)H&:%EC0#H-N7+ %I"3U U! !00K?EI1T 7<(OA
-M/2A:1KO1I@"(@7'P!7B58,@WZ^8>=QFN1"(B$\A20(=K)L-//[+,L":+Q$F#
-MFVPH(\C B9T, IL.!_* K,C8Q?I9)I4&Z &,K@B;*8_(4@!U1Q,(RA4NIQ2@
-M)@;DL%JC*"^[9S(,XR@WQ)*R&60IX\GWD0GK*8/*W0$M= "9RM,IS38H#WR%
-M<B4,#Q,!UFWBRRBCR<?2HZQ3U,J6,!%P*\L<>;)&.RZ=Q!(GEYS8%)WV6KBD
-M+'\BS+*:3"N_R8"0G S!U<EW,K5<<>C)UW*??(\ RA,#JAS:JLK%\J&\*2?*
-MVYF/;!IL$,YRI)R3V,N+S+1,!PBP'+*9,$.@!KIR'_8IA\JP;\'L(:,&P+*\
-M+-T2R@]$JRS(O,K?<J,L!_3+=4&MS-L(S 2S)I,PMZ6\\B(;4F@R$;.PG"I3
-MS*PR2'(L)\OZ<@32+(_++G-= C*OR];RHH0M]YR9(HV"D'@\93)KVS*S1WV)
-M/PPSQ\ILP'?&,;?)HW#1? 7<S": 0B$09Y82LX7[/Q7+L;#>@#''S/PRS5RR
-M-B6'7+H\,(, 3;((,3)O$'<M"E VN[55,SE;MV(Q'V:G8@%!>JLR)<P/QR1'
-M\[(L<BC-7O/=[ ]#S5*S-)$*WP%M\[U4-P\FI@H5@#%SL";G;1#\NLE4@&F3
-MG3PI<$,0H-'R<6Q:5D#I%KI85(7)RJ2<]R5ND#E_&X\ND5%ZI&P>FN:<Z+X7
-M)?' Q"]URH0!/Y8ZC<XP@NP<_"ZB)#/#G#J9RFBS;NLU:RH4BL!L*M, H_-?
-M1AA $;B!XF:YN+GHJ)!*X%4>8M0]$3*T "C Y;($Q ;#DRO<O_U_V_.6^V_2
-ME[]SXBP\C\Y;+FM .FEF9BU^5LCV88LH/]8[NVNZ&VVV5MQF'/"%NSUS+"B
-M>N ^L\D[ /V3/P^<&X@) 2_3B>#+*<\3R6,,QE3LL$J:?,:,'""P.NS HVY
-MS0$K0!J@UYH=LK-4VN:NS*FS!%UQ$ ;#G"05NU&8REPY5\R-SH*4S/!RGL\G
-MPP.-]T30@E3[_#B@T'2K_5RJX<_ZL_&*.S7$_;-ZD,G55@XTP=ES$#(#= ]M
-M0'?*/VX'+4C%SBVT#P "T]!9P5^FY4)GL1NOH3+@<N:>$CV5]+H4)F$@RK$R
-MI%P/8,R5;:S,=FM#4S(+-!C]*0313S02W8=.T!7T!9U$G!'_Z:"L14?1$_23
-M)D*7;23T27?10=&PBK\)<]*7;#2NG ; T)F4#(TZR\]3B4S7*1O/*T#N,4<G
-MSVZT'<U(=\I]]&UVKJ%SF#03;<YQTF>T[ LN,[*LP7^6.K$O667P:SIXMMO9
-MA#LL3TH9<:EKS[8+?+&("1/HN;N#52HT0RCYB>(,W\7,:3)YV1C[RVKQ.'0S
-MG[<#)R$B2:G,\_+\=#A'*(FS:DN;R4^K;>.<.D'.DO-10CE3 9:S(=?'5=.D
-M<QAG;X+.5H'H3-JJSJ5S;W$Z/[?H=!C7.JL ]"T.U3W?9K/S.>UHV,X$0?NT
-M,/?*N_/E\CZC ,-TQWR= ,\6B?!\N1#/]K3Q'+Q1TN!T5L \I[.A:J.!1B40
-M[\_T7#U_"M?SBI ]V]/VM/<\2)L. 373#$TKQ%3 ^-Q1J]#F,WTI J3/Z!HX
-M31B4H_\T[ 9.MP;NL_]D3^/0MUE(W3\#T0#T$"U SU $]!IP1#?4ZR91'473
-MSS)# ^U"RQQ^[?9LN4#2%C29,$EKT*MM C H&]6/0QX=0B-1#R\%[4>? ">T
-M/9U"FU/?L^E02#/5[#09\U+S8RD;4>V5R=.E&B0M26?07/5'=U5?TN!T)FWP
-M<M)YM2=MU/'5(Q0C'3/+/XX!"G!*NP:I=($FO#VW;S5M]DH3P]5QA[D[D%2[
-MPSG97GE+84F+I=F.U6DS(NJ$W 418N5+F[C2*W/^=#B7*B2U-$V;4-."];IT
-M30\!D3-VHDV31MSTY7S(I=6;LW,Q3EL%GS.&&3ICT>!T;FTZMP9M-2,M7(<'
-M[W0\'5C/T_AT6ET[.\[Y=.[,3P>_O'-2K=LFQP(U:KVI&-2J4%JM4"//5#4C
-M[5"GRLUS1/T\4PS1,T5A45O/V+,:=Q]OSR<U6?U1MTS/<FQ,4)?48G-3S6^B
-MU.2E2LU2Z]?L,TQM7<// '9H0#_;U. T3NV2.2!)PT[]/PO1&S 1#50;T2J=
-M6%U4B]=]*%(-5.FV9_4R;6'CT1]T'"U5T]6Q[5WM5+_1'[0>75<G 'KU'_UA
-MPRHK-"&]5'O86/5:/4-;V(WU3?TPY,_P+C?J Q!,CW$/G>4^V %T$5U 5]A$
-M-6M]8O=A3'2'G58_U9C;%+UB6]%.Q),]E;S87#08_46#T.6<&+UBE]$)'5R-
-M1M//-FH3W49CU5"U'$UB5]4F]D<'8I-.*G9LVV*#U8#UDAU(Q]AF]8S-.A78
-M,70Y6ES;V12F)OU76]DY-C@M5V/0=+2%W687M=OSG.W2I=6!]K4+6-O3@W4I
-M;5BKTHBU98EIL]*K;6--X3;3%N?;3!)U7 Y+G#/4[*TSJU)C:J=855R=0^U>
-M<>ETBBQ*(U)V@*,K3F]Q<$#*6<;!M25DZTSQEFZ_L%YP&4NMG)*&?$W_%SC
-M09LN<9CZZJEM>_@.XB]8DF+Y58F-58K%5AP[0AR 6B#:V;93\YI><>U:ICM%
-M34I_F7*<,Q2\'W1'G$>9Q(W9_*0ZA]LF0*S+*2W;XR]5P@3(JK">P!#J$AZ6
-M$HCQ7MRNJL.T&C.<&KZ2#H&BV,$_,58VU+PCY*:Y2TOUU!&V(3- .[S@6\51
-M6]D!$/?*0<A4)2O4M';]6;LHW</M1+_0%'<"D";8<C,VF_;.[7(!U,?PS_W5
-MJ=PJ5W9TV\"<*D?.H71I0LD-H,(!VRUQ:G+SW D=<;KCTB9_6<N-;G_2.G>O
-M*W-_&W' 1)?3X7.=G+3[;7=JS.YM6G'S<BP=S5T2!%@@]T7WI1V;-X!08P-
-M<>&2PXUQ0]@:M\0-5%/<4K3('4!SW#JPSBS0K7(L739W=D/0)??)S="EW+$;
-M%WURO]SGG$#W=W?9J%PFMW1KW7/WS8UA#KNO-M4-='>G/W?/3:H-W5>W)Z=W
-M2]J(H.6M>)\ 7G;2[>H>WBV1TVW(Z'3YG-1M=>_<DG>G=G73W?P8XLUUL]Y>
-M][KI:HH*\$*"-!:;<;'V.UUKX]Z5[CKMS^I1MUP95RJMM\ !2@##; $[E$0B
-MJA0!/L!ULGQW5,EM\BU;:R?:@E[;49%F.]1KLGQ;WWV<D%9ZG &C1(,=IES=
-M-*V:9R8$4BQ=E-9XR[_R 63C5UDWBNJD=%S+VAXQK6UKHW'A9<HV\&%1P?=K
-M1GRK ,8$Z?":A9?@]S81'I!T.<GRW7QKWY#)=@)]5QP)> ->?4^G:6[V/7U'
-M)M:WION7E=_CL7)0$J3?%#>S#85V4PF28N-T@;=R !RP!A0<[])MAK[(,!N5
-MR'% O$NMVC>[@7,,'NUI0!?D 5.W1ZQ0J QM0.Y4+S'1*+&')@: RI0!<8M%
-MI0 !. QC.D3@U'<1D('#=P6X&$7NTB:]+BT%[WJ^Z0/HVP8LS8=9\ W^#7/J
-M]VU:;F?<7K2P;04,;_R;1QS!H@8[%&9&]L"M3X#<*J'DN.#V"=>=3KB0G/'-
-MY)[=V0:NR>W&I^%WOE3QT@M1CT@E*K3:\%T*OH(CIKXL$_V"1P8QN&Q6--#@
-MHC7YC8-O=B3"#MZ#!TP_^,H@A+M+K.YV5H7G2^5HZXL[S;4@<4-<R#;A3#2"
-M"T"E *,/F$FH "G.'O+IAWA(,4;H(33OK"XZ9"+?[.Y>"D.F67A88%+QH7#
-M!E8#&$[(B.$=%1E><I_A:'<:/D"OFV6;NCFD)>.B].?;C+?B;'(8?LJ<%F,X
-MZ6;BNMDHMMOM4ZOA;+CJC8X7#@'3&[XQ3RF^R1P>MSH!=[C*W:G-4<W91K6$
-MP^)X.&UBPOD9^C@)1[SUX:1#K;Q]QP K " >@PCB!7DQ7O$>Y%0V%IV-4S*P
-MV9EZCJN;;FY?P[D0!QO<B7 <<!;UC_8,PMVF?#@LO@4XY'<!1$Z(&^#;+L_<
-M89(E(E78'333)OCS LWM/@X"&S\&A4<F_;,%76'[W'^92IX&= %3-ZRL-P/)
-MA_2;J[$E!HTWK!W&_=\9@Z:+D^_8&<-M]C6$Q#I%_[S&<=F9KF+@5?^G&?.^
-M7#3T3FO45_[-WK=/^:Q+F\W?I=-Y:Q6<M^]O^XW9P@L=4/R]C^_8.GE0WI-3
-MPLMW4'Y$$^68FU&.E)_>7/-9WI3'MCDYJZM#<^5BU ^- H#CD'+'?)2[ &^W
-MD2V4K]C:>&'NAV\!%O1/OIWHM8=Y5?V.B]+C!6']GU'FS_)E?BG'M@8N ZW;
-MLN:1LFO^0J_2:WE;'I7/WU0Y!UQ5P^7J]NRKQA%,5GD"@#]GY?S85LY#JW)@
-MN6LFEA_1%[GA&BL#R7];"J"6J]PX-#=.F]<%/718()D33&CXQFUD$TS0.:G6
-MF5<<X'DUOG'S+F2YNEEI%];I^:4LF[MK\?EMOEC;MZ0M/_Z+F\0 .3FKFS?B
-MJS-R[?O*Y2H 71Y9-]N.C5!S*=S>JID*SH)'XB[X9T")OT_G+0U^WF;B-[A(
-MS(FG!\?$U(U,^P! ^"A..I3B1C@2[HO[XW4!\12,\](+.3%>B!_@XO8Q[NIJ
-MX<HX_.2-"S ]4NA4XCC#10H%XV;XV8XYG9V9^9 M5NN>KOA:08<3H]#,F_K
-M/9Z/6]T#>4HK=-^F*CE+7@:XY(CX6G27 *S>LB/^H"N_$3H,3J&_%!;Z2X&A
-M8V[E]XC H?/@M^F''J+K3D0XFP:+WV:R^!)>B^\=8P N_J(7LKQX$HZBRP$J
-MNA\NC._I-)M$'J/39LCX%FZC=^'->$C-HSL1/GKG-HT+Z>&YVKV&&^E4=SR>
-MI,_C<GB37H?CXX6)?HV39P[[N57 A/OA\&T>3I"CY%3Z9VZEN^0=%Z&DH!,U
-MWP\ANH(5BMZR<8Z5V[1;N4YM<W=N_3-"EY3'S.<M6BY)?7(@M9G^YN;GI/J?
-M;JKWY^G:<1<P:1>R AK@H*, K#2;&ZN/W6,)IYAJ/T%)35F1;!+)I,2FB3&H
-MG*\V<![[UM_ ]Z0;H-LJC[GXO7\#W^-X&8<H;;0,5+R4X()*X$85<CR8#NXR
-MH"R3(^AM$5Z>%JFF]C:^K4X(!^^!&#%]^$I$P,J08[0:* *E2C 0'@[1GM$>
-M8(N<;CN<J-?H7\"-_H4WQ(\Z.?ZC"V^8.C5.I%_J)BZ2GA?'X?6XIVZ'A^HJ
-M=Y2^K$-F;?>0OHYCP4:4X5=RN^Q*NARNV2A)Q:[> -_:[/CYY59QJ #!]]$-
-M<P=8(0!KT-FHR<$WCS[MWJ9 .Z=>CPL!L0W#20YUIT@[9#9T;^,DA"'C!\#)
-MK\DN%"[L#5F $S $G.QE.'&:M</LD S73@3\*.+0T9X^Z.'X.3D(B>IG&F-(
-MLQO(-/MG0#$C.#+?C"SZ=/1O?.AJ:B6C 2)WMM&.[]+D<IR\-1?+:+L>@RS'
-M;NZRITO2.;A,A,IM22^[F'NY/"=/:QASI->O \IT.NA>0(CN'#1M5MU6T9KZ
-MR[ZDDSW?R5WT.A6Q6>J'P47(:N;U8%.VA>VT&9PKE$R<J E:P(@C2@G[D["P
-MNP?N![7ZL.N>$CL00;''$D#%OJW,T!8:NW# L3/ODO#'WHTSZC@ZR?Z,U^OE
-M.,JN9(.S,L=(?*@3W92Z>FZI3^Z5-S?N$8OLDWG[;KZ; -"XI(Z-\V\J^SI^
-MC9_CW[(\3K?;XY_ZDWZ0(^W$&^7-OJ_BAOC-5K9E;!KY]S:ZC]9].VV6LU?J
-M@LD3W+-?[7)[[1ZTU^-#NW&DR!CM8/O>OJJ+[95:E T21^93&M->KSOM@3?4
-M+K4WRU7[^1ZO@?"DVMQ^N]OM7KO>WJXMZTK[J_O"YTOVG&UFMJ/M8(USQ[:[
-M[7#[SR[":^UU>VR#MQM^*?P0G\&W\!7'$<_>_N]4=^=\F]WI-P7LFS;?W2_T
-M"O!/B^&1-"+]O.I18W, 15.[!J_S'3V5S/%H_ #5=[NZ 93@'4:/T>8YADD'
-ME- 8IAE-JHW0=, @_U6+T2IW^4Q>)O*F@QA>QY]N0FYEOC&#SP,VZ>3D1O)H
-M>(ZKG\?/H_5_7K:Y++I:X)X\_"[H@P!C7QSN@$SB+D L[HR[21Z6/>Z1>PQ"
-MOQ_.$@G:GKKC\I=SG*RYI^ZJNW'@N3>X^WH*$+I;\+$[U5VZQ\FG^Z($S ?L
-M=4%*\+D7\\<\\7;!)P"S._'FPW?J>X-F\[8C3.AH[PXV_.[\* G2N&_/JGI*
-M.\%G\%8L\X<#$+YWB0W@?4KE^+?O/>BZTP/Z55*@OQ2J,O]=K_O?^WKQG9#'
-MQ@OY0?O&X30O>K'=_))).(7DZX34Y9_":=*G\ X$;IU#ST.ZQ/7][5S$Y?J\
-M@3ZOJW']][WT?\/BG!(!GM#[<=DO0[\&./1,A6:<*4X]M@>9C'B.OV$1=P8G
-M&-Q:20&.IAX5*$H^*C#(Y;I<"S%KM$R^TA$ :80T[Y*3VA>W21YO#3&8?>B[
-M%\E@#<.^P5/DBX>8ZN\"(>.$Y&CT-J?[\N#;'(MG,HQR<K4"%0.^M\->.B0.
-MI@.U$OH<4(F7?C2X";#5Z["&>A$^*?7I)[JE%*B3#D]XEB*!2^'!\KTDOM_O
-MY/O('H[K\)!Z^AZW:_#Q^\I^RT_Q![S,#JJ7RC6["B^E%^_P794^< ;B,3D5
-M_J)W]GL*#" FTSCC.J)4TU,E.'W($EDV,SU]XO[37R5!O>HPU#LA1?U1#SDD
-M]1V[,\U49'4%T_-!$@?GG.])[,:9<7.N)Z(\/?4O13)M3DGU*%KI9-6C",13
-M5B_7,Q5<O6E?;\,)]_:3$-9/'_$84$'6BVRY_;KFH*OU$8@DWM:_]:Y?7#_7
-MNW&&.D'_U^NU*X JKE-L5+L]D.U0--5S^C0_BY/QM_@P[L;A]?OY7N^$+RV$
-M>KI4USMTNQR-/KXSXS@Z=FT-\^_H>Q2?LC?V GR1GD"CT9B;@D_8,_A?.&UO
-MW^<,)7ND+HV#\7;VFZVS1]SL.(E?XHO2!OSM+MDK\/R;<=ZLZ_6G.ND0D//C
-M=53.0-^721_^:Q"0,_#\FP.ODKOW43A\_ZIW]L2;H3Z(:_/:2*]AD4_>HGP@
-M3\ETY+[11SZNX:/&P2]'_PCODS<[CY ?WT=^Q0N9*?D#^PB>%-0$(-4%-N/<
-M'J_F#EG%-N:/+4_. _CD?GT4+I@/Y:1:4?Z9'^7#>JSLA(!HAYD38CH$]JLM
-MG!^6UU8>?F_/[E[FCOV=OV+K^0EY:%[G8^"K$F=N;K[G_UFB_QB#YB S;'[B
-M9O*:OJUKFS/5N+E_7L&K9N\Z53X&/+?J>O#$K@_GN_>^J:N'!QM5<2MB?&R>
-M2(.MRAT$9'BP/@8,YCV\G\]4&.O6>0P1Z#,5I7Y^OF,33#TVCZ_H'TPG@W=N
-MR #1)W[:S8YWYT,U(WUUI^=O-WL>V[KGL;)JGC_G\6/S/UV?D_KW>:@M3^OG
-M?[J +U-/2CA^TN!0[/A=4H]/8_=E'C&U_EA<Z]EZ!.25+7%K ;<#L0C%\K,D
-M?'5'L.BVCR*;T$6741& E( +%+>ZZ=RK]"S]N*&/,_7'O0D U2_W@092K'JG
-MVRE]<=_07_71O<>OJTWWXP9\&S./!G@ "A 04_R1>'[F<XNW[++._#[!]9'X
-M8+;>WZ:&_DZ>ELWYQ7%@_C@ ^[&YY5*6TP%_OMJFU2/[Z3YFG_FD*O6B)$S!
-M!ZM;<D1_>KV:,(&@6_"WPP=_FI'P6P$+OS'H\.LFY!"F+O$O]"+_2G_5/_2Q
-M6W*]>]O0 &I]_^S/\53]O_3J8_63?*>&\>.\R#U(H=Q/$!W_Z0WR5_4P/W1_
-M$IO\_1O*CU.H_+$RR^_R/_?EO<S/O]'\.7,E>/.G]SF_XK\&D%(\/U\>D\OY
-M=/X%OITX^K>INGGT)_W'_KB1[%?5V7FS7^_/_=WYD,WM5_AK.+:/9$OY'O2X
-MS\%[^U6UN@GNZ\WB_KE?[F?RPO_6QFDOUZ,Z'27OZ_BA?LZPEE-'4#]66/U)
-M_?\YP%\0\<@T[Y[RCM0XNP/Q:IX;_%W_ <Z/*?SMC6;#DSB/4?G9'_+/DFM_
-M2P^;N_T(=ALN]S_&=/H[+=S#YIJ)ZKWWG[U]OS;L T3U@3^?6_^F[E>N2_M)
-MODI^IS?NC.;/KV5U6_G%'!Y_A;_('^)O>8,"J/E9_D0..#_EE\Z/NL< ]+GU
-M_/QR0#\B'U!NZ(?GP_T9_6)FJ+^EG^KO/F>::_TMV)Q]0;9HG^ROVF>-F[!%
-M^[)]'S]STU]F]H?BX_W%^'Y_H[3@'[DOR:7[&[FA^XY_L+EX7UU@WM?\\_'M
-MX:!_48FH7SOLWV<=\WCT*3P>,[WX!+2-/57;@/0 X=XG(PS=@$T+):;J6AG,
-MO9(*F &-&[FKT,9@*J,X4LXHZ(]@@7QOKK7YZV0DU_PGK+5V&AK'#?@0F:BM
-M^L9MA8-2W//D=+#+\:%-^_)GLAP.WL2MDU$XV&[A4-YM)QS% %EW 9 B1IL
-M4>B :)H> ZC,=/ U0**HU8![B!1XVNYM$#B5X .&4B@&FD#@&AJM]/ UP -V
-M,GASC90^(/I#$O@*?-?= 0&!B@%XEW# ]377$@4R >!.311H/^$/,'LJ_^!
-M FE?_+T\W4:EC4=AVJ>9S%Q]ZS92RINM#D@*O+!-^18#_R9G'?%D#8"BF<6)
-M MD7SD "X*RMO+7&\6M1,MA]L[C-WS"PD88+].003%( 6X Q@)VLZ@#O6@>Z
-M ^T \$!YH-@L*T#2V>]U#O!TI).%F3EP:?<.C ?:R380R3EI@CW0%Q@/),VI
-M4L)0@D#Q%D/PU[<JV0?2Z69Q*+%!X#TP'^@01 BJX=:!43J"(#[0("@VFP3B
-M4"XI&[&V#":0$UA* P=N D4,GL"Q&C10.,<I(,XQ AMG*@#5W#JP%!@+/ 7F
-MSG:"4316H$(P6) '#*>A<6Z!@\#YVVXMW_0(S*I9W%1S:1<MET#P)HBT:PH.
-M:8*![\"8X(^K&I@5<+@%T1Q[7#4E&_LL.5=*<^/,S_@Q3C9WFU/0R\55LUR(
-M!<D8?K<_GD"GS-;' \&1MM9W?1A'("--D<=84PM"V99VL3.<&T7'\G9T\[)%
-M!0,HQI75%EZ0DM6<Z; 5V#IL%T$[W3^PC)<*++") ;"!,"?57)[-"%CN$PBF
-MU;Z"0[2$X%[&GE85Q.PAM=B!I\&,TVEP*[AR(F- !ON!DD%;7)ZN,F@6)&-<
-M!G4MMI66H)D-5T8;] M.)4"#$3;18&W0<E$:_.AXVL(L>D$23C6PL786U**0
-M >9[!!.78/VF$[@.O W^FS2#H0'IH%^+#8@2;)]4\N9[V,%4("=0FJ 5Q GJ
-M!&^"J:\WX.H+%;@P PK"ZUJ!1$$[H$JPMA5OT]\=]L*#"[/QH!E@.SANZPXR
-M!G-\KX%Q7WF0_K9N&YB, JV!!$*:(#QM';@#Q ?>!(N"<I1EWVV&..<_ PY:
-M^\9S.$#]G&/0/<@8+-5M _&!0,'&FE=&S=+Q0FG9A*H")4*9A:@A<51/D1VD
-M" ,6[0J/DLFK0[0NXJ=@CE9>%R^ !;(B1HB4L1&&I$H3CY8L8 :JZ!6S@!&N
-M"!M%906(D0S@+" 1*! <"'1 39/)0!T 8' *\B2YI008I+@[%M/"KU"RL ?!
-M>CP6GB2KU<9 ZM5SV5F!+%)@OZ#2TU6*2'B/,!&&DF)/,8&[D/J(=G0E--1H
-M#"@$6T*G19A((L*Q !/2CL2$\ 0B1IG0XW0FM'CM3/0DE:QGS[=*(M#QRK89
-MI@H.+,).A8LP1XB-<!0J"C=>NY@L$\I+#_0&:A0F"E\#QA\:X::PBY2O,O/1
-M.&H<;+XHSNT!5=@/RM5EV_H?. 72"<?/&N8]H162<59PI@,]AA'@"3"T:>+1
-MUH( 0CR^'0L/KM8$I/O9_S*"?9DK3MJOJ<<&&,P(#:9Z$S\#(,GO\*<"7/Q9
-MY3 &FSVF@E3O-O,L1$Q!!OH?)0,Y &(*7!AH*/-QGRH>R+:/2RT-<D*?0!7.
-MS;QEV$*"4X?A4<(&(!.P]38)]#XWR6J,7AC8P]F- 0!H\\)S29B.T9 OQ,P%
-M#"$E7+U"7^8 0$A>*A9V #5XMCYQ8$>K#4$\V=;L"#X1*[CF5:@-4:+O0P-@
-M#,E+?!02X<6+J><X2D=L"KA5)$/N$;5",C(I/!2F#%4\'B6YQ<FK88%Y.@KA
-M"%V&*KU/!/>H1\@F. H-DEQ:VY#HCRX)^X,O$AU]@'Y)U:,AH4G*T822NJJ@
-M#'.&Y"."A3YK%!03 ##T#-=/J:"7H0*)GC(UI"E5#:TFO*,YX<N":9%<42HE
-MEI0/+Y.4@S=)AD M01XU?TA&0D/I7YKH>>1+BAZ!D!9)U".##ID)>R1^VA,]
-M#9>%4<.Q LJ.%2!J1KBF792&ABJA-9PA20U'!Q^C^("AD.L(9F";'@0,!L:
-MCV($LH@"Q-JP# 0S>4*="[LI-(K#A9!PVY3V42%=D#Y6SH$00#<D+D*J,%T$
-MB;)<29C<R@\M#Y-S*:ZXE@B%MB8LS,L/<,@]XAK"GV!'7\.K(00)LH7I4 $L
-M:XZ'R,/DH?)P><@\;!XZ#Y^'SD,LAE^E:1(,$K%05[P\8Q#ZQ^J05\@MB$C4
-MB6"'_2.:R^S0[")"LAT:ER1D2:784M%E<6B3NAC!"0,2A\-3BW1)VQ25,!Y"
-M#^^'^,/\H?X0>0A:@5CT*1AN,PY]EIRCHK>' A/1&=H."Y9QE38)94+&L']D
-M!:!D'P/?WY0OHJ'+R@/TS\Q-OI$VA/HA0W B>"!,9YHG#\2:E@21DA&)^&-=
-M$#&(>B$3Q08Q$L%!-&U]$.E1$Y &(I@(#\'$X!\(&UX MA.4A>QAB5.P\WAX
-MQC8>IA"Q6, **,(KC$V4)+9:)0%/3@J@!C>DH(+P"G^%M E3%E9/%\(KW!4J
-M2> &%['/1U!$K^#D*(V0,1830 [SCVODB"@",/\,PWPCE,.?E.)$^B%&M)R1
-M)&IAYI\PP!D13F CB29PDRP,]*S:"^W@LB5$U(G8!*@"X:[R!R %DZ+*@9_H
-M!(M8&T2HX'5 W_8PF*Y,$;93W@0!43A!<9(5 (E$R<11\!/*P"C!A%C$TB0R
-MLBJ(E$360^6O< _&6&\*2J(X+P,8KND]#"=^128 L\H(D3, <E!;\3& "&*
-M$O%U2X5/A"B$DXB.PI2\(3P+K<3T8!\PEAAV.$34$K,:C3/RA$W!+7,D*V*1
-M)*0#S(3QU@H!5U%&9 *A9D*)IQ)EHB&18\"8ZF,A3'PCOS&,0;=!O>9 O.-H
-M$]<5!(=4(IS /\1I $0,-J!#>:N@!F5+=X#F"VJH"2T709%?(=K*<F'^@0)H
-M 8P OH,: $OB":"ZZ2)F ?:)4XE^XC\QH$C50$[H/$8DI1'M3#5PBQAE,"@B
-M%'5/3*#1Q1CQHOB3\B<"%*<3D0IN@;<@;X 5HV0$1:R(1HFF&'0(-.8[4)!4
-MMK RK@[O'S[QB5@YXR@J%#^*-0#P"!: 5_B;*"A"% ^*SJN;8D!1I\@KY-IY
-MEWZ*$D4R!D71JH%4#"IF%%\3ES"GHA' HSA4' +L%$.*W8)O 1^#HWA2!$ZD
-M%+4ST*&@AN3$&5/9(FI0!0X2&J2I1#ZQIBA5K ($ :X> T6?XG$"J$C),/^X
-M%>&*1L6'XEPQJ3A3+%@Q%?>*4D78QD:QK?A6C %@%4>*6T7G55?QBJA2K+T0
-M-=X%1(TL8&7K!F O>.*4]I2*-$5NFDU1,=2SB2MV09J*=47.8F"CH7A4!"Q.
-M%'F%7$30(AFCC3A8#"TV@4:+V@*1HE91;\!5K")Z%>$&8$7'(G:#*E!6^'X@
-M<50=@(V*$QGC"F#5R"CJ$YU7Q$4Q8D_QLPA8I&0D%S.*>46+XDUPJ2A=="T*
-M%J.*SL7B(LHEMIA5)"DZ 3B*ST64"TH1MPA: 6S8"P!?\\1/ > +4P#K$(=A
-M%K=I00".8FDHH[A<K"Z2,4PN;X/)172QJ7A:]"O:%_F)&44W(A& HXA?C&T<
-M%F>+)44RQGQ1O'A;;"S6C]8Y(2H:Q??C(&%6.$@0$$V*F<7XHO-JP>A9_"].
-M)0H_0@!O08]HOVA:?"^F%IN+J\4 8VN1C %B%#&6?[8%W<7$(B6#PSA>=##J
-MJ\(?,HKP!UEQ)Y!BR3$^<=**68$C0)0A+&$#@"]R%(6,4P B8X=1M6BY0#(J
-M&4F,$<7I(FJQHLADG$HX&1,;*\8FXY 1R\A=1"S2%IU75\8B8XTQM_A@1%0E
-M-B2+/$:R1.'+*F6YB!D) >H&'B,CH_/*S0AG'!@M&5&,;49O01/@S;@ML#-"
-M&8&*_<438Y21DD%G[#,6&;&++$8](Y\QSMAE1#!^%^>,BL8ZHYBQP4AFU%?9
-M.& <,8XH#E'@7: CT_IE!9 I R=3(DF@@CBR0<NPNM!17*B@@(L,.6 04""&
-M$OY8,X@90CPA)4 F.#@\#\J)H$8?@*CQCU5JA-GD&MDLA9-LX1=@UXA*O%!,
-M)7Z-NT12XUDF+7-J](VD&E,"JT9L6#;IU5A!C#6"T58#M,9' ]Z(?7)L++0,
-MG$J(RL:7#3\0'?-M]+0$&WT RT1PHYC!IF:Y^-!Y$O]8YB9^S*_1W%C-$#:^
-M&XN-[<;DWO_O-5#Z*9Q0,N2-WD8? +"QWHANA)\43@I7'SKD@'( R_)OG"-P
-MR'@$3K+^(8( -8$@<"F".S!;IR5""9!Q*J&."362#/ .EHNUC&G XU@R**6%
-M' ]UE(R.HQ/MP*#.:@V<',F YB:5HR^1= "A$SG2 09.])(WA$^._-?$,XX<
-MMCB$*D=[7[QQ\&?W*Q!&]PI7;"[]TEJP#-4:F*-E)\(8E8U6DW6,J'%:HF*M
-M)IQ7;S;(P,")%/5V2XI@1K@:A9\?%M6*W=37\%]TEQ8A4C_%1>Y/Z^@#X#KN
-M[)@ 7T?[QH]B.J4%+-BM!,9-7(SS7(IFZ_C-Z#K"'2D7]HVPXVN*XT1N%#@F
-M&\4,MQFVX[YPL( NV1A*0#!\,!J^8^7 [QAWW$G,':6.]:.5 )HOZ.1]>K.I
-M8RI0"#2LHU'0N?!*?'F,2YX61P,Z3H*%./BN Z"HG"@9K;Y_B2@&P]0&0#I.
-M)>!R^Q/3P&)@(&![U /JUM8E#I'>X^AQN'9C4S<-%LP/2X)7R>J1XSAR;#OV
-M'4.#@HF_(]CQN1,#>*)('^6.I(WJH]<1\+B3.%(< ;2/U\?N(Z-"!F!]K#RZ
-M)!@5,P#AH\R1J0!:L_7-&_4NY\9E8OM1,)5"&%VE')N/B\<#@[VP\$AL7#=:
-M*<Q-IHVDB!3 3(-_G!<R'JM[,<<"I+FD@+!_+,[HS'Z-^L8-@LZA]OB54>=,
-M)]A3^ )!XE_F\^B\HG;!'E-]/<&2 +YNA9!Z%+<M'WV/[P778\KI]4C&B#W&
-M$HX& 10*I+H)]Y@!TSW"'X2/2D'@HW0!!_FNR[\)'X^/7R@9I ^(C*&.>9=L
-M 6 N*9/VB3O_GAS=#Y.'J&/V\?IX^4#_&A^##N6'[F/IC$F !42"^E]W$)R
-M-;R/Y,<HI'W#^YA^%#VN'\<-[<><6L!QX-@O$#;.'QM3(@3[(Q%2 ?GYV@[L
-M'W.-_<=C@O(Q =F$S#]N!W(/ ,=JRK?Q\*B'5#M:+E2.^T(F0@-R3P:!]/O]
-M_^P4$0@A9/\PQ<+MJ+:-J"1A,<<J02 2??! L\FP67@RF#E[76N0C&':F )4
-M 80 9IJ!P&$FUPCX8;,0'=H*=J[^F6\$>.)P2"XT[OB0 $-'">/Q-G.#)#O.
-M(9N0;L<(&Q_ )Q=^O'4\=QJ/H\BDX\HI7R-Z](Y1,A0F+05B%<<B--,X@&Y4
-M'M0Q0H050 L #\"-%#BP,;Q<K+TB03'AF'"-DB'.!B(+Z 8!$1BG\J!PB"AT
-M]T +_ .@!6$ !T ]RS_L*>1YHI4$B7"1-H&)3#EJ(@N/K4A/"RCR.\,I 4!.
-M)$Z1J4C%FL8OX!B0U+N\(GD#L<B^!BUR:0-IN$52,A)YW,)+('TPZ#CW,QVX
-M"X!;?2V8#B6#7^#5\G*-S7:'=@A0A(FA!_"<L= DS< SF(&$I.F 8*3#(F.,
-M<-I?@37((PJ@$N-7!*@Q)#V1 DD:8F(P;:46Q$CR8X0&\SW$3//1WF<Z$)/Q
-MM?@ [+G:($DRE07).QN0#$4A@X7T65K+0H,<2.3E 0AK_1I6)%#2(0GXL7,U
-MU7)LZB9GI SQHB"-?!A0(^U@?0=L9 ]!&]F-]$:^L\"1/#UQ)!O F% T$#W^
-M*S)+7@;V6-^A'8E2>$=6#-H?=H%Y9#VR-Z#(>>=E9?J(CQR%&?>NG+,"X*0Y
-M'H\KNYKQ@!I2$+ER;"L &VTRWYE28UKF4Z $8*+4! XB_)*1I KMWU2$C,0I
-M4@8+@QFVPH'&W#3'VR"84]@# )I]F6NRJ*.H>=OH)$, (K2C%=EQCM>:!-.U
-M3S)YQ<GRGF]R*F'%PCCUN(23I9(^S#),A'62+,V, 4H 8C$R '92!J"B @?2
-M%L@H2#_X@Y@"!("H8C*$)ZL$)0#R)"LM.FE@$[!MV)1<0"Q#9#HN!,"31&T4
-M?B(3/LEJRF&F%?,^,:[L*6AR61D)8[A$,BG-$QQ4)MUF4B(RAE'2.9B4Y$@^
-MQ@9]]JRG9%02,YE)F4Z:)#4S3+VLY%F+E$6;; VX)]-FB3R$UPER+2B6]$R:
-M&T&3!H5E([JMW0:=; UZU"Z49P,> .0B$:+S\ %L*#\X%R<R1L:I1;E?DZ_!
-M*+N2$ :PY%/O)VFBA#^B*&>3I9HY'D;R./F>-$E^</QVTLF29'72.7.=S$YN
-M)P$)&TKOI!L /+E[) B\ -237$KQ9'H2L!&?5#K^!5]=]<E;QWUR.Y&?K)$1
-M,OB3(@?CRA+G("):<6P$S7*4EHL=)5&2>1=#'$4FA'0M58DH@P9,XX8YT [<
-M##88_"@7P=(AH)!G8!RD:"X.%HC@PFM*9,2GA%/:%I IIZLQ@ O@$TE#U*UL
-M(LL G<@B9=T' I$8, $(_@Y<E1@A@%^1#Y"JG$CX%;EZ[,F_S!XM&4EX!$7-
-M\5 YH+1DY('+@U5\80YXN40+[Y--9:$E4RFLU+N0*DT'@[S 'GN2S<6>S#@M
-M*\%XJLGE'GDI.2DKT,R<#9Z49(S\5J_21_"KA ,$*S&5["M-):>2.3"@T4T:
-M)^=SN4E9F?(+26FYV'&UG"8(TTIS97F/!;"=X@%0;%J#LDI@I<BA6(D^(%;F
-M6=03L\KX#ET@0I0&2 .D*]\E:CSDI+Q25K"U207VRJB5T!E_FL)27:F<O%Q,
-M!40^=SQ]Y:5R6!FNY%<:6E(GE 5DI<;28^FOE+< +"V6V$I'WL'2-2D"\ '<
-M*TLU>,B/8Q&B'&6I)%EV+-DL8<"+ X+RBO6?W&>Q.3*05AP\Y51"3TG^*DK.
-M\9"2<RVE9!.2*4D3B%#^)J"2+HFF6I22*GF29.J]2_YKM<$EI?LLDQ>B9#>V
-M!D][ "! I6=A U&H/!I,(1*5=:_(P"PQ)?"H5#SHC225^B9L5-RR9@FN3.2)
-M*X.2S %/)4!R+#FJ[%2:*@6 XJU6I5Z!5=ER454:RA9!>\A2C;:R]>*KI%MR
-M+.V6'LODEX\ 6>EALY^]*\UG54D1P(WR=<:GS%=Z*_>5=4ND7^12%<>IZ<X,
-M+)4#!DN(9<*R20FQ;%B& UN7#K")Y;L$6.;QV]6,+$.7=TN]"\@2)R8E^UQN
-M+*LI)4M*TLGRJ('PXE/&+,D > >:Y>WR<2FZQ%G*+ $1.\L$0/_0L<'MD-61
-MFX26YZ;G)%&2/:FRA%C2*RL.',H>95+!?.:][%U^*PLM4 B<9? K9&F^!%VB
-M+PD.H\M=8.721<E?6UDJO^B5*8"7)3,R+3FB>$8N+5@#K@0X!')E9U6.!$4%
-M:6B3O,B%Y4L-7=FZE$-&"&E]"S3GW,]OYPCV:V]D)TA_PLG_).%KW.%>;$[J
-M*+6714OVY((2:;F17$IV)$,&6;VGY822>VFAS%PR]2X.6,LL&OW2Y82Y')LY
-M+JLIZ4M/R^[2&G;#1!_D,(67:Q21I,H2DJ>Y5)_M+)N1_4L9XAD @,DZZU3J
-MK#Q.!4Q*Y1!R5W.TU$ANS)26 R>F90T*) FU- (L)\=J*S079LZ05#F?VEQ2
-M*-<*'LJM99.R:RF?S H8^B28?[DI105S^H;!)$K.*1,D69D2T]6Q<SE!&RQ,
-M*D./S\JI93+K).FT><Z\L9PS7H(K90F@!)"_')GU858&K8NS0?]L.T6:V4YM
-M 21_(\018IL25/F(7.NQU1YPUQI*YME \F=G8_]I ]IM4LR!ORD#;""$\SP
-M9-PS&,M\HSGE#?&E=$0EZV:9I8?TI".J)JE6@V0*V X,(LE=S53B0ZG;\K#Q
-M*961[;P1Y51RD*F9Z9]](6P8!X855A? )3D':F6R:DB0E2\S9//QKD4/)&.H
-M,=-F#4QM9A-R"M'-G$K8'-\EZL?FXV"AY>C-W%L*%998)(%N%YOCVP5@@%C$
-M6.*6QC,_9MPRB::K[&I1+1TT<P"GS2'S0>,"4&0R,O<W=C829"13O'(V2'.I
-MM?R2F4SQ5JZQ!<?2.:0M-%4 HLR')F3&<,54ROFA,F.94XE5IC6S.?/*3&7*
-M,F4(I8=:9F#CEHG2; WH,@M1!<E>YM'@E[D="&;>\5R.Q$PEES$S&6F\FV)6
-M**64)TEGIGH"#/%96&%E*6\&U4S8)#931-FAS$@^!Y.6#DJ'@NE@G\77^F+^
-M-/^95LF<X3)!*WFK46L5'MF0G,QE(AG+>-+4/$I:,0F02\L3IE/R-S$0%*2T
-M,*N66DWM0 R"JWG4Q$,FKR8&H<;GX!NRC_4++&LR**&:)LP'9=,RP%#5Y! N
-M,Q59,$J4I ,B;1A2N&JES]B'H2#W(5I*+@ _-!29,6$9ZB:5(S<3(MC._*>%
-M,S.;V\P-1CESW BQ3&<V(=>9A 27HSG3G?GL:2/$,T$K'@_'I,>#3,9B^2]$
-M0SH5[D5S4SGQ$-FRV4QJ$PX,Y4:R)(J2K$G),&W,;A S+9M5Y!J2$,F#\UKJ
-M)'F2:TIMP29SL!#<[%LR!WXZK[8W6Q/ -3(%Z%%$ 0 T X&1C=(/_C"R4:R=
-M9U9I> ;2L\F!22E@6W./K(>=1 6BX.$\>$N6-[)6-I)5B/(9HM)BZ1U$AS&
-MF"PL8)7(88V)*E%%*B/EF%066Z/^YD>)+( ><@O8)O8I0B8EBS9A_Z7'JIQP
-M)4H",87XD*Y(P3DU-"@%#V=/":7L4'3$2(+<0*5H2V0([0EED8&H(" '2$<@
-M!70R0+C/ (D 5.B/J13 .%<&,D[JA4TH3C*!&0I,9?X+;:#^PHVS#9#CI''.
-M))8NXPI]2@9ED&19NT#]EZ '.,XWP(P34JCS&IOPO! ?:!/1WDM R2#T<IN<
-M@J"<1$XI)_7B<M&% BFT!DQ48 3U !"N99"K&'/JP;)>4@X1"XFEV)1#HB%Q
-8FY81&X3S0IV3=,A,,"*D#\@ 8@"PUU,"
-
-end
-
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.10 b/usr.sbin/xntpd/patches/patch.10
deleted file mode 100644
index 1771b5fef717..000000000000
--- a/usr.sbin/xntpd/patches/patch.10
+++ /dev/null
@@ -1,1925 +0,0 @@
-diff -c COPYRIGHT:1.1.1.16 COPYRIGHT:1.21
-*** COPYRIGHT:1.1.1.16 Wed Feb 2 18:09:17 1994
---- COPYRIGHT Wed Feb 2 18:09:18 1994
-***************
-*** 1,6 ****
- /******************************************************************************
- * *
-! * Copyright (c) David L. Mills 1992, 1993, 1994 *
- * *
- * Permission to use, copy, modify, and distribute this software and its *
- * documentation for any purpose and without fee is hereby granted, provided *
---- 1,6 ----
- /******************************************************************************
- * *
-! * Copyright (c) David L. Mills 1992, 1993, 1994 *
- * *
- * Permission to use, copy, modify, and distribute this software and its *
- * documentation for any purpose and without fee is hereby granted, provided *
-***************
-*** 55,58 ****
- * Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> (Linux Port)
- * Paul A Vixie <vixie@vix.com> (TrueTime GPS driver)
- * Jim Jagielski <jim@jagubox.gsfc.nasa.gov> (A/UX port)
-! */
---- 55,58 ----
- * Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> (Linux Port)
- * Paul A Vixie <vixie@vix.com> (TrueTime GPS driver)
- * Jim Jagielski <jim@jagubox.gsfc.nasa.gov> (A/UX port)
-! */
-diff -c doc/xntpd.8:1.1.1.12 doc/xntpd.8:3.24
-*** doc/xntpd.8:1.1.1.12 Wed Feb 2 18:10:44 1994
---- doc/xntpd.8 Wed Feb 2 18:10:45 1994
-***************
-*** 446,451 ****
---- 446,467 ----
- .Ip notrust 10
- Treat these hosts normally in other respects, but never use them as
- synchronization sources.
-+ .Ip limited 10
-+ These hosts are subject to limitation of number of clients from the
-+ same net. Net in this context refers to the IP notion of net (class A,
-+ class B, class C, etc.). Only the first \*(L"client_limit\*(R" hosts
-+ that have shown up at the server and that have been active during the
-+ last \*(L"client_limit_period\*(R" seconds are accepted. Requests from
-+ other clients from the same net are rejected. Only time request
-+ packets are taken into account. \*(L"Private\*(R", \*(L"control\*(R",
-+ and \*(L"broadcast\*(R" packets are not subject to client limitation
-+ and therefore are not contributing to client count. History of clients
-+ is kept using the monitoring capability of
-+ .IR xntpd .
-+ Thus, monitoring is active as long as there is a restriction entry
-+ with the \*(L"limited\*(R" flag. The default value for
-+ \*(L"client_limit\*(R" is 3. The default value for
-+ \*(L"client_limit_period\*(R" is 3600 seconds.
- .Ip ntpport 10
- This is actually a match algorithm modifier, rather than a restriction
- flag. Its presence causes the restriction entry to be matched only if
-***************
-*** 469,474 ****
---- 485,505 ----
- considered an alternative to the standard NTP authentication facility. Source
- address based restrictions are easily circumvented by a determined cracker.
- .PP
-+ .B clientlimit
-+ .I limit
-+ .PP
-+ Sets \*(L"client_limit\*(R" to \*(L"limit\*(R", allows configuration
-+ of client limitation policy. This variable defines the number of
-+ clients from the same network that are allowed to use the server.
-+ .PP
-+ .B clientperiod
-+ .I period
-+ .PP
-+ Sets \*(L"client_limit_period\*(R", allows configuration of client
-+ limitation policy. This variable specifies the number
-+ of seconds after which a client is considered inactive and thus no
-+ longer is counted for client limit restriction.
-+ .PP
- .B trap
- .I host_address
- [
-diff -c doc/xntpdc.8:1.1.1.2 doc/xntpdc.8:3.4
-*** doc/xntpdc.8:1.1.1.2 Wed Feb 2 18:10:46 1994
---- doc/xntpdc.8 Wed Feb 2 18:10:47 1994
-***************
-*** 539,544 ****
---- 539,555 ----
- Ignore all NTP mode 7 packets which attempt to modify the state of the
- server (i.e. run time reconfiguration). Queries which return information
- are permitted.
-+ .Ip notrap 10
-+ Decline to provide mode 6 control message trap service to matching
-+ hosts. The trap service is a subsystem of the mode 6 control message
-+ protocol which is intended for use by remote event logging programs.
-+ .Ip lowpriotrap 10
-+ 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.
- .Ip noserve 10
- Ignore NTP packets whose mode is other than 7. In effect, time service is
- denied, though queries may still be permitted.
-***************
-*** 549,554 ****
---- 560,582 ----
- .Ip notrust 10
- Treat these hosts normally in other respects, but never use them as
- synchronization sources.
-+ .Ip limited 10
-+ These hosts are subject to limitation of number of clients from the
-+ same net. Net in this context refers to the IP notion of net (class A,
-+ class B, class C, etc.). Only the first \*(L"client_limit\*(R" hosts
-+ that have shown up at the server and that have been active during the
-+ last \*(L"client_limit_period\*(R" seconds are accepted. Requests from
-+ other clients from the same net are rejected. Only time request
-+ packets are taken into account. \*(L"Private\*(R", \*(L"control\*(R",
-+ and \*(L"broadcast\*(R" packets are not subject to client limitation
-+ and therefore are not contributing to client count. History of clients
-+ is kept using the monitoring capability of
-+ .IR xntpd.
-+ Thus, monitoring is active as long as there is a restriction entry
-+ with the \*(L"limited\*(R" flag. The default value for
-+ \*(L"client_limit\*(R" is 3. The default value for
-+ \*(L"client_limit_period\*(R" is 3600 seconds. Currently both
-+ variables are not runtime configurable.
- .Ip ntpport 10
- This is actually a match algorithm modifier, rather than a restriction
- flag. Its presence causes the restriction entry to be matched only if
-diff -c hints/linux:1.1.1.1 hints/linux:1.2
-*** hints/linux:1.1.1.1 Wed Feb 2 18:10:58 1994
---- hints/linux Wed Feb 2 18:10:59 1994
-***************
-*** 1,29 ****
-
-! Requirements: kernel 0.99.14 or newer, libc 4.5 or newer
- ------------
-
-! With this configuration, xntp should build an run right out of the
-! box (see generic hints for how-to), with one big limitation: tickadj doesn't
-! work yet. This is especially painful since PCs are usually equipped with
-! untuned, badly-drifting quartzes, values up to 200 ppm being no exception.
-! Because the loop filter algorithms are limited to compensating no more than
-! 100 ppm, currently only one workaround is possible:
-! Compile your own kernel and adjust linux/include/linux/timex.h,
-! line 67 (in pl14):
-!
-! #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
-!
-! Since this is surely not true for your hardware, adjust the hundreds
-! to match your quartz. Adding 100 compensates for a drift of -83.8 ppm
-! (1/CLOCK_TICK_RATE). The number gets rounded to the nearest 100 so don't
-! bother to tune any finer.
-!
-! Fixing tickadj is already in my work queue, so the previous comment should be
-! obsolete RSN. If you really need to run xntp on any earlier versions of the
-! kernel or libc, or have any other question not covered in the READMEs / hint
-! files (sorry, necessary comment in the Linux community ;-) feel free to ask
-! me (duwe@informatik.uni-erlangen.de)
-!
-! xntp3.3b of 1993/12/06 : remember to change #define ntp_adjtime adjtimex to
-! __adjtimex in the Linux section (line 316). This is hopefully done if you
-! (don't :-) see this paragraph in the xntp3.x distribution.
---- 1,9 ----
-
-! Requirements: kernel 0.99.14y or newer, libc 4.5.8 or newer
- ------------
-
-! With this configuration, xntp should build an run right out of the box
-! (see generic hints for how-to). If you really need to run xntp on any earlier
-! versions of the kernel or libc, or have any other question not covered in the
-! READMEs / hint files (sorry, necessary comment in the Linux community ;-) feel
-! free to ask me (duwe@informatik.uni-erlangen.de)
-diff -c include/ntp.h:1.1.1.17 include/ntp.h:3.23
-*** include/ntp.h:1.1.1.17 Wed Feb 2 18:11:18 1994
---- include/ntp.h Wed Feb 2 18:11:18 1994
-***************
-*** 612,617 ****
---- 612,620 ----
- struct mon_data *hash_prev; /* previous structure in hash list */
- struct mon_data *mru_next; /* next structure in MRU list */
- struct mon_data *mru_prev; /* previous structure in MRU list */
-+ struct mon_data *fifo_next; /* next structure in FIFO list */
-+ struct mon_data *fifo_prev; /* previous structure in FIFO list */
-+ U_LONG lastdrop; /* last time dropped due to RES_LIMIT*/
- U_LONG lasttime; /* last time data updated */
- U_LONG firsttime; /* time structure initialized */
- U_LONG count; /* count we have seen */
-***************
-*** 621,627 ****
- u_char version; /* version of incoming packet */
- };
-
-!
- /*
- * Structure used for restrictlist entries
- */
---- 624,635 ----
- u_char version; /* version of incoming packet */
- };
-
-! /*
-! * Values used with mon_enabled to indicate reason for enabling monitoring
-! */
-! #define MON_OFF 0x00 /* no monitoring */
-! #define MON_ON 0x01 /* monitoring explicitly enabled */
-! #define MON_RES 0x02 /* implicit monitoring for RES_LIMITED */
- /*
- * Structure used for restrictlist entries
- */
-***************
-*** 645,654 ****
- #define RES_NOPEER 0x20 /* don't allocate memory resources */
- #define RES_NOTRAP 0x40 /* don't allow him to set traps */
- #define RES_LPTRAP 0x80 /* traps set by him are low priority */
-
- #define RES_ALLFLAGS \
- (RES_IGNORE|RES_DONTSERVE|RES_DONTTRUST|RES_NOQUERY\
-! |RES_NOMODIFY|RES_NOPEER|RES_NOTRAP|RES_LPTRAP)
-
- /*
- * Match flags
---- 653,663 ----
- #define RES_NOPEER 0x20 /* don't allocate memory resources */
- #define RES_NOTRAP 0x40 /* don't allow him to set traps */
- #define RES_LPTRAP 0x80 /* traps set by him are low priority */
-+ #define RES_LIMITED 0x100 /* limit per net number of clients */
-
- #define RES_ALLFLAGS \
- (RES_IGNORE|RES_DONTSERVE|RES_DONTTRUST|RES_NOQUERY\
-! |RES_NOMODIFY|RES_NOPEER|RES_NOTRAP|RES_LPTRAP|RES_LIMITED)
-
- /*
- * Match flags
-diff -c include/ntp_request.h:1.1.1.7 include/ntp_request.h:3.7
-*** include/ntp_request.h:1.1.1.7 Wed Feb 2 18:11:27 1994
---- include/ntp_request.h Wed Feb 2 18:11:28 1994
-***************
-*** 429,438 ****
---- 429,456 ----
- U_LONG processed; /* packets processed */
- U_LONG badauth; /* packets dropped because of authorization */
- U_LONG wanderhold;
-+ U_LONG limitrejected; /* rejected because of client limitation */
- };
-
-
- /*
-+ * System stats - old version
-+ */
-+ struct old_info_sys_stats {
-+ U_LONG timeup; /* time we have been up and running */
-+ U_LONG timereset; /* time since these were last cleared */
-+ U_LONG badstratum; /* packets claiming an invalid stratum */
-+ U_LONG oldversionpkt; /* old version packets received */
-+ U_LONG newversionpkt; /* new version packets received */
-+ U_LONG unknownversion; /* don't know version packets */
-+ U_LONG badlength; /* packets with bad length */
-+ U_LONG processed; /* packets processed */
-+ U_LONG badauth; /* packets dropped because of authorization */
-+ U_LONG wanderhold;
-+ };
-+
-+
-+ /*
- * Peer memory statistics. Collected in the peer module.
- */
- struct info_mem_stats {
-***************
-*** 546,551 ****
---- 564,570 ----
- struct info_monitor {
- U_LONG lasttime; /* last packet from this host */
- U_LONG firsttime; /* first time we received a packet */
-+ U_LONG lastdrop; /* last time we rejected a packet due to client limitation policy */
- U_LONG count; /* count of packets received */
- U_LONG addr; /* host address */
- u_short port; /* port number of last reception */
-***************
-*** 553,558 ****
---- 572,589 ----
- u_char version; /* version number of last packet */
- };
-
-+ /*
-+ * Structure used for returning monitor data (old format
-+ */
-+ struct old_info_monitor {
-+ U_LONG lasttime; /* last packet from this host */
-+ U_LONG firsttime; /* first time we received a packet */
-+ U_LONG count; /* count of packets received */
-+ U_LONG addr; /* host address */
-+ u_short port; /* port number of last reception */
-+ u_char mode; /* mode of last packet */
-+ u_char version; /* version number of last packet */
-+ };
-
- /*
- * Structure used for passing indication of flags to clear
-diff -c include/ntp_stdlib.h:1.1.1.7 include/ntp_stdlib.h:1.2
-*** include/ntp_stdlib.h:1.1.1.7 Wed Feb 2 18:11:31 1994
---- include/ntp_stdlib.h Wed Feb 2 18:11:31 1994
-***************
-*** 79,84 ****
---- 79,85 ----
- extern char * mfptoa P((U_LONG, U_LONG, int));
- extern char * mfptoms P((U_LONG, U_LONG, int));
- extern char * modetoa P((int));
-+ extern U_LONG netof P((U_LONG));
- extern char * numtoa P((U_LONG));
- extern char * numtohost P((U_LONG));
- extern int octtoint P((const char *, U_LONG *));
-diff -c include/ntpd.h:1.1.1.7 include/ntpd.h:1.6
-*** include/ntpd.h:1.1.1.7 Wed Feb 2 18:11:38 1994
---- include/ntpd.h Wed Feb 2 18:11:38 1994
-***************
-*** 93,100 ****
-
- /* ntp_monitor.c */
- extern void init_mon P((void));
-! extern void mon_start P((void));
-! extern void mon_stop P((void));
- extern void monitor P((struct recvbuf *));
-
- /* ntp_peer.c */
---- 93,100 ----
-
- /* ntp_monitor.c */
- extern void init_mon P((void));
-! extern void mon_start P((int));
-! extern void mon_stop P((int));
- extern void monitor P((struct recvbuf *));
-
- /* ntp_peer.c */
-diff -c lib/Makefile.tmpl:1.1.1.14 lib/Makefile.tmpl:3.25
-*** lib/Makefile.tmpl:1.1.1.14 Wed Feb 2 18:12:06 1994
---- lib/Makefile.tmpl Wed Feb 2 18:12:07 1994
-***************
-*** 31,37 ****
- uglydate.c uinttoa.c utvtoa.c machines.c clocktypes.c \
- md5.c a_md5encrypt.c a_md5decrypt.c \
- a_md512crypt.c decodenetnum.c systime.c msyslog.c syssignal.c \
-! findconfig.c
-
- OBJS= atoint.o atolfp.o atouint.o auth12crypt.o authdecrypt.o authdes.o \
- authencrypt.o authkeys.o authparity.o authreadkeys.o authusekey.o \
---- 31,37 ----
- uglydate.c uinttoa.c utvtoa.c machines.c clocktypes.c \
- md5.c a_md5encrypt.c a_md5decrypt.c \
- a_md512crypt.c decodenetnum.c systime.c msyslog.c syssignal.c \
-! findconfig.c netof.c
-
- OBJS= atoint.o atolfp.o atouint.o auth12crypt.o authdecrypt.o authdes.o \
- authencrypt.o authkeys.o authparity.o authreadkeys.o authusekey.o \
-***************
-*** 44,50 ****
- uglydate.o uinttoa.o utvtoa.o machines.o clocktypes.o \
- md5.o a_md5encrypt.o a_md5decrypt.o \
- a_md512crypt.o decodenetnum.o systime.o msyslog.o syssignal.o \
-! findconfig.o
-
- $(LIBNAME).a: $(OBJS)
- ar rv $@ $?
---- 44,50 ----
- uglydate.o uinttoa.o utvtoa.o machines.o clocktypes.o \
- md5.o a_md5encrypt.o a_md5decrypt.o \
- a_md512crypt.o decodenetnum.o systime.o msyslog.o syssignal.o \
-! findconfig.o netof.o
-
- $(LIBNAME).a: $(OBJS)
- ar rv $@ $?
-diff -c /dev/null lib/netof.c:3.1
-*** /dev/null Wed Feb 2 18:13:07 1994
---- lib/netof.c Wed Feb 2 18:13:07 1994
-***************
-*** 0 ****
---- 1,25 ----
-+ /*
-+ * netof - return the net address part of an ip address
-+ * (zero out host part)
-+ */
-+ #include <stdio.h>
-+
-+ #include "ntp_fp.h"
-+ #include "ntp_stdlib.h"
-+
-+ U_LONG
-+ netof(num)
-+ U_LONG num;
-+ {
-+ register U_LONG netnum;
-+
-+ netnum = num;
-+
-+ if(IN_CLASSC(netnum))
-+ netnum &= IN_CLASSC_NET;
-+ else if (IN_CLASSB(netnum))
-+ netnum &= IN_CLASSB_NET;
-+ else /* treat als other like class A */
-+ netnum &= IN_CLASSA_NET;
-+ return netnum;
-+ }
-diff -c /dev/null parse/README.new_clocks:3.2
-*** /dev/null Wed Feb 2 18:14:30 1994
---- parse/README.new_clocks Wed Feb 2 18:14:30 1994
-***************
-*** 0 ****
---- 1,203 ----
-+ Here is an attempt to scetch out what you need to do in order to
-+ add another clock to the parse driver:
-+
-+ Prerequsites:
-+ - Does the system you want the clock connect to have
-+ termio.h or termios.h ? (You need that for the parse driver)
-+
-+ What to do:
-+
-+ Make a conversion module (parse/clk_*.c)
-+
-+ - What ist the time code format ?
-+ - find year, month, day, hour, minute, second, status (synchronised or
-+ not), possibly time zone information (you need to give the offset to UTC)
-+ You will have to convert the data from a string into a struct clocktime:
-+ struct clocktime /* clock time broken up from time code */
-+ {
-+ LONG day;
-+ LONG month;
-+ LONG year;
-+ LONG hour;
-+ LONG minute;
-+ LONG second;
-+ LONG usecond;
-+ LONG utcoffset; /* in seconds */
-+ LONG flags; /* current clock status */
-+ };
-+
-+ Conversion is usually simple and straight forward. For the flags following
-+ values can be OR'ed together:
-+
-+ PARSEB_ANNOUNCE switch time zone warning (informational only)
-+ PARSEB_POWERUP no synchronisation - clock confused (must set then)
-+ PARSEB_NOSYNC timecode currently not confirmed (must set then)
-+ usually on reception error when the is still a
-+ chance the the generated time is still ok.
-+
-+ PARSEB_DST DST in effect (informational only)
-+ PARSEB_UTC timecode contains UTC time (informational only)
-+ PARSEB_LEAP LEAP warning (prior to leap happening - must set when imminent)
-+ PARSEB_ALTERNATE backup transmitter (informational only)
-+ PARSEB_POSITION geographic position available (informational only)
-+ PARSEB_LEAPSECOND actual leap second (this time code is the leap
-+ second - informational only)
-+
-+ These are feature flags denoting items that are supported by the clock:
-+ PARSEB_S_LEAP supports LEAP - might set PARSEB_LEAP
-+ PARSEB_S_ANTENNA supports ANTENNA - might set PARSEB_ALTERNATE
-+ PARSEB_S_PPS supports PPS time stamping
-+ PARSEB_S_POSITION supports position information (GPS)
-+
-+ Conversion is done in the cvt_* routine in parse/clk_*.c files. look in
-+ them for examples. The basic structure is:
-+
-+ struct clockformat <yourclock>_format = {
-+ lots of field for you to fill out (see below)
-+ };
-+
-+ static cvt_<yourclock>()
-+ ...
-+ {
-+ if (<I do not recognize my time code>) {
-+ return CVT_NONE;
-+ } else {
-+ if (<conversion into clockformat is ok>) {
-+ <set all necessary flags>;
-+ return CVT_OK;
-+ } else {
-+ return CVT_FAIL|CVT_BADFMT;
-+ }
-+ }
-+
-+ The struct clockformat is the interface to the rest of the parse
-+ driver - it holds all information necessary for finding the
-+ clock message and doing the appropriate time stamping.
-+
-+ struct clockformat
-+ {
-+ unsigned LONG (*convert)();
-+ /* conversion routine - your routine - cvt_<yourclock> */
-+ void (*syncevt)();
-+ /* routine for handling RS232 sync events (time stamps) - usually sync_simple */
-+ unsigned LONG (*syncpps)();
-+ /* PPS input routine - usually pps_simple */
-+ unsigned LONG (*synth)();
-+ /* time code synthesizer - usually not used - (LONG (*)())0 */
-+ void *data;
-+ /* local parameters - any parameters/data/configuration info your conversion
-+ routine might need */
-+ char *name;
-+ /* clock format name - Name of the time code */
-+ unsigned short length;
-+ /* maximum length of data packet for your clock format */
-+ unsigned LONG flags;
-+ /* information for the parser what to look for */
-+ struct timeval timeout;
-+ /* buffer restart after timeout (us) - some clocks preceede new data by
-+ a longer period of silence - unsually not used */
-+ unsigned char startsym;
-+ /* start symbol - character at the beginning of the clock data */
-+ unsigned char endsym;
-+ /* end symbol - character at the end of the clock data */
-+ unsigned char syncsym;
-+ /* sync symbol - character that is "on time" - where the time stamp should be taken */
-+ };
-+
-+ The flags:
-+ F_START use startsym to find the beginning of the clock data
-+ F_END use endsym to find the end of the clock data
-+ SYNC_TIMEOUT packet restart after timeout in timeout field
-+ SYNC_START packet start is sync event (time stamp at paket start)
-+ SYNC_END packet end is sync event (time stamp at paket end)
-+ SYNC_CHAR special character (syncsym) is sync event
-+ SYNC_ONE PPS synchronize on 'ONE' transition
-+ SYNC_ZERO PPS synchronize on 'ZERO' transition
-+ SYNC_SYNTHESIZE generate intermediate time stamps (very special case!)
-+ CVT_FIXEDONLY convert only in fixed configuration - (data format not
-+ suitable for auto-configuration)
-+
-+
-+ The above should have given you some hints on how to build a clk_*.c
-+ file with the time code conversion. See the examples and pick a clock
-+ closest to yours and tweak the code to match your clock.
-+
-+ In order to make your clk_*.c file usable a referenc to the clockformat
-+ structure must be put into parse_conf.c.
-+
-+
-+
-+ TTY setup and initialisation/configuration will be done in
-+ xntpd/refclock_parse.c
-+
-+ - Find out the exact tty settings for your clock (baud rate, parity,
-+ stop bits, character size, ...) and note them in terms of
-+ termio*.h c_cflag macros.
-+
-+ - in xntpd/refclock_parse.c fill out a new the struct clockinfo element
-+ (allocates a new "IP" address - see comments)
-+ (see all the other clocks for example)
-+ struct clockinfo
-+ {
-+ U_LONG cl_flags; /* operation flags (io modes) */
-+ PARSE_F_NOPOLLONLY always do async io - read whenever input comes
-+ PARSE_F_POLLONLY never do async io - only read when expecting data
-+ PARSE_F_PPSPPS use loopfilter PPS code (CIOGETEV)
-+ PARSE_F_PPSONSECOND PPS pulses are on second
-+ usually flags stay 0 as they are used only for special setups
-+
-+ void (*cl_poll)(); /* active poll routine */
-+ The routine to call when the clock needs data sent to it in order to
-+ get a time code from the clock (e.g. Trimble clock)
-+ int (*cl_init)(); /* active poll init routine */
-+ The routine to call for very special initializations.
-+ void (*cl_end)(); /* active poll end routine */
-+ The routine to call to undo any special initialisation (free memory/timers)
-+ void *cl_data; /* local data area for "poll" mechanism */
-+ local data for polling routines
-+ u_fp cl_rootdelay; /* rootdelay */
-+ NTP rottdelay estimate (usually 0)
-+ U_LONG cl_basedelay; /* current offset - unsigned l_fp fractional par
-+ time (fraction) by which the RS232 time code is delayed from the actual time.
-+ t */
-+ U_LONG cl_ppsdelay; /* current PPS offset - unsigned l_fp fractional
-+ time (fraction) by which the PPS time stamp is delayed (usually 0)
-+ part */
-+ char *cl_id; /* ID code (usually "DCF") */
-+ Refclock id - (max 4 chars)
-+ char *cl_description; /* device name */
-+ Name of this device.
-+ char *cl_format; /* fixed format */
-+ If the data format cann not ne detected automatically this is the name
-+ as in clk_*.c clockformat.
-+ u_char cl_type; /* clock type (ntp control) */
-+ Type if clock as in clock status word (ntp control messages) - usually 0
-+ U_LONG cl_maxunsync; /* time to trust oscillator after loosing synch
-+ */
-+ seconds a clock can be trusted after loosing synchronisation.
-+
-+ U_LONG cl_cflag; /* terminal io flags */
-+ U_LONG cl_iflag; /* terminal io flags */
-+ U_LONG cl_oflag; /* terminal io flags */
-+ U_LONG cl_lflag; /* terminal io flags */
-+ termio*.h tty modes.
-+ } clockinfo[] = {
-+ ...,<other clocks>,...
-+ { < your parameters> },
-+ };
-+
-+
-+ Well, this is very sketchy, i know. But I hope it helps a little bit.
-+ The best way is to look which clock comes closet to your and tweak that
-+ code.
-+ Two sorts of clocks are used with parse. Clocks that automatically sent
-+ thier time code (once a second) do not nee entries in the poll routines because
-+ they sent the data all the time. The second sort are the clocks that need a
-+ command sent to then in order to reply with a time code (like the Trimble
-+ clock).
-+
-+ For questions: kardel@informatik.uni-erlangen.de. Please include
-+ an exact description on how your clock works. (initialisation,
-+ TTY modes, strings to be sent to it, responses received from the clock).
-+
-+ Frank Kardel
-diff -c /dev/null parse/README.parse_clocks:3.1
-*** /dev/null Wed Feb 2 18:14:33 1994
---- parse/README.parse_clocks Wed Feb 2 18:14:33 1994
-***************
-*** 0 ****
---- 1,263 ----
-+ The parse driver currently supports several clock with different
-+ query mechanisms. In order for you to find a sample that might be
-+ similar to a clock you might want to integrate into parse i'll sum
-+ up the major features of the clocks (this information is distributed
-+ in the parse/clk_*.c and xntpd/refclock_parse.c files).
-+
-+ ---
-+ Meinberg: 127.127.8. 0- 3 (PZF535TCXO)
-+ 127.127.8. 4- 7 (PZF535OCXO)
-+ 127.127.8. 8-11 (DCFUA31)
-+ 127.127.8.28-31 (GPS166)
-+ Meinberg: start=<STX>, end=<ETX>, sync on start
-+ pattern="\2D: . . ;T: ;U: . . ; \3"
-+ pattern="\2 . . ; ; : : ; \3"
-+ pattern="\2 . . ; ; : : ; : ; ; . . "
-+
-+ Meinberg is a german manufacturer of time code receivers. Those clocks
-+ have a pretty common output format in the stock version. In order to
-+ support NTP Meinberg was so kind to produce some special versions of
-+ the firmware for the use with NTP. So, if you are going to use a
-+ Meinberg clock please ask whether there is a special Uni Erlangen
-+ version.
-+
-+ General characteristics:
-+ Meinberg clocks primarily output pulse per second and a describing
-+ ASCII string. This string can be produced in two modes. either upon
-+ the reception of a question mark or every second. NTP uses the latter
-+ mechanism. The DCF77 variants have a pretty good relationship between
-+ RS232 time code and the PPS signal while the GPS receiver has no fixed
-+ timeing between the datagram and the pulse (you need to use PPS with
-+ GPS!) on DCF77 you might get away without the PPS signal.
-+
-+ The preferred tty setting for Meinberg is:
-+ CFLAG (B9600|CS7|PARENB|CREAD|HUPCL)
-+ IFLAG (IGNBRK|IGNPAR|ISTRIP)
-+ OFLAG 0
-+ LFLAG 0
-+
-+ The clock is run at datagram once per second.
-+ Stock dataformat is:
-+
-+ <STX>D:<dd>.<mm>.<yy>;T:<w>;U:<hh>:<mm>:<ss>;<S><F><D><A><ETX>
-+ pos: 0 00 00 0 00 0 11 111 1 111 12 2 22 2 22 2 2 2 3 3 3
-+ 1 23 45 6 78 9 01 234 5 678 90 1 23 4 56 7 8 9 0 1 2
-+
-+ <STX> = '\002' ASCII start of text
-+ <ETX> = '\003' ASCII end of text
-+ <dd>,<mm>,<yy> = day, month, year(2 digits!!)
-+ <w> = day of week (sunday= 0)
-+ <hh>,<mm>,<ss> = hour, minute, second
-+ <S> = '#' if never synced since powerup else ' ' for DCF U/A 31
-+ '#' if not PZF sychronisation available else ' ' for PZF 535
-+ <F> = '*' if time comes from internal quartz else ' '
-+ <D> = 'S' if daylight saving time is active else ' '
-+ <A> = '!' during the hour preceeding an daylight saving time
-+ start/end change
-+
-+ For the university of Erlangen a special format was implemented to support
-+ LEAP announcement and anouncement of alternate antenna.
-+
-+ Version for UNI-ERLANGEN Software is: PZFUERL V4.6 (Meinberg)
-+
-+ The use of this software release (or higher) is *ABSOLUTELY*
-+ recommended (ask for PZFUERL version as some minor HW fixes have
-+ been introduced) due to the LEAP second support and UTC indication.
-+ The standard timecode does not indicate when the timecode is in
-+ UTC (by front panel configuration) thus we have no chance to find
-+ the correct utc offset. For the standard format do not ever use
-+ UTC display as this is not detectable in the time code !!!
-+
-+ <STX><dd>.<mm>.<yy>; <w>; <hh>:<mm>:<ss>; <U><S><F><D><A><L><R><ETX>
-+ pos: 0 00 0 00 0 00 11 1 11 11 1 11 2 22 22 2 2 2 2 2 3 3 3
-+ 1 23 4 56 7 89 01 2 34 56 7 89 0 12 34 5 6 7 8 9 0 1 2
-+ <STX> = '\002' ASCII start of text
-+ <ETX> = '\003' ASCII end of text
-+ <dd>,<mm>,<yy> = day, month, year(2 digits!!)
-+ <w> = day of week (sunday= 0)
-+ <hh>,<mm>,<ss> = hour, minute, second
-+ <U> = 'U' UTC time display
-+ <S> = '#' if never synced since powerup else ' ' for DCF U/A 31
-+ '#' if not PZF sychronisation available else ' ' for PZF 535
-+ <F> = '*' if time comes from internal quartz else ' '
-+ <D> = 'S' if daylight saving time is active else ' '
-+ <A> = '!' during the hour preceeding an daylight saving time
-+ start/end change
-+ <L> = 'A' LEAP second announcement
-+ <R> = 'R' alternate antenna
-+
-+ Meinberg GPS166 receiver
-+
-+ You must get the Uni-Erlangen firmware for the GPS receiver support
-+ to work to full satisfaction !
-+
-+ <STX><dd>.<mm>.<yy>; <w>; <hh>:<mm>:<ss>; <+/-><00:00>; <U><S><F><D><A><L><R><L>; <position...><ETX>
-+ *
-+ 000000000111111111122222222223333333333444444444455555555556666666
-+ 123456789012345678901234567890123456789012345678901234567890123456
-+ \x0209.07.93; 5; 08:48:26; +00:00; ; 49.5736N 11.0280E 373m\x03
-+ *
-+
-+ <STX> = '\002' ASCII start of text
-+ <ETX> = '\003' ASCII end of text
-+ <dd>,<mm>,<yy> = day, month, year(2 digits!!)
-+ <w> = day of week (sunday= 0)
-+ <hh>,<mm>,<ss> = hour, minute, second
-+ <+/->,<00:00> = offset to UTC
-+ <S> = '#' if never synced since powerup else ' ' for DCF U/A 31
-+ '#' if not PZF sychronisation available else ' ' for PZF 535
-+ <U> = 'U' UTC time display
-+ <F> = '*' if time comes from internal quartz else ' '
-+ <D> = 'S' if daylight saving time is active else ' '
-+ <A> = '!' during the hour preceeding an daylight saving time
-+ start/end change
-+ <L> = 'A' LEAP second announcement
-+ <R> = 'R' alternate antenna (reminiscent of PZF535) usually ' '
-+ <L> = 'L' on 23:59:60
-+
-+
-+ For the Meinberg parse look into clock_meinberg.c
-+
-+ ---
-+ RAWDCF: 127.127.8.20-23 (Conrad receiver module - delay 210ms)
-+ 127.127.8.24-27 (FAU receiver - delay 258ms)
-+ RAWDCF: end=TIMEOUT>1.5s, sync each char (any char),generate psuedo time
-+ codes, fixed format
-+
-+ direct DCF77 code input
-+ In Europe it is relatively easy/cheap the receive the german time code
-+ transmitter DCF77. The simplest version to process its signal is to
-+ feed the 100/200ms pulse of the demodulated AM signal via a level
-+ converter to an RS232 port at 50Baud. parse/clk_rawdcf.c holds all
-+ necessary decoding logic for the time code which is transmitted each
-+ minute for one minute. A bit of the time code is sent once a second.
-+
-+ The preferred tty setting is:
-+ CFLAG (B50|CS8|CREAD|CLOCAL)
-+ IFLAG 0
-+ OFLAG 0
-+ LFLAG 0
-+
-+ DCF77 raw time code
-+
-+ From "Zur Zeit", Physikalisch-Technische Bundesanstalt (PTB), Braunschweig
-+ und Berlin, Maerz 1989
-+
-+ Timecode transmission:
-+ AM:
-+ time marks are send every second except for the second before the
-+ next minute mark
-+ time marks consist of a reduction of transmitter power to 25%
-+ of the nominal level
-+ the falling edge is the time indication (on time)
-+ time marks of a 100ms duration constitute a logical 0
-+ time marks of a 200ms duration constitute a logical 1
-+ FM:
-+ see the spec. (basically a (non-)inverted psuedo random phase shift)
-+
-+ Encoding:
-+ Second Contents
-+ 0 - 10 AM: free, FM: 0
-+ 11 - 14 free
-+ 15 R - alternate antenna
-+ 16 A1 - expect zone change (1 hour before)
-+ 17 - 18 Z1,Z2 - time zone
-+ 0 0 illegal
-+ 0 1 MEZ (MET)
-+ 1 0 MESZ (MED, MET DST)
-+ 1 1 illegal
-+ 19 A2 - expect leap insertion/deletion (1 hour before)
-+ 20 S - start of time code (1)
-+ 21 - 24 M1 - BCD (lsb first) Minutes
-+ 25 - 27 M10 - BCD (lsb first) 10 Minutes
-+ 28 P1 - Minute Parity (even)
-+ 29 - 32 H1 - BCD (lsb first) Hours
-+ 33 - 34 H10 - BCD (lsb first) 10 Hours
-+ 35 P2 - Hour Parity (even)
-+ 36 - 39 D1 - BCD (lsb first) Days
-+ 40 - 41 D10 - BCD (lsb first) 10 Days
-+ 42 - 44 DW - BCD (lsb first) day of week (1: Monday -> 7: Sunday)
-+ 45 - 49 MO - BCD (lsb first) Month
-+ 50 MO0 - 10 Months
-+ 51 - 53 Y1 - BCD (lsb first) Years
-+ 54 - 57 Y10 - BCD (lsb first) 10 Years
-+ 58 P3 - Date Parity (even)
-+ 59 - usually missing (minute indication), except for leap insertion
-+
-+ ---
-+ Schmid clock: 127.127.8.16-19
-+ Schmid clock: needs poll, binary input, end='\xFC', sync start
-+
-+ The Schmid clock is a DCF77 receiver that sends a binary
-+ time code at the reception of a flag byte. The contents
-+ if the flag byte determined the time code format. The
-+ binary time code is delimited by the byte 0xFC.
-+
-+ TTY setup is:
-+ CFLAG (B1200|CS8|CREAD|CLOCAL)
-+ IFLAG 0
-+ OFLAG 0
-+ LFLAG 0
-+
-+ The command to Schmid's DCF77 clock is a single byte; each bit
-+ allows the user to select some part of the time string, as follows (the
-+ output for the lsb is sent first).
-+
-+ Bit 0: time in MEZ, 4 bytes *binary, not BCD*; hh.mm.ss.tenths
-+ Bit 1: date 3 bytes *binary, not BCD: dd.mm.yy
-+ Bit 2: week day, 1 byte (unused here)
-+ Bit 3: time zone, 1 byte, 0=MET, 1=MEST. (unused here)
-+ Bit 4: clock status, 1 byte, 0=time invalid,
-+ 1=time from crystal backup,
-+ 3=time from DCF77
-+ Bit 5: transmitter status, 1 byte,
-+ bit 0: backup antenna
-+ bit 1: time zone change within 1h
-+ bit 3,2: TZ 01=MEST, 10=MET
-+ bit 4: leap second will be
-+ added within one hour
-+ bits 5-7: Zero
-+ Bit 6: time in backup mode, units of 5 minutes (unused here)
-+
-+
-+ ---
-+ Trimble SV6: 127.127.8.32-35
-+ Trimble SV6: needs poll, ascii timecode, start='>', end='<',
-+ query='>QTM<', eol='<'
-+
-+ Trimble SV6 is a GPS receiver with PPS output. It needs to be polled.
-+ It also need a special tty mode setup (EOL='<').
-+
-+ TTY setup is:
-+ CFLAG (B4800|CS8|CREAD)
-+ IFLAG (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON)
-+ OFLAG (OPOST|ONLCR)
-+ LFLAG (ICANON|ECHOK)
-+
-+ Special flags are:
-+ PARSE_F_PPSPPS - use CIOGETEV for PPS time stamping
-+ PARSE_F_PPSONSECOND - the time code is not related to
-+ the PPS pulse (so use the time code
-+ only for the second epoch)
-+
-+ Timecode
-+ 0000000000111111111122222222223333333 / char
-+ 0123456789012345678901234567890123456 \ posn
-+ >RTMhhmmssdddDDMMYYYYoodnnvrrrrr;*xx< Actual
-+ ----33445566600112222BB7__-_____--99- Parse
-+ >RTM 1 ;* <", Check
-+
-+ ---
-+ ELV DCF7000: 127.127.8.12-15
-+ ELV DCF7000: end='\r', pattern=" - - - - - - - \r"
-+
-+ The ELV DCF7000 is a cheap DCF77 receiver sending each second
-+ a time code (though not very precise!) delimited by '`r'
-+
-+ Timecode
-+ YY-MM-DD-HH-MM-SS-FF\r
-+
-+ FF&0x1 - DST
-+ FF&0x2 - DST switch warning
-+ FF&0x4 - unsynchronised
-+
-diff -c parse/parsesolaris.c:1.1.1.5 parse/parsesolaris.c:3.11
-*** parse/parsesolaris.c:1.1.1.5 Wed Feb 2 18:14:49 1994
---- parse/parsesolaris.c Wed Feb 2 18:14:49 1994
-***************
-*** 65,71 ****
- {
- "parse", /* module name */
- &parseinfo, /* module information */
-! 0, /* not clean yet */
- /* lock ptr */
- };
-
---- 65,71 ----
- {
- "parse", /* module name */
- &parseinfo, /* module information */
-! D_NEW, /* not clean yet */
- /* lock ptr */
- };
-
-diff -c scripts/support/bin/monl:1.1.1.1 scripts/support/bin/monl:1.2
-*** scripts/support/bin/monl:1.1.1.1 Wed Feb 2 18:16:01 1994
---- scripts/support/bin/monl Wed Feb 2 18:16:01 1994
-***************
-*** 143,149 ****
- {
- chop;
- split;
-! ($host, $count, $mode, $version, $lasttime, $firsttime) = (@_[$[, $[+2 .. $[+6]);
-
- $Seen{$host, $mode} = 1;
-
---- 143,150 ----
- {
- chop;
- split;
-! ($host, $count, $mode, $version, $lasttime, $firsttime) =
-! (@_[$[, $[+2 .. $[+4, $#_-1,$#_]);
-
- $Seen{$host, $mode} = 1;
-
-diff -c util/tickadj.c:1.1.1.16 util/tickadj.c:3.17
-*** util/tickadj.c:1.1.1.16 Wed Feb 2 18:16:23 1994
---- util/tickadj.c Wed Feb 2 18:16:23 1994
-***************
-*** 1,4 ****
-! /* tickadj.c,v 3.1 1993/07/06 01:11:05 jbj Exp
- * tickadj - read, and possibly modify, the kernel `tick' and
- * `tickadj' variables, as well as `dosynctodr'. Note that
- * this operates on the running kernel only. I'd like to be
---- 1,4 ----
-! /*
- * tickadj - read, and possibly modify, the kernel `tick' and
- * `tickadj' variables, as well as `dosynctodr'. Note that
- * this operates on the running kernel only. I'd like to be
-***************
-*** 6,11 ****
---- 6,46 ----
- * mastered this yet.
- */
- #include <stdio.h>
-+
-+ #ifdef SYS_LINUX
-+ #include <sys/timex.h>
-+
-+ struct timex txc;
-+
-+ int
-+ main(int argc, char ** argv)
-+ {
-+ if (argc > 2)
-+ {
-+ fprintf(stderr, "Usage: %s [tick_value]\n", argv[0]);
-+ exit(-1);
-+ }
-+ else if (argc == 2)
-+ {
-+ if ( (txc.tick = atoi(argv[1])) < 1 )
-+ {
-+ fprintf(stderr, "Silly value for tick: %s\n", argv[1]);
-+ exit(-1);
-+ }
-+ txc.mode = ADJ_TICK;
-+ }
-+ else
-+ txc.mode = 0;
-+
-+ if (__adjtimex(&txc) < 0)
-+ perror("adjtimex");
-+ else
-+ printf("tick = %d\n", txc.tick);
-+
-+ return(0);
-+ }
-+ #else /* not Linux... kmem tweaking: */
-+
- #include <sys/types.h>
- #include <sys/file.h>
- #include <sys/stat.h>
-***************
-*** 513,515 ****
---- 548,551 ----
- exit(1);
- }
- }
-+ #endif /* not Linux */
-diff -c xntpd/ntp_config.c:1.1.1.19 xntpd/ntp_config.c:3.24
-*** xntpd/ntp_config.c:1.1.1.19 Wed Feb 2 18:16:36 1994
---- xntpd/ntp_config.c Wed Feb 2 18:16:37 1994
-***************
-*** 58,63 ****
---- 58,64 ----
- * statsdir /var/NTP/
- * filegen peerstats [ file peerstats ] [ type day ] [ link ]
- * resolver /path/progname
-+ * netlimit integer
- *
- * And then some. See the manual page.
- */
-***************
-*** 94,99 ****
---- 95,102 ----
- #define CONFIG_PIDFILE 25
- #define CONFIG_LOGFILE 26
- #define CONFIG_SETVAR 27
-+ #define CONFIG_CLIENTLIMIT 28
-+ #define CONFIG_CLIENTPERIOD 29
-
- #define CONF_MOD_VERSION 1
- #define CONF_MOD_KEY 2
-***************
-*** 114,119 ****
---- 117,123 ----
- #define CONF_RES_NOTRAP 8
- #define CONF_RES_LPTRAP 9
- #define CONF_RES_NTPPORT 10
-+ #define CONF_RES_LIMITED 11
-
- #define CONF_TRAP_PORT 1
- #define CONF_TRAP_INTERFACE 2
-***************
-*** 179,184 ****
---- 183,190 ----
- { "pidfile", CONFIG_PIDFILE },
- { "logfile", CONFIG_LOGFILE },
- { "setvar", CONFIG_SETVAR },
-+ { "clientlimit", CONFIG_CLIENTLIMIT },
-+ { "clientperiod", CONFIG_CLIENTPERIOD },
- { "", CONFIG_UNKNOWN }
- };
-
-***************
-*** 217,222 ****
---- 223,229 ----
- { "notrap", CONF_RES_NOTRAP },
- { "lowpriotrap", CONF_RES_LPTRAP },
- { "ntpport", CONF_RES_NTPPORT },
-+ { "limited", CONF_RES_LIMITED },
- { "", CONFIG_UNKNOWN }
- };
-
-***************
-*** 817,825 ****
- errflg = 0;
- if (ntokens >= 2) {
- if (STREQ(tokens[1], "yes"))
-! mon_start();
- else if (STREQ(tokens[1], "no"))
-! mon_stop();
- else
- errflg++;
- } else {
---- 824,832 ----
- errflg = 0;
- if (ntokens >= 2) {
- if (STREQ(tokens[1], "yes"))
-! mon_start(MON_ON);
- else if (STREQ(tokens[1], "no"))
-! mon_stop(MON_ON);
- else
- errflg++;
- } else {
-***************
-*** 965,970 ****
---- 972,981 ----
- peerkey |= RESM_NTPONLY;
- break;
-
-+ case CONF_RES_LIMITED:
-+ peerversion |= RES_LIMITED;
-+ break;
-+
- case CONFIG_UNKNOWN:
- errflg++;
- break;
-***************
-*** 1413,1418 ****
---- 1424,1483 ----
- set_sys_var(tokens[1], strlen(tokens[1])+1, RW |
- ((((ntokens > 2) && !strcmp(tokens[2], "default"))) ? DEF : 0));
- }
-+ break;
-+
-+ case CONFIG_CLIENTLIMIT:
-+ if (ntokens < 2)
-+ {
-+ syslog(LOG_ERR,
-+ "no value for clientlimit command - line ignored");
-+ }
-+ else
-+ {
-+ U_LONG i;
-+ if (!atouint(tokens[1], &i) || !i)
-+ {
-+ syslog(LOG_ERR,
-+ "illegal value for clientlimit command - line ignored");
-+ }
-+ else
-+ {
-+ extern U_LONG client_limit;
-+ char bp[80];
-+
-+ sprintf(bp, "client_limit=%d", i);
-+ set_sys_var(bp, strlen(bp)+1, RO);
-+
-+ client_limit = i;
-+ }
-+ }
-+ break;
-+
-+ case CONFIG_CLIENTPERIOD:
-+ if (ntokens < 2)
-+ {
-+ syslog(LOG_ERR,
-+ "no value for clientperiod command - line ignored");
-+ }
-+ else
-+ {
-+ U_LONG i;
-+ if (!atouint(tokens[1], &i) || i < 64)
-+ {
-+ syslog(LOG_ERR,
-+ "illegal value for clientperiod command - line ignored");
-+ }
-+ else
-+ {
-+ extern U_LONG client_limit_period;
-+ char bp[80];
-+
-+ sprintf(bp, "client_limit_period=%d", i);
-+ set_sys_var(bp, strlen(bp)+1, RO);
-+
-+ client_limit_period = i;
-+ }
-+ }
- break;
- }
- }
-diff -c xntpd/ntp_monitor.c:1.1.1.10 xntpd/ntp_monitor.c:3.9
-*** xntpd/ntp_monitor.c:1.1.1.10 Wed Feb 2 18:16:48 1994
---- xntpd/ntp_monitor.c Wed Feb 2 18:16:48 1994
-***************
-*** 58,64 ****
- static struct mon_data *mon_hash; /* Pointer to array of hash buckets */
- static int *mon_hash_count; /* Point to hash count stats keeper */
- struct mon_data mon_mru_list;
-!
- /*
- * List of free structures structures, and counters of free and total
- * structures. The free structures are linked with the hash_next field.
---- 58,64 ----
- static struct mon_data *mon_hash; /* Pointer to array of hash buckets */
- static int *mon_hash_count; /* Point to hash count stats keeper */
- struct mon_data mon_mru_list;
-! struct mon_data mon_fifo_list;
- /*
- * List of free structures structures, and counters of free and total
- * structures. The free structures are linked with the hash_next field.
-***************
-*** 93,99 ****
- * Don't do much of anything here. We don't allocate memory
- * until someone explicitly starts us.
- */
-! mon_enabled = 0;
- mon_have_memory = 0;
-
- mon_free_mem = 0;
---- 93,99 ----
- * Don't do much of anything here. We don't allocate memory
- * until someone explicitly starts us.
- */
-! mon_enabled = MON_OFF;
- mon_have_memory = 0;
-
- mon_free_mem = 0;
-***************
-*** 103,108 ****
---- 103,109 ----
- mon_hash = 0;
- mon_hash_count = 0;
- memset((char *)&mon_mru_list, 0, sizeof mon_mru_list);
-+ memset((char *)&mon_fifo_list, 0, sizeof mon_fifo_list);
- }
-
-
-***************
-*** 110,122 ****
- * mon_start - start up the monitoring software
- */
- void
-! mon_start()
- {
- register struct mon_data *md;
- register int i;
-
-! if (mon_enabled)
- return;
-
- if (!mon_have_memory) {
- mon_hash = (struct mon_data *)
---- 111,128 ----
- * mon_start - start up the monitoring software
- */
- void
-! mon_start(mode)
-! int mode;
- {
- register struct mon_data *md;
- register int i;
-
-! if (mon_enabled != MON_OFF) {
-! mon_enabled |= mode;
- return;
-+ }
-+ if (mode == MON_OFF)
-+ return; /* Ooops.. */
-
- if (!mon_have_memory) {
- mon_hash = (struct mon_data *)
-***************
-*** 142,148 ****
- mon_mru_list.mru_next = &mon_mru_list;
- mon_mru_list.mru_prev = &mon_mru_list;
-
-! mon_enabled = 1;
- }
-
-
---- 148,157 ----
- mon_mru_list.mru_next = &mon_mru_list;
- mon_mru_list.mru_prev = &mon_mru_list;
-
-! mon_fifo_list.fifo_next = &mon_fifo_list;
-! mon_fifo_list.fifo_prev = &mon_fifo_list;
-!
-! mon_enabled = mode;
- }
-
-
-***************
-*** 150,161 ****
- * mon_stop - stop the monitoring software
- */
- void
-! mon_stop()
- {
- register struct mon_data *md;
- register int i;
-
-! if (!mon_enabled)
- return;
-
- /*
---- 159,177 ----
- * mon_stop - stop the monitoring software
- */
- void
-! mon_stop(mode)
-! int mode;
- {
- register struct mon_data *md;
- register int i;
-
-! if (mon_enabled == MON_OFF)
-! return;
-! if ((mon_enabled & mode) == 0 || mode == MON_OFF)
-! return;
-!
-! mon_enabled &= ~mode;
-! if (mon_enabled != MON_OFF)
- return;
-
- /*
-***************
-*** 176,182 ****
- mon_mru_list.mru_next = &mon_mru_list;
- mon_mru_list.mru_prev = &mon_mru_list;
-
-! mon_enabled = 0;
- }
-
-
---- 192,199 ----
- mon_mru_list.mru_next = &mon_mru_list;
- mon_mru_list.mru_prev = &mon_mru_list;
-
-! mon_fifo_list.fifo_next = &mon_fifo_list;
-! mon_fifo_list.fifo_prev = &mon_fifo_list;
- }
-
-
-***************
-*** 194,200 ****
- register int mode;
- register struct mon_data *mdhash;
-
-! if (!mon_enabled)
- return;
-
- pkt = &rbufp->recv_pkt;
---- 211,217 ----
- register int mode;
- register struct mon_data *mdhash;
-
-! if (mon_enabled == MON_OFF)
- return;
-
- pkt = &rbufp->recv_pkt;
-***************
-*** 220,225 ****
---- 237,243 ----
- md->mru_prev = &mon_mru_list;
- mon_mru_list.mru_next->mru_prev = md;
- mon_mru_list.mru_next = md;
-+
- return;
- }
- md = md->hash_next;
-***************
-*** 240,245 ****
---- 258,269 ----
- md->hash_next->hash_prev = md->hash_prev;
- md->hash_prev->hash_next = md->hash_next;
- *(mon_hash_count + MON_HASH(md->rmtadr)) -= 1;
-+ /*
-+ * Get it from FIFO list
-+ */
-+ md->fifo_prev->fifo_next = md->fifo_next;
-+ md->fifo_next->fifo_prev = md->fifo_prev;
-+
- } else {
- if (mon_free_mem == 0)
- mon_getmoremem();
-***************
-*** 252,257 ****
---- 276,282 ----
- * Got one, initialize it
- */
- md->lasttime = md->firsttime = current_time;
-+ md->lastdrop = 0;
- md->count = 1;
- md->rmtadr = netnum;
- md->rmtport = NSRCPORT(&rbufp->recv_srcadr);
-***************
-*** 260,266 ****
-
- /*
- * Shuffle him into the hash table, inserting him at the
-! * end. Also put him on top of the MRU list.
- */
- mdhash = mon_hash + MON_HASH(netnum);
- md->hash_next = mdhash;
---- 285,292 ----
-
- /*
- * Shuffle him into the hash table, inserting him at the
-! * end. Also put him on top of the MRU list
-! * and at bottom of FIFO list
- */
- mdhash = mon_hash + MON_HASH(netnum);
- md->hash_next = mdhash;
-***************
-*** 273,278 ****
---- 299,309 ----
- md->mru_prev = &mon_mru_list;
- mon_mru_list.mru_next->mru_prev = md;
- mon_mru_list.mru_next = md;
-+
-+ md->fifo_prev = mon_fifo_list.fifo_prev;
-+ md->fifo_next = &mon_fifo_list;
-+ mon_fifo_list.fifo_prev->fifo_next = md;
-+ mon_fifo_list.fifo_prev = md;
- }
-
-
-diff -c xntpd/ntp_proto.c:1.1.1.19 xntpd/ntp_proto.c:3.21
-*** xntpd/ntp_proto.c:1.1.1.19 Wed Feb 2 18:16:51 1994
---- xntpd/ntp_proto.c Wed Feb 2 18:16:52 1994
-***************
-*** 49,54 ****
---- 49,55 ----
- U_LONG sys_processed; /* packets processed */
- U_LONG sys_badauth; /* packets dropped because of authorization */
- U_LONG sys_wanderhold; /* sys_peer held to prevent wandering */
-+ U_LONG sys_limitrejected; /* pkts rejected due toclient count per net */
-
- /*
- * Imported from ntp_timer.c
-***************
-*** 373,378 ****
---- 374,394 ----
- return;
-
- /*
-+ * See if we only accept limited number of clients
-+ * from the net this guy is from.
-+ * Note: the flag is determined dynamically within restrictions()
-+ */
-+ if (restrict & RES_LIMITED) {
-+ extern U_LONG client_limit;
-+
-+ sys_limitrejected++;
-+ syslog(LOG_NOTICE,
-+ "rejected mode %d request from %s - per net client limit (%d) exceeded",
-+ PKT_MODE(pkt->li_vn_mode),
-+ ntoa(&rbufp->recv_srcadr), client_limit);
-+ return;
-+ }
-+ /*
- * Dump anything with a putrid stratum. These will most likely
- * come from someone trying to poll us with ntpdc.
- */
-***************
-*** 2165,2168 ****
---- 2181,2185 ----
- sys_badauth = 0;
- sys_wanderhold = 0;
- sys_stattime = current_time;
-+ sys_limitrejected = 0;
- }
-diff -c xntpd/ntp_request.c:1.1.1.14 xntpd/ntp_request.c:3.15
-*** xntpd/ntp_request.c:1.1.1.14 Wed Feb 2 18:16:55 1994
---- xntpd/ntp_request.c Wed Feb 2 18:16:55 1994
-***************
-*** 916,921 ****
---- 916,922 ----
- extern U_LONG sys_processed;
- extern U_LONG sys_badauth;
- extern U_LONG sys_wanderhold;
-+ extern U_LONG sys_limitrejected;
-
- ss = (struct info_sys_stats *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_sys_stats));
-***************
-*** 930,936 ****
- ss->processed = htonl(sys_processed);
- ss->badauth = htonl(sys_badauth);
- ss->wanderhold = htonl(sys_wanderhold);
-!
- (void) more_pkt();
- flush_pkt();
- }
---- 931,937 ----
- ss->processed = htonl(sys_processed);
- ss->badauth = htonl(sys_badauth);
- ss->wanderhold = htonl(sys_wanderhold);
-! ss->limitrejected = htonl(sys_limitrejected);
- (void) more_pkt();
- flush_pkt();
- }
-***************
-*** 1311,1317 ****
- struct interface *inter;
- struct req_pkt *inpkt;
- {
-! mon_start();
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
- }
-
---- 1312,1318 ----
- struct interface *inter;
- struct req_pkt *inpkt;
- {
-! mon_start(MON_ON);
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
- }
-
-***************
-*** 1325,1331 ****
- struct interface *inter;
- struct req_pkt *inpkt;
- {
-! mon_stop();
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
- }
-
---- 1326,1332 ----
- struct interface *inter;
- struct req_pkt *inpkt;
- {
-! mon_stop(MON_ON);
- req_ack(srcadr, inter, inpkt, INFO_OKAY);
- }
-
-***************
-*** 1497,1502 ****
---- 1498,1507 ----
- md = md->mru_next) {
- im->lasttime = htonl(current_time - md->lasttime);
- im->firsttime = htonl(current_time - md->firsttime);
-+ if (md->lastdrop)
-+ im->lastdrop = htonl(current_time - md->lastdrop);
-+ else
-+ im->lastdrop = 0;
- im->count = htonl(md->count);
- im->addr = md->rmtadr;
- im->port = md->rmtport;
-diff -c xntpd/ntp_restrict.c:1.1.1.10 xntpd/ntp_restrict.c:3.10
-*** xntpd/ntp_restrict.c:1.1.1.10 Wed Feb 2 18:16:57 1994
---- xntpd/ntp_restrict.c Wed Feb 2 18:16:57 1994
-***************
-*** 1,4 ****
-! /* ntp_restrict.c,v 3.1 1993/07/06 01:11:28 jbj Exp
- * ntp_restrict.c - find out what restrictions this host is running under
- */
- #include <stdio.h>
---- 1,4 ----
-! /*
- * ntp_restrict.c - find out what restrictions this host is running under
- */
- #include <stdio.h>
-***************
-*** 60,65 ****
---- 60,80 ----
- U_LONG res_timereset;
-
- /*
-+ * Parameters of the RES_LIMITED restriction option.
-+ * client_limit is the number of hosts allowed per source net
-+ * client_limit_period is the number of seconds after which an entry
-+ * is no longer considered for client limit determination
-+ */
-+ U_LONG client_limit;
-+ U_LONG client_limit_period;
-+ /*
-+ * count number of restriction entries referring to RES_LIMITED
-+ * controls activation/deactivation of monitoring
-+ * (with respect ro RES_LIMITED control)
-+ */
-+ U_LONG res_limited_refcnt;
-+
-+ /*
- * Our initial allocation of list entries.
- */
- static struct restrictlist resinit[INITRESLIST];
-***************
-*** 70,81 ****
---- 85,102 ----
- extern U_LONG current_time;
-
- /*
-+ * debug flag
-+ */
-+ extern int debug;
-+
-+ /*
- * init_restrict - initialize the restriction data structures
- */
- void
- init_restrict()
- {
- register int i;
-+ char bp[80];
-
- /*
- * Zero the list and put all but one on the free list
-***************
-*** 108,113 ****
---- 129,146 ----
- res_found = 0;
- res_not_found = 0;
- res_timereset = 0;
-+
-+ /*
-+ * set default values for RES_LIMIT functionality
-+ */
-+ client_limit = 3;
-+ client_limit_period = 3600;
-+ res_limited_refcnt = 0;
-+
-+ sprintf(bp, "client_limit=%d", client_limit);
-+ set_sys_var(bp, strlen(bp)+1, RO);
-+ sprintf(bp, "client_limit_period=%d", client_limit_period);
-+ set_sys_var(bp, strlen(bp)+1, RO);
- }
-
-
-***************
-*** 150,155 ****
---- 183,302 ----
- else
- res_found++;
-
-+ /*
-+ * The following implements limiting the number of clients
-+ * accepted from a given network. The notion of "same network"
-+ * is determined by the mask and addr fields of the restrict
-+ * list entry. The monitor mechanism has to be enabled for
-+ * collecting info on current clients.
-+ *
-+ * The policy is as follows:
-+ * - take the list of clients recorded
-+ * from the given "network" seen within the last
-+ * client_limit_period seconds
-+ * - if there are at most client_limit entries:
-+ * --> access allowed
-+ * - otherwise sort by time first seen
-+ * - current client among the first client_limit seen
-+ * hosts?
-+ * if yes: access allowed
-+ * else: eccess denied
-+ */
-+ if (match->flags & RES_LIMITED) {
-+ int lcnt;
-+ struct mon_data *md, *this_client;
-+ extern int mon_enabled;
-+ extern struct mon_data mon_fifo_list, mon_mru_list;
-+
-+ #ifdef DEBUG
-+ if (debug > 2)
-+ printf("limited clients check: %d clients, period %d seconds, net is 0x%X\n",
-+ client_limit, client_limit_period,
-+ netof(hostaddr));
-+ #endif /*DEBUG*/
-+ if (mon_enabled == MON_OFF) {
-+ #ifdef DEBUG
-+ if (debug > 4)
-+ printf("no limit - monitoring is off\n");
-+ #endif
-+ return (int)(match->flags & ~RES_LIMITED);
-+ }
-+
-+ /*
-+ * How nice, MRU list provides our current client as the
-+ * first entry in the list.
-+ * Monitoring was verified to be active above, thus we
-+ * know an entry for our client must exist, or some
-+ * brain dead set the memory limit for mon entries to ZERO!!!
-+ */
-+ this_client = mon_mru_list.mru_next;
-+
-+ for (md = mon_fifo_list.fifo_next,lcnt = 0;
-+ md != &mon_fifo_list;
-+ md = md->fifo_next) {
-+ if ((current_time - md->lasttime)
-+ > client_limit_period) {
-+ #ifdef DEBUG
-+ if (debug > 5)
-+ printf("checking: %s: ignore: too old: %d\n",
-+ numtoa(md->rmtadr),
-+ current_time - md->lasttime);
-+ #endif
-+ continue;
-+ }
-+ if (md->mode == MODE_BROADCAST ||
-+ md->mode == MODE_CONTROL ||
-+ md->mode == MODE_PRIVATE) {
-+ #ifdef DEBUG
-+ if (debug > 5)
-+ printf("checking: %s: ignore mode %d\n",
-+ numtoa(md->rmtadr),
-+ md->mode);
-+ #endif
-+ continue;
-+ }
-+ if (netof(md->rmtadr) !=
-+ netof(hostaddr)) {
-+ #ifdef DEBUG
-+ if (debug > 5)
-+ printf("checking: %s: different net 0x%X\n",
-+ numtoa(md->rmtadr),
-+ netof(md->rmtadr));
-+ #endif
-+ continue;
-+ }
-+ lcnt++;
-+ if (lcnt > client_limit ||
-+ md->rmtadr == hostaddr) {
-+ #ifdef DEBUG
-+ if (debug > 5)
-+ printf("considering %s: found host\n",
-+ numtoa(md->rmtadr));
-+ #endif
-+ break;
-+ }
-+ #ifdef DEBUG
-+ else {
-+ if (debug > 5)
-+ printf("considering %s: same net\n",
-+ numtoa(md->rmtadr));
-+ }
-+ #endif
-+
-+ }
-+ #ifdef DEBUG
-+ if (debug > 4)
-+ printf("this one is rank %d in list, limit is %d: %s\n",
-+ lcnt, client_limit,
-+ (lcnt <= client_limit) ? "ALLOW" : "REJECT");
-+ #endif
-+ if (lcnt <= client_limit) {
-+ this_client->lastdrop = 0;
-+ return (int)(match->flags & ~RES_LIMITED);
-+ } else {
-+ this_client->lastdrop = current_time;
-+ }
-+ }
- return (int)match->flags;
- }
-
-***************
-*** 257,262 ****
---- 404,413 ----
- rlprev->next = rl;
- restrictcount++;
- }
-+ if ((rl->flags ^ (u_short)flags) & RES_LIMITED) {
-+ res_limited_refcnt++;
-+ mon_start(MON_RES); /* ensure data gets collected */
-+ }
- rl->flags |= (u_short)flags;
- break;
-
-***************
-*** 265,272 ****
- * Remove some bits from the flags. If we didn't
- * find this one, just return.
- */
-! if (rl != 0)
- rl->flags &= (u_short)~flags;
- break;
-
- case RESTRICT_REMOVE:
---- 416,429 ----
- * Remove some bits from the flags. If we didn't
- * find this one, just return.
- */
-! if (rl != 0) {
-! if ((rl->flags ^ (u_short)flags) & RES_LIMITED) {
-! res_limited_refcnt--;
-! if (res_limited_refcnt == 0)
-! mon_stop(MON_RES);
-! }
- rl->flags &= (u_short)~flags;
-+ }
- break;
-
- case RESTRICT_REMOVE:
-***************
-*** 280,285 ****
---- 437,447 ----
- && !(rl->mflags & RESM_INTERFACE)) {
- rlprev->next = rl->next;
- restrictcount--;
-+ if (rl->flags & RES_LIMITED) {
-+ res_limited_refcnt--;
-+ if (res_limited_refcnt == 0)
-+ mon_stop(MON_RES);
-+ }
- memset((char *)rl, 0, sizeof(struct restrictlist));
-
- rl->next = resfree;
-diff -c xntpd/ntp_unixclock.c:1.1.1.27 xntpd/ntp_unixclock.c:3.29
-*** xntpd/ntp_unixclock.c:1.1.1.27 Wed Feb 2 18:17:00 1994
---- xntpd/ntp_unixclock.c Wed Feb 2 18:17:01 1994
-***************
-*** 556,568 ****
- #endif /* SOLARIS */
-
- #ifdef SYS_LINUX
-! /* XXX should look this up somewhere ! */
- static void
- clock_parms(tickadj, tick)
- U_LONG *tickadj;
- U_LONG *tick;
- {
-! *tickadj = (U_LONG)1;
-! *tick = (U_LONG)10000;
- }
- #endif /* SYS_LINUX */
---- 556,573 ----
- #endif /* SOLARIS */
-
- #ifdef SYS_LINUX
-! #include <sys/timex.h>
- static void
- clock_parms(tickadj, tick)
- U_LONG *tickadj;
- U_LONG *tick;
- {
-! struct timex txc;
-!
-! txc.mode = 0;
-! __adjtimex(&txc);
-!
-! *tickadj = (U_LONG)1; /* our adjtime is accurate */
-! *tick = (U_LONG)txc.tick;
- }
- #endif /* SYS_LINUX */
-diff -c xntpdc/ntpdc_ops.c:1.1.1.12 xntpdc/ntpdc_ops.c:3.16
-*** xntpdc/ntpdc_ops.c:1.1.1.12 Wed Feb 2 18:17:35 1994
---- xntpdc/ntpdc_ops.c Wed Feb 2 18:17:36 1994
-***************
-*** 846,853 ****
- if (!check1item(items, fp))
- return;
-
-! if (!checkitemsize(itemsize, sizeof(struct info_sys_stats)))
- return;
-
- (void) fprintf(fp, "system uptime: %d\n",
- ntohl(ss->timeup));
---- 846,857 ----
- if (!check1item(items, fp))
- return;
-
-! if (itemsize != sizeof(struct info_sys_stats) &&
-! itemsize != sizeof(struct old_info_sys_stats)) {
-! /* issue warning according to new structure size */
-! checkitemsize(itemsize, sizeof(struct info_sys_stats));
- return;
-+ }
-
- (void) fprintf(fp, "system uptime: %d\n",
- ntohl(ss->timeup));
-***************
-*** 869,874 ****
---- 873,883 ----
- ntohl(ss->badauth));
- (void) fprintf(fp, "wander hold downs: %d\n",
- ntohl(ss->wanderhold));
-+ if (itemsize != sizeof(struct info_sys_stats))
-+ return;
-+
-+ (void) fprintf(fp, "limitation rejects: %d\n",
-+ ntohl(ss->limitrejected));
- }
-
-
-***************
-*** 1243,1248 ****
---- 1252,1258 ----
- { "nopeer", RES_NOPEER },
- { "notrap", RES_NOTRAP },
- { "lptrap", RES_LPTRAP },
-+ { "limited", RES_LIMITED },
- { "", 0 }
- };
-
-***************
-*** 1463,1468 ****
---- 1473,1479 ----
- FILE *fp;
- {
- struct info_monitor *ml;
-+ struct old_info_monitor *oml;
- int items;
- int itemsize;
- int res;
-***************
-*** 1476,1498 ****
- if (!checkitems(items, fp))
- return;
-
-! if (!checkitemsize(itemsize, sizeof(struct info_monitor)))
-! return;
-
-! (void) fprintf(fp,
-! " address port count mode version lasttime firsttime\n");
-! (void) fprintf(fp,
-! "=====================================================================\n");
-! while (items > 0) {
-! (void) fprintf(fp, "%-20.20s %5d %9d %4d %3d %9u %9u\n",
-! nntohost(ml->addr),
-! ntohs(ml->port),
-! ntohl(ml->count),
-! ml->mode, ml->version,
-! ntohl(ml->lasttime),
-! ntohl(ml->firsttime));
-! ml++;
-! items--;
- }
- }
-
---- 1487,1535 ----
- if (!checkitems(items, fp))
- return;
-
-! if (itemsize == sizeof(struct info_monitor)) {
-
-! (void) fprintf(fp,
-! " address port count mode version lastdrop lasttime firsttime\n");
-! (void) fprintf(fp,
-! "===============================================================================\n");
-! while (items > 0) {
-! (void) fprintf(fp, "%-20.20s %5d %9d %4d %3d %9u %9u %9u\n",
-! nntohost(ml->addr),
-! ntohs(ml->port),
-! ntohl(ml->count),
-! ml->mode,
-! ml->version,
-! ntohl(ml->lastdrop),
-! ntohl(ml->lasttime),
-! ntohl(ml->firsttime));
-! ml++;
-! items--;
-! }
-! } else {
-! if (itemsize != sizeof(struct old_info_monitor)) {
-! /* issue warning according to new info_monitor size */
-! checkitemsize(itemsize, sizeof(struct info_monitor));
-! return;
-! }
-!
-! oml = (struct old_info_monitor *)ml;
-! (void) fprintf(fp,
-! " address port count mode version lasttime firsttime\n");
-! (void) fprintf(fp,
-! "======================================================================\n");
-! while (items > 0) {
-! (void) fprintf(fp, "%-20.20s %5d %9d %4d %3d %9u %9u\n",
-! nntohost(oml->addr),
-! ntohs(oml->port),
-! ntohl(oml->count),
-! oml->mode,
-! oml->version,
-! ntohl(oml->lasttime),
-! ntohl(oml->firsttime));
-! oml++;
-! items--;
-! }
- }
- }
-
diff --git a/usr.sbin/xntpd/patches/patch.11 b/usr.sbin/xntpd/patches/patch.11
deleted file mode 100644
index 8554d88fae5e..000000000000
--- a/usr.sbin/xntpd/patches/patch.11
+++ /dev/null
@@ -1,536 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa05908; 9 Feb 94 18:18 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa21398;
- 9 Feb 94 18:13 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA29809 (5.65c-6/7.3v-FAU); Thu, 10 Feb 1994 00:12:50 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA11633 (5.65c-6/7.3m-FAU); Thu, 10 Feb 1994 00:12:46 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199402092312.AA11633@faui43.informatik.uni-erlangen.de>
-Subject: .zz Patches
-To: Mills@udel.edu
-Date: Thu, 10 Feb 94 0:12:41 MET
-Cc: Frank.Kardel@informatik.uni-erlangen.de,
- Paul_Vixie@corpmis.sjc.hw.sony.com, Piete.Brooks@cl.cam.ac.uk
-X-Mailer: ELM [version 2.3 PL11]
-
-Guys,
-
-Ok, here are some patches (including some WWVB cleanup 8-) relative
-to the zz version. The KERNEL stuff in ntp_timex.h must still
-be resolved.
-
-diff -c Makefile:1.1.1.11 Makefile:3.46
-*** Makefile:1.1.1.11 Wed Feb 9 23:54:57 1994
---- Makefile Wed Feb 9 23:54:57 1994
-***************
-*** 162,168 ****
- FRC:
-
- savebin:
-! @test -d bin || mkdir bin
- @echo
- @echo '### saving $(TARGETS) $(OPTTARG) in bin'
- -@for f in $(TARGETS) $(OPTTARG); \
---- 162,168 ----
- FRC:
-
- savebin:
-! -@test -d bin || mkdir bin
- @echo
- @echo '### saving $(TARGETS) $(OPTTARG) in bin'
- -@for f in $(TARGETS) $(OPTTARG); \
-diff -c include/ntp_machine.h:1.1.1.11 include/ntp_machine.h:1.27
-*** include/ntp_machine.h:1.1.1.11 Wed Feb 9 23:56:27 1994
---- include/ntp_machine.h Wed Feb 9 23:56:27 1994
-***************
-*** 274,280 ****
- #ifndef STR_SYSTEM
- #define STR_SYSTEM "UNIX/Ultrix"
- #endif
-- #define HAVE_TERMIOS
- #endif
-
- /*
---- 274,279 ----
-diff -c lib/systime.c:1.1.1.11 lib/systime.c:1.9
-*** lib/systime.c:1.1.1.11 Wed Feb 9 23:57:45 1994
---- lib/systime.c Wed Feb 9 23:57:45 1994
-***************
-*** 47,58 ****
- * We also remember the clock precision we computed from the kernel in
- * case someone asks us.
- */
- LONG adj_precision; /* adj precision in usec (tickadj) */
- LONG tvu_maxslew; /* maximum adjust doable in 1<<CLOCK_ADJ sec (usec) */
-
- U_LONG tsf_maxslew; /* same as above, as LONG format */
-
-- LONG sys_clock;
- l_fp sys_clock_offset; /* correction for current system time */
-
- /*
---- 47,59 ----
- * We also remember the clock precision we computed from the kernel in
- * case someone asks us.
- */
-+ LONG sys_clock;
-+
- LONG adj_precision; /* adj precision in usec (tickadj) */
- LONG tvu_maxslew; /* maximum adjust doable in 1<<CLOCK_ADJ sec (usec) */
-
- U_LONG tsf_maxslew; /* same as above, as LONG format */
-
- l_fp sys_clock_offset; /* correction for current system time */
-
- /*
-diff -c machines/sunos4.bsd:1.1.1.3 machines/sunos4.bsd:1.3
-*** machines/sunos4.bsd:1.1.1.3 Wed Feb 9 23:58:15 1994
---- machines/sunos4.bsd Wed Feb 9 23:58:15 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_SUNOS4
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS= -lkvm
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_SUNOS4 -DHAVE_BSD_TTYS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS= -lkvm
-diff -c machines/ultrix.bsd:1.1.1.2 machines/ultrix.bsd:1.3
-*** machines/ultrix.bsd:1.1.1.2 Wed Feb 9 23:58:19 1994
---- machines/ultrix.bsd Wed Feb 9 23:58:19 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_ULTRIX
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_ULTRIX -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/ultrix.posix:1.1.1.2 machines/ultrix.posix:1.3
-*** machines/ultrix.posix:1.1.1.2 Wed Feb 9 23:58:20 1994
---- machines/ultrix.posix Wed Feb 9 23:58:20 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_ULTRIX -DNTP_POSIX_SOURCE -DHAVE_SIGNALED_IO
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_ULTRIX -DNTP_POSIX_SOURCE -DHAVE_SIGNALED_IO -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c parse/clk_dcf7000.c:1.1.1.8 parse/clk_dcf7000.c:3.11
-*** parse/clk_dcf7000.c:1.1.1.8 Wed Feb 9 23:58:51 1994
---- parse/clk_dcf7000.c Wed Feb 9 23:58:51 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_DCF7000)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_dcf7000.c,v 3.10 1994/01/25 19:05:07 kardel Exp
- *
-! * clk_dcf7000.c,v 3.10 1994/01/25 19:05:07 kardel Exp
- *
- * ELV DCF7000 module
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_DCF7000)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_dcf7000.c,v 3.11 1994/02/02 17:45:14 kardel Exp
- *
-! * clk_dcf7000.c,v 3.11 1994/02/02 17:45:14 kardel Exp
- *
- * ELV DCF7000 module
- *
-***************
-*** 121,126 ****
---- 121,129 ----
- * History:
- *
- * clk_dcf7000.c,v
-+ * Revision 3.11 1994/02/02 17:45:14 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.6 1993/10/09 15:01:27 kardel
- * file structure unified
- *
-diff -c parse/clk_meinberg.c:1.1.1.8 parse/clk_meinberg.c:3.13
-*** parse/clk_meinberg.c:1.1.1.8 Wed Feb 9 23:58:53 1994
---- parse/clk_meinberg.c Wed Feb 9 23:58:53 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_MEINBERG)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_meinberg.c,v 3.11 1994/01/25 19:05:10 kardel Exp
- *
-! * clk_meinberg.c,v 3.11 1994/01/25 19:05:10 kardel Exp
- *
- * Meinberg clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_MEINBERG)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_meinberg.c,v 3.13 1994/02/02 17:45:21 kardel Exp
- *
-! * clk_meinberg.c,v 3.13 1994/02/02 17:45:21 kardel Exp
- *
- * Meinberg clock support
- *
-***************
-*** 414,419 ****
---- 414,422 ----
- * History:
- *
- * clk_meinberg.c,v
-+ * Revision 3.13 1994/02/02 17:45:21 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.11 1994/01/25 19:05:10 kardel
- * 94/01/23 reconcilation
- *
-diff -c parse/clk_rawdcf.c:1.1.1.8 parse/clk_rawdcf.c:3.11
-*** parse/clk_rawdcf.c:1.1.1.8 Wed Feb 9 23:58:54 1994
---- parse/clk_rawdcf.c Wed Feb 9 23:58:54 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_RAWDCF)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v 3.9 1994/01/25 19:05:12 kardel Exp
- *
-! * clk_rawdcf.c,v 3.9 1994/01/25 19:05:12 kardel Exp
- *
- * Raw DCF77 pulse clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_RAWDCF)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v 3.11 1994/02/02 17:45:23 kardel Exp
- *
-! * clk_rawdcf.c,v 3.11 1994/02/02 17:45:23 kardel Exp
- *
- * Raw DCF77 pulse clock support
- *
-***************
-*** 529,534 ****
---- 529,537 ----
- * History:
- *
- * clk_rawdcf.c,v
-+ * Revision 3.11 1994/02/02 17:45:23 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.9 1994/01/25 19:05:12 kardel
- * 94/01/23 reconcilation
- *
-diff -c parse/clk_schmid.c:1.1.1.8 parse/clk_schmid.c:3.12
-*** parse/clk_schmid.c:1.1.1.8 Wed Feb 9 23:58:55 1994
---- parse/clk_schmid.c Wed Feb 9 23:58:55 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_SCHMID)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_schmid.c,v 3.10 1994/01/25 19:05:15 kardel Exp
- *
-! * clk_schmid.c,v 3.10 1994/01/25 19:05:15 kardel Exp
- *
- * Schmid clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_SCHMID)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_schmid.c,v 3.12 1994/02/02 17:45:25 kardel Exp
- *
-! * clk_schmid.c,v 3.12 1994/02/02 17:45:25 kardel Exp
- *
- * Schmid clock support
- *
-***************
-*** 168,173 ****
---- 168,176 ----
- * History:
- *
- * clk_schmid.c,v
-+ * Revision 3.12 1994/02/02 17:45:25 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.10 1994/01/25 19:05:15 kardel
- * 94/01/23 reconcilation
- *
-diff -c parse/clk_trimble.c:1.1.1.3 parse/clk_trimble.c:3.9
-*** parse/clk_trimble.c:1.1.1.3 Wed Feb 9 23:58:56 1994
---- parse/clk_trimble.c Wed Feb 9 23:58:57 1994
-***************
-*** 1,6 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_TRIMSV6)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_trimble.c,v 3.7 1994/01/25 19:05:17 kardel Exp
- *
- * Trimble SV6 clock support
- */
---- 1,6 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_TRIMSV6)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_trimble.c,v 3.9 1994/02/02 17:45:27 kardel Exp
- *
- * Trimble SV6 clock support
- */
-***************
-*** 106,111 ****
---- 106,114 ----
- * History:
- *
- * clk_trimble.c,v
-+ * Revision 3.9 1994/02/02 17:45:27 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.7 1994/01/25 19:05:17 kardel
- * 94/01/23 reconcilation
- *
-diff -c parse/parse.c:1.1.1.8 parse/parse.c:3.21
-*** parse/parse.c:1.1.1.8 Wed Feb 9 23:58:59 1994
---- parse/parse.c Wed Feb 9 23:59:00 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.19 1994/01/25 19:05:20 kardel Exp
- *
-! * parse.c,v 3.19 1994/01/25 19:05:20 kardel Exp
- *
- * Parser module for reference clock
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.21 1994/02/02 17:45:30 kardel Exp
- *
-! * parse.c,v 3.21 1994/02/02 17:45:30 kardel Exp
- *
- * Parser module for reference clock
- *
-***************
-*** 1148,1153 ****
---- 1148,1156 ----
- * History:
- *
- * parse.c,v
-+ * Revision 3.21 1994/02/02 17:45:30 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.19 1994/01/25 19:05:20 kardel
- * 94/01/23 reconcilation
- *
-diff -c parse/parse_conf.c:1.1.1.8 parse/parse_conf.c:3.15
-*** parse/parse_conf.c:1.1.1.8 Wed Feb 9 23:59:01 1994
---- parse/parse_conf.c Wed Feb 9 23:59:01 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse_conf.c,v 3.13 1994/01/25 19:05:23 kardel Exp
- *
-! * parse_conf.c,v 3.13 1994/01/25 19:05:23 kardel Exp
- *
- * Parser configuration module for reference clocks
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse_conf.c,v 3.15 1994/02/02 17:45:32 kardel Exp
- *
-! * parse_conf.c,v 3.15 1994/02/02 17:45:32 kardel Exp
- *
- * Parser configuration module for reference clocks
- *
-***************
-*** 81,86 ****
---- 81,89 ----
- * History:
- *
- * parse_conf.c,v
-+ * Revision 3.15 1994/02/02 17:45:32 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.13 1994/01/25 19:05:23 kardel
- * 94/01/23 reconcilation
- *
-diff -c parse/parsesolaris.c:1.1.1.6 parse/parsesolaris.c:3.12
-*** parse/parsesolaris.c:1.1.1.6 Wed Feb 9 23:59:02 1994
---- parse/parsesolaris.c Wed Feb 9 23:59:02 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v 3.9 1994/01/25 19:05:26 kardel Exp
- *
-! * parsesolaris.c,v 3.9 1994/01/25 19:05:26 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS5.x - not fully tested - buyer beware ! - OS KILLERS may still be
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v 3.12 1994/02/02 17:45:35 kardel Exp
- *
-! * parsesolaris.c,v 3.12 1994/02/02 17:45:35 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS5.x - not fully tested - buyer beware ! - OS KILLERS may still be
-***************
-*** 139,145 ****
- /*ARGSUSED*/
- int _init(void)
- {
-! static char revision[] = "3.9";
- char *s, *S, *t;
-
- /*
---- 139,145 ----
- /*ARGSUSED*/
- int _init(void)
- {
-! static char revision[] = "3.12";
- char *s, *S, *t;
-
- /*
-***************
-*** 1179,1184 ****
---- 1179,1187 ----
- * History:
- *
- * parsesolaris.c,v
-+ * Revision 3.12 1994/02/02 17:45:35 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.9 1994/01/25 19:05:26 kardel
- * 94/01/23 reconcilation
- *
-diff -c parse/parsestreams.c:1.1.1.7 parse/parsestreams.c:3.14
-*** parse/parsestreams.c:1.1.1.7 Wed Feb 9 23:59:03 1994
---- parse/parsestreams.c Wed Feb 9 23:59:04 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.12 1994/01/25 19:05:30 kardel Exp
- *
-! * parsestreams.c,v 3.12 1994/01/25 19:05:30 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.14 1994/02/02 17:45:38 kardel Exp
- *
-! * parsestreams.c,v 3.14 1994/02/02 17:45:38 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
-***************
-*** 1258,1263 ****
---- 1258,1266 ----
- * History:
- *
- * parsestreams.c,v
-+ * Revision 3.14 1994/02/02 17:45:38 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.12 1994/01/25 19:05:30 kardel
- * 94/01/23 reconcilation
- *
-diff -c xntpd/ntp_proto.c:1.1.1.20 xntpd/ntp_proto.c:3.22
-*** xntpd/ntp_proto.c:1.1.1.20 Thu Feb 10 00:00:36 1994
---- xntpd/ntp_proto.c Thu Feb 10 00:00:36 1994
-***************
-*** 25,31 ****
- l_fp sys_refskew; /* accumulated skew since last update */
- struct peer *sys_peer; /* our current peer */
- u_char sys_poll; /* log2 of desired system poll interval */
-! LONG sys_clock; /* second part of current time */
- LONG sys_lastselect; /* sys_clock at last synch-dist update */
-
- /*
---- 25,31 ----
- l_fp sys_refskew; /* accumulated skew since last update */
- struct peer *sys_peer; /* our current peer */
- u_char sys_poll; /* log2 of desired system poll interval */
-! extern LONG sys_clock; /* second part of current time - now in systime.c */
- LONG sys_lastselect; /* sys_clock at last synch-dist update */
-
- /*
-diff -c xntpd/ntpd.c:1.1.1.28 xntpd/ntpd.c:3.32
-*** xntpd/ntpd.c:1.1.1.28 Thu Feb 10 00:00:43 1994
---- xntpd/ntpd.c Thu Feb 10 00:00:43 1994
-***************
-*** 139,145 ****
- (void) dup2(0, 1);
- (void) dup2(0, 2);
- #ifdef NTP_POSIX_SOURCE
-! #if defined(SOLARIS) || defined(SYS_PTX) || defined(SYS_AUX3) || defined(SYS_AIX)
- (void) setsid();
- #else
- (void) setpgid(0, 0);
---- 139,145 ----
- (void) dup2(0, 1);
- (void) dup2(0, 2);
- #ifdef NTP_POSIX_SOURCE
-! #if defined(SOLARIS) || defined(SYS_PTX) || defined(SYS_AUX3) || defined(SYS_AIX) || defined(SYS_ULTRIX)
- (void) setsid();
- #else
- (void) setpgid(0, 0);
-diff -c xntpd/refclock_parse.c:1.1.1.10 xntpd/refclock_parse.c:3.47
-*** xntpd/refclock_parse.c:1.1.1.10 Thu Feb 10 00:00:54 1994
---- xntpd/refclock_parse.c Thu Feb 10 00:00:54 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.45 1994/01/25 19:06:27 kardel Exp
- *
-! * refclock_parse.c,v 3.45 1994/01/25 19:06:27 kardel Exp
- *
- * generic reference clock driver for receivers
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.47 1994/02/02 17:44:30 kardel Exp
- *
-! * refclock_parse.c,v 3.47 1994/02/02 17:44:30 kardel Exp
- *
- * generic reference clock driver for receivers
- *
-***************
-*** 3396,3401 ****
---- 3396,3404 ----
- * History:
- *
- * refclock_parse.c,v
-+ * Revision 3.47 1994/02/02 17:44:30 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.45 1994/01/25 19:06:27 kardel
- * 94/01/23 reconcilation
- *
-
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.12 b/usr.sbin/xntpd/patches/patch.12
deleted file mode 100644
index 9d7db0f15faf..000000000000
--- a/usr.sbin/xntpd/patches/patch.12
+++ /dev/null
@@ -1,66 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa16020; 11 Feb 94 10:28 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa27338;
- 11 Feb 94 10:12 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA00715 (5.65c-6/7.3v-FAU); Fri, 11 Feb 1994 14:26:34 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA24390 (5.65c-6/7.3m-FAU); Fri, 11 Feb 1994 14:26:31 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199402111326.AA24390@faui43.informatik.uni-erlangen.de>
-Subject: Re: Beep, beep, beep
-To: Mills@udel.edu
-Date: Fri, 11 Feb 94 14:26:25 MET
-Cc: Frank.Kardel@informatik.uni-erlangen.de,
- Paul_Vixie@corpmis.sjc.hw.sony.com, Piete.Brooks@cl.cam.ac.uk
-In-Reply-To: <9402101138.aa10259@huey.udel.edu>; from "Mills@udel.edu" at Feb 10, 94 11:38 am
-X-Mailer: ELM [version 2.3 PL11]
-
-
-> Frank,
-
-> In the latest xntp3.3zz.tar.Z the Ultrix kernel finds joy of clock.
-> (Whew).
-
-Ok, I just dug out an old allocation failure in xntpdc. While
-reading respones the input buffer might be realloced(and MOVED) without
-telling the rest of the system. This was fatal when stdio needed a
-buffer for non terminal operation. Net result was confused output.
-
-Ok, here ist the patch:
-
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/xntpdc/ntpdc.c,v
-retrieving revision 3.17
-diff -c -r3.17 xntpdc/ntpdc.c
-*** xntpdc/ntpdc.c:3.17 1994/01/28 14:07:13
---- xntpdc/ntpdc.c 1994/02/11 13:20:56
-***************
-*** 598,605 ****
- /*
- * So far, so good. Copy this data into the output array.
- */
-! if ((datap + datasize) > (pktdata + pktdatasize))
- growpktdata();
- memmove(datap, (char *)rpkt.data, datasize);
- datap += datasize;
- if (firstpkt) {
---- 598,609 ----
- /*
- * So far, so good. Copy this data into the output array.
- */
-! if ((datap + datasize) > (pktdata + pktdatasize)) {
-! int offset = datap - pktdata;
- growpktdata();
-+ *rdata = pktdata; /* might have been realloced ! */
-+ datap = pktdata + offset;
-+ }
- memmove(datap, (char *)rpkt.data, datasize);
- datap += datasize;
- if (firstpkt) {
-
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.13 b/usr.sbin/xntpd/patches/patch.13
deleted file mode 100644
index 17363e24ed0b..000000000000
--- a/usr.sbin/xntpd/patches/patch.13
+++ /dev/null
@@ -1,68 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id af16153; 14 Feb 94 7:27 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa27498;
- 13 Feb 94 13:23 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA22387 (5.65c-6/7.3v-FAU); Sun, 13 Feb 1994 19:22:59 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA27117 (5.65c-6/7.3m-FAU); Sun, 13 Feb 1994 19:22:57 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199402131822.AA27117@faui43.informatik.uni-erlangen.de>
-Subject: compilation setup for solaris
-To: mills@udel.edu
-Date: Sun, 13 Feb 94 19:22:53 MET
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi, Dave.
-
-Just to remove some compilation noise in solaris (NTP_POSIX_SOURCE
-redefined):
-
-For 3.3e:
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/machines/sunos5.1,v
-retrieving revision 1.4
-diff -c -r1.4 machines/sunos5.1
-*** machines/sunos5.1:1.4 1994/02/01 23:30:54
---- machines/sunos5.1 1994/02/13 18:16:24
-***************
-*** 1,6 ****
- RANLIB= :
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSTREAM -DSOLARIS -DSYS_SOLARIS -DNTP_POSIX_SOURCE
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= :
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSTREAM -DSOLARIS -DSYS_SOLARIS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/machines/sunos5.2,v
-retrieving revision 1.4
-diff -c -r1.4 machines/sunos5.2
-*** machines/sunos5.2:1.4 1994/02/01 23:30:56
---- machines/sunos5.2 1994/02/13 18:16:27
-***************
-*** 1,6 ****
- RANLIB= :
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSTREAM -DSOLARIS -DSYS_SOLARIS -DADJTIME_IS_ACCURATE -DNTP_POSIX_SOURCE
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= :
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSTREAM -DSOLARIS -DSYS_SOLARIS -DADJTIME_IS_ACCURATE
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.14 b/usr.sbin/xntpd/patches/patch.14
deleted file mode 100644
index 775f9dae7e94..000000000000
--- a/usr.sbin/xntpd/patches/patch.14
+++ /dev/null
@@ -1,116 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa16187; 14 Feb 94 7:27 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa27096;
- 13 Feb 94 13:04 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA21590 (5.65c-6/7.3v-FAU); Sun, 13 Feb 1994 19:04:48 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA26947 (5.65c-6/7.3m-FAU); Sun, 13 Feb 1994 19:04:46 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199402131804.AA26947@faui43.informatik.uni-erlangen.de>
-Subject: patches for 3.3e
-To: mills@udel.edu
-Date: Sun, 13 Feb 94 19:04:42 MET
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi, Dave.
-
-Here is something to make Sequent PTX happier.
-I also changed the version number from 3.3zz to 3.3e.
-The patch is relative to the current 3.3e version.
-
-diff -c Makefile:1.1.1.12 Makefile:3.47
-*** Makefile:1.1.1.12 Sun Feb 13 18:53:06 1994
---- Makefile Sun Feb 13 18:53:07 1994
-***************
-*** 144,150 ****
- @echo '###' creating XNTPRES utility
- @cd xntpres && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)"
-
-! util/tickadj: util/Makefile FRC
- @echo
- @echo '###' creating TICKADJ utility
- @cd util && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)"
---- 144,150 ----
- @echo '###' creating XNTPRES utility
- @cd xntpres && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)"
-
-! util/tickadj: util/Makefile lib/libntp.a FRC
- @echo
- @echo '###' creating TICKADJ utility
- @cd util && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)"
-diff -c VERSION:1.1.1.7 VERSION:3.12
-*** VERSION:1.1.1.7 Sun Feb 13 18:53:10 1994
---- VERSION Sun Feb 13 18:53:10 1994
-***************
-*** 1 ****
-! version=3.3zz (beta)
---- 1 ----
-! version=3.3e (beta)
-diff -c authstuff/Makefile.tmpl:1.1.1.9 authstuff/Makefile.tmpl:3.12
-*** authstuff/Makefile.tmpl:1.1.1.9 Sun Feb 13 18:53:18 1994
---- authstuff/Makefile.tmpl Sun Feb 13 18:53:18 1994
-***************
-*** 38,50 ****
- all: $(PROGRAM)
-
- authcert: $(CRTOBJS) $(LIB)
-! $(CC) $(COPTS) -o $@ $(CRTOBJS) $(LIB)
-
- authspeed: $(SPDOBJS) $(LIB)
- $(CC) $(COPTS) -o $@ $(SPDOBJS) $(LIB) $(COMPAT) $(RESLIB)
-
- keyparity: $(PAROBJS) $(LIB)
-! $(CC) $(COPTS) -o $@ $(PAROBJS) $(LIB)
-
- makeIPFP: $(IFPOBJS)
- $(CC) $(COPTS) -o $@ $(IFPOBJS)
---- 38,50 ----
- all: $(PROGRAM)
-
- authcert: $(CRTOBJS) $(LIB)
-! $(CC) $(COPTS) -o $@ $(CRTOBJS) $(LIB) $(COMPAT) $(RESLIB)
-
- authspeed: $(SPDOBJS) $(LIB)
- $(CC) $(COPTS) -o $@ $(SPDOBJS) $(LIB) $(COMPAT) $(RESLIB)
-
- keyparity: $(PAROBJS) $(LIB)
-! $(CC) $(COPTS) -o $@ $(PAROBJS) $(LIB) $(COMPAT) $(RESLIB)
-
- makeIPFP: $(IFPOBJS)
- $(CC) $(COPTS) -o $@ $(IFPOBJS)
-***************
-*** 68,74 ****
- $(CC) $(COPTS) -o $@ $(UNXBJS)
-
- md5: $(MD5OBJS)
-! $(CC) $(COPTS) -o $@ $(MD5OBJS) $(LIB)
-
- tags:
- ctags *.c *.h
---- 68,74 ----
- $(CC) $(COPTS) -o $@ $(UNXBJS)
-
- md5: $(MD5OBJS)
-! $(CC) $(COPTS) -o $@ $(MD5OBJS) $(LIB) $(COMPAT) $(RESLIB)
-
- tags:
- ctags *.c *.h
-diff -c include/ntp_machine.h:1.1.1.12 include/ntp_machine.h:1.28
-*** include/ntp_machine.h:1.1.1.12 Sun Feb 13 18:54:32 1994
---- include/ntp_machine.h Sun Feb 13 18:54:32 1994
-***************
-*** 457,462 ****
---- 457,463 ----
- #define HAVE_READKMEM
- #define UDP_WILDCARD_DELIVERY
- #define NTP_POSIX_SOURCE
-+ #define memmove(x, y, z) memcpy(x, y, z)
- struct timezone { int __0; }; /* unused placebo */
- /*
- * no comment !@!
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.15 b/usr.sbin/xntpd/patches/patch.15
deleted file mode 100644
index 1ef861d502be..000000000000
--- a/usr.sbin/xntpd/patches/patch.15
+++ /dev/null
@@ -1,39 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aq16153; 14 Feb 94 7:28 EST
-Received: from jagubox.gsfc.nasa.gov by louie.udel.edu id aa24615;
- 14 Feb 94 6:34 EST
-Received: by jagubox.gsfc.nasa.gov (Smail3.1.28.1 #1)
- id m0pW1Zk-000C8UC; Mon, 14 Feb 94 06:34 EST
-Message-Id: <m0pW1Zk-000C8UC@jagubox.gsfc.nasa.gov>
-From: Jim Jagielski <jim@jagubox.gsfc.nasa.gov>
-Subject: xntp 3.3e (or is that zz ;) )
-To: Mills@udel.edu
-Date: Mon, 14 Feb 1994 06:34:52 -0500 (EST)
-Reply-To: Jim Jagielski <jim@jagubox.gsfc.nasa.gov>
-In-Reply-To: <9308051324.aa24396@huey.udel.edu> from "Mills@udel.edu" at Aug 5, 93 01:24:24 pm
-X-Mailer: ELM [version 2.4 PL23]
-Content-Type: text
-Content-Length: 621
-
-This latest version requires the NTP_NEED_BOPS define in ntp_machine.h for
-A/UX:
-
-*** ntp_machine.h.orig Mon Feb 14 06:34:34 1994
---- ntp_machine.h Mon Feb 14 06:20:57 1994
-***************
-*** 299,304 ****
---- 299,305 ----
- #define HAVE_BSD_TTYS
- #define LOG_NTP LOG_LOCAL1
- #define HAVE_SIGNALED_IO
-+ #define NTP_NEED_BOPS
- #ifndef STR_SYSTEM
- #define STR_SYSTEM "UNIX/AUX"
- #endif
---
-#include <std/disclaimer.h>
- Jim Jagielski |
- jim@jagubox.gsfc.nasa.gov | "Ahh... west and wewaxation at wast"
- NASA/GSFC, Code 734.4 | Elmer Fudd
- Greenbelt, MD 20771 |
-
diff --git a/usr.sbin/xntpd/patches/patch.16 b/usr.sbin/xntpd/patches/patch.16
deleted file mode 100644
index 909f0c70c8e9..000000000000
--- a/usr.sbin/xntpd/patches/patch.16
+++ /dev/null
@@ -1,267 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa25712; 15 Feb 94 17:54 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa18345;
- 15 Feb 94 17:51 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA15109 (5.65c-6/7.3v-FAU); Tue, 15 Feb 1994 23:50:53 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA17375 (5.65c-6/7.3m-FAU); Tue, 15 Feb 1994 23:50:51 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199402152250.AA17375@faui43.informatik.uni-erlangen.de>
-Subject: fixed for parse kernel stuff...
-To: mills@udel.edu
-Date: Tue, 15 Feb 94 23:50:47 MET
-X-Mailer: ELM [version 2.3 PL11]
-
-
-Hi, Dave !
-
-Here are some fixes for the PARSE kernel modules. Basically they
-fix a memory leak on an open error condition and pronounce the
-Solaris 2.x stream module MT safe.
-
-Well, actually I should put something for you to eat here 8-).
-
-RCS file: /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v
-retrieving revision 1.1.1.7
-diff -c -r1.1.1.7 parsesolaris.c
-*** parse/parsesolaris.c:1.1.1.7 1994/02/12 09:53:42
---- parse/parsesolaris.c 1994/02/15 22:20:51
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v 3.12 1994/02/02 17:45:35 kardel Exp
- *
-! * parsesolaris.c,v 3.12 1994/02/02 17:45:35 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS5.x - not fully tested - buyer beware ! - OS KILLERS may still be
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v 3.15 1994/02/15 22:20:51 kardel Exp
- *
-! * parsesolaris.c,v 3.15 1994/02/15 22:20:51 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS5.x - not fully tested - buyer beware ! - OS KILLERS may still be
-***************
-*** 19,25 ****
- */
-
- #ifndef lint
-! static char rcsid[] = "parsesolaris.c,v 3.9 1994/01/25 19:05:26 kardel Exp";
- #endif
-
- /*
---- 19,25 ----
- */
-
- #ifndef lint
-! static char rcsid[] = "parsesolaris.c,v 3.15 1994/02/15 22:20:51 kardel Exp";
- #endif
-
- /*
-***************
-*** 65,71 ****
- {
- "parse", /* module name */
- &parseinfo, /* module information */
-! D_NEW, /* not clean yet */
- /* lock ptr */
- };
-
---- 65,71 ----
- {
- "parse", /* module name */
- &parseinfo, /* module information */
-! D_NEW|D_MP|D_MTQPAIR, /* exclusive for q pair */
- /* lock ptr */
- };
-
-***************
-*** 139,145 ****
- /*ARGSUSED*/
- int _init(void)
- {
-! static char revision[] = "3.12";
- char *s, *S, *t;
-
- /*
---- 139,145 ----
- /*ARGSUSED*/
- int _init(void)
- {
-! static char revision[] = "3.15";
- char *s, *S, *t;
-
- /*
-***************
-*** 413,418 ****
---- 413,420 ----
- parse->parse_ppsclockev.tv.tv_usec = 0;
- parse->parse_ppsclockev.serial = 0;
-
-+ qprocson(q);
-+
- parseprintf(DD_OPEN,("parse: OPEN - initializing io subsystem q=%x\n", q));
-
- if (!parse_ioinit(&parse->parse_io))
-***************
-*** 420,425 ****
---- 422,429 ----
- /*
- * ok guys - beat it
- */
-+ qprocsoff(q);
-+
- kmem_free((caddr_t)parse, sizeof(parsestream_t));
-
- parsebusy--;
-***************
-*** 441,447 ****
- */
- if (!notice)
- {
-! printf("%s: Copyright (c) 1991-1993, Frank Kardel\n", modlstrmod.strmod_linkinfo);
- notice = 1;
- }
-
---- 445,451 ----
- */
- if (!notice)
- {
-! printf("%s: Copyright (c) 1991-1994, Frank Kardel\n", modlstrmod.strmod_linkinfo);
- notice = 1;
- }
-
-***************
-*** 449,455 ****
---- 453,464 ----
- }
- else
- {
-+ qprocsoff(q);
-+
-+ kmem_free((caddr_t)parse, sizeof(parsestream_t));
-+
- parsebusy--;
-+
- return EIO;
- }
- }
-***************
-*** 462,467 ****
---- 471,478 ----
-
- parseprintf(DD_CLOSE,("parse: CLOSE\n"));
-
-+ qprocsoff(q);
-+
- s = splhigh();
-
- if (parse->parse_dqueue)
-***************
-*** 1178,1184 ****
- /*
- * History:
- *
-! * parsesolaris.c,v
- * Revision 3.12 1994/02/02 17:45:35 kardel
- * rcs ids fixed
- *
---- 1189,1204 ----
- /*
- * History:
- *
-! * parsesolaris.c,v
-! * Revision 3.15 1994/02/15 22:20:51 kardel
-! * rcsid fixed
-! *
-! * Revision 3.14 1994/02/15 22:06:04 kardel
-! * added qprocsx & flags for MT capability
-! *
-! * Revision 3.13 1994/02/13 19:16:47 kardel
-! * updated verbose Copyright message
-! *
- * Revision 3.12 1994/02/02 17:45:35 kardel
- * rcs ids fixed
- *
-RCS file: /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v
-retrieving revision 1.1.1.8
-diff -c -r1.1.1.8 parsestreams.c
-*** parse/parsestreams.c:1.1.1.8 1994/02/12 09:53:45
---- parse/parsestreams.c 1994/02/15 22:39:50
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.14 1994/02/02 17:45:38 kardel Exp
- *
-! * parsestreams.c,v 3.14 1994/02/02 17:45:38 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.16 1994/02/15 22:39:50 kardel Exp
- *
-! * parsestreams.c,v 3.16 1994/02/15 22:39:50 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
-***************
-*** 527,533 ****
- */
- if (!notice)
- {
-! printf("%s: Copyright (c) 1991-1993, Frank Kardel\n", parsesync_vd.Drv_name);
- notice = 1;
- }
-
---- 527,533 ----
- */
- if (!notice)
- {
-! printf("%s: Copyright (c) 1991-1994, Frank Kardel\n", parsesync_vd.Drv_name);
- notice = 1;
- }
-
-***************
-*** 535,540 ****
---- 535,542 ----
- }
- else
- {
-+ kmem_free((caddr_t)parse, sizeof(parsestream_t));
-+
- #ifdef VDDRV
- parsebusy--;
- #endif
-***************
-*** 1257,1263 ****
- /*
- * History:
- *
-! * parsestreams.c,v
- * Revision 3.14 1994/02/02 17:45:38 kardel
- * rcs ids fixed
- *
---- 1259,1271 ----
- /*
- * History:
- *
-! * parsestreams.c,v
-! * Revision 3.16 1994/02/15 22:39:50 kardel
-! * memory leak on open failure closed
-! *
-! * Revision 3.15 1994/02/13 19:16:50 kardel
-! * updated verbose Copyright message
-! *
- * Revision 3.14 1994/02/02 17:45:38 kardel
- * rcs ids fixed
- *
-
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.17 b/usr.sbin/xntpd/patches/patch.17
deleted file mode 100644
index f98f75403a11..000000000000
--- a/usr.sbin/xntpd/patches/patch.17
+++ /dev/null
@@ -1,50 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa00480; 16 Feb 94 12:17 EST
-Received: from quack.kfu.com by louie.udel.edu id aa24950; 16 Feb 94 12:12 EST
-Received: by quack.kfu.com id AA03532
- (5.65c8/IDA-1.4.4 for mills@udel.edu); Wed, 16 Feb 1994 09:12:04 -0800
-Date: Wed, 16 Feb 1994 09:12:04 -0800
-From: Nick Sayer <nsayer@quack.kfu.com>
-Message-Id: <199402161712.AA03532@quack.kfu.com>
-To: mills@udel.edu
-Subject: CHU debug patch
-
-I don't know what you think about this, but I thought I'd pass it
-along. I'm sorry I don't have a proper 'patch' format patch, but
-it should be aparent from the context where this goes in refclock_chu.c:
-
- return;
- }
-
- /*
- * Get the clock this applies to and a pointer to the data
- */
- chu = (struct chuunit *)rbufp->recv_srcclock;
- chuc = (struct chucode *)&rbufp->recv_space;
- chu->responses++;
- chu->lastupdate = current_time;
-
- /*
- * Just for fun, we can debug the whole frame if
- * we want.
- */
-
-#ifndef NO_CHU_DEBUG
- syslog(LOG_DEBUG,"CHU %s packet:",(chuc->chutype==CHU_YEAR)?
- "year":"time");
- for (i=0;i<NCHUCHARS;i++)
- {
- char c[64];
-
- sprintf(c,"%c%c %s",hexstring[chuc->codechars[i]&0xf],
- hexstring[chuc->codechars[i]>>4],
- ctime(&(chuc->codetimes[i].tv_sec)));
- c[strlen(c)-1]=0; /* ctime() adds a damn \n */
- syslog(LOG_DEBUG,"%s .%06d",c,chuc->codetimes[i].tv_usec);
- }
-#endif
-
- /*
- * At this point we're assured that both halves of the
- * data match because of what the kernel has done.
-
diff --git a/usr.sbin/xntpd/patches/patch.18 b/usr.sbin/xntpd/patches/patch.18
deleted file mode 100644
index e81eb627c859..000000000000
--- a/usr.sbin/xntpd/patches/patch.18
+++ /dev/null
@@ -1,99 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa00679; 16 Feb 94 13:00 EST
-Received: from spatula.csv.warwick.ac.uk by louie.udel.edu id aa26092;
- 16 Feb 94 12:48 EST
-Date: Wed, 16 Feb 1994 17:47:50 GMT
-From: Ian Dickinson <cudep@csv.warwick.ac.uk>
-Message-Id: <7051.199402161747@spatula.csv.warwick.ac.uk>
-Received: from localhost by spatula.csv.warwick.ac.uk
- id RAA07051; Wed, 16 Feb 1994 17:47:50 GMT
-In-Reply-To: Mills@udel.edu
- "Re: xntp sunos5 config" (Feb 16, 10:50am)
-X-Mailer: Mail User's Shell (7.2.4 2/2/92)
-To: Mills@udel.edu
-Subject: Re: xntp sunos5 config
-MIME-Version: 1.0
-Content-Type: text/plain; charset=US-ASCII
-
-On Feb 16, 10:50am, Mills@udel.edu wrote:
-} Subject: Re: xntp sunos5 config
-
-BTW, 3.3f seems to work fine on an SC2000 sunos5.3 (including the patch below)
-
-> Your message did not say in which file sunos5.1 or sunos5.2 or both
-> you wanted the -DLOCK_PROCESS. I'll wait for your patches.
-
-I've never done any heavy work on a sunos5.1 machine, so I can't remember if
-plock() exists there. I *think* sunso5.2 will work with it.
-Perhaps it's time to create a sunos5.3 file which has -DLOCK_PROCESS and is
-otherwise identical to sunos5.2, though this is getting silly for supposedly
-a single SVR4-based operating system.
-
-As far as I'm aware, the choice between plock() and mlockall() can be done
-with feature testing and doesn't need a seperate #define.
-
-This patch applies to 3.3b and 3.3f (with line fuzz).
-I'm certainly not sure this is the best way to do this, but it does work here.
-Perhaps it's worth asking around how widely this works in sunos5.x
-
-*** 1.1 1994/02/01 17:16:13
---- xntpd/ntpd.c 1994/02/16 16:32:47
-***************
-*** 28,35 ****
---- 28,39 ----
- #include "ntp_stdlib.h"
-
- #ifdef LOCK_PROCESS
-+ #ifdef SYS_SOLARIS
-+ #include <sys/mman.h>
-+ #else
- #include <sys/lock.h>
- #endif
-+ #endif
-
- /*
- * Signals we catch for debugging. If not debugging we ignore them.
-***************
-*** 218,229 ****
- if (rtprio(0, 120) < 0)
- syslog(LOG_ERR, "rtprio() error: %m");
- #else
-! #if defined(PROCLOCK) && defined(LOCK_PROCESS)
- /*
- * lock the process into memory
- */
- if (plock(PROCLOCK) < 0)
- syslog(LOG_ERR, "plock(): %m");
- #endif
- #if defined(NTPD_PRIO) && NTPD_PRIO != 0
- /*
---- 222,243 ----
- if (rtprio(0, 120) < 0)
- syslog(LOG_ERR, "rtprio() error: %m");
- #else
-! #if defined(LOCK_PROCESS)
-! #if defined(MCL_CURRENT) && defined(MCL_FUTURE)
-! /*
-! * lock the process into memory
-! */
-! if (mlockall(MCL_CURRENT|MCL_FUTURE) < 0)
-! syslog(LOG_ERR, "mlockall(): %m");
-! #else
-! #if defined(PROCLOCK)
- /*
- * lock the process into memory
- */
- if (plock(PROCLOCK) < 0)
- syslog(LOG_ERR, "plock(): %m");
-+ #endif
-+ #endif
- #endif
- #if defined(NTPD_PRIO) && NTPD_PRIO != 0
- /*
-
-
-
-Cheers,
---
-Ian
-
diff --git a/usr.sbin/xntpd/patches/patch.19 b/usr.sbin/xntpd/patches/patch.19
deleted file mode 100644
index 396f16f34264..000000000000
--- a/usr.sbin/xntpd/patches/patch.19
+++ /dev/null
@@ -1,599 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa08047; 17 Feb 94 15:26 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa17403;
- 17 Feb 94 15:15 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA04056 (5.65c-6/7.3v-FAU); Thu, 17 Feb 1994 21:14:43 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA29721 (5.65c-6/7.3m-FAU); Thu, 17 Feb 1994 21:14:39 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199402172014.AA29721@faui43.informatik.uni-erlangen.de>
-Subject: Re: Beep, beep, beep
-To: Mills@udel.edu
-Date: Thu, 17 Feb 94 21:14:33 MET
-Cc: Frank.Kardel@informatik.uni-erlangen.de,
- Paul_Vixie@corpmis.sjc.hw.sony.com, Piete.Brooks@cl.cam.ac.uk
-In-Reply-To: <9402171155.aa07032@huey.udel.edu>; from "Mills@udel.edu" at Feb 17, 94 11:55 am
-X-Mailer: ELM [version 2.3 PL11]
-
-
-> Guys,
-
-> Trouble with HAVE_BSD_TTYS on a VAX
-
-> ### creating NTP library
-> cc -O -DDES -DXNTP_LITTLE_ENDIAN -DSYS_VAX -DDEBUG -DREFCLOCK -I../include -c atoint.c
-> "../include/ntp_machine.h", line 570: syntax error
-Yupp, nit TTY define set.
-
-> "atoint.c", line 12: redeclaration of ival
-> "atoint.c", line 13: syntax error
-> ...
-
-Well, I guess the trouble is more that none of the tty defines was
-defined. For the sake of completeness i have added the tty defines to
-(hopefully) all machine/* files. Some configurations were unknown to
-me so I assumed HAVE_BSD_TTYS. Would be nice if someone could run
-the whole suite 8-).
-I have put the tty defines into the machine files so that the
-refconf scripts can pick up the define without having to run the
-preprocessor to dig out the configuration.
-Hope this works.
-
-diff -c include/ntp_machine.h:1.1.1.13 include/ntp_machine.h:1.30
-*** include/ntp_machine.h:1.1.1.13 Thu Feb 17 20:17:59 1994
---- include/ntp_machine.h Thu Feb 17 20:17:59 1994
-***************
-*** 44,54 ****
- WHICH TERMINAL MODEL TO USE - I would assume HAVE_TERMIOS if
- NTP_POSIX_SOURCE was set but can't. The
- posix tty driver is too restrictive on most systems.
-! It defined if you define STREAMS.
-
- HAVE_SYSV_TTYS - Use SYSV termio.h
- HAVE_BSD_TTYS - Use BSD stty.h
-- HAVE_TERMIOS - Use POSIX termios.h
-
- THIS MAKES PORTS TO NEW SYSTEMS EASY - You only have to wory about
- kernel mucking.
---- 44,59 ----
- WHICH TERMINAL MODEL TO USE - I would assume HAVE_TERMIOS if
- NTP_POSIX_SOURCE was set but can't. The
- posix tty driver is too restrictive on most systems.
-! It is defined if you define STREAMS.
-
-+ We do not put these defines in the ntp_machine.h as some systems
-+ offer multiple interfaces and refclock configuration likes to
-+ peek into the configuration defines for tty model restrictions.
-+ Thus all tty definitions should be in the files in the machines directory.
-+
-+ HAVE_TERMIOS - Use POSIX termios.h
- HAVE_SYSV_TTYS - Use SYSV termio.h
- HAVE_BSD_TTYS - Use BSD stty.h
-
- THIS MAKES PORTS TO NEW SYSTEMS EASY - You only have to wory about
- kernel mucking.
-***************
-*** 296,302 ****
- #define FORCE_NTPDATE_STEP
- #define RETSIGTYPE void
- #define HAVE_ATT_SETPGRP
-- #define HAVE_BSD_TTYS
- #define LOG_NTP LOG_LOCAL1
- #define HAVE_SIGNALED_IO
- #define NTP_NEED_BOPS
---- 301,306 ----
-***************
-*** 352,359 ****
- #ifndef STR_SYSTEM
- #define STR_SYSTEM "UNIX/BSDI"
- #endif
-- #define HAVE_BSD_TTYS
-- #define HAVE_TERMIOS
- #endif
-
- /*
---- 356,361 ----
-***************
-*** 441,449 ****
- */
- #if defined(SYS_PTX)
- #define NO_SIGNED_CHAR_DECL
-- #ifndef HAVE_SYSV_TTYS
-- #define HAVE_SYSV_TTYS
-- #endif
- #define STREAMS_TLI
- #define HAVE_ATT_SETPGRP
- #define HAVE_SIGNALED_IO
---- 443,448 ----
-***************
-*** 528,534 ****
- #define HAVE_BSD_NICE
- #define NOKMEM
- #define HAVE_SIGNALED_IO
-- #define HAVE_BSD_TTYS
- #define NTP_SYSCALLS_STD
- #define USE_PROTOTYPES
- #define UDP_WILDCARD_DELIVERY
---- 527,532 ----
-***************
-*** 565,570 ****
---- 563,582 ----
- && !defined(HAVE_NO_NICE)
- ERROR You_must_define_one_of_the_HAVE_xx_NICE_defines
- #endif
-+
-+ /*
-+ * use only one tty model - no use in initialising
-+ * a tty in three ways
-+ * HAVE_TERMIOS is preferred over HAVE_SYSV_TTYS over HAVE_BSD_TTYS
-+ */
-+ #ifdef HAVE_TERMIOS
-+ #undef HAVE_BSD_TTYS
-+ #undef HAVE_SYSV_TTYS
-+ #endif
-+
-+ #ifdef HAVE_SYSV_TTYS
-+ #undef HAVE_BSD_TTYS
-+ #endif
-
- #if !defined(HAVE_SYSV_TTYS) \
- && !defined(HAVE_BSD_TTYS) \
-diff -c machines/aux2:1.1.1.2 machines/aux2:1.4
-*** machines/aux2:1.1.1.2 Thu Feb 17 20:19:50 1994
---- machines/aux2 Thu Feb 17 20:19:50 1994
-***************
-*** 1,6 ****
- RANLIB= true # ar does the work of ranlib under System V
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_AUX2
- AUTHDEFS= -DDES -DMD5 -DFASTMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= true # ar does the work of ranlib under System V
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_AUX2 -DHAVE_BSD_TTYS
- AUTHDEFS= -DDES -DMD5 -DFASTMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/aux3:1.1.1.2 machines/aux3:1.4
-*** machines/aux3:1.1.1.2 Thu Feb 17 20:19:52 1994
---- machines/aux3 Thu Feb 17 20:19:52 1994
-***************
-*** 1,6 ****
- RANLIB= true # ar does the work of ranlib under System V
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_AUX3
- AUTHDEFS= -DDES -DMD5 -DFASTMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= true # ar does the work of ranlib under System V
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_AUX3 -DHAVE_BSD_TTYS
- AUTHDEFS= -DDES -DMD5 -DFASTMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/bsdi:1.1.1.4 machines/bsdi:1.6
-*** machines/bsdi:1.1.1.4 Thu Feb 17 20:19:53 1994
---- machines/bsdi Thu Feb 17 20:19:53 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_BSDI
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS= -lkvm
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_BSDI -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS= -lkvm
-diff -c machines/convexos10:1.1.1.2 machines/convexos10:1.3
-*** machines/convexos10:1.1.1.2 Thu Feb 17 20:19:54 1994
---- machines/convexos10 Thu Feb 17 20:19:54 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_CONVEXOS10
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- RESLIB=
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_CONVEXOS10 -DHAVE_BSD_TTYS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- RESLIB=
-diff -c machines/convexos9:1.1.1.2 machines/convexos9:1.3
-*** machines/convexos9:1.1.1.2 Thu Feb 17 20:19:55 1994
---- machines/convexos9 Thu Feb 17 20:19:56 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_CONVEXOS9
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- RESLIB=
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_CONVEXOS9 -DHAVE_BSD_TTYS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- RESLIB=
-diff -c machines/decosf1:1.1.1.2 machines/decosf1:1.4
-*** machines/decosf1:1.1.1.2 Thu Feb 17 20:19:57 1994
---- machines/decosf1 Thu Feb 17 20:19:57 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSTREAM -DSYS_DECOSF1
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSTREAM -DSYS_DECOSF1 -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/dell.svr4:1.1.1.1 machines/dell.svr4:1.2
-*** machines/dell.svr4:1.1.1.1 Thu Feb 17 20:19:58 1994
---- machines/dell.svr4 Thu Feb 17 20:19:58 1994
-***************
-*** 1,7 ****
- SHELL= /bin/sh
- RANLIB= ls # ar does the work of ranlib under System V
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_SVR4
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,7 ----
- SHELL= /bin/sh
- RANLIB= ls # ar does the work of ranlib under System V
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_SVR4 -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/domainos:1.1.1.1 machines/domainos:1.2
-*** machines/domainos:1.1.1.1 Thu Feb 17 20:19:59 1994
---- machines/domainos Thu Feb 17 20:19:59 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_DOMAINOS -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_POSIX_SOURCE
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_DOMAINOS -D_INCLUDE_BSD_SOURCE -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_POSIX_SOURCE -DHAVE_BSD_TTYS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/i386:1.1.1.2 machines/i386:1.3
-*** machines/i386:1.1.1.2 Thu Feb 17 20:20:04 1994
---- machines/i386 Thu Feb 17 20:20:05 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_I386
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_I386 -DHAVE_BSD_TTYS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/i386svr4:1.1.1.3 machines/i386svr4:1.4
-*** machines/i386svr4:1.1.1.3 Thu Feb 17 20:20:05 1994
---- machines/i386svr4 Thu Feb 17 20:20:05 1994
-***************
-*** 1,7 ****
- SHELL= /bin/sh
- RANLIB= ls # ar does the work of ranlib under System V
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_SVR4 -DSTREAMS_TLI
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,7 ----
- SHELL= /bin/sh
- RANLIB= ls # ar does the work of ranlib under System V
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_SVR4 -DSTREAMS_TLI -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/mips:1.1.1.2 machines/mips:1.3
-*** machines/mips:1.1.1.2 Thu Feb 17 20:20:10 1994
---- machines/mips Thu Feb 17 20:20:10 1994
-***************
-*** 1,7 ****
- #RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
- DEFS=
-! AUTHDEFS= -DDES -DMD5 -DSYS_MIPS
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS= -lmld
- RESLIB=
---- 1,7 ----
- #RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
- DEFS=
-! AUTHDEFS= -DDES -DMD5 -DSYS_MIPS -DHAVE_BSD_TTYS
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS= -lmld
- RESLIB=
-diff -c machines/next:1.1.1.1 machines/next:1.2
-*** machines/next:1.1.1.1 Thu Feb 17 20:20:12 1994
---- machines/next Thu Feb 17 20:20:13 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib -c -s
- DEFS= -DSYS_NEXT
-! AUTHDEFS= -DDES -DMD5 -DFAST_MD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
- RESLIB=
---- 1,6 ----
- RANLIB= ranlib -c -s
- DEFS= -DSYS_NEXT
-! AUTHDEFS= -DDES -DMD5 -DFAST_MD5 -DHAVE_BSD_TTYS
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
- RESLIB=
-diff -c machines/sequent:1.1.1.3 machines/sequent:1.4
-*** machines/sequent:1.1.1.3 Thu Feb 17 20:20:14 1994
---- machines/sequent Thu Feb 17 20:20:14 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DHAVE_READ_KMEM -DSYS_SEQUENT
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DHAVE_READ_KMEM -DSYS_SEQUENT -DHAVE_BSD_TTYS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/sinix-m:1.1.1.2 machines/sinix-m:1.5
-*** machines/sinix-m:1.1.1.2 Thu Feb 17 20:20:15 1994
---- machines/sinix-m Thu Feb 17 20:20:15 1994
-***************
-*** 1,6 ****
- RANLIB= :
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_SINIXM
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
---- 1,6 ----
- RANLIB= :
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_SINIXM -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
-diff -c machines/sony:1.1.1.2 machines/sony:1.3
-*** machines/sony:1.1.1.2 Thu Feb 17 20:20:16 1994
---- machines/sony Thu Feb 17 20:20:16 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_SONY
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS= -lmld
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_SONY -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS= -lmld
-diff -c machines/svr4:1.1.1.4 machines/svr4:1.4
-*** machines/svr4:1.1.1.4 Thu Feb 17 20:20:20 1994
---- machines/svr4 Thu Feb 17 20:20:20 1994
-***************
-*** 1,6 ****
- SHELL= /bin/sh
- RANLIB= ls # ar does the work of ranlib under System V
-! DEFS= -DSYS_SVR4 -DSTREAMS_TLI
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS=
- DAEMONLIBS= -lnet -lnsl -lsocket -lelf
---- 1,6 ----
- SHELL= /bin/sh
- RANLIB= ls # ar does the work of ranlib under System V
-! DEFS= -DSYS_SVR4 -DSTREAMS_TLI -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS=
- DAEMONLIBS= -lnet -lnsl -lsocket -lelf
-diff -c machines/vax:1.1.1.2 machines/vax:1.3
-*** machines/vax:1.1.1.2 Thu Feb 17 20:20:23 1994
---- machines/vax Thu Feb 17 20:20:23 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_VAX
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
- RESLIB=
---- 1,6 ----
- RANLIB= ranlib
- DEFS_LOCAL= -DREFCLOCK
-! DEFS= -DSYS_VAX -DHAVE_BSD_TTYS
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
- RESLIB=
-RCS file: /src/NTP/REPOSITORY/v3/parse/README.new_clocks,v
-retrieving revision 1.1.1.2
-retrieving revision 3.3
-diff -c -r1.1.1.2 -r3.3
-*** parse/README.new_clocks:1.1.1.2 1994/02/12 09:53:48
---- parse/README.new_clocks 1994/02/17 20:09:58
-***************
-*** 1,7 ****
-! Here is an attempt to scetch out what you need to do in order to
- add another clock to the parse driver:
-
-! Prerequsites:
- - Does the system you want the clock connect to have
- termio.h or termios.h ? (You need that for the parse driver)
-
---- 1,7 ----
-! Here is an attempt to sketch out what you need to do in order to
- add another clock to the parse driver:
-
-! Prerequisites:
- - Does the system you want the clock connect to have
- termio.h or termios.h ? (You need that for the parse driver)
-
-***************
-*** 32,38 ****
- PARSEB_ANNOUNCE switch time zone warning (informational only)
- PARSEB_POWERUP no synchronisation - clock confused (must set then)
- PARSEB_NOSYNC timecode currently not confirmed (must set then)
-! usually on reception error when the is still a
- chance the the generated time is still ok.
-
- PARSEB_DST DST in effect (informational only)
---- 32,38 ----
- PARSEB_ANNOUNCE switch time zone warning (informational only)
- PARSEB_POWERUP no synchronisation - clock confused (must set then)
- PARSEB_NOSYNC timecode currently not confirmed (must set then)
-! usually on reception error when there is still a
- chance the the generated time is still ok.
-
- PARSEB_DST DST in effect (informational only)
-***************
-*** 53,59 ****
- them for examples. The basic structure is:
-
- struct clockformat <yourclock>_format = {
-! lots of field for you to fill out (see below)
- };
-
- static cvt_<yourclock>()
---- 53,59 ----
- them for examples. The basic structure is:
-
- struct clockformat <yourclock>_format = {
-! lots of fields for you to fill out (see below)
- };
-
- static cvt_<yourclock>()
-***************
-*** 122,132 ****
- file with the time code conversion. See the examples and pick a clock
- closest to yours and tweak the code to match your clock.
-
-! In order to make your clk_*.c file usable a referenc to the clockformat
- structure must be put into parse_conf.c.
-
--
--
- TTY setup and initialisation/configuration will be done in
- xntpd/refclock_parse.c
-
---- 122,130 ----
- file with the time code conversion. See the examples and pick a clock
- closest to yours and tweak the code to match your clock.
-
-! In order to make your clk_*.c file usable a reference to the clockformat
- structure must be put into parse_conf.c.
-
- TTY setup and initialisation/configuration will be done in
- xntpd/refclock_parse.c
-
-***************
-*** 135,141 ****
- termio*.h c_cflag macros.
-
- - in xntpd/refclock_parse.c fill out a new the struct clockinfo element
-! (allocates a new "IP" address - see comments)
- (see all the other clocks for example)
- struct clockinfo
- {
---- 133,139 ----
- termio*.h c_cflag macros.
-
- - in xntpd/refclock_parse.c fill out a new the struct clockinfo element
-! (that allocates a new "IP" address - see comments)
- (see all the other clocks for example)
- struct clockinfo
- {
-***************
-*** 188,199 ****
-
-
- Well, this is very sketchy, i know. But I hope it helps a little bit.
-! The best way is to look which clock comes closet to your and tweak that
- code.
-! Two sorts of clocks are used with parse. Clocks that automatically sent
-! thier time code (once a second) do not nee entries in the poll routines because
-! they sent the data all the time. The second sort are the clocks that need a
-! command sent to then in order to reply with a time code (like the Trimble
- clock).
-
- For questions: kardel@informatik.uni-erlangen.de. Please include
---- 186,197 ----
-
-
- Well, this is very sketchy, i know. But I hope it helps a little bit.
-! The best way is to look which clock comes closest to your and tweak that
- code.
-! Two sorts of clocks are used with parse. Clocks that automatically send
-! their time code (once a second) do not need entries in the poll routines because
-! they send the data all the time. The second sort are the clocks that need a
-! command sent to them in order to reply with a time code (like the Trimble
- clock).
-
- For questions: kardel@informatik.uni-erlangen.de. Please include
-RCS file: /src/NTP/REPOSITORY/v3/parse/README.parse_clocks,v
-retrieving revision 1.1.1.1
-retrieving revision 3.2
-diff -c -r1.1.1.1 -r3.2
-*** parse/README.parse_clocks:1.1.1.1 1994/01/01 00:00:00
---- parse/README.parse_clocks 1994/02/17 20:10:02
-***************
-*** 1,4 ****
-! The parse driver currently supports several clock with different
- query mechanisms. In order for you to find a sample that might be
- similar to a clock you might want to integrate into parse i'll sum
- up the major features of the clocks (this information is distributed
---- 1,4 ----
-! The parse driver currently supports several clocks with different
- query mechanisms. In order for you to find a sample that might be
- similar to a clock you might want to integrate into parse i'll sum
- up the major features of the clocks (this information is distributed
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.2 b/usr.sbin/xntpd/patches/patch.2
deleted file mode 100644
index 50a102355f7c..000000000000
--- a/usr.sbin/xntpd/patches/patch.2
+++ /dev/null
@@ -1,129 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa12171; 26 Jan 94 17:04 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa15368;
- 26 Jan 94 17:00 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA17953 (5.65c-6/7.3v-FAU); Wed, 26 Jan 1994 23:00:40 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA29710 (5.65c-6/7.3m-FAU); Wed, 26 Jan 1994 23:00:37 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199401262200.AA29710@faui43.informatik.uni-erlangen.de>
-Subject: Re: Solaribum
-To: Mills@udel.edu
-Date: Wed, 26 Jan 94 23:00:31 MET
-Cc: Frank.Kardel@informatik.uni-erlangen.de, Piete.Brooks@cl.cam.ac.uk,
- Paul_Vixie@corpmis.sjc.hw.sony.com
-In-Reply-To: <9401261207.aa10860@huey.udel.edu>; from "Mills@udel.edu" at Jan 26, 94 12:07 pm
-X-Mailer: ELM [version 2.3 PL11]
-
-
-Sorry, guys - i tripped over a backward compatibility
-variable. Thus the second patch:
-
-diff -c include/ntp_control.h:3.6 include/ntp_control.h:3.7
-*** include/ntp_control.h:3.6 Wed Jan 26 22:57:52 1994
---- include/ntp_control.h Wed Jan 26 22:57:52 1994
-***************
-*** 204,210 ****
- #define CP_SENT 32
- #define CP_FILTERROR 33
- #define CP_FLASH 34
-! #define CP_VARLIST 35
-
- #define CP_MAXCODE CP_VARLIST
-
---- 204,211 ----
- #define CP_SENT 32
- #define CP_FILTERROR 33
- #define CP_FLASH 34
-! #define CP_DISP 35
-! #define CP_VARLIST 36
-
- #define CP_MAXCODE CP_VARLIST
-
-diff -c xntpd/ntp_control.c:3.21 xntpd/ntp_control.c:3.22
-*** xntpd/ntp_control.c:3.21 Wed Jan 26 22:58:30 1994
---- xntpd/ntp_control.c Wed Jan 26 22:58:31 1994
-***************
-*** 175,181 ****
- { CP_SENT, RO, "sent" }, /* 32 */
- { CP_FILTERROR, RO, "filterror" }, /* 33 */
- { CP_FLASH, RO, "flash" }, /* 34 */
-! { CP_VARLIST, RO, "peer_var_list" }, /* 35 */
- { 0, EOV, "" }
- };
-
---- 175,182 ----
- { CP_SENT, RO, "sent" }, /* 32 */
- { CP_FILTERROR, RO, "filterror" }, /* 33 */
- { CP_FLASH, RO, "flash" }, /* 34 */
-! { CP_DISP, PADDING,"" }, /* 35 */
-! { CP_VARLIST, RO, "peer_var_list" }, /* 36 */
- { 0, EOV, "" }
- };
-
-***************
-*** 1298,1303 ****
---- 1299,1307 ----
-
- for (k = sys_var; !(k->flags &EOV); k++)
- {
-+ if (k->flags & PADDING)
-+ continue;
-+
- i = strlen(k->text);
- if (s+i+1 >= be)
- break;
-***************
-*** 1309,1314 ****
---- 1313,1321 ----
-
- for (k = ext_sys_var; k && !(k->flags &EOV); k++)
- {
-+ if (k->flags & PADDING)
-+ continue;
-+
- ss = k->text;
- if (!ss)
- continue;
-***************
-*** 1484,1489 ****
---- 1491,1499 ----
-
- for (k = peer_var; !(k->flags &EOV); k++)
- {
-+ if (k->flags & PADDING)
-+ continue;
-+
- i = strlen(k->text);
- if (s+i+1 >= be)
- break;
-***************
-*** 1594,1599 ****
---- 1604,1612 ----
-
- for (k = clock_var; !(k->flags &EOV); k++)
- {
-+ if (k->flags & PADDING)
-+ continue;
-+
- i = strlen(k->text);
- if (s+i+1 >= be)
- break;
-***************
-*** 1605,1610 ****
---- 1618,1626 ----
-
- for (k = clock->kv_list; k && !(k->flags &EOV); k++)
- {
-+ if (k->flags & PADDING)
-+ continue;
-+
- ss = k->text;
- if (!ss)
- continue;
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.20 b/usr.sbin/xntpd/patches/patch.20
deleted file mode 100644
index 39755074a363..000000000000
--- a/usr.sbin/xntpd/patches/patch.20
+++ /dev/null
@@ -1,1031 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa03713; 20 Feb 94 10:36 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa02155;
- 20 Feb 94 10:26 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA03871 (5.65c-6/7.3v-FAU); Sun, 20 Feb 1994 16:26:26 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA04409 (5.65c-6/7.3m-FAU); Sun, 20 Feb 1994 16:26:24 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199402201526.AA04409@faui43.informatik.uni-erlangen.de>
-Subject: 3.3g patches
-To: mills@udel.edu
-Date: Sun, 20 Feb 94 16:26:19 MET
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi, Dave,
-
-here are some more patches. They fix the following:
- - nroff macros from John Line
- - parse add/delete leap second (as opposed to just add second)
- - some rcs ids
- - linux support
- - xntpd.8 leap variable documentation
-
-And here we go...
-
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/compilers/linux.gcc,v
-retrieving revision 1.2
-diff -c -r1.2 linux.gcc
-*** 1.2 1993/10/10 23:10:03
---- compilers/linux.gcc 1994/02/20 13:03:27
-***************
-*** 1,2 ****
- COMPILER= gcc -DUSE_PROTOTYPES -Wall
-! COPTS= -O6 -finline-functions -fomit-frame-pointer
---- 1,2 ----
- COMPILER= gcc -DUSE_PROTOTYPES -Wall
-! COPTS= -O2 -finline-functions -fomit-frame-pointer
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/doc/notes.txt,v
-retrieving revision 1.3
-diff -c -r1.3 notes.txt
-*** 1.3 1993/08/24 21:24:55
---- doc/notes.txt 1994/02/20 11:57:24
-***************
-*** 785,791 ****
- with mode-6 messages is set the leap-second warning bits) and the ntpq
- program provides generic support for the latter. The leap bits that can be
- set in the leap_warning variable (up to one month ahead) and in the
-! leap_indication variable have a slighly different encoding than the
- usual interpretation:
-
- Value Action
---- 785,791 ----
- with mode-6 messages is set the leap-second warning bits) and the ntpq
- program provides generic support for the latter. The leap bits that can be
- set in the leap_warning variable (up to one month ahead) and in the
-! leap_indication variable have a slightly different encoding than the
- usual interpretation:
-
- Value Action
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/doc/ntpdate.8,v
-retrieving revision 3.0
-diff -c -r3.0 ntpdate.8
-*** 3.0 1992/08/14 15:11:44
---- doc/ntpdate.8 1994/02/20 11:27:53
-***************
-*** 20,32 ****
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Bell System Logo is used as a dummy character.
- '''
-! .tr \(bs-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(bs-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
---- 20,32 ----
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Greek uppercase omega is used as a dummy character.
- '''
-! .tr \(*W-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(*W-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/doc/ntpq.8,v
-retrieving revision 3.3
-diff -c -r3.3 ntpq.8
-*** 3.3 1993/10/22 14:26:57
---- doc/ntpq.8 1994/02/20 11:27:55
-***************
-*** 20,32 ****
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Bell System Logo is used as a dummy character.
- '''
-! .tr \(bs-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(bs-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
---- 20,32 ----
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Greek uppercase omega is used as a dummy character.
- '''
-! .tr \(*W-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(*W-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/doc/ntptrace.8,v
-retrieving revision 1.1.1.2
-diff -c -r1.1.1.2 ntptrace.8
-*** 1.1.1.2 1993/01/26 18:55:43
---- doc/ntptrace.8 1994/02/20 11:27:58
-***************
-*** 20,32 ****
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Bell System Logo is used as a dummy character.
- '''
-! .tr \(bs-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(bs-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
---- 20,32 ----
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Greek uppercase omega is used as a dummy character.
- '''
-! .tr \(*W-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(*W-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/doc/tickadj.8,v
-retrieving revision 3.0
-diff -c -r3.0 tickadj.8
-*** 3.0 1992/08/14 15:11:53
---- doc/tickadj.8 1994/02/20 11:28:00
-***************
-*** 20,32 ****
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Bell System Logo is used as a dummy character.
- '''
-! .tr \(bs-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(bs-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
---- 20,32 ----
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Greek uppercase omega is used as a dummy character.
- '''
-! .tr \(*W-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(*W-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/doc/xntpd.8,v
-retrieving revision 3.24
-diff -c -r3.24 xntpd.8
-*** 3.24 1994/02/02 16:42:25
---- doc/xntpd.8 1994/02/20 11:57:28
-***************
-*** 20,32 ****
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Bell System Logo is used as a dummy character.
- '''
-! .tr \(bs-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(bs-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
---- 20,32 ----
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Greek uppercase omega is used as a dummy character.
- '''
-! .tr \(*W-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(*W-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
-***************
-*** 374,380 ****
- Certain changes can be made to the
- .I xntpd
- server via mode 6 control messages, in particular the setting of
-! leap second indications in a server with a radio clock. The
- .B controlkey
- statement specifies an encription key number to be used for authenticating
- such messages. Omitting this statement will cause control messages
---- 374,381 ----
- Certain changes can be made to the
- .I xntpd
- server via mode 6 control messages, in particular the setting of
-! leap second indications in a server with a radio clock.
-! The
- .B controlkey
- statement specifies an encription key number to be used for authenticating
- such messages. Omitting this statement will cause control messages
-***************
-*** 1401,1406 ****
---- 1402,1432 ----
- If flag3 is set, then the sample information is dumped.
- If flag4 is set, then the input data is smoothed, and all data
- points are used.
-+ .PP
-+ .SH VARIABLES
-+ Most variables used by the NTP protocol can be examined with the xntpdc
-+ (mode 7 messages) and the ntpq (mode 6 messages). Currently very few variables
-+ can be modified via mode 6 messages. These variables are either created with the
-+ .I setvar
-+ directive or the leap warning variables. The leap warning bits that can be
-+ set in the
-+ .B leapwarning
-+ variable (up to one month ahead). Both, the
-+ .B leapwarning and in the
-+ .B leapindication
-+ variable, have a slightly different encoding than the usual
-+ .B leap
-+ bits interpretation:
-+ .P
-+ .Ip 00 8
-+ The daemon passes the leap bits of its synchronisation source (usual mode of
-+ operation).
-+ .Ip 01/10 8
-+ A leap second is added/deleted (operator forced leap second).
-+ .Ip 11 8
-+ Leap information from the sychronisation source is ignored (thus LEAP_NOWARNING
-+ is passed on).
-+ .PP
- .SH FILES
- .Ip /etc/ntp.conf 20
- the default name of the configuration file
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/doc/xntpdc.8,v
-retrieving revision 3.4
-diff -c -r3.4 xntpdc.8
-*** 3.4 1994/02/02 15:54:14
---- doc/xntpdc.8 1994/02/20 11:28:06
-***************
-*** 20,32 ****
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Bell System Logo is used as a dummy character.
- '''
-! .tr \(bs-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(bs-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
---- 20,32 ----
- '''
- ''' Set up \*(-- to give an unbreakable dash;
- ''' string Tr holds user defined translation string.
-! ''' Greek uppercase omega is used as a dummy character.
- '''
-! .tr \(*W-|\(bv\*(Tr
- .ie n \{\
-! .ds -- \(*W-
-! .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-! .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
- .ds L" ""
- .ds R" ""
- .ds L' '
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/hints/linux,v
-retrieving revision 1.2
-diff -c -r1.2 linux
-*** 1.2 1994/02/01 23:19:26
---- hints/linux 1994/02/20 11:26:44
-***************
-*** 1,5 ****
-
-! Requirements: kernel 0.99.14y or newer, libc 4.5.8 or newer
- ------------
-
- With this configuration, xntp should build an run right out of the box
---- 1,5 ----
-
-! Requirements: kernel 0.99.14y or newer, libc 4.5.20 or newer
- ------------
-
- With this configuration, xntp should build an run right out of the box
-***************
-*** 7,9 ****
---- 7,14 ----
- versions of the kernel or libc, or have any other question not covered in the
- READMEs / hint files (sorry, necessary comment in the Linux community ;-) feel
- free to ask me (duwe@informatik.uni-erlangen.de)
-+
-+ [NOTE: libc-4.5.20 is (or was ? ;-) a beta testing release, but the first
-+ binary compiled under the appropriate kernel. Get this one from
-+ tsx-11:.../GCC/private/dontuse , compile 4.5.19 yourself or wait for the next
-+ puplic relase after 4.5.20]
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/include/parse.h,v
-retrieving revision 3.14
-diff -c -r3.14 parse.h
-*** 3.14 1994/01/28 14:03:35
---- include/parse.h 1994/02/20 13:04:26
-***************
-*** 81,115 ****
- /*
- * state flags
- */
-! #define PARSEB_ANNOUNCE 0x0001 /* switch time zone warning (DST switch) */
-! #define PARSEB_POWERUP 0x0002 /* no synchronisation */
-! #define PARSEB_NOSYNC 0x0004 /* timecode currently not confirmed */
-! #define PARSEB_DST 0x0008 /* DST in effect */
-! #define PARSEB_UTC 0x0010 /* UTC time */
-! #define PARSEB_LEAP 0x0020 /* LEAP warning (1 hour prior to occurence) */
-! #define PARSEB_ALTERNATE 0x0040 /* alternate antenna used */
-! #define PARSEB_POSITION 0x0080 /* position available */
-! #define PARSEB_LEAPSECOND 0x0100 /* actual leap second */
-!
-! #define PARSEB_S_LEAP 0x0200 /* supports LEAP */
-! #define PARSEB_S_ANTENNA 0x0400 /* supports antenna information */
-! #define PARSEB_S_PPS 0x0800 /* supports PPS time stamping */
-! #define PARSEB_S_POSITION 0x1000 /* supports position information (GPS) */
-
-! #define PARSEB_TIMECODE 0x2000 /* valid time code sample */
-! #define PARSEB_PPS 0x4000 /* valid PPS sample */
-
- #define PARSE_TCINFO (PARSEB_ANNOUNCE|PARSEB_POWERUP|PARSEB_NOSYNC|PARSEB_DST|\
-! PARSEB_UTC|PARSEB_LEAP|PARSEB_ALTERNATE|PARSEB_S_LEAP|\
- PARSEB_S_LOCATION|PARSEB_TIMECODE)
-
-! #define PARSE_POWERUP(x) ((x) & PARSEB_POWERUP)
-! #define PARSE_NOSYNC(x) (((x) & (PARSEB_POWERUP|PARSEB_NOSYNC)) == PARSEB_NOSYNC)
-! #define PARSE_SYNC(x) (((x) & (PARSEB_POWERUP|PARSEB_NOSYNC)) == 0)
-! #define PARSE_ANNOUNCE(x) ((x) & PARSEB_ANNOUNCE)
-! #define PARSE_DST(x) ((x) & PARSEB_DST)
- #define PARSE_UTC(x) ((x) & PARSEB_UTC)
-! #define PARSE_LEAP(x) (PARSE_SYNC(x) && ((x) & PARSEB_LEAP))
- #define PARSE_ALTERNATE(x) ((x) & PARSEB_ALTERNATE)
- #define PARSE_LEAPSECOND(x) (PARSE_SYNC(x) && ((x) & PARSEB_LEAP_SECOND))
-
---- 81,135 ----
- /*
- * state flags
- */
-! #define PARSEB_POWERUP 0x00000001 /* no synchronisation */
-! #define PARSEB_NOSYNC 0x00000002 /* timecode currently not confirmed */
-
-! /*
-! * time zone information
-! */
-! #define PARSEB_ANNOUNCE 0x00000010 /* switch time zone warning (DST switch) */
-! #define PARSEB_DST 0x00000020 /* DST in effect */
-! #define PARSEB_UTC 0x00000040 /* UTC time */
-!
-! /*
-! * leap information
-! */
-! #define PARSEB_LEAPDEL 0x00000100 /* LEAP deletion warning */
-! #define PARSEB_LEAPADD 0x00000200 /* LEAP addition warning */
-! #define PARSEB_LEAPS 0x00000300 /* LEAP warnings */
-! #define PARSEB_LEAPSECOND 0x00000400 /* actual leap second */
-! /*
-! * optional status information
-! */
-! #define PARSEB_ALTERNATE 0x00001000 /* alternate antenna used */
-! #define PARSEB_POSITION 0x00002000 /* position available */
-!
-! /*
-! * feature information
-! */
-! #define PARSEB_S_LEAP 0x00010000 /* supports LEAP */
-! #define PARSEB_S_ANTENNA 0x00020000 /* supports antenna information */
-! #define PARSEB_S_PPS 0x00040000 /* supports PPS time stamping */
-! #define PARSEB_S_POSITION 0x00080000 /* supports position information (GPS) */
-!
-! /*
-! * time stamp availality
-! */
-! #define PARSEB_TIMECODE 0x10000000 /* valid time code sample */
-! #define PARSEB_PPS 0x20000000 /* valid PPS sample */
-
- #define PARSE_TCINFO (PARSEB_ANNOUNCE|PARSEB_POWERUP|PARSEB_NOSYNC|PARSEB_DST|\
-! PARSEB_UTC|PARSEB_LEAPS|PARSEB_ALTERNATE|PARSEB_S_LEAP|\
- PARSEB_S_LOCATION|PARSEB_TIMECODE)
-
-! #define PARSE_POWERUP(x) ((x) & PARSEB_POWERUP)
-! #define PARSE_NOSYNC(x) (((x) & (PARSEB_POWERUP|PARSEB_NOSYNC)) == PARSEB_NOSYNC)
-! #define PARSE_SYNC(x) (((x) & (PARSEB_POWERUP|PARSEB_NOSYNC)) == 0)
-! #define PARSE_ANNOUNCE(x) ((x) & PARSEB_ANNOUNCE)
-! #define PARSE_DST(x) ((x) & PARSEB_DST)
- #define PARSE_UTC(x) ((x) & PARSEB_UTC)
-! #define PARSE_LEAPADD(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPADD))
-! #define PARSE_LEAPDEL(x) (PARSE_SYNC(x) && (((x) & PARSEB_LEAPS) == PARSEB_LEAPDEL))
- #define PARSE_ALTERNATE(x) ((x) & PARSEB_ALTERNATE)
- #define PARSE_LEAPSECOND(x) (PARSE_SYNC(x) && ((x) & PARSEB_LEAP_SECOND))
-
-***************
-*** 118,126 ****
- #define PARSE_S_PPS(x) ((x) & PARSEB_S_PPS)
- #define PARSE_S_POSITION(x) ((x) & PARSEB_S_POSITION)
-
-! #define PARSE_TIMECODE(x) ((x) & PARSEB_TIMECODE)
- #define PARSE_PPS(x) ((x) & PARSEB_PPS)
-! #define PARSE_POSITION(x) ((x) & PARSEB_POSITION)
-
- /*
- * operation flags - some are also fudge flags
---- 138,146 ----
- #define PARSE_S_PPS(x) ((x) & PARSEB_S_PPS)
- #define PARSE_S_POSITION(x) ((x) & PARSEB_S_POSITION)
-
-! #define PARSE_TIMECODE(x) ((x) & PARSEB_TIMECODE)
- #define PARSE_PPS(x) ((x) & PARSEB_PPS)
-! #define PARSE_POSITION(x) ((x) & PARSEB_POSITION)
-
- /*
- * operation flags - some are also fudge flags
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/parse/README.new_clocks,v
-retrieving revision 3.3
-diff -c -r3.3 README.new_clocks
-*** 3.3 1994/02/17 20:09:58
---- parse/README.new_clocks 1994/02/20 13:04:34
-***************
-*** 37,43 ****
-
- PARSEB_DST DST in effect (informational only)
- PARSEB_UTC timecode contains UTC time (informational only)
-! PARSEB_LEAP LEAP warning (prior to leap happening - must set when imminent)
- PARSEB_ALTERNATE backup transmitter (informational only)
- PARSEB_POSITION geographic position available (informational only)
- PARSEB_LEAPSECOND actual leap second (this time code is the leap
---- 37,46 ----
-
- PARSEB_DST DST in effect (informational only)
- PARSEB_UTC timecode contains UTC time (informational only)
-! PARSEB_LEAPADD LEAP addition warning (prior to leap happening - must set when imminent)
-! also used for time code that do not encode the
-! direction (as this is currently the default).
-! PARSEB_LEAPDEL LEAP deletion warning (prior to leap happening - must set when imminent)
- PARSEB_ALTERNATE backup transmitter (informational only)
- PARSEB_POSITION geographic position available (informational only)
- PARSEB_LEAPSECOND actual leap second (this time code is the leap
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/parse/clk_meinberg.c,v
-retrieving revision 3.13
-diff -c -r3.13 clk_meinberg.c
-*** 3.13 1994/02/02 17:45:21
---- parse/clk_meinberg.c 1994/02/20 13:04:37
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_MEINBERG)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_meinberg.c,v 3.13 1994/02/02 17:45:21 kardel Exp
- *
-! * clk_meinberg.c,v 3.13 1994/02/02 17:45:21 kardel Exp
- *
- * Meinberg clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_MEINBERG)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_meinberg.c,v 3.14 1994/02/20 13:04:37 kardel Exp
- *
-! * clk_meinberg.c,v 3.14 1994/02/20 13:04:37 kardel Exp
- *
- * Meinberg clock support
- *
-***************
-*** 284,291 ****
- clock->flags |= PARSEB_S_LEAP;
- clock->flags |= PARSEB_S_ANTENNA;
-
- if (f[4] == 'A')
-! clock->flags |= PARSEB_LEAP;
-
- if (f[5] == 'R')
- clock->flags |= PARSEB_ALTERNATE;
---- 284,296 ----
- clock->flags |= PARSEB_S_LEAP;
- clock->flags |= PARSEB_S_ANTENNA;
-
-+ /*
-+ * DCF77 does not encode the direction -
-+ * so we take the current default -
-+ * earth slowing down
-+ */
- if (f[4] == 'A')
-! clock->flags |= PARSEB_LEAPADD;
-
- if (f[5] == 'R')
- clock->flags |= PARSEB_ALTERNATE;
-***************
-*** 394,402 ****
-
- /*
- * oncoming leap second
- */
- if (f[5] == 'A')
-! clock->flags |= PARSEB_LEAP;
-
- /*
- * this is the leap second
---- 399,410 ----
-
- /*
- * oncoming leap second
-+ * data format does not (yet) specify whether
-+ * to add or to delete a second - thus we
-+ * pick the current default
- */
- if (f[5] == 'A')
-! clock->flags |= PARSEB_LEAPADD;
-
- /*
- * this is the leap second
-***************
-*** 413,419 ****
- /*
- * History:
- *
-! * clk_meinberg.c,v
- * Revision 3.13 1994/02/02 17:45:21 kardel
- * rcs ids fixed
- *
---- 421,430 ----
- /*
- * History:
- *
-! * clk_meinberg.c,v
-! * Revision 3.14 1994/02/20 13:04:37 kardel
-! * parse add/delete second support
-! *
- * Revision 3.13 1994/02/02 17:45:21 kardel
- * rcs ids fixed
- *
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v
-retrieving revision 3.11
-diff -c -r3.11 clk_rawdcf.c
-*** 3.11 1994/02/02 17:45:23
---- parse/clk_rawdcf.c 1994/02/20 13:04:39
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_RAWDCF)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v 3.11 1994/02/02 17:45:23 kardel Exp
- *
-! * clk_rawdcf.c,v 3.11 1994/02/02 17:45:23 kardel Exp
- *
- * Raw DCF77 pulse clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_RAWDCF)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v 3.12 1994/02/20 13:04:39 kardel Exp
- *
-! * clk_rawdcf.c,v 3.12 1994/02/20 13:04:39 kardel Exp
- *
- * Raw DCF77 pulse clock support
- *
-***************
-*** 278,284 ****
- clock->flags |= PARSEB_ANNOUNCE;
-
- if (ext_bf(buffer, DCF_A2, dcfparam->zerobits))
-! clock->flags |= PARSEB_LEAP;
-
- if (ext_bf(buffer, DCF_R, dcfparam->zerobits))
- clock->flags |= PARSEB_ALTERNATE;
---- 278,284 ----
- clock->flags |= PARSEB_ANNOUNCE;
-
- if (ext_bf(buffer, DCF_A2, dcfparam->zerobits))
-! clock->flags |= PARSEB_LEAPADD; /* default: DCF77 data format deficiency */
-
- if (ext_bf(buffer, DCF_R, dcfparam->zerobits))
- clock->flags |= PARSEB_ALTERNATE;
-***************
-*** 528,534 ****
- /*
- * History:
- *
-! * clk_rawdcf.c,v
- * Revision 3.11 1994/02/02 17:45:23 kardel
- * rcs ids fixed
- *
---- 528,537 ----
- /*
- * History:
- *
-! * clk_rawdcf.c,v
-! * Revision 3.12 1994/02/20 13:04:39 kardel
-! * parse add/delete second support
-! *
- * Revision 3.11 1994/02/02 17:45:23 kardel
- * rcs ids fixed
- *
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/parse/clk_schmid.c,v
-retrieving revision 3.12
-diff -c -r3.12 clk_schmid.c
-*** 3.12 1994/02/02 17:45:25
---- parse/clk_schmid.c 1994/02/20 13:04:41
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_SCHMID)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_schmid.c,v 3.12 1994/02/02 17:45:25 kardel Exp
- *
-! * clk_schmid.c,v 3.12 1994/02/02 17:45:25 kardel Exp
- *
- * Schmid clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_SCHMID)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_schmid.c,v 3.13 1994/02/20 13:04:41 kardel Exp
- *
-! * clk_schmid.c,v 3.13 1994/02/20 13:04:41 kardel Exp
- *
- * Schmid clock support
- *
-***************
-*** 152,158 ****
-
- if (buffer[8] & WS_LEAP)
- {
-! clock->flags |= PARSEB_LEAP;
- }
- }
-
---- 152,158 ----
-
- if (buffer[8] & WS_LEAP)
- {
-! clock->flags |= PARSEB_LEAPADD; /* default: DCF77 data format deficiency */
- }
- }
-
-***************
-*** 167,173 ****
- /*
- * History:
- *
-! * clk_schmid.c,v
- * Revision 3.12 1994/02/02 17:45:25 kardel
- * rcs ids fixed
- *
---- 167,176 ----
- /*
- * History:
- *
-! * clk_schmid.c,v
-! * Revision 3.13 1994/02/20 13:04:41 kardel
-! * parse add/delete second support
-! *
- * Revision 3.12 1994/02/02 17:45:25 kardel
- * rcs ids fixed
- *
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v
-retrieving revision 3.47
-diff -c -r3.47 refclock_parse.c
-*** 3.47 1994/02/02 17:44:30
---- xntpd/refclock_parse.c 1994/02/20 13:26:00
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.47 1994/02/02 17:44:30 kardel Exp
- *
-! * refclock_parse.c,v 3.47 1994/02/02 17:44:30 kardel Exp
- *
- * generic reference clock driver for receivers
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp
- *
-! * refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp
- *
- * generic reference clock driver for receivers
- *
-***************
-*** 129,135 ****
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.45 1994/01/25 19:06:27 kardel Exp";
- #endif
-
- /**===========================================================================
---- 129,135 ----
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp";
- #endif
-
- /**===========================================================================
-***************
-*** 1706,1712 ****
- { PARSEB_NOSYNC, "TIME CODE NOT CONFIRMED" },
- { PARSEB_DST, "DST" },
- { PARSEB_UTC, "UTC DISPLAY" },
-! { PARSEB_LEAP, "LEAP WARNING" },
- { PARSEB_LEAPSECOND, "LEAP SECOND" },
- { PARSEB_ALTERNATE,"ALTERNATE ANTENNA" },
- { PARSEB_TIMECODE, "TIME CODE" },
---- 1706,1713 ----
- { PARSEB_NOSYNC, "TIME CODE NOT CONFIRMED" },
- { PARSEB_DST, "DST" },
- { PARSEB_UTC, "UTC DISPLAY" },
-! { PARSEB_LEAPADD, "LEAP ADD WARNING" },
-! { PARSEB_LEAPDEL, "LEAP DELETE WARNING" },
- { PARSEB_LEAPSECOND, "LEAP SECOND" },
- { PARSEB_ALTERNATE,"ALTERNATE ANTENNA" },
- { PARSEB_TIMECODE, "TIME CODE" },
-***************
-*** 2539,2547 ****
- parse_leap()
- {
- /*
-- * PARSE does encode a leap warning... we are aware but not afraid of that
-- * as long as we get a little help for the direction from the operator until
- * PARSE encodes the LEAP correction direction.
- */
- }
-
---- 2540,2549 ----
- parse_leap()
- {
- /*
- * PARSE encodes the LEAP correction direction.
-+ * For timecodes that do not pass on the leap correction direction
-+ * the default PARSEB_LEAPADD must be used. It may then be modified
-+ * with a fudge flag (flag2).
- */
- }
-
-***************
-*** 2821,2827 ****
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
-! sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.45 1994/01/25 19:06:27 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
---- 2823,2829 ----
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
-! sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
-***************
-*** 3245,3258 ****
- }
- else
- {
-! if (PARSE_LEAP(parsetime->parse_state))
- {
- leap = (parse->flags & PARSE_LEAP_DELETE) ? LEAP_DELSECOND : LEAP_ADDSECOND;
- }
- else
-! {
-! leap = LEAP_NOWARNING;
-! }
- }
-
- refclock_receive(parse->peer, &off, 0, LFPTOFP(&dispersion), &reftime, &rectime, leap);
---- 3247,3270 ----
- }
- else
- {
-! if (PARSE_LEAPADD(parsetime->parse_state))
- {
-+ /*
-+ * we pick this state also for time code that pass leap warnings
-+ * without direction information (as earth is currently slowing
-+ * down).
-+ */
- leap = (parse->flags & PARSE_LEAP_DELETE) ? LEAP_DELSECOND : LEAP_ADDSECOND;
- }
- else
-! if (PARSE_LEAPDEL(parsetime->parse_state))
-! {
-! leap = LEAP_DELSECOND;
-! }
-! else
-! {
-! leap = LEAP_NOWARNING;
-! }
- }
-
- refclock_receive(parse->peer, &off, 0, LFPTOFP(&dispersion), &reftime, &rectime, leap);
-***************
-*** 3395,3401 ****
- /*
- * History:
- *
-! * refclock_parse.c,v
- * Revision 3.47 1994/02/02 17:44:30 kardel
- * rcs ids fixed
- *
---- 3407,3419 ----
- /*
- * History:
- *
-! * refclock_parse.c,v
-! * Revision 3.49 1994/02/20 13:26:00 kardel
-! * rcs id cleanup
-! *
-! * Revision 3.48 1994/02/20 13:04:56 kardel
-! * parse add/delete second support
-! *
- * Revision 3.47 1994/02/02 17:44:30 kardel
- * rcs ids fixed
- *
-*** parse/util/parsetest.c Sun Feb 20 15:54:11 1994
---- parse/util/parsetest.c Sun Feb 20 14:04:46 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/kernel/parsetest.c,v 3.4 1993/03/17 17:16:57 kardel Exp
- *
-! * parsetest.c,v 3.10 1994/01/23 17:22:18 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/util/parsetest.c,v 3.13 1994/02/20 13:04:46 kardel Exp
- *
-! * parsetest.c,v 3.13 1994/02/20 13:04:46 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
-***************
-*** 10,26 ****
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
-! * parsetest.c,v
-! * Revision 3.4 1993/03/17 17:16:57 kardel
-! * DEC OSF/1 ALPHA Integration - 930314
- *
-! * Revision 3.3 1993/01/18 09:24:33 kardel
-! * updated copyright conditions in conjunction with
-! * conditions set up in the COPYRIGHT file
- *
-- * Revision 3.2 1993/01/17 13:43:00 kardel
-- * 1993 initial update
-- *
- */
-
- #ifndef STREAM
---- 10,22 ----
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
-! * parsetest.c,v
-! * Revision 3.13 1994/02/20 13:04:46 kardel
-! * parse add/delete second support
- *
-! * Revision 3.12 1994/02/02 17:45:51 kardel
-! * rcs ids fixed
- *
- */
-
- #ifndef STREAM
-***************
-*** 199,205 ****
- parsetime_t parsetime;
- struct strioctl strioc;
-
-! printf("parsetest.c,v 3.10 1994/01/23 17:22:18 kardel Exp\n");
-
- while (ioctl(fd, I_POP, 0) == 0)
- ;
---- 195,201 ----
- parsetime_t parsetime;
- struct strioctl strioc;
-
-! printf("parsetest.c,v 3.13 1994/02/20 13:04:46 kardel Exp\n");
-
- while (ioctl(fd, I_POP, 0) == 0)
- ;
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v
-retrieving revision 3.16
-diff -c -r3.16 parsestreams.c
-*** 3.16 1994/02/15 22:39:50
---- parse/parsestreams.c 1994/02/20 15:18:02
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.16 1994/02/15 22:39:50 kardel Exp
- *
-! * parsestreams.c,v 3.16 1994/02/15 22:39:50 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.17 1994/02/20 15:18:02 kardel Exp
- *
-! * parsestreams.c,v 3.17 1994/02/20 15:18:02 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
-***************
-*** 16,22 ****
- */
-
- #ifndef lint
-! static char rcsid[] = "parsestreams.c,v 3.12 1994/01/25 19:05:30 kardel Exp";
- #endif
-
- #include "sys/types.h"
---- 16,22 ----
- */
-
- #ifndef lint
-! static char rcsid[] = "parsestreams.c,v 3.17 1994/02/20 15:18:02 kardel Exp";
- #endif
-
- #include "sys/types.h"
-***************
-*** 195,201 ****
- }
- else
- {
-! static char revision[] = "3.12";
- char *s, *S, *t;
-
- strncpy(ifm->f_name, mname, FMNAMESZ);
---- 195,201 ----
- }
- else
- {
-! static char revision[] = "3.17";
- char *s, *S, *t;
-
- strncpy(ifm->f_name, mname, FMNAMESZ);
-***************
-*** 1259,1265 ****
- /*
- * History:
- *
-! * parsestreams.c,v
- * Revision 3.16 1994/02/15 22:39:50 kardel
- * memory leak on open failure closed
- *
---- 1259,1268 ----
- /*
- * History:
- *
-! * parsestreams.c,v
-! * Revision 3.17 1994/02/20 15:18:02 kardel
-! * rcs id cleanup
-! *
- * Revision 3.16 1994/02/15 22:39:50 kardel
- * memory leak on open failure closed
- *
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.21 b/usr.sbin/xntpd/patches/patch.21
deleted file mode 100644
index 929997130909..000000000000
--- a/usr.sbin/xntpd/patches/patch.21
+++ /dev/null
@@ -1,54 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa25363; 23 Feb 94 18:50 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa28210;
- 23 Feb 94 18:44 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA07903 (5.65c-6/7.3v-FAU); Thu, 24 Feb 1994 00:44:18 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA19013 (5.65c-6/7.3m-FAU); Thu, 24 Feb 1994 00:44:17 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199402232344.AA19013@faui43.informatik.uni-erlangen.de>
-Subject: TRAK clock
-To: mills@udel.edu
-Date: Thu, 24 Feb 94 0:44:12 MET
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi, Dave - some obvious things about the TRAK clock:
- - please removed the 4 ^A at the end of the
- xntpd/reflock_trak.c file (email leftovers).
- - add following refclocks/rclk.TRAK file
-
-#!/bin/sh -
-CMD="$1"
-shift;
-
-. refclocks/setup
-
-case "$CMD" in
- info)
- echo " TRAK - TRAK 8810 GPS station clock"
- ;;
- check)
- if check "$RCONFIG" '$0 ~ /TRAK/'; then
- echo "TRAK - TRAK 8810 GPS station clock"
- fi
- ;;
- config)
- if check "$REFCONF" '$0 ~ /TRAK/' ||
- ( [ ! "$REFCONF" ] && query "Include TRAK 8810 GPS station clock (TRAK)" n); then
- if check "$PPSFEATURES" '$0 ~ /CD/' &&
- [ "$PPSOK" -eq 1 ] &&
- (check "$REFCONF" '$0 ~ /TRAKPPS/' ||
- ( [ ! "$REFCONF" ] && query " Use TRAK for PPS" n)); then
- echo "-DTRAKPPS" >> $RCONFIG
- else
- echo "-DTRAK" >> $RCONFIG
- fi
- fi
- ;;
-esac
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.22 b/usr.sbin/xntpd/patches/patch.22
deleted file mode 100644
index 8b4296c79926..000000000000
--- a/usr.sbin/xntpd/patches/patch.22
+++ /dev/null
@@ -1,296 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa02110; 24 Feb 94 18:54 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa13897;
- 24 Feb 94 18:53 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA27796 (5.65c-6/7.3v-FAU); Fri, 25 Feb 1994 00:53:32 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA16114 (5.65c-6/7.3m-FAU); Fri, 25 Feb 1994 00:53:31 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199402242353.AA16114@faui43.informatik.uni-erlangen.de>
-Subject: patches (parse pps/pll control)
-To: mills@udel.edu
-Date: Fri, 25 Feb 94 0:52:59 MET
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi, here are some patches.
-
-pps pll control is nor supported by parse.
-pps output variable are readable via mode 6 messages.
-
-diff -c v3/parse/parsestreams.c:1.1.1.10 v3/parse/parsestreams.c:3.19
-*** v3/parse/parsestreams.c:1.1.1.10 Fri Feb 25 00:44:41 1994
---- v3/parse/parsestreams.c Fri Feb 25 00:44:41 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.17 1994/02/20 15:18:02 kardel Exp
- *
-! * parsestreams.c,v 3.17 1994/02/20 15:18:02 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.19 1994/02/24 16:33:54 kardel Exp
- *
-! * parsestreams.c,v 3.19 1994/02/24 16:33:54 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
-***************
-*** 16,22 ****
- */
-
- #ifndef lint
-! static char rcsid[] = "parsestreams.c,v 3.17 1994/02/20 15:18:02 kardel Exp";
- #endif
-
- #include "sys/types.h"
---- 16,22 ----
- */
-
- #ifndef lint
-! static char rcsid[] = "parsestreams.c,v 3.19 1994/02/24 16:33:54 kardel Exp";
- #endif
-
- #include "sys/types.h"
-***************
-*** 195,201 ****
- }
- else
- {
-! static char revision[] = "3.17";
- char *s, *S, *t;
-
- strncpy(ifm->f_name, mname, FMNAMESZ);
---- 195,201 ----
- }
- else
- {
-! static char revision[] = "3.19";
- char *s, *S, *t;
-
- strncpy(ifm->f_name, mname, FMNAMESZ);
-***************
-*** 1076,1081 ****
---- 1076,1086 ----
-
- #define MAXDEPTH 50 /* maximum allowed stream crawl */
-
-+ #ifdef PPS_SYNC
-+ extern hardpps();
-+ extern struct timeval time;
-+ #endif
-+
- /*
- * take external status interrupt (only CD interests us)
- */
-***************
-*** 1087,1101 ****
- register queue_t *q;
- register unsigned char zsstatus;
- register int loopcheck;
-- register unsigned char cdstate;
- register char *dname;
-
- /*
- * pick up current state
- */
- zsstatus = zsaddr->zscc_control;
-
-! if (za->za_rr0 ^ (cdstate = zsstatus & ZSRR0_CD))
- {
- timestamp_t cdevent;
- register int status;
---- 1092,1109 ----
- register queue_t *q;
- register unsigned char zsstatus;
- register int loopcheck;
- register char *dname;
-+ #ifdef PPS_SYNC
-+ register int s;
-+ register long usec;
-+ #endif
-
- /*
- * pick up current state
- */
- zsstatus = zsaddr->zscc_control;
-
-! if ((za->za_rr0 ^ zsstatus) & (ZSRR0_CD|ZSRR0_SYNC))
- {
- timestamp_t cdevent;
- register int status;
-***************
-*** 1103,1129 ****
- /*
- * CONDITIONAL external measurement support
- */
-! SET_LED(cdstate); /*
- * inconsistent with upper SET_LED, but this
- * is for oscilloscope business anyway and we
- * are just interested in edge delays in the
- * lower us range
- */
-!
- /*
- * time stamp
- */
- uniqtime(&cdevent.tv);
-!
-! TIMEVAL_USADD(&cdevent.tv, xsdelay);
-!
-! q = za->za_ttycommon.t_readq;
-
- /*
- * logical state
- */
-! status = cd_invert ? cdstate == 0 : cdstate != 0;
-
- /*
- * ok - now the hard part - find ourself
- */
---- 1111,1155 ----
- /*
- * CONDITIONAL external measurement support
- */
-! SET_LED(zsstatus & (ZSRR0_CD|ZSRR0_SYNC)); /*
- * inconsistent with upper SET_LED, but this
- * is for oscilloscope business anyway and we
- * are just interested in edge delays in the
- * lower us range
- */
-! #ifdef PPS_SYNC
-! s = splclock();
-! usec = time.tv_usec;
-! #endif
- /*
- * time stamp
- */
- uniqtime(&cdevent.tv);
-!
-! #ifdef PPS_SYNC
-! splx(s);
-! #endif
-
- /*
- * logical state
- */
-! status = cd_invert ? (zsstatus & (ZSRR0_CD|ZSRR0_SYNC)) == 0 : (zsstatus & (ZSRR0_CD|ZSRR0_SYNC)) != 0;
-
-+ #ifdef PPS_SYNC
-+ if (status)
-+ {
-+ usec = cdevent.tv.tv_usec - usec;
-+ if (usec < 0)
-+ usec += 1000000;
-+
-+ hardpps(&cdevent.tv, usec);
-+ }
-+ #endif
-+
-+ TIMEVAL_USADD(&cdevent.tv, xsdelay);
-+
-+ q = za->za_ttycommon.t_readq;
-+
- /*
- * ok - now the hard part - find ourself
- */
-***************
-*** 1179,1188 ****
- /*
- * only pretend that CD has been handled
- */
-! za->za_rr0 = za->za_rr0 & ~ZSRR0_CD | zsstatus & ZSRR0_CD;
- ZSDELAY(2);
-
-! if (!((za->za_rr0 ^ zsstatus) & ~ZSRR0_CD))
- {
- /*
- * all done - kill status indication and return
---- 1205,1214 ----
- /*
- * only pretend that CD has been handled
- */
-! za->za_rr0 = za->za_rr0 & ~(ZSRR0_CD|ZSRR0_SYNC) | zsstatus & (ZSRR0_CD|ZSRR0_SYNC);
- ZSDELAY(2);
-
-! if (!((za->za_rr0 ^ zsstatus) & ~(ZSRR0_CD|ZSRR0_SYNC)))
- {
- /*
- * all done - kill status indication and return
-***************
-*** 1260,1265 ****
---- 1286,1297 ----
- * History:
- *
- * parsestreams.c,v
-+ * Revision 3.19 1994/02/24 16:33:54 kardel
-+ * CD events can also be posted on sync flag
-+ *
-+ * Revision 3.18 1994/02/24 14:12:58 kardel
-+ * initial PPS_SYNC support version
-+ *
- * Revision 3.17 1994/02/20 15:18:02 kardel
- * rcs id cleanup
- *
-diff -c v3/xntpd/ntp_loopfilter.c:1.1.1.33 v3/xntpd/ntp_loopfilter.c:3.40
-*** v3/xntpd/ntp_loopfilter.c:1.1.1.33 Fri Feb 25 00:46:20 1994
---- v3/xntpd/ntp_loopfilter.c Fri Feb 25 00:46:21 1994
-***************
-*** 522,529 ****
---- 522,545 ----
- ntv.maxerror = sys_rootdispersion + sys_rootdelay / 2;
- ntv.esterror = sys_rootdispersion;
- ntv.time_constant = time_constant;
-+ ntv.shift = 0;
- (void)ntp_adjtime(&ntv);
- drift_comp = ntv.frequency;
-+ if (ntv.shift != 0) {
-+ char buf[128];
-+ (void) sprintf(buf, "pps_freq=%s", fptoa(ntv.ybar, 3));
-+ set_sys_var(buf, strlen(buf)+1, RO|DEF);
-+ (void) sprintf(buf, "pps_disp=%s", fptoa(ntv.disp, 3));
-+ set_sys_var(buf, strlen(buf)+1, RO|DEF);
-+ (void) sprintf(buf, "pps_interval=%ld",1 << ntv.shift);
-+ set_sys_var(buf, strlen(buf)+1, RO);
-+ (void) sprintf(buf, "pps_intervals=%ld", ntv.calcnt);
-+ set_sys_var(buf, strlen(buf)+1, RO);
-+ (void) sprintf(buf, "pps_jitterexceeded=%ld", ntv.jitcnt);
-+ set_sys_var(buf, strlen(buf)+1, RO);
-+ (void) sprintf(buf, "pps_dispersionexceeded=%ld", ntv.discnt);
-+ set_sys_var(buf, strlen(buf)+1, RO);
-+ }
- #endif /* KERNEL_PLL */
- } else {
- if (offset < 0) {
-***************
-*** 725,730 ****
---- 741,748 ----
- "loop_config: skew compensation %s too large",
- fptoa(tmp, 5));
- } else {
-+ char var[40];
-+
- drift_comp = tmp;
-
- #if defined(KERNEL_PLL)
-***************
-*** 751,756 ****
---- 769,778 ----
- syslog(LOG_NOTICE,
- "%susing kernel phase-lock loop",
- (pll_control) ? "" : "Not ");
-+ (void)sprintf(var, "kernel_pll=%s", pll_control ? "true" : "false");
-+
-+ set_sys_var(var, strlen(var)+1, RO);
-+
- #if DEBUG
- if (debug)
- printf("pll_control %d\n", pll_control);
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.23 b/usr.sbin/xntpd/patches/patch.23
deleted file mode 100644
index 5fee16f35e9c..000000000000
--- a/usr.sbin/xntpd/patches/patch.23
+++ /dev/null
@@ -1,80 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa18634; 27 Feb 94 13:54 EST
-Received: from rincewind.mech.virginia.edu by louie.udel.edu id aa11711;
- 27 Feb 94 13:53 EST
-Received: from localhost (dmm0t@localhost) by rincewind.mech.virginia.edu (8.6.5/8.6.5) id NAA04646 for mills@udel.edu; Sun, 27 Feb 1994 13:53:35 -0500
-From: David Meyer <dmm0t@rincewind.mech.virginia.edu>
-Message-Id: <199402271853.NAA04646@rincewind.mech.virginia.edu>
-Subject: patches to xntpd-3.3j for NeXT
-To: mills@udel.edu
-Date: Sun, 27 Feb 1994 13:53:34 -0500 (EST)
-X-Mailer: ELM [version 2.4 PL23]
-MIME-Version: 1.0
-Content-Type: text/plain; charset=US-ASCII
-Content-Transfer-Encoding: 7bit
-Content-Length: 2043
-
-I have a couple of patches to make the 3.3j beta compile on a NeXT
-running NS3.1.
-
-The first patch just defines RETSIGTYPE. The second patch puts
-HAVE_BSD_TTYS in DEFS rather than AUTHDEFS. The last patch just fixes
-a type - using # rather than * in a comment block.
-
-*** ../orig/include/ntp_machine.h Sun Feb 20 22:23:29 1994
---- include/ntp_machine.h Sun Feb 27 13:47:59 1994
-***************
-*** 313,318 ****
---- 313,319 ----
- * Next
- */
- #if defined(SYS_NEXT)
-+ #define RETSIGTYPE void
- #define DOSYNCTODR
- #define HAVE_READKMEM
- #define HAVE_BSD_NICE
-
-*** ../orig/machines/next Sun Feb 20 22:23:36 1994
---- machines/next Sun Feb 27 13:47:15 1994
-***************
-*** 1,6 ****
- RANLIB= ranlib -c -s
-! DEFS= -DSYS_NEXT
-! AUTHDEFS= -DDES -DMD5 -DFAST_MD5 -DHAVE_BSD_TTYS
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
- RESLIB=
---- 1,6 ----
- RANLIB= ranlib -c -s
-! DEFS= -DSYS_NEXT -DHAVE_BSD_TTYS
-! AUTHDEFS= -DDES -DMD5 -DFAST_MD5
- CLOCKDEFS= -DLOCAL_CLOCK
- DAEMONLIBS=
- RESLIB=
-
-*** ../orig/xntpd/refclock_irig.c Thu Jan 27 09:03:58 1994
---- xntpd/refclock_irig.c Sun Feb 27 13:36:30 1994
-***************
-*** 19,25 ****
- * This driver supports the IRIG audio decoder. This clever gadget uses
- * a modified BSD audio driver for the Sun SPARCstation which provides
- * a timestamp, raw binary timecode, status byte and decoded ASCII
-! # timecode. The data are represented in the structure:
- *
- * struct irig_time {
- * struct timeval stamp; timestamp
---- 19,25 ----
- * This driver supports the IRIG audio decoder. This clever gadget uses
- * a modified BSD audio driver for the Sun SPARCstation which provides
- * a timestamp, raw binary timecode, status byte and decoded ASCII
-! * timecode. The data are represented in the structure:
- *
- * struct irig_time {
- * struct timeval stamp; timestamp
-
-
---
-David M. Meyer Mechanical & Aerospace Engineering
-dmm0t@rincewind.mech.virginia.edu University of Virginia
-NeXTmail ok
-
diff --git a/usr.sbin/xntpd/patches/patch.24 b/usr.sbin/xntpd/patches/patch.24
deleted file mode 100644
index 6ab00e2a8391..000000000000
--- a/usr.sbin/xntpd/patches/patch.24
+++ /dev/null
@@ -1,474 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa16943; 4 Mar 94 6:43 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa02686;
- 4 Mar 94 6:34 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA12349 (5.65c-6/7.3v-FAU); Fri, 4 Mar 1994 12:34:08 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA26044 (5.65c-6/7.3m-FAU); Fri, 4 Mar 1994 12:34:06 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199403041134.AA26044@faui43.informatik.uni-erlangen.de>
-Subject: Re: patches for 3.3l
-To: Mills@udel.edu
-Date: Fri, 4 Mar 94 12:33:49 MET
-In-Reply-To: <9403040253.aa16147@huey.udel.edu>; from "Mills@udel.edu" at Mar 4, 94 2:53 am
-X-Mailer: ELM [version 2.3 PL11]
-
-
-> Frank,
-
-
-> ld: ../lib/libntp.a: warning: archive has no table of contents; add one using ranlib(1)
-I didn't fiddle with lib/* this round. Thus it must be some problem
-with the lib building process. Try make clean and again. I just checked
-the patches with my 3.3l tree - fine. I do admit being a bit lax when
-sending you the patches - you might have had to enter some paths
-manually.
-
-> ld: Undefined symbol
-> _DESauth1crypt ....
-Happens if ranlib isn't run.
-
-> Obviously, it bombed.
-Not likely being a problem from my patches - the lib/libntp.a got
-inconsistent.
-Usually this should not happen (ranlib need to be run on BSD systems).
-Try building again from scratch (make clean all). If the problem
-persists look (or send me) at the output of the lib building step
-something is amiss there at your site.
-
-I'll include the patches here again not properly prepared for a
-plain "patch < patchfile".
-
-
-Hi, Dave,
-
-Here are some more patches:
- - allow parse conversion routines to deliver UTC directly
- - irix4 machine/cc from Amos
- - rcs id fixing
- - linux hints
- - modload hints
- - full integration of trak refclock driver (was only partially integrated)
-
-diff -c /dev/null compilers/irix4.cc:1.1
-*** /dev/null Thu Mar 3 10:29:50 1994
---- compilers/irix4.cc Thu Mar 3 10:29:50 1994
-***************
-*** 0 ****
---- 1,2 ----
-+ COMPILER= cc -cckr
-+ COPTS= -O2
-diff -c hints/linux:1.1.1.3 hints/linux:1.5
-*** hints/linux:1.1.1.3 Thu Mar 3 10:30:53 1994
---- hints/linux Thu Mar 3 10:30:53 1994
-***************
-*** 1,5 ****
-
-! Requirements: kernel 0.99.14y or newer, libc 4.5.20 or newer
- ------------
-
- With this configuration, xntp should build an run right out of the box
---- 1,5 ----
-
-! Requirements: kernel 0.99.14y or newer, libc 4.5.21 or newer
- ------------
-
- With this configuration, xntp should build an run right out of the box
-***************
-*** 7,14 ****
- versions of the kernel or libc, or have any other question not covered in the
- READMEs / hint files (sorry, necessary comment in the Linux community ;-) feel
- free to ask me (duwe@informatik.uni-erlangen.de)
--
-- [NOTE: libc-4.5.20 is (or was ? ;-) a beta testing release, but the first
-- binary compiled under the appropriate kernel. Get this one from
-- tsx-11:.../GCC/private/dontuse , compile 4.5.19 yourself or wait for the next
-- puplic relase after 4.5.20]
---- 7,9 ----
-diff -c include/parse.h:1.1.1.8 include/parse.h:3.17
-*** include/parse.h:1.1.1.8 Thu Mar 3 10:31:37 1994
---- include/parse.h Thu Mar 3 10:31:37 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/include/parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp
- *
-! * parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/include/parse.h,v 3.17 1994/03/03 09:27:20 kardel Exp
- *
-! * parse.h,v 3.17 1994/03/03 09:27:20 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
-***************
-*** 15,21 ****
- #ifndef __PARSE_H__
- #define __PARSE_H__
- #if !(defined(lint) || defined(__GNUC__))
-! static char parsehrcsid[]="parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp FAU";
- #endif
-
- #include "ntp_types.h"
---- 15,21 ----
- #ifndef __PARSE_H__
- #define __PARSE_H__
- #if !(defined(lint) || defined(__GNUC__))
-! static char parsehrcsid[]="parse.h,v 3.17 1994/03/03 09:27:20 kardel Exp";
- #endif
-
- #include "ntp_types.h"
-***************
-*** 301,306 ****
---- 301,307 ----
- LONG second;
- LONG usecond;
- LONG utcoffset; /* in seconds */
-+ time_t utctime; /* the actual time - alternative to date/time */
- LONG flags; /* current clock status */
- };
-
-***************
-*** 385,390 ****
---- 386,394 ----
- * History:
- *
- * parse.h,v
-+ * Revision 3.17 1994/03/03 09:27:20 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.13 1994/01/25 19:04:21 kardel
- * 94/01/23 reconcilation
- *
-diff -c parse/Makefile.kernel:1.1.1.3 parse/Makefile.kernel:3.9
-*** parse/Makefile.kernel:1.1.1.3 Thu Mar 3 10:35:48 1994
---- parse/Makefile.kernel Thu Mar 3 10:35:48 1994
-***************
-*** 40,46 ****
- rm -f parsestreams.o
-
- parsestreams.o: parsestreams.o.$(KARCH)
-! @echo "--- You may load parsestreams.o.$(KARCH) via 'modload parsestreams.o.$(KARCH)' into the kernel"
-
- parsestreams.o.$(KARCH): parsestreams.c ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c $(DEFS) -I../include parsestreams.c
---- 40,46 ----
- rm -f parsestreams.o
-
- parsestreams.o: parsestreams.o.$(KARCH)
-! @echo "--- You may load parsestreams.o.$(KARCH) via 'modload parsestreams.o' (put in e.g. /sys/<karch>/OBJ) into the kernel"
-
- parsestreams.o.$(KARCH): parsestreams.c ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c $(DEFS) -I../include parsestreams.c
-diff -c parse/README.new_clocks:1.1.1.3 parse/README.new_clocks:3.5
-*** parse/README.new_clocks:1.1.1.3 Thu Mar 3 10:35:52 1994
---- parse/README.new_clocks Thu Mar 3 10:35:53 1994
-***************
-*** 23,28 ****
---- 23,29 ----
- LONG second;
- LONG usecond;
- LONG utcoffset; /* in seconds */
-+ time_t utcoffset; /* true utc time instead of date/time */
- LONG flags; /* current clock status */
- };
-
-***************
-*** 52,57 ****
---- 53,65 ----
- PARSEB_S_PPS supports PPS time stamping
- PARSEB_S_POSITION supports position information (GPS)
-
-+ If the utctime field is non zero this value will be take as
-+ time code value. This allows for conversion routines that
-+ already have the utc time value. The utctime field gives the seconds
-+ since Jan 1st 1970, 0:00:00. The useconds field gives the respective
-+ usec value. The fields for date and time (down to second resolution)
-+ will be ignored.
-+
- Conversion is done in the cvt_* routine in parse/clk_*.c files. look in
- them for examples. The basic structure is:
-
-diff -c parse/parse.c:1.1.1.9 parse/parse.c:3.22
-*** parse/parse.c:1.1.1.9 Thu Mar 3 10:36:06 1994
---- parse/parse.c Thu Mar 3 10:36:07 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.21 1994/02/02 17:45:30 kardel Exp
- *
-! * parse.c,v 3.21 1994/02/02 17:45:30 kardel Exp
- *
- * Parser module for reference clock
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.22 1994/02/25 12:34:49 kardel Exp
- *
-! * parse.c,v 3.22 1994/02/25 12:34:49 kardel Exp
- *
- * Parser module for reference clock
- *
-***************
-*** 556,561 ****
---- 556,564 ----
- register int i;
- time_t t;
-
-+ if (clock->utctime)
-+ return clock->utctime; /* if the conversion routine gets it right away - why not */
-+
- if (clock->year < 100)
- clock->year += 1900;
-
-***************
-*** 628,633 ****
---- 631,639 ----
- t += clock->utcoffset; /* warp to UTC */
-
- /* done */
-+
-+ clock->utctime = t; /* documentray only */
-+
- return t;
- }
-
-***************
-*** 890,895 ****
---- 896,903 ----
-
- if (parseio->parse_flags & PARSE_FIXED_FMT)
- {
-+ clock.utctime = 0;
-+
- switch ((cvtrtc = clockformats[format]->convert ? clockformats[format]->convert(parseio->parse_data, parseio->parse_index, clockformats[format]->data, &clock) : CVT_NONE) & CVT_MASK)
- {
- case CVT_FAIL:
-***************
-*** 941,946 ****
---- 949,956 ----
- {
- do
- {
-+ clock.utctime = 0;
-+
- switch ((cvtrtc = (clockformats[format]->convert && !(clockformats[format]->flags & CVT_FIXEDONLY)) ?
- clockformats[format]->convert(parseio->parse_data, parseio->parse_index, clockformats[format]->data, &clock) :
- CVT_NONE) & CVT_MASK)
-***************
-*** 1148,1153 ****
---- 1158,1166 ----
- * History:
- *
- * parse.c,v
-+ * Revision 3.22 1994/02/25 12:34:49 kardel
-+ * allow for converter generated utc times
-+ *
- * Revision 3.21 1994/02/02 17:45:30 kardel
- * rcs ids fixed
- *
-diff -c parse/util/testdcf.c:1.1.1.6 parse/util/testdcf.c:3.11
-*** parse/util/testdcf.c:1.1.1.6 Thu Mar 3 10:36:27 1994
---- parse/util/testdcf.c Thu Mar 3 10:36:27 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/util/testdcf.c,v 3.9 1994/01/25 19:05:45 kardel Exp
- *
-! * testdcf.c,v 3.9 1994/01/25 19:05:45 kardel Exp
- *
- * simple DCF77 100/200ms pulse test program (via 50Baud serial line)
- *
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/util/testdcf.c,v 3.11 1994/02/02 17:45:55 kardel Exp
- *
-! * testdcf.c,v 3.11 1994/02/02 17:45:55 kardel Exp
- *
- * simple DCF77 100/200ms pulse test program (via 50Baud serial line)
- *
-diff -c xntpd/Makefile.tmpl:1.1.1.18 xntpd/Makefile.tmpl:3.28
-*** xntpd/Makefile.tmpl:1.1.1.18 Thu Mar 3 10:38:13 1994
---- xntpd/Makefile.tmpl Thu Mar 3 10:38:13 1994
-***************
-*** 34,40 ****
- refclock_wwvb.c refclock_goes.c refclock_mx4200.c \
- refclock_parse.c refclock_as2201.c refclock_omega.c \
- refclock_tpro.c refclock_leitch.c refclock_irig.c \
-! refclock_msfees.c refclock_gpstm.c ntp_intres.c ntp_filegen.c
-
- OBJS= ntp_config.o ntp_control.o ntp_io.o ntp_leap.o \
- ntp_loopfilter.o ntp_monitor.o ntp_peer.o ntp_proto.o \
---- 34,41 ----
- refclock_wwvb.c refclock_goes.c refclock_mx4200.c \
- refclock_parse.c refclock_as2201.c refclock_omega.c \
- refclock_tpro.c refclock_leitch.c refclock_irig.c \
-! refclock_msfees.c refclock_gpstm.c refclock_trak.c \
-! ntp_intres.c ntp_filegen.c
-
- OBJS= ntp_config.o ntp_control.o ntp_io.o ntp_leap.o \
- ntp_loopfilter.o ntp_monitor.o ntp_peer.o ntp_proto.o \
-***************
-*** 44,50 ****
- refclock_wwvb.o refclock_goes.o refclock_mx4200.o \
- refclock_parse.o refclock_as2201.o refclock_omega.o \
- refclock_tpro.o refclock_leitch.o refclock_irig.o \
-! refclock_msfees.o refclock_gpstm.o ntp_intres.o ntp_filegen.o
-
- all: $(PROGRAM)
-
---- 45,52 ----
- refclock_wwvb.o refclock_goes.o refclock_mx4200.o \
- refclock_parse.o refclock_as2201.o refclock_omega.o \
- refclock_tpro.o refclock_leitch.o refclock_irig.o \
-! refclock_msfees.o refclock_gpstm.o refclock_trak.o \
-! ntp_intres.o ntp_filegen.o
-
- all: $(PROGRAM)
-
-***************
-*** 136,141 ****
---- 138,146 ----
-
- refclock_msfees.o: refclock_msfees.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-+
-+ refclock_trak.o: refclock_trak.c
-+ $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
- refclock_gpstm.o: refclock_gpstm.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-diff -c xntpd/ntp_control.c:1.1.1.17 xntpd/ntp_control.c:3.26
-*** xntpd/ntp_control.c:1.1.1.17 Thu Mar 3 10:38:16 1994
---- xntpd/ntp_control.c Thu Mar 3 10:38:17 1994
-***************
-*** 301,307 ****
- static u_char clocktypes[] = {
- CTL_SST_TS_NTP, /* REFCLK_NONE */
- CTL_SST_TS_UNSPEC, /* REFCLK_LOCALCLOCK */
-! CTL_SST_TS_HF, /* REFCLK_WWV_HEATH */
- CTL_SST_TS_HF, /* REFCLK_WWV_PST */
- CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM */
- CTL_SST_TS_UHF, /* REFCLK_GOES_TRUETIME */
---- 301,307 ----
- static u_char clocktypes[] = {
- CTL_SST_TS_NTP, /* REFCLK_NONE */
- CTL_SST_TS_UNSPEC, /* REFCLK_LOCALCLOCK */
-! CTL_SST_TS_HF, /* REFCLK_GPS_TRAK */
- CTL_SST_TS_HF, /* REFCLK_WWV_PST */
- CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM */
- CTL_SST_TS_UHF, /* REFCLK_GOES_TRUETIME */
-diff -c xntpd/refclock_conf.c:1.1.1.22 xntpd/refclock_conf.c:3.21
-*** xntpd/refclock_conf.c:1.1.1.22 Thu Mar 3 10:38:54 1994
---- xntpd/refclock_conf.c Thu Mar 3 10:38:54 1994
-***************
-*** 113,119 ****
- struct refclock *refclock_conf[] = {
- &refclock_none, /* 0 REFCLK_NONE */
- &refclock_local, /* 1 REFCLK_LOCAL */
-! &refclock_none, /* 2 REFCLK_WWV_HEATH */
- &refclock_pst, /* 3 REFCLK_WWV_PST */
- &refclock_wwvb, /* 4 REFCLK_WWVB_SPECTRACOM */
- &refclock_goes, /* 5 REFCLK_GOES_TRUETIME */
---- 113,119 ----
- struct refclock *refclock_conf[] = {
- &refclock_none, /* 0 REFCLK_NONE */
- &refclock_local, /* 1 REFCLK_LOCAL */
-! &refclock_trak, /* 2 REFCLK_GPS_TRAK */
- &refclock_pst, /* 3 REFCLK_WWV_PST */
- &refclock_wwvb, /* 4 REFCLK_WWVB_SPECTRACOM */
- &refclock_goes, /* 5 REFCLK_GOES_TRUETIME */
-RCS file: /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v
-retrieving revision 1.1.1.12
-diff -c -r1.1.1.12 xntpd/refclock_parse.c
-*** xntpd/refclock_parse.c:1.1.1.12 1994/02/22 21:57:57
---- xntpd/refclock_parse.c 1994/03/03 09:49:54
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp
- *
-! * refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp
- *
- * generic reference clock driver for receivers
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp
- *
-! * refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp
- *
- * generic reference clock driver for receivers
- *
-***************
-*** 129,135 ****
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp";
- #endif
-
- /**===========================================================================
---- 129,135 ----
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp";
- #endif
-
- /**===========================================================================
-***************
-*** 1653,1659 ****
- * done if no more characters are available
- */
- FD_SET(fd, &fdmask);
-! if (select(fd + 1, &fdmask, 0, 0, &null_time) == 0)
- return;
- }
- }
---- 1653,1660 ----
- * done if no more characters are available
- */
- FD_SET(fd, &fdmask);
-! if ((i == 0) &&
-! (select(fd + 1, &fdmask, 0, 0, &null_time) == 0))
- return;
- }
- }
-***************
-*** 2823,2829 ****
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
-! sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
---- 2824,2830 ----
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
-! sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
-
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.25 b/usr.sbin/xntpd/patches/patch.25
deleted file mode 100644
index 6ab00e2a8391..000000000000
--- a/usr.sbin/xntpd/patches/patch.25
+++ /dev/null
@@ -1,474 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa16943; 4 Mar 94 6:43 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa02686;
- 4 Mar 94 6:34 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA12349 (5.65c-6/7.3v-FAU); Fri, 4 Mar 1994 12:34:08 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA26044 (5.65c-6/7.3m-FAU); Fri, 4 Mar 1994 12:34:06 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199403041134.AA26044@faui43.informatik.uni-erlangen.de>
-Subject: Re: patches for 3.3l
-To: Mills@udel.edu
-Date: Fri, 4 Mar 94 12:33:49 MET
-In-Reply-To: <9403040253.aa16147@huey.udel.edu>; from "Mills@udel.edu" at Mar 4, 94 2:53 am
-X-Mailer: ELM [version 2.3 PL11]
-
-
-> Frank,
-
-
-> ld: ../lib/libntp.a: warning: archive has no table of contents; add one using ranlib(1)
-I didn't fiddle with lib/* this round. Thus it must be some problem
-with the lib building process. Try make clean and again. I just checked
-the patches with my 3.3l tree - fine. I do admit being a bit lax when
-sending you the patches - you might have had to enter some paths
-manually.
-
-> ld: Undefined symbol
-> _DESauth1crypt ....
-Happens if ranlib isn't run.
-
-> Obviously, it bombed.
-Not likely being a problem from my patches - the lib/libntp.a got
-inconsistent.
-Usually this should not happen (ranlib need to be run on BSD systems).
-Try building again from scratch (make clean all). If the problem
-persists look (or send me) at the output of the lib building step
-something is amiss there at your site.
-
-I'll include the patches here again not properly prepared for a
-plain "patch < patchfile".
-
-
-Hi, Dave,
-
-Here are some more patches:
- - allow parse conversion routines to deliver UTC directly
- - irix4 machine/cc from Amos
- - rcs id fixing
- - linux hints
- - modload hints
- - full integration of trak refclock driver (was only partially integrated)
-
-diff -c /dev/null compilers/irix4.cc:1.1
-*** /dev/null Thu Mar 3 10:29:50 1994
---- compilers/irix4.cc Thu Mar 3 10:29:50 1994
-***************
-*** 0 ****
---- 1,2 ----
-+ COMPILER= cc -cckr
-+ COPTS= -O2
-diff -c hints/linux:1.1.1.3 hints/linux:1.5
-*** hints/linux:1.1.1.3 Thu Mar 3 10:30:53 1994
---- hints/linux Thu Mar 3 10:30:53 1994
-***************
-*** 1,5 ****
-
-! Requirements: kernel 0.99.14y or newer, libc 4.5.20 or newer
- ------------
-
- With this configuration, xntp should build an run right out of the box
---- 1,5 ----
-
-! Requirements: kernel 0.99.14y or newer, libc 4.5.21 or newer
- ------------
-
- With this configuration, xntp should build an run right out of the box
-***************
-*** 7,14 ****
- versions of the kernel or libc, or have any other question not covered in the
- READMEs / hint files (sorry, necessary comment in the Linux community ;-) feel
- free to ask me (duwe@informatik.uni-erlangen.de)
--
-- [NOTE: libc-4.5.20 is (or was ? ;-) a beta testing release, but the first
-- binary compiled under the appropriate kernel. Get this one from
-- tsx-11:.../GCC/private/dontuse , compile 4.5.19 yourself or wait for the next
-- puplic relase after 4.5.20]
---- 7,9 ----
-diff -c include/parse.h:1.1.1.8 include/parse.h:3.17
-*** include/parse.h:1.1.1.8 Thu Mar 3 10:31:37 1994
---- include/parse.h Thu Mar 3 10:31:37 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/include/parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp
- *
-! * parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/include/parse.h,v 3.17 1994/03/03 09:27:20 kardel Exp
- *
-! * parse.h,v 3.17 1994/03/03 09:27:20 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
-***************
-*** 15,21 ****
- #ifndef __PARSE_H__
- #define __PARSE_H__
- #if !(defined(lint) || defined(__GNUC__))
-! static char parsehrcsid[]="parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp FAU";
- #endif
-
- #include "ntp_types.h"
---- 15,21 ----
- #ifndef __PARSE_H__
- #define __PARSE_H__
- #if !(defined(lint) || defined(__GNUC__))
-! static char parsehrcsid[]="parse.h,v 3.17 1994/03/03 09:27:20 kardel Exp";
- #endif
-
- #include "ntp_types.h"
-***************
-*** 301,306 ****
---- 301,307 ----
- LONG second;
- LONG usecond;
- LONG utcoffset; /* in seconds */
-+ time_t utctime; /* the actual time - alternative to date/time */
- LONG flags; /* current clock status */
- };
-
-***************
-*** 385,390 ****
---- 386,394 ----
- * History:
- *
- * parse.h,v
-+ * Revision 3.17 1994/03/03 09:27:20 kardel
-+ * rcs ids fixed
-+ *
- * Revision 3.13 1994/01/25 19:04:21 kardel
- * 94/01/23 reconcilation
- *
-diff -c parse/Makefile.kernel:1.1.1.3 parse/Makefile.kernel:3.9
-*** parse/Makefile.kernel:1.1.1.3 Thu Mar 3 10:35:48 1994
---- parse/Makefile.kernel Thu Mar 3 10:35:48 1994
-***************
-*** 40,46 ****
- rm -f parsestreams.o
-
- parsestreams.o: parsestreams.o.$(KARCH)
-! @echo "--- You may load parsestreams.o.$(KARCH) via 'modload parsestreams.o.$(KARCH)' into the kernel"
-
- parsestreams.o.$(KARCH): parsestreams.c ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c $(DEFS) -I../include parsestreams.c
---- 40,46 ----
- rm -f parsestreams.o
-
- parsestreams.o: parsestreams.o.$(KARCH)
-! @echo "--- You may load parsestreams.o.$(KARCH) via 'modload parsestreams.o' (put in e.g. /sys/<karch>/OBJ) into the kernel"
-
- parsestreams.o.$(KARCH): parsestreams.c ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c $(DEFS) -I../include parsestreams.c
-diff -c parse/README.new_clocks:1.1.1.3 parse/README.new_clocks:3.5
-*** parse/README.new_clocks:1.1.1.3 Thu Mar 3 10:35:52 1994
---- parse/README.new_clocks Thu Mar 3 10:35:53 1994
-***************
-*** 23,28 ****
---- 23,29 ----
- LONG second;
- LONG usecond;
- LONG utcoffset; /* in seconds */
-+ time_t utcoffset; /* true utc time instead of date/time */
- LONG flags; /* current clock status */
- };
-
-***************
-*** 52,57 ****
---- 53,65 ----
- PARSEB_S_PPS supports PPS time stamping
- PARSEB_S_POSITION supports position information (GPS)
-
-+ If the utctime field is non zero this value will be take as
-+ time code value. This allows for conversion routines that
-+ already have the utc time value. The utctime field gives the seconds
-+ since Jan 1st 1970, 0:00:00. The useconds field gives the respective
-+ usec value. The fields for date and time (down to second resolution)
-+ will be ignored.
-+
- Conversion is done in the cvt_* routine in parse/clk_*.c files. look in
- them for examples. The basic structure is:
-
-diff -c parse/parse.c:1.1.1.9 parse/parse.c:3.22
-*** parse/parse.c:1.1.1.9 Thu Mar 3 10:36:06 1994
---- parse/parse.c Thu Mar 3 10:36:07 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.21 1994/02/02 17:45:30 kardel Exp
- *
-! * parse.c,v 3.21 1994/02/02 17:45:30 kardel Exp
- *
- * Parser module for reference clock
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.22 1994/02/25 12:34:49 kardel Exp
- *
-! * parse.c,v 3.22 1994/02/25 12:34:49 kardel Exp
- *
- * Parser module for reference clock
- *
-***************
-*** 556,561 ****
---- 556,564 ----
- register int i;
- time_t t;
-
-+ if (clock->utctime)
-+ return clock->utctime; /* if the conversion routine gets it right away - why not */
-+
- if (clock->year < 100)
- clock->year += 1900;
-
-***************
-*** 628,633 ****
---- 631,639 ----
- t += clock->utcoffset; /* warp to UTC */
-
- /* done */
-+
-+ clock->utctime = t; /* documentray only */
-+
- return t;
- }
-
-***************
-*** 890,895 ****
---- 896,903 ----
-
- if (parseio->parse_flags & PARSE_FIXED_FMT)
- {
-+ clock.utctime = 0;
-+
- switch ((cvtrtc = clockformats[format]->convert ? clockformats[format]->convert(parseio->parse_data, parseio->parse_index, clockformats[format]->data, &clock) : CVT_NONE) & CVT_MASK)
- {
- case CVT_FAIL:
-***************
-*** 941,946 ****
---- 949,956 ----
- {
- do
- {
-+ clock.utctime = 0;
-+
- switch ((cvtrtc = (clockformats[format]->convert && !(clockformats[format]->flags & CVT_FIXEDONLY)) ?
- clockformats[format]->convert(parseio->parse_data, parseio->parse_index, clockformats[format]->data, &clock) :
- CVT_NONE) & CVT_MASK)
-***************
-*** 1148,1153 ****
---- 1158,1166 ----
- * History:
- *
- * parse.c,v
-+ * Revision 3.22 1994/02/25 12:34:49 kardel
-+ * allow for converter generated utc times
-+ *
- * Revision 3.21 1994/02/02 17:45:30 kardel
- * rcs ids fixed
- *
-diff -c parse/util/testdcf.c:1.1.1.6 parse/util/testdcf.c:3.11
-*** parse/util/testdcf.c:1.1.1.6 Thu Mar 3 10:36:27 1994
---- parse/util/testdcf.c Thu Mar 3 10:36:27 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/util/testdcf.c,v 3.9 1994/01/25 19:05:45 kardel Exp
- *
-! * testdcf.c,v 3.9 1994/01/25 19:05:45 kardel Exp
- *
- * simple DCF77 100/200ms pulse test program (via 50Baud serial line)
- *
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/util/testdcf.c,v 3.11 1994/02/02 17:45:55 kardel Exp
- *
-! * testdcf.c,v 3.11 1994/02/02 17:45:55 kardel Exp
- *
- * simple DCF77 100/200ms pulse test program (via 50Baud serial line)
- *
-diff -c xntpd/Makefile.tmpl:1.1.1.18 xntpd/Makefile.tmpl:3.28
-*** xntpd/Makefile.tmpl:1.1.1.18 Thu Mar 3 10:38:13 1994
---- xntpd/Makefile.tmpl Thu Mar 3 10:38:13 1994
-***************
-*** 34,40 ****
- refclock_wwvb.c refclock_goes.c refclock_mx4200.c \
- refclock_parse.c refclock_as2201.c refclock_omega.c \
- refclock_tpro.c refclock_leitch.c refclock_irig.c \
-! refclock_msfees.c refclock_gpstm.c ntp_intres.c ntp_filegen.c
-
- OBJS= ntp_config.o ntp_control.o ntp_io.o ntp_leap.o \
- ntp_loopfilter.o ntp_monitor.o ntp_peer.o ntp_proto.o \
---- 34,41 ----
- refclock_wwvb.c refclock_goes.c refclock_mx4200.c \
- refclock_parse.c refclock_as2201.c refclock_omega.c \
- refclock_tpro.c refclock_leitch.c refclock_irig.c \
-! refclock_msfees.c refclock_gpstm.c refclock_trak.c \
-! ntp_intres.c ntp_filegen.c
-
- OBJS= ntp_config.o ntp_control.o ntp_io.o ntp_leap.o \
- ntp_loopfilter.o ntp_monitor.o ntp_peer.o ntp_proto.o \
-***************
-*** 44,50 ****
- refclock_wwvb.o refclock_goes.o refclock_mx4200.o \
- refclock_parse.o refclock_as2201.o refclock_omega.o \
- refclock_tpro.o refclock_leitch.o refclock_irig.o \
-! refclock_msfees.o refclock_gpstm.o ntp_intres.o ntp_filegen.o
-
- all: $(PROGRAM)
-
---- 45,52 ----
- refclock_wwvb.o refclock_goes.o refclock_mx4200.o \
- refclock_parse.o refclock_as2201.o refclock_omega.o \
- refclock_tpro.o refclock_leitch.o refclock_irig.o \
-! refclock_msfees.o refclock_gpstm.o refclock_trak.o \
-! ntp_intres.o ntp_filegen.o
-
- all: $(PROGRAM)
-
-***************
-*** 136,141 ****
---- 138,146 ----
-
- refclock_msfees.o: refclock_msfees.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-+
-+ refclock_trak.o: refclock_trak.c
-+ $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
- refclock_gpstm.o: refclock_gpstm.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-diff -c xntpd/ntp_control.c:1.1.1.17 xntpd/ntp_control.c:3.26
-*** xntpd/ntp_control.c:1.1.1.17 Thu Mar 3 10:38:16 1994
---- xntpd/ntp_control.c Thu Mar 3 10:38:17 1994
-***************
-*** 301,307 ****
- static u_char clocktypes[] = {
- CTL_SST_TS_NTP, /* REFCLK_NONE */
- CTL_SST_TS_UNSPEC, /* REFCLK_LOCALCLOCK */
-! CTL_SST_TS_HF, /* REFCLK_WWV_HEATH */
- CTL_SST_TS_HF, /* REFCLK_WWV_PST */
- CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM */
- CTL_SST_TS_UHF, /* REFCLK_GOES_TRUETIME */
---- 301,307 ----
- static u_char clocktypes[] = {
- CTL_SST_TS_NTP, /* REFCLK_NONE */
- CTL_SST_TS_UNSPEC, /* REFCLK_LOCALCLOCK */
-! CTL_SST_TS_HF, /* REFCLK_GPS_TRAK */
- CTL_SST_TS_HF, /* REFCLK_WWV_PST */
- CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM */
- CTL_SST_TS_UHF, /* REFCLK_GOES_TRUETIME */
-diff -c xntpd/refclock_conf.c:1.1.1.22 xntpd/refclock_conf.c:3.21
-*** xntpd/refclock_conf.c:1.1.1.22 Thu Mar 3 10:38:54 1994
---- xntpd/refclock_conf.c Thu Mar 3 10:38:54 1994
-***************
-*** 113,119 ****
- struct refclock *refclock_conf[] = {
- &refclock_none, /* 0 REFCLK_NONE */
- &refclock_local, /* 1 REFCLK_LOCAL */
-! &refclock_none, /* 2 REFCLK_WWV_HEATH */
- &refclock_pst, /* 3 REFCLK_WWV_PST */
- &refclock_wwvb, /* 4 REFCLK_WWVB_SPECTRACOM */
- &refclock_goes, /* 5 REFCLK_GOES_TRUETIME */
---- 113,119 ----
- struct refclock *refclock_conf[] = {
- &refclock_none, /* 0 REFCLK_NONE */
- &refclock_local, /* 1 REFCLK_LOCAL */
-! &refclock_trak, /* 2 REFCLK_GPS_TRAK */
- &refclock_pst, /* 3 REFCLK_WWV_PST */
- &refclock_wwvb, /* 4 REFCLK_WWVB_SPECTRACOM */
- &refclock_goes, /* 5 REFCLK_GOES_TRUETIME */
-RCS file: /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v
-retrieving revision 1.1.1.12
-diff -c -r1.1.1.12 xntpd/refclock_parse.c
-*** xntpd/refclock_parse.c:1.1.1.12 1994/02/22 21:57:57
---- xntpd/refclock_parse.c 1994/03/03 09:49:54
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp
- *
-! * refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp
- *
- * generic reference clock driver for receivers
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp
- *
-! * refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp
- *
- * generic reference clock driver for receivers
- *
-***************
-*** 129,135 ****
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp";
- #endif
-
- /**===========================================================================
---- 129,135 ----
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp";
- #endif
-
- /**===========================================================================
-***************
-*** 1653,1659 ****
- * done if no more characters are available
- */
- FD_SET(fd, &fdmask);
-! if (select(fd + 1, &fdmask, 0, 0, &null_time) == 0)
- return;
- }
- }
---- 1653,1660 ----
- * done if no more characters are available
- */
- FD_SET(fd, &fdmask);
-! if ((i == 0) &&
-! (select(fd + 1, &fdmask, 0, 0, &null_time) == 0))
- return;
- }
- }
-***************
-*** 2823,2829 ****
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
-! sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.49 1994/02/20 13:26:00 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
---- 2824,2830 ----
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
-! sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
-
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.26 b/usr.sbin/xntpd/patches/patch.26
deleted file mode 100644
index a55360dbd623..000000000000
--- a/usr.sbin/xntpd/patches/patch.26
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa24501; 5 Mar 94 21:23 EST
-Received: from goofus.wustl.edu by louie.udel.edu id aa01087; 5 Mar 94 21:15 EST
-Received: from mumps.pfcs.com by goofus.wustl.edu with UUCP id AA17154
- (5.67a+/IDA-1.5 for mills@udel.edu); Sat, 5 Mar 1994 20:15:06 -0600
-Received: by mumps.pfcs.com id AA09821
- (5.65c/IDA-1.4.4 for mills@udel.edu); Sat, 5 Mar 1994 19:10:18 -0600
-Date: Sat, 5 Mar 1994 19:10:18 -0600
-From: Harlan Stenn <harlan@mumps.pfcs.com>
-Message-Id: <199403060110.AA09821@mumps.pfcs.com>
-To: mills@udel.edu
-Subject: xntpd/Makefile and 3.3l
-
-Dave,
-
-xntpd/Makefile doesn't get -DSYS_whatever and -DHAVE_xxx_TTYS "installed"
-when the Makefile gets created. This is for OS=mips.
-
-Same for xntpdc/Makefile.
-
-A patch follows...
-
-Harlan
-
-PS - might you have a copy of the message I sent you a couple of weeks
-ago where I asked about broadcast servers and clients and the ntp.conf
-file? I was going to send it to the maling list but I lost my copy.
-
-machines/mips
-3,4c3,4
-< DEFS=
-< AUTHDEFS= -DDES -DMD5 -DSYS_MIPS -DHAVE_BSD_TTYS
----
-> DEFS= -DSYS_MIPS -DHAVE_BSD_TTYS
-> AUTHDEFS= -DDES -DMD5
-
diff --git a/usr.sbin/xntpd/patches/patch.27 b/usr.sbin/xntpd/patches/patch.27
deleted file mode 100644
index 5d450d44f934..000000000000
--- a/usr.sbin/xntpd/patches/patch.27
+++ /dev/null
@@ -1,86 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa23654; 11 Mar 94 7:49 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa14038;
- 10 Mar 94 14:14 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA13885 (5.65c-6/7.3v-FAU); Thu, 10 Mar 1994 20:10:36 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA03872 (5.65c-6/7.3m-FAU); Thu, 10 Mar 1994 20:10:33 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199403101910.AA03872@faui43.informatik.uni-erlangen.de>
-Subject: RAW dcf77 showstopper 8-(.
-To: mills@udel.edu
-Date: Thu, 10 Mar 94 20:10:25 MET
-Cc: dpk@morgan.com, Frank.Kardel@informatik.uni-erlangen.de,
- Piete.Brooks@cl.cam.ac.uk, jcs@bear.zoo.bt.co.uk
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi, my changes for 3.3m introduced a subtle reliability problem for
-the cheap DCF77 receiver code - it only returned somtimes the
-correct time 8-(.
-
-Well, here is the patch. (I'll post this one to the news group
-also as it is a show stopper for the cheap clocks 8-(). So
-don't be confused.
-
-
-RCS file: /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v
-retrieving revision 3.12
-diff -c -r3.12 clk_rawdcf.c
-*** parse/clk_rawdcf.c:3.12 1994/02/20 13:04:39
---- parse/clk_rawdcf.c 1994/03/10 19:00:43
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_RAWDCF)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v 3.12 1994/02/20 13:04:39 kardel Exp
- *
-! * clk_rawdcf.c,v 3.12 1994/02/20 13:04:39 kardel Exp
- *
- * Raw DCF77 pulse clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_RAWDCF)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v 3.13 1994/03/10 19:00:43 kardel Exp
- *
-! * clk_rawdcf.c,v 3.13 1994/03/10 19:00:43 kardel Exp
- *
- * Raw DCF77 pulse clock support
- *
-***************
-*** 245,250 ****
---- 245,251 ----
- parseprintf(DD_RAWDCF,("parse: convert_rawdcf: parity check passed\n"));
-
- clock->flags = PARSEB_S_ANTENNA|PARSEB_S_LEAP;
-+ clock->utctime= 0;
- clock->usecond= 0;
- clock->second = 0;
- clock->minute = ext_bf(buffer, DCF_M10, dcfparam->zerobits);
-***************
-*** 528,534 ****
- /*
- * History:
- *
-! * clk_rawdcf.c,v
- * Revision 3.12 1994/02/20 13:04:39 kardel
- * parse add/delete second support
- *
---- 529,538 ----
- /*
- * History:
- *
-! * clk_rawdcf.c,v
-! * Revision 3.13 1994/03/10 19:00:43 kardel
-! * clear utctime field to avoid confusion on synthesize time stamps
-! *
- * Revision 3.12 1994/02/20 13:04:39 kardel
- * parse add/delete second support
- *
-
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.28 b/usr.sbin/xntpd/patches/patch.28
deleted file mode 100644
index 37e2065d2edd..000000000000
--- a/usr.sbin/xntpd/patches/patch.28
+++ /dev/null
@@ -1,454 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa07183; 13 Mar 94 23:57 EST
-Received: from hpsdlo.sdd.hp.com by louie.udel.edu id aa17483;
- 13 Mar 94 23:50 EST
-Received: from hpsdlz.sdd.hp.com by hpsdlo.sdd.hp.com with SMTP
- (1.36.108.4/15.5+IOS 3.21+sdd) id AA07032; Sun, 13 Mar 1994 20:50:23 -0800
-Received: from localhost by hpsdlz.sdd.hp.com with SMTP
- (1.36.108.4/15.5+IOS 3.21+sdd) id AA05726; Sun, 13 Mar 1994 20:50:21 -0800
-Message-Id: <9403140450.AA05726@hpsdlz.sdd.hp.com>
-To: mills@udel.edu
-Subject: patches for xntpd
-Date: Sun, 13 Mar 1994 20:50:21 -0800
-From: Ken Stone <ken@sdd.hp.com>
-
-
-Ok Dave,
-
-I guess I'll take a poke at the "m" version for cleanup and updates. This
-should take care of the newly released 9.03 for s300/s400 which has the
-adjtime(2) syscall. Also, cleanup in readiness for 10.0 all around.
-
- -- Ken
-
-P.S. How is your HP hardware/software deal going ? I haven't heard anything
- lately.
-
-
-
-First do a "rm */hpux10+*" as I have renamed all that to hpux-adj ... that
-9.03 blew me out of the water on the naming scheme :-)
-
-Then unshar the following ... it will add a few new files and give you
-diff to apply (diffs.hpux).
-
-
-#---------------------------------- cut here ----------------------------------
-# This is a shell archive. Remove anything before this line,
-# then unpack it by saving it in a file and typing "sh file".
-#
-# Wrapped by Source Hacker <src@hpsdlz> on Sun Mar 13 20:47:57 1994
-#
-# This archive contains:
-# compilers/hpux-adj.cc compilers/hpux-adj.gcc
-# machines/hpux-adj scripts/hpadjtime.sh
-# diffs.hpux
-#
-# Error checking via wc(1) will be performed.
-# Error checking via sum(1) will be performed.
-
-LANG=""; export LANG
-PATH=/bin:/usr/bin:$PATH; export PATH
-
-if sum -r </dev/null >/dev/null 2>&1
-then
- sumopt='-r'
-else
- sumopt=''
-fi
-
-echo x - compilers/hpux-adj.cc
-cat >compilers/hpux-adj.cc <<'@EOF'
-COMPILER=cc +O1
-@EOF
-set `sum $sumopt <compilers/hpux-adj.cc`; if test $1 -ne 22541
-then
- echo ERROR: compilers/hpux-adj.cc checksum is $1 should be 22541
-fi
-set `wc -lwc <compilers/hpux-adj.cc`
-if test $1$2$3 != 1216
-then
- echo ERROR: wc results of compilers/hpux-adj.cc are $* should be 1 2 16
-fi
-
-chmod 644 compilers/hpux-adj.cc
-
-echo x - compilers/hpux-adj.gcc
-cat >compilers/hpux-adj.gcc <<'@EOF'
-COMPILER=gcc -O2
-@EOF
-set `sum $sumopt <compilers/hpux-adj.gcc`; if test $1 -ne 23593
-then
- echo ERROR: compilers/hpux-adj.gcc checksum is $1 should be 23593
-fi
-set `wc -lwc <compilers/hpux-adj.gcc`
-if test $1$2$3 != 1217
-then
- echo ERROR: wc results of compilers/hpux-adj.gcc are $* should be 1 2 17
-fi
-
-chmod 644 compilers/hpux-adj.gcc
-
-echo x - machines/hpux-adj
-cat >machines/hpux-adj <<'@EOF'
-SHELL= /bin/sh
-RANLIB= ls # ar does the work of ranlib under System V
-DEFS_LOCAL= -DREFCLOCK
-DEFS= -DHAVE_TERMIOS -DSYS_HPUX=10
-AUTHDEFS= -DDES -DMD5
-CLOCKDEFS= -DLOCAL_CLOCK
-COPTS=
-INSTALL=$(TOP)scripts/install.sh
-@EOF
-set `sum $sumopt <machines/hpux-adj`; if test $1 -ne 42265
-then
- echo ERROR: machines/hpux-adj checksum is $1 should be 42265
-fi
-set `wc -lwc <machines/hpux-adj`
-if test $1$2$3 != 826251
-then
- echo ERROR: wc results of machines/hpux-adj are $* should be 8 26 251
-fi
-
-chmod 644 machines/hpux-adj
-
-echo x - scripts/hpadjtime.sh
-cat >scripts/hpadjtime.sh <<'@EOF'
-#! /bin/sh
-
-if [ -f /bin/uname -o -f /usr/bin/uname ]; then
- set `uname -a | tr '[A-Z]' '[a-z]'`
- case "$1" in
- hp-ux) case "$3" in
- *.10.*) val=1 ;;
- *.09.03) case "$5" in
- 9000/3*) val=1 ;;
- *) val=0 ;;
- esac ;;
- *) val=0 ;;
- esac
- ;;
- *)
- esac
-fi
-exit $val
-@EOF
-set `sum $sumopt <scripts/hpadjtime.sh`; if test $1 -ne 1497
-then
- echo ERROR: scripts/hpadjtime.sh checksum is $1 should be 1497
-fi
-set `wc -lwc <scripts/hpadjtime.sh`
-if test $1$2$3 != 1850287
-then
- echo ERROR: wc results of scripts/hpadjtime.sh are $* should be 18 50 287
-fi
-
-chmod 755 scripts/hpadjtime.sh
-
-echo x - diffs.hpux
-cat >diffs.hpux <<'@EOF'
-*** xntp3.3m.orig/compilers/hpux.cc Thu Sep 2 13:19:56 1993
---- xntp3.3m/compilers/hpux.cc Sun Mar 13 12:10:23 1994
-***************
-*** 1,2 ****
-! COMPILER=cc
-! COPTS=+O1
---- 1 ----
-! COMPILER=cc +O1
-*** xntp3.3m.orig/compilers/hpux.gcc Thu Sep 2 13:19:59 1993
---- xntp3.3m/compilers/hpux.gcc Sun Mar 13 12:10:29 1994
-***************
-*** 1,2 ****
-! COMPILER=gcc
-! COPTS=-O2
---- 1 ----
-! COMPILER=gcc -O2
-*** xntp3.3m.orig/hints/hpux Fri Dec 3 02:28:57 1993
---- xntp3.3m/hints/hpux Sun Mar 13 20:20:38 1994
-***************
-*** 1,59 ****
- This file hopefully describes the whatever and however of how to get xntp
-! running on hpux 8.0 and later s300, s700, and s800.
-
- First off, all the standard disclaimers hold here ... HP doesn't have anthing
- to do with this stuff. I fool with it in my spare time because we use it and
- because I like to. We just happen to have a lot of HP machines around here :-)
-! Xntp has been in use here for several months and has a fair amount of mileage
- on various HP platforms within the company. I can't really guarantee bug fixes
- but I'd certainly like to hear about bugs and I won't hestitate to look at
- any fixes sent to me.
-
-! Now lets talk OS. If you don't have 8.0 or later, pretty much hang it up now.
-! This stuff has run here on 8.0 s300, s700, and s800. Its possible that it
-! runs on 7.0 but I have not tried v3 code on 7.0 at all.
-
-! [Note that recent reports state that this release does in fact run on HP
-! 300 and 400 boxes, which run 7.0 - Ed.]
-
-! Next, let me explain a bit about how this stuff works on HP-UX since we don't
- have adjtime(2). The directory adjtime contains libadjtime.a and the adjtimed
- daemon. Instead of the adjtime(2) system call, we use a library routine to
- talk to adjtimed thru message queues. Adjtimed munges into /dev/kmem and
- causes the clock to skew properly as needed. PLEASE NOTE that the adjtime
- code provided here is NOT a general replacement for adjtime(2) ... use of
-! this adjtime(3)/adjtimed(8) other than here may yield very odd results.
-
- What to do to get this stuff running ?
-
-! * cd ..
-! * Say "make makeconfig"
-
-! * cd ..
-! * Say "make", sit back for a few minutes.
-
- * cd authstuff
- * Say "./authcert < certdata" and check the output. Every line should
- end with "OK" ... if not, we got trouble.
- * Now try "./authspeed auth.samplekeys". What we want to
- remember here is the "authentication delay in CPU time"
-
-! * cd ..
-! * Now we need to install this stuff ... make install will not work
-! unless you have replaced the SYSV install command with a BSD
-! compatible version. So ... the simplest thing to do is run
-! make -n install and do manually what it would have done.
-
- * I'd suggest reading the xntp docs about now :-) ... seriously !!
-
-! * Check out the docs and the stuff in xntp/conf and build a config
-! file ... put it in /usr/local/etc/xntp.conf (or where ever you
-! defined the config file to be in Config). One thing we have
-! added to this version of xntpd is a way to select config files
-! if you are sharing /usr/local thru NFS or whatever. If the
-! file /usr/local/etc/xntp.conf happens to be a directory, the files
-! in that directory are searched until a match is found. The rules
-! for a match are:
-
- 1. Our hostname
- 2. default.<machine id> (as in default.375 or default.850)
---- 1,63 ----
-+ Last update: Sun Mar 13 15:05:31 PST 1994
-+
- This file hopefully describes the whatever and however of how to get xntp
-! running on hpux 7.0 and later s300. s400, s700, and s800.
-
- First off, all the standard disclaimers hold here ... HP doesn't have anthing
- to do with this stuff. I fool with it in my spare time because we use it and
- because I like to. We just happen to have a lot of HP machines around here :-)
-! Xntpd has been in use here for several years and has a fair amount of mileage
- on various HP platforms within the company. I can't really guarantee bug fixes
- but I'd certainly like to hear about bugs and I won't hestitate to look at
- any fixes sent to me.
-
-! Now lets talk OS. If you don't have 7.0 or later, pretty much hang it up now.
-! This stuff has run here on pretty much everything from 8.0 upward on s300,
-! s700, and s800. It is known to run on 7.0 s300/s400 but all reports are
-! from the field and not my personal experience.
-
-! If you are lucky enough to have a s300 or s400 with 9.03, then you no longer
-! have to worry about adjtimed as HP-UX now has adjtime(2). The rest of you
-! will have to wait on 10.0 which will have adjtime(2) and a supported though
-! a bit older version of xntpd.
-
-! Next, let me explain a bit about how this stuff works on HP-UX's that do not
- have adjtime(2). The directory adjtime contains libadjtime.a and the adjtimed
- daemon. Instead of the adjtime(2) system call, we use a library routine to
- talk to adjtimed thru message queues. Adjtimed munges into /dev/kmem and
- causes the clock to skew properly as needed. PLEASE NOTE that the adjtime
- code provided here is NOT a general replacement for adjtime(2) ... use of
-! this adjtime(3)/adjtimed(8) other than with xntpd may yield very odd results.
-
- What to do to get this stuff running ?
-
-! * If you are running an OS less than 10.0 or do not have a s300/s400
-! with 9.03 or better
-! -> cd machines
-! -> vi hpux
-! -> (change -DSYS_HPUX=? to match whatever you are running [7,8,9])
-! -> cd ..
-
-! * Say "make makeconfig"
-
-+ * Say "make", sit back for a few minutes.
-+
- * cd authstuff
- * Say "./authcert < certdata" and check the output. Every line should
- end with "OK" ... if not, we got trouble.
- * Now try "./authspeed auth.samplekeys". What we want to
- remember here is the "authentication delay in CPU time"
-+ * cd ..
-
-! * Say "make install"
-
- * I'd suggest reading the xntp docs about now :-) ... seriously !!
-
-! * One thing I have added to this version of xntpd is a way to select
-! config files if you are sharing /usr/local thru NFS or whatever.
-! If the file /usr/local/etc/xntp.conf happens to be a directory, the
-! files in that directory are searched until a match is found. The
-! rules for a match are:
-
- 1. Our hostname
- 2. default.<machine id> (as in default.375 or default.850)
-***************
-*** 72,76 ****
---- 76,92 ----
-
- * On some 320's and 835's we have had to run adjtimed with "-p 45" or
- so to get rid of syslog messages about "last adjust did not finish".
-+
-+ * At 9.0, there is a problem with DIAGMON (patch available from the
-+ response center) which causes it to delete the message queue that
-+ adjtimed/xntpd use to communicate. (see next note for result)
-+
-+ * Xntpd has been known to get really ticked off when adjtime() fails
-+ which is usually only while running the emulation code on HP-UX.
-+ When it gets mad, it usually jumps the clock into never never land.
-+ Possible reasons for this are adjtimed being killed or just never
-+ started or adjtimed being completely swapped out on a really busy
-+ machine (newer adjtimed try to lock themselves in memory to prevent
-+ this one).
-
- Anything else ... just drop me a line at ken@sdd.hp.com
-*** xntp3.3m.orig/include/ntp_machine.h Sun Feb 27 19:34:59 1994
---- xntp3.3m/include/ntp_machine.h Sun Mar 13 15:35:33 1994
-***************
-*** 334,341 ****
- #define setlinebuf(f) setvbuf(f, NULL, _IOLBF, 0)
- #define NO_SIGNED_CHAR_DECL
- #define LOCK_PROCESS
-- #define HAVE_NO_NICE /* HPUX uses rtprio instead */
- #define RETSIGTYPE void
- #if (SYS_HPUX < 10)
- #define NOKMEM
- #else
---- 334,345 ----
- #define setlinebuf(f) setvbuf(f, NULL, _IOLBF, 0)
- #define NO_SIGNED_CHAR_DECL
- #define LOCK_PROCESS
- #define RETSIGTYPE void
-+ #if (SYS_HPUX < 9)
-+ #define HAVE_NO_NICE /* HPUX uses rtprio instead */
-+ #else
-+ #define HAVE_BSD_NICE /* new at 9.X */
-+ #endif
- #if (SYS_HPUX < 10)
- #define NOKMEM
- #else
-*** xntp3.3m.orig/lib/Makefile.tmpl Wed Feb 2 21:20:13 1994
---- xntp3.3m/lib/Makefile.tmpl Sun Mar 13 16:27:50 1994
-***************
-*** 49,55 ****
- $(LIBNAME).a: $(OBJS)
- ar rv $@ $?
- -rm -f $?
-! @if ( hp-pa || hp-mc680x0 ) > /dev/null 2>&1; then \
- ( cd ../adjtime && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)" ) && ar rv $@ ../adjtime/adjtime.o; \
- else \
- :; \
---- 49,55 ----
- $(LIBNAME).a: $(OBJS)
- ar rv $@ $?
- -rm -f $?
-! @if ( ../scripts/hpadjtime.sh ) > /dev/null 2>&1; then \
- ( cd ../adjtime && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)" ) && ar rv $@ ../adjtime/adjtime.o; \
- else \
- :; \
-*** xntp3.3m.orig/scripts/Guess.sh Wed Jan 26 15:26:03 1994
---- xntp3.3m/scripts/Guess.sh Sun Mar 13 14:10:19 1994
-***************
-*** 40,46 ****
- guess="ultrix"
- ;;
- hp-ux) case "$3" in
-! *.10.*) guess="hpux10+" ;;
- *) guess="hpux" ;;
- esac
- ;;
---- 40,50 ----
- guess="ultrix"
- ;;
- hp-ux) case "$3" in
-! *.10.*) guess="hpux-adj" ;;
-! *.09.03) case "$5" in
-! 9000/3*) guess="hpux-adj" ;;
-! *) guess="hpux" ;;
-! esac ;;
- *) guess="hpux" ;;
- esac
- ;;
-*** xntp3.3m.orig/util/tickadj.c Wed Feb 2 21:20:17 1994
---- xntp3.3m/util/tickadj.c Sun Mar 13 13:55:53 1994
-***************
-*** 388,393 ****
---- 388,409 ----
- #endif
- #endif
-
-+ #if defined(SYS_HPUX)
-+ #define X_TICKADJ 0
-+ #define X_TICK 1
-+ #define X_DEF
-+ static struct nlist nl[] =
-+ #ifdef hp9000s300
-+ { {"_tickadj"},
-+ {"_old_tick"},
-+ #else
-+ { {"tickadj"},
-+ {"old_tick"},
-+ #endif
-+ {""},
-+ };
-+ #endif
-+
- #if !defined(X_DEF)
- #define X_TICKADJ 0
- #define X_TICK 1
-***************
-*** 408,413 ****
---- 424,430 ----
- "/kernel/unix",
- "/386bsd",
- "/netbsd",
-+ "/hp-ux",
- NULL
- };
- struct stat stbuf;
-*** xntp3.3m.orig/xntpd/ntp_loopfilter.c Sun Feb 27 19:36:16 1994
---- xntp3.3m/xntpd/ntp_loopfilter.c Sun Mar 13 14:03:54 1994
-***************
-*** 349,356 ****
- }
- }
- #endif /* HAVE_BSD_TTYS */
-- fdpps = fd232;
- #endif /* HPUXGADGET */
-
- /*
- * Insert in device list.
---- 349,356 ----
- }
- }
- #endif /* HAVE_BSD_TTYS */
- #endif /* HPUXGADGET */
-+ fdpps = fd232;
-
- /*
- * Insert in device list.
-@EOF
-set `sum $sumopt <diffs.hpux`; if test $1 -ne 46307
-then
- echo ERROR: diffs.hpux checksum is $1 should be 46307
-fi
-set `wc -lwc <diffs.hpux`
-if test $1$2$3 != 288172410391
-then
- echo ERROR: wc results of diffs.hpux are $* should be 288 1724 10391
-fi
-
-chmod 664 diffs.hpux
-
-exit 0
-
-
-
diff --git a/usr.sbin/xntpd/patches/patch.29 b/usr.sbin/xntpd/patches/patch.29
deleted file mode 100644
index ee161a2baa25..000000000000
--- a/usr.sbin/xntpd/patches/patch.29
+++ /dev/null
@@ -1,52 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa24239; 16 Mar 94 18:01 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa18720;
- 16 Mar 94 17:57 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA25324 (5.65c-6/7.3v-FAU); Wed, 16 Mar 1994 23:57:39 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA18230 (5.65c-6/7.3m-FAU); Wed, 16 Mar 1994 23:57:37 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199403162257.AA18230@faui43.informatik.uni-erlangen.de>
-Subject: hpadjtime.sh
-To: mills@udel.edu, ken@sdd.hp.com
-Date: Wed, 16 Mar 94 23:57:32 MET
-Return-Receipt-To: "Frank Kardel" <Frank.Kardel@informatik.uni-erlangen.de>
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi, 3.3n is somewhat broken...
-
-First of all
- - scripts/hpadjtime.sh is missing (it's in patch.28)
-
-And
- - scripts/hpadjtime.sh is broken for non hp-ux
- (will try to build adjtime libs on non hp-ux architectures
- as a default value was no set)
-
-Please use this version of scripts/hpadjtime.sh for increased safety:
-
-#! /bin/sh
-val=1
-if [ -f /bin/uname -o -f /usr/bin/uname ]; then
- set `uname -a | tr '[A-Z]' '[a-z]'`
- case "$1" in
- hp-ux) case "$3" in
- *.10.*) val=1 ;;
- *.09.03) case "$5" in
- 9000/3*) val=1 ;;
- *) val=0 ;;
- esac ;;
- *) val=0 ;;
- esac
- ;;
- *)
- esac
-fi
-exit $val
-
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.3 b/usr.sbin/xntpd/patches/patch.3
deleted file mode 100644
index beba805e39d9..000000000000
--- a/usr.sbin/xntpd/patches/patch.3
+++ /dev/null
@@ -1,3032 +0,0 @@
-diff -c TODO:1.1.1.3 TODO:3.5
-*** TODO:1.1.1.3 Wed Jan 26 21:46:47 1994
---- TODO Wed Jan 26 21:46:48 1994
-***************
-*** 1,5 ****
- #
-! # TODO,v 3.4 1994/01/23 17:19:06 kardel Exp
- #
- This file contains problems known to the authors that still need to be done.
- We would appreciate if you could spare some of your time to look through
---- 1,5 ----
- #
-! # TODO,v 3.5 1994/01/25 19:03:55 kardel Exp
- #
- This file contains problems known to the authors that still need to be done.
- We would appreciate if you could spare some of your time to look through
-diff -c doc/xntpd.8:1.1.1.11 doc/xntpd.8:3.21
-*** doc/xntpd.8:1.1.1.11 Wed Jan 26 21:47:54 1994
---- doc/xntpd.8 Wed Jan 26 21:47:55 1994
-***************
-*** 74,79 ****
---- 74,85 ----
- ] [
- .B -t
- .I trustedkey
-+ ] [
-+ .B -v
-+ .I variable
-+ ] [
-+ .B -V
-+ .I variable
- ]
- .SH DESCRIPTION
- .I Xntpd
-***************
-*** 140,145 ****
---- 146,155 ----
- specify a directory to be used for creating statistics files
- .Ip -t 8
- add a key number to the trusted key list
-+ .Ip -v 8
-+ add a system variable
-+ .Ip -V 8
-+ add a system variable listed by default
- .SH "CONFIGURATION FILE OPTIONS"
- .IR Xntpd 's
- configuration file is relatively free format. Comments, which may be
-***************
-*** 494,499 ****
---- 504,534 ----
- This command is obsolete and not available in this version of
- .I xntpd.
- .PP
-+ .B setvar
-+ .I variable
-+ .I [default]
-+ .PP
-+ This command adds an additional system variable. These variables can be
-+ used to distribute additional information such as the access policy. If
-+ the variable of the from <name>=<value> is followed by the
-+ .I default
-+ keyword the variable will be listed as part of the default system
-+ variables (ntpq rv command). These additional variables serve informational
-+ purposes only. They are not related to the protocol other that they can be
-+ listed. The known protocol variables will always overide any variables defined
-+ via the
-+ .I setvar
-+ mechanism.
-+ .PP
-+ There are three special variables that contain the names of all variable of
-+ the same group. The
-+ .I sys_var_list
-+ holds the names of all system variables. The
-+ .I peer_var_list
-+ holds the names of all peer variables and the
-+ .I clock_var_list
-+ hold the names of the reference clock variables.
-+ .PP
- .B resolver
- .I /path/xntpres
- .PP
-***************
-*** 1093,1101 ****
- time.
- On the availability of PPS information the
- .I time2
-! fudge factor show the difference betwteen the PPS time stamp and the reception
-! time stamp of the serial signal. This parameter is read only attempts to
-! set this parameter will be ignored.
- The
- .I flag0
- enables input filtering. This a median filter with continuous sampling. The
---- 1128,1140 ----
- time.
- On the availability of PPS information the
- .I time2
-! fudge factor defines the skew between the PPS time stamp and the reception
-! time stamp of the PPS signal. This parameter is usually 0 as usually
-! the PPS signal is believed in time and OS delays should be corrected
-! in the machine specific section of the kernel driver.
-! .I time2
-! needs only be set when the actial PPS signal is delayed for some
-! reason.
- The
- .I flag0
- enables input filtering. This a median filter with continuous sampling. The
-***************
-*** 1109,1121 ****
- .I ntpq
- timecode variable
- .PP
-! The timecode variable in the ntpq read clock variable command contains several
-! fields. The first field is the local time in Unix format. The second field is
-! the offset to UTC (format HHMM). The currently active receiver flags are listed
-! next. Additional feature flags of the receiver are optionally listed in paranthesis.
-! The actual time code is enclosed in angle brackets < >. A qualification of the
-! decoded time code format is following the time code. The last piece of information
-! is the overall running time and the accumulated times for the clock event states.
- .PP
- Unit encoding
- .PP
---- 1148,1172 ----
- .I ntpq
- timecode variable
- .PP
-! The ntpq read clock variables command list several variables. These
-! hold followinf information:
-! .I refclock_time
-! is the local time with the offset to UTC (format HHMM).
-! The currently active receiver flags are listed in
-! .I refclock_status.
-! Additional feature flags of the receiver are optionally listed in paranthesis.
-! The actual time code is listed in
-! .I timecode.
-! A qualification of the decoded time code format is following in
-! .I refclock_format.
-! The last piece of information is the overall running time and the accumulated
-! times for the clock event states in
-! .I refclock_states.
-! When PPS information is present additional variable are available.
-! .I refclock_ppstime
-! lists then the PPS timestamp and
-! .I refclock_ppsskew
-! lists the difference between RS232 derived timestamp and the PPS timestamp.
- .PP
- Unit encoding
- .PP
-diff -c include/ntp_control.h:1.1.1.5 include/ntp_control.h:3.6
-*** include/ntp_control.h:1.1.1.5 Wed Jan 26 21:48:21 1994
---- include/ntp_control.h Wed Jan 26 21:48:21 1994
-***************
-*** 163,171 ****
- #define CS_SYSTEM 17
- #define CS_KEYID 18
- #define CS_REFSKEW 19
-! #define CS_VERSION 20
-
-! #define CS_MAXCODE CS_VERSION
-
- /*
- * Peer variables we understand
---- 163,171 ----
- #define CS_SYSTEM 17
- #define CS_KEYID 18
- #define CS_REFSKEW 19
-! #define CS_VARLIST 20
-
-! #define CS_MAXCODE CS_VARLIST
-
- /*
- * Peer variables we understand
-***************
-*** 204,212 ****
- #define CP_SENT 32
- #define CP_FILTERROR 33
- #define CP_FLASH 34
-! #define CP_DISP 35
-! #define CP_MAXCODE CP_DISP
-
- /*
- * Clock variables we understand
- */
---- 204,213 ----
- #define CP_SENT 32
- #define CP_FILTERROR 33
- #define CP_FLASH 34
-! #define CP_VARLIST 35
-
-+ #define CP_MAXCODE CP_VARLIST
-+
- /*
- * Clock variables we understand
- */
-***************
-*** 222,229 ****
- #define CC_FUDGEVAL2 10
- #define CC_FLAGS 11
- #define CC_DEVICE 12
-
-! #define CC_MAXCODE CC_DEVICE
-
- /*
- * Definition of the structure used internally to hold trap information.
---- 223,231 ----
- #define CC_FUDGEVAL2 10
- #define CC_FLAGS 11
- #define CC_DEVICE 12
-+ #define CC_VARLIST 13
-
-! #define CC_MAXCODE CC_VARLIST
-
- /*
- * Definition of the structure used internally to hold trap information.
-diff -c include/ntp_filegen.h:1.1.1.3 include/ntp_filegen.h:3.7
-*** include/ntp_filegen.h:1.1.1.3 Wed Jan 26 21:48:22 1994
---- include/ntp_filegen.h Wed Jan 26 21:48:22 1994
-***************
-*** 1,5 ****
- /*
-! * ntp_filegen.h,v 3.6 1993/09/01 21:51:24 kardel Exp
- *
- * definitions for NTP file generations support
- *
---- 1,5 ----
- /*
-! * ntp_filegen.h,v 3.7 1994/01/25 19:04:16 kardel Exp
- *
- * definitions for NTP file generations support
- *
-diff -c include/ntp_machine.h:1.1.1.9 include/ntp_machine.h:1.24
-*** include/ntp_machine.h:1.1.1.9 Wed Jan 26 21:48:27 1994
---- include/ntp_machine.h Wed Jan 26 21:48:27 1994
-***************
-*** 123,134 ****
-
- HAVE_UNISTD_H - Maybe should be part of NTP_POSIX_SOURCE ?
-
- You could just put the defines on the DEFS line in machines/<os> file.
- I don't since there are lost of different types compiler that a systemm might
- have, some that can do proto typing and others that cannot on the saem system.
- I get a chanse to twiddle some of the configuration paramasters at compile
- time based on compler/machine combinatsions by using this include file.
-! See convex, aix and sun configurations see how complex it get.
-
- */
-
---- 123,138 ----
-
- HAVE_UNISTD_H - Maybe should be part of NTP_POSIX_SOURCE ?
-
-+ DEFINITIONS FOR SYSTEM && PROCESSOR
-+ STR_SYSTEM - value of system variable
-+ STR_PROCESSOR - value of processor variable
-+
- You could just put the defines on the DEFS line in machines/<os> file.
- I don't since there are lost of different types compiler that a systemm might
- have, some that can do proto typing and others that cannot on the saem system.
- I get a chanse to twiddle some of the configuration paramasters at compile
- time based on compler/machine combinatsions by using this include file.
-! See convex, aix and sun configurations see how complex it gets.
-
- */
-
-***************
-*** 152,157 ****
---- 156,164 ----
- #endif
- #endif /*_BSD */
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/AIX"
-+ #endif
- #endif /* RS6000 */
-
- /*
-***************
-*** 166,171 ****
---- 173,181 ----
- #define RETSIGTYPE void
- #define NTP_SYSCALL_GET 132
- #define NTP_SYSCALL_ADJ 147
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/SunOS 4.x"
-+ #endif
- #endif
-
- /*
-***************
-*** 182,188 ****
---- 192,201 ----
- #define NTP_POSIX_SOURCE
- #define HAVE_ATT_SETPGRP
- #define HAVE_ATT_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/SINIX-M"
- #endif
-+ #endif
-
- /*
- * SunOS 5.1 or SunOS 5.2 or Solaris 2.1 or Solaris 2.2
-***************
-*** 198,203 ****
---- 211,219 ----
- #define HAVE_ATT_SETPGRP
- #define HAVE_ATT_NICE
- #define UDP_WILDCARD_DELIVERY
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Solaris 2.x"
-+ #endif
- #endif
-
- /*
-***************
-*** 221,227 ****
---- 237,246 ----
- #define NTP_POSIX_SOURCE
- #define HAVE_ATT_SETPGRP
- #endif
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/ConvexOS"
- #endif
-+ #endif
-
- /*
- * IRIX 4.X and IRIX 5.x
-***************
-*** 235,240 ****
---- 254,262 ----
- #define HAVE_ATT_SETPGRP
- #define HAVE_BSD_NICE
- #define NTP_POSIX_SOURCE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/IRIX"
-+ #endif
- #endif
-
- /*
-***************
-*** 247,253 ****
---- 269,278 ----
- #define HAVE_BSD_NICE
- #define RETSIGTYPE void
- #define NTP_SYSCALLS_STD
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Ultrix"
- #endif
-+ #endif
-
- /*
- * AUX
-***************
-*** 272,277 ****
---- 297,305 ----
- #define HAVE_BSD_TTYS
- #define LOG_NTP LOG_LOCAL1
- #define HAVE_SIGNALED_IO
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/AUX"
-+ #endif
- #endif
-
- /*
-***************
-*** 283,289 ****
---- 311,320 ----
- #define HAVE_BSD_NICE
- #define HAVE_N_UN
- #undef NTP_POSIX_SOURCE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Next"
- #endif
-+ #endif
-
- /*
- * HPUX
-***************
-*** 301,306 ****
---- 332,340 ----
- #else
- #define HAVE_READKMEM
- #endif
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/HPUX"
-+ #endif
- #endif
-
- /*
-***************
-*** 311,316 ****
---- 345,353 ----
- #define HAVE_LIBKVM
- #define NTP_POSIX_SOURCE
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/BSDI"
-+ #endif
- #define HAVE_BSD_TTYS
- #endif
-
-***************
-*** 327,332 ****
---- 364,372 ----
- * along with a standard name one day ! */
- #define ntp_adjtime __adjtimex
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Linux"
-+ #endif
- #endif
-
- /*
-***************
-*** 338,344 ****
---- 378,387 ----
- #define HAVE_READKMEM
- #define NTP_POSIX_SOURCE
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/*BSD"
- #endif
-+ #endif
-
- /*
- * DECOSF1
-***************
-*** 349,354 ****
---- 392,400 ----
- #define NTP_POSIX_SOURCE
- #define NTP_SYSCALLS_STD
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/DECOSF1"
-+ #endif
- #endif
-
- /*
-***************
-*** 358,364 ****
---- 404,413 ----
- #define HAVE_READKMEM
- #define S_CHAR_DEFINED
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/I386"
- #endif
-+ #endif
-
- /*
- * Mips
-***************
-*** 366,371 ****
---- 415,423 ----
- #if defined(SYS_MIPS)
- #define NOKMEM
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Mips"
-+ #endif
- #endif
-
- /*
-***************
-*** 373,379 ****
---- 425,434 ----
- */
- #if defined(SYS_SEQUENT)
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Sequent Dynix 3"
- #endif
-+ #endif
-
- /*
- * PTX
-***************
-*** 407,412 ****
---- 462,470 ----
- typedef unsigned short u_short;
- typedef unsigned long u_long;
- #endif
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Sequent PTX"
-+ #endif
- #endif
-
-
-***************
-*** 417,423 ****
---- 475,484 ----
- #define NO_SIGNED_CHAR_DECL
- #define HAVE_READKMEM
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Sony"
- #endif
-+ #endif
-
- /*
- * VAX
-***************
-*** 426,431 ****
---- 487,495 ----
- #define NO_SIGNED_CHAR_DECL
- #define HAVE_READKMEM
- #define HAVE_BSD_NICE
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/VAX"
-+ #endif
- #endif
-
- /*
-***************
-*** 445,455 ****
- #define LOCK_PROCESS
- #define SYSV_TIMEOFDAY
- #define SIZE_RETURNED_IN_BUFFER
-! #endif
-!
-! #ifdef STREAM /* STREAM implies TERMIOS */
-! #ifndef HAVE_TERMIOS
-! #define HAVE_TERMIOS
- #endif
- #endif
-
---- 509,516 ----
- #define LOCK_PROCESS
- #define SYSV_TIMEOFDAY
- #define SIZE_RETURNED_IN_BUFFER
-! #ifndef STR_SYSTEM
-! #define STR_SYSTEM "UNIX/SysVR4"
- #endif
- #endif
-
-***************
-*** 464,469 ****
---- 525,539 ----
- #define NTP_SYSCALLS_STD
- #define USE_PROTOTYPES
- #define UDP_WILDCARD_DELIVERY
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/DOMAINOS"
-+ #endif
-+ #endif
-+
-+ #ifdef STREAM /* STREAM implies TERMIOS */
-+ #ifndef HAVE_TERMIOS
-+ #define HAVE_TERMIOS
-+ #endif
- #endif
-
- #ifndef RETSIGTYPE
-diff -c include/ntp_refclock.h:1.1.1.8 include/ntp_refclock.h:3.8
-*** include/ntp_refclock.h:1.1.1.8 Wed Jan 26 21:48:28 1994
---- include/ntp_refclock.h Wed Jan 26 21:48:28 1994
-***************
-*** 75,84 ****
- LONG fudgeval2;
- u_char currentstatus;
- u_char lastevent;
-! u_char unused[1];
- };
-
--
- /*
- * Reference clock I/O structure. Used to provide an interface between
- * the reference clock drivers and the I/O module.
---- 75,84 ----
- LONG fudgeval2;
- u_char currentstatus;
- u_char lastevent;
-! u_char unused;
-! struct ctl_var *kv_list; /* additional variables */
- };
-
- /*
- * Reference clock I/O structure. Used to provide an interface between
- * the reference clock drivers and the I/O module.
-diff -c include/ntpd.h:1.1.1.6 include/ntpd.h:1.5
-*** include/ntpd.h:1.1.1.6 Wed Jan 26 21:48:35 1994
---- include/ntpd.h Wed Jan 26 21:48:35 1994
-***************
-*** 1,4 ****
-! /* ntpd.h,v 3.1 1993/07/06 01:07:03 jbj Exp
- * ntpd.h - Prototypes for xntpd.
- */
-
---- 1,4 ----
-! /*
- * ntpd.h - Prototypes for xntpd.
- */
-
-***************
-*** 21,26 ****
---- 21,55 ----
- extern void process_control P((struct recvbuf *, int));
- extern void report_event P((int, struct peer *));
-
-+ /* ntp_control.c */
-+ /*
-+ * Structure for translation tables between internal system
-+ * variable indices and text format.
-+ */
-+ struct ctl_var {
-+ u_short code;
-+ u_short flags;
-+ char *text;
-+ };
-+ /*
-+ * Flag values
-+ */
-+ #define CAN_READ 0x01
-+ #define CAN_WRITE 0x02
-+
-+ #define DEF 0x20
-+ #define PADDING 0x40
-+ #define EOV 0x80
-+
-+ #define RO (CAN_READ)
-+ #define WO (CAN_WRITE)
-+ #define RW (CAN_READ|CAN_WRITE)
-+
-+ extern char * add_var P((struct ctl_var **, unsigned long, int));
-+ extern void free_varlist P((struct ctl_var *));
-+ extern void set_var P((struct ctl_var **, char *, unsigned long, int));
-+ extern void set_sys_var P((char *, unsigned long, int));
-+
- /* ntp_intres.c */
- extern void ntp_intres P((void));
-
-diff -c include/parse.h:1.1.1.6 include/parse.h:3.13
-*** include/parse.h:1.1.1.6 Wed Jan 26 21:48:36 1994
---- include/parse.h Wed Jan 26 21:48:36 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/include/parse.h,v 3.12 1994/01/23 17:23:05 kardel Exp
- *
-! * parse.h,v 3.12 1994/01/23 17:23:05 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/include/parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp
- *
-! * parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
-***************
-*** 15,21 ****
- #ifndef __PARSE_H__
- #define __PARSE_H__
- #if !(defined(lint) || defined(__GNUC__))
-! static char parsehrcsid[]="parse.h,v 3.12 1994/01/23 17:23:05 kardel Exp FAU";
- #endif
-
- #include "ntp_types.h"
---- 15,21 ----
- #ifndef __PARSE_H__
- #define __PARSE_H__
- #if !(defined(lint) || defined(__GNUC__))
-! static char parsehrcsid[]="parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp FAU";
- #endif
-
- #include "ntp_types.h"
-***************
-*** 365,370 ****
---- 365,373 ----
- * History:
- *
- * parse.h,v
-+ * Revision 3.13 1994/01/25 19:04:21 kardel
-+ * 94/01/23 reconcilation
-+ *
- * Revision 3.12 1994/01/23 17:23:05 kardel
- * 1994 reconcilation
- *
-diff -c include/parse_conf.h:1.1.1.5 include/parse_conf.h:3.5
-*** include/parse_conf.h:1.1.1.5 Wed Jan 26 21:48:37 1994
---- include/parse_conf.h Wed Jan 26 21:48:37 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/include/parse_conf.h,v 3.4 1994/01/23 17:23:07 kardel Exp
- *
-! * parse_conf.h,v 3.4 1994/01/23 17:23:07 kardel Exp
- *
- * Copyright (c) 1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/include/parse_conf.h,v 3.5 1994/01/25 19:04:23 kardel Exp
- *
-! * parse_conf.h,v 3.5 1994/01/25 19:04:23 kardel Exp
- *
- * Copyright (c) 1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
-***************
-*** 15,21 ****
- #ifndef __PARSE_CONF_H__
- #define __PARSE_CONF_H__
- #if !(defined(lint) || defined(__GNUC__))
-! static char dcfhrcsid[]="parse_conf.h,v 3.4 1994/01/23 17:23:07 kardel Exp FAU";
- #endif
-
- /*
---- 15,21 ----
- #ifndef __PARSE_CONF_H__
- #define __PARSE_CONF_H__
- #if !(defined(lint) || defined(__GNUC__))
-! static char dcfhrcsid[]="parse_conf.h,v 3.5 1994/01/25 19:04:23 kardel Exp FAU";
- #endif
-
- /*
-diff -c include/sys/parsestreams.h:1.1.1.6 include/sys/parsestreams.h:3.11
-*** include/sys/parsestreams.h:1.1.1.6 Wed Jan 26 21:48:44 1994
---- include/sys/parsestreams.h Wed Jan 26 21:48:44 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/include/sys/parsestreams.h,v 3.10 1994/01/23 17:23:12 kardel Exp
- *
-! * parsestreams.h,v 3.10 1994/01/23 17:23:12 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/include/sys/parsestreams.h,v 3.11 1994/01/25 19:04:30 kardel Exp
- *
-! * parsestreams.h,v 3.11 1994/01/25 19:04:30 kardel Exp
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
-***************
-*** 13,19 ****
- */
-
- #if !(defined(lint) || defined(__GNUC__))
-! static char parse77hrcsid[]="parsestreams.h,v 3.10 1994/01/23 17:23:12 kardel Exp";
- #endif
-
- #undef PARSEKERNEL
---- 13,19 ----
- */
-
- #if !(defined(lint) || defined(__GNUC__))
-! static char parse77hrcsid[]="parsestreams.h,v 3.11 1994/01/25 19:04:30 kardel Exp";
- #endif
-
- #undef PARSEKERNEL
-diff -c kernel/Makefile.tmpl:1.1.1.3 kernel/Makefile.tmpl:3.6
-*** kernel/Makefile.tmpl:1.1.1.3 Wed Jan 26 21:48:49 1994
---- kernel/Makefile.tmpl Wed Jan 26 21:48:49 1994
-***************
-*** 1,7 ****
- #
-! # /src/NTP/REPOSITORY/v3/kernel/Makefile.tmpl,v 3.5 1994/01/23 17:37:53 kardel Exp
- #
-- #
- # parse routine that could be used in two places
- #
- COMPILER= cc
---- 1,6 ----
- #
-! # /src/NTP/REPOSITORY/v3/kernel/Makefile.tmpl,v 3.6 1994/01/25 19:04:35 kardel Exp
- #
- # parse routine that could be used in two places
- #
- COMPILER= cc
-diff -c lib/systime.c:1.1.1.10 lib/systime.c:1.7
-*** lib/systime.c:1.1.1.10 Wed Jan 26 21:50:00 1994
---- lib/systime.c Wed Jan 26 21:50:00 1994
-***************
-*** 238,273 ****
- #endif
- }
-
-- sys_clock_offset.l_ui = offset_i;
-- sys_clock_offset.l_uf = offset_f;
--
- if (adjtime(&adjtv, &oadjtv) < 0) {
- syslog(LOG_ERR, "Can't do time adjustment: %m");
- rval = 0;
-! } else
- rval = 1;
-
- #ifdef DEBUGRS6000
-! syslog(LOG_ERR, "adj_systime(%s): offset = %s%s\n",
-! mfptoa((adj<0?-1:0), adj, 9), isneg?"-":"",
-! umfptoa(offset_i, offset_f, 9));
-! syslog(LOG_ERR, "%d %d %d %d\n", (int) adjtv.tv_sec,
-! (int) adjtv.tv_usec, (int) oadjtv.tv_sec, (int)
-! oadjtv.tv_usec);
- #endif /* DEBUGRS6000 */
-
-! if ((oadjtv.tv_sec != 0 || oadjtv.tv_usec != 0) && (max_no_complete > 0)) {
-! sTVTOTS(&oadjtv, &oadjts);
-! L_ADD(&sys_clock_offset, &oadjts);
-! syslog(LOG_WARNING, "Previous time adjustment didn't complete");
- #ifdef DEBUG
-! if (debug > 4)
-! syslog(LOG_DEBUG,
-! "Previous adjtime() incomplete, residual = %s\n",
-! tvtoa(&oadjtv));
- #endif
-! if (--max_no_complete == 0) syslog(LOG_WARNING,
-! "*** No more 'Prev time adj didn't complete'");
- }
- return(rval);
- }
---- 238,277 ----
- #endif
- }
-
- if (adjtime(&adjtv, &oadjtv) < 0) {
- syslog(LOG_ERR, "Can't do time adjustment: %m");
- rval = 0;
-! } else {
-! sys_clock_offset.l_ui = offset_i;
-! sys_clock_offset.l_uf = offset_f;
- rval = 1;
-
- #ifdef DEBUGRS6000
-! syslog(LOG_ERR, "adj_systime(%s): offset = %s%s\n",
-! mfptoa((adj<0?-1:0), adj, 9), isneg?"-":"",
-! umfptoa(offset_i, offset_f, 9));
-! syslog(LOG_ERR, "%d %d %d %d\n", (int) adjtv.tv_sec,
-! (int) adjtv.tv_usec, (int) oadjtv.tv_sec, (int)
-! oadjtv.tv_usec);
- #endif /* DEBUGRS6000 */
-
-! if (oadjtv.tv_sec != 0 || oadjtv.tv_usec != 0) {
-! sTVTOTS(&oadjtv, &oadjts);
-! L_ADD(&sys_clock_offset, &oadjts);
-! if (max_no_complete > 0) {
-! syslog(LOG_WARNING,
-! "Previous time adjustment didn't complete");
- #ifdef DEBUG
-! if (debug > 4)
-! syslog(LOG_DEBUG,
-! "Previous adjtime() incomplete, residual = %s\n",
-! tvtoa(&oadjtv));
- #endif
-! if (--max_no_complete == 0)
-! syslog(LOG_WARNING,
-! "*** No more 'Prev time adj didn't complete'");
-! }
-! }
- }
- return(rval);
- }
-diff -c ntpq/ntpq.c:1.1.1.20 ntpq/ntpq.c:3.20
-*** ntpq/ntpq.c:1.1.1.20 Wed Jan 26 21:50:59 1994
---- ntpq/ntpq.c Wed Jan 26 21:50:59 1994
-***************
-*** 2577,2582 ****
---- 2577,2583 ----
- register char *cp;
- register char *np;
- register char *cpend;
-+ int quoted = 0;
- static char name[MAXVARLEN];
- static char value[MAXVALLEN];
-
-***************
-*** 2623,2630 ****
- while (cp < cpend && (isspace(*cp) && *cp != '\r' && *cp != '\n'))
- cp++;
- np = value;
-! while (cp < cpend && *cp != ',')
-! *np++ = *cp++;
- while (np > value && isspace(*(np-1)))
- np--;
- *np = '\0';
---- 2624,2634 ----
- while (cp < cpend && (isspace(*cp) && *cp != '\r' && *cp != '\n'))
- cp++;
- np = value;
-! while (cp < cpend && ((*cp != ',') || quoted))
-! {
-! quoted ^= ((*np++ = *cp++) == '"');
-! }
-!
- while (np > value && isspace(*(np-1)))
- np--;
- *np = '\0';
-diff -c parse/Makefile.kernel:1.1.1.2 parse/Makefile.kernel:3.8
-*** parse/Makefile.kernel:1.1.1.2 Wed Jan 26 21:51:11 1994
---- parse/Makefile.kernel Wed Jan 26 21:51:11 1994
-***************
-*** 30,46 ****
- ld -r -o parse parsesolaris.o libparse_kernel.a ../lib/libntp.a
- @echo "--- Install 'parse' in /kernel/strmod for automatic loading"
-
-! mparsestreams.o: parsestreams.c microtime.o ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c -DMICROTIME $(DEFS) -I../include parsestreams.c
- ld -r -o $@ parsestreams.o ../lib/libntp.a libparse_kernel.a \
- microtime.o
- rm -f parsestreams.o
-! @echo "--- You may load mparsestreams.o via 'modload mparsestreams.o' into the kernel"
-
-! parsestreams.o: parsestreams.c ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c $(DEFS) -I../include parsestreams.c
-! ld -r -o $@ $@ ../lib/libntp.a libparse_kernel.a
-! @echo "--- You may load parsestreams.o via 'modload parsestreams.o' into the kernel"
-
- microtime.o: $(MICROTIME) assym.s
- cc -E -I. $(MICROTIME) | sed -e '/\.global _uniqtime/d' > $@.i
---- 30,51 ----
- ld -r -o parse parsesolaris.o libparse_kernel.a ../lib/libntp.a
- @echo "--- Install 'parse' in /kernel/strmod for automatic loading"
-
-! mparsestreams.o: mparsestreams.o.$(KARCH)
-! @echo "--- You may load mparsestreams.o.$(KARCH) via 'modload mparsestreams.o.$(KARCH)' into the kernel"
-!
-! mparsestreams.o.$(KARCH): parsestreams.c microtime.o ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c -DMICROTIME $(DEFS) -I../include parsestreams.c
- ld -r -o $@ parsestreams.o ../lib/libntp.a libparse_kernel.a \
- microtime.o
- rm -f parsestreams.o
-!
-! parsestreams.o: parsestreams.o.$(KARCH)
-! @echo "--- You may load parsestreams.o.$(KARCH) via 'modload parsestreams.o.$(KARCH)' into the kernel"
-
-! parsestreams.o.$(KARCH): parsestreams.c ../lib/libntp.a libparse_kernel.a ../include/parse.h ../include/sys/parsestreams.h
- cc -c $(DEFS) -I../include parsestreams.c
-! ld -r -o $@ parsestreams.o ../lib/libntp.a libparse_kernel.a
-! rm -f parsestreams.o
-
- microtime.o: $(MICROTIME) assym.s
- cc -E -I. $(MICROTIME) | sed -e '/\.global _uniqtime/d' > $@.i
-diff -c parse/clk_dcf7000.c:1.1.1.7 parse/clk_dcf7000.c:3.10
-*** parse/clk_dcf7000.c:1.1.1.7 Wed Jan 26 21:51:16 1994
---- parse/clk_dcf7000.c Wed Jan 26 21:51:17 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_DCF7000)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_dcf7000.c,v 3.9 1994/01/23 17:21:51 kardel Exp
- *
-! * clk_dcf7000.c,v 3.9 1994/01/23 17:21:51 kardel Exp
- *
- * ELV DCF7000 module
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_DCF7000)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_dcf7000.c,v 3.10 1994/01/25 19:05:07 kardel Exp
- *
-! * clk_dcf7000.c,v 3.10 1994/01/25 19:05:07 kardel Exp
- *
- * ELV DCF7000 module
- *
-diff -c parse/clk_meinberg.c:1.1.1.7 parse/clk_meinberg.c:3.11
-*** parse/clk_meinberg.c:1.1.1.7 Wed Jan 26 21:51:17 1994
---- parse/clk_meinberg.c Wed Jan 26 21:51:18 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_MEINBERG)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_meinberg.c,v 3.10 1994/01/23 17:21:54 kardel Exp
- *
-! * clk_meinberg.c,v 3.10 1994/01/23 17:21:54 kardel Exp
- *
- * Meinberg clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_MEINBERG)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_meinberg.c,v 3.11 1994/01/25 19:05:10 kardel Exp
- *
-! * clk_meinberg.c,v 3.11 1994/01/25 19:05:10 kardel Exp
- *
- * Meinberg clock support
- *
-***************
-*** 414,419 ****
---- 414,422 ----
- * History:
- *
- * clk_meinberg.c,v
-+ * Revision 3.11 1994/01/25 19:05:10 kardel
-+ * 94/01/23 reconcilation
-+ *
- * Revision 3.10 1994/01/23 17:21:54 kardel
- * 1994 reconcilation
- *
-diff -c parse/clk_rawdcf.c:1.1.1.7 parse/clk_rawdcf.c:3.9
-*** parse/clk_rawdcf.c:1.1.1.7 Wed Jan 26 21:51:19 1994
---- parse/clk_rawdcf.c Wed Jan 26 21:51:19 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_RAWDCF)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v 3.8 1994/01/22 11:24:11 kardel Exp
- *
-! * clk_rawdcf.c,v 3.8 1994/01/22 11:24:11 kardel Exp
- *
- * Raw DCF77 pulse clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_RAWDCF)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_rawdcf.c,v 3.9 1994/01/25 19:05:12 kardel Exp
- *
-! * clk_rawdcf.c,v 3.9 1994/01/25 19:05:12 kardel Exp
- *
- * Raw DCF77 pulse clock support
- *
-***************
-*** 529,534 ****
---- 529,537 ----
- * History:
- *
- * clk_rawdcf.c,v
-+ * Revision 3.9 1994/01/25 19:05:12 kardel
-+ * 94/01/23 reconcilation
-+ *
- * Revision 3.8 1994/01/22 11:24:11 kardel
- * fixed PPS handling
- *
-diff -c parse/clk_schmid.c:1.1.1.7 parse/clk_schmid.c:3.10
-*** parse/clk_schmid.c:1.1.1.7 Wed Jan 26 21:51:20 1994
---- parse/clk_schmid.c Wed Jan 26 21:51:20 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_SCHMID)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_schmid.c,v 3.9 1994/01/23 17:21:56 kardel Exp
- *
-! * clk_schmid.c,v 3.9 1994/01/23 17:21:56 kardel Exp
- *
- * Schmid clock support
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_SCHMID)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_schmid.c,v 3.10 1994/01/25 19:05:15 kardel Exp
- *
-! * clk_schmid.c,v 3.10 1994/01/25 19:05:15 kardel Exp
- *
- * Schmid clock support
- *
-***************
-*** 168,173 ****
---- 168,176 ----
- * History:
- *
- * clk_schmid.c,v
-+ * Revision 3.10 1994/01/25 19:05:15 kardel
-+ * 94/01/23 reconcilation
-+ *
- * Revision 3.9 1994/01/23 17:21:56 kardel
- * 1994 reconcilation
- *
-diff -c parse/clk_trimble.c:1.1.1.2 parse/clk_trimble.c:3.7
-*** parse/clk_trimble.c:1.1.1.2 Wed Jan 26 21:51:21 1994
---- parse/clk_trimble.c Wed Jan 26 21:51:21 1994
-***************
-*** 1,6 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_TRIMSV6)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_trimble.c,v 3.6 1993/10/30 09:44:45 kardel Exp
- *
- * Trimble SV6 clock support
- */
---- 1,6 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS)) && defined(CLOCK_TRIMSV6)
- /*
-! * /src/NTP/REPOSITORY/v3/parse/clk_trimble.c,v 3.7 1994/01/25 19:05:17 kardel Exp
- *
- * Trimble SV6 clock support
- */
-***************
-*** 106,111 ****
---- 106,114 ----
- * History:
- *
- * clk_trimble.c,v
-+ * Revision 3.7 1994/01/25 19:05:17 kardel
-+ * 94/01/23 reconcilation
-+ *
- * Revision 3.6 1993/10/30 09:44:45 kardel
- * conditional compilation flag cleanup
- *
-diff -c parse/parse.c:1.1.1.7 parse/parse.c:3.19
-*** parse/parse.c:1.1.1.7 Wed Jan 26 21:51:24 1994
---- parse/parse.c Wed Jan 26 21:51:24 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.18 1994/01/23 17:21:59 kardel Exp
- *
-! * parse.c,v 3.18 1994/01/23 17:21:59 kardel Exp
- *
- * Parser module for reference clock
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.19 1994/01/25 19:05:20 kardel Exp
- *
-! * parse.c,v 3.19 1994/01/25 19:05:20 kardel Exp
- *
- * Parser module for reference clock
- *
-***************
-*** 22,28 ****
- */
-
- #if !(defined(lint) || defined(__GNUC__))
-! static char rcsid[] = "parse.c,v 3.18 1994/01/23 17:21:59 kardel Exp";
- #endif
-
- #include "sys/types.h"
---- 22,28 ----
- */
-
- #if !(defined(lint) || defined(__GNUC__))
-! static char rcsid[] = "parse.c,v 3.19 1994/01/25 19:05:20 kardel Exp";
- #endif
-
- #include "sys/types.h"
-***************
-*** 1139,1144 ****
---- 1139,1147 ----
- * History:
- *
- * parse.c,v
-+ * Revision 3.19 1994/01/25 19:05:20 kardel
-+ * 94/01/23 reconcilation
-+ *
- * Revision 3.18 1994/01/23 17:21:59 kardel
- * 1994 reconcilation
- *
-diff -c parse/parse_conf.c:1.1.1.7 parse/parse_conf.c:3.13
-*** parse/parse_conf.c:1.1.1.7 Wed Jan 26 21:51:25 1994
---- parse/parse_conf.c Wed Jan 26 21:51:25 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse_conf.c,v 3.12 1994/01/23 17:22:02 kardel Exp
- *
-! * parse_conf.c,v 3.12 1994/01/23 17:22:02 kardel Exp
- *
- * Parser configuration module for reference clocks
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse_conf.c,v 3.13 1994/01/25 19:05:23 kardel Exp
- *
-! * parse_conf.c,v 3.13 1994/01/25 19:05:23 kardel Exp
- *
- * Parser configuration module for reference clocks
- *
-***************
-*** 81,86 ****
---- 81,89 ----
- * History:
- *
- * parse_conf.c,v
-+ * Revision 3.13 1994/01/25 19:05:23 kardel
-+ * 94/01/23 reconcilation
-+ *
- * Revision 3.12 1994/01/23 17:22:02 kardel
- * 1994 reconcilation
- *
-diff -c parse/parsesolaris.c:1.1.1.4 parse/parsesolaris.c:3.9
-*** parse/parsesolaris.c:1.1.1.4 Wed Jan 26 21:51:26 1994
---- parse/parsesolaris.c Wed Jan 26 21:51:27 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v 3.8 1994/01/23 17:22:04 kardel Exp
- *
-! * parsesolaris.c,v 3.8 1994/01/23 17:22:04 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS5.x - not fully tested - buyer beware ! - OS KILLERS may still be
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsesolaris.c,v 3.9 1994/01/25 19:05:26 kardel Exp
- *
-! * parsesolaris.c,v 3.9 1994/01/25 19:05:26 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS5.x - not fully tested - buyer beware ! - OS KILLERS may still be
-***************
-*** 19,25 ****
- */
-
- #ifndef lint
-! static char rcsid[] = "parsesolaris.c,v 3.8 1994/01/23 17:22:04 kardel Exp";
- #endif
-
- /*
---- 19,25 ----
- */
-
- #ifndef lint
-! static char rcsid[] = "parsesolaris.c,v 3.9 1994/01/25 19:05:26 kardel Exp";
- #endif
-
- /*
-***************
-*** 139,145 ****
- /*ARGSUSED*/
- int _init(void)
- {
-! static char revision[] = "3.8";
- char *s, *S, *t;
-
- /*
---- 139,145 ----
- /*ARGSUSED*/
- int _init(void)
- {
-! static char revision[] = "3.9";
- char *s, *S, *t;
-
- /*
-***************
-*** 1179,1184 ****
---- 1179,1187 ----
- * History:
- *
- * parsesolaris.c,v
-+ * Revision 3.9 1994/01/25 19:05:26 kardel
-+ * 94/01/23 reconcilation
-+ *
- * Revision 3.8 1994/01/23 17:22:04 kardel
- * 1994 reconcilation
- *
-diff -c parse/parsestreams.c:1.1.1.6 parse/parsestreams.c:3.12
-*** parse/parsestreams.c:1.1.1.6 Wed Jan 26 21:51:28 1994
---- parse/parsestreams.c Wed Jan 26 21:51:28 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.11 1994/01/23 17:22:07 kardel Exp
- *
-! * parsestreams.c,v 3.11 1994/01/23 17:22:07 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parsestreams.c,v 3.12 1994/01/25 19:05:30 kardel Exp
- *
-! * parsestreams.c,v 3.12 1994/01/25 19:05:30 kardel Exp
- *
- * STREAMS module for reference clocks
- * (SunOS4.x)
-***************
-*** 16,22 ****
- */
-
- #ifndef lint
-! static char rcsid[] = "parsestreams.c,v 3.11 1994/01/23 17:22:07 kardel Exp";
- #endif
-
- #include "sys/types.h"
---- 16,22 ----
- */
-
- #ifndef lint
-! static char rcsid[] = "parsestreams.c,v 3.12 1994/01/25 19:05:30 kardel Exp";
- #endif
-
- #include "sys/types.h"
-***************
-*** 195,201 ****
- }
- else
- {
-! static char revision[] = "3.11";
- char *s, *S, *t;
-
- strncpy(ifm->f_name, mname, FMNAMESZ);
---- 195,201 ----
- }
- else
- {
-! static char revision[] = "3.12";
- char *s, *S, *t;
-
- strncpy(ifm->f_name, mname, FMNAMESZ);
-***************
-*** 1258,1263 ****
---- 1258,1266 ----
- * History:
- *
- * parsestreams.c,v
-+ * Revision 3.12 1994/01/25 19:05:30 kardel
-+ * 94/01/23 reconcilation
-+ *
- * Revision 3.11 1994/01/23 17:22:07 kardel
- * 1994 reconcilation
- *
-diff -c parse/util/Makefile.tmpl:1.1.1.2 parse/util/Makefile.tmpl:3.12
-*** parse/util/Makefile.tmpl:1.1.1.2 Wed Jan 26 21:51:31 1994
---- parse/util/Makefile.tmpl Wed Jan 26 21:51:31 1994
-***************
-*** 1,5 ****
- #
-! # /src/NTP/REPOSITORY/v3/parse/util/Makefile.tmpl,v 3.11 1993/11/17 13:34:12 kardel Exp
- #
- COMPILER= cc
- DEFS=
---- 1,5 ----
- #
-! # /src/NTP/REPOSITORY/v3/parse/util/Makefile.tmpl,v 3.12 1994/01/25 19:05:39 kardel Exp
- #
- COMPILER= cc
- DEFS=
-diff -c parse/util/dcfd.c:1.1.1.4 parse/util/dcfd.c:3.15
-*** parse/util/dcfd.c:1.1.1.4 Wed Jan 26 21:51:33 1994
---- parse/util/dcfd.c Wed Jan 26 21:51:33 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/util/dcfd.c,v 3.13 1994/01/23 17:22:15 kardel Exp
- *
-! * dcfd.c,v 3.13 1994/01/23 17:22:15 kardel Exp
- *
- * DCF77 100/200ms pulse synchronisation daemon program (via 50Baud serial line)
- *
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/util/dcfd.c,v 3.15 1994/01/25 19:05:42 kardel Exp
- *
-! * dcfd.c,v 3.15 1994/01/25 19:05:42 kardel Exp
- *
- * DCF77 100/200ms pulse synchronisation daemon program (via 50Baud serial line)
- *
-***************
-*** 733,740 ****
- * assume that we convert timecode within the unix/UTC epoch -
- * prolonges validity of 2 digit years
- */
-! if (clock->year < 1900)
-! clock->year += 100; /* XXX this will do it till <2092 */
-
- /*
- * must have been a really negative year code - drop it
---- 733,740 ----
- * assume that we convert timecode within the unix/UTC epoch -
- * prolonges validity of 2 digit years
- */
-! if (clock->year < 1994)
-! clock->year += 100; /* XXX this will do it till <2094 */
-
- /*
- * must have been a really negative year code - drop it
-diff -c parse/util/testdcf.c:1.1.1.5 parse/util/testdcf.c:3.9
-*** parse/util/testdcf.c:1.1.1.5 Wed Jan 26 21:51:35 1994
---- parse/util/testdcf.c Wed Jan 26 21:51:35 1994
-***************
-*** 1,7 ****
- /*
-! * /src/NTP/REPOSITORY/v3/parse/util/testdcf.c,v 3.8 1994/01/23 17:22:20 kardel Exp
- *
-! * testdcf.c,v 3.8 1994/01/23 17:22:20 kardel Exp
- *
- * simple DCF77 100/200ms pulse test program (via 50Baud serial line)
- *
---- 1,7 ----
- /*
-! * /src/NTP/REPOSITORY/v3/parse/util/testdcf.c,v 3.9 1994/01/25 19:05:45 kardel Exp
- *
-! * testdcf.c,v 3.9 1994/01/25 19:05:45 kardel Exp
- *
- * simple DCF77 100/200ms pulse test program (via 50Baud serial line)
- *
-diff -c scripts/Guess.sh:1.1.1.6 scripts/Guess.sh:1.11
-*** scripts/Guess.sh:1.1.1.6 Wed Jan 26 21:52:11 1994
---- scripts/Guess.sh Wed Jan 26 21:52:12 1994
-***************
-*** 19,25 ****
- sinix-m)
- guess=sinix-m
- ;;
-! sunos) case "$3" in
- 4.1*) guess="sunos4" ;;
- 5.1) guess="sunos5.1" ;;
- 5.*) guess="sunos5.2" ;;
---- 19,26 ----
- sinix-m)
- guess=sinix-m
- ;;
-! sunos|solaris)
-! case "$3" in
- 4.1*) guess="sunos4" ;;
- 5.1) guess="sunos5.1" ;;
- 5.*) guess="sunos5.2" ;;
-***************
-*** 59,65 ****
- guess="netbsd"
- ;;
- # now the fun starts - there are vendors that
-! # do not really identify their OS un uname.
- # Fine - now I look at our version and hope
- # that nobody else had this marvellous idea.
- # I am not willing to mention the vendor explicitly
---- 60,66 ----
- guess="netbsd"
- ;;
- # now the fun starts - there are vendors that
-! # do not really identify their OS in uname.
- # Fine - now I look at our version and hope
- # that nobody else had this marvellous idea.
- # I am not willing to mention the vendor explicitly
-diff -c xntpd/ntp_config.c:1.1.1.18 xntpd/ntp_config.c:3.21
-*** xntpd/ntp_config.c:1.1.1.18 Wed Jan 26 21:52:59 1994
---- xntpd/ntp_config.c Wed Jan 26 21:53:00 1994
-***************
-*** 93,98 ****
---- 93,99 ----
- #define CONFIG_PPS 24
- #define CONFIG_PIDFILE 25
- #define CONFIG_LOGFILE 26
-+ #define CONFIG_SETVAR 27
-
- #define CONF_MOD_VERSION 1
- #define CONF_MOD_KEY 2
-***************
-*** 177,182 ****
---- 178,184 ----
- { "statistics", CONFIG_STATISTICS },
- { "pidfile", CONFIG_PIDFILE },
- { "logfile", CONFIG_LOGFILE },
-+ { "setvar", CONFIG_SETVAR },
- { "", CONFIG_UNKNOWN }
- };
-
-***************
-*** 316,322 ****
- #endif
- extern char *FindConfig();
- char *progname;
-! static char *xntp_options = "abc:de:f:k:l:p:r:s:t:";
-
- static int gettokens P((FILE *, char *, char **, int *));
- static int matchkey P((char *, struct keyword *));
---- 318,324 ----
- #endif
- extern char *FindConfig();
- char *progname;
-! static char *xntp_options = "abc:de:f:k:l:p:r:s:t:v:V:";
-
- static int gettokens P((FILE *, char *, char **, int *));
- static int matchkey P((char *, struct keyword *));
-***************
-*** 374,381 ****
- }
-
- if (errflg || optind != argc) {
-! (void) fprintf(stderr,
-! "usage: %s [ -bd ] [ -c config_file ]\n", progname);
- exit(2);
- }
- optind = 0; /* reset optind to restart getopt_l */
---- 376,385 ----
- }
-
- if (errflg || optind != argc) {
-! (void) fprintf(stderr, "usage: %s [ -abd ] [ -c config_file ] [ -e encryption delay ]\n", progname);
-! (void) fprintf(stderr, "\t\t[ -f frequency file ] [ -k key file ] [ -l log file ]\n");
-! (void) fprintf(stderr, "\t\t[ -p pid file ] [ -r broadcast delay ] [ -s status directory ]\n");
-! (void) fprintf(stderr, "\t\t[ -t trusted key ] [ -v sys variable ] [ -V default sys variable ]\n");
- exit(2);
- }
- optind = 0; /* reset optind to restart getopt_l */
-***************
-*** 428,433 ****
---- 432,438 ----
- char keyfile[MAXFILENAME];
- extern int optind;
- extern char *optarg;
-+ extern char *Version;
- extern U_LONG info_auth_keyid;
- FILEGEN *filegen;
-
-***************
-*** 443,448 ****
---- 448,459 ----
- res_fp = NULL;
- have_resolver = have_keyfile = 0;
-
-+ /*
-+ * install a non default variable with this daemon version
-+ */
-+ (void) sprintf(line, "daemon_version=\"%s\"", Version);
-+ set_sys_var(line, strlen(line)+1, RO);
-+
- #ifdef RESOLVE_INTERNAL
- resolve_internal = 1;
- #endif
-***************
-*** 546,551 ****
---- 557,566 ----
- } while (0);
- break;
-
-+ case 'v':
-+ case 'V':
-+ set_sys_var(optarg, strlen(optarg)+1, RW | ((c == 'V') ? DEF : 0));
-+ break;
-
- default:
- errflg++;
-***************
-*** 1386,1392 ****
- (u_char)peerkey, (u_char)peerflags);
- }
- break;
-!
- }
- }
- (void) fclose(fp);
---- 1401,1419 ----
- (u_char)peerkey, (u_char)peerflags);
- }
- break;
-!
-! case CONFIG_SETVAR:
-! if (ntokens < 2)
-! {
-! syslog(LOG_ERR,
-! "no value for setvar command - line ignored");
-! }
-! else
-! {
-! set_sys_var(tokens[1], strlen(tokens[1])+1, RW |
-! ((((ntokens > 2) && !strcmp(tokens[2], "default"))) ? DEF : 0));
-! }
-! break;
- }
- }
- (void) fclose(fp);
-***************
-*** 1445,1450 ****
---- 1472,1478 ----
- register char *cp;
- register int eol;
- register int ntok;
-+ register int quoted = 0;
-
- /*
- * Find start of first token
-***************
-*** 1469,1476 ****
- ntok = 0;
- while (!eol) {
- tokenlist[ntok++] = cp;
-! while (!ISEOL(*cp) && !ISSPACE(*cp))
-! cp++;
- if (ISEOL(*cp)) {
- *cp = '\0';
- eol = 1;
---- 1497,1505 ----
- ntok = 0;
- while (!eol) {
- tokenlist[ntok++] = cp;
-! while (!ISEOL(*cp) && (!ISSPACE(*cp) || quoted))
-! quoted ^= (*cp++ == '"');
-!
- if (ISEOL(*cp)) {
- *cp = '\0';
- eol = 1;
-diff -c xntpd/ntp_control.c:1.1.1.15 xntpd/ntp_control.c:3.21
-*** xntpd/ntp_control.c:1.1.1.15 Wed Jan 26 21:53:01 1994
---- xntpd/ntp_control.c Wed Jan 26 21:53:02 1994
-***************
-*** 1,4 ****
-! /* ntp_control.c,v 3.1 1993/07/06 01:11:13 jbj Exp
- * ntp_control.c - respond to control messages and send async traps
- */
- #include <stdio.h>
---- 1,4 ----
-! /*
- * ntp_control.c - respond to control messages and send async traps
- */
- #include <stdio.h>
-***************
-*** 61,66 ****
---- 61,67 ----
- static void ctl_putclock P((int, struct refclockstat *, int));
- #endif /* REFCLOCK */
- static struct ctl_var *ctl_getitem P((struct ctl_var *, char **));
-+ static unsigned long count_var P((struct ctl_var *));
- static void control_unspec P((struct recvbuf *, int));
- static void read_status P((struct recvbuf *, int));
- static void read_variables P((struct recvbuf *, int));
-***************
-*** 83,113 ****
- { NO_REQUEST, 0 }
- };
-
--
-- /*
-- * Structure for translation tables between internal system
-- * variable indices and text format.
-- */
-- struct ctl_var {
-- u_short code;
-- u_short flags;
-- char *text;
-- };
--
- /*
-- * Flag values
-- */
-- #define CAN_READ 0x1
-- #define CAN_WRITE 0x2
-- #define PADDING 0x80
-- #define EOV 0x40
--
-- #define RO (CAN_READ)
-- #define WO (CAN_WRITE)
-- #define RW (CAN_READ|CAN_WRITE)
--
--
-- /*
- * System variable values. The array can be indexed by
- * the variable index to find the textual name.
- */
---- 84,90 ----
-***************
-*** 132,141 ****
- { CS_SYSTEM, RO, "system" }, /* 17 */
- { CS_KEYID, RO, "keyid" }, /* 18 */
- { CS_REFSKEW, RO, "refskew" }, /* 19 */
-! { CS_VERSION, RO, "daemon_version" }, /* 20 */
- { 0, EOV, "" }
- };
-
- /*
- * System variables we print by default (in fuzzball order, more-or-less)
- */
---- 109,120 ----
- { CS_SYSTEM, RO, "system" }, /* 17 */
- { CS_KEYID, RO, "keyid" }, /* 18 */
- { CS_REFSKEW, RO, "refskew" }, /* 19 */
-! { CS_VARLIST, RO, "sys_var_list" },/* 20 */
- { 0, EOV, "" }
- };
-
-+ static struct ctl_var *ext_sys_var = (struct ctl_var *)0;
-+
- /*
- * System variables we print by default (in fuzzball order, more-or-less)
- */
-***************
-*** 153,159 ****
- CS_OFFSET,
- CS_DRIFT,
- CS_COMPLIANCE,
-- CS_VERSION,
- 0
- };
-
---- 132,137 ----
-***************
-*** 197,202 ****
---- 175,181 ----
- { CP_SENT, RO, "sent" }, /* 32 */
- { CP_FILTERROR, RO, "filterror" }, /* 33 */
- { CP_FLASH, RO, "flash" }, /* 34 */
-+ { CP_VARLIST, RO, "peer_var_list" }, /* 35 */
- { 0, EOV, "" }
- };
-
-***************
-*** 255,260 ****
---- 234,240 ----
- { CC_FUDGEVAL2, RO, "fudgeval2" }, /* 10 */
- { CC_FLAGS, RO, "flags" }, /* 11 */
- { CC_DEVICE, RO, "device" }, /* 12 */
-+ { CC_VARLIST, RO, "clock_var_list" },/* 13 */
- { 0, EOV, "" }
- };
-
-***************
-*** 283,290 ****
---- 263,277 ----
- /*
- * System and processor definitions. These will change for the gizmo board.
- */
-+ #ifndef STR_SYSTEM
- #define STR_SYSTEM "UNIX"
-+ #endif
-+ #ifndef STR_PROCESSOR
- #define STR_PROCESSOR "unknown"
-+ #endif
-+
-+ static char str_system[] = STR_SYSTEM;
-+ static char str_processor[] = STR_PROCESSOR;
-
- /*
- * Trap structures. We only allow a few of these, and send
-***************
-*** 1221,1227 ****
- ctl_putsys(varid)
- int varid;
- {
-- extern char *Version;
- l_fp tmp;
-
- switch (varid) {
---- 1208,1213 ----
-***************
-*** 1280,1291 ****
- ctl_putuint(sys_var[CS_LEAPWARNING].text, (U_LONG)leap_warning);
- break;
- case CS_PROCESSOR:
-! ctl_putstr(sys_var[CS_PROCESSOR].text, STR_PROCESSOR,
-! sizeof(STR_PROCESSOR) - 1);
- break;
- case CS_SYSTEM:
-! ctl_putstr(sys_var[CS_SYSTEM].text, STR_SYSTEM,
-! sizeof(STR_SYSTEM) - 1);
- break;
- case CS_KEYID:
- ctl_putuint(sys_var[CS_KEYID].text, (U_LONG)0);
---- 1266,1277 ----
- ctl_putuint(sys_var[CS_LEAPWARNING].text, (U_LONG)leap_warning);
- break;
- case CS_PROCESSOR:
-! ctl_putstr(sys_var[CS_PROCESSOR].text, str_processor,
-! sizeof(str_processor) - 1);
- break;
- case CS_SYSTEM:
-! ctl_putstr(sys_var[CS_SYSTEM].text, str_system,
-! sizeof(str_system) - 1);
- break;
- case CS_KEYID:
- ctl_putuint(sys_var[CS_KEYID].text, (U_LONG)0);
-***************
-*** 1293,1301 ****
- case CS_REFSKEW:
- ctl_putlfp(sys_var[CS_REFSKEW].text, &sys_refskew);
- break;
-! case CS_VERSION:
-! ctl_putstr(sys_var[CS_VERSION].text, Version,
-! strlen(Version));
- break;
- }
- }
---- 1279,1338 ----
- case CS_REFSKEW:
- ctl_putlfp(sys_var[CS_REFSKEW].text, &sys_refskew);
- break;
-! case CS_VARLIST:
-! {
-! char buf[CTL_MAX_DATA_LEN];
-! register char *s, *ss, *t, *be;
-! register int i;
-! register struct ctl_var *k;
-!
-! s = buf;
-! be = buf + sizeof(buf) - strlen(sys_var[CS_VARLIST].text) - 4;
-! if (s > be)
-! break; /* really long var name 8-( - Killer */
-!
-! strcpy(s, sys_var[CS_VARLIST].text);
-! strcat(s, "=\"");
-! s += strlen(s);
-! t = s;
-!
-! for (k = sys_var; !(k->flags &EOV); k++)
-! {
-! i = strlen(k->text);
-! if (s+i+1 >= be)
-! break;
-! if (s != t)
-! *s++ = ',';
-! strcpy(s, k->text);
-! s += i;
-! }
-!
-! for (k = ext_sys_var; k && !(k->flags &EOV); k++)
-! {
-! ss = k->text;
-! if (!ss)
-! continue;
-!
-! while (*ss && *ss != '=')
-! ss++;
-!
-! i = ss - k->text;
-! if (s+i+1 >= be)
-! break;
-! if (s != t)
-! *s++ = ',';
-! strncpy(s, k->text, i);
-! s += i;
-! }
-!
-! if (s+2 >= be)
-! break;
-!
-! *s++ = '"';
-! *s = '\0';
-!
-! ctl_putdata(buf, s - buf, 0);
-! }
- break;
- }
- }
-***************
-*** 1428,1433 ****
---- 1465,1507 ----
- case CP_SENT:
- ctl_putuint(peer_var[CP_SENT].text, peer->sent);
- break;
-+ case CP_VARLIST:
-+ {
-+ char buf[CTL_MAX_DATA_LEN];
-+ register char *s, *t, *be;
-+ register int i;
-+ register struct ctl_var *k;
-+
-+ s = buf;
-+ be = buf + sizeof(buf) - strlen(peer_var[CP_VARLIST].text) - 4;
-+ if (s > be)
-+ break; /* really long var name 8-( - Killer */
-+
-+ strcpy(s, peer_var[CP_VARLIST].text);
-+ strcat(s, "=\"");
-+ s += strlen(s);
-+ t = s;
-+
-+ for (k = peer_var; !(k->flags &EOV); k++)
-+ {
-+ i = strlen(k->text);
-+ if (s+i+1 >= be)
-+ break;
-+ if (s != t)
-+ *s++ = ',';
-+ strcpy(s, k->text);
-+ s += i;
-+ }
-+
-+ if (s+2 >= be)
-+ break;
-+
-+ *s++ = '"';
-+ *s = '\0';
-+
-+ ctl_putdata(buf, s - buf, 0);
-+ }
-+ break;
- }
- }
-
-***************
-*** 1501,1506 ****
---- 1575,1636 ----
- strlen(clock->clockdesc));
- }
- break;
-+ case CC_VARLIST:
-+ {
-+ char buf[CTL_MAX_DATA_LEN];
-+ register char *s, *ss, *t, *be;
-+ register int i;
-+ register struct ctl_var *k;
-+
-+ s = buf;
-+ be = buf + sizeof(buf) - strlen(clock_var[CC_VARLIST].text) - 4;
-+ if (s > be)
-+ break; /* really long var name 8-( - Killer */
-+
-+ strcpy(s, clock_var[CC_VARLIST].text);
-+ strcat(s, "=\"");
-+ s += strlen(s);
-+ t = s;
-+
-+ for (k = clock_var; !(k->flags &EOV); k++)
-+ {
-+ i = strlen(k->text);
-+ if (s+i+1 >= be)
-+ break;
-+ if (s != t)
-+ *s++ = ',';
-+ strcpy(s, k->text);
-+ s += i;
-+ }
-+
-+ for (k = clock->kv_list; k && !(k->flags &EOV); k++)
-+ {
-+ ss = k->text;
-+ if (!ss)
-+ continue;
-+
-+ while (*ss && *ss != '=')
-+ ss++;
-+
-+ i = ss - k->text;
-+ if (s+i+1 >= be)
-+ break;
-+ if (s != t)
-+ *s++ = ',';
-+ strncpy(s, k->text, i);
-+ s += i;
-+ *s = '\0';
-+ }
-+
-+ if (s+2 >= be)
-+ break;
-+
-+ *s++ = '"';
-+ *s = '\0';
-+
-+ ctl_putdata(buf, s - buf, 0);
-+ }
-+ break;
- }
- }
- #endif
-***************
-*** 1517,1522 ****
---- 1647,1653 ----
- {
- register struct ctl_var *v;
- register char *cp, *tp;
-+ static struct ctl_var eol = { 0, EOV, };
- static char buf[128];
-
- /*
-***************
-*** 1528,1533 ****
---- 1659,1667 ----
-
- if (reqpt >= reqend)
- return 0;
-+
-+ if (var_list == (struct ctl_var *)0)
-+ return &eol;
-
- /*
- * Look for a first character match on the tag. If we find
-***************
-*** 1538,1548 ****
- while (!(v->flags & EOV)) {
- if (!(v->flags & PADDING) && *cp == *(v->text)) {
- tp = v->text;
-! while (*tp != '\0' && cp < reqend && *cp == *tp) {
- cp++;
- tp++;
- }
-! if (*tp == '\0') {
- while (cp < reqend && isspace(*cp))
- cp++;
- if (cp == reqend || *cp == ',') {
---- 1672,1682 ----
- while (!(v->flags & EOV)) {
- if (!(v->flags & PADDING) && *cp == *(v->text)) {
- tp = v->text;
-! while (*tp != '\0' && *tp != '=' && cp < reqend && *cp == *tp) {
- cp++;
- tp++;
- }
-! if ((*tp == '\0') || (*tp == '=')) {
- while (cp < reqend && isspace(*cp))
- cp++;
- if (cp == reqend || *cp == ',') {
-***************
-*** 1685,1692 ****
- register struct ctl_var *v;
- register int i;
- char *valuep;
-! u_char wants[(CS_MAXCODE>CP_MAXCODE) ? (CS_MAXCODE+1) : (CP_MAXCODE+1)];
-! int gotvar;
-
- if (res_associd == 0) {
- /*
---- 1819,1826 ----
- register struct ctl_var *v;
- register int i;
- char *valuep;
-! u_char *wants;
-! int gotvar = (CS_MAXCODE>CP_MAXCODE) ? (CS_MAXCODE+1) : (CP_MAXCODE+1);
-
- if (res_associd == 0) {
- /*
-***************
-*** 1696,1707 ****
- rpkt.status = htons(ctlsysstatus());
- if (res_authokay)
- ctl_sys_num_events = 0;
-! bzero((char *)wants, CS_MAXCODE+1);
- gotvar = 0;
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- if (v->flags & EOV) {
-! ctl_error(CERR_UNKNOWNVAR);
-! return;
- }
- wants[v->code] = 1;
- gotvar = 1;
---- 1830,1853 ----
- rpkt.status = htons(ctlsysstatus());
- if (res_authokay)
- ctl_sys_num_events = 0;
-! gotvar += count_var(ext_sys_var);
-! wants = (u_char *)emalloc(gotvar);
-! bzero((char *)wants, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- if (v->flags & EOV) {
-! if ((v = ctl_getitem(ext_sys_var, &valuep)) != 0) {
-! if (v->flags & EOV) {
-! ctl_error(CERR_UNKNOWNVAR);
-! free((char *)wants);
-! return;
-! }
-! wants[CS_MAXCODE+1+v->code] = 1;
-! gotvar = 1;
-! continue;
-! } else {
-! break; /* shouldn't happen ! */
-! }
- }
- wants[v->code] = 1;
- gotvar = 1;
-***************
-*** 1710,1721 ****
- for (i = 1; i <= CS_MAXCODE; i++)
- if (wants[i])
- ctl_putsys(i);
- } else {
- register u_char *cs;
-
- for (cs = def_sys_var; *cs != 0; cs++)
-! ctl_putsys((int)*cs);
- }
- } else {
- register struct peer *peer;
-
---- 1856,1876 ----
- for (i = 1; i <= CS_MAXCODE; i++)
- if (wants[i])
- ctl_putsys(i);
-+ for (i = 0; ext_sys_var && !(ext_sys_var[i].flags & EOV); i++)
-+ if (wants[i+CS_MAXCODE+1])
-+ ctl_putdata(ext_sys_var[i].text,
-+ strlen(ext_sys_var[i].text), 0);
- } else {
- register u_char *cs;
-+ register struct ctl_var *kv;
-
- for (cs = def_sys_var; *cs != 0; cs++)
-! ctl_putsys((int)*cs);
-! for (kv = ext_sys_var; kv && !(kv->flags & EOV); kv++)
-! if (kv->flags & DEF)
-! ctl_putdata(kv->text, strlen(kv->text), 0);
- }
-+ free((char *)wants);
- } else {
- register struct peer *peer;
-
-***************
-*** 1732,1742 ****
- rpkt.status = htons(ctlpeerstatus(peer));
- if (res_authokay)
- peer->num_events = 0;
-! bzero((char*)wants, CP_MAXCODE+1);
- gotvar = 0;
- while ((v = ctl_getitem(peer_var, &valuep)) != 0) {
- if (v->flags & EOV) {
- ctl_error(CERR_UNKNOWNVAR);
- return;
- }
- wants[v->code] = 1;
---- 1887,1899 ----
- rpkt.status = htons(ctlpeerstatus(peer));
- if (res_authokay)
- peer->num_events = 0;
-! wants = (u_char *)emalloc(gotvar);
-! bzero((char*)wants, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(peer_var, &valuep)) != 0) {
- if (v->flags & EOV) {
- ctl_error(CERR_UNKNOWNVAR);
-+ free((char *)wants);
- return;
- }
- wants[v->code] = 1;
-***************
-*** 1752,1757 ****
---- 1909,1915 ----
- for (cp = def_peer_var; *cp != 0; cp++)
- ctl_putpeer((int)*cp, peer);
- }
-+ free((char *)wants);
- }
- ctl_flushpkt(0);
- }
-***************
-*** 1768,1773 ****
---- 1926,1932 ----
- int restrict;
- {
- register struct ctl_var *v;
-+ register int ext_var;
- char *valuep;
- LONG val;
- u_char leapind, leapwarn;
-***************
-*** 1795,1831 ****
- * Look through the variables. Dump out at the first sign of trouble.
- */
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- if (v->flags & EOV) {
-! ctl_error(CERR_UNKNOWNVAR);
-! return;
- }
- if (!(v->flags & CAN_WRITE)) {
- ctl_error(CERR_PERMISSION);
- return;
- }
-! if (*valuep == '\0' || !atoint(valuep, &val)) {
- ctl_error(CERR_BADFMT);
- return;
- }
-! if ((val & ~LEAP_NOTINSYNC) != 0) {
- ctl_error(CERR_BADVALUE);
- return;
- }
-
-! /*
-! * This one seems sane. Save it.
-! */
-! switch(v->code) {
-! case CS_LEAP:
-! case CS_LEAPIND:
-! leapind = (u_char)val;
-! break;
-! case CS_LEAPWARNING:
-! leapwarn = (u_char)val;
-! break;
-! default:
-! ctl_error(CERR_UNSPEC); /* our fault, really */
-! return;
- }
- }
-
---- 1954,2013 ----
- * Look through the variables. Dump out at the first sign of trouble.
- */
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
-+ ext_var = 0;
- if (v->flags & EOV) {
-! if ((v = ctl_getitem(ext_sys_var, &valuep)) != 0) {
-! if (v->flags & EOV) {
-! ctl_error(CERR_UNKNOWNVAR);
-! return;
-! }
-! ext_var = 1;
-! } else {
-! break;
-! }
- }
- if (!(v->flags & CAN_WRITE)) {
- ctl_error(CERR_PERMISSION);
- return;
- }
-! if (!ext_var && (*valuep == '\0' || !atoint(valuep, &val))) {
- ctl_error(CERR_BADFMT);
- return;
- }
-! if (!ext_var && (val & ~LEAP_NOTINSYNC) != 0) {
- ctl_error(CERR_BADVALUE);
- return;
- }
-
-! if (ext_var) {
-! char *s = emalloc(strlen(v->text)+strlen(valuep)+2);
-! char *t, *tt = s;
-!
-! t = v->text;
-! while (*t && *t != '=')
-! *tt++ = *t++;
-!
-! *tt++ = '=';
-! strcat(tt, valuep);
-!
-! set_sys_var(s, strlen(s)+1, v->flags);
-! free(s);
-! } else {
-! /*
-! * This one seems sane. Save it.
-! */
-! switch(v->code) {
-! case CS_LEAP:
-! case CS_LEAPIND:
-! leapind = (u_char)val;
-! break;
-! case CS_LEAPWARNING:
-! leapwarn = (u_char)val;
-! break;
-! default:
-! ctl_error(CERR_UNSPEC); /* our fault, really */
-! return;
-! }
- }
- }
-
-***************
-*** 1861,1867 ****
- register int i;
- register struct peer *peer;
- char *valuep;
-! u_char wants[CC_MAXCODE+1];
- int gotvar;
- struct refclockstat clock;
-
---- 2043,2049 ----
- register int i;
- register struct peer *peer;
- char *valuep;
-! u_char *wants;
- int gotvar;
- struct refclockstat clock;
-
-***************
-*** 1898,1915 ****
- /*
- * If we got here we have a peer which is a clock. Get his status.
- */
- refclock_control(&peer->srcadr, (struct refclockstat *)0, &clock);
-
- /*
- * Look for variables in the packet.
- */
- rpkt.status = htons(ctlclkstatus(&clock));
- gotvar = 0;
-! bzero((char*)wants, CC_MAXCODE+1);
-! while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- if (v->flags & EOV) {
-! ctl_error(CERR_UNKNOWNVAR);
-! return;
- }
- wants[v->code] = 1;
- gotvar = 1;
---- 2080,2112 ----
- /*
- * If we got here we have a peer which is a clock. Get his status.
- */
-+ clock.kv_list = (struct ctl_var *)0;
-+
- refclock_control(&peer->srcadr, (struct refclockstat *)0, &clock);
-
- /*
- * Look for variables in the packet.
- */
- rpkt.status = htons(ctlclkstatus(&clock));
-+ gotvar = CC_MAXCODE+1+count_var(clock.kv_list);
-+ wants = (u_char *)emalloc(gotvar);
-+ bzero((char*)wants, gotvar);
- gotvar = 0;
-! while ((v = ctl_getitem(clock_var, &valuep)) != 0) {
- if (v->flags & EOV) {
-! if ((v = ctl_getitem(clock.kv_list, &valuep)) != 0) {
-! if (v->flags & EOV) {
-! ctl_error(CERR_UNKNOWNVAR);
-! free((char*)wants);
-! free_varlist(clock.kv_list);
-! return;
-! }
-! wants[CC_MAXCODE+1+v->code] = 1;
-! gotvar = 1;
-! continue;
-! } else {
-! break; /* shouldn't happen ! */
-! }
- }
- wants[v->code] = 1;
- gotvar = 1;
-***************
-*** 1919,1930 ****
---- 2116,2139 ----
- for (i = 1; i <= CC_MAXCODE; i++)
- if (wants[i])
- ctl_putclock(i, &clock, 1);
-+ for (i = 0; !(clock.kv_list[i].flags & EOV); i++)
-+ if (wants[i+CC_MAXCODE+1])
-+ ctl_putdata(clock.kv_list[i].text,
-+ strlen(clock.kv_list[i].text), 0);
- } else {
- register u_char *cc;
-+ register struct ctl_var *kv;
-
- for (cc = def_clock_var; *cc != 0; cc++)
- ctl_putclock((int)*cc, &clock, 0);
-+ for (kv = clock.kv_list; kv && !(kv->flags & EOV); kv++)
-+ if (kv->flags & DEF)
-+ ctl_putdata(kv->text, strlen(kv->text), 0);
- }
-+
-+ free((char*)wants);
-+ free_varlist(clock.kv_list);
-+
- ctl_flushpkt(0);
- #endif
- }
-***************
-*** 2237,2249 ****
- */
- if (err == EVNT_CLOCKEXCPT) {
- struct refclockstat clock;
-! refclock_control(&peer->srcadr,
- (struct refclockstat *)0,
- &clock);
- ctl_puthex("refclockstatus",
- (U_LONG)ctlclkstatus(&clock));
- for (i = 1; i <= CC_MAXCODE; i++)
- ctl_putclock(i, &clock, 0);
- }
- #endif /*REFCLOCK*/
- } else {
---- 2446,2468 ----
- */
- if (err == EVNT_CLOCKEXCPT) {
- struct refclockstat clock;
-! struct ctl_var *kv;
-!
-! clock.kv_list = (struct ctl_var *)0;
-!
-! refclock_control(&peer->srcadr,
- (struct refclockstat *)0,
- &clock);
- ctl_puthex("refclockstatus",
- (U_LONG)ctlclkstatus(&clock));
-+
- for (i = 1; i <= CC_MAXCODE; i++)
- ctl_putclock(i, &clock, 0);
-+ for (kv = clock.kv_list; kv && !(kv->flags & EOV); kv++)
-+ if (kv->flags & DEF)
-+ ctl_putdata(kv->text, strlen(kv->text), 0);
-+
-+ free_varlist(clock.kv_list);
- }
- #endif /*REFCLOCK*/
- } else {
-***************
-*** 2262,2274 ****
---- 2481,2504 ----
- */
- if (err == EVNT_PEERCLOCK) {
- struct refclockstat clock;
-+ struct ctl_var *kv;
-+
-+ clock.kv_list = (struct ctl_var *)0;
-+
- refclock_control(&peer->srcadr,
- (struct refclockstat *)0,
- &clock);
-+
- ctl_puthex("refclockstatus",
- (U_LONG)ctlclkstatus(&clock));
-+
- for (i = 1; i <= CC_MAXCODE; i++)
- ctl_putclock(i, &clock, 0);
-+ for (kv = clock.kv_list; kv && !(kv->flags & EOV); kv++)
-+ if (kv->flags & DEF)
-+ ctl_putdata(kv->text, strlen(kv->text), 0);
-+
-+ free_varlist(clock.kv_list);
- }
- #endif /*REFCLOCK*/
- }
-***************
-*** 2303,2305 ****
---- 2533,2647 ----
- numctlbadop = 0;
- numasyncmsgs = 0;
- }
-+
-+ static unsigned long
-+ count_var(k)
-+ struct ctl_var *k;
-+ {
-+ register unsigned long c;
-+
-+ c = 0;
-+ while (k && !(k++->flags & EOV))
-+ c++;
-+
-+ return c;
-+ }
-+
-+ char *
-+ add_var(kv, size, def)
-+ struct ctl_var **kv;
-+ unsigned long size;
-+ int def;
-+ {
-+ register unsigned long c;
-+ register struct ctl_var *k;
-+
-+ c = count_var(*kv);
-+
-+ k = *kv;
-+ *kv = (struct ctl_var *)emalloc((c+2)*sizeof(struct ctl_var));
-+ if (k)
-+ {
-+ bcopy((char *)k, (char *)*kv, sizeof(struct ctl_var)*c);
-+ free((char *)k);
-+ }
-+
-+ (*kv)[c].code = c;
-+ (*kv)[c].text = (char *)emalloc(size);
-+ (*kv)[c].flags = def;
-+ (*kv)[c+1].code = 0;
-+ (*kv)[c+1].text = (char *)0;
-+ (*kv)[c+1].flags = EOV;
-+ return (*kv)[c].text;
-+ }
-+
-+ void
-+ set_var(kv, data, size, def)
-+ struct ctl_var **kv;
-+ char *data;
-+ unsigned long size;
-+ int def;
-+ {
-+ register struct ctl_var *k;
-+ register char *s, *t;
-+
-+ if (!data || !size)
-+ return;
-+
-+ if ((k = *kv))
-+ {
-+ while (!(k->flags & EOV))
-+ {
-+ s = data;
-+ t = k->text;
-+ if (t)
-+ {
-+ while (*t != '=' && *s - *t == 0)
-+ {
-+ s++;
-+ t++;
-+ }
-+ if (*s == *t && ((*t == '=') || !*t))
-+ {
-+ free(k->text);
-+ k->text = (char *)emalloc(size);
-+ bcopy(data, k->text, size);
-+ k->flags = def;
-+ return;
-+ }
-+ }
-+ else
-+ {
-+ k->text = (char *)emalloc(size);
-+ bcopy(data, k->text, size);
-+ k->flags = def;
-+ return;
-+ }
-+ k++;
-+ }
-+ }
-+ t = add_var(kv, size, def);
-+ bcopy(data, t, size);
-+ }
-+
-+ void
-+ set_sys_var(data, size, def)
-+ char *data;
-+ unsigned long size;
-+ int def;
-+ {
-+ set_var(&ext_sys_var, data, size, def);
-+ }
-+
-+ void
-+ free_varlist(kv)
-+ struct ctl_var *kv;
-+ {
-+ struct ctl_var *k;
-+ if (kv)
-+ {
-+ for (k = kv; !(k->flags & EOV); k++)
-+ free(k->text);
-+ free((char *)kv);
-+ }
-+ }
-diff -c xntpd/ntp_filegen.c:1.1.1.5 xntpd/ntp_filegen.c:3.12
-*** xntpd/ntp_filegen.c:1.1.1.5 Wed Jan 26 21:53:04 1994
---- xntpd/ntp_filegen.c Wed Jan 26 21:53:04 1994
-***************
-*** 1,5 ****
- /*
-! * ntp_filegen.c,v 3.10 1993/12/03 03:55:35 pruy Exp
- *
- * implements file generations support for NTP
- * logfiles and statistic files
---- 1,5 ----
- /*
-! * ntp_filegen.c,v 3.12 1994/01/25 19:06:11 kardel Exp
- *
- * implements file generations support for NTP
- * logfiles and statistic files
-diff -c xntpd/ntp_request.c:1.1.1.13 xntpd/ntp_request.c:3.13
-*** xntpd/ntp_request.c:1.1.1.13 Wed Jan 26 21:53:18 1994
---- xntpd/ntp_request.c Wed Jan 26 21:53:18 1994
-***************
-*** 2111,2116 ****
---- 2111,2119 ----
- req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
- return;
- }
-+
-+ clock.kv_list = (struct ctl_var *)0;
-+
- refclock_control(&addr, (struct refclockstat *)0, &clock);
-
- ic->clockadr = addr.sin_addr.s_addr;
-***************
-*** 2128,2133 ****
---- 2131,2138 ----
- ic->fudgeval1 = htonl(clock.fudgeval1);
- ic->fudgeval2 = htonl(clock.fudgeval2);
-
-+ free_varlist(clock.kv_list);
-+
- ic = (struct info_clock *)more_pkt();
- }
- flush_pkt();
-diff -c xntpd/refclock_parse.c:1.1.1.9 xntpd/refclock_parse.c:3.45
-*** xntpd/refclock_parse.c:1.1.1.9 Wed Jan 26 21:53:39 1994
---- xntpd/refclock_parse.c Wed Jan 26 21:53:39 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.43 1994/01/23 16:28:39 kardel Exp
- *
-! * refclock_parse.c,v 3.43 1994/01/23 16:28:39 kardel Exp
- *
- * generic reference clock driver for receivers
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.45 1994/01/25 19:06:27 kardel Exp
- *
-! * refclock_parse.c,v 3.45 1994/01/25 19:06:27 kardel Exp
- *
- * generic reference clock driver for receivers
- *
-***************
-*** 129,135 ****
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.43 1994/01/23 16:28:39 kardel Exp";
- #endif
-
- /**===========================================================================
---- 129,135 ----
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.45 1994/01/25 19:06:27 kardel Exp";
- #endif
-
- /**===========================================================================
-***************
-*** 243,248 ****
---- 243,249 ----
- * clock specific configuration
- */
- l_fp basedelay; /* clock local phase offset */
-+ l_fp ppsdelay; /* clock local pps phase offset */
-
- /*
- * clock state handling/reporting
-***************
-*** 295,300 ****
---- 296,302 ----
- #define NO_END (void (*)())0
- #define NO_DATA (void *)0
- #define NO_FORMAT ""
-+ #define NO_PPSDELAY 0
-
- #define DCF_ID "DCF" /* generic DCF */
- #define DCF_A_ID "DCFa" /* AM demodulation */
-***************
-*** 497,502 ****
---- 499,505 ----
- void *cl_data; /* local data area for "poll" mechanism */
- u_fp cl_rootdelay; /* rootdelay */
- U_LONG cl_basedelay; /* current offset - unsigned l_fp fractional part */
-+ U_LONG cl_ppsdelay; /* current PPS offset - unsigned l_fp fractional part */
- char *cl_id; /* ID code (usually "DCF") */
- char *cl_description; /* device name */
- char *cl_format; /* fixed format */
-***************
-*** 516,521 ****
---- 519,525 ----
- NO_DATA,
- DCFPZF535_ROOTDELAY,
- DCFPZF535_BASEDELAY,
-+ NO_PPSDELAY,
- DCF_P_ID,
- DCFPZF535_DESCRIPTION,
- NO_FORMAT,
-***************
-*** 534,539 ****
---- 538,544 ----
- NO_DATA,
- DCFPZF535OCXO_ROOTDELAY,
- DCFPZF535OCXO_BASEDELAY,
-+ NO_PPSDELAY,
- DCF_P_ID,
- DCFPZF535OCXO_DESCRIPTION,
- NO_FORMAT,
-***************
-*** 552,557 ****
---- 557,563 ----
- NO_DATA,
- DCFUA31_ROOTDELAY,
- DCFUA31_BASEDELAY,
-+ NO_PPSDELAY,
- DCF_A_ID,
- DCFUA31_DESCRIPTION,
- NO_FORMAT,
-***************
-*** 570,575 ****
---- 576,582 ----
- NO_DATA,
- DCF7000_ROOTDELAY,
- DCF7000_BASEDELAY,
-+ NO_PPSDELAY,
- DCF_A_ID,
- DCF7000_DESCRIPTION,
- NO_FORMAT,
-***************
-*** 588,593 ****
---- 595,601 ----
- WSDCF_DATA,
- WSDCF_ROOTDELAY,
- WSDCF_BASEDELAY,
-+ NO_PPSDELAY,
- DCF_A_ID,
- WSDCF_DESCRIPTION,
- WSDCF_FORMAT,
-***************
-*** 606,611 ****
---- 614,620 ----
- NO_DATA,
- RAWDCF_ROOTDELAY,
- CONRAD_BASEDELAY,
-+ NO_PPSDELAY,
- DCF_A_ID,
- CONRAD_DESCRIPTION,
- RAWDCF_FORMAT,
-***************
-*** 624,629 ****
---- 633,639 ----
- NO_DATA,
- RAWDCF_ROOTDELAY,
- TIMEBRICK_BASEDELAY,
-+ NO_PPSDELAY,
- DCF_A_ID,
- TIMEBRICK_DESCRIPTION,
- RAWDCF_FORMAT,
-***************
-*** 642,647 ****
---- 652,658 ----
- GPS166_DATA,
- GPS166_ROOTDELAY,
- GPS166_BASEDELAY,
-+ NO_PPSDELAY,
- GPS166_ID,
- GPS166_DESCRIPTION,
- GPS166_FORMAT,
-***************
-*** 660,665 ****
---- 671,677 ----
- TRIMBLESV6_DATA,
- TRIMBLESV6_ROOTDELAY,
- TRIMBLESV6_BASEDELAY,
-+ NO_PPSDELAY,
- TRIMBLESV6_ID,
- TRIMBLESV6_DESCRIPTION,
- TRIMBLESV6_FORMAT,
-***************
-*** 2198,2203 ****
---- 2210,2218 ----
- parse->basedelay.l_ui = 0; /* we can only pre-configure delays less than 1 second */
- parse->basedelay.l_uf = parse->parse_type->cl_basedelay;
-
-+ parse->ppsdelay.l_ui = 0; /* we can only pre-configure delays less than 1 second */
-+ parse->ppsdelay.l_uf = parse->parse_type->cl_ppsdelay;
-+
- peer->rootdelay = parse->parse_type->cl_rootdelay;
- peer->sstclktype = parse->parse_type->cl_type;
- peer->precision = sys_precision;
-***************
-*** 2554,2559 ****
---- 2569,2575 ----
- out->badformat = out->baddata = 0;
- out->timereset = 0;
- out->currentstatus = out->lastevent = CEVNT_NOMINAL;
-+ out->kv_list = (struct ctl_var *)0;
- }
-
- if (unit >= MAXUNITS)
-***************
-*** 2579,2585 ****
-
- if (in->haveflags & CLK_HAVETIME2)
- {
-! /* not USED */
- }
-
- if (in->haveflags & CLK_HAVEVAL1)
---- 2595,2601 ----
-
- if (in->haveflags & CLK_HAVETIME2)
- {
-! parse->ppsdelay = in->fudgetime2;
- }
-
- if (in->haveflags & CLK_HAVEVAL1)
-***************
-*** 2619,2637 ****
- if (out)
- {
- register unsigned LONG sum = 0;
-! register char *t;
- register struct tm *tm;
- register short utcoff;
- register char sign;
- register int i;
- time_t tim;
-
-! out->haveflags = CLK_HAVETIME1|CLK_HAVEVAL1|CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3;
- out->clockdesc = parse->parse_type->cl_description;
-
- out->fudgetime1 = parse->basedelay;
-
-! L_CLR(&out->fudgetime2);
-
- out->fudgeval1 = (LONG)parse->peer->stratum;
-
---- 2635,2655 ----
- if (out)
- {
- register unsigned LONG sum = 0;
-! register char *t, *tt;
- register struct tm *tm;
- register short utcoff;
- register char sign;
- register int i;
- time_t tim;
-
-! outstatus[0] = '\0';
-!
-! out->haveflags = CLK_HAVETIME1|CLK_HAVETIME2|CLK_HAVEVAL1|CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3;
- out->clockdesc = parse->parse_type->cl_description;
-
- out->fudgetime1 = parse->basedelay;
-
-! out->fudgetime2 = parse->ppsdelay;
-
- out->fudgeval1 = (LONG)parse->peer->stratum;
-
-***************
-*** 2657,2667 ****
- */
- off = parse->time.parse_stime.fp;
- L_SUB(&off, &parse->time.parse_ptime.fp); /* true offset */
-! out->fudgetime2 = off;
-! out->haveflags |= CLK_HAVETIME2;
- }
- }
-
- /*
- * all this for just finding out the +-xxxx part (there are always
- * new and changing fields in the standards 8-().
---- 2675,2691 ----
- */
- off = parse->time.parse_stime.fp;
- L_SUB(&off, &parse->time.parse_ptime.fp); /* true offset */
-! tt = add_var(&out->kv_list, 40, RO);
-! sprintf(tt, "refclock_ppsskew=%s", lfptoms(&off, 6));
- }
- }
-
-+ if (PARSE_PPS(parse->time.parse_state))
-+ {
-+ tt = add_var(&out->kv_list, 80, RO|DEF);
-+ sprintf(tt, "refclock_ppstime=\"%s\"", prettydate(&parse->time.parse_ptime.fp));
-+ }
-+
- /*
- * all this for just finding out the +-xxxx part (there are always
- * new and changing fields in the standards 8-().
-***************
-*** 2686,2702 ****
- sign = '+';
- }
-
-! tim = parse->time.parse_time.fp.l_ui - JAN_1970;
-! strcpy(outstatus, ctime(&tim));
-! t = strrchr(outstatus, '\n');
-! if (!t)
- {
-! t = outstatus + strlen(outstatus);
-! }
- else
- {
-! sprintf(t, " %c%02d%02d", sign, utcoff / 60, utcoff % 60);
-! t += strlen(t);
- }
-
- if (!PARSE_GETTIMECODE(parse, &tmpctl))
---- 2710,2729 ----
- sign = '+';
- }
-
-! tt = add_var(&out->kv_list, 128, RO|DEF);
-! sprintf(tt, "refclock_time=\"");
-! tt += strlen(tt);
-!
-! if (parse->time.parse_time.fp.l_ui == 0)
- {
-! strcpy(tt, "<UNDEFINED>\"");
-! }
- else
- {
-! strcpy(tt, prettydate(&parse->time.parse_time.fp));
-! t = tt + strlen(tt);
-!
-! sprintf(t, " (%c%02d%02d)\"", sign, utcoff / 60, utcoff % 60);
- }
-
- if (!PARSE_GETTIMECODE(parse, &tmpctl))
-***************
-*** 2705,2731 ****
- }
- else
- {
- /*
- * copy PPS flags from last read transaction (informational only)
- */
- tmpctl.parsegettc.parse_state |= parse->time.parse_state &
- (PARSEB_PPS|PARSEB_S_PPS);
-
-! if (t)
-! {
-! *t = ' ';
-! (void) parsestate(tmpctl.parsegettc.parse_state, t+1);
-! }
-! else
-! {
-! strcat(outstatus, " ");
-! (void) parsestate(tmpctl.parsegettc.parse_state, outstatus + strlen(outstatus));
-! }
-! strcat(outstatus," <");
- if (tmpctl.parsegettc.parse_count)
-! mkascii(outstatus+strlen(outstatus), sizeof(outstatus) - strlen(outstatus) - 1,
- tmpctl.parsegettc.parse_buffer, tmpctl.parsegettc.parse_count - 1);
-! strcat(outstatus,">");
- parse->badformat += tmpctl.parsegettc.parse_badformat;
- }
-
---- 2732,2755 ----
- }
- else
- {
-+ tt = add_var(&out->kv_list, 128, RO|DEF);
-+ sprintf(tt, "refclock_status=\"");
-+ tt += strlen(tt);
-+
- /*
- * copy PPS flags from last read transaction (informational only)
- */
- tmpctl.parsegettc.parse_state |= parse->time.parse_state &
- (PARSEB_PPS|PARSEB_S_PPS);
-
-! (void) parsestate(tmpctl.parsegettc.parse_state, tt);
-!
-! strcat(tt, "\"");
-!
- if (tmpctl.parsegettc.parse_count)
-! mkascii(outstatus+strlen(outstatus), sizeof(outstatus)- strlen(outstatus) - 1,
- tmpctl.parsegettc.parse_buffer, tmpctl.parsegettc.parse_count - 1);
-!
- parse->badformat += tmpctl.parsegettc.parse_badformat;
- }
-
-***************
-*** 2737,2752 ****
- }
- else
- {
-! strcat(outstatus," (");
-! strncat(outstatus, tmpctl.parseformat.parse_buffer, tmpctl.parseformat.parse_count);
-! strcat(outstatus,")");
- }
-
- /*
- * gather state statistics
- */
-
-! t = outstatus + strlen(outstatus);
-
- for (i = 0; i <= CEVNT_MAX; i++)
- {
---- 2761,2780 ----
- }
- else
- {
-! tt = add_var(&out->kv_list, 80, RO|DEF);
-! sprintf(tt, "refclock_format=\"");
-!
-! strncat(tt, tmpctl.parseformat.parse_buffer, tmpctl.parseformat.parse_count);
-! strcat(tt,"\"");
- }
-
- /*
- * gather state statistics
- */
-
-! tt = add_var(&out->kv_list, 200, RO|DEF);
-! strcpy(tt, "refclock_states=\"");
-! tt += strlen(tt);
-
- for (i = 0; i <= CEVNT_MAX; i++)
- {
-***************
-*** 2769,2787 ****
-
- if (stime)
- {
-! sprintf(t, "%s%s%s: %s (%d.%02d%%)",
-! sum ? "; " : " [",
- (parse->status == i) ? "*" : "",
- clockstatus(i),
- l_mktime(stime),
- percent / 100, percent % 100);
- sum += stime;
-! t += strlen(t);
- }
- }
-
-! sprintf(t, "; running time: %s]", l_mktime(sum));
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
- out->timereset = parse->timestarted;
---- 2797,2824 ----
-
- if (stime)
- {
-! sprintf(tt, "%s%s%s: %s (%d.%02d%%)",
-! sum ? "; " : "",
- (parse->status == i) ? "*" : "",
- clockstatus(i),
- l_mktime(stime),
- percent / 100, percent % 100);
- sum += stime;
-! tt += strlen(tt);
- }
- }
-
-! sprintf(tt, "; running time: %s\"", l_mktime(sum));
-!
-! tt = add_var(&out->kv_list, 32, RO);
-! sprintf(tt, "refclock_id=\"%s\"", parse->parse_type->cl_id);
-
-+ tt = add_var(&out->kv_list, 80, RO);
-+ sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-+
-+ tt = add_var(&out->kv_list, 128, RO);
-+ sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.45 1994/01/25 19:06:27 kardel Exp\"");
-+
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
- out->timereset = parse->timestarted;
-***************
-*** 3086,3091 ****
---- 3123,3130 ----
- */
- offset = parsetime->parse_ptime.fp;
-
-+ L_ADD(&offset, &parse->ppsdelay);
-+
- if (PARSE_TIMECODE(parsetime->parse_state))
- {
- if (M_ISGEQ(off.l_i, off.l_f, -1, 0x80000000) &&
-***************
-*** 3353,3358 ****
---- 3392,3403 ----
- * History:
- *
- * refclock_parse.c,v
-+ * Revision 3.45 1994/01/25 19:06:27 kardel
-+ * 94/01/23 reconcilation
-+ *
-+ * Revision 3.44 1994/01/25 17:32:23 kardel
-+ * settable extended variables
-+ *
- * Revision 3.43 1994/01/23 16:28:39 kardel
- * HAVE_TERMIOS introduced
- *
-diff -c -r1.1.1.8 lib/numtohost.c
-*** lib/numtohost.c:1.1.1.8 1994/01/26 20:12:51
---- lib/numtohost.c 1994/01/26 21:17:01
-***************
-*** 1,6 ****
---- 1,7 ----
- /* numtohost.c,v 3.1 1993/07/06 01:08:40 jbj Exp
- * numtohost - convert network number to host name.
- */
-+ #include "ntp_types.h"
- #include "ntp_string.h"
- #include <netdb.h>
-
diff --git a/usr.sbin/xntpd/patches/patch.30 b/usr.sbin/xntpd/patches/patch.30
deleted file mode 100644
index 55897f971755..000000000000
--- a/usr.sbin/xntpd/patches/patch.30
+++ /dev/null
@@ -1,73 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa14619; 22 Mar 94 11:53 EST
-Received: from jagubox.gsfc.nasa.gov by louie.udel.edu id aa24926;
- 22 Mar 94 11:48 EST
-Received: by jagubox.gsfc.nasa.gov (Smail3.1.28.1 #2)
- id m0pj9dD-000C8UC; Tue, 22 Mar 94 11:48 EST
-Message-Id: <m0pj9dD-000C8UC@jagubox.gsfc.nasa.gov>
-From: Jim Jagielski <jim@jagubox.gsfc.nasa.gov>
-Subject: Small patch for xntpd 3.3p and A/UX (tickadj)
-To: Mills@udel.edu
-Date: Tue, 22 Mar 1994 11:48:42 -0500 (EST)
-Reply-To: Jim Jagielski <jim@jagubox.gsfc.nasa.gov>
-In-Reply-To: <9308051324.aa24396@huey.udel.edu> from "Mills@udel.edu" at Aug 5, 93 01:24:24 pm
-X-Mailer: ELM [version 2.4 PL23]
-Content-Type: text
-Content-Length: 1355
-
-This little patch streamlines things a bit for tickadj and A/UX:
-
------------>8 cut here --------------------------------
-
-*** tickadj.c.orig Mon Mar 14 02:47:28 1994
---- tickadj.c Tue Mar 22 11:41:19 1994
-***************
-*** 333,342 ****
-
- #if defined(SYS_AUX3) || defined(SYS_AUX2)
- #define X_TICKADJ 0
-! #define X_V 1
-! #define X_TICK 2
- #define X_DEF
-! static struct nlist nl[4];
- #endif
-
- #ifdef NeXT
---- 333,345 ----
-
- #if defined(SYS_AUX3) || defined(SYS_AUX2)
- #define X_TICKADJ 0
-! #define X_TICK 1
- #define X_DEF
-! static struct nlist nl[] =
-! { {"tickadj"},
-! {"tick"},
-! {""},
-! };
- #endif
-
- #ifdef NeXT
-***************
-*** 428,440 ****
- NULL
- };
- struct stat stbuf;
--
-- #if defined(SYS_AUX3) || defined(SYS_AUX2)
-- strcpy (nl[X_TICKADJ].n_name, "tickadj");
-- strcpy (nl[X_V].n_name, "v");
-- strcpy (nl[X_TICK].n_name, "tick");
-- nl[3].n_name[0] = '\0';
-- #endif
-
- for (kname = kernels; *kname != NULL; kname++) {
- if (stat(*kname, &stbuf) == -1)
---- 431,436 ----
------------>8 cut here --------------------------------
---
-#include <std/disclaimer.h>
- Jim Jagielski |
- jim@jagubox.gsfc.nasa.gov | "Dead or alive, you're coming with me."
- NASA/GSFC, Code 734.4 | RoboCop
- Greenbelt, MD 20771 |
-
diff --git a/usr.sbin/xntpd/patches/patch.31 b/usr.sbin/xntpd/patches/patch.31
deleted file mode 100644
index 33048f9de143..000000000000
--- a/usr.sbin/xntpd/patches/patch.31
+++ /dev/null
@@ -1,83 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa12734; 27 Mar 94 8:52 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa20329;
- 27 Mar 94 8:48 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA05771 (5.65c-6/7.3v-FAU); Sun, 27 Mar 1994 15:48:38 +0200
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA01229 (5.65c-6/7.3m-FAU); Sun, 27 Mar 1994 14:48:37 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199403271348.AA01229@faui43.informatik.uni-erlangen.de>
-Subject: minor patches
-To: mills@udel.edu
-Date: Sun, 27 Mar 94 15:48:32 MET DST
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi, Dave,
-
-I just got through manually read news (in the spool area 8-( - when
-will they ever fix our news installation).
-
-In order to avoid ptx being picked up in AT&T machine i added hope-fully
-an additional check. Why do vendor have to make machine look the
-same when they aren't ? I though uname was supposed to find out - I
-guess I was wrong - every vendor seems to have his own ideas about
-uname and they all do not mix very well.
-
-The fix to numtohost allows it to compile on ptx - I hope it still
-compiles on all others (should though).
-
-diff -c lib/numtohost.c:1.1.1.9 lib/numtohost.c:3.7
-*** lib/numtohost.c:1.1.1.9 Sun Mar 27 15:36:54 1994
---- lib/numtohost.c Sun Mar 27 15:36:54 1994
-***************
-*** 1,12 ****
-! /* numtohost.c,v 3.1 1993/07/06 01:08:40 jbj Exp
- * numtohost - convert network number to host name.
- */
-- #include "ntp_types.h"
- #include <netdb.h>
-
- #include "ntp_fp.h"
-- #include "lib_strbuf.h"
- #include "ntp_stdlib.h"
-
- #define LOOPBACKNET 0x7f000000
- #define LOOPBACKHOST 0x7f000001
---- 1,11 ----
-! /*
- * numtohost - convert network number to host name.
- */
- #include <netdb.h>
-
- #include "ntp_fp.h"
- #include "ntp_stdlib.h"
-+ #include "lib_strbuf.h"
-
- #define LOOPBACKNET 0x7f000000
- #define LOOPBACKHOST 0x7f000001
-diff -c scripts/Guess.sh:1.1.1.8 scripts/Guess.sh:1.13
-*** scripts/Guess.sh:1.1.1.8 Sun Mar 27 15:38:53 1994
---- scripts/Guess.sh Sun Mar 27 15:38:53 1994
-***************
-*** 78,84 ****
- 3.2.*)
- case "$4" in
- v*)
-! (i386) >/dev/null 2>&1 && guess=ptx;;
- esac
- esac
- fi
---- 78,84 ----
- 3.2.*)
- case "$4" in
- v*)
-! (i386) >/dev/null 2>&1 && [ -f /usr/lib/libseq.a ] && guess=ptx;;
- esac
- esac
- fi
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.32 b/usr.sbin/xntpd/patches/patch.32
deleted file mode 100644
index 2e951cb73ef8..000000000000
--- a/usr.sbin/xntpd/patches/patch.32
+++ /dev/null
@@ -1,89 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa12910; 27 Mar 94 10:06 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa22473;
- 27 Mar 94 10:05 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA09307 (5.65c-6/7.3v-FAU); Sun, 27 Mar 1994 17:05:03 +0200
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA05359 (5.65c-6/7.3m-FAU); Sun, 27 Mar 1994 16:05:01 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199403271505.AA05359@faui43.informatik.uni-erlangen.de>
-Subject: more PTX related patches...
-To: mills@udel.edu
-Date: Sun, 27 Mar 94 17:04:56 MET DST
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi, Dave !
-
-And another patche to make parse compile on PTX (Sequents
-SysVR2 version).
-
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/parse/parse.c,v
-retrieving revision 3.23
-retrieving revision 3.24
-diff -c -r3.23 -r3.24
-*** parse/parse.c:3.23 1994/03/25 13:09:02
---- parse/parse.c 1994/03/27 15:01:36
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.23 1994/03/25 13:09:02 kardel Exp
- *
-! * parse.c,v 3.23 1994/03/25 13:09:02 kardel Exp
- *
- * Parser module for reference clock
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.24 1994/03/27 15:01:36 kardel Exp
- *
-! * parse.c,v 3.24 1994/03/27 15:01:36 kardel Exp
- *
- * Parser module for reference clock
- *
-***************
-*** 29,34 ****
---- 29,38 ----
- #include "sys/time.h"
- #include "sys/errno.h"
-
-+ #include "ntp_fp.h"
-+ #include "ntp_unixtime.h"
-+ #include "ntp_calendar.h"
-+
- #include "ntp_machine.h"
-
- #if defined(PARSESTREAM) && (defined(SYS_SUNOS4) || defined(SYS_SOLARIS)) && defined(STREAM)
-***************
-*** 49,58 ****
- #endif
- #endif
-
-- #include "ntp_fp.h"
-- #include "ntp_unixtime.h"
-- #include "ntp_calendar.h"
--
- #include "parse.h"
-
- #include "ntp_stdlib.h"
---- 53,58 ----
-***************
-*** 1162,1167 ****
---- 1162,1170 ----
- * History:
- *
- * parse.c,v
-+ * Revision 3.24 1994/03/27 15:01:36 kardel
-+ * reorder include file to cope with PTX
-+ *
- * Revision 3.23 1994/03/25 13:09:02 kardel
- * considering FIXEDONLY entries only in FIXEDONLY mode
- *
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.33 b/usr.sbin/xntpd/patches/patch.33
deleted file mode 100644
index e7d193409b6c..000000000000
--- a/usr.sbin/xntpd/patches/patch.33
+++ /dev/null
@@ -1,75 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa13737; 27 Mar 94 15:27 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa29101;
- 27 Mar 94 15:23 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA24270 (5.65c-6/7.3v-FAU); Sun, 27 Mar 1994 22:23:35 +0200
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA07515 (5.65c-6/7.3m-FAU); Sun, 27 Mar 1994 21:23:34 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199403272023.AA07515@faui43.informatik.uni-erlangen.de>
-Subject: and for patch 33?
-To: mills@udel.edu
-Date: Sun, 27 Mar 94 22:23:30 MET DST
-X-Mailer: ELM [version 2.3 PL11]
-
-This should get you to Patch 33. or higher.
- - gcc 2.5.8 (from Per Hedeland - gcc 2.5.8 is just
- causing to many poeple to complain 8-()_
- - a an note what one can do in Config.local in HACKermode.
-
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/RELNOTES,v
-retrieving revision 1.1.1.11
-diff -c -r1.1.1.11 RELNOTES
-*** 1.1.1.11 1994/01/30 17:08:20
---- RELNOTES 1994/03/27 19:40:27
-***************
-*** 31,36 ****
---- 31,40 ----
- For custom tailored configuration copying Config.local.dist to Config.local
- and editing Config.local to suit the local needs is neccessary (at most
- 3 lines to change), or use one of the make's above and then tweak it.
-+ Config.local can also be used to override common settings from the
-+ machines/* files like the AUTHDEFS= to select very specific configurations.
-+ Please use this feature with care and don't be disappointed if it doesn't
-+ work the way you expect.
-
- (2) Type "make" to compile everything of general interest. Expect few or
- no warnings using cc and a moderate level of warnings using gcc.
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/include/l_stdlib.h,v
-retrieving revision 1.1.1.6
-diff -c -r1.1.1.6 l_stdlib.h
-*** include/l_stdlib.h:1.1.1.6 1994/01/28 13:07:49
---- include/l_stdlib.h 1994/03/27 19:34:40
-***************
-*** 70,80 ****
-
- extern int close P((int));
- extern int ioctl P((int, int, char *));
-! extern int read P((int, char *, unsigned));
- extern int rename P((char *, char *));
-! extern int write P((int, char *, int));
-! extern int unlink P((char *));
-! extern int link P((char *, char *));
-
- #ifdef FILE
- extern int fclose P((FILE *));
---- 70,80 ----
-
- extern int close P((int));
- extern int ioctl P((int, int, char *));
-! extern int read P((int, void *, unsigned));
- extern int rename P((char *, char *));
-! extern int write P((int, const void *, unsigned));
-! extern int unlink P((const char *));
-! extern int link P((const char *, const char *));
-
- #ifdef FILE
- extern int fclose P((FILE *));
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.34 b/usr.sbin/xntpd/patches/patch.34
deleted file mode 100644
index a3828895ab86..000000000000
--- a/usr.sbin/xntpd/patches/patch.34
+++ /dev/null
@@ -1,303 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa02155; 25 Mar 94 8:47 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa05544;
- 25 Mar 94 8:45 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA27199 (5.65c-6/7.3v-FAU); Fri, 25 Mar 1994 14:45:13 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA06935 (5.65c-6/7.3m-FAU); Fri, 25 Mar 1994 14:45:11 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199403251345.AA06935@faui43.informatik.uni-erlangen.de>
-Subject: bugfixes for parse & ntpq enhancements
-To: mills@udel.edu
-Date: Fri, 25 Mar 94 14:45:05 MET
-X-Mailer: ELM [version 2.3 PL11]
-
-Hi Dave,
-
-I have a 2 bug fixes and an ntpq enhancement:
- - parse bitmap initialisation fixed
- - allow for large offsets in refclock_parse (>4 min 8-()
- - decode the flash bits in cooked mode
-
-diff -c ntpq/ntpq.c:1.1.1.21 ntpq/ntpq.c:3.22
-*** ntpq/ntpq.c:1.1.1.21 Fri Mar 25 14:32:38 1994
---- ntpq/ntpq.c Fri Mar 25 14:32:38 1994
-***************
-*** 75,80 ****
---- 75,81 ----
- #define OC 12 /* integer, print in octal */
- #define MD 13 /* mode */
- #define AR 14 /* array of times */
-+ #define TST 15 /* test flags */
- #define EOV 255 /* end of table */
-
-
-***************
-*** 145,151 ****
- { CP_RECEIVED, UI, "received" }, /* 31 */
- { CP_SENT, UI, "sent" }, /* 32 */
- { CP_FILTERROR, AR, "filterror" }, /* 33 */
-! { CP_FLASH, ST, "flash"}, /* 34 */
- { CP_DISP, AR, "disp" }, /* 35 */
- /*
- * These are duplicate entires so that we can
---- 146,152 ----
- { CP_RECEIVED, UI, "received" }, /* 31 */
- { CP_SENT, UI, "sent" }, /* 32 */
- { CP_FILTERROR, AR, "filterror" }, /* 33 */
-! { CP_FLASH, TST, "flash"}, /* 34 */
- { CP_DISP, AR, "disp" }, /* 35 */
- /*
- * These are duplicate entires so that we can
-***************
-*** 189,194 ****
---- 190,209 ----
- };
-
- /*
-+ * flasher bits
-+ */
-+ static char *tstflagnames[] = {
-+ "DUPLICATE PKT",
-+ "BOGUS PKT",
-+ "PROTO UNSYNC",
-+ "PEER BOUNDS",
-+ "BAD AUTH",
-+ "PEER CLOCK UNSYNC",
-+ "BAD STRATUM",
-+ "ROOT BOUNDS"
-+ };
-+
-+ /*
- * Leap values
- */
- struct codestring leap_codes[] = {
-***************
-*** 2836,2842 ****
- output(fp, name, buf);
- }
-
-!
-
- /*
- * cookedprint - output variables in cooked mode
---- 2851,2895 ----
- output(fp, name, buf);
- }
-
-! static char *
-! tstflags(val)
-! U_LONG val;
-! {
-! register char *cb, *s;
-! register int i;
-! register char *sep;
-!
-! sep = "";
-! i = 0;
-! s = cb = &circ_buf[nextcb][0];
-! if (++nextcb >= NUMCB)
-! nextcb = 0;
-!
-! sprintf(cb, "0x%x", val);
-! cb += strlen(cb);
-! if (val <= ((1<<8)-1)) {
-! if (!val) {
-! strcat(cb, "<OK>");
-! cb += strlen(cb);
-! } else {
-! *cb++ = '<';
-! while (val) {
-! if (val & 0x1) {
-! sprintf(cb, "%s%s", sep, tstflagnames[i]);
-! sep = ";";
-! cb += strlen(cb);
-! }
-! i++;
-! val >>= 1;
-! }
-! *cb++ = '>';
-! }
-! } else {
-! *cb++ = '?';
-! }
-! *cb = '\0';
-! return s;
-! }
-
- /*
- * cookedprint - output variables in cooked mode
-***************
-*** 2994,2999 ****
---- 3047,3059 ----
- outputarr(fp, name, narr, lfparr);
- break;
-
-+ case TST:
-+ if (!decodeuint(value, &uval))
-+ output_raw = '?';
-+ else
-+ output(fp, name, tstflags(uval));
-+ break;
-+
- default:
- (void) fprintf(stderr,
- "Internal error in cookedprint, %s=%s, fmt %d\n",
-diff -c parse/parse.c:1.1.1.10 parse/parse.c:3.23
-*** parse/parse.c:1.1.1.10 Fri Mar 25 14:33:02 1994
---- parse/parse.c Fri Mar 25 14:33:02 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.22 1994/02/25 12:34:49 kardel Exp
- *
-! * parse.c,v 3.22 1994/02/25 12:34:49 kardel Exp
- *
- * Parser module for reference clock
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/parse/parse.c,v 3.23 1994/03/25 13:09:02 kardel Exp
- *
-! * parse.c,v 3.23 1994/03/25 13:09:02 kardel Exp
- *
- * Parser module for reference clock
- *
-***************
-*** 178,183 ****
---- 178,187 ----
- {
- fmt = clockformats[i];
-
-+ if (!(parseio->parse_flags & PARSE_FIXED_FMT) &&
-+ (fmt->flags & CVT_FIXEDONLY))
-+ continue;
-+
- if (fmt->flags & F_START)
- {
- index = fmt->startsym / 8;
-***************
-*** 1158,1163 ****
---- 1162,1170 ----
- * History:
- *
- * parse.c,v
-+ * Revision 3.23 1994/03/25 13:09:02 kardel
-+ * considering FIXEDONLY entries only in FIXEDONLY mode
-+ *
- * Revision 3.22 1994/02/25 12:34:49 kardel
- * allow for converter generated utc times
- *
-diff -c xntpd/refclock_parse.c:1.1.1.13 xntpd/refclock_parse.c:3.53
-*** xntpd/refclock_parse.c:1.1.1.13 Fri Mar 25 14:35:07 1994
---- xntpd/refclock_parse.c Fri Mar 25 14:35:08 1994
-***************
-*** 1,8 ****
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp
- *
-! * refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp
- *
- * generic reference clock driver for receivers
- *
---- 1,8 ----
- #if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
- /*
-! * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.53 1994/03/25 13:07:39 kardel Exp
- *
-! * refclock_parse.c,v 3.53 1994/03/25 13:07:39 kardel Exp
- *
- * generic reference clock driver for receivers
- *
-***************
-*** 129,135 ****
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp";
- #endif
-
- /**===========================================================================
---- 129,135 ----
- #include "parse.h"
-
- #if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-! static char rcsid[]="refclock_parse.c,v 3.53 1994/03/25 13:07:39 kardel Exp";
- #endif
-
- /**===========================================================================
-***************
-*** 2824,2830 ****
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
-! sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.51 1994/03/03 09:49:54 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
---- 2824,2830 ----
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
-! sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.53 1994/03/25 13:07:39 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
-***************
-*** 3103,3109 ****
- L_ADD(&off, &offset);
- rectime = off; /* this makes org time and xmt time somewhat artificial */
-
-! if (parse->flags & PARSE_STAT_FILTER)
- {
- struct timeval usecerror;
- /*
---- 3103,3113 ----
- L_ADD(&off, &offset);
- rectime = off; /* this makes org time and xmt time somewhat artificial */
-
-! L_SUB(&off, &parsetime->parse_stime.fp);
-!
-! if ((parse->flags & PARSE_STAT_FILTER) &&
-! (off.l_i > -60) &&
-! (off.l_i < 60)) /* take usec error only if within +- 60 secs */
- {
- struct timeval usecerror;
- /*
-***************
-*** 3115,3124 ****
- sTVTOTS(&usecerror, &off);
- L_ADD(&off, &offset);
- }
-- else
-- {
-- L_SUB(&off, &parsetime->parse_stime.fp);
-- }
- }
-
- if (PARSE_PPS(parsetime->parse_state) && CL_PPS(parse->unit))
---- 3119,3124 ----
-***************
-*** 3409,3414 ****
---- 3409,3420 ----
- * History:
- *
- * refclock_parse.c,v
-+ * Revision 3.53 1994/03/25 13:07:39 kardel
-+ * fixed offset calculation for large (>4 Min) offsets
-+ *
-+ * Revision 3.52 1994/03/03 09:58:00 kardel
-+ * stick -kv in cvs is no fun
-+ *
- * Revision 3.49 1994/02/20 13:26:00 kardel
- * rcs id cleanup
- *
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.35 b/usr.sbin/xntpd/patches/patch.35
deleted file mode 100644
index e6b1ea4436d7..000000000000
--- a/usr.sbin/xntpd/patches/patch.35
+++ /dev/null
@@ -1,914 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa25410; 3 Apr 94 18:04 EDT
-Received: from adrastea.lcs.mit.edu by louie.udel.edu id aa09227;
- 3 Apr 94 17:56 EDT
-Received: by adrastea.lcs.mit.edu; id AA26407; Sun, 3 Apr 1994 17:56:48 -0400
-Date: Sun, 3 Apr 1994 17:56:48 -0400
-From: Garrett Wollman <wollman@adrastea.lcs.mit.edu>
-Message-Id: <9404032156.AA26407@adrastea.lcs.mit.edu>
-To: Dave Mills <Mills@udel.edu>
-Subject: xntpd 3.3p changes for FreeBSD
-
-This still doesn't solve the 18-second discrepancy. However, the
-patch file below shows the current differences between xntp3.3p and
-the FreeBSD version of same, deleted files not included. I have also
-included the Makefiles that we use to provide some idea of our build
-structure. (Thankfully, xntp---unlike some other popular pieces of
-software---has a sane directory structure to begin with, so it isn't
-nearly as difficult to handle this sort of thing than it is with, say,
-GCC.)
-
-diff -c /dev/null 386BSD/src/contrib/xntpd/Makefile.inc:1.3
-*** /dev/null Sun Apr 3 13:42:15 1994
---- 386BSD/src/contrib/xntpd/Makefile.inc Sun Apr 3 13:42:15 1994
-***************
-*** 0 ****
---- 1,7 ----
-+ DEFS_LOCAL=-DREFCLOCK -DPARSE
-+ NTPDEFS= -DSYS_FREEBSD -DSYS_386BSD -DHAVE_TERMIOS
-+ AUTHDEFS= -DMD5
-+ CLOCKDEFS= -DLOCAL_CLOCK -DPST -DWWVB -DAS2201 -DGOES -DGPSTM -DOMEGA \
-+ -DLEITCH -DTRAK
-+ CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${AUTHDEFS} ${CLOCKDEFS} ${COPTS}
-+ BINDIR?= /usr/sbin
-diff -c /dev/null 386BSD/src/contrib/xntpd/README.FreeBSD:1.5
-*** /dev/null Sun Apr 3 13:42:15 1994
---- 386BSD/src/contrib/xntpd/README.FreeBSD Sun Apr 3 13:42:15 1994
-***************
-*** 0 ****
---- 1,78 ----
-+ This version of NTP was converted to the BSD-style Makefile system by
-+ Garrett Wollman (wollman@freefall.cdrom.com); it is based on version
-+ 3.3p (late beta) from the University of Delaware.
-+
-+ Besides the Makefile changes, the DES code has been completely removed
-+ in order to make this code exportable. If you have a legal copy of
-+ `authdes.c', you can just add it to the lib/ directory and add `-DDES'
-+ to the AUTHDEFS in Makefile.inc.
-+
-+ You can change CLOCKDEFS in the same file to add other reference clocks.
-+
-+ ----------------------------------------------------
-+ Support for Conrad electronic's "DCF-77 Uhr, Mobil".
-+ ----------------------------------------------------
-+ Conrad electronic in Germany,, Phone (+49) 962230111 (?), sells a gadget
-+ called "DCF77 Uhr, mobil", which is a DCF77 timecode receiver with a
-+ rs-232 interface. The price is around DM130.
-+ 9-pin interface is Order# 97 94 57 66
-+ 25-pin interface is Order# 97 94 81 66
-+
-+ You must define
-+ -DDCF77 -DPPS -DFREEBSD_CONRAD -DDEBUG
-+ when you compile xntpd. You can later remove -DDEBUG, if you feel like it.
-+
-+ You must also have
-+ options COM_BIDIR
-+ defined in your kernel, and finally the ttyport you intend to use must
-+ have special interrupt vector:
-+ device sio1 at isa? port "IO_COM2" tty irq 3 vector siointrts
-+ ^^^^^^^^^^^^
-+ connect the radio-clock to the tty port and link it to /dev/refclock-0:
-+
-+ cd /dev
-+ sh MAKEDEV cua1
-+ ln -s /dev/cua01 /dev/refclock-0
-+
-+ make a directory to gather statistics in:
-+ mkdir /var/tmp/ntp
-+
-+ Create a /etc/ntp.conf along these lines:
-+
-+ # DCF77 without PPS
-+ server 127.127.8.20
-+ # DCF77 with PPS
-+ #server 127.127.8.148 prefer
-+
-+ driftfile /var/tmp/ntp/ntp.drift
-+ statsdir /var/tmp/ntp
-+ statistics loopstats
-+ statistics peerstats
-+ statistics clockstats
-+ filegen peerstats file peerstats type day enable
-+ filegen loopstats file loopstats type day enable
-+ filegen clockstats file clockstats type day enable
-+
-+ Try to start it:
-+ comcontrol ttyd1 bidir
-+ tickadj -A
-+ xntpd -d -d -d
-+
-+ You should see the red LED flash on the receiver every second now. You
-+ may have to experiment a bit with the location, and possibly adjust the
-+ minute variable resistor inside to get a good signal. Be aware, that just
-+ because you see the light flash, is not the same as the signal being
-+ received by the computer. The chip doing the work in the reciver uses
-+ less than 1 micro-ampere, so even if RTS isn't pulled low, it will happily
-+ receive, but be unable to buffer the signal to the rs-232 levels needed.
-+
-+ You can see what's going on in /var/log/messages, and query the
-+ daemon using xntpdc and ntpq, in particular the "clockvar" command
-+ of ntpq will tell about the clocks healt.
-+
-+ I live in Slagelse, Denmark, which is ~1000 Km from Mainflingen, yet
-+ I have +/- 2 ms precision from this cheap gadget. If you have a very
-+ stable signal, you can use the 'pps' address instead to improve your
-+ timing.
-+
-+ Have fun... Poul-Henning Kamp <phk@login.dkuug.dk>
-diff -c /dev/null 386BSD/src/contrib/xntpd/authstuff/Makefile:1.2
-*** /dev/null Sun Apr 3 13:42:19 1994
---- 386BSD/src/contrib/xntpd/authstuff/Makefile Sun Apr 3 13:42:20 1994
-***************
-*** 0 ****
---- 1,27 ----
-+ #
-+ # $Id: Makefile,v 1.2 1993/12/22 11:32:10 rgrimes Exp $
-+ #
-+ # Most of the programs in this directory are completely useless for the
-+ # NTP configuration that we provide by default.
-+ # We provide the `md5' program as a public service.
-+
-+ CFLAGS+= -I${.CURDIR}/../include
-+
-+ .if exists(${.CURDIR}/../lib/obj)
-+ LDADD+= -L${.CURDIR}/../lib/obj
-+ DPADD+= ${.CURDIR}/../lib/obj/libntp.a
-+ .else
-+ LDADD+= -L${.CURDIR}/../lib
-+ DPADD+= ${.CURDIR}/../lib/libntp.a
-+ .endif
-+
-+ LDADD+= -lntp
-+
-+ PROG= md5
-+
-+ SRCS= md5driver.c
-+ NOMAN=
-+
-+ install:
-+
-+ .include <bsd.prog.mk>
-diff -c 386BSD/src/contrib/xntpd/authstuff/md5driver.c:1.1.1.2 386BSD/src/contrib/xntpd/authstuff/md5driver.c:1.2
-*** 386BSD/src/contrib/xntpd/authstuff/md5driver.c:1.1.1.2 Sun Apr 3 13:42:20 1994
---- 386BSD/src/contrib/xntpd/authstuff/md5driver.c Sun Apr 3 13:42:20 1994
-***************
-*** 30,36 ****
---- 30,38 ----
- #endif /* SYS_BSDI */
- #include "md5.h"
-
-+ #ifndef MD5
- #define MD5
-+ #endif
- #include "ntp_string.h"
- #include "ntp_stdlib.h"
-
-diff -c /dev/null 386BSD/src/contrib/xntpd/clockstuff/Makefile:1.1
-*** /dev/null Sun Apr 3 13:42:21 1994
---- 386BSD/src/contrib/xntpd/clockstuff/Makefile Sun Apr 3 13:42:21 1994
-***************
-*** 0 ****
---- 1,16 ----
-+ #
-+ # $Id: Makefile,v 1.1 1993/12/21 21:06:24 wollman Exp $
-+ #
-+
-+ PROG= propdelay
-+ LIBADD= -L${.CURDIR}/../lib -lntp -lm
-+ DPADD= ${.CURDIR}/../lib/libntp.a
-+
-+ SRCS= propdelay.c
-+ NOMAN=
-+
-+ install:
-+
-+ CLEANFILES+= chutest clktest chutest.o clktest.o
-+
-+ .include <bsd.prog.mk>
-diff -c /dev/null 386BSD/src/contrib/xntpd/lib/Makefile:1.5
-*** /dev/null Sun Apr 3 13:43:01 1994
---- 386BSD/src/contrib/xntpd/lib/Makefile Sun Apr 3 13:43:01 1994
-***************
-*** 0 ****
---- 1,30 ----
-+ #
-+ # $Id: Makefile,v 1.5 1994/04/03 20:37:05 wollman Exp $
-+ #
-+
-+ CFLAGS+= -I${.CURDIR}/../include
-+
-+ SRCS= atoint.c atolfp.c atouint.c auth12crypt.c authdecrypt.c authdes.c \
-+ authencrypt.c authkeys.c authparity.c authreadkeys.c authusekey.c \
-+ buftvtots.c caljulian.c calleapwhen.c caltontp.c calyearstart.c \
-+ clocktime.c dofptoa.c dolfptoa.c emalloc.c fptoa.c fptoms.c \
-+ gettstamp.c hextoint.c hextolfp.c humandate.c inttoa.c \
-+ lib_strbuf.c mfptoa.c mfptoms.c modetoa.c mstolfp.c \
-+ msutotsf.c netof.c numtoa.c refnumtoa.c numtohost.c octtoint.c \
-+ prettydate.c ranny.c tsftomsu.c tstotv.c tvtoa.c tvtots.c \
-+ uglydate.c uinttoa.c utvtoa.c clocktypes.c \
-+ md5.c a_md5encrypt.c a_md5decrypt.c \
-+ a_md512crypt.c decodenetnum.c systime.c msyslog.c syssignal.c \
-+ findconfig.c getopt.c
-+
-+ NOMAN=
-+ NOPROFILE=
-+ LIB= ntp
-+ CLEANFILES+=authdes.c
-+
-+ install:
-+
-+ authdes.c: authdes.c.export
-+ cp ${.CURDIR}/authdes.c.export authdes.c
-+
-+ .include <bsd.lib.mk>
-diff -c /dev/null 386BSD/src/contrib/xntpd/ntpdate/Makefile:1.3
-*** /dev/null Sun Apr 3 13:43:27 1994
---- 386BSD/src/contrib/xntpd/ntpdate/Makefile Sun Apr 3 13:43:27 1994
-***************
-*** 0 ****
---- 1,28 ----
-+ #
-+ # $Id: Makefile,v 1.3 1993/12/22 11:32:56 rgrimes Exp $
-+ #
-+
-+ CFLAGS+= -I${.CURDIR}/../include
-+
-+ .if exists(${.CURDIR}/../lib/obj)
-+ LDADD+= -L${.CURDIR}/../lib/obj
-+ DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
-+ .else
-+ LDADD+= -L${.CURDIR}/../lib
-+ DPADD+= -L${.CURDIR}/../lib/libntp.a
-+ .endif
-+
-+ LDADD+= -lntp
-+
-+ PROG= ntpdate
-+ MAN8= ${.CURDIR}/../doc/ntpdate.8
-+ CLEANFILES+= .version version.c
-+
-+ SRCS= ntpdate.c version.c
-+
-+ beforedepend: version.c
-+
-+ version.c: ${.CURDIR}/../VERSION
-+ ${.CURDIR}/../scripts/mkversion ntpdate
-+
-+ .include <bsd.prog.mk>
-diff -c /dev/null 386BSD/src/contrib/xntpd/ntpq/Makefile:1.3
-*** /dev/null Sun Apr 3 13:43:28 1994
---- 386BSD/src/contrib/xntpd/ntpq/Makefile Sun Apr 3 13:43:29 1994
-***************
-*** 0 ****
---- 1,29 ----
-+ #
-+ # $Id: Makefile,v 1.3 1993/12/22 11:33:07 rgrimes Exp $
-+ #
-+
-+ CFLAGS+= -I${.CURDIR}/../include
-+
-+ .if exists(${.CURDIR}/../lib/obj)
-+ LDADD+= -L${.CURDIR}/../lib/obj
-+ DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
-+ .else
-+ LDADD+= -L${.CURDIR}/../lib
-+ DPADD+= -L${.CURDIR}/../lib/libntp.a
-+ .endif
-+
-+ LDADD+= -lntp
-+
-+ PROG= ntpq
-+ MAN8= ${.CURDIR}/../doc/ntpq.8
-+ CLEANFILES+= .version version.c
-+ BINDIR= /usr/bin
-+
-+ SRCS= ntpq.c ntpq_ops.c version.c
-+
-+ beforedepend: version.c
-+
-+ version.c: ${.CURDIR}/../VERSION
-+ ${.CURDIR}/../scripts/mkversion ntpq
-+
-+ .include <bsd.prog.mk>
-diff -c 386BSD/src/contrib/xntpd/ntpq/ntpq.c:1.1.1.2 386BSD/src/contrib/xntpd/ntpq/ntpq.c:1.2
-*** 386BSD/src/contrib/xntpd/ntpq/ntpq.c:1.1.1.2 Sun Apr 3 13:43:30 1994
---- 386BSD/src/contrib/xntpd/ntpq/ntpq.c Sun Apr 3 13:43:30 1994
-***************
-*** 301,307 ****
- static int decodearr P((char *, int *, l_fp *));
- static char * getcode P((int, struct codestring *));
- static void help P((struct parse *, FILE *));
-! #if defined(sgi) || defined(SYS_BSDI)
- static int helpsort P((const void *, const void *));
- #else
- static int helpsort P((char **, char **));
---- 301,307 ----
- static int decodearr P((char *, int *, l_fp *));
- static char * getcode P((int, struct codestring *));
- static void help P((struct parse *, FILE *));
-! #if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
- static int helpsort P((const void *, const void *));
- #else
- static int helpsort P((char **, char **));
-***************
-*** 335,341 ****
- static void endoutput P((FILE *));
- static void outputarr P((FILE *, char *, int, l_fp *));
- static void cookedprint P((int, int, char *, int, FILE *));
-! #if defined(sgi) || defined(SYS_BSDI)
- static int assoccmp P((const void *, const void *));
- #else
- static int assoccmp P((struct association *, struct association *));
---- 335,341 ----
- static void endoutput P((FILE *));
- static void outputarr P((FILE *, char *, int, l_fp *));
- static void cookedprint P((int, int, char *, int, FILE *));
-! #if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
- static int assoccmp P((const void *, const void *));
- #else
- static int assoccmp P((struct association *, struct association *));
-***************
-*** 1888,1894 ****
- for (xcp = opcmds; xcp->keyword != 0; xcp++)
- cmdsort[n++] = xcp->keyword;
-
-! #if defined(sgi) || defined(SYS_BSDI)
- qsort((void *)cmdsort, n, sizeof(char *), helpsort);
- #else
- qsort((char *)cmdsort, n, sizeof(char *), helpsort);
---- 1888,1894 ----
- for (xcp = opcmds; xcp->keyword != 0; xcp++)
- cmdsort[n++] = xcp->keyword;
-
-! #if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
- qsort((void *)cmdsort, n, sizeof(char *), helpsort);
- #else
- qsort((char *)cmdsort, n, sizeof(char *), helpsort);
-***************
-*** 1934,1940 ****
- * helpsort - do hostname qsort comparisons
- */
- static int
-! #if defined(sgi) || defined(SYS_BSDI)
- helpsort(t1, t2)
- const void *t1;
- const void *t2;
---- 1934,1940 ----
- * helpsort - do hostname qsort comparisons
- */
- static int
-! #if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
- helpsort(t1, t2)
- const void *t1;
- const void *t2;
-***************
-*** 3028,3034 ****
- sortassoc()
- {
- if (numassoc > 1)
-! #if defined(sgi) || defined(SYS_BSDI)
- qsort((void *)assoc_cache, numassoc,
- sizeof(struct association), assoccmp);
- #else
---- 3028,3034 ----
- sortassoc()
- {
- if (numassoc > 1)
-! #if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
- qsort((void *)assoc_cache, numassoc,
- sizeof(struct association), assoccmp);
- #else
-***************
-*** 3042,3048 ****
- * assoccmp - compare two associations
- */
- static int
-! #if defined(sgi) || defined(SYS_BSDI)
- assoccmp(t1, t2)
- const void *t1;
- const void *t2;
---- 3042,3048 ----
- * assoccmp - compare two associations
- */
- static int
-! #if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
- assoccmp(t1, t2)
- const void *t1;
- const void *t2;
-diff -c /dev/null 386BSD/src/contrib/xntpd/ntptrace/Makefile:1.2
-*** /dev/null Sun Apr 3 13:43:31 1994
---- 386BSD/src/contrib/xntpd/ntptrace/Makefile Sun Apr 3 13:43:31 1994
-***************
-*** 0 ****
---- 1,28 ----
-+ #
-+ # $Id: Makefile,v 1.2 1993/12/22 11:33:14 rgrimes Exp $
-+ #
-+
-+ CFLAGS+= -I${.CURDIR}/../include
-+
-+ .if exists(${.CURDIR}/../lib/obj)
-+ LDADD+= -L${.CURDIR}/../lib/obj
-+ DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
-+ .else
-+ LDADD+= -L${.CURDIR}/../lib
-+ DPADD+= -L${.CURDIR}/../lib/libntp.a
-+ .endif
-+
-+ LDADD+= -lntp
-+
-+ PROG= ntptrace
-+ MAN8= ${.CURDIR}/../doc/ntptrace.8
-+ CLEANFILES+= .version version.c
-+
-+ SRCS= ntptrace.c version.c
-+
-+ beforedepend: version.c
-+
-+ version.c: ${.CURDIR}/../VERSION
-+ ${.CURDIR}/../scripts/mkversion ntptrace
-+
-+ .include <bsd.prog.mk>
-diff -c /dev/null 386BSD/src/contrib/xntpd/parse/Makefile:1.1
-*** /dev/null Sun Apr 3 13:43:32 1994
---- 386BSD/src/contrib/xntpd/parse/Makefile Sun Apr 3 13:43:32 1994
-***************
-*** 0 ****
---- 1,19 ----
-+ #
-+ # $Id: Makefile,v 1.1 1993/12/21 20:04:14 wollman Exp $
-+ #
-+
-+ PARSEFLAGS= -DCLOCK_SCHMID -DCLOCK_DCF7000 -DCLOCK_MEINBERG \
-+ -DCLOCK_RAWDCF -DCLOCK_TRIMSV6
-+
-+ CFLAGS+= -I${.CURDIR}/../include ${PARSEFLAGS}
-+
-+ SRCS= parse.c parse_conf.c clk_meinberg.c clk_schmid.c clk_rawdcf.c \
-+ clk_dcf7000.c clk_trimble.c
-+
-+ NOMAN=
-+ NOPROFILE=
-+ LIB= parse
-+
-+ install:
-+
-+ .include <bsd.lib.mk>
-diff -c 386BSD/src/contrib/xntpd/scripts/mkversion:1.1.1.1 386BSD/src/contrib/xntpd/scripts/mkversion:1.2
-*** 386BSD/src/contrib/xntpd/scripts/mkversion:1.1.1.1 Sun Apr 3 13:43:49 1994
---- 386BSD/src/contrib/xntpd/scripts/mkversion Sun Apr 3 13:43:49 1994
-***************
-*** 9,20 ****
- echo $RUN > .version
-
- DATE="`date`"
-
- if [ -r VERSION ]; then
- VERSION=VERSION
- else
- VERSION=../VERSION
-! fi
-
- if [ -f "$VERSION" ]; then
- FLAGS="`egrep '^[0-9a-zA-Z_]+=' "$VERSION" | tr '\012' ';'` "
---- 9,23 ----
- echo $RUN > .version
-
- DATE="`date`"
-+ TOPDIR=`echo $0 | sed -e 's;mkversion;..;'`
-
- if [ -r VERSION ]; then
- VERSION=VERSION
-+ else if [ -r ${TOPDIR}/VERSION ]; then
-+ VERSION=${TOPDIR}/VERSION
- else
- VERSION=../VERSION
-! fi; fi
-
- if [ -f "$VERSION" ]; then
- FLAGS="`egrep '^[0-9a-zA-Z_]+=' "$VERSION" | tr '\012' ';'` "
-diff -c /dev/null 386BSD/src/contrib/xntpd/util/Makefile:1.2
-*** /dev/null Sun Apr 3 13:43:53 1994
---- 386BSD/src/contrib/xntpd/util/Makefile Sun Apr 3 13:43:54 1994
-***************
-*** 0 ****
---- 1,28 ----
-+ #
-+ # $Id: Makefile,v 1.2 1993/12/22 11:33:28 rgrimes Exp $
-+ #
-+
-+ CFLAGS+= -I${.CURDIR}/../include
-+
-+ .if exists(${.CURDIR}/../lib/obj)
-+ LDADD+= -L${.CURDIR}/../lib/obj
-+ DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
-+ .else
-+ LDADD+= -L${.CURDIR}/../lib
-+ DPADD+= -L${.CURDIR}/../lib/libntp.a
-+ .endif
-+
-+ LDADD+= -lntp
-+
-+ PROG= tickadj
-+ MAN8= ${.CURDIR}/../doc/tickadj.8
-+ CLEANFILES+= .version version.c
-+
-+ SRCS= tickadj.c version.c
-+
-+ beforedepend: version.c
-+
-+ version.c: ${.CURDIR}/../VERSION
-+ ${.CURDIR}/../scripts/mkversion tickadj
-+
-+ .include <bsd.prog.mk>
-diff -c /dev/null 386BSD/src/contrib/xntpd/xntpd/Makefile:1.5
-*** /dev/null Sun Apr 3 13:43:56 1994
---- 386BSD/src/contrib/xntpd/xntpd/Makefile Sun Apr 3 13:43:56 1994
-***************
-*** 0 ****
---- 1,45 ----
-+ #
-+ # $Id: Makefile,v 1.5 1994/04/03 20:37:26 wollman Exp $
-+ #
-+
-+ CFLAGS+= -I${.CURDIR}/../include
-+
-+ .if exists(${.CURDIR}/../lib/obj)
-+ LDADD+= -L${.CURDIR}/../lib/obj
-+ DPADD+= ${.CURDIR}/../lib/obj/libntp.a
-+ .else
-+ LDADD+= -L${.CURDIR}/../lib
-+ DPADD+= ${.CURDIR}/../lib/libntp.a
-+ .endif
-+
-+ .if exists(${.CURDIR}/../parse/obj)
-+ LDADD+= -L${.CURDIR}/../parse/obj
-+ DPADD+= ${.CURDIR}/../parse/obj/libparse.a
-+ .else
-+ LDADD+= -L${.CURDIR}/../parse
-+ DPADD+= ${.CURDIR}/../parse/libparse.a
-+ .endif
-+
-+ LDADD+= -lntp -lparse
-+
-+ PROG= xntpd
-+ MAN8= ${.CURDIR}/../doc/xntpd.8
-+ CLEANFILES+= .version version.c
-+
-+ SRCS= ntp_config.c ntp_control.c ntp_io.c ntp_leap.c \
-+ ntp_loopfilter.c ntp_monitor.c ntp_peer.c ntp_proto.c \
-+ ntp_refclock.c ntp_request.c ntp_restrict.c ntp_timer.c \
-+ ntp_unixclock.c ntp_util.c ntpd.c refclock_chu.c \
-+ refclock_conf.c refclock_local.c refclock_pst.c \
-+ refclock_wwvb.c refclock_goes.c refclock_mx4200.c \
-+ refclock_parse.c refclock_as2201.c refclock_omega.c \
-+ refclock_tpro.c refclock_leitch.c refclock_irig.c \
-+ refclock_msfees.c refclock_gpstm.c refclock_trak.c ntp_intres.c \
-+ ntp_filegen.c version.c
-+
-+ beforedepend: version.c
-+
-+ version.c: ${.CURDIR}/../VERSION
-+ ${.CURDIR}/../scripts/mkversion xntpd
-+
-+ .include <bsd.prog.mk>
-diff -c 386BSD/src/contrib/xntpd/xntpd/ntp_control.c:1.1.1.3 386BSD/src/contrib/xntpd/xntpd/ntp_control.c:1.3
-*** 386BSD/src/contrib/xntpd/xntpd/ntp_control.c:1.1.1.3 Sun Apr 3 13:43:59 1994
---- 386BSD/src/contrib/xntpd/xntpd/ntp_control.c Sun Apr 3 13:44:00 1994
-***************
-*** 264,278 ****
- /*
- * System and processor definitions. These will change for the gizmo board.
- */
-! #ifndef STR_SYSTEM
-! #define STR_SYSTEM "UNIX"
-! #endif
-! #ifndef STR_PROCESSOR
-! #define STR_PROCESSOR "unknown"
-! #endif
-!
-! static char str_system[] = STR_SYSTEM;
-! static char str_processor[] = STR_PROCESSOR;
-
- /*
- * Trap structures. We only allow a few of these, and send
---- 264,271 ----
- /*
- * System and processor definitions. These will change for the gizmo board.
- */
-! #include <sys/utsname.h>
-! static struct utsname utsname;
-
- /*
- * Trap structures. We only allow a few of these, and send
-***************
-*** 433,438 ****
---- 426,433 ----
- {
- int i;
-
-+ uname(&utsname);
-+
- ctl_clr_stats();
-
- ctl_auth_keyid = 0;
-***************
-*** 1267,1278 ****
- ctl_putuint(sys_var[CS_LEAPWARNING].text, (U_LONG)leap_warning);
- break;
- case CS_PROCESSOR:
-! ctl_putstr(sys_var[CS_PROCESSOR].text, str_processor,
-! sizeof(str_processor) - 1);
- break;
- case CS_SYSTEM:
-! ctl_putstr(sys_var[CS_SYSTEM].text, str_system,
-! sizeof(str_system) - 1);
- break;
- case CS_KEYID:
- ctl_putuint(sys_var[CS_KEYID].text, (U_LONG)0);
---- 1262,1273 ----
- ctl_putuint(sys_var[CS_LEAPWARNING].text, (U_LONG)leap_warning);
- break;
- case CS_PROCESSOR:
-! ctl_putstr(sys_var[CS_PROCESSOR].text, utsname.machine,
-! strlen(utsname.machine));
- break;
- case CS_SYSTEM:
-! ctl_putstr(sys_var[CS_SYSTEM].text, utsname.sysname,
-! strlen(utsname.sysname));
- break;
- case CS_KEYID:
- ctl_putuint(sys_var[CS_KEYID].text, (U_LONG)0);
-diff -c 386BSD/src/contrib/xntpd/xntpd/refclock_parse.c:1.1.1.3 386BSD/src/contrib/xntpd/xntpd/refclock_parse.c:1.3
-*** 386BSD/src/contrib/xntpd/xntpd/refclock_parse.c:1.1.1.3 Sun Apr 3 13:44:01 1994
---- 386BSD/src/contrib/xntpd/xntpd/refclock_parse.c Sun Apr 3 13:44:01 1994
-***************
-*** 30,35 ****
---- 30,37 ----
- * PPS - supply loopfilter with PPS samples (if configured)
- * PPSPPS - notify loopfilter of PPS file descriptor
- *
-+ * FREEBSD_CONRAD - Make very cheap "Conrad DCF77 RS-232" gadget work
-+ * with FreeBSD.
- * TTY defines:
- * HAVE_BSD_TTYS - currently unsupported
- * HAVE_SYSV_TTYS - will use termio.h
-***************
-*** 82,87 ****
---- 84,92 ----
- #include <time.h>
-
- #include <sys/errno.h>
-+ #ifdef FREEBSD_CONRAD
-+ #include <sys/ioctl.h>
-+ #endif
- extern int errno;
-
- #if !defined(STREAM) && !defined(HAVE_SYSV_TTYS) && !defined(HAVE_BSD_TTYS) && !defined(HAVE_TERMIOS)
-***************
-*** 440,446 ****
---- 445,456 ----
- #define RAWDCF_ROOTDELAY 0x00000364 /* 13 ms */
- #define RAWDCF_FORMAT "RAW DCF77 Timecode"
- #define RAWDCF_MAXUNSYNC (0) /* sorry - its a true receiver - no signal - no time */
-+
-+ #ifdef FREEBSD_CONRAD
-+ #define RAWDCF_CFLAG (CS8|CREAD|CLOCAL)
-+ #else
- #define RAWDCF_CFLAG (B50|CS8|CREAD|CLOCAL)
-+ #endif
- #define RAWDCF_IFLAG 0
- #define RAWDCF_OFLAG 0
- #define RAWDCF_LFLAG 0
-***************
-*** 1482,1492 ****
---- 1492,1513 ----
- struct parseunit *parse = (struct parseunit *)rbufp->recv_srcclock;
- register int count;
- register char *s;
-+ #ifdef FREEBSD_CONRAD
-+ struct timeval foo;
-+ #endif
-+
- /*
- * eat all characters, parsing then and feeding complete samples
- */
- count = rbufp->recv_length;
- s = rbufp->recv_buffer;
-+ #ifdef FREEBSD_CONRAD
-+ ioctl(parse->fd,TIOCTIMESTAMP,&foo);
-+ TVTOTS(&foo, &rbufp->recv_time);
-+ rbufp->recv_time.l_uf += TS_ROUNDBIT;
-+ rbufp->recv_time.l_ui += JAN_1970;
-+ rbufp->recv_time.l_uf &= TS_MASK;
-+ #endif
-
- while (count--)
- {
-***************
-*** 2271,2277 ****
- tm.c_iflag = clockinfo[type].cl_iflag;
- tm.c_oflag = clockinfo[type].cl_oflag;
- tm.c_lflag = clockinfo[type].cl_lflag;
-!
- if (TTY_SETATTR(fd232, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcsetattr(%d, &tm): %m", unit, fd232);
---- 2292,2301 ----
- tm.c_iflag = clockinfo[type].cl_iflag;
- tm.c_oflag = clockinfo[type].cl_oflag;
- tm.c_lflag = clockinfo[type].cl_lflag;
-! #ifdef FREEBSD_CONRAD
-! tm.c_ispeed = 50;
-! tm.c_ospeed = 50;
-! #endif
- if (TTY_SETATTR(fd232, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcsetattr(%d, &tm): %m", unit, fd232);
-***************
-*** 2314,2319 ****
---- 2338,2358 ----
- return 0; /* well, ok - special initialisation broke */
- }
-
-+ #ifdef FREEBSD_CONRAD
-+ {
-+ int i,j;
-+ struct timeval tv;
-+ ioctl(parse->fd,TIOCTIMESTAMP,&tv);
-+ j = TIOCM_RTS;
-+ i = ioctl(fd232, TIOCMBIC, &j);
-+ if (i < 0) {
-+ syslog(LOG_ERR,
-+ "PARSE receiver #%d: lowrts_poll: failed to lower RTS: %m",
-+ CL_UNIT(parse->unit));
-+ }
-+ }
-+ #endif
-+
- strcpy(tmp_ctl.parseformat.parse_buffer, parse->parse_type->cl_format);
- tmp_ctl.parseformat.parse_count = strlen(tmp_ctl.parseformat.parse_buffer);
-
-diff -c 386BSD/src/contrib/xntpd/xntpd/refclock_trak.c:1.1.1.1 386BSD/src/contrib/xntpd/xntpd/refclock_trak.c:1.2
-*** 386BSD/src/contrib/xntpd/xntpd/refclock_trak.c:1.1.1.1 Sun Apr 3 13:44:02 1994
---- 386BSD/src/contrib/xntpd/xntpd/refclock_trak.c Sun Apr 3 13:44:02 1994
-***************
-*** 14,19 ****
---- 14,21 ----
- #include "ntp_refclock.h"
- #include "ntp_unixtime.h"
-
-+ static void gps_send();
-+
- #if defined(HAVE_BSD_TTYS)
- #include <sgtty.h>
- #endif /* HAVE_BSD_TTYS */
-***************
-*** 841,847 ****
- /*
- * usually trak_receive can get a timestamp every second
- */
-! #ifndef TRAKPPS && TRAKCLK
- gettstamp(&gps->lastrec);
- #endif
- gps->polls++;
---- 843,849 ----
- /*
- * usually trak_receive can get a timestamp every second
- */
-! #if !defined(TRAKPPS) && !defined(TRAKCLK)
- gettstamp(&gps->lastrec);
- #endif
- gps->polls++;
-diff -c /dev/null 386BSD/src/contrib/xntpd/xntpdc/Makefile:1.2
-*** /dev/null Sun Apr 3 13:44:03 1994
---- 386BSD/src/contrib/xntpd/xntpdc/Makefile Sun Apr 3 13:44:03 1994
-***************
-*** 0 ****
---- 1,28 ----
-+ #
-+ # $Id: Makefile,v 1.2 1993/12/22 11:34:00 rgrimes Exp $
-+ #
-+
-+ CFLAGS+= -I${.CURDIR}/../include
-+
-+ .if exists(${.CURDIR}/../lib/obj)
-+ LDADD+= -L${.CURDIR}/../lib/obj
-+ DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
-+ .else
-+ LDADD+= -L${.CURDIR}/../lib
-+ DPADD+= -L${.CURDIR}/../lib/libntp.a
-+ .endif
-+
-+ LDADD+= -lntp
-+
-+ PROG= xntpdc
-+ MAN8= ${.CURDIR}/../doc/xntpdc.8
-+ CLEANFILES+= .version version.c
-+
-+ SRCS= ntpdc.c ntpdc_ops.c version.c
-+
-+ beforedepend: version.c
-+
-+ version.c: ${.CURDIR}/../VERSION
-+ ${.CURDIR}/../scripts/mkversion xntpdc
-+
-+ .include <bsd.prog.mk>
-diff -c 386BSD/src/contrib/xntpd/xntpdc/ntpdc.c:1.1.1.3 386BSD/src/contrib/xntpd/xntpdc/ntpdc.c:1.2
-*** 386BSD/src/contrib/xntpd/xntpdc/ntpdc.c:1.1.1.3 Sun Apr 3 13:44:04 1994
---- 386BSD/src/contrib/xntpd/xntpdc/ntpdc.c Sun Apr 3 13:44:04 1994
-***************
-*** 53,59 ****
- static int getarg P((char *, int, arg_v *));
- static int getnetnum P((char *, U_LONG *, char *));
- static void help P((struct parse *, FILE *));
-! #if defined(sgi) || defined(SYS_BSDI)
- static int helpsort P((const void *, const void *));
- #else
- static int helpsort P((char **, char **));
---- 53,59 ----
- static int getarg P((char *, int, arg_v *));
- static int getnetnum P((char *, U_LONG *, char *));
- static void help P((struct parse *, FILE *));
-! #if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
- static int helpsort P((const void *, const void *));
- #else
- static int helpsort P((char **, char **));
-***************
-*** 1153,1159 ****
- for (xcp = opcmds; xcp->keyword != 0; xcp++)
- cmdsort[n++] = xcp->keyword;
-
-! #if defined(sgi) || defined(SYS_BSDI)
- qsort((void *)cmdsort, n, sizeof(char *), helpsort);
- #else
- qsort((char *)cmdsort, n, sizeof(char *), helpsort);
---- 1153,1159 ----
- for (xcp = opcmds; xcp->keyword != 0; xcp++)
- cmdsort[n++] = xcp->keyword;
-
-! #if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
- qsort((void *)cmdsort, n, sizeof(char *), helpsort);
- #else
- qsort((char *)cmdsort, n, sizeof(char *), helpsort);
-***************
-*** 1199,1205 ****
- * helpsort - do hostname qsort comparisons
- */
- static int
-! #if defined(sgi) || defined(SYS_BSDI)
- helpsort(t1, t2)
- const void *t1;
- const void *t2;
---- 1199,1205 ----
- * helpsort - do hostname qsort comparisons
- */
- static int
-! #if defined(sgi) || defined(SYS_BSDI) || defined(__STDC__)
- helpsort(t1, t2)
- const void *t1;
- const void *t2;
-diff -c /dev/null 386BSD/src/contrib/xntpd/xntpres/Makefile:1.2
-*** /dev/null Sun Apr 3 13:44:05 1994
---- 386BSD/src/contrib/xntpd/xntpres/Makefile Sun Apr 3 13:44:05 1994
-***************
-*** 0 ****
---- 1,28 ----
-+ #
-+ # $Id: Makefile,v 1.2 1993/12/22 11:34:09 rgrimes Exp $
-+ #
-+
-+ CFLAGS+= -I${.CURDIR}/../include
-+
-+ .if exists(${.CURDIR}/../lib/obj)
-+ LDADD+= -L${.CURDIR}/../lib/obj
-+ DPADD+= -L${.CURDIR}/../lib/obj/libntp.a
-+ .else
-+ LDADD+= -L${.CURDIR}/../lib
-+ DPADD+= -L${.CURDIR}/../lib/libntp.a
-+ .endif
-+
-+ LDADD+= -lntp
-+
-+ PROG= xntpres
-+ NOMAN=
-+ CLEANFILES+= .version version.c
-+
-+ SRCS= xntpres.c version.c
-+
-+ beforedepend: version.c
-+
-+ version.c: ${.CURDIR}/../VERSION
-+ ${.CURDIR}/../scripts/mkversion xntpres
-+
-+ .include <bsd.prog.mk>
-
--GAWollman
-
---
-Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ...
-wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance.
-formerly known as | It is a bond more powerful than absence. We like people
-wollman@emba.uvm.edu | who like Shashish. - Claude McKenzie + Florent Vollant
-[no save]
-
diff --git a/usr.sbin/xntpd/patches/patch.36 b/usr.sbin/xntpd/patches/patch.36
deleted file mode 100644
index b90df0d4c2eb..000000000000
--- a/usr.sbin/xntpd/patches/patch.36
+++ /dev/null
@@ -1,42 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa18708; 7 Apr 94 14:50 EDT
-Received: from mudshark.artisoft.com by louie.udel.edu id aa16541;
- 7 Apr 94 14:46 EDT
-Received: by mudshark.artisoft.com id AA11987
- (5.67b/IDA-1.5 for mills@udel.edu); Thu, 7 Apr 1994 11:46:32 -0700
-Date: Thu, 7 Apr 1994 11:46:32 -0700
-From: Matt Day <mday@artisoft.com>
-Message-Id: <199404071846.AA11987@mudshark.artisoft.com>
-To: mills@udel.edu
-Subject: XNTP bug on Linux
-
-adjtime() on Linux fails if you try to adjust more than 131072
-microseconds. This causes `ntpdate' to fail on Linux when the system
-clock is off by more than 131072 microseconds but less than
-NTPDATE_THRESHOLD (500 ms).
-
-Reducing NTPDATE_THRESHOLD to less than 131072 microseconds fixed the
-problem.
-
-From the comments in the code for Linux's adjtime(), it looks like this
-problem might go away someday.
-
-Thanks!
-
-*** ntpdate.h- Tue Aug 24 14:29:30 1993
---- ntpdate.h Thu Apr 7 11:33:53 1994
-***************
-*** 54,60 ****
---- 54,64 ----
- * are close, or step the time if the times are farther apart. The
- * following defines what is "close".
- */
-+ #ifdef linux
-+ #define NTPDATE_THRESHOLD (FP_SECOND / 8) /* 1/8 second */
-+ #else
- #define NTPDATE_THRESHOLD (FP_SECOND >> 1) /* 1/2 second */
-+ #endif
-
- /*
- * When doing adjustments, ntpdate actually overadjusts (currently
-
diff --git a/usr.sbin/xntpd/patches/patch.37 b/usr.sbin/xntpd/patches/patch.37
deleted file mode 100644
index e17267f57e97..000000000000
--- a/usr.sbin/xntpd/patches/patch.37
+++ /dev/null
@@ -1,204 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa25219; 8 Apr 94 17:07 EDT
-Received: from ni.umd.edu by louie.udel.edu id aa03359; 8 Apr 94 16:58 EDT
-Received: by ni.umd.edu id AA18341
- (5.65c/IDA-1.4.4 for ntp-list); Fri, 8 Apr 1994 16:55:09 -0400
-Received: from RUTGERS.EDU by ni.umd.edu with SMTP id AA18337
- (5.65c/IDA-1.4.4 for <ntp@ni.umd.edu>); Fri, 8 Apr 1994 16:55:02 -0400
-Received: from unipress-link.rutgers.edu by rutgers.edu (5.59/SMI4.0/RU1.5/3.08)
- id AA16356; Fri, 8 Apr 94 16:54:44 EDT
-Received: from huh.unipress.com by repo.unipress.com (4.1/SMI-4.1/UniPress022294.2)
- id AA10459; Fri, 8 Apr 94 16:54:36 EDT via
-Message-Id: <9404082054.AA10459@repo.unipress.com>
-To: ntp@ni.umd.edu
-Subject: Re: xntp for univel/unix-ware on x86
-Date: Fri, 08 Apr 94 16:54:31 -0400
-From: Ray Schnitzler <ras@unipress.com>
-
-
-I am happy (but not particularly proud - it's more than a
- little rough around the edges) to report a working
- xntpd for Univel.
-
-It wound up being a hack on solaris, svr4, and (for the lack
- of kernel tickadj) irix.
-
-util/tickadj does *not* work, even for controlling 'tick'.
- I'm not sure what the right behavior should be.
-
-Most of the changes are signalled by SYS_UNIVEL, as
- initiated by OS=univel.
-
-There are many additional loose ends, which are not terribly
- important to me to clean up, since the univel is a
- very low usage machine, here, and my because
- employer expects me to be working on other things,
- altogether.
-
-Nevertheless, it seems to work.
-
-Special thanks go to Denton Gentry for advice along the way.
-
-
-Enjoy.
-
-
-Here are the changes I made. First, the (new)
- machines/univel file, and then the (rest of the)
- context diffs:
-
-*** /dev/null Fri Apr 8 16:49:24 1994
---- machines/univel Fri Apr 8 12:38:20 1994
-***************
-*** 0 ****
---- 1,10 ----
-+ SHELL= /bin/sh
-+ RANLIB= ls # ar does the work of ranlib under System V
-+ DEFS= -DSYS_UNIVEL -DSTREAMS_TLI -DHAVE_TERMIOS
-+ AUTHDEFS= -DDES -DMD5
-+ CLOCKDEFS=
-+ DAEMONLIBS= -lnsl -lsocket -lelf
-+ RESLIB= -lnsl -lsocket -lelf
-+ INSTALL=$(TOP)scripts/install.sh
-+ SHELL= /bin/sh
-+ RANLIB= ls # ar does the work of ranlib under System V
-*** authstuff/authspeed.c.orig Thu Jan 27 09:03:12 1994
---- authstuff/authspeed.c Fri Apr 8 14:19:35 1994
-***************
-*** 2,8 ****
- * authspeed - figure out how LONG it takes to do an NTP encryption
- */
-
-! #if defined(SYS_HPUX) || defined(SYS_AUX3) || defined(SYS_AUX2) || defined(SOLARIS) || defined(SYS_SVR4) || defined(SYS_PTX)
- #define FAKE_RUSAGE
- #endif
-
---- 2,8 ----
- * authspeed - figure out how LONG it takes to do an NTP encryption
- */
-
-! #if defined(SYS_HPUX) || defined(SYS_AUX3) || defined(SYS_AUX2) || defined(SOLARIS) || defined(SYS_SVR4) || defined(SYS_PTX) || defined(SYS_UNIVEL)
- #define FAKE_RUSAGE
- #endif
-*** include/ntp_if.h.orig Mon Nov 15 16:21:29 1993
---- include/ntp_if.h Fri Apr 8 14:51:49 1994
-***************
-*** 16,21 ****
---- 16,25 ----
- #include <sys/sockio.h>
- #endif
-
-+ #if defined(SYS_UNIVEL)
-+ #include <sys/sockio.h>
-+ #endif
-+
- #if defined(SYS_PTX) || defined(SYS_SINIXM)
- #include <sys/stream.h>
- #include <sys/stropts.h>
-*** include/ntp_machine.h.orig Mon Mar 14 02:47:02 1994
---- include/ntp_machine.h Fri Apr 8 14:45:42 1994
-***************
-*** 526,531 ****
---- 526,563 ----
- #endif
-
- /*
-+ * Univel SVR4 on intel x86 processor
-+ */
-+ #if defined(SYS_UNIVEL)
-+ /* #define _POSIX_SOURCE */
-+ #define NTP_POSIX_SOURCE
-+ #define HAVE_ATT_NICE
-+ #define HAVE_READKMEM
-+ #define USE_PROTOTYPES
-+ #undef HAVE_ATT_SETPGRP
-+ #define UDP_WILDCARD_DELIVERY
-+ #define HAVE_SIGNALED_IO
-+ #define USE_TTY_SIGPOLL
-+ #define USE_UDP_SIGPOLL
-+ #define STREAM
-+ #define STREAMS
-+ #ifndef STREAMS_TLI
-+ /*#define STREAMS_TLI*/
-+ #endif
-+ /* #define USE_STREAMS_DEVICE_FOR_IF_CONFIG */
-+ #undef STEP_SLEW /* TWO step */
-+ #define LOCK_PROCESS
-+ #undef SYSV_TIMEOFDAY
-+ #define SIZE_RETURNED_IN_BUFFER
-+ #define RETSIGTYPE void
-+ #include <sys/types.h>
-+ #include <netinet/in_systm.h>
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Univel"
-+ #endif
-+ #endif
-+
-+ /*
- * DomainOS
- */
- #if defined(SYS_DOMAINOS)
-*** xntpd/ntp_unixclock.c.orig Thu Feb 3 00:20:20 1994
---- xntpd/ntp_unixclock.c Fri Apr 8 14:40:55 1994
-***************
-*** 255,260 ****
---- 255,277 ----
- /* Define the following to be what the tick and tickadj variables are
- * called in your kernel.
- */
-+ #if defined(SYS_UNIVEL)
-+ /*
-+ * clock_parms - return the local clock tickadj and tick parameters
-+ *
-+ * The values set here were determined experimentally on a 486 system
-+ * I'm not confident in them. - RAS
-+ *
-+ */
-+ static void
-+ clock_parms(tickadj, tick)
-+ U_LONG *tickadj;
-+ U_LONG *tick;
-+ {
-+ *tick = 10000; /* microseconds */
-+ *tickadj = 80; /* microseconds */
-+ }
-+ #else /* SYS_UNIVEL */
-
- #if defined(SYS_AUX3) || defined(SYS_AUX2) || defined(SYS_SVR4) || defined(SYS_PTX)
- #define K_TICKADJ_NAME "tickadj"
-***************
-*** 421,427 ****
- }
- #endif /* sgi */
-
--
- #ifdef NOKMEM
-
- #ifndef HZ
---- 438,443 ----
-***************
-*** 571,573 ****
---- 587,590 ----
- *tick = (U_LONG)txc.tick;
- }
- #endif /* SYS_LINUX */
-+ #endif /* SYS_UNIVEL */
-*** xntpd/ntpd.c.orig Wed Feb 16 22:09:35 1994
---- xntpd/ntpd.c Fri Apr 8 16:35:57 1994
-***************
-*** 14,20 ****
- #include <sys/rtprio.h>
- #endif
-
-! #if defined(SYS_SVR4)
- #include <termios.h>
- #endif
-
---- 14,20 ----
- #include <sys/rtprio.h>
- #endif
-
-! #if defined(SYS_SVR4) || defined (SYS_UNIVEL)
- #include <termios.h>
- #endif
-
diff --git a/usr.sbin/xntpd/patches/patch.38 b/usr.sbin/xntpd/patches/patch.38
deleted file mode 100644
index dddba69eb06c..000000000000
--- a/usr.sbin/xntpd/patches/patch.38
+++ /dev/null
@@ -1,226 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa09565; 11 Apr 94 13:04 EDT
-Received: from ni.umd.edu by louie.udel.edu id aa10661; 11 Apr 94 12:57 EDT
-Received: by ni.umd.edu id AA00787
- (5.65c/IDA-1.4.4 for ntp-list); Mon, 11 Apr 1994 12:50:20 -0400
-Received: from RUTGERS.EDU by ni.umd.edu with SMTP id AA00783
- (5.65c/IDA-1.4.4 for <ntp@ni.umd.edu>); Mon, 11 Apr 1994 12:50:13 -0400
-Received: from unipress-link.rutgers.edu by rutgers.edu (5.59/SMI4.0/RU1.5/3.08)
- id AA26905; Mon, 11 Apr 94 12:49:43 EDT
-Received: from huh.unipress.com by repo.unipress.com (4.1/SMI-4.1/UniPress022294.2)
- id AA03031; Mon, 11 Apr 94 12:49:27 EDT via
-Message-Id: <9404111649.AA03031@repo.unipress.com>
-To: ntp@ni.umd.edu
-Subject: Re: xntp for univel/unix-ware on x86
-Date: Mon, 11 Apr 94 12:49:25 -0400
-From: Ray Schnitzler <ras@unipress.com>
-
-
-As seems usual, every patch is followed by a re-patch. This
- is a (modified) re-posting of patches to make xntp
- work on unixware svr4. It now uses
- machines/unixware1 and SYS_UNIXWARE1 (instead of
- univel, as suggested by J J Farrell), and now
- includes some RELNOTES and COPYRIGHT text (as
- suggested by Dave)
-
-It is still rough, but it still works. The tickadj utility
- still does *not* work, even for controlling 'tick'.
- I'm not sure what the right behavior should be since
- there is no 'tickadj' kernel var.
-
-In addition to the credits I mentioned above, special thanks
- go to Denton Gentry for advice along the way.
-
-
-Enjoy.
-
-Ray Schnitzler
-UniPress Software, Inc.
-------------------------------------------------------------
-Here are the changes I made. First, the (new)
- machines/univel file, and then the (rest of the)
- context diffs:
-
-*** machines/unixware1.3.3p Fri Apr 8 16:48:35 1994
---- machines/unixware1 Mon Apr 11 11:08:10 1994
-***************
-*** 0 ****
---- 1,10 ----
-+ SHELL= /bin/sh
-+ RANLIB= ls # ar does the work of ranlib under System V
-+ DEFS= -DSYS_UNIXWARE1 -DSTREAMS_TLI -DHAVE_TERMIOS -DCONFIG_FILE=\\"/usr/local/etc/ntp.conf\\"
-+ AUTHDEFS= -DDES -DMD5
-+ CLOCKDEFS=
-+ DAEMONLIBS= -lnsl -lsocket -lelf
-+ RESLIB= -lnsl -lsocket -lelf
-+ INSTALL=$(TOP)scripts/install.sh
-+ SHELL= /bin/sh
-+ RANLIB= ls # ar does the work of ranlib under System V
-*** COPYRIGHT.3.3p Thu Feb 3 00:20:07 1994
---- COPYRIGHT Mon Apr 11 10:47:24 1994
-***************
-*** 55,58 ****
---- 55,59 ----
- * Torsten Duwe <duwe@immd4.informatik.uni-erlangen.de> (Linux Port)
- * Paul A Vixie <vixie@vix.com> (TrueTime GPS driver)
- * Jim Jagielski <jim@jagubox.gsfc.nasa.gov> (A/UX port)
-+ * Ray Schnitzler <schnitz@unipress.com> (First pass at a Unixware1 port.)
- */
-*** RELNOTES.3.3p Thu Jan 27 09:33:09 1994
---- RELNOTES Mon Apr 11 11:14:35 1994
-***************
-*** 140,145 ****
---- 140,146 ----
- PC BSD/386 1.0 gcc LOCAL_CLOCK possibly see "build problems"
- PC Linux (pl14) gcc LOCAL_CLOCK (dw 93/10/30)
- PC Dell SVR4 v2.2 gcc ? (tl 93/12/30)
-+ PC Unixware1/SVR4 cc no tickadj, ? (ras 93/04/11)
- NCR3445 NCR SVR4 cc LOCAL_CLOCK (tm 93/11/29)
-
- pb: Piete Brooks
-***************
-*** 149,154 ****
---- 150,156 ----
- tl: Tony Lill <ajlill@tlill.hookup.net>
- tm: Tom Moore <Tom.Moore@DaytonOH.NCR.COM>
- jmj: Jim Jagielski <jim@jagubox.gsfc.nasa.gov>
-+ ras: Ray Schnitzler <schnitz@unipress.com>
-
- Build Problems (and workaround):
-
-*** authstuff/authspeed.c.3.3p Thu Jan 27 09:03:12 1994
---- authstuff/authspeed.c Mon Apr 11 10:29:47 1994
-***************
-*** 2,8 ****
- * authspeed - figure out how LONG it takes to do an NTP encryption
- */
-
-! #if defined(SYS_HPUX) || defined(SYS_AUX3) || defined(SYS_AUX2) || defined(SOLARIS) || defined(SYS_SVR4) || defined(SYS_PTX)
- #define FAKE_RUSAGE
- #endif
-
---- 2,8 ----
- * authspeed - figure out how LONG it takes to do an NTP encryption
- */
-
-! #if defined(SYS_HPUX) || defined(SYS_AUX3) || defined(SYS_AUX2) || defined(SOLARIS) || defined(SYS_SVR4) || defined(SYS_PTX) || defined(SYS_UNIXWARE1)
- #define FAKE_RUSAGE
- #endif
-
-*** include/ntp_if.h.3.3p Mon Nov 15 16:21:29 1993
---- include/ntp_if.h Mon Apr 11 10:30:21 1994
-***************
-*** 16,21 ****
---- 16,25 ----
- #include <sys/sockio.h>
- #endif
-
-+ #if defined(SYS_UNIXWARE1)
-+ #include <sys/sockio.h>
-+ #endif
-+
- #if defined(SYS_PTX) || defined(SYS_SINIXM)
- #include <sys/stream.h>
- #include <sys/stropts.h>
-*** include/ntp_machine.h.3.3p Mon Mar 14 02:47:02 1994
---- include/ntp_machine.h Mon Apr 11 10:31:11 1994
-***************
-*** 526,531 ****
---- 526,565 ----
- #endif
-
- /*
-+ * (Univel/Novell) Unixware1 SVR4 on intel x86 processor
-+ */
-+ #if defined(SYS_UNIXWARE1)
-+ /* #define _POSIX_SOURCE */
-+ #undef HAVE_ATT_SETPGRP
-+ #define USE_PROTOTYPES
-+ #define NTP_POSIX_SOURCE
-+ #define HAVE_ATT_NICE
-+ #define HAVE_READKMEM
-+ #define USE_TTY_SIGPOLL
-+ #define USE_UDP_SIGPOLL
-+ #define UDP_WILDCARD_DELIVERY
-+ #undef HAVE_SIGNALED_IO
-+ #define STREAM
-+ #define STREAMS
-+ #ifndef STREAMS_TLI
-+ /*#define STREAMS_TLI*/
-+ #endif
-+ /* #define USE_STREAMS_DEVICE_FOR_IF_CONFIG */
-+ #undef STEP_SLEW /* TWO step */
-+ #define LOCK_PROCESS
-+ #define NO_SIGNED_CHAR_DECL
-+ #undef SYSV_TIMEOFDAY
-+ #define SIZE_RETURNED_IN_BUFFER
-+ #define RETSIGTYPE void
-+ #include <sys/sockio.h>
-+ #include <sys/types.h>
-+ #include <netinet/in_systm.h>
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX/Unixware1"
-+ #endif
-+ #endif
-+
-+ /*
- * DomainOS
- */
- #if defined(SYS_DOMAINOS)
-*** xntpd/ntp_unixclock.c.3.3p Thu Feb 3 00:20:20 1994
---- xntpd/ntp_unixclock.c Mon Apr 11 10:33:23 1994
-***************
-*** 255,260 ****
---- 255,277 ----
- /* Define the following to be what the tick and tickadj variables are
- * called in your kernel.
- */
-+ #if defined(SYS_UNIXWARE1)
-+ /*
-+ * clock_parms - return the local clock tickadj and tick parameters
-+ *
-+ * The values set here were determined experimentally on a 486 system
-+ * I'm not confident in them. - RAS
-+ *
-+ */
-+ static void
-+ clock_parms(tickadj, tick)
-+ U_LONG *tickadj;
-+ U_LONG *tick;
-+ {
-+ *tick = 10000; /* microseconds */
-+ *tickadj = 80; /* microseconds */
-+ }
-+ #else /* SYS_UNIXWARE1 */
-
- #if defined(SYS_AUX3) || defined(SYS_AUX2) || defined(SYS_SVR4) || defined(SYS_PTX)
- #define K_TICKADJ_NAME "tickadj"
-***************
-*** 571,573 ****
---- 587,590 ----
- *tick = (U_LONG)txc.tick;
- }
- #endif /* SYS_LINUX */
-+ #endif /* SYS_UNIXWARE1 */
-*** xntpd/ntpd.c.3.3p Wed Feb 16 22:09:35 1994
---- xntpd/ntpd.c Mon Apr 11 10:33:58 1994
-***************
-*** 14,20 ****
- #include <sys/rtprio.h>
- #endif
-
-! #if defined(SYS_SVR4)
- #include <termios.h>
- #endif
-
---- 14,21 ----
- #include <sys/rtprio.h>
- #endif
-
-! /* Shouldn't this test for HAVE_TERMIOS - RAS */
-! #if defined(SYS_SVR4) || defined (SYS_UNIXWARE1)
- #include <termios.h>
- #endif
-
-
diff --git a/usr.sbin/xntpd/patches/patch.39 b/usr.sbin/xntpd/patches/patch.39
deleted file mode 100644
index 12e09fefcdf7..000000000000
--- a/usr.sbin/xntpd/patches/patch.39
+++ /dev/null
@@ -1,78 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa21593; 13 Apr 94 8:23 EDT
-Received: from jagubox.gsfc.nasa.gov by louie.udel.edu id aa20245;
- 13 Apr 94 8:15 EDT
-Received: by jagubox.gsfc.nasa.gov (Smail3.1.28.1 #2)
- id m0pr3rH-0005s0C; Wed, 13 Apr 94 08:15 EDT
-Message-Id: <m0pr3rH-0005s0C@jagubox.gsfc.nasa.gov>
-From: Jim Jagielski <jim@jagubox.gsfc.nasa.gov>
-Subject: Minor change for ntp_loopfilter (and loop.c) in 3.3q
-To: Mills@udel.edu
-Date: Wed, 13 Apr 1994 08:15:55 -0400 (EDT)
-Reply-To: Jim Jagielski <jim@jagubox.gsfc.nasa.gov>
-In-Reply-To: <9308051324.aa24396@huey.udel.edu> from "Mills@udel.edu" at Aug 5, 93 01:24:24 pm
-X-Mailer: ELM [version 2.4 PL23]
-Content-Type: text
-Content-Length: 1738
-
-One of the changes between 3.3p and 3.3q was the format change of the syslog
-message when the clock is reset when xntpd sees a "large" offset. This change
-is nice, but it would be "better" is the notice also made mention of whether
-the reset was a step or slew (as defined by SLEWALWAYS).
-
-This patch adds that:
-*** xntpd/Oloop.c Wed Apr 13 08:05:09 1994
---- xntpd/loop.c Wed Apr 13 08:06:32 1994
-***************
-*** 458,464 ****
- lfptoa(fp_offset, 6));
- return (0);
- }
-! syslog(LOG_NOTICE, "clock reset %s\n",
- lfptoa(fp_offset, 6));
- step_systime(fp_offset);
- clock_adjust = 0;
---- 458,469 ----
- lfptoa(fp_offset, 6));
- return (0);
- }
-! syslog(LOG_NOTICE, "clock reset (%s) %s\n",
-! #ifdef SLEWALWAYS
-! "slew",
-! #else
-! "step",
-! #endif
- lfptoa(fp_offset, 6));
- step_systime(fp_offset);
- clock_adjust = 0;
-*** xntpd/Ontp_loopfilter.c Wed Apr 13 08:05:23 1994
---- xntpd/ntp_loopfilter.c Wed Apr 13 08:07:03 1994
-***************
-*** 458,464 ****
- lfptoa(fp_offset, 6));
- return (0);
- }
-! syslog(LOG_NOTICE, "clock reset %s\n",
- lfptoa(fp_offset, 6));
- step_systime(fp_offset);
- clock_adjust = 0;
---- 458,469 ----
- lfptoa(fp_offset, 6));
- return (0);
- }
-! syslog(LOG_NOTICE, "clock reset (%s) %s\n",
-! #ifdef SLEWALWAYS
-! "slew",
-! #else
-! "step",
-! #endif
- lfptoa(fp_offset, 6));
- step_systime(fp_offset);
- clock_adjust = 0;
---
-#include <std/disclaimer.h>
- Jim Jagielski | "Is this something you can share with
- jim@jagubox.gsfc.nasa.gov | the rest of us Amazing Larry!!??"
- NASA/GSFC, Code 734.4 | Pee Wee
- Greenbelt, MD 20771 |
-
diff --git a/usr.sbin/xntpd/patches/patch.4 b/usr.sbin/xntpd/patches/patch.4
deleted file mode 100644
index ef06ee907f04..000000000000
--- a/usr.sbin/xntpd/patches/patch.4
+++ /dev/null
@@ -1,4719 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa12898; 26 Jan 94 21:06 EST
-Received: from sony.com by louie.udel.edu id aa05924; 26 Jan 94 21:01 EST
-Received: by sony.com id AA18168; Wed, 26 Jan 94 18:00:44 -0800
-X-Btw: sony.com is also sonygate.sony.com
-Received: by mail1.gw.in.sel.sony.com id AA25072; Wed, 26 Jan 94 18:00:43 -0800
-Received: by mail1.sjc.in.sel.sony.com id AA13634; Wed, 26 Jan 94 18:00:41 -0800
-Received: by morality.sjc.hw.sony.com; id AA23624; Wed, 26 Jan 94 18:00:40 -0800
-Date: Wed, 26 Jan 94 18:00:40 -0800
-From: Paul Vixie <Paul_Vixie@corpmis.sjc.hw.sony.com>
-Message-Id: <9401270200.AA23624@morality.sjc.hw.sony.com>
-To: mills@udel.edu
-Subject: diffs against 3.3c (26-jan 11:36)
-Cc: paul@vix.com
-
-These have been tested on BSD/386 1.0 and on HP-UX 8.??. I have more to do,
-but this is the last I'm going to do before 3.3d (or whatever) comes out with
-the other patches you're expecting. I need to have a day with just me and NTP
-and everybody else with their mits outa the code while I finish the portability
-stuff.
-
-*** /tmp/RCSA023397 Wed Jan 26 17:56:22 1994
---- adjtime/adjtimed.c Wed Jan 26 16:33:27 1994
-***************
-*** 42,47 ****
-
- double atof();
-! extern int optind;
-! extern char *optarg;
-
- int InitClockRate();
---- 42,47 ----
-
- double atof();
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- int InitClockRate();
-***************
-*** 84,88 ****
- openlog("adjtimed", LOG_PID, LOG_LOCAL6);
-
-! while ((ch = getopt(argc, argv, "hkrvdfp:")) != EOF) {
- switch (ch) {
- case 'k':
---- 84,88 ----
- openlog("adjtimed", LOG_PID, LOG_LOCAL6);
-
-! while ((ch = ntp_getopt(argc, argv, "hkrvdfp:")) != EOF) {
- switch (ch) {
- case 'k':
-***************
-*** 114,118 ****
-
- case 'p':
-! if ((RATE = atof(optarg)) <= 0.0 || RATE >= 100.0) {
- fputs("adjtimed: percentage must be between 0.0 and 100.0\n", stderr);
- exit(1);
---- 114,118 ----
-
- case 'p':
-! if ((RATE = atof(ntp_optarg)) <= 0.0 || RATE >= 100.0) {
- fputs("adjtimed: percentage must be between 0.0 and 100.0\n", stderr);
- exit(1);
-*** /tmp/RCSA023401 Wed Jan 26 17:56:23 1994
---- authstuff/authspeed.c Wed Jan 26 16:33:28 1994
-***************
-*** 66,75 ****
- int i;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
-
- progname = argv[0];
- loops = DEFLOOPS;
-! while ((c = getopt_l(argc, argv, "cdmn:")) != EOF)
- switch (c) {
- case 'c':
---- 66,75 ----
- int i;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- progname = argv[0];
- loops = DEFLOOPS;
-! while ((c = ntp_getopt(argc, argv, "cdmn:")) != EOF)
- switch (c) {
- case 'c':
-***************
-*** 83,91 ****
- break;
- case 'n':
-! loops = atoi(optarg);
- if (loops <= 0) {
- (void) fprintf(stderr,
- "%s: %s is unlikely to be a useful number of loops\n",
-! progname, optarg);
- errflg++;
- }
---- 83,91 ----
- break;
- case 'n':
-! loops = atoi(ntp_optarg);
- if (loops <= 0) {
- (void) fprintf(stderr,
- "%s: %s is unlikely to be a useful number of loops\n",
-! progname, ntp_optarg);
- errflg++;
- }
-***************
-*** 95,99 ****
- break;
- }
-! if (errflg || optind == argc) {
- (void) fprintf(stderr,
- "usage: %s [-d] [-n loops] [ -c ] auth.samplekeys\n",
---- 95,99 ----
- break;
- }
-! if (errflg || ntp_optind == argc) {
- (void) fprintf(stderr,
- "usage: %s [-d] [-n loops] [ -c ] auth.samplekeys\n",
-***************
-*** 109,113 ****
-
- init_auth();
-! authreadkeys(argv[optind]);
- for (i = 0; i < 16; i++) {
- if (!auth_havekey(i + domd5)) {
---- 109,113 ----
-
- init_auth();
-! authreadkeys(argv[ntp_optind]);
- for (i = 0; i < 16; i++) {
- if (!auth_havekey(i + domd5)) {
-*** /tmp/RCSA023401 Wed Jan 26 17:56:23 1994
---- authstuff/keyparity.c Wed Jan 26 16:33:28 1994
-***************
-*** 50,58 ****
- int keytype;
- U_LONG key[2];
-! extern int optind;
-! extern char *optarg;
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "adno:s")) != EOF)
- switch (c) {
- case 'a':
---- 50,58 ----
- int keytype;
- U_LONG key[2];
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "adno:s")) != EOF)
- switch (c) {
- case 'a':
-***************
-*** 69,76 ****
- break;
- case 'o':
-! if (*optarg == 'n') {
- ntpoutflag = 1;
- gotoopt = 1;
-! } else if (*optarg == 's') {
- ntpoutflag = 0;
- gotoopt = 1;
---- 69,76 ----
- break;
- case 'o':
-! if (*ntp_optarg == 'n') {
- ntpoutflag = 1;
- gotoopt = 1;
-! } else if (*ntp_optarg == 's') {
- ntpoutflag = 0;
- gotoopt = 1;
-***************
-*** 86,90 ****
- break;
- }
-! if (errflg || optind == argc) {
- (void) fprintf(stderr,
- "usage: %s -n|-s [-a] [-o n|s] key [...]\n",
---- 86,90 ----
- break;
- }
-! if (errflg || ntp_optind == argc) {
- (void) fprintf(stderr,
- "usage: %s -n|-s [-a] [-o n|s] key [...]\n",
-***************
-*** 119,127 ****
- keytype = KEY_TYPE_STD;
-
-! for (; optind < argc; optind++) {
-! if (!decodekey(keytype, argv[optind], key)) {
- (void) fprintf(stderr,
- "%s: format of key %s invalid\n",
-! progname, argv[optind]);
- exit(1);
- }
---- 119,127 ----
- keytype = KEY_TYPE_STD;
-
-! for (; ntp_optind < argc; ntp_optind++) {
-! if (!decodekey(keytype, argv[ntp_optind], key)) {
- (void) fprintf(stderr,
- "%s: format of key %s invalid\n",
-! progname, argv[ntp_optind]);
- exit(1);
- }
-***************
-*** 243,247 ****
- * Make up key from ascii representation
- */
-! bzero(keybytes, sizeof(keybytes));
- for (i = 0; i < 8 && i < len; i++)
- keybytes[i] = *cp++ << 1;
---- 243,247 ----
- * Make up key from ascii representation
- */
-! memset(keybytes, 0, sizeof(keybytes));
- for (i = 0; i < 8 && i < len; i++)
- keybytes[i] = *cp++ << 1;
-*** /tmp/RCSA023401 Wed Jan 26 17:56:23 1994
---- authstuff/makeIPFP.c Wed Jan 26 16:33:28 1994
-***************
-*** 29,37 ****
- int c;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
---- 29,37 ----
- int c;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 184,188 ****
- int octbits;
-
-! bzero((char *)bits, sizeof bits);
-
- /*
---- 184,188 ----
- int octbits;
-
-! memset((char *)bits, 0, sizeof bits);
-
- /*
-*** /tmp/RCSA023401 Wed Jan 26 17:56:23 1994
---- authstuff/makePC1.c Wed Jan 26 16:33:28 1994
-***************
-*** 26,34 ****
- int c;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
---- 26,34 ----
- int c;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 83,88 ****
- u_char d[28];
-
-! bzero((char *)c, sizeof c);
-! bzero((char *)d, sizeof d);
-
- for (i = 0; i < 28; i++) {
---- 83,88 ----
- u_char d[28];
-
-! memset((char *)c, 0, sizeof c);
-! memset((char *)d, 0, sizeof d);
-
- for (i = 0; i < 28; i++) {
-***************
-*** 141,145 ****
- u_char bits[64];
-
-! bzero((char *)bits, sizeof bits);
-
- printf("static U_LONG PC1_CL[8] = {");
---- 141,145 ----
- u_char bits[64];
-
-! memset((char *)bits, 0, sizeof bits);
-
- printf("static U_LONG PC1_CL[8] = {");
-*** /tmp/RCSA023401 Wed Jan 26 17:56:24 1994
---- authstuff/makePC2.c Wed Jan 26 16:33:28 1994
-***************
-*** 27,35 ****
- int c;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
---- 27,35 ----
- int c;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 88,92 ****
- u_char res[24];
-
-! bzero((char *)res, sizeof res);
-
- for (i = 0; i < 24; i++) {
---- 88,92 ----
- u_char res[24];
-
-! memset((char *)res, 0, sizeof res);
-
- for (i = 0; i < 24; i++) {
-***************
-*** 118,122 ****
- u_char res[24];
-
-! bzero((char *)res, sizeof res);
-
- for (i = 0; i < 24; i++) {
---- 118,122 ----
- u_char res[24];
-
-! memset((char *)res, 0, sizeof res);
-
- for (i = 0; i < 24; i++) {
-***************
-*** 169,173 ****
- u_char bits[28];
-
-! bzero((char *)bits, sizeof bits);
-
- printf("static U_LONG PC2_C[4][64] = {");
---- 169,173 ----
- u_char bits[28];
-
-! memset((char *)bits, 0, sizeof bits);
-
- printf("static U_LONG PC2_C[4][64] = {");
-*** /tmp/RCSA023401 Wed Jan 26 17:56:24 1994
---- authstuff/makeSP.c Wed Jan 26 16:33:28 1994
-***************
-*** 26,34 ****
- int c;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
---- 26,34 ----
- int c;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 166,170 ****
- int sixbits;
-
-! bzero((char *)bits, sizeof bits);
- printf("static U_LONG SP[8][64] = {");
- for (selno = 0; selno < 8; selno++) {
---- 166,170 ----
- int sixbits;
-
-! memset((char *)bits, 0, sizeof bits);
- printf("static U_LONG SP[8][64] = {");
- for (selno = 0; selno < 8; selno++) {
-*** /tmp/RCSA023401 Wed Jan 26 17:56:24 1994
---- authstuff/mkrandkeys.c Wed Jan 26 16:33:28 1994
-***************
-*** 35,40 ****
- U_LONG tmp;
- char *passwd;
-! extern int optind;
-! extern char *optarg;
- extern char *getpass();
-
---- 35,40 ----
- U_LONG tmp;
- char *passwd;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
- extern char *getpass();
-
-***************
-*** 42,46 ****
- progname = argv[0];
- passwd = NULL;
-! while ((c = getopt_l(argc, argv, "dnp:s")) != EOF)
- switch (c) {
- case 'd':
---- 42,46 ----
- progname = argv[0];
- passwd = NULL;
-! while ((c = ntp_getopt(argc, argv, "dnp:s")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 51,55 ****
- break;
- case 'p':
-! passwd = optarg;
- break;
- case 's':
---- 51,55 ----
- break;
- case 'p':
-! passwd = ntp_optarg;
- break;
- case 's':
-***************
-*** 62,70 ****
-
- numkeys = 0;
-! for (; !errflg && optind < argc; optind++) {
-! c = atoi(argv[optind]);
- if (c <= 0 || c > 15) {
- (void) fprintf(stderr, "%s: invalid key number `%s'\n",
-! progname, argv[optind]);
- exit(2);
- }
---- 62,70 ----
-
- numkeys = 0;
-! for (; !errflg && ntp_optind < argc; ntp_optind++) {
-! c = atoi(argv[ntp_optind]);
- if (c <= 0 || c > 15) {
- (void) fprintf(stderr, "%s: invalid key number `%s'\n",
-! progname, argv[ntp_optind]);
- exit(2);
- }
-*** /tmp/RCSA023401 Wed Jan 26 17:56:24 1994
---- authstuff/omakeIPFP.c Wed Jan 26 16:33:29 1994
-***************
-*** 35,43 ****
- int c;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
---- 35,43 ----
- int c;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "d")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 189,193 ****
- int quadbits;
-
-! bzero((char *)bits, sizeof bits);
-
- /*
---- 189,193 ----
- int quadbits;
-
-! memset((char *)bits, 0, sizeof bits);
-
- /*
-*** /tmp/RCSA023419 Wed Jan 26 17:56:25 1994
---- clockstuff/chutest.c Wed Jan 26 16:33:29 1994
-***************
-*** 69,78 ****
- int c;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
- void init_chu();
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "cdfpt")) != EOF)
- switch (c) {
- case 'c':
---- 69,78 ----
- int c;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
- void init_chu();
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "cdfpt")) != EOF)
- switch (c) {
- case 'c':
-***************
-*** 108,112 ****
- break;
- }
-! if (errflg || optind+1 != argc) {
- #ifdef STREAM
- (void) fprintf(stderr, "usage: %s [-dft] tty_device\n",
---- 108,112 ----
- break;
- }
-! if (errflg || ntp_optind+1 != argc) {
- #ifdef STREAM
- (void) fprintf(stderr, "usage: %s [-dft] tty_device\n",
-***************
-*** 127,131 ****
-
- (void) gettimeofday(&lasttv, (struct timezone *)0);
-! c = openterm(argv[optind]);
- init_chu();
- #ifdef STREAM
---- 127,131 ----
-
- (void) gettimeofday(&lasttv, (struct timezone *)0);
-! c = openterm(argv[ntp_optind]);
- init_chu();
- #ifdef STREAM
-*** /tmp/RCSA023419 Wed Jan 26 17:56:25 1994
---- clockstuff/clktest.c Wed Jan 26 16:33:29 1994
-***************
-*** 106,111 ****
- struct sgttyb ttyb;
- struct itimerval itimer;
-! extern int optind;
-! extern char *optarg;
- int alarming();
- int ioready();
---- 106,111 ----
- struct sgttyb ttyb;
- struct itimerval itimer;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
- int alarming();
- int ioready();
-***************
-*** 115,119 ****
- magic[0] = 0;
- #endif
-! while ((c = getopt_l(argc, argv, "a:b:c:dfs:t:")) != EOF)
- switch (c) {
- #ifdef CLKLDISC
---- 115,119 ----
- magic[0] = 0;
- #endif
-! while ((c = ntp_getopt(argc, argv, "a:b:c:dfs:t:")) != EOF)
- switch (c) {
- #ifdef CLKLDISC
-***************
-*** 121,125 ****
- #endif
- case 'c':
-! if (!atouint(optarg, &tmp)) {
- (void) fprintf(stderr,
- "%s: argument for -%c must be integer\n",
---- 121,125 ----
- #endif
- case 'c':
-! if (!atouint(ntp_optarg, &tmp)) {
- (void) fprintf(stderr,
- "%s: argument for -%c must be integer\n",
-***************
-*** 140,144 ****
- break;
- case 'b':
-! if (!atouint(optarg, &tmp)) {
- errflg++;
- break;
---- 140,144 ----
- break;
- case 'b':
-! if (!atouint(ntp_optarg, &tmp)) {
- errflg++;
- break;
-***************
-*** 164,175 ****
- break;
- case 's':
-! cmdlen = strlen(optarg);
- if (cmdlen == 0)
- errflg++;
- else
-! cmd = optarg;
- break;
- case 't':
-! if (!atouint(optarg, &tmp))
- errflg++;
- else {
---- 164,175 ----
- break;
- case 's':
-! cmdlen = strlen(ntp_optarg);
- if (cmdlen == 0)
- errflg++;
- else
-! cmd = ntp_optarg;
- break;
- case 't':
-! if (!atouint(ntp_optarg, &tmp))
- errflg++;
- else {
-***************
-*** 182,186 ****
- break;
- }
-! if (errflg || optind+1 != argc) {
- (void) fprintf(stderr,
- #ifdef CLKLDISC
---- 182,186 ----
- break;
- }
-! if (errflg || ntp_optind+1 != argc) {
- (void) fprintf(stderr,
- #ifdef CLKLDISC
-***************
-*** 200,209 ****
-
- if (docmd)
-! fd = open(argv[optind], O_RDWR, 0777);
- else
-! fd = open(argv[optind], O_RDONLY, 0777);
- if (fd == -1) {
- (void) fprintf(stderr, "%s: open(%s): ", progname,
-! argv[optind]);
- perror("");
- exit(1);
---- 200,209 ----
-
- if (docmd)
-! fd = open(argv[ntp_optind], O_RDWR, 0777);
- else
-! fd = open(argv[ntp_optind], O_RDONLY, 0777);
- if (fd == -1) {
- (void) fprintf(stderr, "%s: open(%s): ", progname,
-! argv[ntp_optind]);
- perror("");
- exit(1);
-*** /tmp/RCSA023419 Wed Jan 26 17:56:25 1994
---- clockstuff/propdelay.c Wed Jan 26 16:33:29 1994
-***************
-*** 141,149 ****
- double lat2, long2;
- double lat3, long3;
-! extern int optind;
-! extern char *optarg;
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "dh:CWG")) != EOF)
- switch (c) {
- case 'd':
---- 141,149 ----
- double lat2, long2;
- double lat3, long3;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "dh:CWG")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 152,159 ****
- case 'h':
- hflag++;
-! height = atof(optarg);
- if (height <= 0.0) {
- (void) fprintf(stderr, "height %s unlikely\n",
-! optarg);
- errflg++;
- }
---- 152,159 ----
- case 'h':
- hflag++;
-! height = atof(ntp_optarg);
- if (height <= 0.0) {
- (void) fprintf(stderr, "height %s unlikely\n",
-! ntp_optarg);
- errflg++;
- }
-***************
-*** 172,177 ****
- break;
- }
-! if (errflg || (!(Cflag || Wflag || Gflag) && optind+4 != argc) ||
-! ((Cflag || Wflag || Gflag) && optind+2 != argc)) {
- (void) fprintf(stderr,
- "usage: %s [-d] [-h height] lat1 long1 lat2 long2\n",
---- 172,177 ----
- break;
- }
-! if (errflg || (!(Cflag || Wflag || Gflag) && ntp_optind+4 != argc) ||
-! ((Cflag || Wflag || Gflag) && ntp_optind+2 != argc)) {
- (void) fprintf(stderr,
- "usage: %s [-d] [-h height] lat1 long1 lat2 long2\n",
-***************
-*** 186,193 ****
-
- if (!(Cflag || Wflag || Gflag)) {
-! lat1 = latlong(argv[optind], 1);
-! long1 = latlong(argv[optind + 1], 0);
-! lat2 = latlong(argv[optind + 2], 1);
-! long2 = latlong(argv[optind + 3], 0);
- if (hflag) {
- doit(lat1, long1, lat2, long2, height, "");
---- 186,193 ----
-
- if (!(Cflag || Wflag || Gflag)) {
-! lat1 = latlong(argv[ntp_optind], 1);
-! long1 = latlong(argv[ntp_optind + 1], 0);
-! lat2 = latlong(argv[ntp_optind + 2], 1);
-! long2 = latlong(argv[ntp_optind + 3], 0);
- if (hflag) {
- doit(lat1, long1, lat2, long2, height, "");
-***************
-*** 202,207 ****
- * Compute delay from WWV
- */
-! lat1 = latlong(argv[optind], 1);
-! long1 = latlong(argv[optind + 1], 0);
- lat2 = latlong(wwvlat, 1);
- long2 = latlong(wwvlong, 0);
---- 202,207 ----
- * Compute delay from WWV
- */
-! lat1 = latlong(argv[ntp_optind], 1);
-! long1 = latlong(argv[ntp_optind + 1], 0);
- lat2 = latlong(wwvlat, 1);
- long2 = latlong(wwvlong, 0);
-***************
-*** 229,234 ****
- }
- } else if (Cflag) {
-! lat1 = latlong(argv[optind], 1);
-! long1 = latlong(argv[optind + 1], 0);
- lat2 = latlong(chulat, 1);
- long2 = latlong(chulong, 0);
---- 229,234 ----
- }
- } else if (Cflag) {
-! lat1 = latlong(argv[ntp_optind], 1);
-! long1 = latlong(argv[ntp_optind + 1], 0);
- lat2 = latlong(chulat, 1);
- long2 = latlong(chulong, 0);
-***************
-*** 244,249 ****
- lat1 = latlong(goes_up_lat, 1);
- long1 = latlong(goes_up_long, 0);
-! lat3 = latlong(argv[optind], 1);
-! long3 = latlong(argv[optind + 1], 0);
-
- lat2 = latlong(goes_sat_lat, 1);
---- 244,249 ----
- lat1 = latlong(goes_up_lat, 1);
- long1 = latlong(goes_up_long, 0);
-! lat3 = latlong(argv[ntp_optind], 1);
-! long3 = latlong(argv[ntp_optind + 1], 0);
-
- lat2 = latlong(goes_sat_lat, 1);
-*** /tmp/RCSA023428 Wed Jan 26 17:56:27 1994
---- conf/Config.CHATHAM Wed Jan 26 16:33:29 1994
-***************
-*** 90,96 ****
- # CLOCKDEFS= line below. This flag affects xntpd only.
- #
-- # There is an occurance of a call to rindex() in the daemon. You may
-- # have to include a -Drindex=strrchr to get this to load right.
-- #
- # To change the location of the configuration file, use a
- # -DCONFIG_FILE=\\"/local/etc/ntp.conf\\" or something similar.
---- 90,93 ----
-***************
-*** 110,114 ****
- # generated by the pps signal. Only one of these flags should be defined.
- #
-! DEFS= -DUSELIBKVM -DDEBUG -DSTREAM -DREFCLOCK -DNO_SIGNED_CHAR_DECL -DPPS -DPPSDEV -DXNTP_RETROFIT_STDLIB -DHAVE_UNISTD_H
-
- #
---- 107,111 ----
- # generated by the pps signal. Only one of these flags should be defined.
- #
-! DEFS= -DUSELIBKVM -DDEBUG -DSTREAM -DREFCLOCK -DNO_SIGNED_CHAR_DECL -DPPS -DPPSDEV -DXNTP_RETROFIT_STDLIB -DNTP_POSIX_SOURCE
-
- #
-*** /tmp/RCSA023428 Wed Jan 26 17:56:27 1994
---- conf/Config.MONOMOY Wed Jan 26 16:33:29 1994
-***************
-*** 85,91 ****
- # CLOCKDEFS= line below. This flag affects xntpd only.
- #
-- # There is an occurance of a call to rindex() in the daemon. You may
-- # have to include a -Drindex=strrchr to get this to load right.
-- #
- # To change the location of the configuration file, use a
- # -DCONFIG_FILE=\\"/local/etc/ntp.conf\\" or something similar.
---- 85,88 ----
-***************
-*** 105,109 ****
- # be used)
- #
-! DEFS= -DBSDI -DUSELIBKVM -DDEBUG -DREFCLOCK -DPPS -DCONFIG_FILE=\\"/usr/local/etc/xntp.conf\\" -DHAVE_UNISTD_H
-
- #
---- 102,106 ----
- # be used)
- #
-! DEFS= -DBSDI -DUSELIBKVM -DDEBUG -DREFCLOCK -DPPS -DCONFIG_FILE=\\"/usr/local/etc/xntp.conf\\" -DNTP_POSIX_SOURCE
-
- #
-*** /tmp/RCSA023428 Wed Jan 26 17:56:27 1994
---- conf/Config.TIGER Wed Jan 26 16:33:30 1994
-***************
-*** 81,87 ****
- # CLOCKDEFS= line below. This flag affects xntpd only.
- #
-- # There is an occurance of a call to rindex() in the daemon. You may
-- # have to include a -Drindex=strrchr to get this to load right.
-- #
- # To change the location of the configuration file, use a
- # -DCONFIG_FILE=\\"/local/etc/ntp.conf\\" or something similar.
---- 81,84 ----
-***************
-*** 101,105 ****
- # be used)
- #
-! DEFS= -DREFCLOCK -DS_CHAR_DEFINED -DREADKMEM -DDEBUG -DPLL -DXNTP_RETROFIT_STDLIB -DHAVE_UNISTD_H
-
- #
---- 98,102 ----
- # be used)
- #
-! DEFS= -DREFCLOCK -DS_CHAR_DEFINED -DREADKMEM -DDEBUG -DPLL -DXNTP_RETROFIT_STDLIB -DNTP_POSIX_SOURCE
-
- #
-*** /tmp/RCSA023428 Wed Jan 26 17:56:27 1994
---- conf/Config.TRURO Wed Jan 26 16:33:30 1994
-***************
-*** 87,93 ****
- # CLOCKDEFS= line below. This flag affects xntpd only.
- #
-- # There is an occurance of a call to rindex() in the daemon. You may
-- # have to include a -Drindex=strrchr to get this to load right.
-- #
- # To change the location of the configuration file, use a
- # -DCONFIG_FILE=\\"/local/etc/ntp.conf\\" or something similar.
---- 87,90 ----
-***************
-*** 110,114 ****
- # generated by the pps signal. Only one of these flags should be defined.
- #
-! DEFS= -DDEBUG -DSTREAM -DREFCLOCK -DNO_SIGNED_CHAR_DECL -DSLEWALWAYS -DSOLARIS -DPPS -DSTUPID_SIGNAL -DXNTP_RETROFIT_STDLIB -DHAVE_UNISTD_H
-
- #
---- 107,111 ----
- # generated by the pps signal. Only one of these flags should be defined.
- #
-! DEFS= -DDEBUG -DSTREAM -DREFCLOCK -DNO_SIGNED_CHAR_DECL -DSLEWALWAYS -DSOLARIS -DPPS -DSTUPID_SIGNAL -DXNTP_RETROFIT_STDLIB -DNTP_POSIX_SOURCE
-
- #
-*** /tmp/RCSA023441 Wed Jan 26 17:56:29 1994
---- include/l_stdlib.h Wed Jan 26 16:33:30 1994
-***************
-*** 39,43 ****
- #if !defined(NTP_POSIX_SOURCE)
- extern int atoi P((char *));
-- extern void bcopy P((char *, char *, int));
- extern int dup2 P((int, int));
- extern int execve P((char *, char **,char **));
---- 39,42 ----
-***************
-*** 51,58 ****
- #endif
-
-- #ifndef bzero /* XXX macro prototyping clash */
-- extern void bzero P((char *, int));
-- extern int bcmp P((char *, char *, int));
-- #endif
- extern char *mktemp P((char *));
-
---- 50,53 ----
-***************
-*** 193,200 ****
- #ifndef NTP_POSIX_SOURCE
- extern int atoi P((char *));
-- extern void bcopy P((char *, char *, int));
-- extern void bzero P((char *, int));
-- extern int bcmp P((char *, char *, int));
-- extern void bcopy P((char *, char *, int));
- extern int execve P((char *, char **,char **));
- extern int fork P((void));
---- 188,191 ----
-*** /tmp/RCSA023441 Wed Jan 26 17:56:29 1994
---- include/ntp.h Wed Jan 26 16:33:30 1994
-***************
-*** 329,333 ****
-
- /*
-! * Definitions for the clear() routine. We use bzero() to clear
- * the parts of the peer structure which go to zero. These are
- * used to calculate the start address and length of the area.
---- 329,333 ----
-
- /*
-! * Definitions for the clear() routine. We use memset() to clear
- * the parts of the peer structure which go to zero. These are
- * used to calculate the start address and length of the area.
-*** /tmp/RCSA023441 Wed Jan 26 17:56:29 1994
---- include/ntp_machine.h Wed Jan 26 16:33:31 1994
-***************
-*** 1,3 ****
-! /* ntp_compat.h,v 3.1 1993/07/06 01:06:49 jbj Exp
- * Collect all machine dependent idiosyncrasies in one place.
- */
---- 1,3 ----
-! /* ntp_machine.h,v 3.1 1993/07/06 01:06:49 jbj Exp
- * Collect all machine dependent idiosyncrasies in one place.
- */
-***************
-*** 53,61 ****
-
- THIS MAKES PORTS TO NEW SYSTEMS EASY - You only have to wory about
-! kernal mucking.
-
- NTP_POSIX_SOURCE - Use POSIX functions over bsd functions and att functions.
- This is NOT the same as _POSIX_SOURCE.
-! It is much weeker!
-
-
---- 53,61 ----
-
- THIS MAKES PORTS TO NEW SYSTEMS EASY - You only have to wory about
-! kernel mucking.
-
- NTP_POSIX_SOURCE - Use POSIX functions over bsd functions and att functions.
- This is NOT the same as _POSIX_SOURCE.
-! It is much weaker!
-
-
-***************
-*** 95,99 ****
- UNIX V.4 machines implement a sockets library on top of streams.
- When requesting the IP interface configuration with an ioctl(2) calll,
-! an arrat of ifreq structures are placed in the provided buffer. Some
- implementations also place the length of the buffer information in
- the first integer position of the buffer.
---- 95,99 ----
- UNIX V.4 machines implement a sockets library on top of streams.
- When requesting the IP interface configuration with an ioctl(2) calll,
-! an array of ifreq structures are placed in the provided buffer. Some
- implementations also place the length of the buffer information in
- the first integer position of the buffer.
-***************
-*** 115,121 ****
- RETSIGTYPE - Define signal function type.
- NO_SIGNED_CHAR_DECL - No "signed char" see include/ntp.h
-! LOCK_PROCESS - Have plock.
- UDP_WILDCARD_DELIVERY
-! - these systems deliver broadcast pakets to the wildcard
- port instead to a port bound to the interface bound
- to the correct broadcast address - are these
---- 115,121 ----
- RETSIGTYPE - Define signal function type.
- NO_SIGNED_CHAR_DECL - No "signed char" see include/ntp.h
-! LOCK_PROCESS - Have plock.
- UDP_WILDCARD_DELIVERY
-! - these systems deliver broadcast packets to the wildcard
- port instead to a port bound to the interface bound
- to the correct broadcast address - are these
-***************
-*** 122,133 ****
- implementations broken or did the spec change ?
-
-- HAVE_UNISTD_H - Maybe should be part of NTP_POSIX_SOURCE ?
--
- You could just put the defines on the DEFS line in machines/<os> file.
-! I don't since there are lost of different types compiler that a systemm might
-! have, some that can do proto typing and others that cannot on the saem system.
-! I get a chanse to twiddle some of the configuration paramasters at compile
-! time based on compler/machine combinatsions by using this include file.
-! See convex, aix and sun configurations see how complex it get.
-
- */
---- 122,135 ----
- implementations broken or did the spec change ?
-
- You could just put the defines on the DEFS line in machines/<os> file.
-! I don't since there are lots of different types of compiler that a system might
-! have, some that can do prototyping and others that cannot on the saem system.
-! I get a chance to twiddle some of the configuration paramasters at compile
-! time based on compler/machine combinations by using this include file.
-! See convex, aix and sun configurations see how complex it gets.
-!
-! Note that it _is_ considered reasonable to add some system-specific defines
-! to the machine/<os> file if it would be too inconvenient to puzzle them out
-! in this file.
-
- */
-***************
-*** 145,152 ****
- * Keep USE_PROTOTYPES and _NO_PROTO in step.
- */
-! #if defined(_NO_PROTO)&&defined(USE_PROTOTYPES)
- #undef USE_PROTOTYPES
- #endif
-! #if !defined(_NO_PROTO)&&!defined(USE_PROTOTYPES)
- #define USE_PROTOTYPES
- #endif
---- 147,154 ----
- * Keep USE_PROTOTYPES and _NO_PROTO in step.
- */
-! #if defined(_NO_PROTO) && defined(USE_PROTOTYPES)
- #undef USE_PROTOTYPES
- #endif
-! #if !defined(_NO_PROTO) && !defined(USE_PROTOTYPES)
- #define USE_PROTOTYPES
- #endif
-***************
-*** 204,208 ****
- * Convex
- */
-! #if defined(SYS_CONVEXOS10)||defined(SYS_CONVEXOS9)
- #define HAVE_SIGNALED_IO
- #define HAVE_N_UN
---- 206,210 ----
- * Convex
- */
-! #if defined(SYS_CONVEXOS10) || defined(SYS_CONVEXOS9)
- #define HAVE_SIGNALED_IO
- #define HAVE_N_UN
-***************
-*** 213,221 ****
- #define NO_SIGNED_CHAR_DECL
- #else
-! #if defined(__stdc__)&&!defined(USE_PROTOTYPES)
- #define USE_PROTOTYPES
- #endif
-! #if !defined(__stdc__)&&defined(USE_PROTOTYPES)
-! #undef USE_PROTOTYPES
- #endif
- #define NTP_POSIX_SOURCE
---- 215,223 ----
- #define NO_SIGNED_CHAR_DECL
- #else
-! #if defined(__stdc__) && !defined(USE_PROTOTYPES)
- #define USE_PROTOTYPES
- #endif
-! #if !defined(__stdc__) && defined(USE_PROTOTYPES)
-! #undef USE_PROTOTYPES
- #endif
- #define NTP_POSIX_SOURCE
-***************
-*** 253,257 ****
- * AUX
- */
-! #if defined(SYS_AUX2)||defined(SYS_AUX3)
- #define NO_SIGNED_CHAR_DECL
- #define HAVE_READKMEM
---- 255,259 ----
- * AUX
- */
-! #if defined(SYS_AUX2) || defined(SYS_AUX3)
- #define NO_SIGNED_CHAR_DECL
- #define HAVE_READKMEM
-***************
-*** 292,296 ****
- #define NTP_POSIX_SOURCE
- #define HAVE_SIGNALED_IO
-- #define HAVE_UNISTD_H
- #define NO_SIGNED_CHAR_DECL
- #define LOCK_PROCESS
---- 294,297 ----
-***************
-*** 302,305 ****
---- 303,308 ----
- #define HAVE_READKMEM
- #endif
-+ #define getdtablesize() sysconf(_SC_OPEN_MAX)
-+ #define setlinebuf(f) setvbuf(f, NULL, _IOLBF, 0)
- #endif
-
-***************
-*** 313,316 ****
---- 316,320 ----
- #define HAVE_BSD_NICE
- #define HAVE_BSD_TTYS
-+ #define HAVE_TERMIOS
- #endif
-
-***************
-*** 342,346 ****
-
- /*
-! * DECOSF1
- */
- #if defined(SYS_DECOSF1)
---- 346,350 ----
-
- /*
-! * DEC AXP OSF/1
- */
- #if defined(SYS_DECOSF1)
-***************
-*** 354,357 ****
---- 358,362 ----
- /*
- * I386
-+ * XXX - what OS?
- */
- #if defined(SYS_I386)
-***************
-*** 412,416 ****
-
- /*
-! * Sony
- */
- #if defined(SYS_SONY)
---- 417,421 ----
-
- /*
-! * Sony NEWS
- */
- #if defined(SYS_SONY)
-***************
-*** 422,425 ****
---- 427,431 ----
- /*
- * VAX
-+ * XXX - VMS?
- */
- #if defined(SYS_VAX)
-***************
-*** 435,439 ****
- #define HAVE_ATT_SETPGRP
- #define USE_PROTOTYPES
-- #define HAVE_UNISTD_H
- #define NTP_POSIX_SOURCE
- #define HAVE_ATT_NICE
---- 441,444 ----
-***************
-*** 484,490 ****
- #endif /* NTP_SYSCALLS_STD */
-
-! #if !defined(HAVE_ATT_NICE) && !defined(HAVE_BSD_NICE) && !defined(HAVE_NO_NICE)
- ERROR You_must_define_one_of_the_HAVE_xx_NICE_defines
- #endif
-
- #endif /* __ntp_machine */
---- 489,545 ----
- #endif /* NTP_SYSCALLS_STD */
-
-! #if !defined(HAVE_ATT_NICE) \
-! && !defined(HAVE_BSD_NICE) \
-! && !defined(HAVE_NO_NICE)
- ERROR You_must_define_one_of_the_HAVE_xx_NICE_defines
- #endif
-+
-+
-+ #if !defined(XNTP_BIG_ENDIAN) && !defined(XNTP_LITTLE_ENDIAN)
-+
-+ # if defined(XNTP_AUTO_ENDIAN)
-+ # include <netinet/in.h>
-+
-+ # if BYTE_ORDER == BIG_ENDIAN
-+ # define XNTP_BIG_ENDIAN
-+ # endif
-+ # if BYTE_ORDER == LITTLE_ENDIAN
-+ # define XNTP_LITTLE_ENDIAN
-+ # endif
-+
-+ # else /* AUTO */
-+
-+ # ifdef WORDS_BIGENDIAN
-+ # define XNTP_BIG_ENDIAN 1
-+ # else
-+ # define XNTP_LITTLE_ENDIAN 1
-+ # endif
-+
-+ # endif /* AUTO */
-+
-+ #endif /* !BIG && !LITTLE */
-+
-+ /*
-+ * Byte order woes. The DES code is sensitive to byte order. This
-+ * used to be resolved by calling ntohl() and htonl() to swap things
-+ * around, but this turned out to be quite costly on Vaxes where those
-+ * things are actual functions. The code now straightens out byte
-+ * order troubles on its own, with no performance penalty for little
-+ * end first machines, but at great expense to cleanliness.
-+ */
-+ #if !defined(XNTP_BIG_ENDIAN) && !defined(XNTP_LITTLE_ENDIAN)
-+ /*
-+ * Pick one or the other.
-+ */
-+ BYTE_ORDER_NOT_DEFINED_FOR_AUTHENTICATION
-+ #endif
-+
-+ #if defined(XNTP_BIG_ENDIAN) && defined(XNTP_LITTLE_ENDIAN)
-+ /*
-+ * Pick one or the other.
-+ */
-+ BYTE_ORDER_NOT_DEFINED_FOR_AUTHENTICATION
-+ #endif
-+
-
- #endif /* __ntp_machine */
-*** /tmp/RCSA023441 Wed Jan 26 17:56:30 1994
---- include/ntp_select.h Wed Jan 26 16:33:31 1994
-***************
-*** 15,19 ****
- #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
- #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
-! #define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
- #endif
-
---- 15,19 ----
- #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
- #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
-! #define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p)))
- #endif
-
-*** /tmp/RCSA023441 Wed Jan 26 17:56:30 1994
---- include/ntp_stdlib.h Wed Jan 26 16:33:31 1994
-***************
-*** 48,52 ****
- extern int clocktime P((int, int, int, int, int, U_LONG, U_LONG *, U_LONG *));
- extern char * emalloc P((u_int));
-! extern int getopt_l P((int, char **, char *));
- extern void init_auth P((void));
- extern void init_lib P((void));
---- 48,52 ----
- extern int clocktime P((int, int, int, int, int, U_LONG, U_LONG *, U_LONG *));
- extern char * emalloc P((u_int));
-! extern int ntp_getopt P((int, char **, char *));
- extern void init_auth P((void));
- extern void init_lib P((void));
-*** /tmp/RCSA023441 Wed Jan 26 17:56:30 1994
---- include/ntp_string.h Wed Jan 26 16:33:31 1994
-***************
-*** 1,4 ****
- /*
-! * Define bcopy, bzero, and bcmp and string op's
- */
-
---- 1,4 ----
- /*
-! * Define string ops: strchr strrchr memcmp memmove memset
- */
-
-***************
-*** 8,27 ****
- #ifdef NTP_POSIX_SOURCE
-
-! #if defined(HAVE_MEMORY_H)
-! #include <memory.h>
-! #endif
-!
-! #include <string.h>
-!
-! #define bcopy(s1,s2,n) memcpy(s2, s1, n)
-! #define bzero(s,n) memset(s, 0, n)
-! #define bcmp(s1,s2,n) memcmp(s1, s2, n)
-
- #else /* NTP_POSIX_SOURCE */
-
-! #include <strings.h>
-
-! #define strrchr rindex
-! #define strchr index
-
- #endif /* NTP_POSIX_SOURCE */
---- 8,27 ----
- #ifdef NTP_POSIX_SOURCE
-
-! # if defined(HAVE_MEMORY_H)
-! # include <memory.h>
-! # endif
-
-+ # include <string.h>
-+
- #else /* NTP_POSIX_SOURCE */
-
-! # include <strings.h>
-
-! # define strchr(s,c) index(s,c)
-! # define strrchr(s,c) rindex(s,c)
-! # define memcmp(a,b,c) bcmp(a,b,c)
-! # define memmove(t,f,c) bcopy(f,t,c)
-! # define memset(a,x,c) if (x == 0x00) bzero(a,c) else ntp_memset((char*)a,x,c)
-! void ntp_memset P((char *, int, int));
-
- #endif /* NTP_POSIX_SOURCE */
-*** /tmp/RCSA023456 Wed Jan 26 17:56:31 1994
---- kernel/tty_clk_STREAMS.c Wed Jan 26 16:33:31 1994
-***************
-*** 63,67 ****
-
- /*
-! * God only knows why, but linking with strchr() and index() fail
- * on my system, so here's a renamed copy.
- */
---- 63,67 ----
-
- /*
-! * God only knows why, but linking with strchr() fails
- * on my system, so here's a renamed copy.
- */
-*** /tmp/RCSA023460 Wed Jan 26 17:56:32 1994
---- lib/a_md512crypt.c Wed Jan 26 16:33:31 1994
-***************
-*** 81,86 ****
- MD5Final(&ctx);
-
-! bcopy((char *)ctx.digest, (char *) &pkt[NOCRYPT_LONGS + length/sizeof(U_LONG)],
-! BLOCK_OCTETS);
-! return 4 + BLOCK_OCTETS;
- }
---- 81,87 ----
- MD5Final(&ctx);
-
-! memmove((char *) &pkt[NOCRYPT_LONGS + length/sizeof(U_LONG)],
-! (char *) ctx.digest,
-! BLOCK_OCTETS);
-! return (4 + BLOCK_OCTETS);
- }
-*** /tmp/RCSA023460 Wed Jan 26 17:56:33 1994
---- lib/a_md5decrypt.c Wed Jan 26 16:33:32 1994
-***************
-*** 55,58 ****
- MD5Final(&ctx);
-
-! return (0 == bcmp((char *)ctx.digest, (char *)pkt + length + 4, BLOCK_OCTETS));
- }
---- 55,60 ----
- MD5Final(&ctx);
-
-! return (!memcmp((char *)ctx.digest,
-! (char *)pkt + length + 4,
-! BLOCK_OCTETS));
- }
-*** /tmp/RCSA023460 Wed Jan 26 17:56:33 1994
---- lib/a_md5encrypt.c Wed Jan 26 16:33:32 1994
-***************
-*** 64,68 ****
- MD5Final(&ctx);
-
-! bcopy((char *)ctx.digest, (char *) &pkt[NOCRYPT_LONGS + len], BLOCK_OCTETS);
-! return 4 + BLOCK_OCTETS; /* return size of key and MAC */
- }
---- 64,70 ----
- MD5Final(&ctx);
-
-! memmove((char *)&pkt[NOCRYPT_LONGS + len],
-! (char *)ctx.digest,
-! BLOCK_OCTETS);
-! return (4 + BLOCK_OCTETS); /* return size of key and MAC */
- }
-*** /tmp/RCSA023460 Wed Jan 26 17:56:33 1994
---- lib/authdes.c Wed Jan 26 16:33:32 1994
-***************
-*** 4,31 ****
- #include "ntp_stdlib.h"
-
-- #if !defined(XNTP_BIG_ENDIAN) && !defined(XNTP_LITTLE_ENDIAN)
--
-- #if defined(XNTP_AUTO_ENDIAN)
-- #include <netinet/in.h>
--
-- #if BYTE_ORDER == BIG_ENDIAN
-- #define XNTP_BIG_ENDIAN
-- #endif
-- #if BYTE_ORDER == LITTLE_ENDIAN
-- #define XNTP_LITTLE_ENDIAN
-- #endif
--
-- #else /* AUTO */
--
-- #ifdef WORDS_BIGENDIAN
-- #define XNTP_BIG_ENDIAN 1
-- #else
-- #define XNTP_LITTLE_ENDIAN 1
-- #endif
--
-- #endif /* AUTO */
--
-- #endif /* !BIG && !LITTLE */
--
- /*
- * There are two entries in here. auth_subkeys() called to
---- 4,7 ----
-***************
-*** 33,58 ****
- * auth_des() is called to do the actual encryption/decryption
- */
--
-- /*
-- * Byte order woes. The DES code is sensitive to byte order. This
-- * used to be resolved by calling ntohl() and htonl() to swap things
-- * around, but this turned out to be quite costly on Vaxes where those
-- * things are actual functions. The code now straightens out byte
-- * order troubles on its own, with no performance penalty for little
-- * end first machines, but at great expense to cleanliness.
-- */
-- #if !defined(XNTP_BIG_ENDIAN) && !defined(XNTP_LITTLE_ENDIAN)
-- /*
-- * Pick one or the other.
-- */
-- BYTE_ORDER_NOT_DEFINED_FOR_AUTHENTICATION
-- #endif
--
-- #if defined(XNTP_BIG_ENDIAN) && defined(XNTP_LITTLE_ENDIAN)
-- /*
-- * Pick one or the other.
-- */
-- BYTE_ORDER_NOT_DEFINED_FOR_AUTHENTICATION
-- #endif
-
- /*
---- 9,12 ----
-*** /tmp/RCSA023460 Wed Jan 26 17:56:33 1994
---- lib/authkeys.c Wed Jan 26 16:33:32 1994
-***************
-*** 110,114 ****
- * Initialize hash table and free list
- */
-! bzero((char *)key_hash, sizeof key_hash);
- cache_flags = cache_keyid = 0;
-
---- 110,114 ----
- * Initialize hash table and free list
- */
-! memset((char *)key_hash, 0, sizeof key_hash);
- cache_flags = cache_keyid = 0;
-
-*** /tmp/RCSA023460 Wed Jan 26 17:56:34 1994
---- lib/authusekey.c Wed Jan 26 16:33:32 1994
-***************
-*** 97,101 ****
- * Make up key from ascii representation
- */
-! bzero((char *) keybytes, sizeof(keybytes));
- for (i = 0; i < 8 && i < len; i++)
- keybytes[i] = *cp++ << 1;
---- 97,101 ----
- * Make up key from ascii representation
- */
-! memset((char *) keybytes, 0, sizeof(keybytes));
- for (i = 0; i < 8 && i < len; i++)
- keybytes[i] = *cp++ << 1;
-*** /tmp/RCSA023460 Wed Jan 26 17:56:34 1994
---- lib/dofptoa.c Wed Jan 26 16:33:33 1994
-***************
-*** 32,36 ****
- * Zero out the buffer
- */
-! bzero((char *)cbuf, sizeof cbuf);
-
- /*
---- 32,36 ----
- * Zero out the buffer
- */
-! memset((char *)cbuf, 0, sizeof cbuf);
-
- /*
-*** /tmp/RCSA023460 Wed Jan 26 17:56:34 1994
---- lib/dolfptoa.c Wed Jan 26 16:33:33 1994
-***************
-*** 33,37 ****
- * Zero the character buffer
- */
-! bzero((char *) cbuf, sizeof(cbuf));
-
- /*
---- 33,37 ----
- * Zero the character buffer
- */
-! memset((char *) cbuf, 0, sizeof(cbuf));
-
- /*
-*** /tmp/RCSA023460 Wed Jan 26 17:56:34 1994
---- lib/getopt.c Wed Jan 26 16:33:33 1994
-***************
-*** 5,9 ****
- * Henry Spencer, changed for 4.3BSD compatibility (in addition to System V).
- * It allows rescanning of an option list by setting optind to 0 before
-! * calling. Thanks to Dennis Ferguson for the appropriate modifications.
- *
- * This file is in the Public Domain.
---- 5,11 ----
- * Henry Spencer, changed for 4.3BSD compatibility (in addition to System V).
- * It allows rescanning of an option list by setting optind to 0 before
-! * calling, which is why we use it even if the system has its own (in fact,
-! * this one has a unique name so as not to conflict with the system's).
-! * Thanks to Dennis Ferguson for the appropriate modifications.
- *
- * This file is in the Public Domain.
-***************
-*** 21,57 ****
- #endif /* lint */
-
-! char *optarg; /* Global argument pointer. */
-! #ifndef __convex__
-! int optind = 0; /* Global argv index. */
-! #else /* __convex__ */
-! extern int optind; /* Global argv index. */
-! #endif /* __convex__ */
-
-- /*
-- * N.B. use following at own risk
-- */
-- #ifndef __convex__
-- int opterr = 1; /* for compatibility, should error be printed? */
-- #else /* __convex__ */
-- extern int opterr; /* for compatibility, should error be printed? */
-- #endif /* __convex__ */
-- int optopt; /* for compatibility, option character checked */
--
- static char *scan = NULL; /* Private scan pointer. */
-
- /*
-! * Print message about a bad option. Watch this definition, it's
-! * not a single statement.
- */
-! #define BADOPT(mess, ch) if (opterr) { \
-! fputs(argv[0], stderr); \
-! fputs(mess, stderr); \
-! (void) putc(ch, stderr); \
-! (void) putc('\n', stderr); \
-! } \
-! return('?')
-
- int
-! getopt_l(argc, argv, optstring)
- int argc;
- char *argv[];
---- 23,53 ----
- #endif /* lint */
-
-! char *ntp_optarg; /* Global argument pointer. */
-! int ntp_optind = 0; /* Global argv index. */
-! int ntp_opterr = 1; /* for compatibility, should error be printed? */
-! int ntp_optopt; /* for compatibility, option character checked */
-
- static char *scan = NULL; /* Private scan pointer. */
-+ static char *prog = "amnesia";
-
- /*
-! * Print message about a bad option.
- */
-! static int
-! badopt(mess, ch)
-! char *mess;
-! int ch;
-! {
-! if (ntp_opterr) {
-! fputs(prog, stderr);
-! fputs(mess, stderr);
-! (void) putc(ch, stderr);
-! (void) putc('\n', stderr);
-! }
-! return ('?');
-! }
-
- int
-! ntp_getopt(argc, argv, optstring)
- int argc;
- char *argv[];
-***************
-*** 61,85 ****
- register char *place;
-
-! optarg = NULL;
-
-! if (optind == 0) {
- scan = NULL;
-! optind++;
- }
-
- if (scan == NULL || *scan == '\0') {
-! if (optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0')
-! return EOF;
-! if (argv[optind][1] == '-' && argv[optind][2] == '\0') {
-! optind++;
-! return EOF;
- }
-
-! scan = argv[optind]+1;
-! optind++;
- }
-
- c = *scan++;
-! optopt = c & 0377;
- for (place = optstring; place != NULL && *place != '\0'; ++place)
- if (*place == c)
---- 57,85 ----
- register char *place;
-
-! prog = argv[0];
-! ntp_optarg = NULL;
-
-! if (ntp_optind == 0) {
- scan = NULL;
-! ntp_optind++;
- }
-
- if (scan == NULL || *scan == '\0') {
-! if (ntp_optind >= argc
-! || argv[ntp_optind][0] != '-'
-! || argv[ntp_optind][1] == '\0') {
-! return (EOF);
-! }
-! if (argv[ntp_optind][1] == '-'
-! && argv[ntp_optind][2] == '\0') {
-! ntp_optind++;
-! return (EOF);
- }
-
-! scan = argv[ntp_optind++]+1;
- }
-
- c = *scan++;
-! ntp_optopt = c & 0377;
- for (place = optstring; place != NULL && *place != '\0'; ++place)
- if (*place == c)
-***************
-*** 87,91 ****
-
- if (place == NULL || *place == '\0' || c == ':' || c == '?') {
-! BADOPT(": unknown option -", c);
- }
-
---- 87,91 ----
-
- if (place == NULL || *place == '\0' || c == ':' || c == '?') {
-! return (badopt(": unknown option -", c));
- }
-
-***************
-*** 93,106 ****
- if (*place == ':') {
- if (*scan != '\0') {
-! optarg = scan;
- scan = NULL;
-! } else if (optind >= argc) {
-! BADOPT(": option requires argument -", c);
- } else {
-! optarg = argv[optind];
-! optind++;
- }
- }
-
-! return c&0377;
- }
---- 93,105 ----
- if (*place == ':') {
- if (*scan != '\0') {
-! ntp_optarg = scan;
- scan = NULL;
-! } else if (ntp_optind >= argc) {
-! return (badopt(": option requires argument -", c));
- } else {
-! ntp_optarg = argv[ntp_optind++];
- }
- }
-
-! return (c & 0377);
- }
-*** /tmp/RCSA023460 Wed Jan 26 17:56:34 1994
---- lib/machines.c Wed Jan 26 16:33:33 1994
-***************
-*** 1,18 ****
-! /*
-! * provide special support for peculiar architectures
- *
- * Real bummers unite !
- */
-
- #ifdef SYS_PTX
- #include <sys/types.h>
- #include <sys/procstats.h>
-! int settimeofday(tvp)
- struct timeval *tvp;
- {
-! return stime(&tvp->tv_sec); /* lie as bad as SysVR4 */
- }
-
-! int gettimeofday(tvp)
- struct timeval *tvp;
- {
---- 1,24 ----
-! /* machines.c - provide special support for peculiar architectures
- *
- * Real bummers unite !
-+ *
-+ * $Id:$
- */
-
-+ #include "ntp_stdlib.h"
-+
- #ifdef SYS_PTX
- #include <sys/types.h>
- #include <sys/procstats.h>
-!
-! int
-! settimeofday(tvp)
- struct timeval *tvp;
- {
-! return (stime(&tvp->tv_sec)); /* lie as bad as SysVR4 */
- }
-
-! int
-! gettimeofday(tvp)
- struct timeval *tvp;
- {
-***************
-*** 21,118 ****
- * this is also the most logical syscall for such a function
- */
-! return get_process_stats(tvp, PS_SELF, (struct procstats *) 0,
-! (struct procstats *) 0);
-! }
-! #endif
-!
-! #ifdef SYS_HPUX
-! /* hpux.c,v 3.1 1993/07/06 01:08:23 jbj Exp
-! * hpux.c -- compatibility routines for HP-UX.
-! * XXX many of these are not needed anymore.
-! */
-! #include "ntp_machine.h"
-!
-! #ifdef HAVE_UNISTD_H
-! #include <unistd.h>
-! #endif
-! #include <stdio.h>
-!
-! #include "ntp_stdlib.h"
-!
-! #if (SYS_HPUX < 8)
-! char
-! *index(s, c)
-! register char *s;
-! register int c;
-! {
-! return strchr (s, c);
-! }
-!
-!
-! char
-! *rindex(s, c)
-! register char *s;
-! register int c;
-! {
-! return strrchr (s, c);
-! }
-!
-!
-! int
-! bcmp(a, b, count)
-! register char *a, *b;
-! register int count;
-! {
-! return memcmp (a, b, count);
-! }
-!
-!
-! void
-! bcopy(from, to, count)
-! register char *from;
-! register char *to;
-! register int count;
-! {
-! if ((to == from) || (count <= 0))
-! return;
-!
-! if ((to > from) && (to <= (from + count))) {
-! to += count;
-! from += count;
-!
-! do {
-! *--to = *--from;
-! } while (--count);
-! }
-! else {
-! do {
-! *to++ = *from++;
-! } while (--count);
-! }
-! }
-!
-!
-! void
-! bzero(area, count)
-! register char *area;
-! register int count;
-! {
-! memset(area, 0, count);
- }
- #endif
-
-!
-! getdtablesize()
-! {
-! return(sysconf(_SC_OPEN_MAX));
-! }
-!
-!
-! int
-! setlinebuf(a_stream)
-! FILE *a_stream;
- {
-! return setvbuf(a_stream, (char *) NULL, _IOLBF, 0);
- }
-!
-! #endif
---- 27,43 ----
- * this is also the most logical syscall for such a function
- */
-! return (get_process_stats(tvp, PS_SELF, (struct procstats *) 0,
-! (struct procstats *) 0));
- }
- #endif
-
-! #if !defined(NTP_POSIX_SOURCE)
-! void
-! ntp_memset(a, x, c)
-! char *a;
-! int x, c;
- {
-! while (c-- > 0)
-! *a++ = x;
- }
-! #endif /*POSIX*/
-*** /tmp/RCSA023460 Wed Jan 26 17:56:34 1994
---- lib/numtohost.c Wed Jan 26 16:37:59 1994
-***************
-*** 2,6 ****
- * numtohost - convert network number to host name.
- */
-- #include "ntp_string.h"
- #include <netdb.h>
-
---- 2,5 ----
-*** /tmp/RCSA023460 Wed Jan 26 17:56:34 1994
---- lib/systime.c Wed Jan 26 16:33:33 1994
-***************
-*** 346,350 ****
- */
- if (oldtime != timetv.tv_sec) {
-! bzero((char *)&ut, sizeof(ut));
- ut.ut_type = OLD_TIME;
- ut.ut_time = oldtime;
---- 346,350 ----
- */
- if (oldtime != timetv.tv_sec) {
-! memset((char *)&ut, 0, sizeof(ut));
- ut.ut_type = OLD_TIME;
- ut.ut_time = oldtime;
-*** /tmp/RCSA023486 Wed Jan 26 17:56:35 1994
---- machines/bsdi Wed Jan 26 16:33:33 1994
-***************
-*** 1,5 ****
- RANLIB= ranlib
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_BSDI -DHAVE_TERMIOS
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
---- 1,5 ----
- RANLIB= ranlib
- DEFS_LOCAL=-DREFCLOCK
-! DEFS= -DSYS_BSDI
- AUTHDEFS= -DDES -DMD5
- CLOCKDEFS= -DLOCAL_CLOCK
-*** /tmp/RCSA023490 Wed Jan 26 17:56:36 1994
---- ntpdate/ntpdate.c Wed Jan 26 16:33:34 1994
-***************
-*** 168,173 ****
- int errflg;
- int c;
-! extern char *optarg;
-! extern int optind;
- extern char *Version;
-
---- 168,173 ----
- int errflg;
- int c;
-! extern char *ntp_optarg;
-! extern int ntp_optind;
- extern char *Version;
-
-***************
-*** 179,186 ****
- * Decode argument list
- */
-! while ((c = getopt_l(argc, argv, "a:bde:k:o:p:qst:v")) != EOF)
- switch (c) {
- case 'a':
-! c = atoi(optarg);
- sys_authenticate = 1;
- sys_authkey = (U_LONG)c;
---- 179,186 ----
- * Decode argument list
- */
-! while ((c = ntp_getopt(argc, argv, "a:bde:k:o:p:qst:v")) != EOF)
- switch (c) {
- case 'a':
-! c = atoi(ntp_optarg);
- sys_authenticate = 1;
- sys_authkey = (U_LONG)c;
-***************
-*** 193,201 ****
- break;
- case 'e':
-! if (!atolfp(optarg, &tmp)
- || tmp.l_ui != 0) {
- (void) fprintf(stderr,
- "%s: encryption delay %s is unlikely\n",
-! progname, optarg);
- errflg++;
- } else {
---- 193,201 ----
- break;
- case 'e':
-! if (!atolfp(ntp_optarg, &tmp)
- || tmp.l_ui != 0) {
- (void) fprintf(stderr,
- "%s: encryption delay %s is unlikely\n",
-! progname, ntp_optarg);
- errflg++;
- } else {
-***************
-*** 204,214 ****
- break;
- case 'k':
-! key_file = optarg;
- break;
- case 'o':
-! sys_version = atoi(optarg);
- break;
- case 'p':
-! c = atoi(optarg);
- if (c <= 0 || c > NTP_SHIFT) {
- (void) fprintf(stderr,
---- 204,214 ----
- break;
- case 'k':
-! key_file = ntp_optarg;
- break;
- case 'o':
-! sys_version = atoi(ntp_optarg);
- break;
- case 'p':
-! c = atoi(ntp_optarg);
- if (c <= 0 || c > NTP_SHIFT) {
- (void) fprintf(stderr,
-***************
-*** 227,234 ****
- break;
- case 't':
-! if (!atolfp(optarg, &tmp)) {
- (void) fprintf(stderr,
- "%s: timeout %s is undecodeable\n",
-! progname, optarg);
- errflg++;
- } else {
---- 227,234 ----
- break;
- case 't':
-! if (!atolfp(ntp_optarg, &tmp)) {
- (void) fprintf(stderr,
- "%s: timeout %s is undecodeable\n",
-! progname, ntp_optarg);
- errflg++;
- } else {
-***************
-*** 249,253 ****
- }
-
-! sys_maxservers = argc - optind;
- if (errflg || sys_maxservers == 0) {
- (void) fprintf(stderr,
---- 249,253 ----
- }
-
-! sys_maxservers = argc - ntp_optind;
- if (errflg || sys_maxservers == 0) {
- (void) fprintf(stderr,
-***************
-*** 294,299 ****
- * Add servers we are going to be polling
- */
-! for ( ; optind < argc; optind++)
-! addserver(argv[optind]);
-
- if (sys_numservers == 0) {
---- 294,299 ----
- * Add servers we are going to be polling
- */
-! for ( ; ntp_optind < argc; ntp_optind++)
-! addserver(argv[ntp_optind]);
-
- if (sys_numservers == 0) {
-***************
-*** 1031,1035 ****
-
- server = (struct server *)emalloc(sizeof(struct server));
-! bzero((char *)server, sizeof(struct server));
-
- server->srcadr.sin_family = AF_INET;
---- 1031,1035 ----
-
- server = (struct server *)emalloc(sizeof(struct server));
-! memset((char *)server, 0, sizeof(struct server));
-
- server->srcadr.sin_family = AF_INET;
-***************
-*** 1189,1193 ****
- struct sockaddr_in addr;
-
-! bzero((char *)&addr, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
---- 1189,1193 ----
- struct sockaddr_in addr;
-
-! memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
-***************
-*** 1483,1490 ****
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
-! bcopy(hp->h_addr, (char *)num, sizeof(U_LONG));
-! return 1;
- }
-! return 0;
- }
-
---- 1483,1490 ----
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
-! memmove((char *)num, hp->h_addr, sizeof(U_LONG));
-! return (1);
- }
-! return (0);
- }
-
-***************
-*** 1520,1524 ****
- if (pp->stratum == 1) {
- junk[4] = 0;
-! bcopy((char *)&pp->refid, junk, 4);
- str = junk;
- } else {
---- 1520,1524 ----
- if (pp->stratum == 1) {
- junk[4] = 0;
-! memmove(junk, (char *)&pp->refid, 4);
- str = junk;
- } else {
-*** /tmp/RCSA023494 Wed Jan 26 17:56:37 1994
---- ntpq/ntpq.c Wed Jan 26 16:33:34 1994
-***************
-*** 510,515 ****
- int c;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
-
- delay_time.l_ui = 0;
---- 510,515 ----
- int c;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- delay_time.l_ui = 0;
-***************
-*** 517,524 ****
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "c:dinp")) != EOF)
- switch (c) {
- case 'c':
-! ADDCMD(optarg);
- break;
- case 'd':
---- 517,524 ----
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "c:dinp")) != EOF)
- switch (c) {
- case 'c':
-! ADDCMD(ntp_optarg);
- break;
- case 'd':
-***************
-*** 544,552 ****
- exit(2);
- }
-! if (optind == argc) {
- ADDHOST(DEFHOST);
- } else {
-! for (; optind < argc; optind++)
-! ADDHOST(argv[optind]);
- }
-
---- 544,552 ----
- exit(2);
- }
-! if (ntp_optind == argc) {
- ADDHOST(DEFHOST);
- } else {
-! for (; ntp_optind < argc; ntp_optind++)
-! ADDHOST(argv[ntp_optind]);
- }
-
-***************
-*** 983,987 ****
- * Copy the data into the data buffer.
- */
-! bcopy((char *)rpkt.data, (char *)pktdata + offset, count);
-
- /*
---- 983,987 ----
- * Copy the data into the data buffer.
- */
-! memmove((char *)pktdata + offset, (char *)rpkt.data, count);
-
- /*
-***************
-*** 1051,1055 ****
- */
- if (qsize > 0) {
-! bcopy(qdata, (char *)qpkt.data, qsize);
- pktsize = qsize + CTL_HEADER_LEN;
- while (pktsize & (sizeof(U_LONG)-1)) {
---- 1051,1055 ----
- */
- if (qsize > 0) {
-! memmove((char *)qpkt.data, qdata, qsize);
- pktsize = qsize + CTL_HEADER_LEN;
- while (pktsize & (sizeof(U_LONG)-1)) {
-***************
-*** 1542,1546 ****
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
-! bcopy(hp->h_addr, (char *)num, sizeof(U_LONG));
- if (fullhost != 0)
- (void) strcpy(fullhost, hp->h_name);
---- 1542,1546 ----
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
-! memmove((char *)num, hp->h_addr, sizeof(U_LONG));
- if (fullhost != 0)
- (void) strcpy(fullhost, hp->h_name);
-*** /tmp/RCSA023494 Wed Jan 26 17:56:37 1994
---- ntpq/ntpq_ops.c Wed Jan 26 16:33:34 1994
-***************
-*** 218,221 ****
---- 218,222 ----
- /*
- * strsave - save a string
-+ * XXX - should be in libntp.a
- */
- static char *
-***************
-*** 232,237 ****
- }
-
-! bcopy(str, cp, len);
-! return cp;
- }
-
---- 233,238 ----
- }
-
-! memmove(cp, str, len);
-! return (cp);
- }
-
-***************
-*** 373,381 ****
- if (cp != data)
- *cp++ = ',';
-! bcopy(vl->name, cp, namelen);
- cp += namelen;
- if (valuelen != 0) {
- *cp++ = '=';
-! bcopy(vl->value, cp, valuelen);
- cp += valuelen;
- }
---- 374,382 ----
- if (cp != data)
- *cp++ = ',';
-! memmove(cp, vl->name, namelen);
- cp += namelen;
- if (valuelen != 0) {
- *cp++ = '=';
-! memmove(cp, vl->value, valuelen);
- cp += valuelen;
- }
-***************
-*** 601,605 ****
- return;
-
-! bzero((char *)tmplist, sizeof(tmplist));
- if (pcmd->nargs >= 2)
- doaddvlist(tmplist, pcmd->argval[1].string);
---- 602,606 ----
- return;
-
-! memset((char *)tmplist, 0, sizeof(tmplist));
- if (pcmd->nargs >= 2)
- doaddvlist(tmplist, pcmd->argval[1].string);
-***************
-*** 632,636 ****
- return;
-
-! bzero((char *)tmplist, sizeof(tmplist));
- doaddvlist(tmplist, pcmd->argval[1].string);
-
---- 633,637 ----
- return;
-
-! memset((char *)tmplist, 0, sizeof(tmplist));
- doaddvlist(tmplist, pcmd->argval[1].string);
-
-***************
-*** 691,695 ****
- return;
-
-! bzero((char *)tmplist, sizeof(tmplist));
- if (pcmd->nargs >= 2)
- doaddvlist(tmplist, pcmd->argval[1].string);
---- 692,696 ----
- return;
-
-! memset((char *)tmplist, 0, sizeof(tmplist));
- if (pcmd->nargs >= 2)
- doaddvlist(tmplist, pcmd->argval[1].string);
-***************
-*** 803,807 ****
- return;
-
-! bzero((char *)tmplist, sizeof(tmplist));
- if (pcmd->nargs >= 3)
- doaddvlist(tmplist, pcmd->argval[2].string);
---- 804,808 ----
- return;
-
-! memset((char *)tmplist, 0, sizeof(tmplist));
- if (pcmd->nargs >= 3)
- doaddvlist(tmplist, pcmd->argval[2].string);
-***************
-*** 1283,1287 ****
- extern struct ctl_var peer_var[];
-
-! bzero((char *)havevar, sizeof(havevar));
- gettstamp(&ts);
-
---- 1284,1288 ----
- extern struct ctl_var peer_var[];
-
-! memset((char *)havevar, 0, sizeof(havevar));
- gettstamp(&ts);
-
-*** /tmp/RCSA023500 Wed Jan 26 17:56:38 1994
---- ntptrace/ntptrace.c Wed Jan 26 16:33:35 1994
-***************
-*** 112,117 ****
- int errflg;
- int c;
-! extern char *optarg;
-! extern int optind;
- extern char *Version;
-
---- 112,117 ----
- int errflg;
- int c;
-! extern char *ntp_optarg;
-! extern int ntp_optind;
- extern char *Version;
-
-***************
-*** 122,126 ****
- * Decode argument list
- */
-! while ((c = getopt_l(argc, argv, "do:nr:t:v")) != EOF)
- switch (c) {
- case 'd':
---- 122,126 ----
- * Decode argument list
- */
-! while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 131,138 ****
- break;
- case 'o':
-! sys_version = atoi(optarg);
- break;
- case 'r':
-! sys_retries = atoi(optarg);
- if (sys_retries < 1) {
- (void)fprintf(stderr,
---- 131,138 ----
- break;
- case 'o':
-! sys_version = atoi(ntp_optarg);
- break;
- case 'r':
-! sys_retries = atoi(ntp_optarg);
- if (sys_retries < 1) {
- (void)fprintf(stderr,
-***************
-*** 143,147 ****
- break;
- case 't':
-! sys_timeout = atoi(optarg);
- if (sys_timeout < 1) {
- (void)fprintf(stderr,
---- 143,147 ----
- break;
- case 't':
-! sys_timeout = atoi(ntp_optarg);
- if (sys_timeout < 1) {
- (void)fprintf(stderr,
-***************
-*** 161,165 ****
- }
-
-! if (errflg || (argc - optind) > 1) {
- (void) fprintf(stderr,
- "usage: %s [-vnd] [-r retries] [-t timeout] [server]\n",
---- 161,165 ----
- }
-
-! if (errflg || (argc - ntp_optind) > 1) {
- (void) fprintf(stderr,
- "usage: %s [-vnd] [-r retries] [-t timeout] [server]\n",
-***************
-*** 183,188 ****
- syslog(LOG_NOTICE, "%s", Version);
-
-! if ((argc - optind) == 1)
-! firstserver = addservbyname(argv[optind]);
- else
- firstserver = addservbyname("localhost");
---- 183,188 ----
- syslog(LOG_NOTICE, "%s", Version);
-
-! if ((argc - ntp_optind) == 1)
-! firstserver = addservbyname(argv[ntp_optind]);
- else
- firstserver = addservbyname("localhost");
-***************
-*** 503,507 ****
-
- server = (struct server *)emalloc(sizeof(struct server));
-! bzero((char *)server, sizeof(struct server));
-
- server->srcadr.sin_family = AF_INET;
---- 503,507 ----
-
- server = (struct server *)emalloc(sizeof(struct server));
-! memset((char *)server, 0, sizeof(struct server));
-
- server->srcadr.sin_family = AF_INET;
-***************
-*** 617,621 ****
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
-! bcopy(hp->h_addr, (char *)num, sizeof(U_LONG));
- return 1;
- }
---- 617,621 ----
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
-! memmove((char *)num, hp->h_addr, sizeof(U_LONG));
- return 1;
- }
-***************
-*** 736,740 ****
- if (pp->stratum == 1) {
- junk[4] = 0;
-! bcopy((char *)&pp->refid, junk, 4);
- str = junk;
- (void) fprintf(fp, "'%s'", str);
---- 736,740 ----
- if (pp->stratum == 1) {
- junk[4] = 0;
-! memmove(junk, (char *)&pp->refid, 4);
- str = junk;
- (void) fprintf(fp, "'%s'", str);
-*** /tmp/RCSA023505 Wed Jan 26 17:56:39 1994
---- parse/util/testdcf.c Wed Jan 26 16:33:35 1994
-***************
-*** 353,357 ****
- }
-
-! bzero(term.c_cc, sizeof(term.c_cc));
- term.c_cc[VMIN] = 1;
- term.c_cflag = B50|CS8|CREAD|CLOCAL;
---- 353,357 ----
- }
-
-! memset(term.c_cc, 0, sizeof(term.c_cc));
- term.c_cc[VMIN] = 1;
- term.c_cflag = B50|CS8|CREAD|CLOCAL;
-*** /tmp/RCSA023510 Wed Jan 26 17:56:40 1994
---- ppsclock/ppstest/ppstest.c Wed Jan 26 16:33:35 1994
-***************
-*** 103,107 ****
- speed_t speed = B4800;
-
-! bzero((char *)&termios, sizeof(termios));
- termios.c_cflag = CS8 | CREAD | CLOCAL;
- termios.c_iflag = IGNCR;
---- 103,107 ----
- speed_t speed = B4800;
-
-! memset((char *)&termios, 0, sizeof(termios));
- termios.c_cflag = CS8 | CREAD | CLOCAL;
- termios.c_iflag = IGNCR;
-*** /tmp/RCSA023525 Wed Jan 26 17:56:43 1994
---- scripts/autoconf Wed Jan 26 16:33:35 1994
-***************
-*** 324,329 ****
- {
- test -n "$verbose" && \
-! echo ' defining' HAVE_UNISTD_H
-! DEFS="$DEFS -DHAVE_UNISTD_H=1"
- }
-
---- 324,329 ----
- {
- test -n "$verbose" && \
-! echo ' defining' NTP_POSIX_SOURCE
-! DEFS="$DEFS -DNTP_POSIX_SOURCE=1"
- }
-
-*** /tmp/RCSA023535 Wed Jan 26 17:56:46 1994
---- util/Makefile.tmpl Wed Jan 26 16:33:35 1994
-***************
-*** 33,37 ****
-
- tickadj: $(TKOBJS)
-! $(CC) $(COPTS) -o $@ $(TKOBJS) $(DAEMONLIBS) $(RESLIB) $(COMPAT)
-
- ntptime: $(NTOBJS)
---- 33,37 ----
-
- tickadj: $(TKOBJS)
-! $(CC) $(COPTS) -o $@ $(TKOBJS) $(LIB) $(DAEMONLIBS) $(RESLIB) $(COMPAT)
-
- ntptime: $(NTOBJS)
-*** /tmp/RCSA023535 Wed Jan 26 17:56:47 1994
---- util/ntptime.c Wed Jan 26 16:33:36 1994
-***************
-*** 38,42 ****
- extern int sigvec P((int, struct sigvec *, struct sigvec *));
- void pll_trap P((void));
-- extern int getopt_l P((int, char **, char *));
-
- static struct sigvec newsigsys; /* new sigvec status */
---- 38,41 ----
-***************
-*** 52,57 ****
- char *argv[];
- {
-! extern int optind;
-! extern char *optarg;
- int status;
- struct ntptimeval ntv;
---- 51,56 ----
- char *argv[];
- {
-! extern int ntp_optind;
-! extern char *ntp_optarg;
- int status;
- struct ntptimeval ntv;
-***************
-*** 67,71 ****
- ntx.mode = 0;
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, optargs)) != EOF) switch (c) {
- case 'c':
- cost++;
---- 66,70 ----
- ntx.mode = 0;
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, optargs)) != EOF) switch (c) {
- case 'c':
- cost++;
-***************
-*** 73,81 ****
- case 'e':
- ntx.mode |= ADJ_ESTERROR;
-! ntx.esterror = atoi(optarg);
- break;
- case 'f':
- ntx.mode |= ADJ_FREQUENCY;
-! ntx.frequency = (int) (atof(optarg) * (1 << SHIFT_USEC));
- if (ntx.frequency < (-100 << SHIFT_USEC)
- || ntx.frequency > ( 100 << SHIFT_USEC)) errflg++;
---- 72,81 ----
- case 'e':
- ntx.mode |= ADJ_ESTERROR;
-! ntx.esterror = atoi(ntp_optarg);
- break;
- case 'f':
- ntx.mode |= ADJ_FREQUENCY;
-! ntx.frequency = (int) (atof(ntp_optarg)
-! * (1 << SHIFT_USEC));
- if (ntx.frequency < (-100 << SHIFT_USEC)
- || ntx.frequency > ( 100 << SHIFT_USEC)) errflg++;
-***************
-*** 83,91 ****
- case 'm':
- ntx.mode |= ADJ_MAXERROR;
-! ntx.maxerror = atoi(optarg);
- break;
- case 'o':
- ntx.mode |= ADJ_OFFSET;
-! ntx.offset = atoi(optarg);
- break;
- case 'r':
---- 83,91 ----
- case 'm':
- ntx.mode |= ADJ_MAXERROR;
-! ntx.maxerror = atoi(ntp_optarg);
- break;
- case 'o':
- ntx.mode |= ADJ_OFFSET;
-! ntx.offset = atoi(ntp_optarg);
- break;
- case 'r':
-***************
-*** 94,98 ****
- case 's':
- ntx.mode |= ADJ_STATUS;
-! ntx.status = atoi(optarg);
- if (ntx.status < 0 || ntx.status > 4) errflg++;
- break;
---- 94,98 ----
- case 's':
- ntx.mode |= ADJ_STATUS;
-! ntx.status = atoi(ntp_optarg);
- if (ntx.status < 0 || ntx.status > 4) errflg++;
- break;
-***************
-*** 99,103 ****
- case 't':
- ntx.mode |= ADJ_TIMECONST;
-! ntx.time_constant = atoi(optarg);
- if (ntx.time_constant < 0 || ntx.time_constant > MAXTC)
- errflg++;
---- 99,103 ----
- case 't':
- ntx.mode |= ADJ_TIMECONST;
-! ntx.time_constant = atoi(ntp_optarg);
- if (ntx.time_constant < 0 || ntx.time_constant > MAXTC)
- errflg++;
-***************
-*** 106,110 ****
- errflg++;
- }
-! if (errflg || (optind != argc)) {
- (void) fprintf(stderr,
- "usage: %s [-%s]\n\n\
---- 106,110 ----
- errflg++;
- }
-! if (errflg || (ntp_optind != argc)) {
- (void) fprintf(stderr,
- "usage: %s [-%s]\n\n\
-*** /tmp/RCSA023535 Wed Jan 26 17:56:47 1994
---- util/tickadj.c Wed Jan 26 16:33:36 1994
-***************
-*** 62,68 ****
- static void writevar P((int, unsigned long, int));
- static void readvar P((int, unsigned long, int *));
-- #ifndef NTP_POSIX_SOURCE
-- extern int getopt P((int, char **, char *));
-- #endif
-
- /*
---- 62,65 ----
-***************
-*** 76,81 ****
- int c;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
- unsigned long tickadj_offset;
- unsigned long tick_offset;
---- 73,78 ----
- int c;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
- unsigned long tickadj_offset;
- unsigned long tick_offset;
-***************
-*** 95,99 ****
-
- progname = argv[0];
-! while ((c = getopt(argc, argv, "a:Adkqpst:")) != EOF)
- switch (c) {
- case 'd':
---- 92,96 ----
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "a:Adkqpst:")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 110,118 ****
- break;
- case 'a':
-! writetickadj = atoi(optarg);
- if (writetickadj <= 0) {
- (void) fprintf(stderr,
- "%s: unlikely value for tickadj: %s\n",
-! progname, optarg);
- errflg++;
- }
---- 107,115 ----
- break;
- case 'a':
-! writetickadj = atoi(ntp_optarg);
- if (writetickadj <= 0) {
- (void) fprintf(stderr,
- "%s: unlikely value for tickadj: %s\n",
-! progname, ntp_optarg);
- errflg++;
- }
-***************
-*** 125,133 ****
- break;
- case 't':
-! writetick = atoi(optarg);
- if (writetick <= 0) {
- (void) fprintf(stderr,
- "%s: unlikely value for tick: %s\n",
-! progname, optarg);
- errflg++;
- }
---- 122,130 ----
- break;
- case 't':
-! writetick = atoi(ntp_optarg);
- if (writetick <= 0) {
- (void) fprintf(stderr,
- "%s: unlikely value for tick: %s\n",
-! progname, ntp_optarg);
- errflg++;
- }
-***************
-*** 137,141 ****
- break;
- }
-! if (errflg || optind != argc) {
- (void) fprintf(stderr,
- "usage: %s [-Aqsp] [-a newadj] [-t newtick]\n", progname);
---- 134,138 ----
- break;
- }
-! if (errflg || ntp_optind != argc) {
- (void) fprintf(stderr,
- "usage: %s [-Aqsp] [-a newadj] [-t newtick]\n", progname);
-*** /tmp/RCSA023543 Wed Jan 26 17:56:49 1994
---- xntpd/ntp_config.c Wed Jan 26 16:33:36 1994
-***************
-*** 341,345 ****
- int errflg;
- int c;
-! extern int optind;
-
- debug = 0; /* no debugging by default */
---- 341,345 ----
- int errflg;
- int c;
-! extern int ntp_optind;
-
- debug = 0; /* no debugging by default */
-***************
-*** 353,357 ****
- * the terminal, but we won't know to do that until we've
- * parsed the command line. Do that now, crudely, and do it
-! * again later. Our getopt_l() is explicitly reusable, by the
- * way. Your own mileage may vary.
- */
---- 353,357 ----
- * the terminal, but we won't know to do that until we've
- * parsed the command line. Do that now, crudely, and do it
-! * again later. Our ntp_getopt() is explicitly reusable, by the
- * way. Your own mileage may vary.
- */
-***************
-*** 362,366 ****
- * Decode argument list
- */
-! while ((c = getopt_l(argc, argv, xntp_options)) != EOF)
- switch (c) {
- case 'd':
---- 362,366 ----
- * Decode argument list
- */
-! while ((c = ntp_getopt(argc, argv, xntp_options)) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 374,378 ****
- }
-
-! if (errflg || optind != argc) {
- (void) fprintf(stderr,
- "usage: %s [ -bd ] [ -c config_file ]\n", progname);
---- 374,378 ----
- }
-
-! if (errflg || ntp_optind != argc) {
- (void) fprintf(stderr,
- "usage: %s [ -bd ] [ -c config_file ]\n", progname);
-***************
-*** 379,383 ****
- exit(2);
- }
-! optind = 0; /* reset optind to restart getopt_l */
-
- if (debug) {
---- 379,383 ----
- exit(2);
- }
-! ntp_optind = 0; /* reset optind to restart ntp_getopt() */
-
- if (debug) {
-***************
-*** 427,432 ****
- int have_keyfile;
- char keyfile[MAXFILENAME];
-! extern int optind;
-! extern char *optarg;
- extern U_LONG info_auth_keyid;
- FILEGEN *filegen;
---- 427,432 ----
- int have_keyfile;
- char keyfile[MAXFILENAME];
-! extern int ntp_optind;
-! extern char *ntp_optarg;
- extern U_LONG info_auth_keyid;
- FILEGEN *filegen;
-***************
-*** 451,455 ****
- * Decode argument list
- */
-! while ((c = getopt_l(argc, argv, xntp_options)) != EOF) {
- switch (c) {
- case 'a':
---- 451,455 ----
- * Decode argument list
- */
-! while ((c = ntp_getopt(argc, argv, xntp_options)) != EOF) {
- switch (c) {
- case 'a':
-***************
-*** 460,464 ****
- break;
- case 'c':
-! config_file = optarg;
- break;
- case 'd':
---- 460,464 ----
- break;
- case 'c':
-! config_file = ntp_optarg;
- break;
- case 'd':
-***************
-*** 474,481 ****
- l_fp tmp;
-
-! if (!atolfp(optarg, &tmp)) {
- syslog(LOG_ERR,
- "command line encryption delay value %s undecodable",
-! optarg);
- errflg++;
- } else if (tmp.l_ui != 0) {
---- 474,481 ----
- l_fp tmp;
-
-! if (!atolfp(ntp_optarg, &tmp)) {
- syslog(LOG_ERR,
- "command line encryption delay value %s undecodable",
-! ntp_optarg);
- errflg++;
- } else if (tmp.l_ui != 0) {
-***************
-*** 482,486 ****
- syslog(LOG_ERR,
- "command line encryption delay value %s is unlikely",
-! optarg);
- errflg++;
- } else {
---- 482,486 ----
- syslog(LOG_ERR,
- "command line encryption delay value %s is unlikely",
-! ntp_optarg);
- errflg++;
- } else {
-***************
-*** 491,500 ****
-
- case 'f':
-! stats_config(STATS_FREQ_FILE, optarg);
- break;
-
- case 'k':
-! getauthkeys(optarg);
-! if ((int)strlen(optarg) >= MAXFILENAME) {
- syslog(LOG_ERR,
- "key file name too LONG (>%d, sigh), no name resolution possible",
---- 491,500 ----
-
- case 'f':
-! stats_config(STATS_FREQ_FILE, ntp_optarg);
- break;
-
- case 'k':
-! getauthkeys(ntp_optarg);
-! if ((int)strlen(ntp_optarg) >= MAXFILENAME) {
- syslog(LOG_ERR,
- "key file name too LONG (>%d, sigh), no name resolution possible",
-***************
-*** 502,506 ****
- } else {
- have_keyfile = 1;
-! (void)strcpy(keyfile, optarg);
- }
- break;
---- 502,506 ----
- } else {
- have_keyfile = 1;
-! (void)strcpy(keyfile, ntp_optarg);
- }
- break;
-***************
-*** 507,511 ****
-
- case 'p':
-! stats_config(STATS_PID_FILE, optarg);
- break;
-
---- 507,511 ----
-
- case 'p':
-! stats_config(STATS_PID_FILE, ntp_optarg);
- break;
-
-***************
-*** 514,525 ****
- l_fp tmp;
-
-! if (!atolfp(optarg, &tmp)) {
- syslog(LOG_ERR,
- "command line broadcast delay value %s undecodable",
-! optarg);
- } else if (tmp.l_ui != 0) {
- syslog(LOG_ERR,
- "command line broadcast delay value %s is unlikely",
-! optarg);
- } else {
- proto_config(PROTO_BROADDELAY, tmp.l_f);
---- 514,525 ----
- l_fp tmp;
-
-! if (!atolfp(ntp_optarg, &tmp)) {
- syslog(LOG_ERR,
- "command line broadcast delay value %s undecodable",
-! ntp_optarg);
- } else if (tmp.l_ui != 0) {
- syslog(LOG_ERR,
- "command line broadcast delay value %s is unlikely",
-! ntp_optarg);
- } else {
- proto_config(PROTO_BROADDELAY, tmp.l_f);
-***************
-*** 529,533 ****
-
- case 's':
-! stats_config(STATS_STATSDIR, optarg);
- break;
-
---- 529,533 ----
-
- case 's':
-! stats_config(STATS_STATSDIR, ntp_optarg);
- break;
-
-***************
-*** 536,544 ****
- int tkey;
-
-! tkey = atoi(optarg);
- if (tkey <= 0 || tkey > NTP_MAXKEY) {
- syslog(LOG_ERR,
- "command line trusted key %s is unlikely",
-! optarg);
- } else {
- authtrust(tkey, (LONG)1);
---- 536,544 ----
- int tkey;
-
-! tkey = atoi(ntp_optarg);
- if (tkey <= 0 || tkey > NTP_MAXKEY) {
- syslog(LOG_ERR,
- "command line trusted key %s is unlikely",
-! ntp_optarg);
- } else {
- authtrust(tkey, (LONG)1);
-***************
-*** 554,558 ****
- }
-
-! if (errflg || optind != argc) {
- (void) fprintf(stderr,
- "usage: %s [ -bd ] [ -c config_file ]\n", progname);
---- 554,558 ----
- }
-
-! if (errflg || ntp_optind != argc) {
- (void) fprintf(stderr,
- "usage: %s [ -bd ] [ -c config_file ]\n", progname);
-***************
-*** 1130,1134 ****
- }
-
-! bzero((char *)&clock, sizeof clock);
- errflg = 0;
- for (i = 2; i < ntokens-1; i++) {
---- 1130,1134 ----
- }
-
-! memset((char *)&clock, 0, sizeof clock);
- errflg = 0;
- for (i = 2; i < ntokens-1; i++) {
-***************
-*** 1582,1586 ****
- * make up socket address. Clear it out for neatness.
- */
-! bzero((char *)addr, sizeof(struct sockaddr_in));
- addr->sin_family = AF_INET;
- addr->sin_port = htons(NTP_PORT);
---- 1582,1586 ----
- * make up socket address. Clear it out for neatness.
- */
-! memset((char *)addr, 0, sizeof(struct sockaddr_in));
- addr->sin_family = AF_INET;
- addr->sin_port = htons(NTP_PORT);
-*** /tmp/RCSA023543 Wed Jan 26 17:56:49 1994
---- xntpd/ntp_control.c Wed Jan 26 16:33:36 1994
-***************
-*** 873,877 ****
- }
-
-! bcopy(dp, (char *)datapt, dlen);
- datapt += dlen;
- datalinelen += dlen;
---- 873,877 ----
- }
-
-! memmove((char *)datapt, dp, dlen);
- datapt += dlen;
- datalinelen += dlen;
-***************
-*** 901,905 ****
- if (len > (sizeof(buffer) - (cp - buffer) - 1))
- len = sizeof(buffer) - (cp - buffer) - 1;
-! bcopy(data, cp, len);
- cp += len;
- *cp++ = '"';
---- 901,905 ----
- if (len > (sizeof(buffer) - (cp - buffer) - 1))
- len = sizeof(buffer) - (cp - buffer) - 1;
-! memmove(cp, data, len);
- cp += len;
- *cp++ = '"';
-***************
-*** 1697,1701 ****
- if (res_authokay)
- ctl_sys_num_events = 0;
-! bzero((char *)wants, CS_MAXCODE+1);
- gotvar = 0;
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
---- 1697,1701 ----
- if (res_authokay)
- ctl_sys_num_events = 0;
-! memset((char *)wants, 0, CS_MAXCODE+1);
- gotvar = 0;
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
-***************
-*** 1733,1737 ****
- if (res_authokay)
- peer->num_events = 0;
-! bzero((char*)wants, CP_MAXCODE+1);
- gotvar = 0;
- while ((v = ctl_getitem(peer_var, &valuep)) != 0) {
---- 1733,1737 ----
- if (res_authokay)
- peer->num_events = 0;
-! memset((char*)wants, 0, CP_MAXCODE+1);
- gotvar = 0;
- while ((v = ctl_getitem(peer_var, &valuep)) != 0) {
-***************
-*** 1906,1910 ****
- rpkt.status = htons(ctlclkstatus(&clock));
- gotvar = 0;
-! bzero((char*)wants, CC_MAXCODE+1);
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- if (v->flags & EOV) {
---- 1906,1910 ----
- rpkt.status = htons(ctlclkstatus(&clock));
- gotvar = 0;
-! memset((char*)wants, 0, CC_MAXCODE+1);
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- if (v->flags & EOV) {
-*** /tmp/RCSA023543 Wed Jan 26 17:56:50 1994
---- xntpd/ntp_intres.c Wed Jan 26 16:33:37 1994
-***************
-*** 295,299 ****
- len = strlen(name) + 1;
- cp = emalloc((unsigned)len);
-! bcopy(name, cp, len);
-
- ce = (struct conf_entry *)emalloc(sizeof(struct conf_entry));
---- 295,299 ----
- len = strlen(name) + 1;
- cp = emalloc((unsigned)len);
-! memmove(cp, name, len);
-
- ce = (struct conf_entry *)emalloc(sizeof(struct conf_entry));
-***************
-*** 348,354 ****
-
- if (h_errno == TRY_AGAIN)
-! return 1;
- #endif
-! return 0;
- }
-
---- 348,354 ----
-
- if (h_errno == TRY_AGAIN)
-! return (1);
- #endif
-! return (0);
- }
-
-***************
-*** 358,364 ****
- * only return one.
- */
-! (void) bcopy(hp->h_addr, (char *)&(entry->ce_peeraddr),
-! sizeof(struct in_addr));
-! return 1;
- }
-
---- 358,365 ----
- * only return one.
- */
-! memmove((char *)&(entry->ce_peeraddr),
-! (char *)hp->h_addr,
-! sizeof(struct in_addr));
-! return (1);
- }
-
-***************
-*** 381,385 ****
- }
-
-! bzero((char *)&saddr, sizeof(saddr));
- saddr.sin_family = AF_INET;
- saddr.sin_port = htons(NTP_PORT); /* trash */
---- 382,386 ----
- }
-
-! memset((char *)&saddr, 0, sizeof(saddr));
- saddr.sin_family = AF_INET;
- saddr.sin_port = htons(NTP_PORT); /* trash */
-***************
-*** 449,453 ****
- * Make up a request packet with the configuration info
- */
-! bzero((char *)&reqpkt, sizeof(reqpkt));
-
- reqpkt.rm_vn_mode = RM_VN_MODE(0, 0);
---- 450,454 ----
- * Make up a request packet with the configuration info
- */
-! memset((char *)&reqpkt, 0, sizeof(reqpkt));
-
- reqpkt.rm_vn_mode = RM_VN_MODE(0, 0);
-***************
-*** 457,461 ****
- reqpkt.err_nitems = ERR_NITEMS(0, 1); /* one item */
- reqpkt.mbz_itemsize = MBZ_ITEMSIZE(sizeof(struct conf_peer));
-! bcopy((char *)conf, reqpkt.data, sizeof(struct conf_peer));
- reqpkt.keyid = htonl(req_keyid);
-
---- 458,462 ----
- reqpkt.err_nitems = ERR_NITEMS(0, 1); /* one item */
- reqpkt.mbz_itemsize = MBZ_ITEMSIZE(sizeof(struct conf_peer));
-! memmove(reqpkt.data, (char *)conf, sizeof(struct conf_peer));
- reqpkt.keyid = htonl(req_keyid);
-
-*** /tmp/RCSA023543 Wed Jan 26 17:56:50 1994
---- xntpd/ntp_monitor.c Wed Jan 26 16:33:37 1994
-***************
-*** 103,107 ****
- mon_hash = 0;
- mon_hash_count = 0;
-! bzero((char *)&mon_mru_list, sizeof mon_mru_list);
- }
-
---- 103,107 ----
- mon_hash = 0;
- mon_hash_count = 0;
-! memset((char *)&mon_mru_list, 0, sizeof mon_mru_list);
- }
-
-***************
-*** 122,126 ****
- mon_hash = (struct mon_data *)
- emalloc(MON_HASH_SIZE * sizeof(struct mon_data));
-! bzero((char *)mon_hash, MON_HASH_SIZE*sizeof(struct mon_data));
- mon_hash_count = (int *)emalloc(MON_HASH_SIZE * sizeof(int));
- mon_free_mem = 0;
---- 122,127 ----
- mon_hash = (struct mon_data *)
- emalloc(MON_HASH_SIZE * sizeof(struct mon_data));
-! memset((char *)mon_hash, 0,
-! MON_HASH_SIZE*sizeof(struct mon_data));
- mon_hash_count = (int *)emalloc(MON_HASH_SIZE * sizeof(int));
- mon_free_mem = 0;
-*** /tmp/RCSA023543 Wed Jan 26 17:56:50 1994
---- xntpd/ntp_peer.c Wed Jan 26 16:33:37 1994
-***************
-*** 440,444 ****
- * Zero the whole thing for now. We might be pickier later.
- */
-! bzero((char *)peer, sizeof(struct peer));
-
- peer->srcadr = *srcadr;
---- 440,444 ----
- * Zero the whole thing for now. We might be pickier later.
- */
-! memset((char *)peer, 0, sizeof(struct peer));
-
- peer->srcadr = *srcadr;
-*** /tmp/RCSA023543 Wed Jan 26 17:56:51 1994
---- xntpd/ntp_proto.c Wed Jan 26 16:33:37 1994
-***************
-*** 1079,1083 ****
- else {
- if (pps_control)
-! bcopy(PPSREFID, (char *)&sys_refid, 4);
- else
- sys_refid = peer->srcadr.sin_addr.s_addr;
---- 1079,1083 ----
- else {
- if (pps_control)
-! memmove((char *)&sys_refid, PPSREFID, 4);
- else
- sys_refid = peer->srcadr.sin_addr.s_addr;
-***************
-*** 1128,1132 ****
- sys_refid = peer->refid;
- else
-! bcopy(PPSREFID, (char *)&sys_refid, 4);
- }
- }
---- 1128,1132 ----
- sys_refid = peer->refid;
- else
-! memmove((char *)&sys_refid, PPSREFID, 4);
- }
- }
-***************
-*** 1251,1255 ****
- printf("clear(%s)\n", ntoa(&peer->srcadr));
- #endif
-! bzero(CLEAR_TO_ZERO(peer), LEN_CLEAR_TO_ZERO);
- peer->hpoll = peer->minpoll;
- peer->dispersion = NTP_MAXDISPERSE;
---- 1251,1255 ----
- printf("clear(%s)\n", ntoa(&peer->srcadr));
- #endif
-! memset(CLEAR_TO_ZERO(peer), 0, LEN_CLEAR_TO_ZERO);
- peer->hpoll = peer->minpoll;
- peer->dispersion = NTP_MAXDISPERSE;
-*** /tmp/RCSA023543 Wed Jan 26 17:56:51 1994
---- xntpd/ntp_request.c Wed Jan 26 16:33:38 1994
-***************
-*** 313,317 ****
- * Copy data out of exbuf into the packet.
- */
-! bcopy(exbuf, &rpkt.data[0], itemsize);
- seqno++;
- databytes = 0;
---- 313,317 ----
- * Copy data out of exbuf into the packet.
- */
-! memmove(&rpkt.data[0], exbuf, itemsize);
- seqno++;
- databytes = 0;
-***************
-*** 683,687 ****
- extern struct peer *sys_peer;
-
-! bzero((char *)&addr, sizeof addr);
- addr.sin_family = AF_INET;
- items = INFO_NITEMS(inpkt->err_nitems);
---- 683,687 ----
- extern struct peer *sys_peer;
-
-! memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- items = INFO_NITEMS(inpkt->err_nitems);
-***************
-*** 774,778 ****
- extern struct peer *sys_peer;
-
-! bzero((char *)&addr, sizeof addr);
- addr.sin_family = AF_INET;
- items = INFO_NITEMS(inpkt->err_nitems);
---- 774,778 ----
- extern struct peer *sys_peer;
-
-! memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- items = INFO_NITEMS(inpkt->err_nitems);
-***************
-*** 1142,1146 ****
- items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_peer *)inpkt->data;
-! bzero((char *)&peeraddr, sizeof(struct sockaddr_in));
- peeraddr.sin_family = AF_INET;
- peeraddr.sin_port = htons(NTP_PORT);
---- 1142,1146 ----
- items = INFO_NITEMS(inpkt->err_nitems);
- cp = (struct conf_peer *)inpkt->data;
-! memset((char *)&peeraddr, 0, sizeof(struct sockaddr_in));
- peeraddr.sin_family = AF_INET;
- peeraddr.sin_port = htons(NTP_PORT);
-***************
-*** 1452,1457 ****
- items = INFO_NITEMS(inpkt->err_nitems);
- cr = (struct conf_restrict *)inpkt->data;
-! bzero((char *)&matchaddr, sizeof(struct sockaddr_in));
-! bzero((char *)&matchmask, sizeof(struct sockaddr_in));
- matchaddr.sin_family = AF_INET;
- matchmask.sin_family = AF_INET;
---- 1452,1457 ----
- items = INFO_NITEMS(inpkt->err_nitems);
- cr = (struct conf_restrict *)inpkt->data;
-! memset((char *)&matchaddr, 0, sizeof(struct sockaddr_in));
-! memset((char *)&matchmask, 0, sizeof(struct sockaddr_in));
- matchaddr.sin_family = AF_INET;
- matchmask.sin_family = AF_INET;
-***************
-*** 1870,1874 ****
- * Prepare sockaddr_in structure
- */
-! bzero((char *)&laddr, sizeof laddr);
- laddr.sin_family = AF_INET;
- laddr.sin_port = ntohs(NTP_PORT);
---- 1870,1874 ----
- * Prepare sockaddr_in structure
- */
-! memset((char *)&laddr, 0, sizeof laddr);
- laddr.sin_family = AF_INET;
- laddr.sin_port = ntohs(NTP_PORT);
-***************
-*** 2096,2100 ****
- struct sockaddr_in addr;
-
-! bzero((char *)&addr, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
---- 2096,2100 ----
- struct sockaddr_in addr;
-
-! memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
-***************
-*** 2150,2155 ****
- struct sockaddr_in addr;
-
-! bzero((char *)&addr, sizeof addr);
-! bzero((char *)&clock, sizeof clock);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
---- 2150,2155 ----
- struct sockaddr_in addr;
-
-! memset((char *)&addr, 0, sizeof addr);
-! memset((char *)&clock, 0, sizeof clock);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
-***************
-*** 2287,2291 ****
- struct sockaddr_in addr;
-
-! bzero((char *)&addr, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
---- 2287,2291 ----
- struct sockaddr_in addr;
-
-! memset((char *)&addr, 0, sizeof addr);
- addr.sin_family = AF_INET;
- addr.sin_port = htons(NTP_PORT);
-***************
-*** 2304,2308 ****
- }
-
-! bzero((char *)&bug, sizeof bug);
- refclock_buginfo(&addr, &bug);
- if (bug.nvalues == 0 && bug.ntimes == 0) {
---- 2304,2308 ----
- }
-
-! memset((char *)&bug, 0, sizeof bug);
- refclock_buginfo(&addr, &bug);
- if (bug.nvalues == 0 && bug.ntimes == 0) {
-*** /tmp/RCSA023543 Wed Jan 26 17:56:52 1994
---- xntpd/ntp_restrict.c Wed Jan 26 16:33:38 1994
-***************
-*** 82,86 ****
- */
- resfree = 0;
-! bzero((char *)resinit, sizeof resinit);
-
- for (i = 1; i < INITRESLIST; i++) {
---- 82,86 ----
- */
- resfree = 0;
-! memset((char *)resinit, 0, sizeof resinit);
-
- for (i = 1; i < INITRESLIST; i++) {
-***************
-*** 235,239 ****
- rl = (struct restrictlist *) emalloc(
- INCRESLIST*sizeof(struct restrictlist));
-! bzero((char *)rl,
- INCRESLIST*sizeof(struct restrictlist));
-
---- 235,239 ----
- rl = (struct restrictlist *) emalloc(
- INCRESLIST*sizeof(struct restrictlist));
-! memset((char *)rl, 0,
- INCRESLIST*sizeof(struct restrictlist));
-
-***************
-*** 281,285 ****
- rlprev->next = rl->next;
- restrictcount--;
-! bzero((char *)rl, sizeof(struct restrictlist));
-
- rl->next = resfree;
---- 281,285 ----
- rlprev->next = rl->next;
- restrictcount--;
-! memset((char *)rl, 0, sizeof(struct restrictlist));
-
- rl->next = resfree;
-*** /tmp/RCSA023543 Wed Jan 26 17:56:52 1994
---- xntpd/ntp_util.c Wed Jan 26 16:33:39 1994
-***************
-*** 224,230 ****
- stats_drift_file = emalloc((u_int)(len + 1));
- stats_temp_file = emalloc((u_int)(len + sizeof(".TEMP")));
-! bcopy(value, stats_drift_file, len+1);
-! bcopy(value, stats_temp_file, len);
-! bcopy(".TEMP", stats_temp_file + len, sizeof(".TEMP"));
- L_CLR(&old_drift);
-
---- 224,230 ----
- stats_drift_file = emalloc((u_int)(len + 1));
- stats_temp_file = emalloc((u_int)(len + sizeof(".TEMP")));
-! memmove(stats_drift_file, value, len+1);
-! memmove(stats_temp_file, value, len);
-! memmove(stats_temp_file + len, ".TEMP", sizeof(".TEMP"));
- L_CLR(&old_drift);
-
-***************
-*** 450,454 ****
- key_file_name = emalloc((u_int)(len + 1));
-
-! bcopy(keyfile, key_file_name, len+1);
-
- authreadkeys(key_file_name);
---- 450,454 ----
- key_file_name = emalloc((u_int)(len + 1));
-
-! memmove(key_file_name, keyfile, len+1);
-
- authreadkeys(key_file_name);
-*** /tmp/RCSA023543 Wed Jan 26 17:56:52 1994
---- xntpd/refclock_as2201.c Wed Jan 26 16:33:39 1994
-***************
-*** 251,256 ****
- * Just zero the data arrays
- */
-! bzero((char *)gpsunits, sizeof gpsunits);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- /*
---- 251,256 ----
- * Just zero the data arrays
- */
-! memset((char *)gpsunits, 0, sizeof gpsunits);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 442,446 ****
- }
- }
-! bzero((char *)gps, sizeof(struct gpsunit));
- gpsunits[unit] = gps;
-
---- 442,446 ----
- }
- }
-! memset((char *)gps, 0, sizeof(struct gpsunit));
- gpsunits[unit] = gps;
-
-***************
-*** 480,484 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(GPSREFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(GPSHSREFID);
---- 480,484 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid, GPSREFID, 4);
- else
- peer->refid = htonl(GPSHSREFID);
-***************
-*** 908,913 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(GPSREFID, (char *)&peer->refid,
-! 4);
- else
- peer->refid = htonl(GPSHSREFID);
---- 908,913 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid,
-! GPSREFID, 4);
- else
- peer->refid = htonl(GPSHSREFID);
-*** /tmp/RCSA023543 Wed Jan 26 17:56:52 1994
---- xntpd/refclock_chu.c Wed Jan 26 16:33:39 1994
-***************
-*** 294,299 ****
- * Just zero the data arrays
- */
-! bzero((char *)chuunits, sizeof chuunits);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- /*
---- 294,299 ----
- * Just zero the data arrays
- */
-! memset((char *)chuunits, 0, sizeof chuunits);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 462,466 ****
- }
- }
-! bzero((char *)chu, sizeof(struct chuunit));
- chuunits[unit] = chu;
-
---- 462,466 ----
- }
- }
-! memset((char *)chu, 0, sizeof(struct chuunit));
- chuunits[unit] = chu;
-
-***************
-*** 499,507 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(CHUREFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(CHUHSREFID);
- unitinuse[unit] = 1;
-! return 1;
-
- /*
---- 499,507 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid, CHUREFID, 4);
- else
- peer->refid = htonl(CHUHSREFID);
- unitinuse[unit] = 1;
-! return (1);
-
- /*
-***************
-*** 1091,1095 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(CHUREFID, (char *)&peer->refid,4);
- else
- peer->refid = htonl(CHUHSREFID);
---- 1091,1096 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid,
-! CHUREFID, 4);
- else
- peer->refid = htonl(CHUHSREFID);
-*** /tmp/RCSA023543 Wed Jan 26 17:56:53 1994
---- xntpd/refclock_goes.c Wed Jan 26 16:33:39 1994
-***************
-*** 211,216 ****
- * Just zero the data arrays
- */
-! bzero((char *)goesunits, sizeof goesunits);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- /*
---- 211,216 ----
- * Just zero the data arrays
- */
-! memset((char *)goesunits, 0, sizeof goesunits);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 401,405 ****
- }
- }
-! bzero((char *)goes, sizeof(struct goesunit));
- goesunits[unit] = goes;
-
---- 401,405 ----
- }
- }
-! memset((char *)goes, 0, sizeof(struct goesunit));
- goesunits[unit] = goes;
-
-***************
-*** 429,433 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(GOESREFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(GOESHSREFID);
---- 429,433 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid, GOESREFID, 4);
- else
- peer->refid = htonl(GOESHSREFID);
-***************
-*** 924,929 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(GOESREFID, (char *)&peer->refid,
-! 4);
- else
- peer->refid = htonl(GOESHSREFID);
---- 924,929 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid,
-! GOESREFID, 4);
- else
- peer->refid = htonl(GOESHSREFID);
-*** /tmp/RCSA023543 Wed Jan 26 17:56:53 1994
---- xntpd/refclock_gpstm.c Wed Jan 26 16:52:22 1994
-***************
-*** 18,22 ****
- #ifdef SYS_BSDI
- #undef HAVE_BSD_TTYS
-- #define HAVE_POSIX_TTYS
- #include <sys/ioctl.h>
- #endif
---- 18,21 ----
-***************
-*** 30,34 ****
- #endif /* HAVE_SYSV_TTYS */
-
-! #if defined(HAVE_POSIX_TTYS)
- #include <termios.h>
- #endif
---- 29,33 ----
- #endif /* HAVE_SYSV_TTYS */
-
-! #if defined(HAVE_TERMIOS)
- #include <termios.h>
- #endif
-***************
-*** 203,208 ****
- * Just zero the data arrays
- */
-! bzero((char *)gpstm_units, sizeof gpstm_units);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- /*
---- 202,207 ----
- * Just zero the data arrays
- */
-! memset((char *)gpstm_units, 0, sizeof gpstm_units);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 278,282 ****
- }
- #endif /* HAVE_SYSV_TTYS */
-! #if defined(HAVE_POSIX_TTYS)
- /*
- * POSIX serial line parameters (termios interface)
---- 277,281 ----
- }
- #endif /* HAVE_SYSV_TTYS */
-! #if defined(HAVE_TERMIOS)
- /*
- * POSIX serial line parameters (termios interface)
-***************
-*** 331,335 ****
- #endif /* STREAM */
- }
-! #endif /* HAVE_POSIX_TTYS */
- #if defined(HAVE_BSD_TTYS)
- /*
---- 330,334 ----
- #endif /* STREAM */
- }
-! #endif /* HAVE_TERMIOS */
- #if defined(HAVE_BSD_TTYS)
- /*
-***************
-*** 393,397 ****
- }
- }
-! bzero((char *)gpstm, sizeof(struct gpstm_unit));
- gpstm_units[unit] = gpstm;
-
---- 392,396 ----
- }
- }
-! memset((char *)gpstm, 0, sizeof(struct gpstm_unit));
- gpstm_units[unit] = gpstm;
-
-***************
-*** 420,424 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(REFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(HSREFID);
---- 419,423 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid, REFID, 4);
- else
- peer->refid = htonl(HSREFID);
-***************
-*** 928,932 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(REFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(HSREFID);
---- 927,932 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid,
-! REFID, 4);
- else
- peer->refid = htonl(HSREFID);
-*** /tmp/RCSA023543 Wed Jan 26 17:56:53 1994
---- xntpd/refclock_irig.c Wed Jan 26 16:33:40 1994
-***************
-*** 170,175 ****
- * Just zero the data arrays
- */
-! bzero((char *) irigunits, sizeof irigunits);
-! bzero((char *) unitinuse, sizeof unitinuse);
-
- /*
---- 170,175 ----
- * Just zero the data arrays
- */
-! memset((char *) irigunits, 0, sizeof irigunits);
-! memset((char *) unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 251,255 ****
- }
- }
-! bzero((char *) irig, sizeof(struct irigunit));
-
- irigunits[unit] = irig;
---- 251,255 ----
- }
- }
-! memset((char *) irig, 0, sizeof(struct irigunit));
-
- irigunits[unit] = irig;
-***************
-*** 277,281 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(IRIGREFID, (char *) &peer->refid, 4);
- else
- peer->refid = htonl(IRIGHSREFID);
---- 277,281 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *) &peer->refid, IRIGREFID, 4);
- else
- peer->refid = htonl(IRIGHSREFID);
-***************
-*** 486,491 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(IRIGREFID, (char *) &peer->refid,
-! 4);
- else
- peer->refid = htonl(IRIGHSREFID);
---- 486,491 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *) &peer->refid,
-! IRIGREFID, 4);
- else
- peer->refid = htonl(IRIGHSREFID);
-*** /tmp/RCSA023543 Wed Jan 26 17:56:53 1994
---- xntpd/refclock_leitch.c Wed Jan 26 16:33:40 1994
-***************
-*** 145,150 ****
- leitch_init()
- {
-! bzero((char*)leitchunits,sizeof(leitchunits));
-! bzero((char*)unitinuse,sizeof(unitinuse));
- }
-
---- 145,150 ----
- leitch_init()
- {
-! memset((char*)leitchunits, 0, sizeof(leitchunits));
-! memset((char*)unitinuse, 0, sizeof(unitinuse));
- }
-
-***************
-*** 271,275 ****
-
- leitch = &leitchunits[unit];
-! bzero((char*)leitch,sizeof(*leitch));
-
- #if defined(HAVE_SYSV_TTYS)
---- 271,275 ----
-
- leitch = &leitchunits[unit];
-! memset((char*)leitch, 0, sizeof(*leitch));
-
- #if defined(HAVE_SYSV_TTYS)
-*** /tmp/RCSA023543 Wed Jan 26 17:56:54 1994
---- xntpd/refclock_local.c Wed Jan 26 16:33:40 1994
-***************
-*** 101,106 ****
- * Just zero the data arrays
- */
-! bzero((char *)lclunits, sizeof lclunits);
-! bzero((char *)unitinuse, sizeof unitinuse);
- }
-
---- 101,106 ----
- * Just zero the data arrays
- */
-! memset((char *)lclunits, 0, sizeof lclunits);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
- }
-
-***************
-*** 149,153 ****
- }
- }
-! bzero((char *)lcl, sizeof(struct lclunit));
- lclunits[unit] = lcl;
-
---- 149,153 ----
- }
- }
-! memset((char *)lcl, 0, sizeof(struct lclunit));
- lclunits[unit] = lcl;
-
-***************
-*** 167,171 ****
- peer->stratum = (u_char)unit;
- if (unit <= 1)
-! bcopy(LCLREFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(LCLHSREFID);
---- 167,171 ----
- peer->stratum = (u_char)unit;
- if (unit <= 1)
-! memmove((char *)&peer->refid, LCLREFID, 4);
- else
- peer->refid = htonl(LCLHSREFID);
-*** /tmp/RCSA023576 Wed Jan 26 17:56:54 1994
---- xntpd/refclock_msfees.c Wed Jan 26 16:33:41 1994
-***************
-*** 380,385 ****
- register int i;
- /* Just zero the data arrays */
-! bzero((char *)eesunits, sizeof eesunits);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- acceptable_slop.l_ui = 0;
---- 380,385 ----
- register int i;
- /* Just zero the data arrays */
-! memset((char *)eesunits, 0, sizeof eesunits);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- acceptable_slop.l_ui = 0;
-***************
-*** 507,511 ****
- else ees = (struct eesunit *) emalloc(sizeof(struct eesunit));
- }
-! bzero((char *)ees, sizeof(struct eesunit));
- eesunits[unit] = ees;
-
---- 507,511 ----
- else ees = (struct eesunit *) emalloc(sizeof(struct eesunit));
- }
-! memset((char *)ees, 0, sizeof(struct eesunit));
- eesunits[unit] = ees;
-
-***************
-*** 548,553 ****
- if (!io_addclock(&ees->io)) {
- /* Oh shit. Just close and return. */
-! syslog(LOG_ERR, "ees clock: io_addclock(%s): %m",
-! eesdev);
- goto screwed;
- }
---- 548,552 ----
- if (!io_addclock(&ees->io)) {
- /* Oh shit. Just close and return. */
-! syslog(LOG_ERR, "ees clock: io_addclock(%s): %m", eesdev);
- goto screwed;
- }
-***************
-*** 560,575 ****
- peer->rootdelay = 0; /* ++++ */
- peer->rootdispersion = 0; /* ++++ */
-! if (stratumtouse[unit] <= 1)
-! { bcopy(EESREFID, (char *)&peer->refid, 4);
-! if (unit>0 && unit<10) ((char *)&peer->refid)[3] = '0' + unit;
- }
-- else peer->refid = htonl(EESHSREFID);
- unitinuse[unit] = 1;
- syslog(LOG_ERR, "ees clock: %s OK on %d", eesdev, unit);
-! return 1;
-
- screwed:
-! if (fd232 != -1) (void) close(fd232);
-! return 0;
- }
-
---- 559,577 ----
- peer->rootdelay = 0; /* ++++ */
- peer->rootdispersion = 0; /* ++++ */
-! if (stratumtouse[unit] <= 1) {
-! memmove((char *)&peer->refid, EESREFID, 4);
-! if (unit > 0 && unit < 10)
-! ((char *)&peer->refid)[3] = '0' + unit;
-! } else {
-! peer->refid = htonl(EESHSREFID);
- }
- unitinuse[unit] = 1;
- syslog(LOG_ERR, "ees clock: %s OK on %d", eesdev, unit);
-! return (1);
-
- screwed:
-! if (fd232 != -1)
-! (void) close(fd232);
-! return (0);
- }
-
-***************
-*** 860,864 ****
- sincelast = this_uisec - ees->last_step;
-
-! bzero(&ppsclockev, sizeof ppsclockev);
-
- rc = ioctl(ees->io.fd, CIOGETEV, (char *) &ppsclockev);
---- 862,866 ----
- sincelast = this_uisec - ees->last_step;
-
-! memset(&ppsclockev, 0, sizeof ppsclockev);
-
- rc = ioctl(ees->io.fd, CIOGETEV, (char *) &ppsclockev);
-***************
-*** 1444,1449 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1) {
-! bcopy(EESREFID, (char *)&peer->refid,
-! 4);
- if (unit>0 && unit<10)
- ((char *)&peer->refid)[3] =
---- 1446,1451 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1) {
-! memmove((char *)&peer->refid,
-! EESREFID, 4);
- if (unit>0 && unit<10)
- ((char *)&peer->refid)[3] =
-*** /tmp/RCSA023576 Wed Jan 26 17:56:55 1994
---- xntpd/refclock_mx4200.c Wed Jan 26 16:33:41 1994
-***************
-*** 263,268 ****
- * Just zero the data arrays
- */
-! bzero((char *)mx4200units, sizeof mx4200units);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- /*
---- 263,268 ----
- * Just zero the data arrays
- */
-! memset((char *)mx4200units, 0, sizeof mx4200units);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 487,491 ****
- }
-
-! bzero((char *)mx4200, sizeof(struct mx4200unit));
- mx4200units[unit] = mx4200;
-
---- 487,491 ----
- }
-
-! memset((char *)mx4200, 0, sizeof(struct mx4200unit));
- mx4200units[unit] = mx4200;
-
-***************
-*** 513,517 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(MX4200REFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(MX4200HSREFID);
---- 513,517 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid, MX4200REFID, 4);
- else
- peer->refid = htonl(MX4200HSREFID);
-***************
-*** 702,706 ****
- return;
- mx4200->lencode = n;
-! bcopy(dpt, mx4200->lastcode, n);
-
- /*
---- 702,706 ----
- return;
- mx4200->lencode = n;
-! memmove(mx4200->lastcode, dpt, n);
-
- /*
-***************
-*** 1052,1057 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(MX4200REFID, (char *)&peer->refid,
-! 4);
- else
- peer->refid = htonl(MX4200HSREFID);
---- 1052,1057 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid,
-! MX4200REFID, 4);
- else
- peer->refid = htonl(MX4200HSREFID);
-***************
-*** 1116,1120 ****
- mx4200 = mx4200units[unit];
-
-! bzero((char *)bug, sizeof(*bug));
- bug->nvalues = 10;
- bug->ntimes = 2;
---- 1116,1120 ----
- mx4200 = mx4200units[unit];
-
-! memset((char *)bug, 0, sizeof(*bug));
- bug->nvalues = 10;
- bug->ntimes = 2;
-***************
-*** 1212,1216 ****
-
- cp = buf;
-! bzero((char *)jt, sizeof(*jt));
-
- if ((cp = strchr(cp, ',')) == NULL)
---- 1212,1216 ----
-
- cp = buf;
-! memset((char *)jt, 0, sizeof(*jt));
-
- if ((cp = strchr(cp, ',')) == NULL)
-*** /tmp/RCSA023576 Wed Jan 26 17:56:55 1994
---- xntpd/refclock_omega.c Wed Jan 26 16:33:42 1994
-***************
-*** 227,232 ****
- * Just zero the data arrays
- */
-! bzero((char *)omegaunits, sizeof omegaunits);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- /*
---- 227,232 ----
- * Just zero the data arrays
- */
-! memset((char *)omegaunits, 0, sizeof omegaunits);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 417,421 ****
- }
- }
-! bzero((char *)omega, sizeof(struct omegaunit));
- omegaunits[unit] = omega;
-
---- 417,421 ----
- }
- }
-! memset((char *)omega, 0, sizeof(struct omegaunit));
- omegaunits[unit] = omega;
-
-***************
-*** 445,449 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(OMEGAREFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(OMEGAHSREFID);
---- 445,449 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid, OMEGAREFID, 4);
- else
- peer->refid = htonl(OMEGAHSREFID);
-***************
-*** 928,933 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(OMEGAREFID, (char *)&peer->refid,
-! 4);
- else
- peer->refid = htonl(OMEGAHSREFID);
---- 928,933 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid,
-! OMEGAREFID, 4);
- else
- peer->refid = htonl(OMEGAHSREFID);
-*** /tmp/RCSA023576 Wed Jan 26 17:56:56 1994
---- xntpd/refclock_parse.c Wed Jan 26 16:33:42 1994
-***************
-*** 1068,1072 ****
- return;
- }
-! bcopy((caddr_t)&rbufp->recv_space, (caddr_t)&parsetime, sizeof(parsetime_t));
-
- /*
---- 1068,1074 ----
- return;
- }
-! memmove((caddr_t)&parsetime,
-! (caddr_t)&rbufp->recv_space,
-! sizeof(parsetime_t));
-
- /*
-***************
-*** 2009,2013 ****
- parse_init()
- {
-! bzero((caddr_t)parseunits, sizeof parseunits);
- }
-
---- 2011,2015 ----
- parse_init()
- {
-! memset((caddr_t)parseunits, 0, sizeof parseunits);
- }
-
-***************
-*** 2169,2173 ****
- }
-
-! bzero((char *)parse, sizeof(struct parseunit));
- parseunits[unit] = parse;
-
---- 2171,2175 ----
- }
-
-! memset((char *)parse, 0, sizeof(struct parseunit));
- parseunits[unit] = parse;
-
-***************
-*** 2204,2208 ****
- peer->stratum = STRATUM_REFCLOCK;
- if (peer->stratum <= 1)
-! bcopy(parse->parse_type->cl_id, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(PARSEHSREFID);
---- 2206,2210 ----
- peer->stratum = STRATUM_REFCLOCK;
- if (peer->stratum <= 1)
-! memmove((char *)&peer->refid, parse->parse_type->cl_id, 4);
- else
- peer->refid = htonl(PARSEHSREFID);
-***************
-*** 2233,2237 ****
- {
- #ifndef _PC_VDISABLE
-! bzero((char *)tm.c_cc, sizeof(tm.c_cc));
- #else
- int disablec;
---- 2235,2239 ----
- {
- #ifndef _PC_VDISABLE
-! memset((char *)tm.c_cc, 0, sizeof(tm.c_cc));
- #else
- int disablec;
-***************
-*** 2587,2591 ****
- parse->peer->stratum = (u_char)(in->fudgeval1 & 0xf);
- if (parse->peer->stratum <= 1)
-! bcopy(parse->parse_type->cl_id, (char *)&parse->peer->refid, 4);
- else
- parse->peer->refid = htonl(PARSEHSREFID);
---- 2589,2595 ----
- parse->peer->stratum = (u_char)(in->fudgeval1 & 0xf);
- if (parse->peer->stratum <= 1)
-! memmove((char *)&parse->peer->refid,
-! parse->parse_type->cl_id,
-! 4);
- else
- parse->peer->refid = htonl(PARSEHSREFID);
-***************
-*** 3280,3284 ****
- {
- parse->localdata = (void *)malloc(sizeof(poll_timer_t));
-! bzero((char *)parse->localdata, sizeof(poll_timer_t));
-
- pt = (poll_timer_t *)parse->localdata;
---- 3284,3288 ----
- {
- parse->localdata = (void *)malloc(sizeof(poll_timer_t));
-! memset((char *)parse->localdata, 0, sizeof(poll_timer_t));
-
- pt = (poll_timer_t *)parse->localdata;
-*** /tmp/RCSA023576 Wed Jan 26 17:56:56 1994
---- xntpd/refclock_pst.c Wed Jan 26 16:33:42 1994
-***************
-*** 438,443 ****
- * Just zero the data arrays
- */
-! bzero((char *)pstunits, sizeof pstunits);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- /*
---- 438,443 ----
- * Just zero the data arrays
- */
-! memset((char *)pstunits, 0, sizeof pstunits);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 630,634 ****
- }
- }
-! bzero((char *)pst, sizeof(struct pstunit));
- pstunits[unit] = pst;
-
---- 630,634 ----
- }
- }
-! memset((char *)pst, 0, sizeof(struct pstunit));
- pstunits[unit] = pst;
-
-***************
-*** 663,667 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(WWVREFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(PSTHSREFID);
---- 663,667 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid, WWVREFID, 4);
- else
- peer->refid = htonl(PSTHSREFID);
-***************
-*** 1461,1467 ****
- if (stratumtouse[pst->unit] <= 1) {
- if (pst->station >= 0)
-! bcopy(WWVREFID, (char *)&pst->peer->refid, 4);
- else
-! bcopy(WWVHREFID, (char *)&pst->peer->refid, 4);
- }
-
---- 1461,1467 ----
- if (stratumtouse[pst->unit] <= 1) {
- if (pst->station >= 0)
-! memmove((char *)&pst->peer->refid, WWVREFID, 4);
- else
-! memmove((char *)&pst->peer->refid, WWVHREFID, 4);
- }
-
-*** /tmp/RCSA023576 Wed Jan 26 17:56:57 1994
---- xntpd/refclock_tpro.c Wed Jan 26 16:33:43 1994
-***************
-*** 131,136 ****
- * Just zero the data arrays
- */
-! bzero((char *)tprounits, sizeof tprounits);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- /*
---- 131,136 ----
- * Just zero the data arrays
- */
-! memset((char *)tprounits, 0, sizeof tprounits);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 201,205 ****
- }
- }
-! bzero((char *)tpro, sizeof(struct tprounit));
- tprounits[unit] = tpro;
-
---- 201,205 ----
- }
- }
-! memset((char *)tpro, 0, sizeof(struct tprounit));
- tprounits[unit] = tpro;
-
-***************
-*** 226,230 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(TPROREFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(TPROHSREFID);
---- 226,230 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid, TPROREFID, 4);
- else
- peer->refid = htonl(TPROHSREFID);
-***************
-*** 416,421 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(TPROREFID, (char *)&peer->refid,
-! 4);
- else
- peer->refid = htonl(TPROHSREFID);
---- 416,421 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid,
-! TPROREFID, 4);
- else
- peer->refid = htonl(TPROHSREFID);
-*** /tmp/RCSA023576 Wed Jan 26 17:56:57 1994
---- xntpd/refclock_wwvb.c Wed Jan 26 16:33:43 1994
-***************
-*** 220,225 ****
- * Just zero the data arrays
- */
-! bzero((char *)wwvbunits, sizeof wwvbunits);
-! bzero((char *)unitinuse, sizeof unitinuse);
-
- /*
---- 220,225 ----
- * Just zero the data arrays
- */
-! memset((char *)wwvbunits, 0, sizeof wwvbunits);
-! memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
-***************
-*** 408,412 ****
- }
- }
-! bzero((char *)wwvb, sizeof(struct wwvbunit));
- wwvbunits[unit] = wwvb;
-
---- 408,412 ----
- }
- }
-! memset((char *)wwvb, 0, sizeof(struct wwvbunit));
- wwvbunits[unit] = wwvb;
-
-***************
-*** 436,440 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(WWVBREFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(WWVBHSREFID);
---- 436,440 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid, WWVBREFID, 4);
- else
- peer->refid = htonl(WWVBHSREFID);
-***************
-*** 957,962 ****
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! bcopy(WWVBREFID, (char *)&peer->refid,
-! 4);
- else
- peer->refid = htonl(WWVBHSREFID);
---- 957,962 ----
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
-! memmove((char *)&peer->refid,
-! WWVBREFID, 4);
- else
- peer->refid = htonl(WWVBHSREFID);
-*** /tmp/RCSA023592 Wed Jan 26 17:56:58 1994
---- xntpdc/ntpdc.c Wed Jan 26 16:33:43 1994
-***************
-*** 222,227 ****
- int c;
- int errflg = 0;
-! extern int optind;
-! extern char *optarg;
-
- delay_time.l_ui = 0;
---- 222,227 ----
- int c;
- int errflg = 0;
-! extern int ntp_optind;
-! extern char *ntp_optarg;
-
- delay_time.l_ui = 0;
-***************
-*** 229,236 ****
-
- progname = argv[0];
-! while ((c = getopt_l(argc, argv, "c:dilnps")) != EOF)
- switch (c) {
- case 'c':
-! ADDCMD(optarg);
- break;
- case 'd':
---- 229,236 ----
-
- progname = argv[0];
-! while ((c = ntp_getopt(argc, argv, "c:dilnps")) != EOF)
- switch (c) {
- case 'c':
-! ADDCMD(ntp_optarg);
- break;
- case 'd':
-***************
-*** 262,270 ****
- exit(2);
- }
-! if (optind == argc) {
- ADDHOST(DEFHOST);
- } else {
-! for (; optind < argc; optind++)
-! ADDHOST(argv[optind]);
- }
-
---- 262,270 ----
- exit(2);
- }
-! if (ntp_optind == argc) {
- ADDHOST(DEFHOST);
- } else {
-! for (; ntp_optind < argc; ntp_optind++)
-! ADDHOST(argv[ntp_optind]);
- }
-
-***************
-*** 440,444 ****
- *rdata = datap = pktdata;
- lastseq = 999; /* too big to be a sequence number */
-! bzero(haveseq, sizeof(haveseq));
- FD_ZERO(&fds);
-
---- 440,444 ----
- *rdata = datap = pktdata;
- lastseq = 999; /* too big to be a sequence number */
-! memset(haveseq, 0, sizeof(haveseq));
- FD_ZERO(&fds);
-
-***************
-*** 601,605 ****
- if ((datap + datasize) > (pktdata + pktdatasize))
- growpktdata();
-! bcopy((char *)rpkt.data, datap, datasize);
- datap += datasize;
- if (firstpkt) {
---- 601,605 ----
- if ((datap + datasize) > (pktdata + pktdatasize))
- growpktdata();
-! memmove(datap, (char *)rpkt.data, datasize);
- datap += datasize;
- if (firstpkt) {
-***************
-*** 635,639 ****
- int datasize;
-
-! bzero((char *)&qpkt, sizeof qpkt);
-
- qpkt.rm_vn_mode = RM_VN_MODE(0, 0);
---- 635,639 ----
- int datasize;
-
-! memset((char *)&qpkt, 0, sizeof qpkt);
-
- qpkt.rm_vn_mode = RM_VN_MODE(0, 0);
-***************
-*** 643,647 ****
- datasize = qitems * qsize;
- if (datasize != 0 && qdata != NULL) {
-! bcopy(qdata, (char *)qpkt.data, datasize);
- qpkt.err_nitems = ERR_NITEMS(0, qitems);
- qpkt.mbz_itemsize = MBZ_ITEMSIZE(qsize);
---- 643,647 ----
- datasize = qitems * qsize;
- if (datasize != 0 && qdata != NULL) {
-! memmove((char *)qpkt.data, qdata, datasize);
- qpkt.err_nitems = ERR_NITEMS(0, qitems);
- qpkt.mbz_itemsize = MBZ_ITEMSIZE(qsize);
-***************
-*** 1092,1096 ****
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
-! bcopy(hp->h_addr, (char *)num, sizeof(U_LONG));
- if (fullhost != 0)
- (void) strcpy(fullhost, hp->h_name);
---- 1092,1096 ----
- return 1;
- } else if ((hp = gethostbyname(host)) != 0) {
-! memmove((char *)num, hp->h_addr, sizeof(U_LONG));
- if (fullhost != 0)
- (void) strcpy(fullhost, hp->h_name);
-*** /tmp/RCSA023592 Wed Jan 26 17:56:58 1994
---- xntpdc/ntpdc_ops.c Wed Jan 26 16:33:44 1994
-***************
-*** 443,447 ****
- if (pp->stratum <= 1) {
- junk[4] = 0;
-! bcopy((char *)&pp->refid, junk, 4);
- str = junk;
- } else {
---- 443,447 ----
- if (pp->stratum <= 1) {
- junk[4] = 0;
-! memmove(junk, (char *)&pp->refid, 4);
- str = junk;
- } else {
-***************
-*** 789,793 ****
- if (is->stratum <= 1) {
- junk[4] = 0;
-! bcopy((char *)&is->refid, junk, 4);
- str = junk;
- } else {
---- 789,793 ----
- if (is->stratum <= 1) {
- junk[4] = 0;
-! memmove(junk, (char *)&is->refid, 4);
- str = junk;
- } else {
-***************
-*** 2193,2197 ****
-
- err = 0;
-! bzero((char *)&fudgedata, sizeof fudgedata);
- fudgedata.clockadr = pcmd->argval[0].netnum;
-
---- 2193,2197 ----
-
- err = 0;
-! memset((char *)&fudgedata, 0, sizeof fudgedata);
- fudgedata.clockadr = pcmd->argval[0].netnum;
-
-*** /tmp/RCSA023598 Wed Jan 26 17:56:59 1994
---- xntpres/xntpres.c Wed Jan 26 16:33:44 1994
-***************
-*** 149,153 ****
- char *cp;
- FILE *in;
-! extern int optind;
-
- progname = argv[0];
---- 149,153 ----
- char *cp;
- FILE *in;
-! extern int ntp_optind;
-
- progname = argv[0];
-***************
-*** 181,185 ****
- syslog(LOG_NOTICE, Version);
-
-! while ((c = getopt_l(argc, argv, "dr")) != EOF)
- switch (c) {
- case 'd':
---- 181,185 ----
- syslog(LOG_NOTICE, Version);
-
-! while ((c = ntp_getopt(argc, argv, "dr")) != EOF)
- switch (c) {
- case 'd':
-***************
-*** 193,197 ****
- break;
- }
-! if (errflg || (optind + 3) != argc) {
- (void) fprintf(stderr,
- "usage: %s [-d] [-r] keyid keyfile conffile\n", progname);
---- 193,197 ----
- break;
- }
-! if (errflg || (ntp_optind + 3) != argc) {
- (void) fprintf(stderr,
- "usage: %s [-d] [-r] keyid keyfile conffile\n", progname);
-***************
-*** 200,210 ****
- }
-
-! if (!atouint(argv[optind], &req_keyid)) {
-! syslog(LOG_ERR, "undecodeable keyid %s", argv[optind]);
- exit(1);
- }
-
-! keyfile = argv[optind+1];
-! conffile = argv[optind+2];
-
- /*
---- 200,210 ----
- }
-
-! if (!atouint(argv[ntp_optind], &req_keyid)) {
-! syslog(LOG_ERR, "undecodeable keyid %s", argv[ntp_optind]);
- exit(1);
- }
-
-! keyfile = argv[ntp_optind+1];
-! conffile = argv[ntp_optind+2];
-
- /*
-***************
-*** 354,358 ****
- len = strlen(name) + 1;
- cp = emalloc((unsigned)len);
-! bcopy(name, cp, len);
-
- ce = (struct conf_entry *)emalloc(sizeof(struct conf_entry));
---- 354,358 ----
- len = strlen(name) + 1;
- cp = emalloc((unsigned)len);
-! memmove(cp, name, len);
-
- ce = (struct conf_entry *)emalloc(sizeof(struct conf_entry));
-***************
-*** 409,413 ****
- return 1;
- #endif
-! return 0;
- }
-
---- 409,413 ----
- return 1;
- #endif
-! return (0);
- }
-
-***************
-*** 417,423 ****
- * only return one.
- */
-! (void) bcopy(hp->h_addr, (char *)&(entry->ce_peeraddr),
-! sizeof(struct in_addr));
-! return 1;
- }
-
---- 417,424 ----
- * only return one.
- */
-! memmove((char *)&(entry->ce_peeraddr),
-! hp->h_addr,
-! sizeof(struct in_addr));
-! return (1);
- }
-
-***************
-*** 440,444 ****
- }
-
-! bzero((char *)&saddr, sizeof(saddr));
- saddr.sin_family = AF_INET;
- saddr.sin_port = htons(NTP_PORT); /* trash */
---- 441,445 ----
- }
-
-! memset((char *)&saddr, 0, sizeof(saddr));
- saddr.sin_family = AF_INET;
- saddr.sin_port = htons(NTP_PORT); /* trash */
-***************
-*** 500,504 ****
- * Make up a request packet with the configuration info
- */
-! bzero((char *)&reqpkt, sizeof(reqpkt));
-
- reqpkt.rm_vn_mode = RM_VN_MODE(0, 0);
---- 501,505 ----
- * Make up a request packet with the configuration info
- */
-! memset((char *)&reqpkt, 0, sizeof(reqpkt));
-
- reqpkt.rm_vn_mode = RM_VN_MODE(0, 0);
-***************
-*** 508,512 ****
- reqpkt.err_nitems = ERR_NITEMS(0, 1); /* one item */
- reqpkt.mbz_itemsize = MBZ_ITEMSIZE(sizeof(struct conf_peer));
-! bcopy((char *)conf, reqpkt.data, sizeof(struct conf_peer));
- reqpkt.keyid = htonl(req_keyid);
-
---- 509,513 ----
- reqpkt.err_nitems = ERR_NITEMS(0, 1); /* one item */
- reqpkt.mbz_itemsize = MBZ_ITEMSIZE(sizeof(struct conf_peer));
-! memmove(reqpkt.data, (char *)conf, sizeof(struct conf_peer));
- reqpkt.keyid = htonl(req_keyid);
-
-
diff --git a/usr.sbin/xntpd/patches/patch.40 b/usr.sbin/xntpd/patches/patch.40
deleted file mode 100644
index 7f1941d3a760..000000000000
--- a/usr.sbin/xntpd/patches/patch.40
+++ /dev/null
@@ -1,92 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa23994; 13 Apr 94 15:58 EDT
-Received: from adrastea.lcs.mit.edu by louie.udel.edu id aa07113;
- 13 Apr 94 15:44 EDT
-Received: by adrastea.lcs.mit.edu; id AA04845; Wed, 13 Apr 1994 15:44:23 -0400
-Date: Wed, 13 Apr 1994 15:44:23 -0400
-From: Garrett Wollman <wollman@adrastea.lcs.mit.edu>
-Message-Id: <9404131944.AA04845@adrastea.lcs.mit.edu>
-To: Mills@udel.edu
-Cc: Garrett Wollman <wollman@adrastea.lcs.mit.edu>,
- Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Subject: Re: You xntp modifications...
-In-Reply-To: <9404122159.aa18355@huey.udel.edu>
-References: <9404122159.aa18355@huey.udel.edu>
-
-<<On Tue, 12 Apr 94 21:59:57 EDT, Mills@udel.edu said:
-
-> Note that we are two versions further along, what with the average of
-> a patch per day, so it would be survivable if this issue could be
-> cleared up ASAP.
-
-This patch, applied relative to my previous patch, provides for both
-behaviors.
-
-
-*** xntpd/xntpd/ntp_control.c Wed Apr 13 12:37:51 1994
---- ntp_control.c Wed Apr 13 12:38:42 1994
-***************
-*** 264,271 ****
---- 264,283 ----
- /*
- * System and processor definitions. These will change for the gizmo board.
- */
-+ #ifndef HAVE_UNAME
-+ #ifndef STR_SYSTEM
-+ #define STR_SYSTEM "UNIX"
-+ #endif
-+ #ifndef STR_PROCESSOR
-+ #define STR_PROCESSOR "unknown"
-+ #endif
-+
-+ static char str_system[] = STR_SYSTEM;
-+ static char str_processor[] = STR_PROCESSOR;
-+ #else
- #include <sys/utsname.h>
- static struct utsname utsname;
-+ #endif /* HAVE_UNAME */
-
- /*
- * Trap structures. We only allow a few of these, and send
-***************
-*** 426,433 ****
---- 438,447 ----
- {
- int i;
-
-+ #ifdef HAVE_UNAME
- uname(&utsname);
-
-+ #endif /* HAVE_UNAME */
- ctl_clr_stats();
-
- ctl_auth_keyid = 0;
-***************
-*** 1262,1273 ****
---- 1276,1297 ----
- ctl_putuint(sys_var[CS_LEAPWARNING].text, (U_LONG)leap_warning);
- break;
- case CS_PROCESSOR:
-+ #ifndef HAVE_UNAME
-+ ctl_putstr(sys_var[CS_PROCESSOR].text, str_processor,
-+ sizeof(str_processor) - 1);
-+ #else
- ctl_putstr(sys_var[CS_PROCESSOR].text, utsname.machine,
- strlen(utsname.machine));
-+ #endif /* HAVE_UNAME */
- break;
- case CS_SYSTEM:
-+ #ifndef HAVE_UNAME
-+ ctl_putstr(sys_var[CS_SYSTEM].text, str_system,
-+ sizeof(str_system) - 1);
-+ #else
- ctl_putstr(sys_var[CS_SYSTEM].text, utsname.sysname,
- strlen(utsname.sysname));
-+ #endif /* HAVE_UNAME */
- break;
- case CS_KEYID:
- ctl_putuint(sys_var[CS_KEYID].text, (U_LONG)0);
-
-
-[no save]
-
diff --git a/usr.sbin/xntpd/patches/patch.41 b/usr.sbin/xntpd/patches/patch.41
deleted file mode 100644
index 5d1f91c821f1..000000000000
--- a/usr.sbin/xntpd/patches/patch.41
+++ /dev/null
@@ -1,50 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa13197; 16 Apr 94 22:05 EDT
-Received: from motgate.mot.com by louie.udel.edu id aa18176; 16 Apr 94 21:57 EDT
-Received: from pobox.mot.com ([129.188.137.100]) by motgate.mot.com with SMTP (5.67b/IDA-1.4.4/MOT-3.1 for <mills@udel.edu>)
- id AA01015; Sat, 16 Apr 1994 20:57:21 -0500
-Received: from merlin.dev.cdx.mot.com by pobox.mot.com with SMTP (5.67b/IDA-1.4.4/MOT-3.1 for <mills@udel.edu>)
- id AA29067; Sat, 16 Apr 1994 20:57:19 -0500
-Received: from ronald.dev.cdx.mot.com (ronald.dev.cdx.mot.com [134.33.39.18]) by merlin.dev.cdx.mot.com (8.6.5/8.6.5) with ESMTP id VAA06544; Sat, 16 Apr 1994 21:57:12 -0400
-From: "Gregory M. Paris" <paris@merlin.dev.cdx.mot.com>
-Received: from localhost (paris@localhost) by ronald.dev.cdx.mot.com (8.6.5/8.6.5) id VAA22231; Sat, 16 Apr 1994 21:57:11 -0400
-Date: Sat, 16 Apr 1994 21:57:11 -0400
-Message-Id: <199404170157.VAA22231@ronald.dev.cdx.mot.com>
-To: mills@udel.edu
-Subject: 3.3y patch
-
-Dave,
-
-I had the same problem compiling 3.3p as I got with 3.3y. The fix
-was to move a #endif that seems to be out of place in xntpd/ntp_unixclock.c.
-It now compiles fine on my HP-UX 9.03. Here's the patch.
-
-Greg
-
---
-Greg Paris <paris@merlin.dev.cdx.mot.com>
-Motorola Inc, Information Systems Group, 20 Cabot Blvd, Mansfield, MA 02048-1193
-"Your Plastic Pal who's fun to be with." TM Sirius Cybernetics
-These posts are self-disclamatory.
-
-##################################################
-*** xntpd/ntp_unixclock.c.orig Mon Apr 11 22:19:21 1994
---- xntpd/ntp_unixclock.c Sat Apr 16 21:49:15 1994
-***************
-*** 386,391 ****
---- 386,392 ----
- #undef K_TICK_NAME
- #undef N_NAME
- }
-+ #endif /* SYS_UNIXWARE1 */
- #endif /* HAVE_READKMEM */
-
- #if defined(SOLARIS)&&defined(ADJTIME_IS_ACCURATE)
-***************
-*** 583,586 ****
- *tick = (U_LONG)txc.tick;
- }
- #endif /* SYS_LINUX */
-- #endif /* SYS_UNIXWARE1 */
---- 584,586 ----
-
diff --git a/usr.sbin/xntpd/patches/patch.42 b/usr.sbin/xntpd/patches/patch.42
deleted file mode 100644
index 78c9bdfdda26..000000000000
--- a/usr.sbin/xntpd/patches/patch.42
+++ /dev/null
@@ -1,38 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa00358; 19 Apr 94 17:48 EDT
-Received: from swan.cl.cam.ac.uk by louie.udel.edu id aa12986;
- 19 Apr 94 17:40 EDT
-Received: from labes.cl.cam.ac.uk (user pb (rfc931)) by swan.cl.cam.ac.uk
- with SMTP (PP-6.5) to cl; Tue, 19 Apr 1994 22:39:48 +0100
-To: Mills@udel.edu
-cc: Piete Brooks <Piete.Brooks@cl.cam.ac.uk>
-Subject: Re: Multicast NTP - take 1
-In-reply-to: Your message of Tue, 19 Apr 1994 12:29:25 -0400. <9404191229.aa28742@huey.udel.edu>
-Date: Tue, 19 Apr 1994 22:39:44 +0100
-From: Piete Brooks <Piete.Brooks@cl.cam.ac.uk>
-Message-ID: <"swan.cl.cam.:138990:940419214000"@cl.cam.ac.uk>
-
-Shucks !
-
-I omitted the "-c" to diff ...
-
-*** xntpd/refclock_msfees.c.dist Thu Jan 27 14:03:59 1994
---- xntpd/refclock_msfees.c Tue Apr 19 10:58:57 1994
-***************
-*** 139,145 ****
- #define INH_DELAY_PPS BITS_TO_L_FP( 0, 9600)
-
- #ifndef STREAM_PP1
-! #define STREAM_PP1 "ppsclockd\0<-- patch space for module name1 -->"
- #endif
- #ifndef STREAM_PP2
- #define STREAM_PP2 "ppsclock\0<-- patch space for module name2 -->"
---- 139,145 ----
- #define INH_DELAY_PPS BITS_TO_L_FP( 0, 9600)
-
- #ifndef STREAM_PP1
-! #define STREAM_PP1 "ppsclocd\0<-- patch space for module name1 -->"
- #endif
- #ifndef STREAM_PP2
- #define STREAM_PP2 "ppsclock\0<-- patch space for module name2 -->"
-
diff --git a/usr.sbin/xntpd/patches/patch.43 b/usr.sbin/xntpd/patches/patch.43
deleted file mode 100644
index 92f9200c735e..000000000000
--- a/usr.sbin/xntpd/patches/patch.43
+++ /dev/null
@@ -1,48 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa00412; 19 Apr 94 18:04 EDT
-Received: from swan.cl.cam.ac.uk by louie.udel.edu id aa13181;
- 19 Apr 94 17:44 EDT
-Received: from labes.cl.cam.ac.uk (user pb (rfc931)) by swan.cl.cam.ac.uk
- with SMTP (PP-6.5) to cl; Tue, 19 Apr 1994 22:44:05 +0100
-To: Mills@udel.edu
-cc: Piete Brooks <Piete.Brooks@cl.cam.ac.uk>
-Subject: Re: Cisco/Multicast/ntp3.3m
-In-reply-to: Your message of Tue, 19 Apr 1994 12:24:31 -0400. <9404191224.aa28707@huey.udel.edu>
-Date: Tue, 19 Apr 1994 22:43:58 +0100
-From: Piete Brooks <Piete.Brooks@cl.cam.ac.uk>
-Message-ID: <"swan.cl.cam.:140740:940419214417"@cl.cam.ac.uk>
-
-> Yes, I think you have caught all the gotchas.
-
-I fear not :-((
-
-> I take it you have the latest kernel mods.
-
-Look for a call sign I assume ....
-Do I take it that they are **REQUIRED** ? :-(((
-
-
-Other problems .....
-
-It appears that you have your own in.h in include/ntp_in.h
-
-I suspect that that is why things are failing ...
-Why not use the syatem's own in.h ??
-
-To make it compile I added:
-
-*** include/ntp_in.h.dist Thu Apr 14 16:20:29 1994
---- include/ntp_in.h Tue Apr 19 21:40:12 1994
-***************
-*** 19,24 ****
---- 19,27 ----
-
- #ifndef _netinet_in_h
- #define _netinet_in_h
-+ #define _NETINET_IN_H_
-+ #define _SYS_IN_INCLUDED
-+ #define __IN_HEADER
-
- /*
- * Protocols
-
diff --git a/usr.sbin/xntpd/patches/patch.5 b/usr.sbin/xntpd/patches/patch.5
deleted file mode 100644
index 2225804037c7..000000000000
--- a/usr.sbin/xntpd/patches/patch.5
+++ /dev/null
@@ -1,49 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa14816; 27 Jan 94 5:15 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa11733;
- 27 Jan 94 5:09 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA25056 (5.65c-6/7.3v-FAU); Thu, 27 Jan 1994 11:09:06 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA09091 (5.65c-6/7.3m-FAU); Thu, 27 Jan 1994 11:09:03 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199401271009.AA09091@faui43.informatik.uni-erlangen.de>
-Subject: Re: Solaribum
-To: Mills@udel.edu
-Date: Thu, 27 Jan 94 11:08:55 MET
-Cc: Frank.Kardel@informatik.uni-erlangen.de, Piete.Brooks@cl.cam.ac.uk,
- Paul_Vixie@corpmis.sjc.hw.sony.com
-In-Reply-To: <9401261207.aa10860@huey.udel.edu>; from "Mills@udel.edu" at Jan 26, 94 12:07 pm
-X-Mailer: ELM [version 2.3 PL11]
-
-
-And another corer generator to be removed:
-
-===================================================================
-RCS file: /src/NTP/REPOSITORY/v3/xntpd/ntp_control.c,v
-retrieving revision 3.22
-diff -c -r3.22 xntpd/ntp_control.c
-*** xntpd/ntp_control.c:3.22 1994/01/26 21:56:23
---- xntpd/ntp_control.c 1994/01/27 10:03:01
-***************
-*** 2132,2138 ****
- for (i = 1; i <= CC_MAXCODE; i++)
- if (wants[i])
- ctl_putclock(i, &clock, 1);
-! for (i = 0; !(clock.kv_list[i].flags & EOV); i++)
- if (wants[i+CC_MAXCODE+1])
- ctl_putdata(clock.kv_list[i].text,
- strlen(clock.kv_list[i].text), 0);
---- 2132,2138 ----
- for (i = 1; i <= CC_MAXCODE; i++)
- if (wants[i])
- ctl_putclock(i, &clock, 1);
-! for (i = 0; clock.kv_list && !(clock.kv_list[i].flags & EOV); i++)
- if (wants[i+CC_MAXCODE+1])
- ctl_putdata(clock.kv_list[i].text,
- strlen(clock.kv_list[i].text), 0);
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.6 b/usr.sbin/xntpd/patches/patch.6
deleted file mode 100644
index 220acad2ed19..000000000000
--- a/usr.sbin/xntpd/patches/patch.6
+++ /dev/null
@@ -1,550 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa17107; 27 Jan 94 14:37 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa16998;
- 27 Jan 94 14:34 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA29914 (5.65c-6/7.3v-FAU); Thu, 27 Jan 1994 20:34:08 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA23509 (5.65c-6/7.3m-FAU); Thu, 27 Jan 1994 20:34:05 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199401271934.AA23509@faui43.informatik.uni-erlangen.de>
-Subject: Re: Solaribum
-To: Mills@udel.edu
-Date: Thu, 27 Jan 94 20:33:59 MET
-Cc: Frank.Kardel@informatik.uni-erlangen.de, Piete.Brooks@cl.cam.ac.uk,
- Paul_Vixie@corpmis.sjc.hw.sony.com
-In-Reply-To: <9401271111.aa16183@huey.udel.edu>; from "Mills@udel.edu" at Jan 27, 94 11:11 am
-X-Mailer: ELM [version 2.3 PL11]
-
-
-> Guys,
-
-> Two masive patches collided in midair here, leaving broken parts scattered
-> over three counties. The National Time Safety Board has investigated,
-> but been unable, ...
-
-Additional efforts of the european branch of the NTPSB have uncovered
-that the collision was due to low visibility across the atlantic.
-
-And I wanted to go on:
- All measures have been taken to limit the effects of the crash to a
- minimum and to resume normal aircraft operation as soon as possible.
-
- All crew members and passengers are required to apply following patch
- to xntp3.3y.tar.Z for increased comfort and safety. This patch should
- enable us to resume normal operation again.
-
- After applying the patches you may remove following debris:
-
- include/ntp_machine.h.rej
- xntpd/ntp_config.c.rej
- xntpd/ntp_control.c.rej
-
-Unfortunately I did a test compile and the results of that will
-extend the ground stay of the 3.3y aircraft considerably.
-(You may start thinking about bringing up 3.3xx - see below)
-
-SunOS 4.x.x does NOT have the new highly portable "memmove()"
-routine. The lack of this will mean that we will have to
-#define memmove(a, b, c) memcpy(a, b, c)
-or find something else. I'd like to leave this to Paul.
-Also on Sunos 4.x there are implicit declarations of bzero due
-the the FDSET macro from the system header files. So I am not
-so sure whether strictly using mem* is the best or whether we should
-add b* prototypes to l_stdlib.h. I think Paul has now something
-to work on. Anyhow, the patches below will rectify some problems
-but the resulting code still needs much polishing (providing memmove
-where it is missing e.g. SunOS4.x).
-
-In order to get a flying version fast (3.3xx) Dave could apply my
-patch he is holding to 3.3x - that should then make a workable
-version. 3.3y can then be cleaned up slowly (starting with the
-patches below and then port it again to the rest of the systems).
-
-Sorry about the bad news.
-
-> I have one more patch from Frank which I will hold on to until the aircraft
-> is recertified.
-
-That one is still to be applied because without it, it is possible
-to shoot down any plane around the NTP universe that is bearing
-the 3.3x banner (but can be applied to 3.3x).
-
-
-For the 3.3y construction crew:
-
-diff -c -r ../yy/include/ntp_machine.h ./include/ntp_machine.h
-*** ../yy/include/ntp_machine.h Thu Jan 27 15:03:23 1994
---- ./include/ntp_machine.h Thu Jan 27 19:13:35 1994
-***************
-*** 121,139 ****
- to the correct broadcast address - are these
- implementations broken or did the spec change ?
-
-- HAVE_UNISTD_H - Maybe should be part of NTP_POSIX_SOURCE ?
--
- DEFINITIONS FOR SYSTEM && PROCESSOR
- STR_SYSTEM - value of system variable
- STR_PROCESSOR - value of processor variable
-
- You could just put the defines on the DEFS line in machines/<os> file.
-! I don't since there are lost of different types compiler that a systemm might
-! have, some that can do proto typing and others that cannot on the saem system.
-! I get a chanse to twiddle some of the configuration paramasters at compile
-! time based on compler/machine combinatsions by using this include file.
-! See convex, aix and sun configurations see how complex it gets.
-!
- */
-
-
---- 121,141 ----
- to the correct broadcast address - are these
- implementations broken or did the spec change ?
-
- DEFINITIONS FOR SYSTEM && PROCESSOR
- STR_SYSTEM - value of system variable
- STR_PROCESSOR - value of processor variable
-
- You could just put the defines on the DEFS line in machines/<os> file.
-! I don't since there are lots of different types of compilers that a system might
-! have, some that can do proto typing and others that cannot on the same system.
-! I get a chance to twiddle some of the configuration parameters at compile
-! time based on compiler/machine combinations by using this include file.
-! See convex, aix and sun configurations see how complex it get.
-!
-! Note that it _is_ considered reasonable to add some system-specific defines
-! to the machine/<os> file if it would be too inconvenient to puzzle them out
-! in this file.
-!
- */
-
-
-diff -c -r ../yy/parse/parse.c ./parse/parse.c
-*** ../yy/parse/parse.c Thu Jan 27 00:25:18 1994
---- ./parse/parse.c Thu Jan 27 20:18:58 1994
-***************
-*** 29,40 ****
- #include "sys/time.h"
- #include "sys/errno.h"
-
-- #include "ntp_fp.h"
-- #include "ntp_unixtime.h"
-- #include "ntp_calendar.h"
--
-- #include "parse.h"
--
- #if defined(PARSESTREAM) && (defined(SYS_SUNOS4) || defined(SYS_SOLARIS)) && defined(STREAM)
- /*
- * Sorry, but in SunOS 4.x kernels there are no
---- 29,34 ----
-***************
-*** 44,51 ****
---- 38,54 ----
- #define _ntp_string_h
- extern void bcopy();
- extern void bzero();
-+ #else
-+ #define bzero(_X_, _Y_) memset(_X_, 0, _Y_)
-+ #define bcopy(_X_, _Y_, _Z_) memmove(_Y_, _X_, _Z_)
- #endif
-
-+ #include "ntp_fp.h"
-+ #include "ntp_unixtime.h"
-+ #include "ntp_calendar.h"
-+
-+ #include "parse.h"
-+
- #include "ntp_stdlib.h"
-
- #ifdef PARSESTREAM
-diff -c -r ../yy/xntpd/ntp_config.c ./xntpd/ntp_config.c
-*** ../yy/xntpd/ntp_config.c Thu Jan 27 15:03:47 1994
---- ./xntpd/ntp_config.c Thu Jan 27 19:18:40 1994
-***************
-*** 1,4 ****
-! /* ntp_config.c,v 3.1 1993/07/06 01:11:12 jbj Exp
- * ntp_config.c - read and apply configuration information
- */
- #define RESOLVE_INTERNAL /* gdt */
---- 1,4 ----
-! /*
- * ntp_config.c - read and apply configuration information
- */
- #define RESOLVE_INTERNAL /* gdt */
-***************
-*** 375,388 ****
- break;
- }
-
-! if (errflg || optind != argc) {
- (void) fprintf(stderr, "usage: %s [ -abd ] [ -c config_file ] [ -e encryption delay ]\n", progname);
- (void) fprintf(stderr, "\t\t[ -f frequency file ] [ -k key file ] [ -l log file ]\n");
- (void) fprintf(stderr, "\t\t[ -p pid file ] [ -r broadcast delay ] [ -s status directory ]\n");
- (void) fprintf(stderr, "\t\t[ -t trusted key ] [ -v sys variable ] [ -V default sys variable ]\n");
- exit(2);
- }
-! optind = 0; /* reset optind to restart getopt_l */
-
- if (debug) {
- #ifdef NTP_POSIX_SOURCE
---- 375,388 ----
- break;
- }
-
-! if (errflg || ntp_optind != argc) {
- (void) fprintf(stderr, "usage: %s [ -abd ] [ -c config_file ] [ -e encryption delay ]\n", progname);
- (void) fprintf(stderr, "\t\t[ -f frequency file ] [ -k key file ] [ -l log file ]\n");
- (void) fprintf(stderr, "\t\t[ -p pid file ] [ -r broadcast delay ] [ -s status directory ]\n");
- (void) fprintf(stderr, "\t\t[ -t trusted key ] [ -v sys variable ] [ -V default sys variable ]\n");
- exit(2);
- }
-! ntp_optind = 0; /* reset ntp_optind to restart ntp_getopt */
-
- if (debug) {
- #ifdef NTP_POSIX_SOURCE
-***************
-*** 430,437 ****
- char resolver_name[MAXFILENAME];
- int have_keyfile;
- char keyfile[MAXFILENAME];
-! extern int optind;
-! extern char *optarg;
- extern char *Version;
- extern U_LONG info_auth_keyid;
- FILEGEN *filegen;
---- 430,437 ----
- char resolver_name[MAXFILENAME];
- int have_keyfile;
- char keyfile[MAXFILENAME];
-! extern int ntp_optind;
-! extern char *ntp_optarg;
- extern char *Version;
- extern U_LONG info_auth_keyid;
- FILEGEN *filegen;
-***************
-*** 461,467 ****
- /*
- * Decode argument list
- */
-! while ((c = getopt_l(argc, argv, xntp_options)) != EOF) {
- switch (c) {
- case 'a':
- proto_config(PROTO_AUTHENTICATE, (LONG)1);
---- 461,467 ----
- /*
- * Decode argument list
- */
-! while ((c = ntp_getopt(argc, argv, xntp_options)) != EOF) {
- switch (c) {
- case 'a':
- proto_config(PROTO_AUTHENTICATE, (LONG)1);
-***************
-*** 470,476 ****
- proto_config(PROTO_BROADCLIENT, (LONG)1);
- break;
- case 'c':
-! config_file = optarg;
- break;
- case 'd':
- #ifdef DEBUG
---- 470,476 ----
- proto_config(PROTO_BROADCLIENT, (LONG)1);
- break;
- case 'c':
-! config_file = ntp_optarg;
- break;
- case 'd':
- #ifdef DEBUG
-***************
-*** 484,498 ****
- do {
- l_fp tmp;
-
-! if (!atolfp(optarg, &tmp)) {
- syslog(LOG_ERR,
- "command line encryption delay value %s undecodable",
-! optarg);
- errflg++;
- } else if (tmp.l_ui != 0) {
- syslog(LOG_ERR,
- "command line encryption delay value %s is unlikely",
-! optarg);
- errflg++;
- } else {
- proto_config(PROTO_AUTHDELAY, tmp.l_f);
---- 484,498 ----
- do {
- l_fp tmp;
-
-! if (!atolfp(ntp_optarg, &tmp)) {
- syslog(LOG_ERR,
- "command line encryption delay value %s undecodable",
-! ntp_optarg);
- errflg++;
- } else if (tmp.l_ui != 0) {
- syslog(LOG_ERR,
- "command line encryption delay value %s is unlikely",
-! ntp_optarg);
- errflg++;
- } else {
- proto_config(PROTO_AUTHDELAY, tmp.l_f);
-***************
-*** 501,537 ****
- break;
-
- case 'f':
-! stats_config(STATS_FREQ_FILE, optarg);
- break;
-
- case 'k':
-! getauthkeys(optarg);
-! if ((int)strlen(optarg) >= MAXFILENAME) {
- syslog(LOG_ERR,
- "key file name too LONG (>%d, sigh), no name resolution possible",
- MAXFILENAME);
- } else {
- have_keyfile = 1;
-! (void)strcpy(keyfile, optarg);
- }
- break;
-
- case 'p':
-! stats_config(STATS_PID_FILE, optarg);
- break;
-
- case 'r':
- do {
- l_fp tmp;
-
-! if (!atolfp(optarg, &tmp)) {
- syslog(LOG_ERR,
- "command line broadcast delay value %s undecodable",
-! optarg);
- } else if (tmp.l_ui != 0) {
- syslog(LOG_ERR,
- "command line broadcast delay value %s is unlikely",
-! optarg);
- } else {
- proto_config(PROTO_BROADDELAY, tmp.l_f);
- }
---- 501,537 ----
- break;
-
- case 'f':
-! stats_config(STATS_FREQ_FILE, ntp_optarg);
- break;
-
- case 'k':
-! getauthkeys(ntp_optarg);
-! if ((int)strlen(ntp_optarg) >= MAXFILENAME) {
- syslog(LOG_ERR,
- "key file name too LONG (>%d, sigh), no name resolution possible",
- MAXFILENAME);
- } else {
- have_keyfile = 1;
-! (void)strcpy(keyfile, ntp_optarg);
- }
- break;
-
- case 'p':
-! stats_config(STATS_PID_FILE, ntp_optarg);
- break;
-
- case 'r':
- do {
- l_fp tmp;
-
-! if (!atolfp(ntp_optarg, &tmp)) {
- syslog(LOG_ERR,
- "command line broadcast delay value %s undecodable",
-! ntp_optarg);
- } else if (tmp.l_ui != 0) {
- syslog(LOG_ERR,
- "command line broadcast delay value %s is unlikely",
-! ntp_optarg);
- } else {
- proto_config(PROTO_BROADDELAY, tmp.l_f);
- }
-***************
-*** 539,556 ****
- break;
-
- case 's':
-! stats_config(STATS_STATSDIR, optarg);
- break;
-
- case 't':
- do {
- int tkey;
-
-! tkey = atoi(optarg);
- if (tkey <= 0 || tkey > NTP_MAXKEY) {
- syslog(LOG_ERR,
- "command line trusted key %s is unlikely",
-! optarg);
- } else {
- authtrust(tkey, (LONG)1);
- }
---- 539,556 ----
- break;
-
- case 's':
-! stats_config(STATS_STATSDIR, ntp_optarg);
- break;
-
- case 't':
- do {
- int tkey;
-
-! tkey = atoi(ntp_optarg);
- if (tkey <= 0 || tkey > NTP_MAXKEY) {
- syslog(LOG_ERR,
- "command line trusted key %s is unlikely",
-! ntp_optarg);
- } else {
- authtrust(tkey, (LONG)1);
- }
-***************
-*** 559,565 ****
-
- case 'v':
- case 'V':
-! set_sys_var(optarg, strlen(optarg)+1, RW | ((c == 'V') ? DEF : 0));
- break;
-
- default:
---- 559,565 ----
-
- case 'v':
- case 'V':
-! set_sys_var(ntp_optarg, strlen(ntp_optarg)+1, RW | ((c == 'V') ? DEF : 0));
- break;
-
- default:
-diff -c -r ../yy/xntpd/ntp_control.c ./xntpd/ntp_control.c
-*** ../yy/xntpd/ntp_control.c Thu Jan 27 15:03:48 1994
---- ./xntpd/ntp_control.c Thu Jan 27 19:29:06 1994
-***************
-*** 1848,1854 ****
- ctl_sys_num_events = 0;
- gotvar += count_var(ext_sys_var);
- wants = (u_char *)emalloc(gotvar);
-! bzero((char *)wants, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- if (v->flags & EOV) {
---- 1848,1854 ----
- ctl_sys_num_events = 0;
- gotvar += count_var(ext_sys_var);
- wants = (u_char *)emalloc(gotvar);
-! memset((char *)wants, 0, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(sys_var, &valuep)) != 0) {
- if (v->flags & EOV) {
-***************
-*** 1904,1910 ****
- if (res_authokay)
- peer->num_events = 0;
- wants = (u_char *)emalloc(gotvar);
-! bzero((char*)wants, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(peer_var, &valuep)) != 0) {
- if (v->flags & EOV) {
---- 1904,1910 ----
- if (res_authokay)
- peer->num_events = 0;
- wants = (u_char *)emalloc(gotvar);
-! memset((char*)wants, 0, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(peer_var, &valuep)) != 0) {
- if (v->flags & EOV) {
-***************
-*** 2106,2112 ****
- rpkt.status = htons(ctlclkstatus(&clock));
- gotvar = CC_MAXCODE+1+count_var(clock.kv_list);
- wants = (u_char *)emalloc(gotvar);
-! bzero((char*)wants, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(clock_var, &valuep)) != 0) {
- if (v->flags & EOV) {
---- 2106,2112 ----
- rpkt.status = htons(ctlclkstatus(&clock));
- gotvar = CC_MAXCODE+1+count_var(clock.kv_list);
- wants = (u_char *)emalloc(gotvar);
-! memset((char*)wants, 0, gotvar);
- gotvar = 0;
- while ((v = ctl_getitem(clock_var, &valuep)) != 0) {
- if (v->flags & EOV) {
-***************
-*** 2578,2584 ****
- *kv = (struct ctl_var *)emalloc((c+2)*sizeof(struct ctl_var));
- if (k)
- {
-! bcopy((char *)k, (char *)*kv, sizeof(struct ctl_var)*c);
- free((char *)k);
- }
-
---- 2578,2584 ----
- *kv = (struct ctl_var *)emalloc((c+2)*sizeof(struct ctl_var));
- if (k)
- {
-! memmove((char *)*kv, (char *)k, sizeof(struct ctl_var)*c);
- free((char *)k);
- }
-
-***************
-*** 2621,2627 ****
- {
- free(k->text);
- k->text = (char *)emalloc(size);
-! bcopy(data, k->text, size);
- k->flags = def;
- return;
- }
---- 2621,2627 ----
- {
- free(k->text);
- k->text = (char *)emalloc(size);
-! memmove(k->text, data, size);
- k->flags = def;
- return;
- }
-***************
-*** 2629,2635 ****
- else
- {
- k->text = (char *)emalloc(size);
-! bcopy(data, k->text, size);
- k->flags = def;
- return;
- }
---- 2629,2635 ----
- else
- {
- k->text = (char *)emalloc(size);
-! memmove(k->text, data, size);
- k->flags = def;
- return;
- }
-***************
-*** 2637,2643 ****
- }
- }
- t = add_var(kv, size, def);
-! bcopy(data, t, size);
- }
-
- void
---- 2637,2643 ----
- }
- }
- t = add_var(kv, size, def);
-! memmove(t, data, size);
- }
-
- void
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.7 b/usr.sbin/xntpd/patches/patch.7
deleted file mode 100644
index 682065fc558a..000000000000
--- a/usr.sbin/xntpd/patches/patch.7
+++ /dev/null
@@ -1,274 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa21105; 28 Jan 94 9:25 EST
-Received: from faui45.informatik.uni-erlangen.de by louie.udel.edu id aa08838;
- 28 Jan 94 9:20 EST
-Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
- id AA29169 (5.65c-6/7.3v-FAU); Fri, 28 Jan 1994 15:19:56 +0100
-Received: from faui45x.informatik.uni-erlangen.de by immd4.informatik.uni-erlangen.de with SMTP;
- id AA11999 (5.65c-6/7.3m-FAU); Fri, 28 Jan 1994 15:19:51 +0100
-From: Frank Kardel <Frank.Kardel@informatik.uni-erlangen.de>
-Message-Id: <199401281419.AA11999@faui43.informatik.uni-erlangen.de>
-Subject: Re: Solaribum
-To: Paul A Vixie <Paul_Vixie@corpmis.sjc.hw.sony.com>
-Date: Fri, 28 Jan 94 14:02:02 MET
-Cc: Mills@udel.edu, Frank.Kardel@informatik.uni-erlangen.de,
- Piete.Brooks@cl.cam.ac.uk, Paul_Vixie@corpmis.sjc.hw.sony.com
-In-Reply-To: <9401272236.AA27835@morality.sjc.hw.sony.com>; from "Paul A Vixie" at Jan 27, 94 2:36 pm
-X-Mailer: ELM [version 2.3 PL11]
-
-
-> >memmove() and crumps in loading with an unknown external. If the missing
-> >routine is not there in SunOS 4, why not conditionally compile one
-> >and be done with it?
-
-> as i said in earlier mail, there is already a macro for memmove, to define
-> it in terms of bcopy, but it is only enabled on systems that don't have a
-> native memmove. include/*.h tells the story.
-
-Ok, in order to cope with the problems (non existent memmove() and
-sys header files that use bops) I fixed SUNOS4 and ULTRIX to use the
-b-ops (via the NTP_NEED_BOPS define). All other should to my knowledge
-use the mem* stuff (I'd rather use either mem* or b* instead of mixtures
-of both).
-
-Now, the following patch should get 3.3y (and 3.3yy) to fly
-(=compile) on suns. Functional test have not been done. ULTRIX
-has not been tested.
-
-> there are too many x's and y's now. i'm confused. i promise not to send
-> any more patches until the dust clears..
-
-With this patch we should get to 3.3yyy which should be the
-base for all next efforts (-> and 3.3{x,xx,y,yy} can be deleted).
-
-May the source be with us:
-
-diff -c -r ../yy/include/l_stdlib.h ./include/l_stdlib.h
-*** ../yy/include/l_stdlib.h Thu Jan 27 15:03:21 1994
---- ./include/l_stdlib.h Fri Jan 28 12:46:31 1994
-***************
-*** 47,54 ****
---- 47,60 ----
- extern int rand P((void));
- extern int setpgrp P((int, int));
- extern void srand P((unsigned int));
-+ extern void bcopy P((char *, char *, int));
- #endif
-
-+ #ifndef bzero /* XXX macro prototyping clash */
-+ extern void bzero P((char *, int));
-+ extern int bcmp P((char *, char *, int));
-+ extern void bcopy P((char *, char *, int));
-+ #endif
- extern char *mktemp P((char *));
-
- extern int tolower P((int));
-***************
-*** 92,102 ****
---- 98,110 ----
-
- #ifdef _ntp_string_h
- #ifdef NTP_POSIX_SOURCE /* these are builtins */
-+ #ifndef NTP_NEED_BOPS /* but may be emulated by bops */
- extern char *memcpy();
- extern char *memset();
- extern int memcmp();
- #endif
- #endif
-+ #endif
-
- #ifdef _sys_socket_h
- extern int bind P((int, struct sockaddr *, int));
-***************
-*** 187,192 ****
---- 195,203 ----
-
- #ifndef NTP_POSIX_SOURCE
- extern int atoi P((char *));
-+ extern void bzero P((char *, int));
-+ extern int bcmp P((char *, char *, int));
-+ extern void bcopy P((char *, char *, int));
- extern int execve P((char *, char **,char **));
- extern int fork P((void));
- extern int getdtablesize P((void));
-diff -c -r ../yy/include/ntp_machine.h ./include/ntp_machine.h
-*** ../yy/include/ntp_machine.h Fri Jan 28 13:32:33 1994
---- ./include/ntp_machine.h Fri Jan 28 12:25:29 1994
-***************
-*** 168,173 ****
---- 168,174 ----
- * Note: posix version has NTP_POSIX_SOURCE and HAVE_SIGNALED_IO
- */
- #if defined(SYS_SUNOS4)
-+ #define NTP_NEED_BOPS
- #define NO_SIGNED_CHAR_DECL
- #define HAVE_LIBKVM
- #define HAVE_MALLOC_H
-***************
-*** 266,271 ****
---- 267,273 ----
- * Note: posix version has NTP_POSIX_SOURCE and HAVE_SIGNALED_IO
- */
- #if defined(SYS_ULTRIX)
-+ #define NTP_NEED_BOPS
- #define S_CHAR_DEFINED
- #define HAVE_READKMEM
- #define HAVE_BSD_NICE
-diff -c -r ../yy/include/ntp_string.h ./include/ntp_string.h
-*** ../yy/include/ntp_string.h Thu Jan 27 15:03:24 1994
---- ./include/ntp_string.h Fri Jan 28 12:36:44 1994
-***************
-*** 5,11 ****
- #ifndef _ntp_string_h
- #define _ntp_string_h
-
-! #ifdef NTP_POSIX_SOURCE
-
- # if defined(HAVE_MEMORY_H)
- # include <memory.h>
---- 5,11 ----
- #ifndef _ntp_string_h
- #define _ntp_string_h
-
-! #if defined(NTP_POSIX_SOURCE)
-
- # if defined(HAVE_MEMORY_H)
- # include <memory.h>
-***************
-*** 13,29 ****
-
- # include <string.h>
-
-! #else /* NTP_POSIX_SOURCE */
-
- # include <strings.h>
--
- # define strchr(s,c) index(s,c)
- # define strrchr(s,c) rindex(s,c)
- # define memcmp(a,b,c) bcmp(a,b,c)
- # define memmove(t,f,c) bcopy(f,t,c)
-! # define memset(a,x,c) if (x == 0x00) bzero(a,c) else ntp_memset((char*)a,x,c)
- void ntp_memset P((char *, int, int));
-
-! #endif /* NTP_POSIX_SOURCE */
-
- #endif /* _ntp_string_h */
---- 13,35 ----
-
- # include <string.h>
-
-! #else
-
- # include <strings.h>
- # define strchr(s,c) index(s,c)
- # define strrchr(s,c) rindex(s,c)
-+ # ifndef NTP_NEED_BOPS
-+ # define NTP_NEED_BOPS
-+ # endif
-+ #endif /* NTP_POSIX_SOURCE */
-+
-+ #ifdef NTP_NEED_BOPS
-+
- # define memcmp(a,b,c) bcmp(a,b,c)
- # define memmove(t,f,c) bcopy(f,t,c)
-! # define memset(a,x,c) if (x == 0x00) bzero(a,c); else ntp_memset((char*)a,x,c)
- void ntp_memset P((char *, int, int));
-
-! #endif /* NTP_NEED_BOPS */
-
- #endif /* _ntp_string_h */
-diff -c -r ../yy/lib/machines.c ./lib/machines.c
-*** ../yy/lib/machines.c Thu Jan 27 15:03:35 1994
---- ./lib/machines.c Fri Jan 28 13:55:26 1994
-***************
-*** 31,37 ****
- }
- #endif
-
-! #if !defined(NTP_POSIX_SOURCE)
- void
- ntp_memset(a, x, c)
- char *a;
---- 31,37 ----
- }
- #endif
-
-! #if !defined(NTP_POSIX_SOURCE) || defined(NTP_NEED_BOPS)
- void
- ntp_memset(a, x, c)
- char *a;
-diff -c -r ../yy/parse/Makefile.tmpl ./parse/Makefile.tmpl
-*** ../yy/parse/Makefile.tmpl Fri Nov 26 05:28:30 1993
---- ./parse/Makefile.tmpl Fri Jan 28 13:47:30 1994
-***************
-*** 92,98 ****
-
- clean:
- -@rm -f $(LIBNAME).a $(KLIBNAME).a *.o *.out *.ln make.log Makefile.bak \
-! lintlib.errs lint.errs genassym assym.s parsestreams parse
- -@cd util && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" -f Makefile.tmpl clean
-
- distclean: clean
---- 92,98 ----
-
- clean:
- -@rm -f $(LIBNAME).a $(KLIBNAME).a *.o *.out *.ln make.log Makefile.bak \
-! lintlib.errs lint.errs genassym assym.s parsestreams parse parsestreams.o.*
- -@cd util && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" -f Makefile.tmpl clean
-
- distclean: clean
-diff -c -r ../yy/parse/parse.c ./parse/parse.c
-*** ../yy/parse/parse.c Fri Jan 28 13:32:34 1994
---- ./parse/parse.c Fri Jan 28 13:08:01 1994
-***************
-*** 29,47 ****
- #include "sys/time.h"
- #include "sys/errno.h"
-
- #if defined(PARSESTREAM) && (defined(SYS_SUNOS4) || defined(SYS_SOLARIS)) && defined(STREAM)
- /*
-! * Sorry, but in SunOS 4.x kernels there are no
- * mem* operations. I don't want them - bcopy, bzero
- * are fine in the kernel
- */
-! #define _ntp_string_h
-! extern void bcopy();
-! extern void bzero();
- #else
- #define bzero(_X_, _Y_) memset(_X_, 0, _Y_)
- #define bcopy(_X_, _Y_, _Z_) memmove(_Y_, _X_, _Z_)
- #endif
-
- #include "ntp_fp.h"
- #include "ntp_unixtime.h"
---- 29,53 ----
- #include "sys/time.h"
- #include "sys/errno.h"
-
-+ #include "ntp_machine.h"
-+
- #if defined(PARSESTREAM) && (defined(SYS_SUNOS4) || defined(SYS_SOLARIS)) && defined(STREAM)
- /*
-! * Sorry, but in SunOS 4.x AND Solaris 2.x kernels there are no
- * mem* operations. I don't want them - bcopy, bzero
- * are fine in the kernel
- */
-! #ifndef NTP_NEED_BOPS
-! #define NTP_NEED_BOPS
-! #endif
- #else
-+ #ifndef NTP_NEED_BOPS
-+ #ifndef bzero
- #define bzero(_X_, _Y_) memset(_X_, 0, _Y_)
- #define bcopy(_X_, _Y_, _Z_) memmove(_Y_, _X_, _Z_)
- #endif
-+ #endif
-+ #endif
-
- #include "ntp_fp.h"
- #include "ntp_unixtime.h"
---
- Frank Kardel (kardel@informatik.uni-erlangen.de)
- All SCSI disks will from now on be required to send an email
- notice 24 hours prior to complete hardware failure!
-
diff --git a/usr.sbin/xntpd/patches/patch.8 b/usr.sbin/xntpd/patches/patch.8
deleted file mode 100644
index 52e928cf6f66..000000000000
--- a/usr.sbin/xntpd/patches/patch.8
+++ /dev/null
@@ -1,44 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa21136; 28 Jan 94 9:30 EST
-Received: from relay1.uu.net by louie.udel.edu id aa09355; 28 Jan 94 9:29 EST
-Received: from outpost.wg.waii.com by relay1.UU.NET with SMTP
- (5.61/UUNET-internet-primary) id AAwaur00219; Fri, 28 Jan 94 09:29:28 -0500
-Received: from airgun.wg.waii.com by outpost.wg.waii.com with SMTP id AA18918
- (5.65c/IDA-1.4.4 for <mills@udel.edu>); Fri, 28 Jan 1994 08:29:23 -0600
-Received: from merlin.london.waii.com by airgun.wg.waii.com with SMTP id AA18376
- (5.65c/IDA-1.4.4 for <mills@udel.edu>); Fri, 28 Jan 1994 08:29:16 -0600
-Received: from phoenix.london.waii.com by merlin.london.waii.com with SMTP id AA21698
- (5.65c/IDA-1.4.4 for <mills@udel.edu>); Fri, 28 Jan 1994 14:24:29 GMT
-Received: by phoenix.london.waii.com (4.1/SMI-4.1)
- id AA21825; Fri, 28 Jan 94 14:29:12 GMT
-Date: Fri, 28 Jan 94 14:29:12 GMT
-From: Marc Brett <ltso@london.waii.com>
-Message-Id: <9401281429.AA21825@phoenix.london.waii.com>
-To: mills@udel.edu
-Subject: Bug in export version of xntp.3.3c
-
-Dave,
-
-The crippled DES routine fails to compile on my machine (SunOS 1.4.3, cc).
-It complains about U_LONG being unrecognized. Luckily, the fix is a
-one-liner.
-
-*** authdes.c.export Tue Aug 24 22:26:45 1993
---- authdes.c Fri Jan 28 12:18:40 1994
-***************
-*** 15,20 ****
---- 15,21 ----
- * to its exportable state, copy this file to authdes.c .
- */
- #include <sys/types.h>
-+ #include "ntp_stdlib.h"
-
- /*
- * This routine is normally called to compute the key schedule.
-
-
-Regards,
-
-Marc Brett marc.brett@london.waii.com
-Western Geophysical Tel: +44 81 560 3160
-
diff --git a/usr.sbin/xntpd/patches/patch.9 b/usr.sbin/xntpd/patches/patch.9
deleted file mode 100644
index 76b330985770..000000000000
--- a/usr.sbin/xntpd/patches/patch.9
+++ /dev/null
@@ -1,83 +0,0 @@
-
-Received: from louie.udel.edu by huey.udel.edu id aa04410; 31 Jan 94 4:58 EST
-Received: from gw.home.vix.com by louie.udel.edu id aa00370; 31 Jan 94 4:52 EST
-Received: by gw.home.vix.com id AA12643; Mon, 31 Jan 94 01:52:12 -0800
-Message-Id: <9401310952.AA12643@gw.home.vix.com>
-X-Btw: vix.com is also gw.home.vix.com and vixie.sf.ca.us
-To: Mills@udel.edu
-Cc: Frank.Kardel@informatik.uni-erlangen.de, Piete.Brooks@cl.cam.ac.uk
-Subject: diffs to yyy to make ultrix/GOES happy
-Date: Mon, 31 Jan 94 01:52:11 PST
-From: Paul A Vixie <vixie@vix.com>
-
-diff -r -c2 yyy.ref/adjtime/adjtimed.c xntp3.3yyy/adjtime/adjtimed.c
-*** yyy.ref/adjtime/adjtimed.c Thu Jan 27 06:03:11 1994
---- xntp3.3yyy/adjtime/adjtimed.c Mon Jan 31 01:24:49 1994
-***************
-*** 82,86 ****
---- 82,90 ----
- progname = argv[0];
-
-+ #ifdef LOG_LOCAL6
- openlog("adjtimed", LOG_PID, LOG_LOCAL6);
-+ #else
-+ openlog("adjtimed", LOG_PID);
-+ #endif
-
- while ((ch = ntp_getopt(argc, argv, "hkrvdfp:")) != EOF) {
-diff -r -c2 yyy.ref/include/ntp_machine.h xntp3.3yyy/include/ntp_machine.h
-*** yyy.ref/include/ntp_machine.h Fri Jan 28 07:26:11 1994
---- xntp3.3yyy/include/ntp_machine.h Mon Jan 31 01:01:11 1994
-***************
-*** 42,47 ****
-
-
-! WHICH TERMINAL MODEL TO USE - I would assume HAVE_POSIX_TTYS if
-! NTP_POSIX_SOURCE was set but cann't. The
- posix tty driver is too restrictive on most systems.
- It defined if you define STREAMS.
---- 42,47 ----
-
-
-! WHICH TERMINAL MODEL TO USE - I would assume HAVE_TERMIOS if
-! NTP_POSIX_SOURCE was set but can't. The
- posix tty driver is too restrictive on most systems.
- It defined if you define STREAMS.
-***************
-*** 50,54 ****
- HAVE_BSD_TTYS - Use BSD stty.h
- HAVE_TERMIOS - Use POSIX termios.h
-- HAVE_POSIX_TTYS - "struct termios" has c_line defined
-
- THIS MAKES PORTS TO NEW SYSTEMS EASY - You only have to wory about
---- 50,53 ----
-***************
-*** 268,272 ****
- */
- #if defined(SYS_ULTRIX)
-- #define NTP_NEED_BOPS
- #define S_CHAR_DEFINED
- #define HAVE_READKMEM
---- 267,270 ----
-***************
-*** 277,280 ****
---- 275,279 ----
- #define STR_SYSTEM "UNIX/Ultrix"
- #endif
-+ #define HAVE_TERMIOS
- #endif
-
-***************
-*** 565,568 ****
---- 564,573 ----
- && !defined(HAVE_NO_NICE)
- ERROR You_must_define_one_of_the_HAVE_xx_NICE_defines
-+ #endif
-+
-+ #if !defined(HAVE_SYSV_TTYS) \
-+ && !defined(HAVE_BSD_TTYS) \
-+ && !defined(HAVE_TERMIOS)
-+ ERROR no_tty_type_defined
- #endif
-
-
diff --git a/usr.sbin/xntpd/scripts/hpadjtime.sh b/usr.sbin/xntpd/scripts/hpadjtime.sh
deleted file mode 100644
index 07773dc30a2f..000000000000
--- a/usr.sbin/xntpd/scripts/hpadjtime.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh
-val=1
-if [ -f /bin/uname -o -f /usr/bin/uname ]; then
- set `uname -a | tr '[A-Z]' '[a-z]'`
- case "$1" in
- hp-ux) case "$3" in
- *.10.*) val=1 ;;
- *.09.03) case "$5" in
- 9000/3*) val=1 ;;
- *) val=0 ;;
- esac ;;
- *) val=0 ;;
- esac
- ;;
- *)
- esac
-fi
-exit $val
diff --git a/usr.sbin/xntpd/util/Makefile.tmpl b/usr.sbin/xntpd/util/Makefile.tmpl
deleted file mode 100644
index e30292f3e1ce..000000000000
--- a/usr.sbin/xntpd/util/Makefile.tmpl
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# Makefile.tmpl
-#
-PROGRAM= tickadj
-#
-# Makefile for utilities
-#
-COMPILER= cc
-COPTS= -O
-BINDIR= /usr/local
-INSTALL= install
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-DAEMONLIBS=
-RESLIB=
-COMPAT=
-#
-INCL= -I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-LIB= ../lib/libntp.a
-LINTLIB= ../lib/llib-llibntp.ln
-MAKE= make
-TOP=../
-#
-SOURCE= tickadj.c ntptime.c
-TKOBJS= tickadj.o
-NTOBJS= ntptime.o
-EXECS= ntptime jitter timetrim kern byteorder longsize precision
-
-all: $(PROGRAM)
-
-tickadj: $(TKOBJS)
- $(CC) $(COPTS) -o $@ $(TKOBJS) $(LIB) $(DAEMONLIBS) $(RESLIB) $(COMPAT)
-
-ntptime: $(NTOBJS)
- $(CC) $(COPTS) -o $@ $(NTOBJS) $(LIB)
-
-precision: precision.o
- $(CC) $(COPTS) -o $@ $@.o
-
-install: $(BINDIR)/$(PROGRAM)
-
-$(BINDIR)/$(PROGRAM): $(PROGRAM)
- $(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)
-
-tags:
- ctags *.c *.h
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(PROGRAM) $(EXECS) *.o *.out tags make.log Makefile.bak lint.errs
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
diff --git a/usr.sbin/xntpd/xntpd/Makefile.tmpl b/usr.sbin/xntpd/xntpd/Makefile.tmpl
deleted file mode 100644
index 919d2a0c9174..000000000000
--- a/usr.sbin/xntpd/xntpd/Makefile.tmpl
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Makefile.tmpl
-#
-PROGRAM= xntpd
-#
-# xntpd - NTP daemon
-#
-COMPILER= cc
-COPTS= -O
-BINDIR= /usr/local
-INSTALL= install
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-CLOCKDEFS=
-DAEMONLIBS=
-RESLIB=
-ADJLIB=
-COMPAT=
-#
-INCL= -I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-LIB= ../lib/libntp.a ../parse/libparse.a
-LINTLIB= ../lib/llib-llibntp.ln
-MAKE= make
-TOP=../
-#
-SOURCE= ntp_config.c ntp_control.c ntp_io.c ntp_leap.c \
- ntp_loopfilter.c ntp_monitor.c ntp_peer.c ntp_proto.c \
- ntp_refclock.c ntp_request.c ntp_restrict.c ntp_timer.c \
- ntp_unixclock.c ntp_util.c ntp_intres.c ntp_filegen.c ntpd.c \
- refclock_conf.c refclock_chu.c refclock_local.c \
- refclock_pst.c refclock_wwvb.c refclock_goes.c \
- refclock_mx4200.c refclock_parse.c refclock_as2201.c \
- refclock_omega.c refclock_tpro.c refclock_leitch.c \
- refclock_irig.c refclock_msfees.c refclock_gpstm.c \
- refclock_trak.c refclock_datum.c refclock_acts.c \
- refclock_heath.c, refclock_nmea.c refclock_moto.c \
- refclock_atom.c
-
-OBJS= ntp_config.o ntp_control.o ntp_io.o ntp_leap.o \
- ntp_loopfilter.o ntp_monitor.o ntp_peer.o ntp_proto.o \
- ntp_refclock.o ntp_request.o ntp_restrict.o ntp_timer.o \
- ntp_unixclock.o ntp_util.o ntp_intres.o ntp_filegen.o ntpd.o \
- refclock_conf.o refclock_chu.o refclock_local.o \
- refclock_pst.o refclock_wwvb.o refclock_goes.o \
- refclock_mx4200.o refclock_parse.o refclock_as2201.o \
- refclock_omega.o refclock_tpro.o refclock_leitch.o \
- refclock_irig.o refclock_msfees.o refclock_gpstm.o \
- refclock_trak.o refclock_datum.o refclock_acts.o \
- refclock_heath.o refclock_nmea.o refclock_moto.o \
- refclock_atom.o
-
-all: $(PROGRAM)
-
-$(PROGRAM): $(OBJS) $(LIB) version.o
- -rm -f $(PROGRAM)
- $(CC) $(COPTS) -o $@ $(OBJS) version.o $(LIB) $(DAEMONLIBS) \
- $(RESLIB) $(ADJLIB) $(COMPAT)
-
-install: $(BINDIR)/$(PROGRAM)
-
-$(BINDIR)/$(PROGRAM): $(PROGRAM)
- $(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)
-
-tags:
- ctags *.c *.h
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(PROGRAM) *.o *.out tags oxntpd make.log Makefile.bak lint.errs
- -@rm -f .depend *~ .version
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-lint: $(LINTLIB)
- lint -x -u $(DEFS) $(INCL) $(LINTLIB) $(SOURCE) >lint.errs
-
-../lib/llib-llibntp.ln:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" lintlib
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
-../parse/libparse.a:
- cd ../parse && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
-#
-# we want to build the current version string here
-#
-version.o: ../VERSION
- ../scripts/mkversion $(PROGRAM)
- $(CC) $(COPTS) $(INCL) -c version.c
-
-../VERSION:
- -@rm -f .version
-#
-# These guys require knowledge of our clock configuration
-#
-refclock_chu.o: refclock_chu.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_conf.o: refclock_conf.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_local.o: refclock_local.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_pst.o: refclock_pst.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_goes.o: refclock_goes.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_wwvb.o: refclock_wwvb.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_parse.o: refclock_parse.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_mx4200.o: refclock_mx4200.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_as2201.o: refclock_as2201.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_omega.o: refclock_omega.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_tpro.o: refclock_tpro.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_leitch.o: refclock_leitch.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_irig.o: refclock_irig.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_msfees.o: refclock_msfees.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_trak.o: refclock_trak.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_gpstm.o: refclock_gpstm.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_datum.o: refclock_datum.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_acts.o: refclock_acts.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_heath.o: refclock_heath.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_nmea.o: refclock_nmea.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_moto.o: refclock_moto.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
-
-refclock_atom.o: refclock_atom.c
- $(CC) $(COPTS) $(DEFS) $(DEFS_LOCAL) $(CLOCKDEFS) $(INCL) -c $*.c
diff --git a/usr.sbin/xntpd/xntpd/refclock_new/refclock_datum.c b/usr.sbin/xntpd/xntpd/refclock_new/refclock_datum.c
deleted file mode 100644
index 2ce53a7d2c43..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_new/refclock_datum.c
+++ /dev/null
@@ -1,593 +0,0 @@
-/*
- * refclock_datum.c - clock driver for the Datum/Bancomm
- * bc635VME Time and Frequency Processor.
- * R. Schmidt, Time Service, US Naval Obs. May 94
- * modelled after the TPRO NTP driver.
- *
- * This requires the Datum HP-UX V9.01 kernel driver and the HP-UX vme2
- * driver subsystem. It has been tested on an HP9000/747i at HP-UX 9.03.
- * There are no restrictions on release and use of the following code.
- * The refclock type has been defined as 16.
- */
-#if defined(REFCLOCK) && defined(DATUM)
-#include <stdio.h>
-#include <syslog.h>
-#include <ctype.h>
-#include <string.h>
-#include <strings.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "/etc/conf/machine/vme2.h"
-#include "/etc/conf/h/io.h"
-#include "ntp_datum.h"
-#include "ntp_stdlib.h"
-
-/*
- * Definitions
- */
-#define MAXUNITS 1 /* max number of VME units */
-#define BMAX 50 /* timecode buffer length */
-
-/*
- * VME interface parameters. The "IRIG" can be changed to "GPS" for the
- * VME-GPS.
- */
-#define VMEPRECISION (-21) /* precision assumed (1 us) */
-#define VMEREFID "IRIG" /* reference id */
-#define VMEDESCRIPTION "Datum/ VME IRIG-B Reader" /* who we are */
-#define VMEHSREFID 0x7f7f1000 /* 127.127.16.00 refid hi strata */
-#define GMT 0 /* hour offset from Greenwich */
-
-/*
- * Imported from ntp_timer module
- */
-extern u_long current_time; /* current time (s) */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * VME unit control structure.
- */
-struct vmeunit {
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- struct vmedate vmedata; /* data returned from vme read */
- l_fp lastrec; /* last local time */
- l_fp lastref; /* last timecode time */
- char lastcode[BMAX]; /* last timecode received */
- u_short lencode; /* length of last timecode */
- u_long lasttime; /* last time clock heard from */
- u_short unit; /* unit number for this guy */
- u_short status; /* clock status */
- u_short lastevent; /* last clock event */
- u_short year; /* year of eternity */
- u_short day; /* day of year */
- u_short hour; /* hour of day */
- u_short minute; /* minute of hour */
- u_short second; /* seconds of minute */
- u_long usec; /* microsecond of second */
- u_long yearstart; /* start of current year */
- u_short leap; /* leap indicators */
- /*
- * Status tallies
- */
- u_long polls; /* polls sent */
- u_long noreply; /* no replies to polls */
- u_long coderecv; /* timecodes received */
- u_long badformat; /* bad format */
- u_long baddata; /* bad data */
- u_long timestarted; /* time we started this */
-};
-
-/*
- * Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back.
- */
-static struct vmeunit *vmeunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/*
- * Keep the fudge factors separately so they can be set even
- * when no clock is configured.
- */
-static l_fp fudgefactor[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static u_char sloppyclockflag[MAXUNITS];
-
-/*
- * Function prototypes
- */
-static void vme_init P(());
-static int vme_start P((u_int, struct peer *));
-static void vme_shutdown P((int));
-static void vme_report_event P((struct vmeunit *, int));
-static void vme_receive P((struct recvbuf *));
-static void vme_poll P((int unit, struct peer *));
-static void vme_control P((u_int, struct refclockstat *, struct refclockstat *));
-static void vme_buginfo P((int, struct refclockbug *));
-struct vmedate *get_datumtime();
-
-/*
- * Transfer vector
- */
-struct refclock refclock_vme = {
- vme_start, vme_shutdown, vme_poll,
- vme_control, vme_init, vme_buginfo, NOFLAGS
-};
-
-int fd_vme; /* file descriptor for ioctls */
-int regvalue;
-
-/*
- * vme_init - initialize internal vme driver data
- */
-static void
-vme_init()
-{
- register int i;
- /*
- * Just zero the data arrays
- */
- /*
- bzero((char *)vmeunits, sizeof vmeunits);
- bzero((char *)unitinuse, sizeof unitinuse);
- */
-
- /*
- * Initialize fudge factors to default.
- */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor[i].l_ui = 0;
- fudgefactor[i].l_uf = 0;
- stratumtouse[i] = 0;
- sloppyclockflag[i] = 0;
- }
-}
-
-/*
- * vme_start - open the VME device and initialize data for processing
- */
-static int
-vme_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- register struct vmeunit *vme;
- register int i;
- int dummy;
- char vmedev[20];
-
- /*
- * Check configuration info.
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "vme_start: unit %d invalid", unit);
- return (0);
- }
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "vme_start: unit %d in use", unit);
- return (0);
- }
-
- /*
- * Open VME device
- */
-
- if ( (fd_vme = open(VMEFD, O_RDWR)) < 0) {
- syslog(LOG_ERR, "vme_start: failed open of %s: %m", vmedev);
- return (0);
- }
- else { /* Release capture lockout in case it was set from before. */
- if( ioctl( fd_vme, RUNLOCK, &dummy ) )
- syslog(LOG_ERR, "vme_start: RUNLOCK failed %m");
-
- regvalue = 0; /* More esoteric stuff to do... */
- if( ioctl( fd_vme, WCR0, &regvalue ) )
- syslog(LOG_ERR, "vme_start: WCR0 failed %m");
- }
-
- /*
- * Allocate unit structure
- */
- if (vmeunits[unit] != 0) {
- vme = vmeunits[unit]; /* The one we want is okay */
- } else {
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && vmeunits[i] != 0)
- break;
- }
- if (i < MAXUNITS) {
- /*
- * Reclaim this one
- */
- vme = vmeunits[i];
- vmeunits[i] = 0;
- } else {
- vme = (struct vmeunit *)
- emalloc(sizeof(struct vmeunit));
- }
- }
- bzero((char *)vme, sizeof(struct vmeunit));
- vmeunits[unit] = vme;
-
- /*
- * Set up the structures
- */
- vme->peer = peer;
- vme->unit = (u_short)unit;
- vme->timestarted = current_time;
-
- vme->io.clock_recv = vme_receive;
- vme->io.srcclock = (caddr_t)vme;
- vme->io.datalen = 0;
- vme->io.fd = fd_vme;
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success. Note that root delay and root dispersion are
- * always zero for this clock.
- */
- peer->precision = VMEPRECISION;
- peer->rootdelay = 0;
- peer->rootdispersion = 0;
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
- bcopy(VMEREFID, (char *)&peer->refid, 4);
- else
- peer->refid = htonl(VMEHSREFID);
- unitinuse[unit] = 1;
- return (1);
-}
-
-
-/*
- * vme_shutdown - shut down a VME clock
- */
-static void
-vme_shutdown(unit)
- int unit;
-{
- register struct vmeunit *vme;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "vme_shutdown: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "vme_shutdown: unit %d not in use", unit);
- return;
- }
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- vme = vmeunits[unit];
- io_closeclock(&vme->io);
- unitinuse[unit] = 0;
-}
-
-/*
- * vme_report_event - note the occurance of an event
- *
- * This routine presently just remembers the report and logs it, but
- * does nothing heroic for the trap handler.
- */
-static void
-vme_report_event(vme, code)
- struct vmeunit *vme;
- int code;
-{
- struct peer *peer;
-
- peer = vme->peer;
- if (vme->status != (u_short)code) {
- vme->status = (u_short)code;
- if (code != CEVNT_NOMINAL)
- vme->lastevent = (u_short)code;
- syslog(LOG_INFO,
- "clock %s event %x", ntoa(&peer->srcadr), code);
- }
-}
-
-
-/*
- * vme_receive - receive data from the VME device.
- *
- * Note: This interface would be interrupt-driven. We don't use that
- * now, but include a dummy routine for possible future adventures.
- */
-static void
-vme_receive(rbufp)
- struct recvbuf *rbufp;
-{
-}
-
-/*
- * vme_poll - called by the transmit procedure
- */
-static void
-vme_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- struct vmedate *tptr;
- struct vmeunit *vme;
- l_fp tstmp;
- time_t tloc;
- struct tm *tadr;
-
-
- vme = (struct vmeunit *)emalloc(sizeof(struct vmeunit *));
- tptr = (struct vmedate *)emalloc(sizeof(struct vmedate *));
-
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "vme_poll: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "vme_poll: unit %d not in use", unit);
- return;
- }
- vme = vmeunits[unit]; /* Here is the structure */
- vme->polls++;
-
- tptr = &vme->vmedata;
- if ((tptr = get_datumtime()) == NULL ) {
- vme_report_event(vme, CEVNT_BADREPLY);
- return;
- }
-
- gettstamp(&vme->lastrec);
- vme->lasttime = current_time;
-
- /*
- * Get VME time and convert to timestamp format.
- * The year must come from the system clock.
- */
-
- time(&tloc);
- tadr = gmtime(&tloc);
- tptr->year = (unsigned short)(tadr->tm_year + 1900);
-
- sprintf(vme->lastcode,
- "%3.3d %2.2d:%2.2d:%2.2d.%.6d %1d\0",
- tptr->doy, tptr->hr, tptr->mn,
- tptr->sec, tptr->frac, tptr->status);
-
- record_clock_stats(&(vme->peer->srcadr), vme->lastcode);
- vme->lencode = (u_short) strlen(vme->lastcode);
-
- vme->day = tptr->doy;
- vme->hour = tptr->hr;
- vme->minute = tptr->mn;
- vme->second = tptr->sec;
- vme->usec = tptr->frac;
-
-#ifdef DEBUG
- if (debug)
- printf("vme: %3d %02d:%02d:%02d.%06ld %1x\n",
- vme->day, vme->hour, vme->minute, vme->second,
- vme->usec, tptr->status);
-#endif
- if (tptr->status ) { /* Status 0 is locked to ref., 1 is not */
- vme_report_event(vme, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Now, compute the reference time value. Use the heavy
- * machinery for the seconds and the millisecond field for the
- * fraction when present. If an error in conversion to internal
- * format is found, the program declares bad data and exits.
- * Note that this code does not yet know how to do the years and
- * relies on the clock-calendar chip for sanity.
- */
- if (!clocktime(vme->day, vme->hour, vme->minute,
- vme->second, GMT, vme->lastrec.l_ui,
- &vme->yearstart, &vme->lastref.l_ui)) {
- vme->baddata++;
- vme_report_event(vme, CEVNT_BADTIME);
- syslog(LOG_ERR, "refclock_datum: bad data!!");
- return;
- }
- TVUTOTSF(vme->usec, vme->lastref.l_uf);
- tstmp = vme->lastref;
-
- L_SUB(&tstmp, &vme->lastrec);
- vme->coderecv++;
-
- L_ADD(&tstmp, &(fudgefactor[vme->unit]));
-
- refclock_receive(vme->peer, &tstmp, GMT, 0,
- &vme->lastrec, &vme->lastrec, vme->leap);
-}
-
-/*
- * vme_control - set fudge factors, return statistics
- */
-static void
-vme_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct vmeunit *vme;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "vme_control: unit %d invalid)", unit);
- return;
- }
-
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- fudgefactor[unit] = in->fudgetime1;
- if (in->haveflags & CLK_HAVEVAL1) {
- stratumtouse[unit] = (u_char)(in->fudgeval1 & 0xf);
- if (unitinuse[unit]) {
- struct peer *peer;
-
- /*
- * Should actually reselect clock, but
- * will wait for the next timecode
- */
- vme = vmeunits[unit];
- peer = vme->peer;
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1)
- bcopy(VMEREFID, (char *)&peer->refid,
- 4);
- else
- peer->refid = htonl(VMEHSREFID);
- }
- }
- if (in->haveflags & CLK_HAVEFLAG1) {
- sloppyclockflag[unit] = in->flags & CLK_FLAG1;
- }
- }
-
- if (out != 0) {
-/* out->type = REFCLK_IRIG_VME; */
- out->type = 16; /* made up by RES */
- out->haveflags
- = CLK_HAVETIME1|CLK_HAVEVAL1|CLK_HAVEVAL2|CLK_HAVEFLAG1;
- out->clockdesc = VMEDESCRIPTION;
- out->fudgetime1 = fudgefactor[unit];
- out->fudgetime2.l_ui = 0;
- out->fudgetime2.l_uf = 0;
- out->fudgeval1 = (LONG)stratumtouse[unit];
- out->fudgeval2 = 0;
- out->flags = sloppyclockflag[unit];
- if (unitinuse[unit]) {
- vme = vmeunits[unit];
- out->lencode = vme->lencode;
- out->lastcode = vme->lastcode;
- out->timereset = current_time - vme->timestarted;
- out->polls = vme->polls;
- out->noresponse = vme->noreply;
- out->badformat = vme->badformat;
- out->baddata = vme->baddata;
- out->lastevent = vme->lastevent;
- out->currentstatus = vme->status;
- } else {
- out->lencode = 0;
- out->lastcode = "";
- out->polls = out->noresponse = 0;
- out->badformat = out->baddata = 0;
- out->timereset = 0;
- out->currentstatus = out->lastevent = CEVNT_NOMINAL;
- }
- }
-}
-
-/*
- * vme_buginfo - return clock dependent debugging info
- */
-static void
-vme_buginfo(unit, bug)
- int unit;
- register struct refclockbug *bug;
-{
- register struct vmeunit *vme;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "vme_buginfo: unit %d invalid)", unit);
- return;
- }
-
- if (!unitinuse[unit])
- return;
- vme = vmeunits[unit];
-
- bug->nvalues = 11;
- bug->ntimes = 5;
- if (vme->lasttime != 0)
- bug->values[0] = current_time - vme->lasttime;
- else
- bug->values[0] = 0;
- bug->values[2] = (u_long)vme->year;
- bug->values[3] = (u_long)vme->day;
- bug->values[4] = (u_long)vme->hour;
- bug->values[5] = (u_long)vme->minute;
- bug->values[6] = (u_long)vme->second;
- bug->values[7] = (u_long)vme->usec;
- bug->values[9] = vme->yearstart;
- bug->stimes = 0x1c;
- bug->times[0] = vme->lastref;
- bug->times[1] = vme->lastrec;
-}
-
-struct vmedate *get_datumtime()
-{
- unsigned short status;
- char cbuf[7];
- struct vmedate *time_vme;
- struct btfp_time vts;
- time_vme = (struct vmedate *)malloc(sizeof(struct vmedate ));
-
- if( ioctl(fd_vme, READTIME, &vts))
- syslog(LOG_ERR, "get_datumtime error: %m");
-
-/* sprintf converts BCD to ASCII */
-/* Get doy */
- sprintf(cbuf,"%3.3x\0", ((vts.btfp_time[ 0 ] & 0x000f) <<8) +
- ((vts.btfp_time[ 1 ] & 0xff00) >> 8));
-
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]) && isdigit(cbuf[2]) )
- time_vme->doy = (unsigned short)atoi(cbuf);
- else
- time_vme->doy = (unsigned short) 0;
-
-/* Get hour */
- sprintf(cbuf,"%2.2x\0", vts.btfp_time[ 1 ] & 0x00ff);
-
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]))
- time_vme->hr = (unsigned short)atoi(cbuf);
- else
- time_vme->hr = (unsigned short) 0;
-
-/* Get minutes */
- sprintf(cbuf,"%2.2x\0", (vts.btfp_time[ 2 ] & 0xff00) >>8);
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]))
- time_vme->mn = (unsigned short)atoi(cbuf);
- else
- time_vme->mn = (unsigned short) 0;
-
-/* Get seconds */
- sprintf(cbuf,"%2.2x\0", vts.btfp_time[ 2 ] & 0x00ff);
-
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]))
- time_vme->sec = (unsigned short)atoi(cbuf);
- else
- time_vme->sec = (unsigned short) 0;
-
-/* Get microseconds. Yes, we ignore the 0.1 microsecond digit so we can
-use the TVTOTSF function later on...*/
-
- sprintf(cbuf,"%4.4x%2.2x\0", vts.btfp_time[ 3 ],
- vts.btfp_time[ 4 ]>>8);
-
- if (isdigit(cbuf[0]) && isdigit(cbuf[1]) && isdigit(cbuf[2])
- && isdigit(cbuf[3]) && isdigit(cbuf[4]) && isdigit(cbuf[5]))
- time_vme->frac = (u_long) atoi(cbuf);
- else
- time_vme->frac = (u_long) 0;
-
-/* Get status bit */
- status = (vts.btfp_time[0] & 0x0010) >>4;
- time_vme->status = status; /* Status=0 if locked to ref. */
- /* Status=1 if flywheeling */
- if (status) { /* lost lock ? */
- return ((void *)NULL);
- }
- else
- return (time_vme);
-}
-#endif
diff --git a/usr.sbin/xntpd/xntpd/refclock_new/refclock_gpstm.c b/usr.sbin/xntpd/xntpd/refclock_new/refclock_gpstm.c
deleted file mode 100644
index deab7f46ef6b..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_new/refclock_gpstm.c
+++ /dev/null
@@ -1,999 +0,0 @@
-/*
- * refclock_gpstm - clock driver for the Kinimetrics Truetime GPSTM/TMD rcvr
- * Version 1.0 (from Version 2.0 of the GOES driver, as of 03Jan94)
- */
-
-#if defined(REFCLOCK) && (defined(GPSTM) || defined(GPSTMCLK) \
- || defined(GPSTMPPS))
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-
-#ifdef SYS_BSDI
-#undef HAVE_BSD_TTYS
-#include <sys/ioctl.h>
-#endif
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-
-#if defined(STREAM)
-#include <stropts.h>
-#if defined(GPSTMCLK)
-#include <clkdefs.h>
-#endif /* GPSTMCLK */
-#endif /* STREAM */
-
-#if defined(GPSTMPPS)
-#include <sys/ppsclock.h>
-#endif /* GPSTMPPS */
-
-#include "ntp_stdlib.h"
-
-/*
- * Support for Kinemetrics Truetime GPS-TM/TMD Receiver
- *
- * Most of this code is copied from refclock_goes.c with thanks.
- *
- * the time code looks like follows:
- *
- * ADDD:HH:MM:SSQCL
- * A - control A
- * Q Quality indication: indicates possible error of
- * ? +/- 500 milliseconds # +/- 50 milliseconds
- * * +/- 5 milliseconds . +/- 1 millisecond
- * space less than 1 millisecond
- * C - Carriage return
- * L - Line feed
- * The carriage return start bit begins on 0 seconds and extends to 1 bit time.
- *
- * Flag1 set to 1 will silence the clock side of xntpd, just reading the
- * clock without trying to write to it. This is usefull if several
- * xntpds listen to the same clock. This has not been tested yet...
- */
-
-/*
- * Definitions
- */
-#define MAXUNITS 4 /* max number of GPSTM units */
-#define GPSTM232 "/dev/gpstm%d"
-#define SPEED232 B9600 /* 9600 baud */
-
-/*
- * Radio interface parameters
- */
-#define MAXDISPERSE (FP_SECOND>>1) /* max error for synchronized clock (0.5 s as an u_fp) */
-#define PRECISION (-20) /* precision assumed (about 1 ms) */
-#define REFID "GPS\0" /* reference id */
-#define DESCRIPTION "Kinemetrics GPS-TM/TMD Receiver" /* who we are */
-#define GMT 0 /* hour offset from Greenwich */
-#define NCODES 3 /* stages of median filter */
-#define BMAX 99 /* timecode buffer length */
-#define CODEDIFF 0x20000000 /* 0.125 seconds as an l_fp fraction */
-#define TIMEOUT 180 /* ping the clock if it's silent this long */
-
-/*
- * used by the state machine
- */
-enum gpstm_event {e_Init, e_F18, e_F50, e_F51, e_TS};
-static enum {Base, Start, F18, F50, F51, F08} State[MAXUNITS];
-static void gpstm_doevent P((int, enum gpstm_event));
-static void gpstm_initstate P((int));
-
-/*
- * Hack to avoid excercising the multiplier. I have no pride.
- */
-#define MULBY10(x) (((x)<<3) + ((x)<<1))
-
-/*
- * Imported from the timer module
- */
-extern u_long current_time;
-extern struct event timerqueue[];
-
-/*
- * Imported from ntp_loopfilter module
- */
-extern int fdpps; /* pps file descriptor */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * GPSTM unit control structure
- */
-struct gpstm_unit {
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- l_fp lastrec; /* last receive time */
- l_fp lastref; /* last timecode time */
- l_fp offset[NCODES]; /* recent sample offsets */
- char lastcode[BMAX]; /* last timecode received */
- u_short polled; /* Hand in a time sample? */
- u_char lencode; /* length of last timecode */
- u_long lasttime; /* last time clock heard from */
- u_char unit; /* unit number for this guy */
- u_char status; /* clock status */
- u_char lastevent; /* last clock event */
- u_char reason; /* reason for last abort */
- u_char year; /* year of eternity */
- u_short day; /* day of year */
- u_char hour; /* hour of day */
- u_char minute; /* minute of hour */
- u_char second; /* seconds of minute */
- u_char leap; /* leap indicators */
- u_short msec; /* millisecond of second */
- u_char quality; /* quality character */
- u_long yearstart; /* start of current year */
- /*
- * Status tallies
- */
- u_long polls; /* polls sent */
- u_long noreply; /* no replies to polls */
- u_long coderecv; /* timecodes received */
- u_long badformat; /* bad format */
- u_long baddata; /* bad data */
- u_long timestarted; /* time we started this */
-};
-
-/*
- * Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back.
- */
-static struct gpstm_unit *gpstm_units[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/*
- * Keep the fudge factors separately so they can be set even
- * when no clock is configured.
- */
-static l_fp fudgefactor1[MAXUNITS];
-static l_fp fudgefactor2[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static u_char readonlyclockflag[MAXUNITS];
-static u_long refid[MAXUNITS];
-
-/*
- * Function prototypes
- */
-static void gpstm_init P((void));
-static int gpstm_start P((u_int, struct peer *));
-static void gpstm_shutdown P((int));
-static void gpstm_rep_event P((struct gpstm_unit *, int));
-static void gpstm_receive P((struct recvbuf *));
-static char gpstm_process P((struct gpstm_unit *, l_fp *, u_fp *));
-static void gpstm_poll P((int, struct peer *));
-static void gpstm_control P((u_int, struct refclockstat *,
- struct refclockstat *));
-static void gpstm_buginfo P((int, struct refclockbug *));
-static void gpstm_send P((struct gpstm_unit *, char *));
-
-struct refclock refclock_gpstm = {
- gpstm_start, gpstm_shutdown, gpstm_poll,
- gpstm_control, gpstm_init, gpstm_buginfo, NOFLAGS
-};
-
-/*
- * gpstm_init - initialize internal driver data
- */
-static void
-gpstm_init()
-{
- register int i;
- /*
- * Just zero the data arrays
- */
- memset((char *)gpstm_units, 0, sizeof gpstm_units);
- memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
- * Initialize fudge factors to default.
- */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor1[i].l_ui = 0;
- fudgefactor1[i].l_uf = 0;
- fudgefactor2[i].l_ui = 0;
- fudgefactor2[i].l_uf = 0;
- stratumtouse[i] = 0;
- readonlyclockflag[i] = 0;
- memcpy((char *)&refid[i], REFID, 4);
- }
-}
-
-
-/*
- * gpstm_start - open the device and initialize data for processing
- */
-static int
-gpstm_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- register struct gpstm_unit *gpstm;
- register int i;
- int fd232;
- char dev[20];
-
- /*
- * Check configuration info
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_start: unit %d invalid", unit);
- return 0;
- }
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "gpstm_start: unit %d in use", unit);
- return 0;
- }
-
- /*
- * Open serial port
- */
- (void) sprintf(dev, GPSTM232, unit);
- fd232 = open(dev, O_RDWR, 0777);
- if (fd232 == -1) {
- syslog(LOG_ERR, "gpstm_start: open of %s: %m", dev);
- return 0;
- }
-
-#if defined(HAVE_SYSV_TTYS)
- /*
- * System V serial line parameters (termio interface)
- *
- */
- { struct termio ttyb;
- if (ioctl(fd232, TCGETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TCGETA): %m", dev);
- goto screwed;
- }
- ttyb.c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyb.c_oflag = 0;
- ttyb.c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyb.c_lflag = ICANON;
- ttyb.c_cc[VERASE] = ttyb.c_cc[VKILL] = '\0';
- if (ioctl(fd232, TCSETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TCSETA): %m", dev);
- goto screwed;
- }
- }
-#endif /* HAVE_SYSV_TTYS */
-#if defined(HAVE_TERMIOS)
- /*
- * POSIX serial line parameters (termios interface)
- *
- * The GPSTMCLK option provides timestamping at the driver level.
- * It requires the tty_clk streams module.
- *
- * The GPSTMPPS option provides timestamping at the driver level.
- * It uses a 1-pps signal and level converter (gadget box) and
- * requires the ppsclock streams module and SunOS 4.1.1 or
- * later.
- */
- { struct termios ttyb, *ttyp;
- ttyp = &ttyb;
-
- if (tcgetattr(fd232, ttyp) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: tcgetattr(%s): %m", dev);
- goto screwed;
- }
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: tcsetattr(%s): %m", dev);
- goto screwed;
- }
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: tcflush(%s): %m", dev);
- goto screwed;
- }
-#if defined(STREAM)
-#if defined(GPSTMCLK)
- if (ioctl(fd232, I_PUSH, "clk") < 0)
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, I_PUSH, clk): %m", dev);
- if (ioctl(fd232, CLK_SETSTR, "\n") < 0)
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, CLK_SETSTR): %m", dev);
-#endif /* GPSTMCLK */
-#if defined(GPSTMPPS)
- if (ioctl(fd232, I_PUSH, "ppsclock") < 0)
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, I_PUSH, ppsclock): %m", dev);
- else
- fdpps = fd232;
-#endif /* GPSTMPPS */
-#endif /* STREAM */
- }
-#endif /* HAVE_TERMIOS */
-#if defined(HAVE_BSD_TTYS)
- /*
- * 4.3bsd serial line parameters (sgttyb interface)
- *
- * The GPSTMCLK option provides timestamping at the driver level.
- * It requires the tty_clk line discipline and 4.3bsd or later.
- */
- { struct sgttyb ttyb;
-#if defined(GPSTMCLK)
- int ldisc = CLKLDISC;
-#endif /* GPSTMCLK */
-
- if (ioctl(fd232, TIOCGETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TIOCGETP): %m", dev);
- goto screwed;
- }
- ttyb.sg_ispeed = ttyb.sg_ospeed = SPEED232;
-#if defined(GPSTMCLK)
- ttyb.sg_erase = ttyb.sg_kill = '\r';
- ttyb.sg_flags = RAW;
-#else
- ttyb.sg_erase = ttyb.sg_kill = '\0';
- ttyb.sg_flags = EVENP|ODDP|CRMOD;
-#endif /* GPSTMCLK */
- if (ioctl(fd232, TIOCSETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TIOCSETP): %m", dev);
- goto screwed;
- }
-#if defined(GPSTMCLK)
- if (ioctl(fd232, TIOCSETD, &ldisc) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TIOCSETD): %m", dev);
- goto screwed;
- }
-#endif /* GPSTMCLK */
- }
-#endif /* HAVE_BSD_TTYS */
-
- /*
- * Allocate unit structure
- */
- if (gpstm_units[unit] != 0) {
- gpstm = gpstm_units[unit]; /* The one we want is okay */
- } else {
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && gpstm_units[i] != 0)
- break;
- }
- if (i < MAXUNITS) {
- /*
- * Reclaim this one
- */
- gpstm = gpstm_units[i];
- gpstm_units[i] = 0;
- } else {
- gpstm = (struct gpstm_unit *)
- emalloc(sizeof(struct gpstm_unit));
- }
- }
- memset((char *)gpstm, 0, sizeof(struct gpstm_unit));
- gpstm_units[unit] = gpstm;
-
- /*
- * Set up the structures
- */
- gpstm->peer = peer;
- gpstm->unit = (u_char)unit;
- gpstm->timestarted = current_time;
-
- gpstm->io.clock_recv = gpstm_receive;
- gpstm->io.srcclock = (caddr_t)gpstm;
- gpstm->io.datalen = 0;
- gpstm->io.fd = fd232;
- if (!io_addclock(&gpstm->io)) {
- goto screwed;
- }
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success.
- */
- peer->precision = PRECISION;
- peer->rootdelay = 0;
- peer->rootdispersion = 0;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- unitinuse[unit] = 1;
- gpstm_initstate(unit);
- return 1;
-
- /*
- * Something broke; abandon ship
- */
-screwed:
- (void) close(fd232);
- return 0;
-}
-
-/*
- * gpstm_shutdown - shut down a clock
- */
-static void
-gpstm_shutdown(unit)
- int unit;
-{
- register struct gpstm_unit *gpstm;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_shutdown: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "gpstm_shutdown: unit %d not in use", unit);
- return;
- }
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- gpstm = gpstm_units[unit];
- io_closeclock(&gpstm->io);
- unitinuse[unit] = 0;
-}
-
-
-/*
- * gpstm_rep_event - note the occurance of an event
- */
-static void
-gpstm_rep_event(gpstm, code)
- struct gpstm_unit *gpstm;
- int code;
-{
- struct peer *peer;
-
- peer = gpstm->peer;
- if (gpstm->status != (u_char)code) {
- gpstm->status = (u_char)code;
- if (code != CEVNT_NOMINAL)
- gpstm->lastevent = (u_char)code;
- syslog(LOG_INFO,
- "clock %s event %x\n", ntoa(&peer->srcadr), code);
-#ifdef DEBUG
- if (debug) {
- printf("gpstm_rep_event(gpstm%d, code %d)\n",
- gpstm->unit, code);
- }
-#endif
- }
- if (code == CEVNT_BADREPLY)
- gpstm_initstate(gpstm->unit);
-}
-
-
-/*
- * gpstm_receive - receive data from the serial interface on a clock
- */
-static void
-gpstm_receive(rbufp)
- struct recvbuf *rbufp;
-{
- register int i;
- register struct gpstm_unit *gpstm;
- register u_char *dpt;
- register char *cp;
- register u_char *dpend;
- l_fp tstmp;
- u_fp dispersion;
-
- /*
- * Get the clock this applies to and a pointers to the data
- */
- gpstm = (struct gpstm_unit *)rbufp->recv_srcclock;
- dpt = (u_char *)&rbufp->recv_space;
-
- /*
- * Edit timecode to remove control chars
- */
- dpend = dpt + rbufp->recv_length;
- cp = gpstm->lastcode;
- while (dpt < dpend) {
- if ((*cp = 0x7f & *dpt++) >= ' ') cp++;
-#ifdef GPSTMCLK
- else if (*cp == '\r') {
- if (dpend - dpt < 8) {
- /* short timestamp */
- return;
- }
- if (!buftvtots(dpt,&gpstm->lastrec)) {
- /* screwy timestamp */
- return;
- }
- dpt += 8;
- }
-#endif
- }
- *cp = '\0';
- gpstm->lencode = cp - gpstm->lastcode;
- if (gpstm->lencode == 0)
- return;
-#ifndef GPSTMCLK
- gpstm->lastrec = rbufp->recv_time;
-#endif /* GPSTMCLK */
-#if !defined(GPSTMCLK) && !defined(GPSTMPPS) && defined(TIOCMODT)
- do {
- auto struct timeval cur, now;
- register long usec;
-
- if (ioctl(gpstm->io.fd, TIOCMODT, &cur) < 0) {
- syslog(LOG_ERR, "TIOCMODT: %m");
-#ifdef DEBUG
- if (debug) perror("TIOCMODT");
- break;
-#endif
- }
- if (cur.tv_sec == 0) {
- /* no timestamps yet */
- if (debug) printf("MODT tv_sec == 0\n");
- break;
- }
-
- gettimeofday(&now, NULL);
- usec = 1000000 * (now.tv_sec - cur.tv_sec)
- + (now.tv_usec - cur.tv_usec);
-#ifdef DEBUG
- if (debug) printf("lastmodem: delay=%d us\n", usec);
-#endif
- if (usec < 0 || usec > 10000) {
- /* time warp or stale timestamp */
- break;
- }
- if (!buftvtots((char *)&cur, &gpstm->lastrec)) {
- /* screwy timestamp */
- break;
- }
- } while (0);
-#endif /*TIOCMODT*/
-
-#ifdef DEBUG
- if (debug)
- printf("gpstm: timecode %d %s\n",
- gpstm->lencode, gpstm->lastcode);
-#endif
-
- cp = gpstm->lastcode;
- gpstm->leap = 0;
- if ((cp[0] == 'F' && isdigit(cp[1]) && isdigit(cp[2]))
- || (cp[0] == ' ' && cp[1] == 'T' && cp[2] == 'R')) {
- enum gpstm_event event;
-
- syslog(LOG_NOTICE, "gpstm%d: \"%s\"", gpstm->unit, cp);
- if (cp[1] == '5' && cp[2] == '0')
- event = e_F50;
- else if (cp[1] == '5' && cp[2] == '1')
- event = e_F51;
- else if (!strncmp(" TRUETIME Mk III", cp, 16))
- event = e_F18;
- else {
- gpstm_rep_event(gpstm, CEVNT_BADREPLY);
- return;
- }
- gpstm_doevent(gpstm->unit, event);
- return;
- } else if (gpstm->lencode == 13) {
- /*
- * Check timecode format 0
- */
- if (!isdigit(cp[0]) /* day of year */
- || !isdigit(cp[1])
- || !isdigit(cp[2])
- || cp[3] != ':' /* : separator */
- || !isdigit(cp[4]) /* hours */
- || !isdigit(cp[5])
- || cp[6] != ':' /* : separator */
- || !isdigit(cp[7]) /* minutes */
- || !isdigit(cp[8])
- || cp[9] != ':' /* : separator */
- || !isdigit(cp[10]) /* seconds */
- || !isdigit(cp[11]))
- {
- gpstm->badformat++;
- gpstm_rep_event(gpstm, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Convert format 0 and check values
- */
- gpstm->year = 0; /* fake */
- gpstm->day = cp[0] - '0';
- gpstm->day = MULBY10(gpstm->day) + cp[1] - '0';
- gpstm->day = MULBY10(gpstm->day) + cp[2] - '0';
- gpstm->hour = MULBY10(cp[4] - '0') + cp[5] - '0';
- gpstm->minute = MULBY10(cp[7] - '0') + cp[8] - '0';
- gpstm->second = MULBY10(cp[10] - '0') + cp[11] - '0';
- gpstm->msec = 0;
-
- if (cp[12] != ' ' && cp[12] != '.' && cp[12] != '*')
- gpstm->leap = LEAP_NOTINSYNC;
- else
- gpstm->lasttime = current_time;
-
- if (gpstm->day < 1 || gpstm->day > 366) {
- gpstm->baddata++;
- gpstm_rep_event(gpstm, CEVNT_BADDATE);
- return;
- }
- if (gpstm->hour > 23 || gpstm->minute > 59
- || gpstm->second > 59) {
- gpstm->baddata++;
- gpstm_rep_event(gpstm, CEVNT_BADTIME);
- return;
- }
- gpstm_doevent(gpstm->unit, e_TS);
- } else {
- gpstm_rep_event(gpstm, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * The clock will blurt a timecode every second but we only
- * want one when polled. If we havn't been polled, bail out.
- */
- if (!gpstm->polled)
- return;
-
- /*
- * Now, compute the reference time value. Use the heavy
- * machinery for the seconds and the millisecond field for the
- * fraction when present.
- *
- * this code does not yet know how to do the years
- */
- tstmp = gpstm->lastrec;
- if (!clocktime(gpstm->day, gpstm->hour, gpstm->minute,
- gpstm->second, GMT, tstmp.l_ui,
- &gpstm->yearstart, &gpstm->lastref.l_ui))
- {
- gpstm->baddata++;
- gpstm_rep_event(gpstm, CEVNT_BADTIME);
- return;
- }
- MSUTOTSF(gpstm->msec, gpstm->lastref.l_uf);
-
- i = ((int)(gpstm->coderecv)) % NCODES;
- gpstm->offset[i] = gpstm->lastref;
- L_SUB(&gpstm->offset[i], &tstmp);
- if (gpstm->coderecv == 0)
- for (i = 1; i < NCODES; i++)
- gpstm->offset[i] = gpstm->offset[0];
-
- gpstm->coderecv++;
-
- /*
- * Process the median filter, and pass the
- * offset and dispersion along. We use lastrec as both the
- * reference time and receive time in order to avoid being cute,
- * like setting the reference time later than the receive time,
- * which may cause a paranoid protocol module to chuck out the
- * data.
- */
- if (!gpstm_process(gpstm, &tstmp, &dispersion)) {
- gpstm->baddata++;
- gpstm_rep_event(gpstm, CEVNT_BADTIME);
- return;
- }
- refclock_receive(gpstm->peer, &tstmp, GMT, dispersion,
- &gpstm->lastrec, &gpstm->lastrec, gpstm->leap);
-
- /*
- * We have succedded in answering the poll. Turn off the flag
- */
- gpstm->polled = 0;
-}
-
-/*
- * gpstm_send - time to send the clock a signal to cough up a time sample
- */
-static void
-gpstm_send(gpstm, cmd)
- struct gpstm_unit *gpstm;
- char *cmd;
-{
-#ifdef DEBUG
- if (debug) {
- printf("gpstm_send(gpstm%d): %s\n", gpstm->unit, cmd);
- }
-#endif
- if (!readonlyclockflag[gpstm->unit]) {
- register int len = strlen(cmd);
-
- if (write(gpstm->io.fd, cmd, len) != len) {
- syslog(LOG_ERR, "gpstm_send: unit %d: %m",
- gpstm->unit);
- gpstm_rep_event(gpstm, CEVNT_FAULT);
- }
- }
-}
-
-/*
- * state machine for initializing the clock
- */
-
-static void
-gpstm_doevent(unit, event)
- int unit;
- enum gpstm_event event;
-{
- struct gpstm_unit *gpstm = gpstm_units[unit];
-
-#ifdef DEBUG
- if (debug) {
- printf("gpstm_doevent(gpstm%d, %d)\n", unit, (int)event);
- }
-#endif
- if (event == e_TS && State[unit] != F51 && State[unit] != F08) {
- gpstm_send(gpstm, "\03\r");
- }
-
- switch (event) {
- case e_Init:
- gpstm_send(gpstm, "F18\r");
- State[unit] = Start;
- break;
- case e_F18:
- gpstm_send(gpstm, "F50\r");
- State[unit] = F18;
- break;
- case e_F50:
- gpstm_send(gpstm, "F51\r");
- State[unit] = F50;
- break;
- case e_F51:
- gpstm_send(gpstm, "F08\r");
- State[unit] = F51;
- break;
- case e_TS:
- /* nothing to send - we like this mode */
- State[unit] = F08;
- break;
- }
-}
-
-static void
-gpstm_initstate(unit)
- int unit;
-{
- State[unit] = Base; /* just in case */
- gpstm_doevent(unit, e_Init);
-}
-
-/*
- * gpstm_process - process a pile of samples from the clock
- */
-static char
-gpstm_process(gpstm, offset, dispersion)
- struct gpstm_unit *gpstm;
- l_fp *offset;
- u_fp *dispersion;
-{
- register int i, j;
- register u_long tmp_ui, tmp_uf;
- int not_median1 = -1; /* XXX correct? */
- int not_median2 = -1; /* XXX correct? */
- int median;
- u_fp disp_tmp, disp_tmp2;
-
- /*
- * This code implements a three-stage median filter. First, we
- * check if the samples are within 125 ms of each other. If not,
- * dump the sample set. We take the median of the three offsets
- * and use that as the sample offset. We take the maximum
- * difference and use that as the sample dispersion. There
- * probably is not much to be gained by a longer filter, since
- * the clock filter in ntp_proto should do its thing.
- */
- disp_tmp2 = 0;
- for (i = 0; i < NCODES-1; i++) {
- for (j = i+1; j < NCODES; j++) {
- tmp_ui = gpstm->offset[i].l_ui;
- tmp_uf = gpstm->offset[i].l_uf;
- M_SUB(tmp_ui, tmp_uf, gpstm->offset[j].l_ui,
- gpstm->offset[j].l_uf);
- if (M_ISNEG(tmp_ui, tmp_uf)) {
- M_NEG(tmp_ui, tmp_uf);
- }
- if (tmp_ui != 0 || tmp_uf > CODEDIFF) {
- return 0;
- }
- disp_tmp = MFPTOFP(0, tmp_uf);
- if (disp_tmp > disp_tmp2) {
- disp_tmp2 = disp_tmp;
- not_median1 = i;
- not_median2 = j;
- }
- }
- }
-
- /*
- * It seems as if all are within 125 ms of each other.
- * Now to determine the median of the three. Whlie the
- * 125 ms check was going on, we also subtly catch the
- * dispersion and set-up for a very easy median calculation.
- * The largest difference between any two samples constitutes
- * the dispersion. The sample not involve in the dispersion is
- * the median sample. EASY!
- */
- if (gpstm->lasttime == 0 || disp_tmp2 > MAXDISPERSE)
- disp_tmp2 = MAXDISPERSE;
- if (not_median1 == 0) {
- if (not_median2 == 1)
- median = 2;
- else
- median = 1;
- } else {
- median = 0;
- }
- *offset = gpstm->offset[median];
- *dispersion = disp_tmp2;
- return 1;
-}
-
-/*
- * gpstm_poll - called by the transmit procedure
- */
-static void
-gpstm_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- struct gpstm_unit *gpstm;
-
- /*
- * You don't need to poll this clock. It puts out timecodes
- * once per second. If asked for a timestamp, take note.
- * The next time a timecode comes in, it will be fed back.
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_poll: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "gpstm_poll: unit %d not in use", unit);
- return;
- }
- gpstm = gpstm_units[unit];
- if ((current_time - gpstm->lasttime) > 150) {
- gpstm->noreply++;
- gpstm_rep_event(gpstm_units[unit], CEVNT_TIMEOUT);
- gpstm_initstate(gpstm->unit);
- }
-
- /*
- * polled every 64 seconds. Ask our receiver to hand in a timestamp.
- */
- gpstm->polled = 1;
- gpstm->polls++;
-}
-
-/*
- * gpstm_control - set fudge factors, return statistics
- */
-static void
-gpstm_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct gpstm_unit *gpstm;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_control: unit %d invalid", unit);
- return;
- }
-
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- fudgefactor1[unit] = in->fudgetime1;
- if (in->haveflags & CLK_HAVETIME2)
- fudgefactor2[unit] = in->fudgetime2;
- if (in->haveflags & CLK_HAVEVAL1)
- stratumtouse[unit] = (u_char)(in->fudgeval1);
- if (in->haveflags & CLK_HAVEVAL2)
- refid[unit] = in->fudgeval2;
- if (in->haveflags & CLK_HAVEFLAG1)
- readonlyclockflag[unit] = in->flags & CLK_FLAG1;
- if (unitinuse[unit]) {
- struct peer *peer;
-
- peer = gpstm_units[unit]->peer;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- }
- }
-
- if (out != 0) {
- memset((char *)out, 0, sizeof (struct refclockstat));
- out->type = REFCLK_GPSTM_TRUETIME;
- out->haveflags = CLK_HAVETIME1 | CLK_HAVETIME2 | CLK_HAVEVAL1 |
- CLK_HAVEVAL2 | CLK_HAVEFLAG1;
- out->clockdesc = DESCRIPTION;
- out->fudgetime1 = fudgefactor1[unit];
- out->fudgetime2 = fudgefactor2[unit];
- out->fudgeval1 = stratumtouse[unit];
- out->fudgeval2 = refid[unit];
- out->flags = readonlyclockflag[unit];
- if (unitinuse[unit]) {
- gpstm = gpstm_units[unit];
- out->lencode = gpstm->lencode;
- out->lastcode = gpstm->lastcode;
- out->timereset = current_time - gpstm->timestarted;
- out->polls = gpstm->polls;
- out->noresponse = gpstm->noreply;
- out->badformat = gpstm->badformat;
- out->baddata = gpstm->baddata;
- out->lastevent = gpstm->lastevent;
- out->currentstatus = gpstm->status;
- }
- }
-}
-
-/*
- * gpstm_buginfo - return clock dependent debugging info
- */
-static void
-gpstm_buginfo(unit, bug)
- int unit;
- register struct refclockbug *bug;
-{
- register struct gpstm_unit *gpstm;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_buginfo: unit %d invalid", unit);
- return;
- }
-
- if (!unitinuse[unit])
- return;
- gpstm = gpstm_units[unit];
-
- bug->nvalues = 11;
- bug->ntimes = 5;
- if (gpstm->lasttime != 0)
- bug->values[0] = current_time - gpstm->lasttime;
- else
- bug->values[0] = 0;
- bug->values[1] = gpstm->reason;
- bug->values[2] = gpstm->year;
- bug->values[3] = gpstm->day;
- bug->values[4] = gpstm->hour;
- bug->values[5] = gpstm->minute;
- bug->values[6] = gpstm->second;
- bug->values[7] = gpstm->msec;
- bug->values[8] = gpstm->noreply;
- bug->values[9] = gpstm->yearstart;
- bug->values[10] = gpstm->quality;
- bug->stimes = 0x1c;
- bug->times[0] = gpstm->lastref;
- bug->times[1] = gpstm->lastrec;
- bug->times[2] = gpstm->offset[0];
- bug->times[3] = gpstm->offset[1];
- bug->times[4] = gpstm->offset[2];
-}
-
-#endif /*GPSTM et al*/
diff --git a/usr.sbin/xntpd/xntpd/refclock_new/refclock_leitch.c b/usr.sbin/xntpd/xntpd/refclock_new/refclock_leitch.c
deleted file mode 100644
index b2a0e7fa76bf..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_new/refclock_leitch.c
+++ /dev/null
@@ -1,718 +0,0 @@
-/*
- * refclock_leitch - clock driver for the Leitch CSD-5300 Master Clock
- */
-#if defined(REFCLOCK) && (defined(LEITCH) || defined(LEITCHCLK) || defined(LEITCHPPS))
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-#ifdef STREAM
-#include <stropts.h>
-#if defined(LEITCHCLK)
-#include <sys/clkdefs.h>
-#endif /* LEITCHCLK */
-#endif /* STREAM */
-
-#if defined (LEITCHPPS)
-#include <sys/ppsclock.h>
-#endif /* LEITCHPPS */
-
-#include "ntp_stdlib.h"
-
-/*
- * Driver for Leitch CSD-5300 Master Clock System
- *
- * COMMANDS:
- * DATE: D <CR>
- * TIME: T <CR>
- * STATUS: S <CR>
- * LOOP: L <CR>
- *
- * FORMAT:
- * DATE: YYMMDD<CR>
- * TIME: <CR>/HHMMSS <CR>/HHMMSS <CR>/HHMMSS <CR>/
- * second bondaried on the stop bit of the <CR>
- * second boundaries at '/' above.
- * STATUS: G (good), D (diag fail), T (time not provided) or
- * P (last phone update failed)
- */
-#define MAXUNITS 1 /* max number of LEITCH units */
-#define LEITCHREFID "ATOM" /* reference id */
-#define LEITCH_DESCRIPTION "Leitch: CSD 5300 Master Clock System Driver"
-#define LEITCH232 "/dev/leitch%d" /* name of radio device */
-#define SPEED232 B300 /* uart speed (300 baud) */
-#define leitch_send(A,M) \
- if (debug) fprintf(stderr,"write leitch %s\n",M); \
- if ((write(A->leitchio.fd,M,sizeof(M)) < 0)) {\
- if (debug) \
- fprintf(stderr, "leitch_send: unit %d send failed\n", A->unit); \
- else \
- syslog(LOG_ERR, "leitch_send: unit %d send failed %m",A->unit);}
-
-#define STATE_IDLE 0
-#define STATE_DATE 1
-#define STATE_TIME1 2
-#define STATE_TIME2 3
-#define STATE_TIME3 4
-
-extern struct event timerqueue[];
-
-/*
- * Imported from ntp_loopfilter module
- */
-extern int fdpps; /* pps file descriptor */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * LEITCH unit control structure
- */
-struct leitchunit {
- struct peer *peer;
- struct event leitchtimer;
- struct refclockio leitchio;
- u_char unit;
- short year;
- short yearday;
- short month;
- short day;
- short hour;
- short second;
- short minute;
- short state;
- u_short fudge1;
- l_fp reftime1;
- l_fp reftime2;
- l_fp reftime3;
- l_fp codetime1;
- l_fp codetime2;
- l_fp codetime3;
- u_long yearstart;
-};
-
-/*
- * Function prototypes
- */
-static void leitch_init P((void));
-static int leitch_start P((u_int, struct peer *));
-static void leitch_shutdown P((int));
-static void leitch_poll P((int, struct peer *));
-static void leitch_control P((u_int, struct refclockstat *, struct refclockstat *));
-#define leitch_buginfo noentry
-static void leitch_receive P((struct recvbuf *));
-static void leitch_process P((struct leitchunit *));
-static void leitch_timeout P((struct peer *));
-static int leitch_get_date P((struct recvbuf *, struct leitchunit *));
-static int leitch_get_time P((struct recvbuf *, struct leitchunit *, int));
-static int dysize P((int));
-
-static struct leitchunit leitchunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static u_long refid[MAXUNITS];
-
-static char days_in_month [] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
-
-/*
- * Transfer vector
- */
-struct refclock refclock_leitch = {
- leitch_start, leitch_shutdown, leitch_poll,
- leitch_control, leitch_init, leitch_buginfo, NOFLAGS
-};
-
-/*
- * leitch_init - initialize internal leitch driver data
- */
-static void
-leitch_init()
-{
- int i;
-
- memset((char*)leitchunits, 0, sizeof(leitchunits));
- memset((char*)unitinuse, 0, sizeof(unitinuse));
- for (i = 0; i < MAXUNITS; i++)
- memcpy((char *)&refid[i], LEITCHREFID, 4);
-}
-
-/*
- * leitch_shutdown - shut down a LEITCH clock
- */
-static void
-leitch_shutdown(unit)
-int unit;
-{
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_shutdown()\n");
-#endif
-}
-
-/*
- * leitch_poll - called by the transmit procedure
- */
-static void
-leitch_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- struct leitchunit *leitch;
-
- /* start the state machine rolling */
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_poll()\n");
-#endif
- if (unit > MAXUNITS) {
- /* XXXX syslog it */
- return;
- }
-
- leitch = &leitchunits[unit];
-
- if (leitch->state != STATE_IDLE) {
- /* reset and wait for next poll */
- /* XXXX syslog it */
- leitch->state = STATE_IDLE;
- } else {
- leitch_send(leitch,"D\r");
- leitch->state = STATE_DATE;
- }
-}
-
-static void
-leitch_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR,
- "leitch_control: unit %d invalid", unit);
- return;
- }
-
- if (in) {
- if (in->haveflags & CLK_HAVEVAL1)
- stratumtouse[unit] = (u_char)(in->fudgeval1);
- if (in->haveflags & CLK_HAVEVAL2)
- refid[unit] = in->fudgeval2;
- if (unitinuse[unit]) {
- struct peer *peer;
-
- peer = (&leitchunits[unit])->peer;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- }
- }
-
- if (out) {
- memset((char *)out, 0, sizeof (struct refclockstat));
- out->type = REFCLK_ATOM_LEITCH;
- out->haveflags = CLK_HAVEVAL1 | CLK_HAVEVAL2;
- out->fudgeval1 = stratumtouse[unit];
- out->fudgeval2 = refid[unit];
- out->lastcode = "";
- out->clockdesc = LEITCH_DESCRIPTION;
- }
-}
-
-/*
- * leitch_start - open the LEITCH devices and initialize data for processing
- */
-static int
-leitch_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- struct leitchunit *leitch;
- int fd232;
- char leitchdev[20];
-
- /*
- * Check configuration info.
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "leitch_start: unit %d invalid", unit);
- return (0);
- }
-
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "leitch_start: unit %d in use", unit);
- return (0);
- }
-
- /*
- * Open serial port.
- */
- (void) sprintf(leitchdev, LEITCH232, unit);
- fd232 = open(leitchdev, O_RDWR, 0777);
- if (fd232 == -1) {
- syslog(LOG_ERR,
- "leitch_start: open of %s: %m", leitchdev);
- return (0);
- }
-
- leitch = &leitchunits[unit];
- memset((char*)leitch, 0, sizeof(*leitch));
-
-#if defined(HAVE_SYSV_TTYS)
- /*
- * System V serial line parameters (termio interface)
- *
- */
- { struct termio ttyb;
- if (ioctl(fd232, TCGETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TCGETA): %m", leitchdev);
- goto screwed;
- }
- ttyb.c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyb.c_oflag = 0;
- ttyb.c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyb.c_lflag = ICANON;
- ttyb.c_cc[VERASE] = ttyb.c_cc[VKILL] = '\0';
- if (ioctl(fd232, TCSETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TCSETA): %m", leitchdev);
- goto screwed;
- }
- }
-#endif /* HAVE_SYSV_TTYS */
-#if defined(HAVE_TERMIOS)
- /*
- * POSIX serial line parameters (termios interface)
- *
- * The LEITCHCLK option provides timestamping at the driver level.
- * It requires the tty_clk streams module.
- *
- * The LEITCHPPS option provides timestamping at the driver level.
- * It uses a 1-pps signal and level converter (gadget box) and
- * requires the ppsclock streams module and SunOS 4.1.1 or
- * later.
- */
- { struct termios ttyb, *ttyp;
-
- ttyp = &ttyb;
- if (tcgetattr(fd232, ttyp) < 0) {
- syslog(LOG_ERR,
- "leitch_start: tcgetattr(%s): %m", leitchdev);
- goto screwed;
- }
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- syslog(LOG_ERR,
- "leitch_start: tcsetattr(%s): %m", leitchdev);
- goto screwed;
- }
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- syslog(LOG_ERR,
- "leitch_start: tcflush(%s): %m", leitchdev);
- goto screwed;
- }
- }
-#endif /* HAVE_TERMIOS */
-#ifdef STREAM
-#if defined(LEITCHCLK)
- if (ioctl(fd232, I_PUSH, "clk") < 0)
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, I_PUSH, clk): %m", leitchdev);
- if (ioctl(fd232, CLK_SETSTR, "\n") < 0)
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, CLK_SETSTR): %m", leitchdev);
-#endif /* LEITCHCLK */
-#if defined(LEITCHPPS)
- if (ioctl(fd232, I_PUSH, "ppsclock") < 0)
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, I_PUSH, ppsclock): %m", leitchdev);
- else
- fdpps = fd232;
-#endif /* LEITCHPPS */
-#endif /* STREAM */
-#if defined(HAVE_BSD_TTYS)
- /*
- * 4.3bsd serial line parameters (sgttyb interface)
- *
- * The LEITCHCLK option provides timestamping at the driver level.
- * It requires the tty_clk line discipline and 4.3bsd or later.
- */
- { struct sgttyb ttyb;
-#if defined(LEITCHCLK)
- int ldisc = CLKLDISC;
-#endif /* LEITCHCLK */
-
- if (ioctl(fd232, TIOCGETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TIOCGETP): %m", leitchdev);
- goto screwed;
- }
- ttyb.sg_ispeed = ttyb.sg_ospeed = SPEED232;
-#if defined(LEITCHCLK)
- ttyb.sg_erase = ttyb.sg_kill = '\r';
- ttyb.sg_flags = RAW;
-#else
- ttyb.sg_erase = ttyb.sg_kill = '\0';
- ttyb.sg_flags = EVENP|ODDP|CRMOD;
-#endif /* LEITCHCLK */
- if (ioctl(fd232, TIOCSETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TIOCSETP): %m", leitchdev);
- goto screwed;
- }
-#if defined(LEITCHCLK)
- if (ioctl(fd232, TIOCSETD, &ldisc) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TIOCSETD): %m",leitchdev);
- goto screwed;
- }
-#endif /* LEITCHCLK */
- }
-#endif /* HAVE_BSD_TTYS */
-
- /*
- * Set up the structures
- */
- leitch->peer = peer;
- leitch->unit = unit;
- leitch->state = STATE_IDLE;
- leitch->fudge1 = 15; /* 15ms */
-
- leitch->leitchio.clock_recv = leitch_receive;
- leitch->leitchio.srcclock = (caddr_t) leitch;
- leitch->leitchio.datalen = 0;
- leitch->leitchio.fd = fd232;
- if (!io_addclock(&leitch->leitchio)) {
- goto screwed;
- }
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success. Note that root delay and root dispersion are
- * always zero for this clock.
- */
- peer->precision = 0;
- peer->rootdelay = 0;
- peer->rootdispersion = 0;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- unitinuse[unit] = 1;
- return(1);
-
- /*
- * Something broke; abandon ship.
- */
-screwed:
- close(fd232);
- return(0);
-}
-
-/*
- * leitch_receive - receive data from the serial interface on a leitch
- * clock
- */
-static void
-leitch_receive(rbufp)
- struct recvbuf *rbufp;
-{
- struct leitchunit *leitch = (struct leitchunit *)rbufp->recv_srcclock;
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_recieve(%*.*s)\n",
- rbufp->recv_length, rbufp->recv_length,
- rbufp->recv_buffer);
-#endif
- if (rbufp->recv_length != 7)
- return; /* The date is return with a trailing newline,
- discard it. */
-
- switch (leitch->state) {
- case STATE_IDLE: /* unexpected, discard and resync */
- return;
- case STATE_DATE:
- if (!leitch_get_date(rbufp,leitch)) {
- leitch->state = STATE_IDLE;
- break;
- }
- leitch_send(leitch,"T\r");
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%u\n",leitch->yearday);
-#endif
- leitch->state = STATE_TIME1;
- break;
- case STATE_TIME1:
- if (!leitch_get_time(rbufp,leitch,1)) {
- }
- if (!clocktime(leitch->yearday,leitch->hour,leitch->minute,
- leitch->second, 0, rbufp->recv_time.l_ui,
- &leitch->yearstart, &leitch->reftime1.l_ui)) {
- leitch->state = STATE_IDLE;
- break;
- }
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%lu\n", (u_long)leitch->reftime1.l_ui);
-#endif
- MSUTOTSF(leitch->fudge1, leitch->reftime1.l_uf);
- leitch->codetime1 = rbufp->recv_time;
- leitch->state = STATE_TIME2;
- break;
- case STATE_TIME2:
- if (!leitch_get_time(rbufp,leitch,2)) {
- }
- if (!clocktime(leitch->yearday,leitch->hour,leitch->minute,
- leitch->second, 0, rbufp->recv_time.l_ui,
- &leitch->yearstart, &leitch->reftime2.l_ui)) {
- leitch->state = STATE_IDLE;
- break;
- }
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%lu\n", (u_long)leitch->reftime2.l_ui);
-#endif
- MSUTOTSF(leitch->fudge1, leitch->reftime2.l_uf);
- leitch->codetime2 = rbufp->recv_time;
- leitch->state = STATE_TIME3;
- break;
- case STATE_TIME3:
- if (!leitch_get_time(rbufp,leitch,3)) {
- }
- if (!clocktime(leitch->yearday,leitch->hour,leitch->minute,
- leitch->second, 0, rbufp->recv_time.l_ui,
- &leitch->yearstart, &leitch->reftime3.l_ui)) {
- leitch->state = STATE_IDLE;
- break;
- }
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%lu\n", (u_long)leitch->reftime3.l_ui);
-#endif
- MSUTOTSF(leitch->fudge1, leitch->reftime3.l_uf);
- leitch->codetime3 = rbufp->recv_time;
- leitch_process(leitch);
- leitch->state = STATE_IDLE;
- break;
- default:
- syslog(LOG_ERR,
- "leitech_receive: invalid state %d unit %d",
- leitch->state, leitch->unit);
- }
-}
-
-/*
- * leitch_process - process a pile of samples from the clock
- *
- * This routine uses a three-stage median filter to calculate offset and
- * dispersion. reduce jitter. The dispersion is calculated as the span
- * of the filter (max - min), unless the quality character (format 2) is
- * non-blank, in which case the dispersion is calculated on the basis of
- * the inherent tolerance of the internal radio oscillator, which is
- * +-2e-5 according to the radio specifications.
- */
-static void
-leitch_process(leitch)
- struct leitchunit *leitch;
-{
- l_fp off;
- s_fp delay;
- l_fp codetime;
- l_fp tmp_fp;
- int isinsync = 1;
- u_fp dispersion = 10;
-
- delay = 20;
-
- codetime = leitch->codetime3;
-
- off = leitch->reftime1;
- L_SUB(&off,&leitch->codetime1);
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr,"%lu %lu %lu %lu %ld %ld\n",
- (u_long)leitch->codetime1.l_ui,
- (u_long)leitch->codetime1.l_uf,
- (u_long)leitch->reftime1.l_ui,
- (u_long)leitch->reftime1.l_uf,
- (u_long)off.l_i,
- (u_long)off.l_f);
-#endif
- tmp_fp = leitch->reftime2;
- L_SUB(&tmp_fp,&leitch->codetime2);
- if (L_ISGEQ(&off,&tmp_fp))
- off = tmp_fp;
-#ifdef DEBUG
- if (debug)
- fprintf(stderr,"%lu %lu %lu %lu %ld %ld\n",
- (u_long)leitch->codetime2.l_ui,
- (u_long)leitch->codetime2.l_uf,
- (u_long)leitch->reftime2.l_ui,
- (u_long)leitch->reftime2.l_uf,
- (u_long)off.l_i,
- (u_long)off.l_f);
-#endif
- tmp_fp = leitch->reftime3;
- L_SUB(&tmp_fp,&leitch->codetime3);
-
- if (L_ISGEQ(&off,&tmp_fp))
- off = tmp_fp;
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr,"%lu %lu %lu %lu %ld %ld\n",
- (u_long)leitch->codetime3.l_ui,
- (u_long)leitch->codetime3.l_uf,
- (u_long)leitch->reftime3.l_ui,
- (u_long)leitch->reftime3.l_uf,
- (u_long)off.l_i,
- (u_long)off.l_f);
-#endif
- refclock_receive(leitch->peer, &off, 0, dispersion, &codetime,
- &codetime, isinsync);
-}
-
-/*
- * leitch_timeout
- */
-static void
-leitch_timeout(fp)
- struct peer *fp;
-{
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_timeout()\n");
-#endif
-
-#ifdef NOTYET
- { struct leitchunit *leitch = (struct leitchunit *)fp;
-
- switch(leitch->state) {
- case STATE_IDLE:
- leitch_send(leitch,"D\r");
- leitch->state = STATE_DATE;
- break;
- case STATE_DATE:
- leitch_send(leitch,"T\r");
- leitch->state = STATE_TIME1;
- break;
- case STATE_TIME1:
- case STATE_TIME2:
- case STATE_TIME3:
- default:
- break;
- }
-
- leitch->leitchtimer.event_time += 30;
- TIMER_ENQUEUE(timerqueue, &leitch->leitchtimer);
- }
-#endif /* NOTYET */
-}
-
-/*
- * dysize
- */
-static int
-dysize(year)
-int year;
-{
- if (year%4) { /* not a potential leap year */
- return (365);
- } else {
- if (year % 100) { /* is a leap year */
- return (366);
- } else {
- if (year % 400) {
- return (365);
- } else {
- return (366);
- }
- }
- }
-}
-
-static int
-leitch_get_date(rbufp,leitch)
- struct recvbuf *rbufp;
- struct leitchunit *leitch;
-{
- int i;
-
- if (rbufp->recv_length < 6)
- return(0);
-#define BAD(A) (rbufp->recv_buffer[A] < '0') || (rbufp->recv_buffer[A] > '9')
- if (BAD(0)||BAD(1)||BAD(2)||BAD(3)||BAD(4)||BAD(5))
- return(0);
-#define ATOB(A) ((rbufp->recv_buffer[A])-'0')
- leitch->year = ATOB(0)*10 + ATOB(1);
- leitch->month = ATOB(2)*10 + ATOB(3);
- leitch->day = ATOB(4)*10 + ATOB(5);
-
- /* sanity checks */
- if (leitch->month > 12)
- return(0);
- if (leitch->day > days_in_month[leitch->month-1])
- return(0);
-
- /* calculate yearday */
- i = 0;
- leitch->yearday = leitch->day;
-
- while ( i < (leitch->month-1) )
- leitch->yearday += days_in_month[i++];
-
- if ((dysize((leitch->year>90?1900:2000)+leitch->year)==365) &&
- leitch->month > 2)
- leitch->yearday--;
-
- return(1);
-}
-
-/*
- * leitch_get_time
- */
-static int
-leitch_get_time(rbufp,leitch,which)
- struct recvbuf *rbufp;
- struct leitchunit *leitch;
- int which;
-{
- if (BAD(0)||BAD(1)||BAD(2)||BAD(3)||BAD(4)||BAD(5))
- return(0);
- leitch->hour = ATOB(0)*10 +ATOB(1);
- leitch->minute = ATOB(2)*10 +ATOB(3);
- leitch->second = ATOB(4)*10 +ATOB(5);
-
- if ((leitch->hour > 23) || (leitch->minute > 60) ||
- (leitch->second > 60))
- return(0);
- return(1);
-}
-
-#endif
diff --git a/usr.sbin/xntpd/xntpd/refclock_new/refclock_msfees.c b/usr.sbin/xntpd/xntpd/refclock_new/refclock_msfees.c
deleted file mode 100644
index 5a6307c3b6f6..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_new/refclock_msfees.c
+++ /dev/null
@@ -1,1575 +0,0 @@
-/* refclock_ees - clock driver for the EES M201 receiver */
-
-#if defined(REFCLOCK) && defined(MSFEESPPS) && defined(STREAM)
-
-/* Currently REQUIRES STREAM and PPSCD. CLK and CBREAK modes
- * were removed as the code was overly hairy, they weren't in use
- * (hence probably didn't work). Still in RCS file at cl.cam.ac.uk
- */
-
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-#include <termios.h>
-#include <stropts.h>
-#include <sys/ppsclock.h>
-#include "ntp_stdlib.h"
-
- /*
- fudgefactor = fudgetime1;
- os_delay = fudgetime2;
- offset_fudge = os_delay + fudgefactor + inherent_delay;
- stratumtouse = fudgeval1 & 0xf
- debug = fudgeval2;
- sloppyclockflag = flags & CLK_FLAG1;
- 1 log smoothing summary when processing sample
- 4 dump the buffer from the clock
- 8 EIOGETKD the last n uS time stamps
- if (flags & CLK_FLAG2 && unitinuse) ees->leaphold = 0;
- ees->dump_vals = flags & CLK_FLAG3;
- ees->usealldata = flags & CLK_FLAG4;
-
-
- bug->values[0] = (ees->lasttime) ? current_time - ees->lasttime : 0;
- bug->values[1] = (ees->clocklastgood)?current_time-ees->clocklastgood:0;
- bug->values[2] = ees->status;
- bug->values[3] = ees->lastevent;
- bug->values[4] = ees->reason;
- bug->values[5] = ees->nsamples;
- bug->values[6] = ees->codestate;
- bug->values[7] = ees->day;
- bug->values[8] = ees->hour;
- bug->values[9] = ees->minute;
- bug->values[10] = ees->second;
- bug->values[11] = ees->tz;
- bug->values[12] = ees->yearstart;
- bug->values[13] = (ees->leaphold > current_time) ?
- ees->leaphold - current_time : 0;
- bug->values[14] = inherent_delay[unit].l_uf;
- bug->values[15] = offset_fudge[unit].l_uf;
-
- bug->times[0] = ees->reftime;
- bug->times[1] = ees->arrvtime;
- bug->times[2] = ees->lastsampletime;
- bug->times[3] = ees->offset;
- bug->times[4] = ees->lowoffset;
- bug->times[5] = ees->highoffset;
- bug->times[6] = inherent_delay[unit];
- bug->times[8] = os_delay[unit];
- bug->times[7] = fudgefactor[unit];
- bug->times[9] = offset_fudge[unit];
- bug->times[10]= ees->yearstart, 0;
- */
-
-/* This should support the use of an EES M201 receiver with RS232
- * output (modified to transmit time once per second).
- *
- * For the format of the message sent by the clock, see the EESM_
- * definitions below.
- *
- * It appears to run free for an integral number of minutes, until the error
- * reaches 4mS, at which point it steps at second = 01.
- * It appears that sometimes it steps 4mS (say at 7 min interval),
- * then the next minute it decides that it was an error, so steps back.
- * On the next minute it steps forward again :-(
- * This is typically 16.5uS/S then 3975uS at the 4min re-sync,
- * or 9.5uS/S then 3990.5uS at a 7min re-sync,
- * at which point it may loose the "00" second time stamp.
- * I assume that the most accurate time is just AFTER the re-sync.
- * Hence remember the last cycle interval,
- *
- * Can run in any one of:
- *
- * PPSCD PPS signal sets CD which interupts, and grabs the current TOD
- * (sun) *in the interupt code*, so as to avoid problems with
- * the STREAMS scheduling.
- *
- * It appears that it goes 16.5 uS slow each second, then every 4 mins it
- * generates no "00" second tick, and gains 3975 uS. Ho Hum ! (93/2/7)
- */
-
-/* Definitions */
-#ifndef MAXUNITS
-#define MAXUNITS 4 /* maximum number of EES units permitted */
-#endif
-
-#ifndef EES232
-#define EES232 "/dev/ees%d" /* Device to open to read the data */
-#endif
-
-/* Other constant stuff */
-#ifndef EESPRECISION
-#define EESPRECISION (-10) /* what the heck - 2**-10 = 1ms */
-#endif
-#ifndef EESREFID
-#define EESREFID "MSF\0" /* String to identify the clock */
-#endif
-#ifndef EESHSREFID
-#define EESHSREFID (0x7f7f0000 | ((REFCLK_MSF_EES) << 8)) /* Numeric refid */
-#endif
-
-/* Description of clock */
-#define EESDESCRIPTION "EES M201 MSF Receiver"
-
-/* Speed we run the clock port at. If this is changed the UARTDELAY
- * value should be recomputed to suit.
- */
-#ifndef SPEED232
-#define SPEED232 B9600 /* 9600 baud */
-#endif
-
-/* What is the inherent delay for this mode of working, i.e. when is the
- * data time stamped.
- */
-#define SAFETY_SHIFT 10 /* Split the shift to avoid overflow */
-#define BITS_TO_L_FP(bits, baud) \
- (((((bits)*2 +1) << (FRACTION_PREC-SAFETY_SHIFT)) / (2*baud)) << SAFETY_SHIFT)
-#define INH_DELAY_CBREAK BITS_TO_L_FP(119, 9600)
-#define INH_DELAY_PPS BITS_TO_L_FP( 0, 9600)
-
-#ifndef STREAM_PP1
-#define STREAM_PP1 "ppsclocd\0<-- patch space for module name1 -->"
-#endif
-#ifndef STREAM_PP2
-#define STREAM_PP2 "ppsclock\0<-- patch space for module name2 -->"
-#endif
-
-/* Offsets of the bytes of the serial line code. The clock gives
- * local time with a GMT/BST indication. The EESM_ definitions
- * give offsets into ees->lastcode.
- */
-#define EESM_CSEC 0 /* centiseconds - always zero in our clock */
-#define EESM_SEC 1 /* seconds in BCD */
-#define EESM_MIN 2 /* minutes in BCD */
-#define EESM_HOUR 3 /* hours in BCD */
-#define EESM_DAYWK 4 /* day of week (Sun = 0 etc) */
-#define EESM_DAY 5 /* day of month in BCD */
-#define EESM_MON 6 /* month in BCD */
-#define EESM_YEAR 7 /* year MOD 100 in BCD */
-#define EESM_LEAP 8 /* 0x0f if leap year, otherwise zero */
-#define EESM_BST 9 /* 0x03 if BST, 0x00 if GMT */
-#define EESM_MSFOK 10 /* 0x3f if radio good, otherwise zero */
- /* followed by a frame alignment byte (0xff) /
- / which is not put into the lastcode buffer*/
-
-/* Length of the serial time code, in characters. The first length
- * is less the frame alignment byte.
- */
-#define LENEESPRT (EESM_MSFOK+1)
-#define LENEESCODE (LENEESPRT+1)
-
-/* Code state. */
-#define EESCS_WAIT 0 /* waiting for start of timecode */
-#define EESCS_GOTSOME 1 /* have an incomplete time code buffered */
-
-/* Default fudge factor and character to receive */
-#define DEFFUDGETIME 0 /* Default user supplied fudge factor */
-#ifndef DEFOSTIME
-#define DEFOSTIME 0 /* Default OS delay -- passed by Make ? */
-#endif
-#define DEFINHTIME INH_DELAY_PPS /* inherent delay due to sample point*/
-
-/* Limits on things. Reduce the number of samples to SAMPLEREDUCE by median
- * elimination. If we're running with an accurate clock, chose the BESTSAMPLE
- * as the estimated offset, otherwise average the remainder.
- */
-#define FULLSHIFT 6 /* NCODES root 2 */
-#define NCODES (1<< FULLSHIFT) /* 64 */
-#define REDUCESHIFT (FULLSHIFT -1) /* SAMPLEREDUCE root 2 */
-
-/* Towards the high ( Why ?) end of half */
-#define BESTSAMPLE ((samplereduce * 3) /4) /* 24 */
-
-/* Leap hold time. After a leap second the clock will no longer be
- * reliable until it resynchronizes. Hope 40 minutes is enough. */
-#define EESLEAPHOLD (40 * 60)
-
-#define EES_STEP_F (1 << 24) /* the receiver steps in units of about 4ms */
-#define EES_STEP_F_GRACE (EES_STEP_F/8) /*Allow for slop of 1/8 which is .5ms*/
-#define EES_STEP_NOTE (1 << 21)/* Log any unexpected jumps, say .5 ms .... */
-#define EES_STEP_NOTES 50 /* Only do a limited number */
-#define MAX_STEP 16 /* Max number of steps to remember */
-
-/* debug is a bit mask of debugging that is wanted */
-#define DB_SYSLOG_SMPLI 0x0001
-#define DB_SYSLOG_SMPLE 0x0002
-#define DB_SYSLOG_SMTHI 0x0004
-#define DB_SYSLOG_NSMTHE 0x0008
-#define DB_SYSLOG_NSMTHI 0x0010
-#define DB_SYSLOG_SMTHE 0x0020
-#define DB_PRINT_EV 0x0040
-#define DB_PRINT_CDT 0x0080
-#define DB_PRINT_CDTC 0x0100
-#define DB_SYSLOG_KEEPD 0x0800
-#define DB_SYSLOG_KEEPE 0x1000
-#define DB_LOG_DELTAS 0x2000
-#define DB_PRINT_DELTAS 0x4000
-#define DB_LOG_AWAITMORE 0x8000
-#define DB_LOG_SAMPLES 0x10000
-#define DB_NO_PPS 0x20000
-#define DB_INC_PPS 0x40000
-#define DB_DUMP_DELTAS 0x80000
-
-struct eesunit { /* EES unit control structure. */
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- l_fp reftime; /* reference time */
- l_fp lastsampletime; /* time as in txt from last EES msg */
- l_fp arrvtime; /* Time at which pkt arrived */
- l_fp codeoffsets[NCODES]; /* the time of arrival of 232 codes */
- l_fp offset; /* chosen offset (for clkbug) */
- l_fp lowoffset; /* lowest sample offset (for clkbug) */
- l_fp highoffset; /* highest " " (for clkbug) */
- char lastcode[LENEESCODE+6]; /* last time code we received */
- u_long lasttime; /* last time clock heard from */
- u_long clocklastgood; /* last time good radio seen */
- u_char lencode; /* length of code in buffer */
- u_char nsamples; /* number of samples we've collected */
- u_char codestate; /* state of 232 code reception */
- u_char unit; /* unit number for this guy */
- u_char status; /* clock status */
- u_char lastevent; /* last clock event */
- u_char reason; /* reason for last abort */
- u_char hour; /* hour of day */
- u_char minute; /* minute of hour */
- u_char second; /* seconds of minute */
- char tz; /* timezone from clock */
- u_char ttytype; /* method used */
- u_char dump_vals; /* Should clock values be dumped */
- u_char usealldata; /* Use ALL samples */
- u_short day; /* day of year from last code */
- u_long yearstart; /* start of current year */
- u_long leaphold; /* time of leap hold expiry */
- u_long badformat; /* number of bad format codes */
- u_long baddata; /* number of invalid time codes */
- u_long timestarted; /* time we started this */
- long last_pps_no; /* The serial # of the last PPS */
- char fix_pending; /* Is a "sync to time" pending ? */
- /* Fine tuning - compensate for 4 mS ramping .... */
- l_fp last_l; /* last time stamp */
- u_char last_steps[MAX_STEP]; /* Most recent n steps */
- int best_av_step; /* Best guess at average step */
- char best_av_step_count; /* # of steps over used above */
- char this_step; /* Current pos in buffer */
- int last_step_late; /* How late the last step was (0-59) */
- long jump_fsecs; /* # of fractions of a sec last jump */
- u_long last_step; /* time of last step */
- int last_step_secs; /* Number of seconds in last step */
- int using_ramp; /* 1 -> noemal, -1 -> over stepped */
-};
-#define last_sec last_l.l_ui
-#define last_sfsec last_l.l_f
-#define this_uisec ((ees->arrvtime).l_ui)
-#define this_sfsec ((ees->arrvtime).l_f)
-#define msec(x) ((x) / (1<<22))
-#define LAST_STEPS (sizeof ees->last_steps / sizeof ees->last_steps[0])
-#define subms(x) ((((((x < 0) ? (-(x)) : (x)) % (1<<22))/2) * 625) / (1<<(22 -5)))
-
-/* Bitmask for what methods to try to use -- currently only PPS enabled */
-#define T_CBREAK 1
-#define T_PPS 8
-/* macros to test above */
-#define is_cbreak(x) ((x)->ttytype & T_CBREAK)
-#define is_pps(x) ((x)->ttytype & T_PPS)
-#define is_any(x) ((x)->ttytype)
-
-#define CODEREASON 20 /* reason codes */
-
-/* Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back. */
-static struct eesunit *eesunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/* Keep the fudge factors separately so they can be set even
- * when no clock is configured. */
-static l_fp inherent_delay[MAXUNITS]; /* when time stamp is taken */
-static l_fp fudgefactor[MAXUNITS]; /* fudgetime1 */
-static l_fp os_delay[MAXUNITS]; /* fudgetime2 */
-static l_fp offset_fudge[MAXUNITS]; /* Sum of above */
-static u_char stratumtouse[MAXUNITS];
-static u_char sloppyclockflag[MAXUNITS];
-
-static int deltas[60];
-
-static l_fp acceptable_slop; /* = { 0, 1 << (FRACTION_PREC -2) }; */
-static l_fp onesec; /* = { 1, 0 }; */
-
-/* Imported from the timer module */
-extern u_long current_time;
-
-#ifdef DEBUG
-static int debug;
-#endif
-
-#ifndef DUMP_BUF_SIZE /* Size of buffer to be used by dump_buf */
-#define DUMP_BUF_SIZE 10112
-#endif
-
-/* ees_reset - reset the count back to zero */
-#define ees_reset(ees) (ees)->nsamples = 0; \
- (ees)->codestate = EESCS_WAIT
-
-/* ees_event - record and report an event */
-#define ees_event(ees, evcode) if ((ees)->status != (u_char)(evcode)) \
- ees_report_event((ees), (evcode))
-
-/* Find the precision of the system clock by reading it */
-#define USECS 1000000
-#define MINSTEP 5 /* some systems increment uS on each call */
-#define MAXLOOPS (USECS/9)
-static int ees_get_precision()
-{
- struct timeval tp;
- struct timezone tzp;
- long last;
- int i;
- long diff;
- long val;
- gettimeofday(&tp, &tzp);
-
- last = tp.tv_usec;
- for (i=0; i< 100000; i++) {
- gettimeofday(&tp, &tzp);
- diff = tp.tv_usec - last;
- if (diff < 0) diff += USECS;
- if (diff > MINSTEP) break;
- last = tp.tv_usec;
- }
- syslog(LOG_INFO,
- "I: ees: precision calculation given %duS after %d loop%s",
- diff, i, (i==1) ? "" : "s");
-
- if (i == 0) return -20 /* assume 1uS */;
- if (i >= MAXLOOPS) return EESPRECISION /* Lies ! */;
- for (i=0, val=USECS; val > 0; i--, val /= 2) if (diff > val) return i;
- return EESPRECISION /* Lies ! */;
-}
-
-static void dump_buf(coffs, from, to, text)
-l_fp *coffs;
-int from;
-int to;
-char *text;
-{
- char buff[DUMP_BUF_SIZE + 80];
- int i;
- register char *ptr = buff;
- sprintf(ptr, text);
- for (i=from; i<to; i++)
- { while (*ptr) ptr++;
- if ((ptr-buff) > DUMP_BUF_SIZE) syslog(LOG_DEBUG, "D: %s", ptr=buff);
- sprintf(ptr, " %06d", ((int)coffs[i].l_f) / 4295);
- }
- syslog(LOG_DEBUG, "D: %s", buff);
-}
-
-/* msfees_init - initialize internal ees driver data */
-static void msfees_init()
-{
- register int i;
- /* Just zero the data arrays */
- memset((char *)eesunits, 0, sizeof eesunits);
- memset((char *)unitinuse, 0, sizeof unitinuse);
-
- acceptable_slop.l_ui = 0;
- acceptable_slop.l_uf = 1 << (FRACTION_PREC -2);
-
- onesec.l_ui = 1;
- onesec.l_uf = 0;
-
- /* Initialize fudge factors to default. */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor[i].l_ui = 0;
- fudgefactor[i].l_uf = DEFFUDGETIME;
- os_delay[i].l_ui = 0;
- os_delay[i].l_uf = DEFOSTIME;
- inherent_delay[i].l_ui = 0;
- inherent_delay[i].l_uf = DEFINHTIME;
- offset_fudge[i] = os_delay[i];
- L_ADD(&offset_fudge[i], &fudgefactor[i]);
- L_ADD(&offset_fudge[i], &inherent_delay[i]);
- stratumtouse[i] = 0;
- sloppyclockflag[i] = 0;
- }
-}
-
-
-/* msfees_start - open the EES devices and initialize data for processing */
-static int msfees_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- register struct eesunit *ees;
- register int i;
- int fd232 = -1;
- char eesdev[20];
- struct termios ttyb, *ttyp;
- static void ees_receive();
- extern int io_addclock();
- extern void io_closeclock();
- extern char *emalloc();
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "ees clock: unit number %d invalid (max %d)",
- unit, MAXUNITS-1);
- return 0;
- }
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "ees clock: unit number %d in use", unit);
- return 0;
- }
-
- /* Unit okay, attempt to open the devices. We do them both at
- * once to make sure we can */
- (void) sprintf(eesdev, EES232, unit);
-
- fd232 = open(eesdev, O_RDWR, 0777);
- if (fd232 == -1) {
- syslog(LOG_ERR, "ees clock: open of %s failed: %m", eesdev);
- return 0;
- }
-
-#ifdef TIOCEXCL
- /* Set for exclusive use */
- if (ioctl(fd232, TIOCEXCL, (char *)0) < 0) {
- syslog(LOG_ERR, "ees clock: ioctl(%s, TIOCEXCL): %m", eesdev);
- goto screwed;
- }
-#endif
-
- /* STRIPPED DOWN VERSION: Only PPS CD is supported at the moment */
-
- /* Set port characteristics. If we don't have a STREAMS module or
- * a clock line discipline, cooked mode is just usable, even though it
- * strips the top bit. The only EES byte which uses the top
- * bit is the year, and we don't use that anyway. If we do
- * have the line discipline, we choose raw mode, and the
- * line discipline code will block up the messages.
- */
-
- /* STIPPED DOWN VERSION: Only PPS CD is supported at the moment */
-
- ttyp = &ttyb;
- if (tcgetattr(fd232, ttyp) < 0) {
- syslog(LOG_ERR, "msfees_start: tcgetattr(%s): %m", eesdev);
- goto screwed;
- }
-
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_oflag = 0;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- syslog(LOG_ERR, "msfees_start: tcsetattr(%s): %m", eesdev);
- goto screwed;
- }
-
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- syslog(LOG_ERR, "msfees_start: tcflush(%s): %m", eesdev);
- goto screwed;
- }
-
- inherent_delay[unit].l_uf = INH_DELAY_PPS;
-
- /* offset fudge (how *late* the timestamp is) = fudge + os delays */
- offset_fudge[unit] = os_delay[unit];
- L_ADD(&offset_fudge[unit], &fudgefactor[unit]);
- L_ADD(&offset_fudge[unit], &inherent_delay[unit]);
-
- /* Looks like this might succeed. Find memory for the structure.
- * Look to see if there are any unused ones, if not we malloc() one.
- */
- if (eesunits[unit] != 0) /* The one we want is okay */
- ees = eesunits[unit];
- else {
- /* Look for an unused, but allocated struct */
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && eesunits[i] != 0)
- break;
- }
-
- if (i < MAXUNITS) { /* Reclaim this one */
- ees = eesunits[i];
- eesunits[i] = 0;
- } /* no spare -- make a new one */
- else ees = (struct eesunit *) emalloc(sizeof(struct eesunit));
- }
- memset((char *)ees, 0, sizeof(struct eesunit));
- eesunits[unit] = ees;
-
- /* Set up the structures */
- ees->peer = peer;
- ees->unit = (u_char)unit;
- ees->timestarted= current_time;
- ees->ttytype = 0;
- ees->io.clock_recv= ees_receive;
- ees->io.srcclock= (caddr_t)ees;
- ees->io.datalen = 0;
- ees->io.fd = fd232;
-
- /* Okay. Push one of the two (linked into the kernel, or dynamically
- * loaded) STREAMS module, and give it to the I/O code to start
- * receiving stuff.
- */
-
- {
- int rc1;
- /* Pop any existing onews first ... */
- while (ioctl(fd232, I_POP, 0 ) >= 0) ;
-
- /* Now try pushing either of the possible modules */
- if ((rc1=ioctl(fd232, I_PUSH, STREAM_PP1)) < 0 &&
- ioctl(fd232, I_PUSH, STREAM_PP2) < 0) {
- syslog(LOG_ERR,
- "ees clock: Push of `%s' and `%s' to %s failed %m",
- STREAM_PP1, STREAM_PP2, eesdev);
- goto screwed;
- }
- else {
- syslog(LOG_INFO, "I: ees clock: PUSHed %s on %s",
- (rc1 >= 0) ? STREAM_PP1 : STREAM_PP2, eesdev);
- ees->ttytype |= T_PPS;
- }
- }
-
- /* Add the clock */
- if (!io_addclock(&ees->io)) {
- /* Oh shit. Just close and return. */
- syslog(LOG_ERR, "ees clock: io_addclock(%s): %m", eesdev);
- goto screwed;
- }
-
-
- /* All done. Initialize a few random peer variables, then
- * return success. */
- peer->precision = ees_get_precision();
- peer->stratum = stratumtouse[unit];
- peer->rootdelay = 0; /* ++++ */
- peer->rootdispersion = 0; /* ++++ */
- if (stratumtouse[unit] <= 1) {
- memmove((char *)&peer->refid, EESREFID, 4);
- if (unit > 0 && unit < 10)
- ((char *)&peer->refid)[3] = '0' + unit;
- } else {
- peer->refid = htonl(EESHSREFID);
- }
- unitinuse[unit] = 1;
- syslog(LOG_ERR, "ees clock: %s OK on %d", eesdev, unit);
- return (1);
-
-screwed:
- if (fd232 != -1)
- (void) close(fd232);
- return (0);
-}
-
-
-/* msfees_shutdown - shut down a EES clock */
-static void msfees_shutdown(unit)
- int unit;
-{
- register struct eesunit *ees;
- extern void io_closeclock();
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR,
- "ees clock: INTERNAL ERROR, unit number %d invalid (max %d)",
- unit, MAXUNITS);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR,
- "ees clock: INTERNAL ERROR, unit number %d not in use", unit);
- return;
- }
-
- /* Tell the I/O module to turn us off. We're history. */
- ees = eesunits[unit];
- io_closeclock(&ees->io);
- unitinuse[unit] = 0;
-}
-
-
-/* ees_report_event - note the occurance of an event */
-static void ees_report_event(ees, code)
- struct eesunit *ees;
- int code;
-{
- if (ees->status != (u_char)code) {
- ees->status = (u_char)code;
- if (code != CEVNT_NOMINAL)
- ees->lastevent = (u_char)code;
- /* Should report event to trap handler in here.
- * Soon...
- */
- }
-}
-
-
-/* ees_receive - receive data from the serial interface on an EES clock */
-static void ees_receive(rbufp)
- struct recvbuf *rbufp;
-{
- register int n_sample;
- register int day;
- register struct eesunit *ees;
- register u_char *dpt; /* Data PoinTeR: move along ... */
- register u_char *dpend; /* Points just *after* last data char */
- register char *cp;
- l_fp tmp;
- static void ees_process();
- int call_pps_sample = 0;
- l_fp pps_arrvstamp;
- int sincelast;
- int pps_step = 0;
- int suspect_4ms_step = 0;
- struct ppsclockev ppsclockev;
- long *ptr = (long *) &ppsclockev;
- extern errno;
- int rc;
-
- /* Get the clock this applies to and a pointer to the data */
- ees = (struct eesunit *)rbufp->recv_srcclock;
- dpt = (u_char *)&rbufp->recv_space;
- dpend = dpt + rbufp->recv_length;
- if ((debug & DB_LOG_AWAITMORE) && (rbufp->recv_length != LENEESCODE))
- printf("[%d] ", rbufp->recv_length);
-
- /* Check out our state and process appropriately */
- switch (ees->codestate) {
- case EESCS_WAIT:
- /* Set an initial guess at the timestamp as the recv time.
- * If just running in CBREAK mode, we can't improve this.
- * If we have the CLOCK Line Discipline, PPSCD, or sime such,
- * then we will do better later ....
- */
- ees->arrvtime = rbufp->recv_time;
- ees->codestate = EESCS_GOTSOME;
- ees->lencode = 0;
- /*FALLSTHROUGH*/
-
- case EESCS_GOTSOME:
- cp = &(ees->lastcode[ees->lencode]);
-
- /* Gobble the bytes until the final (possibly stripped) 0xff */
- while (dpt < dpend && (*dpt & 0x7f) != 0x7f) {
- *cp++ = (char)*dpt++;
- ees->lencode++;
- /* Oh dear -- too many bytes .. */
- if (ees->lencode > LENEESPRT) {
- syslog(LOG_INFO,
-"I: ees clock: %d + %d > %d [%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x]",
- ees->lencode, dpend - dpt, LENEESPRT,
-#define D(x) (ees->lastcode[x])
- D(0), D(1), D(2), D(3), D(4), D(5), D(6),
- D(7), D(8), D(9), D(10), D(11), D(12));
-#undef D
- ees->badformat++;
- ees->reason = CODEREASON + 1;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
- }
- /* Gave up because it was end of the buffer, rather than ff */
- if (dpt == dpend) {
- /* Incomplete. Wait for more. */
- if (debug & DB_LOG_AWAITMORE) syslog(LOG_INFO,
- "I: ees clock %d: %d == %d: await more",
- ees->unit, dpt, dpend);
- return;
- }
-
- /* This shouldn't happen ... ! */
- if ((*dpt & 0x7f) != 0x7f) {
- syslog(LOG_INFO, "I: ees clock: %0x & 0x7f != 0x7f", *dpt);
- ees->badformat++;
- ees->reason = CODEREASON + 2;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- /* Skip the 0xff */
- dpt++;
-
- /* Finally, got a complete buffer. Mainline code will
- * continue on. */
- cp = ees->lastcode;
- break;
-
- default:
- syslog(LOG_ERR, "ees clock: INTERNAL ERROR: %d state %d",
- ees->unit, ees->codestate);
- ees->reason = CODEREASON + 5;
- ees_event(ees, CEVNT_FAULT);
- ees_reset(ees);
- return;
- }
-
- /* Boy! After all that crap, the lastcode buffer now contains
- * something we hope will be a valid time code. Do length
- * checks and sanity checks on constant data.
- */
- ees->codestate = EESCS_WAIT;
- ees->lasttime = current_time;
- if (ees->lencode != LENEESPRT) {
- ees->badformat++;
- ees->reason = CODEREASON + 6;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- cp = ees->lastcode;
-
- /* Check that centisecond is zero */
- if (cp[EESM_CSEC] != 0) {
- ees->baddata++;
- ees->reason = CODEREASON + 7;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- /* Check flag formats */
- if (cp[EESM_LEAP] != 0 && cp[EESM_LEAP] != 0x0f) {
- ees->badformat++;
- ees->reason = CODEREASON + 8;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- if (cp[EESM_BST] != 0 && cp[EESM_BST] != 0x03) {
- ees->badformat++;
- ees->reason = CODEREASON + 9;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- if (cp[EESM_MSFOK] != 0 && cp[EESM_MSFOK] != 0x3f) {
- ees->badformat++;
- ees->reason = CODEREASON + 10;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- /* So far, so good. Compute day, hours, minutes, seconds,
- * time zone. Do range checks on these.
- */
-
-#define bcdunpack(val) ( (((val)>>4) & 0x0f) * 10 + ((val) & 0x0f) )
-#define istrue(x) ((x)?1:0)
-
- ees->second = bcdunpack(cp[EESM_SEC]); /* second */
- ees->minute = bcdunpack(cp[EESM_MIN]); /* minute */
- ees->hour = bcdunpack(cp[EESM_HOUR]); /* hour */
-
- day = bcdunpack(cp[EESM_DAY]); /* day of month */
-
- switch (bcdunpack(cp[EESM_MON])) { /* month */
-
- /* Add in lengths of all previous months. Add one more
- if it is a leap year and after February.
- */
- case 12: day += NOV; /*FALLSTHROUGH*/
- case 11: day += OCT; /*FALLSTHROUGH*/
- case 10: day += SEP; /*FALLSTHROUGH*/
- case 9: day += AUG; /*FALLSTHROUGH*/
- case 8: day += JUL; /*FALLSTHROUGH*/
- case 7: day += JUN; /*FALLSTHROUGH*/
- case 6: day += MAY; /*FALLSTHROUGH*/
- case 5: day += APR; /*FALLSTHROUGH*/
- case 4: day += MAR; /*FALLSTHROUGH*/
- case 3: day += FEB;
- if (istrue(cp[EESM_LEAP])) day++; /*FALLSTHROUGH*/
- case 2: day += JAN; /*FALLSTHROUGH*/
- case 1: break;
- default: ees->baddata++;
- ees->reason = CODEREASON + 11;
- ees_event(ees, CEVNT_BADDATE);
- ees_reset(ees);
- return;
- }
-
- ees->day = day;
-
- /* Get timezone. The clocktime routine wants the number
- * of hours to add to the delivered time to get UT.
- * Currently -1 if BST flag set, 0 otherwise. This
- * is the place to tweak things if double summer time
- * ever happens.
- */
- ees->tz = istrue(cp[EESM_BST]) ? -1 : 0;
-
- if (ees->day > 366 || ees->day < 1 ||
- ees->hour > 23 || ees->minute > 59 || ees->second > 59) {
- ees->baddata++;
- ees->reason = CODEREASON + 12;
- ees_event(ees, CEVNT_BADDATE);
- ees_reset(ees);
- return;
- }
-
- n_sample = ees->nsamples;
-
- /* Now, compute the reference time value: text -> tmp.l_ui */
- if (!clocktime(ees->day, ees->hour, ees->minute, ees->second,
- ees->tz, rbufp->recv_time.l_ui, &ees->yearstart,
- &tmp.l_ui)) {
- ees->baddata++;
- ees->reason = CODEREASON + 13;
- ees_event(ees, CEVNT_BADDATE);
- ees_reset(ees);
- return;
- }
- tmp.l_uf = 0;
-
- /* DON'T use ees->arrvtime -- it may be < reftime */
- ees->lastsampletime = tmp;
-
- /* If we are synchronised to the radio, update the reference time.
- * Also keep a note of when clock was last good.
- */
- if (istrue(cp[EESM_MSFOK])) {
- ees->reftime = tmp;
- ees->clocklastgood = current_time;
- }
-
-
- /* Compute the offset. For the fractional part of the
- * offset we use the expected delay for the message.
- */
- ees->codeoffsets[n_sample].l_ui = tmp.l_ui;
- ees->codeoffsets[n_sample].l_uf = 0;
-
- /* Number of seconds since the last step */
- sincelast = this_uisec - ees->last_step;
-
- memset(&ppsclockev, 0, sizeof ppsclockev);
-
- rc = ioctl(ees->io.fd, CIOGETEV, (char *) &ppsclockev);
- if (debug & DB_PRINT_EV) fprintf(stderr,
- "[%x] CIOGETEV u%d %d (%x %d) gave %d (%d): %08x %08x %d\n",
- DB_PRINT_EV, ees->unit, ees->io.fd, CIOGETEV, is_pps(ees),
- rc, errno, ptr[0], ptr[1], ptr[2]);
-
- /* If we managed to get the time of arrival, process the info */
- if (rc >= 0) {
- int conv = -1;
- pps_step = ppsclockev.serial - ees->last_pps_no;
-
- /* Possible that PPS triggered, but text message didn't */
- if (pps_step == 2) syslog(LOG_ERR, "pps step = 2 @ %02d", ees->second);
- if (pps_step == 2 && ees->second == 1) suspect_4ms_step |= 1;
- if (pps_step == 2 && ees->second == 2) suspect_4ms_step |= 4;
-
- /* allow for single loss of PPS only */
- if (pps_step != 1 && pps_step != 2)
- fprintf(stderr, "PPS step: %d too far off %d (%d)\n",
- ppsclockev.serial, ees->last_pps_no, pps_step);
- else if (!buftvtots((char *) &(ppsclockev.tv), &pps_arrvstamp))
- fprintf(stderr, "buftvtots failed\n");
- else { /* if ((ABS(time difference) - 0.25) < 0)
- * then believe it ...
- */
- l_fp diff;
- diff = pps_arrvstamp;
- conv = 0;
- L_SUB(&diff, &ees->arrvtime);
-if (debug & DB_PRINT_CDT) printf("[%x] Have %x.%08x and %x.%08x -> %x.%08x @ %s",
- DB_PRINT_CDT, ees->arrvtime.l_ui, ees->arrvtime.l_uf,
- pps_arrvstamp.l_ui, pps_arrvstamp.l_uf,
- diff.l_ui, diff.l_uf,
- ctime(&(ppsclockev.tv.tv_sec)));
- if (L_ISNEG(&diff)) M_NEG(diff.l_ui, diff.l_uf);
- L_SUB(&diff, &acceptable_slop);
- if (L_ISNEG(&diff)) { /* AOK -- pps_sample */
- ees->arrvtime = pps_arrvstamp;
- conv++;
- call_pps_sample++;
- }
- /* Some loss of some signals around sec = 1 */
- else if (ees->second == 1) {
- diff = pps_arrvstamp;
- L_ADD(&diff, &onesec);
- L_SUB(&diff, &ees->arrvtime);
- if (L_ISNEG(&diff)) M_NEG(diff.l_ui, diff.l_uf);
- L_SUB(&diff, &acceptable_slop);
-syslog(LOG_ERR, "Have sec==1 slip %ds a=%08x-p=%08x -> %x.%08x (u=%d) %s",
- pps_arrvstamp.l_ui - ees->arrvtime.l_ui,
- pps_arrvstamp.l_uf,
- ees->arrvtime.l_uf,
- diff.l_ui, diff.l_uf,
- ppsclockev.tv.tv_usec,
- ctime(&(ppsclockev.tv.tv_sec)));
- if (L_ISNEG(&diff)) { /* AOK -- pps_sample */
- suspect_4ms_step |= 2;
- ees->arrvtime = pps_arrvstamp;
- L_ADD(&ees->arrvtime, &onesec);
- conv++;
- call_pps_sample++;
- }
- }
- }
- ees->last_pps_no = ppsclockev.serial;
- if (debug & DB_PRINT_CDTC) printf(
- "[%x] %08x %08x %d u%d (%d %d)\n",
- DB_PRINT_CDTC, pps_arrvstamp.l_ui,
- pps_arrvstamp.l_uf, conv, ees->unit,
- call_pps_sample, pps_step);
- }
-
- /* See if there has been a 4ms jump at a minute boundry */
- { l_fp delta;
-#define delta_isec delta.l_ui
-#define delta_ssec delta.l_i
-#define delta_sfsec delta.l_f
- long delta_f_abs;
-
- delta.l_i = ees->arrvtime.l_i;
- delta.l_f = ees->arrvtime.l_f;
-
- L_SUB(&delta, &ees->last_l);
- delta_f_abs = delta_sfsec;
- if (delta_f_abs < 0) delta_f_abs = -delta_f_abs;
-
- /* Dump the deltas each minute */
- if (debug & DB_DUMP_DELTAS)
- { if (0 <= ees->second &&
- ees->second < ((sizeof deltas) / (sizeof deltas[0]))) deltas[ees->second] = delta_sfsec;
- /* Dump on second 1, as second 0 sometimes missed */
- if (ees->second == 1) {
- char text[16 * ((sizeof deltas) / (sizeof deltas[0]))];
- char *ptr=text;
- int i;
- for (i=0; i<((sizeof deltas) / (sizeof deltas[0])); i++) {
- sprintf(ptr, " %d.%04d",
- msec(deltas[i]), subms(deltas[i]));
- while (*ptr) ptr++;
- }
- syslog(LOG_ERR, "Deltas: %d.%04d<->%d.%04d: %s",
- msec(EES_STEP_F - EES_STEP_F_GRACE), subms(EES_STEP_F - EES_STEP_F_GRACE),
- msec(EES_STEP_F + EES_STEP_F_GRACE), subms(EES_STEP_F + EES_STEP_F_GRACE),
- text+1);
- for (i=0; i<((sizeof deltas) / (sizeof deltas[0])); i++) deltas[i] = 0;
- }
- }
-
- /* Lets see if we have a 4 mS step at a minute boundaary */
- if ( ((EES_STEP_F - EES_STEP_F_GRACE) < delta_f_abs) &&
- (delta_f_abs < (EES_STEP_F + EES_STEP_F_GRACE)) &&
- (ees->second == 0 || ees->second == 1 || ees->second == 2) &&
- (sincelast < 0 || sincelast > 122)
- ) { /* 4ms jump at min boundry */
- int old_sincelast;
- int count=0;
- int sum = 0;
- /* Yes -- so compute the ramp time */
- if (ees->last_step == 0) sincelast = 0;
- old_sincelast = sincelast;
-
- /* First time in, just set "ees->last_step" */
- if(ees->last_step) {
- int other_step = 0;
- int third_step = 0;
- int this_step = (sincelast + (60 /2)) / 60;
- int p_step = ees->this_step;
- int p;
- ees->last_steps[p_step] = this_step;
- p= p_step;
- p_step++;
- if (p_step >= LAST_STEPS) p_step = 0;
- ees->this_step = p_step;
- /* Find the "average" interval */
- while (p != p_step) {
- int this = ees->last_steps[p];
- if (this == 0) break;
- if (this != this_step) {
- if (other_step == 0 && (
- this== (this_step +2) ||
- this== (this_step -2) ||
- this== (this_step +1) ||
- this== (this_step -1)))
- other_step = this;
- if (other_step != this) {
- int delta = (this_step - other_step);
- if (delta < 0) delta = - delta;
- if (third_step == 0 && (
- (delta == 1) ? (
- this == (other_step +1) ||
- this == (other_step -1) ||
- this == (this_step +1) ||
- this == (this_step -1))
- :
- (
- this == (this_step + other_step)/2
- )
- )) third_step = this;
- if (third_step != this) break;
- }
- }
- sum += this;
- p--;
- if (p < 0) p += LAST_STEPS;
- count++;
- }
-syslog(LOG_ERR, "MSF%d: %d: This=%d (%d), other=%d/%d, sum=%d, count=%d, pps_step=%d, suspect=%x", ees->unit, p, ees->last_steps[p], this_step, other_step, third_step, sum, count, pps_step, suspect_4ms_step);
- if (count != 0) sum = ((sum * 60) + (count /2)) / count;
-#define SV(x) (ees->last_steps[(x + p_step) % LAST_STEPS])
-syslog(LOG_ERR, "MSF%d: %x steps %d: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
- ees->unit, suspect_4ms_step, p_step, SV(0), SV(1), SV(2), SV(3), SV(4), SV(5), SV(6),
- SV(7), SV(8), SV(9), SV(10), SV(11), SV(12), SV(13), SV(14), SV(15));
-printf("MSF%d: steps %d: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
- ees->unit, p_step, SV(0), SV(1), SV(2), SV(3), SV(4), SV(5), SV(6),
- SV(7), SV(8), SV(9), SV(10), SV(11), SV(12), SV(13), SV(14), SV(15));
-#undef SV
- ees->jump_fsecs = delta_sfsec;
- ees->using_ramp = 1;
- if (sincelast > 170)
- ees->last_step_late += sincelast - ((sum) ? sum : ees->last_step_secs);
- else ees->last_step_late = 30;
- if (ees->last_step_late < -60 || ees->last_step_late > 120) ees->last_step_late = 30;
- if (ees->last_step_late < 0) ees->last_step_late = 0;
- if (ees->last_step_late >= 60) ees->last_step_late = 59;
- sincelast = 0;
- }
- else { /* First time in -- just save info */
- ees->last_step_late = 30;
- ees->jump_fsecs = delta_sfsec;
- ees->using_ramp = 1;
- sum = 4 * 60;
- }
- ees->last_step = this_uisec;
-printf("MSF%d: d=%3d.%04d@%d :%d:%d:$%d:%d:%d\n",
-ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second, old_sincelast, ees->last_step_late, count, sum, ees->last_step_secs);
-syslog(LOG_ERR, "MSF%d: d=%3d.%04d@%d :%d:%d:%d:%d:%d",
-ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second, old_sincelast, ees->last_step_late, count, sum, ees->last_step_secs);
- if (sum) ees->last_step_secs = sum;
- }
- /* OK, so not a 4ms step at a minute boundry */
- else {
- if (suspect_4ms_step) syslog(LOG_ERR,
- "MSF%d: suspect = %x, but delta of %d.%04d [%d.%04d<%d.%04d<%d.%04d: %d %d]",
- ees->unit, suspect_4ms_step, msec(delta_sfsec), subms(delta_sfsec),
- msec(EES_STEP_F - EES_STEP_F_GRACE),
- subms(EES_STEP_F - EES_STEP_F_GRACE),
- msec(delta_f_abs),
- subms(delta_f_abs),
- msec(EES_STEP_F + EES_STEP_F_GRACE),
- subms(EES_STEP_F + EES_STEP_F_GRACE),
- ees->second,
- sincelast);
- if ((delta_f_abs > EES_STEP_NOTE) && ees->last_l.l_i) {
- static ees_step_notes = EES_STEP_NOTES;
- if (ees_step_notes > 0) {
- ees_step_notes--;
-printf("MSF%d: D=%3d.%04d@%02d :%d%s\n",
-ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second, sincelast, ees_step_notes ? "" : " -- NO MORE !");
-syslog(LOG_ERR, "MSF%d: D=%3d.%04d@%02d :%d%s",
-ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second, (ees->last_step) ? sincelast : -1, ees_step_notes ? "" : " -- NO MORE !");
- }
- }
- }
- }
- ees->last_l = ees->arrvtime;
-
- /* IF we have found that it's ramping
- * && it's within twice the expected ramp period
- * && there is a non zero step size (avoid /0 !)
- * THEN we twiddle things
- */
- if (ees->using_ramp &&
- sincelast < (ees->last_step_secs)*2 &&
- ees->last_step_secs)
- { long sec_of_ramp = sincelast + ees->last_step_late;
- long fsecs;
- l_fp inc;
-
- /* Ramp time may vary, so may ramp for longer than last time */
- if (sec_of_ramp > (ees->last_step_secs + 120))
- sec_of_ramp = ees->last_step_secs;
-
- /* sec_of_ramp * ees->jump_fsecs may overflow 2**32 */
- fsecs = sec_of_ramp * (ees->jump_fsecs / ees->last_step_secs);
-
- if (debug & DB_LOG_DELTAS) syslog(LOG_ERR,
- "[%x] MSF%d: %3d/%03d -> d=%11d (%d|%d)",
- DB_LOG_DELTAS,
- ees->unit, sec_of_ramp, ees->last_step_secs, fsecs,
- pps_arrvstamp.l_f, pps_arrvstamp.l_f + fsecs);
- if (debug & DB_PRINT_DELTAS) printf(
- "MSF%d: %3d/%03d -> d=%11d (%d|%d)\n",
- ees->unit, sec_of_ramp, ees->last_step_secs, fsecs,
- pps_arrvstamp.l_f, pps_arrvstamp.l_f + fsecs);
-
- /* Must sign extend the result */
- inc.l_i = (fsecs < 0) ? -1 : 0;
- inc.l_f = fsecs;
- if (debug & DB_INC_PPS)
- { L_SUB(&pps_arrvstamp, &inc);
- L_SUB(&ees->arrvtime, &inc);
- }
- else
- { L_ADD(&pps_arrvstamp, &inc);
- L_ADD(&ees->arrvtime, &inc);
- }
- }
- else {
- if (debug & DB_LOG_DELTAS) syslog(LOG_ERR,
- "[%x] MSF%d: ees->using_ramp=%d, sincelast=%x / %x, ees->last_step_secs=%x",
- DB_LOG_DELTAS,
- ees->unit, ees->using_ramp,
- sincelast,
- (ees->last_step_secs)*2,
- ees->last_step_secs);
- if (debug & DB_PRINT_DELTAS) printf(
- "[%x] MSF%d: ees->using_ramp=%d, sincelast=%x / %x, ees->last_step_secs=%x\n",
- DB_LOG_DELTAS,
- ees->unit, ees->using_ramp,
- sincelast,
- (ees->last_step_secs)*2,
- ees->last_step_secs);
- }
-
- L_SUB(&ees->arrvtime, &offset_fudge[ees->unit]);
- L_SUB(&pps_arrvstamp, &offset_fudge[ees->unit]);
-
- if (call_pps_sample && !(debug & DB_NO_PPS)) {
- /* Sigh -- it expects its args negated */
- L_NEG(&pps_arrvstamp);
- (void) pps_sample(&pps_arrvstamp);
- }
-
- /* Subtract off the local clock time stamp */
- L_SUB(&ees->codeoffsets[n_sample], &ees->arrvtime);
- if (debug & DB_LOG_SAMPLES) syslog(LOG_ERR,
- "MSF%d: [%x] %d (ees: %d %d) (pps: %d %d)%s",
- ees->unit, DB_LOG_DELTAS, n_sample,
- ees->codeoffsets[n_sample].l_f,
- ees->codeoffsets[n_sample].l_f / 4295,
- pps_arrvstamp.l_f,
- pps_arrvstamp.l_f /4295,
- (debug & DB_NO_PPS) ? " [no PPS]" : "");
-
- if (ees->nsamples++ == NCODES-1) ees_process(ees);
-
- /* Done! */
-}
-
-
-static void set_x(fp_offset)
-l_fp *fp_offset;
-{
- step_systime_real(fp_offset);
-}
-
-
-/* offcompare - auxiliary comparison routine for offset sort */
-
-static int
-offcompare(a, b)
-l_fp *a, *b;
-{
- return(L_ISGEQ(a, b) ? (L_ISEQU(a, b) ? 0 : 1) : -1);
-}
-
-
-/* ees_process - process a pile of samples from the clock */
-static void ees_process(ees)
- struct eesunit *ees;
-{
- static last_samples = -1;
- register int i, j;
- register int noff;
- register l_fp *coffs = ees->codeoffsets;
- l_fp offset, tmp;
- u_fp dispersion; /* ++++ */
- int lostsync, isinsync;
- int samples = ees->nsamples;
- int samplelog;
- int samplereduce = (samples + 1) / 2;
-
- /* Reset things to zero so we don't have to worry later */
- ees_reset(ees);
-
- if (sloppyclockflag[ees->unit]) {
- samplelog = (samples < 2) ? 0 :
- (samples < 5) ? 1 :
- (samples < 9) ? 2 :
- (samples < 17) ? 3 :
- (samples < 33) ? 4 : 5;
- samplereduce = (1 << samplelog);
- }
-
- if (samples != last_samples &&
- ((samples != (last_samples-1)) || samples < 3)) {
- syslog(LOG_ERR, "Samples=%d (%d), samplereduce=%d ....",
- samples, last_samples, samplereduce);
- last_samples = samples;
- }
- if (samples < 1) return;
-
- /* If requested, dump the raw data we have in the buffer */
- if (ees->dump_vals) dump_buf(coffs, 0, samples, "Raw data is:");
-
- /* Sort the offsets, trim off the extremes, then choose one. */
- qsort((char *) coffs, samples, sizeof(l_fp), offcompare);
-
- noff = samples;
- i = 0;
- while ((noff - i) > samplereduce) {
- /* Trim off the sample which is further away
- * from the median. We work this out by doubling
- * the median, subtracting off the end samples, and
- * looking at the sign of the answer, using the
- * identity (c-b)-(b-a) == 2*b-a-c
- */
- tmp = coffs[(noff + i)/2];
- L_ADD(&tmp, &tmp);
- L_SUB(&tmp, &coffs[i]);
- L_SUB(&tmp, &coffs[noff-1]);
- if (L_ISNEG(&tmp)) noff--; else i++;
- }
-
- /* If requested, dump the reduce data we have in the buffer */
- if (ees->dump_vals) dump_buf(coffs, i, noff, "Reduced to:");
-
- /* What we do next depends on the setting of the sloppy clock flag.
- * If it is on, average the remainder to derive our estimate.
- * Otherwise, just pick a representative value from the remaining stuff
- */
- if (sloppyclockflag[ees->unit]) {
- offset.l_ui = offset.l_uf = 0;
- for (j = i; j < noff; j++)
- L_ADD(&offset, &coffs[j]);
- for (j = samplelog; j > 0; j--)
- L_RSHIFTU(&offset);
- }
- else offset = coffs[i+BESTSAMPLE];
-
- /* Compute the dispersion as the difference between the
- * lowest and highest offsets that remain in the
- * consideration list.
- *
- * It looks like MOST clocks have MOD (max error), so halve it !
- */
- tmp = coffs[noff-1];
- L_SUB(&tmp, &coffs[i]);
-#define FRACT_SEC(n) ((1 << 30) / (n/2))
- dispersion = LFPTOFP(&tmp) / 2; /* ++++ */
- if (debug & (DB_SYSLOG_SMPLI | DB_SYSLOG_SMPLE)) syslog(
- (debug & DB_SYSLOG_SMPLE) ? LOG_ERR : LOG_INFO,
- "I: [%x] Offset=%06d (%d), disp=%06d%s [%d], %d %d=%d %d:%d %d=%d %d",
- debug & (DB_SYSLOG_SMPLI | DB_SYSLOG_SMPLE),
- offset.l_f / 4295, offset.l_f,
- (dispersion * 1526) / 100,
- (sloppyclockflag[ees->unit]) ? " by averaging" : "",
- FRACT_SEC(10) / 4295,
- (coffs[0].l_f) / 4295,
- i,
- (coffs[i].l_f) / 4295,
- (coffs[samples/2].l_f) / 4295,
- (coffs[i+BESTSAMPLE].l_f) / 4295,
- noff-1,
- (coffs[noff-1].l_f) / 4295,
- (coffs[samples-1].l_f) / 4295);
-
- /* Are we playing silly wotsits ?
- * If we are using all data, see if there is a "small" delta,
- * and if so, blurr this with 3/4 of the delta from the last value
- */
- if (ees->usealldata && ees->offset.l_uf) {
- long diff = (long) (ees->offset.l_uf - offset.l_uf);
-
- /* is the delta small enough ? */
- if ((- FRACT_SEC(100)) < diff && diff < FRACT_SEC(100)) {
- int samd = (64 * 4) / samples;
- long new;
- if (samd < 2) samd = 2;
- new = offset.l_uf + ((diff * (samd -1)) / samd);
-
- /* Sign change -> need to fix up int part */
- if ((new & (1 << 31)) !=
- (((long) offset.l_uf) & ( 1 << 31)))
- { syslog(LOG_INFO, "I: %x != %x (%x %x), so add %d",
- new & (1 << 31),
- ((long) offset.l_uf) & ( 1 << 31),
- new, (long) offset.l_uf,
- (new < 0) ? -1 : 1);
- offset.l_ui += (new < 0) ? -1 : 1;
- }
- dispersion /= 4;
- if (debug & (DB_SYSLOG_SMTHI | DB_SYSLOG_SMTHE)) syslog(
- (debug & DB_SYSLOG_SMTHE) ? LOG_ERR : LOG_INFO,
- "I: [%x] Smooth data: %d -> %d, dispersion now %d",
- debug & (DB_SYSLOG_SMTHI | DB_SYSLOG_SMTHE),
- ((long) offset.l_uf) / 4295, new / 4295,
- (dispersion * 1526) / 100);
- offset.l_uf = new;
- }
- else if (debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE)) syslog(
- (debug & DB_SYSLOG_NSMTHE) ? LOG_ERR : LOG_INFO,
- "[%x] No smooth as delta not %d < %d < %d",
- debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE),
- - FRACT_SEC(100), diff, FRACT_SEC(100));
- }
- else if (debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE)) syslog(
- (debug & DB_SYSLOG_NSMTHE) ? LOG_ERR : LOG_INFO,
- "I: [%x] No smooth as flag=%x and old=%x=%d (%d:%d)",
- debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE),
- ees->usealldata, ees->offset.l_f, ees->offset.l_uf,
- offset.l_f, ees->offset.l_f - offset.l_f);
-
- /* Collect offset info for debugging info */
- ees->offset = offset;
- ees->lowoffset = coffs[i];
- ees->highoffset = coffs[noff-1];
-
- /* Determine synchronization status. Can be unsync'd either
- * by a report from the clock or by a leap hold.
- *
- * Loss of the radio signal for a short time does not cause
- * us to go unsynchronised, since the receiver keeps quite
- * good time on its own. The spec says 20ms in 4 hours; the
- * observed drift in our clock (Cambridge) is about a second
- * a day, but even that keeps us within the inherent tolerance
- * of the clock for about 15 minutes. Observation shows that
- * the typical "short" outage is 3 minutes, so to allow us
- * to ride out those, we will give it 5 minutes.
- */
- lostsync = current_time - ees->clocklastgood > 300 ? 1 : 0;
- isinsync = (lostsync || ees->leaphold > current_time) ? 0 : 1;
-
- /* Done. Use time of last good, synchronised code as the
- * reference time, and lastsampletime as the receive time.
- */
- if (ees->fix_pending) {
- syslog(LOG_ERR, "MSF%d: fix_pending=%d -> jump %x.%08x\n",
- ees->fix_pending, ees->unit, offset.l_i, offset.l_f);
- ees->fix_pending = 0;
- set_x(&offset);
- L_CLR(&offset);
- }
- refclock_receive(ees->peer,
- &offset,
- 0, /* delay */
- dispersion,
- &ees->reftime,
- &ees->lastsampletime, /* receive time */
- (isinsync) ? 0 : LEAP_NOTINSYNC);
- ees_event(ees, lostsync ? CEVNT_PROP : CEVNT_NOMINAL);
-}
-
-/* msfees_poll - called by the transmit procedure */
-static void msfees_poll(unit, peer)
- int unit;
- char *peer;
-{
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "ees clock poll: INTERNAL: unit %d invalid",
- unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "ees clock poll: INTERNAL: unit %d unused",
- unit);
- return;
- }
-
- ees_process(eesunits[unit]);
-
- if ((current_time - eesunits[unit]->lasttime) > 150)
- ees_event(eesunits[unit], CEVNT_FAULT);
-}
-
-/* msfees_leap - called when a leap second occurs */
-static void msfees_leap()
-{
- register int i;
-
- /* This routine should be entered a few seconds after
- * midnight UTC when a leap second occurs. To ensure we
- * don't believe foolish time from the clock(s) we set a
- * 40 minute hold on them. It shouldn't take anywhere
- * near this amount of time to adjust if the clock is getTING
- * data, but doing anything else is complicated.
- */
- for (i = 0; i < MAXUNITS; i++) if (unitinuse[i])
- eesunits[i]->leaphold = current_time + EESLEAPHOLD;
-}
-
-/* msfees_control - set fudge factors, return statistics */
-static void msfees_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct eesunit *ees = eesunits[unit];
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "ees clock: unit %d invalid (max %d)",
- unit, MAXUNITS-1);
- return;
- }
-
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- fudgefactor[unit] = in->fudgetime1;
- if (in->haveflags & CLK_HAVETIME2)
- os_delay[unit] = in->fudgetime2;
- offset_fudge[unit] = os_delay[unit];
- L_ADD(&offset_fudge[unit], &fudgefactor[unit]);
- L_ADD(&offset_fudge[unit], &inherent_delay[unit]);
- if (in->haveflags & CLK_HAVEVAL1) {
- stratumtouse[unit] = (u_char)(in->fudgeval1 & 0xf);
- if (unitinuse[unit]) {
- /* Should actually reselect clock, but
- * will wait for the next timecode
- */
- struct peer *peer = ees->peer;
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1) {
- memmove((char *)&peer->refid,
- EESREFID, 4);
- if (unit>0 && unit<10)
- ((char *)&peer->refid)[3] =
- '0' + unit;
- }
- else peer->refid = htonl(EESHSREFID);
- }
- }
- if (in->haveflags & CLK_HAVEVAL2) {
- printf("Debug: %x -> %x\n", debug, in->fudgeval2);
- syslog(LOG_ERR, "MSF%d: debug %x -> %x",
- unit, debug, in->fudgeval2);
- debug = in->fudgeval2;
- }
- if (in->haveflags & CLK_HAVEFLAG1) {
- sloppyclockflag[unit] = in->flags & CLK_FLAG1;
- }
- if (in->haveflags & CLK_HAVEFLAG2) {
- ees->fix_pending++;
- /* if (in->flags & CLK_FLAG2 && unitinuse[unit])
- ees->leaphold = 0; */
- }
- if (in->haveflags & CLK_HAVEFLAG3 && unitinuse[unit]) {
- printf("dump_vals: %x -> %x\n", ees->dump_vals, in->flags & CLK_FLAG3);
- ees->dump_vals = in->flags & CLK_FLAG3;
- }
- if (in->haveflags & CLK_HAVEFLAG4 && unitinuse[unit]) {
- ees->usealldata = in->flags & CLK_FLAG4;
- }
- }
-
- if (out != 0) {
- out->type = REFCLK_MSF_EES;
- out->haveflags
- = CLK_HAVETIME1|CLK_HAVETIME2|CLK_HAVEVAL1|CLK_HAVEVAL2|CLK_HAVEFLAG1|CLK_HAVEFLAG3|CLK_HAVEFLAG4;
- out->clockdesc = EESDESCRIPTION;
- out->fudgetime1 = fudgefactor[unit];
- out->fudgetime2 = os_delay[unit];
- out->fudgeval1 = stratumtouse[unit];
- /*out->fudgeval2= debug*/;
- memmove((char *)&out->fudgeval2, EESREFID, 4);
- if (unit > 0 && unit < 10)
- ((char *)&out->fudgeval2)[3] = '0' + unit;
- out->flags = sloppyclockflag[unit];
- if (unitinuse[unit]) {
- out->flags |= ees->dump_vals | ees->usealldata;
- out->lencode = ees->lencode;
- out->lastcode = ees->lastcode;
- out->timereset = current_time - ees->timestarted;
- out->polls = 0; /* we don't poll */
- out->noresponse = 0; /* ditto */
- out->badformat = ees->badformat;
- out->baddata = ees->baddata;
- out->lastevent = ees->lastevent;
- out->currentstatus = ees->status;
- } else {
- out->lencode = 0;
- out->lastcode = "";
- out->polls = out->noresponse = 0;
- out->badformat = out->baddata = 0;
- out->timereset = 0;
- out->currentstatus = out->lastevent = CEVNT_NOMINAL;
- }
- }
-}
-
-
-/* msfees_buginfo - return clock dependent debugging info */
-static void msfees_buginfo(unit, bug)
- int unit;
- register struct refclockbug *bug;
-{
- register struct eesunit *ees;
-
- bug->nvalues = bug->ntimes = 0;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "ees clock: unit %d invalid (max %d)",
- unit, MAXUNITS-1);
- return;
- }
-
- if (!unitinuse[unit])
- return;
- ees = eesunits[unit];
-
- bug->nvalues = 16;
- bug->svalues = 0x0800;
- bug->values[0] = (ees->lasttime) ? current_time - ees->lasttime : 0;
- bug->values[1] = (ees->clocklastgood)?current_time-ees->clocklastgood:0;
- bug->values[2] = ees->status;
- bug->values[3] = ees->lastevent;
- bug->values[4] = ees->reason;
- bug->values[5] = ees->nsamples;
- bug->values[6] = ees->codestate;
- bug->values[7] = ees->day;
- bug->values[8] = ees->hour;
- bug->values[9] = ees->minute;
- bug->values[10] = ees->second;
- bug->values[11] = ees->tz;
- bug->values[12] = ees->yearstart;
- bug->values[13] = (ees->leaphold > current_time) ?
- ees->leaphold - current_time : 0;
- bug->values[14] = inherent_delay[unit].l_uf;
- bug->values[15] = offset_fudge[unit].l_uf;
-
- bug->ntimes = 11;
- bug->stimes = 0x3f8;
- bug->times[0] = ees->reftime;
- bug->times[1] = ees->arrvtime;
- bug->times[2] = ees->lastsampletime;
- bug->times[3] = ees->offset;
- bug->times[4] = ees->lowoffset;
- bug->times[5] = ees->highoffset;
- bug->times[6] = inherent_delay[unit];
- bug->times[8] = os_delay[unit];
- bug->times[7] = fudgefactor[unit];
- bug->times[9] = offset_fudge[unit];
- bug->times[10].l_ui = ees->yearstart;
- bug->times[10].l_uf = 0;
-}
-
-struct refclock refclock_msfees = {
- msfees_start, msfees_shutdown, msfees_poll,
- msfees_control, msfees_init, msfees_buginfo, NOFLAGS
-};
-#endif /* defined(REFCLOCK) && defined(MSFEESPPS) && defined(STREAM) */
diff --git a/usr.sbin/xntpd/xntpd/refclock_new/refclock_mx4200.c b/usr.sbin/xntpd/xntpd/refclock_new/refclock_mx4200.c
deleted file mode 100644
index caf5951c55ed..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_new/refclock_mx4200.c
+++ /dev/null
@@ -1,977 +0,0 @@
-/*
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66.
- *
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory.
- * 4. The name of the University may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(REFCLOCK) && defined(MX4200)
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_unixtime.h"
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#include <sys/ppsclock.h>
-
-#include "mx4200.h"
-#include "ntp_stdlib.h"
-
-/*
- * This driver supports the Magnavox Model MX4200 GPS Receiver.
- */
-
-/*
- * Definitions
- */
-#define MAXUNITS 2 /* max number of mx4200 units */
-#define MX4200FD "/dev/gps%d"
-#define SPEED232 B4800 /* baud */
-
-/*
- * The number of raw samples which we acquire to derive a single estimate.
- */
-#define NSTMPS 64
-
-/*
- * Radio interface parameters
- */
-#define MX4200PRECISION (-18) /* precision assumed (about 4 us) */
-#define MX4200REFID "GPS" /* reference id */
-#define MX4200DESCRIPTION "Magnavox MX4200 GPS Receiver" /* WRU */
-#define DEFFUDGETIME 0 /* default fudge time (ms) */
-
-/* Leap stuff */
-extern u_long leap_hoursfromleap;
-extern u_long leap_happened;
-static int leap_debug;
-
-/*
- * mx4200_reset - reset the count back to zero
- */
-#define mx4200_reset(up) \
- do { \
- (up)->nsamples = 0; \
- } while (0)
-
-/*
- * Imported from the timer module
- */
-extern u_long current_time;
-extern struct event timerqueue[];
-
-/*
- * Imported from ntp_loopfilter module
- */
-extern int fdpps; /* pps file descriptor */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * MX4200 unit control structure.
- */
-struct mx4200unit {
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- u_long gpssamples[NSTMPS]; /* the GPS time samples */
- l_fp unixsamples[NSTMPS]; /* the UNIX time samples */
-
-
- l_fp lastsampletime; /* time of last estimate */
- u_int lastserial; /* last pps serial number */
-#ifdef notdef
- l_fp lastrec; /* last receive time */
- l_fp lastref; /* last timecode time */
-#endif
- char lastcode[RX_BUFF_SIZE]; /* last timecode received */
- u_long lasttime; /* last time clock heard from */
- u_char nsamples; /* number of samples we've collected */
- u_char unit; /* unit number for this guy */
- u_char status; /* clock status */
- u_char lastevent; /* last clock event */
- u_char reason; /* reason for last abort */
- u_char lencode; /* length of last timecode */
- u_char year; /* year of eternity */
- u_short monthday; /* day of month */
- u_char hour; /* hour of day */
- u_char minute; /* minute of hour */
- u_char second; /* seconds of minute */
- u_char leap; /* leap indicators */
- /*
- * Status tallies
- */
-#ifdef notdef
- u_long polls; /* polls sent */
- u_long noresponse; /* number of nonresponses */
-#endif
- u_long badformat; /* bad format */
- u_long baddata; /* bad data */
- u_long timestarted; /* time we started this */
-};
-
-/*
- * We demand that consecutive PPS samples are more than 0.995 seconds
- * and less than 1.005 seconds apart.
- */
-#define PPSLODIFF_UI 0 /* 0.900 as an l_fp */
-#define PPSLODIFF_UF 0xe6666610
-
-#define PPSHIDIFF_UI 1 /* 1.100 as an l_fp */
-#define PPSHIDIFF_UF 0x19999990
-
-/*
- * reason codes
- */
-#define PPSREASON 20
-#define CODEREASON 40
-#define PROCREASON 60
-
-/*
- * Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back.
- */
-static struct mx4200unit *mx4200units[MAXUNITS];
-
-static const char pmvxg[] = "PMVXG";
-
-/*
- * Function prototypes
- */
-static int mx4200_start P((int, struct peer *));
-static void mx4200_shutdown P((int, struct peer *));
-static void mx4200_receive P((struct recvbuf *));
-static void mx4200_process P((struct mx4200unit *));
-static void mx4200_poll P((int, struct peer *));
-
-static char * mx4200_parse P((char *, struct calendar *, int *, int *));
-static int mx4200_needconf P((char *));
-static void mx4200_config P((struct mx4200unit *));
-static void mx4200_send P((int, const char *, ...));
-static int mx4200_cmpl_fp P((void *, void *));
-static u_char cksum P((char *, u_int));
-
-#ifdef DEBUG
-static void opendfile P((int));
-static void checkdfile P((void));
-#endif /* DEBUG */
-
-/*
- * Transfer vector
- */
-struct refclock refclock_mx4200 = {
- mx4200_start, /* start up driver */
- mx4200_shutdown, /* shut down driver */
- mx4200_poll, /* transmit poll message */
- noentry, /* not used (old mx4200_control) */
- noentry, /* initialize driver (not used) */
- noentry, /* not used (old mx4200_buginfo) */
- NOFLAGS /* not used */
-};
-
-#ifdef DEBUG
-static char dfile[] = "/var/tmp/MX4200.debug";
-static FILE *df = NULL;
-
-static void
-opendfile(create)
- int create;
-{
- if (!create && access(dfile, F_OK) < 0) {
- syslog(LOG_ERR, "mx4200: open %s: %m", dfile);
- return;
- }
- df = fopen(dfile, "a");
- if (df == NULL)
- syslog(LOG_ERR, "mx4200: open %s: %m", dfile);
- else if (setvbuf(df, NULL, _IOLBF, 0) < 0)
- syslog(LOG_ERR, "mx4200: setvbuf %s: %m", dfile);
-}
-
-static void
-checkdfile()
-{
-
- if (df == NULL)
- return;
-
- if (access(dfile, F_OK) < 0) {
- fclose(df);
- opendfile(1);
- }
-}
-
-#endif
-
-
-/*
- * mx4200_start - open the devices and initialize data for processing
- */
-static int
-mx4200_start(unit, peer)
- int unit;
- struct peer *peer;
-{
- register struct mx4200unit *up;
- struct refclockproc *pp;
- int fd;
- char device[20];
-
- /*
- * Open serial port
- */
- (void)sprintf(device, MX4200FD, unit);
- if (!(fd = refclock_open(device, SPEED232, 0)))
- return (0);
-
- /*
- * Allocate and initialize unit structure
- */
- if (!(up = (struct mx4200unit *)
- emalloc(sizeof(struct mx4200unit)))) {
- (void) close(fd);
- return (0);
- }
- memset((char *)up, 0, sizeof(struct mx4200unit));
- up->io.clock_recv = mx4200_receive;
- up->io.srcclock = (caddr_t)up;
- up->io.datalen = 0;
- up->io.fd = fd;
- if (!io_addclock(&up->io)) {
- (void) close(fd);
- free(up);
- return (0);
- }
- up->peer = peer;
- pp = peer->procptr;
- pp->unitptr = (caddr_t)up;
-
- /*
- * Initialize miscellaneous variables
- */
- peer->precision = MX4200PRECISION;
- pp->clockdesc = MX4200DESCRIPTION;
- memcpy((char *)&pp->refid, MX4200REFID, 4);
-
- /* Insure the receiver is properly configured */
- mx4200_config(up);
-
-#ifdef DEBUG
- opendfile(0);
-#endif
- return (1);
-}
-
-
-/*
- * mx4200_shutdown - shut down the clock
- */
-static void
-mx4200_shutdown(unit, peer)
- int unit;
- struct peer *peer;
-{
- register struct mx4200unit *up;
- struct refclockproc *pp;
-
- pp = peer->procptr;
- up = (struct mx4200unit *)pp->unitptr;
- io_closeclock(&up->io);
- free(up);
-}
-
-
-static void
-mx4200_config(up)
- register struct mx4200unit *up;
-{
- register int fd = up->io.fd;
-
-syslog(LOG_DEBUG, "mx4200_config");
-
- /* Zero the output list (do it twice to flush possible junk) */
- mx4200_send(fd, "%s,%03d,,%d,,,,,,", pmvxg, PMVXG_S_PORTCONF, 1);
- mx4200_send(fd, "%s,%03d,,%d,,,,,,", pmvxg, PMVXG_S_PORTCONF, 1);
-
- /* Switch to 2d mode */
- mx4200_send(fd, "%s,%03d,%d,,%.1f,%.1f,,%d,%d,%c,%d",
- pmvxg, PMVXG_S_INITMODEB,
- 2, /* 2d mode */
- 0.1, /* hor accel fact as per Steve */
- 0.1, /* ver accel fact as per Steve */
- 10, /* hdop limit as per Steve */
- 5, /* elevation limit as per Steve */
- 'U', /* time output mode */
- 0); /* local time offset from gmt */
-
- /* Configure time recovery */
- mx4200_send(fd, "%s,%03d,%c,%c,%c,%d,%d,%d,",
- pmvxg, PMVXG_S_TRECOVCONF,
-#ifdef notdef
- 'K', /* known position */
- 'D', /* dynamic position */
-#else
- 'S', /* static position */
-#endif
- 'U', /* steer clock to gps time */
- 'A', /* always output time pulse */
- 500, /* max time error in ns */
- 0, /* user bias in ns */
- 1); /* output to control port */
-}
-
-
-/*
- * mx4200_poll - mx4200 watchdog routine
- */
-static void
-mx4200_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- register struct mx4200unit *up;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "mx4200_poll: unit %d invalid", unit);
- return;
- }
-
- up = mx4200units[unit];
- if ((current_time - up->lasttime) > 150) {
- refclock_report(peer, CEVNT_FAULT);
-
- /* Request a status message which should trigger a reconfig */
- mx4200_send(up->io.fd, "%s,%03d", "CDGPQ", PMVXG_D_STATUS);
- syslog(LOG_DEBUG, "mx4200_poll: request status");
- }
-}
-
-static const char char2hex[] = "0123456789ABCDEF";
-
-
-/*
- * mx4200_receive - receive gps data
- */
-static void
-mx4200_receive(rbufp)
- struct recvbuf *rbufp;
-{
- register struct mx4200unit *up;
- struct peer *peer;
- register char *dpt, *cp;
- register u_long tmp_ui;
- register u_long tmp_uf;
- register u_long gpstime;
- struct ppsclockev ev;
- register struct calendar *jt;
- struct calendar sjt;
- register int n;
- int valid, leapsec;
- register u_char ck;
-
- up = (struct mx4200unit *)rbufp->recv_srcclock;
- peer = up->peer;
-#ifdef DEBUG
- if (debug > 3)
- printf("mx4200_receive: nsamples = %d\n", up->nsamples);
-#endif
-
- /* Record the time of this event */
- up->lasttime = current_time;
-
- /* Get the pps value */
- if (ioctl(up->io.fd, CIOGETEV, (char *)&ev) < 0) {
- /* XXX Actually, if this fails, we're pretty much screwed */
-#ifdef DEBUG
- if (debug) {
- fprintf(stderr, "mx4200_receive: ");
- perror("CIOGETEV");
- }
-#endif
- refclock_report(peer, CEVNT_FAULT);
- mx4200_reset(up);
- return;
- }
- tmp_ui = ev.tv.tv_sec + JAN_1970;
- TVUTOTSF(ev.tv.tv_usec, tmp_uf);
-
- /* Get buffer and length; sock away last timecode */
- n = rbufp->recv_length;
- dpt = rbufp->recv_buffer;
- if (n <= 1)
- return;
- up->lencode = n;
- memmove(up->lastcode, dpt, n);
-
- /*
- * We expect to see something like:
- *
- * $PMVXG,830,T,1992,07,09,04:18:34,U,S,-02154,00019,000000,00*1D\n
- *
- * Reject if any important landmarks are missing.
- */
- cp = dpt + n - 4;
- if (cp < dpt || *dpt != '$' || cp[0] != '*' || cp[3] != '\n') {
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: bad format\n");
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- mx4200_reset(up);
- return;
- }
-
- /* Check checksum */
- ck = cksum(&dpt[1], n - 5);
- if (char2hex[ck >> 4] != cp[1] || char2hex[ck & 0xf] != cp[2]) {
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: bad checksum\n");
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- mx4200_reset(up);
- return;
- }
-
- /* Truncate checksum (and the buffer for that matter) */
- *cp = '\0';
-
- /* Leap second debugging stuff */
- if ((leap_hoursfromleap && !leap_happened) || leap_debug > 0) {
- /* generate reports for awhile after leap */
- if (leap_hoursfromleap && !leap_happened)
- leap_debug = 3600;
- else
- --leap_debug;
- syslog(LOG_INFO, "mx4200 leap: %s \"%s\"",
- umfptoa(tmp_ui, tmp_uf, 6), dpt);
- }
-
- /* Parse time recovery message */
- jt = &sjt;
- if ((cp = mx4200_parse(dpt, jt, &valid, &leapsec)) != NULL) {
- /* Configure the receiver if necessary */
- if (mx4200_needconf(dpt))
- mx4200_config(up);
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: mx4200_parse: %s\n", cp);
-#endif
- refclock_report(peer, CEVNT_BADREPLY);
- mx4200_reset(up);
- return;
- }
-
- /* Setup leap second indicator */
- if (leapsec == 0)
- up->leap = LEAP_NOWARNING;
- else if (leapsec == 1)
- up->leap = LEAP_ADDSECOND;
- else if (leapsec == -1)
- up->leap = LEAP_DELSECOND;
- else
- up->leap = LEAP_NOTINSYNC; /* shouldn't happen */
-
- /* Check parsed time (allow for possible leap seconds) */
- if (jt->second >= 61 || jt->minute >= 60 || jt->hour >= 24) {
-#ifdef DEBUG
- if (debug) {
- printf("mx4200_receive: bad time %d:%02d:%02d",
- jt->hour, jt->minute, jt->second);
- if (leapsec != 0)
- printf(" (leap %+d)", leapsec);
- putchar('\n');
- }
-#endif
- refclock_report(peer, CEVNT_BADTIME);
- mx4200_reset(up);
- /* Eat the next pulse which the clock claims will be bad */
- up->nsamples = -1;
- return;
- }
-
- /* Check parsed date */
- if (jt->monthday > 31 || jt->month > 12 || jt->year < 1900) {
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: bad date (%d/%d/%d)\n",
- jt->monthday, jt->month, jt->year);
-#endif
- refclock_report(peer, CEVNT_BADDATE);
- mx4200_reset(up);
- return;
- }
-
- /* Convert to ntp time */
- gpstime = caltontp(jt);
-
- /* The gps message describes the *next* pulse; pretend it's this one */
- --gpstime;
-
- /* Debugging */
-#ifdef DEBUG
- checkdfile();
- if (df != NULL) {
- l_fp t;
-
- t.l_ui = gpstime;
- t.l_uf = 0;
- M_SUB(t.l_ui, t.l_uf, tmp_ui, tmp_uf);
- fprintf(df, "%s\t%s",
- umfptoa(tmp_ui, tmp_uf, 6), mfptoa(t.l_ui, t.l_uf, 6));
- if (debug > 3)
- fprintf(df, "\t(gps: %lu)", gpstime);
- if (leapsec != 0)
- fprintf(df, "\t(leap sec %+d)", leapsec);
- if (!valid)
- fprintf(df, "\t(pulse not valid)");
- fputc('\n', df);
- }
-#endif
-
- /* Check pps serial number against last one */
- if (up->lastserial + 1 != ev.serial && up->lastserial != 0) {
-#ifdef DEBUG
- if (debug) {
- if (ev.serial == up->lastserial)
- printf("mx4200_receive: no new pps event\n");
- else
- printf("mx4200_receive: missed %d pps events\n",
- ev.serial - up->lastserial - 1);
- }
-#endif
- refclock_report(peer, CEVNT_FAULT);
- mx4200_reset(up);
- /* fall through and this one collect as first sample */
- }
- up->lastserial = ev.serial;
-
-/*
- * XXX
- * Since this message is for the next pulse, it's really the next pulse
- * that the clock might be telling us will be invalid.
- */
- /* Toss if not designated "valid" by the gps */
- if (!valid) {
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: pps not valid\n");
-#endif
- refclock_report(peer, CEVNT_BADTIME);
- mx4200_reset(up);
- return;
- }
-
- /* Copy time into mx4200unit struct */
- /* XXX (why?) */
- up->year = jt->year;
- up->monthday = jt->monthday;
- up->hour = jt->hour;
- up->minute = jt->minute;
- up->second = jt->second;
-
- /* Sock away the GPS and UNIX timesamples */
- n = up->nsamples++;
- if (n < 0)
- return; /* oops, this pulse is bad */
- up->gpssamples[n] = gpstime;
- up->unixsamples[n].l_ui = up->lastsampletime.l_ui = tmp_ui;
- up->unixsamples[n].l_uf = up->lastsampletime.l_uf = tmp_uf;
- if (up->nsamples >= NSTMPS) {
- /*
- * Here we've managed to complete an entire NSTMPS
- * second cycle without major mishap. Process what has
- * been received.
- */
- mx4200_process(up);
- mx4200_reset(up);
- }
-}
-
-/*
- * Compare two l_fp's, used with qsort()
- */
-static int
-mx4200_cmpl_fp(p1, p2)
- register void *p1, *p2;
-{
-
- if (!L_ISGEQ((l_fp *)p1, (l_fp *)p2))
- return (-1);
- if (L_ISEQU((l_fp *)p1, (l_fp *)p2))
- return (0);
- return (1);
-}
-
-/*
- * mx4200_process - process a pile of samples from the clock
- */
-static void
-mx4200_process(up)
- struct mx4200unit *up;
-{
- struct peer *peer;
- struct refclockproc *pp;
- register int i, n;
- register l_fp *fp, *op;
- register u_long *lp;
- l_fp off[NSTMPS];
- register u_long tmp_ui, tmp_uf;
- register u_long date_ui, date_uf;
- u_fp dispersion;
-
- /* Compute offsets from the raw data. */
- peer = up->peer;
- pp = peer->procptr;
- fp = up->unixsamples;
- op = off;
- lp = up->gpssamples;
- for (i = 0; i < NSTMPS; ++i, ++lp, ++op, ++fp) {
- op->l_ui = *lp;
- op->l_uf = 0;
- L_SUB(op, fp);
- }
-
- /* Sort offsets into ascending order. */
- qsort((char *)off, NSTMPS, sizeof(l_fp), mx4200_cmpl_fp);
-
- /*
- * Reject the furthest from the median until 8 samples left
- */
- i = 0;
- n = NSTMPS;
- while ((n - i) > 8) {
- tmp_ui = off[n-1].l_ui;
- tmp_uf = off[n-1].l_uf;
- date_ui = off[(n+i)/2].l_ui;
- date_uf = off[(n+i)/2].l_uf;
- M_SUB(tmp_ui, tmp_uf, date_ui, date_uf);
- M_SUB(date_ui, date_uf, off[i].l_ui, off[i].l_uf);
- if (M_ISHIS(date_ui, date_uf, tmp_ui, tmp_uf)) {
- /*
- * reject low end
- */
- i++;
- } else {
- /*
- * reject high end
- */
- n--;
- }
- }
-
- /*
- * Compute the dispersion based on the difference between the
- * extremes of the remaining offsets.
- */
- tmp_ui = off[n-1].l_ui;
- tmp_uf = off[n-1].l_uf;
- M_SUB(tmp_ui, tmp_uf, off[i].l_ui, off[i].l_uf);
- dispersion = MFPTOFP(tmp_ui, tmp_uf);
-
- /*
- * Now compute the offset estimate. If the sloppy clock
- * flag is set, average the remainder, otherwise pick the
- * median.
- */
- if (pp->sloppyclockflag) {
- tmp_ui = tmp_uf = 0;
- while (i < n) {
- M_ADD(tmp_ui, tmp_uf, off[i].l_ui, off[i].l_uf);
- i++;
- }
- M_RSHIFT(tmp_ui, tmp_uf);
- M_RSHIFT(tmp_ui, tmp_uf);
- M_RSHIFT(tmp_ui, tmp_uf);
- i = 0;
- off[0].l_ui = tmp_ui;
- off[0].l_uf = tmp_uf;
- } else {
- i = (n + i) / 2;
- }
-
- /*
- * Add the default MX4200 QT delay into this.
- */
-#ifdef notdef
- L_ADDUF(&off[i], MX4200QTFUDGE);
-#endif
-
- /*
- * Done. Use lastref as the reference time and lastrec
- * as the receive time. ** note this can result in tossing
- * out the peer in the protocol module if lastref > lastrec,
- * so last rec is used for both values - dlm ***
- */
- refclock_receive(up->peer, &off[i],
- (s_fp)0, /* delay */
- dispersion,
- &up->unixsamples[NSTMPS-1], /* reftime */
- &up->unixsamples[NSTMPS-1], /* rectime */
- up->leap);
-
- refclock_report(peer, CEVNT_NOMINAL);
-}
-
-
-/*
- * Returns true if the this is a status message. We use this as
- * an indication that the receiver needs to be initialized.
- */
-static int
-mx4200_needconf(buf)
- char *buf;
-{
- register long v;
- char *cp;
-
- cp = buf;
-
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Record type */
- v = strtol(cp, &cp, 10);
- if (v != PMVXG_D_STATUS)
- return (0);
- /*
- * XXX
- * Since we configure the receiver to not give us status
- * messages and since the receiver outputs status messages by
- * default after being reset to factory defaults when sent the
- * "$PMVXG,018,C\r\n" message, any status message we get
- * indicates the reciever needs to be initialized; thus, it is
- * not necessary to decode the status message.
- */
-#ifdef notdef
- ++cp;
-
- /* Receiver status */
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Number of satellites which should be visible */
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Number of satellites being tracked */
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Time since last NAV */
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Initialization status */
- v = strtol(cp, &cp, 10);
- if (v == 0)
-#endif
- return (1);
-}
-
-/* Parse a mx4200 time recovery message. Returns a string if error */
-static char *
-mx4200_parse(buf, jt, validp, leapsecp)
- register char *buf;
- register struct calendar *jt;
- register int *validp, *leapsecp;
-{
- register long v;
- char *cp;
-
- cp = buf;
- memset((char *)jt, 0, sizeof(*jt));
-
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no rec-type");
- ++cp;
-
- /* Record type */
- v = strtol(cp, &cp, 10);
- if (v != PMVXG_D_TRECOVOUT)
- return ("wrong rec-type");
-
- /* Pulse valid indicator */
- if (*cp++ != ',')
- return ("no pulse-valid");
- if (*cp == 'T')
- *validp = 1;
- else if (*cp == 'F')
- *validp = 0;
- else
- return ("bad pulse-valid");
- ++cp;
-
- /* Year */
- if (*cp++ != ',')
- return ("no year");
- jt->year = strtol(cp, &cp, 10);
-
- /* Month of year */
- if (*cp++ != ',')
- return ("no month");
- jt->month = strtol(cp, &cp, 10);
-
- /* Day of month */
- if (*cp++ != ',')
- return ("no month day");
- jt->monthday = strtol(cp, &cp, 10);
-
- /* Hour */
- if (*cp++ != ',')
- return ("no hour");
- jt->hour = strtol(cp, &cp, 10);
-
- /* Minute */
- if (*cp++ != ':')
- return ("no minute");
- jt->minute = strtol(cp, &cp, 10);
-
- /* Second */
- if (*cp++ != ':')
- return ("no second");
- jt->second = strtol(cp, &cp, 10);
-
- /* Time indicator */
- if (*cp++ != ',' || *cp++ == '\0')
- return ("no time indicator");
-
- /* Time recovery mode */
- if (*cp++ != ',' || *cp++ == '\0')
- return ("no time mode");
-
- /* Oscillator offset */
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no osc off");
- ++cp;
-
- /* Time mark error */
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no time mark err");
- ++cp;
-
- /* User time bias */
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no user bias");
- ++cp;
-
- /* Leap second flag */
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no leap");
- ++cp;
- *leapsecp = strtol(cp, &cp, 10);
-
- return (NULL);
-}
-
-/* Calculate the checksum */
-static u_char
-cksum(cp, n)
- register char *cp;
- register u_int n;
-{
- register u_char ck;
-
- for (ck = 0; n-- > 0; ++cp)
- ck ^= *cp;
- return (ck);
-}
-
-static void
-#if __STDC__
-mx4200_send(register int fd, const char *fmt, ...)
-#else
-mx4200_send(fd, fmt, va_alist)
- register int fd;
- const char *fmt;
- va_dcl
-#endif
-{
- register char *cp;
- register int n, m;
- va_list ap;
- char buf[1024];
- u_char ck;
-
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- cp = buf;
- *cp++ = '$';
-#ifdef notdef
- /* BSD is rational */
- n = vsnprintf(cp, sizeof(buf) - 1, fmt, ap);
-#else
- /* SunOS sucks */
- (void)vsprintf(cp, fmt, ap);
- n = strlen(cp);
-#endif
- ck = cksum(cp, n);
- cp += n;
- ++n;
-#ifdef notdef
- /* BSD is rational */
- n += snprintf(cp, sizeof(buf) - n - 5, "*%02X\r\n", ck);
-#else
- /* SunOS sucks */
- sprintf(cp, "*%02X\r\n", ck);
- n += strlen(cp);
-#endif
-
- m = write(fd, buf, n);
- if (m < 0)
- syslog(LOG_ERR, "mx4200_send: write: %m (%s)", buf);
- else if (m != n)
- syslog(LOG_ERR, "mx4200_send: write: %d != %d (%s)", m, n, buf);
- va_end(ap);
-}
-#endif
diff --git a/usr.sbin/xntpd/xntpd/refclock_new/refclock_omega.c b/usr.sbin/xntpd/xntpd/refclock_new/refclock_omega.c
deleted file mode 100644
index e62b668956f3..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_new/refclock_omega.c
+++ /dev/null
@@ -1,999 +0,0 @@
-/*
- * refclock_omega - clock driver for the Kinemetrics Truetime OM-DC OMEGA
- * receiver.
- *
- * Version 1.0 11-Dec-92 Steve Clift (clift@ml.csiro.au)
- * Initial version, mostly lifted from refclock_goes.c.
- *
- * 1.1 03-May-93 Steve Clift
- * Tarted up the sample filtering mechanism to give improved
- * one-off measurements. Improved measurement dispersion code
- * to account for accumulated drift when the clock loses lock.
- *
- */
-
-#if defined(REFCLOCK) && (defined(OMEGA) || defined(OMEGACLK) || defined(OMEGAPPS))
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-#if defined(STREAM)
-#include <stropts.h>
-#if defined(OMEGACLK)
-#include <sys/clkdefs.h>
-#endif /* OMEGACLK */
-#endif /* STREAM */
-
-#if defined (OMEGAPPS)
-#include <sys/ppsclock.h>
-#endif /* OMEGAPPS */
-
-#include "ntp_stdlib.h"
-
-/*
- * Support for Kinemetrics Truetime OM-DC OMEGA Receiver
- *
- * Most of this code is copied from refclock_goes.c with thanks.
- *
- * the time code looks like follows; Send the clock a R or C and once per
- * second a timestamp will appear that looks like this:
- * ADDD:HH:MM:SSQCL
- * A - control A
- * Q Quality indication: indicates possible error of
- * > >+- 5 seconds
- * ? >+/- 500 milliseconds # >+/- 50 milliseconds
- * * >+/- 5 milliseconds . >+/- 1 millisecond
- * A-H less than 1 millisecond. Character indicates which station
- * is being received as follows:
- * A = Norway, B = Liberia, C = Hawaii, D = North Dakota,
- * E = La Reunion, F = Argentina, G = Australia, H = Japan.
- * C - Carriage return
- * L - Line feed
- * The carriage return start bit begins on 0 seconds and extends to 1 bit time.
- */
-
-/*
- * Definitions
- */
-#define MAXUNITS 4 /* max number of OMEGA units */
-#define OMEGA232 "/dev/omega%d"
-#define SPEED232 B9600 /* 9600 baud */
-
-/*
- * Radio interface parameters
- */
-#define OMEGADESCRIPTION "Kinemetrics OM-DC OMEGA Receiver" /* who we are */
-#define OMEGAMAXDISPERSE (FP_SECOND/32) /* max allowed sample dispersion */
-#define OMEGAPRECISION (-10) /* precision assumed (about 1 ms) */
-#define OMEGAREFID "VLF\0" /* reference id */
-#define LENOMEGA 13 /* length of standard response */
-#define GMT 0 /* hour offset from Greenwich */
-#define NSTAMPS 9 /* samples collected when polled */
-#define NSKEEP 5 /* samples to keep after discards */
-#define BMAX 50 /* timecode buffer length */
-
-/*
- * The OM-DC puts out the start bit of the <CR> on the second, but
- * we see the result after the <LF> is received, about 2ms later at
- * 9600 baud. Use this as the default fudge time, and let the user
- * fiddle it to account for driver latency etc.
- */
-#define DEFFUDGETIME 0x00830000 /* default fudge time (~2ms) */
-
-/*
- * Clock drift errors as u_fp values.
- */
-#define U_FP5000MS (5*FP_SECOND) /* 5 seconds */
-#define U_FP500MS (FP_SECOND/2) /* 500 msec */
-#define U_FP50MS (FP_SECOND/20) /* 50 msec */
-#define U_FP5MS (FP_SECOND/200) /* 5 msec */
-
-/*
- * Station codes
- */
-#define STATION_NONE 0
-#define STATION_NORWAY 1
-#define STATION_LIBERIA 2
-#define STATION_HAWAII 3
-#define STATION_N_DAKOTA 4
-#define STATION_LA_REUNION 5
-#define STATION_ARGENTINA 6
-#define STATION_AUSTRALIA 7
-#define STATION_JAPAN 8
-
-/*
- * Hack to avoid excercising the multiplier. I have no pride.
- */
-#define MULBY10(x) (((x)<<3) + ((x)<<1))
-
-/*
- * Imported from the timer module
- */
-extern u_long current_time;
-extern struct event timerqueue[];
-
-/*
- * Imported from ntp_loopfilter module
- */
-extern int fdpps; /* pps file descriptor */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * OMEGA unit control structure
- */
-struct omegaunit {
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- l_fp lastrec; /* last receive time */
- l_fp lastref; /* last timecode time */
- l_fp offset[NSTAMPS]; /* recent sample offsets */
- char lastcode[BMAX]; /* last timecode received */
- u_short station; /* which station we're locked to */
- u_short polled; /* Hand in a time sample? */
- u_long coderecv; /* timecodes received */
- u_char lencode; /* length of last timecode */
- u_long lasttime; /* last time clock heard from */
- u_char unit; /* unit number for this guy */
- u_char status; /* clock status */
- u_char lastevent; /* last clock event */
- u_char reason; /* reason for last failure */
- u_char year; /* year of eternity */
- u_short day; /* day of year */
- u_char hour; /* hour of day */
- u_char minute; /* minute of hour */
- u_char second; /* seconds of minute */
- u_char leap; /* leap indicators */
- u_short msec; /* millisecond of second */
- u_char quality; /* quality char from last timecode */
- u_long yearstart; /* start of current year */
- /*
- * Status tallies
- */
- u_long polls; /* polls sent */
- u_long noreply; /* no replies to polls */
- u_long badformat; /* bad format */
- u_long baddata; /* bad data */
- u_long timestarted; /* time we started this */
-};
-
-/*
- * Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back.
- */
-static struct omegaunit *omegaunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/*
- * Keep the fudge factors separately so they can be set even
- * when no clock is configured.
- */
-static l_fp fudgefactor1[MAXUNITS];
-static l_fp fudgefactor2[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static u_char readonlyclockflag[MAXUNITS];
-static u_long refid[MAXUNITS];
-
-/*
- * Function prototypes
- */
-static void omega_init P((void));
-static int omega_start P((u_int, struct peer *));
-static void omega_shutdown P((int));
-static void omega_report_event P((struct omegaunit *, int));
-static void omega_receive P((struct recvbuf *));
-static char omega_process P((struct omegaunit *, l_fp *, u_fp *));
-static void omega_poll P((int, struct peer *));
-static void omega_control P((u_int, struct refclockstat *, struct refclockstat *));
-static void omega_buginfo P((int, struct refclockbug *));
-static void omega_send P((struct omegaunit *, char *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_omega = {
- omega_start, omega_shutdown, omega_poll,
- omega_control, omega_init, omega_buginfo, NOFLAGS
-};
-
-/*
- * omega_init - initialize internal omega driver data
- */
-static void
-omega_init()
-{
- register int i;
- /*
- * Just zero the data arrays
- */
- memset((char *)omegaunits, 0, sizeof omegaunits);
- memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
- * Initialize fudge factors to default.
- */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor1[i].l_ui = 0;
- fudgefactor1[i].l_uf = DEFFUDGETIME;
- fudgefactor2[i].l_ui = 0;
- fudgefactor2[i].l_uf = 0;
- stratumtouse[i] = 0;
- readonlyclockflag[i] = 0;
- memcpy((char *)&refid[i], OMEGAREFID, 4);
- }
-}
-
-
-/*
- * omega_start - open the OMEGA devices and initialize data for processing
- */
-static int
-omega_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- register struct omegaunit *omega;
- register int i;
- int fd232;
- char omegadev[20];
-
- /*
- * Check configuration info
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR,"omega_start: unit %d invalid", unit);
- return 0;
- }
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "omega_start: unit %d in use", unit);
- return 0;
- }
-
- /*
- * Open serial port
- */
- (void) sprintf(omegadev, OMEGA232, unit);
- fd232 = open(omegadev, O_RDWR, 0777);
- if (fd232 == -1) {
- syslog(LOG_ERR, "omega_start: open of %s: %m", omegadev);
- return 0;
- }
-
-#if defined(HAVE_SYSV_TTYS)
- /*
- * System V serial line parameters (termio interface)
- *
- */
- { struct termio ttyb;
- if (ioctl(fd232, TCGETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TCGETA): %m", omegadev);
- goto screwed;
- }
- ttyb.c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyb.c_oflag = 0;
- ttyb.c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyb.c_lflag = ICANON;
- ttyb.c_cc[VERASE] = ttyb.c_cc[VKILL] = '\0';
- if (ioctl(fd232, TCSETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TCSETA): %m", omegadev);
- goto screwed;
- }
- }
-#endif /* HAVE_SYSV_TTYS */
-#if defined(HAVE_TERMIOS)
- /*
- * POSIX serial line parameters (termios interface)
- *
- * The OMEGACLK option provides timestamping at the driver level.
- * It requires the tty_clk streams module.
- *
- * The OMEGAPPS option provides timestamping at the driver level.
- * It uses a 1-pps signal and level converter (gadget box) and
- * requires the ppsclock streams module and SunOS 4.1.1 or
- * later.
- */
- { struct termios ttyb, *ttyp;
-
- ttyp = &ttyb;
- if (tcgetattr(fd232, ttyp) < 0) {
- syslog(LOG_ERR,
- "omega_start: tcgetattr(%s): %m", omegadev);
- goto screwed;
- }
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- syslog(LOG_ERR,
- "omega_start: tcsetattr(%s): %m", omegadev);
- goto screwed;
- }
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- syslog(LOG_ERR,
- "omega_start: tcflush(%s): %m", omegadev);
- goto screwed;
- }
- }
-#endif /* HAVE_TERMIOS */
-#ifdef STREAM
-#if defined(OMEGACLK)
- if (ioctl(fd232, I_PUSH, "clk") < 0)
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, I_PUSH, clk): %m", omegadev);
- if (ioctl(fd232, CLK_SETSTR, "\n") < 0)
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, CLK_SETSTR): %m", omegadev);
-#endif /* OMEGACLK */
-#if defined(OMEGAPPS)
- if (ioctl(fd232, I_PUSH, "ppsclock") < 0)
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, I_PUSH, ppsclock): %m", omegadev);
- else
- fdpps = fd232;
-#endif /* OMEGAPPS */
-#endif /* STREAM */
-#if defined(HAVE_BSD_TTYS)
- /*
- * 4.3bsd serial line parameters (sgttyb interface)
- *
- * The OMEGACLK option provides timestamping at the driver level.
- * It requires the tty_clk line discipline and 4.3bsd or later.
- */
- { struct sgttyb ttyb;
-#if defined(OMEGACLK)
- int ldisc = CLKLDISC;
-#endif /* OMEGACLK */
-
- if (ioctl(fd232, TIOCGETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TIOCGETP): %m", omegadev);
- goto screwed;
- }
- ttyb.sg_ispeed = ttyb.sg_ospeed = SPEED232;
-#if defined(OMEGACLK)
- ttyb.sg_erase = ttyb.sg_kill = '\r';
- ttyb.sg_flags = RAW;
-#else
- ttyb.sg_erase = ttyb.sg_kill = '\0';
- ttyb.sg_flags = EVENP|ODDP|CRMOD;
-#endif /* OMEGACLK */
- if (ioctl(fd232, TIOCSETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TIOCSETP): %m", omegadev);
- goto screwed;
- }
-#if defined(OMEGACLK)
- if (ioctl(fd232, TIOCSETD, &ldisc) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TIOCSETD): %m",omegadev);
- goto screwed;
- }
-#endif /* OMEGACLK */
- }
-#endif /* HAVE_BSD_TTYS */
-
- /*
- * Allocate unit structure
- */
- if (omegaunits[unit] != 0) {
- omega = omegaunits[unit]; /* The one we want is okay */
- } else {
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && omegaunits[i] != 0)
- break;
- }
- if (i < MAXUNITS) {
- /*
- * Reclaim this one
- */
- omega = omegaunits[i];
- omegaunits[i] = 0;
- } else {
- omega = (struct omegaunit *)
- emalloc(sizeof(struct omegaunit));
- }
- }
- memset((char *)omega, 0, sizeof(struct omegaunit));
- omegaunits[unit] = omega;
-
- /*
- * Set up the structures
- */
- omega->peer = peer;
- omega->unit = (u_char)unit;
- omega->timestarted = current_time;
- omega->station = STATION_NONE;
-
- omega->io.clock_recv = omega_receive;
- omega->io.srcclock = (caddr_t)omega;
- omega->io.datalen = 0;
- omega->io.fd = fd232;
- if (!io_addclock(&omega->io)) {
- goto screwed;
- }
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success.
- */
- peer->precision = OMEGAPRECISION;
- peer->rootdelay = 0;
- peer->rootdispersion = 0;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- unitinuse[unit] = 1;
- return 1;
-
- /*
- * Something broke; abandon ship
- */
-screwed:
- (void) close(fd232);
- return 0;
-}
-
-
-/*
- * omega_shutdown - shut down a OMEGA clock
- */
-static void
-omega_shutdown(unit)
- int unit;
-{
- register struct omegaunit *omega;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "omega_shutdown: unit %d invalid",
- unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "omega_shutdown: unit %d not in use", unit);
- return;
- }
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- omega = omegaunits[unit];
- io_closeclock(&omega->io);
- unitinuse[unit] = 0;
-}
-
-
-/*
- * omega_report_event - note the occurance of an event
- */
-static void
-omega_report_event(omega, code)
- struct omegaunit *omega;
- int code;
-{
- struct peer *peer;
-
- peer = omega->peer;
- if (omega->status != (u_char)code) {
- omega->status = (u_char)code;
- if (code != CEVNT_NOMINAL)
- omega->lastevent = (u_char)code;
- syslog(LOG_INFO,
- "omega clock %s event %x\n", ntoa(&peer->srcadr), code);
- }
-}
-
-
-/*
- * omega_receive - receive data from the serial interface on a
- * Kinemetrics OM-DC OMEGA clock.
- */
-static void
-omega_receive(rbufp)
- struct recvbuf *rbufp;
-{
- register int i;
- register struct omegaunit *omega;
- register u_char *dpt;
- register char *cp, *cpend;
- register u_char *dpend;
- l_fp tstmp;
- u_fp dispersion, drift;
-
- /*
- * Get the clock this applies to and a pointers to the data
- */
- omega = (struct omegaunit *)rbufp->recv_srcclock;
- dpt = (u_char *)&rbufp->recv_space;
-
-#ifndef PEDANTIC
- /*
- * The OM-DC outputs a timecode every second, but we only want
- * a set of NSTAMPS timecodes when polled (every 64 seconds).
- * Setting PEDANTIC causes a sanity check on every timecode.
- */
- if (!omega->polled)
- return;
-#endif
-
- /*
- * Edit timecode to remove control chars
- */
- dpend = dpt + rbufp->recv_length;
- cp = omega->lastcode;
- cpend = omega->lastcode + BMAX - 1;
- while (dpt < dpend && cp < cpend) {
- if ((*cp = 0x7f & *dpt++) >= ' ') cp++;
-#ifdef OMEGACLK
- else if (*cp == '\r') {
- if (dpend - dpt < 8) {
- /* short timestamp */
- return;
- }
- if (!buftvtots(dpt,&omega->lastrec)) {
- /* screwy timestamp */
- return;
- }
- dpt += 8;
- }
-#endif
- }
- *cp = '\0';
- omega->lencode = cp - omega->lastcode;
-
- if (omega->lencode == 0)
- return;
- else if (omega->lencode != LENOMEGA) {
- omega->badformat++;
- /* Sometimes get a lot of these, filling the log with noise */
- /* omega_report_event(omega, CEVNT_BADREPLY); */
- return;
- }
-
-#ifndef OMEGACLK
- omega->lastrec = rbufp->recv_time;
-#endif
-
-#ifdef DEBUG
- if (debug)
- printf("omega: timecode %d %s\n",
- omega->lencode, omega->lastcode);
-#endif
-
- /*
- * We get down to business, check the timecode format
- * and decode its contents.
- */
- cp = omega->lastcode;
- omega->leap = 0;
- /*
- * Check timecode format.
- */
- if (!isdigit(cp[0]) || /* day of year */
- !isdigit(cp[1]) ||
- !isdigit(cp[2]) ||
- cp[3] != ':' || /* <sp> */
- !isdigit(cp[4]) || /* hours */
- !isdigit(cp[5]) ||
- cp[6] != ':' || /* : separator */
- !isdigit(cp[7]) || /* minutes */
- !isdigit(cp[8]) ||
- cp[9] != ':' || /* : separator */
- !isdigit(cp[10]) || /* seconds */
- !isdigit(cp[11])) {
- omega->badformat++;
- omega_report_event(omega, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Convert and check values.
- */
- omega->year = 0; /* fake */
- omega->day = cp[0] - '0';
- omega->day = MULBY10(omega->day) + cp[1] - '0';
- omega->day = MULBY10(omega->day) + cp[2] - '0';
- omega->hour = MULBY10(cp[4] - '0') + cp[5] - '0';
- omega->minute = MULBY10(cp[7] - '0') + cp[8] - '0';
- omega->second = MULBY10(cp[10] - '0') + cp[11] - '0';
- omega->msec = 0;
-
- if (omega->day < 1 || omega->day > 366) {
- omega->baddata++;
- omega_report_event(omega, CEVNT_BADDATE);
- return;
- }
- if (omega->hour > 23 || omega->minute > 59 || omega->second > 59) {
- omega->baddata++;
- omega_report_event(omega, CEVNT_BADTIME);
- return;
- }
-
- /*
- * Check quality/station-id flag. The OM-DC should normally stay
- * permanently locked to a station, and its time error should be less
- * than 1 msec. If it loses lock for any reason, it makes a worst
- * case drift estimate based on the internally stored stability figure
- * for its reference oscillator. The stability figure can be adjusted
- * by the user based on experience. The default value is 1E05, which
- * is pretty bad - 2E07 is about right for the unit I have.
- *
- * The following is arbitrary, change it if you're offended:
- * For errors less than 50 msec, just clear the station indicator.
- * For errors greater than 50 msec, flag loss of sync and report a
- * propagation problem. If the error is greater than 500 msec,
- * something is dreadfully wrong - report a clock fault.
- *
- * In each case, we set a drift estimate which is used below as an
- * estimate of measurement accuracy.
- */
- omega->quality = cp[12];
- if (cp[12] == '>' || cp[12] == '?') {
- /* Error 500 to 5000 msec */
- omega_report_event(omega, CEVNT_FAULT);
- omega->leap = LEAP_NOTINSYNC;
- omega->station = STATION_NONE;
- drift = U_FP5000MS;
- } else if (cp[12] == '#') {
- /* Error 50 to 500 msec */
- omega_report_event(omega, CEVNT_PROP);
- omega->leap = LEAP_NOTINSYNC;
- omega->station = STATION_NONE;
- drift = U_FP500MS;
- } else if (cp[12] == '*') {
- /* Error 5 to 50 msec */
- omega->lasttime = current_time;
- omega->station = STATION_NONE;
- drift = U_FP50MS;
- } else if (cp[12] == '.') {
- /* Error 1 to 5 msec */
- omega->lasttime = current_time;
- omega->station = STATION_NONE;
- drift = U_FP5MS;
- } else if ('A' <= cp[12] && cp[12] <= 'H') {
- /* Error less than 1 msec */
- omega->lasttime = current_time;
- omega->station = cp[12] - 'A' + 1;
- drift = 0;
- } else {
- omega->badformat++;
- omega_report_event(omega, CEVNT_BADREPLY);
- return;
- }
-
-#ifdef PEDANTIC
- /* If we haven't been polled, bail out. */
- if (!omega->polled)
- return;
-#endif
-
- /*
- * Now, compute the reference time value. Use the heavy
- * machinery for the seconds and the millisecond field for the
- * fraction when present.
- *
- * this code does not yet know how to do the years
- */
- tstmp = omega->lastrec;
- if (!clocktime(omega->day, omega->hour, omega->minute,
- omega->second, GMT, tstmp.l_ui,
- &omega->yearstart, &omega->lastref.l_ui)) {
- omega->baddata++;
- omega_report_event(omega, CEVNT_BADTIME);
- return;
- }
- MSUTOTSF(omega->msec, omega->lastref.l_uf);
-
- /*
- * Adjust the read value by fudgefactor1 to correct RS232 delays.
- */
- L_ADD(&omega->lastref, &fudgefactor1[omega->unit]);
-
- /* Carousel of NSTAMPS offsets. */
- i = omega->coderecv % NSTAMPS;
- omega->offset[i] = omega->lastref;
- L_SUB(&omega->offset[i], &tstmp);
- omega->coderecv++;
-
- /* If we don't yet have a full set, return. */
- if (omega->coderecv < NSTAMPS)
- return;
-
- /*
- * Filter the samples, add the fudge factor and pass the
- * offset and dispersion along. We use lastrec as both the
- * reference time and receive time in order to avoid being cute,
- * like setting the reference time later than the receive time,
- * which may cause a paranoid protocol module to chuck out the
- * data. If the sample filter chokes because of excessive
- * dispersion or whatever, get a new sample (omega->coderecv
- * is still >= NSTAMPS) and try again.
- */
- if (!omega_process(omega, &tstmp, &dispersion)) {
- omega->baddata++;
- omega_report_event(omega, CEVNT_BADTIME);
- return;
- }
-
- /*
- * Add accumulated clock drift to the dispersion to get
- * a (hopefully) meaningful measurement accuracy estimate.
- */
- dispersion += drift;
- refclock_receive(omega->peer, &tstmp, GMT, dispersion,
- &omega->lastrec, &omega->lastrec, omega->leap);
-
- /*
- * We have succeeded in answering the poll. If the clock
- * is locked, we're nominal.
- */
- omega->polled = 0;
- omega->coderecv = 0;
- if (omega->leap != LEAP_NOTINSYNC)
- omega_report_event(omega, CEVNT_NOMINAL);
-}
-
-
-/*
- * omega_send - time to send the clock a signal to cough up a time sample
- */
-static void
-omega_send(omega,cmd)
- struct omegaunit *omega;
- char *cmd;
-{
- if (!readonlyclockflag[omega->unit]) {
- /*
- * Send a command to the clock.
- */
- if (write(omega->io.fd, cmd, 1) != 1) {
- syslog(LOG_ERR, "omega_send: unit %d: %m", omega->unit);
- omega_report_event(omega, CEVNT_FAULT);
- }
- }
-}
-
-
-/*
- * Compare two l_fp's, used with qsort()
- */
-static int
-omega_cmpl_fp(p1, p2)
- register void *p1, *p2;
-{
-
- if (!L_ISGEQ((l_fp *)p1, (l_fp *)p2))
- return (-1);
- if (L_ISEQU((l_fp *)p1, (l_fp *)p2))
- return (0);
- return (1);
-}
-
-
-/*
- * omega_process - process a pile of samples from the clock
- */
-static char
-omega_process(omega, offset, dispersion)
- struct omegaunit *omega;
- l_fp *offset;
- u_fp *dispersion;
-{
- register int i, n;
- register u_long med_ui, med_uf, tmp_ui, tmp_uf;
- l_fp off[NSTAMPS];
- u_fp disp;
-
- /* Copy in offsets and sort into ascending order */
- for (i = 0; i < NSTAMPS; i++)
- off[i] = omega->offset[i];
- qsort((char *)off, NSTAMPS, sizeof(l_fp), omega_cmpl_fp);
- /*
- * Reject the furthest from the median until NSKEEP samples remain
- */
- i = 0;
- n = NSTAMPS;
- while ((n - i) > NSKEEP) {
- tmp_ui = off[n-1].l_ui;
- tmp_uf = off[n-1].l_uf;
- med_ui = off[(n+i)/2].l_ui;
- med_uf = off[(n+i)/2].l_uf;
- M_SUB(tmp_ui, tmp_uf, med_ui, med_uf);
- M_SUB(med_ui, med_uf, off[i].l_ui, off[i].l_uf);
- if (M_ISHIS(med_ui, med_uf, tmp_ui, tmp_uf)) {
- /* reject low end */
- i++;
- } else {
- /* reject high end */
- n--;
- }
- }
-
- /*
- * Compute the dispersion based on the difference between the
- * extremes of the remaining offsets. If this is greater than
- * the allowed sample set dispersion, bail out. Otherwise,
- * return the median offset and the dispersion.
- */
- tmp_ui = off[n-1].l_ui;
- tmp_uf = off[n-1].l_uf;
- M_SUB(tmp_ui, tmp_uf, off[i].l_ui, off[i].l_uf);
- disp = MFPTOFP(tmp_ui, tmp_uf);
- if (disp > OMEGAMAXDISPERSE)
- return 0;
- *offset = off[(n+1)/2];
- *dispersion = disp;
- return 1;
-}
-
-
-/*
- * omega_poll - called by the transmit procedure
- */
-static void
-omega_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- struct omegaunit *omega;
-
- /*
- * You don't need to poll this clock. It puts out timecodes
- * once per second. If asked for a timestamp, take note.
- * The next time a timecode comes in, it will be fed back.
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "omega_poll: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "omega_poll: unit %d not in use", unit);
- return;
- }
- omega = omegaunits[unit];
- if ((current_time - omega->lasttime) > 150) {
- omega->noreply++;
- omega_report_event(omegaunits[unit], CEVNT_TIMEOUT);
- }
-
- /*
- * polled every 64 seconds. Ask OMEGA_RECEIVE to hand in a timestamp.
- */
- omega->polled = 1;
- omega->polls++;
- /*
- * Ensure the clock is running in the correct mode - on-second
- * timestamps.
- */
- omega_send(omega,"C");
-}
-
-
-/*
- * omega_control - set fudge factors, return statistics
- */
-static void
-omega_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct omegaunit *omega;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "omega_control: unit %d invalid", unit);
- return;
- }
-
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- fudgefactor1[unit] = in->fudgetime1;
- if (in->haveflags & CLK_HAVETIME2)
- fudgefactor2[unit] = in->fudgetime2;
- if (in->haveflags & CLK_HAVEVAL1)
- stratumtouse[unit] = (u_char)(in->fudgeval1);
- if (in->haveflags & CLK_HAVEVAL2)
- refid[unit] = in->fudgeval2;
- if (in->haveflags & CLK_HAVEFLAG1)
- readonlyclockflag[unit] = in->flags & CLK_FLAG1;
- if (unitinuse[unit]) {
- struct peer *peer;
-
- peer = omegaunits[unit]->peer;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- }
- }
-
- if (out != 0) {
- out->type = REFCLK_OMEGA_TRUETIME;
- out->haveflags = CLK_HAVETIME1 | CLK_HAVETIME2 | CLK_HAVEVAL1 |
- CLK_HAVEVAL2| CLK_HAVEFLAG1;
- out->clockdesc = OMEGADESCRIPTION;
- out->fudgetime1 = fudgefactor1[unit];
- out->fudgetime2 = fudgefactor2[unit];
- out->fudgeval1 = stratumtouse[unit];
- out->fudgeval2 = refid[unit];
- out->flags = readonlyclockflag[unit];
- if (unitinuse[unit]) {
- omega = omegaunits[unit];
- out->flags |= omega->station << 1;
- out->lencode = omega->lencode;
- out->lastcode = omega->lastcode;
- out->timereset = current_time - omega->timestarted;
- out->polls = omega->polls;
- out->noresponse = omega->noreply;
- out->badformat = omega->badformat;
- out->baddata = omega->baddata;
- out->lastevent = omega->lastevent;
- out->currentstatus = omega->status;
- }
- }
-}
-
-
-/*
- * omega_buginfo - return clock dependent debugging info
- */
-static void
-omega_buginfo(unit, bug)
- int unit;
- register struct refclockbug *bug;
-{
- register struct omegaunit *omega;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "omega_buginfo: unit %d invalid", unit);
- return;
- }
-
- if (!unitinuse[unit])
- return;
- omega = omegaunits[unit];
-
- bug->nvalues = 11;
- bug->ntimes = 5;
- if (omega->lasttime != 0)
- bug->values[0] = current_time - omega->lasttime;
- else
- bug->values[0] = 0;
- bug->values[1] = omega->reason;
- bug->values[2] = omega->year;
- bug->values[3] = omega->day;
- bug->values[4] = omega->hour;
- bug->values[5] = omega->minute;
- bug->values[6] = omega->second;
- bug->values[7] = omega->msec;
- bug->values[8] = omega->noreply;
- bug->values[9] = omega->yearstart;
- bug->values[10] = omega->quality;
- bug->stimes = 0x1c;
- bug->times[0] = omega->lastref;
- bug->times[1] = omega->lastrec;
- bug->times[2] = omega->offset[0];
- bug->times[3] = omega->offset[1];
- bug->times[4] = omega->offset[2];
-}
-#endif
diff --git a/usr.sbin/xntpd/xntpd/refclock_new/refclock_parse.c b/usr.sbin/xntpd/xntpd/refclock_new/refclock_parse.c
deleted file mode 100644
index 1b950a9b8e6f..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_new/refclock_parse.c
+++ /dev/null
@@ -1,3617 +0,0 @@
-#if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
-/*
- * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.59 1994/05/23 16:29:27 kardel Exp
- *
- * refclock_parse.c,v 3.59 1994/05/23 16:29:27 kardel Exp
- *
- * generic reference clock driver for receivers
- *
- * make use of a STREAMS module for input processing where
- * available and configured. Currently the STREAMS module
- * is only available for Suns running SunOS 4.x and SunOS5.x (new - careful!)
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
- * 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.
- *
- */
-
-/*
- * Defines:
- * REFCLOCK && (PARSE||PARSEPPS)
- * - enable this mess
- * STREAM - allow for STREAMS modules
- * ("parse", "ppsclocd", "ppsclock")
- * PARSEPPS - provide PPS information to loopfilter (for
- * backward compatibilty only)
- * PPS - supply loopfilter with PPS samples (if configured)
- * PPSPPS - notify loopfilter of PPS file descriptor
- *
- * TTY defines:
- * HAVE_BSD_TTYS - currently unsupported
- * HAVE_SYSV_TTYS - will use termio.h
- * HAVE_TERMIOS - will use termios.h
- * STREAM - will use streams and implies HAVE_TERMIOS
- */
-
-/*
- * This driver currently provides the support for
- * - Meinberg DCF77 receiver DCF77 PZF 535 (TCXO version) (DCF)
- * - Meinberg DCF77 receiver DCF77 PZF 535 (OCXO version) (DCF)
- * - Meinberg DCF77 receiver U/A 31 (DCF)
- * - IGEL CLOCK (DCF)
- * - ELV DCF7000 (DCF)
- * - Schmid clock (DCF)
- * - Conrad DCF77 receiver module (DCF)
- * - FAU DCF77 NTP receiver (TimeBrick) (DCF)
- * - Meinberg GPS166 (GPS)
- * - Trimble SV6 (GPS)
- *
- */
-
-/*
- * Meinberg receivers are connected via a 9600 baud serial line
- *
- * Receivers that do NOT support:
- * - leap second indication
- * DCF U/A 31
- * DCF PZF535 (stock version)
- *
- * so...
- * - for PZF535 please ask for revision PZFUERL4.6 or higher
- * (support for leap second and alternate antenna)
- *
- * The Meinberg GPS receiver also has a special NTP time stamp
- * format. The firmware release is Uni-Erlangen. Only this
- * firmware release is supported by xntp3.
- *
- * Meinberg generic receiver setup:
- * output time code every second
- * Baud rate 9600 7E2S
- */
-
-#include "ntpd.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_control.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <time.h>
-
-#include <sys/errno.h>
-extern int errno;
-
-#if !defined(STREAM) && !defined(HAVE_SYSV_TTYS) && !defined(HAVE_BSD_TTYS) && !defined(HAVE_TERMIOS)
-/* #error NEED TO DEFINE ONE OF "STREAM" or "HAVE_SYSV_TTYS" */
-NEED TO DEFINE ONE OF "STREAM", "HAVE_SYSV_TTYS" or "HAVE_TERMIOS"
-#endif
-
-#ifdef STREAM
-#include <sys/stream.h>
-#include <sys/stropts.h>
-#ifndef HAVE_TERMIOS
-#define HAVE_TERMIOS
-#endif
-#endif
-
-#ifdef HAVE_TERMIOS
-#include <termios.h>
-#define TTY_GETATTR(_FD_, _ARG_) tcgetattr((_FD_), (_ARG_))
-#define TTY_SETATTR(_FD_, _ARG_) tcsetattr((_FD_), TCSANOW, (_ARG_))
-#undef HAVE_SYSV_TTYS
-#endif
-
-#ifdef HAVE_SYSV_TTYS
-#include <termio.h>
-#define TTY_GETATTR(_FD_, _ARG_) ioctl((_FD_), TCGETA, (_ARG_))
-#define TTY_SETATTR(_FD_, _ARG_) ioctl((_FD_), TCSETAW, (_ARG_))
-#endif
-
-#ifdef HAVE_BSD_TTYS
-/* #error CURRENTLY NO BSD TTY SUPPORT */
-CURRENTLY NO BSD TTY SUPPORT
-#endif
-
-#if !defined(O_RDWR) /* XXX SOLARIS */
-#include <fcntl.h>
-#endif /* !def(O_RDWR) */
-
-#ifdef PPSPPS
-#include <sys/ppsclock.h>
-#endif
-
-#include "ntp_select.h"
-#include "ntp_stdlib.h"
-
-#include "parse.h"
-
-#if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-static char rcsid[]="refclock_parse.c,v 3.59 1994/05/23 16:29:27 kardel Exp";
-#endif
-
-/**===========================================================================
- ** external interface to xntp mechanism
- **/
-
-static void parse_init P((void));
-static int parse_start P((u_int, struct peer *));
-static void parse_shutdown P((int));
-static void parse_poll P((int, struct peer *));
-static void parse_control P((u_int, struct refclockstat *, struct refclockstat *));
-
-#define parse_buginfo noentry
-
-struct refclock refclock_parse = {
- parse_start,
- parse_shutdown,
- parse_poll,
- parse_control,
- parse_init,
- parse_buginfo,
- NOFLAGS
-};
-
-/*
- * the unit field selects for one the prototype to be used (lower 4 bits)
- * and for the other the clock type in case of different but similar
- * receivers (bits 4-6)
- * the most significant bit encodes PPS support
- * when the most significant bit is set the pps telegrams will be used
- * for controlling the local clock (ntp_loopfilter.c)
- * receiver specific configration data is kept in the clockinfo field.
- */
-
-/*
- * Definitions
- */
-#define MAXUNITS 4 /* maximum number of "PARSE" units permitted */
-#define PARSEDEVICE "/dev/refclock-%d" /* device to open %d is unit number */
-
-/**===========================================================================
- ** function vector for dynamically binding io handling mechanism
- **/
-
-typedef struct bind
-{
- char *bd_description; /* name of type of binding */
- int (*bd_init)(); /* initialize */
- void (*bd_end)(); /* end */
- int (*bd_setcs)(); /* set character size */
- int (*bd_disable)(); /* disable */
- int (*bd_enable)(); /* enable */
- int (*bd_getfmt)(); /* get format */
- int (*bd_setfmt)(); /* setfmt */
- int (*bd_getstat)(); /* getstat */
- int (*bd_setstat)(); /* setstat */
- int (*bd_timecode)(); /* get time code */
- void (*bd_receive)(); /* receive operation */
- void (*bd_poll)(); /* poll operation */
-} bind_t;
-
-#define PARSE_END(_X_) (*(_X_)->binding->bd_end)(_X_)
-#define PARSE_SETCS(_X_, _CS_) (*(_X_)->binding->bd_setcs)(_X_, _CS_)
-#define PARSE_ENABLE(_X_) (*(_X_)->binding->bd_enable)(_X_)
-#define PARSE_DISABLE(_X_) (*(_X_)->binding->bd_disable)(_X_)
-#define PARSE_GETFMT(_X_, _DCT_) (*(_X_)->binding->bd_getfmt)(_X_, _DCT_)
-#define PARSE_SETFMT(_X_, _DCT_) (*(_X_)->binding->bd_setfmt)(_X_, _DCT_)
-#define PARSE_GETSTAT(_X_, _DCT_) (*(_X_)->binding->bd_getstat)(_X_, _DCT_)
-#define PARSE_SETSTAT(_X_, _DCT_) (*(_X_)->binding->bd_setstat)(_X_, _DCT_)
-#define PARSE_GETTIMECODE(_X_, _DCT_) (*(_X_)->binding->bd_timecode)(_X_, _DCT_)
-#define PARSE_POLL(_X_) (*(_X_)->binding->bd_poll)(_X_)
-
-/*
- * io modes
- */
-#define PARSE_F_NOPOLLONLY 0x0001 /* always do async io (possible PPS support via PARSE) */
-#define PARSE_F_POLLONLY 0x0002 /* never do async io (no PPS support via PARSE) */
-#define PARSE_F_PPSPPS 0x0004 /* use loopfilter PPS code (CIOGETEV) */
-#define PARSE_F_PPSONSECOND 0x0008 /* PPS pulses are on second */
-
-/**===========================================================================
- ** refclock instance data
- **/
-
-struct parseunit
-{
- /*
- * XNTP management
- */
- struct peer *peer; /* backlink to peer structure - refclock inactive if 0 */
- int fd; /* device file descriptor */
- u_char unit; /* encoded unit/type/PPS */
-
- /*
- * XNTP io
- */
- struct refclockio io; /* io system structure (used in PPS mode) */
- bind_t *binding; /* io handling binding */
-
- /*
- * parse state
- */
- parse_t parseio; /* io handling structure (user level parsing) */
-
- /*
- * type specific parameters
- */
- struct clockinfo *parse_type; /* link to clock description */
-
- /*
- * clock specific configuration
- */
- l_fp basedelay; /* clock local phase offset */
- l_fp ppsdelay; /* clock local pps phase offset */
-
- /*
- * clock state handling/reporting
- */
- u_char flags; /* flags (leap_control) */
- u_char status; /* current status */
- u_char lastevent; /* last not NORMAL status */
- u_long lastchange; /* time (xntp) when last state change accured */
- u_long statetime[CEVNT_MAX+1]; /* accumulated time of clock states */
- struct event stattimer; /* statistics timer */
- u_long polls; /* polls from NTP protocol machine */
- u_long noresponse; /* number of expected but not seen datagrams */
- u_long badformat; /* bad format (failed format conversions) */
- u_long baddata; /* usually bad receive length, bad format */
-
- u_char pollonly; /* 1 for polling only (no PPS mode) */
- u_char pollneeddata; /* 1 for receive sample expected in PPS mode */
- u_long laststatus; /* last packet status (error indication) */
- u_short lastformat; /* last format used */
- u_long lastsync; /* time (xntp) when clock was last seen fully synchronized */
- u_long timestarted; /* time (xntp) when peer clock was instantiated */
- u_long nosynctime; /* time (xntp) when last nosync message was posted */
- u_long lastmissed; /* time (xntp) when poll didn't get data (powerup heuristic) */
- u_long ppsserial; /* magic cookie for ppsclock serials (avoids stale ppsclock data) */
- parsetime_t time; /* last (parse module) data */
- void *localdata; /* optional local data */
-};
-
-
-/**===========================================================================
- ** Clockinfo section all parameter for specific clock types
- ** includes NTP paramaters, TTY parameters and IO handling parameters
- **/
-
-static void poll_dpoll P((struct parseunit *));
-static void poll_poll P((struct parseunit *));
-static int poll_init P((struct parseunit *));
-static void poll_end P((struct parseunit *));
-
-typedef struct poll_info
-{
- u_long rate; /* poll rate - once every "rate" seconds - 0 off */
- char * string; /* string to send for polling */
- u_long count; /* number of charcters in string */
-} poll_info_t;
-
-#define NO_FLAGS 0
-#define NO_POLL (void (*)())0
-#define NO_INIT (int (*)())0
-#define NO_END (void (*)())0
-#define NO_DATA (void *)0
-#define NO_FORMAT ""
-#define NO_PPSDELAY 0
-
-#define DCF_ID "DCF" /* generic DCF */
-#define DCF_A_ID "DCFa" /* AM demodulation */
-#define DCF_P_ID "DCFp" /* psuedo random phase shift */
-#define GPS_ID "GPS" /* GPS receiver */
-
-#define NOCLOCK_ROOTDELAY 0x00000000
-#define NOCLOCK_BASEDELAY 0x00000000
-#define NOCLOCK_DESCRIPTION ((char *)0)
-#define NOCLOCK_MAXUNSYNC 0
-#define NOCLOCK_CFLAG 0
-#define NOCLOCK_IFLAG 0
-#define NOCLOCK_OFLAG 0
-#define NOCLOCK_LFLAG 0
-#define NOCLOCK_ID "TILT"
-#define NOCLOCK_POLL NO_POLL
-#define NOCLOCK_INIT NO_INIT
-#define NOCLOCK_END NO_END
-#define NOCLOCK_DATA NO_DATA
-#define NOCLOCK_FORMAT NO_FORMAT
-#define NOCLOCK_TYPE CTL_SST_TS_UNSPEC
-
-#define DCF_TYPE CTL_SST_TS_LF
-#define GPS_TYPE CTL_SST_TS_UHF
-
-/*
- * receiver specific constants
- */
-#define MBG_CFLAG19200 (B19200|CS7|PARENB|CREAD|HUPCL)
-#define MBG_CFLAG (B9600|CS7|PARENB|CREAD|HUPCL)
-#define MBG_IFLAG (IGNBRK|IGNPAR|ISTRIP)
-#define MBG_OFLAG 0
-#define MBG_LFLAG 0
-/*
- * Meinberg DCF U/A 31 (AM) receiver
- */
-#define DCFUA31_ROOTDELAY 0x00000D00 /* 50.78125ms */
-#define DCFUA31_BASEDELAY 0x02C00000 /* 10.7421875ms: 10 ms (+/- 3 ms) */
-#define DCFUA31_DESCRIPTION "Meinberg DCF U/A 31"
-#define DCFUA31_MAXUNSYNC 60*30 /* only trust clock for 1/2 hour */
-#define DCFUA31_CFLAG MBG_CFLAG
-#define DCFUA31_IFLAG MBG_IFLAG
-#define DCFUA31_OFLAG MBG_OFLAG
-#define DCFUA31_LFLAG MBG_LFLAG
-
-/*
- * Meinberg DCF PZF535/TCXO (FM/PZF) receiver
- */
-#define DCFPZF535_ROOTDELAY 0x00000034 /* 800us */
-#define DCFPZF535_BASEDELAY 0x00800000 /* 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define DCFPZF535_DESCRIPTION "Meinberg DCF PZF 535/TCXO"
-#define DCFPZF535_MAXUNSYNC 60*60*12 /* only trust clock for 12 hours
- * @ 5e-8df/f we have accumulated
- * at most 2.16 ms (thus we move to
- * NTP synchronisation */
-#define DCFPZF535_CFLAG MBG_CFLAG
-#define DCFPZF535_IFLAG MBG_IFLAG
-#define DCFPZF535_OFLAG MBG_OFLAG
-#define DCFPZF535_LFLAG MBG_LFLAG
-
-
-/*
- * Meinberg DCF PZF535/OCXO receiver
- */
-#define DCFPZF535OCXO_ROOTDELAY 0x00000034 /* 800us (max error * 10) */
-#define DCFPZF535OCXO_BASEDELAY 0x00800000 /* 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define DCFPZF535OCXO_DESCRIPTION "Meinberg DCF PZF 535/OCXO"
-#define DCFPZF535OCXO_MAXUNSYNC 60*60*96 /* only trust clock for 4 days
- * @ 5e-9df/f we have accumulated
- * at most an error of 1.73 ms
- * (thus we move to NTP synchronisation) */
-#define DCFPZF535OCXO_CFLAG MBG_CFLAG
-#define DCFPZF535OCXO_IFLAG MBG_IFLAG
-#define DCFPZF535OCXO_OFLAG MBG_OFLAG
-#define DCFPZF535OCXO_LFLAG MBG_LFLAG
-
-/*
- * Meinberg GPS166 receiver
- */
-#define GPS166_ROOTDELAY 0x00000000 /* nothing here */
-#define GPS166_BASEDELAY 0x00800000 /* XXX to be fixed ! 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define GPS166_DESCRIPTION "Meinberg GPS166 receiver"
-#define GPS166_MAXUNSYNC 0 /* this clock is immediately lost */
-#define GPS166_CFLAG MBG_CFLAG
-#define GPS166_IFLAG MBG_IFLAG
-#define GPS166_OFLAG MBG_OFLAG
-#define GPS166_LFLAG MBG_LFLAG
-#define GPS166_POLL NO_POLL
-#define GPS166_INIT NO_INIT
-#define GPS166_END NO_END
-#define GPS166_DATA NO_DATA
-#define GPS166_ID GPS_ID
-#define GPS166_FORMAT NO_FORMAT
-
-/*
- * ELV DCF7000 Wallclock-Receiver/Switching Clock (Kit)
- *
- * This is really not the hottest clock - but before you have nothing ...
- */
-#define DCF7000_ROOTDELAY 0x00000364 /* 13 ms */
-#define DCF7000_BASEDELAY 0x67AE0000 /* 405 ms - slow blow */
-#define DCF7000_DESCRIPTION "ELV DCF7000"
-#define DCF7000_MAXUNSYNC (60*5) /* sorry - but it just was not build as a clock */
-#define DCF7000_CFLAG (B9600|CS8|CREAD|PARENB|PARODD|CLOCAL|HUPCL)
-#define DCF7000_IFLAG (IGNBRK)
-#define DCF7000_OFLAG 0
-#define DCF7000_LFLAG 0
-
-/*
- * Schmid DCF Receiver Kit
- *
- * When the WSDCF clock is operating optimally we want the primary clock
- * distance to come out at 300 ms. Thus, peer.distance in the WSDCF peer
- * structure is set to 290 ms and we compute delays which are at least
- * 10 ms long. The following are 290 ms and 10 ms expressed in u_fp format
- */
-#define WS_POLLRATE 1 /* every second - watch interdependency with poll routine */
-#define WS_POLLCMD "\163"
-#define WS_CMDSIZE 1
-
-static poll_info_t wsdcf_pollinfo = { WS_POLLRATE, WS_POLLCMD, WS_CMDSIZE };
-
-#define WSDCF_INIT poll_init
-#define WSDCF_POLL poll_dpoll
-#define WSDCF_END poll_end
-#define WSDCF_DATA ((void *)(&wsdcf_pollinfo))
-#define WSDCF_ROOTDELAY 0X00004A3D /* ~ 290ms */
-#define WSDCF_BASEDELAY 0x028F5C29 /* ~ 10ms */
-#define WSDCF_DESCRIPTION "WS/DCF Receiver"
-#define WSDCF_FORMAT "Schmid"
-#define WSDCF_MAXUNSYNC (60*60) /* assume this beast hold at 1 h better than 2 ms XXX-must verify */
-#define WSDCF_CFLAG (B1200|CS8|CREAD|CLOCAL)
-#define WSDCF_IFLAG 0
-#define WSDCF_OFLAG 0
-#define WSDCF_LFLAG 0
-
-/*
- * RAW DCF77 - input of DCF marks via RS232 - many variants
- */
-#define RAWDCF_FLAGS PARSE_F_NOPOLLONLY
-#define RAWDCF_ROOTDELAY 0x00000364 /* 13 ms */
-#define RAWDCF_FORMAT "RAW DCF77 Timecode"
-#define RAWDCF_MAXUNSYNC (0) /* sorry - its a true receiver - no signal - no time */
-#define RAWDCF_CFLAG (B50|CS8|CREAD|CLOCAL|PARENB)
-#define RAWDCF_IFLAG (IGNPAR)
-#define RAWDCF_OFLAG 0
-#define RAWDCF_LFLAG 0
-
-/*
- * RAW DCF variants
- */
-/*
- * Conrad receiver
- *
- * simplest (cheapest) DCF clock - e. g. DCF77 receiver by Conrad
- * (~40DM - roughly $30 ) followed by a level converter for RS232
- */
-#define CONRAD_BASEDELAY 0x420C49B0 /* ~258 ms - Conrad receiver @ 50 Baud on a Sun */
-#define CONRAD_DESCRIPTION "RAW DCF77 CODE (Conrad DCF77 receiver module)"
-
-/*
- * TimeBrick receiver
- */
-#define TIMEBRICK_BASEDELAY 0x35C29000 /* ~210 ms - TimeBrick @ 50 Baud on a Sun */
-#define TIMEBRICK_DESCRIPTION "RAW DCF77 CODE (TimeBrick)"
-
-/*
- * IGEL:clock receiver
- */
-#define IGELCLOCK_BASEDELAY 0x420C49B0 /* ~258 ms - IGEL:clock receiver */
-#define IGELCLOCK_DESCRIPTION "RAW DCF77 CODE (IGEL:clock)"
-#define IGELCLOCK_CFLAG (B1200|CS8|CREAD|HUPCL|CLOCAL)
-
-/*
- * Trimble SV6 GPS receiver
- */
-#ifndef TRIM_POLLRATE
-#define TRIM_POLLRATE 0 /* only true direct polling */
-#endif
-#define TRIM_POLLCMD ">SRM;FR_FLAG=F<>QTM<"
-#define TRIM_CMDSIZE 20
-
-static poll_info_t trimble_pollinfo = { TRIM_POLLRATE, TRIM_POLLCMD, TRIM_CMDSIZE };
-static int trimble_init P((struct parseunit *));
-
-#define TRIMBLESV6_CFLAG (B4800|CS8|CREAD)
-#define TRIMBLESV6_IFLAG (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON)
-#define TRIMBLESV6_OFLAG (OPOST|ONLCR)
-#define TRIMBLESV6_LFLAG (ICANON|ECHOK)
-#define TRIMBLESV6_FLAGS (PARSE_F_PPSPPS|PARSE_F_PPSONSECOND)
-#define TRIMBLESV6_POLL poll_dpoll
-#define TRIMBLESV6_INIT trimble_init
-#define TRIMBLESV6_END poll_end
-#define TRIMBLESV6_DATA ((void *)(&trimble_pollinfo))
-#define TRIMBLESV6_ID GPS_ID
-#define TRIMBLESV6_FORMAT NO_FORMAT
-#define TRIMBLESV6_ROOTDELAY 0x0
-#define TRIMBLESV6_BASEDELAY 0x0
-#define TRIMBLESV6_DESCRIPTION "Trimble SV6 GPS receiver"
-#define TRIMBLESV6_MAXUNSYNC 0
-#define TRIMBLESV6_EOL '<'
-
-static struct clockinfo
-{
- u_long cl_flags; /* operation flags (io modes) */
- void (*cl_poll)(); /* active poll routine */
- int (*cl_init)(); /* active poll init routine */
- void (*cl_end)(); /* active poll end routine */
- void *cl_data; /* local data area for "poll" mechanism */
- u_fp cl_rootdelay; /* rootdelay */
- u_long cl_basedelay; /* current offset - unsigned l_fp fractional part */
- u_long cl_ppsdelay; /* current PPS offset - unsigned l_fp fractional part */
- char *cl_id; /* ID code (usually "DCF") */
- char *cl_description; /* device name */
- char *cl_format; /* fixed format */
- u_char cl_type; /* clock type (ntp control) */
- u_long cl_maxunsync; /* time to trust oscillator after loosing synch */
- u_long cl_cflag; /* terminal io flags */
- u_long cl_iflag; /* terminal io flags */
- u_long cl_oflag; /* terminal io flags */
- u_long cl_lflag; /* terminal io flags */
-} clockinfo[] =
-{ /* 0. 0.0.128 - base offset for PPS support */
- { /* 127.127.8.<device> */
- NO_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- DCFPZF535_ROOTDELAY,
- DCFPZF535_BASEDELAY,
- NO_PPSDELAY,
- DCF_P_ID,
- DCFPZF535_DESCRIPTION,
- NO_FORMAT,
- DCF_TYPE,
- DCFPZF535_MAXUNSYNC,
- DCFPZF535_CFLAG,
- DCFPZF535_IFLAG,
- DCFPZF535_OFLAG,
- DCFPZF535_LFLAG
- },
- { /* 127.127.8.4+<device> */
- NO_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- DCFPZF535OCXO_ROOTDELAY,
- DCFPZF535OCXO_BASEDELAY,
- NO_PPSDELAY,
- DCF_P_ID,
- DCFPZF535OCXO_DESCRIPTION,
- NO_FORMAT,
- DCF_TYPE,
- DCFPZF535OCXO_MAXUNSYNC,
- DCFPZF535OCXO_CFLAG,
- DCFPZF535OCXO_IFLAG,
- DCFPZF535OCXO_OFLAG,
- DCFPZF535OCXO_LFLAG
- },
- { /* 127.127.8.8+<device> */
- NO_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- DCFUA31_ROOTDELAY,
- DCFUA31_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- DCFUA31_DESCRIPTION,
- NO_FORMAT,
- DCF_TYPE,
- DCFUA31_MAXUNSYNC,
- DCFUA31_CFLAG,
- DCFUA31_IFLAG,
- DCFUA31_OFLAG,
- DCFUA31_LFLAG
- },
- { /* 127.127.8.12+<device> */
- NO_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- DCF7000_ROOTDELAY,
- DCF7000_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- DCF7000_DESCRIPTION,
- NO_FORMAT,
- DCF_TYPE,
- DCF7000_MAXUNSYNC,
- DCF7000_CFLAG,
- DCF7000_IFLAG,
- DCF7000_OFLAG,
- DCF7000_LFLAG
- },
- { /* 127.127.8.16+<device> */
- NO_FLAGS,
- WSDCF_POLL,
- WSDCF_INIT,
- WSDCF_END,
- WSDCF_DATA,
- WSDCF_ROOTDELAY,
- WSDCF_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- WSDCF_DESCRIPTION,
- WSDCF_FORMAT,
- DCF_TYPE,
- WSDCF_MAXUNSYNC,
- WSDCF_CFLAG,
- WSDCF_IFLAG,
- WSDCF_OFLAG,
- WSDCF_LFLAG
- },
- { /* 127.127.8.20+<device> */
- RAWDCF_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- CONRAD_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- CONRAD_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- RAWDCF_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG
- },
- { /* 127.127.8.24+<device> */
- RAWDCF_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- TIMEBRICK_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- TIMEBRICK_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- RAWDCF_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG
- },
- { /* 127.127.8.28+<device> */
- NO_FLAGS,
- GPS166_POLL,
- GPS166_INIT,
- GPS166_END,
- GPS166_DATA,
- GPS166_ROOTDELAY,
- GPS166_BASEDELAY,
- NO_PPSDELAY,
- GPS166_ID,
- GPS166_DESCRIPTION,
- GPS166_FORMAT,
- GPS_TYPE,
- GPS166_MAXUNSYNC,
- GPS166_CFLAG,
- GPS166_IFLAG,
- GPS166_OFLAG,
- GPS166_LFLAG
- },
- { /* 127.127.8.32+<device> */
- TRIMBLESV6_FLAGS,
-#if TRIM_POLLRATE /* DHD940515: Allow user config */
- NO_POLL,
-#else
- TRIMBLESV6_POLL,
-#endif
- TRIMBLESV6_INIT,
- TRIMBLESV6_END,
- TRIMBLESV6_DATA,
- TRIMBLESV6_ROOTDELAY,
- TRIMBLESV6_BASEDELAY,
- NO_PPSDELAY,
- TRIMBLESV6_ID,
- TRIMBLESV6_DESCRIPTION,
- TRIMBLESV6_FORMAT,
- GPS_TYPE,
- TRIMBLESV6_MAXUNSYNC,
- TRIMBLESV6_CFLAG,
- TRIMBLESV6_IFLAG,
- TRIMBLESV6_OFLAG,
- TRIMBLESV6_LFLAG
- },
- { /* 127.127.8.36+<device> */
- RAWDCF_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- IGELCLOCK_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- IGELCLOCK_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- IGELCLOCK_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG
- }
-};
-
-static int ncltypes = sizeof(clockinfo) / sizeof(struct clockinfo);
-
-#define CL_REALTYPE(x) (((x) >> 2) & 0x1F)
-#define CL_TYPE(x) ((CL_REALTYPE(x) >= ncltypes) ? ~0 : CL_REALTYPE(x))
-#define CL_PPS(x) ((x) & 0x80)
-#define CL_UNIT(x) ((x) & 0x3)
-
-/*
- * Other constant stuff
- */
-#define PARSEHSREFID 0x7f7f08ff /* 127.127.8.255 refid for hi strata */
-
-#define PARSENOSYNCREPEAT (10*60) /* mention uninitialized clocks all 10 minutes */
-#define PARSESTATISTICS (60*60) /* output state statistics every hour */
-
-static struct parseunit *parseunits[MAXUNITS];
-
-extern u_long current_time;
-extern s_char sys_precision;
-extern struct event timerqueue[];
-#ifdef PPSPPS
-extern int fdpps;
-#endif
-
-static int notice = 0;
-
-#define PARSE_STATETIME(parse, i) ((parse->status == i) ? parse->statetime[i] + current_time - parse->lastchange : parse->statetime[i])
-
-static void parse_event P((struct parseunit *, int));
-static void parse_process P((struct parseunit *, parsetime_t *));
-
-/**===========================================================================
- ** implementation of i/o handling methods
- ** (all STREAM, partial STREAM, user level)
- **/
-
-/*
- * define possible io handling methods
- */
-#ifdef STREAM
-static int ppsclock_init P((struct parseunit *));
-static int stream_init P((struct parseunit *));
-static void stream_nop P((struct parseunit *));
-static int stream_enable P((struct parseunit *));
-static int stream_disable P((struct parseunit *));
-static int stream_setcs P((struct parseunit *, parsectl_t *));
-static int stream_getfmt P((struct parseunit *, parsectl_t *));
-static int stream_setfmt P((struct parseunit *, parsectl_t *));
-static int stream_getstat P((struct parseunit *, parsectl_t *));
-static int stream_setstat P((struct parseunit *, parsectl_t *));
-static int stream_timecode P((struct parseunit *, parsectl_t *));
-static void stream_receive P((struct recvbuf *));
-static void stream_poll P((struct parseunit *));
-#endif
-
-static int local_init P((struct parseunit *));
-static void local_end P((struct parseunit *));
-static int local_nop P((struct parseunit *));
-static int local_setcs P((struct parseunit *, parsectl_t *));
-static int local_getfmt P((struct parseunit *, parsectl_t *));
-static int local_setfmt P((struct parseunit *, parsectl_t *));
-static int local_getstat P((struct parseunit *, parsectl_t *));
-static int local_setstat P((struct parseunit *, parsectl_t *));
-static int local_timecode P((struct parseunit *, parsectl_t *));
-static void local_receive P((struct recvbuf *));
-static void local_poll P((struct parseunit *));
-
-static bind_t io_bindings[] =
-{
-#ifdef STREAM
- {
- "parse STREAM",
- stream_init,
- stream_nop,
- stream_setcs,
- stream_disable,
- stream_enable,
- stream_getfmt,
- stream_setfmt,
- stream_getstat,
- stream_setstat,
- stream_timecode,
- stream_receive,
- stream_poll
- },
- {
- "ppsclock STREAM",
- ppsclock_init,
- local_end,
- local_setcs,
- local_nop,
- local_nop,
- local_getfmt,
- local_setfmt,
- local_getstat,
- local_setstat,
- local_timecode,
- local_receive,
- local_poll
- },
-#endif
- {
- "normal",
- local_init,
- local_end,
- local_setcs,
- local_nop,
- local_nop,
- local_getfmt,
- local_setfmt,
- local_getstat,
- local_setstat,
- local_timecode,
- local_receive,
- local_poll
- },
- {
- (char *)0,
- }
-};
-
-#ifdef STREAM
-/*--------------------------------------------------
- * ppsclock STREAM init
- */
-static int
-ppsclock_init(parse)
- struct parseunit *parse;
-{
- /*
- * now push the parse streams module
- * it will ensure exclusive access to the device
- */
- if (ioctl(parse->fd, I_PUSH, (caddr_t)"ppsclocd") == -1 &&
- ioctl(parse->fd, I_PUSH, (caddr_t)"ppsclock") == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: ppsclock_init: ioctl(fd, I_PUSH, \"ppsclock\"): %m",
- CL_UNIT(parse->unit));
- return 0;
- }
- if (!local_init(parse))
- {
- (void)ioctl(parse->fd, I_POP, (caddr_t)0);
- return 0;
- }
-
- parse->flags |= PARSE_PPSCLOCK;
- return 1;
-}
-
-/*--------------------------------------------------
- * parse STREAM init
- */
-static int
-stream_init(parse)
- struct parseunit *parse;
-{
- /*
- * now push the parse streams module
- * to test whether it is there (Oh boy - neat kernel interface)
- */
- if (ioctl(parse->fd, I_PUSH, (caddr_t)"parse") == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CL_UNIT(parse->unit));
- return 0;
- }
- else
- {
- while(ioctl(parse->fd, I_POP, (caddr_t)0) == 0)
- /* empty loop */;
-
- /*
- * now push it a second time after we have removed all
- * module garbage
- */
- if (ioctl(parse->fd, I_PUSH, (caddr_t)"parse") == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CL_UNIT(parse->unit));
- return 0;
- }
- else
- {
- return 1;
- }
- }
-}
-
- /*--------------------------------------------------
- * STREAM setcs
- */
-static int
-stream_setcs(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_SETCS;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_setcs: ioctl(fd, I_STR, PARSEIOC_SETCS): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM nop
- */
-static void
-stream_nop(parse)
- struct parseunit *parse;
-{
-}
-
-/*--------------------------------------------------
- * STREAM enable
- */
-static int
-stream_enable(parse)
- struct parseunit *parse;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_ENABLE;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)0;
- strioc.ic_len = 0;
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_enable: ioctl(fd, I_STR, PARSEIOC_ENABLE): %m", CL_UNIT(parse->unit));
- return 0;
- }
- parse->io.clock_recv = stream_receive; /* ok - parse input in kernel */
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM disable
- */
-static int
-stream_disable(parse)
- struct parseunit *parse;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_DISABLE;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)0;
- strioc.ic_len = 0;
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_disable: ioctl(fd, I_STR, PARSEIOC_DISABLE): %m", CL_UNIT(parse->unit));
- return 0;
- }
- parse->io.clock_recv = local_receive; /* ok - parse input in daemon */
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM getfmt
- */
-static int
-stream_getfmt(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_GETFMT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: ioctl(fd, I_STR, PARSEIOC_GETFMT): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM setfmt
- */
-static int
-stream_setfmt(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_SETFMT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_setfmt: ioctl(fd, I_STR, PARSEIOC_SETFMT): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM getstat
- */
-static int
-stream_getstat(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_GETSTAT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_getstat: ioctl(fd, I_STR, PARSEIOC_GETSTAT): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM setstat
- */
-static int
-stream_setstat(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_SETSTAT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_setstat: ioctl(fd, I_STR, PARSEIOC_SETSTAT): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM timecode
- */
-static int
-stream_timecode(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_TIMECODE;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_process: ioctl(fd, I_STR, PARSEIOC_TIMECODE): %m", CL_UNIT(parse->unit), parse->fd);
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM receive
- */
-static void
-stream_receive(rbufp)
- struct recvbuf *rbufp;
-{
- struct parseunit *parse = (struct parseunit *)rbufp->recv_srcclock;
- parsetime_t parsetime;
-
- if (rbufp->recv_length != sizeof(parsetime_t))
- {
- syslog(LOG_ERR,"PARSE receiver #%d: parse_receive: bad size (got %d expected %d)",
- CL_UNIT(parse->unit), rbufp->recv_length, sizeof(parsetime_t));
- parse->baddata++;
- parse_event(parse, CEVNT_BADREPLY);
- return;
- }
- memmove((caddr_t)&parsetime,
- (caddr_t)&rbufp->recv_space,
- sizeof(parsetime_t));
-
- /*
- * switch time stamp world - be sure to normalize small usec field
- * errors.
- */
-
-#define fix_ts(_X_) \
- if ((&(_X_))->tv.tv_usec >= 1000000) \
- { \
- (&(_X_))->tv.tv_usec -= 1000000; \
- (&(_X_))->tv.tv_sec += 1; \
- }
-
-#define cvt_ts(_X_, _Y_) \
- { \
- l_fp ts; \
- \
- fix_ts((_X_)); \
- if (!buftvtots((const char *)&(&(_X_))->tv, &ts)) \
- { \
- syslog(LOG_ERR,"parse: stream_receive: timestamp conversion error (buftvtots) (%s) (%d.%06d) ", (_Y_), (&(_X_))->tv.tv_sec, (&(_X_))->tv.tv_usec);\
- return; \
- } \
- else \
- { \
- (&(_X_))->fp = ts; \
- } \
- }
-
- if (PARSE_TIMECODE(parsetime.parse_state))
- {
- cvt_ts(parsetime.parse_time, "parse_time");
- cvt_ts(parsetime.parse_stime, "parse_stime");
- }
-
- if (PARSE_PPS(parsetime.parse_state))
- cvt_ts(parsetime.parse_ptime, "parse_ptime");
-
- parse_process(parse, &parsetime);
-}
-
-/*--------------------------------------------------
- * STREAM poll
- */
-static void
-stream_poll(parse)
- struct parseunit *parse;
-{
- register int fd, i, rtc;
- fd_set fdmask;
- struct timeval timeout, starttime, curtime, selecttime;
- parsetime_t parsetime;
-
- /*
- * now we do the following:
- * - read the first packet from the parse module (OLD !!!)
- * - read the second packet from the parse module (fresh)
- * - compute values for xntp
- */
-
- FD_ZERO(&fdmask);
- fd = parse->fd;
- FD_SET(fd, &fdmask);
- timeout.tv_sec = 0;
- timeout.tv_usec = 500000; /* 0.5 sec */
-
- if (parse->parse_type->cl_poll)
- {
- parse->parse_type->cl_poll(parse);
- }
-
- if (GETTIMEOFDAY(&starttime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
-
- selecttime = timeout;
-
- while ((rtc = select(fd + 1, &fdmask, 0, 0, &selecttime)) != 1)
- {
- /* no data from the radio clock */
-
- if (rtc == -1)
- {
- if (errno == EINTR)
- {
- if (GETTIMEOFDAY(&curtime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
- selecttime.tv_sec = curtime.tv_sec - starttime.tv_sec;
- if (curtime.tv_usec < starttime.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + curtime.tv_usec - starttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = curtime.tv_usec - starttime.tv_usec;
- }
-
-
- if (timercmp(&selecttime, &timeout, >))
- {
- /*
- * elapsed real time passed timeout value - consider it timed out
- */
- break;
- }
-
- /*
- * calculate residual timeout value
- */
- selecttime.tv_sec = timeout.tv_sec - selecttime.tv_sec;
-
- if (selecttime.tv_usec > timeout.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + timeout.tv_usec - selecttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = timeout.tv_usec - selecttime.tv_usec;
- }
-
- FD_SET(fd, &fdmask);
- continue;
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data[old] from device (select() error: %m)", CL_UNIT(parse->unit));
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data[old] from device", CL_UNIT(parse->unit));
- }
- parse->noresponse++;
- parse->lastmissed = current_time;
- parse_event(parse, CEVNT_TIMEOUT);
-
- return;
- }
-
- while (((i = read(fd, (char *)&parsetime, sizeof(parsetime))) < sizeof(parsetime)))
- {
- /* bad packet */
- if ( i == -1)
- {
- if (errno == EINTR)
- {
- continue;
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: bad read[old] from streams module (read() error: %m)", CL_UNIT(parse->unit), i, sizeof(parsetime));
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: bad read[old] from streams module (got %d bytes - expected %d bytes)", CL_UNIT(parse->unit), i, sizeof(parsetime));
- }
- parse->baddata++;
- parse_event(parse, CEVNT_BADREPLY);
-
- return;
- }
-
- if (parse->parse_type->cl_poll)
- {
- parse->parse_type->cl_poll(parse);
- }
-
- timeout.tv_sec = 1;
- timeout.tv_usec = 500000; /* 1.500 sec */
- FD_ZERO(&fdmask);
- FD_SET(fd, &fdmask);
-
- if (GETTIMEOFDAY(&starttime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
-
- selecttime = timeout;
-
- while ((rtc = select(fd + 1, &fdmask, 0, 0, &selecttime)) != 1)
- {
- /* no data from the radio clock */
-
- if (rtc == -1)
- {
- if (errno == EINTR)
- {
- if (GETTIMEOFDAY(&curtime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
- selecttime.tv_sec = curtime.tv_sec - starttime.tv_sec;
- if (curtime.tv_usec < starttime.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + curtime.tv_usec - starttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = curtime.tv_usec - starttime.tv_usec;
- }
-
-
- if (timercmp(&selecttime, &timeout, >))
- {
- /*
- * elapsed real time passed timeout value - consider it timed out
- */
- break;
- }
-
- /*
- * calculate residual timeout value
- */
- selecttime.tv_sec = timeout.tv_sec - selecttime.tv_sec;
-
- if (selecttime.tv_usec > timeout.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + timeout.tv_usec - selecttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = timeout.tv_usec - selecttime.tv_usec;
- }
-
- FD_SET(fd, &fdmask);
- continue;
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data[new] from device (select() error: %m)", CL_UNIT(parse->unit));
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data[new] from device", CL_UNIT(parse->unit));
- }
-
- /*
- * we will return here iff we got a good old sample as this would
- * be misinterpreted. bad samples are passed on to be logged into the
- * state statistics
- */
- if ((parsetime.parse_status & CVT_MASK) == CVT_OK)
- {
- parse->noresponse++;
- parse->lastmissed = current_time;
- parse_event(parse, CEVNT_TIMEOUT);
- return;
- }
- }
-
- /*
- * we get here either by a possible read() (rtc == 1 - while assertion)
- * or by a timeout or a system call error. when a read() is possible we
- * get the new data, otherwise we stick with the old
- */
- if ((rtc == 1) && ((i = read(fd, (char *)&parsetime, sizeof(parsetime))) < sizeof(parsetime)))
- {
- /* bad packet */
- if ( i== -1)
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: bad read[new] from streams module (read() error: %m)", CL_UNIT(parse->unit), i, sizeof(parsetime));
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: bad read[new] from streams module (got %d bytes - expected %d bytes)", CL_UNIT(parse->unit), i, sizeof(parsetime));
- }
- parse->baddata++;
- parse_event(parse, CEVNT_BADREPLY);
-
- return;
- }
-
- /*
- * process what we got
- */
- parse_process(parse, &parsetime);
-}
-#endif
-
-/*--------------------------------------------------
- * local init
- */
-static int
-local_init(parse)
- struct parseunit *parse;
-{
- return parse_ioinit(&parse->parseio);
-}
-
-/*--------------------------------------------------
- * local end
- */
-static void
-local_end(parse)
- struct parseunit *parse;
-{
- parse_ioend(&parse->parseio);
-}
-
-
-/*--------------------------------------------------
- * local nop
- */
-static int
-local_nop(parse)
- struct parseunit *parse;
-{
- return 1;
-}
-
-/*--------------------------------------------------
- * local setcs
- */
-static int
-local_setcs(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_setcs(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local getfmt
- */
-static int
-local_getfmt(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_getfmt(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local setfmt
- */
-static int
-local_setfmt(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_setfmt(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local getstat
- */
-static int
-local_getstat(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_getstat(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local setstat
- */
-static int
-local_setstat(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_setstat(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local timecode
- */
-static int
-local_timecode(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_timecode(tcl, &parse->parseio);
-}
-
-
-/*--------------------------------------------------
- * local receive
- */
-static void
-local_receive(rbufp)
- struct recvbuf *rbufp;
-{
- struct parseunit *parse = (struct parseunit *)rbufp->recv_srcclock;
- register int count;
- register char *s;
- /*
- * eat all characters, parsing then and feeding complete samples
- */
- count = rbufp->recv_length;
- s = rbufp->recv_buffer;
-
- while (count--)
- {
- if (parse_ioread(&parse->parseio, *s++, &rbufp->recv_time))
- {
- /*
- * got something good to eat
- */
-#ifdef PPSPPS
- if (!PARSE_PPS(parse->parseio.parse_dtime.parse_state) &&
- (parse->flags & PARSE_PPSCLOCK))
- {
- l_fp ts;
- struct ppsclockev ev;
-
- if (ioctl(parse->fd, CIOGETEV, (caddr_t)&ev) == 0)
- {
- if (ev.serial != parse->ppsserial)
- {
- /*
- * add PPS time stamp if available via ppsclock module
- * and not supplied already.
- */
- if (!buftvtots((const char *)&ev.tv, &ts))
- {
- syslog(LOG_ERR,"parse: local_receive: timestamp conversion error (buftvtots) (ppsclockev.tv)");
- }
- else
- {
- parse->parseio.parse_dtime.parse_ptime.fp = ts;
- parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
- }
- }
- parse->ppsserial = ev.serial;
- }
- }
-#endif
- parse_process(parse, &parse->parseio.parse_dtime);
- parse_iodone(&parse->parseio);
- }
- }
-}
-
-/*--------------------------------------------------
- * local poll
- */
-static void
-local_poll(parse)
- struct parseunit *parse;
-{
- register int fd, i, rtc;
- fd_set fdmask;
- struct timeval timeout, starttime, curtime, selecttime;
- static struct timeval null_time = { 0, 0};
- timestamp_t ts;
-
- FD_ZERO(&fdmask);
- fd = parse->fd;
- FD_SET(fd, &fdmask);
- timeout.tv_sec = 1;
- timeout.tv_usec = 500000; /* 1.5 sec */
-
- if (parse->parse_type->cl_poll)
- {
- parse->parse_type->cl_poll(parse);
- }
-
- if (GETTIMEOFDAY(&starttime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
-
- selecttime = timeout;
-
- do
- {
- while ((rtc = select(fd + 1, &fdmask, 0, 0, &selecttime)) != 1)
- {
- /* no data from the radio clock */
-
- if (rtc == -1)
- {
- if (errno == EINTR)
- {
- if (GETTIMEOFDAY(&curtime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
- selecttime.tv_sec = curtime.tv_sec - starttime.tv_sec;
- if (curtime.tv_usec < starttime.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + curtime.tv_usec - starttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = curtime.tv_usec - starttime.tv_usec;
- }
-
-
- if (!timercmp(&selecttime, &timeout, >))
- {
- /*
- * calculate residual timeout value
- */
- selecttime.tv_sec = timeout.tv_sec - selecttime.tv_sec;
-
- if (selecttime.tv_usec > timeout.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + timeout.tv_usec - selecttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = timeout.tv_usec - selecttime.tv_usec;
- }
-
- FD_SET(fd, &fdmask);
- continue;
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data from device (select() error: %m)", CL_UNIT(parse->unit));
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data from device", CL_UNIT(parse->unit));
- }
-
- parse->noresponse++;
- parse->lastmissed = current_time;
- parse_event(parse, CEVNT_TIMEOUT);
-
- return;
- }
-
- /*
- * at least 1 character is available - gobble everthing up that is available
- */
- do
- {
- char inbuf[256];
-
- register char *s = inbuf;
-
- rtc = i = read(fd, inbuf, sizeof(inbuf));
-
- get_systime(&ts.fp);
-
- while (i-- > 0)
- {
- if (parse_ioread(&parse->parseio, *s++, &ts))
- {
- /*
- * got something good to eat
- */
- parse_process(parse, &parse->parseio.parse_dtime);
- parse_iodone(&parse->parseio);
- /*
- * done if no more characters are available
- */
- FD_SET(fd, &fdmask);
- if ((i == 0) &&
- (select(fd + 1, &fdmask, 0, 0, &null_time) == 0))
- return;
- }
- }
- FD_SET(fd, &fdmask);
- } while ((rtc = select(fd + 1, &fdmask, 0, 0, &null_time)) == 1);
- FD_SET(fd, &fdmask);
- } while (1);
-}
-
-/*--------------------------------------------------
- * init_iobinding - find and initialize lower layers
- */
-static bind_t *
-init_iobinding(parse)
- struct parseunit *parse;
-{
- register bind_t *b = io_bindings;
-
- while (b->bd_description != (char *)0)
- {
- if ((*b->bd_init)(parse))
- {
- return b;
- }
- b++;
- }
- return (bind_t *)0;
-}
-
-/**===========================================================================
- ** support routines
- **/
-
-/*--------------------------------------------------
- * convert a flag field to a string
- */
-static char *
-parsestate(state, buffer)
- u_long state;
- char *buffer;
-{
- static struct bits
- {
- u_long bit;
- char *name;
- } flagstrings[] =
- {
- { PARSEB_ANNOUNCE, "DST SWITCH WARNING" },
- { PARSEB_POWERUP, "NOT SYNCHRONIZED" },
- { PARSEB_NOSYNC, "TIME CODE NOT CONFIRMED" },
- { PARSEB_DST, "DST" },
- { PARSEB_UTC, "UTC DISPLAY" },
- { PARSEB_LEAPADD, "LEAP ADD WARNING" },
- { PARSEB_LEAPDEL, "LEAP DELETE WARNING" },
- { PARSEB_LEAPSECOND, "LEAP SECOND" },
- { PARSEB_ALTERNATE,"ALTERNATE ANTENNA" },
- { PARSEB_TIMECODE, "TIME CODE" },
- { PARSEB_PPS, "PPS" },
- { PARSEB_POSITION, "POSITION" },
- { 0 }
- };
-
- static struct sbits
- {
- u_long bit;
- char *name;
- } sflagstrings[] =
- {
- { PARSEB_S_LEAP, "LEAP INDICATION" },
- { PARSEB_S_PPS, "PPS SIGNAL" },
- { PARSEB_S_ANTENNA, "ANTENNA" },
- { PARSEB_S_POSITION, "POSITION" },
- { 0 }
- };
- int i;
-
- *buffer = '\0';
-
- i = 0;
- while (flagstrings[i].bit)
- {
- if (flagstrings[i].bit & state)
- {
- if (buffer[0])
- strcat(buffer, "; ");
- strcat(buffer, flagstrings[i].name);
- }
- i++;
- }
-
- if (state & (PARSEB_S_LEAP|PARSEB_S_ANTENNA|PARSEB_S_PPS|PARSEB_S_POSITION))
- {
- register char *s, *t;
-
- if (buffer[0])
- strcat(buffer, "; ");
-
- strcat(buffer, "(");
-
- t = s = buffer + strlen(buffer);
-
- i = 0;
- while (sflagstrings[i].bit)
- {
- if (sflagstrings[i].bit & state)
- {
- if (t != s)
- {
- strcpy(t, "; ");
- t += 2;
- }
-
- strcpy(t, sflagstrings[i].name);
- t += strlen(t);
- }
- i++;
- }
- strcpy(t, ")");
- }
- return buffer;
-}
-
-/*--------------------------------------------------
- * convert a status flag field to a string
- */
-static char *
-parsestatus(state, buffer)
- u_long state;
- char *buffer;
-{
- static struct bits
- {
- u_long bit;
- char *name;
- } flagstrings[] =
- {
- { CVT_OK, "CONVERSION SUCCESSFUL" },
- { CVT_NONE, "NO CONVERSION" },
- { CVT_FAIL, "CONVERSION FAILED" },
- { CVT_BADFMT, "ILLEGAL FORMAT" },
- { CVT_BADDATE, "DATE ILLEGAL" },
- { CVT_BADTIME, "TIME ILLEGAL" },
- { 0 }
- };
- int i;
-
- *buffer = '\0';
-
- i = 0;
- while (flagstrings[i].bit)
- {
- if (flagstrings[i].bit & state)
- {
- if (buffer[0])
- strcat(buffer, "; ");
- strcat(buffer, flagstrings[i].name);
- }
- i++;
- }
-
- return buffer;
-}
-
-/*--------------------------------------------------
- * convert a clock status flag field to a string
- */
-static char *
-clockstatus(state)
- u_long state;
-{
- static char buffer[20];
- static struct status
- {
- u_long value;
- char *name;
- } flagstrings[] =
- {
- { CEVNT_NOMINAL, "NOMINAL" },
- { CEVNT_TIMEOUT, "NO RESPONSE" },
- { CEVNT_BADREPLY,"BAD FORMAT" },
- { CEVNT_FAULT, "FAULT" },
- { CEVNT_PROP, "PROPAGATION DELAY" },
- { CEVNT_BADDATE, "ILLEGAL DATE" },
- { CEVNT_BADTIME, "ILLEGAL TIME" },
- { ~0 }
- };
- int i;
-
- i = 0;
- while (flagstrings[i].value != ~0)
- {
- if (flagstrings[i].value == state)
- {
- return flagstrings[i].name;
- }
- i++;
- }
-
- sprintf(buffer, "unknown #%ld", (u_long)state);
-
- return buffer;
-}
-
-/*--------------------------------------------------
- * mkascii - make a printable ascii string
- * assumes (unless defined better) 7-bit ASCII
- */
-#ifndef isprint
-#define isprint(_X_) (((_X_) > 0x1F) && ((_X_) < 0x7F))
-#endif
-
-static char *
-mkascii(buffer, blen, src, srclen)
- register char *buffer;
- register long blen;
- register char *src;
- register long srclen;
-{
- register char *b = buffer;
- register char *endb = (char *)0;
-
- if (blen < 4)
- return (char *)0; /* don't bother with mini buffers */
-
- endb = buffer + blen - 4;
-
- blen--; /* account for '\0' */
-
- while (blen && srclen--)
- {
- if ((*src != '\\') && isprint(*src))
- { /* printables are easy... */
- *buffer++ = *src++;
- blen--;
- }
- else
- {
- if (blen < 4)
- {
- while (blen--)
- {
- *buffer++ = '.';
- }
- *buffer = '\0';
- return b;
- }
- else
- {
- if (*src == '\\')
- {
- strcpy(buffer,"\\\\");
- buffer += 2;
- blen -= 2;
- }
- else
- {
- sprintf(buffer, "\\x%02x", *src++);
- blen -= 4;
- buffer += 4;
- }
- }
- }
- if (srclen && !blen && endb) /* overflow - set last chars to ... */
- strcpy(endb, "...");
- }
-
- *buffer = '\0';
- return b;
-}
-
-
-/*--------------------------------------------------
- * l_mktime - make representation of a relative time
- */
-static char *
-l_mktime(delta)
- u_long delta;
-{
- u_long tmp, m, s;
- static char buffer[40];
-
- buffer[0] = '\0';
-
- if ((tmp = delta / (60*60*24)) != 0)
- {
- sprintf(buffer, "%ldd+", (u_long)tmp);
- delta -= tmp * 60*60*24;
- }
-
- s = delta % 60;
- delta /= 60;
- m = delta % 60;
- delta /= 60;
-
- sprintf(buffer+strlen(buffer), "%02d:%02d:%02d",
- (int)delta, (int)m, (int)s);
-
- return buffer;
-}
-
-
-/*--------------------------------------------------
- * parse_statistics - list summary of clock states
- */
-static void
-parse_statistics(parse)
- register struct parseunit *parse;
-{
- register int i;
-
- syslog(LOG_INFO, "PARSE receiver #%d: running time: %s",
- CL_UNIT(parse->unit),
- l_mktime(current_time - parse->timestarted));
-
- syslog(LOG_INFO, "PARSE receiver #%d: current status: %s",
- CL_UNIT(parse->unit),
- clockstatus(parse->status));
-
- for (i = 0; i <= CEVNT_MAX; i++)
- {
- register u_long stime;
- register u_long percent, div = current_time - parse->timestarted;
-
- percent = stime = PARSE_STATETIME(parse, i);
-
- while (((u_long)(~0) / 10000) < percent)
- {
- percent /= 10;
- div /= 10;
- }
-
- if (div)
- percent = (percent * 10000) / div;
- else
- percent = 10000;
-
- if (stime)
- syslog(LOG_INFO, "PARSE receiver #%d: state %18s: %13s (%3d.%02d%%)",
- CL_UNIT(parse->unit),
- clockstatus(i),
- l_mktime(stime),
- percent / 100, percent % 100);
- }
-}
-
-/*--------------------------------------------------
- * cparse_statistics - wrapper for statistics call
- */
-static void
-cparse_statistics(peer)
- register struct peer *peer;
-{
- register struct parseunit *parse = (struct parseunit *)peer;
-
- parse_statistics(parse);
- parse->stattimer.event_time = current_time + PARSESTATISTICS;
- TIMER_ENQUEUE(timerqueue, &parse->stattimer);
-}
-
-/**===========================================================================
- ** xntp interface routines
- **/
-
-/*--------------------------------------------------
- * parse_init - initialize internal parse driver data
- */
-static void
-parse_init()
-{
- memset((caddr_t)parseunits, 0, sizeof parseunits);
-}
-
-
-/*--------------------------------------------------
- * parse_shutdown - shut down a PARSE clock
- */
-static void
-parse_shutdown(unit)
- int unit;
-{
- register struct parseunit *parse;
-
- unit = CL_UNIT(unit);
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR,
- "PARSE receiver #%d: parse_shutdown: INTERNAL ERROR, unit invalid (max %d)",
- unit,MAXUNITS);
- return;
- }
-
- parse = parseunits[unit];
-
- if (parse && !parse->peer) {
- syslog(LOG_ERR,
- "PARSE receiver #%d: parse_shutdown: INTERNAL ERROR, unit not in use", unit);
- return;
- }
-
- /*
- * print statistics a last time and
- * stop statistics machine
- */
- parse_statistics(parse);
- TIMER_DEQUEUE(&parse->stattimer);
-
-#if PPSPPS
- {
- /*
- * kill possible PPS association
- */
- if (fdpps == parse->fd)
- fdpps = -1;
- }
-#endif
-
- if (parse->parse_type->cl_end)
- {
- parse->parse_type->cl_end(parse);
- }
-
- if (parse->binding)
- PARSE_END(parse);
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- if (!parse->pollonly)
- io_closeclock(&parse->io);
- else
- (void) close(parse->fd);
-
- syslog(LOG_INFO, "PARSE receiver #%d: reference clock \"%s\" removed",
- CL_UNIT(parse->unit), parse->parse_type->cl_description);
-
- parse->peer = (struct peer *)0; /* unused now */
-}
-
-/*--------------------------------------------------
- * parse_start - open the PARSE devices and initialize data for processing
- */
-static int
-parse_start(sysunit, peer)
- u_int sysunit;
- struct peer *peer;
-{
- u_int unit;
- int fd232, i;
-#ifdef HAVE_TERMIOS
- struct termios tm; /* NEEDED FOR A LONG TIME ! */
-#endif
-#ifdef HAVE_SYSV_TTYS
- struct termio tm; /* NEEDED FOR A LONG TIME ! */
-#endif
- struct parseunit * parse;
- char parsedev[sizeof(PARSEDEVICE)+20];
- parsectl_t tmp_ctl;
- u_int type;
-
- type = CL_TYPE(sysunit);
- unit = CL_UNIT(sysunit);
-
- if (unit >= MAXUNITS)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: unit number invalid (max %d)",
- unit, MAXUNITS-1);
- return 0;
- }
-
- if ((type == ~0) || (clockinfo[type].cl_description == (char *)0))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: unsupported clock type %d (max %d)",
- unit, CL_REALTYPE(sysunit), ncltypes-1);
- return 0;
- }
-
- if (parseunits[unit] && parseunits[unit]->peer)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: unit in use", unit);
- return 0;
- }
-
- /*
- * Unit okay, attempt to open the device.
- */
- (void) sprintf(parsedev, PARSEDEVICE, unit);
-
-#ifndef O_NOCTTY
-#define O_NOCTTY 0
-#endif
-
- fd232 = open(parsedev, O_RDWR|O_NOCTTY, 0777);
- if (fd232 == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: open of %s failed: %m", unit, parsedev);
- return 0;
- }
-
- /*
- * Looks like this might succeed. Find memory for the structure.
- * Look to see if there are any unused ones, if not we malloc()
- * one.
- */
- if (parseunits[unit])
- {
- parse = parseunits[unit]; /* The one we want is okay - and free */
- }
- else
- {
- for (i = 0; i < MAXUNITS; i++)
- {
- if (parseunits[i] && !parseunits[i]->peer)
- break;
- }
- if (i < MAXUNITS)
- {
- /*
- * Reclaim this one
- */
- parse = parseunits[i];
- parseunits[i] = (struct parseunit *)0;
- }
- else
- {
- parse = (struct parseunit *)
- emalloc(sizeof(struct parseunit));
- }
- }
-
- memset((char *)parse, 0, sizeof(struct parseunit));
- parseunits[unit] = parse;
-
- /*
- * Set up the structures
- */
- parse->unit = (u_char)sysunit;
- parse->timestarted = current_time;
- parse->lastchange = current_time;
- /*
- * we want to filter input for the sake of
- * getting an impression on dispersion
- * also we like to average the median range
- */
- parse->flags = PARSE_STAT_FILTER|PARSE_STAT_AVG;
- parse->pollneeddata = 0;
- parse->pollonly = 1; /* go for default polling mode */
- parse->lastformat = ~0; /* assume no format known */
- parse->status = CEVNT_TIMEOUT; /* expect the worst */
- parse->laststatus = ~0; /* be sure to mark initial status change */
- parse->nosynctime = 0; /* assume clock reasonable */
- parse->lastmissed = 0; /* assume got everything */
- parse->ppsserial = 0;
- parse->localdata = (void *)0;
-
- parse->parse_type = &clockinfo[type];
-
- parse->basedelay.l_ui = 0; /* we can only pre-configure delays less than 1 second */
- parse->basedelay.l_uf = parse->parse_type->cl_basedelay;
-
- parse->ppsdelay.l_ui = 0; /* we can only pre-configure delays less than 1 second */
- parse->ppsdelay.l_uf = parse->parse_type->cl_ppsdelay;
-
- peer->rootdelay = parse->parse_type->cl_rootdelay;
- peer->sstclktype = parse->parse_type->cl_type;
- peer->precision = sys_precision;
- peer->stratum = STRATUM_REFCLOCK;
- if (peer->stratum <= 1)
- memmove((char *)&peer->refid, parse->parse_type->cl_id, 4);
- else
- peer->refid = htonl(PARSEHSREFID);
-
- parse->fd = fd232;
-
- parse->peer = peer; /* marks it also as busy */
-
- parse->binding = init_iobinding(parse);
-
- if (parse->binding == (bind_t *)0)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: io sub system initialisation failed.");
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
- /*
- * configure terminal line
- */
- if (TTY_GETATTR(fd232, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcgetattr(%d, &tm): %m", unit, fd232);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0;
- }
- else
- {
-#ifndef _PC_VDISABLE
- memset((char *)tm.c_cc, 0, sizeof(tm.c_cc));
-#else
- int disablec;
- errno = 0; /* pathconf can deliver -1 without changing errno ! */
-
- disablec = fpathconf(parse->fd, _PC_VDISABLE);
- if (disablec == -1 && errno)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: fpathconf(fd, _PC_VDISABLE): %m", CL_UNIT(parse->unit));
- memset((char *)tm.c_cc, 0, sizeof(tm.c_cc)); /* best guess */
- }
- else
- if (disablec != -1)
- memset((char *)tm.c_cc, disablec, sizeof(tm.c_cc));
-#endif
-
- tm.c_cflag = clockinfo[type].cl_cflag;
- tm.c_iflag = clockinfo[type].cl_iflag;
- tm.c_oflag = clockinfo[type].cl_oflag;
- tm.c_lflag = clockinfo[type].cl_lflag;
-
- if (TTY_SETATTR(fd232, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcsetattr(%d, &tm): %m", unit, fd232);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0;
- }
- }
-
- /*
- * as we always(?) get 8 bit chars we want to be
- * sure, that the upper bits are zero for less
- * than 8 bit I/O - so we pass that information on.
- * note that there can be only one bit count format
- * per file descriptor
- */
-
- switch (tm.c_cflag & CSIZE)
- {
- case CS5:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS5;
- break;
-
- case CS6:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS6;
- break;
-
- case CS7:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS7;
- break;
-
- case CS8:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS8;
- break;
- }
-
- if (!PARSE_SETCS(parse, &tmp_ctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_setcs() FAILED.", unit);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
- strcpy(tmp_ctl.parseformat.parse_buffer, parse->parse_type->cl_format);
- tmp_ctl.parseformat.parse_count = strlen(tmp_ctl.parseformat.parse_buffer);
-
- if (!PARSE_SETFMT(parse, &tmp_ctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_setfmt() FAILED.", unit);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
-#ifdef TCFLSH
- /*
- * get rid of all IO accumulated so far
- */
- {
-#ifndef TCIOFLUSH
-#define TCIOFLUSH 2
-#endif
- int flshcmd = TCIOFLUSH;
-
- (void) ioctl(parse->fd, TCFLSH, (caddr_t)&flshcmd);
- }
-#endif
-
- tmp_ctl.parsestatus.flags = parse->flags & PARSE_STAT_FLAGS;
-
- if (!PARSE_SETSTAT(parse, &tmp_ctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_setstat() FAILED.", unit);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
- /*
- * try to do any special initializations
- */
- if (parse->parse_type->cl_init)
- {
- if (parse->parse_type->cl_init(parse))
- {
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
- }
-
- if (!(parse->parse_type->cl_flags & PARSE_F_POLLONLY) &&
- (CL_PPS(parse->unit) || (parse->parse_type->cl_flags & PARSE_F_NOPOLLONLY)))
- {
- /*
- * Insert in async io device list.
- */
- parse->io.clock_recv = parse->binding->bd_receive; /* pick correct receive routine */
- parse->io.srcclock = (caddr_t)parse;
- parse->io.datalen = 0;
- parse->io.fd = parse->fd; /* replicated, but what the heck */
- if (!io_addclock(&parse->io))
- {
- if (parse->parse_type->cl_flags & PARSE_F_NOPOLLONLY)
- {
- syslog(LOG_ERR,
- "PARSE receiver #%d: parse_start: addclock %s fails (ABORT - clock type requires async io)", CL_UNIT(parse->unit), parsedev);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0;
- }
- else
- {
- syslog(LOG_ERR,
- "PARSE receiver #%d: parse_start: addclock %s fails (switching to polling mode)", CL_UNIT(parse->unit), parsedev);
- }
- }
- else
- {
- parse->pollonly = 0; /*
- * update at receipt of time_stamp - also
- * supports PPS processing
- */
- }
- }
-
-#ifdef PPSPPS
- if (parse->pollonly && (parse->parse_type->cl_flags & PARSE_F_PPSPPS))
- {
- if (fdpps == -1)
- {
- fdpps = parse->fd;
- if (!PARSE_DISABLE(parse))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_disable() FAILED", CL_UNIT(parse->unit));
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0;
- }
- }
- else
- {
- syslog(LOG_NOTICE, "PARSE receiver #%d: parse_start: loopfilter PPS already active - no PPS via CIOGETEV", CL_UNIT(parse->unit));
- }
- }
-#endif
-
- /*
- * wind up statistics timer
- */
- parse->stattimer.peer = (struct peer *)parse; /* we know better, but what the heck */
- parse->stattimer.event_handler = cparse_statistics;
- parse->stattimer.event_time = current_time + PARSESTATISTICS;
- TIMER_ENQUEUE(timerqueue, &parse->stattimer);
-
- /*
- * get out Copyright information once
- */
- if (!notice)
- {
- syslog(LOG_INFO, "NTP PARSE support: Copyright (c) 1989-1993, Frank Kardel");
- notice = 1;
- }
-
- /*
- * print out configuration
- */
- syslog(LOG_INFO, "PARSE receiver #%d: reference clock \"%s\" (device %s) added",
- CL_UNIT(parse->unit),
- parse->parse_type->cl_description, parsedev);
-
- syslog(LOG_INFO, "PARSE receiver #%d: Stratum %d, %sPPS support, trust time %s, precision %d",
- CL_UNIT(parse->unit),
- parse->peer->stratum, (parse->pollonly || !CL_PPS(parse->unit)) ? "no " : "",
- l_mktime(parse->parse_type->cl_maxunsync), parse->peer->precision);
-
- syslog(LOG_INFO, "PARSE receiver #%d: rootdelay %s s, phaseadjust %s s, %s IO handling",
- CL_UNIT(parse->unit),
- ufptoa(parse->parse_type->cl_rootdelay, 6),
- lfptoa(&parse->basedelay, 8),
- parse->binding->bd_description);
-
- syslog(LOG_INFO, "PARSE receiver #%d: Format recognition: %s", CL_UNIT(parse->unit),
- !(*parse->parse_type->cl_format) ? "<AUTOMATIC>" : parse->parse_type->cl_format);
-
-#ifdef PPSPPS
- syslog(LOG_INFO, "PARSE receiver #%d: %sCD PPS support",
- CL_UNIT(parse->unit),
- (fdpps == parse->fd) ? "" : "NO ");
-#endif
-
- return 1;
-}
-
-/*--------------------------------------------------
- * parse_poll - called by the transmit procedure
- */
-static void
-parse_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- register struct parseunit *parse;
-
- unit = CL_UNIT(unit);
-
- if (unit >= MAXUNITS)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: poll: INTERNAL: unit invalid",
- unit);
- return;
- }
-
- parse = parseunits[unit];
-
- if (!parse->peer)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: poll: INTERNAL: unit unused",
- unit);
- return;
- }
-
- if (peer != parse->peer)
- {
- syslog(LOG_ERR,
- "PARSE receiver #%d: poll: INTERNAL: peer incorrect",
- unit);
- return;
- }
-
- /*
- * Update clock stat counters
- */
- parse->polls++;
-
- /*
- * in PPS mode we just mark that we want the next sample
- * for the clock filter
- */
- if (!parse->pollonly)
- {
- if (parse->pollneeddata)
- {
- /*
- * bad news - didn't get a response last time
- */
- parse->noresponse++;
- parse->lastmissed = current_time;
- parse_event(parse, CEVNT_TIMEOUT);
-
- syslog(LOG_WARNING, "PARSE receiver #%d: no data from device within poll interval", CL_UNIT(parse->unit));
- }
- parse->pollneeddata = 1;
- if (parse->parse_type->cl_poll)
- {
- parse->parse_type->cl_poll(parse);
- }
- return;
- }
-
- /*
- * the following code is only executed only when polling is used
- */
-
- PARSE_POLL(parse);
-}
-
-/*--------------------------------------------------
- * parse_leap - called when a leap second occurs
- */
-
-static void
-parse_leap()
-{
- /*
- * PARSE encodes the LEAP correction direction.
- * For timecodes that do not pass on the leap correction direction
- * the default PARSEB_LEAPADD must be used. It may then be modified
- * with a fudge flag (flag2).
- */
-}
-
-
-/*--------------------------------------------------
- * parse_control - set fudge factors, return statistics
- */
-static void
-parse_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct parseunit *parse;
- parsectl_t tmpctl;
- u_long type;
- static char outstatus[400]; /* status output buffer */
-
- type = CL_TYPE(unit);
- unit = CL_UNIT(unit);
-
- if (out)
- {
- out->lencode = 0;
- out->lastcode = 0;
- out->polls = out->noresponse = 0;
- out->badformat = out->baddata = 0;
- out->timereset = 0;
- out->currentstatus = out->lastevent = CEVNT_NOMINAL;
- out->kv_list = (struct ctl_var *)0;
- }
-
- if (unit >= MAXUNITS)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_control: unit invalid (max %d)",
- unit, MAXUNITS-1);
- return;
- }
-
- parse = parseunits[unit];
-
- if (!parse || !parse->peer)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_control: unit invalid (UNIT INACTIVE)",
- unit);
- return;
- }
-
- if (in)
- {
- if (in->haveflags & CLK_HAVETIME1)
- parse->basedelay = in->fudgetime1;
-
- if (in->haveflags & CLK_HAVETIME2)
- {
- parse->ppsdelay = in->fudgetime2;
- }
-
- if (in->haveflags & CLK_HAVEVAL1)
- {
- parse->peer->stratum = (u_char)(in->fudgeval1 & 0xf);
- if (parse->peer->stratum <= 1)
- memmove((char *)&parse->peer->refid,
- parse->parse_type->cl_id,
- 4);
- else
- parse->peer->refid = htonl(PARSEHSREFID);
- }
-
- if (in->haveflags & CLK_HAVEVAL2)
- {
- parse->peer->refid = in->fudgeval2;
- }
-
- if (in->haveflags & (CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4))
- {
- parse->flags = (in->flags & (CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4)) |
- (parse->flags & ~PARSE_STAT_FLAGS);
- }
-
- if (in->haveflags & (CLK_HAVEVAL2|CLK_HAVETIME2|CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4))
- {
- parsectl_t tmpctl;
- tmpctl.parsestatus.flags = parse->flags & PARSE_STAT_FLAGS;
-
- if (!PARSE_SETSTAT(parse, &tmpctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_control: parse_setstat() FAILED", unit);
- }
- }
- }
-
- if (out)
- {
- register u_long sum = 0;
- register char *t, *tt;
- register struct tm *tm;
- register short utcoff;
- register char sign;
- register int i;
- time_t tim;
-
- outstatus[0] = '\0';
-
- out->haveflags = CLK_HAVETIME1|CLK_HAVETIME2|CLK_HAVEVAL1|CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3;
- out->clockdesc = parse->parse_type->cl_description;
-
- out->fudgetime1 = parse->basedelay;
-
- out->fudgetime2 = parse->ppsdelay;
-
- out->fudgeval1 = parse->peer->stratum;
-
- out->fudgeval2 = parse->peer->refid;
-
- out->flags = parse->flags & PARSE_STAT_FLAGS;
-
- out->type = REFCLK_PARSE;
-
- /*
- * figure out skew between PPS and RS232 - just for informational
- * purposes - returned in time2 value
- */
- if (PARSE_SYNC(parse->time.parse_state))
- {
- if (PARSE_PPS(parse->time.parse_state) && PARSE_TIMECODE(parse->time.parse_state))
- {
- l_fp off;
-
- /*
- * we have a PPS and RS232 signal - calculate the skew
- * WARNING: assumes on TIMECODE == PULSE (timecode after pulse)
- */
- off = parse->time.parse_stime.fp;
- L_SUB(&off, &parse->time.parse_ptime.fp); /* true offset */
- tt = add_var(&out->kv_list, 40, RO);
- sprintf(tt, "refclock_ppsskew=%s", lfptoms(&off, 6));
- }
- }
-
- if (PARSE_PPS(parse->time.parse_state))
- {
- tt = add_var(&out->kv_list, 80, RO|DEF);
- sprintf(tt, "refclock_ppstime=\"%s\"", prettydate(&parse->time.parse_ptime.fp));
- }
-
- /*
- * all this for just finding out the +-xxxx part (there are always
- * new and changing fields in the standards 8-().
- *
- * but we do it for the human user...
- */
- tim = parse->time.parse_time.fp.l_ui - JAN_1970;
- tm = gmtime(&tim);
- utcoff = tm->tm_hour * 60 + tm->tm_min;
- tm = localtime(&tim);
- utcoff = tm->tm_hour * 60 + tm->tm_min - utcoff + 12 * 60;
- utcoff += 24 * 60;
- utcoff %= 24 * 60;
- utcoff -= 12 * 60;
- if (utcoff < 0)
- {
- utcoff = -utcoff;
- sign = '-';
- }
- else
- {
- sign = '+';
- }
-
- tt = add_var(&out->kv_list, 128, RO|DEF);
- sprintf(tt, "refclock_time=\"");
- tt += strlen(tt);
-
- if (parse->time.parse_time.fp.l_ui == 0)
- {
- strcpy(tt, "<UNDEFINED>\"");
- }
- else
- {
- strcpy(tt, prettydate(&parse->time.parse_time.fp));
- t = tt + strlen(tt);
-
- sprintf(t, " (%c%02d%02d)\"", sign, utcoff / 60, utcoff % 60);
- }
-
- if (!PARSE_GETTIMECODE(parse, &tmpctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_control: parse_timecode() FAILED", unit);
- }
- else
- {
- tt = add_var(&out->kv_list, 128, RO|DEF);
- sprintf(tt, "refclock_status=\"");
- tt += strlen(tt);
-
- /*
- * copy PPS flags from last read transaction (informational only)
- */
- tmpctl.parsegettc.parse_state |= parse->time.parse_state &
- (PARSEB_PPS|PARSEB_S_PPS);
-
- (void) parsestate(tmpctl.parsegettc.parse_state, tt);
-
- strcat(tt, "\"");
-
- if (tmpctl.parsegettc.parse_count)
- mkascii(outstatus+strlen(outstatus), sizeof(outstatus)- strlen(outstatus) - 1,
- tmpctl.parsegettc.parse_buffer, tmpctl.parsegettc.parse_count - 1);
-
- parse->badformat += tmpctl.parsegettc.parse_badformat;
- }
-
- tmpctl.parseformat.parse_format = tmpctl.parsegettc.parse_format;
-
- if (!PARSE_GETFMT(parse, &tmpctl))
- {
- syslog (LOG_ERR, "PARSE receiver #%d: parse_control: parse_getfmt() FAILED", unit);
- }
- else
- {
- tt = add_var(&out->kv_list, 80, RO|DEF);
- sprintf(tt, "refclock_format=\"");
-
- strncat(tt, tmpctl.parseformat.parse_buffer, tmpctl.parseformat.parse_count);
- strcat(tt,"\"");
- }
-
- /*
- * gather state statistics
- */
-
- tt = add_var(&out->kv_list, 200, RO|DEF);
- strcpy(tt, "refclock_states=\"");
- tt += strlen(tt);
-
- for (i = 0; i <= CEVNT_MAX; i++)
- {
- register u_long stime;
- register u_long div = current_time - parse->timestarted;
- register u_long percent;
-
- percent = stime = PARSE_STATETIME(parse, i);
-
- while (((u_long)(~0) / 10000) < percent)
- {
- percent /= 10;
- div /= 10;
- }
-
- if (div)
- percent = (percent * 10000) / div;
- else
- percent = 10000;
-
- if (stime)
- {
- sprintf(tt, "%s%s%s: %s (%d.%02d%%)",
- sum ? "; " : "",
- (parse->status == i) ? "*" : "",
- clockstatus(i),
- l_mktime(stime),
- (int)(percent / 100), (int)(percent % 100));
- sum += stime;
- tt += strlen(tt);
- }
- }
-
- sprintf(tt, "; running time: %s\"", l_mktime(sum));
-
- tt = add_var(&out->kv_list, 32, RO);
- sprintf(tt, "refclock_id=\"%s\"", parse->parse_type->cl_id);
-
- tt = add_var(&out->kv_list, 80, RO);
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
- sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.59 1994/05/23 16:29:27 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
- out->timereset = parse->timestarted;
- out->polls = parse->polls;
- out->noresponse = parse->noresponse;
- out->badformat = parse->badformat;
- out->baddata = parse->baddata;
- out->lastevent = parse->lastevent;
- out->currentstatus = parse->status;
- }
-}
-
-/**===========================================================================
- ** processing routines
- **/
-
-/*--------------------------------------------------
- * event handling - note that nominal events will also be posted
- */
-static void
-parse_event(parse, event)
- struct parseunit *parse;
- int event;
-{
- if (parse->status != (u_char) event)
- {
- parse->statetime[parse->status] += current_time - parse->lastchange;
- parse->lastchange = current_time;
-
- parse->status = (u_char)event;
- if (event != CEVNT_NOMINAL)
- parse->lastevent = parse->status;
-
- report_event(EVNT_PEERCLOCK, parse->peer);
- }
-}
-
-/*--------------------------------------------------
- * process a PARSE time sample
- */
-static void
-parse_process(parse, parsetime)
- struct parseunit *parse;
- parsetime_t *parsetime;
-{
- unsigned char leap;
- struct timeval usecdisp;
- l_fp off, rectime, reftime, dispersion;
-
- /*
- * check for changes in conversion status
- * (only one for each new status !)
- */
- if (parse->laststatus != parsetime->parse_status)
- {
- char buffer[200];
-
- syslog(LOG_WARNING, "PARSE receiver #%d: conversion status \"%s\"",
- CL_UNIT(parse->unit), parsestatus(parsetime->parse_status, buffer));
-
- if ((parsetime->parse_status & CVT_MASK) == CVT_FAIL)
- {
- /*
- * tell more about the story - list time code
- * there is a slight change for a race condition and
- * the time code might be overwritten by the next packet
- */
- parsectl_t tmpctl;
-
- if (!PARSE_GETTIMECODE(parse, &tmpctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_process: parse_timecode() FAILED", CL_UNIT(parse->unit));
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: FAILED TIMECODE: \"%s\"",
- CL_UNIT(parse->unit), mkascii(buffer, sizeof buffer, tmpctl.parsegettc.parse_buffer, tmpctl.parsegettc.parse_count - 1));
- parse->badformat += tmpctl.parsegettc.parse_badformat;
- }
- }
-
- parse->laststatus = parsetime->parse_status;
- }
-
- /*
- * examine status and post appropriate events
- */
- if ((parsetime->parse_status & CVT_MASK) != CVT_OK)
- {
- /*
- * got bad data - tell the rest of the system
- */
- switch (parsetime->parse_status & CVT_MASK)
- {
- case CVT_NONE:
- break; /* well, still waiting - timeout is handled at higher levels */
-
- case CVT_FAIL:
- parse->badformat++;
- if (parsetime->parse_status & CVT_BADFMT)
- {
- parse_event(parse, CEVNT_BADREPLY);
- }
- else
- if (parsetime->parse_status & CVT_BADDATE)
- {
- parse_event(parse, CEVNT_BADDATE);
- }
- else
- if (parsetime->parse_status & CVT_BADTIME)
- {
- parse_event(parse, CEVNT_BADTIME);
- }
- else
- {
- parse_event(parse, CEVNT_BADREPLY); /* for the lack of something better */
- }
- }
- return; /* skip the rest - useless */
- }
-
- /*
- * check for format changes
- * (in case somebody has swapped clocks 8-)
- */
- if (parse->lastformat != parsetime->parse_format)
- {
- parsectl_t tmpctl;
-
- tmpctl.parseformat.parse_format = parsetime->parse_format;
-
- if (!PARSE_GETFMT(parse, &tmpctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_getfmt() FAILED", CL_UNIT(parse->unit));
- }
- else
- {
- syslog(LOG_INFO, "PARSE receiver #%d: new packet format \"%s\"",
- CL_UNIT(parse->unit), tmpctl.parseformat.parse_buffer);
- }
- parse->lastformat = parsetime->parse_format;
- }
-
- /*
- * now, any changes ?
- */
- if (parse->time.parse_state != parsetime->parse_state)
- {
- char tmp1[200];
- char tmp2[200];
- /*
- * something happend
- */
-
- (void) parsestate(parsetime->parse_state, tmp1);
- (void) parsestate(parse->time.parse_state, tmp2);
-
- syslog(LOG_INFO,"PARSE receiver #%d: STATE CHANGE: %s -> %s",
- CL_UNIT(parse->unit), tmp2, tmp1);
- }
-
- /*
- * remember for future
- */
- parse->time = *parsetime;
-
- /*
- * check to see, whether the clock did a complete powerup or lost PZF signal
- * and post correct events for current condition
- */
- if (PARSE_POWERUP(parsetime->parse_state))
- {
- /*
- * this is bad, as we have completely lost synchronisation
- * well this is a problem with the receiver here
- * for PARSE U/A 31 the lost synchronisation ist true
- * as it is the powerup state and the time is taken
- * from a crude real time clock chip
- * for the PZF series this is only partly true, as
- * PARSE_POWERUP only means that the pseudo random
- * phase shift sequence cannot be found. this is only
- * bad, if we have never seen the clock in the SYNC
- * state, where the PHASE and EPOCH are correct.
- * for reporting events the above business does not
- * really matter, but we can use the time code
- * even in the POWERUP state after having seen
- * the clock in the synchronized state (PZF class
- * receivers) unless we have had a telegram disruption
- * after having seen the clock in the SYNC state. we
- * thus require having seen the clock in SYNC state
- * *after* having missed telegrams (noresponse) from
- * the clock. one problem remains: we might use erroneously
- * POWERUP data if the disruption is shorter than 1 polling
- * interval. fortunately powerdowns last usually longer than 64
- * seconds and the receiver is at least 2 minutes in the
- * POWERUP or NOSYNC state before switching to SYNC
- */
- parse_event(parse, CEVNT_FAULT);
- if (parse->nosynctime)
- {
- /*
- * repeated POWERUP/NOSYNC state - look whether
- * the message should be repeated
- */
- if (current_time - parse->nosynctime > PARSENOSYNCREPEAT)
- {
- syslog(LOG_ERR,"PARSE receiver #%d: *STILL* NOT SYNCHRONIZED (POWERUP or no PZF signal)",
- CL_UNIT(parse->unit));
- parse->nosynctime = current_time;
- }
- }
- else
- {
- syslog(LOG_ERR,"PARSE receiver #%d: NOT SYNCHRONIZED",
- CL_UNIT(parse->unit));
- parse->nosynctime = current_time;
- }
- }
- else
- {
- /*
- * we have two states left
- *
- * SYNC:
- * this state means that the EPOCH (timecode) and PHASE
- * information has be read correctly (at least two
- * successive PARSE timecodes were received correctly)
- * this is the best possible state - full trust
- *
- * NOSYNC:
- * The clock should be on phase with respect to the second
- * signal, but the timecode has not been received correctly within
- * at least the last two minutes. this is a sort of half baked state
- * for PARSE U/A 31 this is bad news (clock running without timecode
- * confirmation)
- * PZF 535 has also no time confirmation, but the phase should be
- * very precise as the PZF signal can be decoded
- */
- parse->nosynctime = 0; /* current state is better than worst state */
-
- if (PARSE_SYNC(parsetime->parse_state))
- {
- /*
- * currently completely synchronized - best possible state
- */
- parse->lastsync = current_time;
- /*
- * log OK status
- */
- parse_event(parse, CEVNT_NOMINAL);
- }
- else
- {
- /*
- * we have had some problems receiving the time code
- */
- parse_event(parse, CEVNT_PROP);
- }
- }
-
- if (PARSE_TIMECODE(parsetime->parse_state))
- {
- l_fp offset;
-
- /*
- * calculate time offset including systematic delays
- * off = PARSE-timestamp + propagation delay - kernel time stamp
- */
- offset = parse->basedelay;
-
- off = parsetime->parse_time.fp;
-
- reftime = off;
-
- L_ADD(&off, &offset);
- rectime = off; /* this makes org time and xmt time somewhat artificial */
-
- L_SUB(&off, &parsetime->parse_stime.fp);
-
- if ((parse->flags & PARSE_STAT_FILTER) &&
- (off.l_i > -60) &&
- (off.l_i < 60)) /* take usec error only if within +- 60 secs */
- {
- struct timeval usecerror;
- /*
- * offset is already calculated
- */
- usecerror.tv_sec = parsetime->parse_usecerror / 1000000;
- usecerror.tv_usec = parsetime->parse_usecerror % 1000000;
-
- sTVTOTS(&usecerror, &off);
- L_ADD(&off, &offset);
- }
- }
-
- if (PARSE_PPS(parsetime->parse_state) && CL_PPS(parse->unit))
- {
- l_fp offset;
-
- /*
- * we have a PPS signal - much better than the RS232 stuff (we hope)
- */
- offset = parsetime->parse_ptime.fp;
-
- L_ADD(&offset, &parse->ppsdelay);
-
- if (PARSE_TIMECODE(parsetime->parse_state))
- {
- if (M_ISGEQ(off.l_i, off.l_f, -1, 0x80000000) &&
- M_ISGEQ(0, 0x7fffffff, off.l_i, off.l_f))
- {
- /*
- * RS232 offsets within [-0.5..0.5[ - take PPS offsets
- */
-
- if (parse->parse_type->cl_flags & PARSE_F_PPSONSECOND)
- {
- reftime = off = offset;
- rectime = offset;
- /*
- * implied on second offset
- */
- off.l_uf = ~off.l_uf; /* map [0.5..1[ -> [-0.5..0[ */
- off.l_ui = (off.l_f < 0) ? ~0 : 0; /* sign extend */
- }
- else
- {
- /*
- * time code describes pulse
- */
- off = parsetime->parse_time.fp;
-
- rectime = reftime = off; /* take reference time - fake rectime */
-
- L_SUB(&off, &offset); /* true offset */
- }
- }
- /*
- * take RS232 offset when PPS when out of bounds
- */
- }
- else
- {
- /*
- * Well, no time code to guide us - assume on second pulse
- * and pray, that we are within [-0.5..0.5[
- */
- reftime = off = offset;
- rectime = offset;
- /*
- * implied on second offset
- */
- off.l_uf = ~off.l_uf; /* map [0.5..1[ -> [-0.5..0[ */
- off.l_ui = (off.l_f < 0) ? ~0 : 0; /* sign extend */
- }
- }
- else
- {
- if (!PARSE_TIMECODE(parsetime->parse_state))
- {
- /*
- * Well, no PPS, no TIMECODE, no more work ...
- */
- return;
- }
- }
-
-
-#if defined(PPS) || defined(PPSCLK) || defined(PPSPPS) || defined(PARSEPPS)
- if (CL_PPS(parse->unit) && !parse->pollonly && PARSE_SYNC(parsetime->parse_state))
- {
- /*
- * only provide PPS information when clock
- * is in sync
- * thus PHASE and EPOCH are correct and PPS is not
- * done via the CIOGETEV loopfilter mechanism
- */
-#ifdef PPSPPS
- if (fdpps != parse->fd)
-#endif
- (void) pps_sample(&off);
- }
-#endif /* PPS || PPSCLK || PPSPPS || PARSEPPS */
-
- /*
- * ready, unless the machine wants a sample
- */
- if (!parse->pollonly && !parse->pollneeddata)
- return;
-
- parse->pollneeddata = 0;
-
- if (PARSE_PPS(parsetime->parse_state))
- {
- L_CLR(&dispersion);
- }
- else
- {
- /*
- * convert usec dispersion into NTP TS world
- */
-
- usecdisp.tv_sec = parsetime->parse_usecdisp / 1000000;
- usecdisp.tv_usec = parsetime->parse_usecdisp % 1000000;
-
- TVTOTS(&usecdisp, &dispersion);
- }
-
- /*
- * and now stick it into the clock machine
- * samples are only valid iff lastsync is not too old and
- * we have seen the clock in sync at least once
- * after the last time we didn't see an expected data telegram
- * see the clock states section above for more reasoning
- */
- if (((current_time - parse->lastsync) > parse->parse_type->cl_maxunsync) ||
- (parse->lastsync <= parse->lastmissed))
- {
- leap = LEAP_NOTINSYNC;
- }
- else
- {
- if (PARSE_LEAPADD(parsetime->parse_state))
- {
- /*
- * we pick this state also for time code that pass leap warnings
- * without direction information (as earth is currently slowing
- * down).
- */
- leap = (parse->flags & PARSE_LEAP_DELETE) ? LEAP_DELSECOND : LEAP_ADDSECOND;
- }
- else
- if (PARSE_LEAPDEL(parsetime->parse_state))
- {
- leap = LEAP_DELSECOND;
- }
- else
- {
- leap = LEAP_NOWARNING;
- }
- }
-
- refclock_receive(parse->peer, &off, 0, LFPTOFP(&dispersion), &reftime, &rectime, leap);
-}
-
-/**===========================================================================
- ** clock polling support
- **/
-
-struct poll_timer
-{
- struct event timer; /* we'd like to poll a a higher rate than 1/64s */
-};
-
-typedef struct poll_timer poll_timer_t;
-
-/*--------------------------------------------------
- * direct poll routine
- */
-static void
-poll_dpoll(parse)
- struct parseunit *parse;
-{
- register int rtc;
- register char *ps = ((poll_info_t *)parse->parse_type->cl_data)->string;
- register int ct = ((poll_info_t *)parse->parse_type->cl_data)->count;
-
- rtc = write(parse->fd, ps, ct);
- if (rtc < 0)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd to clock: %m", CL_UNIT(parse->unit));
- }
- else
- if (rtc != ct)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd incomplete (%d of %d bytes sent)", CL_UNIT(parse->unit), rtc, ct);
- }
-}
-
-/*--------------------------------------------------
- * periodic poll routine
- */
-static void
-poll_poll(parse)
- struct parseunit *parse;
-{
- register poll_timer_t *pt = (poll_timer_t *)parse->localdata;
-
- poll_dpoll(parse);
-
- if (pt != (poll_timer_t *)0)
- {
- pt->timer.event_time = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
- TIMER_ENQUEUE(timerqueue, &pt->timer);
- }
-}
-
-/*--------------------------------------------------
- * init routine - setup timer
- */
-static int
-poll_init(parse)
- struct parseunit *parse;
-{
- register poll_timer_t *pt;
-
- if (((poll_info_t *)parse->parse_type->cl_data)->rate)
- {
- parse->localdata = (void *)malloc(sizeof(poll_timer_t));
- memset((char *)parse->localdata, 0, sizeof(poll_timer_t));
-
- pt = (poll_timer_t *)parse->localdata;
-
- pt->timer.peer = (struct peer *)parse; /* well, only we know what it is */
- pt->timer.event_handler = poll_poll;
- poll_poll(parse);
- }
- else
- {
- parse->localdata = (void *)0;
- }
-
- return 0;
-}
-
-/*--------------------------------------------------
- * end routine - clean up timer
- */
-static void
-poll_end(parse)
- struct parseunit *parse;
-{
- if (parse->localdata != (void *)0)
- {
- TIMER_DEQUEUE(&((poll_timer_t *)parse->localdata)->timer);
- free((char *)parse->localdata);
- parse->localdata = (void *)0;
- }
-}
-
-/**===========================================================================
- ** special code for special clocks
- **/
-
-/*--------------------------------------------------
- * trimble init routine - setup EOL and then do poll_init.
- */
-static int
-trimble_init(parse)
- struct parseunit *parse;
-{
-#ifdef HAVE_TERMIOS
- struct termios tm;
-#endif
-#ifdef HAVE_SYSV_TTYS
- struct termio tm;
-#endif
- /*
- * configure terminal line for trimble receiver
- */
- if (TTY_GETATTR(parse->fd, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: trimble_init: tcgetattr(fd, &tm): %m", CL_UNIT(parse->unit));
- return 0;
- }
- else
- {
- tm.c_cc[VEOL] = TRIMBLESV6_EOL;
-
- if (TTY_SETATTR(parse->fd, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: trimble_init: tcsetattr(fd, &tm): %m", CL_UNIT(parse->unit));
- return 0;
- }
- }
- return poll_init(parse);
-}
-#endif /* defined(REFCLOCK) && defined(PARSE) */
-
-/*
- * History:
- *
- * refclock_parse.c,v
- * Revision 3.59 1994/05/23 16:29:27 kardel
- * IGEL clock - Trimble update
- *
- * Revision 3.58 1994/05/12 21:03:39 kardel
- * adhere to new standard that fudgeval2 is refid
- *
- * Revision 3.57 1994/05/12 12:50:47 kardel
- * printf fmt/arg cleanup
- *
- * Revision 3.56 1994/05/10 21:15:51 kardel
- * var reference level bug, kernel disable fix
- *
- * Revision 3.55 1994/05/02 00:37:01 kardel
- * 3.3t reconcilation + bug fixes (PPS simulation - old kpll)
- *
- * Revision 3.54 1994/04/11 19:34:42 kardel
- * longer input characters for DCF77 raw input (8Bit+parity ignored)
- *
- * Revision 3.53 1994/03/25 13:07:39 kardel
- * fixed offset calculation for large (>4 Min) offsets
- *
- * Revision 3.52 1994/03/03 09:58:00 kardel
- * stick -kv in cvs is no fun
- *
- * Revision 3.49 1994/02/20 13:26:00 kardel
- * rcs id cleanup
- *
- * Revision 3.48 1994/02/20 13:04:56 kardel
- * parse add/delete second support
- *
- * Revision 3.47 1994/02/02 17:44:30 kardel
- * rcs ids fixed
- *
- * Revision 3.45 1994/01/25 19:06:27 kardel
- * 94/01/23 reconcilation
- *
- * Revision 3.44 1994/01/25 17:32:23 kardel
- * settable extended variables
- *
- * Revision 3.43 1994/01/23 16:28:39 kardel
- * HAVE_TERMIOS introduced
- *
- * Revision 3.42 1994/01/22 11:35:04 kardel
- * added HAVE_TERMIOS
- *
- * Revision 3.41 1993/11/27 18:44:37 kardel
- * can't trust GPS166 on unsync
- *
- * Revision 3.40 1993/11/21 18:03:36 kardel
- * useless declaration deleted
- *
- * Revision 3.39 1993/11/21 15:30:15 kardel
- * static funcitions may be declared only at outer level
- *
- * Revision 3.38 1993/11/15 21:26:49 kardel
- * conditional define comments fixed
- *
- * Revision 3.37 1993/11/11 11:20:49 kardel
- * declaration fixes
- *
- * Revision 3.36 1993/11/10 12:17:14 kardel
- * #ifdef glitch
- *
- * Revision 3.35 1993/11/01 21:15:06 kardel
- * comments updated
- *
- * Revision 3.34 1993/11/01 20:01:08 kardel
- * parse Solaris support (initial version)
- *
- * Revision 3.33 1993/10/30 09:44:58 kardel
- * conditional compilation flag cleanup
- *
- * Revision 3.32 1993/10/22 14:28:43 kardel
- * Oct. 22nd 1993 reconcilation
- *
- * Revision 3.31 1993/10/10 21:19:10 kardel
- * compilation cleanup - (minimal porting tests)
- *
- * Revision 3.30 1993/10/09 21:44:35 kardel
- * syslog strings fixed
- *
- * Revision 3.29 1993/10/09 14:40:15 kardel
- * default precision setting fixed
- *
- * Revision 3.28 1993/10/08 14:48:22 kardel
- * Changed offset determination logic:
- * Take the PPS offset if it is available and the time
- * code offset is within [-0.5..0.5[, otherwise stick
- * to the time code offset
- *
- * Revision 3.27 1993/10/08 00:53:17 kardel
- * announce also simulated PPS via CIOGETEV in ntpq cl
- *
- * Revision 3.26 1993/10/07 23:29:35 kardel
- * trimble fixes
- *
- * Revision 3.25 1993/10/06 21:13:35 kardel
- * test reversed (CIOGETEV support)
- *
- * Revision 3.24 1993/10/03 20:18:26 kardel
- * Well, values > 999999 in the usec field from uniqtime() timestamps
- * can prove harmful.
- *
- * Revision 3.23 1993/10/03 19:49:54 kardel
- * buftvtots where failing on uninitialized time stamps
- *
- * Revision 3.22 1993/10/03 19:11:09 kardel
- * restructured I/O handling
- *
- * Revision 3.21 1993/09/29 11:30:18 kardel
- * special init for trimble to set EOL
- *
- * Revision 3.20 1993/09/27 22:46:28 kardel
- * preserve module stack if I_PUSH parse fails
- *
- * Revision 3.19 1993/09/27 21:10:11 kardel
- * wrong structure member
- *
- * Revision 3.18 1993/09/27 13:05:06 kardel
- * Trimble is true polling only
- *
- * Revision 3.17 1993/09/27 12:47:10 kardel
- * poll string support generalized
- *
- * Revision 3.16 1993/09/26 23:40:56 kardel
- * new parse driver logic
- *
- * Revision 3.15 1993/09/24 15:00:51 kardel
- * Sep 23rd distribution...
- *
- * Revision 3.14 1993/09/22 18:21:15 kardel
- * support ppsclock streams module (-DSTREAM -DPPSPPS -DPARSEPPS -UPARSESTREAM)
- *
- * Revision 3.13 1993/09/05 15:38:33 kardel
- * not every cpp understands #error...
- *
- * Revision 3.12 1993/09/02 20:04:19 kardel
- * TTY cleanup
- *
- * Revision 3.11 1993/09/01 21:48:47 kardel
- * conditional cleanup
- *
- * Revision 3.10 1993/09/01 11:32:45 kardel
- * assuming HAVE_POSIX_TTYS when STREAM defined
- *
- * Revision 3.9 1993/08/31 22:31:46 kardel
- * SINIX-M SysVR4 integration
- *
- * Revision 3.8 1993/08/27 00:29:50 kardel
- * compilation cleanup
- *
- * Revision 3.7 1993/08/24 22:27:30 kardel
- * cleaned up AUTOCONF DCF77 mess 8-) - wasn't too bad
- *
- * Revision 3.6 1993/08/24 21:36:23 kardel
- * casting and ifdefs
- *
- * Revision 3.5 1993/07/09 23:36:59 kardel
- * HAVE_POSIX_TTYS used to produce errors 8-( - BSD driver support still lacking
- *
- * Revision 3.4 1993/07/09 12:42:29 kardel
- * RAW DCF now officially released
- *
- * Revision 3.3 1993/07/09 11:50:37 kardel
- * running GPS also on 960 to be able to switch GPS/DCF77
- *
- * Revision 3.2 1993/07/09 11:37:34 kardel
- * Initial restructured version + GPS support
- *
- * Revision 3.1 1993/07/06 10:01:07 kardel
- * DCF77 driver goes generic...
- *
- */
diff --git a/usr.sbin/xntpd/xntpd/refclock_old/refclock_datum.c b/usr.sbin/xntpd/xntpd/refclock_old/refclock_datum.c
deleted file mode 100644
index 680f104568bf..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_old/refclock_datum.c
+++ /dev/null
@@ -1,645 +0,0 @@
-/*
- * refclock_datum - clock driver for the Datum watchayamacallit
- */
-#if defined(REFCLOCK) && (defined(DATUM) || defined(DATUMCLK) || defined(DATUMPPS))
-/* */
-/*...... Include Files .................................................*/
-/* */
-
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-#include <sys/errno.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-#if defined(STREAM)
-#include <stropts.h>
-#if defined(WWVBCLK)
-#include <sys/clkdefs.h>
-#endif /* WWVBCLK */
-#endif /* STREAM */
-
-#if defined (WWVBPPS)
-#include <sys/ppsclock.h>
-#endif /* WWVBPPS */
-
-#include "ntp_stdlib.h"
-
-/*
-#include "temp.c"
-void set_logfile();
-*/
-
-
-#define DEBUG_DATUM_PTC
-
-
-/* */
-/*...... #defines ......................................................*/
-/* */
-
-/*
-#define refclock_datum_pts refclock_wwvb
-*/
-
-#define MAXUNITS 4
-#define PTSPRECISION (-13) /* precision assumed (about 100 us) */
-#define GMT 7
-#define DATUM_MAX_ERROR 0.100
-#define DATUM_MAX_ERROR2 DATUM_MAX_ERROR*DATUM_MAX_ERROR
-
-/* */
-/*...... externals .....................................................*/
-/* */
-
-extern U_LONG current_time; /* current time (s) */
-extern int debug; /* global debug flag */
-
-
-/* */
-/*...... My structure ..................................................*/
-/* */
-
-struct datum_pts_unit {
- struct peer *peer; /* peer used by xntp */
- struct refclockio io; /* io structure used by xntp */
- int PTS_fd; /* file descriptor for PTS */
- int PTS_START; /* ? */
- u_int unit; /* id for unit */
- U_LONG timestarted; /* time started */
- int inuse; /* in use flag */
- l_fp lastrec;
- l_fp lastref;
- int yearstart;
- int coderecv;
- int day; /* day */
- int hour; /* hour */
- int minute; /* minutes */
- int second; /* seconds */
- int msec; /* miliseconds */
- int usec; /* miliseconds */
- u_char leap;
- char retbuf[8]; /* returned time from the datum pts */
- char nbytes; /* number of bytes received from datum pts */
- double sigma2; /* average squared error (roughly) */
-};
-
-
-/* */
-/*...... pts static constant variables for internal use ................*/
-/* */
-
-static char STOP_GENERATOR[6];
-static char START_GENERATOR[6];
-static char TIME_REQUEST[6];
-
-static int nunits;
-static struct datum_pts_unit **datum_pts_unit;
-static u_char stratumtouse[MAXUNITS];
-static l_fp fudgefactor[MAXUNITS];
-
-static FILE *logfile;
-
-/* */
-/*...... callback functions that xntp knows about ......................*/
-/* */
-
-static int datum_pts_start P((u_int, struct peer *));
-static void datum_pts_shutdown P((int));
-static void datum_pts_poll P((int, struct peer *));
-static void datum_pts_control P((u_int, struct refclockstat *,
- struct refclockstat *));
-static void datum_pts_init P((void));
-static void datum_pts_buginfo P((int, struct refclockbug *));
-
-struct refclock refclock_datum = {
- datum_pts_start,
- datum_pts_shutdown,
- datum_pts_poll,
- datum_pts_control,
- datum_pts_init,
- datum_pts_buginfo,
- NOFLAGS
-};
-
-/*
-struct refclock refclock_wvvb = {
- datum_pts_start,
- datum_pts_shutdown,
- datum_pts_poll,
- datum_pts_control,
- datum_pts_init,
- datum_pts_buginfo,
- NOFLAGS
-};
-*/
-
-/* */
-/*...... receive callback functions for xntp ..........................*/
-/* */
-
-static void datum_pts_receive P((struct recvbuf *));
-
-
-/*......................................................................*/
-/* datum_pts_start */
-/*......................................................................*/
-
-static int datum_pts_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- struct datum_pts_unit **temp_datum_pts_unit;
- struct datum_pts_unit *datum_pts;
- struct termios arg;
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile, "Starting Datum PTS unit %d\n", unit);
- fflush(logfile);
-#endif
-
-/* */
-/*...... create the memory for the new unit ............................*/
-/* */
-
- temp_datum_pts_unit = (struct datum_pts_unit **)
- malloc((nunits+1)*sizeof(struct datum_pts_unit *));
- if (nunits > 0) memcpy(temp_datum_pts_unit, datum_pts_unit,
- nunits*sizeof(struct datum_pts_unit *));
- free(datum_pts_unit);
- datum_pts_unit = temp_datum_pts_unit;
- datum_pts_unit[nunits] = (struct datum_pts_unit *)
- malloc(sizeof(struct datum_pts_unit));
- datum_pts = datum_pts_unit[nunits];
-
- datum_pts->unit = unit;
- datum_pts->yearstart = 0;
- datum_pts->sigma2 = 0.0;
-
-/* */
-/*...... open the datum pts device .....................................*/
-/* */
-
- datum_pts->PTS_fd = open("/dev/ttya",O_RDWR);
-
- fcntl(datum_pts->PTS_fd, F_SETFL, 0);
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Opening RS232 port ttya with file descriptor %d\n",
- datum_pts->PTS_fd);
- fflush(logfile);
-#endif
-
-/* */
-/*...... set up the RS232 terminal device information ..................*/
-/* */
-
- arg.c_iflag = IGNBRK;
- arg.c_oflag = 0;
- arg.c_cflag = B9600 | CS8 | CREAD | PARENB | CLOCAL;
- arg.c_lflag = 0;
- arg.c_line = 0;
- arg.c_cc[VMIN] = 0; /* start timeout timer right away */
- arg.c_cc[VTIME] = 30; /* this is a 3 second timout on reads */
-
- tcsetattr(datum_pts->PTS_fd, TCSANOW, &arg);
-
-/* */
-/*...... initialize the io structure ...................................*/
-/* */
-
- datum_pts->peer = peer;
- datum_pts->timestarted = current_time;
-
- datum_pts->io.clock_recv = datum_pts_receive;
- datum_pts->io.srcclock = (caddr_t)datum_pts;
- datum_pts->io.datalen = 0;
- datum_pts->io.fd = datum_pts->PTS_fd;
-
- if (!io_addclock(&(datum_pts->io))) {
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Problem adding clock\n");
- fflush(logfile);
-#endif
- syslog(LOG_ERR, "Datum_PTS: Problem adding clock");
- }
-
- peer->precision = PTSPRECISION;
- peer->rootdelay = 0;
- peer->rootdispersion = 0;
- peer->stratum = stratumtouse[unit];
-
-/* */
-/*...... now add one to the number of units ............................*/
-/* */
-
- nunits++;
-
-/* */
-/*...... return successful code ........................................*/
-/* */
-
- return 1;
-
-}
-
-
-/*......................................................................*/
-/* datum_pts_shutdown */
-/*......................................................................*/
-
-static void datum_pts_shutdown(unit)
- int unit;
-{
- int i,j;
- struct datum_pts_unit **temp_datum_pts_unit;
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Shutdown Datum PTS\n");
- fflush(logfile);
-#endif
- syslog(LOG_ERR, "Datum_PTS: Shutdown Datum PTS");
-
-/* */
-/*...... loop until the right unit is found ............................*/
-/* */
-
- for (i=0; i<nunits; i++) {
- if (datum_pts_unit[i]->unit == unit) {
-
-/* */
-/*...... found it so close the file descriptor and free up memory .....*/
-/* */
-
- io_closeclock(&datum_pts_unit[i]->io);
- close(datum_pts_unit[i]->PTS_fd);
- free(datum_pts_unit[i]);
-
-/* */
-/*...... clean up the datum_pts_unit array (no holes) ..................*/
-/* */
-
- if (nunits > 1) {
-
- temp_datum_pts_unit = (struct datum_pts_unit **)
- malloc((nunits-1)*sizeof(struct datum_pts_unit *));
- if (i!= 0) memcpy(temp_datum_pts_unit, datum_pts_unit,
- i*sizeof(struct datum_pts_unit *));
-
- for (j=i+1; j<nunits; j++) {
- temp_datum_pts_unit[j-1] = datum_pts_unit[j];
- }
-
- free(datum_pts_unit);
- datum_pts_unit = temp_datum_pts_unit;
-
- }else{
-
- free(datum_pts_unit);
- datum_pts_unit = NULL;
-
- }
-
- return;
-
- }
- }
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Error, could not shut down unit %d\n",unit);
- fflush(logfile);
-#endif
- syslog(LOG_ERR, "Datum_PTS: Could not shut down Datum PTS unit %d",unit);
-
-}
-
-
-/*......................................................................*/
-/* datum_pts_poll */
-/*......................................................................*/
-
-static void datum_pts_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- int i;
- int index;
- int error_code;
- l_fp tstmp;
- struct datum_pts_unit *datum_pts;
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Poll Datum PTS\n");
- fflush(logfile);
-#endif
-
-/* */
-/*...... find the unit and send out a time request .....................*/
-/* */
-
- index = -1;
- for (i=0; i<nunits; i++) {
- if (datum_pts_unit[i]->unit == unit) {
- index = i;
- datum_pts = datum_pts_unit[i];
- error_code = write(datum_pts->PTS_fd, TIME_REQUEST, 6);
- if (error_code != 6) perror("TIME_REQUEST");
- datum_pts->nbytes = 0;
- break;
- }
- }
-
- if (index == -1) {
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Error, could not poll unit %d\n",unit);
- fflush(logfile);
-#endif
- syslog(LOG_ERR, "Datum_PTS: Could not poll unit %d",unit);
- return;
- }
-
-}
-
-
-/*......................................................................*/
-/* datum_pts_control */
-/*......................................................................*/
-
-static void datum_pts_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Control Datum PTS\n");
- fflush(logfile);
-#endif
-}
-
-
-/*......................................................................*/
-/* datum_pts_init */
-/*......................................................................*/
-
-static void datum_pts_init()
-{
-
-#ifdef DEBUG_DATUM_PTC
- logfile = fopen("xntpd.log", "w");
- fprintf(logfile,"Init Datum PTS\n");
- fflush(logfile);
-#endif
-
- memcpy(START_GENERATOR, "//kk01",6);
- memcpy(STOP_GENERATOR, "//kk00",6);
- memcpy(TIME_REQUEST, "//k/mn",6);
-
- datum_pts_unit = NULL;
- nunits = 0;
-}
-
-
-/*......................................................................*/
-/* datum_pts_buginfo */
-/*......................................................................*/
-
-static void datum_pts_buginfo(unit, bug)
- int unit;
- register struct refclockbug *bug;
-{
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Buginfo Datum PTS\n");
- fflush(logfile);
-#endif
-}
-
-
-/*......................................................................*/
-/* datum_pts_receive */
-/*......................................................................*/
-
-static void datum_pts_receive(rbufp)
- struct recvbuf *rbufp;
-{
- int i;
- l_fp tstmp, trtmp, tstmp1;
- struct datum_pts_unit *datum_pts;
- char *dpt;
- int dpend;
- time_t tim;
- struct tm *loctm;
- int tzoff;
- int timerr;
- double ftimerr, abserr;
-
- datum_pts = (struct datum_pts_unit *)rbufp->recv_srcclock;
- dpt = (char *)&rbufp->recv_space;
- dpend = rbufp->recv_length;
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Receive Datum PTS: %d bytes\n", dpend);
- fflush(logfile);
-#endif
-
- for (i=0; i<dpend; i++) {
- datum_pts->retbuf[datum_pts->nbytes+i] = dpt[i];
- }
- datum_pts->nbytes += dpend;
-
- if (datum_pts->nbytes != 7) {
- return;
- }
-
-
-/* */
-/*...... save the ntp system time ......................................*/
-/* */
-
- trtmp = rbufp->recv_time;
- datum_pts->lastrec = trtmp;
-
-/* */
-/*...... convert the time from the buffer ..............................*/
-/* */
-
- datum_pts->day = 100*(datum_pts->retbuf[0] & 0x0f) +
- 10*((datum_pts->retbuf[1] & 0xf0)>>4) +
- (datum_pts->retbuf[1] & 0x0f);
-
- datum_pts->hour = 10*((datum_pts->retbuf[2] & 0x30)>>4) +
- (datum_pts->retbuf[2] & 0x0f);
-
- datum_pts->minute = 10*((datum_pts->retbuf[3] & 0x70)>>4) +
- (datum_pts->retbuf[3] & 0x0f);
-
- datum_pts->second = 10*((datum_pts->retbuf[4] & 0x70)>>4) +
- (datum_pts->retbuf[4] & 0x0f);
-
- datum_pts->msec = 100*((datum_pts->retbuf[5] & 0xf0) >> 4) +
- 10*(datum_pts->retbuf[5] & 0x0f) +
- ((datum_pts->retbuf[6] & 0xf0)>>4);
-
- datum_pts->usec = 1000*datum_pts->msec;
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"day %d, hour %d, minute %d, second %d, msec %d\n",
- datum_pts->day,
- datum_pts->hour,
- datum_pts->minute,
- datum_pts->second,
- datum_pts->msec);
- fflush(logfile);
-#endif
-
-/* */
-/*...... get the GMT time zone offset ..................................*/
-/* */
-
- tim = trtmp.l_ui - JAN_1970;
- loctm = localtime(&tim);
- tzoff = -loctm->tm_gmtoff/3600;
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Time Zone = %d, time (sec) since 1970 = %d\n",tzoff, tim);
- fflush(logfile);
-#endif
-
-/* */
-/*...... make sure that we have a good time from the Datum PTS .........*/
-/* */
-
- if (!clocktime( datum_pts->day,
- datum_pts->hour,
- datum_pts->minute,
- datum_pts->second,
- tzoff,
- datum_pts->lastrec.l_ui,
- &datum_pts->yearstart,
- &datum_pts->lastref.l_ui) ) {
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Error: bad clocktime\n");
- fprintf(logfile,"GMT %d, lastrec %d, yearstart %d, lastref %d\n",
- tzoff,
- datum_pts->lastrec.l_ui,
- datum_pts->yearstart,
- datum_pts->lastref.l_ui);
- fflush(logfile);
-#endif
- syslog(LOG_ERR, "Datum_PTS: Bad clocktime");
-
- return;
-
- }else{
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Good clocktime\n");
- fflush(logfile);
-#endif
-
- }
-
-/* */
-/*...... we have datum_pts->lastref.l_ui set, get useconds now .........*/
-/* */
-
- TVUTOTSF(datum_pts->usec, datum_pts->lastref.l_uf);
-
-/* */
-/*...... pass the new time to xntpd ....................................*/
-/* */
-
- tstmp = datum_pts->lastref;
- L_SUB(&tstmp, &datum_pts->lastrec); /* tstmp is the time correction */
- datum_pts->coderecv++;
-
-/*
- set_logfile(logfile);
-*/
-
- refclock_receive( datum_pts->peer,
- &tstmp,
- tzoff,
- 0,
- &datum_pts->lastrec,
- &datum_pts->lastrec,
- datum_pts->leap );
- timerr = tstmp.l_ui<<20;
- timerr |= (tstmp.l_uf>>12) & 0x000fffff;
- ftimerr = timerr;
- ftimerr /= 1024*1024;
- abserr = ftimerr;
- if (ftimerr < 0.0) abserr = -ftimerr;
-
- if (datum_pts->sigma2 == 0.0) {
- if (abserr < DATUM_MAX_ERROR) {
- datum_pts->sigma2 = abserr*abserr;
- }else{
- datum_pts->sigma2 = DATUM_MAX_ERROR2;
- }
- }else{
- if (abserr < DATUM_MAX_ERROR) {
- datum_pts->sigma2 = 0.95*datum_pts->sigma2 + 0.05*abserr*abserr;
- }else{
- datum_pts->sigma2 = 0.95*datum_pts->sigma2 + 0.05*DATUM_MAX_ERROR2;
- }
- }
-
-#ifdef DEBUG_DATUM_PTC
- fprintf(logfile,"Time error = %f seconds, Sigma Squared = %f\n",
- ftimerr, datum_pts->sigma2);
- fflush(logfile);
-#endif
-
-/* */
-/*...... make sure that we understand the format for xntp time .........*/
-/* */
-
-#ifdef DEBUG_DATUM_PTC
- tstmp.l_ui = 2;
- TVUTOTSF(123456, tstmp.l_uf);
-
- timerr = tstmp.l_ui<<20;
- timerr |= (tstmp.l_uf>>12) & 0x000fffff;
- ftimerr = timerr;
- ftimerr /= 1024*1024;
- fprintf(logfile,"Test1 2.123456 = %f\n",ftimerr);
- fflush(logfile);
-
- tstmp1.l_ui = 3;
- TVUTOTSF(223456, tstmp1.l_uf);
- timerr = tstmp1.l_ui<<20;
- timerr |= (tstmp1.l_uf>>12) & 0x000fffff;
- ftimerr = timerr;
- ftimerr /= 1024*1024;
- fprintf(logfile,"Test2 3.223456 = %f\n",ftimerr);
- fflush(logfile);
-
- L_SUB(&tstmp, &tstmp1);
- timerr = tstmp.l_ui<<20;
- timerr |= (tstmp.l_uf>>12) & 0x000fffff;
- ftimerr = timerr;
- ftimerr /= 1024*1024;
- fprintf(logfile,"Test3 -1.100000 = %f\n",ftimerr);
- fflush(logfile);
-#endif
-
-
-}
-#endif
diff --git a/usr.sbin/xntpd/xntpd/refclock_old/refclock_gpstm.c b/usr.sbin/xntpd/xntpd/refclock_old/refclock_gpstm.c
deleted file mode 100644
index 2e81e52c8dae..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_old/refclock_gpstm.c
+++ /dev/null
@@ -1,998 +0,0 @@
-/*
- * refclock_gpstm - clock driver for the Kinimetrics Truetime GPSTM/TMD rcvr
- * Version 1.0 (from Version 2.0 of the GOES driver, as of 03Jan94)
- */
-
-#if defined(REFCLOCK) && (defined(GPSTM) || defined(GPSTMCLK) \
- || defined(GPSTMPPS))
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-
-#ifdef SYS_BSDI
-#undef HAVE_BSD_TTYS
-#include <sys/ioctl.h>
-#endif
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-
-#if defined(STREAM)
-#include <stropts.h>
-#if defined(GPSTMCLK)
-#include <clkdefs.h>
-#endif /* GPSTMCLK */
-#endif /* STREAM */
-
-#if defined(GPSTMPPS)
-#include <sys/ppsclock.h>
-#endif /* GPSTMPPS */
-
-#include "ntp_stdlib.h"
-
-/*
- * Support for Kinemetrics Truetime GPS-TM/TMD Receiver
- *
- * Most of this code is copied from refclock_goes.c with thanks.
- *
- * the time code looks like follows:
- *
- * ADDD:HH:MM:SSQCL
- * A - control A
- * Q Quality indication: indicates possible error of
- * ? +/- 500 milliseconds # +/- 50 milliseconds
- * * +/- 5 milliseconds . +/- 1 millisecond
- * space less than 1 millisecond
- * C - Carriage return
- * L - Line feed
- * The carriage return start bit begins on 0 seconds and extends to 1 bit time.
- *
- * Flag1 set to 1 will silence the clock side of xntpd, just reading the
- * clock without trying to write to it. This is usefull if several
- * xntpds listen to the same clock. This has not been tested yet...
- */
-
-/*
- * Definitions
- */
-#define MAXUNITS 4 /* max number of GPSTM units */
-#define GPSTM232 "/dev/gpstm%d"
-#define SPEED232 B9600 /* 9600 baud */
-
-/*
- * Radio interface parameters
- */
-#define MAXDISPERSE (FP_SECOND>>1) /* max error for synchronized clock (0.5 s as an u_fp) */
-#define PRECISION (-20) /* precision assumed (about 1 ms) */
-#define REFID "GPS\0" /* reference id */
-#define DESCRIPTION "Kinemetrics GPS-TM/TMD Receiver" /* who we are */
-#define GMT 0 /* hour offset from Greenwich */
-#define NCODES 3 /* stages of median filter */
-#define BMAX 99 /* timecode buffer length */
-#define CODEDIFF 0x20000000 /* 0.125 seconds as an l_fp fraction */
-#define TIMEOUT 180 /* ping the clock if it's silent this long */
-
-/*
- * used by the state machine
- */
-enum gpstm_event {e_Init, e_F18, e_F50, e_F51, e_TS};
-static enum {Base, Start, F18, F50, F51, F08} State[MAXUNITS];
-static time_t Last[MAXUNITS];
-static void gpstm_doevent P((int, enum gpstm_event));
-static void gpstm_initstate P((int));
-
-/*
- * Hack to avoid excercising the multiplier. I have no pride.
- */
-#define MULBY10(x) (((x)<<3) + ((x)<<1))
-
-/*
- * Imported from the timer module
- */
-extern U_LONG current_time;
-extern struct event timerqueue[];
-
-/*
- * Imported from ntp_loopfilter module
- */
-extern int fdpps; /* pps file descriptor */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * GPSTM unit control structure
- */
-struct gpstm_unit {
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- l_fp lastrec; /* last receive time */
- l_fp lastref; /* last timecode time */
- l_fp offset[NCODES]; /* recent sample offsets */
- char lastcode[BMAX]; /* last timecode received */
- u_short polled; /* Hand in a time sample? */
- u_char lencode; /* length of last timecode */
- U_LONG lasttime; /* last time clock heard from */
- u_char unit; /* unit number for this guy */
- u_char status; /* clock status */
- u_char lastevent; /* last clock event */
- u_char reason; /* reason for last abort */
- u_char year; /* year of eternity */
- u_short day; /* day of year */
- u_char hour; /* hour of day */
- u_char minute; /* minute of hour */
- u_char second; /* seconds of minute */
- u_char leap; /* leap indicators */
- u_short msec; /* millisecond of second */
- u_char quality; /* quality character */
- U_LONG yearstart; /* start of current year */
- /*
- * Status tallies
- */
- U_LONG polls; /* polls sent */
- U_LONG noreply; /* no replies to polls */
- U_LONG coderecv; /* timecodes received */
- U_LONG badformat; /* bad format */
- U_LONG baddata; /* bad data */
- U_LONG timestarted; /* time we started this */
-};
-
-/*
- * Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back.
- */
-static struct gpstm_unit *gpstm_units[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/*
- * Keep the fudge factors separately so they can be set even
- * when no clock is configured.
- */
-static l_fp fudgefactor1[MAXUNITS];
-static l_fp fudgefactor2[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static u_char readonlyclockflag[MAXUNITS];
-static U_LONG refid[MAXUNITS];
-
-/*
- * Function prototypes
- */
-static void gpstm_init P((void));
-static int gpstm_start P((u_int, struct peer *));
-static void gpstm_shutdown P((int));
-static void gpstm_rep_event P((struct gpstm_unit *, int));
-static void gpstm_receive P((struct recvbuf *));
-static char gpstm_process P((struct gpstm_unit *, l_fp *, u_fp *));
-static void gpstm_poll P((int, struct peer *));
-static void gpstm_control P((u_int, struct refclockstat *,
- struct refclockstat *));
-static void gpstm_buginfo P((int, struct refclockbug *));
-static void gpstm_send P((struct gpstm_unit *, char *));
-
-struct refclock refclock_gpstm = {
- gpstm_start, gpstm_shutdown, gpstm_poll,
- gpstm_control, gpstm_init, gpstm_buginfo, NOFLAGS
-};
-
-/*
- * gpstm_init - initialize internal driver data
- */
-static void
-gpstm_init()
-{
- register int i;
- /*
- * Just zero the data arrays
- */
- memset((char *)gpstm_units, 0, sizeof gpstm_units);
- memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
- * Initialize fudge factors to default.
- */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor1[i].l_ui = 0;
- fudgefactor1[i].l_uf = 0;
- fudgefactor2[i].l_ui = 0;
- fudgefactor2[i].l_uf = 0;
- stratumtouse[i] = 0;
- readonlyclockflag[i] = 0;
- memcpy((char *)&refid[i], REFID, 4);
- }
-}
-
-
-/*
- * gpstm_start - open the device and initialize data for processing
- */
-static int
-gpstm_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- register struct gpstm_unit *gpstm;
- register int i;
- int fd232;
- char dev[20];
-
- /*
- * Check configuration info
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_start: unit %d invalid", unit);
- return 0;
- }
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "gpstm_start: unit %d in use", unit);
- return 0;
- }
-
- /*
- * Open serial port
- */
- (void) sprintf(dev, GPSTM232, unit);
- fd232 = open(dev, O_RDWR, 0777);
- if (fd232 == -1) {
- syslog(LOG_ERR, "gpstm_start: open of %s: %m", dev);
- return 0;
- }
-
-#if defined(HAVE_SYSV_TTYS)
- /*
- * System V serial line parameters (termio interface)
- *
- */
- { struct termio ttyb;
- if (ioctl(fd232, TCGETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TCGETA): %m", dev);
- goto screwed;
- }
- ttyb.c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyb.c_oflag = 0;
- ttyb.c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyb.c_lflag = ICANON;
- ttyb.c_cc[VERASE] = ttyb.c_cc[VKILL] = '\0';
- if (ioctl(fd232, TCSETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TCSETA): %m", dev);
- goto screwed;
- }
- }
-#endif /* HAVE_SYSV_TTYS */
-#if defined(HAVE_TERMIOS)
- /*
- * POSIX serial line parameters (termios interface)
- *
- * The GPSTMCLK option provides timestamping at the driver level.
- * It requires the tty_clk streams module.
- *
- * The GPSTMPPS option provides timestamping at the driver level.
- * It uses a 1-pps signal and level converter (gadget box) and
- * requires the ppsclock streams module and SunOS 4.1.1 or
- * later.
- */
- { struct termios ttyb, *ttyp;
- ttyp = &ttyb;
-
- if (tcgetattr(fd232, ttyp) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: tcgetattr(%s): %m", dev);
- goto screwed;
- }
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: tcsetattr(%s): %m", dev);
- goto screwed;
- }
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: tcflush(%s): %m", dev);
- goto screwed;
- }
-#if defined(STREAM)
-#if defined(GPSTMCLK)
- if (ioctl(fd232, I_PUSH, "clk") < 0)
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, I_PUSH, clk): %m", dev);
- if (ioctl(fd232, CLK_SETSTR, "\n") < 0)
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, CLK_SETSTR): %m", dev);
-#endif /* GPSTMCLK */
-#if defined(GPSTMPPS)
- if (ioctl(fd232, I_PUSH, "ppsclock") < 0)
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, I_PUSH, ppsclock): %m", dev);
- else
- fdpps = fd232;
-#endif /* GPSTMPPS */
-#endif /* STREAM */
- }
-#endif /* HAVE_TERMIOS */
-#if defined(HAVE_BSD_TTYS)
- /*
- * 4.3bsd serial line parameters (sgttyb interface)
- *
- * The GPSTMCLK option provides timestamping at the driver level.
- * It requires the tty_clk line discipline and 4.3bsd or later.
- */
- { struct sgttyb ttyb;
-#if defined(GPSTMCLK)
- int ldisc = CLKLDISC;
-#endif /* GPSTMCLK */
-
- if (ioctl(fd232, TIOCGETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TIOCGETP): %m", dev);
- goto screwed;
- }
- ttyb.sg_ispeed = ttyb.sg_ospeed = SPEED232;
-#if defined(GPSTMCLK)
- ttyb.sg_erase = ttyb.sg_kill = '\r';
- ttyb.sg_flags = RAW;
-#else
- ttyb.sg_erase = ttyb.sg_kill = '\0';
- ttyb.sg_flags = EVENP|ODDP|CRMOD;
-#endif /* GPSTMCLK */
- if (ioctl(fd232, TIOCSETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TIOCSETP): %m", dev);
- goto screwed;
- }
-#if defined(GPSTMCLK)
- if (ioctl(fd232, TIOCSETD, &ldisc) < 0) {
- syslog(LOG_ERR,
- "gpstm_start: ioctl(%s, TIOCSETD): %m", dev);
- goto screwed;
- }
-#endif /* GPSTMCLK */
- }
-#endif /* HAVE_BSD_TTYS */
-
- /*
- * Allocate unit structure
- */
- if (gpstm_units[unit] != 0) {
- gpstm = gpstm_units[unit]; /* The one we want is okay */
- } else {
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && gpstm_units[i] != 0)
- break;
- }
- if (i < MAXUNITS) {
- /*
- * Reclaim this one
- */
- gpstm = gpstm_units[i];
- gpstm_units[i] = 0;
- } else {
- gpstm = (struct gpstm_unit *)
- emalloc(sizeof(struct gpstm_unit));
- }
- }
- memset((char *)gpstm, 0, sizeof(struct gpstm_unit));
- gpstm_units[unit] = gpstm;
-
- /*
- * Set up the structures
- */
- gpstm->peer = peer;
- gpstm->unit = (u_char)unit;
- gpstm->timestarted = current_time;
-
- gpstm->io.clock_recv = gpstm_receive;
- gpstm->io.srcclock = (caddr_t)gpstm;
- gpstm->io.datalen = 0;
- gpstm->io.fd = fd232;
- if (!io_addclock(&gpstm->io)) {
- goto screwed;
- }
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success.
- */
- peer->precision = PRECISION;
- peer->rootdelay = 0;
- peer->rootdispersion = 0;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- unitinuse[unit] = 1;
- gpstm_initstate(unit);
- return 1;
-
- /*
- * Something broke; abandon ship
- */
-screwed:
- (void) close(fd232);
- return 0;
-}
-
-/*
- * gpstm_shutdown - shut down a clock
- */
-static void
-gpstm_shutdown(unit)
- int unit;
-{
- register struct gpstm_unit *gpstm;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_shutdown: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "gpstm_shutdown: unit %d not in use", unit);
- return;
- }
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- gpstm = gpstm_units[unit];
- io_closeclock(&gpstm->io);
- unitinuse[unit] = 0;
-}
-
-
-/*
- * gpstm_rep_event - note the occurance of an event
- */
-static void
-gpstm_rep_event(gpstm, code)
- struct gpstm_unit *gpstm;
- int code;
-{
- struct peer *peer;
-
- peer = gpstm->peer;
- if (gpstm->status != (u_char)code) {
- gpstm->status = (u_char)code;
- if (code != CEVNT_NOMINAL)
- gpstm->lastevent = (u_char)code;
- syslog(LOG_INFO,
- "clock %s event %x\n", ntoa(&peer->srcadr), code);
-#ifdef DEBUG
- if (debug) {
- printf("gpstm_rep_event(gpstm%d, code %d)\n",
- gpstm->unit, code);
- }
-#endif
- }
- if (code == CEVNT_BADREPLY)
- gpstm_initstate(gpstm->unit);
-}
-
-
-/*
- * gpstm_receive - receive data from the serial interface on a clock
- */
-static void
-gpstm_receive(rbufp)
- struct recvbuf *rbufp;
-{
- register int i;
- register struct gpstm_unit *gpstm;
- register u_char *dpt;
- register char *cp;
- register u_char *dpend;
- l_fp tstmp;
- u_fp dispersion;
-
- /*
- * Get the clock this applies to and a pointers to the data
- */
- gpstm = (struct gpstm_unit *)rbufp->recv_srcclock;
- dpt = (u_char *)&rbufp->recv_space;
-
- /*
- * Edit timecode to remove control chars
- */
- dpend = dpt + rbufp->recv_length;
- cp = gpstm->lastcode;
- while (dpt < dpend) {
- if ((*cp = 0x7f & *dpt++) >= ' ') cp++;
-#ifdef GPSTMCLK
- else if (*cp == '\r') {
- if (dpend - dpt < 8) {
- /* short timestamp */
- return;
- }
- if (!buftvtots(dpt,&gpstm->lastrec)) {
- /* screwy timestamp */
- return;
- }
- dpt += 8;
- }
-#endif
- }
- *cp = '\0';
- gpstm->lencode = cp - gpstm->lastcode;
- if (gpstm->lencode == 0)
- return;
-#ifndef GPSTMCLK
- gpstm->lastrec = rbufp->recv_time;
-#endif /* GPSTMCLK */
-#if !defined(GPSTMCLK) && !defined(GPSTMPPS) && defined(TIOCMODT)
- do {
- auto struct timeval cur, now;
- register long usec;
-
- if (ioctl(gpstm->io.fd, TIOCMODT, &cur) < 0) {
- syslog(LOG_ERR, "TIOCMODT: %m");
-#ifdef DEBUG
- if (debug) perror("TIOCMODT");
- break;
-#endif
- }
- if (cur.tv_sec == 0) {
- /* no timestamps yet */
- if (debug) printf("MODT tv_sec == 0\n");
- break;
- }
-
- gettimeofday(&now, NULL);
- usec = 1000000 * (now.tv_sec - cur.tv_sec)
- + (now.tv_usec - cur.tv_usec);
-#ifdef DEBUG
- if (debug) printf("lastmodem: delay=%d us\n", usec);
-#endif
- if (usec < 0 || usec > 10000) {
- /* time warp or stale timestamp */
- break;
- }
- if (!buftvtots((char *)&cur, &gpstm->lastrec)) {
- /* screwy timestamp */
- break;
- }
- } while (0);
-#endif /*TIOCMODT*/
-
-#ifdef DEBUG
- if (debug)
- printf("gpstm: timecode %d %s\n",
- gpstm->lencode, gpstm->lastcode);
-#endif
-
- cp = gpstm->lastcode;
- gpstm->leap = 0;
- if ((cp[0] == 'F' && isdigit(cp[1]) && isdigit(cp[2]))
- || (cp[0] == ' ' && cp[1] == 'T' && cp[2] == 'R')) {
- enum gpstm_event event;
-
- syslog(LOG_NOTICE, "gpstm%d: \"%s\"", gpstm->unit, cp);
- if (cp[1] == '5' && cp[2] == '0')
- event = e_F50;
- else if (cp[1] == '5' && cp[2] == '1')
- event = e_F51;
- else if (!strncmp(" TRUETIME Mk III", cp, 16))
- event = e_F18;
- else {
- gpstm_rep_event(gpstm, CEVNT_BADREPLY);
- return;
- }
- gpstm_doevent(gpstm->unit, event);
- return;
- } else if (gpstm->lencode == 13) {
- /*
- * Check timecode format 0
- */
- if (!isdigit(cp[0]) /* day of year */
- || !isdigit(cp[1])
- || !isdigit(cp[2])
- || cp[3] != ':' /* : separator */
- || !isdigit(cp[4]) /* hours */
- || !isdigit(cp[5])
- || cp[6] != ':' /* : separator */
- || !isdigit(cp[7]) /* minutes */
- || !isdigit(cp[8])
- || cp[9] != ':' /* : separator */
- || !isdigit(cp[10]) /* seconds */
- || !isdigit(cp[11]))
- {
- gpstm->badformat++;
- gpstm_rep_event(gpstm, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Convert format 0 and check values
- */
- gpstm->year = 0; /* fake */
- gpstm->day = cp[0] - '0';
- gpstm->day = MULBY10(gpstm->day) + cp[1] - '0';
- gpstm->day = MULBY10(gpstm->day) + cp[2] - '0';
- gpstm->hour = MULBY10(cp[4] - '0') + cp[5] - '0';
- gpstm->minute = MULBY10(cp[7] - '0') + cp[8] - '0';
- gpstm->second = MULBY10(cp[10] - '0') + cp[11] - '0';
- gpstm->msec = 0;
-
- if (cp[12] != ' ' && cp[12] != '.' && cp[12] != '*')
- gpstm->leap = LEAP_NOTINSYNC;
- else
- gpstm->lasttime = current_time;
-
- if (gpstm->day < 1 || gpstm->day > 366) {
- gpstm->baddata++;
- gpstm_rep_event(gpstm, CEVNT_BADDATE);
- return;
- }
- if (gpstm->hour > 23 || gpstm->minute > 59
- || gpstm->second > 59) {
- gpstm->baddata++;
- gpstm_rep_event(gpstm, CEVNT_BADTIME);
- return;
- }
- gpstm_doevent(gpstm->unit, e_TS);
- } else {
- gpstm_rep_event(gpstm, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * The clock will blurt a timecode every second but we only
- * want one when polled. If we havn't been polled, bail out.
- */
- if (!gpstm->polled)
- return;
-
- /*
- * Now, compute the reference time value. Use the heavy
- * machinery for the seconds and the millisecond field for the
- * fraction when present.
- *
- * this code does not yet know how to do the years
- */
- tstmp = gpstm->lastrec;
- if (!clocktime(gpstm->day, gpstm->hour, gpstm->minute,
- gpstm->second, GMT, tstmp.l_ui,
- &gpstm->yearstart, &gpstm->lastref.l_ui))
- {
- gpstm->baddata++;
- gpstm_rep_event(gpstm, CEVNT_BADTIME);
- return;
- }
- MSUTOTSF(gpstm->msec, gpstm->lastref.l_uf);
-
- i = ((int)(gpstm->coderecv)) % NCODES;
- gpstm->offset[i] = gpstm->lastref;
- L_SUB(&gpstm->offset[i], &tstmp);
- if (gpstm->coderecv == 0)
- for (i = 1; i < NCODES; i++)
- gpstm->offset[i] = gpstm->offset[0];
-
- gpstm->coderecv++;
-
- /*
- * Process the median filter, and pass the
- * offset and dispersion along. We use lastrec as both the
- * reference time and receive time in order to avoid being cute,
- * like setting the reference time later than the receive time,
- * which may cause a paranoid protocol module to chuck out the
- * data.
- */
- if (!gpstm_process(gpstm, &tstmp, &dispersion)) {
- gpstm->baddata++;
- gpstm_rep_event(gpstm, CEVNT_BADTIME);
- return;
- }
- refclock_receive(gpstm->peer, &tstmp, GMT, dispersion,
- &gpstm->lastrec, &gpstm->lastrec, gpstm->leap);
-
- /*
- * We have succedded in answering the poll. Turn off the flag
- */
- gpstm->polled = 0;
-}
-
-/*
- * gpstm_send - time to send the clock a signal to cough up a time sample
- */
-static void
-gpstm_send(gpstm, cmd)
- struct gpstm_unit *gpstm;
- char *cmd;
-{
-#ifdef DEBUG
- if (debug) {
- printf("gpstm_send(gpstm%d): %s\n", gpstm->unit, cmd);
- }
-#endif
- if (!readonlyclockflag[gpstm->unit]) {
- register int len = strlen(cmd);
-
- if (write(gpstm->io.fd, cmd, len) != len) {
- syslog(LOG_ERR, "gpstm_send: unit %d: %m",
- gpstm->unit);
- gpstm_rep_event(gpstm, CEVNT_FAULT);
- }
- }
-}
-
-/*
- * state machine for initializing the clock
- */
-
-static void
-gpstm_doevent(unit, event)
- int unit;
- enum gpstm_event event;
-{
- struct gpstm_unit *gpstm = gpstm_units[unit];
-
-#ifdef DEBUG
- if (debug) {
- printf("gpstm_doevent(gpstm%d, %d)\n", unit, (int)event);
- }
-#endif
- if (event == e_TS && State[unit] != F51 && State[unit] != F08) {
- gpstm_send(gpstm, "\03\r");
- }
-
- switch (event) {
- case e_Init:
- gpstm_send(gpstm, "F18\r");
- State[unit] = Start;
- break;
- case e_F18:
- gpstm_send(gpstm, "F50\r");
- State[unit] = F18;
- break;
- case e_F50:
- gpstm_send(gpstm, "F51\r");
- State[unit] = F50;
- break;
- case e_F51:
- gpstm_send(gpstm, "F08\r");
- State[unit] = F51;
- break;
- case e_TS:
- /* nothing to send - we like this mode */
- State[unit] = F08;
- break;
- }
-}
-
-static void
-gpstm_initstate(unit) {
- State[unit] = Base; /* just in case */
- gpstm_doevent(unit, e_Init);
-}
-
-/*
- * gpstm_process - process a pile of samples from the clock
- */
-static char
-gpstm_process(gpstm, offset, dispersion)
- struct gpstm_unit *gpstm;
- l_fp *offset;
- u_fp *dispersion;
-{
- register int i, j;
- register U_LONG tmp_ui, tmp_uf;
- int not_median1 = -1; /* XXX correct? */
- int not_median2 = -1; /* XXX correct? */
- int median;
- u_fp disp_tmp, disp_tmp2;
-
- /*
- * This code implements a three-stage median filter. First, we
- * check if the samples are within 125 ms of each other. If not,
- * dump the sample set. We take the median of the three offsets
- * and use that as the sample offset. We take the maximum
- * difference and use that as the sample dispersion. There
- * probably is not much to be gained by a longer filter, since
- * the clock filter in ntp_proto should do its thing.
- */
- disp_tmp2 = 0;
- for (i = 0; i < NCODES-1; i++) {
- for (j = i+1; j < NCODES; j++) {
- tmp_ui = gpstm->offset[i].l_ui;
- tmp_uf = gpstm->offset[i].l_uf;
- M_SUB(tmp_ui, tmp_uf, gpstm->offset[j].l_ui,
- gpstm->offset[j].l_uf);
- if (M_ISNEG(tmp_ui, tmp_uf)) {
- M_NEG(tmp_ui, tmp_uf);
- }
- if (tmp_ui != 0 || tmp_uf > CODEDIFF) {
- return 0;
- }
- disp_tmp = MFPTOFP(0, tmp_uf);
- if (disp_tmp > disp_tmp2) {
- disp_tmp2 = disp_tmp;
- not_median1 = i;
- not_median2 = j;
- }
- }
- }
-
- /*
- * It seems as if all are within 125 ms of each other.
- * Now to determine the median of the three. Whlie the
- * 125 ms check was going on, we also subtly catch the
- * dispersion and set-up for a very easy median calculation.
- * The largest difference between any two samples constitutes
- * the dispersion. The sample not involve in the dispersion is
- * the median sample. EASY!
- */
- if (gpstm->lasttime == 0 || disp_tmp2 > MAXDISPERSE)
- disp_tmp2 = MAXDISPERSE;
- if (not_median1 == 0) {
- if (not_median2 == 1)
- median = 2;
- else
- median = 1;
- } else {
- median = 0;
- }
- *offset = gpstm->offset[median];
- *dispersion = disp_tmp2;
- return 1;
-}
-
-/*
- * gpstm_poll - called by the transmit procedure
- */
-static void
-gpstm_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- struct gpstm_unit *gpstm;
-
- /*
- * You don't need to poll this clock. It puts out timecodes
- * once per second. If asked for a timestamp, take note.
- * The next time a timecode comes in, it will be fed back.
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_poll: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "gpstm_poll: unit %d not in use", unit);
- return;
- }
- gpstm = gpstm_units[unit];
- if ((current_time - gpstm->lasttime) > 150) {
- gpstm->noreply++;
- gpstm_rep_event(gpstm_units[unit], CEVNT_TIMEOUT);
- gpstm_initstate(gpstm->unit);
- }
-
- /*
- * polled every 64 seconds. Ask our receiver to hand in a timestamp.
- */
- gpstm->polled = 1;
- gpstm->polls++;
-}
-
-/*
- * gpstm_control - set fudge factors, return statistics
- */
-static void
-gpstm_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct gpstm_unit *gpstm;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_control: unit %d invalid", unit);
- return;
- }
-
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- fudgefactor1[unit] = in->fudgetime1;
- if (in->haveflags & CLK_HAVETIME2)
- fudgefactor2[unit] = in->fudgetime2;
- if (in->haveflags & CLK_HAVEVAL1)
- stratumtouse[unit] = (u_char)(in->fudgeval1);
- if (in->haveflags & CLK_HAVEVAL2)
- refid[unit] = in->fudgeval2;
- if (in->haveflags & CLK_HAVEFLAG1)
- readonlyclockflag[unit] = in->flags & CLK_FLAG1;
- if (unitinuse[unit]) {
- struct peer *peer;
-
- peer = gpstm_units[unit]->peer;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- }
- }
-
- if (out != 0) {
- memset((char *)out, 0, sizeof (struct refclockstat));
- out->type = REFCLK_GPSTM_TRUETIME;
- out->haveflags = CLK_HAVETIME1 | CLK_HAVETIME2 | CLK_HAVEVAL1 |
- CLK_HAVEVAL2 | CLK_HAVEFLAG1;
- out->clockdesc = DESCRIPTION;
- out->fudgetime1 = fudgefactor1[unit];
- out->fudgetime2 = fudgefactor2[unit];
- out->fudgeval1 = (LONG)stratumtouse[unit];
- out->fudgeval2 = refid[unit];
- out->flags = readonlyclockflag[unit];
- if (unitinuse[unit]) {
- gpstm = gpstm_units[unit];
- out->lencode = gpstm->lencode;
- out->lastcode = gpstm->lastcode;
- out->timereset = current_time - gpstm->timestarted;
- out->polls = gpstm->polls;
- out->noresponse = gpstm->noreply;
- out->badformat = gpstm->badformat;
- out->baddata = gpstm->baddata;
- out->lastevent = gpstm->lastevent;
- out->currentstatus = gpstm->status;
- }
- }
-}
-
-/*
- * gpstm_buginfo - return clock dependent debugging info
- */
-static void
-gpstm_buginfo(unit, bug)
- int unit;
- register struct refclockbug *bug;
-{
- register struct gpstm_unit *gpstm;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "gpstm_buginfo: unit %d invalid", unit);
- return;
- }
-
- if (!unitinuse[unit])
- return;
- gpstm = gpstm_units[unit];
-
- bug->nvalues = 11;
- bug->ntimes = 5;
- if (gpstm->lasttime != 0)
- bug->values[0] = current_time - gpstm->lasttime;
- else
- bug->values[0] = 0;
- bug->values[1] = (U_LONG)gpstm->reason;
- bug->values[2] = (U_LONG)gpstm->year;
- bug->values[3] = (U_LONG)gpstm->day;
- bug->values[4] = (U_LONG)gpstm->hour;
- bug->values[5] = (U_LONG)gpstm->minute;
- bug->values[6] = (U_LONG)gpstm->second;
- bug->values[7] = (U_LONG)gpstm->msec;
- bug->values[8] = gpstm->noreply;
- bug->values[9] = gpstm->yearstart;
- bug->values[10] = gpstm->quality;
- bug->stimes = 0x1c;
- bug->times[0] = gpstm->lastref;
- bug->times[1] = gpstm->lastrec;
- bug->times[2] = gpstm->offset[0];
- bug->times[3] = gpstm->offset[1];
- bug->times[4] = gpstm->offset[2];
-}
-
-#endif /*GPSTM et al*/
diff --git a/usr.sbin/xntpd/xntpd/refclock_old/refclock_leitch.c b/usr.sbin/xntpd/xntpd/refclock_old/refclock_leitch.c
deleted file mode 100644
index 808f65bb4b89..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_old/refclock_leitch.c
+++ /dev/null
@@ -1,709 +0,0 @@
-/*
- * refclock_leitch - clock driver for the Leitch CSD-5300 Master Clock
- */
-#if defined(REFCLOCK) && (defined(LEITCH) || defined(LEITCHCLK) || defined(LEITCHPPS))
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-#ifdef STREAM
-#include <stropts.h>
-#if defined(LEITCHCLK)
-#include <sys/clkdefs.h>
-#endif /* LEITCHCLK */
-#endif /* STREAM */
-
-#if defined (LEITCHPPS)
-#include <sys/ppsclock.h>
-#endif /* LEITCHPPS */
-
-#include "ntp_stdlib.h"
-
-/*
- * Driver for Leitch CSD-5300 Master Clock System
- *
- * COMMANDS:
- * DATE: D <CR>
- * TIME: T <CR>
- * STATUS: S <CR>
- * LOOP: L <CR>
- *
- * FORMAT:
- * DATE: YYMMDD<CR>
- * TIME: <CR>/HHMMSS <CR>/HHMMSS <CR>/HHMMSS <CR>/
- * second bondaried on the stop bit of the <CR>
- * second boundaries at '/' above.
- * STATUS: G (good), D (diag fail), T (time not provided) or
- * P (last phone update failed)
- */
-#define MAXUNITS 1 /* max number of LEITCH units */
-#define LEITCHREFID "ATOM" /* reference id */
-#define LEITCH_DESCRIPTION "Leitch: CSD 5300 Master Clock System Driver"
-#define LEITCH232 "/dev/leitch%d" /* name of radio device */
-#define SPEED232 B300 /* uart speed (300 baud) */
-#define leitch_send(A,M) \
- if (debug) fprintf(stderr,"write leitch %s\n",M); \
- if ((write(A->leitchio.fd,M,sizeof(M)) < 0)) {\
- if (debug) \
- fprintf(stderr, "leitch_send: unit %d send failed\n", A->unit); \
- else \
- syslog(LOG_ERR, "leitch_send: unit %d send failed %m",A->unit);}
-
-#define STATE_IDLE 0
-#define STATE_DATE 1
-#define STATE_TIME1 2
-#define STATE_TIME2 3
-#define STATE_TIME3 4
-
-extern struct event timerqueue[];
-
-/*
- * Imported from ntp_loopfilter module
- */
-extern int fdpps; /* pps file descriptor */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * LEITCH unit control structure
- */
-struct leitchunit {
- struct peer *peer;
- struct event leitchtimer;
- struct refclockio leitchio;
- u_char unit;
- short year;
- short yearday;
- short month;
- short day;
- short hour;
- short second;
- short minute;
- short state;
- u_short fudge1;
- l_fp reftime1;
- l_fp reftime2;
- l_fp reftime3;
- l_fp codetime1;
- l_fp codetime2;
- l_fp codetime3;
- U_LONG yearstart;
-};
-
-/*
- * Function prototypes
- */
-static void leitch_init P((void));
-static int leitch_start P((u_int, struct peer *));
-static void leitch_shutdown P((int));
-static void leitch_poll P((int, struct peer *));
-static void leitch_control P((u_int, struct refclockstat *, struct refclockstat *));
-#define leitch_buginfo noentry
-static void leitch_receive P((struct recvbuf *));
-static void leitch_process P((struct leitchunit *));
-static void leitch_timeout P((struct peer *));
-static int leitch_get_date P((struct recvbuf *, struct leitchunit *));
-static int leitch_get_time P((struct recvbuf *, struct leitchunit *, int));
-static int dysize P((int));
-
-static struct leitchunit leitchunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static U_LONG refid[MAXUNITS];
-
-static char days_in_month [] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
-
-/*
- * Transfer vector
- */
-struct refclock refclock_leitch = {
- leitch_start, leitch_shutdown, leitch_poll,
- leitch_control, leitch_init, leitch_buginfo, NOFLAGS
-};
-
-/*
- * leitch_init - initialize internal leitch driver data
- */
-static void
-leitch_init()
-{
- int i;
-
- memset((char*)leitchunits, 0, sizeof(leitchunits));
- memset((char*)unitinuse, 0, sizeof(unitinuse));
- for (i = 0; i < MAXUNITS; i++)
- memcpy((char *)&refid[i], LEITCHREFID, 4);
-}
-
-/*
- * leitch_shutdown - shut down a LEITCH clock
- */
-static void
-leitch_shutdown(unit)
-int unit;
-{
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_shutdown()\n");
-#endif
-}
-
-/*
- * leitch_poll - called by the transmit procedure
- */
-static void
-leitch_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- struct leitchunit *leitch;
-
- /* start the state machine rolling */
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_poll()\n");
-#endif
- if (unit > MAXUNITS) {
- /* XXXX syslog it */
- return;
- }
-
- leitch = &leitchunits[unit];
-
- if (leitch->state != STATE_IDLE) {
- /* reset and wait for next poll */
- /* XXXX syslog it */
- leitch->state = STATE_IDLE;
- } else {
- leitch_send(leitch,"D\r");
- leitch->state = STATE_DATE;
- }
-}
-
-static void
-leitch_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR,
- "leitch_control: unit %d invalid", unit);
- return;
- }
-
- if (in) {
- if (in->haveflags & CLK_HAVEVAL1)
- stratumtouse[unit] = (u_char)(in->fudgeval1);
- if (in->haveflags & CLK_HAVEVAL2)
- refid[unit] = in->fudgeval2;
- if (unitinuse[unit]) {
- struct peer *peer;
-
- peer = (&leitchunits[unit])->peer;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- }
- }
-
- if (out) {
- memset((char *)out, 0, sizeof (struct refclockstat));
- out->type = REFCLK_ATOM_LEITCH;
- out->haveflags = CLK_HAVEVAL1 | CLK_HAVEVAL2;
- out->fudgeval1 = (LONG)stratumtouse[unit];
- out->fudgeval2 = refid[unit];
- out->lastcode = "";
- out->clockdesc = LEITCH_DESCRIPTION;
- }
-}
-
-/*
- * leitch_start - open the LEITCH devices and initialize data for processing
- */
-static int
-leitch_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- struct leitchunit *leitch;
- int fd232;
- char leitchdev[20];
-
- /*
- * Check configuration info.
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "leitch_start: unit %d invalid", unit);
- return (0);
- }
-
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "leitch_start: unit %d in use", unit);
- return (0);
- }
-
- /*
- * Open serial port.
- */
- (void) sprintf(leitchdev, LEITCH232, unit);
- fd232 = open(leitchdev, O_RDWR, 0777);
- if (fd232 == -1) {
- syslog(LOG_ERR,
- "leitch_start: open of %s: %m", leitchdev);
- return (0);
- }
-
- leitch = &leitchunits[unit];
- memset((char*)leitch, 0, sizeof(*leitch));
-
-#if defined(HAVE_SYSV_TTYS)
- /*
- * System V serial line parameters (termio interface)
- *
- */
- { struct termio ttyb;
- if (ioctl(fd232, TCGETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TCGETA): %m", leitchdev);
- goto screwed;
- }
- ttyb.c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyb.c_oflag = 0;
- ttyb.c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyb.c_lflag = ICANON;
- ttyb.c_cc[VERASE] = ttyb.c_cc[VKILL] = '\0';
- if (ioctl(fd232, TCSETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TCSETA): %m", leitchdev);
- goto screwed;
- }
- }
-#endif /* HAVE_SYSV_TTYS */
-#if defined(HAVE_TERMIOS)
- /*
- * POSIX serial line parameters (termios interface)
- *
- * The LEITCHCLK option provides timestamping at the driver level.
- * It requires the tty_clk streams module.
- *
- * The LEITCHPPS option provides timestamping at the driver level.
- * It uses a 1-pps signal and level converter (gadget box) and
- * requires the ppsclock streams module and SunOS 4.1.1 or
- * later.
- */
- { struct termios ttyb, *ttyp;
-
- ttyp = &ttyb;
- if (tcgetattr(fd232, ttyp) < 0) {
- syslog(LOG_ERR,
- "leitch_start: tcgetattr(%s): %m", leitchdev);
- goto screwed;
- }
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- syslog(LOG_ERR,
- "leitch_start: tcsetattr(%s): %m", leitchdev);
- goto screwed;
- }
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- syslog(LOG_ERR,
- "leitch_start: tcflush(%s): %m", leitchdev);
- goto screwed;
- }
- }
-#endif /* HAVE_TERMIOS */
-#ifdef STREAM
-#if defined(LEITCHCLK)
- if (ioctl(fd232, I_PUSH, "clk") < 0)
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, I_PUSH, clk): %m", leitchdev);
- if (ioctl(fd232, CLK_SETSTR, "\n") < 0)
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, CLK_SETSTR): %m", leitchdev);
-#endif /* LEITCHCLK */
-#if defined(LEITCHPPS)
- if (ioctl(fd232, I_PUSH, "ppsclock") < 0)
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, I_PUSH, ppsclock): %m", leitchdev);
- else
- fdpps = fd232;
-#endif /* LEITCHPPS */
-#endif /* STREAM */
-#if defined(HAVE_BSD_TTYS)
- /*
- * 4.3bsd serial line parameters (sgttyb interface)
- *
- * The LEITCHCLK option provides timestamping at the driver level.
- * It requires the tty_clk line discipline and 4.3bsd or later.
- */
- { struct sgttyb ttyb;
-#if defined(LEITCHCLK)
- int ldisc = CLKLDISC;
-#endif /* LEITCHCLK */
-
- if (ioctl(fd232, TIOCGETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TIOCGETP): %m", leitchdev);
- goto screwed;
- }
- ttyb.sg_ispeed = ttyb.sg_ospeed = SPEED232;
-#if defined(LEITCHCLK)
- ttyb.sg_erase = ttyb.sg_kill = '\r';
- ttyb.sg_flags = RAW;
-#else
- ttyb.sg_erase = ttyb.sg_kill = '\0';
- ttyb.sg_flags = EVENP|ODDP|CRMOD;
-#endif /* LEITCHCLK */
- if (ioctl(fd232, TIOCSETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TIOCSETP): %m", leitchdev);
- goto screwed;
- }
-#if defined(LEITCHCLK)
- if (ioctl(fd232, TIOCSETD, &ldisc) < 0) {
- syslog(LOG_ERR,
- "leitch_start: ioctl(%s, TIOCSETD): %m",leitchdev);
- goto screwed;
- }
-#endif /* LEITCHCLK */
- }
-#endif /* HAVE_BSD_TTYS */
-
- /*
- * Set up the structures
- */
- leitch->peer = peer;
- leitch->unit = unit;
- leitch->state = STATE_IDLE;
- leitch->fudge1 = 15; /* 15ms */
-
- leitch->leitchio.clock_recv = leitch_receive;
- leitch->leitchio.srcclock = (caddr_t) leitch;
- leitch->leitchio.datalen = 0;
- leitch->leitchio.fd = fd232;
- if (!io_addclock(&leitch->leitchio)) {
- goto screwed;
- }
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success. Note that root delay and root dispersion are
- * always zero for this clock.
- */
- peer->precision = 0;
- peer->rootdelay = 0;
- peer->rootdispersion = 0;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- unitinuse[unit] = 1;
- return(1);
-
- /*
- * Something broke; abandon ship.
- */
-screwed:
- close(fd232);
- return(0);
-}
-
-/*
- * leitch_receive - receive data from the serial interface on a leitch
- * clock
- */
-static void
-leitch_receive(rbufp)
- struct recvbuf *rbufp;
-{
- struct leitchunit *leitch = (struct leitchunit *)rbufp->recv_srcclock;
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_recieve(%*.*s)\n",
- rbufp->recv_length, rbufp->recv_length,
- rbufp->recv_buffer);
-#endif
- if (rbufp->recv_length != 7)
- return; /* The date is return with a trailing newline,
- discard it. */
-
- switch (leitch->state) {
- case STATE_IDLE: /* unexpected, discard and resync */
- return;
- case STATE_DATE:
- if (!leitch_get_date(rbufp,leitch)) {
- leitch->state = STATE_IDLE;
- break;
- }
- leitch_send(leitch,"T\r");
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%u\n",leitch->yearday);
-#endif
- leitch->state = STATE_TIME1;
- break;
- case STATE_TIME1:
- if (!leitch_get_time(rbufp,leitch,1)) {
- }
- if (!clocktime(leitch->yearday,leitch->hour,leitch->minute,
- leitch->second, 0, rbufp->recv_time.l_ui,
- &leitch->yearstart, &leitch->reftime1.l_ui)) {
- leitch->state = STATE_IDLE;
- break;
- }
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%u\n", leitch->reftime1.l_ui);
-#endif
- MSUTOTSF(leitch->fudge1, leitch->reftime1.l_uf);
- leitch->codetime1 = rbufp->recv_time;
- leitch->state = STATE_TIME2;
- break;
- case STATE_TIME2:
- if (!leitch_get_time(rbufp,leitch,2)) {
- }
- if (!clocktime(leitch->yearday,leitch->hour,leitch->minute,
- leitch->second, 0, rbufp->recv_time.l_ui,
- &leitch->yearstart, &leitch->reftime2.l_ui)) {
- leitch->state = STATE_IDLE;
- break;
- }
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%u\n", leitch->reftime2.l_ui);
-#endif
- MSUTOTSF(leitch->fudge1, leitch->reftime2.l_uf);
- leitch->codetime2 = rbufp->recv_time;
- leitch->state = STATE_TIME3;
- break;
- case STATE_TIME3:
- if (!leitch_get_time(rbufp,leitch,3)) {
- }
- if (!clocktime(leitch->yearday,leitch->hour,leitch->minute,
- leitch->second, 0, rbufp->recv_time.l_ui,
- &leitch->yearstart, &leitch->reftime3.l_ui)) {
- leitch->state = STATE_IDLE;
- break;
- }
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "%u\n", leitch->reftime3.l_ui);
-#endif
- MSUTOTSF(leitch->fudge1, leitch->reftime3.l_uf);
- leitch->codetime3 = rbufp->recv_time;
- leitch_process(leitch);
- leitch->state = STATE_IDLE;
- break;
- default:
- syslog(LOG_ERR,
- "leitech_receive: invalid state %d unit %d",
- leitch->state, leitch->unit);
- }
-}
-
-/*
- * leitch_process - process a pile of samples from the clock
- *
- * This routine uses a three-stage median filter to calculate offset and
- * dispersion. reduce jitter. The dispersion is calculated as the span
- * of the filter (max - min), unless the quality character (format 2) is
- * non-blank, in which case the dispersion is calculated on the basis of
- * the inherent tolerance of the internal radio oscillator, which is
- * +-2e-5 according to the radio specifications.
- */
-static void
-leitch_process(leitch)
- struct leitchunit *leitch;
-{
- l_fp off;
- s_fp delay;
- l_fp codetime;
- l_fp tmp_fp;
- int isinsync = 1;
- u_fp dispersion = 10;
-
- delay = 20;
-
- codetime = leitch->codetime3;
-
- off = leitch->reftime1;
- L_SUB(&off,&leitch->codetime1);
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr,"%u %u %u %u %d %d\n",
- leitch->codetime1.l_ui, leitch->codetime1.l_uf,
- leitch->reftime1.l_ui, leitch->reftime1.l_uf,
- off.l_ui, off.l_uf);
-#endif
- tmp_fp = leitch->reftime2;
- L_SUB(&tmp_fp,&leitch->codetime2);
- if (L_ISGEQ(&off,&tmp_fp))
- off = tmp_fp;
-#ifdef DEBUG
- if (debug)
- fprintf(stderr,"%u %u %u %u %d %d\n",
- leitch->codetime2.l_ui, leitch->codetime2.l_uf,
- leitch->reftime2.l_ui, leitch->reftime2.l_uf,
- off.l_ui, off.l_uf);
-#endif
- tmp_fp = leitch->reftime3;
- L_SUB(&tmp_fp,&leitch->codetime3);
-
- if (L_ISGEQ(&off,&tmp_fp))
- off = tmp_fp;
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr,"%u %u %u %u %d %d\n",
- leitch->codetime3.l_ui, leitch->codetime3.l_uf,
- leitch->reftime3.l_ui, leitch->reftime3.l_uf,
- off.l_ui, off.l_uf);
-#endif
- refclock_receive(leitch->peer, &off, 0, dispersion, &codetime,
- &codetime, isinsync);
-}
-
-/*
- * leitch_timeout
- */
-static void
-leitch_timeout(fp)
- struct peer *fp;
-{
-
-#ifdef DEBUG
- if (debug)
- fprintf(stderr, "leitch_timeout()\n");
-#endif
-
-#ifdef NOTYET
- { struct leitchunit *leitch = (struct leitchunit *)fp;
-
- switch(leitch->state) {
- case STATE_IDLE:
- leitch_send(leitch,"D\r");
- leitch->state = STATE_DATE;
- break;
- case STATE_DATE:
- leitch_send(leitch,"T\r");
- leitch->state = STATE_TIME1;
- break;
- case STATE_TIME1:
- case STATE_TIME2:
- case STATE_TIME3:
- default:
- break;
- }
-
- leitch->leitchtimer.event_time += 30;
- TIMER_ENQUEUE(timerqueue, &leitch->leitchtimer);
- }
-#endif /* NOTYET */
-}
-
-/*
- * dysize
- */
-static int
-dysize(year)
-int year;
-{
- if (year%4) { /* not a potential leap year */
- return (365);
- } else {
- if (year % 100) { /* is a leap year */
- return (366);
- } else {
- if (year % 400) {
- return (365);
- } else {
- return (366);
- }
- }
- }
-}
-
-static int
-leitch_get_date(rbufp,leitch)
- struct recvbuf *rbufp;
- struct leitchunit *leitch;
-{
- int i;
-
- if (rbufp->recv_length < 6)
- return(0);
-#define BAD(A) (rbufp->recv_buffer[A] < '0') || (rbufp->recv_buffer[A] > '9')
- if (BAD(0)||BAD(1)||BAD(2)||BAD(3)||BAD(4)||BAD(5))
- return(0);
-#define ATOB(A) ((rbufp->recv_buffer[A])-'0')
- leitch->year = ATOB(0)*10 + ATOB(1);
- leitch->month = ATOB(2)*10 + ATOB(3);
- leitch->day = ATOB(4)*10 + ATOB(5);
-
- /* sanity checks */
- if (leitch->month > 12)
- return(0);
- if (leitch->day > days_in_month[leitch->month-1])
- return(0);
-
- /* calculate yearday */
- i = 0;
- leitch->yearday = leitch->day;
-
- while ( i < (leitch->month-1) )
- leitch->yearday += days_in_month[i++];
-
- if ((dysize((leitch->year>90?1900:2000)+leitch->year)==365) &&
- leitch->month > 2)
- leitch->yearday--;
-
- return(1);
-}
-
-/*
- * leitch_get_time
- */
-static int
-leitch_get_time(rbufp,leitch,which)
- struct recvbuf *rbufp;
- struct leitchunit *leitch;
- int which;
-{
- if (BAD(0)||BAD(1)||BAD(2)||BAD(3)||BAD(4)||BAD(5))
- return(0);
- leitch->hour = ATOB(0)*10 +ATOB(1);
- leitch->minute = ATOB(2)*10 +ATOB(3);
- leitch->second = ATOB(4)*10 +ATOB(5);
-
- if ((leitch->hour > 23) || (leitch->minute > 60) ||
- (leitch->second > 60))
- return(0);
- return(1);
-}
-
-#endif
diff --git a/usr.sbin/xntpd/xntpd/refclock_old/refclock_msfees.c b/usr.sbin/xntpd/xntpd/refclock_old/refclock_msfees.c
deleted file mode 100644
index 255d74f285de..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_old/refclock_msfees.c
+++ /dev/null
@@ -1,1575 +0,0 @@
-/* refclock_ees - clock driver for the EES M201 receiver */
-
-#if defined(REFCLOCK) && defined(MSFEESPPS) && defined(STREAM)
-
-/* Currently REQUIRES STREAM and PPSCD. CLK and CBREAK modes
- * were removed as the code was overly hairy, they weren't in use
- * (hence probably didn't work). Still in RCS file at cl.cam.ac.uk
- */
-
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_calendar.h"
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-#include <termios.h>
-#include <stropts.h>
-#include <sys/ppsclock.h>
-#include "ntp_stdlib.h"
-
- /*
- fudgefactor = fudgetime1;
- os_delay = fudgetime2;
- offset_fudge = os_delay + fudgefactor + inherent_delay;
- stratumtouse = fudgeval1 & 0xf
- debug = fudgeval2;
- sloppyclockflag = flags & CLK_FLAG1;
- 1 log smoothing summary when processing sample
- 4 dump the buffer from the clock
- 8 EIOGETKD the last n uS time stamps
- if (flags & CLK_FLAG2 && unitinuse) ees->leaphold = 0;
- ees->dump_vals = flags & CLK_FLAG3;
- ees->usealldata = flags & CLK_FLAG4;
-
-
- bug->values[0] = (ees->lasttime) ? current_time - ees->lasttime : 0;
- bug->values[1] = (ees->clocklastgood)?current_time-ees->clocklastgood:0;
- bug->values[2] = (u_long)ees->status;
- bug->values[3] = (u_long)ees->lastevent;
- bug->values[4] = (u_long)ees->reason;
- bug->values[5] = (u_long)ees->nsamples;
- bug->values[6] = (u_long)ees->codestate;
- bug->values[7] = (u_long)ees->day;
- bug->values[8] = (u_long)ees->hour;
- bug->values[9] = (u_long)ees->minute;
- bug->values[10] = (u_long)ees->second;
- bug->values[11] = (u_long)ees->tz;
- bug->values[12] = ees->yearstart;
- bug->values[13] = (ees->leaphold > current_time) ?
- ees->leaphold - current_time : 0;
- bug->values[14] = inherent_delay[unit].l_uf;
- bug->values[15] = offset_fudge[unit].l_uf;
-
- bug->times[0] = ees->reftime;
- bug->times[1] = ees->arrvtime;
- bug->times[2] = ees->lastsampletime;
- bug->times[3] = ees->offset;
- bug->times[4] = ees->lowoffset;
- bug->times[5] = ees->highoffset;
- bug->times[6] = inherent_delay[unit];
- bug->times[8] = os_delay[unit];
- bug->times[7] = fudgefactor[unit];
- bug->times[9] = offset_fudge[unit];
- bug->times[10]= ees->yearstart, 0;
- */
-
-/* This should support the use of an EES M201 receiver with RS232
- * output (modified to transmit time once per second).
- *
- * For the format of the message sent by the clock, see the EESM_
- * definitions below.
- *
- * It appears to run free for an integral number of minutes, until the error
- * reaches 4mS, at which point it steps at second = 01.
- * It appears that sometimes it steps 4mS (say at 7 min interval),
- * then the next minute it decides that it was an error, so steps back.
- * On the next minute it steps forward again :-(
- * This is typically 16.5uS/S then 3975uS at the 4min re-sync,
- * or 9.5uS/S then 3990.5uS at a 7min re-sync,
- * at which point it may loose the "00" second time stamp.
- * I assume that the most accurate time is just AFTER the re-sync.
- * Hence remember the last cycle interval,
- *
- * Can run in any one of:
- *
- * PPSCD PPS signal sets CD which interupts, and grabs the current TOD
- * (sun) *in the interupt code*, so as to avoid problems with
- * the STREAMS scheduling.
- *
- * It appears that it goes 16.5 uS slow each second, then every 4 mins it
- * generates no "00" second tick, and gains 3975 uS. Ho Hum ! (93/2/7)
- */
-
-/* Definitions */
-#ifndef MAXUNITS
-#define MAXUNITS 4 /* maximum number of EES units permitted */
-#endif
-
-#ifndef EES232
-#define EES232 "/dev/ees%d" /* Device to open to read the data */
-#endif
-
-/* Other constant stuff */
-#ifndef EESPRECISION
-#define EESPRECISION (-10) /* what the heck - 2**-10 = 1ms */
-#endif
-#ifndef EESREFID
-#define EESREFID "MSF\0" /* String to identify the clock */
-#endif
-#ifndef EESHSREFID
-#define EESHSREFID (0x7f7f0000 | ((REFCLK_MSF_EES) << 8)) /* Numeric refid */
-#endif
-
-/* Description of clock */
-#define EESDESCRIPTION "EES M201 MSF Receiver"
-
-/* Speed we run the clock port at. If this is changed the UARTDELAY
- * value should be recomputed to suit.
- */
-#ifndef SPEED232
-#define SPEED232 B9600 /* 9600 baud */
-#endif
-
-/* What is the inherent delay for this mode of working, i.e. when is the
- * data time stamped.
- */
-#define SAFETY_SHIFT 10 /* Split the shift to avoid overflow */
-#define BITS_TO_L_FP(bits, baud) \
- (((((bits)*2 +1) << (FRACTION_PREC-SAFETY_SHIFT)) / (2*baud)) << SAFETY_SHIFT)
-#define INH_DELAY_CBREAK BITS_TO_L_FP(119, 9600)
-#define INH_DELAY_PPS BITS_TO_L_FP( 0, 9600)
-
-#ifndef STREAM_PP1
-#define STREAM_PP1 "ppsclocd\0<-- patch space for module name1 -->"
-#endif
-#ifndef STREAM_PP2
-#define STREAM_PP2 "ppsclock\0<-- patch space for module name2 -->"
-#endif
-
-/* Offsets of the bytes of the serial line code. The clock gives
- * local time with a GMT/BST indication. The EESM_ definitions
- * give offsets into ees->lastcode.
- */
-#define EESM_CSEC 0 /* centiseconds - always zero in our clock */
-#define EESM_SEC 1 /* seconds in BCD */
-#define EESM_MIN 2 /* minutes in BCD */
-#define EESM_HOUR 3 /* hours in BCD */
-#define EESM_DAYWK 4 /* day of week (Sun = 0 etc) */
-#define EESM_DAY 5 /* day of month in BCD */
-#define EESM_MON 6 /* month in BCD */
-#define EESM_YEAR 7 /* year MOD 100 in BCD */
-#define EESM_LEAP 8 /* 0x0f if leap year, otherwise zero */
-#define EESM_BST 9 /* 0x03 if BST, 0x00 if GMT */
-#define EESM_MSFOK 10 /* 0x3f if radio good, otherwise zero */
- /* followed by a frame alignment byte (0xff) /
- / which is not put into the lastcode buffer*/
-
-/* Length of the serial time code, in characters. The first length
- * is less the frame alignment byte.
- */
-#define LENEESPRT (EESM_MSFOK+1)
-#define LENEESCODE (LENEESPRT+1)
-
-/* Code state. */
-#define EESCS_WAIT 0 /* waiting for start of timecode */
-#define EESCS_GOTSOME 1 /* have an incomplete time code buffered */
-
-/* Default fudge factor and character to receive */
-#define DEFFUDGETIME 0 /* Default user supplied fudge factor */
-#ifndef DEFOSTIME
-#define DEFOSTIME 0 /* Default OS delay -- passed by Make ? */
-#endif
-#define DEFINHTIME INH_DELAY_PPS /* inherent delay due to sample point*/
-
-/* Limits on things. Reduce the number of samples to SAMPLEREDUCE by median
- * elimination. If we're running with an accurate clock, chose the BESTSAMPLE
- * as the estimated offset, otherwise average the remainder.
- */
-#define FULLSHIFT 6 /* NCODES root 2 */
-#define NCODES (1<< FULLSHIFT) /* 64 */
-#define REDUCESHIFT (FULLSHIFT -1) /* SAMPLEREDUCE root 2 */
-
-/* Towards the high ( Why ?) end of half */
-#define BESTSAMPLE ((samplereduce * 3) /4) /* 24 */
-
-/* Leap hold time. After a leap second the clock will no longer be
- * reliable until it resynchronizes. Hope 40 minutes is enough. */
-#define EESLEAPHOLD (40 * 60)
-
-#define EES_STEP_F (1 << 24) /* the receiver steps in units of about 4ms */
-#define EES_STEP_F_GRACE (EES_STEP_F/8) /*Allow for slop of 1/8 which is .5ms*/
-#define EES_STEP_NOTE (1 << 21)/* Log any unexpected jumps, say .5 ms .... */
-#define EES_STEP_NOTES 50 /* Only do a limited number */
-#define MAX_STEP 16 /* Max number of steps to remember */
-
-/* debug is a bit mask of debugging that is wanted */
-#define DB_SYSLOG_SMPLI 0x0001
-#define DB_SYSLOG_SMPLE 0x0002
-#define DB_SYSLOG_SMTHI 0x0004
-#define DB_SYSLOG_NSMTHE 0x0008
-#define DB_SYSLOG_NSMTHI 0x0010
-#define DB_SYSLOG_SMTHE 0x0020
-#define DB_PRINT_EV 0x0040
-#define DB_PRINT_CDT 0x0080
-#define DB_PRINT_CDTC 0x0100
-#define DB_SYSLOG_KEEPD 0x0800
-#define DB_SYSLOG_KEEPE 0x1000
-#define DB_LOG_DELTAS 0x2000
-#define DB_PRINT_DELTAS 0x4000
-#define DB_LOG_AWAITMORE 0x8000
-#define DB_LOG_SAMPLES 0x10000
-#define DB_NO_PPS 0x20000
-#define DB_INC_PPS 0x40000
-#define DB_DUMP_DELTAS 0x80000
-
-struct eesunit { /* EES unit control structure. */
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- l_fp reftime; /* reference time */
- l_fp lastsampletime; /* time as in txt from last EES msg */
- l_fp arrvtime; /* Time at which pkt arrived */
- l_fp codeoffsets[NCODES]; /* the time of arrival of 232 codes */
- l_fp offset; /* chosen offset (for clkbug) */
- l_fp lowoffset; /* lowest sample offset (for clkbug) */
- l_fp highoffset; /* highest " " (for clkbug) */
- char lastcode[LENEESCODE+6]; /* last time code we received */
- u_long lasttime; /* last time clock heard from */
- u_long clocklastgood; /* last time good radio seen */
- u_char lencode; /* length of code in buffer */
- u_char nsamples; /* number of samples we've collected */
- u_char codestate; /* state of 232 code reception */
- u_char unit; /* unit number for this guy */
- u_char status; /* clock status */
- u_char lastevent; /* last clock event */
- u_char reason; /* reason for last abort */
- u_char hour; /* hour of day */
- u_char minute; /* minute of hour */
- u_char second; /* seconds of minute */
- char tz; /* timezone from clock */
- u_char ttytype; /* method used */
- u_char dump_vals; /* Should clock values be dumped */
- u_char usealldata; /* Use ALL samples */
- u_short day; /* day of year from last code */
- u_long yearstart; /* start of current year */
- u_long leaphold; /* time of leap hold expiry */
- u_long badformat; /* number of bad format codes */
- u_long baddata; /* number of invalid time codes */
- u_long timestarted; /* time we started this */
- long last_pps_no; /* The serial # of the last PPS */
- char fix_pending; /* Is a "sync to time" pending ? */
- /* Fine tuning - compensate for 4 mS ramping .... */
- l_fp last_l; /* last time stamp */
- u_char last_steps[MAX_STEP]; /* Most recent n steps */
- int best_av_step; /* Best guess at average step */
- char best_av_step_count; /* # of steps over used above */
- char this_step; /* Current pos in buffer */
- int last_step_late; /* How late the last step was (0-59) */
- long jump_fsecs; /* # of fractions of a sec last jump */
- u_long last_step; /* time of last step */
- int last_step_secs; /* Number of seconds in last step */
- int using_ramp; /* 1 -> noemal, -1 -> over stepped */
-};
-#define last_sec last_l.l_ui
-#define last_sfsec last_l.l_f
-#define this_uisec ((ees->arrvtime).l_ui)
-#define this_sfsec ((ees->arrvtime).l_f)
-#define msec(x) ((x) / (1<<22))
-#define LAST_STEPS (sizeof ees->last_steps / sizeof ees->last_steps[0])
-#define subms(x) ((((((x < 0) ? (-(x)) : (x)) % (1<<22))/2) * 625) / (1<<(22 -5)))
-
-/* Bitmask for what methods to try to use -- currently only PPS enabled */
-#define T_CBREAK 1
-#define T_PPS 8
-/* macros to test above */
-#define is_cbreak(x) ((x)->ttytype & T_CBREAK)
-#define is_pps(x) ((x)->ttytype & T_PPS)
-#define is_any(x) ((x)->ttytype)
-
-#define CODEREASON 20 /* reason codes */
-
-/* Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back. */
-static struct eesunit *eesunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/* Keep the fudge factors separately so they can be set even
- * when no clock is configured. */
-static l_fp inherent_delay[MAXUNITS]; /* when time stamp is taken */
-static l_fp fudgefactor[MAXUNITS]; /* fudgetime1 */
-static l_fp os_delay[MAXUNITS]; /* fudgetime2 */
-static l_fp offset_fudge[MAXUNITS]; /* Sum of above */
-static u_char stratumtouse[MAXUNITS];
-static u_char sloppyclockflag[MAXUNITS];
-
-static int deltas[60];
-
-static l_fp acceptable_slop; /* = { 0, 1 << (FRACTION_PREC -2) }; */
-static l_fp onesec; /* = { 1, 0 }; */
-
-/* Imported from the timer module */
-extern u_long current_time;
-
-#ifdef DEBUG
-static int debug;
-#endif
-
-#ifndef DUMP_BUF_SIZE /* Size of buffer to be used by dump_buf */
-#define DUMP_BUF_SIZE 10112
-#endif
-
-/* ees_reset - reset the count back to zero */
-#define ees_reset(ees) (ees)->nsamples = 0; \
- (ees)->codestate = EESCS_WAIT
-
-/* ees_event - record and report an event */
-#define ees_event(ees, evcode) if ((ees)->status != (u_char)(evcode)) \
- ees_report_event((ees), (evcode))
-
-/* Find the precision of the system clock by reading it */
-#define USECS 1000000
-#define MINSTEP 5 /* some systems increment uS on each call */
-#define MAXLOOPS (USECS/9)
-static int ees_get_precision()
-{
- struct timeval tp;
- struct timezone tzp;
- long last;
- int i;
- long diff;
- long val;
- gettimeofday(&tp, &tzp);
-
- last = tp.tv_usec;
- for (i=0; i< 100000; i++) {
- gettimeofday(&tp, &tzp);
- diff = tp.tv_usec - last;
- if (diff < 0) diff += USECS;
- if (diff > MINSTEP) break;
- last = tp.tv_usec;
- }
- syslog(LOG_INFO,
- "I: ees: precision calculation given %duS after %d loop%s",
- diff, i, (i==1) ? "" : "s");
-
- if (i == 0) return -20 /* assume 1uS */;
- if (i >= MAXLOOPS) return EESPRECISION /* Lies ! */;
- for (i=0, val=USECS; val > 0; i--, val /= 2) if (diff > val) return i;
- return EESPRECISION /* Lies ! */;
-}
-
-static void dump_buf(coffs, from, to, text)
-l_fp *coffs;
-int from;
-int to;
-char *text;
-{
- char buff[DUMP_BUF_SIZE + 80];
- int i;
- register char *ptr = buff;
- sprintf(ptr, text);
- for (i=from; i<to; i++)
- { while (*ptr) ptr++;
- if ((ptr-buff) > DUMP_BUF_SIZE) syslog(LOG_DEBUG, "D: %s", ptr=buff);
- sprintf(ptr, " %06d", ((int)coffs[i].l_f) / 4295);
- }
- syslog(LOG_DEBUG, "D: %s", buff);
-}
-
-/* msfees_init - initialize internal ees driver data */
-static void msfees_init()
-{
- register int i;
- /* Just zero the data arrays */
- memset((char *)eesunits, 0, sizeof eesunits);
- memset((char *)unitinuse, 0, sizeof unitinuse);
-
- acceptable_slop.l_ui = 0;
- acceptable_slop.l_uf = 1 << (FRACTION_PREC -2);
-
- onesec.l_ui = 1;
- onesec.l_uf = 0;
-
- /* Initialize fudge factors to default. */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor[i].l_ui = 0;
- fudgefactor[i].l_uf = DEFFUDGETIME;
- os_delay[i].l_ui = 0;
- os_delay[i].l_uf = DEFOSTIME;
- inherent_delay[i].l_ui = 0;
- inherent_delay[i].l_uf = DEFINHTIME;
- offset_fudge[i] = os_delay[i];
- L_ADD(&offset_fudge[i], &fudgefactor[i]);
- L_ADD(&offset_fudge[i], &inherent_delay[i]);
- stratumtouse[i] = 0;
- sloppyclockflag[i] = 0;
- }
-}
-
-
-/* msfees_start - open the EES devices and initialize data for processing */
-static int msfees_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- register struct eesunit *ees;
- register int i;
- int fd232 = -1;
- char eesdev[20];
- struct termios ttyb, *ttyp;
- static void ees_receive();
- extern int io_addclock();
- extern void io_closeclock();
- extern char *emalloc();
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "ees clock: unit number %d invalid (max %d)",
- unit, MAXUNITS-1);
- return 0;
- }
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "ees clock: unit number %d in use", unit);
- return 0;
- }
-
- /* Unit okay, attempt to open the devices. We do them both at
- * once to make sure we can */
- (void) sprintf(eesdev, EES232, unit);
-
- fd232 = open(eesdev, O_RDWR, 0777);
- if (fd232 == -1) {
- syslog(LOG_ERR, "ees clock: open of %s failed: %m", eesdev);
- return 0;
- }
-
-#ifdef TIOCEXCL
- /* Set for exclusive use */
- if (ioctl(fd232, TIOCEXCL, (char *)0) < 0) {
- syslog(LOG_ERR, "ees clock: ioctl(%s, TIOCEXCL): %m", eesdev);
- goto screwed;
- }
-#endif
-
- /* STRIPPED DOWN VERSION: Only PPS CD is supported at the moment */
-
- /* Set port characteristics. If we don't have a STREAMS module or
- * a clock line discipline, cooked mode is just usable, even though it
- * strips the top bit. The only EES byte which uses the top
- * bit is the year, and we don't use that anyway. If we do
- * have the line discipline, we choose raw mode, and the
- * line discipline code will block up the messages.
- */
-
- /* STIPPED DOWN VERSION: Only PPS CD is supported at the moment */
-
- ttyp = &ttyb;
- if (tcgetattr(fd232, ttyp) < 0) {
- syslog(LOG_ERR, "msfees_start: tcgetattr(%s): %m", eesdev);
- goto screwed;
- }
-
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_oflag = 0;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- syslog(LOG_ERR, "msfees_start: tcsetattr(%s): %m", eesdev);
- goto screwed;
- }
-
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- syslog(LOG_ERR, "msfees_start: tcflush(%s): %m", eesdev);
- goto screwed;
- }
-
- inherent_delay[unit].l_uf = INH_DELAY_PPS;
-
- /* offset fudge (how *late* the timestamp is) = fudge + os delays */
- offset_fudge[unit] = os_delay[unit];
- L_ADD(&offset_fudge[unit], &fudgefactor[unit]);
- L_ADD(&offset_fudge[unit], &inherent_delay[unit]);
-
- /* Looks like this might succeed. Find memory for the structure.
- * Look to see if there are any unused ones, if not we malloc() one.
- */
- if (eesunits[unit] != 0) /* The one we want is okay */
- ees = eesunits[unit];
- else {
- /* Look for an unused, but allocated struct */
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && eesunits[i] != 0)
- break;
- }
-
- if (i < MAXUNITS) { /* Reclaim this one */
- ees = eesunits[i];
- eesunits[i] = 0;
- } /* no spare -- make a new one */
- else ees = (struct eesunit *) emalloc(sizeof(struct eesunit));
- }
- memset((char *)ees, 0, sizeof(struct eesunit));
- eesunits[unit] = ees;
-
- /* Set up the structures */
- ees->peer = peer;
- ees->unit = (u_char)unit;
- ees->timestarted= current_time;
- ees->ttytype = 0;
- ees->io.clock_recv= ees_receive;
- ees->io.srcclock= (caddr_t)ees;
- ees->io.datalen = 0;
- ees->io.fd = fd232;
-
- /* Okay. Push one of the two (linked into the kernel, or dynamically
- * loaded) STREAMS module, and give it to the I/O code to start
- * receiving stuff.
- */
-
- {
- int rc1;
- /* Pop any existing onews first ... */
- while (ioctl(fd232, I_POP, 0 ) >= 0) ;
-
- /* Now try pushing either of the possible modules */
- if ((rc1=ioctl(fd232, I_PUSH, STREAM_PP1)) < 0 &&
- ioctl(fd232, I_PUSH, STREAM_PP2) < 0) {
- syslog(LOG_ERR,
- "ees clock: Push of `%s' and `%s' to %s failed %m",
- STREAM_PP1, STREAM_PP2, eesdev);
- goto screwed;
- }
- else {
- syslog(LOG_INFO, "I: ees clock: PUSHed %s on %s",
- (rc1 >= 0) ? STREAM_PP1 : STREAM_PP2, eesdev);
- ees->ttytype |= T_PPS;
- }
- }
-
- /* Add the clock */
- if (!io_addclock(&ees->io)) {
- /* Oh shit. Just close and return. */
- syslog(LOG_ERR, "ees clock: io_addclock(%s): %m", eesdev);
- goto screwed;
- }
-
-
- /* All done. Initialize a few random peer variables, then
- * return success. */
- peer->precision = ees_get_precision();
- peer->stratum = stratumtouse[unit];
- peer->rootdelay = 0; /* ++++ */
- peer->rootdispersion = 0; /* ++++ */
- if (stratumtouse[unit] <= 1) {
- memmove((char *)&peer->refid, EESREFID, 4);
- if (unit > 0 && unit < 10)
- ((char *)&peer->refid)[3] = '0' + unit;
- } else {
- peer->refid = htonl(EESHSREFID);
- }
- unitinuse[unit] = 1;
- syslog(LOG_ERR, "ees clock: %s OK on %d", eesdev, unit);
- return (1);
-
-screwed:
- if (fd232 != -1)
- (void) close(fd232);
- return (0);
-}
-
-
-/* msfees_shutdown - shut down a EES clock */
-static void msfees_shutdown(unit)
- int unit;
-{
- register struct eesunit *ees;
- extern void io_closeclock();
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR,
- "ees clock: INTERNAL ERROR, unit number %d invalid (max %d)",
- unit, MAXUNITS);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR,
- "ees clock: INTERNAL ERROR, unit number %d not in use", unit);
- return;
- }
-
- /* Tell the I/O module to turn us off. We're history. */
- ees = eesunits[unit];
- io_closeclock(&ees->io);
- unitinuse[unit] = 0;
-}
-
-
-/* ees_report_event - note the occurance of an event */
-static void ees_report_event(ees, code)
- struct eesunit *ees;
- int code;
-{
- if (ees->status != (u_char)code) {
- ees->status = (u_char)code;
- if (code != CEVNT_NOMINAL)
- ees->lastevent = (u_char)code;
- /* Should report event to trap handler in here.
- * Soon...
- */
- }
-}
-
-
-/* ees_receive - receive data from the serial interface on an EES clock */
-static void ees_receive(rbufp)
- struct recvbuf *rbufp;
-{
- register int n_sample;
- register int day;
- register struct eesunit *ees;
- register u_char *dpt; /* Data PoinTeR: move along ... */
- register u_char *dpend; /* Points just *after* last data char */
- register char *cp;
- l_fp tmp;
- static void ees_process();
- int call_pps_sample = 0;
- l_fp pps_arrvstamp;
- int sincelast;
- int pps_step = 0;
- int suspect_4ms_step = 0;
- struct ppsclockev ppsclockev;
- long *ptr = (long *) &ppsclockev;
- extern errno;
- int rc;
-
- /* Get the clock this applies to and a pointer to the data */
- ees = (struct eesunit *)rbufp->recv_srcclock;
- dpt = (u_char *)&rbufp->recv_space;
- dpend = dpt + rbufp->recv_length;
- if ((debug & DB_LOG_AWAITMORE) && (rbufp->recv_length != LENEESCODE))
- printf("[%d] ", rbufp->recv_length);
-
- /* Check out our state and process appropriately */
- switch (ees->codestate) {
- case EESCS_WAIT:
- /* Set an initial guess at the timestamp as the recv time.
- * If just running in CBREAK mode, we can't improve this.
- * If we have the CLOCK Line Discipline, PPSCD, or sime such,
- * then we will do better later ....
- */
- ees->arrvtime = rbufp->recv_time;
- ees->codestate = EESCS_GOTSOME;
- ees->lencode = 0;
- /*FALLSTHROUGH*/
-
- case EESCS_GOTSOME:
- cp = &(ees->lastcode[ees->lencode]);
-
- /* Gobble the bytes until the final (possibly stripped) 0xff */
- while (dpt < dpend && (*dpt & 0x7f) != 0x7f) {
- *cp++ = (char)*dpt++;
- ees->lencode++;
- /* Oh dear -- too many bytes .. */
- if (ees->lencode > LENEESPRT) {
- syslog(LOG_INFO,
-"I: ees clock: %d + %d > %d [%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x]",
- ees->lencode, dpend - dpt, LENEESPRT,
-#define D(x) (ees->lastcode[x])
- D(0), D(1), D(2), D(3), D(4), D(5), D(6),
- D(7), D(8), D(9), D(10), D(11), D(12));
-#undef D
- ees->badformat++;
- ees->reason = CODEREASON + 1;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
- }
- /* Gave up because it was end of the buffer, rather than ff */
- if (dpt == dpend) {
- /* Incomplete. Wait for more. */
- if (debug & DB_LOG_AWAITMORE) syslog(LOG_INFO,
- "I: ees clock %d: %d == %d: await more",
- ees->unit, dpt, dpend);
- return;
- }
-
- /* This shouldn't happen ... ! */
- if ((*dpt & 0x7f) != 0x7f) {
- syslog(LOG_INFO, "I: ees clock: %0x & 0x7f != 0x7f", *dpt);
- ees->badformat++;
- ees->reason = CODEREASON + 2;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- /* Skip the 0xff */
- dpt++;
-
- /* Finally, got a complete buffer. Mainline code will
- * continue on. */
- cp = ees->lastcode;
- break;
-
- default:
- syslog(LOG_ERR, "ees clock: INTERNAL ERROR: %d state %d",
- ees->unit, ees->codestate);
- ees->reason = CODEREASON + 5;
- ees_event(ees, CEVNT_FAULT);
- ees_reset(ees);
- return;
- }
-
- /* Boy! After all that crap, the lastcode buffer now contains
- * something we hope will be a valid time code. Do length
- * checks and sanity checks on constant data.
- */
- ees->codestate = EESCS_WAIT;
- ees->lasttime = current_time;
- if (ees->lencode != LENEESPRT) {
- ees->badformat++;
- ees->reason = CODEREASON + 6;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- cp = ees->lastcode;
-
- /* Check that centisecond is zero */
- if (cp[EESM_CSEC] != 0) {
- ees->baddata++;
- ees->reason = CODEREASON + 7;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- /* Check flag formats */
- if (cp[EESM_LEAP] != 0 && cp[EESM_LEAP] != 0x0f) {
- ees->badformat++;
- ees->reason = CODEREASON + 8;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- if (cp[EESM_BST] != 0 && cp[EESM_BST] != 0x03) {
- ees->badformat++;
- ees->reason = CODEREASON + 9;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- if (cp[EESM_MSFOK] != 0 && cp[EESM_MSFOK] != 0x3f) {
- ees->badformat++;
- ees->reason = CODEREASON + 10;
- ees_event(ees, CEVNT_BADREPLY);
- ees_reset(ees);
- return;
- }
-
- /* So far, so good. Compute day, hours, minutes, seconds,
- * time zone. Do range checks on these.
- */
-
-#define bcdunpack(val) ( (((val)>>4) & 0x0f) * 10 + ((val) & 0x0f) )
-#define istrue(x) ((x)?1:0)
-
- ees->second = bcdunpack(cp[EESM_SEC]); /* second */
- ees->minute = bcdunpack(cp[EESM_MIN]); /* minute */
- ees->hour = bcdunpack(cp[EESM_HOUR]); /* hour */
-
- day = bcdunpack(cp[EESM_DAY]); /* day of month */
-
- switch (bcdunpack(cp[EESM_MON])) { /* month */
-
- /* Add in lengths of all previous months. Add one more
- if it is a leap year and after February.
- */
- case 12: day += NOV; /*FALLSTHROUGH*/
- case 11: day += OCT; /*FALLSTHROUGH*/
- case 10: day += SEP; /*FALLSTHROUGH*/
- case 9: day += AUG; /*FALLSTHROUGH*/
- case 8: day += JUL; /*FALLSTHROUGH*/
- case 7: day += JUN; /*FALLSTHROUGH*/
- case 6: day += MAY; /*FALLSTHROUGH*/
- case 5: day += APR; /*FALLSTHROUGH*/
- case 4: day += MAR; /*FALLSTHROUGH*/
- case 3: day += FEB;
- if (istrue(cp[EESM_LEAP])) day++; /*FALLSTHROUGH*/
- case 2: day += JAN; /*FALLSTHROUGH*/
- case 1: break;
- default: ees->baddata++;
- ees->reason = CODEREASON + 11;
- ees_event(ees, CEVNT_BADDATE);
- ees_reset(ees);
- return;
- }
-
- ees->day = day;
-
- /* Get timezone. The clocktime routine wants the number
- * of hours to add to the delivered time to get UT.
- * Currently -1 if BST flag set, 0 otherwise. This
- * is the place to tweak things if double summer time
- * ever happens.
- */
- ees->tz = istrue(cp[EESM_BST]) ? -1 : 0;
-
- if (ees->day > 366 || ees->day < 1 ||
- ees->hour > 23 || ees->minute > 59 || ees->second > 59) {
- ees->baddata++;
- ees->reason = CODEREASON + 12;
- ees_event(ees, CEVNT_BADDATE);
- ees_reset(ees);
- return;
- }
-
- n_sample = ees->nsamples;
-
- /* Now, compute the reference time value: text -> tmp.l_ui */
- if (!clocktime(ees->day, ees->hour, ees->minute, ees->second,
- ees->tz, rbufp->recv_time.l_ui, &ees->yearstart,
- &tmp.l_ui)) {
- ees->baddata++;
- ees->reason = CODEREASON + 13;
- ees_event(ees, CEVNT_BADDATE);
- ees_reset(ees);
- return;
- }
- tmp.l_uf = 0;
-
- /* DON'T use ees->arrvtime -- it may be < reftime */
- ees->lastsampletime = tmp;
-
- /* If we are synchronised to the radio, update the reference time.
- * Also keep a note of when clock was last good.
- */
- if (istrue(cp[EESM_MSFOK])) {
- ees->reftime = tmp;
- ees->clocklastgood = current_time;
- }
-
-
- /* Compute the offset. For the fractional part of the
- * offset we use the expected delay for the message.
- */
- ees->codeoffsets[n_sample].l_ui = tmp.l_ui;
- ees->codeoffsets[n_sample].l_uf = 0;
-
- /* Number of seconds since the last step */
- sincelast = this_uisec - ees->last_step;
-
- memset(&ppsclockev, 0, sizeof ppsclockev);
-
- rc = ioctl(ees->io.fd, CIOGETEV, (char *) &ppsclockev);
- if (debug & DB_PRINT_EV) fprintf(stderr,
- "[%x] CIOGETEV u%d %d (%x %d) gave %d (%d): %08x %08x %d\n",
- DB_PRINT_EV, ees->unit, ees->io.fd, CIOGETEV, is_pps(ees),
- rc, errno, ptr[0], ptr[1], ptr[2]);
-
- /* If we managed to get the time of arrival, process the info */
- if (rc >= 0) {
- int conv = -1;
- pps_step = ppsclockev.serial - ees->last_pps_no;
-
- /* Possible that PPS triggered, but text message didn't */
- if (pps_step == 2) syslog(LOG_ERR, "pps step = 2 @ %02d", ees->second);
- if (pps_step == 2 && ees->second == 1) suspect_4ms_step |= 1;
- if (pps_step == 2 && ees->second == 2) suspect_4ms_step |= 4;
-
- /* allow for single loss of PPS only */
- if (pps_step != 1 && pps_step != 2)
- fprintf(stderr, "PPS step: %d too far off %d (%d)\n",
- ppsclockev.serial, ees->last_pps_no, pps_step);
- else if (!buftvtots((char *) &(ppsclockev.tv), &pps_arrvstamp))
- fprintf(stderr, "buftvtots failed\n");
- else { /* if ((ABS(time difference) - 0.25) < 0)
- * then believe it ...
- */
- l_fp diff;
- diff = pps_arrvstamp;
- conv = 0;
- L_SUB(&diff, &ees->arrvtime);
-if (debug & DB_PRINT_CDT) printf("[%x] Have %x.%08x and %x.%08x -> %x.%08x @ %s",
- DB_PRINT_CDT, ees->arrvtime.l_ui, ees->arrvtime.l_uf,
- pps_arrvstamp.l_ui, pps_arrvstamp.l_uf,
- diff.l_ui, diff.l_uf,
- ctime(&(ppsclockev.tv.tv_sec)));
- if (L_ISNEG(&diff)) M_NEG(diff.l_ui, diff.l_uf);
- L_SUB(&diff, &acceptable_slop);
- if (L_ISNEG(&diff)) { /* AOK -- pps_sample */
- ees->arrvtime = pps_arrvstamp;
- conv++;
- call_pps_sample++;
- }
- /* Some loss of some signals around sec = 1 */
- else if (ees->second == 1) {
- diff = pps_arrvstamp;
- L_ADD(&diff, &onesec);
- L_SUB(&diff, &ees->arrvtime);
- if (L_ISNEG(&diff)) M_NEG(diff.l_ui, diff.l_uf);
- L_SUB(&diff, &acceptable_slop);
-syslog(LOG_ERR, "Have sec==1 slip %ds a=%08x-p=%08x -> %x.%08x (u=%d) %s",
- pps_arrvstamp.l_ui - ees->arrvtime.l_ui,
- pps_arrvstamp.l_uf,
- ees->arrvtime.l_uf,
- diff.l_ui, diff.l_uf,
- ppsclockev.tv.tv_usec,
- ctime(&(ppsclockev.tv.tv_sec)));
- if (L_ISNEG(&diff)) { /* AOK -- pps_sample */
- suspect_4ms_step |= 2;
- ees->arrvtime = pps_arrvstamp;
- L_ADD(&ees->arrvtime, &onesec);
- conv++;
- call_pps_sample++;
- }
- }
- }
- ees->last_pps_no = ppsclockev.serial;
- if (debug & DB_PRINT_CDTC) printf(
- "[%x] %08x %08x %d u%d (%d %d)\n",
- DB_PRINT_CDTC, pps_arrvstamp.l_ui,
- pps_arrvstamp.l_uf, conv, ees->unit,
- call_pps_sample, pps_step);
- }
-
- /* See if there has been a 4ms jump at a minute boundry */
- { l_fp delta;
-#define delta_isec delta.l_ui
-#define delta_ssec delta.l_i
-#define delta_sfsec delta.l_f
- long delta_f_abs;
-
- delta.l_i = ees->arrvtime.l_i;
- delta.l_f = ees->arrvtime.l_f;
-
- L_SUB(&delta, &ees->last_l);
- delta_f_abs = delta_sfsec;
- if (delta_f_abs < 0) delta_f_abs = -delta_f_abs;
-
- /* Dump the deltas each minute */
- if (debug & DB_DUMP_DELTAS)
- { if (0 <= ees->second &&
- ees->second < ((sizeof deltas) / (sizeof deltas[0]))) deltas[ees->second] = delta_sfsec;
- /* Dump on second 1, as second 0 sometimes missed */
- if (ees->second == 1) {
- char text[16 * ((sizeof deltas) / (sizeof deltas[0]))];
- char *ptr=text;
- int i;
- for (i=0; i<((sizeof deltas) / (sizeof deltas[0])); i++) {
- sprintf(ptr, " %d.%04d",
- msec(deltas[i]), subms(deltas[i]));
- while (*ptr) ptr++;
- }
- syslog(LOG_ERR, "Deltas: %d.%04d<->%d.%04d: %s",
- msec(EES_STEP_F - EES_STEP_F_GRACE), subms(EES_STEP_F - EES_STEP_F_GRACE),
- msec(EES_STEP_F + EES_STEP_F_GRACE), subms(EES_STEP_F + EES_STEP_F_GRACE),
- text+1);
- for (i=0; i<((sizeof deltas) / (sizeof deltas[0])); i++) deltas[i] = 0;
- }
- }
-
- /* Lets see if we have a 4 mS step at a minute boundaary */
- if ( ((EES_STEP_F - EES_STEP_F_GRACE) < delta_f_abs) &&
- (delta_f_abs < (EES_STEP_F + EES_STEP_F_GRACE)) &&
- (ees->second == 0 || ees->second == 1 || ees->second == 2) &&
- (sincelast < 0 || sincelast > 122)
- ) { /* 4ms jump at min boundry */
- int old_sincelast;
- int count=0;
- int sum = 0;
- /* Yes -- so compute the ramp time */
- if (ees->last_step == 0) sincelast = 0;
- old_sincelast = sincelast;
-
- /* First time in, just set "ees->last_step" */
- if(ees->last_step) {
- int other_step = 0;
- int third_step = 0;
- int this_step = (sincelast + (60 /2)) / 60;
- int p_step = ees->this_step;
- int p;
- ees->last_steps[p_step] = this_step;
- p= p_step;
- p_step++;
- if (p_step >= LAST_STEPS) p_step = 0;
- ees->this_step = p_step;
- /* Find the "average" interval */
- while (p != p_step) {
- int this = ees->last_steps[p];
- if (this == 0) break;
- if (this != this_step) {
- if (other_step == 0 && (
- this== (this_step +2) ||
- this== (this_step -2) ||
- this== (this_step +1) ||
- this== (this_step -1)))
- other_step = this;
- if (other_step != this) {
- int delta = (this_step - other_step);
- if (delta < 0) delta = - delta;
- if (third_step == 0 && (
- (delta == 1) ? (
- this == (other_step +1) ||
- this == (other_step -1) ||
- this == (this_step +1) ||
- this == (this_step -1))
- :
- (
- this == (this_step + other_step)/2
- )
- )) third_step = this;
- if (third_step != this) break;
- }
- }
- sum += this;
- p--;
- if (p < 0) p += LAST_STEPS;
- count++;
- }
-syslog(LOG_ERR, "MSF%d: %d: This=%d (%d), other=%d/%d, sum=%d, count=%d, pps_step=%d, suspect=%x", ees->unit, p, ees->last_steps[p], this_step, other_step, third_step, sum, count, pps_step, suspect_4ms_step);
- if (count != 0) sum = ((sum * 60) + (count /2)) / count;
-#define SV(x) (ees->last_steps[(x + p_step) % LAST_STEPS])
-syslog(LOG_ERR, "MSF%d: %x steps %d: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",
- ees->unit, suspect_4ms_step, p_step, SV(0), SV(1), SV(2), SV(3), SV(4), SV(5), SV(6),
- SV(7), SV(8), SV(9), SV(10), SV(11), SV(12), SV(13), SV(14), SV(15));
-printf("MSF%d: steps %d: %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
- ees->unit, p_step, SV(0), SV(1), SV(2), SV(3), SV(4), SV(5), SV(6),
- SV(7), SV(8), SV(9), SV(10), SV(11), SV(12), SV(13), SV(14), SV(15));
-#undef SV
- ees->jump_fsecs = delta_sfsec;
- ees->using_ramp = 1;
- if (sincelast > 170)
- ees->last_step_late += sincelast - ((sum) ? sum : ees->last_step_secs);
- else ees->last_step_late = 30;
- if (ees->last_step_late < -60 || ees->last_step_late > 120) ees->last_step_late = 30;
- if (ees->last_step_late < 0) ees->last_step_late = 0;
- if (ees->last_step_late >= 60) ees->last_step_late = 59;
- sincelast = 0;
- }
- else { /* First time in -- just save info */
- ees->last_step_late = 30;
- ees->jump_fsecs = delta_sfsec;
- ees->using_ramp = 1;
- sum = 4 * 60;
- }
- ees->last_step = this_uisec;
-printf("MSF%d: d=%3d.%04d@%d :%d:%d:$%d:%d:%d\n",
-ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second, old_sincelast, ees->last_step_late, count, sum, ees->last_step_secs);
-syslog(LOG_ERR, "MSF%d: d=%3d.%04d@%d :%d:%d:%d:%d:%d",
-ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second, old_sincelast, ees->last_step_late, count, sum, ees->last_step_secs);
- if (sum) ees->last_step_secs = sum;
- }
- /* OK, so not a 4ms step at a minute boundry */
- else {
- if (suspect_4ms_step) syslog(LOG_ERR,
- "MSF%d: suspect = %x, but delta of %d.%04d [%d.%04d<%d.%04d<%d.%04d: %d %d]",
- ees->unit, suspect_4ms_step, msec(delta_sfsec), subms(delta_sfsec),
- msec(EES_STEP_F - EES_STEP_F_GRACE),
- subms(EES_STEP_F - EES_STEP_F_GRACE),
- msec(delta_f_abs),
- subms(delta_f_abs),
- msec(EES_STEP_F + EES_STEP_F_GRACE),
- subms(EES_STEP_F + EES_STEP_F_GRACE),
- ees->second,
- sincelast);
- if ((delta_f_abs > EES_STEP_NOTE) && ees->last_l.l_i) {
- static ees_step_notes = EES_STEP_NOTES;
- if (ees_step_notes > 0) {
- ees_step_notes--;
-printf("MSF%d: D=%3d.%04d@%02d :%d%s\n",
-ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second, sincelast, ees_step_notes ? "" : " -- NO MORE !");
-syslog(LOG_ERR, "MSF%d: D=%3d.%04d@%02d :%d%s",
-ees->unit, msec(delta_sfsec), subms(delta_sfsec), ees->second, (ees->last_step) ? sincelast : -1, ees_step_notes ? "" : " -- NO MORE !");
- }
- }
- }
- }
- ees->last_l = ees->arrvtime;
-
- /* IF we have found that it's ramping
- * && it's within twice the expected ramp period
- * && there is a non zero step size (avoid /0 !)
- * THEN we twiddle things
- */
- if (ees->using_ramp &&
- sincelast < (ees->last_step_secs)*2 &&
- ees->last_step_secs)
- { long sec_of_ramp = sincelast + ees->last_step_late;
- long fsecs;
- l_fp inc;
-
- /* Ramp time may vary, so may ramp for longer than last time */
- if (sec_of_ramp > (ees->last_step_secs + 120))
- sec_of_ramp = ees->last_step_secs;
-
- /* sec_of_ramp * ees->jump_fsecs may overflow 2**32 */
- fsecs = sec_of_ramp * (ees->jump_fsecs / ees->last_step_secs);
-
- if (debug & DB_LOG_DELTAS) syslog(LOG_ERR,
- "[%x] MSF%d: %3d/%03d -> d=%11d (%d|%d)",
- DB_LOG_DELTAS,
- ees->unit, sec_of_ramp, ees->last_step_secs, fsecs,
- pps_arrvstamp.l_f, pps_arrvstamp.l_f + fsecs);
- if (debug & DB_PRINT_DELTAS) printf(
- "MSF%d: %3d/%03d -> d=%11d (%d|%d)\n",
- ees->unit, sec_of_ramp, ees->last_step_secs, fsecs,
- pps_arrvstamp.l_f, pps_arrvstamp.l_f + fsecs);
-
- /* Must sign extend the result */
- inc.l_i = (fsecs < 0) ? -1 : 0;
- inc.l_f = fsecs;
- if (debug & DB_INC_PPS)
- { L_SUB(&pps_arrvstamp, &inc);
- L_SUB(&ees->arrvtime, &inc);
- }
- else
- { L_ADD(&pps_arrvstamp, &inc);
- L_ADD(&ees->arrvtime, &inc);
- }
- }
- else {
- if (debug & DB_LOG_DELTAS) syslog(LOG_ERR,
- "[%x] MSF%d: ees->using_ramp=%d, sincelast=%x / %x, ees->last_step_secs=%x",
- DB_LOG_DELTAS,
- ees->unit, ees->using_ramp,
- sincelast,
- (ees->last_step_secs)*2,
- ees->last_step_secs);
- if (debug & DB_PRINT_DELTAS) printf(
- "[%x] MSF%d: ees->using_ramp=%d, sincelast=%x / %x, ees->last_step_secs=%x\n",
- DB_LOG_DELTAS,
- ees->unit, ees->using_ramp,
- sincelast,
- (ees->last_step_secs)*2,
- ees->last_step_secs);
- }
-
- L_SUB(&ees->arrvtime, &offset_fudge[ees->unit]);
- L_SUB(&pps_arrvstamp, &offset_fudge[ees->unit]);
-
- if (call_pps_sample && !(debug & DB_NO_PPS)) {
- /* Sigh -- it expects its args negated */
- L_NEG(&pps_arrvstamp);
- (void) pps_sample(&pps_arrvstamp);
- }
-
- /* Subtract off the local clock time stamp */
- L_SUB(&ees->codeoffsets[n_sample], &ees->arrvtime);
- if (debug & DB_LOG_SAMPLES) syslog(LOG_ERR,
- "MSF%d: [%x] %d (ees: %d %d) (pps: %d %d)%s",
- ees->unit, DB_LOG_DELTAS, n_sample,
- ees->codeoffsets[n_sample].l_f,
- ees->codeoffsets[n_sample].l_f / 4295,
- pps_arrvstamp.l_f,
- pps_arrvstamp.l_f /4295,
- (debug & DB_NO_PPS) ? " [no PPS]" : "");
-
- if (ees->nsamples++ == NCODES-1) ees_process(ees);
-
- /* Done! */
-}
-
-
-static void set_x(fp_offset)
-l_fp *fp_offset;
-{
- step_systime_real(fp_offset);
-}
-
-
-/* offcompare - auxiliary comparison routine for offset sort */
-
-static int
-offcompare(a, b)
-l_fp *a, *b;
-{
- return(L_ISGEQ(a, b) ? (L_ISEQU(a, b) ? 0 : 1) : -1);
-}
-
-
-/* ees_process - process a pile of samples from the clock */
-static void ees_process(ees)
- struct eesunit *ees;
-{
- static last_samples = -1;
- register int i, j;
- register int noff;
- register l_fp *coffs = ees->codeoffsets;
- l_fp offset, tmp;
- u_fp dispersion; /* ++++ */
- int lostsync, isinsync;
- int samples = ees->nsamples;
- int samplelog;
- int samplereduce = (samples + 1) / 2;
-
- /* Reset things to zero so we don't have to worry later */
- ees_reset(ees);
-
- if (sloppyclockflag[ees->unit]) {
- samplelog = (samples < 2) ? 0 :
- (samples < 5) ? 1 :
- (samples < 9) ? 2 :
- (samples < 17) ? 3 :
- (samples < 33) ? 4 : 5;
- samplereduce = (1 << samplelog);
- }
-
- if (samples != last_samples &&
- ((samples != (last_samples-1)) || samples < 3)) {
- syslog(LOG_ERR, "Samples=%d (%d), samplereduce=%d ....",
- samples, last_samples, samplereduce);
- last_samples = samples;
- }
- if (samples < 1) return;
-
- /* If requested, dump the raw data we have in the buffer */
- if (ees->dump_vals) dump_buf(coffs, 0, samples, "Raw data is:");
-
- /* Sort the offsets, trim off the extremes, then choose one. */
- qsort((char *) coffs, samples, sizeof(l_fp), offcompare);
-
- noff = samples;
- i = 0;
- while ((noff - i) > samplereduce) {
- /* Trim off the sample which is further away
- * from the median. We work this out by doubling
- * the median, subtracting off the end samples, and
- * looking at the sign of the answer, using the
- * identity (c-b)-(b-a) == 2*b-a-c
- */
- tmp = coffs[(noff + i)/2];
- L_ADD(&tmp, &tmp);
- L_SUB(&tmp, &coffs[i]);
- L_SUB(&tmp, &coffs[noff-1]);
- if (L_ISNEG(&tmp)) noff--; else i++;
- }
-
- /* If requested, dump the reduce data we have in the buffer */
- if (ees->dump_vals) dump_buf(coffs, i, noff, "Reduced to:");
-
- /* What we do next depends on the setting of the sloppy clock flag.
- * If it is on, average the remainder to derive our estimate.
- * Otherwise, just pick a representative value from the remaining stuff
- */
- if (sloppyclockflag[ees->unit]) {
- offset.l_ui = offset.l_uf = 0;
- for (j = i; j < noff; j++)
- L_ADD(&offset, &coffs[j]);
- for (j = samplelog; j > 0; j--)
- L_RSHIFTU(&offset);
- }
- else offset = coffs[i+BESTSAMPLE];
-
- /* Compute the dispersion as the difference between the
- * lowest and highest offsets that remain in the
- * consideration list.
- *
- * It looks like MOST clocks have MOD (max error), so halve it !
- */
- tmp = coffs[noff-1];
- L_SUB(&tmp, &coffs[i]);
-#define FRACT_SEC(n) ((1 << 30) / (n/2))
- dispersion = LFPTOFP(&tmp) / 2; /* ++++ */
- if (debug & (DB_SYSLOG_SMPLI | DB_SYSLOG_SMPLE)) syslog(
- (debug & DB_SYSLOG_SMPLE) ? LOG_ERR : LOG_INFO,
- "I: [%x] Offset=%06d (%d), disp=%06d%s [%d], %d %d=%d %d:%d %d=%d %d",
- debug & (DB_SYSLOG_SMPLI | DB_SYSLOG_SMPLE),
- offset.l_f / 4295, offset.l_f,
- (dispersion * 1526) / 100,
- (sloppyclockflag[ees->unit]) ? " by averaging" : "",
- FRACT_SEC(10) / 4295,
- (coffs[0].l_f) / 4295,
- i,
- (coffs[i].l_f) / 4295,
- (coffs[samples/2].l_f) / 4295,
- (coffs[i+BESTSAMPLE].l_f) / 4295,
- noff-1,
- (coffs[noff-1].l_f) / 4295,
- (coffs[samples-1].l_f) / 4295);
-
- /* Are we playing silly wotsits ?
- * If we are using all data, see if there is a "small" delta,
- * and if so, blurr this with 3/4 of the delta from the last value
- */
- if (ees->usealldata && ees->offset.l_uf) {
- long diff = (long) (ees->offset.l_uf - offset.l_uf);
-
- /* is the delta small enough ? */
- if ((- FRACT_SEC(100)) < diff && diff < FRACT_SEC(100)) {
- int samd = (64 * 4) / samples;
- long new;
- if (samd < 2) samd = 2;
- new = offset.l_uf + ((diff * (samd -1)) / samd);
-
- /* Sign change -> need to fix up int part */
- if ((new & (1 << 31)) !=
- (((long) offset.l_uf) & ( 1 << 31)))
- { syslog(LOG_INFO, "I: %x != %x (%x %x), so add %d",
- new & (1 << 31),
- ((long) offset.l_uf) & ( 1 << 31),
- new, (long) offset.l_uf,
- (new < 0) ? -1 : 1);
- offset.l_ui += (new < 0) ? -1 : 1;
- }
- dispersion /= 4;
- if (debug & (DB_SYSLOG_SMTHI | DB_SYSLOG_SMTHE)) syslog(
- (debug & DB_SYSLOG_SMTHE) ? LOG_ERR : LOG_INFO,
- "I: [%x] Smooth data: %d -> %d, dispersion now %d",
- debug & (DB_SYSLOG_SMTHI | DB_SYSLOG_SMTHE),
- ((long) offset.l_uf) / 4295, new / 4295,
- (dispersion * 1526) / 100);
- offset.l_uf = (unsigned long) new;
- }
- else if (debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE)) syslog(
- (debug & DB_SYSLOG_NSMTHE) ? LOG_ERR : LOG_INFO,
- "[%x] No smooth as delta not %d < %d < %d",
- debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE),
- - FRACT_SEC(100), diff, FRACT_SEC(100));
- }
- else if (debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE)) syslog(
- (debug & DB_SYSLOG_NSMTHE) ? LOG_ERR : LOG_INFO,
- "I: [%x] No smooth as flag=%x and old=%x=%d (%d:%d)",
- debug & (DB_SYSLOG_NSMTHI | DB_SYSLOG_NSMTHE),
- ees->usealldata, ees->offset.l_f, ees->offset.l_uf,
- offset.l_f, ees->offset.l_f - offset.l_f);
-
- /* Collect offset info for debugging info */
- ees->offset = offset;
- ees->lowoffset = coffs[i];
- ees->highoffset = coffs[noff-1];
-
- /* Determine synchronization status. Can be unsync'd either
- * by a report from the clock or by a leap hold.
- *
- * Loss of the radio signal for a short time does not cause
- * us to go unsynchronised, since the receiver keeps quite
- * good time on its own. The spec says 20ms in 4 hours; the
- * observed drift in our clock (Cambridge) is about a second
- * a day, but even that keeps us within the inherent tolerance
- * of the clock for about 15 minutes. Observation shows that
- * the typical "short" outage is 3 minutes, so to allow us
- * to ride out those, we will give it 5 minutes.
- */
- lostsync = current_time - ees->clocklastgood > 300 ? 1 : 0;
- isinsync = (lostsync || ees->leaphold > current_time) ? 0 : 1;
-
- /* Done. Use time of last good, synchronised code as the
- * reference time, and lastsampletime as the receive time.
- */
- if (ees->fix_pending) {
- syslog(LOG_ERR, "MSF%d: fix_pending=%d -> jump %x.%08x\n",
- ees->fix_pending, ees->unit, offset.l_i, offset.l_f);
- ees->fix_pending = 0;
- set_x(&offset);
- L_CLR(&offset);
- }
- refclock_receive(ees->peer,
- &offset,
- 0, /* delay */
- dispersion,
- &ees->reftime,
- &ees->lastsampletime, /* receive time */
- (isinsync) ? 0 : LEAP_NOTINSYNC);
- ees_event(ees, lostsync ? CEVNT_PROP : CEVNT_NOMINAL);
-}
-
-/* msfees_poll - called by the transmit procedure */
-static void msfees_poll(unit, peer)
- int unit;
- char *peer;
-{
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "ees clock poll: INTERNAL: unit %d invalid",
- unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "ees clock poll: INTERNAL: unit %d unused",
- unit);
- return;
- }
-
- ees_process(eesunits[unit]);
-
- if ((current_time - eesunits[unit]->lasttime) > 150)
- ees_event(eesunits[unit], CEVNT_FAULT);
-}
-
-/* msfees_leap - called when a leap second occurs */
-static void msfees_leap()
-{
- register int i;
-
- /* This routine should be entered a few seconds after
- * midnight UTC when a leap second occurs. To ensure we
- * don't believe foolish time from the clock(s) we set a
- * 40 minute hold on them. It shouldn't take anywhere
- * near this amount of time to adjust if the clock is getTING
- * data, but doing anything else is complicated.
- */
- for (i = 0; i < MAXUNITS; i++) if (unitinuse[i])
- eesunits[i]->leaphold = current_time + EESLEAPHOLD;
-}
-
-/* msfees_control - set fudge factors, return statistics */
-static void msfees_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct eesunit *ees = eesunits[unit];
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "ees clock: unit %d invalid (max %d)",
- unit, MAXUNITS-1);
- return;
- }
-
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- fudgefactor[unit] = in->fudgetime1;
- if (in->haveflags & CLK_HAVETIME2)
- os_delay[unit] = in->fudgetime2;
- offset_fudge[unit] = os_delay[unit];
- L_ADD(&offset_fudge[unit], &fudgefactor[unit]);
- L_ADD(&offset_fudge[unit], &inherent_delay[unit]);
- if (in->haveflags & CLK_HAVEVAL1) {
- stratumtouse[unit] = (u_char)(in->fudgeval1 & 0xf);
- if (unitinuse[unit]) {
- /* Should actually reselect clock, but
- * will wait for the next timecode
- */
- struct peer *peer = ees->peer;
- peer->stratum = stratumtouse[unit];
- if (stratumtouse[unit] <= 1) {
- memmove((char *)&peer->refid,
- EESREFID, 4);
- if (unit>0 && unit<10)
- ((char *)&peer->refid)[3] =
- '0' + unit;
- }
- else peer->refid = htonl(EESHSREFID);
- }
- }
- if (in->haveflags & CLK_HAVEVAL2) {
- printf("Debug: %x -> %x\n", debug, in->fudgeval2);
- syslog(LOG_ERR, "MSF%d: debug %x -> %x",
- unit, debug, in->fudgeval2);
- debug = in->fudgeval2;
- }
- if (in->haveflags & CLK_HAVEFLAG1) {
- sloppyclockflag[unit] = in->flags & CLK_FLAG1;
- }
- if (in->haveflags & CLK_HAVEFLAG2) {
- ees->fix_pending++;
- /* if (in->flags & CLK_FLAG2 && unitinuse[unit])
- ees->leaphold = 0; */
- }
- if (in->haveflags & CLK_HAVEFLAG3 && unitinuse[unit]) {
- printf("dump_vals: %x -> %x\n", ees->dump_vals, in->flags & CLK_FLAG3);
- ees->dump_vals = in->flags & CLK_FLAG3;
- }
- if (in->haveflags & CLK_HAVEFLAG4 && unitinuse[unit]) {
- ees->usealldata = in->flags & CLK_FLAG4;
- }
- }
-
- if (out != 0) {
- out->type = REFCLK_MSF_EES;
- out->haveflags
- = CLK_HAVETIME1|CLK_HAVETIME2|CLK_HAVEVAL1|CLK_HAVEVAL2|CLK_HAVEFLAG1|CLK_HAVEFLAG3|CLK_HAVEFLAG4;
- out->clockdesc = EESDESCRIPTION;
- out->fudgetime1 = fudgefactor[unit];
- out->fudgetime2 = os_delay[unit];
- out->fudgeval1 = (long)stratumtouse[unit];
- /*out->fudgeval2= debug*/;
- memmove((char *)&out->fudgeval2, EESREFID, 4);
- if (unit > 0 && unit < 10)
- ((char *)&out->fudgeval2)[3] = '0' + unit;
- out->flags = sloppyclockflag[unit];
- if (unitinuse[unit]) {
- out->flags |= ees->dump_vals | ees->usealldata;
- out->lencode = ees->lencode;
- out->lastcode = ees->lastcode;
- out->timereset = current_time - ees->timestarted;
- out->polls = 0; /* we don't poll */
- out->noresponse = 0; /* ditto */
- out->badformat = ees->badformat;
- out->baddata = ees->baddata;
- out->lastevent = ees->lastevent;
- out->currentstatus = ees->status;
- } else {
- out->lencode = 0;
- out->lastcode = "";
- out->polls = out->noresponse = 0;
- out->badformat = out->baddata = 0;
- out->timereset = 0;
- out->currentstatus = out->lastevent = CEVNT_NOMINAL;
- }
- }
-}
-
-
-/* msfees_buginfo - return clock dependent debugging info */
-static void msfees_buginfo(unit, bug)
- int unit;
- register struct refclockbug *bug;
-{
- register struct eesunit *ees;
-
- bug->nvalues = bug->ntimes = 0;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "ees clock: unit %d invalid (max %d)",
- unit, MAXUNITS-1);
- return;
- }
-
- if (!unitinuse[unit])
- return;
- ees = eesunits[unit];
-
- bug->nvalues = 16;
- bug->svalues = 0x0800;
- bug->values[0] = (ees->lasttime) ? current_time - ees->lasttime : 0;
- bug->values[1] = (ees->clocklastgood)?current_time-ees->clocklastgood:0;
- bug->values[2] = (u_long)ees->status;
- bug->values[3] = (u_long)ees->lastevent;
- bug->values[4] = (u_long)ees->reason;
- bug->values[5] = (u_long)ees->nsamples;
- bug->values[6] = (u_long)ees->codestate;
- bug->values[7] = (u_long)ees->day;
- bug->values[8] = (u_long)ees->hour;
- bug->values[9] = (u_long)ees->minute;
- bug->values[10] = (u_long)ees->second;
- bug->values[11] = (u_long)ees->tz;
- bug->values[12] = ees->yearstart;
- bug->values[13] = (ees->leaphold > current_time) ?
- ees->leaphold - current_time : 0;
- bug->values[14] = inherent_delay[unit].l_uf;
- bug->values[15] = offset_fudge[unit].l_uf;
-
- bug->ntimes = 11;
- bug->stimes = 0x3f8;
- bug->times[0] = ees->reftime;
- bug->times[1] = ees->arrvtime;
- bug->times[2] = ees->lastsampletime;
- bug->times[3] = ees->offset;
- bug->times[4] = ees->lowoffset;
- bug->times[5] = ees->highoffset;
- bug->times[6] = inherent_delay[unit];
- bug->times[8] = os_delay[unit];
- bug->times[7] = fudgefactor[unit];
- bug->times[9] = offset_fudge[unit];
- bug->times[10].l_ui = ees->yearstart;
- bug->times[10].l_uf = 0;
-}
-
-struct refclock refclock_msfees = {
- msfees_start, msfees_shutdown, msfees_poll,
- msfees_control, msfees_init, msfees_buginfo, NOFLAGS
-};
-#endif /* defined(REFCLOCK) && defined(MSFEESPPS) && defined(STREAM) */
diff --git a/usr.sbin/xntpd/xntpd/refclock_old/refclock_mx4200.c b/usr.sbin/xntpd/xntpd/refclock_old/refclock_mx4200.c
deleted file mode 100644
index 7cfa3cf0326b..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_old/refclock_mx4200.c
+++ /dev/null
@@ -1,1342 +0,0 @@
-/*
- * This software was developed by the Computer Systems Engineering group
- * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66.
- *
- * Copyright (c) 1992 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Lawrence Berkeley Laboratory.
- * 4. The name of the University may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(REFCLOCK) && (defined(MX4200) || defined(MX4200CLK) || defined(MX4200PPS))
-
-#if !defined(lint) && !defined(__GNUC__)
-static char rcsid[] =
- "@(#) /src/master/xntp-930612/xntpd/refclock_mx4200.c,v 1.5 1993/06/18 21:19:54 jbj Exp (LBL) ";
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_calendar.h"
-#include "ntp_unixtime.h"
-
-#if __STDC__
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-#if defined(STREAM)
-#include <stropts.h>
-#if defined(MX4200CLK)
-#include <sys/clkdefs.h>
-#endif /* MX4200CLK */
-#endif /* STREAM */
-
-#include <sys/ppsclock.h>
-
-#include "mx4200.h"
-#include "ntp_stdlib.h"
-
-/*
- * This driver supports the Magnavox Model MX4200 GPS Receiver.
- */
-
-/*
- * Definitions
- */
-#define MAXUNITS 2 /* max number of mx4200 units */
-#define MX4200232 "/dev/gps%d"
-#define SPEED232 B4800 /* baud */
-
-/*
- * The number of raw samples which we acquire to derive a single estimate.
- */
-#define NSTAMPS 64
-
-/*
- * Radio interface parameters
- */
-#define MX4200PRECISION (-18) /* precision assumed (about 4 us) */
-#define MX4200REFID "GPS" /* reference id */
-#define MX4200DESCRIPTION "Magnavox MX4200 GPS Receiver" /* who we are */
-#define DEFFUDGETIME 0 /* default fudge time (ms) */
-
-/* Leap stuff */
-extern U_LONG leap_hoursfromleap;
-extern U_LONG leap_happened;
-static int leap_debug;
-
-/*
- * mx4200_reset - reset the count back to zero
- */
-#define mx4200_reset(mx4200) \
- do { \
- (mx4200)->nsamples = 0; \
- } while (0)
-
-/*
- * mx4200_event - record and report an event
- */
-#define mx4200_event(mx4200, evcode) \
- do { \
- if ((mx4200)->status != (u_char)(evcode)) \
- mx4200_report_event((mx4200), (evcode)); \
- } while (0)
-
-/*
- * Imported from the timer module
- */
-extern U_LONG current_time;
-extern struct event timerqueue[];
-
-/*
- * Imported from ntp_loopfilter module
- */
-extern int fdpps; /* pps file descriptor */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * MX4200 unit control structure.
- */
-struct mx4200unit {
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- U_LONG gpssamples[NSTAMPS]; /* the GPS time samples */
- l_fp unixsamples[NSTAMPS]; /* the UNIX time samples */
-
-
- l_fp lastsampletime; /* time of last estimate */
- u_int lastserial; /* last pps serial number */
-#ifdef notdef
- l_fp lastrec; /* last receive time */
- l_fp lastref; /* last timecode time */
-#endif
- char lastcode[RX_BUFF_SIZE]; /* last timecode received */
- U_LONG lasttime; /* last time clock heard from */
- u_char nsamples; /* number of samples we've collected */
- u_char unit; /* unit number for this guy */
- u_char status; /* clock status */
- u_char lastevent; /* last clock event */
- u_char reason; /* reason for last abort */
- u_char lencode; /* length of last timecode */
- u_char year; /* year of eternity */
- u_short monthday; /* day of month */
- u_char hour; /* hour of day */
- u_char minute; /* minute of hour */
- u_char second; /* seconds of minute */
- u_char leap; /* leap indicators */
- /*
- * Status tallies
- */
-#ifdef notdef
- U_LONG polls; /* polls sent */
- U_LONG noresponse; /* number of nonresponses */
-#endif
- U_LONG badformat; /* bad format */
- U_LONG baddata; /* bad data */
- U_LONG timestarted; /* time we started this */
-};
-
-/*
- * We demand that consecutive PPS samples are more than 0.995 seconds
- * and less than 1.005 seconds apart.
- */
-#define PPSLODIFF_UI 0 /* 0.900 as an l_fp */
-#define PPSLODIFF_UF 0xe6666610
-
-#define PPSHIDIFF_UI 1 /* 1.100 as an l_fp */
-#define PPSHIDIFF_UF 0x19999990
-
-/*
- * reason codes
- */
-#define PPSREASON 20
-#define CODEREASON 40
-#define PROCREASON 60
-
-/*
- * Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back.
- */
-static struct mx4200unit *mx4200units[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/*
- * Keep the fudge factors separately so they can be set even
- * when no clock is configured.
- */
-static l_fp fudgefactor[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static u_char sloppyclockflag[MAXUNITS];
-static U_LONG refid[MAXUNITS];
-
-static const char pmvxg[] = "PMVXG";
-
-/*
- * Function prototypes
- */
-static void mx4200_init P((void));
-static int mx4200_start P((u_int, struct peer *));
-static void mx4200_shutdown P((int));
-static void mx4200_receive P((struct recvbuf *));
-static void mx4200_process P((struct mx4200unit *));
-static void mx4200_report_event P((struct mx4200unit *, int));
-static void mx4200_poll P((int, struct peer *));
-static void mx4200_control P((u_int, struct refclockstat *, struct refclockstat *));
-static void mx4200_buginfo P((int, struct refclockbug *));
-
-static char * mx4200_parse P((char *, struct calendar *, int *, int *));
-static int mx4200_needconf P((char *));
-static void mx4200_config P((struct mx4200unit *));
-static void mx4200_send P((int, const char *, ...));
-static int mx4200_cmpl_fp P((void *, void *));
-static u_char cksum P((char *, u_int));
-
-#ifdef DEBUG
-static void opendfile P((int));
-static void checkdfile P((void));
-#endif /* DEBUG */
-
-/*
- * Transfer vector
- */
-struct refclock refclock_mx4200 = {
- mx4200_start, mx4200_shutdown, mx4200_poll,
- mx4200_control, mx4200_init, mx4200_buginfo, NOFLAGS
-};
-
-/*
- * mx4200_init - initialize internal mx4200 driver data
- */
-static void
-mx4200_init()
-{
- register int i;
- /*
- * Just zero the data arrays
- */
- memset((char *)mx4200units, 0, sizeof mx4200units);
- memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
- * Initialize fudge factors to default.
- */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor[i].l_ui = 0;
- fudgefactor[i].l_uf = DEFFUDGETIME;
- stratumtouse[i] = 0;
- sloppyclockflag[i] = 0;
- memcpy((char *)&refid[i], MX4200REFID, 4);
- }
-}
-
-#ifdef DEBUG
-static char dfile[] = "/var/tmp/MX4200.debug";
-static FILE *df = NULL;
-
-static void
-opendfile(create)
- int create;
-{
- if (!create && access(dfile, F_OK) < 0) {
- syslog(LOG_ERR, "mx4200: open %s: %m", dfile);
- return;
- }
- df = fopen(dfile, "a");
- if (df == NULL)
- syslog(LOG_ERR, "mx4200: open %s: %m", dfile);
- else if (setvbuf(df, NULL, _IOLBF, 0) < 0)
- syslog(LOG_ERR, "mx4200: setvbuf %s: %m", dfile);
-}
-
-static void
-checkdfile()
-{
-
- if (df == NULL)
- return;
-
- if (access(dfile, F_OK) < 0) {
- fclose(df);
- opendfile(1);
- }
-}
-
-#endif
-
-
-/*
- * mx4200_start - open the MX4200 devices and initialize data for processing
- */
-static int
-mx4200_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- register struct mx4200unit *mx4200;
- register int i;
- int fd232;
- char mx4200dev[20];
-
- /*
- * Check configuration info
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "mx4200_start: unit %d invalid", unit);
- return (0);
- }
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "mx4200_start: unit %d in use", unit);
- return (0);
- }
-
- /*
- * Open serial port
- */
- (void) sprintf(mx4200dev, MX4200232, unit);
- fd232 = open(mx4200dev, O_RDWR, 0777);
- if (fd232 == -1) {
- syslog(LOG_ERR,
- "mx4200_start: open of %s: %m", mx4200dev);
- return (0);
- }
-
-#if defined(HAVE_SYSV_TTYS)
- /*
- * System V serial line parameters (termio interface)
- *
- */
- { struct termio ttyb;
- if (ioctl(fd232, TCGETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "mx4200_start: ioctl(%s, TCGETA): %m", mx4200dev);
- goto screwed;
- }
- ttyb.c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyb.c_oflag = 0;
- ttyb.c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyb.c_lflag = ICANON;
- ttyb.c_cc[VERASE] = ttyb.c_cc[VKILL] = '\0';
- if (ioctl(fd232, TCSETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "mx4200_start: ioctl(%s, TCSETA): %m", mx4200dev);
- goto screwed;
- }
- }
-#endif /* HAVE_SYSV_TTYS */
-#if defined(HAVE_TERMIOS)
- /*
- * POSIX serial line parameters (termios interface)
- *
- * The MX4200CLK option provides timestamping at the driver level.
- * It requires the tty_clk streams module.
- *
- * The MX4200PPS option provides timestamping at the driver level.
- * It uses a 1-pps signal and level converter (gadget box) and
- * requires the ppsclock streams module and SunOS 4.1.1 or
- * later.
- */
- { struct termios ttyb, *ttyp;
-
- ttyp = &ttyb;
- if (tcgetattr(fd232, ttyp) < 0) {
- syslog(LOG_ERR,
- "mx4200_start: tcgetattr(%s): %m", mx4200dev);
- goto screwed;
- }
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- syslog(LOG_ERR,
- "mx4200_start: tcsetattr(%s): %m", mx4200dev);
- goto screwed;
- }
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- syslog(LOG_ERR,
- "mx4200_start: tcflush(%s): %m", mx4200dev);
- goto screwed;
- }
- }
-#endif /* HAVE_TERMIOS */
-#ifdef STREAM
-#if defined(MX4200CLK)
- if (ioctl(fd232, I_PUSH, "clk") < 0)
- syslog(LOG_ERR,
- "mx4200_start: ioctl(%s, I_PUSH, clk): %m", mx4200dev);
- if (ioctl(fd232, CLK_SETSTR, "\n") < 0)
- syslog(LOG_ERR,
- "mx4200_start: ioctl(%s, CLK_SETSTR): %m", mx4200dev);
-#endif /* MX4200CLK */
-#if defined(MX4200PPS)
- if (ioctl(fd232, I_PUSH, "ppsclock") < 0)
- syslog(LOG_ERR,
- "mx4200_start: ioctl(%s, I_PUSH, ppsclock): %m", mx4200dev);
- else
- fdpps = fd232;
-#endif /* MX4200PPS */
-#endif /* STREAM */
-#if defined(HAVE_BSD_TTYS)
- /*
- * 4.3bsd serial line parameters (sgttyb interface)
- *
- * The MX4200CLK option provides timestamping at the driver level.
- * It requires the tty_clk line discipline and 4.3bsd or later.
- */
- { struct sgttyb ttyb;
-#if defined(MX4200CLK)
- int ldisc = CLKLDISC;
-#endif /* MX4200CLK */
-
- if (ioctl(fd232, TIOCGETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "mx4200_start: ioctl(%s, TIOCGETP): %m", mx4200dev);
- goto screwed;
- }
- ttyb.sg_ispeed = ttyb.sg_ospeed = SPEED232;
-#if defined(MX4200CLK)
- ttyb.sg_erase = ttyb.sg_kill = '\r';
- ttyb.sg_flags = RAW;
-#else
- ttyb.sg_erase = ttyb.sg_kill = '\0';
- ttyb.sg_flags = EVENP|ODDP|CRMOD;
-#endif /* MX4200CLK */
- if (ioctl(fd232, TIOCSETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "mx4200_start: ioctl(%s, TIOCSETP): %m", mx4200dev);
- goto screwed;
- }
-#if defined(MX4200CLK)
- if (ioctl(fd232, TIOCSETD, &ldisc) < 0) {
- syslog(LOG_ERR,
- "mx4200_start: ioctl(%s, TIOCSETD): %m",mx4200dev);
- goto screwed;
- }
-#endif /* MX4200CLK */
- }
-#endif /* HAVE_BSD_TTYS */
-
- /*
- * Allocate unit structure
- */
- if (mx4200units[unit] != 0) {
- mx4200 = mx4200units[unit]; /* The one we want is okay */
- } else {
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && mx4200units[i] != 0)
- break;
- }
- if (i < MAXUNITS) {
- /*
- * Reclaim this one
- */
- mx4200 = mx4200units[i];
- mx4200units[i] = 0;
- } else {
- mx4200 = (struct mx4200unit *)
- emalloc(sizeof(struct mx4200unit));
- }
- }
-
- memset((char *)mx4200, 0, sizeof(struct mx4200unit));
- mx4200units[unit] = mx4200;
-
- /*
- * Set up the structures
- */
- mx4200->peer = peer;
- mx4200->unit = (u_char)unit;
- mx4200->timestarted = current_time;
-
- mx4200->io.clock_recv = mx4200_receive;
- mx4200->io.srcclock = (caddr_t)mx4200;
- mx4200->io.datalen = 0;
- mx4200->io.fd = fd232;
- if (!io_addclock(&mx4200->io))
- goto screwed;
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success.
- */
- peer->precision = MX4200PRECISION;
- peer->rootdelay = 0;
- peer->rootdispersion = 0;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- unitinuse[unit] = 1;
-
- /* Insure the receiver is properly configured */
- mx4200_config(mx4200);
-
-#ifdef DEBUG
- opendfile(0);
-#endif
- return (1);
-
- /*
- * Something broke; abandon ship
- */
-screwed:
- (void) close(fd232);
- return (0);
-}
-
-/*
- * mx4200_shutdown - shut down a MX4200 clock
- */
-static void
-mx4200_shutdown(unit)
- int unit;
-{
- register struct mx4200unit *mx4200;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "mx4200_shutdown: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "mx4200_shutdown: unit %d not in use", unit);
- return;
- }
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- mx4200 = mx4200units[unit];
- io_closeclock(&mx4200->io);
- unitinuse[unit] = 0;
-}
-
-static void
-mx4200_config(mx4200)
- register struct mx4200unit *mx4200;
-{
- register int fd = mx4200->io.fd;
-
-syslog(LOG_DEBUG, "mx4200_config");
-
- /* Zero the output list (do it twice to flush possible junk) */
- mx4200_send(fd, "%s,%03d,,%d,,,,,,", pmvxg, PMVXG_S_PORTCONF, 1);
- mx4200_send(fd, "%s,%03d,,%d,,,,,,", pmvxg, PMVXG_S_PORTCONF, 1);
-
- /* Switch to 2d mode */
- mx4200_send(fd, "%s,%03d,%d,,%.1f,%.1f,,%d,%d,%c,%d",
- pmvxg, PMVXG_S_INITMODEB,
- 2, /* 2d mode */
- 0.1, /* hor accel fact as per Steve */
- 0.1, /* ver accel fact as per Steve */
- 10, /* hdop limit as per Steve */
- 5, /* elevation limit as per Steve */
- 'U', /* time output mode */
- 0); /* local time offset from gmt */
-
- /* Configure time recovery */
- mx4200_send(fd, "%s,%03d,%c,%c,%c,%d,%d,%d,",
- pmvxg, PMVXG_S_TRECOVCONF,
-#ifdef notdef
- 'K', /* known position */
- 'D', /* dynamic position */
-#else
- 'S', /* static position */
-#endif
- 'U', /* steer clock to gps time */
- 'A', /* always output time pulse */
- 500, /* max time error in ns */
- 0, /* user bias in ns */
- 1); /* output to control port */
-}
-
-/*
- * mx4200_report_event - note the occurrence of an event
- */
-static void
-mx4200_report_event(mx4200, code)
- struct mx4200unit *mx4200;
- int code;
-{
- struct peer *peer;
-
- peer = mx4200->peer;
- if (mx4200->status != (u_char)code) {
- mx4200->status = (u_char)code;
- if (code != CEVNT_NOMINAL)
- mx4200->lastevent = (u_char)code;
- syslog(LOG_INFO,
- "mx4200 clock %s event %x", ntoa(&peer->srcadr), code);
- }
-}
-
-/*
- * mx4200_poll - mx4200 watchdog routine
- */
-static void
-mx4200_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- register struct mx4200unit *mx4200;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "mx4200_poll: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "mx4200_poll: unit %d not used", unit);
- return;
- }
-
- mx4200 = mx4200units[unit];
- if ((current_time - mx4200->lasttime) > 150) {
- mx4200_event(mx4200, CEVNT_FAULT);
-
- /* Request a status message which should trigger a reconfig */
- mx4200_send(mx4200->io.fd, "%s,%03d", "CDGPQ", PMVXG_D_STATUS);
- syslog(LOG_DEBUG, "mx4200_poll: request status");
- }
-}
-
-static const char char2hex[] = "0123456789ABCDEF";
-
-/*
- * mx4200_receive - receive gps data
- */
-static void
-mx4200_receive(rbufp)
- struct recvbuf *rbufp;
-{
- register struct mx4200unit *mx4200;
- register char *dpt, *cp;
- register U_LONG tmp_ui;
- register U_LONG tmp_uf;
- register U_LONG gpstime;
- struct ppsclockev ev;
- register struct calendar *jt;
- struct calendar sjt;
- register int n;
- int valid, leapsec;
- register u_char ck;
-
- mx4200 = (struct mx4200unit *)rbufp->recv_srcclock;
-
-#ifdef DEBUG
- if (debug > 3)
- printf("mx4200_receive: nsamples = %d\n", mx4200->nsamples);
-#endif
-
- /* Record the time of this event */
- mx4200->lasttime = current_time;
-
- /* Get the pps value */
- if (ioctl(mx4200->io.fd, CIOGETEV, (char *)&ev) < 0) {
- /* XXX Actually, if this fails, we're pretty much screwed */
-#ifdef DEBUG
- if (debug) {
- fprintf(stderr, "mx4200_receive: ");
- perror("CIOGETEV");
- }
-#endif
- mx4200->reason = PPSREASON + 1;
- mx4200_event(mx4200, CEVNT_FAULT);
- mx4200_reset(mx4200);
- return;
- }
- tmp_ui = ev.tv.tv_sec + (U_LONG)JAN_1970;
- TVUTOTSF(ev.tv.tv_usec, tmp_uf);
-
- /* Get buffer and length; sock away last timecode */
- n = rbufp->recv_length;
- dpt = rbufp->recv_buffer;
- if (n <= 1)
- return;
- mx4200->lencode = n;
- memmove(mx4200->lastcode, dpt, n);
-
- /*
- * We expect to see something like:
- *
- * $PMVXG,830,T,1992,07,09,04:18:34,U,S,-02154,00019,000000,00*1D\n
- *
- * Reject if any important landmarks are missing.
- */
- cp = dpt + n - 4;
- if (cp < dpt || *dpt != '$' || cp[0] != '*' || cp[3] != '\n') {
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: bad format\n");
-#endif
- mx4200->badformat++;
- mx4200->reason = PPSREASON + 2;
- mx4200_event(mx4200, CEVNT_BADREPLY);
- mx4200_reset(mx4200);
- return;
- }
-
- /* Check checksum */
- ck = cksum(&dpt[1], n - 5);
- if (char2hex[ck >> 4] != cp[1] || char2hex[ck & 0xf] != cp[2]) {
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: bad checksum\n");
-#endif
- mx4200->badformat++;
- mx4200->reason = PPSREASON + 3;
- mx4200_event(mx4200, CEVNT_BADREPLY);
- mx4200_reset(mx4200);
- return;
- }
-
- /* Truncate checksum (and the buffer for that matter) */
- *cp = '\0';
-
- /* Leap second debugging stuff */
- if ((leap_hoursfromleap && !leap_happened) || leap_debug > 0) {
- /* generate reports for awhile after leap */
- if (leap_hoursfromleap && !leap_happened)
- leap_debug = 3600;
- else
- --leap_debug;
- syslog(LOG_INFO, "mx4200 leap: %s \"%s\"",
- umfptoa(tmp_ui, tmp_uf, 6), dpt);
- }
-
- /* Parse time recovery message */
- jt = &sjt;
- if ((cp = mx4200_parse(dpt, jt, &valid, &leapsec)) != NULL) {
- /* Configure the receiver if necessary */
- if (mx4200_needconf(dpt))
- mx4200_config(mx4200);
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: mx4200_parse: %s\n", cp);
-#endif
- mx4200->badformat++;
- mx4200->reason = PPSREASON + 5;
- mx4200_event(mx4200, CEVNT_BADREPLY);
- mx4200_reset(mx4200);
- return;
- }
-
- /* Setup leap second indicator */
- if (leapsec == 0)
- mx4200->leap = LEAP_NOWARNING;
- else if (leapsec == 1)
- mx4200->leap = LEAP_ADDSECOND;
- else if (leapsec == -1)
- mx4200->leap = LEAP_DELSECOND;
- else
- mx4200->leap = LEAP_NOTINSYNC; /* shouldn't happen */
-
- /* Check parsed time (allow for possible leap seconds) */
- if (jt->second >= 61 || jt->minute >= 60 || jt->hour >= 24) {
-#ifdef DEBUG
- if (debug) {
- printf("mx4200_receive: bad time %d:%02d:%02d",
- jt->hour, jt->minute, jt->second);
- if (leapsec != 0)
- printf(" (leap %+d)", leapsec);
- putchar('\n');
- }
-#endif
- mx4200->baddata++;
- mx4200->reason = PPSREASON + 6;
- mx4200_event(mx4200, CEVNT_BADTIME);
- mx4200_reset(mx4200);
- /* Eat the next pulse which the clock claims will be bad */
- mx4200->nsamples = -1;
- return;
- }
-
- /* Check parsed date */
- if (jt->monthday > 31 || jt->month > 12 || jt->year < 1900) {
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: bad date (%d/%d/%d)\n",
- jt->monthday, jt->month, jt->year);
-#endif
- mx4200->baddata++;
- mx4200->reason = PPSREASON + 7;
- mx4200_event(mx4200, CEVNT_BADDATE);
- mx4200_reset(mx4200);
- return;
- }
-
- /* Convert to ntp time */
- gpstime = caltontp(jt);
-
- /* The gps message describes the *next* pulse; pretend it's this one */
- --gpstime;
-
- /* Debugging */
-#ifdef DEBUG
- checkdfile();
- if (df != NULL) {
- l_fp t;
-
- t.l_ui = gpstime;
- t.l_uf = 0;
- M_SUB(t.l_ui, t.l_uf, tmp_ui, tmp_uf);
- fprintf(df, "%s\t%s",
- umfptoa(tmp_ui, tmp_uf, 6), mfptoa(t.l_ui, t.l_uf, 6));
- if (debug > 3)
- fprintf(df, "\t(gps: %lu)", gpstime);
- if (leapsec != 0)
- fprintf(df, "\t(leap sec %+d)", leapsec);
- if (!valid)
- fprintf(df, "\t(pulse not valid)");
- fputc('\n', df);
- }
-#endif
-
- /* Check pps serial number against last one */
- if (mx4200->lastserial + 1 != ev.serial && mx4200->lastserial != 0) {
-#ifdef DEBUG
- if (debug) {
- if (ev.serial == mx4200->lastserial)
- printf("mx4200_receive: no new pps event\n");
- else
- printf("mx4200_receive: missed %d pps events\n",
- ev.serial - mx4200->lastserial - 1);
- }
-#endif
- mx4200->reason = PPSREASON + 8;
- mx4200_event(mx4200, CEVNT_FAULT);
- mx4200_reset(mx4200);
- /* fall through and this one collect as first sample */
- }
- mx4200->lastserial = ev.serial;
-
-/*
- * XXX
- * Since this message is for the next pulse, it's really the next pulse
- * that the clock might be telling us will be invalid.
- */
- /* Toss if not designated "valid" by the gps */
- if (!valid) {
-#ifdef DEBUG
- if (debug)
- printf("mx4200_receive: pps not valid\n");
-#endif
- mx4200->reason = PPSREASON + 9;
- mx4200_event(mx4200, CEVNT_BADTIME);
- mx4200_reset(mx4200);
- return;
- }
-
- /* Copy time into mx4200unit struct */
- /* XXX (why?) */
- mx4200->year = jt->year;
- mx4200->monthday = jt->monthday;
- mx4200->hour = jt->hour;
- mx4200->minute = jt->minute;
- mx4200->second = jt->second;
-
- /* Sock away the GPS and UNIX timesamples */
- n = mx4200->nsamples++;
- if (n < 0)
- return; /* oops, this pulse is bad */
- mx4200->gpssamples[n] = gpstime;
- mx4200->unixsamples[n].l_ui = mx4200->lastsampletime.l_ui = tmp_ui;
- mx4200->unixsamples[n].l_uf = mx4200->lastsampletime.l_uf = tmp_uf;
- if (mx4200->nsamples >= NSTAMPS) {
- /*
- * Here we've managed to complete an entire NSTAMPS
- * second cycle without major mishap. Process what has
- * been received.
- */
- mx4200_process(mx4200);
- mx4200_reset(mx4200);
- }
-}
-
-/* Compare two l_fp's, used with qsort() */
-static int
-mx4200_cmpl_fp(p1, p2)
- register void *p1, *p2;
-{
-
- if (!L_ISGEQ((l_fp *)p1, (l_fp *)p2))
- return (-1);
- if (L_ISEQU((l_fp *)p1, (l_fp *)p2))
- return (0);
- return (1);
-}
-
-/*
- * mx4200_process - process a pile of samples from the clock
- */
-static void
-mx4200_process(mx4200)
- struct mx4200unit *mx4200;
-{
- register int i, n;
- register l_fp *fp, *op;
- register U_LONG *lp;
- l_fp off[NSTAMPS];
- register U_LONG tmp_ui, tmp_uf;
- register U_LONG date_ui, date_uf;
- u_fp dispersion;
-
- /* Compute offsets from the raw data. */
- fp = mx4200->unixsamples;
- op = off;
- lp = mx4200->gpssamples;
- for (i = 0; i < NSTAMPS; ++i, ++lp, ++op, ++fp) {
- op->l_ui = *lp;
- op->l_uf = 0;
- L_SUB(op, fp);
- }
-
- /* Sort offsets into ascending order. */
- qsort((char *)off, NSTAMPS, sizeof(l_fp), mx4200_cmpl_fp);
-
- /*
- * Reject the furthest from the median until 8 samples left
- */
- i = 0;
- n = NSTAMPS;
- while ((n - i) > 8) {
- tmp_ui = off[n-1].l_ui;
- tmp_uf = off[n-1].l_uf;
- date_ui = off[(n+i)/2].l_ui;
- date_uf = off[(n+i)/2].l_uf;
- M_SUB(tmp_ui, tmp_uf, date_ui, date_uf);
- M_SUB(date_ui, date_uf, off[i].l_ui, off[i].l_uf);
- if (M_ISHIS(date_ui, date_uf, tmp_ui, tmp_uf)) {
- /*
- * reject low end
- */
- i++;
- } else {
- /*
- * reject high end
- */
- n--;
- }
- }
-
- /*
- * Compute the dispersion based on the difference between the
- * extremes of the remaining offsets.
- */
- tmp_ui = off[n-1].l_ui;
- tmp_uf = off[n-1].l_uf;
- M_SUB(tmp_ui, tmp_uf, off[i].l_ui, off[i].l_uf);
- dispersion = MFPTOFP(tmp_ui, tmp_uf);
-
- /*
- * Now compute the offset estimate. If the sloppy clock
- * flag is set, average the remainder, otherwise pick the
- * median.
- */
- if (sloppyclockflag[mx4200->unit]) {
- tmp_ui = tmp_uf = 0;
- while (i < n) {
- M_ADD(tmp_ui, tmp_uf, off[i].l_ui, off[i].l_uf);
- i++;
- }
- M_RSHIFT(tmp_ui, tmp_uf);
- M_RSHIFT(tmp_ui, tmp_uf);
- M_RSHIFT(tmp_ui, tmp_uf);
- i = 0;
- off[0].l_ui = tmp_ui;
- off[0].l_uf = tmp_uf;
- } else {
- i = (n + i) / 2;
- }
-
- /*
- * Add the default MX4200 QT delay into this.
- */
-#ifdef notdef
- L_ADDUF(&off[i], MX4200QTFUDGE);
-#endif
-
- /*
- * Done. Use lastref as the reference time and lastrec
- * as the receive time. ** note this can result in tossing
- * out the peer in the protocol module if lastref > lastrec,
- * so last rec is used for both values - dlm ***
- */
- refclock_receive(mx4200->peer, &off[i],
- (s_fp)0, /* delay */
- dispersion,
- &mx4200->unixsamples[NSTAMPS-1], /* reftime */
- &mx4200->unixsamples[NSTAMPS-1], /* rectime */
- mx4200->leap);
-
- mx4200_event(mx4200, CEVNT_NOMINAL);
-}
-
-/*
- * mx4200_control - set fudge factors, return statistics
- */
-static void
-mx4200_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct mx4200unit *mx4200;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "mx4200_control: unit %d invalid", unit);
- return;
- }
-
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- fudgefactor[unit] = in->fudgetime1;
- if (in->haveflags & CLK_HAVEVAL1)
- stratumtouse[unit] = (u_char)(in->fudgeval1);
- if (in->haveflags & CLK_HAVEVAL2)
- refid[unit] = in->fudgeval2;
- if (in->haveflags & CLK_HAVEFLAG1)
- sloppyclockflag[unit] = in->flags & CLK_FLAG1;
- if (unitinuse[unit]) {
- struct peer *peer;
-
- peer = mx4200units[unit]->peer;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- }
- }
-
- if (out != 0) {
- memset((char *)out, 0, sizeof (struct refclockstat));
- out->type = REFCLK_GPS_MX4200;
- out->haveflags = CLK_HAVETIME1 | CLK_HAVEVAL1 | CLK_HAVEVAL2 |
- CLK_HAVEFLAG1;
- out->clockdesc = MX4200DESCRIPTION;
- out->fudgetime1 = fudgefactor[unit];
- out->fudgeval1 = (LONG)stratumtouse[unit];
- out->fudgeval2 = refid[unit];;
- out->flags = sloppyclockflag[unit];
- if (unitinuse[unit]) {
- mx4200 = mx4200units[unit];
- out->lencode = mx4200->lencode;
- out->lastcode = mx4200->lastcode;
- out->lastevent = mx4200->lastevent;
- out->currentstatus = mx4200->status;
-
- out->polls = 0; /* mx4200->polls; */
- out->noresponse = 0; /* mx4200->noresponse; */
- out->badformat = mx4200->badformat;
- out->baddata = mx4200->baddata;
- out->timereset = current_time - mx4200->timestarted;
- }
- }
-}
-
-/*
- * mx4200_buginfo - return clock dependent debugging info
- */
-static void
-mx4200_buginfo(unit, bug)
- int unit;
- register struct refclockbug *bug;
-{
- register struct mx4200unit *mx4200;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "mx4200_buginfo: unit %d invalid", unit);
- return;
- }
-
- if (!unitinuse[unit])
- return;
- mx4200 = mx4200units[unit];
-
- memset((char *)bug, 0, sizeof(*bug));
- bug->nvalues = 10;
- bug->ntimes = 2;
- if (mx4200->lasttime != 0)
- bug->values[0] = current_time - mx4200->lasttime;
- else
- bug->values[0] = 0;
- bug->values[1] = (U_LONG)mx4200->reason;
- bug->values[2] = (U_LONG)mx4200->year;
- bug->values[3] = (U_LONG)mx4200->monthday;
- bug->values[4] = (U_LONG)mx4200->hour;
- bug->values[5] = (U_LONG)mx4200->minute;
- bug->values[6] = (U_LONG)mx4200->second;
-#ifdef notdef
- bug->values[7] = mx4200->msec;
- bug->values[8] = mx4200->noreply;
- bug->values[9] = mx4200->yearstart;
-#endif
- bug->stimes = 0x1c;
-#ifdef notdef
- bug->times[0] = mx4200->lastref;
- bug->times[1] = mx4200->lastrec;
-#endif
-}
-
-/*
- * Returns true if the this is a status message. We use this as
- * an indication that the receiver needs to be initialized.
- */
-static int
-mx4200_needconf(buf)
- char *buf;
-{
- register LONG v;
- char *cp;
-
- cp = buf;
-
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Record type */
- v = strtol(cp, &cp, 10);
- if (v != PMVXG_D_STATUS)
- return (0);
- /*
- * XXX
- * Since we configure the receiver to not give us status
- * messages and since the receiver outputs status messages by
- * default after being reset to factory defaults when sent the
- * "$PMVXG,018,C\r\n" message, any status message we get
- * indicates the reciever needs to be initialized; thus, it is
- * not necessary to decode the status message.
- */
-#ifdef notdef
- ++cp;
-
- /* Receiver status */
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Number of satellites which should be visible */
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Number of satellites being tracked */
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Time since last NAV */
- if ((cp = strchr(cp, ',')) == NULL)
- return (0);
- ++cp;
-
- /* Initialization status */
- v = strtol(cp, &cp, 10);
- if (v == 0)
-#endif
- return (1);
-}
-
-/* Parse a mx4200 time recovery message. Returns a string if error */
-static char *
-mx4200_parse(buf, jt, validp, leapsecp)
- register char *buf;
- register struct calendar *jt;
- register int *validp, *leapsecp;
-{
- register LONG v;
- char *cp;
-
- cp = buf;
- memset((char *)jt, 0, sizeof(*jt));
-
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no rec-type");
- ++cp;
-
- /* Record type */
- v = strtol(cp, &cp, 10);
- if (v != PMVXG_D_TRECOVOUT)
- return ("wrong rec-type");
-
- /* Pulse valid indicator */
- if (*cp++ != ',')
- return ("no pulse-valid");
- if (*cp == 'T')
- *validp = 1;
- else if (*cp == 'F')
- *validp = 0;
- else
- return ("bad pulse-valid");
- ++cp;
-
- /* Year */
- if (*cp++ != ',')
- return ("no year");
- jt->year = strtol(cp, &cp, 10);
-
- /* Month of year */
- if (*cp++ != ',')
- return ("no month");
- jt->month = strtol(cp, &cp, 10);
-
- /* Day of month */
- if (*cp++ != ',')
- return ("no month day");
- jt->monthday = strtol(cp, &cp, 10);
-
- /* Hour */
- if (*cp++ != ',')
- return ("no hour");
- jt->hour = strtol(cp, &cp, 10);
-
- /* Minute */
- if (*cp++ != ':')
- return ("no minute");
- jt->minute = strtol(cp, &cp, 10);
-
- /* Second */
- if (*cp++ != ':')
- return ("no second");
- jt->second = strtol(cp, &cp, 10);
-
- /* Time indicator */
- if (*cp++ != ',' || *cp++ == '\0')
- return ("no time indicator");
-
- /* Time recovery mode */
- if (*cp++ != ',' || *cp++ == '\0')
- return ("no time mode");
-
- /* Oscillator offset */
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no osc off");
- ++cp;
-
- /* Time mark error */
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no time mark err");
- ++cp;
-
- /* User time bias */
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no user bias");
- ++cp;
-
- /* Leap second flag */
- if ((cp = strchr(cp, ',')) == NULL)
- return ("no leap");
- ++cp;
- *leapsecp = strtol(cp, &cp, 10);
-
- return (NULL);
-}
-
-/* Calculate the checksum */
-static u_char
-cksum(cp, n)
- register char *cp;
- register u_int n;
-{
- register u_char ck;
-
- for (ck = 0; n-- > 0; ++cp)
- ck ^= *cp;
- return (ck);
-}
-
-static void
-#if __STDC__
-mx4200_send(register int fd, const char *fmt, ...)
-#else
-mx4200_send(fd, fmt, va_alist)
- register int fd;
- const char *fmt;
- va_dcl
-#endif
-{
- register char *cp;
- register int n, m;
- va_list ap;
- char buf[1024];
- u_char ck;
-
-#if __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- cp = buf;
- *cp++ = '$';
-#ifdef notdef
- /* BSD is rational */
- n = vsnprintf(cp, sizeof(buf) - 1, fmt, ap);
-#else
- /* SunOS sucks */
- (void)vsprintf(cp, fmt, ap);
- n = strlen(cp);
-#endif
- ck = cksum(cp, n);
- cp += n;
- ++n;
-#ifdef notdef
- /* BSD is rational */
- n += snprintf(cp, sizeof(buf) - n - 5, "*%02X\r\n", ck);
-#else
- /* SunOS sucks */
- sprintf(cp, "*%02X\r\n", ck);
- n += strlen(cp);
-#endif
-
- m = write(fd, buf, n);
- if (m < 0)
- syslog(LOG_ERR, "mx4200_send: write: %m (%s)", buf);
- else if (m != n)
- syslog(LOG_ERR, "mx4200_send: write: %d != %d (%s)", m, n, buf);
- va_end(ap);
-}
-#endif
diff --git a/usr.sbin/xntpd/xntpd/refclock_old/refclock_omega.c b/usr.sbin/xntpd/xntpd/refclock_old/refclock_omega.c
deleted file mode 100644
index 95a20a0d2c44..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_old/refclock_omega.c
+++ /dev/null
@@ -1,999 +0,0 @@
-/*
- * refclock_omega - clock driver for the Kinemetrics Truetime OM-DC OMEGA
- * receiver.
- *
- * Version 1.0 11-Dec-92 Steve Clift (clift@ml.csiro.au)
- * Initial version, mostly lifted from refclock_goes.c.
- *
- * 1.1 03-May-93 Steve Clift
- * Tarted up the sample filtering mechanism to give improved
- * one-off measurements. Improved measurement dispersion code
- * to account for accumulated drift when the clock loses lock.
- *
- */
-
-#if defined(REFCLOCK) && (defined(OMEGA) || defined(OMEGACLK) || defined(OMEGAPPS))
-
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/time.h>
-
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-
-#if defined(HAVE_BSD_TTYS)
-#include <sgtty.h>
-#endif /* HAVE_BSD_TTYS */
-
-#if defined(HAVE_SYSV_TTYS)
-#include <termio.h>
-#endif /* HAVE_SYSV_TTYS */
-
-#if defined(HAVE_TERMIOS)
-#include <termios.h>
-#endif
-#if defined(STREAM)
-#include <stropts.h>
-#if defined(OMEGACLK)
-#include <sys/clkdefs.h>
-#endif /* OMEGACLK */
-#endif /* STREAM */
-
-#if defined (OMEGAPPS)
-#include <sys/ppsclock.h>
-#endif /* OMEGAPPS */
-
-#include "ntp_stdlib.h"
-
-/*
- * Support for Kinemetrics Truetime OM-DC OMEGA Receiver
- *
- * Most of this code is copied from refclock_goes.c with thanks.
- *
- * the time code looks like follows; Send the clock a R or C and once per
- * second a timestamp will appear that looks like this:
- * ADDD:HH:MM:SSQCL
- * A - control A
- * Q Quality indication: indicates possible error of
- * > >+- 5 seconds
- * ? >+/- 500 milliseconds # >+/- 50 milliseconds
- * * >+/- 5 milliseconds . >+/- 1 millisecond
- * A-H less than 1 millisecond. Character indicates which station
- * is being received as follows:
- * A = Norway, B = Liberia, C = Hawaii, D = North Dakota,
- * E = La Reunion, F = Argentina, G = Australia, H = Japan.
- * C - Carriage return
- * L - Line feed
- * The carriage return start bit begins on 0 seconds and extends to 1 bit time.
- */
-
-/*
- * Definitions
- */
-#define MAXUNITS 4 /* max number of OMEGA units */
-#define OMEGA232 "/dev/omega%d"
-#define SPEED232 B9600 /* 9600 baud */
-
-/*
- * Radio interface parameters
- */
-#define OMEGADESCRIPTION "Kinemetrics OM-DC OMEGA Receiver" /* who we are */
-#define OMEGAMAXDISPERSE (FP_SECOND/32) /* max allowed sample dispersion */
-#define OMEGAPRECISION (-10) /* precision assumed (about 1 ms) */
-#define OMEGAREFID "VLF\0" /* reference id */
-#define LENOMEGA 13 /* length of standard response */
-#define GMT 0 /* hour offset from Greenwich */
-#define NSTAMPS 9 /* samples collected when polled */
-#define NSKEEP 5 /* samples to keep after discards */
-#define BMAX 50 /* timecode buffer length */
-
-/*
- * The OM-DC puts out the start bit of the <CR> on the second, but
- * we see the result after the <LF> is received, about 2ms later at
- * 9600 baud. Use this as the default fudge time, and let the user
- * fiddle it to account for driver latency etc.
- */
-#define DEFFUDGETIME 0x00830000 /* default fudge time (~2ms) */
-
-/*
- * Clock drift errors as u_fp values.
- */
-#define U_FP5000MS (5*FP_SECOND) /* 5 seconds */
-#define U_FP500MS (FP_SECOND/2) /* 500 msec */
-#define U_FP50MS (FP_SECOND/20) /* 50 msec */
-#define U_FP5MS (FP_SECOND/200) /* 5 msec */
-
-/*
- * Station codes
- */
-#define STATION_NONE 0
-#define STATION_NORWAY 1
-#define STATION_LIBERIA 2
-#define STATION_HAWAII 3
-#define STATION_N_DAKOTA 4
-#define STATION_LA_REUNION 5
-#define STATION_ARGENTINA 6
-#define STATION_AUSTRALIA 7
-#define STATION_JAPAN 8
-
-/*
- * Hack to avoid excercising the multiplier. I have no pride.
- */
-#define MULBY10(x) (((x)<<3) + ((x)<<1))
-
-/*
- * Imported from the timer module
- */
-extern U_LONG current_time;
-extern struct event timerqueue[];
-
-/*
- * Imported from ntp_loopfilter module
- */
-extern int fdpps; /* pps file descriptor */
-
-/*
- * Imported from ntpd module
- */
-extern int debug; /* global debug flag */
-
-/*
- * OMEGA unit control structure
- */
-struct omegaunit {
- struct peer *peer; /* associated peer structure */
- struct refclockio io; /* given to the I/O handler */
- l_fp lastrec; /* last receive time */
- l_fp lastref; /* last timecode time */
- l_fp offset[NSTAMPS]; /* recent sample offsets */
- char lastcode[BMAX]; /* last timecode received */
- u_short station; /* which station we're locked to */
- u_short polled; /* Hand in a time sample? */
- U_LONG coderecv; /* timecodes received */
- u_char lencode; /* length of last timecode */
- U_LONG lasttime; /* last time clock heard from */
- u_char unit; /* unit number for this guy */
- u_char status; /* clock status */
- u_char lastevent; /* last clock event */
- u_char reason; /* reason for last failure */
- u_char year; /* year of eternity */
- u_short day; /* day of year */
- u_char hour; /* hour of day */
- u_char minute; /* minute of hour */
- u_char second; /* seconds of minute */
- u_char leap; /* leap indicators */
- u_short msec; /* millisecond of second */
- u_char quality; /* quality char from last timecode */
- U_LONG yearstart; /* start of current year */
- /*
- * Status tallies
- */
- U_LONG polls; /* polls sent */
- U_LONG noreply; /* no replies to polls */
- U_LONG badformat; /* bad format */
- U_LONG baddata; /* bad data */
- U_LONG timestarted; /* time we started this */
-};
-
-/*
- * Data space for the unit structures. Note that we allocate these on
- * the fly, but never give them back.
- */
-static struct omegaunit *omegaunits[MAXUNITS];
-static u_char unitinuse[MAXUNITS];
-
-/*
- * Keep the fudge factors separately so they can be set even
- * when no clock is configured.
- */
-static l_fp fudgefactor1[MAXUNITS];
-static l_fp fudgefactor2[MAXUNITS];
-static u_char stratumtouse[MAXUNITS];
-static u_char readonlyclockflag[MAXUNITS];
-static U_LONG refid[MAXUNITS];
-
-/*
- * Function prototypes
- */
-static void omega_init P((void));
-static int omega_start P((u_int, struct peer *));
-static void omega_shutdown P((int));
-static void omega_report_event P((struct omegaunit *, int));
-static void omega_receive P((struct recvbuf *));
-static char omega_process P((struct omegaunit *, l_fp *, u_fp *));
-static void omega_poll P((int, struct peer *));
-static void omega_control P((u_int, struct refclockstat *, struct refclockstat *));
-static void omega_buginfo P((int, struct refclockbug *));
-static void omega_send P((struct omegaunit *, char *));
-
-/*
- * Transfer vector
- */
-struct refclock refclock_omega = {
- omega_start, omega_shutdown, omega_poll,
- omega_control, omega_init, omega_buginfo, NOFLAGS
-};
-
-/*
- * omega_init - initialize internal omega driver data
- */
-static void
-omega_init()
-{
- register int i;
- /*
- * Just zero the data arrays
- */
- memset((char *)omegaunits, 0, sizeof omegaunits);
- memset((char *)unitinuse, 0, sizeof unitinuse);
-
- /*
- * Initialize fudge factors to default.
- */
- for (i = 0; i < MAXUNITS; i++) {
- fudgefactor1[i].l_ui = 0;
- fudgefactor1[i].l_uf = DEFFUDGETIME;
- fudgefactor2[i].l_ui = 0;
- fudgefactor2[i].l_uf = 0;
- stratumtouse[i] = 0;
- readonlyclockflag[i] = 0;
- memcpy((char *)&refid[i], OMEGAREFID, 4);
- }
-}
-
-
-/*
- * omega_start - open the OMEGA devices and initialize data for processing
- */
-static int
-omega_start(unit, peer)
- u_int unit;
- struct peer *peer;
-{
- register struct omegaunit *omega;
- register int i;
- int fd232;
- char omegadev[20];
-
- /*
- * Check configuration info
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR,"omega_start: unit %d invalid", unit);
- return 0;
- }
- if (unitinuse[unit]) {
- syslog(LOG_ERR, "omega_start: unit %d in use", unit);
- return 0;
- }
-
- /*
- * Open serial port
- */
- (void) sprintf(omegadev, OMEGA232, unit);
- fd232 = open(omegadev, O_RDWR, 0777);
- if (fd232 == -1) {
- syslog(LOG_ERR, "omega_start: open of %s: %m", omegadev);
- return 0;
- }
-
-#if defined(HAVE_SYSV_TTYS)
- /*
- * System V serial line parameters (termio interface)
- *
- */
- { struct termio ttyb;
- if (ioctl(fd232, TCGETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TCGETA): %m", omegadev);
- goto screwed;
- }
- ttyb.c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyb.c_oflag = 0;
- ttyb.c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyb.c_lflag = ICANON;
- ttyb.c_cc[VERASE] = ttyb.c_cc[VKILL] = '\0';
- if (ioctl(fd232, TCSETA, &ttyb) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TCSETA): %m", omegadev);
- goto screwed;
- }
- }
-#endif /* HAVE_SYSV_TTYS */
-#if defined(HAVE_TERMIOS)
- /*
- * POSIX serial line parameters (termios interface)
- *
- * The OMEGACLK option provides timestamping at the driver level.
- * It requires the tty_clk streams module.
- *
- * The OMEGAPPS option provides timestamping at the driver level.
- * It uses a 1-pps signal and level converter (gadget box) and
- * requires the ppsclock streams module and SunOS 4.1.1 or
- * later.
- */
- { struct termios ttyb, *ttyp;
-
- ttyp = &ttyb;
- if (tcgetattr(fd232, ttyp) < 0) {
- syslog(LOG_ERR,
- "omega_start: tcgetattr(%s): %m", omegadev);
- goto screwed;
- }
- ttyp->c_iflag = IGNBRK|IGNPAR|ICRNL;
- ttyp->c_oflag = 0;
- ttyp->c_cflag = SPEED232|CS8|CLOCAL|CREAD;
- ttyp->c_lflag = ICANON;
- ttyp->c_cc[VERASE] = ttyp->c_cc[VKILL] = '\0';
- if (tcsetattr(fd232, TCSANOW, ttyp) < 0) {
- syslog(LOG_ERR,
- "omega_start: tcsetattr(%s): %m", omegadev);
- goto screwed;
- }
- if (tcflush(fd232, TCIOFLUSH) < 0) {
- syslog(LOG_ERR,
- "omega_start: tcflush(%s): %m", omegadev);
- goto screwed;
- }
- }
-#endif /* HAVE_TERMIOS */
-#ifdef STREAM
-#if defined(OMEGACLK)
- if (ioctl(fd232, I_PUSH, "clk") < 0)
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, I_PUSH, clk): %m", omegadev);
- if (ioctl(fd232, CLK_SETSTR, "\n") < 0)
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, CLK_SETSTR): %m", omegadev);
-#endif /* OMEGACLK */
-#if defined(OMEGAPPS)
- if (ioctl(fd232, I_PUSH, "ppsclock") < 0)
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, I_PUSH, ppsclock): %m", omegadev);
- else
- fdpps = fd232;
-#endif /* OMEGAPPS */
-#endif /* STREAM */
-#if defined(HAVE_BSD_TTYS)
- /*
- * 4.3bsd serial line parameters (sgttyb interface)
- *
- * The OMEGACLK option provides timestamping at the driver level.
- * It requires the tty_clk line discipline and 4.3bsd or later.
- */
- { struct sgttyb ttyb;
-#if defined(OMEGACLK)
- int ldisc = CLKLDISC;
-#endif /* OMEGACLK */
-
- if (ioctl(fd232, TIOCGETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TIOCGETP): %m", omegadev);
- goto screwed;
- }
- ttyb.sg_ispeed = ttyb.sg_ospeed = SPEED232;
-#if defined(OMEGACLK)
- ttyb.sg_erase = ttyb.sg_kill = '\r';
- ttyb.sg_flags = RAW;
-#else
- ttyb.sg_erase = ttyb.sg_kill = '\0';
- ttyb.sg_flags = EVENP|ODDP|CRMOD;
-#endif /* OMEGACLK */
- if (ioctl(fd232, TIOCSETP, &ttyb) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TIOCSETP): %m", omegadev);
- goto screwed;
- }
-#if defined(OMEGACLK)
- if (ioctl(fd232, TIOCSETD, &ldisc) < 0) {
- syslog(LOG_ERR,
- "omega_start: ioctl(%s, TIOCSETD): %m",omegadev);
- goto screwed;
- }
-#endif /* OMEGACLK */
- }
-#endif /* HAVE_BSD_TTYS */
-
- /*
- * Allocate unit structure
- */
- if (omegaunits[unit] != 0) {
- omega = omegaunits[unit]; /* The one we want is okay */
- } else {
- for (i = 0; i < MAXUNITS; i++) {
- if (!unitinuse[i] && omegaunits[i] != 0)
- break;
- }
- if (i < MAXUNITS) {
- /*
- * Reclaim this one
- */
- omega = omegaunits[i];
- omegaunits[i] = 0;
- } else {
- omega = (struct omegaunit *)
- emalloc(sizeof(struct omegaunit));
- }
- }
- memset((char *)omega, 0, sizeof(struct omegaunit));
- omegaunits[unit] = omega;
-
- /*
- * Set up the structures
- */
- omega->peer = peer;
- omega->unit = (u_char)unit;
- omega->timestarted = current_time;
- omega->station = STATION_NONE;
-
- omega->io.clock_recv = omega_receive;
- omega->io.srcclock = (caddr_t)omega;
- omega->io.datalen = 0;
- omega->io.fd = fd232;
- if (!io_addclock(&omega->io)) {
- goto screwed;
- }
-
- /*
- * All done. Initialize a few random peer variables, then
- * return success.
- */
- peer->precision = OMEGAPRECISION;
- peer->rootdelay = 0;
- peer->rootdispersion = 0;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- unitinuse[unit] = 1;
- return 1;
-
- /*
- * Something broke; abandon ship
- */
-screwed:
- (void) close(fd232);
- return 0;
-}
-
-
-/*
- * omega_shutdown - shut down a OMEGA clock
- */
-static void
-omega_shutdown(unit)
- int unit;
-{
- register struct omegaunit *omega;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "omega_shutdown: unit %d invalid",
- unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "omega_shutdown: unit %d not in use", unit);
- return;
- }
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- omega = omegaunits[unit];
- io_closeclock(&omega->io);
- unitinuse[unit] = 0;
-}
-
-
-/*
- * omega_report_event - note the occurance of an event
- */
-static void
-omega_report_event(omega, code)
- struct omegaunit *omega;
- int code;
-{
- struct peer *peer;
-
- peer = omega->peer;
- if (omega->status != (u_char)code) {
- omega->status = (u_char)code;
- if (code != CEVNT_NOMINAL)
- omega->lastevent = (u_char)code;
- syslog(LOG_INFO,
- "omega clock %s event %x\n", ntoa(&peer->srcadr), code);
- }
-}
-
-
-/*
- * omega_receive - receive data from the serial interface on a
- * Kinemetrics OM-DC OMEGA clock.
- */
-static void
-omega_receive(rbufp)
- struct recvbuf *rbufp;
-{
- register int i;
- register struct omegaunit *omega;
- register u_char *dpt;
- register char *cp, *cpend;
- register u_char *dpend;
- l_fp tstmp;
- u_fp dispersion, drift;
-
- /*
- * Get the clock this applies to and a pointers to the data
- */
- omega = (struct omegaunit *)rbufp->recv_srcclock;
- dpt = (u_char *)&rbufp->recv_space;
-
-#ifndef PEDANTIC
- /*
- * The OM-DC outputs a timecode every second, but we only want
- * a set of NSTAMPS timecodes when polled (every 64 seconds).
- * Setting PEDANTIC causes a sanity check on every timecode.
- */
- if (!omega->polled)
- return;
-#endif
-
- /*
- * Edit timecode to remove control chars
- */
- dpend = dpt + rbufp->recv_length;
- cp = omega->lastcode;
- cpend = omega->lastcode + BMAX - 1;
- while (dpt < dpend && cp < cpend) {
- if ((*cp = 0x7f & *dpt++) >= ' ') cp++;
-#ifdef OMEGACLK
- else if (*cp == '\r') {
- if (dpend - dpt < 8) {
- /* short timestamp */
- return;
- }
- if (!buftvtots(dpt,&omega->lastrec)) {
- /* screwy timestamp */
- return;
- }
- dpt += 8;
- }
-#endif
- }
- *cp = '\0';
- omega->lencode = cp - omega->lastcode;
-
- if (omega->lencode == 0)
- return;
- else if (omega->lencode != LENOMEGA) {
- omega->badformat++;
- /* Sometimes get a lot of these, filling the log with noise */
- /* omega_report_event(omega, CEVNT_BADREPLY); */
- return;
- }
-
-#ifndef OMEGACLK
- omega->lastrec = rbufp->recv_time;
-#endif
-
-#ifdef DEBUG
- if (debug)
- printf("omega: timecode %d %s\n",
- omega->lencode, omega->lastcode);
-#endif
-
- /*
- * We get down to business, check the timecode format
- * and decode its contents.
- */
- cp = omega->lastcode;
- omega->leap = 0;
- /*
- * Check timecode format.
- */
- if (!isdigit(cp[0]) || /* day of year */
- !isdigit(cp[1]) ||
- !isdigit(cp[2]) ||
- cp[3] != ':' || /* <sp> */
- !isdigit(cp[4]) || /* hours */
- !isdigit(cp[5]) ||
- cp[6] != ':' || /* : separator */
- !isdigit(cp[7]) || /* minutes */
- !isdigit(cp[8]) ||
- cp[9] != ':' || /* : separator */
- !isdigit(cp[10]) || /* seconds */
- !isdigit(cp[11])) {
- omega->badformat++;
- omega_report_event(omega, CEVNT_BADREPLY);
- return;
- }
-
- /*
- * Convert and check values.
- */
- omega->year = 0; /* fake */
- omega->day = cp[0] - '0';
- omega->day = MULBY10(omega->day) + cp[1] - '0';
- omega->day = MULBY10(omega->day) + cp[2] - '0';
- omega->hour = MULBY10(cp[4] - '0') + cp[5] - '0';
- omega->minute = MULBY10(cp[7] - '0') + cp[8] - '0';
- omega->second = MULBY10(cp[10] - '0') + cp[11] - '0';
- omega->msec = 0;
-
- if (omega->day < 1 || omega->day > 366) {
- omega->baddata++;
- omega_report_event(omega, CEVNT_BADDATE);
- return;
- }
- if (omega->hour > 23 || omega->minute > 59 || omega->second > 59) {
- omega->baddata++;
- omega_report_event(omega, CEVNT_BADTIME);
- return;
- }
-
- /*
- * Check quality/station-id flag. The OM-DC should normally stay
- * permanently locked to a station, and its time error should be less
- * than 1 msec. If it loses lock for any reason, it makes a worst
- * case drift estimate based on the internally stored stability figure
- * for its reference oscillator. The stability figure can be adjusted
- * by the user based on experience. The default value is 1E05, which
- * is pretty bad - 2E07 is about right for the unit I have.
- *
- * The following is arbitrary, change it if you're offended:
- * For errors less than 50 msec, just clear the station indicator.
- * For errors greater than 50 msec, flag loss of sync and report a
- * propagation problem. If the error is greater than 500 msec,
- * something is dreadfully wrong - report a clock fault.
- *
- * In each case, we set a drift estimate which is used below as an
- * estimate of measurement accuracy.
- */
- omega->quality = cp[12];
- if (cp[12] == '>' || cp[12] == '?') {
- /* Error 500 to 5000 msec */
- omega_report_event(omega, CEVNT_FAULT);
- omega->leap = LEAP_NOTINSYNC;
- omega->station = STATION_NONE;
- drift = U_FP5000MS;
- } else if (cp[12] == '#') {
- /* Error 50 to 500 msec */
- omega_report_event(omega, CEVNT_PROP);
- omega->leap = LEAP_NOTINSYNC;
- omega->station = STATION_NONE;
- drift = U_FP500MS;
- } else if (cp[12] == '*') {
- /* Error 5 to 50 msec */
- omega->lasttime = current_time;
- omega->station = STATION_NONE;
- drift = U_FP50MS;
- } else if (cp[12] == '.') {
- /* Error 1 to 5 msec */
- omega->lasttime = current_time;
- omega->station = STATION_NONE;
- drift = U_FP5MS;
- } else if ('A' <= cp[12] && cp[12] <= 'H') {
- /* Error less than 1 msec */
- omega->lasttime = current_time;
- omega->station = cp[12] - 'A' + 1;
- drift = 0;
- } else {
- omega->badformat++;
- omega_report_event(omega, CEVNT_BADREPLY);
- return;
- }
-
-#ifdef PEDANTIC
- /* If we haven't been polled, bail out. */
- if (!omega->polled)
- return;
-#endif
-
- /*
- * Now, compute the reference time value. Use the heavy
- * machinery for the seconds and the millisecond field for the
- * fraction when present.
- *
- * this code does not yet know how to do the years
- */
- tstmp = omega->lastrec;
- if (!clocktime(omega->day, omega->hour, omega->minute,
- omega->second, GMT, tstmp.l_ui,
- &omega->yearstart, &omega->lastref.l_ui)) {
- omega->baddata++;
- omega_report_event(omega, CEVNT_BADTIME);
- return;
- }
- MSUTOTSF(omega->msec, omega->lastref.l_uf);
-
- /*
- * Adjust the read value by fudgefactor1 to correct RS232 delays.
- */
- L_ADD(&omega->lastref, &fudgefactor1[omega->unit]);
-
- /* Carousel of NSTAMPS offsets. */
- i = omega->coderecv % NSTAMPS;
- omega->offset[i] = omega->lastref;
- L_SUB(&omega->offset[i], &tstmp);
- omega->coderecv++;
-
- /* If we don't yet have a full set, return. */
- if (omega->coderecv < NSTAMPS)
- return;
-
- /*
- * Filter the samples, add the fudge factor and pass the
- * offset and dispersion along. We use lastrec as both the
- * reference time and receive time in order to avoid being cute,
- * like setting the reference time later than the receive time,
- * which may cause a paranoid protocol module to chuck out the
- * data. If the sample filter chokes because of excessive
- * dispersion or whatever, get a new sample (omega->coderecv
- * is still >= NSTAMPS) and try again.
- */
- if (!omega_process(omega, &tstmp, &dispersion)) {
- omega->baddata++;
- omega_report_event(omega, CEVNT_BADTIME);
- return;
- }
-
- /*
- * Add accumulated clock drift to the dispersion to get
- * a (hopefully) meaningful measurement accuracy estimate.
- */
- dispersion += drift;
- refclock_receive(omega->peer, &tstmp, GMT, dispersion,
- &omega->lastrec, &omega->lastrec, omega->leap);
-
- /*
- * We have succeeded in answering the poll. If the clock
- * is locked, we're nominal.
- */
- omega->polled = 0;
- omega->coderecv = 0;
- if (omega->leap != LEAP_NOTINSYNC)
- omega_report_event(omega, CEVNT_NOMINAL);
-}
-
-
-/*
- * omega_send - time to send the clock a signal to cough up a time sample
- */
-static void
-omega_send(omega,cmd)
- struct omegaunit *omega;
- char *cmd;
-{
- if (!readonlyclockflag[omega->unit]) {
- /*
- * Send a command to the clock.
- */
- if (write(omega->io.fd, cmd, 1) != 1) {
- syslog(LOG_ERR, "omega_send: unit %d: %m", omega->unit);
- omega_report_event(omega, CEVNT_FAULT);
- }
- }
-}
-
-
-/*
- * Compare two l_fp's, used with qsort()
- */
-static int
-omega_cmpl_fp(p1, p2)
- register void *p1, *p2;
-{
-
- if (!L_ISGEQ((l_fp *)p1, (l_fp *)p2))
- return (-1);
- if (L_ISEQU((l_fp *)p1, (l_fp *)p2))
- return (0);
- return (1);
-}
-
-
-/*
- * omega_process - process a pile of samples from the clock
- */
-static char
-omega_process(omega, offset, dispersion)
- struct omegaunit *omega;
- l_fp *offset;
- u_fp *dispersion;
-{
- register int i, n;
- register U_LONG med_ui, med_uf, tmp_ui, tmp_uf;
- l_fp off[NSTAMPS];
- u_fp disp;
-
- /* Copy in offsets and sort into ascending order */
- for (i = 0; i < NSTAMPS; i++)
- off[i] = omega->offset[i];
- qsort((char *)off, NSTAMPS, sizeof(l_fp), omega_cmpl_fp);
- /*
- * Reject the furthest from the median until NSKEEP samples remain
- */
- i = 0;
- n = NSTAMPS;
- while ((n - i) > NSKEEP) {
- tmp_ui = off[n-1].l_ui;
- tmp_uf = off[n-1].l_uf;
- med_ui = off[(n+i)/2].l_ui;
- med_uf = off[(n+i)/2].l_uf;
- M_SUB(tmp_ui, tmp_uf, med_ui, med_uf);
- M_SUB(med_ui, med_uf, off[i].l_ui, off[i].l_uf);
- if (M_ISHIS(med_ui, med_uf, tmp_ui, tmp_uf)) {
- /* reject low end */
- i++;
- } else {
- /* reject high end */
- n--;
- }
- }
-
- /*
- * Compute the dispersion based on the difference between the
- * extremes of the remaining offsets. If this is greater than
- * the allowed sample set dispersion, bail out. Otherwise,
- * return the median offset and the dispersion.
- */
- tmp_ui = off[n-1].l_ui;
- tmp_uf = off[n-1].l_uf;
- M_SUB(tmp_ui, tmp_uf, off[i].l_ui, off[i].l_uf);
- disp = MFPTOFP(tmp_ui, tmp_uf);
- if (disp > OMEGAMAXDISPERSE)
- return 0;
- *offset = off[(n+1)/2];
- *dispersion = disp;
- return 1;
-}
-
-
-/*
- * omega_poll - called by the transmit procedure
- */
-static void
-omega_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- struct omegaunit *omega;
-
- /*
- * You don't need to poll this clock. It puts out timecodes
- * once per second. If asked for a timestamp, take note.
- * The next time a timecode comes in, it will be fed back.
- */
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "omega_poll: unit %d invalid", unit);
- return;
- }
- if (!unitinuse[unit]) {
- syslog(LOG_ERR, "omega_poll: unit %d not in use", unit);
- return;
- }
- omega = omegaunits[unit];
- if ((current_time - omega->lasttime) > 150) {
- omega->noreply++;
- omega_report_event(omegaunits[unit], CEVNT_TIMEOUT);
- }
-
- /*
- * polled every 64 seconds. Ask OMEGA_RECEIVE to hand in a timestamp.
- */
- omega->polled = 1;
- omega->polls++;
- /*
- * Ensure the clock is running in the correct mode - on-second
- * timestamps.
- */
- omega_send(omega,"C");
-}
-
-
-/*
- * omega_control - set fudge factors, return statistics
- */
-static void
-omega_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct omegaunit *omega;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "omega_control: unit %d invalid", unit);
- return;
- }
-
- if (in != 0) {
- if (in->haveflags & CLK_HAVETIME1)
- fudgefactor1[unit] = in->fudgetime1;
- if (in->haveflags & CLK_HAVETIME2)
- fudgefactor2[unit] = in->fudgetime2;
- if (in->haveflags & CLK_HAVEVAL1)
- stratumtouse[unit] = (u_char)(in->fudgeval1);
- if (in->haveflags & CLK_HAVEVAL2)
- refid[unit] = in->fudgeval2;
- if (in->haveflags & CLK_HAVEFLAG1)
- readonlyclockflag[unit] = in->flags & CLK_FLAG1;
- if (unitinuse[unit]) {
- struct peer *peer;
-
- peer = omegaunits[unit]->peer;
- peer->stratum = stratumtouse[unit];
- peer->refid = refid[unit];
- }
- }
-
- if (out != 0) {
- out->type = REFCLK_OMEGA_TRUETIME;
- out->haveflags = CLK_HAVETIME1 | CLK_HAVETIME2 | CLK_HAVEVAL1 |
- CLK_HAVEVAL2| CLK_HAVEFLAG1;
- out->clockdesc = OMEGADESCRIPTION;
- out->fudgetime1 = fudgefactor1[unit];
- out->fudgetime2 = fudgefactor2[unit];
- out->fudgeval1 = (LONG)stratumtouse[unit];
- out->fudgeval2 = refid[unit];
- out->flags = readonlyclockflag[unit];
- if (unitinuse[unit]) {
- omega = omegaunits[unit];
- out->flags |= omega->station << 1;
- out->lencode = omega->lencode;
- out->lastcode = omega->lastcode;
- out->timereset = current_time - omega->timestarted;
- out->polls = omega->polls;
- out->noresponse = omega->noreply;
- out->badformat = omega->badformat;
- out->baddata = omega->baddata;
- out->lastevent = omega->lastevent;
- out->currentstatus = omega->status;
- }
- }
-}
-
-
-/*
- * omega_buginfo - return clock dependent debugging info
- */
-static void
-omega_buginfo(unit, bug)
- int unit;
- register struct refclockbug *bug;
-{
- register struct omegaunit *omega;
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR, "omega_buginfo: unit %d invalid", unit);
- return;
- }
-
- if (!unitinuse[unit])
- return;
- omega = omegaunits[unit];
-
- bug->nvalues = 11;
- bug->ntimes = 5;
- if (omega->lasttime != 0)
- bug->values[0] = current_time - omega->lasttime;
- else
- bug->values[0] = 0;
- bug->values[1] = (U_LONG)omega->reason;
- bug->values[2] = (U_LONG)omega->year;
- bug->values[3] = (U_LONG)omega->day;
- bug->values[4] = (U_LONG)omega->hour;
- bug->values[5] = (U_LONG)omega->minute;
- bug->values[6] = (U_LONG)omega->second;
- bug->values[7] = (U_LONG)omega->msec;
- bug->values[8] = omega->noreply;
- bug->values[9] = omega->yearstart;
- bug->values[10] = omega->quality;
- bug->stimes = 0x1c;
- bug->times[0] = omega->lastref;
- bug->times[1] = omega->lastrec;
- bug->times[2] = omega->offset[0];
- bug->times[3] = omega->offset[1];
- bug->times[4] = omega->offset[2];
-}
-#endif
diff --git a/usr.sbin/xntpd/xntpd/refclock_old/refclock_parse.c b/usr.sbin/xntpd/xntpd/refclock_old/refclock_parse.c
deleted file mode 100644
index 0d95d18908a5..000000000000
--- a/usr.sbin/xntpd/xntpd/refclock_old/refclock_parse.c
+++ /dev/null
@@ -1,3605 +0,0 @@
-#if defined(REFCLOCK) && (defined(PARSE) || defined(PARSEPPS))
-/*
- * /src/NTP/REPOSITORY/v3/xntpd/refclock_parse.c,v 3.53 1994/03/25 13:07:39 kardel Exp
- *
- * refclock_parse.c,v 3.53 1994/03/25 13:07:39 kardel Exp
- *
- * generic reference clock driver for receivers
- *
- * make use of a STREAMS module for input processing where
- * available and configured. Currently the STREAMS module
- * is only available for Suns running SunOS 4.x and SunOS5.x (new - careful!)
- *
- * Copyright (c) 1989,1990,1991,1992,1993,1994
- * Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
- *
- * 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.
- *
- */
-
-/*
- * Defines:
- * REFCLOCK && (PARSE||PARSEPPS)
- * - enable this mess
- * STREAM - allow for STREAMS modules
- * ("parse", "ppsclocd", "ppsclock")
- * PARSEPPS - provide PPS information to loopfilter (for
- * backward compatibilty only)
- * PPS - supply loopfilter with PPS samples (if configured)
- * PPSPPS - notify loopfilter of PPS file descriptor
- *
- * FREEBSD_CONRAD - Make very cheap "Conrad DCF77 RS-232" gadget work
- * with FreeBSD.
- * TTY defines:
- * HAVE_BSD_TTYS - currently unsupported
- * HAVE_SYSV_TTYS - will use termio.h
- * HAVE_TERMIOS - will use termios.h
- * STREAM - will use streams and implies HAVE_TERMIOS
- */
-
-/*
- * This driver currently provides the support for
- * - Meinberg DCF77 receiver DCF77 PZF 535 (TCXO version) (DCF)
- * - Meinberg DCF77 receiver DCF77 PZF 535 (OCXO version) (DCF)
- * - Meinberg DCF77 receiver U/A 31 (DCF)
- * - ELV DCF7000 (DCF)
- * - Schmid clock (DCF)
- * - Conrad DCF77 receiver module (DCF)
- * - FAU DCF77 NTP receiver (TimeBrick) (DCF)
- * - Meinberg GPS166 (GPS)
- * - Trimble SV6 (GPS)
- *
- */
-
-/*
- * Meinberg receivers are connected via a 9600 baud serial line
- *
- * Receivers that do NOT support:
- * - leap second indication
- * DCF U/A 31
- * DCF PZF535 (stock version)
- *
- * so...
- * - for PZF535 please ask for revision PZFUERL4.6 or higher
- * (support for leap second and alternate antenna)
- *
- * The Meinberg GPS receiver also has a special NTP time stamp
- * format. The firmware release is Uni-Erlangen. Only this
- * firmware release is supported by xntp3.
- *
- * Meinberg generic receiver setup:
- * output time code every second
- * Baud rate 9600 7E2S
- */
-
-#include "ntpd.h"
-#include "ntp_refclock.h"
-#include "ntp_unixtime.h"
-#include "ntp_control.h"
-
-#include <stdio.h>
-#include <ctype.h>
-#include <time.h>
-
-#include <sys/errno.h>
-#ifdef FREEBSD_CONRAD
-#include <sys/ioctl.h>
-#endif
-extern int errno;
-
-#if !defined(STREAM) && !defined(HAVE_SYSV_TTYS) && !defined(HAVE_BSD_TTYS) && !defined(HAVE_TERMIOS)
-/* #error NEED TO DEFINE ONE OF "STREAM" or "HAVE_SYSV_TTYS" */
-NEED TO DEFINE ONE OF "STREAM", "HAVE_SYSV_TTYS" or "HAVE_TERMIOS"
-#endif
-
-#ifdef STREAM
-#include <sys/stream.h>
-#include <sys/stropts.h>
-#ifndef HAVE_TERMIOS
-#define HAVE_TERMIOS
-#endif
-#endif
-
-#ifdef HAVE_TERMIOS
-#include <termios.h>
-#define TTY_GETATTR(_FD_, _ARG_) tcgetattr((_FD_), (_ARG_))
-#define TTY_SETATTR(_FD_, _ARG_) tcsetattr((_FD_), TCSANOW, (_ARG_))
-#undef HAVE_SYSV_TTYS
-#endif
-
-#ifdef HAVE_SYSV_TTYS
-#include <termio.h>
-#define TTY_GETATTR(_FD_, _ARG_) ioctl((_FD_), TCGETA, (_ARG_))
-#define TTY_SETATTR(_FD_, _ARG_) ioctl((_FD_), TCSETAW, (_ARG_))
-#endif
-
-#ifdef HAVE_BSD_TTYS
-/* #error CURRENTLY NO BSD TTY SUPPORT */
-CURRENTLY NO BSD TTY SUPPORT
-#endif
-
-#if !defined(O_RDWR) /* XXX SOLARIS */
-#include <fcntl.h>
-#endif /* !def(O_RDWR) */
-
-#ifdef PPSPPS
-#include <sys/ppsclock.h>
-#endif
-
-#include "ntp_select.h"
-#include "ntp_stdlib.h"
-
-#include "parse.h"
-
-#if !defined(NO_SCCSID) && !defined(lint) && !defined(__GNUC__)
-static char rcsid[]="refclock_parse.c,v 3.53 1994/03/25 13:07:39 kardel Exp";
-#endif
-
-/**===========================================================================
- ** external interface to xntp mechanism
- **/
-
-static void parse_init P((void));
-static int parse_start P((u_int, struct peer *));
-static void parse_shutdown P((int));
-static void parse_poll P((int, struct peer *));
-static void parse_control P((u_int, struct refclockstat *, struct refclockstat *));
-
-#define parse_buginfo noentry
-
-struct refclock refclock_parse = {
- parse_start,
- parse_shutdown,
- parse_poll,
- parse_control,
- parse_init,
- parse_buginfo,
- NOFLAGS
-};
-
-/*
- * the unit field selects for one the prototype to be used (lower 4 bits)
- * and for the other the clock type in case of different but similar
- * receivers (bits 4-6)
- * the most significant bit encodes PPS support
- * when the most significant bit is set the pps telegrams will be used
- * for controlling the local clock (ntp_loopfilter.c)
- * receiver specific configration data is kept in the clockinfo field.
- */
-
-/*
- * Definitions
- */
-#define MAXUNITS 4 /* maximum number of "PARSE" units permitted */
-#define PARSEDEVICE "/dev/refclock-%d" /* device to open %d is unit number */
-
-/**===========================================================================
- ** function vector for dynamically binding io handling mechanism
- **/
-
-typedef struct bind
-{
- char *bd_description; /* name of type of binding */
- int (*bd_init)(); /* initialize */
- void (*bd_end)(); /* end */
- int (*bd_setcs)(); /* set character size */
- int (*bd_disable)(); /* disable */
- int (*bd_enable)(); /* enable */
- int (*bd_getfmt)(); /* get format */
- int (*bd_setfmt)(); /* setfmt */
- int (*bd_getstat)(); /* getstat */
- int (*bd_setstat)(); /* setstat */
- int (*bd_timecode)(); /* get time code */
- void (*bd_receive)(); /* receive operation */
- void (*bd_poll)(); /* poll operation */
-} bind_t;
-
-#define PARSE_END(_X_) (*(_X_)->binding->bd_end)(_X_)
-#define PARSE_SETCS(_X_, _CS_) (*(_X_)->binding->bd_setcs)(_X_, _CS_)
-#define PARSE_ENABLE(_X_) (*(_X_)->binding->bd_enable)(_X_)
-#define PARSE_DISABLE(_X_) (*(_X_)->binding->bd_disable)(_X_)
-#define PARSE_GETFMT(_X_, _DCT_) (*(_X_)->binding->bd_getfmt)(_X_, _DCT_)
-#define PARSE_SETFMT(_X_, _DCT_) (*(_X_)->binding->bd_setfmt)(_X_, _DCT_)
-#define PARSE_GETSTAT(_X_, _DCT_) (*(_X_)->binding->bd_getstat)(_X_, _DCT_)
-#define PARSE_SETSTAT(_X_, _DCT_) (*(_X_)->binding->bd_setstat)(_X_, _DCT_)
-#define PARSE_GETTIMECODE(_X_, _DCT_) (*(_X_)->binding->bd_timecode)(_X_, _DCT_)
-#define PARSE_POLL(_X_) (*(_X_)->binding->bd_poll)(_X_)
-
-/*
- * io modes
- */
-#define PARSE_F_NOPOLLONLY 0x0001 /* always do async io (possible PPS support via PARSE) */
-#define PARSE_F_POLLONLY 0x0002 /* never do async io (no PPS support via PARSE) */
-#define PARSE_F_PPSPPS 0x0004 /* use loopfilter PPS code (CIOGETEV) */
-#define PARSE_F_PPSONSECOND 0x0008 /* PPS pulses are on second */
-
-/**===========================================================================
- ** refclock instance data
- **/
-
-struct parseunit
-{
- /*
- * XNTP management
- */
- struct peer *peer; /* backlink to peer structure - refclock inactive if 0 */
- int fd; /* device file descriptor */
- u_char unit; /* encoded unit/type/PPS */
-
- /*
- * XNTP io
- */
- struct refclockio io; /* io system structure (used in PPS mode) */
- bind_t *binding; /* io handling binding */
-
- /*
- * parse state
- */
- parse_t parseio; /* io handling structure (user level parsing) */
-
- /*
- * type specific parameters
- */
- struct clockinfo *parse_type; /* link to clock description */
-
- /*
- * clock specific configuration
- */
- l_fp basedelay; /* clock local phase offset */
- l_fp ppsdelay; /* clock local pps phase offset */
-
- /*
- * clock state handling/reporting
- */
- u_char flags; /* flags (leap_control) */
- u_char status; /* current status */
- u_char lastevent; /* last not NORMAL status */
- U_LONG lastchange; /* time (xntp) when last state change accured */
- U_LONG statetime[CEVNT_MAX+1]; /* accumulated time of clock states */
- struct event stattimer; /* statistics timer */
- U_LONG polls; /* polls from NTP protocol machine */
- U_LONG noresponse; /* number of expected but not seen datagrams */
- U_LONG badformat; /* bad format (failed format conversions) */
- U_LONG baddata; /* usually bad receive length, bad format */
-
- u_char pollonly; /* 1 for polling only (no PPS mode) */
- u_char pollneeddata; /* 1 for receive sample expected in PPS mode */
- U_LONG laststatus; /* last packet status (error indication) */
- u_short lastformat; /* last format used */
- U_LONG lastsync; /* time (xntp) when clock was last seen fully synchronized */
- U_LONG timestarted; /* time (xntp) when peer clock was instantiated */
- U_LONG nosynctime; /* time (xntp) when last nosync message was posted */
- U_LONG lastmissed; /* time (xntp) when poll didn't get data (powerup heuristic) */
- U_LONG ppsserial; /* magic cookie for ppsclock serials (avoids stale ppsclock data) */
- parsetime_t time; /* last (parse module) data */
- void *localdata; /* optional local data */
-};
-
-
-/**===========================================================================
- ** Clockinfo section all parameter for specific clock types
- ** includes NTP paramaters, TTY parameters and IO handling parameters
- **/
-
-static void poll_dpoll P((struct parseunit *));
-static void poll_poll P((struct parseunit *));
-static int poll_init P((struct parseunit *));
-static void poll_end P((struct parseunit *));
-
-typedef struct poll_info
-{
- U_LONG rate; /* poll rate - once every "rate" seconds - 0 off */
- char * string; /* string to send for polling */
- U_LONG count; /* number of charcters in string */
-} poll_info_t;
-
-#define NO_FLAGS 0
-#define NO_POLL (void (*)())0
-#define NO_INIT (int (*)())0
-#define NO_END (void (*)())0
-#define NO_DATA (void *)0
-#define NO_FORMAT ""
-#define NO_PPSDELAY 0
-
-#define DCF_ID "DCF" /* generic DCF */
-#define DCF_A_ID "DCFa" /* AM demodulation */
-#define DCF_P_ID "DCFp" /* psuedo random phase shift */
-#define GPS_ID "GPS" /* GPS receiver */
-
-#define NOCLOCK_ROOTDELAY 0x00000000
-#define NOCLOCK_BASEDELAY 0x00000000
-#define NOCLOCK_DESCRIPTION ((char *)0)
-#define NOCLOCK_MAXUNSYNC 0
-#define NOCLOCK_CFLAG 0
-#define NOCLOCK_IFLAG 0
-#define NOCLOCK_OFLAG 0
-#define NOCLOCK_LFLAG 0
-#define NOCLOCK_ID "TILT"
-#define NOCLOCK_POLL NO_POLL
-#define NOCLOCK_INIT NO_INIT
-#define NOCLOCK_END NO_END
-#define NOCLOCK_DATA NO_DATA
-#define NOCLOCK_FORMAT NO_FORMAT
-#define NOCLOCK_TYPE CTL_SST_TS_UNSPEC
-
-#define DCF_TYPE CTL_SST_TS_LF
-#define GPS_TYPE CTL_SST_TS_UHF
-
-/*
- * receiver specific constants
- */
-#define MBG_CFLAG19200 (B19200|CS7|PARENB|CREAD|HUPCL)
-#define MBG_CFLAG (B9600|CS7|PARENB|CREAD|HUPCL)
-#define MBG_IFLAG (IGNBRK|IGNPAR|ISTRIP)
-#define MBG_OFLAG 0
-#define MBG_LFLAG 0
-/*
- * Meinberg DCF U/A 31 (AM) receiver
- */
-#define DCFUA31_ROOTDELAY 0x00000D00 /* 50.78125ms */
-#define DCFUA31_BASEDELAY 0x02C00000 /* 10.7421875ms: 10 ms (+/- 3 ms) */
-#define DCFUA31_DESCRIPTION "Meinberg DCF U/A 31"
-#define DCFUA31_MAXUNSYNC 60*30 /* only trust clock for 1/2 hour */
-#define DCFUA31_CFLAG MBG_CFLAG
-#define DCFUA31_IFLAG MBG_IFLAG
-#define DCFUA31_OFLAG MBG_OFLAG
-#define DCFUA31_LFLAG MBG_LFLAG
-
-/*
- * Meinberg DCF PZF535/TCXO (FM/PZF) receiver
- */
-#define DCFPZF535_ROOTDELAY 0x00000034 /* 800us */
-#define DCFPZF535_BASEDELAY 0x00800000 /* 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define DCFPZF535_DESCRIPTION "Meinberg DCF PZF 535/TCXO"
-#define DCFPZF535_MAXUNSYNC 60*60*12 /* only trust clock for 12 hours
- * @ 5e-8df/f we have accumulated
- * at most 2.16 ms (thus we move to
- * NTP synchronisation */
-#define DCFPZF535_CFLAG MBG_CFLAG
-#define DCFPZF535_IFLAG MBG_IFLAG
-#define DCFPZF535_OFLAG MBG_OFLAG
-#define DCFPZF535_LFLAG MBG_LFLAG
-
-
-/*
- * Meinberg DCF PZF535/OCXO receiver
- */
-#define DCFPZF535OCXO_ROOTDELAY 0x00000034 /* 800us (max error * 10) */
-#define DCFPZF535OCXO_BASEDELAY 0x00800000 /* 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define DCFPZF535OCXO_DESCRIPTION "Meinberg DCF PZF 535/OCXO"
-#define DCFPZF535OCXO_MAXUNSYNC 60*60*96 /* only trust clock for 4 days
- * @ 5e-9df/f we have accumulated
- * at most an error of 1.73 ms
- * (thus we move to NTP synchronisation) */
-#define DCFPZF535OCXO_CFLAG MBG_CFLAG
-#define DCFPZF535OCXO_IFLAG MBG_IFLAG
-#define DCFPZF535OCXO_OFLAG MBG_OFLAG
-#define DCFPZF535OCXO_LFLAG MBG_LFLAG
-
-/*
- * Meinberg GPS166 receiver
- */
-#define GPS166_ROOTDELAY 0x00000000 /* nothing here */
-#define GPS166_BASEDELAY 0x00800000 /* XXX to be fixed ! 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define GPS166_DESCRIPTION "Meinberg GPS166 receiver"
-#define GPS166_MAXUNSYNC 0 /* this clock is immediately lost */
-#define GPS166_CFLAG MBG_CFLAG
-#define GPS166_IFLAG MBG_IFLAG
-#define GPS166_OFLAG MBG_OFLAG
-#define GPS166_LFLAG MBG_LFLAG
-#define GPS166_POLL NO_POLL
-#define GPS166_INIT NO_INIT
-#define GPS166_END NO_END
-#define GPS166_DATA NO_DATA
-#define GPS166_ID GPS_ID
-#define GPS166_FORMAT NO_FORMAT
-
-/*
- * ELV DCF7000 Wallclock-Receiver/Switching Clock (Kit)
- *
- * This is really not the hottest clock - but before you have nothing ...
- */
-#define DCF7000_ROOTDELAY 0x00000364 /* 13 ms */
-#define DCF7000_BASEDELAY 0x67AE0000 /* 405 ms - slow blow */
-#define DCF7000_DESCRIPTION "ELV DCF7000"
-#define DCF7000_MAXUNSYNC (60*5) /* sorry - but it just was not build as a clock */
-#define DCF7000_CFLAG (B9600|CS8|CREAD|PARENB|PARODD|CLOCAL|HUPCL)
-#define DCF7000_IFLAG (IGNBRK)
-#define DCF7000_OFLAG 0
-#define DCF7000_LFLAG 0
-
-/*
- * Schmid DCF Receiver Kit
- *
- * When the WSDCF clock is operating optimally we want the primary clock
- * distance to come out at 300 ms. Thus, peer.distance in the WSDCF peer
- * structure is set to 290 ms and we compute delays which are at least
- * 10 ms long. The following are 290 ms and 10 ms expressed in u_fp format
- */
-#define WS_POLLRATE 1 /* every second - watch interdependency with poll routine */
-#define WS_POLLCMD "\163"
-#define WS_CMDSIZE 1
-
-static poll_info_t wsdcf_pollinfo = { WS_POLLRATE, WS_POLLCMD, WS_CMDSIZE };
-
-#define WSDCF_INIT poll_init
-#define WSDCF_POLL poll_dpoll
-#define WSDCF_END poll_end
-#define WSDCF_DATA ((void *)(&wsdcf_pollinfo))
-#define WSDCF_ROOTDELAY 0X00004A3D /* ~ 290ms */
-#define WSDCF_BASEDELAY 0x028F5C29 /* ~ 10ms */
-#define WSDCF_DESCRIPTION "WS/DCF Receiver"
-#define WSDCF_FORMAT "Schmid"
-#define WSDCF_MAXUNSYNC (60*60) /* assume this beast hold at 1 h better than 2 ms XXX-must verify */
-#define WSDCF_CFLAG (B1200|CS8|CREAD|CLOCAL)
-#define WSDCF_IFLAG 0
-#define WSDCF_OFLAG 0
-#define WSDCF_LFLAG 0
-
-/*
- * RAW DCF77 - input of DCF marks via RS232 - many variants
- */
-#define RAWDCF_FLAGS PARSE_F_NOPOLLONLY
-#define RAWDCF_ROOTDELAY 0x00000364 /* 13 ms */
-#define RAWDCF_FORMAT "RAW DCF77 Timecode"
-#define RAWDCF_MAXUNSYNC (0) /* sorry - its a true receiver - no signal - no time */
-
-#ifdef FREEBSD_CONRAD
-#define RAWDCF_CFLAG (CS8|CREAD|CLOCAL)
-#else
-#define RAWDCF_CFLAG (B50|CS8|CREAD|CLOCAL)
-#endif
-#define RAWDCF_IFLAG 0
-#define RAWDCF_OFLAG 0
-#define RAWDCF_LFLAG 0
-
-/*
- * RAW DCF variants
- */
-/*
- * Conrad receiver
- *
- * simplest (cheapest) DCF clock - e. g. DCF77 receiver by Conrad
- * (~40DM - roughly $30 ) followed by a level converter for RS232
- */
-#define CONRAD_BASEDELAY 0x420C49B0 /* ~258 ms - Conrad receiver @ 50 Baud on a Sun */
-#define CONRAD_DESCRIPTION "RAW DCF77 CODE (Conrad DCF77 receiver module)"
-
-/*
- * TimeBrick receiver
- */
-#define TIMEBRICK_BASEDELAY 0x35C29000 /* ~210 ms - TimeBrick @ 50 Baud on a Sun */
-#define TIMEBRICK_DESCRIPTION "RAW DCF77 CODE (TimeBrick)"
-
-/*
- * Trimble SV6 GPS receiver
- */
-#define TRIM_POLLRATE 0 /* only true direct polling */
-#define TRIM_POLLCMD ">QTM<"
-#define TRIM_CMDSIZE 5
-
-static poll_info_t trimble_pollinfo = { TRIM_POLLRATE, TRIM_POLLCMD, TRIM_CMDSIZE };
-static int trimble_init P((struct parseunit *));
-
-#define TRIMBLESV6_CFLAG (B4800|CS8|CREAD)
-#define TRIMBLESV6_IFLAG (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON)
-#define TRIMBLESV6_OFLAG (OPOST|ONLCR)
-#define TRIMBLESV6_LFLAG (ICANON|ECHOK)
-#define TRIMBLESV6_FLAGS (PARSE_F_PPSPPS|PARSE_F_PPSONSECOND)
-#define TRIMBLESV6_POLL poll_dpoll
-#define TRIMBLESV6_INIT trimble_init
-#define TRIMBLESV6_END poll_end
-#define TRIMBLESV6_DATA ((void *)(&trimble_pollinfo))
-#define TRIMBLESV6_ID GPS_ID
-#define TRIMBLESV6_FORMAT NO_FORMAT
-#define TRIMBLESV6_ROOTDELAY 0x0
-#define TRIMBLESV6_BASEDELAY 0x0
-#define TRIMBLESV6_DESCRIPTION "Trimble SV6 GPS receiver"
-#define TRIMBLESV6_MAXUNSYNC 0
-#define TRIMBLESV6_EOL '<'
-
-static struct clockinfo
-{
- U_LONG cl_flags; /* operation flags (io modes) */
- void (*cl_poll)(); /* active poll routine */
- int (*cl_init)(); /* active poll init routine */
- void (*cl_end)(); /* active poll end routine */
- void *cl_data; /* local data area for "poll" mechanism */
- u_fp cl_rootdelay; /* rootdelay */
- U_LONG cl_basedelay; /* current offset - unsigned l_fp fractional part */
- U_LONG cl_ppsdelay; /* current PPS offset - unsigned l_fp fractional part */
- char *cl_id; /* ID code (usually "DCF") */
- char *cl_description; /* device name */
- char *cl_format; /* fixed format */
- u_char cl_type; /* clock type (ntp control) */
- U_LONG cl_maxunsync; /* time to trust oscillator after loosing synch */
- U_LONG cl_cflag; /* terminal io flags */
- U_LONG cl_iflag; /* terminal io flags */
- U_LONG cl_oflag; /* terminal io flags */
- U_LONG cl_lflag; /* terminal io flags */
-} clockinfo[] =
-{ /* 0. 0.0.128 - base offset for PPS support */
- { /* 127.127.8.<device> */
- NO_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- DCFPZF535_ROOTDELAY,
- DCFPZF535_BASEDELAY,
- NO_PPSDELAY,
- DCF_P_ID,
- DCFPZF535_DESCRIPTION,
- NO_FORMAT,
- DCF_TYPE,
- DCFPZF535_MAXUNSYNC,
- DCFPZF535_CFLAG,
- DCFPZF535_IFLAG,
- DCFPZF535_OFLAG,
- DCFPZF535_LFLAG
- },
- { /* 127.127.8.4+<device> */
- NO_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- DCFPZF535OCXO_ROOTDELAY,
- DCFPZF535OCXO_BASEDELAY,
- NO_PPSDELAY,
- DCF_P_ID,
- DCFPZF535OCXO_DESCRIPTION,
- NO_FORMAT,
- DCF_TYPE,
- DCFPZF535OCXO_MAXUNSYNC,
- DCFPZF535OCXO_CFLAG,
- DCFPZF535OCXO_IFLAG,
- DCFPZF535OCXO_OFLAG,
- DCFPZF535OCXO_LFLAG
- },
- { /* 127.127.8.8+<device> */
- NO_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- DCFUA31_ROOTDELAY,
- DCFUA31_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- DCFUA31_DESCRIPTION,
- NO_FORMAT,
- DCF_TYPE,
- DCFUA31_MAXUNSYNC,
- DCFUA31_CFLAG,
- DCFUA31_IFLAG,
- DCFUA31_OFLAG,
- DCFUA31_LFLAG
- },
- { /* 127.127.8.12+<device> */
- NO_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- DCF7000_ROOTDELAY,
- DCF7000_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- DCF7000_DESCRIPTION,
- NO_FORMAT,
- DCF_TYPE,
- DCF7000_MAXUNSYNC,
- DCF7000_CFLAG,
- DCF7000_IFLAG,
- DCF7000_OFLAG,
- DCF7000_LFLAG
- },
- { /* 127.127.8.16+<device> */
- NO_FLAGS,
- WSDCF_POLL,
- WSDCF_INIT,
- WSDCF_END,
- WSDCF_DATA,
- WSDCF_ROOTDELAY,
- WSDCF_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- WSDCF_DESCRIPTION,
- WSDCF_FORMAT,
- DCF_TYPE,
- WSDCF_MAXUNSYNC,
- WSDCF_CFLAG,
- WSDCF_IFLAG,
- WSDCF_OFLAG,
- WSDCF_LFLAG
- },
- { /* 127.127.8.20+<device> */
- RAWDCF_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- CONRAD_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- CONRAD_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- RAWDCF_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG
- },
- { /* 127.127.8.24+<device> */
- RAWDCF_FLAGS,
- NO_POLL,
- NO_INIT,
- NO_END,
- NO_DATA,
- RAWDCF_ROOTDELAY,
- TIMEBRICK_BASEDELAY,
- NO_PPSDELAY,
- DCF_A_ID,
- TIMEBRICK_DESCRIPTION,
- RAWDCF_FORMAT,
- DCF_TYPE,
- RAWDCF_MAXUNSYNC,
- RAWDCF_CFLAG,
- RAWDCF_IFLAG,
- RAWDCF_OFLAG,
- RAWDCF_LFLAG
- },
- { /* 127.127.8.28+<device> */
- NO_FLAGS,
- GPS166_POLL,
- GPS166_INIT,
- GPS166_END,
- GPS166_DATA,
- GPS166_ROOTDELAY,
- GPS166_BASEDELAY,
- NO_PPSDELAY,
- GPS166_ID,
- GPS166_DESCRIPTION,
- GPS166_FORMAT,
- GPS_TYPE,
- GPS166_MAXUNSYNC,
- GPS166_CFLAG,
- GPS166_IFLAG,
- GPS166_OFLAG,
- GPS166_LFLAG
- },
- { /* 127.127.8.32+<device> */
- TRIMBLESV6_FLAGS,
- TRIMBLESV6_POLL,
- TRIMBLESV6_INIT,
- TRIMBLESV6_END,
- TRIMBLESV6_DATA,
- TRIMBLESV6_ROOTDELAY,
- TRIMBLESV6_BASEDELAY,
- NO_PPSDELAY,
- TRIMBLESV6_ID,
- TRIMBLESV6_DESCRIPTION,
- TRIMBLESV6_FORMAT,
- GPS_TYPE,
- TRIMBLESV6_MAXUNSYNC,
- TRIMBLESV6_CFLAG,
- TRIMBLESV6_IFLAG,
- TRIMBLESV6_OFLAG,
- TRIMBLESV6_LFLAG
- }
-};
-
-static int ncltypes = sizeof(clockinfo) / sizeof(struct clockinfo);
-
-#define CL_REALTYPE(x) (((x) >> 2) & 0x1F)
-#define CL_TYPE(x) ((CL_REALTYPE(x) >= ncltypes) ? ~0 : CL_REALTYPE(x))
-#define CL_PPS(x) ((x) & 0x80)
-#define CL_UNIT(x) ((x) & 0x3)
-
-/*
- * Other constant stuff
- */
-#define PARSEHSREFID 0x7f7f08ff /* 127.127.8.255 refid for hi strata */
-
-#define PARSENOSYNCREPEAT (10*60) /* mention uninitialized clocks all 10 minutes */
-#define PARSESTATISTICS (60*60) /* output state statistics every hour */
-
-static struct parseunit *parseunits[MAXUNITS];
-
-extern U_LONG current_time;
-extern s_char sys_precision;
-extern struct event timerqueue[];
-#ifdef PPSPPS
-extern int fdpps;
-#endif
-
-static int notice = 0;
-
-#define PARSE_STATETIME(parse, i) ((parse->status == i) ? parse->statetime[i] + current_time - parse->lastchange : parse->statetime[i])
-
-static void parse_event P((struct parseunit *, int));
-static void parse_process P((struct parseunit *, parsetime_t *));
-
-/**===========================================================================
- ** implementation of i/o handling methods
- ** (all STREAM, partial STREAM, user level)
- **/
-
-/*
- * define possible io handling methods
- */
-#ifdef STREAM
-static int ppsclock_init P((struct parseunit *));
-static int stream_init P((struct parseunit *));
-static void stream_nop P((struct parseunit *));
-static int stream_enable P((struct parseunit *));
-static int stream_disable P((struct parseunit *));
-static int stream_setcs P((struct parseunit *, parsectl_t *));
-static int stream_getfmt P((struct parseunit *, parsectl_t *));
-static int stream_setfmt P((struct parseunit *, parsectl_t *));
-static int stream_getstat P((struct parseunit *, parsectl_t *));
-static int stream_setstat P((struct parseunit *, parsectl_t *));
-static int stream_timecode P((struct parseunit *, parsectl_t *));
-static void stream_receive P((struct recvbuf *));
-static void stream_poll P((struct parseunit *));
-#endif
-
-static int local_init P((struct parseunit *));
-static void local_end P((struct parseunit *));
-static int local_nop P((struct parseunit *));
-static int local_setcs P((struct parseunit *, parsectl_t *));
-static int local_getfmt P((struct parseunit *, parsectl_t *));
-static int local_setfmt P((struct parseunit *, parsectl_t *));
-static int local_getstat P((struct parseunit *, parsectl_t *));
-static int local_setstat P((struct parseunit *, parsectl_t *));
-static int local_timecode P((struct parseunit *, parsectl_t *));
-static void local_receive P((struct recvbuf *));
-static void local_poll P((struct parseunit *));
-
-static bind_t io_bindings[] =
-{
-#ifdef STREAM
- {
- "parse STREAM",
- stream_init,
- stream_nop,
- stream_setcs,
- stream_disable,
- stream_enable,
- stream_getfmt,
- stream_setfmt,
- stream_getstat,
- stream_setstat,
- stream_timecode,
- stream_receive,
- stream_poll
- },
- {
- "ppsclock STREAM",
- ppsclock_init,
- local_end,
- local_setcs,
- local_nop,
- local_nop,
- local_getfmt,
- local_setfmt,
- local_getstat,
- local_setstat,
- local_timecode,
- local_receive,
- local_poll
- },
-#endif
- {
- "normal",
- local_init,
- local_end,
- local_setcs,
- local_nop,
- local_nop,
- local_getfmt,
- local_setfmt,
- local_getstat,
- local_setstat,
- local_timecode,
- local_receive,
- local_poll
- },
- {
- (char *)0,
- }
-};
-
-#ifdef STREAM
-/*--------------------------------------------------
- * ppsclock STREAM init
- */
-static int
-ppsclock_init(parse)
- struct parseunit *parse;
-{
- /*
- * now push the parse streams module
- * it will ensure exclusive access to the device
- */
- if (ioctl(parse->fd, I_PUSH, (caddr_t)"ppsclocd") == -1 &&
- ioctl(parse->fd, I_PUSH, (caddr_t)"ppsclock") == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: ppsclock_init: ioctl(fd, I_PUSH, \"ppsclock\"): %m",
- CL_UNIT(parse->unit));
- return 0;
- }
- if (!local_init(parse))
- {
- (void)ioctl(parse->fd, I_POP, (caddr_t)0);
- return 0;
- }
-
- parse->flags |= PARSE_PPSCLOCK;
- return 1;
-}
-
-/*--------------------------------------------------
- * parse STREAM init
- */
-static int
-stream_init(parse)
- struct parseunit *parse;
-{
- /*
- * now push the parse streams module
- * to test whether it is there (Oh boy - neat kernel interface)
- */
- if (ioctl(parse->fd, I_PUSH, (caddr_t)"parse") == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CL_UNIT(parse->unit));
- return 0;
- }
- else
- {
- while(ioctl(parse->fd, I_POP, (caddr_t)0) == 0)
- /* empty loop */;
-
- /*
- * now push it a second time after we have removed all
- * module garbage
- */
- if (ioctl(parse->fd, I_PUSH, (caddr_t)"parse") == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_init: ioctl(fd, I_PUSH, \"parse\"): %m", CL_UNIT(parse->unit));
- return 0;
- }
- else
- {
- return 1;
- }
- }
-}
-
- /*--------------------------------------------------
- * STREAM setcs
- */
-static int
-stream_setcs(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_SETCS;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_setcs: ioctl(fd, I_STR, PARSEIOC_SETCS): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM nop
- */
-static void
-stream_nop(parse)
- struct parseunit *parse;
-{
-}
-
-/*--------------------------------------------------
- * STREAM enable
- */
-static int
-stream_enable(parse)
- struct parseunit *parse;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_ENABLE;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)0;
- strioc.ic_len = 0;
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_enable: ioctl(fd, I_STR, PARSEIOC_ENABLE): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM disable
- */
-static int
-stream_disable(parse)
- struct parseunit *parse;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_DISABLE;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)0;
- strioc.ic_len = 0;
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_disable: ioctl(fd, I_STR, PARSEIOC_DISABLE): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM getfmt
- */
-static int
-stream_getfmt(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_GETFMT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: ioctl(fd, I_STR, PARSEIOC_GETFMT): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM setfmt
- */
-static int
-stream_setfmt(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_SETFMT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_setfmt: ioctl(fd, I_STR, PARSEIOC_SETFMT): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM getstat
- */
-static int
-stream_getstat(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_GETSTAT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_getstat: ioctl(fd, I_STR, PARSEIOC_GETSTAT): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM setstat
- */
-static int
-stream_setstat(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_SETSTAT;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: stream_setstat: ioctl(fd, I_STR, PARSEIOC_SETSTAT): %m", CL_UNIT(parse->unit));
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM timecode
- */
-static int
-stream_timecode(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- struct strioctl strioc;
-
- strioc.ic_cmd = PARSEIOC_TIMECODE;
- strioc.ic_timout = 0;
- strioc.ic_dp = (char *)tcl;
- strioc.ic_len = sizeof (*tcl);
-
- if (ioctl(parse->fd, I_STR, (caddr_t)&strioc) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_process: ioctl(fd, I_STR, PARSEIOC_TIMECODE): %m", CL_UNIT(parse->unit), parse->fd);
- return 0;
- }
- return 1;
-}
-
-/*--------------------------------------------------
- * STREAM receive
- */
-static void
-stream_receive(rbufp)
- struct recvbuf *rbufp;
-{
- struct parseunit *parse = (struct parseunit *)rbufp->recv_srcclock;
- parsetime_t parsetime;
-
- if (rbufp->recv_length != sizeof(parsetime_t))
- {
- syslog(LOG_ERR,"PARSE receiver #%d: parse_receive: bad size (got %d expected %d)",
- CL_UNIT(parse->unit), rbufp->recv_length, sizeof(parsetime_t));
- parse->baddata++;
- parse_event(parse, CEVNT_BADREPLY);
- return;
- }
- memmove((caddr_t)&parsetime,
- (caddr_t)&rbufp->recv_space,
- sizeof(parsetime_t));
-
- /*
- * switch time stamp world - be sure to normalize small usec field
- * errors.
- */
-
-#define fix_ts(_X_) \
- if ((&(_X_))->tv.tv_usec >= 1000000) \
- { \
- (&(_X_))->tv.tv_usec -= 1000000; \
- (&(_X_))->tv.tv_sec += 1; \
- }
-
-#define cvt_ts(_X_, _Y_) \
- { \
- l_fp ts; \
- \
- fix_ts((_X_)); \
- if (!buftvtots((const char *)&(&(_X_))->tv, &ts)) \
- { \
- syslog(LOG_ERR,"parse: stream_receive: timestamp conversion error (buftvtots) (%s) (%d.%06d) ", (_Y_), (&(_X_))->tv.tv_sec, (&(_X_))->tv.tv_usec);\
- return; \
- } \
- else \
- { \
- (&(_X_))->fp = ts; \
- } \
- }
-
- if (PARSE_TIMECODE(parsetime.parse_state))
- {
- cvt_ts(parsetime.parse_time, "parse_time");
- cvt_ts(parsetime.parse_stime, "parse_stime");
- }
-
- if (PARSE_PPS(parsetime.parse_state))
- cvt_ts(parsetime.parse_ptime, "parse_ptime");
-
- parse_process(parse, &parsetime);
-}
-
-/*--------------------------------------------------
- * STREAM poll
- */
-static void
-stream_poll(parse)
- struct parseunit *parse;
-{
- register int fd, i, rtc;
- fd_set fdmask;
- struct timeval timeout, starttime, curtime, selecttime;
- parsetime_t parsetime;
-
- /*
- * now we do the following:
- * - read the first packet from the parse module (OLD !!!)
- * - read the second packet from the parse module (fresh)
- * - compute values for xntp
- */
-
- FD_ZERO(&fdmask);
- fd = parse->fd;
- FD_SET(fd, &fdmask);
- timeout.tv_sec = 0;
- timeout.tv_usec = 500000; /* 0.5 sec */
-
- if (parse->parse_type->cl_poll)
- {
- parse->parse_type->cl_poll(parse);
- }
-
- if (GETTIMEOFDAY(&starttime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
-
- selecttime = timeout;
-
- while ((rtc = select(fd + 1, &fdmask, 0, 0, &selecttime)) != 1)
- {
- /* no data from the radio clock */
-
- if (rtc == -1)
- {
- if (errno == EINTR)
- {
- if (GETTIMEOFDAY(&curtime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
- selecttime.tv_sec = curtime.tv_sec - starttime.tv_sec;
- if (curtime.tv_usec < starttime.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + curtime.tv_usec - starttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = curtime.tv_usec - starttime.tv_usec;
- }
-
-
- if (timercmp(&selecttime, &timeout, >))
- {
- /*
- * elapsed real time passed timeout value - consider it timed out
- */
- break;
- }
-
- /*
- * calculate residual timeout value
- */
- selecttime.tv_sec = timeout.tv_sec - selecttime.tv_sec;
-
- if (selecttime.tv_usec > timeout.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + timeout.tv_usec - selecttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = timeout.tv_usec - selecttime.tv_usec;
- }
-
- FD_SET(fd, &fdmask);
- continue;
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data[old] from device (select() error: %m)", CL_UNIT(parse->unit));
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data[old] from device", CL_UNIT(parse->unit));
- }
- parse->noresponse++;
- parse->lastmissed = current_time;
- parse_event(parse, CEVNT_TIMEOUT);
-
- return;
- }
-
- while (((i = read(fd, (char *)&parsetime, sizeof(parsetime))) < sizeof(parsetime)))
- {
- /* bad packet */
- if ( i == -1)
- {
- if (errno == EINTR)
- {
- continue;
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: bad read[old] from streams module (read() error: %m)", CL_UNIT(parse->unit), i, sizeof(parsetime));
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: bad read[old] from streams module (got %d bytes - expected %d bytes)", CL_UNIT(parse->unit), i, sizeof(parsetime));
- }
- parse->baddata++;
- parse_event(parse, CEVNT_BADREPLY);
-
- return;
- }
-
- if (parse->parse_type->cl_poll)
- {
- parse->parse_type->cl_poll(parse);
- }
-
- timeout.tv_sec = 1;
- timeout.tv_usec = 500000; /* 1.500 sec */
- FD_ZERO(&fdmask);
- FD_SET(fd, &fdmask);
-
- if (GETTIMEOFDAY(&starttime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
-
- selecttime = timeout;
-
- while ((rtc = select(fd + 1, &fdmask, 0, 0, &selecttime)) != 1)
- {
- /* no data from the radio clock */
-
- if (rtc == -1)
- {
- if (errno == EINTR)
- {
- if (GETTIMEOFDAY(&curtime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
- selecttime.tv_sec = curtime.tv_sec - starttime.tv_sec;
- if (curtime.tv_usec < starttime.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + curtime.tv_usec - starttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = curtime.tv_usec - starttime.tv_usec;
- }
-
-
- if (timercmp(&selecttime, &timeout, >))
- {
- /*
- * elapsed real time passed timeout value - consider it timed out
- */
- break;
- }
-
- /*
- * calculate residual timeout value
- */
- selecttime.tv_sec = timeout.tv_sec - selecttime.tv_sec;
-
- if (selecttime.tv_usec > timeout.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + timeout.tv_usec - selecttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = timeout.tv_usec - selecttime.tv_usec;
- }
-
- FD_SET(fd, &fdmask);
- continue;
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data[new] from device (select() error: %m)", CL_UNIT(parse->unit));
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data[new] from device", CL_UNIT(parse->unit));
- }
-
- /*
- * we will return here iff we got a good old sample as this would
- * be misinterpreted. bad samples are passed on to be logged into the
- * state statistics
- */
- if ((parsetime.parse_status & CVT_MASK) == CVT_OK)
- {
- parse->noresponse++;
- parse->lastmissed = current_time;
- parse_event(parse, CEVNT_TIMEOUT);
- return;
- }
- }
-
- /*
- * we get here either by a possible read() (rtc == 1 - while assertion)
- * or by a timeout or a system call error. when a read() is possible we
- * get the new data, otherwise we stick with the old
- */
- if ((rtc == 1) && ((i = read(fd, (char *)&parsetime, sizeof(parsetime))) < sizeof(parsetime)))
- {
- /* bad packet */
- if ( i== -1)
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: bad read[new] from streams module (read() error: %m)", CL_UNIT(parse->unit), i, sizeof(parsetime));
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: bad read[new] from streams module (got %d bytes - expected %d bytes)", CL_UNIT(parse->unit), i, sizeof(parsetime));
- }
- parse->baddata++;
- parse_event(parse, CEVNT_BADREPLY);
-
- return;
- }
-
- /*
- * process what we got
- */
- parse_process(parse, &parsetime);
-}
-#endif
-
-/*--------------------------------------------------
- * local init
- */
-static int
-local_init(parse)
- struct parseunit *parse;
-{
- return parse_ioinit(&parse->parseio);
-}
-
-/*--------------------------------------------------
- * local end
- */
-static void
-local_end(parse)
- struct parseunit *parse;
-{
- parse_ioend(&parse->parseio);
-}
-
-
-/*--------------------------------------------------
- * local nop
- */
-static int
-local_nop(parse)
- struct parseunit *parse;
-{
- return 1;
-}
-
-/*--------------------------------------------------
- * local setcs
- */
-static int
-local_setcs(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_setcs(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local getfmt
- */
-static int
-local_getfmt(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_getfmt(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local setfmt
- */
-static int
-local_setfmt(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_setfmt(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local getstat
- */
-static int
-local_getstat(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_getstat(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local setstat
- */
-static int
-local_setstat(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_setstat(tcl, &parse->parseio);
-}
-
-/*--------------------------------------------------
- * local timecode
- */
-static int
-local_timecode(parse, tcl)
- struct parseunit *parse;
- parsectl_t *tcl;
-{
- return parse_timecode(tcl, &parse->parseio);
-}
-
-
-/*--------------------------------------------------
- * local receive
- */
-static void
-local_receive(rbufp)
- struct recvbuf *rbufp;
-{
- struct parseunit *parse = (struct parseunit *)rbufp->recv_srcclock;
- register int count;
- register char *s;
-#ifdef FREEBSD_CONRAD
- struct timeval foo;
-#endif
-
- /*
- * eat all characters, parsing then and feeding complete samples
- */
- count = rbufp->recv_length;
- s = rbufp->recv_buffer;
-#ifdef FREEBSD_CONRAD
- ioctl(parse->fd,TIOCTIMESTAMP,&foo);
- TVTOTS(&foo, &rbufp->recv_time);
- rbufp->recv_time.l_uf += TS_ROUNDBIT;
- rbufp->recv_time.l_ui += JAN_1970;
- rbufp->recv_time.l_uf &= TS_MASK;
-#endif
-
- while (count--)
- {
- if (parse_ioread(&parse->parseio, *s++, &rbufp->recv_time))
- {
- /*
- * got something good to eat
- */
-#ifdef PPSPPS
- if (!PARSE_PPS(parse->parseio.parse_dtime.parse_state) &&
- (parse->flags & PARSE_PPSCLOCK))
- {
- l_fp ts;
- struct ppsclockev ev;
-
- if (ioctl(parse->fd, CIOGETEV, (caddr_t)&ev) == 0)
- {
- if (ev.serial != parse->ppsserial)
- {
- /*
- * add PPS time stamp if available via ppsclock module
- * and not supplied already.
- */
- if (!buftvtots((const char *)&ev.tv, &ts))
- {
- syslog(LOG_ERR,"parse: local_receive: timestamp conversion error (buftvtots) (ppsclockev.tv)");
- }
- else
- {
- parse->parseio.parse_dtime.parse_ptime.fp = ts;
- parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
- }
- }
- parse->ppsserial = ev.serial;
- }
- }
-#endif
- parse_process(parse, &parse->parseio.parse_dtime);
- parse_iodone(&parse->parseio);
- }
- }
-}
-
-/*--------------------------------------------------
- * local poll
- */
-static void
-local_poll(parse)
- struct parseunit *parse;
-{
- register int fd, i, rtc;
- fd_set fdmask;
- struct timeval timeout, starttime, curtime, selecttime;
- static struct timeval null_time = { 0, 0};
- timestamp_t ts;
-
- FD_ZERO(&fdmask);
- fd = parse->fd;
- FD_SET(fd, &fdmask);
- timeout.tv_sec = 1;
- timeout.tv_usec = 500000; /* 1.5 sec */
-
- if (parse->parse_type->cl_poll)
- {
- parse->parse_type->cl_poll(parse);
- }
-
- if (GETTIMEOFDAY(&starttime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
-
- selecttime = timeout;
-
- do
- {
- while ((rtc = select(fd + 1, &fdmask, 0, 0, &selecttime)) != 1)
- {
- /* no data from the radio clock */
-
- if (rtc == -1)
- {
- if (errno == EINTR)
- {
- if (GETTIMEOFDAY(&curtime, 0L) == -1)
- {
- syslog(LOG_ERR,"gettimeofday failed: %m");
- exit(1);
- }
- selecttime.tv_sec = curtime.tv_sec - starttime.tv_sec;
- if (curtime.tv_usec < starttime.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + curtime.tv_usec - starttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = curtime.tv_usec - starttime.tv_usec;
- }
-
-
- if (!timercmp(&selecttime, &timeout, >))
- {
- /*
- * calculate residual timeout value
- */
- selecttime.tv_sec = timeout.tv_sec - selecttime.tv_sec;
-
- if (selecttime.tv_usec > timeout.tv_usec)
- {
- selecttime.tv_sec -= 1;
- selecttime.tv_usec = 1000000 + timeout.tv_usec - selecttime.tv_usec;
- }
- else
- {
- selecttime.tv_usec = timeout.tv_usec - selecttime.tv_usec;
- }
-
- FD_SET(fd, &fdmask);
- continue;
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data from device (select() error: %m)", CL_UNIT(parse->unit));
- }
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: no data from device", CL_UNIT(parse->unit));
- }
-
- parse->noresponse++;
- parse->lastmissed = current_time;
- parse_event(parse, CEVNT_TIMEOUT);
-
- return;
- }
-
- /*
- * at least 1 character is available - gobble everthing up that is available
- */
- do
- {
- char inbuf[256];
-
- register char *s = inbuf;
-
- rtc = i = read(fd, inbuf, sizeof(inbuf));
-
- get_systime(&ts.fp);
-
- while (i-- > 0)
- {
- if (parse_ioread(&parse->parseio, *s++, ts))
- {
- /*
- * got something good to eat
- */
- parse_process(parse, &parse->parseio.parse_dtime);
- parse_iodone(&parse->parseio);
- /*
- * done if no more characters are available
- */
- FD_SET(fd, &fdmask);
- if ((i == 0) &&
- (select(fd + 1, &fdmask, 0, 0, &null_time) == 0))
- return;
- }
- }
- FD_SET(fd, &fdmask);
- } while ((rtc = select(fd + 1, &fdmask, 0, 0, &null_time)) == 1);
- FD_SET(fd, &fdmask);
- } while (1);
-}
-
-/*--------------------------------------------------
- * init_iobinding - find and initialize lower layers
- */
-static bind_t *
-init_iobinding(parse)
- struct parseunit *parse;
-{
- register bind_t *b = io_bindings;
-
- while (b->bd_description != (char *)0)
- {
- if ((*b->bd_init)(parse))
- {
- return b;
- }
- b++;
- }
- return (bind_t *)0;
-}
-
-/**===========================================================================
- ** support routines
- **/
-
-/*--------------------------------------------------
- * convert a flag field to a string
- */
-static char *
-parsestate(state, buffer)
- unsigned LONG state;
- char *buffer;
-{
- static struct bits
- {
- unsigned LONG bit;
- char *name;
- } flagstrings[] =
- {
- { PARSEB_ANNOUNCE, "DST SWITCH WARNING" },
- { PARSEB_POWERUP, "NOT SYNCHRONIZED" },
- { PARSEB_NOSYNC, "TIME CODE NOT CONFIRMED" },
- { PARSEB_DST, "DST" },
- { PARSEB_UTC, "UTC DISPLAY" },
- { PARSEB_LEAPADD, "LEAP ADD WARNING" },
- { PARSEB_LEAPDEL, "LEAP DELETE WARNING" },
- { PARSEB_LEAPSECOND, "LEAP SECOND" },
- { PARSEB_ALTERNATE,"ALTERNATE ANTENNA" },
- { PARSEB_TIMECODE, "TIME CODE" },
- { PARSEB_PPS, "PPS" },
- { PARSEB_POSITION, "POSITION" },
- { 0 }
- };
-
- static struct sbits
- {
- unsigned LONG bit;
- char *name;
- } sflagstrings[] =
- {
- { PARSEB_S_LEAP, "LEAP INDICATION" },
- { PARSEB_S_PPS, "PPS SIGNAL" },
- { PARSEB_S_ANTENNA, "ANTENNA" },
- { PARSEB_S_POSITION, "POSITION" },
- { 0 }
- };
- int i;
-
- *buffer = '\0';
-
- i = 0;
- while (flagstrings[i].bit)
- {
- if (flagstrings[i].bit & state)
- {
- if (buffer[0])
- strcat(buffer, "; ");
- strcat(buffer, flagstrings[i].name);
- }
- i++;
- }
-
- if (state & (PARSEB_S_LEAP|PARSEB_S_ANTENNA|PARSEB_S_PPS|PARSEB_S_POSITION))
- {
- register char *s, *t;
-
- if (buffer[0])
- strcat(buffer, "; ");
-
- strcat(buffer, "(");
-
- t = s = buffer + strlen(buffer);
-
- i = 0;
- while (sflagstrings[i].bit)
- {
- if (sflagstrings[i].bit & state)
- {
- if (t != s)
- {
- strcpy(t, "; ");
- t += 2;
- }
-
- strcpy(t, sflagstrings[i].name);
- t += strlen(t);
- }
- i++;
- }
- strcpy(t, ")");
- }
- return buffer;
-}
-
-/*--------------------------------------------------
- * convert a status flag field to a string
- */
-static char *
-parsestatus(state, buffer)
- unsigned LONG state;
- char *buffer;
-{
- static struct bits
- {
- unsigned LONG bit;
- char *name;
- } flagstrings[] =
- {
- { CVT_OK, "CONVERSION SUCCESSFUL" },
- { CVT_NONE, "NO CONVERSION" },
- { CVT_FAIL, "CONVERSION FAILED" },
- { CVT_BADFMT, "ILLEGAL FORMAT" },
- { CVT_BADDATE, "DATE ILLEGAL" },
- { CVT_BADTIME, "TIME ILLEGAL" },
- { 0 }
- };
- int i;
-
- *buffer = '\0';
-
- i = 0;
- while (flagstrings[i].bit)
- {
- if (flagstrings[i].bit & state)
- {
- if (buffer[0])
- strcat(buffer, "; ");
- strcat(buffer, flagstrings[i].name);
- }
- i++;
- }
-
- return buffer;
-}
-
-/*--------------------------------------------------
- * convert a clock status flag field to a string
- */
-static char *
-clockstatus(state)
- unsigned LONG state;
-{
- static char buffer[20];
- static struct status
- {
- unsigned LONG value;
- char *name;
- } flagstrings[] =
- {
- { CEVNT_NOMINAL, "NOMINAL" },
- { CEVNT_TIMEOUT, "NO RESPONSE" },
- { CEVNT_BADREPLY,"BAD FORMAT" },
- { CEVNT_FAULT, "FAULT" },
- { CEVNT_PROP, "PROPAGATION DELAY" },
- { CEVNT_BADDATE, "ILLEGAL DATE" },
- { CEVNT_BADTIME, "ILLEGAL TIME" },
- { ~0 }
- };
- int i;
-
- i = 0;
- while (flagstrings[i].value != ~0)
- {
- if (flagstrings[i].value == state)
- {
- return flagstrings[i].name;
- }
- i++;
- }
-
- sprintf(buffer, "unknown #%d", state);
-
- return buffer;
-}
-
-/*--------------------------------------------------
- * mkascii - make a printable ascii string
- * assumes (unless defined better) 7-bit ASCII
- */
-#ifndef isprint
-#define isprint(_X_) (((_X_) > 0x1F) && ((_X_) < 0x7F))
-#endif
-
-static char *
-mkascii(buffer, blen, src, srclen)
- register char *buffer;
- register LONG blen;
- register char *src;
- register LONG srclen;
-{
- register char *b = buffer;
- register char *endb = (char *)0;
-
- if (blen < 4)
- return (char *)0; /* don't bother with mini buffers */
-
- endb = buffer + blen - 4;
-
- blen--; /* account for '\0' */
-
- while (blen && srclen--)
- {
- if ((*src != '\\') && isprint(*src))
- { /* printables are easy... */
- *buffer++ = *src++;
- blen--;
- }
- else
- {
- if (blen < 4)
- {
- while (blen--)
- {
- *buffer++ = '.';
- }
- *buffer = '\0';
- return b;
- }
- else
- {
- if (*src == '\\')
- {
- strcpy(buffer,"\\\\");
- buffer += 2;
- blen -= 2;
- }
- else
- {
- sprintf(buffer, "\\x%02x", *src++);
- blen -= 4;
- buffer += 4;
- }
- }
- }
- if (srclen && !blen && endb) /* overflow - set last chars to ... */
- strcpy(endb, "...");
- }
-
- *buffer = '\0';
- return b;
-}
-
-
-/*--------------------------------------------------
- * l_mktime - make representation of a relative time
- */
-static char *
-l_mktime(delta)
- unsigned LONG delta;
-{
- unsigned LONG tmp, m, s;
- static char buffer[40];
-
- buffer[0] = '\0';
-
- if ((tmp = delta / (60*60*24)) != 0)
- {
- sprintf(buffer, "%dd+", tmp);
- delta -= tmp * 60*60*24;
- }
-
- s = delta % 60;
- delta /= 60;
- m = delta % 60;
- delta /= 60;
-
- sprintf(buffer+strlen(buffer), "%02d:%02d:%02d",
- delta, m, s);
-
- return buffer;
-}
-
-
-/*--------------------------------------------------
- * parse_statistics - list summary of clock states
- */
-static void
-parse_statistics(parse)
- register struct parseunit *parse;
-{
- register int i;
-
- syslog(LOG_INFO, "PARSE receiver #%d: running time: %s",
- CL_UNIT(parse->unit),
- l_mktime(current_time - parse->timestarted));
-
- syslog(LOG_INFO, "PARSE receiver #%d: current status: %s",
- CL_UNIT(parse->unit),
- clockstatus(parse->status));
-
- for (i = 0; i <= CEVNT_MAX; i++)
- {
- register unsigned LONG stime;
- register unsigned LONG percent, div = current_time - parse->timestarted;
-
- percent = stime = PARSE_STATETIME(parse, i);
-
- while (((unsigned LONG)(~0) / 10000) < percent)
- {
- percent /= 10;
- div /= 10;
- }
-
- if (div)
- percent = (percent * 10000) / div;
- else
- percent = 10000;
-
- if (stime)
- syslog(LOG_INFO, "PARSE receiver #%d: state %18s: %13s (%3d.%02d%%)",
- CL_UNIT(parse->unit),
- clockstatus(i),
- l_mktime(stime),
- percent / 100, percent % 100);
- }
-}
-
-/*--------------------------------------------------
- * cparse_statistics - wrapper for statistics call
- */
-static void
-cparse_statistics(peer)
- register struct peer *peer;
-{
- register struct parseunit *parse = (struct parseunit *)peer;
-
- parse_statistics(parse);
- parse->stattimer.event_time = current_time + PARSESTATISTICS;
- TIMER_ENQUEUE(timerqueue, &parse->stattimer);
-}
-
-/**===========================================================================
- ** xntp interface routines
- **/
-
-/*--------------------------------------------------
- * parse_init - initialize internal parse driver data
- */
-static void
-parse_init()
-{
- memset((caddr_t)parseunits, 0, sizeof parseunits);
-}
-
-
-/*--------------------------------------------------
- * parse_shutdown - shut down a PARSE clock
- */
-static void
-parse_shutdown(unit)
- int unit;
-{
- register struct parseunit *parse;
-
- unit = CL_UNIT(unit);
-
- if (unit >= MAXUNITS) {
- syslog(LOG_ERR,
- "PARSE receiver #%d: parse_shutdown: INTERNAL ERROR, unit invalid (max %d)",
- unit,MAXUNITS);
- return;
- }
-
- parse = parseunits[unit];
-
- if (parse && !parse->peer) {
- syslog(LOG_ERR,
- "PARSE receiver #%d: parse_shutdown: INTERNAL ERROR, unit not in use", unit);
- return;
- }
-
- /*
- * print statistics a last time and
- * stop statistics machine
- */
- parse_statistics(parse);
- TIMER_DEQUEUE(&parse->stattimer);
-
-#if PPSPPS
- {
- /*
- * kill possible PPS association
- */
- if (fdpps == parse->fd)
- fdpps = -1;
- }
-#endif
-
- if (parse->parse_type->cl_end)
- {
- parse->parse_type->cl_end(parse);
- }
-
- if (parse->binding)
- PARSE_END(parse);
-
- /*
- * Tell the I/O module to turn us off. We're history.
- */
- if (!parse->pollonly)
- io_closeclock(&parse->io);
- else
- (void) close(parse->fd);
-
- syslog(LOG_INFO, "PARSE receiver #%d: reference clock \"%s\" removed",
- CL_UNIT(parse->unit), parse->parse_type->cl_description);
-
- parse->peer = (struct peer *)0; /* unused now */
-}
-
-/*--------------------------------------------------
- * parse_start - open the PARSE devices and initialize data for processing
- */
-static int
-parse_start(sysunit, peer)
- u_int sysunit;
- struct peer *peer;
-{
- u_int unit;
- int fd232, i;
-#ifdef HAVE_TERMIOS
- struct termios tm; /* NEEDED FOR A LONG TIME ! */
-#endif
-#ifdef HAVE_SYSV_TTYS
- struct termio tm; /* NEEDED FOR A LONG TIME ! */
-#endif
- struct parseunit * parse;
- char parsedev[sizeof(PARSEDEVICE)+20];
- parsectl_t tmp_ctl;
- u_int type;
-
- type = CL_TYPE(sysunit);
- unit = CL_UNIT(sysunit);
-
- if (unit >= MAXUNITS)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: unit number invalid (max %d)",
- unit, MAXUNITS-1);
- return 0;
- }
-
- if ((type == ~0) || (clockinfo[type].cl_description == (char *)0))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: unsupported clock type %d (max %d)",
- unit, CL_REALTYPE(sysunit), ncltypes-1);
- return 0;
- }
-
- if (parseunits[unit] && parseunits[unit]->peer)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: unit in use", unit);
- return 0;
- }
-
- /*
- * Unit okay, attempt to open the device.
- */
- (void) sprintf(parsedev, PARSEDEVICE, unit);
-
-#ifndef O_NOCTTY
-#define O_NOCTTY 0
-#endif
-
- fd232 = open(parsedev, O_RDWR|O_NOCTTY, 0777);
- if (fd232 == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: open of %s failed: %m", unit, parsedev);
- return 0;
- }
-
- /*
- * Looks like this might succeed. Find memory for the structure.
- * Look to see if there are any unused ones, if not we malloc()
- * one.
- */
- if (parseunits[unit])
- {
- parse = parseunits[unit]; /* The one we want is okay - and free */
- }
- else
- {
- for (i = 0; i < MAXUNITS; i++)
- {
- if (parseunits[i] && !parseunits[i]->peer)
- break;
- }
- if (i < MAXUNITS)
- {
- /*
- * Reclaim this one
- */
- parse = parseunits[i];
- parseunits[i] = (struct parseunit *)0;
- }
- else
- {
- parse = (struct parseunit *)
- emalloc(sizeof(struct parseunit));
- }
- }
-
- memset((char *)parse, 0, sizeof(struct parseunit));
- parseunits[unit] = parse;
-
- /*
- * Set up the structures
- */
- parse->unit = (u_char)sysunit;
- parse->timestarted = current_time;
- parse->lastchange = current_time;
- /*
- * we want to filter input for the sake of
- * getting an impression on dispersion
- * also we like to average the median range
- */
- parse->flags = PARSE_STAT_FILTER|PARSE_STAT_AVG;
- parse->pollneeddata = 0;
- parse->pollonly = 1; /* go for default polling mode */
- parse->lastformat = ~0; /* assume no format known */
- parse->status = CEVNT_TIMEOUT; /* expect the worst */
- parse->laststatus = ~0; /* be sure to mark initial status change */
- parse->nosynctime = 0; /* assume clock reasonable */
- parse->lastmissed = 0; /* assume got everything */
- parse->ppsserial = 0;
- parse->localdata = (void *)0;
-
- parse->parse_type = &clockinfo[type];
-
- parse->basedelay.l_ui = 0; /* we can only pre-configure delays less than 1 second */
- parse->basedelay.l_uf = parse->parse_type->cl_basedelay;
-
- parse->ppsdelay.l_ui = 0; /* we can only pre-configure delays less than 1 second */
- parse->ppsdelay.l_uf = parse->parse_type->cl_ppsdelay;
-
- peer->rootdelay = parse->parse_type->cl_rootdelay;
- peer->sstclktype = parse->parse_type->cl_type;
- peer->precision = sys_precision;
- peer->stratum = STRATUM_REFCLOCK;
- if (peer->stratum <= 1)
- memmove((char *)&peer->refid, parse->parse_type->cl_id, 4);
- else
- peer->refid = htonl(PARSEHSREFID);
-
- parse->fd = fd232;
-
- parse->peer = peer; /* marks it also as busy */
-
- parse->binding = init_iobinding(parse);
-
- if (parse->binding == (bind_t *)0)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: io sub system initialisation failed.");
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
- /*
- * configure terminal line
- */
- if (TTY_GETATTR(fd232, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcgetattr(%d, &tm): %m", unit, fd232);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0;
- }
- else
- {
-#ifndef _PC_VDISABLE
- memset((char *)tm.c_cc, 0, sizeof(tm.c_cc));
-#else
- int disablec;
- errno = 0; /* pathconf can deliver -1 without changing errno ! */
-
- disablec = fpathconf(parse->fd, _PC_VDISABLE);
- if (disablec == -1 && errno)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: fpathconf(fd, _PC_VDISABLE): %m", CL_UNIT(parse->unit));
- memset((char *)tm.c_cc, 0, sizeof(tm.c_cc)); /* best guess */
- }
- else
- if (disablec != -1)
- memset((char *)tm.c_cc, disablec, sizeof(tm.c_cc));
-#endif
-
- tm.c_cflag = clockinfo[type].cl_cflag;
- tm.c_iflag = clockinfo[type].cl_iflag;
- tm.c_oflag = clockinfo[type].cl_oflag;
- tm.c_lflag = clockinfo[type].cl_lflag;
-#ifdef FREEBSD_CONRAD
- tm.c_ispeed = 50;
- tm.c_ospeed = 50;
-#endif
- if (TTY_SETATTR(fd232, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcsetattr(%d, &tm): %m", unit, fd232);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0;
- }
- }
-
- /*
- * as we always(?) get 8 bit chars we want to be
- * sure, that the upper bits are zero for less
- * than 8 bit I/O - so we pass that information on.
- * note that there can be only one bit count format
- * per file descriptor
- */
-
- switch (tm.c_cflag & CSIZE)
- {
- case CS5:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS5;
- break;
-
- case CS6:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS6;
- break;
-
- case CS7:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS7;
- break;
-
- case CS8:
- tmp_ctl.parsesetcs.parse_cs = PARSE_IO_CS8;
- break;
- }
-
- if (!PARSE_SETCS(parse, &tmp_ctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_setcs() FAILED.", unit);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
-#ifdef FREEBSD_CONRAD
- {
- int i,j;
- struct timeval tv;
- ioctl(parse->fd,TIOCTIMESTAMP,&tv);
- j = TIOCM_RTS;
- i = ioctl(fd232, TIOCMBIC, &j);
- if (i < 0) {
- syslog(LOG_ERR,
- "PARSE receiver #%d: lowrts_poll: failed to lower RTS: %m",
- CL_UNIT(parse->unit));
- }
- }
-#endif
-
- strcpy(tmp_ctl.parseformat.parse_buffer, parse->parse_type->cl_format);
- tmp_ctl.parseformat.parse_count = strlen(tmp_ctl.parseformat.parse_buffer);
-
- if (!PARSE_SETFMT(parse, &tmp_ctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_setfmt() FAILED.", unit);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
-#ifdef TCFLSH
- /*
- * get rid of all IO accumulated so far
- */
- {
-#ifndef TCIOFLUSH
-#define TCIOFLUSH 2
-#endif
- int flshcmd = TCIOFLUSH;
-
- (void) ioctl(parse->fd, TCFLSH, (caddr_t)&flshcmd);
- }
-#endif
-
- tmp_ctl.parsestatus.flags = parse->flags & PARSE_STAT_FLAGS;
-
- if (!PARSE_SETSTAT(parse, &tmp_ctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_setstat() FAILED.", unit);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
-
- /*
- * try to do any special initializations
- */
- if (parse->parse_type->cl_init)
- {
- if (parse->parse_type->cl_init(parse))
- {
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0; /* well, ok - special initialisation broke */
- }
- }
-
- if (!(parse->parse_type->cl_flags & PARSE_F_POLLONLY) &&
- (CL_PPS(parse->unit) || (parse->parse_type->cl_flags & PARSE_F_NOPOLLONLY)))
- {
- /*
- * Insert in async io device list.
- */
- parse->io.clock_recv = parse->binding->bd_receive; /* pick correct receive routine */
- parse->io.srcclock = (caddr_t)parse;
- parse->io.datalen = 0;
- parse->io.fd = parse->fd; /* replicated, but what the heck */
- if (!io_addclock(&parse->io))
- {
- if (parse->parse_type->cl_flags & PARSE_F_NOPOLLONLY)
- {
- syslog(LOG_ERR,
- "PARSE receiver #%d: parse_start: addclock %s fails (ABORT - clock type requires async io)", CL_UNIT(parse->unit), parsedev);
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0;
- }
- else
- {
- syslog(LOG_ERR,
- "PARSE receiver #%d: parse_start: addclock %s fails (switching to polling mode)", CL_UNIT(parse->unit), parsedev);
- }
- }
- else
- {
- parse->pollonly = 0; /*
- * update at receipt of time_stamp - also
- * supports PPS processing
- */
- }
- }
-
-#ifdef PPSPPS
- if (parse->pollonly || (parse->parse_type->cl_flags & PARSE_F_PPSPPS))
- {
- if (fdpps == -1)
- {
- fdpps = parse->fd;
- if (!PARSE_DISABLE(parse))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_start: parse_disable() FAILED", CL_UNIT(parse->unit));
- parse_shutdown(parse->unit); /* let our cleaning staff do the work */
- return 0;
- }
- }
- else
- {
- syslog(LOG_NOTICE, "PARSE receiver #%d: parse_start: loopfilter PPS already active - no PPS via CIOGETEV", CL_UNIT(parse->unit));
- }
- }
-#endif
-
- /*
- * wind up statistics timer
- */
- parse->stattimer.peer = (struct peer *)parse; /* we know better, but what the heck */
- parse->stattimer.event_handler = cparse_statistics;
- parse->stattimer.event_time = current_time + PARSESTATISTICS;
- TIMER_ENQUEUE(timerqueue, &parse->stattimer);
-
- /*
- * get out Copyright information once
- */
- if (!notice)
- {
- syslog(LOG_INFO, "NTP PARSE support: Copyright (c) 1989-1993, Frank Kardel");
- notice = 1;
- }
-
- /*
- * print out configuration
- */
- syslog(LOG_INFO, "PARSE receiver #%d: reference clock \"%s\" (device %s) added",
- CL_UNIT(parse->unit),
- parse->parse_type->cl_description, parsedev);
-
- syslog(LOG_INFO, "PARSE receiver #%d: Stratum %d, %sPPS support, trust time %s, precision %d",
- CL_UNIT(parse->unit),
- parse->peer->stratum, (parse->pollonly || !CL_PPS(parse->unit)) ? "no " : "",
- l_mktime(parse->parse_type->cl_maxunsync), parse->peer->precision);
-
- syslog(LOG_INFO, "PARSE receiver #%d: rootdelay %s s, phaseadjust %s s, %s IO handling",
- CL_UNIT(parse->unit),
- ufptoa(parse->parse_type->cl_rootdelay, 6),
- lfptoa(&parse->basedelay, 8),
- parse->binding->bd_description);
-
- syslog(LOG_INFO, "PARSE receiver #%d: Format recognition: %s", CL_UNIT(parse->unit),
- !(*parse->parse_type->cl_format) ? "<AUTOMATIC>" : parse->parse_type->cl_format);
-
-#ifdef PPSPPS
- syslog(LOG_INFO, "PARSE receiver #%d: %sCD PPS support",
- CL_UNIT(parse->unit),
- (fdpps == parse->fd) ? "" : "NO ");
-#endif
-
- return 1;
-}
-
-/*--------------------------------------------------
- * parse_poll - called by the transmit procedure
- */
-static void
-parse_poll(unit, peer)
- int unit;
- struct peer *peer;
-{
- register struct parseunit *parse;
-
- unit = CL_UNIT(unit);
-
- if (unit >= MAXUNITS)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: poll: INTERNAL: unit invalid",
- unit);
- return;
- }
-
- parse = parseunits[unit];
-
- if (!parse->peer)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: poll: INTERNAL: unit unused",
- unit);
- return;
- }
-
- if (peer != parse->peer)
- {
- syslog(LOG_ERR,
- "PARSE receiver #%d: poll: INTERNAL: peer incorrect",
- unit);
- return;
- }
-
- /*
- * Update clock stat counters
- */
- parse->polls++;
-
- /*
- * in PPS mode we just mark that we want the next sample
- * for the clock filter
- */
- if (!parse->pollonly)
- {
- if (parse->pollneeddata)
- {
- /*
- * bad news - didn't get a response last time
- */
- parse->noresponse++;
- parse->lastmissed = current_time;
- parse_event(parse, CEVNT_TIMEOUT);
-
- syslog(LOG_WARNING, "PARSE receiver #%d: no data from device within poll interval", CL_UNIT(parse->unit));
- }
- parse->pollneeddata = 1;
- if (parse->parse_type->cl_poll)
- {
- parse->parse_type->cl_poll(parse);
- }
- return;
- }
-
- /*
- * the following code is only executed only when polling is used
- */
-
- PARSE_POLL(parse);
-}
-
-/*--------------------------------------------------
- * parse_leap - called when a leap second occurs
- */
-
-static void
-parse_leap()
-{
- /*
- * PARSE encodes the LEAP correction direction.
- * For timecodes that do not pass on the leap correction direction
- * the default PARSEB_LEAPADD must be used. It may then be modified
- * with a fudge flag (flag2).
- */
-}
-
-
-/*--------------------------------------------------
- * parse_control - set fudge factors, return statistics
- */
-static void
-parse_control(unit, in, out)
- u_int unit;
- struct refclockstat *in;
- struct refclockstat *out;
-{
- register struct parseunit *parse;
- parsectl_t tmpctl;
- unsigned LONG type;
- static char outstatus[400]; /* status output buffer */
-
- type = CL_TYPE(unit);
- unit = CL_UNIT(unit);
-
- if (out)
- {
- out->lencode = 0;
- out->lastcode = 0;
- out->polls = out->noresponse = 0;
- out->badformat = out->baddata = 0;
- out->timereset = 0;
- out->currentstatus = out->lastevent = CEVNT_NOMINAL;
- out->kv_list = (struct ctl_var *)0;
- }
-
- if (unit >= MAXUNITS)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_control: unit invalid (max %d)",
- unit, MAXUNITS-1);
- return;
- }
-
- parse = parseunits[unit];
-
- if (!parse || !parse->peer)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_control: unit invalid (UNIT INACTIVE)",
- unit);
- return;
- }
-
- if (in)
- {
- if (in->haveflags & CLK_HAVETIME1)
- parse->basedelay = in->fudgetime1;
-
- if (in->haveflags & CLK_HAVETIME2)
- {
- parse->ppsdelay = in->fudgetime2;
- }
-
- if (in->haveflags & CLK_HAVEVAL1)
- {
- parse->peer->stratum = (u_char)(in->fudgeval1 & 0xf);
- if (parse->peer->stratum <= 1)
- memmove((char *)&parse->peer->refid,
- parse->parse_type->cl_id,
- 4);
- else
- parse->peer->refid = htonl(PARSEHSREFID);
- }
-
- /*
- * NOT USED - yet
- *
- if (in->haveflags & CLK_HAVEVAL2)
- {
- }
- */
- if (in->haveflags & (CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4))
- {
- parse->flags = (in->flags & (CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4)) |
- (parse->flags & ~PARSE_STAT_FLAGS);
- }
-
- if (in->haveflags & (CLK_HAVEVAL2|CLK_HAVETIME2|CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4))
- {
- parsectl_t tmpctl;
- tmpctl.parsestatus.flags = parse->flags & PARSE_STAT_FLAGS;
-
- if (!PARSE_SETSTAT(parse, &tmpctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_control: parse_setstat() FAILED", unit);
- }
- }
- }
-
- if (out)
- {
- register unsigned LONG sum = 0;
- register char *t, *tt;
- register struct tm *tm;
- register short utcoff;
- register char sign;
- register int i;
- time_t tim;
-
- outstatus[0] = '\0';
-
- out->haveflags = CLK_HAVETIME1|CLK_HAVETIME2|CLK_HAVEVAL1|CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3;
- out->clockdesc = parse->parse_type->cl_description;
-
- out->fudgetime1 = parse->basedelay;
-
- out->fudgetime2 = parse->ppsdelay;
-
- out->fudgeval1 = (LONG)parse->peer->stratum;
-
- out->fudgeval2 = 0;
-
- out->flags = parse->flags & PARSE_STAT_FLAGS;
-
- out->type = REFCLK_PARSE;
-
- /*
- * figure out skew between PPS and RS232 - just for informational
- * purposes - returned in time2 value
- */
- if (PARSE_SYNC(parse->time.parse_state))
- {
- if (PARSE_PPS(parse->time.parse_state) && PARSE_TIMECODE(parse->time.parse_state))
- {
- l_fp off;
-
- /*
- * we have a PPS and RS232 signal - calculate the skew
- * WARNING: assumes on TIMECODE == PULSE (timecode after pulse)
- */
- off = parse->time.parse_stime.fp;
- L_SUB(&off, &parse->time.parse_ptime.fp); /* true offset */
- tt = add_var(&out->kv_list, 40, RO);
- sprintf(tt, "refclock_ppsskew=%s", lfptoms(&off, 6));
- }
- }
-
- if (PARSE_PPS(parse->time.parse_state))
- {
- tt = add_var(&out->kv_list, 80, RO|DEF);
- sprintf(tt, "refclock_ppstime=\"%s\"", prettydate(&parse->time.parse_ptime.fp));
- }
-
- /*
- * all this for just finding out the +-xxxx part (there are always
- * new and changing fields in the standards 8-().
- *
- * but we do it for the human user...
- */
- tim = parse->time.parse_time.fp.l_ui - JAN_1970;
- tm = gmtime(&tim);
- utcoff = tm->tm_hour * 60 + tm->tm_min;
- tm = localtime(&tim);
- utcoff = tm->tm_hour * 60 + tm->tm_min - utcoff + 12 * 60;
- utcoff += 24 * 60;
- utcoff %= 24 * 60;
- utcoff -= 12 * 60;
- if (utcoff < 0)
- {
- utcoff = -utcoff;
- sign = '-';
- }
- else
- {
- sign = '+';
- }
-
- tt = add_var(&out->kv_list, 128, RO|DEF);
- sprintf(tt, "refclock_time=\"");
- tt += strlen(tt);
-
- if (parse->time.parse_time.fp.l_ui == 0)
- {
- strcpy(tt, "<UNDEFINED>\"");
- }
- else
- {
- strcpy(tt, prettydate(&parse->time.parse_time.fp));
- t = tt + strlen(tt);
-
- sprintf(t, " (%c%02d%02d)\"", sign, utcoff / 60, utcoff % 60);
- }
-
- if (!PARSE_GETTIMECODE(parse, &tmpctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_control: parse_timecode() FAILED", unit);
- }
- else
- {
- tt = add_var(&out->kv_list, 128, RO|DEF);
- sprintf(tt, "refclock_status=\"");
- tt += strlen(tt);
-
- /*
- * copy PPS flags from last read transaction (informational only)
- */
- tmpctl.parsegettc.parse_state |= parse->time.parse_state &
- (PARSEB_PPS|PARSEB_S_PPS);
-
- (void) parsestate(tmpctl.parsegettc.parse_state, tt);
-
- strcat(tt, "\"");
-
- if (tmpctl.parsegettc.parse_count)
- mkascii(outstatus+strlen(outstatus), sizeof(outstatus)- strlen(outstatus) - 1,
- tmpctl.parsegettc.parse_buffer, tmpctl.parsegettc.parse_count - 1);
-
- parse->badformat += tmpctl.parsegettc.parse_badformat;
- }
-
- tmpctl.parseformat.parse_format = tmpctl.parsegettc.parse_format;
-
- if (!PARSE_GETFMT(parse, &tmpctl))
- {
- syslog (LOG_ERR, "PARSE receiver #%d: parse_control: parse_getfmt() FAILED", unit);
- }
- else
- {
- tt = add_var(&out->kv_list, 80, RO|DEF);
- sprintf(tt, "refclock_format=\"");
-
- strncat(tt, tmpctl.parseformat.parse_buffer, tmpctl.parseformat.parse_count);
- strcat(tt,"\"");
- }
-
- /*
- * gather state statistics
- */
-
- tt = add_var(&out->kv_list, 200, RO|DEF);
- strcpy(tt, "refclock_states=\"");
- tt += strlen(tt);
-
- for (i = 0; i <= CEVNT_MAX; i++)
- {
- register unsigned LONG stime;
- register unsigned LONG div = current_time - parse->timestarted;
- register unsigned LONG percent;
-
- percent = stime = PARSE_STATETIME(parse, i);
-
- while (((unsigned LONG)(~0) / 10000) < percent)
- {
- percent /= 10;
- div /= 10;
- }
-
- if (div)
- percent = (percent * 10000) / div;
- else
- percent = 10000;
-
- if (stime)
- {
- sprintf(tt, "%s%s%s: %s (%d.%02d%%)",
- sum ? "; " : "",
- (parse->status == i) ? "*" : "",
- clockstatus(i),
- l_mktime(stime),
- percent / 100, percent % 100);
- sum += stime;
- tt += strlen(tt);
- }
- }
-
- sprintf(tt, "; running time: %s\"", l_mktime(sum));
-
- tt = add_var(&out->kv_list, 32, RO);
- sprintf(tt, "refclock_id=\"%s\"", parse->parse_type->cl_id);
-
- tt = add_var(&out->kv_list, 80, RO);
- sprintf(tt, "refclock_iomode=\"%s\"", parse->binding->bd_description);
-
- tt = add_var(&out->kv_list, 128, RO);
- sprintf(tt, "refclock_driver_version=\"refclock_parse.c,v 3.53 1994/03/25 13:07:39 kardel Exp\"");
-
- out->lencode = strlen(outstatus);
- out->lastcode = outstatus;
- out->timereset = parse->timestarted;
- out->polls = parse->polls;
- out->noresponse = parse->noresponse;
- out->badformat = parse->badformat;
- out->baddata = parse->baddata;
- out->lastevent = parse->lastevent;
- out->currentstatus = parse->status;
- }
-}
-
-/**===========================================================================
- ** processing routines
- **/
-
-/*--------------------------------------------------
- * event handling - note that nominal events will also be posted
- */
-static void
-parse_event(parse, event)
- struct parseunit *parse;
- int event;
-{
- if (parse->status != (u_char) event)
- {
- parse->statetime[parse->status] += current_time - parse->lastchange;
- parse->lastchange = current_time;
-
- parse->status = (u_char)event;
- if (event != CEVNT_NOMINAL)
- parse->lastevent = parse->status;
-
- report_event(EVNT_PEERCLOCK, parse->peer);
- }
-}
-
-/*--------------------------------------------------
- * process a PARSE time sample
- */
-static void
-parse_process(parse, parsetime)
- struct parseunit *parse;
- parsetime_t *parsetime;
-{
- unsigned char leap;
- struct timeval usecdisp;
- l_fp off, rectime, reftime, dispersion;
-
- /*
- * check for changes in conversion status
- * (only one for each new status !)
- */
- if (parse->laststatus != parsetime->parse_status)
- {
- char buffer[200];
-
- syslog(LOG_WARNING, "PARSE receiver #%d: conversion status \"%s\"",
- CL_UNIT(parse->unit), parsestatus(parsetime->parse_status, buffer));
-
- if ((parsetime->parse_status & CVT_MASK) == CVT_FAIL)
- {
- /*
- * tell more about the story - list time code
- * there is a slight change for a race condition and
- * the time code might be overwritten by the next packet
- */
- parsectl_t tmpctl;
-
- if (!PARSE_GETTIMECODE(parse, &tmpctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_process: parse_timecode() FAILED", CL_UNIT(parse->unit));
- }
- else
- {
- syslog(LOG_WARNING, "PARSE receiver #%d: FAILED TIMECODE: \"%s\"",
- CL_UNIT(parse->unit), mkascii(buffer, sizeof buffer, tmpctl.parsegettc.parse_buffer, tmpctl.parsegettc.parse_count - 1));
- parse->badformat += tmpctl.parsegettc.parse_badformat;
- }
- }
-
- parse->laststatus = parsetime->parse_status;
- }
-
- /*
- * examine status and post appropriate events
- */
- if ((parsetime->parse_status & CVT_MASK) != CVT_OK)
- {
- /*
- * got bad data - tell the rest of the system
- */
- switch (parsetime->parse_status & CVT_MASK)
- {
- case CVT_NONE:
- break; /* well, still waiting - timeout is handled at higher levels */
-
- case CVT_FAIL:
- parse->badformat++;
- if (parsetime->parse_status & CVT_BADFMT)
- {
- parse_event(parse, CEVNT_BADREPLY);
- }
- else
- if (parsetime->parse_status & CVT_BADDATE)
- {
- parse_event(parse, CEVNT_BADDATE);
- }
- else
- if (parsetime->parse_status & CVT_BADTIME)
- {
- parse_event(parse, CEVNT_BADTIME);
- }
- else
- {
- parse_event(parse, CEVNT_BADREPLY); /* for the lack of something better */
- }
- }
- return; /* skip the rest - useless */
- }
-
- /*
- * check for format changes
- * (in case somebody has swapped clocks 8-)
- */
- if (parse->lastformat != parsetime->parse_format)
- {
- parsectl_t tmpctl;
-
- tmpctl.parseformat.parse_format = parsetime->parse_format;
-
- if (!PARSE_GETFMT(parse, &tmpctl))
- {
- syslog(LOG_ERR, "PARSE receiver #%d: parse_getfmt() FAILED", CL_UNIT(parse->unit));
- }
- else
- {
- syslog(LOG_INFO, "PARSE receiver #%d: new packet format \"%s\"",
- CL_UNIT(parse->unit), tmpctl.parseformat.parse_buffer);
- }
- parse->lastformat = parsetime->parse_format;
- }
-
- /*
- * now, any changes ?
- */
- if (parse->time.parse_state != parsetime->parse_state)
- {
- char tmp1[200];
- char tmp2[200];
- /*
- * something happend
- */
-
- (void) parsestate(parsetime->parse_state, tmp1);
- (void) parsestate(parse->time.parse_state, tmp2);
-
- syslog(LOG_INFO,"PARSE receiver #%d: STATE CHANGE: %s -> %s",
- CL_UNIT(parse->unit), tmp2, tmp1);
- }
-
- /*
- * remember for future
- */
- parse->time = *parsetime;
-
- /*
- * check to see, whether the clock did a complete powerup or lost PZF signal
- * and post correct events for current condition
- */
- if (PARSE_POWERUP(parsetime->parse_state))
- {
- /*
- * this is bad, as we have completely lost synchronisation
- * well this is a problem with the receiver here
- * for PARSE U/A 31 the lost synchronisation ist true
- * as it is the powerup state and the time is taken
- * from a crude real time clock chip
- * for the PZF series this is only partly true, as
- * PARSE_POWERUP only means that the pseudo random
- * phase shift sequence cannot be found. this is only
- * bad, if we have never seen the clock in the SYNC
- * state, where the PHASE and EPOCH are correct.
- * for reporting events the above business does not
- * really matter, but we can use the time code
- * even in the POWERUP state after having seen
- * the clock in the synchronized state (PZF class
- * receivers) unless we have had a telegram disruption
- * after having seen the clock in the SYNC state. we
- * thus require having seen the clock in SYNC state
- * *after* having missed telegrams (noresponse) from
- * the clock. one problem remains: we might use erroneously
- * POWERUP data if the disruption is shorter than 1 polling
- * interval. fortunately powerdowns last usually longer than 64
- * seconds and the receiver is at least 2 minutes in the
- * POWERUP or NOSYNC state before switching to SYNC
- */
- parse_event(parse, CEVNT_FAULT);
- if (parse->nosynctime)
- {
- /*
- * repeated POWERUP/NOSYNC state - look whether
- * the message should be repeated
- */
- if (current_time - parse->nosynctime > PARSENOSYNCREPEAT)
- {
- syslog(LOG_ERR,"PARSE receiver #%d: *STILL* NOT SYNCHRONIZED (POWERUP or no PZF signal)",
- CL_UNIT(parse->unit));
- parse->nosynctime = current_time;
- }
- }
- else
- {
- syslog(LOG_ERR,"PARSE receiver #%d: NOT SYNCHRONIZED",
- CL_UNIT(parse->unit));
- parse->nosynctime = current_time;
- }
- }
- else
- {
- /*
- * we have two states left
- *
- * SYNC:
- * this state means that the EPOCH (timecode) and PHASE
- * information has be read correctly (at least two
- * successive PARSE timecodes were received correctly)
- * this is the best possible state - full trust
- *
- * NOSYNC:
- * The clock should be on phase with respect to the second
- * signal, but the timecode has not been received correctly within
- * at least the last two minutes. this is a sort of half baked state
- * for PARSE U/A 31 this is bad news (clock running without timecode
- * confirmation)
- * PZF 535 has also no time confirmation, but the phase should be
- * very precise as the PZF signal can be decoded
- */
- parse->nosynctime = 0; /* current state is better than worst state */
-
- if (PARSE_SYNC(parsetime->parse_state))
- {
- /*
- * currently completely synchronized - best possible state
- */
- parse->lastsync = current_time;
- /*
- * log OK status
- */
- parse_event(parse, CEVNT_NOMINAL);
- }
- else
- {
- /*
- * we have had some problems receiving the time code
- */
- parse_event(parse, CEVNT_PROP);
- }
- }
-
- if (PARSE_TIMECODE(parsetime->parse_state))
- {
- l_fp offset;
-
- /*
- * calculate time offset including systematic delays
- * off = PARSE-timestamp + propagation delay - kernel time stamp
- */
- offset = parse->basedelay;
-
- off = parsetime->parse_time.fp;
-
- reftime = off;
-
- L_ADD(&off, &offset);
- rectime = off; /* this makes org time and xmt time somewhat artificial */
-
- L_SUB(&off, &parsetime->parse_stime.fp);
-
- if ((parse->flags & PARSE_STAT_FILTER) &&
- (off.l_i > -60) &&
- (off.l_i < 60)) /* take usec error only if within +- 60 secs */
- {
- struct timeval usecerror;
- /*
- * offset is already calculated
- */
- usecerror.tv_sec = parsetime->parse_usecerror / 1000000;
- usecerror.tv_usec = parsetime->parse_usecerror % 1000000;
-
- sTVTOTS(&usecerror, &off);
- L_ADD(&off, &offset);
- }
- }
-
- if (PARSE_PPS(parsetime->parse_state) && CL_PPS(parse->unit))
- {
- l_fp offset;
-
- /*
- * we have a PPS signal - much better than the RS232 stuff (we hope)
- */
- offset = parsetime->parse_ptime.fp;
-
- L_ADD(&offset, &parse->ppsdelay);
-
- if (PARSE_TIMECODE(parsetime->parse_state))
- {
- if (M_ISGEQ(off.l_i, off.l_f, -1, 0x80000000) &&
- M_ISGEQ(0, 0x7fffffff, off.l_i, off.l_f))
- {
- /*
- * RS232 offsets within [-0.5..0.5[ - take PPS offsets
- */
-
- if (parse->parse_type->cl_flags & PARSE_F_PPSONSECOND)
- {
- reftime = off = offset;
- rectime = offset;
- /*
- * implied on second offset
- */
- off.l_uf = ~off.l_uf; /* map [0.5..1[ -> [-0.5..0[ */
- off.l_ui = (off.l_f < 0) ? ~0 : 0; /* sign extend */
- }
- else
- {
- /*
- * time code describes pulse
- */
- off = parsetime->parse_time.fp;
-
- rectime = reftime = off; /* take reference time - fake rectime */
-
- L_SUB(&off, &offset); /* true offset */
- }
- }
- /*
- * take RS232 offset when PPS when out of bounds
- */
- }
- else
- {
- /*
- * Well, no time code to guide us - assume on second pulse
- * and pray, that we are within [-0.5..0.5[
- */
- reftime = off = offset;
- rectime = offset;
- /*
- * implied on second offset
- */
- off.l_uf = ~off.l_uf; /* map [0.5..1[ -> [-0.5..0[ */
- off.l_ui = (off.l_f < 0) ? ~0 : 0; /* sign extend */
- }
- }
- else
- {
- if (!PARSE_TIMECODE(parsetime->parse_state))
- {
- /*
- * Well, no PPS, no TIMECODE, no more work ...
- */
- return;
- }
- }
-
-
-#if defined(PPS) || defined(PPSCLK) || defined(PPSPPS) || defined(PARSEPPS)
- if (CL_PPS(parse->unit) && !parse->pollonly && PARSE_SYNC(parsetime->parse_state))
- {
- /*
- * only provide PPS information when clock
- * is in sync
- * thus PHASE and EPOCH are correct and PPS is not
- * done via the CIOGETEV loopfilter mechanism
- */
-#ifdef PPSPPS
- if (fdpps != parse->fd)
-#endif
- (void) pps_sample(&off);
- }
-#endif /* PPS || PPSCLK || PPSPPS || PARSEPPS */
-
- /*
- * ready, unless the machine wants a sample
- */
- if (!parse->pollonly && !parse->pollneeddata)
- return;
-
- parse->pollneeddata = 0;
-
- if (PARSE_PPS(parsetime->parse_state))
- {
- L_CLR(&dispersion);
- }
- else
- {
- /*
- * convert usec dispersion into NTP TS world
- */
-
- usecdisp.tv_sec = parsetime->parse_usecdisp / 1000000;
- usecdisp.tv_usec = parsetime->parse_usecdisp % 1000000;
-
- TVTOTS(&usecdisp, &dispersion);
- }
-
- /*
- * and now stick it into the clock machine
- * samples are only valid iff lastsync is not too old and
- * we have seen the clock in sync at least once
- * after the last time we didn't see an expected data telegram
- * see the clock states section above for more reasoning
- */
- if (((current_time - parse->lastsync) > parse->parse_type->cl_maxunsync) ||
- (parse->lastsync <= parse->lastmissed))
- {
- leap = LEAP_NOTINSYNC;
- }
- else
- {
- if (PARSE_LEAPADD(parsetime->parse_state))
- {
- /*
- * we pick this state also for time code that pass leap warnings
- * without direction information (as earth is currently slowing
- * down).
- */
- leap = (parse->flags & PARSE_LEAP_DELETE) ? LEAP_DELSECOND : LEAP_ADDSECOND;
- }
- else
- if (PARSE_LEAPDEL(parsetime->parse_state))
- {
- leap = LEAP_DELSECOND;
- }
- else
- {
- leap = LEAP_NOWARNING;
- }
- }
-
- refclock_receive(parse->peer, &off, 0, LFPTOFP(&dispersion), &reftime, &rectime, leap);
-}
-
-/**===========================================================================
- ** clock polling support
- **/
-
-struct poll_timer
-{
- struct event timer; /* we'd like to poll a a higher rate than 1/64s */
-};
-
-typedef struct poll_timer poll_timer_t;
-
-/*--------------------------------------------------
- * direct poll routine
- */
-static void
-poll_dpoll(parse)
- struct parseunit *parse;
-{
- register int rtc;
- register char *ps = ((poll_info_t *)parse->parse_type->cl_data)->string;
- register int ct = ((poll_info_t *)parse->parse_type->cl_data)->count;
-
- rtc = write(parse->fd, ps, ct);
- if (rtc < 0)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd to clock: %m", CL_UNIT(parse->unit));
- }
- else
- if (rtc != ct)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd incomplete (%d of %d bytes sent)", CL_UNIT(parse->unit), rtc, ct);
- }
-}
-
-/*--------------------------------------------------
- * periodic poll routine
- */
-static void
-poll_poll(parse)
- struct parseunit *parse;
-{
- register poll_timer_t *pt = (poll_timer_t *)parse->localdata;
-
- poll_dpoll(parse);
-
- if (pt != (poll_timer_t *)0)
- {
- pt->timer.event_time = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
- TIMER_ENQUEUE(timerqueue, &pt->timer);
- }
-}
-
-/*--------------------------------------------------
- * init routine - setup timer
- */
-static int
-poll_init(parse)
- struct parseunit *parse;
-{
- register poll_timer_t *pt;
-
- if (((poll_info_t *)parse->parse_type->cl_data)->rate)
- {
- parse->localdata = (void *)malloc(sizeof(poll_timer_t));
- memset((char *)parse->localdata, 0, sizeof(poll_timer_t));
-
- pt = (poll_timer_t *)parse->localdata;
-
- pt->timer.peer = (struct peer *)parse; /* well, only we know what it is */
- pt->timer.event_handler = poll_poll;
- poll_poll(parse);
- }
- else
- {
- parse->localdata = (void *)0;
- }
-
- return 0;
-}
-
-/*--------------------------------------------------
- * end routine - clean up timer
- */
-static void
-poll_end(parse)
- struct parseunit *parse;
-{
- if (parse->localdata != (void *)0)
- {
- TIMER_DEQUEUE(&((poll_timer_t *)parse->localdata)->timer);
- free((char *)parse->localdata);
- parse->localdata = (void *)0;
- }
-}
-
-/**===========================================================================
- ** special code for special clocks
- **/
-
-/*--------------------------------------------------
- * trimble init routine - setup EOL and then do poll_init.
- */
-static int
-trimble_init(parse)
- struct parseunit *parse;
-{
-#ifdef HAVE_TERMIOS
- struct termios tm;
-#endif
-#ifdef HAVE_SYSV_TTYS
- struct termio tm;
-#endif
- /*
- * configure terminal line for trimble receiver
- */
- if (TTY_GETATTR(parse->fd, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: trimble_init: tcgetattr(fd, &tm): %m", CL_UNIT(parse->unit));
- return 0;
- }
- else
- {
- tm.c_cc[VEOL] = TRIMBLESV6_EOL;
-
- if (TTY_SETATTR(parse->fd, &tm) == -1)
- {
- syslog(LOG_ERR, "PARSE receiver #%d: trimble_init: tcsetattr(fd, &tm): %m", CL_UNIT(parse->unit));
- return 0;
- }
- }
- return poll_init(parse);
-}
-#endif /* defined(REFCLOCK) && defined(PARSE) */
-
-/*
- * History:
- *
- * refclock_parse.c,v
- * Revision 3.53 1994/03/25 13:07:39 kardel
- * fixed offset calculation for large (>4 Min) offsets
- *
- * Revision 3.52 1994/03/03 09:58:00 kardel
- * stick -kv in cvs is no fun
- *
- * Revision 3.49 1994/02/20 13:26:00 kardel
- * rcs id cleanup
- *
- * Revision 3.48 1994/02/20 13:04:56 kardel
- * parse add/delete second support
- *
- * Revision 3.47 1994/02/02 17:44:30 kardel
- * rcs ids fixed
- *
- * Revision 3.45 1994/01/25 19:06:27 kardel
- * 94/01/23 reconcilation
- *
- * Revision 3.44 1994/01/25 17:32:23 kardel
- * settable extended variables
- *
- * Revision 3.43 1994/01/23 16:28:39 kardel
- * HAVE_TERMIOS introduced
- *
- * Revision 3.42 1994/01/22 11:35:04 kardel
- * added HAVE_TERMIOS
- *
- * Revision 3.41 1993/11/27 18:44:37 kardel
- * can't trust GPS166 on unsync
- *
- * Revision 3.40 1993/11/21 18:03:36 kardel
- * useless declaration deleted
- *
- * Revision 3.39 1993/11/21 15:30:15 kardel
- * static funcitions may be declared only at outer level
- *
- * Revision 3.38 1993/11/15 21:26:49 kardel
- * conditional define comments fixed
- *
- * Revision 3.37 1993/11/11 11:20:49 kardel
- * declaration fixes
- *
- * Revision 3.36 1993/11/10 12:17:14 kardel
- * #ifdef glitch
- *
- * Revision 3.35 1993/11/01 21:15:06 kardel
- * comments updated
- *
- * Revision 3.34 1993/11/01 20:01:08 kardel
- * parse Solaris support (initial version)
- *
- * Revision 3.33 1993/10/30 09:44:58 kardel
- * conditional compilation flag cleanup
- *
- * Revision 3.32 1993/10/22 14:28:43 kardel
- * Oct. 22nd 1993 reconcilation
- *
- * Revision 3.31 1993/10/10 21:19:10 kardel
- * compilation cleanup - (minimal porting tests)
- *
- * Revision 3.30 1993/10/09 21:44:35 kardel
- * syslog strings fixed
- *
- * Revision 3.29 1993/10/09 14:40:15 kardel
- * default precision setting fixed
- *
- * Revision 3.28 1993/10/08 14:48:22 kardel
- * Changed offset determination logic:
- * Take the PPS offset if it is available and the time
- * code offset is within [-0.5..0.5[, otherwise stick
- * to the time code offset
- *
- * Revision 3.27 1993/10/08 00:53:17 kardel
- * announce also simulated PPS via CIOGETEV in ntpq cl
- *
- * Revision 3.26 1993/10/07 23:29:35 kardel
- * trimble fixes
- *
- * Revision 3.25 1993/10/06 21:13:35 kardel
- * test reversed (CIOGETEV support)
- *
- * Revision 3.24 1993/10/03 20:18:26 kardel
- * Well, values > 999999 in the usec field from uniqtime() timestamps
- * can prove harmful.
- *
- * Revision 3.23 1993/10/03 19:49:54 kardel
- * buftvtots where failing on uninitialized time stamps
- *
- * Revision 3.22 1993/10/03 19:11:09 kardel
- * restructured I/O handling
- *
- * Revision 3.21 1993/09/29 11:30:18 kardel
- * special init for trimble to set EOL
- *
- * Revision 3.20 1993/09/27 22:46:28 kardel
- * preserve module stack if I_PUSH parse fails
- *
- * Revision 3.19 1993/09/27 21:10:11 kardel
- * wrong structure member
- *
- * Revision 3.18 1993/09/27 13:05:06 kardel
- * Trimble is true polling only
- *
- * Revision 3.17 1993/09/27 12:47:10 kardel
- * poll string support generalized
- *
- * Revision 3.16 1993/09/26 23:40:56 kardel
- * new parse driver logic
- *
- * Revision 3.15 1993/09/24 15:00:51 kardel
- * Sep 23rd distribution...
- *
- * Revision 3.14 1993/09/22 18:21:15 kardel
- * support ppsclock streams module (-DSTREAM -DPPSPPS -DPARSEPPS -UPARSESTREAM)
- *
- * Revision 3.13 1993/09/05 15:38:33 kardel
- * not every cpp understands #error...
- *
- * Revision 3.12 1993/09/02 20:04:19 kardel
- * TTY cleanup
- *
- * Revision 3.11 1993/09/01 21:48:47 kardel
- * conditional cleanup
- *
- * Revision 3.10 1993/09/01 11:32:45 kardel
- * assuming HAVE_POSIX_TTYS when STREAM defined
- *
- * Revision 3.9 1993/08/31 22:31:46 kardel
- * SINIX-M SysVR4 integration
- *
- * Revision 3.8 1993/08/27 00:29:50 kardel
- * compilation cleanup
- *
- * Revision 3.7 1993/08/24 22:27:30 kardel
- * cleaned up AUTOCONF DCF77 mess 8-) - wasn't too bad
- *
- * Revision 3.6 1993/08/24 21:36:23 kardel
- * casting and ifdefs
- *
- * Revision 3.5 1993/07/09 23:36:59 kardel
- * HAVE_POSIX_TTYS used to produce errors 8-( - BSD driver support still lacking
- *
- * Revision 3.4 1993/07/09 12:42:29 kardel
- * RAW DCF now officially released
- *
- * Revision 3.3 1993/07/09 11:50:37 kardel
- * running GPS also on 960 to be able to switch GPS/DCF77
- *
- * Revision 3.2 1993/07/09 11:37:34 kardel
- * Initial restructured version + GPS support
- *
- * Revision 3.1 1993/07/06 10:01:07 kardel
- * DCF77 driver goes generic...
- *
- */
diff --git a/usr.sbin/xntpd/xntpdc/Makefile.tmpl b/usr.sbin/xntpd/xntpdc/Makefile.tmpl
deleted file mode 100644
index 80c8f93d406b..000000000000
--- a/usr.sbin/xntpd/xntpdc/Makefile.tmpl
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Makefile.tmpl
-#
-PROGRAM= xntpdc
-#
-# xntpdc - private mode query program for xntp
-#
-COMPILER= cc
-COPTS= -O
-BINDIR= /usr/local
-INSTALL= install
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-RESLIB=
-COMPAT=
-#
-INCL= -I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-LIB= ../lib/libntp.a
-LINTLIB= ../lib/llib-llibntp.ln
-MAKE= make
-TOP=../
-#
-OBJS= ntpdc.o ntpdc_ops.o
-SOURCE= ntpdc.c ntpdc_ops.c
-
-all: $(PROGRAM)
-
-$(PROGRAM): $(OBJS) $(LIB) version.o
- $(CC) $(COPTS) -o $@ $(OBJS) version.o $(LIB) $(RESLIB) $(COMPAT)
-
-install: $(BINDIR)/$(PROGRAM)
-
-$(BINDIR)/$(PROGRAM): $(PROGRAM)
- $(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)
-
-tags:
- ctags *.c *.h
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(PROGRAM) *.o *.out tags make.log Makefile.bak lint.errs .version
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-lint: $(LINTLIB)
- lint -x -u $(DEFS) $(DEFS_LOCAL) $(INCL) $(LINTLIB) $(SOURCE) >lint.errs
-
-../lib/llib-llibntp.ln:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" lintlib
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
-#
-# we want to build the current version string here
-#
-version.o: ../VERSION
- ../scripts/mkversion $(PROGRAM)
- $(CC) $(COPTS) $(INCL) -c version.c
-
-../VERSION:
- -@rm -f .version
diff --git a/usr.sbin/xntpd/xntpres/Makefile.tmpl b/usr.sbin/xntpd/xntpres/Makefile.tmpl
deleted file mode 100644
index 8f0742bd3bbc..000000000000
--- a/usr.sbin/xntpd/xntpres/Makefile.tmpl
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Makefile.tmpl,v 3.1 1993/07/06 01:12:07 jbj Exp
-#
-PROGRAM= xntpres
-#
-# xntpres - name resolver support for xntpd
-#
-COMPILER= cc
-COPTS= -O
-BINDIR= /usr/local
-INSTALL= install
-DEFS=
-DEFS_OPT=
-DEFS_LOCAL=
-RESLIB=
-COMPAT=
-#
-INCL= -I../include
-CFLAGS= $(COPTS) $(DEFS) $(DEFS_LOCAL) $(INCL)
-CC= $(COMPILER)
-LIB= ../lib/libntp.a
-LINTLIB= ../lib/llib-llibntp.ln
-MAKE= make
-TOP=../
-#
-OBJS= xntpres.o
-SOURCE= xntpres.c
-
-all: $(PROGRAM)
-
-$(PROGRAM): $(OBJS) $(LIB) version.o
- $(CC) $(COPTS) -o $@ $(OBJS) version.o $(LIB) $(RESLIB) $(COMPAT)
-
-install: $(BINDIR)/$(PROGRAM)
-
-$(BINDIR)/$(PROGRAM): $(PROGRAM)
- $(INSTALL) -c -m 0755 $(PROGRAM) $(BINDIR)
-
-tags:
- ctags *.c *.h
-
-depend:
- mkdep $(CFLAGS) $(SOURCE)
-
-clean:
- -@rm -f $(PROGRAM) *.o *.out tags make.log Makefile.bak lint.errs .version
-
-distclean: clean
- -@rm -f *.orig *.rej .version Makefile
-
-lint: $(LINTLIB)
- lint -x -u $(DEFS) $(DEFS_LOCAL) $(INCL) $(LINTLIB) $(SOURCE) >lint.errs
-
-../lib/llib-llibntp.ln:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" lintlib
-
-../lib/libntp.a:
- cd ../lib && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)"
-
-#
-# we want to build the current version string here
-#
-version.o: ../VERSION
- ../scripts/mkversion $(PROGRAM)
- $(CC) $(COPTS) $(INCL) -c version.c
-
-../VERSION:
- -@rm -f .version
diff --git a/usr.sbin/xntpd/xntpres/README b/usr.sbin/xntpd/xntpres/README
deleted file mode 100644
index 06d7266b4f2c..000000000000
--- a/usr.sbin/xntpd/xntpres/README
+++ /dev/null
@@ -1,6 +0,0 @@
-README file for directory ./xntpres of the NTP Version 3 distribution
-
-This directory contains the sources for the xntpres utility program. See
-the README and RELNOTES files in the parent directory for directions on
-how to make and install this program. The current version number of this
-program is in the version.c file.
diff --git a/usr.sbin/xntpd/xntpres/xntpres.c b/usr.sbin/xntpd/xntpres/xntpres.c
deleted file mode 100644
index 47c6eda7dc12..000000000000
--- a/usr.sbin/xntpd/xntpres/xntpres.c
+++ /dev/null
@@ -1,850 +0,0 @@
-/* xntpres.c,v 3.1 1993/07/06 01:12:09 jbj Exp
- * xntpres - process configuration entries which require use of the resolver
- *
- * This is meant to be run by xntpd on the fly. It is not guaranteed
- * to work properly if run by hand. This is actually a quick hack to
- * stave off violence from people who hate using numbers in the
- * configuration file (at least I hope the rest of the daemon is
- * better than this). Also might provide some ideas about how one
- * might go about autoconfiguring an NTP distribution network.
- *
- * Usage is:
- * xntpres [-d] [-r] keyid keyfile configuration_data
- */
-#include <stdio.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <netdb.h>
-#include <signal.h>
-#include <errno.h>
-
-#include "ntp_select.h"
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_io.h"
-#include "ntp_malloc.h"
-#include "ntp_request.h"
-#include "ntp_string.h"
-#include "ntp_stdlib.h"
-#include "ntp_syslog.h"
-
-#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
-
-/*
- * Each item we are to resolve and configure gets one of these
- * structures defined for it.
- */
-struct conf_entry {
- struct conf_entry *ce_next;
- char *ce_name; /* name we are trying to resolve */
- struct conf_peer ce_config; /* configuration info for peer */
-};
-#define ce_peeraddr ce_config.peeraddr
-#define ce_hmode ce_config.hmode
-#define ce_version ce_config.version
-#define ce_minpoll ce_config.minpoll
-#define ce_maxpoll ce_config.maxpoll
-#define ce_flags ce_config.flags
-#define ce_ttl ce_config.ttl
-#define ce_keyid ce_config.keyid
-
-/*
- * confentries is a pointer to the list of configuration entries
- * we have left to do.
- */
-struct conf_entry *confentries = NULL;
-
-/*
- * We take an interrupt every thirty seconds, at which time we decrement
- * config_timer and resolve_timer. The former is set to 2, so we retry
- * unsucessful reconfigurations every minute. The latter is set to
- * an exponentially increasing value which starts at 2 and increases to
- * 32. When this expires we retry failed name resolutions.
- *
- * We sleep SLEEPTIME seconds before doing anything, to give the server
- * time to arrange itself.
- */
-#define MINRESOLVE 2
-#define MAXRESOLVE 32
-#define CONFIG_TIME 2
-#define ALARM_TIME 30
-
-#define SLEEPTIME 2
-
-int config_timer = 0;
-int resolve_timer = 0;
-
-int resolve_value; /* next value of resolve timer */
-
-/*
- * Big hack attack
- */
-#define LOCALHOST 0x7f000001 /* 127.0.0.1, in hex, of course */
-#define SKEWTIME 0x08000000 /* 0.03125 seconds as a l_fp fraction */
-
-/*
- * Select time out. Set to 2 seconds. The server is on the local machine,
- * after all.
- */
-#define TIMEOUT_SEC 2
-#define TIMEOUT_USEC 0
-
-
-/*
- * Input processing. The data on each line in the configuration file
- * is supposed to consist of entries in the following order
- */
-#define TOK_HOSTNAME 0
-#define TOK_HMODE 1
-#define TOK_VERSION 2
-#define TOK_MINPOLL 3
-#define TOK_MAXPOLL 4
-#define TOK_FLAGS 5
-#define TOK_TTL 6
-#define TOK_KEYID 7
-#define NUMTOK 8
-
-#define MAXLINESIZE 512
-
-
-/*
- * File descriptor for ntp request code.
- */
-int sockfd = -1;
-
-/*
- * Misc. data from argument processing
- */
-int removefile = 0; /* remove configuration file when done */
-
-U_LONG req_keyid; /* request keyid */
-char *keyfile; /* file where keys are kept */
-char *conffile; /* name of the file with configuration info */
-
-char *progname;
-int debug = 0;
-extern char *Version;
-extern int errno;
-
-static RETSIGTYPE bong P((int));
-static void checkparent P((void));
-static void removeentry P((struct conf_entry *));
-static void addentry P((char *, int, int, int, int, int, int, U_LONG));
-static int findhostaddr P((struct conf_entry *));
-static void openntp P((void));
-static int request P((struct conf_peer *));
-static char * nexttoken P((char **));
-static void readconf P((FILE *, char *));
-static void doconfigure P((int));
-
-/*
- * main - parse arguments and handle options
- */
-void
-main(argc, argv)
- int argc;
- char *argv[];
-{
- int c;
- int errflg = 0;
- char *cp;
- FILE *in;
- extern int ntp_optind;
-
- progname = argv[0];
-
- /*
- * Better get syslog open early since stderr messages are likely
- * ending up in the twilight zone
- */
- cp = strrchr(argv[0], '/');
- if (cp == 0)
- cp = argv[0];
- else
- cp++;
-
-#ifndef LOG_DAEMON
- openlog(cp, LOG_PID);
-#else
-
-#ifndef LOG_NTP
-#define LOG_NTP LOG_DAEMON
-#endif
- openlog(cp, LOG_PID | LOG_NDELAY, LOG_NTP);
-#ifdef DEBUG
- if (debug)
- setlogmask(LOG_UPTO(LOG_DEBUG));
- else
-#endif /* DEBUG */
- setlogmask(LOG_UPTO(LOG_INFO));
-#endif /* LOG_DAEMON */
-
- syslog(LOG_NOTICE, Version);
-
- while ((c = ntp_getopt(argc, argv, "dr")) != EOF)
- switch (c) {
- case 'd':
- ++debug;
- break;
- case 'r':
- ++removefile;
- break;
- default:
- errflg++;
- break;
- }
- if (errflg || (ntp_optind + 3) != argc) {
- (void) fprintf(stderr,
- "usage: %s [-d] [-r] keyid keyfile conffile\n", progname);
- syslog(LOG_ERR, "exiting due to usage error");
- exit(2);
- }
-
- if (!atouint(argv[ntp_optind], &req_keyid)) {
- syslog(LOG_ERR, "undecodeable keyid %s", argv[ntp_optind]);
- exit(1);
- }
-
- keyfile = argv[ntp_optind+1];
- conffile = argv[ntp_optind+2];
-
- /*
- * Make sure we have the key we need
- */
- if (!authreadkeys(keyfile))
- exit(1);
- if (!authhavekey(req_keyid)) {
- syslog(LOG_ERR, "request keyid %lu not found in %s",
- req_keyid, keyfile);
- exit(1);
- }
-
- /*
- * Read the configuration info
- */
- if ((in = fopen(conffile, "r")) == NULL) {
- syslog(LOG_ERR, "can't open configuration file %s: %m",
- conffile);
- exit(1);
- }
- readconf(in, conffile);
- (void) fclose(in);
- if (removefile)
- (void) unlink(conffile);
-
- /*
- * Sleep a little to make sure the server is completely up
- */
- sleep(SLEEPTIME);
-
- /*
- * Make a first cut at resolving the bunch
- */
- doconfigure(1);
- if (confentries == NULL)
- exit(0); /* done that quick */
-
- /*
- * Here we've got some problem children. Set up the timer
- * and wait for it.
- */
- resolve_value = resolve_timer = MINRESOLVE;
- config_timer = CONFIG_TIME;
- (void) signal(SIGALRM, bong);
- alarm(ALARM_TIME);
-
- for (;;) {
- if (confentries == NULL)
- exit(0);
- checkparent();
- if (resolve_timer == 0) {
- if (resolve_value < MAXRESOLVE)
- resolve_value <<= 1;
- resolve_timer = resolve_value;
- config_timer = CONFIG_TIME;
- doconfigure(1);
- continue;
- } else if (config_timer == 0) {
- config_timer = CONFIG_TIME;
- doconfigure(0);
- continue;
- }
- /*
- * There is a race in here. Is okay, though, since
- * all it does is delay things by 30 seconds.
- */
- (void) pause();
- }
-}
-
-
-/*
- * bong - service and reschedule an alarm() interrupt
- */
-static RETSIGTYPE
-bong(sig)
-int sig;
-{
- if (config_timer > 0)
- config_timer--;
- if (resolve_timer > 0)
- resolve_timer--;
- alarm(ALARM_TIME);
-}
-
-
-/*
- * checkparent - see if our parent process is still running
- */
-static void
-checkparent()
-{
- /*
- * If our parent (the server) has died we will have been
- * inherited by init. If so, exit.
- */
- if (getppid() == 1) {
- syslog(LOG_INFO, "parent died before we finished, exiting");
- exit(0);
- }
-}
-
-
-/*
- * removeentry - we are done with an entry, remove it from the list
- */
-static void
-removeentry(entry)
- struct conf_entry *entry;
-{
- register struct conf_entry *ce;
-
- ce = confentries;
- if (ce == entry) {
- confentries = ce->ce_next;
- return;
- }
-
- while (ce != NULL) {
- if (ce->ce_next == entry) {
- ce->ce_next = entry->ce_next;
- return;
- }
- ce = ce->ce_next;
- }
-}
-
-
-/*
- * addentry - add an entry to the configuration list
- */
-static void
-addentry(name, mode, version, minpoll, maxpoll, flags, ttl, keyid)
- char *name;
- int mode;
- int version;
- int minpoll;
- int maxpoll;
- int flags;
- int ttl;
- U_LONG keyid;
-{
- register char *cp;
- register struct conf_entry *ce;
- int len;
-
- len = strlen(name) + 1;
- cp = emalloc((unsigned)len);
- memmove(cp, name, len);
-
- ce = (struct conf_entry *)emalloc(sizeof(struct conf_entry));
- ce->ce_name = cp;
- ce->ce_peeraddr = 0;
- ce->ce_hmode = (u_char)mode;
- ce->ce_version = (u_char)version;
- ce->ce_minpoll = (u_char)minpoll;
- ce->ce_maxpoll = (u_char)maxpoll;
- ce->ce_flags = (u_char)flags;
- ce->ce_ttl = (u_char)ttl;
- ce->ce_keyid = htonl(keyid);
- ce->ce_next = NULL;
-
- if (confentries == NULL) {
- confentries = ce;
- } else {
- register struct conf_entry *cep;
-
- for (cep = confentries; cep->ce_next != NULL;
- cep = cep->ce_next)
- /* nothing */;
- cep->ce_next = ce;
- }
-}
-
-
-/*
- * findhostaddr - resolve a host name into an address
- *
- * The routine sticks the address into the entry's ce_peeraddr if it
- * gets one. It returns 1 for "success" and 0 for an uncorrectable
- * failure. Note that "success" includes try again errors. You can
- * tell that you got a try again since ce_peeraddr will still be zero.
- */
-static int
-findhostaddr(entry)
- struct conf_entry *entry;
-{
- struct hostent *hp;
-
- checkparent(); /* make sure our guy is still running */
-
- hp = gethostbyname(entry->ce_name);
-
- if (hp == NULL) {
-#ifndef NODNS
- /*
- * If the resolver is in use, see if the failure is
- * temporary. If so, return success.
- */
- extern int h_errno;
-
- if (h_errno == TRY_AGAIN)
- return 1;
-#endif
- return (0);
- }
-
- /*
- * Use the first address. We don't have any way to
- * tell preferences and older gethostbyname() implementations
- * only return one.
- */
- memmove((char *)&(entry->ce_peeraddr),
- hp->h_addr,
- sizeof(struct in_addr));
- return (1);
-}
-
-
-/*
- * openntp - open a socket to the ntp server
- */
-static void
-openntp()
-{
- struct sockaddr_in saddr;
-
- if (sockfd >= 0)
- return;
-
- sockfd = socket(AF_INET, SOCK_DGRAM, 0);
- if (sockfd == -1) {
- syslog(LOG_ERR, "socket() failed: %m");
- exit(1);
- }
-
- memset((char *)&saddr, 0, sizeof(saddr));
- saddr.sin_family = AF_INET;
- saddr.sin_port = htons(NTP_PORT); /* trash */
- saddr.sin_addr.s_addr = htonl(LOCALHOST); /* garbage */
-
-
- /*
- * Make the socket non-blocking. We'll wait with select()
- */
-#if defined(O_NONBLOCK)
- if (fcntl(sockfd, F_SETFL, O_NONBLOCK) == -1) {
- syslog(LOG_ERR, "fcntl(O_NONBLOCK) failed: %m");
- exit(1);
- }
-#else
-#if defined(FNDELAY)
- if (fcntl(sockfd, F_SETFL, FNDELAY) == -1) {
- syslog(LOG_ERR, "fcntl(FNDELAY) failed: %m");
- exit(1);
- }
-#else
-NEED NON BLOCKING IO
-#endif
-#endif
-
- if (connect(sockfd, (struct sockaddr *)&saddr, sizeof(saddr)) == -1) {
- syslog(LOG_ERR, "connect() failed: %m");
- exit(1);
- }
-}
-
-
-/*
- * request - send a configuration request to the server, wait for a response
- */
-static int
-request(conf)
- struct conf_peer *conf;
-{
- fd_set fdset;
- struct timeval tvout;
- struct req_pkt reqpkt;
- l_fp ts;
- int n;
-
- checkparent(); /* make sure our guy is still running */
-
- if (sockfd < 0)
- openntp();
-
- /*
- * Try to clear out any previously received traffic so it
- * doesn't fool us. Note the socket is nonblocking.
- */
- while (read(sockfd, (char *)&reqpkt, REQ_LEN_MAC) > 0)
- /* nothing */;
-
- /*
- * Make up a request packet with the configuration info
- */
- memset((char *)&reqpkt, 0, sizeof(reqpkt));
-
- reqpkt.rm_vn_mode = RM_VN_MODE(0, 0);
- reqpkt.auth_seq = AUTH_SEQ(1, 0); /* authenticated, no seq */
- reqpkt.implementation = IMPL_XNTPD; /* local implementation */
- reqpkt.request = REQ_CONFIG; /* configure a new peer */
- reqpkt.err_nitems = ERR_NITEMS(0, 1); /* one item */
- reqpkt.mbz_itemsize = MBZ_ITEMSIZE(sizeof(struct conf_peer));
- memmove(reqpkt.data, (char *)conf, sizeof(struct conf_peer));
- reqpkt.keyid = htonl(req_keyid);
-
- auth1crypt(req_keyid, (U_LONG *)&reqpkt, REQ_LEN_NOMAC);
- gettstamp(&ts);
- M_ADDUF(ts.l_ui, ts.l_uf, SKEWTIME);
- HTONL_FP(&ts, &reqpkt.tstamp);
- n = auth2crypt(req_keyid, (U_LONG *)&reqpkt, REQ_LEN_NOMAC);
-
- /*
- * Done. Send it.
- */
- n = write(sockfd, (char *)&reqpkt, REQ_LEN_NOMAC + n);
- if (n < 0) {
- syslog(LOG_ERR, "send to NTP server failed: %m");
- return 0; /* maybe should exit */
- }
-
- /*
- * Wait for a response. A weakness of the mode 7 protocol used
- * is that there is no way to associate a response with a
- * particular request, i.e. the response to this configuration
- * request is indistinguishable from that to any other. I should
- * fix this some day. In any event, the time out is fairly
- * pessimistic to make sure that if an answer is coming back
- * at all, we get it.
- */
- for (;;) {
- FD_ZERO(&fdset);
- FD_SET(sockfd, &fdset);
- tvout.tv_sec = TIMEOUT_SEC;
- tvout.tv_usec = TIMEOUT_USEC;
-
- n = select(sockfd + 1, &fdset, (fd_set *)0,
- (fd_set *)0, &tvout);
-
- if (n <= 0) {
- if (n < 0)
- syslog(LOG_ERR, "select() fails: %m");
- return 0;
- }
-
- n = read(sockfd, (char *)&reqpkt, REQ_LEN_MAC);
- if (n <= 0) {
- if (n < 0) {
- syslog(LOG_ERR, "read() fails: %m");
- return 0;
- }
- continue;
- }
-
- /*
- * Got one. Check through to make sure it is what
- * we expect.
- */
- if (n < RESP_HEADER_SIZE) {
- syslog(LOG_ERR, "received runt response (%d octets)",
- n);
- continue;
- }
-
- if (!ISRESPONSE(reqpkt.rm_vn_mode)) {
-#ifdef DEBUG
- if (debug > 1)
- printf("received non-response packet\n");
-#endif
- continue;
- }
-
- if (ISMORE(reqpkt.rm_vn_mode)) {
-#ifdef DEBUG
- if (debug > 1)
- printf("received fragmented packet\n");
-#endif
- continue;
- }
-
- if (INFO_VERSION(reqpkt.rm_vn_mode) != NTP_VERSION
- || INFO_MODE(reqpkt.rm_vn_mode) != MODE_PRIVATE) {
-#ifdef DEBUG
- if (debug > 1)
- printf("version (%d) or mode (%d) incorrect\n",
- INFO_VERSION(reqpkt.rm_vn_mode),
- INFO_MODE(reqpkt.rm_vn_mode));
-#endif
- continue;
- }
-
- if (INFO_SEQ(reqpkt.auth_seq) != 0) {
-#ifdef DEBUG
- if (debug > 1)
- printf("nonzero sequence number (%d)\n",
- INFO_SEQ(reqpkt.auth_seq));
-#endif
- continue;
- }
-
- if (reqpkt.implementation != IMPL_XNTPD ||
- reqpkt.request != REQ_CONFIG) {
-#ifdef DEBUG
- if (debug > 1)
- printf(
- "implementation (%d) or request (%d) incorrect\n",
- reqpkt.implementation, reqpkt.request);
-#endif
- continue;
- }
-
- if (INFO_NITEMS(reqpkt.err_nitems) != 0 ||
- INFO_MBZ(reqpkt.mbz_itemsize) != 0 ||
- INFO_ITEMSIZE(reqpkt.mbz_itemsize != 0)) {
-#ifdef DEBUG
- if (debug > 1)
- printf(
- "nitems (%d) mbz (%d) or itemsize (%d) nonzero\n",
- INFO_NITEMS(reqpkt.err_nitems),
- INFO_MBZ(reqpkt.mbz_itemsize),
- INFO_ITEMSIZE(reqpkt.mbz_itemsize));
-#endif
- continue;
- }
-
- n = INFO_ERR(reqpkt.err_nitems);
- switch (n) {
- case INFO_OKAY:
- /* success */
- return 1;
-
- case INFO_ERR_IMPL:
- syslog(LOG_ERR,
- "server reports implementation mismatch!!");
- return 0;
-
- case INFO_ERR_REQ:
- syslog(LOG_ERR,
- "server claims configuration request is unknown");
- return 0;
-
- case INFO_ERR_FMT:
- syslog(LOG_ERR,
- "server indicates a format error occured(!!)");
- return 0;
-
- case INFO_ERR_NODATA:
- syslog(LOG_ERR,
- "server indicates no data available (shouldn't happen)");
- return 0;
-
- case INFO_ERR_AUTH:
- syslog(LOG_ERR,
- "server returns a permission denied error");
- return 0;
-
- default:
- syslog(LOG_ERR,
- "server returns unknown error code %d", n);
- return 0;
- }
- }
-}
-
-
-/*
- * nexttoken - return the next token from a line
- */
-static char *
-nexttoken(lptr)
- char **lptr;
-{
- register char *cp;
- register char *tstart;
-
- cp = *lptr;
-
- /*
- * Skip leading white space
- */
- while (*cp == ' ' || *cp == '\t')
- cp++;
-
- /*
- * If this is the end of the line, return nothing.
- */
- if (*cp == '\n' || *cp == '\0') {
- *lptr = cp;
- return NULL;
- }
-
- /*
- * Must be the start of a token. Record the pointer and look
- * for the end.
- */
- tstart = cp++;
- while (*cp != ' ' && *cp != '\t' && *cp != '\n' && *cp != '\0')
- cp++;
-
- /*
- * Terminate the token with a \0. If this isn't the end of the
- * line, space to the next character.
- */
- if (*cp == '\n' || *cp == '\0')
- *cp = '\0';
- else
- *cp++ = '\0';
-
- *lptr = cp;
- return tstart;
-}
-
-
-/*
- * readconf - read the configuration information out of the file we
- * were passed. Note that since the file is supposed to be
- * machine generated, we bail out at the first sign of trouble.
- */
-static void
-readconf(fp, name)
- FILE *fp;
- char *name;
-{
- register int i;
- char *token[NUMTOK];
- U_LONG intval[NUMTOK];
- int flags;
- char buf[MAXLINESIZE];
- char *bp;
-
- while (fgets(buf, MAXLINESIZE, fp) != NULL) {
-
- bp = buf;
- for (i = 0; i < NUMTOK; i++) {
- if ((token[i] = nexttoken(&bp)) == NULL) {
- syslog(LOG_ERR,
- "tokenizing error in file `%s', quitting",
- name);
- exit(1);
- }
- }
-
- for (i = 1; i < NUMTOK; i++) {
- if (!atouint(token[i], &intval[i])) {
- syslog(LOG_ERR,
- "format error for integer token `%s', file `%s', quitting",
- token[i], name);
- exit(1);
- }
- }
-
- if (intval[TOK_HMODE] != MODE_ACTIVE &&
- intval[TOK_HMODE] != MODE_CLIENT &&
- intval[TOK_HMODE] != MODE_BROADCAST) {
- syslog(LOG_ERR, "invalid mode (%d) in file %s",
- intval[TOK_HMODE], name);
- exit(1);
- }
-
- if (intval[TOK_VERSION] > NTP_VERSION ||
- intval[TOK_VERSION] < NTP_OLDVERSION) {
- syslog(LOG_ERR, "invalid version (%d) in file %s",
- intval[TOK_VERSION], name);
- exit(1);
- }
-
- if (intval[TOK_MINPOLL] < NTP_MINPOLL ||
- intval[TOK_MINPOLL] > NTP_MAXPOLL) {
- syslog(LOG_ERR, "invalid MINPOLL value (%d) in file %s",
- intval[TOK_MINPOLL], name);
- exit(1);
- }
-
- if (intval[TOK_MAXPOLL] < NTP_MINPOLL ||
- intval[TOK_MAXPOLL] > NTP_MAXPOLL) {
- syslog(LOG_ERR, "invalid MAXPOLL value (%d) in file %s",
- intval[TOK_MAXPOLL], name);
- exit(1);
- }
-
- if ((intval[TOK_FLAGS] & ~(FLAG_AUTHENABLE|FLAG_PREFER))
- != 0) {
- syslog(LOG_ERR, "invalid flags (%d) in file %s",
- intval[TOK_FLAGS], name);
- exit(1);
- }
-
- flags = 0;
- if (intval[TOK_FLAGS] & FLAG_AUTHENABLE)
- flags |= CONF_FLAG_AUTHENABLE;
- if (intval[TOK_FLAGS] & FLAG_PREFER)
- flags |= CONF_FLAG_PREFER;
-
- /*
- * This is as good as we can check it. Add it in.
- */
- addentry(token[TOK_HOSTNAME], (int)intval[TOK_HMODE],
- (int)intval[TOK_VERSION], (int)intval[TOK_MINPOLL],
- (int)intval[TOK_MAXPOLL], flags, (int)intval[TOK_TTL],
- intval[TOK_KEYID]);
- }
-}
-
-
-/*
- * doconfigure - attempt to resolve names and configure the server
- */
-static void
-doconfigure(dores)
- int dores;
-{
- register struct conf_entry *ce;
- register struct conf_entry *ceremove;
-
- ce = confentries;
- while (ce != NULL) {
- if (dores && ce->ce_peeraddr == 0) {
- if (!findhostaddr(ce)) {
- syslog(LOG_ERR,
- "couldn't resolve `%s', giving up on it",
- ce->ce_name);
- ceremove = ce;
- ce = ceremove->ce_next;
- removeentry(ceremove);
- continue;
- }
- }
-
- if (ce->ce_peeraddr != 0) {
- if (request(&ce->ce_config)) {
- ceremove = ce;
- ce = ceremove->ce_next;
- removeentry(ceremove);
- continue;
- }
- }
- ce = ce->ce_next;
- }
-}