diff options
Diffstat (limited to 'usr.sbin/ntp')
57 files changed, 5160 insertions, 0 deletions
diff --git a/usr.sbin/ntp/Makefile b/usr.sbin/ntp/Makefile new file mode 100644 index 000000000000..3701fd297c1a --- /dev/null +++ b/usr.sbin/ntp/Makefile @@ -0,0 +1,17 @@ +# Makefile for ntpd. + +SUBDIR= libopts libntp libntpevent libparse ntpd ntpdc ntpq ntpdate \ + ntptime ntp-keygen sntp +SUBDIR+= doc + +SUBDIR_DEPEND_ntpd= libntp libopts libparse +SUBDIR_DEPEND_ntpdate= libntp +SUBDIR_DEPEND_ntpdc= libntp libopts +SUBDIR_DEPEND_ntpq= libntp libopts +SUBDIR_DEPEND_ntptime= libntp +SUBDIR_DEPEND_ntp-keygen= libntp libopts +SUBDIR_DEPEND_sntp= libntp libntpevent libopts + +SUBDIR_PARALLEL= + +.include <bsd.subdir.mk> diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc new file mode 100644 index 000000000000..5801d91aac46 --- /dev/null +++ b/usr.sbin/ntp/Makefile.inc @@ -0,0 +1,19 @@ +.include <src.opts.mk> + +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 ${MK_OPENSSL} != "no" +CFLAGS+= -DOPENSSL -DAUTOKEY +.endif + +WARNS?= 0 + +.export ECHO + +.include "../Makefile.inc" diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h new file mode 100644 index 000000000000..3d6a1364dd10 --- /dev/null +++ b/usr.sbin/ntp/config.h @@ -0,0 +1,1919 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Is adjtime() accurate? */ +/* #undef ADJTIME_IS_ACCURATE */ + +/* Support NTP Autokey protocol? */ +/* #define AUTOKEY 1 */ + +/* why not HAVE_P_S? */ +/* #undef CALL_PTHREAD_SETCONCURRENCY */ + +/* ACTS modem service */ +#define CLOCK_ACTS 1 + +/* Arbiter 1088A/B GPS receiver */ +#define CLOCK_ARBITER 1 + +/* ARCRON support? */ +#define CLOCK_ARCRON_MSF 1 + +/* Austron 2200A/2201A GPS receiver? */ +#define CLOCK_AS2201 1 + +/* PPS interface? */ +#define CLOCK_ATOM 1 + +/* Datum/Bancomm bc635/VME interface? */ +/* #undef CLOCK_BANC */ + +/* Chronolog K-series WWVB receiver? */ +#define CLOCK_CHRONOLOG 1 + +/* CHU modem/decoder */ +#define CLOCK_CHU 1 + +/* Diems Computime Radio Clock? */ +/* #undef CLOCK_COMPUTIME */ + +/* Datum Programmable Time System? */ +#define CLOCK_DATUM 1 + +/* ELV/DCF7000 clock? */ +/* #undef CLOCK_DCF7000 */ + +/* Dumb generic hh:mm:ss local clock? */ +#define CLOCK_DUMBCLOCK 1 + +/* Forum Graphic GPS datating station driver? */ +#define CLOCK_FG 1 + +/* GPSD JSON receiver */ +#define CLOCK_GPSDJSON 1 + +/* TrueTime GPS receiver/VME interface? */ +/* #undef CLOCK_GPSVME */ + +/* Heath GC-1000 WWV/WWVH receiver? */ +#define CLOCK_HEATH 1 + +/* HOPF 6021 clock? */ +/* #undef CLOCK_HOPF6021 */ + +/* HOPF PCI clock device? */ +#define CLOCK_HOPF_PCI 1 + +/* HOPF serial clock device? */ +#define CLOCK_HOPF_SERIAL 1 + +/* HP 58503A GPS receiver? */ +#define CLOCK_HPGPS 1 + +/* IRIG audio decoder? */ +#define CLOCK_IRIG 1 + +/* JJY receiver? */ +#define CLOCK_JJY 1 + +/* Rockwell Jupiter GPS clock? */ +#define CLOCK_JUPITER 1 + +/* Leitch CSD 5300 Master Clock System Driver? */ +#define CLOCK_LEITCH 1 + +/* local clock reference? */ +#define CLOCK_LOCAL 1 + +/* Meinberg clocks */ +#define CLOCK_MEINBERG 1 + +/* Magnavox MX4200 GPS receiver */ +/* #undef CLOCK_MX4200 */ + +/* NeoClock4X */ +#define CLOCK_NEOCLOCK4X 1 + +/* NMEA GPS receiver */ +#define CLOCK_NMEA 1 + +/* Motorola UT Oncore GPS */ +#define CLOCK_ONCORE 1 + +/* Palisade clock */ +#define CLOCK_PALISADE 1 + +/* PARSE driver interface */ +#define CLOCK_PARSE 1 + +/* Conrad parallel port radio clock */ +#define CLOCK_PCF 1 + +/* PCL 720 clock support */ +/* #undef CLOCK_PPS720 */ + +/* PST/Traconex 1020 WWV/WWVH receiver */ +#define CLOCK_PST 1 + +/* DCF77 raw time code */ +#define CLOCK_RAWDCF 1 + +/* RCC 8000 clock */ +/* #undef CLOCK_RCC8000 */ + +/* RIPE NCC Trimble clock */ +/* #undef CLOCK_RIPENCC */ + +/* Schmid DCF77 clock */ +/* #undef CLOCK_SCHMID */ + +/* SEL240X protocol */ +/* #undef CLOCK_SEL240X */ + +/* clock thru shared memory */ +#define CLOCK_SHM 1 + +/* Spectracom 8170/Netclock/2 WWVB receiver */ +#define CLOCK_SPECTRACOM 1 + +/* KSI/Odetics TPRO/S GPS receiver/IRIG interface */ +/* #undef CLOCK_TPRO */ + +/* Trimble GPS receiver/TAIP protocol */ +/* #undef CLOCK_TRIMTAIP */ + +/* Trimble GPS receiver/TSIP protocol */ +/* #undef CLOCK_TRIMTSIP */ + +/* Kinemetrics/TrueTime receivers */ +#define CLOCK_TRUETIME 1 + +/* Spectracom TSYNC timing board */ +/* #undef CLOCK_TSYNCPCI */ + +/* TrueTime 560 IRIG-B decoder? */ +/* #undef CLOCK_TT560 */ + +/* Ultralink M320 WWVB receiver? */ +#define CLOCK_ULINK 1 + +/* VARITEXT clock */ +/* #undef CLOCK_VARITEXT */ + +/* WHARTON 400A Series clock */ +/* #undef CLOCK_WHARTON_400A */ + +/* WWV audio driver */ +#define CLOCK_WWV 1 + +/* Zyfer GPStarplus */ +#define CLOCK_ZYFER 1 + +/* Define to 1 if using 'alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Enable debugging code? */ +/* #undef DEBUG */ + +/* Enable processing time debugging? */ +/* #undef DEBUG_TIMING */ + +/* Declaration style */ +/* #undef DECL_ADJTIME_0 */ + +/* Declaration style */ +/* #undef DECL_BCOPY_0 */ + +/* Declaration style */ +/* #undef DECL_BZERO_0 */ + +/* Declaration style */ +/* #undef DECL_CFSETISPEED_0 */ + +/* Declare errno? */ +/* #undef DECL_ERRNO */ + +/* Declaration style */ +/* #undef DECL_HSTRERROR_0 */ + +/* Declare h_errno? */ +#define DECL_H_ERRNO 1 + +/* Declaration style */ +/* #undef DECL_INET_NTOA_0 */ + +/* Declaration style */ +/* #undef DECL_IOCTL_0 */ + +/* Declaration style */ +/* #undef DECL_IPC_0 */ + +/* Declaration style */ +/* #undef DECL_MEMMOVE_0 */ + +/* Declaration style */ +/* #undef DECL_MKSTEMP_0 */ + +/* Declaration style */ +/* #undef DECL_MKTEMP_0 */ + +/* Declaration style */ +/* #undef DECL_NLIST_0 */ + +/* Declaration style */ +/* #undef DECL_PLOCK_0 */ + +/* Declaration style */ +/* #undef DECL_RENAME_0 */ + +/* Declaration style */ +/* #undef DECL_SELECT_0 */ + +/* Declaration style */ +/* #undef DECL_SETITIMER_0 */ + +/* Declaration style */ +/* #undef DECL_SETPRIORITY_0 */ + +/* Declaration style */ +/* #undef DECL_SETPRIORITY_1 */ + +/* Declaration style */ +/* #undef DECL_SIGVEC_0 */ + +/* Declaration style */ +/* #undef DECL_STDIO_0 */ + +/* Declaration style */ +/* #undef DECL_STIME_0 */ + +/* Declaration style */ +/* #undef DECL_STIME_1 */ + +/* Declaration style */ +/* #undef DECL_STRERROR_0 */ + +/* Declaration style */ +/* #undef DECL_STRTOL_0 */ + +/* Declare syscall()? */ +#define DECL_SYSCALL 1 + +/* Declaration style */ +/* #undef DECL_SYSLOG_0 */ + +/* Declaration style */ +/* #undef DECL_TIMEOFDAY_0 */ + +/* Declaration style */ +/* #undef DECL_TIME_0 */ + +/* Declaration style */ +/* #undef DECL_TOLOWER_0 */ + +/* Declaration style */ +/* #undef DECL_TOUPPER_0 */ + +/* What is the fallback value for HZ? */ +#define DEFAULT_HZ 100 + +/* Default number of megabytes for RLIMIT_MEMLOCK */ +#define DFLT_RLIMIT_MEMLOCK -1 + +/* Default number of 4k pages for RLIMIT_STACK */ +#define DFLT_RLIMIT_STACK 50 + +/* Directory separator character, usually / or \\ */ +#define DIR_SEP '/' + +/* use old autokey session key behavior? */ +/* #undef DISABLE_BUG1243_FIX */ + +/* use old autokey session key behavior? */ +/* #undef DISABLE_BUG3527_FIX */ + +/* Disable debug assertion on OOB KoD RATE value? */ +/* #undef DISABLE_BUG3767_FIX */ + +/* synch TODR hourly? */ +/* #undef DOSYNCTODR */ + +/* The number of minutes in a DST adjustment */ +#define DSTMINUTES 60 + +/* support dynamic interleave? */ +#define DYNAMIC_INTERLEAVE 0 + +/* number of args to el_init() */ +#define EL_INIT_ARGS 4 + +/* Provide the explicit 127.0.0.0/8 martian filter? */ +#define ENABLE_BUG3020_FIX 1 + +/* Enable CMAC support? */ +#define ENABLE_CMAC 1 + +/* auto-instantiate missing PPS devices on Linux */ +#define ENABLE_MAGICPPS 1 + +/* nls support in libopts */ +/* #undef ENABLE_NLS */ + +/* force ntpdate to step the clock if !defined(STEP_SLEW) ? */ +/* #undef FORCE_NTPDATE_STEP */ + +/* What is getsockname()'s socklen type? */ +#define GETSOCKNAME_SOCKLEN_TYPE socklen_t + +/* Do we have a routing socket (rt_msghdr or rtattr)? */ +#define HAS_ROUTING_SOCKET 1 + +/* via __adjtimex */ +/* #undef HAVE_ADJTIMEX */ + +/* Define to 1 if you have 'alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if <alloca.h> works. */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the 'arc4random_buf' function. */ +#define HAVE_ARC4RANDOM_BUF 1 + +/* Define to 1 if you have the <arpa/nameser.h> header file. */ +#define HAVE_ARPA_NAMESER_H 1 + +/* Define to 1 if you have the 'atomic_thread_fence' function. */ +/* #undef HAVE_ATOMIC_THREAD_FENCE */ + +/* Do we have audio support? */ +#define HAVE_AUDIO /**/ + +/* Define to 1 if you have the <bstring.h> header file. */ +/* #undef HAVE_BSTRING_H */ + +/* Define to 1 if you have the 'canonicalize_file_name' function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if you have the 'chmod' function. */ +#define HAVE_CHMOD 1 + +/* Do we have the CIOGETEV ioctl (SunOS, Linux)? */ +/* #undef HAVE_CIOGETEV */ + +/* Define to 1 if you have the 'clock_getres' function. */ +#define HAVE_CLOCK_GETRES 1 + +/* Define to 1 if you have the 'clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the 'clock_settime' function. */ +#define HAVE_CLOCK_SETTIME 1 + +/* Define to 1 if you have the 'closefrom' function. */ +#define HAVE_CLOSEFROM 1 + +/* Define to 1 if you have the <cthreads.h> header file. */ +/* #undef HAVE_CTHREADS_H */ + +/* Define to 1 if you have the 'daemon' function. */ +#define HAVE_DAEMON 1 + +/* Define to 1 if you have the declaration of 'siglongjmp', and to 0 if you + don't. */ +#define HAVE_DECL_SIGLONGJMP 1 + +/* Define to 1 if you have the declaration of 'sigsetjmp', and to 0 if you + don't. */ +#define HAVE_DECL_SIGSETJMP 1 + +/* Define to 1 if you have the declaration of 'strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 1 + +/* Define to 1 if you have the <dirent.h> header file, and it defines 'DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Use Rendezvous/DNS-SD registration */ +/* #undef HAVE_DNSREGISTRATION */ + +/* Define to 1 if you don't have 'vprintf' but do have '_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Can we drop root privileges? */ +#define HAVE_DROPROOT 1 + +/* Define to 1 if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the 'EVP_MD_do_all_sorted' function. */ +#define HAVE_EVP_MD_DO_ALL_SORTED 1 + +/* Define to 1 if you have the 'fchmod' function. */ +#define HAVE_FCHMOD 1 + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the 'fdopendir' function. */ +#define HAVE_FDOPENDIR 1 + +/* Define to 1 if you have the 'finite' function. */ +/* #undef HAVE_FINITE */ + +/* Define to 1 if you have the 'fnmatch' function. */ +#define HAVE_FNMATCH 1 + +/* Define to 1 if you have the <fnmatch.h> header file. */ +#define HAVE_FNMATCH_H 1 + +/* Define to 1 if you have the 'fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the 'fstat' function. */ +#define HAVE_FSTAT 1 + +/* Define to 1 if you have the 'fstatat' function. */ +#define HAVE_FSTATAT 1 + +/* Define to 1 if we have realpath() that supports NULL as the 2nd argument */ +#define HAVE_FUNC_POSIX_REALPATH 1 + +/* Define to 1 if you have the 'getbootfile' function. */ +#define HAVE_GETBOOTFILE 1 + +/* Define to 1 if you have the 'getclock' function. */ +/* #undef HAVE_GETCLOCK */ + +/* Define to 1 if you have the 'getdtablesize' function. */ +#define HAVE_GETDTABLESIZE 1 + +/* Define to 1 if you have the 'getifaddrs' function. */ +#define HAVE_GETIFADDRS 1 + +/* Define to 1 if you have the 'getpassphrase' function. */ +/* #undef HAVE_GETPASSPHRASE */ + +/* Define to 1 if you have the 'getrusage' function. */ +#define HAVE_GETRUSAGE 1 + +/* Define to 1 if you have the 'getuid' function. */ +#define HAVE_GETUID 1 + +/* if you have GNU Pth */ +/* #undef HAVE_GNU_PTH */ + +/* Define to 1 if you have the <histedit.h> header file. */ +#define HAVE_HISTEDIT_H 1 + +/* Define to 1 if you have the <history.h> header file. */ +/* #undef HAVE_HISTORY_H */ + +/* Obvious */ +#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1 + +/* Define to 1 if you have the <ieeefp.h> header file. */ +#define HAVE_IEEEFP_H 1 + +/* have iflist_sysctl? */ +#define HAVE_IFLIST_SYSCTL 1 + +/* Define to 1 if you have the 'if_nametoindex' function. */ +#define HAVE_IF_NAMETOINDEX 1 + +/* inline keyword or macro available */ +#define HAVE_INLINE 1 + +/* Define to 1 if the system has the type 'int16_t'. */ +#define HAVE_INT16_T 1 + +/* Define to 1 if the system has the type 'int32'. */ +/* #undef HAVE_INT32 */ + +/* Define to 1 if the system has the type 'int32_t'. */ +#define HAVE_INT32_T 1 + +/* Define to 1 if the system has the type 'int8_t'. */ +#define HAVE_INT8_T 1 + +/* Define to 1 if the system has the type 'intmax_t'. */ +/* #undef HAVE_INTMAX_T */ + +/* Define to 1 if the system has the type 'intptr_t'. */ +#define HAVE_INTPTR_T 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the 'isfinite' function. */ +#define HAVE_ISFINITE 1 + +/* Define to 1 if you have the <kvm.h> header file. */ +#define HAVE_KVM_H 1 + +/* Define to 1 if you have the 'kvm_open' function. */ +/* #undef HAVE_KVM_OPEN */ + +/* Define to 1 if you have the 'gen' library (-lgen). */ +/* #undef HAVE_LIBGEN */ + +/* Define to 1 if you have the <libgen.h> header file. */ +#define HAVE_LIBGEN_H 1 + +/* Define to 1 if you have the 'intl' library (-lintl). */ +/* #undef HAVE_LIBINTL */ + +/* Define to 1 if you have the <libintl.h> header file. */ +/* #undef HAVE_LIBINTL_H */ + +/* Define to 1 if you have the <libscf.h> header file. */ +/* #undef HAVE_LIBSCF_H */ + +/* Define to 1 if you have the <limits.h> header file. */ +#define HAVE_LIMITS_H 1 + +/* using Linux pthread? */ +/* #undef HAVE_LINUXTHREADS */ + +/* Do we have Linux capabilities? */ +/* #undef HAVE_LINUX_CAPABILITIES */ + +/* Define to 1 if you have the <linux/if_addr.h> header file. */ +/* #undef HAVE_LINUX_IF_ADDR_H */ + +/* if you have LinuxThreads */ +/* #undef HAVE_LINUX_THREADS */ + +/* Define to 1 if you have the 'localeconv' function. */ +/* #undef HAVE_LOCALECONV */ + +/* Define to 1 if you have the <locale.h> header file. */ +/* #undef HAVE_LOCALE_H */ + +/* Define to 1 if the system has the type 'long double'. */ +/* #undef HAVE_LONG_DOUBLE */ + +/* Define to 1 if the system has the type 'long long'. */ +#define HAVE_LONG_LONG 1 + +/* Define to 1 if the system has the type 'long long int'. */ +/* #undef HAVE_LONG_LONG_INT */ + +/* if you have SunOS LWP package */ +/* #undef HAVE_LWP */ + +/* Define to 1 if you have the <lwp/lwp.h> header file. */ +/* #undef HAVE_LWP_LWP_H */ + +/* Define to 1 if you have the <machine/inline.h> header file. */ +/* #undef HAVE_MACHINE_INLINE_H */ + +/* Define to 1 if you have the <machine/soundcard.h> header file. */ +/* #undef HAVE_MACHINE_SOUNDCARD_H */ + +/* define if you have Mach Cthreads */ +/* #undef HAVE_MACH_CTHREADS */ + +/* Define to 1 if you have the <mach/cthreads.h> header file. */ +/* #undef HAVE_MACH_CTHREADS_H */ + +/* Define to 1 if you have the <math.h> header file. */ +#define HAVE_MATH_H 1 + +/* Define to 1 if you have the 'MD5Init' function. */ +#define HAVE_MD5INIT 1 + +/* Define to 1 if you have the <md5.h> header file. */ +#define HAVE_MD5_H 1 + +/* Define to 1 if you have the 'memchr' function. */ +#define HAVE_MEMCHR 1 + +/* Define to 1 if you have the 'memlk' function. */ +/* #undef HAVE_MEMLK */ + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the <minix/config.h> header file. */ +/* #undef HAVE_MINIX_CONFIG_H */ + +/* Define to 1 if you have the 'mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have the 'mktime' function. */ +#define HAVE_MKTIME 1 + +/* Define to 1 if you have the 'mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* Define to 1 if you have the 'mmap' function. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the 'nanosleep' function. */ +#define HAVE_NANOSLEEP 1 + +/* Define to 1 if you have the <ndir.h> header file, and it defines 'DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the <netdb.h> header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the <netinet/in.h> header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the <netinet/in_system.h> header file. */ +/* #undef HAVE_NETINET_IN_SYSTEM_H */ + +/* Define to 1 if you have the <netinet/in_systm.h> header file. */ +#define HAVE_NETINET_IN_SYSTM_H 1 + +/* Define to 1 if you have the <netinet/in_var.h> header file. */ +#define HAVE_NETINET_IN_VAR_H 1 + +/* Define to 1 if you have the <netinet/ip.h> header file. */ +#define HAVE_NETINET_IP_H 1 + +/* NetInfo support? */ +/* #undef HAVE_NETINFO */ + +/* Define to 1 if you have the <netinfo/ni.h> header file. */ +/* #undef HAVE_NETINFO_NI_H */ + +/* Define to 1 if you have the <net/if6.h> header file. */ +/* #undef HAVE_NET_IF6_H */ + +/* Define to 1 if you have the <net/if.h> header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have the <net/if_var.h> header file. */ +#define HAVE_NET_IF_VAR_H 1 + +/* Define to 1 if you have the <net/route.h> header file. */ +#define HAVE_NET_ROUTE_H 1 + +/* Define to 1 if you have the 'nice' function. */ +#define HAVE_NICE 1 + +/* Define to 1 if you have the <nlist.h> header file. */ +#define HAVE_NLIST_H 1 + +/* via __adjtimex */ +#define HAVE_NTP_ADJTIME 1 + +/* via __ntp_gettime */ +#define HAVE_NTP_GETTIME 1 + +/* Do we want support for Samba's signing daemon? */ +#define HAVE_NTP_SIGND 1 + +/* if you have NT Event Log */ +/* #undef HAVE_NT_EVENT_LOG */ + +/* if you have NT Service Manager */ +/* #undef HAVE_NT_SERVICE_MANAGER */ + +/* if you have NT Threads */ +/* #undef HAVE_NT_THREADS */ + +/* Define to 1 if you have the 'openat' function. */ +#define HAVE_OPENAT 1 + +/* Define to 1 if you have the <openssl/cmac.h> header file. */ +#define HAVE_OPENSSL_CMAC_H 1 + +/* Define to 1 if the system has the type 'pid_t'. */ +#define HAVE_PID_T 1 + +/* Define to 1 if you have the 'plock' function. */ +/* #undef HAVE_PLOCK */ + +/* Define to 1 if you have the <poll.h> header file. */ +#define HAVE_POLL_H 1 + +/* Do we have the PPS API per the Draft RFC? */ +#define HAVE_PPSAPI 1 + +/* Define to 1 if you have the <priv.h> header file. */ +/* #undef HAVE_PRIV_H */ + +/* Define if you have POSIX threads libraries and header files. */ +/* #undef HAVE_PTHREAD */ + +/* define to pthreads API spec revision */ +#define HAVE_PTHREADS 10 + +/* Define to 1 if you have the 'pthread_attr_getstacksize' function. */ +#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1 + +/* Define to 1 if you have the 'pthread_attr_setstacksize' function. */ +#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 + +/* define if you have pthread_detach function */ +#define HAVE_PTHREAD_DETACH 1 + +/* Define to 1 if you have the 'pthread_getconcurrency' function. */ +#define HAVE_PTHREAD_GETCONCURRENCY 1 + +/* Define to 1 if you have the <pthread.h> header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the 'pthread_kill' function. */ +#define HAVE_PTHREAD_KILL 1 + +/* Define to 1 if you have the 'pthread_kill_other_threads_np' function. */ +/* #undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP */ + +/* define if you have pthread_rwlock_destroy function */ +#define HAVE_PTHREAD_RWLOCK_DESTROY 1 + +/* Define to 1 if you have the 'pthread_setconcurrency' function. */ +#define HAVE_PTHREAD_SETCONCURRENCY 1 + +/* Define to 1 if you have the 'pthread_yield' function. */ +#define HAVE_PTHREAD_YIELD 1 + +/* Define to 1 if you have the <pth.h> header file. */ +/* #undef HAVE_PTH_H */ + +/* Define to 1 if the system has the type 'ptrdiff_t'. */ +#define HAVE_PTRDIFF_T 1 + +/* Define to 1 if you have the 'pututline' function. */ +/* #undef HAVE_PUTUTLINE */ + +/* Define to 1 if you have the 'pututxline' function. */ +#define HAVE_PUTUTXLINE 1 + +/* Define to 1 if you have the 'RAND_bytes' function. */ +#define HAVE_RAND_BYTES 1 + +/* Define to 1 if you have the 'RAND_poll' function. */ +#define HAVE_RAND_POLL 1 + +/* Define to 1 if you have the <readline.h> header file. */ +/* #undef HAVE_READLINE_H */ + +/* Define if your readline library has \`add_history' */ +#define HAVE_READLINE_HISTORY 1 + +/* Define to 1 if you have the <readline/history.h> header file. */ +#define HAVE_READLINE_HISTORY_H 1 + +/* Define to 1 if you have the <readline/readline.h> header file. */ +#define HAVE_READLINE_READLINE_H 1 + +/* Define to 1 if you have the 'readlink' function. */ +#define HAVE_READLINK 1 + +/* Define to 1 if you have the 'recvmsg' function. */ +#define HAVE_RECVMSG 1 + +/* Define to 1 if you have the <resolv.h> header file. */ +#define HAVE_RESOLV_H 1 + +/* Define to 1 if you have the 'res_init' function. */ +#define HAVE_RES_INIT 1 + +/* Do we have Linux routing socket? */ +/* #undef HAVE_RTNETLINK */ + +/* Define to 1 if you have the 'rtprio' function. */ +#define HAVE_RTPRIO 1 + +/* Define to 1 if you have the <runetype.h> header file. */ +#define HAVE_RUNETYPE_H 1 + +/* Obvious */ +#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1 + +/* Define to 1 if you have the <sched.h> header file. */ +#define HAVE_SCHED_H 1 + +/* Define to 1 if you have the 'sched_setscheduler' function. */ +#define HAVE_SCHED_SETSCHEDULER 1 + +/* Define to 1 if you have the 'sched_yield' function. */ +#define HAVE_SCHED_YIELD 1 + +/* Define to 1 if you have the <semaphore.h> header file. */ +#define HAVE_SEMAPHORE_H 1 + +/* Define to 1 if you have the 'sem_timedwait' function. */ +#define HAVE_SEM_TIMEDWAIT 1 + +/* Define to 1 if you have the <setjmp.h> header file. */ +#define HAVE_SETJMP_H 1 + +/* Define to 1 if you have the 'setlinebuf' function. */ +#define HAVE_SETLINEBUF 1 + +/* Define to 1 if you have the 'setpgid' function. */ +#define HAVE_SETPGID 1 + +/* define if setpgrp takes 0 arguments */ +/* #undef HAVE_SETPGRP_0 */ + +/* Define to 1 if you have the 'setpriority' function. */ +#define HAVE_SETPRIORITY 1 + +/* Define to 1 if you have the 'setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the 'setsid' function. */ +#define HAVE_SETSID 1 + +/* Define to 1 if you have the 'settimeofday' function. */ +#define HAVE_SETTIMEOFDAY 1 + +/* Define to 1 if you have the 'setvbuf' function. */ +#define HAVE_SETVBUF 1 + +/* Define to 1 if you have the <sgtty.h> header file. */ +/* #undef HAVE_SGTTY_H */ + +/* Define to 1 if you have the 'sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Can we use SIGIO for tcp and udp IO? */ +/* #undef HAVE_SIGNALED_IO */ + +/* Define to 1 if you have the 'sigset' function. */ +#define HAVE_SIGSET 1 + +/* Define to 1 if you have the 'sigvec' function. */ +#define HAVE_SIGVEC 1 + +/* sigwait() available? */ +#define HAVE_SIGWAIT 1 + +/* Define to 1 if the system has the type 'size_t'. */ +#define HAVE_SIZE_T 1 + +/* Define if C99-compliant `snprintf' is available. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the 'socketpair' function. */ +#define HAVE_SOCKETPAIR 1 + +/* Are Solaris privileges available? */ +/* #undef HAVE_SOLARIS_PRIVS */ + +/* Define to 1 if you have the <stdarg.h> header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the <stdatomic.h> header file. */ +#define HAVE_STDATOMIC_H 1 + +/* Define to 1 if stdbool.h conforms to C99. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the <stddef.h> header file. */ +/* #undef HAVE_STDDEF_H */ + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the 'stime' function. */ +/* #undef HAVE_STIME */ + +/* Define to 1 if you have the 'strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the 'strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the 'strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define if you have 'strerror_r'. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the 'strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the 'strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the <stropts.h> header file. */ +/* #undef HAVE_STROPTS_H */ + +/* Define to 1 if you have the 'strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define to 1 if you have the 'strsignal' function. */ +#define HAVE_STRSIGNAL 1 + +/* Define to 1 if you have the 'strtoll' function. */ +#define HAVE_STRTOLL 1 + +/* Define to 1 if 'decimal_point' is a member of 'struct lconv'. */ +/* #undef HAVE_STRUCT_LCONV_DECIMAL_POINT */ + +/* Define to 1 if 'thousands_sep' is a member of 'struct lconv'. */ +/* #undef HAVE_STRUCT_LCONV_THOUSANDS_SEP */ + +/* Do we have struct ntptimeval? */ +#define HAVE_STRUCT_NTPTIMEVAL 1 + +/* Define to 1 if 'time.tv_nsec' is a member of 'struct ntptimeval'. */ +#define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1 + +/* Does a system header define struct ppsclockev? */ +/* #undef HAVE_STRUCT_PPSCLOCKEV */ + +/* Do we have struct snd_size? */ +#define HAVE_STRUCT_SND_SIZE 1 + +/* Does a system header define struct sockaddr_storage? */ +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 + +/* struct timespec declared? */ +#define HAVE_STRUCT_TIMESPEC 1 + +/* Define to 1 if you have the <sun/audioio.h> header file. */ +/* #undef HAVE_SUN_AUDIOIO_H */ + +/* Define to 1 if you have the <synch.h> header file. */ +/* #undef HAVE_SYNCH_H */ + +/* Define to 1 if you have the 'sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the <sysexits.h> header file. */ +#define HAVE_SYSEXITS_H 1 + +/* syslog.h provides facilitynames */ +#define HAVE_SYSLOG_FACILITYNAMES 1 + +/* Define to 1 if you have the <sys/audioio.h> header file. */ +/* #undef HAVE_SYS_AUDIOIO_H */ + +/* Define to 1 if you have the <sys/capability.h> header file. */ +#define HAVE_SYS_CAPABILITY_H 1 + +/* Define to 1 if you have the <sys/clockctl.h> header file. */ +/* #undef HAVE_SYS_CLOCKCTL_H */ + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines 'DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the <sys/file.h> header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define to 1 if you have the <sys/i8253.h> header file. */ +/* #undef HAVE_SYS_I8253_H */ + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/ipc.h> header file. */ +#define HAVE_SYS_IPC_H 1 + +/* Define to 1 if you have the <sys/limits.h> header file. */ +/* #undef HAVE_SYS_LIMITS_H */ + +/* Define to 1 if you have the <sys/lock.h> header file. */ +#define HAVE_SYS_LOCK_H 1 + +/* Define to 1 if you have the <sys/mac.h> header file. */ +#define HAVE_SYS_MAC_H 1 + +/* Define to 1 if you have the <sys/mman.h> header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the <sys/modem.h> header file. */ +/* #undef HAVE_SYS_MODEM_H */ + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines 'DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/pcl720.h> header file. */ +/* #undef HAVE_SYS_PCL720_H */ + +/* Define to 1 if you have the <sys/poll.h> header file. */ +#define HAVE_SYS_POLL_H 1 + +/* Define to 1 if you have the <sys/ppsclock.h> header file. */ +/* #undef HAVE_SYS_PPSCLOCK_H */ + +/* Define to 1 if you have the <sys/ppstime.h> header file. */ +/* #undef HAVE_SYS_PPSTIME_H */ + +/* Define to 1 if you have the <sys/prctl.h> header file. */ +/* #undef HAVE_SYS_PRCTL_H */ + +/* Define to 1 if you have the <sys/procctl.h> header file. */ +#define HAVE_SYS_PROCCTL_H 1 + +/* Define to 1 if you have the <sys/procset.h> header file. */ +/* #undef HAVE_SYS_PROCSET_H */ + +/* Define to 1 if you have the <sys/proc.h> header file. */ +#define HAVE_SYS_PROC_H 1 + +/* Define to 1 if you have the <sys/resource.h> header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the <sys/sched.h> header file. */ +/* #undef HAVE_SYS_SCHED_H */ + +/* Define to 1 if you have the <sys/select.h> header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the <sys/shm.h> header file. */ +#define HAVE_SYS_SHM_H 1 + +/* Define to 1 if you have the <sys/signal.h> header file. */ +#define HAVE_SYS_SIGNAL_H 1 + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the <sys/sockio.h> header file. */ +#define HAVE_SYS_SOCKIO_H 1 + +/* Define to 1 if you have the <sys/soundcard.h> header file. */ +#define HAVE_SYS_SOUNDCARD_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/stream.h> header file. */ +/* #undef HAVE_SYS_STREAM_H */ + +/* Define to 1 if you have the <sys/stropts.h> header file. */ +/* #undef HAVE_SYS_STROPTS_H */ + +/* Define to 1 if you have the <sys/sysctl.h> header file. */ +#define HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the <sys/syssgi.h> header file. */ +/* #undef HAVE_SYS_SYSSGI_H */ + +/* Define to 1 if you have the <sys/systune.h> header file. */ +/* #undef HAVE_SYS_SYSTUNE_H */ + +/* Define to 1 if you have the <sys/termios.h> header file. */ +#define HAVE_SYS_TERMIOS_H 1 + +/* Define to 1 if you have the <sys/timepps.h> header file. */ +#define HAVE_SYS_TIMEPPS_H 1 + +/* Define to 1 if you have the <sys/timers.h> header file. */ +#define HAVE_SYS_TIMERS_H 1 + +/* Define to 1 if you have the <sys/timex.h> header file. */ +#define HAVE_SYS_TIMEX_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/tpro.h> header file. */ +/* #undef HAVE_SYS_TPRO_H */ + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Use sys/uio.h for struct iovec help */ +/* #undef HAVE_SYS_UIO_H */ + +/* Define to 1 if you have the <sys/un.h> header file. */ +#define HAVE_SYS_UN_H 1 + +/* Define to 1 if you have the <sys/var.h> header file. */ +/* #undef HAVE_SYS_VAR_H */ + +/* Define to 1 if you have the <sys/wait.h> header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if the system has the type 's_char'. */ +/* #undef HAVE_S_CHAR */ + +/* Define to 1 if you have the <termios.h> header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define to 1 if you have the <termio.h> header file. */ +/* #undef HAVE_TERMIO_H */ + +/* if you have Solaris LWP (thr) package */ +/* #undef HAVE_THR */ + +/* Define to 1 if you have the <thread.h> header file. */ +/* #undef HAVE_THREAD_H */ + +/* Define to 1 if you have the 'thr_getconcurrency' function. */ +/* #undef HAVE_THR_GETCONCURRENCY */ + +/* Define to 1 if you have the 'thr_setconcurrency' function. */ +/* #undef HAVE_THR_SETCONCURRENCY */ + +/* Define to 1 if you have the 'thr_yield' function. */ +/* #undef HAVE_THR_YIELD */ + +/* Obvious */ +#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1 + +/* Define to 1 if you have the 'timegm' function. */ +#define HAVE_TIMEGM 1 + +/* Define to 1 if you have the <timepps.h> header file. */ +/* #undef HAVE_TIMEPPS_H */ + +/* Define to 1 if you have the 'timer_create' function. */ +/* #undef HAVE_TIMER_CREATE */ + +/* Define to 1 if you have the <timex.h> header file. */ +/* #undef HAVE_TIMEX_H */ + +/* Define to 1 if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Do we have the TIOCGPPSEV ioctl (Solaris)? */ +/* #undef HAVE_TIOCGPPSEV */ + +/* Do we have the TIOCSPPS ioctl (Solaris)? */ +/* #undef HAVE_TIOCSPPS */ + +/* Do we have the TIO serial stuff? */ +/* #undef HAVE_TIO_SERIAL_STUFF */ + +/* Are TrustedBSD MAC policy privileges available? */ +#define HAVE_TRUSTEDBSD_MAC 1 + +/* Define to 1 if the system has the type 'uint16_t'. */ +#define HAVE_UINT16_T 1 + +/* Define to 1 if the system has the type 'uint32_t'. */ +#define HAVE_UINT32_T 1 + +/* Define to 1 if the system has the type 'uint8_t'. */ +#define HAVE_UINT8_T 1 + +/* Define to 1 if the system has the type 'uintmax_t'. */ +/* #undef HAVE_UINTMAX_T */ + +/* Define to 1 if the system has the type 'uintptr_t'. */ +#define HAVE_UINTPTR_T 1 + +/* Define to 1 if the system has the type 'uint_t'. */ +/* #undef HAVE_UINT_T */ + +/* Define to 1 if you have the 'umask' function. */ +#define HAVE_UMASK 1 + +/* Define to 1 if you have the 'uname' function. */ +#define HAVE_UNAME 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* deviant sigwait? */ +/* #undef HAVE_UNIXWARE_SIGWAIT */ + +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define to 1 if you have the 'updwtmp' function. */ +/* #undef HAVE_UPDWTMP */ + +/* Define to 1 if you have the 'updwtmpx' function. */ +/* #undef HAVE_UPDWTMPX */ + +/* Define to 1 if you have the <utime.h> header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the <utmpx.h> header file. */ +#define HAVE_UTMPX_H 1 + +/* Define to 1 if you have the <utmp.h> header file. */ +/* #undef HAVE_UTMP_H */ + +/* Define to 1 if the system has the type 'u_int32'. */ +/* #undef HAVE_U_INT32 */ + +/* Define to 1 if you have the <values.h> header file. */ +/* #undef HAVE_VALUES_H */ + +/* Define to 1 if you have the <varargs.h> header file. */ +/* #undef HAVE_VARARGS_H */ + +/* Define to 1 if you have the 'vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the <vfork.h> header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the 'vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define if C99-compliant `vsnprintf' is available. */ +#define HAVE_VSNPRINTF 1 + +/* Define to 1 if you have the 'waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the <wchar.h> header file. */ +#define HAVE_WCHAR_H 1 + +/* Define to 1 if the system has the type 'wchar_t'. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if the system has the type 'wint_t'. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if 'fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if 'vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* define if select implicitly yields */ +#define HAVE_YIELDING_SELECT 1 + +/* Define to 1 if the system has the type '_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if you have the '_exit' function. */ +#define HAVE__EXIT 1 + +/* Define to 1 if you have the </sys/sync/queue.h> header file. */ +/* #undef HAVE__SYS_SYNC_QUEUE_H */ + +/* Define to 1 if you have the </sys/sync/sema.h> header file. */ +/* #undef HAVE__SYS_SYNC_SEMA_H */ + +/* Define to 1 if you have the '__adjtimex' function. */ +/* #undef HAVE___ADJTIMEX */ + +/* defined if C compiler supports __attribute__((...)) */ +#define HAVE___ATTRIBUTE__ /**/ + + + /* define away __attribute__() if unsupported */ + #ifndef HAVE___ATTRIBUTE__ + # define __attribute__(x) /* empty */ + #endif + #define ISC_PLATFORM_NORETURN_PRE + #define ISC_PLATFORM_NORETURN_POST __attribute__((__noreturn__)) + + + +/* Define to 1 if you have the '__ntp_gettime' function. */ +/* #undef HAVE___NTP_GETTIME */ + +/* Define to 1 if you have the '__res_init' function. */ +/* #undef HAVE___RES_INIT */ + +/* Does struct sockaddr_storage have __ss_family? */ +/* #undef HAVE___SS_FAMILY_IN_SS */ + + + /* Handle sockaddr_storage.__ss_family */ + #ifdef HAVE___SS_FAMILY_IN_SS + # define ss_family __ss_family + #endif /* HAVE___SS_FAMILY_IN_SS */ + + + +/* Define to provide `rpl_snprintf' function. */ +/* #undef HW_WANT_RPL_SNPRINTF */ + +/* Define to provide `rpl_vsnprintf' function. */ +/* #undef HW_WANT_RPL_VSNPRINTF */ + +/* Retry queries on _any_ DNS error? */ +/* #undef IGNORE_DNS_ERRORS */ + +/* Should we use the IRIG sawtooth filter? */ +/* #undef IRIG_SUCKS */ + +/* Enclose PTHREAD_ONCE_INIT in extra braces? */ +/* #undef ISC_PLATFORM_BRACEPTHREADONCEINIT */ + +/* Do we need to fix in6isaddr? */ +/* #undef ISC_PLATFORM_FIXIN6ISADDR */ + +/* ISC: do we have if_nametoindex()? */ +#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1 + +/* have struct if_laddrconf? */ +/* #undef ISC_PLATFORM_HAVEIF_LADDRCONF */ + +/* have struct if_laddrreq? */ +/* #undef ISC_PLATFORM_HAVEIF_LADDRREQ */ + +/* have struct in6_pktinfo? */ +#define ISC_PLATFORM_HAVEIN6PKTINFO 1 + +/* have IPv6? */ +#define ISC_PLATFORM_HAVEIPV6 1 + +/* struct sockaddr has sa_len? */ +#define ISC_PLATFORM_HAVESALEN 1 + +/* sin6_scope_id? */ +#define ISC_PLATFORM_HAVESCOPEID 1 + +/* missing in6addr_any? */ +/* #undef ISC_PLATFORM_NEEDIN6ADDRANY */ + +/* Do we need netinet6/in6.h? */ +/* #undef ISC_PLATFORM_NEEDNETINET6IN6H */ + +/* ISC: provide inet_ntop() */ +/* #undef ISC_PLATFORM_NEEDNTOP */ + +/* Declare in_port_t? */ +/* #undef ISC_PLATFORM_NEEDPORTT */ + +/* ISC: provide inet_pton() */ +/* #undef ISC_PLATFORM_NEEDPTON */ + +/* enable libisc thread support? */ +#define ISC_PLATFORM_USETHREADS 1 + +/* Does the kernel have an FLL bug? */ +/* #undef KERNEL_FLL_BUG */ + +/* Does the kernel support precision time discipline? */ +#define KERNEL_PLL 1 + +/* Define to use libseccomp system call filtering. */ +/* #undef KERN_SECCOMP */ + +/* 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" + +/* What is the name of TICKADJ in the kernel? */ +#define K_TICKADJ_NAME "_tickadj" + +/* What is the name of TICK in the kernel? */ +#define K_TICK_NAME "_tick" + +/* define to 1 if library is thread safe */ +#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1 + +/* leap smear mechanism */ +#define LEAP_SMEAR 1 + +/* Define to any value to include libseccomp sandboxing. */ +/* #undef LIBSECCOMP */ + +/* Should we align with the NIST lockclock scheme? */ +/* #undef LOCKCLOCK */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Does the target support multicast IP? */ +#define MCAST 1 + +/* Should we recommend a minimum value for tickadj? */ +/* #undef MIN_REC_TICKADJ */ + +/* Define to 1 if the compiler does not support C99's structure + initialization. */ +/* #undef MISSING_C99_STRUCT_INIT */ + +/* having to fork the DNS worker early when doing chroot? */ +/* #undef NEED_EARLY_FORK */ + +/* Do we need HPUX adjtime() library support? */ +/* #undef NEED_HPUX_ADJTIME */ + +/* Do we want the HPUX FindConfig()? */ +/* #undef NEED_HPUX_FINDCONFIG */ + +/* We need to provide netsnmp_daemonize() */ +/* #undef NEED_NETSNMP_DAEMONIZE */ + +/* pthread_init() required? */ +/* #undef NEED_PTHREAD_INIT */ + +/* use PTHREAD_SCOPE_SYSTEM? */ +/* #undef NEED_PTHREAD_SCOPE_SYSTEM */ + +/* Do we need the qnx adjtime call? */ +/* #undef NEED_QNX_ADJTIME */ + +/* Do we need extra room for SO_RCVBUF? (HPUX < 8) */ +/* #undef NEED_RCVBUF_SLOP */ + +/* Do we need an s_char typedef? */ +#define NEED_S_CHAR_TYPEDEF 1 + +/* Might nlist() values require an extra level of indirection (AIX)? */ +/* #undef NLIST_EXTRA_INDIRECTION */ + +/* does struct nlist use a name union? */ +/* #undef NLIST_NAME_UNION */ + +/* nlist stuff */ +#define NLIST_STRUCT 1 + +/* Should we NOT read /dev/kmem? */ +#define NOKMEM 1 + +/* Should we avoid #warning on option name collisions? */ +/* #undef NO_OPTION_NAME_WARNINGS */ + +/* Is there a problem using PARENB and IGNPAR? */ +/* #undef NO_PARENB_IGNPAR */ + +/* define if you have (or want) no threads */ +/* #undef NO_THREADS */ + +/* Default location of crypto key info */ +#define NTP_KEYSDIR "/usr/local/etc" + +/* Path to sign daemon rendezvous socket */ +/* #undef NTP_SIGND_PATH */ + +/* 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 support for SHMEM_STATUS? */ +#define ONCORE_SHMEM_STATUS 1 + +/* Suppress OpenSSL 3 deprecation warnings */ +#define OPENSSL_SUPPRESS_DEPRECATED 1 + +/* Should we open the broadcast socket? */ +#define OPEN_BCAST_SOCKET 1 + +/* need to recreate sockets on changed routing? */ +/* #undef OS_MISSES_SPECIFIC_ROUTE_UPDATES */ + +/* wildcard socket needs REUSEADDR to bind interface addresses */ +/* #undef OS_NEEDS_REUSEADDR_FOR_IFADDRBIND */ + +/* Do we need to override the system's idea of HZ? */ +#define OVERRIDE_HZ 1 + +/* Name of package */ +#define PACKAGE "ntp" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.ntp.org/" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "ntp" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "ntp 4.2.8p18" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "ntp" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://www.ntp.org/" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "4.2.8p18" + +/* data dir */ +#define PERLLIBDIR "/usr/local/share/ntp/lib" + +/* define to a working POSIX compliant shell */ +#define POSIX_SHELL "/bin/bash" + +/* PARSE kernel PLL PPS support */ +/* #undef PPS_SYNC */ + +/* Preset a value for 'tick'? */ +#define PRESET_TICK 1000000L/hz + +/* Preset a value for 'tickadj'? */ +#define PRESET_TICKADJ 500/hz + +/* Should we not IGNPAR (Linux)? */ +/* #undef RAWDCF_NO_IGNPAR */ + +/* enable thread safety */ +#define REENTRANT 1 + +/* Basic refclock support? */ +#define REFCLOCK 1 + +/* Do we want the ReliantUNIX clock hacks? */ +/* #undef RELIANTUNIX_CLOCK */ + +/* define if sched_yield yields the entire process */ +/* #undef REPLACE_BROKEN_YIELD */ + +/* Define as the return type of signal handlers ('int' or 'void'). */ +#define RETSIGTYPE void + +/* saveconfig mechanism */ +#define SAVECONFIG 1 + +/* Do we want the SCO clock hacks? */ +/* #undef SCO5_CLOCK */ + +/* The size of `char *', as computed by sizeof. */ +#ifdef __LP64__ +#define SIZEOF_CHAR_P 8 +#else +#define SIZEOF_CHAR_P 4 +#endif + +/* The size of 'int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#ifdef __LP64__ +#define SIZEOF_LONG 8 +#else +#define SIZEOF_LONG 4 +#endif + +/* The size of 'long long', as computed by sizeof. */ +#define SIZEOF_LONG_LONG 8 + +/* The size of 'pthread_t', as computed by sizeof. */ +#define SIZEOF_PTHREAD_T 8 + +/* The size of 'short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of 'signed char', as computed by sizeof. */ +#define SIZEOF_SIGNED_CHAR 1 + +/* The size of `time_t', as computed by sizeof. */ +#if defined(__i386__) +#define SIZEOF_TIME_T 4 +#else +#define SIZEOF_TIME_T 8 +#endif + +/* Does SIOCGIFCONF return size in the buffer? */ +/* #undef SIZE_RETURNED_IN_BUFFER */ + +/* Slew always? */ +/* #undef SLEWALWAYS */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Step, then slew the clock? */ +/* #undef STEP_SLEW */ + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* canonical system (cpu-vendor-os) of where we should run */ +#if defined(__amd64__) +#define STR_SYSTEM "amd64-undermydesk-freebsd" +#elif defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define STR_SYSTEM "powerpc64le-undermydesk-freebsd" +#elif defined(__powerpc64__) +#define STR_SYSTEM "powerpc64-undermydesk-freebsd" +#elif defined(__powerpc__) +#define STR_SYSTEM "powerpc-undermydesk-freebsd" +#elif defined(__aarch64__) +#define STR_SYSTEM "arm64-undermydesk-freebsd" +#elif defined(__arm__) +#define STR_SYSTEM "arm-undermydesk-freebsd" +#elif defined(__riscv) +#define STR_SYSTEM "riscv64-undermydesk-freebsd" +#else +#define STR_SYSTEM "i386-undermydesk-freebsd" +#endif + +/* Does Xettimeofday take 1 arg? */ +/* #undef SYSV_TIMEOFDAY */ + +/* Do we need to #define _SVID3 when we #include <termios.h>? */ +/* #undef TERMIOS_NEEDS__SVID3 */ + +/* enable thread safety */ +#define THREADSAFE 1 + +/* enable thread safety */ +#define THREAD_SAFE 1 + +/* Is K_TICKADJ_NAME in nanoseconds? */ +/* #undef TICKADJ_NANO */ + +/* Is K_TICK_NAME in nanoseconds? */ +/* #undef TICK_NANO */ + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if your <sys/time.h> declares 'struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Provide a typedef for uintptr_t? */ +#ifndef HAVE_UINTPTR_T +typedef unsigned int uintptr_t; +#define HAVE_UINTPTR_T 1 +#endif + +/* What type to use for setsockopt */ +#define TYPEOF_IP_MULTICAST_LOOP u_char + +/* Do we set process groups with -pid? */ +/* #undef UDP_BACKWARDS_SETOWN */ + +/* Must we have a CTTY for fsetown? */ +#define USE_FSETOWNCTTY 1 + +/* Use OpenSSL's crypto random functions */ +#define USE_OPENSSL_CRYPTO_RAND 1 + +/* OK to use snprintb()? */ +/* #undef USE_SNPRINTB */ + +/* Enable extensions on AIX, Interix, z/OS. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# define _HPUX_ALT_XOPEN_SOCKET_API 1 +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +/* # undef _MINIX */ +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# define _NETBSD_SOURCE 1 +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# define _OPENBSD_SOURCE 1 +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +/* # undef _POSIX_SOURCE */ +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +/* # undef _POSIX_1_SOURCE */ +#endif +/* Enable POSIX-compatible threading on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# define __STDC_WANT_IEC_60559_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif + + +/* Can we use SIGPOLL for tty IO? */ +/* #undef USE_TTY_SIGPOLL */ + +/* Can we use SIGPOLL for UDP? */ +/* #undef USE_UDP_SIGPOLL */ + +/* Version number of package */ +#define VERSION "4.2.8p18" + +/* vsnprintf expands "%m" to strerror(errno) */ +#define VSNPRINTF_PERCENT_M 1 + +/* configure --enable-ipv6 */ +#define WANT_IPV6 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined(__ARMEB__) || defined(__MIPSEB__) || \ + (defined(__powerpc__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +#define WORDS_BIGENDIAN 1 +#endif + +/* routine worker child proc uses to exit. */ +#define WORKER_CHILD_EXIT exit + +/* enable thread safety */ +#define _REENTRANT 1 + +/* enable thread safety */ +#define _SGI_MP_SOURCE 1 + +/* enable thread safety */ +#define _THREADSAFE 1 + +/* enable thread safety */ +#define _THREAD_SAFE 1 + +/* Are we _special_? */ +/* #undef __APPLE_USE_RFC_3542 */ + +/* Define to 1 if type 'char' is unsigned and your compiler does not + predefine this macro. */ +#ifndef __CHAR_UNSIGNED__ +/* # undef __CHAR_UNSIGNED__ */ +#endif + +/* deviant */ +/* #undef adjtimex */ + +/* Define to empty if 'const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define as 'int' if <sys/types.h> doesn't define. */ +/* #undef gid_t */ + +/* Define to '__inline__' or '__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do + not define. */ +/* #undef intmax_t */ + +/* deviant */ +/* #undef ntp_adjtime */ + +/* deviant */ +/* #undef ntp_gettime */ + +/* Define to 'long int' if <sys/types.h> does not define. */ +/* #undef off_t */ + +/* Define as a signed integer type capable of holding a process identifier. */ +/* #undef pid_t */ + +/* Define as 'unsigned int' if <stddef.h> doesn't define. */ +/* #undef size_t */ + + #include "c99_snprintf.h" + +/* Define to rpl_snprintf if the replacement function should be used. */ +/* #undef snprintf */ + +/* Define as 'int' if <sys/types.h> doesn't define. */ +/* #undef uid_t */ + +/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h> + do not define. */ +/* #undef uintmax_t */ + +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +/* #undef uintptr_t */ + +/* Define as 'fork' if 'vfork' does not work. */ +/* #undef vfork */ + +/* Define to empty if the keyword 'volatile' does not work. Warning: valid + code using 'volatile' can become incorrect without. Disable with care. */ +/* #undef volatile */ + +/* Define to rpl_vsnprintf if the replacement function should be used. */ +/* #undef vsnprintf */ + + +#ifndef MPINFOU_PREDECLARED +# define MPINFOU_PREDECLARED +typedef union mpinfou { + struct pdk_mpinfo *pdkptr; + struct mpinfo *pikptr; +} mpinfou_t; +#endif + + + + #if !defined(_KERNEL) && !defined(PARSESTREAM) + # if defined(HW_WANT_RPL_VSNPRINTF) + # if defined(__cplusplus) + extern "C" { + # endif + # include <stdarg.h> + int rpl_vsnprintf(char *, size_t, const char *, va_list); + # if defined(__cplusplus) + } + # endif + # endif + # if defined(HW_WANT_RPL_SNPRINTF) + # if defined(__cplusplus) + extern "C" { + # endif + int rpl_snprintf(char *, size_t, const char *, ...); + # if defined(__cplusplus) + } + # endif + # endif + #endif /* !defined(_KERNEL) && !defined(PARSESTREAM) */ + + /* + * Macro to use in otherwise-empty source files to comply with ANSI C + * requirement that each translation unit (source file) contain some + * declaration. This has commonly been done by declaring an unused + * global variable of type int or char. An extern reference to abs() + * serves the same purpose without bloat. We once used exit() but + * that can produce warnings on systems that declare exit() noreturn. + */ + #define NONEMPTY_TRANSLATION_UNIT extern int abs(int); + +/* + * FreeBSD specific: Explicitly specify date/time for reproducible build. + */ +#define MKREPRO_DATE "Aug 19 2018" +#define MKREPRO_TIME "01:24:29" + +#define HAVE_CLOSEFROM 1 diff --git a/usr.sbin/ntp/doc/Makefile b/usr.sbin/ntp/doc/Makefile new file mode 100644 index 000000000000..b122df4f095b --- /dev/null +++ b/usr.sbin/ntp/doc/Makefile @@ -0,0 +1,69 @@ +.include <src.opts.mk> + +PACKAGE=ntp +SUBDIR= drivers hints icons pic scripts + +FILESDIR= ${SHAREDIR}/doc/ntp + +.if ${MK_HTML} != "no" +FILES= access.html accopt.html assoc.html audio.html authentic.html \ + authopt.html autokey.html bugs.html build.html clock.html \ + clockopt.html cluster.html comdex.html config.html confopt.html \ + copyright.html debug.html decode.html discipline.html discover.html \ + extern.html filter.html hints.html history.html howto.html \ + huffpuff.html index.html kern.html kernpps.html keygen.html leap.html \ + miscopt.html monopt.html msyslog.html ntp-keygen.html ntp-wait.html \ + ntp.conf.html ntp.keys.html ntp_conf.html ntpd.html ntpdate.html \ + ntpdc.html ntpdsim.html ntpdsim_new.html ntpq.html ntpsnmpd.html \ + ntptime.html ntptrace.html orphan.html parsedata.html \ + parsenew.html poll.html pps.html prefer.html quick.html rate.html \ + rdebug.html refclock.html release.html select.html sitemap.html \ + sntp.html stats.html tickadj.html warp.html xleave.html +.endif + +MAN= ntp.conf.5 ntp.keys.5 +MAN+= ntp-keygen.8 ntpd.8 ntpdate.8 ntpdc.8 ntpq.8 ntptime.8 sntp.8 + +CLEANFILES= ntp.conf.5 ntp.keys.5 +CLEANFILES+= ntp-keygen.8 ntpd.8 ntpdc.8 ntpq.8 sntp.8 + +SUFFIXES8= .1ntp-keygenmdoc \ + .1ntpdmdoc \ + .1ntpdcmdoc \ + .1ntpqmdoc \ + .1sntpmdoc + +.SUFFIXES: .html .5 .8 .5mdoc ${SUFFIXES8} + +.5mdoc.5: + sed '/^\.Dt /s/5mdoc/5/' ${.ALLSRC} > ${.TARGET} + +.for s in ${SUFFIXES8} +$s.8: + sed '/^\.Dt /s/1[a-z-][a-z-]*/8/' ${.ALLSRC} > ${.TARGET} +.endfor + +ntp.conf.5: ntp.conf.5mdoc + +ntp.keys.5: ntp.keys.5mdoc + +ntp-keygen.8: ntp-keygen.1ntp-keygenmdoc + +ntpd.8: ntpd.1ntpdmdoc + +ntpdc.8: ntpdc.1ntpdcmdoc + +ntpq.8: ntpq.1ntpqmdoc + +sntp.8: sntp.1sntpmdoc + +.PATH: ${SRCTOP}/contrib/ntp/html \ + ${SRCTOP}/contrib/ntp/util \ + ${SRCTOP}/contrib/ntp/ntpd \ + ${SRCTOP}/contrib/ntp/ntpdc \ + ${SRCTOP}/contrib/ntp/ntpq \ + ${SRCTOP}/contrib/ntp/ntpsnmpd \ + ${SRCTOP}/contrib/ntp/sntp \ + ${SRCTOP}/contrib/ntp/util + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/doc/Makefile.depend b/usr.sbin/ntp/doc/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/ntp/doc/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/doc/drivers/Makefile b/usr.sbin/ntp/doc/drivers/Makefile new file mode 100644 index 000000000000..6186e15eaba7 --- /dev/null +++ b/usr.sbin/ntp/doc/drivers/Makefile @@ -0,0 +1,20 @@ +.include <src.opts.mk> + +PACKAGE= ntp +SUBDIR= icons scripts +FILESDIR= ${SHAREDIR}/doc/ntp/drivers + +.if ${MK_HTML} != "no" +FILES= driver1.html driver10.html driver11.html driver12.html driver16.html \ + driver18.html driver19.html driver20.html driver22.html driver26.html \ + driver27.html driver28.html driver29.html driver3.html driver30.html \ + driver31.html driver32.html driver33.html driver34.html driver35.html \ + driver36.html driver37.html driver38.html driver39.html driver4.html \ + driver40.html driver42.html driver43.html driver44.html driver45.html \ + driver46.html driver5.html driver6.html driver7.html driver8.html \ + driver9.html mx4200data.html oncore-shmem.html tf582_4.html +.endif + +.PATH: ${SRCTOP}/contrib/ntp/html/drivers + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/doc/drivers/Makefile.depend b/usr.sbin/ntp/doc/drivers/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/ntp/doc/drivers/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/doc/drivers/icons/Makefile b/usr.sbin/ntp/doc/drivers/icons/Makefile new file mode 100644 index 000000000000..dbaaff0da9c9 --- /dev/null +++ b/usr.sbin/ntp/doc/drivers/icons/Makefile @@ -0,0 +1,12 @@ +.include <src.opts.mk> + +PACKAGE= ntp +FILESDIR= ${SHAREDIR}/doc/ntp/drivers/icons + +.if ${MK_HTML} != "no" +FILES= home.gif mail2.gif +.endif + +.PATH: ${SRCTOP}/contrib/ntp/html/drivers/icons + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/doc/drivers/icons/Makefile.depend b/usr.sbin/ntp/doc/drivers/icons/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/ntp/doc/drivers/icons/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/doc/drivers/scripts/Makefile b/usr.sbin/ntp/doc/drivers/scripts/Makefile new file mode 100644 index 000000000000..a49f9d3388a4 --- /dev/null +++ b/usr.sbin/ntp/doc/drivers/scripts/Makefile @@ -0,0 +1,12 @@ +.include <src.opts.mk> + +PACKAGE= ntp +FILESDIR= ${SHAREDIR}/doc/ntp/drivers/scripts + +.if ${MK_HTML} != "no" +FILES= footer.txt style.css +.endif + +.PATH: ${SRCTOP}/contrib/ntp/html/drivers/scripts + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/doc/drivers/scripts/Makefile.depend b/usr.sbin/ntp/doc/drivers/scripts/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/ntp/doc/drivers/scripts/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/doc/hints/Makefile b/usr.sbin/ntp/doc/hints/Makefile new file mode 100644 index 000000000000..5bd25363ea0e --- /dev/null +++ b/usr.sbin/ntp/doc/hints/Makefile @@ -0,0 +1,16 @@ +.include <src.opts.mk> + +PACKAGE= ntp +FILESDIR= ${SHAREDIR}/doc/ntp/hints + +.if ${MK_HTML} != "no" +FILES= a-ux aix bsdi changes decosf1 decosf2 freebsd hpux linux mpeix \ + notes-xntp-v3 parse refclocks rs6000 sco.html sgi \ + solaris-dosynctodr.html solaris.html solaris.xtra.4023118 \ + solaris.xtra.4095849 solaris.xtra.S99ntpd solaris.xtra.patchfreq \ + sun4 svr4-dell svr4_package todo vxworks.html winnt.html +.endif + +.PATH: ${SRCTOP}/contrib/ntp/html/hints + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/doc/hints/Makefile.depend b/usr.sbin/ntp/doc/hints/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/ntp/doc/hints/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/doc/icons/Makefile b/usr.sbin/ntp/doc/icons/Makefile new file mode 100644 index 000000000000..6f34ea8c384e --- /dev/null +++ b/usr.sbin/ntp/doc/icons/Makefile @@ -0,0 +1,12 @@ +.include <src.opts.mk> + +PACKAGE= ntp +FILESDIR= ${SHAREDIR}/doc/ntp/icons + +.if ${MK_HTML} != "no" +FILES= home.gif mail2.gif sitemap.png +.endif + +.PATH: ${SRCTOP}/contrib/ntp/html/icons + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/doc/icons/Makefile.depend b/usr.sbin/ntp/doc/icons/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/ntp/doc/icons/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/doc/ntpdate.8 b/usr.sbin/ntp/doc/ntpdate.8 new file mode 100644 index 000000000000..fb10cc94089d --- /dev/null +++ b/usr.sbin/ntp/doc/ntpdate.8 @@ -0,0 +1,277 @@ +.\" +.Dd May 17, 2006 +.Dt NTPDATE 8 +.Os +.Sh NAME +.Nm ntpdate +.Nd set the date and time via NTP +.Sh SYNOPSIS +.Nm +.Op Fl 46bBdoqsuv +.Op Fl a Ar key +.Op Fl e Ar authdelay +.Op Fl k Ar keyfile +.Op Fl o Ar version +.Op Fl p Ar samples +.Op Fl t Ar timeout +.Ar server ... +.Sh DESCRIPTION +.Em Note : +The functionality of this program is now available +in the +.Xr ntpd 8 +program. +See the +.Fl q +command line +option in the +.Xr ntpd 8 +page. +After a suitable period of +mourning, the +.Nm +utility is to be retired from this +distribution. +.Pp +The +.Nm +utility sets the local date and time by polling the +Network Time Protocol (NTP) server(s) given as the +.Ar server +arguments to determine the correct time. +It must be run as root on +the local host. +A number of samples are obtained from each of the +servers specified and a subset of the NTP clock filter and +selection algorithms are applied to select the best of these. +Note +that the accuracy and reliability of +.Nm +depends on +the number of servers, the number of polls each time it is run and +the interval between runs. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl 4 +Force DNS resolution of following host names on the command line to the +IPv4 namespace. +.It Fl 6 +Force DNS resolution of following host names on the command line to the +IPv6 namespace. +.It Fl a Ar key +Enable the authentication function and specify the key +identifier to be used for authentication as the argument +.Ar key . +The keys and key identifiers must match +in both the client and server key files. +The default is to disable +the authentication function. +.It Fl B +Force the time to always be slewed using the +.Xr adjtime 2 +system +call, even if the measured offset is greater than +-128 ms. +The +default is to step the time using +.Xr settimeofday 2 +if the offset is +greater than +-128 ms. +Note that, if the offset is much greater +than +-128 ms in this case, it can take a long time (hours) to +slew the clock to the correct value. +During this time, the host +should not be used to synchronize clients. +.It Fl b +Force the time to be stepped using the +.Xr settimeofday 2 +system +call, rather than slewed (default) using the +.Xr adjtime 2 +system call. +This option should be used when called from a startup file at boot +time. +.It Fl d +Enable the debugging mode, in which +.Nm +will go +through all the steps, but not adjust the local clock. +Information +useful for general debugging will also be printed. +.It Fl e Ar authdelay +Specify the processing delay to perform an authentication +function as the value +.Ar authdelay , +in seconds and fraction +(see +.Xr ntpd 8 +for details). +This number is usually small +enough to be negligible for most purposes, though specifying a +value may improve timekeeping on very slow CPU's. +.It Fl k Ar keyfile +Specify the path for the authentication key file as the string +.Ar keyfile . +The default is +.Pa /etc/ntp.keys . +This file +should be in the format described in +.Xr ntpd 8 . +.It Fl o Ar version +Specify the NTP version for outgoing packets as the integer +.Ar version , +which can be 1 or 2. +The default is 3. +This allows +.Nm +to be used with older NTP versions. +.It Fl p Ar samples +Specify the number of samples to be acquired from each server +as the integer +.Ar samples , +with values from 1 to 8 inclusive. +The default is 4. +.It Fl q +Query only - do not set the clock. +.It Fl s +Divert logging output from the standard output (default) to the +system +.Xr syslog 3 +facility. +This is designed primarily for +convenience of +.Xr cron 8 +scripts. +.It Fl t Ar timeout +Specify the maximum time waiting for a server response as the +value +.Ar timeout , +in seconds and fraction. +The value is +rounded to a multiple of 0.2 seconds. +The default is 1 second, a +value suitable for polling across a LAN. +.It Fl u +Direct +.Nm +to use an unprivileged port for outgoing +packets. +This is most useful when behind a firewall that blocks +incoming traffic to privileged ports, and you want to synchronise +with hosts beyond the firewall. +Note that the +.Fl d +option +always uses unprivileged ports. +.It Fl v +Be verbose. +This option will cause +.Nm Ns 's +version +identification string to be logged. +.El +.Pp +The +.Nm +utility can be run manually as necessary to set the +host clock, or it can be run from the host startup script to set +the clock at boot time. +This is useful in some cases to set the +clock initially before starting the NTP daemon +.Xr ntpd 8 . +It is +also possible to run +.Nm +from a +.Xr cron 8 +script. +However, it is important to note that +.Nm +with +contrived +.Xr cron 8 +scripts is no substitute for the NTP +daemon, which uses sophisticated algorithms to maximize accuracy +and reliability while minimizing resource use. +Finally, since +.Nm +does not discipline the host clock frequency as +does +.Xr ntpd 8 , +the accuracy using +.Nm +is +limited. +.Pp +Time adjustments are made by +.Nm +in one of two +ways. +If +.Nm +determines the clock is in error more +than 0.5 second it will simply step the time by calling the system +.Xr settimeofday 2 +routine. +If the error is less than 0.5 +seconds, it will slew the time by calling the system +.Xr adjtime 2 +routine. +The latter technique is less disruptive +and more accurate when the error is small, and works quite well +when +.Nm +is run by +.Xr cron 8 +every hour or +two. +.Pp +The +.Nm +utility will decline to set the date if an NTP server +daemon (e.g., +.Xr ntpd 8 ) +is running on the same host. +When +running +.Nm +on a regular basis from +.Xr cron 8 +as +an alternative to running a daemon, doing so once every hour or two +will result in precise enough timekeeping to avoid stepping the +clock. +.Pp +Note that in contexts where a host name is expected, a +.Fl 4 +qualifier preceding the host name forces DNS resolution to the +IPv4 namespace, while a +.Fl 6 +qualifier forces DNS resolution to the IPv6 namespace. +.Pp +If NetInfo support is compiled into +.Nm , +then the +.Cm server +argument is optional if +.Nm +can find a +time server in the NetInfo configuration for +.Xr ntpd 8 . +.Sh FILES +.Bl -tag -width /etc/ntp.keys -compact +.It Pa /etc/ntp.keys +contains the encryption keys used by +.Nm . +.El +.Sh SEE ALSO +.Xr ntpd 8 +.Sh BUGS +The slew adjustment is actually 50% larger than the measured +offset, since this (it is argued) will tend to keep a badly +drifting clock more accurate. +This is probably not a good idea and +may cause a troubling hunt for some values of the kernel variables +.Va kern.clockrate.tick +and +.Va kern.clockrate.tickadj . diff --git a/usr.sbin/ntp/doc/ntptime.8 b/usr.sbin/ntp/doc/ntptime.8 new file mode 100644 index 000000000000..c9a3aebaae68 --- /dev/null +++ b/usr.sbin/ntp/doc/ntptime.8 @@ -0,0 +1,65 @@ +.\" +.Dd April 27, 2015 +.Dt NTPTIME 8 +.Os +.Sh NAME +.Nm ntptime +.Nd read kernel time variables +.Sh SYNOPSIS +.Nm +.Op Fl chr +.Op Fl e Ar est_error +.Op Fl f Ar frequency +.Op Fl m Ar max_error +.Op Fl o Ar offset +.Op Fl s Ar status +.Op Fl t Ar time_constant +.Sh DESCRIPTION +The +.Nm +utility is useful only with special kernels +described in the +.Qo +A Kernel Model for Precision Timekeeping +.Qc +page +(available as part of the HTML documentation +provided in +.Pa /usr/share/doc/ntp ) . +It reads and displays time-related kernel variables +using the +.Fn gettime +and +.Xr adjtime 2 +system calls if available. +A similar display can be obtained using the +.Xr ntpdc 8 +program's +.Ic kerninfo +command. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl c +Display the execution time of +.Nm +itself. +.It Fl e Ar est_error +Specify estimated error, in microseconds. +.It Fl f Ar frequency +Specify frequency offset, in parts per million. +.It Fl h +Display help information. +.It Fl m Ar max_error +Specify max possible errors, in microseconds. +.It Fl o Ar offset +Specify clock offset, in microseconds. +.It Fl r +Display Unix and NTP times in raw format. +.It Fl s Ar status +.It Fl t Ar time_constant +Specify time constant, an integer in the range 0-4. +.El +.Sh SEE ALSO +.Xr adjtime 2 , +.Xr ntpdc 8 diff --git a/usr.sbin/ntp/doc/ntptrace.8 b/usr.sbin/ntp/doc/ntptrace.8 new file mode 100644 index 000000000000..20fad744819a --- /dev/null +++ b/usr.sbin/ntp/doc/ntptrace.8 @@ -0,0 +1,91 @@ +.Dd February 4 2015 +.Dt NTPTRACE 8 User Commands +.Os +.\" EDIT THIS FILE WITH CAUTION (ntptrace-opts.mdoc) +.\" +.\" It has been AutoGen-ed February 4, 2015 at 02:37:48 AM by AutoGen 5.18.5pre4 +.\" From the definitions ntptrace-opts.def +.\" and the template file agmdoc-cmd.tpl +.Sh NAME +.Nm ntptrace +.Nd Trace peers of an NTP server +.Sh SYNOPSIS +.Nm +.\" Mixture of short (flag) options and long options +.Op Fl flags +.Op Fl flag Op Ar value +.Op Fl \-option\-name Ns Oo Oo Ns "=| " Oc Ns Ar value Oc +[host] +.Pp +.Sh DESCRIPTION +\fBntptrace\fP is a perl script that uses the ntpq utility program to follow +the chain of NTP servers from a given host back to the primary time source. For +ntptrace to work properly, each of these servers must implement the NTP Control +and Monitoring Protocol specified in RFC 1305 and enable NTP Mode 6 packets. +.sp +If given no arguments, ntptrace starts with localhost. Here is an example of +the output from ntptrace: +.sp +.Bd -literal -offset indent +% ntptrace localhost: stratum 4, offset 0.0019529, synch distance 0.144135 +server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784 usndh.edu: +stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB' +.Ed +.sp +On each line, the fields are (left to right): the host name, the host stratum, +the time offset between that host and the local host (as measured by +\fBntptrace\fP; this is why it is not always zero for "localhost"), the host +synchronization distance, and (only for stratum\-1 servers) the reference clock +ID. All times are given in seconds. Note that the stratum is the server hop +count to the primary source, while the synchronization distance is the +estimated error relative to the primary source. These terms are precisely +defined in RFC\-1305. +.Sh "OPTIONS" +.Bl -tag +.It Fl n , Fl \-numeric +Print IP addresses instead of hostnames. +.sp +Output hosts as dotted\-quad numeric format rather than converting to +the canonical host names. +.It Fl m Ar number , Fl \-max\-hosts Ns = Ns Ar number +Maximum number of peers to trace. +This option takes an integer number as its argument. +The default +.Ar number +for this option is: +.ti +4 + 99 +.sp +This option has not been fully documented. +.It Fl r Ar string , Fl \-host Ns = Ns Ar string +Single remote host. +The default +.Ar string +for this option is: +.ti +4 + 127.0.0.1 +.sp +This option has not been fully documented. +.It Fl \&? , Fl \-help +Display usage information and exit. +.It Fl \&! , Fl \-more\-help +Pass the extended usage information through a pager. +.It Fl v Op Brq Ar v|c|n Fl \-version Op Brq Ar v|c|n +Output version of program and exit. The default mode is `v', a simple +version. The `c' mode will print copyright information and `n' will +print the full copyright notice. +.El +.Sh "EXIT STATUS" +One of the following exit values will be returned: +.Bl -tag +.It 0 " (EXIT_SUCCESS)" +Successful program execution. +.It 1 " (EXIT_FAILURE)" +The operation failed or the command syntax was not valid. +.It 70 " (EX_SOFTWARE)" +libopts had an internal operational error. Please report +it to autogen\-users@lists.sourceforge.net. Thank you. +.El +.Sh "NOTES" +This manual page was \fIAutoGen\fP\-erated from the \fBntptrace\fP +option definitions. diff --git a/usr.sbin/ntp/doc/pic/Makefile b/usr.sbin/ntp/doc/pic/Makefile new file mode 100644 index 000000000000..2ebf72fe2f00 --- /dev/null +++ b/usr.sbin/ntp/doc/pic/Makefile @@ -0,0 +1,26 @@ +.include <src.opts.mk> + +PACKAGE= ntp +FILESDIR= ${SHAREDIR}/doc/ntp/pic + +.if ${MK_HTML} != "no" +FILES= 9400n.jpg alice11.gif alice13.gif alice15.gif alice23.gif \ + alice31.gif alice32.gif alice35.gif alice38.gif alice44.gif \ + alice47.gif alice51.gif alice61.gif barnstable.gif beaver.gif \ + boom3.gif boom3a.gif boom4.gif broad.gif bustardfly.gif c51.jpg \ + description.jpg discipline.gif dogsnake.gif driver29.gif \ + driver43_1.gif driver43_2.jpg fg6021.gif fg6039.jpg fig_3_1.gif \ + flatheads.gif flt1.gif flt2.gif flt3.gif flt4.gif flt5.gif flt6.gif \ + flt7.gif flt8.gif flt9.gif freq1211.gif gadget.jpg gps167.jpg \ + group.gif hornraba.gif igclock.gif neoclock4x.gif offset1211.gif \ + oncore_evalbig.gif oncore_remoteant.jpg oncore_utplusbig.gif oz2.gif \ + panda.gif pd_om006.gif pd_om011.gif peer.gif pogo.gif pogo1a.gif \ + pogo3a.gif pogo4.gif pogo5.gif pogo6.gif pogo7.gif pogo8.gif \ + pzf509.jpg pzf511.jpg rabbit.gif radio2.jpg sheepb.jpg stack1a.jpg \ + stats.gif sx5.gif thunderbolt.jpg time1.gif tonea.gif tribeb.gif \ + wingdorothy.gif +.endif + +.PATH: ${SRCTOP}/contrib/ntp/html/pic + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/doc/pic/Makefile.depend b/usr.sbin/ntp/doc/pic/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/ntp/doc/pic/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/doc/scripts/Makefile b/usr.sbin/ntp/doc/scripts/Makefile new file mode 100644 index 000000000000..19c2d775bc44 --- /dev/null +++ b/usr.sbin/ntp/doc/scripts/Makefile @@ -0,0 +1,14 @@ +.include <src.opts.mk> + +PACKAGE= ntp +FILESDIR= ${SHAREDIR}/doc/ntp/scripts + +.if ${MK_HTML} != "no" +FILES= accopt.txt audio.txt authopt.txt clockopt.txt command.txt config.txt \ + confopt.txt external.txt footer.txt hand.txt install.txt manual.txt \ + misc.txt miscopt.txt monopt.txt refclock.txt special.txt style.css +.endif + +.PATH: ${SRCTOP}/contrib/ntp/html/scripts + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/doc/scripts/Makefile.depend b/usr.sbin/ntp/doc/scripts/Makefile.depend new file mode 100644 index 000000000000..11aba52f82cf --- /dev/null +++ b/usr.sbin/ntp/doc/scripts/Makefile.depend @@ -0,0 +1,10 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/libntp/Makefile b/usr.sbin/ntp/libntp/Makefile new file mode 100644 index 000000000000..2fe143281d39 --- /dev/null +++ b/usr.sbin/ntp/libntp/Makefile @@ -0,0 +1,96 @@ +.PATH: ${SRCTOP}/contrib/ntp/libntp \ + ${SRCTOP}/contrib/ntp/libntp/lib/isc \ + ${SRCTOP}/contrib/ntp/libntp/lib/isc/nls \ + ${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads \ + ${SRCTOP}/contrib/ntp/libntp/lib/isc/unix \ + +PACKAGE= ntp +LIB= ntp +INTERNALLIB= + +NTP_SRCS= systime.c a_md5encrypt.c adjtime.c atoint.c \ + atolfp.c atouint.c audio.c authkeys.c \ + authreadkeys.c authusekey.c bsd_strerror.c buftvtots.c \ + caljulian.c caltontp.c calyearstart.c clocktime.c \ + clocktypes.c decodenetnum.c dofptoa.c dolfptoa.c \ + emalloc.c findconfig.c getopt.c hextoint.c \ + hextolfp.c humandate.c icom.c iosignal.c \ + is_ip_address.c \ + lib_strbuf.c \ + libssl_compat.c \ + machines.c mktime.c modetoa.c \ + mstolfp.c msyslog.c netof.c ntp_calendar.c \ + ntp_calgps.c \ + ntp_crypto_rnd.c ntp_intres.c ntp_libopts.c \ + ntp_lineedit.c ntp_random.c ntp_rfc2553.c ntp_realpath.c \ + ntp_worker.c \ + numtoa.c octtoint.c prettydate.c \ + recvbuff.c refidsmear.c \ + refnumtoa.c snprintf.c socket.c \ + socktoa.c socktohost.c ssl_init.c statestr.c \ + strdup.c strl_obsd.c syssignal.c timespecops.c \ + timetoa.c \ + timevalops.c timexsup.c \ + uglydate.c vint64ops.c work_fork.c \ + work_thread.c xsbprintf.c ymd2yd.c + +ISC_PTHREADS_SRCS= condition.c \ + thread.c \ + mutex.c + +ISC_UNIX_SRCS= dir.c \ + errno2result.c \ + file.c \ + interfaceiter.c \ + net.c \ + stdio.c \ + stdtime.c \ + strerror.c \ + time.c \ + tsmemcmp.c + +ISC_NLS_SRCS= msgcat.c + +ISC_SRCS= assertions.c \ + buffer.c \ + backtrace-emptytbl.c \ + backtrace.c \ + error.c \ + event.c \ + inet_ntop.c \ + inet_pton.c \ + lib.c \ + log.c \ + md5.c \ + netaddr.c \ + netscope.c \ + ondestroy.c \ + random.c \ + result.c \ + task.c \ + sha1.c \ + sockaddr.c \ + ${ISC_NLS_SRCS} \ + ${ISC_PTHREADS_SRCS} \ + ${ISC_UNIX_SRCS} + +SRCS= ${NTP_SRCS} ${ISC_SRCS} version.c + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${SRCTOP}/lib/libc/${MACHINE_ARCH} \ + -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit \ + -I${.CURDIR:H} \ + -I${.CURDIR}/ + +CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H -DHAVE_CLOSEFROM + +CLEANFILES+= .version version.c + +version.c: + sh -e ${.CURDIR:H}/scripts/mkver ntpd + +.include <bsd.lib.mk> diff --git a/usr.sbin/ntp/libntp/Makefile.depend b/usr.sbin/ntp/libntp/Makefile.depend new file mode 100644 index 000000000000..3547a6d173b4 --- /dev/null +++ b/usr.sbin/ntp/libntp/Makefile.depend @@ -0,0 +1,18 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + bin/sh.host \ + include \ + include/arpa \ + include/xlocale \ + lib/libedit/readline \ + lib/libmd \ + lib/msun \ + secure/lib/libcrypto \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/libntpevent/Makefile b/usr.sbin/ntp/libntpevent/Makefile new file mode 100644 index 000000000000..06b7edb875e7 --- /dev/null +++ b/usr.sbin/ntp/libntpevent/Makefile @@ -0,0 +1,35 @@ +.include <src.opts.mk> + +.PATH: ${SRCTOP}/contrib/libevent + +PACKAGE= ntp +LIB= ntpevent +INTERNALLIB= + +SRCS= buffer.c bufferevent.c bufferevent_filter.c \ + bufferevent_pair.c epoll.c evdns.c event.c event_tagging.c \ + evmap.c evport.c evrpc.c evthread.c evthread_pthread.c evutil.c \ + evutil_rand.c evutil_time.c http.c kqueue.c listener.c log.c poll.c \ + select.c signal.c strlcpy.c + +.if ${MK_OPENSSL} != "no" +SRCS+= bufferevent_openssl.c +.endif + +.if ${MACHINE_ARCH} == "i386" +NTP_ATOMIC=x86_32 +.elif ${MACHINE_ARCH} == "amd64" +NTP_ATOMIC=x86_64 +.elif ${MACHINE_ARCH} == "powerpc64" +NTP_ATOMIC=powerpc +.else +NTP_ATOMIC=noatomic +.endif + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/libevent/include \ + -I${.CURDIR}/ + +CFLAGS+= -DHAVE_BSD_NICE -DHAVE_STDINT_H + +.include <bsd.lib.mk> diff --git a/usr.sbin/ntp/libntpevent/Makefile.depend b/usr.sbin/ntp/libntpevent/Makefile.depend new file mode 100644 index 000000000000..3f53ac004962 --- /dev/null +++ b/usr.sbin/ntp/libntpevent/Makefile.depend @@ -0,0 +1,15 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/arpa \ + include/ssp \ + include/xlocale \ + secure/lib/libcrypto \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/libntpevent/event2/event-config.h b/usr.sbin/ntp/libntpevent/event2/event-config.h new file mode 100644 index 000000000000..e636a9fba1d5 --- /dev/null +++ b/usr.sbin/ntp/libntpevent/event2/event-config.h @@ -0,0 +1,647 @@ +/* event2/event-config.h +* +* This file was generated by autoconf when libevent was built, and post- +* processed by Libevent so that its macros would have a uniform prefix. +* +* DO NOT EDIT THIS FILE. +* +* Do not rely on macros in this file existing in later versions. +*/ + +#ifndef EVENT2_EVENT_CONFIG_H_INCLUDED_ +#define EVENT2_EVENT_CONFIG_H_INCLUDED_ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if libevent should build without support for a debug mode */ +/* #undef EVENT__DISABLE_DEBUG_MODE */ + +/* Define if libevent should not allow replacing the mm functions */ +/* #undef EVENT__DISABLE_MM_REPLACEMENT */ + +/* Define if libevent should not be compiled with thread support */ +/* #undef EVENT__DISABLE_THREAD_SUPPORT */ + +/* Define to 1 if you have the `accept4' function. */ +#define EVENT__HAVE_ACCEPT4 1 + +/* Define to 1 if you have the `arc4random' function. */ +#define EVENT__HAVE_ARC4RANDOM 1 + +/* Define to 1 if you have the `arc4random_buf' function. */ +#define EVENT__HAVE_ARC4RANDOM_BUF 1 + +/* Define to 1 if you have the <arpa/inet.h> header file. */ +#define EVENT__HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the `clock_gettime' function. */ +#define EVENT__HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the <cthreads.h> header file. */ +/* #undef EVENT__HAVE_CTHREADS_H */ + +/* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you + don't. */ +#define EVENT__HAVE_DECL_CTL_KERN 1 + +/* Define to 1 if you have the declaration of `KERN_ARND', and to 0 if you + don't. */ +#define EVENT__HAVE_DECL_KERN_ARND 1 + +/* Define to 1 if you have the declaration of `KERN_RANDOM', and to 0 if you + don't. */ +#define EVENT__HAVE_DECL_KERN_RANDOM 0 + +/* Define to 1 if you have the declaration of `RANDOM_UUID', and to 0 if you + don't. */ +#define EVENT__HAVE_DECL_RANDOM_UUID 0 + +/* Define if /dev/poll is available */ +/* #undef EVENT__HAVE_DEVPOLL */ + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define EVENT__HAVE_DLFCN_H 1 + +/* Define if your system supports the epoll system calls */ +/* #undef EVENT__HAVE_EPOLL */ + +/* Define to 1 if you have the `epoll_create1' function. */ +/* #undef EVENT__HAVE_EPOLL_CREATE1 */ + +/* Define to 1 if you have the `epoll_ctl' function. */ +/* #undef EVENT__HAVE_EPOLL_CTL */ + +/* Define to 1 if you have the `eventfd' function. */ +/* #undef EVENT__HAVE_EVENTFD */ + +/* Define if your system supports event ports */ +/* #undef EVENT__HAVE_EVENT_PORTS */ + +/* Define to 1 if you have the `fcntl' function. */ +#define EVENT__HAVE_FCNTL 1 + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define EVENT__HAVE_FCNTL_H 1 + +/* Define to 1 if the system has the type `fd_mask'. */ +#define EVENT__HAVE_FD_MASK 1 + +/* Do we have getaddrinfo()? */ +#define EVENT__HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getegid' function. */ +#define EVENT__HAVE_GETEGID 1 + +/* Define to 1 if you have the `geteuid' function. */ +#define EVENT__HAVE_GETEUID 1 + +/* Define this if you have any gethostbyname_r() */ +/* #undef EVENT__HAVE_GETHOSTBYNAME_R */ + +/* Define this if gethostbyname_r takes 3 arguments */ +/* #undef EVENT__HAVE_GETHOSTBYNAME_R_3_ARG */ + +/* Define this if gethostbyname_r takes 5 arguments */ +/* #undef EVENT__HAVE_GETHOSTBYNAME_R_5_ARG */ + +/* Define this if gethostbyname_r takes 6 arguments */ +/* #undef EVENT__HAVE_GETHOSTBYNAME_R_6_ARG */ + +/* Define to 1 if you have the `getifaddrs' function. */ +#define EVENT__HAVE_GETIFADDRS 1 + +/* Define to 1 if you have the `getnameinfo' function. */ +#define EVENT__HAVE_GETNAMEINFO 1 + +/* Define to 1 if you have the `getprotobynumber' function. */ +#define EVENT__HAVE_GETPROTOBYNUMBER 1 + +/* Define to 1 if you have the `getservbyname' function. */ +/* #undef EVENT__HAVE_GETSERVBYNAME */ + +/* Define to 1 if you have the `gettimeofday' function. */ +#define EVENT__HAVE_GETTIMEOFDAY 1 + +/* if you have GNU Pth */ +/* #undef EVENT__HAVE_GNU_PTH */ + +/* Define to 1 if you have the <ifaddrs.h> header file. */ +#define EVENT__HAVE_IFADDRS_H 1 + +/* Define to 1 if you have the `inet_ntop' function. */ +#define EVENT__HAVE_INET_NTOP 1 + +/* Define to 1 if you have the `inet_pton' function. */ +#define EVENT__HAVE_INET_PTON 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define EVENT__HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `issetugid' function. */ +#define EVENT__HAVE_ISSETUGID 1 + +/* Define to 1 if you have the `kqueue' function. */ +#define EVENT__HAVE_KQUEUE 1 + +/* Define if the system has zlib */ +#define EVENT__HAVE_LIBZ 1 + +/* if you have LinuxThreads */ +/* #undef EVENT__HAVE_LINUX_THREADS */ + +/* if you have SunOS LWP package */ +/* #undef EVENT__HAVE_LWP */ + +/* Define to 1 if you have the <lwp/lwp.h> header file. */ +/* #undef EVENT__HAVE_LWP_LWP_H */ + +/* Define to 1 if you have the `mach_absolute_time' function. */ +/* #undef EVENT__HAVE_MACH_ABSOLUTE_TIME */ + +/* define if you have Mach Cthreads */ +/* #undef EVENT__HAVE_MACH_CTHREADS */ + +/* Define to 1 if you have the <mach/cthreads.h> header file. */ +/* #undef EVENT__HAVE_MACH_CTHREADS_H */ + +/* Define to 1 if you have the <mach/mach_time.h> header file. */ +/* #undef EVENT__HAVE_MACH_MACH_TIME_H */ + +/* Define to 1 if you have the <memory.h> header file. */ +#define EVENT__HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mmap' function. */ +#define EVENT__HAVE_MMAP 1 + +/* Define to 1 if you have the `nanosleep' function. */ +#define EVENT__HAVE_NANOSLEEP 1 + +/* Define to 1 if you have the <netdb.h> header file. */ +#define EVENT__HAVE_NETDB_H 1 + +/* Define to 1 if you have the <netinet/in6.h> header file. */ +/* #undef EVENT__HAVE_NETINET_IN6_H */ + +/* Define to 1 if you have the <netinet/in.h> header file. */ +#define EVENT__HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the <netinet/tcp.h> header file. */ +#define EVENT__HAVE_NETINET_TCP_H 1 + +/* if you have NT Event Log */ +/* #undef EVENT__HAVE_NT_EVENT_LOG */ + +/* if you have NT Service Manager */ +/* #undef EVENT__HAVE_NT_SERVICE_MANAGER */ + +/* if you have NT Threads */ +/* #undef EVENT__HAVE_NT_THREADS */ + +/* Define if the system has openssl */ +/* #undef EVENT__HAVE_OPENSSL */ + +/* Define to 1 if you have the `pipe' function. */ +#define EVENT__HAVE_PIPE 1 + +/* Define to 1 if you have the `pipe2' function. */ +#define EVENT__HAVE_PIPE2 1 + +/* Define to 1 if you have the `poll' function. */ +#define EVENT__HAVE_POLL 1 + +/* Define to 1 if you have the <poll.h> header file. */ +#define EVENT__HAVE_POLL_H 1 + +/* Define to 1 if you have the `port_create' function. */ +/* #undef EVENT__HAVE_PORT_CREATE */ + +/* Define to 1 if you have the <port.h> header file. */ +/* #undef EVENT__HAVE_PORT_H */ + +/* Define if you have POSIX threads libraries and header files. */ +/* #undef EVENT__HAVE_PTHREAD */ + +/* define to pthreads API spec revision */ +#define EVENT__HAVE_PTHREADS 10 + +/* define if you have pthread_detach function */ +#define EVENT__HAVE_PTHREAD_DETACH 1 + +/* Define to 1 if you have the `pthread_getconcurrency' function. */ +#define EVENT__HAVE_PTHREAD_GETCONCURRENCY 1 + +/* Define to 1 if you have the <pthread.h> header file. */ +#define EVENT__HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the `pthread_kill' function. */ +#define EVENT__HAVE_PTHREAD_KILL 1 + +/* Define to 1 if you have the `pthread_kill_other_threads_np' function. */ +/* #undef EVENT__HAVE_PTHREAD_KILL_OTHER_THREADS_NP */ + +/* define if you have pthread_rwlock_destroy function */ +#define EVENT__HAVE_PTHREAD_RWLOCK_DESTROY 1 + +/* Define to 1 if you have the `pthread_setconcurrency' function. */ +#define EVENT__HAVE_PTHREAD_SETCONCURRENCY 1 + +/* Define to 1 if you have the `pthread_yield' function. */ +#define EVENT__HAVE_PTHREAD_YIELD 1 + +/* Define to 1 if you have the <pth.h> header file. */ +/* #undef EVENT__HAVE_PTH_H */ + +/* Define to 1 if you have the `putenv' function. */ +#define EVENT__HAVE_PUTENV 1 + +/* Define to 1 if the system has the type `sa_family_t'. */ +#define EVENT__HAVE_SA_FAMILY_T 1 + +/* Define to 1 if you have the <sched.h> header file. */ +#define EVENT__HAVE_SCHED_H 1 + +/* Define to 1 if you have the `sched_yield' function. */ +#define EVENT__HAVE_SCHED_YIELD 1 + +/* Define to 1 if you have the `select' function. */ +#define EVENT__HAVE_SELECT 1 + +/* Define to 1 if you have the `sendfile' function. */ +#define EVENT__HAVE_SENDFILE 1 + +/* Define to 1 if you have the `setenv' function. */ +#define EVENT__HAVE_SETENV 1 + +/* Define if F_SETFD is defined in <fcntl.h> */ +#define EVENT__HAVE_SETFD 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define EVENT__HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define EVENT__HAVE_SIGACTION 1 + +/* Define to 1 if you have the `signal' function. */ +#define EVENT__HAVE_SIGNAL 1 + +/* Define to 1 if you have the `splice' function. */ +/* #undef EVENT__HAVE_SPLICE */ + +/* Define to 1 if you have the <stdarg.h> header file. */ +#define EVENT__HAVE_STDARG_H 1 + +/* Define to 1 if you have the <stddef.h> header file. */ +#define EVENT__HAVE_STDDEF_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define EVENT__HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define EVENT__HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define EVENT__HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define EVENT__HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define EVENT__HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strsep' function. */ +#define EVENT__HAVE_STRSEP 1 + +/* Define to 1 if you have the `strtok_r' function. */ +#define EVENT__HAVE_STRTOK_R 1 + +/* Define to 1 if you have the `strtoll' function. */ +#define EVENT__HAVE_STRTOLL 1 + +/* Define to 1 if the system has the type `struct addrinfo'. */ +#define EVENT__HAVE_STRUCT_ADDRINFO 1 + +/* Define to 1 if the system has the type `struct in6_addr'. */ +#define EVENT__HAVE_STRUCT_IN6_ADDR 1 + +/* Define to 1 if `s6_addr16' is a member of `struct in6_addr'. */ +/* #undef EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 */ + +/* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */ +/* #undef EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 */ + +/* Define to 1 if the system has the type `struct sockaddr_in6'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_IN6 1 + +/* Define to 1 if `sin6_len' is a member of `struct sockaddr_in6'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1 + +/* Define to 1 if `sin_len' is a member of `struct sockaddr_in'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN 1 + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1 + +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 + +/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */ +/* #undef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ + +/* Define to 1 if the system has the type `struct so_linger'. */ +/* #undef EVENT__HAVE_STRUCT_SO_LINGER */ + +/* Define to 1 if you have the <synch.h> header file. */ +/* #undef EVENT__HAVE_SYNCH_H */ + +/* Define to 1 if you have the `sysctl' function. */ +#define EVENT__HAVE_SYSCTL 1 + +/* Define to 1 if you have the <sys/devpoll.h> header file. */ +/* #undef EVENT__HAVE_SYS_DEVPOLL_H */ + +/* Define to 1 if you have the <sys/epoll.h> header file. */ +/* #undef EVENT__HAVE_SYS_EPOLL_H */ + +/* Define to 1 if you have the <sys/eventfd.h> header file. */ +/* #undef EVENT__HAVE_SYS_EVENTFD_H */ + +/* Define to 1 if you have the <sys/event.h> header file. */ +#define EVENT__HAVE_SYS_EVENT_H 1 + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define EVENT__HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/mman.h> header file. */ +#define EVENT__HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define EVENT__HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/queue.h> header file. */ +#define EVENT__HAVE_SYS_QUEUE_H 1 + +/* Define to 1 if you have the <sys/resource.h> header file. */ +#define EVENT__HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the <sys/select.h> header file. */ +#define EVENT__HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the <sys/sendfile.h> header file. */ +/* #undef EVENT__HAVE_SYS_SENDFILE_H */ + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#define EVENT__HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define EVENT__HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/sysctl.h> header file. */ +#define EVENT__HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the <sys/timerfd.h> header file. */ +/* #undef EVENT__HAVE_SYS_TIMERFD_H */ + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define EVENT__HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define EVENT__HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <sys/uio.h> header file. */ +#define EVENT__HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the <sys/wait.h> header file. */ +#define EVENT__HAVE_SYS_WAIT_H 1 + +/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */ +#define EVENT__HAVE_TAILQFOREACH 1 + +/* if you have Solaris LWP (thr) package */ +/* #undef EVENT__HAVE_THR */ + +/* Define to 1 if you have the <thread.h> header file. */ +/* #undef EVENT__HAVE_THREAD_H */ + +/* Define to 1 if you have the `thr_getconcurrency' function. */ +/* #undef EVENT__HAVE_THR_GETCONCURRENCY */ + +/* Define to 1 if you have the `thr_setconcurrency' function. */ +/* #undef EVENT__HAVE_THR_SETCONCURRENCY */ + +/* Define to 1 if you have the `thr_yield' function. */ +/* #undef EVENT__HAVE_THR_YIELD */ + +/* Define if timeradd is defined in <sys/time.h> */ +#define EVENT__HAVE_TIMERADD 1 + +/* Define if timerclear is defined in <sys/time.h> */ +#define EVENT__HAVE_TIMERCLEAR 1 + +/* Define if timercmp is defined in <sys/time.h> */ +#define EVENT__HAVE_TIMERCMP 1 + +/* Define to 1 if you have the `timerfd_create' function. */ +/* #undef EVENT__HAVE_TIMERFD_CREATE */ + +/* Define if timerisset is defined in <sys/time.h> */ +#define EVENT__HAVE_TIMERISSET 1 + +/* Define to 1 if the system has the type `uint16_t'. */ +#define EVENT__HAVE_UINT16_T 1 + +/* Define to 1 if the system has the type `uint32_t'. */ +#define EVENT__HAVE_UINT32_T 1 + +/* Define to 1 if the system has the type `uint64_t'. */ +#define EVENT__HAVE_UINT64_T 1 + +/* Define to 1 if the system has the type `uint8_t'. */ +#define EVENT__HAVE_UINT8_T 1 + +/* Define to 1 if the system has the type `uintptr_t'. */ +#define EVENT__HAVE_UINTPTR_T 1 + +/* Define to 1 if you have the `umask' function. */ +#define EVENT__HAVE_UMASK 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define EVENT__HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define EVENT__HAVE_UNSETENV 1 + +/* Define to 1 if you have the `usleep' function. */ +#define EVENT__HAVE_USLEEP 1 + +/* Define to 1 if you have the `vasprintf' function. */ +#define EVENT__HAVE_VASPRINTF 1 + +/* Define if kqueue works correctly with pipes */ +#define EVENT__HAVE_WORKING_KQUEUE 1 + +/* define if select implicitly yields */ +#define EVENT__HAVE_YIELDING_SELECT 1 + +/* Define to 1 if you have the <zlib.h> header file. */ +#define EVENT__HAVE_ZLIB_H 1 + +/* define to 1 if library is thread safe */ +#define EVENT__LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define EVENT__LT_OBJDIR ".libs/" + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef EVENT__NO_MINUS_C_MINUS_O */ + +/* define if you have (or want) no threads */ +/* #undef EVENT__NO_THREADS */ + +/* Numeric representation of the version */ +#define EVENT__NUMERIC_VERSION 0x02010301 + +/* Name of package */ +#define EVENT__PACKAGE "libevent" + +/* Define to the address where bug reports for this package should be sent. */ +#define EVENT__PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define EVENT__PACKAGE_NAME "libevent" + +/* Define to the full name and version of this package. */ +#define EVENT__PACKAGE_STRING "libevent 2.1.3-alpha-dev" + +/* Define to the one symbol short name of this package. */ +#define EVENT__PACKAGE_TARNAME "libevent" + +/* Define to the home page for this package. */ +#define EVENT__PACKAGE_URL "" + +/* Define to the version of this package. */ +#define EVENT__PACKAGE_VERSION "2.1.3-alpha-dev" + +/* enable thread safety */ +#define EVENT__REENTRANT 1 + +/* define if sched_yield yields the entire process */ +/* #undef EVENT__REPLACE_BROKEN_YIELD */ + +/* The size of `int', as computed by sizeof. */ +#define EVENT__SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define EVENT__SIZEOF_LONG 8 + +/* The size of `long long', as computed by sizeof. */ +#define EVENT__SIZEOF_LONG_LONG 8 + +/* The size of `off_t', as computed by sizeof. */ +#define EVENT__SIZEOF_OFF_T 8 + +/* The size of `pthread_t', as computed by sizeof. */ +#define EVENT__SIZEOF_PTHREAD_T 8 + +/* The size of `short', as computed by sizeof. */ +#define EVENT__SIZEOF_SHORT 2 + +/* The size of `size_t', as computed by sizeof. */ +#define EVENT__SIZEOF_SIZE_T 8 + +/* The size of `void *', as computed by sizeof. */ +#define EVENT__SIZEOF_VOID_P 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define EVENT__STDC_HEADERS 1 + +/* enable thread safety */ +#define EVENT__THREADSAFE 1 + +/* enable thread safety */ +#define EVENT__THREAD_SAFE 1 + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#define EVENT__TIME_WITH_SYS_TIME 1 + +/* Version number of package */ +#define EVENT__VERSION "2.1.3-alpha-dev" + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef EVENT___FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef EVENT___LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef EVENT___MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef EVENT___POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef EVENT___POSIX_SOURCE */ + +/* enable thread safety */ +#define EVENT___REENTRANT 1 + +/* enable thread safety */ +#define EVENT___SGI_MP_SOURCE 1 + +/* enable thread safety */ +#define EVENT___THREADSAFE 1 + +/* enable thread safety */ +#define EVENT___THREAD_SAFE 1 + +/* Define to 500 only on HP-UX. */ +/* #undef EVENT___XOPEN_SOURCE */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef EVENT___ALL_SOURCE +# define EVENT___ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef EVENT___GNU_SOURCE +# define EVENT___GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef EVENT___POSIX_PTHREAD_SEMANTICS +# define EVENT___POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef EVENT___TANDEM_SOURCE +# define EVENT___TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef EVENT____EXTENSIONS__ +# define EVENT____EXTENSIONS__ 1 +#endif + + +/* Define to appropriate substitue if compiler doesnt have __func__ */ +/* #undef EVENT____func__ */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef EVENT__const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef EVENT____cplusplus +/* #undef EVENT__inline */ +#endif + +/* Define to `int' if <sys/types.h> does not define. */ +/* #undef EVENT__pid_t */ + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef EVENT__size_t */ + +/* Define to unsigned int if you dont have it */ +/* #undef EVENT__socklen_t */ + +/* Define to `int' if <sys/types.h> does not define. */ +/* #undef EVENT__ssize_t */ + +#endif /* event2/event-config.h */ diff --git a/usr.sbin/ntp/libopts/Makefile b/usr.sbin/ntp/libopts/Makefile new file mode 100644 index 000000000000..720478c36b55 --- /dev/null +++ b/usr.sbin/ntp/libopts/Makefile @@ -0,0 +1,16 @@ +.PATH: ${SRCTOP}/contrib/ntp/sntp/libopts + +PACKAGE=ntp +LIB= opts +INTERNALLIB= + +# XXX libopts uses generated format string tables containing embedded NULs. +NO_WFORMAT= + +SRCS= libopts.c + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR:H} + +.include <bsd.lib.mk> diff --git a/usr.sbin/ntp/libopts/Makefile.depend b/usr.sbin/ntp/libopts/Makefile.depend new file mode 100644 index 000000000000..15a1f9c07f7c --- /dev/null +++ b/usr.sbin/ntp/libopts/Makefile.depend @@ -0,0 +1,12 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/libparse/Makefile b/usr.sbin/ntp/libparse/Makefile new file mode 100644 index 000000000000..9b96f0731775 --- /dev/null +++ b/usr.sbin/ntp/libparse/Makefile @@ -0,0 +1,18 @@ +.PATH: ${SRCTOP}/contrib/ntp/libparse + +PACKAGE=ntp +LIB= parse +INTERNALLIB= + +SRCS= binio.c clk_computime.c clk_dcf7000.c clk_hopf6021.c \ + clk_meinberg.c clk_rawdcf.c clk_rcc8000.c clk_schmid.c \ + clk_sel240x.c clk_trimtaip.c clk_trimtsip.c clk_varitext.c \ + clk_wharton.c data_mbg.c gpstolfp.c ieee754io.c \ + info_trimble.c mfp_mul.c parse.c parse_conf.c \ + trim_info.c + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include -I${.CURDIR:H} + +.include <bsd.lib.mk> diff --git a/usr.sbin/ntp/libparse/Makefile.depend b/usr.sbin/ntp/libparse/Makefile.depend new file mode 100644 index 000000000000..f905ed3dd93b --- /dev/null +++ b/usr.sbin/ntp/libparse/Makefile.depend @@ -0,0 +1,16 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/arpa \ + include/xlocale \ + lib/libmd \ + lib/msun \ + secure/lib/libcrypto \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile new file mode 100644 index 000000000000..7f147c6f2faa --- /dev/null +++ b/usr.sbin/ntp/ntp-keygen/Makefile @@ -0,0 +1,28 @@ +MAN= + +.include <src.opts.mk> + +.PATH: ${SRCTOP}/contrib/ntp/util \ + ${SRCTOP}/contrib/ntp/ntpd + +PACKAGE=ntp +PROG= ntp-keygen +SRCS= ntp-keygen.c ntp-keygen-opts.c + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/${NTP_ATOMIC}/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR}/lib/libc/${MACHINE_ARCH} \ + -I${.CURDIR:H} + +LIBADD+= m ntp opts pthread + +.if ${MK_OPENSSL} != "no" +LIBADD+= crypto +.endif + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/ntp-keygen/Makefile.depend b/usr.sbin/ntp/ntp-keygen/Makefile.depend new file mode 100644 index 000000000000..9284c867f078 --- /dev/null +++ b/usr.sbin/ntp/ntp-keygen/Makefile.depend @@ -0,0 +1,20 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/arpa \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libthr \ + lib/msun \ + usr.sbin/ntp/libntp \ + usr.sbin/ntp/libopts \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/ntp-keygen/Makefile.depend.options b/usr.sbin/ntp/ntp-keygen/Makefile.depend.options new file mode 100644 index 000000000000..b374d7a1fd52 --- /dev/null +++ b/usr.sbin/ntp/ntp-keygen/Makefile.depend.options @@ -0,0 +1,5 @@ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= OPENSSL + +.include <dirdeps-options.mk> diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile new file mode 100644 index 000000000000..33d3598f985f --- /dev/null +++ b/usr.sbin/ntp/ntpd/Makefile @@ -0,0 +1,59 @@ +MAN= + +.include <src.opts.mk> + +.PATH: ${SRCTOP}/contrib/ntp/ntpd \ + ${.OBJDIR} + +PACKAGE= ntp +DIRS= ETC_NTP +ETC_NTP= /etc/ntp +ETC_NTP_MODE= 0700 +CONFS= ntp.conf +FILES= leap-seconds +FILESDIR= ETC_NTP +FILESMODE= 644 +PROG= ntpd + +SRCS= cmd_args.c \ + ntp_clockdev.c \ + ntp_config.c ntp_control.c ntp_crypto.c ntp_filegen.c \ + ntp_io.c ntp_leapsec.c ntp_loopfilter.c ntp_monitor.c ntp_parser.c \ + ntp_peer.c ntp_proto.c ntp_refclock.c ntp_request.c ntp_restrict.c \ + ntp_ppsdev.c \ + ntp_scanner.c ntp_signd.c ntp_timer.c ntp_util.c ntpd-opts.c ntpd.c \ + rc_cmdlength.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_fg.c refclock_gpsdjson.c refclock_gpsvme.c refclock_heath.c \ + refclock_hopfpci.c refclock_hopfser.c refclock_hpgps.c \ + refclock_irig.c refclock_jjy.c refclock_jupiter.c refclock_leitch.c \ + refclock_local.c refclock_nmea.c refclock_neoclock4x.c \ + refclock_oncore.c refclock_palisade.c \ + refclock_parse.c refclock_pcf.c refclock_pst.c refclock_ripencc.c \ + refclock_shm.c refclock_tpro.c refclock_true.c refclock_tsyncpci.c \ + refclock_tt560.c refclock_ulink.c refclock_wwv.c refclock_wwvb.c \ + refclock_zyfer.c version.c + +CFLAGS+= -I${SRCTOP}/contrib/ntp/ntpd \ + -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR:H} \ + -I${.CURDIR} + +LIBADD= parse ntp m md opts pthread + +.if ${MK_OPENSSL} != "no" +LIBADD+= crypto +.endif + +CLEANFILES+= .version version.c + +version.c: + sh -e ${.CURDIR:H}/scripts/mkver ntpd + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/ntpd/Makefile.depend b/usr.sbin/ntp/ntpd/Makefile.depend new file mode 100644 index 000000000000..c2747ffc19c6 --- /dev/null +++ b/usr.sbin/ntp/ntpd/Makefile.depend @@ -0,0 +1,22 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + bin/sh.host \ + include \ + include/arpa \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libthr \ + lib/msun \ + usr.sbin/ntp/libntp \ + usr.sbin/ntp/libopts \ + usr.sbin/ntp/libparse \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/ntpd/Makefile.depend.options b/usr.sbin/ntp/ntpd/Makefile.depend.options new file mode 100644 index 000000000000..b374d7a1fd52 --- /dev/null +++ b/usr.sbin/ntp/ntpd/Makefile.depend.options @@ -0,0 +1,5 @@ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= OPENSSL + +.include <dirdeps-options.mk> diff --git a/usr.sbin/ntp/ntpd/leap-seconds b/usr.sbin/ntp/ntpd/leap-seconds new file mode 100644 index 000000000000..649a22c6278f --- /dev/null +++ b/usr.sbin/ntp/ntpd/leap-seconds @@ -0,0 +1,120 @@ +# ATOMIC TIME +# Coordinated Universal Time (UTC) is the reference time scale derived +# from The "Temps Atomique International" (TAI) calculated by the Bureau +# International des Poids et Mesures (BIPM) using a worldwide network of atomic +# clocks. UTC differs from TAI by an integer number of seconds; it is the basis +# of all activities in the world. +# +# +# ASTRONOMICAL TIME (UT1) is the time scale based on the rate of rotation of the earth. +# It is now mainly derived from Very Long Baseline Interferometry (VLBI). The various +# irregular fluctuations progressively detected in the rotation rate of the Earth led +# in 1972 to the replacement of UT1 by UTC as the reference time scale. +# +# +# LEAP SECOND +# Atomic clocks are more stable than the rate of the earth's rotation since the latter +# undergoes a full range of geophysical perturbations at various time scales: lunisolar +# and core-mantle torques, atmospheric and oceanic effects, etc. +# Leap seconds are needed to keep the two time scales in agreement, i.e. UT1-UTC smaller +# than 0.9 seconds. Therefore, when necessary a "leap second" is applied to UTC. +# Since the adoption of this system in 1972 it has been necessary to add a number of seconds to UTC, +# firstly due to the initial choice of the value of the second (1/86400 mean solar day of +# the year 1820) and secondly to the general slowing down of the Earth's rotation. It is +# theoretically possible to have a negative leap second (a second removed from UTC), but so far, +# all leap seconds have been positive (a second has been added to UTC). Based on what we know about +# the earth's rotation, it is unlikely that we will ever have a negative leap second. +# +# +# HISTORY +# The first leap second was added on June 30, 1972. Until the year 2000, it was necessary in average to add a +# leap second at a rate of 1 to 2 years. Since the year 2000 leap seconds are introduced with an +# average interval of 3 to 4 years due to the acceleration of the Earth's rotation speed. +# +# +# RESPONSIBILITY OF THE DECISION TO INTRODUCE A LEAP SECOND IN UTC +# The decision to introduce a leap second in UTC is the responsibility of the Earth Orientation Center of +# the International Earth Rotation and reference System Service (IERS). This center is located at Paris +# Observatory. According to international agreements, leap seconds should be scheduled only for certain dates: +# first preference is given to the end of December and June, and second preference at the end of March +# and September. Since the introduction of leap seconds in 1972, only dates in June and December were used. +# +# Questions or comments to: +# Christian Bizouard: christian.bizouard@obspm.fr +# Earth orientation Center of the IERS +# Paris Observatory, France +# +# +# +# COPYRIGHT STATUS OF THIS FILE +# This file is in the public domain. +# +# +# VALIDITY OF THE FILE +# It is important to express the validity of the file. These next two dates are +# given in units of seconds since 1900.0. +# +# 1) Last update of the file. +# +# Updated through IERS Bulletin C (https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) +# +# The following line shows the last update of this file in NTP timestamp: +# +#$ 3960835200 +# +# 2) Expiration date of the file given on a semi-annual basis: last June or last December +# +# File expires on 28 June 2026 +# +# Expire date in NTP timestamp: +# +#@ 3991593600 +# +# +# LIST OF LEAP SECONDS +# NTP timestamp (X parameter) is the number of seconds since 1900.0 +# +# MJD: The Modified Julian Day number. MJD = X/86400 + 15020 +# +# DTAI: The difference DTAI= TAI-UTC in units of seconds +# It is the quantity to add to UTC to get the time in TAI +# +# Day Month Year : epoch in clear +# +#NTP Time DTAI Day Month Year +# +2272060800 10 # 1 Jan 1972 +2287785600 11 # 1 Jul 1972 +2303683200 12 # 1 Jan 1973 +2335219200 13 # 1 Jan 1974 +2366755200 14 # 1 Jan 1975 +2398291200 15 # 1 Jan 1976 +2429913600 16 # 1 Jan 1977 +2461449600 17 # 1 Jan 1978 +2492985600 18 # 1 Jan 1979 +2524521600 19 # 1 Jan 1980 +2571782400 20 # 1 Jul 1981 +2603318400 21 # 1 Jul 1982 +2634854400 22 # 1 Jul 1983 +2698012800 23 # 1 Jul 1985 +2776982400 24 # 1 Jan 1988 +2840140800 25 # 1 Jan 1990 +2871676800 26 # 1 Jan 1991 +2918937600 27 # 1 Jul 1992 +2950473600 28 # 1 Jul 1993 +2982009600 29 # 1 Jul 1994 +3029443200 30 # 1 Jan 1996 +3076704000 31 # 1 Jul 1997 +3124137600 32 # 1 Jan 1999 +3345062400 33 # 1 Jan 2006 +3439756800 34 # 1 Jan 2009 +3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 +3692217600 37 # 1 Jan 2017 +# +# A hash code has been generated to be able to verify the integrity +# of this file. For more information about using this hash code, +# please see the readme file in the 'source' directory : +# https://hpiers.obspm.fr/iers/bul/bulc/ntp/sources/README +# +#h 49db2447 571e5e1b 2f002a53 9c8da8e4 39b8e49e diff --git a/usr.sbin/ntp/ntpd/ntp.conf b/usr.sbin/ntp/ntpd/ntp.conf new file mode 100644 index 000000000000..726729f30f93 --- /dev/null +++ b/usr.sbin/ntp/ntpd/ntp.conf @@ -0,0 +1,114 @@ +# +# +# Default NTP servers for the FreeBSD operating system. +# +# Don't forget to enable ntpd in /etc/rc.conf with: +# ntpd_enable="YES" +# +# The driftfile is by default /var/db/ntpd.drift, check +# /etc/defaults/rc.conf on how to change the location. +# + +# +# Set the target and limit for adding servers configured via pool statements +# or discovered dynamically via mechanisms such as broadcast and manycast. +# Ntpd automatically adds maxclock-1 servers from configured pools, and may +# add as many as maxclock*2 if necessary to ensure that at least minclock +# servers are providing good consistent time. +# +tos minclock 3 maxclock 6 + +# +# The following pool statements will give you a random set of IPv4 and IPv6 +# NTP servers geographically close to you. A single pool statement adds +# multiple servers from the pool, according to the tos minclock/maxclock +# targets. +# See http://www.pool.ntp.org/ for details. Note, pool.ntp.org encourages +# users with a static IP and good upstream NTP servers to add a server +# to the pool. See http://www.pool.ntp.org/join.html if you are interested. +# +# The option `iburst' is used for faster initial synchronization. +# +pool 0.freebsd.pool.ntp.org iburst +pool 2.freebsd.pool.ntp.org iburst + +# +# If you want to pick yourself which country's public NTP server +# you want to sync against, comment out the above pool statements, +# uncomment the next ones, and replace CC with the country's abbreviation. +# Make sure that the hostnames resolves to a proper IP address! +# +# pool 0.CC.pool.ntp.org iburst +# pool 2.CC.pool.ntp.org iburst + +# +# To configure a specific server, such as an organization-wide local +# server, add lines similar to the following. One or more specific +# servers can be configured in addition to, or instead of, any server +# pools specified above. When both are configured, ntpd first adds all +# the specific servers, then adds servers from the pool until the tos +# minclock/maxclock targets are met. +# +#server time.my-internal.org iburst + +# +# Security: +# +# By default, only allow time queries and block all other requests +# from unauthenticated clients. +# +# The "restrict source" line allows peers to be mobilized when added by +# ntpd from a pool, but does not enable mobilizing a new peer association +# by other dynamic means (broadcast, manycast, ntpq commands, etc). +# +# See http://support.ntp.org/bin/view/Support/AccessRestrictions +# for more information. +# +restrict default limited kod nomodify notrap noquery nopeer +restrict source limited kod nomodify notrap noquery + +# +# Alternatively, the following rules would block all unauthorized access. +# +#restrict default ignore +# +# In this case, all remote NTP time servers also need to be explicitly +# allowed or they would not be able to exchange time information with +# this server. +# +# Please note that this example doesn't work for the servers in +# the pool.ntp.org domain since they return multiple A records. +# +#restrict 0.pool.ntp.org nomodify nopeer noquery notrap +#restrict 1.pool.ntp.org nomodify nopeer noquery notrap +#restrict 2.pool.ntp.org nomodify nopeer noquery notrap +# +# The following settings allow unrestricted access from the localhost +restrict 127.0.0.1 +restrict ::1 + +# +# If a server loses sync with all upstream servers, NTP clients +# no longer follow that server. The local clock can be configured +# to provide a time source when this happens, but it should usually +# be configured on just one server on a network. For more details see +# http://support.ntp.org/bin/view/Support/UndisciplinedLocalClock +# The use of Orphan Mode may be preferable. +# +#server 127.127.1.0 +#fudge 127.127.1.0 stratum 10 + +# See http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14. +# for documentation regarding leapfile. Updates to the file can be obtained +# from ftp://time.nist.gov/pub/ or ftp://tycho.usno.navy.mil/pub/ntp/. +# Use either leapfile in /etc/ntp or periodically updated leapfile in /var/db. +#leapfile "/etc/ntp/leap-seconds" +leapfile "/var/db/ntpd.leap-seconds.list" + +# Specify the number of megabytes of memory that should be allocated and +# locked. -1 (default) means "do not lock the process into memory". +# 0 means "lock whatever memory the process wants into memory". Any other +# number means to lock up to that number of megabytes into memory. +# 0 may result in a segfault when ASLR with stack gap randomization +# is enabled. +#rlimit memlock 32 diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile new file mode 100644 index 000000000000..8e53ced468bb --- /dev/null +++ b/usr.sbin/ntp/ntpdate/Makefile @@ -0,0 +1,27 @@ +.include <src.opts.mk> + +.PATH: ${SRCTOP}/contrib/ntp/ntpdate + +PACKAGE=ntp +PROG= ntpdate +MAN= +SRCS= ntpdate.c version.c + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include/ \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include/ \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \ + -I${.CURDIR:H} + +LIBADD= ntp m md pthread + +.if ${MK_OPENSSL} != "no" +LIBADD+= crypto +.endif + +CLEANFILES+= .version version.c + +version.c: + sh -e ${.CURDIR:H}/scripts/mkver ntpdate + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/ntpdate/Makefile.depend b/usr.sbin/ntp/ntpdate/Makefile.depend new file mode 100644 index 000000000000..361bd50df87f --- /dev/null +++ b/usr.sbin/ntp/ntpdate/Makefile.depend @@ -0,0 +1,20 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + bin/sh.host \ + include \ + include/arpa \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libthr \ + lib/msun \ + usr.sbin/ntp/libntp \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/ntpdate/Makefile.depend.options b/usr.sbin/ntp/ntpdate/Makefile.depend.options new file mode 100644 index 000000000000..b374d7a1fd52 --- /dev/null +++ b/usr.sbin/ntp/ntpdate/Makefile.depend.options @@ -0,0 +1,5 @@ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= OPENSSL + +.include <dirdeps-options.mk> diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile new file mode 100644 index 000000000000..a239476a50b9 --- /dev/null +++ b/usr.sbin/ntp/ntpdc/Makefile @@ -0,0 +1,30 @@ +MAN= + +.include <src.opts.mk> + +.PATH: ${SRCTOP}/contrib/ntp/ntpdc + +PACKAGE=ntp +PROG= ntpdc +SRCS= ntpdc.c ntpdc_ops.c ntpdc-opts.c version.c + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR}/lib/libc/${MACHINE_ARCH} \ + -I${.CURDIR:H} -I${.CURDIR} + +LIBADD= edit ntp m md opts pthread + +.if ${MK_OPENSSL} != "no" +LIBADD+= crypto +.endif + +CLEANFILES+= .version version.c + +version.c: + sh -e ${.CURDIR:H}/scripts/mkver ntpdc + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/ntpdc/Makefile.depend b/usr.sbin/ntp/ntpdc/Makefile.depend new file mode 100644 index 000000000000..675855e8f3ed --- /dev/null +++ b/usr.sbin/ntp/ntpdc/Makefile.depend @@ -0,0 +1,22 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + bin/sh.host \ + include \ + include/arpa \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libedit \ + lib/libthr \ + lib/msun \ + usr.sbin/ntp/libntp \ + usr.sbin/ntp/libopts \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/ntpdc/Makefile.depend.options b/usr.sbin/ntp/ntpdc/Makefile.depend.options new file mode 100644 index 000000000000..b374d7a1fd52 --- /dev/null +++ b/usr.sbin/ntp/ntpdc/Makefile.depend.options @@ -0,0 +1,5 @@ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= OPENSSL + +.include <dirdeps-options.mk> diff --git a/usr.sbin/ntp/ntpdc/nl.c b/usr.sbin/ntp/ntpdc/nl.c new file mode 100644 index 000000000000..6ad05f368742 --- /dev/null +++ b/usr.sbin/ntp/ntpdc/nl.c @@ -0,0 +1,894 @@ + printf("sizeof(union req_data_u_tag) = %d\n", + (int) sizeof(union req_data_u_tag)); + printf("offsetof(u32) = %d\n", + (int) offsetof(union req_data_u_tag, u32)); + printf("offsetof(data) = %d\n", + (int) offsetof(union req_data_u_tag, data)); + printf("\n"); + + printf("sizeof(struct req_pkt) = %d\n", + (int) sizeof(struct req_pkt)); + printf("offsetof(rm_vn_mode) = %d\n", + (int) offsetof(struct req_pkt, rm_vn_mode)); + printf("offsetof(auth_seq) = %d\n", + (int) offsetof(struct req_pkt, auth_seq)); + printf("offsetof(implementation) = %d\n", + (int) offsetof(struct req_pkt, implementation)); + printf("offsetof(request) = %d\n", + (int) offsetof(struct req_pkt, request)); + printf("offsetof(err_nitems) = %d\n", + (int) offsetof(struct req_pkt, err_nitems)); + printf("offsetof(mbz_itemsize) = %d\n", + (int) offsetof(struct req_pkt, mbz_itemsize)); + printf("offsetof(u) = %d\n", + (int) offsetof(struct req_pkt, u)); + printf("offsetof(tstamp) = %d\n", + (int) offsetof(struct req_pkt, tstamp)); + printf("offsetof(keyid) = %d\n", + (int) offsetof(struct req_pkt, keyid)); + printf("offsetof(mac) = %d\n", + (int) offsetof(struct req_pkt, mac)); + printf("\n"); + + printf("sizeof(struct req_pkt_tail) = %d\n", + (int) sizeof(struct req_pkt_tail)); + printf("offsetof(tstamp) = %d\n", + (int) offsetof(struct req_pkt_tail, tstamp)); + printf("offsetof(keyid) = %d\n", + (int) offsetof(struct req_pkt_tail, keyid)); + printf("offsetof(mac) = %d\n", + (int) offsetof(struct req_pkt_tail, mac)); + printf("\n"); + + printf("sizeof(union resp_pkt_u_tag) = %d\n", + (int) sizeof(union resp_pkt_u_tag)); + printf("offsetof(data) = %d\n", + (int) offsetof(union resp_pkt_u_tag, data)); + printf("offsetof(u32) = %d\n", + (int) offsetof(union resp_pkt_u_tag, u32)); + printf("\n"); + + printf("sizeof(struct resp_pkt) = %d\n", + (int) sizeof(struct resp_pkt)); + printf("offsetof(rm_vn_mode) = %d\n", + (int) offsetof(struct resp_pkt, rm_vn_mode)); + printf("offsetof(auth_seq) = %d\n", + (int) offsetof(struct resp_pkt, auth_seq)); + printf("offsetof(implementation) = %d\n", + (int) offsetof(struct resp_pkt, implementation)); + printf("offsetof(request) = %d\n", + (int) offsetof(struct resp_pkt, request)); + printf("offsetof(err_nitems) = %d\n", + (int) offsetof(struct resp_pkt, err_nitems)); + printf("offsetof(mbz_itemsize) = %d\n", + (int) offsetof(struct resp_pkt, mbz_itemsize)); + printf("offsetof(u) = %d\n", + (int) offsetof(struct resp_pkt, u)); + printf("\n"); + + printf("sizeof(struct info_peer_list) = %d\n", + (int) sizeof(struct info_peer_list)); + printf("offsetof(addr) = %d\n", + (int) offsetof(struct info_peer_list, addr)); + printf("offsetof(port) = %d\n", + (int) offsetof(struct info_peer_list, port)); + printf("offsetof(hmode) = %d\n", + (int) offsetof(struct info_peer_list, hmode)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_peer_list, flags)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_peer_list, v6_flag)); + printf("offsetof(unused1) = %d\n", + (int) offsetof(struct info_peer_list, unused1)); + printf("offsetof(addr6) = %d\n", + (int) offsetof(struct info_peer_list, addr6)); + printf("\n"); + + printf("sizeof(struct info_peer_summary) = %d\n", + (int) sizeof(struct info_peer_summary)); + printf("offsetof(dstadr) = %d\n", + (int) offsetof(struct info_peer_summary, dstadr)); + printf("offsetof(srcadr) = %d\n", + (int) offsetof(struct info_peer_summary, srcadr)); + printf("offsetof(srcport) = %d\n", + (int) offsetof(struct info_peer_summary, srcport)); + printf("offsetof(stratum) = %d\n", + (int) offsetof(struct info_peer_summary, stratum)); + printf("offsetof(hpoll) = %d\n", + (int) offsetof(struct info_peer_summary, hpoll)); + printf("offsetof(ppoll) = %d\n", + (int) offsetof(struct info_peer_summary, ppoll)); + printf("offsetof(reach) = %d\n", + (int) offsetof(struct info_peer_summary, reach)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_peer_summary, flags)); + printf("offsetof(hmode) = %d\n", + (int) offsetof(struct info_peer_summary, hmode)); + printf("offsetof(delay) = %d\n", + (int) offsetof(struct info_peer_summary, delay)); + printf("offsetof(offset) = %d\n", + (int) offsetof(struct info_peer_summary, offset)); + printf("offsetof(dispersion) = %d\n", + (int) offsetof(struct info_peer_summary, dispersion)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_peer_summary, v6_flag)); + printf("offsetof(unused1) = %d\n", + (int) offsetof(struct info_peer_summary, unused1)); + printf("offsetof(dstadr6) = %d\n", + (int) offsetof(struct info_peer_summary, dstadr6)); + printf("offsetof(srcadr6) = %d\n", + (int) offsetof(struct info_peer_summary, srcadr6)); + printf("\n"); + + printf("sizeof(struct info_peer) = %d\n", + (int) sizeof(struct info_peer)); + printf("offsetof(dstadr) = %d\n", + (int) offsetof(struct info_peer, dstadr)); + printf("offsetof(srcadr) = %d\n", + (int) offsetof(struct info_peer, srcadr)); + printf("offsetof(srcport) = %d\n", + (int) offsetof(struct info_peer, srcport)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_peer, flags)); + printf("offsetof(leap) = %d\n", + (int) offsetof(struct info_peer, leap)); + printf("offsetof(hmode) = %d\n", + (int) offsetof(struct info_peer, hmode)); + printf("offsetof(pmode) = %d\n", + (int) offsetof(struct info_peer, pmode)); + printf("offsetof(stratum) = %d\n", + (int) offsetof(struct info_peer, stratum)); + printf("offsetof(ppoll) = %d\n", + (int) offsetof(struct info_peer, ppoll)); + printf("offsetof(hpoll) = %d\n", + (int) offsetof(struct info_peer, hpoll)); + printf("offsetof(precision) = %d\n", + (int) offsetof(struct info_peer, precision)); + printf("offsetof(version) = %d\n", + (int) offsetof(struct info_peer, version)); + printf("offsetof(unused8) = %d\n", + (int) offsetof(struct info_peer, unused8)); + printf("offsetof(reach) = %d\n", + (int) offsetof(struct info_peer, reach)); + printf("offsetof(unreach) = %d\n", + (int) offsetof(struct info_peer, unreach)); + printf("offsetof(flash) = %d\n", + (int) offsetof(struct info_peer, flash)); + printf("offsetof(ttl) = %d\n", + (int) offsetof(struct info_peer, ttl)); + printf("offsetof(flash2) = %d\n", + (int) offsetof(struct info_peer, flash2)); + printf("offsetof(associd) = %d\n", + (int) offsetof(struct info_peer, associd)); + printf("offsetof(keyid) = %d\n", + (int) offsetof(struct info_peer, keyid)); + printf("offsetof(pkeyid) = %d\n", + (int) offsetof(struct info_peer, pkeyid)); + printf("offsetof(refid) = %d\n", + (int) offsetof(struct info_peer, refid)); + printf("offsetof(timer) = %d\n", + (int) offsetof(struct info_peer, timer)); + printf("offsetof(rootdelay) = %d\n", + (int) offsetof(struct info_peer, rootdelay)); + printf("offsetof(rootdispersion) = %d\n", + (int) offsetof(struct info_peer, rootdispersion)); + printf("offsetof(reftime) = %d\n", + (int) offsetof(struct info_peer, reftime)); + printf("offsetof(org) = %d\n", + (int) offsetof(struct info_peer, org)); + printf("offsetof(rec) = %d\n", + (int) offsetof(struct info_peer, rec)); + printf("offsetof(xmt) = %d\n", + (int) offsetof(struct info_peer, xmt)); + printf("offsetof(filtdelay) = %d\n", + (int) offsetof(struct info_peer, filtdelay)); + printf("offsetof(filtoffset) = %d\n", + (int) offsetof(struct info_peer, filtoffset)); + printf("offsetof(order) = %d\n", + (int) offsetof(struct info_peer, order)); + printf("offsetof(delay) = %d\n", + (int) offsetof(struct info_peer, delay)); + printf("offsetof(dispersion) = %d\n", + (int) offsetof(struct info_peer, dispersion)); + printf("offsetof(offset) = %d\n", + (int) offsetof(struct info_peer, offset)); + printf("offsetof(selectdisp) = %d\n", + (int) offsetof(struct info_peer, selectdisp)); + printf("offsetof(unused1) = %d\n", + (int) offsetof(struct info_peer, unused1)); + printf("offsetof(unused2) = %d\n", + (int) offsetof(struct info_peer, unused2)); + printf("offsetof(unused3) = %d\n", + (int) offsetof(struct info_peer, unused3)); + printf("offsetof(unused4) = %d\n", + (int) offsetof(struct info_peer, unused4)); + printf("offsetof(unused5) = %d\n", + (int) offsetof(struct info_peer, unused5)); + printf("offsetof(unused6) = %d\n", + (int) offsetof(struct info_peer, unused6)); + printf("offsetof(unused7) = %d\n", + (int) offsetof(struct info_peer, unused7)); + printf("offsetof(estbdelay) = %d\n", + (int) offsetof(struct info_peer, estbdelay)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_peer, v6_flag)); + printf("offsetof(unused9) = %d\n", + (int) offsetof(struct info_peer, unused9)); + printf("offsetof(dstadr6) = %d\n", + (int) offsetof(struct info_peer, dstadr6)); + printf("offsetof(srcadr6) = %d\n", + (int) offsetof(struct info_peer, srcadr6)); + printf("\n"); + + printf("sizeof(struct info_peer_stats) = %d\n", + (int) sizeof(struct info_peer_stats)); + printf("offsetof(dstadr) = %d\n", + (int) offsetof(struct info_peer_stats, dstadr)); + printf("offsetof(srcadr) = %d\n", + (int) offsetof(struct info_peer_stats, srcadr)); + printf("offsetof(srcport) = %d\n", + (int) offsetof(struct info_peer_stats, srcport)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_peer_stats, flags)); + printf("offsetof(timereset) = %d\n", + (int) offsetof(struct info_peer_stats, timereset)); + printf("offsetof(timereceived) = %d\n", + (int) offsetof(struct info_peer_stats, timereceived)); + printf("offsetof(timetosend) = %d\n", + (int) offsetof(struct info_peer_stats, timetosend)); + printf("offsetof(timereachable) = %d\n", + (int) offsetof(struct info_peer_stats, timereachable)); + printf("offsetof(sent) = %d\n", + (int) offsetof(struct info_peer_stats, sent)); + printf("offsetof(unused1) = %d\n", + (int) offsetof(struct info_peer_stats, unused1)); + printf("offsetof(processed) = %d\n", + (int) offsetof(struct info_peer_stats, processed)); + printf("offsetof(unused2) = %d\n", + (int) offsetof(struct info_peer_stats, unused2)); + printf("offsetof(badauth) = %d\n", + (int) offsetof(struct info_peer_stats, badauth)); + printf("offsetof(bogusorg) = %d\n", + (int) offsetof(struct info_peer_stats, bogusorg)); + printf("offsetof(oldpkt) = %d\n", + (int) offsetof(struct info_peer_stats, oldpkt)); + printf("offsetof(unused3) = %d\n", + (int) offsetof(struct info_peer_stats, unused3)); + printf("offsetof(unused4) = %d\n", + (int) offsetof(struct info_peer_stats, unused4)); + printf("offsetof(seldisp) = %d\n", + (int) offsetof(struct info_peer_stats, seldisp)); + printf("offsetof(selbroken) = %d\n", + (int) offsetof(struct info_peer_stats, selbroken)); + printf("offsetof(unused5) = %d\n", + (int) offsetof(struct info_peer_stats, unused5)); + printf("offsetof(candidate) = %d\n", + (int) offsetof(struct info_peer_stats, candidate)); + printf("offsetof(unused6) = %d\n", + (int) offsetof(struct info_peer_stats, unused6)); + printf("offsetof(unused7) = %d\n", + (int) offsetof(struct info_peer_stats, unused7)); + printf("offsetof(unused8) = %d\n", + (int) offsetof(struct info_peer_stats, unused8)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_peer_stats, v6_flag)); + printf("offsetof(unused9) = %d\n", + (int) offsetof(struct info_peer_stats, unused9)); + printf("offsetof(dstadr6) = %d\n", + (int) offsetof(struct info_peer_stats, dstadr6)); + printf("offsetof(srcadr6) = %d\n", + (int) offsetof(struct info_peer_stats, srcadr6)); + printf("\n"); + + printf("sizeof(struct info_loop) = %d\n", + (int) sizeof(struct info_loop)); + printf("offsetof(last_offset) = %d\n", + (int) offsetof(struct info_loop, last_offset)); + printf("offsetof(drift_comp) = %d\n", + (int) offsetof(struct info_loop, drift_comp)); + printf("offsetof(compliance) = %d\n", + (int) offsetof(struct info_loop, compliance)); + printf("offsetof(watchdog_timer) = %d\n", + (int) offsetof(struct info_loop, watchdog_timer)); + printf("\n"); + + printf("sizeof(struct info_sys) = %d\n", + (int) sizeof(struct info_sys)); + printf("offsetof(peer) = %d\n", + (int) offsetof(struct info_sys, peer)); + printf("offsetof(peer_mode) = %d\n", + (int) offsetof(struct info_sys, peer_mode)); + printf("offsetof(leap) = %d\n", + (int) offsetof(struct info_sys, leap)); + printf("offsetof(stratum) = %d\n", + (int) offsetof(struct info_sys, stratum)); + printf("offsetof(precision) = %d\n", + (int) offsetof(struct info_sys, precision)); + printf("offsetof(rootdelay) = %d\n", + (int) offsetof(struct info_sys, rootdelay)); + printf("offsetof(rootdispersion) = %d\n", + (int) offsetof(struct info_sys, rootdispersion)); + printf("offsetof(refid) = %d\n", + (int) offsetof(struct info_sys, refid)); + printf("offsetof(reftime) = %d\n", + (int) offsetof(struct info_sys, reftime)); + printf("offsetof(poll) = %d\n", + (int) offsetof(struct info_sys, poll)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_sys, flags)); + printf("offsetof(unused1) = %d\n", + (int) offsetof(struct info_sys, unused1)); + printf("offsetof(unused2) = %d\n", + (int) offsetof(struct info_sys, unused2)); + printf("offsetof(unused3) = %d\n", + (int) offsetof(struct info_sys, unused3)); + printf("offsetof(bdelay) = %d\n", + (int) offsetof(struct info_sys, bdelay)); + printf("offsetof(frequency) = %d\n", + (int) offsetof(struct info_sys, frequency)); + printf("offsetof(authdelay) = %d\n", + (int) offsetof(struct info_sys, authdelay)); + printf("offsetof(stability) = %d\n", + (int) offsetof(struct info_sys, stability)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_sys, v6_flag)); + printf("offsetof(unused4) = %d\n", + (int) offsetof(struct info_sys, unused4)); + printf("offsetof(peer6) = %d\n", + (int) offsetof(struct info_sys, peer6)); + printf("\n"); + + printf("sizeof(struct info_sys_stats) = %d\n", + (int) sizeof(struct info_sys_stats)); + printf("offsetof(timeup) = %d\n", + (int) offsetof(struct info_sys_stats, timeup)); + printf("offsetof(timereset) = %d\n", + (int) offsetof(struct info_sys_stats, timereset)); + printf("offsetof(denied) = %d\n", + (int) offsetof(struct info_sys_stats, denied)); + printf("offsetof(oldversionpkt) = %d\n", + (int) offsetof(struct info_sys_stats, oldversionpkt)); + printf("offsetof(newversionpkt) = %d\n", + (int) offsetof(struct info_sys_stats, newversionpkt)); + printf("offsetof(unknownversion) = %d\n", + (int) offsetof(struct info_sys_stats, unknownversion)); + printf("offsetof(badlength) = %d\n", + (int) offsetof(struct info_sys_stats, badlength)); + printf("offsetof(processed) = %d\n", + (int) offsetof(struct info_sys_stats, processed)); + printf("offsetof(badauth) = %d\n", + (int) offsetof(struct info_sys_stats, badauth)); + printf("offsetof(received) = %d\n", + (int) offsetof(struct info_sys_stats, received)); + printf("offsetof(limitrejected) = %d\n", + (int) offsetof(struct info_sys_stats, limitrejected)); + printf("\n"); + + printf("sizeof(struct old_info_sys_stats) = %d\n", + (int) sizeof(struct old_info_sys_stats)); + printf("offsetof(timeup) = %d\n", + (int) offsetof(struct old_info_sys_stats, timeup)); + printf("offsetof(timereset) = %d\n", + (int) offsetof(struct old_info_sys_stats, timereset)); + printf("offsetof(denied) = %d\n", + (int) offsetof(struct old_info_sys_stats, denied)); + printf("offsetof(oldversionpkt) = %d\n", + (int) offsetof(struct old_info_sys_stats, oldversionpkt)); + printf("offsetof(newversionpkt) = %d\n", + (int) offsetof(struct old_info_sys_stats, newversionpkt)); + printf("offsetof(unknownversion) = %d\n", + (int) offsetof(struct old_info_sys_stats, unknownversion)); + printf("offsetof(badlength) = %d\n", + (int) offsetof(struct old_info_sys_stats, badlength)); + printf("offsetof(processed) = %d\n", + (int) offsetof(struct old_info_sys_stats, processed)); + printf("offsetof(badauth) = %d\n", + (int) offsetof(struct old_info_sys_stats, badauth)); + printf("offsetof(wanderhold) = %d\n", + (int) offsetof(struct old_info_sys_stats, wanderhold)); + printf("\n"); + + printf("sizeof(struct info_mem_stats) = %d\n", + (int) sizeof(struct info_mem_stats)); + printf("offsetof(timereset) = %d\n", + (int) offsetof(struct info_mem_stats, timereset)); + printf("offsetof(totalpeermem) = %d\n", + (int) offsetof(struct info_mem_stats, totalpeermem)); + printf("offsetof(freepeermem) = %d\n", + (int) offsetof(struct info_mem_stats, freepeermem)); + printf("offsetof(findpeer_calls) = %d\n", + (int) offsetof(struct info_mem_stats, findpeer_calls)); + printf("offsetof(allocations) = %d\n", + (int) offsetof(struct info_mem_stats, allocations)); + printf("offsetof(demobilizations) = %d\n", + (int) offsetof(struct info_mem_stats, demobilizations)); + printf("offsetof(hashcount) = %d\n", + (int) offsetof(struct info_mem_stats, hashcount)); + printf("\n"); + + printf("sizeof(struct info_io_stats) = %d\n", + (int) sizeof(struct info_io_stats)); + printf("offsetof(timereset) = %d\n", + (int) offsetof(struct info_io_stats, timereset)); + printf("offsetof(totalrecvbufs) = %d\n", + (int) offsetof(struct info_io_stats, totalrecvbufs)); + printf("offsetof(freerecvbufs) = %d\n", + (int) offsetof(struct info_io_stats, freerecvbufs)); + printf("offsetof(fullrecvbufs) = %d\n", + (int) offsetof(struct info_io_stats, fullrecvbufs)); + printf("offsetof(lowwater) = %d\n", + (int) offsetof(struct info_io_stats, lowwater)); + printf("offsetof(dropped) = %d\n", + (int) offsetof(struct info_io_stats, dropped)); + printf("offsetof(ignored) = %d\n", + (int) offsetof(struct info_io_stats, ignored)); + printf("offsetof(received) = %d\n", + (int) offsetof(struct info_io_stats, received)); + printf("offsetof(sent) = %d\n", + (int) offsetof(struct info_io_stats, sent)); + printf("offsetof(notsent) = %d\n", + (int) offsetof(struct info_io_stats, notsent)); + printf("offsetof(interrupts) = %d\n", + (int) offsetof(struct info_io_stats, interrupts)); + printf("offsetof(int_received) = %d\n", + (int) offsetof(struct info_io_stats, int_received)); + printf("\n"); + + printf("sizeof(struct info_timer_stats) = %d\n", + (int) sizeof(struct info_timer_stats)); + printf("offsetof(timereset) = %d\n", + (int) offsetof(struct info_timer_stats, timereset)); + printf("offsetof(alarms) = %d\n", + (int) offsetof(struct info_timer_stats, alarms)); + printf("offsetof(overflows) = %d\n", + (int) offsetof(struct info_timer_stats, overflows)); + printf("offsetof(xmtcalls) = %d\n", + (int) offsetof(struct info_timer_stats, xmtcalls)); + printf("\n"); + + printf("sizeof(struct old_conf_peer) = %d\n", + (int) sizeof(struct old_conf_peer)); + printf("offsetof(peeraddr) = %d\n", + (int) offsetof(struct old_conf_peer, peeraddr)); + printf("offsetof(hmode) = %d\n", + (int) offsetof(struct old_conf_peer, hmode)); + printf("offsetof(version) = %d\n", + (int) offsetof(struct old_conf_peer, version)); + printf("offsetof(minpoll) = %d\n", + (int) offsetof(struct old_conf_peer, minpoll)); + printf("offsetof(maxpoll) = %d\n", + (int) offsetof(struct old_conf_peer, maxpoll)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct old_conf_peer, flags)); + printf("offsetof(ttl) = %d\n", + (int) offsetof(struct old_conf_peer, ttl)); + printf("offsetof(unused) = %d\n", + (int) offsetof(struct old_conf_peer, unused)); + printf("offsetof(keyid) = %d\n", + (int) offsetof(struct old_conf_peer, keyid)); + printf("\n"); + + printf("sizeof(struct conf_peer) = %d\n", + (int) sizeof(struct conf_peer)); + printf("offsetof(peeraddr) = %d\n", + (int) offsetof(struct conf_peer, peeraddr)); + printf("offsetof(hmode) = %d\n", + (int) offsetof(struct conf_peer, hmode)); + printf("offsetof(version) = %d\n", + (int) offsetof(struct conf_peer, version)); + printf("offsetof(minpoll) = %d\n", + (int) offsetof(struct conf_peer, minpoll)); + printf("offsetof(maxpoll) = %d\n", + (int) offsetof(struct conf_peer, maxpoll)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct conf_peer, flags)); + printf("offsetof(ttl) = %d\n", + (int) offsetof(struct conf_peer, ttl)); + printf("offsetof(unused1) = %d\n", + (int) offsetof(struct conf_peer, unused1)); + printf("offsetof(keyid) = %d\n", + (int) offsetof(struct conf_peer, keyid)); + printf("offsetof(keystr) = %d\n", + (int) offsetof(struct conf_peer, keystr)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct conf_peer, v6_flag)); + printf("offsetof(unused2) = %d\n", + (int) offsetof(struct conf_peer, unused2)); + printf("offsetof(peeraddr6) = %d\n", + (int) offsetof(struct conf_peer, peeraddr6)); + printf("\n"); + + printf("sizeof(struct conf_unpeer) = %d\n", + (int) sizeof(struct conf_unpeer)); + printf("offsetof(peeraddr) = %d\n", + (int) offsetof(struct conf_unpeer, peeraddr)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct conf_unpeer, v6_flag)); + printf("offsetof(peeraddr6) = %d\n", + (int) offsetof(struct conf_unpeer, peeraddr6)); + printf("\n"); + + printf("sizeof(struct conf_sys_flags) = %d\n", + (int) sizeof(struct conf_sys_flags)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct conf_sys_flags, flags)); + printf("\n"); + + printf("sizeof(struct info_restrict) = %d\n", + (int) sizeof(struct info_restrict)); + printf("offsetof(addr) = %d\n", + (int) offsetof(struct info_restrict, addr)); + printf("offsetof(mask) = %d\n", + (int) offsetof(struct info_restrict, mask)); + printf("offsetof(count) = %d\n", + (int) offsetof(struct info_restrict, count)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_restrict, flags)); + printf("offsetof(mflags) = %d\n", + (int) offsetof(struct info_restrict, mflags)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_restrict, v6_flag)); + printf("offsetof(unused1) = %d\n", + (int) offsetof(struct info_restrict, unused1)); + printf("offsetof(addr6) = %d\n", + (int) offsetof(struct info_restrict, addr6)); + printf("offsetof(mask6) = %d\n", + (int) offsetof(struct info_restrict, mask6)); + printf("\n"); + + printf("sizeof(struct conf_restrict) = %d\n", + (int) sizeof(struct conf_restrict)); + printf("offsetof(addr) = %d\n", + (int) offsetof(struct conf_restrict, addr)); + printf("offsetof(mask) = %d\n", + (int) offsetof(struct conf_restrict, mask)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct conf_restrict, flags)); + printf("offsetof(mflags) = %d\n", + (int) offsetof(struct conf_restrict, mflags)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct conf_restrict, v6_flag)); + printf("offsetof(addr6) = %d\n", + (int) offsetof(struct conf_restrict, addr6)); + printf("offsetof(mask6) = %d\n", + (int) offsetof(struct conf_restrict, mask6)); + printf("\n"); + + printf("sizeof(struct info_monitor_1) = %d\n", + (int) sizeof(struct info_monitor_1)); + printf("offsetof(avg_int) = %d\n", + (int) offsetof(struct info_monitor_1, avg_int)); + printf("offsetof(last_int) = %d\n", + (int) offsetof(struct info_monitor_1, last_int)); + printf("offsetof(restr) = %d\n", + (int) offsetof(struct info_monitor_1, restr)); + printf("offsetof(count) = %d\n", + (int) offsetof(struct info_monitor_1, count)); + printf("offsetof(addr) = %d\n", + (int) offsetof(struct info_monitor_1, addr)); + printf("offsetof(daddr) = %d\n", + (int) offsetof(struct info_monitor_1, daddr)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_monitor_1, flags)); + printf("offsetof(port) = %d\n", + (int) offsetof(struct info_monitor_1, port)); + printf("offsetof(mode) = %d\n", + (int) offsetof(struct info_monitor_1, mode)); + printf("offsetof(version) = %d\n", + (int) offsetof(struct info_monitor_1, version)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_monitor_1, v6_flag)); + printf("offsetof(unused1) = %d\n", + (int) offsetof(struct info_monitor_1, unused1)); + printf("offsetof(addr6) = %d\n", + (int) offsetof(struct info_monitor_1, addr6)); + printf("offsetof(daddr6) = %d\n", + (int) offsetof(struct info_monitor_1, daddr6)); + printf("\n"); + + printf("sizeof(struct info_monitor) = %d\n", + (int) sizeof(struct info_monitor)); + printf("offsetof(avg_int) = %d\n", + (int) offsetof(struct info_monitor, avg_int)); + printf("offsetof(last_int) = %d\n", + (int) offsetof(struct info_monitor, last_int)); + printf("offsetof(restr) = %d\n", + (int) offsetof(struct info_monitor, restr)); + printf("offsetof(count) = %d\n", + (int) offsetof(struct info_monitor, count)); + printf("offsetof(addr) = %d\n", + (int) offsetof(struct info_monitor, addr)); + printf("offsetof(port) = %d\n", + (int) offsetof(struct info_monitor, port)); + printf("offsetof(mode) = %d\n", + (int) offsetof(struct info_monitor, mode)); + printf("offsetof(version) = %d\n", + (int) offsetof(struct info_monitor, version)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_monitor, v6_flag)); + printf("offsetof(unused1) = %d\n", + (int) offsetof(struct info_monitor, unused1)); + printf("offsetof(addr6) = %d\n", + (int) offsetof(struct info_monitor, addr6)); + printf("\n"); + + printf("sizeof(struct old_info_monitor) = %d\n", + (int) sizeof(struct old_info_monitor)); + printf("offsetof(lasttime) = %d\n", + (int) offsetof(struct old_info_monitor, lasttime)); + printf("offsetof(firsttime) = %d\n", + (int) offsetof(struct old_info_monitor, firsttime)); + printf("offsetof(count) = %d\n", + (int) offsetof(struct old_info_monitor, count)); + printf("offsetof(addr) = %d\n", + (int) offsetof(struct old_info_monitor, addr)); + printf("offsetof(port) = %d\n", + (int) offsetof(struct old_info_monitor, port)); + printf("offsetof(mode) = %d\n", + (int) offsetof(struct old_info_monitor, mode)); + printf("offsetof(version) = %d\n", + (int) offsetof(struct old_info_monitor, version)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct old_info_monitor, v6_flag)); + printf("offsetof(addr6) = %d\n", + (int) offsetof(struct old_info_monitor, addr6)); + printf("\n"); + + printf("sizeof(struct reset_flags) = %d\n", + (int) sizeof(struct reset_flags)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct reset_flags, flags)); + printf("\n"); + + printf("sizeof(struct info_auth) = %d\n", + (int) sizeof(struct info_auth)); + printf("offsetof(timereset) = %d\n", + (int) offsetof(struct info_auth, timereset)); + printf("offsetof(numkeys) = %d\n", + (int) offsetof(struct info_auth, numkeys)); + printf("offsetof(numfreekeys) = %d\n", + (int) offsetof(struct info_auth, numfreekeys)); + printf("offsetof(keylookups) = %d\n", + (int) offsetof(struct info_auth, keylookups)); + printf("offsetof(keynotfound) = %d\n", + (int) offsetof(struct info_auth, keynotfound)); + printf("offsetof(encryptions) = %d\n", + (int) offsetof(struct info_auth, encryptions)); + printf("offsetof(decryptions) = %d\n", + (int) offsetof(struct info_auth, decryptions)); + printf("offsetof(expired) = %d\n", + (int) offsetof(struct info_auth, expired)); + printf("offsetof(keyuncached) = %d\n", + (int) offsetof(struct info_auth, keyuncached)); + printf("\n"); + + printf("sizeof(struct info_trap) = %d\n", + (int) sizeof(struct info_trap)); + printf("offsetof(local_address) = %d\n", + (int) offsetof(struct info_trap, local_address)); + printf("offsetof(trap_address) = %d\n", + (int) offsetof(struct info_trap, trap_address)); + printf("offsetof(trap_port) = %d\n", + (int) offsetof(struct info_trap, trap_port)); + printf("offsetof(sequence) = %d\n", + (int) offsetof(struct info_trap, sequence)); + printf("offsetof(settime) = %d\n", + (int) offsetof(struct info_trap, settime)); + printf("offsetof(origtime) = %d\n", + (int) offsetof(struct info_trap, origtime)); + printf("offsetof(resets) = %d\n", + (int) offsetof(struct info_trap, resets)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_trap, flags)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_trap, v6_flag)); + printf("offsetof(local_address6) = %d\n", + (int) offsetof(struct info_trap, local_address6)); + printf("offsetof(trap_address6) = %d\n", + (int) offsetof(struct info_trap, trap_address6)); + printf("\n"); + + printf("sizeof(struct conf_trap) = %d\n", + (int) sizeof(struct conf_trap)); + printf("offsetof(local_address) = %d\n", + (int) offsetof(struct conf_trap, local_address)); + printf("offsetof(trap_address) = %d\n", + (int) offsetof(struct conf_trap, trap_address)); + printf("offsetof(trap_port) = %d\n", + (int) offsetof(struct conf_trap, trap_port)); + printf("offsetof(unused) = %d\n", + (int) offsetof(struct conf_trap, unused)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct conf_trap, v6_flag)); + printf("offsetof(local_address6) = %d\n", + (int) offsetof(struct conf_trap, local_address6)); + printf("offsetof(trap_address6) = %d\n", + (int) offsetof(struct conf_trap, trap_address6)); + printf("\n"); + + printf("sizeof(struct info_control) = %d\n", + (int) sizeof(struct info_control)); + printf("offsetof(ctltimereset) = %d\n", + (int) offsetof(struct info_control, ctltimereset)); + printf("offsetof(numctlreq) = %d\n", + (int) offsetof(struct info_control, numctlreq)); + printf("offsetof(numctlbadpkts) = %d\n", + (int) offsetof(struct info_control, numctlbadpkts)); + printf("offsetof(numctlresponses) = %d\n", + (int) offsetof(struct info_control, numctlresponses)); + printf("offsetof(numctlfrags) = %d\n", + (int) offsetof(struct info_control, numctlfrags)); + printf("offsetof(numctlerrors) = %d\n", + (int) offsetof(struct info_control, numctlerrors)); + printf("offsetof(numctltooshort) = %d\n", + (int) offsetof(struct info_control, numctltooshort)); + printf("offsetof(numctlinputresp) = %d\n", + (int) offsetof(struct info_control, numctlinputresp)); + printf("offsetof(numctlinputfrag) = %d\n", + (int) offsetof(struct info_control, numctlinputfrag)); + printf("offsetof(numctlinputerr) = %d\n", + (int) offsetof(struct info_control, numctlinputerr)); + printf("offsetof(numctlbadoffset) = %d\n", + (int) offsetof(struct info_control, numctlbadoffset)); + printf("offsetof(numctlbadversion) = %d\n", + (int) offsetof(struct info_control, numctlbadversion)); + printf("offsetof(numctldatatooshort) = %d\n", + (int) offsetof(struct info_control, numctldatatooshort)); + printf("offsetof(numctlbadop) = %d\n", + (int) offsetof(struct info_control, numctlbadop)); + printf("offsetof(numasyncmsgs) = %d\n", + (int) offsetof(struct info_control, numasyncmsgs)); + printf("\n"); + + printf("sizeof(struct info_clock) = %d\n", + (int) sizeof(struct info_clock)); + printf("offsetof(clockadr) = %d\n", + (int) offsetof(struct info_clock, clockadr)); + printf("offsetof(type) = %d\n", + (int) offsetof(struct info_clock, type)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_clock, flags)); + printf("offsetof(lastevent) = %d\n", + (int) offsetof(struct info_clock, lastevent)); + printf("offsetof(currentstatus) = %d\n", + (int) offsetof(struct info_clock, currentstatus)); + printf("offsetof(polls) = %d\n", + (int) offsetof(struct info_clock, polls)); + printf("offsetof(noresponse) = %d\n", + (int) offsetof(struct info_clock, noresponse)); + printf("offsetof(badformat) = %d\n", + (int) offsetof(struct info_clock, badformat)); + printf("offsetof(baddata) = %d\n", + (int) offsetof(struct info_clock, baddata)); + printf("offsetof(timestarted) = %d\n", + (int) offsetof(struct info_clock, timestarted)); + printf("offsetof(fudgetime1) = %d\n", + (int) offsetof(struct info_clock, fudgetime1)); + printf("offsetof(fudgetime2) = %d\n", + (int) offsetof(struct info_clock, fudgetime2)); + printf("offsetof(fudgeval1) = %d\n", + (int) offsetof(struct info_clock, fudgeval1)); + printf("offsetof(fudgeval2) = %d\n", + (int) offsetof(struct info_clock, fudgeval2)); + printf("\n"); + + printf("sizeof(struct conf_fudge) = %d\n", + (int) sizeof(struct conf_fudge)); + printf("offsetof(clockadr) = %d\n", + (int) offsetof(struct conf_fudge, clockadr)); + printf("offsetof(which) = %d\n", + (int) offsetof(struct conf_fudge, which)); + printf("offsetof(fudgetime) = %d\n", + (int) offsetof(struct conf_fudge, fudgetime)); + printf("offsetof(fudgeval_flags) = %d\n", + (int) offsetof(struct conf_fudge, fudgeval_flags)); + printf("\n"); + + printf("sizeof(struct info_clkbug) = %d\n", + (int) sizeof(struct info_clkbug)); + printf("offsetof(clockadr) = %d\n", + (int) offsetof(struct info_clkbug, clockadr)); + printf("offsetof(nvalues) = %d\n", + (int) offsetof(struct info_clkbug, nvalues)); + printf("offsetof(ntimes) = %d\n", + (int) offsetof(struct info_clkbug, ntimes)); + printf("offsetof(svalues) = %d\n", + (int) offsetof(struct info_clkbug, svalues)); + printf("offsetof(stimes) = %d\n", + (int) offsetof(struct info_clkbug, stimes)); + printf("offsetof(values) = %d\n", + (int) offsetof(struct info_clkbug, values)); + printf("offsetof(times) = %d\n", + (int) offsetof(struct info_clkbug, times)); + printf("\n"); + + printf("sizeof(struct info_kernel) = %d\n", + (int) sizeof(struct info_kernel)); + printf("offsetof(offset) = %d\n", + (int) offsetof(struct info_kernel, offset)); + printf("offsetof(freq) = %d\n", + (int) offsetof(struct info_kernel, freq)); + printf("offsetof(maxerror) = %d\n", + (int) offsetof(struct info_kernel, maxerror)); + printf("offsetof(esterror) = %d\n", + (int) offsetof(struct info_kernel, esterror)); + printf("offsetof(status) = %d\n", + (int) offsetof(struct info_kernel, status)); + printf("offsetof(shift) = %d\n", + (int) offsetof(struct info_kernel, shift)); + printf("offsetof(constant) = %d\n", + (int) offsetof(struct info_kernel, constant)); + printf("offsetof(precision) = %d\n", + (int) offsetof(struct info_kernel, precision)); + printf("offsetof(tolerance) = %d\n", + (int) offsetof(struct info_kernel, tolerance)); + printf("offsetof(ppsfreq) = %d\n", + (int) offsetof(struct info_kernel, ppsfreq)); + printf("offsetof(jitter) = %d\n", + (int) offsetof(struct info_kernel, jitter)); + printf("offsetof(stabil) = %d\n", + (int) offsetof(struct info_kernel, stabil)); + printf("offsetof(jitcnt) = %d\n", + (int) offsetof(struct info_kernel, jitcnt)); + printf("offsetof(calcnt) = %d\n", + (int) offsetof(struct info_kernel, calcnt)); + printf("offsetof(errcnt) = %d\n", + (int) offsetof(struct info_kernel, errcnt)); + printf("offsetof(stbcnt) = %d\n", + (int) offsetof(struct info_kernel, stbcnt)); + printf("\n"); + + printf("sizeof(struct info_if_stats) = %d\n", + (int) sizeof(struct info_if_stats)); + printf("offsetof(unaddr) = %d\n", + (int) offsetof(struct info_if_stats, unaddr)); + printf("offsetof(unbcast) = %d\n", + (int) offsetof(struct info_if_stats, unbcast)); + printf("offsetof(unmask) = %d\n", + (int) offsetof(struct info_if_stats, unmask)); + printf("offsetof(v6_flag) = %d\n", + (int) offsetof(struct info_if_stats, v6_flag)); + printf("offsetof(name) = %d\n", + (int) offsetof(struct info_if_stats, name)); + printf("offsetof(flags) = %d\n", + (int) offsetof(struct info_if_stats, flags)); + printf("offsetof(last_ttl) = %d\n", + (int) offsetof(struct info_if_stats, last_ttl)); + printf("offsetof(num_mcast) = %d\n", + (int) offsetof(struct info_if_stats, num_mcast)); + printf("offsetof(received) = %d\n", + (int) offsetof(struct info_if_stats, received)); + printf("offsetof(sent) = %d\n", + (int) offsetof(struct info_if_stats, sent)); + printf("offsetof(notsent) = %d\n", + (int) offsetof(struct info_if_stats, notsent)); + printf("offsetof(uptime) = %d\n", + (int) offsetof(struct info_if_stats, uptime)); + printf("offsetof(scopeid) = %d\n", + (int) offsetof(struct info_if_stats, scopeid)); + printf("offsetof(ifindex) = %d\n", + (int) offsetof(struct info_if_stats, ifindex)); + printf("offsetof(ifnum) = %d\n", + (int) offsetof(struct info_if_stats, ifnum)); + printf("offsetof(peercnt) = %d\n", + (int) offsetof(struct info_if_stats, peercnt)); + printf("offsetof(family) = %d\n", + (int) offsetof(struct info_if_stats, family)); + printf("offsetof(ignore_packets) = %d\n", + (int) offsetof(struct info_if_stats, ignore_packets)); + printf("offsetof(action) = %d\n", + (int) offsetof(struct info_if_stats, action)); + printf("offsetof(_filler0) = %d\n", + (int) offsetof(struct info_if_stats, _filler0)); + printf("\n"); + + printf("sizeof(struct info_dns_assoc) = %d\n", + (int) sizeof(struct info_dns_assoc)); + printf("offsetof(peeraddr) = %d\n", + (int) offsetof(struct info_dns_assoc, peeraddr)); + printf("offsetof(associd) = %d\n", + (int) offsetof(struct info_dns_assoc, associd)); + printf("offsetof(hostname) = %d\n", + (int) offsetof(struct info_dns_assoc, hostname)); + printf("\n"); + diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile new file mode 100644 index 000000000000..5fa672782165 --- /dev/null +++ b/usr.sbin/ntp/ntpq/Makefile @@ -0,0 +1,33 @@ +MAN= + +.include <src.opts.mk> + +.PATH: ${SRCTOP}/contrib/ntp/ntpq + +BINDIR= /usr/bin + +PACKAGE=ntp +PROG= ntpq +SRCS= ntpq.c ntpq-opts.c ntpq-subs.c version.c + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/${NTP_ATOMIC}/include \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${.CURDIR:H} + +LIBADD+= edit ntp opts m md pthread + +.if ${MK_OPENSSL} != "no" +LIBADD+= crypto +.endif + +CLEANFILES+= .version version.c + +version.c: + sh -e ${.CURDIR:H}/scripts/mkver ntpq + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/ntpq/Makefile.depend b/usr.sbin/ntp/ntpq/Makefile.depend new file mode 100644 index 000000000000..675855e8f3ed --- /dev/null +++ b/usr.sbin/ntp/ntpq/Makefile.depend @@ -0,0 +1,22 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + bin/sh.host \ + include \ + include/arpa \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libedit \ + lib/libthr \ + lib/msun \ + usr.sbin/ntp/libntp \ + usr.sbin/ntp/libopts \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/ntpq/Makefile.depend.options b/usr.sbin/ntp/ntpq/Makefile.depend.options new file mode 100644 index 000000000000..b374d7a1fd52 --- /dev/null +++ b/usr.sbin/ntp/ntpq/Makefile.depend.options @@ -0,0 +1,5 @@ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= OPENSSL + +.include <dirdeps-options.mk> diff --git a/usr.sbin/ntp/ntptime/Makefile b/usr.sbin/ntp/ntptime/Makefile new file mode 100644 index 000000000000..a736681d2bef --- /dev/null +++ b/usr.sbin/ntp/ntptime/Makefile @@ -0,0 +1,15 @@ +.PATH: ${SRCTOP}/contrib/ntp/util + +PACKAGE=ntp +PROG= ntptime +MAN= + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include/ \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include/ \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \ + -I${.CURDIR:H} + +LIBADD= m ntp pthread + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/ntptime/Makefile.depend b/usr.sbin/ntp/ntptime/Makefile.depend new file mode 100644 index 000000000000..159bb4bc52a6 --- /dev/null +++ b/usr.sbin/ntp/ntptime/Makefile.depend @@ -0,0 +1,20 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/arpa \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libthr \ + lib/msun \ + secure/lib/libcrypto \ + usr.sbin/ntp/libntp \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/scripts/mkver b/usr.sbin/ntp/scripts/mkver new file mode 100755 index 000000000000..2336dd71bacb --- /dev/null +++ b/usr.sbin/ntp/scripts/mkver @@ -0,0 +1,45 @@ +#!/bin/sh +# +# +PROG=${1-UNKNOWN} + +: ${ECHO:=echo} + +ConfStr="$PROG" + +ConfStr="$ConfStr 4.2.8p18" + +case "$CSET" in + '') ;; + *) ConfStr="$ConfStr@$CSET" ;; +esac + +case "" in + '') + case "1" in + '') ;; + *) ConfStr="${ConfStr}-a" ;; + esac + ;; + *) ConfStr="${ConfStr}-r" ;; +esac + +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/ntptrace b/usr.sbin/ntp/scripts/ntptrace new file mode 100644 index 000000000000..994a008cd7e8 --- /dev/null +++ b/usr.sbin/ntp/scripts/ntptrace @@ -0,0 +1,61 @@ +#! /usr/local/bin/perl -w +# + +# John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org + +use Socket; +use Getopt::Std; +use vars qw($opt_n); + +$ntpq = "ntpq"; + +getopts('n'); + +$dodns = 1; +$dodns = 0 if (defined($opt_n)); + +$host = shift; +$host ||= "127.0.0.1"; + +for (;;) { + $stratum = 255; + $cmd = "$ntpq -n -c rv $host"; + open(PH, $cmd . "|") || die "failed to start command $cmd: $!"; + while (<PH>) { + $stratum = $1 if (/stratum=(\d+)/); + $peer = $1 if (/peer=(\d+)/); + # Very old servers report phase and not offset. + $offset = $1 if (/(?:offset|phase)=([^\s,]+)/); + $rootdelay = $1 if (/rootdelay=([^\s,]+)/); + $refid = $1 if (/refid=([^\s,]+)/); + } + close(PH) || die "$cmd failed"; + last if ($stratum == 255); + $offset /= 1000; + $rootdelay /= 1000; + $dhost = $host; + # Only do lookups of IPv4 addresses. The standard lookup functions + # of perl only do IPv4 and I don't know if we should require extras. + if ($dodns && $host =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/) { + $iaddr = inet_aton($host); + $name = (gethostbyaddr($iaddr, AF_INET))[0]; + $dhost = $name if (defined($name)); + } + printf("%s: stratum %d, offset %f, root distance %f", + $dhost, $stratum, $offset, $rootdelay); + printf(", refid '%s'", $refid) if ($stratum == 1); + printf("\n"); + last if ($stratum == 0 || $stratum == 1 || $stratum == 16); + last if ($refid =~ /^127\.127\.\d{1,3}\.\d{1,3}$/); + + $cmd = "$ntpq -n -c \"pstat $peer\" $host"; + open(PH, $cmd . "|") || die "failed to start command $cmd: $!"; + $thost = ""; + while (<PH>) { + $thost = $1, last if (/srcadr=(\S+),/); + } + close(PH) || die "$cmd failed"; + last if ($thost eq ""); + $host = $thost; +} + diff --git a/usr.sbin/ntp/scripts/ntpver b/usr.sbin/ntp/scripts/ntpver new file mode 100755 index 000000000000..cb216e8a636c --- /dev/null +++ b/usr.sbin/ntp/scripts/ntpver @@ -0,0 +1,7 @@ +#!/bin/sh +# 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 }' diff --git a/usr.sbin/ntp/sntp/Makefile b/usr.sbin/ntp/sntp/Makefile new file mode 100644 index 000000000000..628ef77d6e47 --- /dev/null +++ b/usr.sbin/ntp/sntp/Makefile @@ -0,0 +1,28 @@ +.include <src.opts.mk> + +.PATH: ${SRCTOP}/contrib/ntp/sntp + +PACKAGE=ntp +PROG= sntp +MAN= +SRCS= crypto.c kod_management.c log.c main.c networking.c \ + sntp-opts.c sntp.c utilities.c + +CFLAGS+= -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/unix/include \ + -I${SRCTOP}/contrib/ntp/libntp/lib/isc/pthreads/include \ + -I${SRCTOP}/contrib/ntp/sntp \ + -I${SRCTOP}/contrib/ntp/sntp/libopts \ + -I${SRCTOP}/contrib/ntp/sntp/libevent/include \ + -I${.CURDIR:H}/libntpevent \ + -I${.CURDIR:H} + +LIBADD= m opts md ntp ntpevent pthread + +.if ${MK_OPENSSL} != "no" +LIBADD+= crypto +.endif + +.include <bsd.prog.mk> diff --git a/usr.sbin/ntp/sntp/Makefile.depend b/usr.sbin/ntp/sntp/Makefile.depend new file mode 100644 index 000000000000..fdd3beeaa837 --- /dev/null +++ b/usr.sbin/ntp/sntp/Makefile.depend @@ -0,0 +1,21 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/arpa \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libthr \ + lib/msun \ + usr.sbin/ntp/libntp \ + usr.sbin/ntp/libntpevent \ + usr.sbin/ntp/libopts \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/ntp/sntp/Makefile.depend.options b/usr.sbin/ntp/sntp/Makefile.depend.options new file mode 100644 index 000000000000..b374d7a1fd52 --- /dev/null +++ b/usr.sbin/ntp/sntp/Makefile.depend.options @@ -0,0 +1,5 @@ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= OPENSSL + +.include <dirdeps-options.mk> |
