diff options
author | wollman <wollman@FreeBSD.org> | 1994-04-03 19:50:51 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-04-03 19:50:51 +0000 |
commit | d9768fd9dbb9ffb082896c373f5e78f968079f68 (patch) | |
tree | 0d7894f93da990a4f019d7653a8b2ed558ab9850 /usr.sbin/xntpd/lib | |
parent | 394ee3bae890775188c4812249fc996cb7cc0abe (diff) | |
download | FreeBSD-src-d9768fd9dbb9ffb082896c373f5e78f968079f68.zip FreeBSD-src-d9768fd9dbb9ffb082896c373f5e78f968079f68.tar.gz |
xntp 3.3p from Delaware
Diffstat (limited to 'usr.sbin/xntpd/lib')
-rw-r--r-- | usr.sbin/xntpd/lib/Makefile.tmpl | 6 | ||||
-rw-r--r-- | usr.sbin/xntpd/lib/clocktypes.c | 2 | ||||
-rw-r--r-- | usr.sbin/xntpd/lib/netof.c | 25 | ||||
-rw-r--r-- | usr.sbin/xntpd/lib/systime.c | 3 |
4 files changed, 31 insertions, 5 deletions
diff --git a/usr.sbin/xntpd/lib/Makefile.tmpl b/usr.sbin/xntpd/lib/Makefile.tmpl index 697edcf..997aa8c 100644 --- a/usr.sbin/xntpd/lib/Makefile.tmpl +++ b/usr.sbin/xntpd/lib/Makefile.tmpl @@ -31,7 +31,7 @@ SOURCE= atoint.c atolfp.c atouint.c auth12crypt.c authdecrypt.c authdes.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 + 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,12 +44,12 @@ OBJS= atoint.o atolfp.o atouint.o auth12crypt.o authdecrypt.o authdes.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 + findconfig.o netof.o $(LIBNAME).a: $(OBJS) ar rv $@ $? -rm -f $? - @if ( hp-pa || hp-mc680x0 ) > /dev/null 2>&1; then \ + @if ( ../scripts/hpadjtime.sh ) > /dev/null 2>&1; then \ ( cd ../adjtime && $(MAKE) $(MFLAGS) MFLAGS="$(MFLAGS)" MAKE="$(MAKE)" ) && ar rv $@ ../adjtime/adjtime.o; \ else \ :; \ diff --git a/usr.sbin/xntpd/lib/clocktypes.c b/usr.sbin/xntpd/lib/clocktypes.c index 2701e3f..816ef07 100644 --- a/usr.sbin/xntpd/lib/clocktypes.c +++ b/usr.sbin/xntpd/lib/clocktypes.c @@ -11,7 +11,7 @@ struct clktype clktypes[] = { { REFCLK_NONE, "unspecified type (0)", "UNKNOWN" }, { REFCLK_LOCALCLOCK, "local clock synchronization (1)", "LOCAL" }, - { REFCLK_WWV_HEATH, "Heathkit WWV clock (2)", "WWV_HEATH" }, + { REFCLK_GPS_TRAK, "TRAK 8810 GPS Receiver (2)", "GPS_TRAK" }, { REFCLK_WWV_PST, "Precision Standard Time WWV clock (3)", "WWV_PST" }, { REFCLK_WWVB_SPECTRACOM, "Spectracom WWVB clock (4)", "WWVB_SPEC" }, { REFCLK_GOES_TRUETIME, "True Time GPS/GOES clock (5)", "GPS_GOES_TRUE" }, diff --git a/usr.sbin/xntpd/lib/netof.c b/usr.sbin/xntpd/lib/netof.c new file mode 100644 index 0000000..286a584 --- /dev/null +++ b/usr.sbin/xntpd/lib/netof.c @@ -0,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 --git a/usr.sbin/xntpd/lib/systime.c b/usr.sbin/xntpd/lib/systime.c index ea15734..1d6c59a 100644 --- a/usr.sbin/xntpd/lib/systime.c +++ b/usr.sbin/xntpd/lib/systime.c @@ -47,12 +47,13 @@ extern int debug; * 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 */ - LONG sys_clock; l_fp sys_clock_offset; /* correction for current system time */ /* |