summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/patches/patch.35
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/xntpd/patches/patch.35')
-rw-r--r--usr.sbin/xntpd/patches/patch.35914
1 files changed, 914 insertions, 0 deletions
diff --git a/usr.sbin/xntpd/patches/patch.35 b/usr.sbin/xntpd/patches/patch.35
new file mode 100644
index 0000000..e6b1ea4
--- /dev/null
+++ b/usr.sbin/xntpd/patches/patch.35
@@ -0,0 +1,914 @@
+
+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]
+
OpenPOWER on IntegriCloud