summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>1999-12-13 14:09:56 +0000
committerroberto <roberto@FreeBSD.org>1999-12-13 14:09:56 +0000
commit2c4532a5b204bf46ef9bed83b39fad4796af075f (patch)
tree24b9c349b4d68d37c1d8135507f472611002728c
parent51419295b1881d06d16787b11610eb01251cae2a (diff)
downloadFreeBSD-src-2c4532a5b204bf46ef9bed83b39fad4796af075f.zip
FreeBSD-src-2c4532a5b204bf46ef9bed83b39fad4796af075f.tar.gz
Please welcome the brand new ntp4 daemon & utilities in the FreeBSD tree.
This is the second part of the commit (the third -- link in usr.sbin/Makefile) will be done after a more complete review by phk & obrien. NOTE: the number of drivers included in the default configuration is very minimal, mainly local clocks and the one I use RAWDCF. Anyone wanting to have a more complete version will find recompilation very easy. It builds and runs on both alpha & i386. It also does survive "make world". Reviewed by: phk, obrien (partly)
-rw-r--r--usr.sbin/ntp/Makefile9
-rw-r--r--usr.sbin/ntp/Makefile.inc25
-rw-r--r--usr.sbin/ntp/config.h897
-rw-r--r--usr.sbin/ntp/libntp/Makefile35
-rw-r--r--usr.sbin/ntp/libparse/Makefile24
-rw-r--r--usr.sbin/ntp/ntpd/Makefile37
-rw-r--r--usr.sbin/ntp/ntpdate/Makefile21
-rw-r--r--usr.sbin/ntp/ntpdc/Makefile21
-rw-r--r--usr.sbin/ntp/ntpq/Makefile22
-rw-r--r--usr.sbin/ntp/ntptime/Makefile17
-rw-r--r--usr.sbin/ntp/ntptimeset/Makefile21
-rw-r--r--usr.sbin/ntp/ntptrace/Makefile21
-rwxr-xr-xusr.sbin/ntp/scripts/mkver32
-rwxr-xr-xusr.sbin/ntp/scripts/ntpver8
14 files changed, 1190 insertions, 0 deletions
diff --git a/usr.sbin/ntp/Makefile b/usr.sbin/ntp/Makefile
new file mode 100644
index 0000000..827385b
--- /dev/null
+++ b/usr.sbin/ntp/Makefile
@@ -0,0 +1,9 @@
+#
+# Makefile for ntpd.
+# $FreeBSD$
+#
+MAINTAINER= roberto
+
+SUBDIR= libntp libparse ntpd ntpdc ntpq ntpdate ntptrace ntptimeset ntptime
+
+.include <bsd.subdir.mk>
diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc
new file mode 100644
index 0000000..d815266
--- /dev/null
+++ b/usr.sbin/ntp/Makefile.inc
@@ -0,0 +1,25 @@
+# $FreeBSD$
+#
+MAINTAINER= roberto
+
+DEFS_LOCAL= -DPARSE -DHAVE_CONFIG_H
+NTPDEFS= -DSYS_FREEBSD
+CLOCKDEFS=
+# -DLOCAL_CLOCK -DPST -DWWVB -DAS2201 -DGOES -DGPSTM -DOMEGA \
+# -DLEITCH -DTRAK -DACTS -DATOM -DDATUM -DHEATH -DMSFEES \
+# -DMX4200 -DNMEA -DBOEDER
+CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${CLOCKDEFS}
+
+.if exists(${.OBJDIR}/../libparse)
+LIBPARSE= ${.OBJDIR}/../libparse/libparse.a
+.else
+LIBPARSE= ${.CURDIR}/../libparse/libparse.a
+.endif
+
+.if exists(${.OBJDIR}/../libntp)
+LIBNTP= ${.OBJDIR}/../libntp/libntp.a
+.else
+LIBNTP= ${.CURDIR}/../libntp/libntp.a
+.endif
+
+.include "../Makefile.inc"
diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h
new file mode 100644
index 0000000..e37dd3e
--- /dev/null
+++ b/usr.sbin/ntp/config.h
@@ -0,0 +1,897 @@
+/* config.h. Generated automatically by configure. */
+/* config.h.in. Generated automatically from configure.in by autoheader. */
+/* $FreeBSD$ */
+
+/* Define if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#ifndef _ALL_SOURCE
+/* #undef _ALL_SOURCE */
+#endif
+
+/* Define if type char is unsigned and you are not using gcc. */
+#ifndef __CHAR_UNSIGNED__
+/* #undef __CHAR_UNSIGNED__ */
+#endif
+
+/* Define to empty if the keyword does not work. */
+/* #undef const */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef gid_t */
+
+/* Define as __inline if that's what the C compiler calls it. */
+/* #undef inline */
+
+/* Define if on MINIX. */
+/* #undef _MINIX */
+
+/* Define if your struct nlist has an n_un member. */
+/* #undef NLIST_NAME_UNION */
+
+/* Define if you have <nlist.h>. */
+#define NLIST_STRUCT 1
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+/* #undef off_t */
+
+/* Define if the system does not provide POSIX.1 features except
+ with this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define if you need to in order for stat and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Define as the return type of signal handlers (int or void). */
+#define RETSIGTYPE void
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+/* #undef size_t */
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define if your <sys/time.h> declares struct tm. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+/* #undef uid_t */
+
+/* Define if your processor stores words with the most significant
+ byte first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* debugging code */
+#define DEBUG 1
+
+/* Minutes per DST adjustment */
+#define DSTMINUTES 60
+
+/* MD5 authentication */
+#define MD5 1
+
+/* DES authentication (COCOM only) */
+/* #undef DES */
+
+/* time_t */
+/* #undef time_t */
+
+/* reference clock interface */
+#define REFCLOCK 1
+
+/* Audio CHU? */
+/* #undef AUDIO_CHU */
+
+/* ACTS modem service */
+/* #undef CLOCK_ACTS */
+
+/* Arbiter 1088A/B GPS receiver */
+/* #undef CLOCK_ARBITER */
+
+/* DHD19970505: ARCRON support. */
+/* #undef CLOCK_ARCRON_MSF */
+
+/* Austron 2200A/2201A GPS receiver */
+/* #undef CLOCK_AS2201 */
+
+/* PPS interface */
+#define CLOCK_ATOM 1
+
+/* PPS auxiliary interface for ATOM */
+/* #undef PPS_SAMPLE */
+
+/* Datum/Bancomm bc635/VME interface */
+/* #undef CLOCK_BANC */
+
+/* ELV/DCF7000 clock */
+/* #undef CLOCK_DCF7000 */
+
+/* HOPF 6021 clock */
+/* #undef CLOCK_HOPF6021 */
+
+/* Meinberg clocks */
+/* #undef CLOCK_MEINBERG */
+
+/* DCF77 raw time code */
+#define CLOCK_RAWDCF 1
+
+/* RCC 8000 clock */
+/* #undef CLOCK_RCC8000 */
+
+/* Schmid DCF77 clock */
+/* #undef CLOCK_SCHMID */
+
+/* Trimble GPS receiver/TAIP protocol */
+/* #undef CLOCK_TRIMTAIP */
+
+/* Trimble GPS receiver/TSIP protocol */
+/* #undef CLOCK_TRIMTSIP */
+
+/* WHARTON 400A Series protocol */
+/* #undef CLOCK_WHARTON_400A */
+
+/* VARITEXT protocol */
+/* #undef CLOCK_VARITEXT */
+
+/* Diems Computime Radio Clock */
+/* #undef CLOCK_COMPUTIME */
+
+/* Datum Programmable Time System */
+/* #undef CLOCK_DATUM */
+
+/* TrueTime GPS receiver/VME interface */
+/* #undef CLOCK_GPSVME */
+
+/* Heath GC-1000 WWV/WWVH receiver */
+/* #undef CLOCK_HEATH */
+
+/* HP 58503A GPS receiver */
+/* #undef CLOCK_HPGPS */
+
+/* Sun IRIG audio decoder */
+/* #undef CLOCK_IRIG */
+
+/* Rockwell Jupiter GPS clock */
+/* #undef CLOCK_JUPITER */
+
+/* Leitch CSD 5300 Master Clock System Driver */
+/* #undef CLOCK_LEITCH */
+
+/* local clock reference */
+#define CLOCK_LOCAL 1
+
+/* EES M201 MSF receiver */
+/* #undef CLOCK_MSFEES */
+
+/* Magnavox MX4200 GPS receiver */
+/* #undef CLOCK_MX4200 */
+
+/* NMEA GPS receiver */
+/* #undef CLOCK_NMEA */
+
+/* Palisade clock */
+/* #undef CLOCK_PALISADE */
+
+/* PARSE driver interface */
+#define CLOCK_PARSE 1
+
+/* PARSE kernel PLL PPS support */
+#define PPS_SYNC 1
+
+/* PCL 720 clock support */
+/* #undef CLOCK_PPS720 */
+
+/* PST/Traconex 1020 WWV/WWVH receiver */
+/* #undef CLOCK_PST */
+
+/* PTB modem service */
+/* #undef CLOCK_PTBACTS */
+
+/* clock thru shared memory */
+/* #undef CLOCK_SHM */
+
+/* Motorola UT Oncore GPS */
+/* #undef CLOCK_ONCORE */
+
+/* KSI/Odetics TPRO/S GPS receiver/IRIG interface */
+/* #undef CLOCK_TPRO */
+
+/* TRAK 8810 GPS receiver */
+/* #undef CLOCK_TRAK */
+
+/* Kinemetrics/TrueTime receivers */
+/* #undef CLOCK_TRUETIME */
+
+/* USNO modem service */
+/* #undef CLOCK_USNO */
+
+/* Spectracom 8170/Netclock/2 WWVB receiver */
+/* #undef CLOCK_WWVB */
+
+/* Ultralink M320 WWVB receiver */
+/* #undef CLOCK_ULINK */
+
+/* Chronolog K-series WWVB receiver */
+/* #undef CLOCK_CHRONOLOG */
+
+/* Dumb generic hh:mm:ss local clock */
+#define CLOCK_DUMBCLOCK 1
+
+/* define if we need to declare int errno; */
+/* #undef DECL_ERRNO */
+
+/* define if we may declare int h_errno; */
+#define DECL_H_ERRNO 1
+
+/* define if it's OK to declare char *sys_errlist[]; */
+/* #undef CHAR_SYS_ERRLIST */
+
+/* define if it's OK to declare int syscall P((int, struct timeval *, struct timeval *)); */
+#define DECL_SYSCALL 1
+
+/* define if we have syscall is buggy (Solaris 2.4) */
+/* #undef SYSCALL_BUG */
+
+/* Do we need extra room for SO_RCVBUF? (HPUX <8) */
+/* #undef NEED_RCVBUF_SLOP */
+
+/* Should we open the broadcast socket? */
+#define OPEN_BCAST_SOCKET 1
+
+/* Do we want the HPUX FindConfig()? */
+/* #undef NEED_HPUX_FINDCONFIG */
+
+/* canonical system (cpu-vendor-os) string */
+#ifdef __alpha__
+#define STR_SYSTEM "alpha-unknown-freebsd"
+#else
+#define STR_SYSTEM "i386-unknown-freebsd"
+#endif
+
+/* define if NetInfo support is available */
+/* #undef HAVE_NETINFO */
+
+/* define if [gs]ettimeofday() only takes 1 argument */
+/* #undef SYSV_TIMEOFDAY */
+
+/* define if struct sockaddr has sa_len */
+#define HAVE_SA_LEN_IN_STRUCT_SOCKADDR 1
+
+/* define if struct clockinfo has hz */
+#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1
+
+/* define if struct sigaction has sa_sigaction */
+#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1
+
+/* define if struct clockinfo has tickadj */
+#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1
+
+/* define if struct ntptimeval uses time.tv_nsec instead of time.tv_usec */
+#define HAVE_TV_NSEC_IN_NTPTIMEVAL 1
+
+/* Does a system header defind struct ppsclockev? */
+/* #undef HAVE_STRUCT_PPSCLOCKEV */
+
+/* define if function prototypes are OK */
+#define HAVE_PROTOTYPES 1
+
+/* define if setpgrp takes 0 arguments */
+/* #undef HAVE_SETPGRP_0 */
+
+/* hardwire a value for tick? */
+#define PRESET_TICK 1000000L/hz
+
+/* hardwire a value for tickadj? */
+#define PRESET_TICKADJ 500/hz
+
+/* is adjtime() accurate? */
+/* #undef ADJTIME_IS_ACCURATE */
+
+/* should we NOT read /dev/kmem? */
+/* #undef NOKMEM */
+
+/* use UDP Wildcard Delivery? */
+#define UDP_WILDCARD_DELIVERY 1
+
+/* always slew the clock? */
+/* #undef SLEWALWAYS */
+
+/* step, then slew the clock? */
+/* #undef STEP_SLEW */
+
+/* force ntpdate to step the clock if !defined(STEP_SLEW) ? */
+/* #undef FORCE_NTPDATE_STEP */
+
+/* synch TODR hourly? */
+/* #undef DOSYNCTODR */
+
+/* do we set process groups with -pid? */
+/* #undef UDP_BACKWARDS_SETOWN */
+
+/* must we have a CTTY for fsetown? */
+#define USE_FSETOWNCTTY 1
+
+/* can we use SIGIO for tcp and udp IO? */
+/* #undef HAVE_SIGNALED_IO */
+
+/* can we use SIGPOLL for UDP? */
+/* #undef USE_UDP_SIGPOLL */
+
+/* can we use SIGPOLL for tty IO? */
+/* #undef USE_TTY_SIGPOLL */
+
+/* do we want the CHU driver? */
+#define CLOCK_CHU 1
+
+/* do we have the ppsclock streams module? */
+/* #undef PPS */
+
+/* do we have the tty_clk line discipline/streams module? */
+/* #undef TTYCLK */
+
+/* does the kernel support precision time discipline? */
+#define KERNEL_PLL 1
+
+/* does the kernel support multicasting IP? */
+#define MCAST 1
+
+/* do we have ntp_{adj,get}time in libc? */
+#define NTP_SYSCALLS_LIBC 1
+
+/* do we have ntp_{adj,get}time in the kernel? */
+/* #undef NTP_SYSCALLS_STD */
+
+/* do we have STREAMS/TLI? (Can we replace this with HAVE_SYS_STROPTS_H? */
+/* #undef STREAMS_TLI */
+
+/* do we need an s_char typedef? */
+#define NEED_S_CHAR_TYPEDEF 1
+
+/* does SIOCGIFCONF return size in the buffer? */
+/* #undef SIZE_RETURNED_IN_BUFFER */
+
+/* what is the name of TICK in the kernel? */
+#define K_TICK_NAME "_tick"
+
+/* Is K_TICK_NAME (nsec_per_tick, for example) in nanoseconds? */
+/* #undef TICK_NANO */
+
+/* what is the name of TICKADJ in the kernel? */
+#define K_TICKADJ_NAME "_tickadj"
+
+/* Is K_TICKADJ_NAME (hrestime_adj, for example) in nanoseconds? */
+/* #undef TICKADJ_NANO */
+
+/* what is (probably) the name of DOSYNCTODR in the kernel? */
+#define K_DOSYNCTODR_NAME "_dosynctodr"
+
+/* what is (probably) the name of NOPRINTF in the kernel? */
+#define K_NOPRINTF_NAME "_noprintf"
+
+/* do we need HPUX adjtime() library support? */
+/* #undef NEED_HPUX_ADJTIME */
+
+/* Might nlist() values require an extra level of indirection (AIX)? */
+/* #undef NLIST_EXTRA_INDIRECTION */
+
+/* Should we recommend a minimum value for tickadj? */
+/* #undef MIN_REC_TICKADJ */
+
+/* Is there a problem using PARENB and IGNPAR (IRIX)? */
+#define NO_PARENB_IGNPAR 1
+
+/* Should we not IGNPAR (Linux)? */
+/* #undef RAWDCF_NO_IGNPAR */
+
+/* Does the compiler like "volatile"? */
+/* #undef volatile */
+
+/* Does qsort expect to work on "void *" stuff? */
+#define QSORT_USES_VOID_P 1
+
+/* What is the fallback value for HZ? */
+#define DEFAULT_HZ 100
+
+/* Do we need to override the system's idea of HZ? */
+#define OVERRIDE_HZ 1
+
+/* Do we want the SCO clock hacks? */
+/* #undef SCO5_CLOCK */
+
+/* Do we want the ReliantUNIX clock hacks? */
+/* #undef RELIANTUNIX_CLOCK */
+
+/* Does the kernel have an FLL bug? */
+/* #undef KERNEL_FLL_BUG */
+
+/* Define if you have the TIOCGPPSEV ioctl (Solaris) */
+/* #undef HAVE_TIOCGPPSEV */
+
+/* Define if you have the TIOCSPPS ioctl (Solaris) */
+/* #undef HAVE_TIOCSPPS */
+
+/* Define if you have the CIOGETEV ioctl (SunOS, Linux) */
+/* #undef HAVE_CIOGETEV */
+
+/* Define if you have the TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, and ASYNC_PPS_CD_NEG ioctls (linux) */
+/* #undef HAVE_TIO_SERIAL_STUFF */
+
+/* Define if you use struct timespec rather than struct timeval (time in ns rather than us) */
+#define HAVE_TIMESPEC 1
+
+/* Define if you have the interface in the Draft RFC */
+#define HAVE_PPSAPI 1
+
+/* Do we need to #define _SVID3 when we #include <termios.h>? */
+/* #undef TERMIOS_NEEDS__SVID3 */
+
+/* adjtime()? */
+/* #undef DECL_ADJTIME_0 */
+
+/* bcopy()? */
+/* #undef DECL_BCOPY_0 */
+
+/* bzero()? */
+/* #undef DECL_BZERO_0 */
+
+/* cfset[io]speed()? */
+/* #undef DECL_CFSETISPEED_0 */
+
+/* ioctl()? */
+/* #undef DECL_IOCTL_0 */
+
+/* IPC? (bind, connect, recvfrom, sendto, setsockopt, socket) */
+/* #undef DECL_IPC_0 */
+
+/* memmove()? */
+/* #undef DECL_MEMMOVE_0 */
+
+/* mkstemp()? */
+/* #undef DECL_MKSTEMP_0 */
+
+/* mktemp()? */
+/* #undef DECL_MKTEMP_0 */
+
+/* mrand48()? */
+/* #undef DECL_MRAND48_0 */
+
+/* nlist()? */
+/* #undef DECL_NLIST_0 */
+
+/* plock()? */
+/* #undef DECL_PLOCK_0 */
+
+/* rename()? */
+/* #undef DECL_RENAME_0 */
+
+/* select()? */
+/* #undef DECL_SELECT_0 */
+
+/* setitimer()? */
+/* #undef DECL_SETITIMER_0 */
+
+/* setpriority()? */
+/* #undef DECL_SETPRIORITY_0 */
+/* #undef DECL_SETPRIORITY_1 */
+
+/* sigvec()? */
+/* #undef DECL_SIGVEC_0 */
+
+/* srand48()? */
+/* #undef DECL_SRAND48_0 */
+
+/* stdio stuff? */
+/* #undef DECL_STDIO_0 */
+
+/* stime()? */
+/* #undef DECL_STIME_0 */
+
+/* strtol()? */
+/* #undef DECL_STRTOL_0 */
+
+/* syslog() stuff? */
+/* #undef DECL_SYSLOG_0 */
+
+/* time()? */
+/* #undef DECL_TIME_0 */
+
+/* [gs]ettimeofday()? */
+/* #undef DECL_TIMEOFDAY_0 */
+
+/* tolower()? */
+/* #undef DECL_TOLOWER_0 */
+
+/* toupper()? */
+/* #undef DECL_TOUPPER_0 */
+
+/* The number of bytes in a int. */
+#define SIZEOF_INT 4
+
+/* The number of bytes in a long. */
+#ifdef __alpha__
+#define SIZEOF_LONG 8
+#else
+#define SIZEOF_LONG 4
+#endif
+
+/* The number of bytes in a signed char. */
+#define SIZEOF_SIGNED_CHAR 1
+
+/* Define if you have the K_open function. */
+/* #undef HAVE_K_OPEN */
+
+/* Define if you have the __adjtimex function. */
+/* #undef HAVE___ADJTIMEX */
+
+/* Define if you have the __ntp_gettime function. */
+/* #undef HAVE___NTP_GETTIME */
+
+/* Define if you have the clock_settime function. */
+#define HAVE_CLOCK_SETTIME 1
+
+/* Define if you have the daemon function. */
+#define HAVE_DAEMON 1
+
+/* Define if you have the getbootfile function. */
+#define HAVE_GETBOOTFILE 1
+
+/* Define if you have the getdtablesize function. */
+#define HAVE_GETDTABLESIZE 1
+
+/* Define if you have the getrusage function. */
+#define HAVE_GETRUSAGE 1
+
+/* Define if you have the gettimeofday function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define if you have the getuid function. */
+#define HAVE_GETUID 1
+
+/* Define if you have the kvm_open function. */
+#define HAVE_KVM_OPEN 1
+
+/* Define if you have the memcpy function. */
+#define HAVE_MEMCPY 1
+
+/* Define if you have the memlk function. */
+/* #undef HAVE_MEMLK */
+
+/* Define if you have the memmove function. */
+#define HAVE_MEMMOVE 1
+
+/* Define if you have the memset function. */
+#define HAVE_MEMSET 1
+
+/* Define if you have the mkstemp function. */
+#define HAVE_MKSTEMP 1
+
+/* Define if you have the mktime function. */
+#define HAVE_MKTIME 1
+
+/* Define if you have the mlockall function. */
+/* #undef HAVE_MLOCKALL */
+
+/* Define if you have the mrand48 function. */
+#define HAVE_MRAND48 1
+
+/* Define if you have the nice function. */
+#define HAVE_NICE 1
+
+/* Define if you have the nlist function. */
+#define HAVE_NLIST 1
+
+/* Define if you have the ntp_adjtime function. */
+#define HAVE_NTP_ADJTIME 1
+
+/* Define if you have the ntp_gettime function. */
+#define HAVE_NTP_GETTIME 1
+
+/* Define if you have the plock function. */
+/* #undef HAVE_PLOCK */
+
+/* Define if you have the pututline function. */
+/* #undef HAVE_PUTUTLINE */
+
+/* Define if you have the pututxline function. */
+/* #undef HAVE_PUTUTXLINE */
+
+/* Define if you have the random function. */
+#define HAVE_RANDOM 1
+
+/* Define if you have the rtprio function. */
+#define HAVE_RTPRIO 1
+
+/* Define if you have the sched_setscheduler function. */
+/* #undef HAVE_SCHED_SETSCHEDULER */
+
+/* Define if you have the setlinebuf function. */
+#define HAVE_SETLINEBUF 1
+
+/* Define if you have the setpgid function. */
+#define HAVE_SETPGID 1
+
+/* Define if you have the setpriority function. */
+#define HAVE_SETPRIORITY 1
+
+/* Define if you have the setsid function. */
+#define HAVE_SETSID 1
+
+/* Define if you have the settimeofday function. */
+#define HAVE_SETTIMEOFDAY 1
+
+/* Define if you have the setvbuf function. */
+#define HAVE_SETVBUF 1
+
+/* Define if you have the sigaction function. */
+#define HAVE_SIGACTION 1
+
+/* Define if you have the sigset function. */
+/* #undef HAVE_SIGSET */
+
+/* Define if you have the sigsuspend function. */
+#define HAVE_SIGSUSPEND 1
+
+/* Define if you have the sigvec function. */
+#define HAVE_SIGVEC 1
+
+/* Define if you have the srand48 function. */
+#define HAVE_SRAND48 1
+
+/* Define if you have the srandom function. */
+#define HAVE_SRANDOM 1
+
+/* Define if you have the stime function. */
+/* #undef HAVE_STIME */
+
+/* Define if you have the strchr function. */
+#define HAVE_STRCHR 1
+
+/* Define if you have the strerror function. */
+#define HAVE_STRERROR 1
+
+/* Define if you have the sysconf function. */
+#define HAVE_SYSCONF 1
+
+/* Define if you have the sysctl function. */
+#define HAVE_SYSCTL 1
+
+/* Define if you have the timer_create function. */
+/* #undef HAVE_TIMER_CREATE */
+
+/* Define if you have the timer_settime function. */
+/* #undef HAVE_TIMER_SETTIME */
+
+/* Define if you have the umask function. */
+#define HAVE_UMASK 1
+
+/* Define if you have the uname function. */
+#define HAVE_UNAME 1
+
+/* Define if you have the updwtmp function. */
+/* #undef HAVE_UPDWTMP */
+
+/* Define if you have the updwtmpx function. */
+/* #undef HAVE_UPDWTMPX */
+
+/* Define if you have the vsprintf function. */
+#define HAVE_VSPRINTF 1
+
+/* Define if you have the </sys/sync/queue.h> header file. */
+/* #undef HAVE__SYS_SYNC_QUEUE_H */
+
+/* Define if you have the </sys/sync/sema.h> header file. */
+/* #undef HAVE__SYS_SYNC_SEMA_H */
+
+/* Define if you have the <arpa/nameser.h> header file. */
+#define HAVE_ARPA_NAMESER_H 1
+
+/* Define if you have the <bstring.h> header file. */
+/* #undef HAVE_BSTRING_H */
+
+/* Define if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define if you have the <machine/inline.h> header file. */
+/* #undef HAVE_MACHINE_INLINE_H */
+
+/* Define if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define if you have the <net/if.h> header file. */
+#define HAVE_NET_IF_H 1
+
+/* Define if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define if you have the <netinet/ip.h> header file. */
+#define HAVE_NETINET_IP_H 1
+
+/* Define if you have the <netinfo/ni.h> header file. */
+/* #undef HAVE_NETINFO_NI_H */
+
+/* Define if you have the <poll.h> header file. */
+#define HAVE_POLL_H 1
+
+/* Define if you have the <resolv.h> header file. */
+#define HAVE_RESOLV_H 1
+
+/* Define if you have the <sched.h> header file. */
+#define HAVE_SCHED_H 1
+
+/* Define if you have the <sgtty.h> header file. */
+#define HAVE_SGTTY_H 1
+
+/* Define if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define if you have the <sun/audioio.h> header file. */
+/* #undef HAVE_SUN_AUDIOIO_H */
+
+/* Define if you have the <sys/audioio.h> header file. */
+/* #undef HAVE_SYS_AUDIOIO_H */
+
+/* Define if you have the <sys/clkdefs.h> header file. */
+/* #undef HAVE_SYS_CLKDEFS_H */
+
+/* Define if you have the <sys/file.h> header file. */
+#define HAVE_SYS_FILE_H 1
+
+/* Define if you have the <sys/i8253.h> header file. */
+/* #undef HAVE_SYS_I8253_H */
+
+/* Define if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define if you have the <sys/lock.h> header file. */
+#define HAVE_SYS_LOCK_H 1
+
+/* Define if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define if you have the <sys/modem.h> header file. */
+/* #undef HAVE_SYS_MODEM_H */
+
+/* Define if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define if you have the <sys/pcl720.h> header file. */
+/* #undef HAVE_SYS_PCL720_H */
+
+/* Define if you have the <sys/ppsclock.h> header file. */
+/* #undef HAVE_SYS_PPSCLOCK_H */
+
+/* Define if you have the <sys/ppstime.h> header file. */
+/* #undef HAVE_SYS_PPSTIME_H */
+
+/* Define if you have the <sys/proc.h> header file. */
+#define HAVE_SYS_PROC_H 1
+
+/* Define if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define if you have the <sys/sched.h> header file. */
+/* #undef HAVE_SYS_SCHED_H */
+
+/* Define if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define if you have the <sys/sio.h> header file. */
+/* #undef HAVE_SYS_SIO_H */
+
+/* Define if you have the <sys/sockio.h> header file. */
+#define HAVE_SYS_SOCKIO_H 1
+
+/* Define if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define if you have the <sys/stream.h> header file. */
+/* #undef HAVE_SYS_STREAM_H */
+
+/* Define if you have the <sys/stropts.h> header file. */
+/* #undef HAVE_SYS_STROPTS_H */
+
+/* Define if you have the <sys/sysctl.h> header file. */
+#define HAVE_SYS_SYSCTL_H 1
+
+/* Define if you have the <sys/syssgi.h> header file. */
+/* #undef HAVE_SYS_SYSSGI_H */
+
+/* Define if you have the <sys/termios.h> header file. */
+#define HAVE_SYS_TERMIOS_H 1
+
+/* Define if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define if you have the <sys/timepps.h> header file. */
+#define HAVE_SYS_TIMEPPS_H 1
+
+/* Define if you have the <sys/timers.h> header file. */
+#define HAVE_SYS_TIMERS_H 1
+
+/* Define if you have the <sys/timex.h> header file. */
+#define HAVE_SYS_TIMEX_H 1
+
+/* Define if you have the <sys/tpro.h> header file. */
+/* #undef HAVE_SYS_TPRO_H */
+
+/* Define if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define if you have the <sys/wait.h> header file. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define if you have the <termio.h> header file. */
+/* #undef HAVE_TERMIO_H */
+
+/* Define if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define if you have the <timepps.h> header file. */
+/* #undef HAVE_TIMEPPS_H */
+
+/* Define if you have the <timex.h> header file. */
+/* #undef HAVE_TIMEX_H */
+
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if you have the <utmp.h> header file. */
+#define HAVE_UTMP_H 1
+
+/* Define if you have the <utmpx.h> header file. */
+/* #undef HAVE_UTMPX_H */
+
+/* Define if you have the advapi32 library (-ladvapi32). */
+/* #undef HAVE_LIBADVAPI32 */
+
+/* Define if you have the elf library (-lelf). */
+/* #undef HAVE_LIBELF */
+
+/* Define if you have the gen library (-lgen). */
+/* #undef HAVE_LIBGEN */
+
+/* Define if you have the kvm library (-lkvm). */
+#define HAVE_LIBKVM 1
+
+/* Define if you have the ld library (-lld). */
+/* #undef HAVE_LIBLD */
+
+/* Define if you have the mld library (-lmld). */
+/* #undef HAVE_LIBMLD */
+
+/* Define if you have the nsl library (-lnsl). */
+/* #undef HAVE_LIBNSL */
+
+/* Define if you have the rt library (-lrt). */
+/* #undef HAVE_LIBRT */
+
+/* Define if you have the socket library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Name of package */
+#define PACKAGE "ntp"
+
+/* Version number of package */
+#define VERSION "4.0.98f"
+
+/* Define if compiler has function prototypes */
+#define PROTOTYPES 1
+
+/* Do we have struct ntptimeval? */
+#define HAVE_STRUCT_NTPTIMEVAL 1
+
+/* Does ntptimeval use struct timespec? */
+#define TIMESPEC_IN_NTPTIMEVAL 1
+
diff --git a/usr.sbin/ntp/libntp/Makefile b/usr.sbin/ntp/libntp/Makefile
new file mode 100644
index 0000000..b112966
--- /dev/null
+++ b/usr.sbin/ntp/libntp/Makefile
@@ -0,0 +1,35 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../contrib/ntp/libntp
+
+CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
+
+SRCS= a_md5encrypt.c adjtime.c atoint.c \
+ atolfp.c atouint.c authencrypt.c authkeys.c \
+ authparity.c authreadkeys.c authusekey.c binio.c \
+ buftvtots.c caljulian.c calleapwhen.c caltontp.c \
+ calyearstart.c clocktime.c clocktypes.c decodenetnum.c \
+ dofptoa.c dolfptoa.c emalloc.c findconfig.c \
+ fptoa.c fptoms.c getopt.c gpstolfp.c \
+ hextoint.c hextolfp.c humandate.c ieee754io.c \
+ inttoa.c iosignal.c lib_strbuf.c \
+ machines.c md5c.c memmove.c mexit.c \
+ mfp_mul.c mfptoa.c mfptoms.c mktime.c \
+ modetoa.c mstolfp.c msutotsf.c msyslog.c \
+ netof.c numtoa.c numtohost.c octtoint.c \
+ prettydate.c ranny.c recvbuff.c refnumtoa.c \
+ statestr.c syssignal.c systime.c \
+ tsftomsu.c tstotv.c tvtoa.c tvtots.c \
+ uglydate.c uinttoa.c utvtoa.c ymd2yd.c
+
+NOMAN= true
+NOPROFILE= true
+INTERNALLIB= true
+NOPIC= true
+INTERNALSTATICLIB= true
+
+LIB= ntp
+
+.include <bsd.lib.mk>
diff --git a/usr.sbin/ntp/libparse/Makefile b/usr.sbin/ntp/libparse/Makefile
new file mode 100644
index 0000000..ced28a8
--- /dev/null
+++ b/usr.sbin/ntp/libparse/Makefile
@@ -0,0 +1,24 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../contrib/ntp/libparse
+
+CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
+
+SRCS= parse.c parse_conf.c \
+ clk_computime.c clk_dcf7000.c clk_hopf6021.c \
+ clk_meinberg.c clk_rawdcf.c clk_rcc8000.c \
+ clk_schmid.c clk_trimtaip.c clk_trimtsip.c \
+ clk_varitext.c clk_wharton.c data_mbg.c \
+ info_trimble.c trim_info.c
+
+NOMAN= true
+NOPROFILE= true
+INTERNALLIB= true
+NOPIC= true
+INTERNALSTATICLIB= true
+
+LIB= parse
+
+.include <bsd.lib.mk>
diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile
new file mode 100644
index 0000000..6fc9bd5
--- /dev/null
+++ b/usr.sbin/ntp/ntpd/Makefile
@@ -0,0 +1,37 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../contrib/ntp/ntpd
+
+CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
+
+DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBKVM}
+LDADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBKVM}
+
+PROG= ntpd
+NOMAN= yes
+CLEANFILES+= .version version.c
+
+SRCS= map_vme.c ntp_config.c \
+ ntp_control.c ntp_filegen.c ntp_intres.c \
+ ntp_io.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_util.c ntpd.c refclock_acts.c \
+ refclock_arbiter.c refclock_arc.c refclock_as2201.c \
+ refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
+ refclock_chu.c refclock_conf.c refclock_datum.c \
+ refclock_dumbclock.c refclock_gpsvme.c refclock_heath.c \
+ refclock_hpgps.c refclock_irig.c refclock_jupiter.c \
+ refclock_leitch.c refclock_local.c refclock_msfees.c \
+ refclock_mx4200.c refclock_nmea.c refclock_oncore.c \
+ refclock_palisade.c refclock_parse.c refclock_pst.c \
+ refclock_ptbacts.c refclock_shm.c refclock_tpro.c \
+ refclock_trak.c refclock_true.c refclock_usno.c \
+ refclock_wwvb.c version.c
+
+version.c:
+ sh -e ${.CURDIR}/../scripts/mkver ntpd
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile
new file mode 100644
index 0000000..015b14d
--- /dev/null
+++ b/usr.sbin/ntp/ntpdate/Makefile
@@ -0,0 +1,21 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../contrib/ntp/ntpdate
+
+CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
+
+DPADD= ${LIBNTP} ${LIBKVM}
+LDADD= ${LIBNTP} ${LIBKVM}
+
+PROG= ntpdate
+NOMAN= yes
+CLEANFILES+= .version version.c
+
+SRCS= ntpdate.c version.c
+
+version.c:
+ sh -e ${.CURDIR}/../scripts/mkver ntpdate
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile
new file mode 100644
index 0000000..bd6311f
--- /dev/null
+++ b/usr.sbin/ntp/ntpdc/Makefile
@@ -0,0 +1,21 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../contrib/ntp/ntpdc
+
+CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
+
+DPADD= ${LIBNTP} ${LIBKVM}
+LDADD= ${LIBNTP} ${LIBKVM}
+
+PROG= ntpdc
+NOMAN= yes
+CLEANFILES+= .version version.c
+
+SRCS= ntpdc.c ntpdc_ops.c version.c
+
+version.c:
+ sh -e ${.CURDIR}/../scripts/mkver ntpdc
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile
new file mode 100644
index 0000000..551dbec6b
--- /dev/null
+++ b/usr.sbin/ntp/ntpq/Makefile
@@ -0,0 +1,22 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../contrib/ntp/ntpq
+
+CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
+
+DPADD= ${LIBNTP} ${LIBKVM}
+LDADD= ${LIBNTP} ${LIBKVM}
+
+PROG= ntpq
+NOMAN= yes
+CLEANFILES+= .version version.c
+BINDIR= /usr/bin
+
+SRCS= ntpq.c ntpq_ops.c version.c
+
+version.c:
+ sh -e ${.CURDIR}/../scripts/mkver ntpq
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/ntptime/Makefile b/usr.sbin/ntp/ntptime/Makefile
new file mode 100644
index 0000000..d4e45eb
--- /dev/null
+++ b/usr.sbin/ntp/ntptime/Makefile
@@ -0,0 +1,17 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../contrib/ntp/util
+
+CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
+
+DPADD= ${LIBNTP} ${LIBKVM}
+LDADD= ${LIBNTP} ${LIBKVM}
+
+PROG= ntptime
+NOMAN= yes
+
+SRCS= ntptime.c
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/ntptimeset/Makefile b/usr.sbin/ntp/ntptimeset/Makefile
new file mode 100644
index 0000000..80e421b
--- /dev/null
+++ b/usr.sbin/ntp/ntptimeset/Makefile
@@ -0,0 +1,21 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../contrib/ntp/ntpdate
+
+CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
+
+DPADD= ${LIBNTP} ${LIBKVM}
+LDADD= ${LIBNTP} ${LIBKVM}
+
+PROG= ntptimeset
+NOMAN= yes
+CLEANFILES+= .version version.c
+
+SRCS= ntptimeset.c ntptime_config.c version.c
+
+version.c:
+ sh -e ${.CURDIR}/../scripts/mkver ntptimeset
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/ntptrace/Makefile b/usr.sbin/ntp/ntptrace/Makefile
new file mode 100644
index 0000000..219ae9b
--- /dev/null
+++ b/usr.sbin/ntp/ntptrace/Makefile
@@ -0,0 +1,21 @@
+#
+# $FreeBSD$
+#
+
+.PATH: ${.CURDIR}/../../../contrib/ntp/ntptrace
+
+CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
+
+DPADD= ${LIBNTP} ${LIBKVM}
+LDADD= ${LIBNTP} ${LIBKVM}
+
+PROG= ntptrace
+NOMAN= yes
+CLEANFILES+= .version version.c
+
+SRCS= ntptrace.c version.c
+
+version.c:
+ sh -e ${.CURDIR}/../scripts/mkver ntptrace
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/scripts/mkver b/usr.sbin/ntp/scripts/mkver
new file mode 100755
index 0000000..f7be718
--- /dev/null
+++ b/usr.sbin/ntp/scripts/mkver
@@ -0,0 +1,32 @@
+#!/bin/sh
+# $FreeBSD$
+PROG=${1-UNKNOWN}
+
+ConfStr="$PROG"
+
+case "" in
+ '') ;;
+ *) ConfStr="$ConfStr RSAREF" ;;
+esac
+
+ConfStr="$ConfStr 4.0.98f `date`"
+
+if [ ! -f .version ]; then
+ echo 0 > .version
+fi
+RUN="`cat .version`"
+RUN="`expr $RUN + 1`"
+echo $RUN > .version
+
+ConfStr="$ConfStr (${RUN})"
+
+echo "Version <${ConfStr}>";
+
+rm -f version.c
+cat > version.c << -EoF-
+/*
+ * version file for $PROG
+ */
+#include <config.h>
+const char * Version = "${ConfStr}";
+-EoF-
diff --git a/usr.sbin/ntp/scripts/ntpver b/usr.sbin/ntp/scripts/ntpver
new file mode 100755
index 0000000..6dbc510
--- /dev/null
+++ b/usr.sbin/ntp/scripts/ntpver
@@ -0,0 +1,8 @@
+#!/bin/sh
+# $FreeBSD$
+# print version string of NTP daemon
+# Copyright (c) 1997 by Ulrich Windl
+# Modified 970318: Harlan Stenn: rewritten...
+# usage: ntpver hostname
+
+ntpq -c "rv 0 daemon_version" $* | awk '/daemon_version/ { print $2 }'
OpenPOWER on IntegriCloud