summaryrefslogtreecommitdiffstats
path: root/usr.sbin/xntpd/include
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-02-03 22:09:07 +0000
committerwollman <wollman@FreeBSD.org>1994-02-03 22:09:07 +0000
commit394ee3bae890775188c4812249fc996cb7cc0abe (patch)
tree6264e1a9edb32ef88fffee8f460175549f1b556f /usr.sbin/xntpd/include
parent8e51e9f1429efc498f923bce8b25b20f47d7c075 (diff)
downloadFreeBSD-src-394ee3bae890775188c4812249fc996cb7cc0abe.zip
FreeBSD-src-394ee3bae890775188c4812249fc996cb7cc0abe.tar.gz
xntpd version 3.3z from UDel
Diffstat (limited to 'usr.sbin/xntpd/include')
-rw-r--r--usr.sbin/xntpd/include/l_stdlib.h10
-rw-r--r--usr.sbin/xntpd/include/ntp.h5
-rw-r--r--usr.sbin/xntpd/include/ntp_control.h13
-rw-r--r--usr.sbin/xntpd/include/ntp_filegen.h2
-rw-r--r--usr.sbin/xntpd/include/ntp_machine.h223
-rw-r--r--usr.sbin/xntpd/include/ntp_refclock.h4
-rw-r--r--usr.sbin/xntpd/include/ntp_select.h2
-rw-r--r--usr.sbin/xntpd/include/ntp_stdlib.h2
-rw-r--r--usr.sbin/xntpd/include/ntp_string.h34
-rw-r--r--usr.sbin/xntpd/include/ntpd.h31
-rw-r--r--usr.sbin/xntpd/include/parse.h14
-rw-r--r--usr.sbin/xntpd/include/parse_conf.h8
-rw-r--r--usr.sbin/xntpd/include/sys/parsestreams.h8
13 files changed, 286 insertions, 70 deletions
diff --git a/usr.sbin/xntpd/include/l_stdlib.h b/usr.sbin/xntpd/include/l_stdlib.h
index 7a4383d..89a8092 100644
--- a/usr.sbin/xntpd/include/l_stdlib.h
+++ b/usr.sbin/xntpd/include/l_stdlib.h
@@ -38,7 +38,6 @@ extern long strtol P((char *, char **, int));
#if !defined(NTP_POSIX_SOURCE)
extern int atoi P((char *));
-extern void bcopy P((char *, char *, int));
extern int dup2 P((int, int));
extern int execve P((char *, char **,char **));
extern int fork P((void));
@@ -48,11 +47,13 @@ extern int qsort P((void *, int , int,
extern int rand P((void));
extern int setpgrp P((int, int));
extern void srand P((unsigned int));
+extern void bcopy P((char *, char *, int));
#endif
#ifndef bzero /* XXX macro prototyping clash */
extern void bzero P((char *, int));
extern int bcmp P((char *, char *, int));
+extern void bcopy P((char *, char *, int));
#endif
extern char *mktemp P((char *));
@@ -97,11 +98,13 @@ extern int setlinebuf P((FILE *));
#ifdef _ntp_string_h
#ifdef NTP_POSIX_SOURCE /* these are builtins */
+#ifndef NTP_NEED_BOPS /* but may be emulated by bops */
extern char *memcpy();
extern char *memset();
extern int memcmp();
#endif
#endif
+#endif
#ifdef _sys_socket_h
extern int bind P((int, struct sockaddr *, int));
@@ -192,7 +195,6 @@ extern int nlist P((char *, struct nlist *));
#ifndef NTP_POSIX_SOURCE
extern int atoi P((char *));
-extern void bcopy P((char *, char *, int));
extern void bzero P((char *, int));
extern int bcmp P((char *, char *, int));
extern void bcopy P((char *, char *, int));
@@ -224,5 +226,9 @@ extern char * getpass P((char *));
extern char * getpass P((char *));
#endif /* VAX */
+#ifdef SYS_DOMAINOS
+extern char * getpass P((char *));
+#endif /* SYS_DOMAINOS */
+
#endif /* l_stdlib_h */
diff --git a/usr.sbin/xntpd/include/ntp.h b/usr.sbin/xntpd/include/ntp.h
index 98a083a..310353f 100644
--- a/usr.sbin/xntpd/include/ntp.h
+++ b/usr.sbin/xntpd/include/ntp.h
@@ -328,7 +328,7 @@ struct peer {
#define FLAG_PREFER 0x80 /* this is the preferred peer */
/*
- * Definitions for the clear() routine. We use bzero() to clear
+ * Definitions for the clear() routine. We use memset() to clear
* the parts of the peer structure which go to zero. These are
* used to calculate the start address and length of the area.
*/
@@ -358,7 +358,8 @@ struct peer {
#define REFCLK_OMEGA_TRUETIME 11 /* TrueTime OM-DC OMEGA */
#define REFCLK_IRIG_TPRO 12 /* KSI/Odetics TPRO-S IRIG */
#define REFCLK_ATOM_LEITCH 13 /* Leitch CSD 5300 Master Clock */
-#define REFCLK_MSF_EES 14 /* reserved for Piete Brooks */
+#define REFCLK_MSF_EES 14 /* MSF EES M201, UK */
+#define REFCLK_GPSTM_TRUETIME 15 /* TrueTime GPS/TM-TMD */
/*
* We tell reference clocks from real peers by giving the reference
diff --git a/usr.sbin/xntpd/include/ntp_control.h b/usr.sbin/xntpd/include/ntp_control.h
index 89f6229..74f75f1 100644
--- a/usr.sbin/xntpd/include/ntp_control.h
+++ b/usr.sbin/xntpd/include/ntp_control.h
@@ -163,9 +163,9 @@ struct ntp_control {
#define CS_SYSTEM 17
#define CS_KEYID 18
#define CS_REFSKEW 19
-#define CS_VERSION 20
+#define CS_VARLIST 20
-#define CS_MAXCODE CS_VERSION
+#define CS_MAXCODE CS_VARLIST
/*
* Peer variables we understand
@@ -204,8 +204,10 @@ struct ntp_control {
#define CP_SENT 32
#define CP_FILTERROR 33
#define CP_FLASH 34
-#define CP_DISP 35
-#define CP_MAXCODE CP_DISP
+#define CP_DISP 35
+#define CP_VARLIST 36
+
+#define CP_MAXCODE CP_VARLIST
/*
* Clock variables we understand
@@ -222,8 +224,9 @@ struct ntp_control {
#define CC_FUDGEVAL2 10
#define CC_FLAGS 11
#define CC_DEVICE 12
+#define CC_VARLIST 13
-#define CC_MAXCODE CC_DEVICE
+#define CC_MAXCODE CC_VARLIST
/*
* Definition of the structure used internally to hold trap information.
diff --git a/usr.sbin/xntpd/include/ntp_filegen.h b/usr.sbin/xntpd/include/ntp_filegen.h
index 263f561..7281d59 100644
--- a/usr.sbin/xntpd/include/ntp_filegen.h
+++ b/usr.sbin/xntpd/include/ntp_filegen.h
@@ -1,5 +1,5 @@
/*
- * ntp_filegen.h,v 3.6 1993/09/01 21:51:24 kardel Exp
+ * ntp_filegen.h,v 3.7 1994/01/25 19:04:16 kardel Exp
*
* definitions for NTP file generations support
*
diff --git a/usr.sbin/xntpd/include/ntp_machine.h b/usr.sbin/xntpd/include/ntp_machine.h
index 97f5729..1c3983e 100644
--- a/usr.sbin/xntpd/include/ntp_machine.h
+++ b/usr.sbin/xntpd/include/ntp_machine.h
@@ -1,4 +1,4 @@
-/* ntp_compat.h,v 3.1 1993/07/06 01:06:49 jbj Exp
+/* ntp_machine.h,v 3.1 1993/07/06 01:06:49 jbj Exp
* Collect all machine dependent idiosyncrasies in one place.
*/
@@ -41,21 +41,21 @@ Signaled IO - Signled IO defines.
UDP_BACKWARDS_SETOWN - SunOS 3.5 or Ultirx 2.0 system.
-WHICH TERMINAL MODEL TO USE - I would assume HAVE_POSIX_TTYS if
- NTP_POSIX_SOURCE was set but cann't. The
+WHICH TERMINAL MODEL TO USE - I would assume HAVE_TERMIOS if
+ NTP_POSIX_SOURCE was set but can't. The
posix tty driver is too restrictive on most systems.
It defined if you define STREAMS.
HAVE_SYSV_TTYS - Use SYSV termio.h
HAVE_BSD_TTYS - Use BSD stty.h
- HAVE_POSIX_TTYS - "struct termios" has c_line defined
+ HAVE_TERMIOS - Use POSIX termios.h
THIS MAKES PORTS TO NEW SYSTEMS EASY - You only have to wory about
- kernal mucking.
+ kernel mucking.
NTP_POSIX_SOURCE - Use POSIX functions over bsd functions and att functions.
This is NOT the same as _POSIX_SOURCE.
- It is much weeker!
+ It is much weaker!
STEP SLEW OR TWO STEP - The Default is to step.
@@ -80,11 +80,20 @@ INFO ON NEW KERNEL PLL SYS CALLS
NTP_SYSCALL_GET - SYS_ntp_gettime id
NTP_SYSCALL_ADJ - SYS_ntp_adjtime id
+HOW TO GET IP INTERFACE INFORMATION
+
+ Some UNIX V.4 machines implement a sockets library on top of
+ streams. For these systems, you must use send the SIOCGIFCONF down
+ the stream in an I_STR ioctl. This ususally also implies
+ USE_STREAMS_DEVICE FOR IF_CONFIG. Dell UNIX is a notable exception.
+
+ STREAMS_TLI - use ioctl(I_STR) to implement ioctl(SIOCGIFCONF)
+
WHAT DOES IOCTL(SIOCGIFCONF) RETURN IN THE BUFFER
UNIX V.4 machines implement a sockets library on top of streams.
When requesting the IP interface configuration with an ioctl(2) calll,
- an arrat of ifreq structures are placed in the provided buffer. Some
+ an array of ifreq structures are placed in the provided buffer. Some
implementations also place the length of the buffer information in
the first integer position of the buffer.
@@ -104,22 +113,28 @@ MISC
DOSYNCTODR - Resync TODR clock every hour.
RETSIGTYPE - Define signal function type.
NO_SIGNED_CHAR_DECL - No "signed char" see include/ntp.h
- LOCK_PROCESS - Have plock.
+ LOCK_PROCESS - Have plock.
UDP_WILDCARD_DELIVERY
- - these systems deliver broadcast pakets to the wildcard
+ - these systems deliver broadcast packets to the wildcard
port instead to a port bound to the interface bound
to the correct broadcast address - are these
implementations broken or did the spec change ?
- HAVE_UNISTD_H - Maybe should be part of NTP_POSIX_SOURCE ?
+DEFINITIONS FOR SYSTEM && PROCESSOR
+ STR_SYSTEM - value of system variable
+ STR_PROCESSOR - value of processor variable
You could just put the defines on the DEFS line in machines/<os> file.
-I don't since there are lost of different types compiler that a systemm might
-have, some that can do proto typing and others that cannot on the saem system.
-I get a chanse to twiddle some of the configuration paramasters at compile
-time based on compler/machine combinatsions by using this include file.
+I don't since there are lots of different types of compilers that a system might
+have, some that can do proto typing and others that cannot on the same system.
+I get a chance to twiddle some of the configuration parameters at compile
+time based on compiler/machine combinations by using this include file.
See convex, aix and sun configurations see how complex it get.
-
+
+Note that it _is_ considered reasonable to add some system-specific defines
+to the machine/<os> file if it would be too inconvenient to puzzle them out
+in this file.
+
*/
@@ -134,14 +149,17 @@ See convex, aix and sun configurations see how complex it get.
/*
* Keep USE_PROTOTYPES and _NO_PROTO in step.
*/
-#if defined(_NO_PROTO)&&defined(USE_PROTOTYPES)
+#if defined(_NO_PROTO) && defined(USE_PROTOTYPES)
#undef USE_PROTOTYPES
#endif
-#if !defined(_NO_PROTO)&&!defined(USE_PROTOTYPES)
+#if !defined(_NO_PROTO) && !defined(USE_PROTOTYPES)
#define USE_PROTOTYPES
#endif
#endif /*_BSD */
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/AIX"
+#endif
#endif /* RS6000 */
/*
@@ -149,6 +167,7 @@ See convex, aix and sun configurations see how complex it get.
* Note: posix version has NTP_POSIX_SOURCE and HAVE_SIGNALED_IO
*/
#if defined(SYS_SUNOS4)
+#define NTP_NEED_BOPS
#define NO_SIGNED_CHAR_DECL
#define HAVE_LIBKVM
#define HAVE_MALLOC_H
@@ -156,6 +175,9 @@ See convex, aix and sun configurations see how complex it get.
#define RETSIGTYPE void
#define NTP_SYSCALL_GET 132
#define NTP_SYSCALL_ADJ 147
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/SunOS 4.x"
+#endif
#endif
/*
@@ -165,12 +187,16 @@ See convex, aix and sun configurations see how complex it get.
#undef HAVE_SIGNALED_IO
#undef USE_TTY_SIGPOLL
#undef USE_UDP_SIGPOLL
+#define STREAMS_TLI
#define NO_SIGNED_CHAR_DECL
#define STEP_SLEW /* TWO step */
#define RETSIGTYPE void
#define NTP_POSIX_SOURCE
#define HAVE_ATT_SETPGRP
#define HAVE_ATT_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/SINIX-M"
+#endif
#endif
/*
@@ -187,12 +213,15 @@ See convex, aix and sun configurations see how complex it get.
#define HAVE_ATT_SETPGRP
#define HAVE_ATT_NICE
#define UDP_WILDCARD_DELIVERY
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/Solaris 2.x"
+#endif
#endif
/*
* Convex
*/
-#if defined(SYS_CONVEXOS10)||defined(SYS_CONVEXOS9)
+#if defined(SYS_CONVEXOS10) || defined(SYS_CONVEXOS9)
#define HAVE_SIGNALED_IO
#define HAVE_N_UN
#define HAVE_READKMEM
@@ -201,15 +230,18 @@ See convex, aix and sun configurations see how complex it get.
#define RETSIGTYPE int
#define NO_SIGNED_CHAR_DECL
#else
-#if defined(__stdc__)&&!defined(USE_PROTOTYPES)
+#if defined(__stdc__) && !defined(USE_PROTOTYPES)
#define USE_PROTOTYPES
#endif
-#if !defined(__stdc__)&&defined(USE_PROTOTYPES)
-#undef USE_PROTOTYPES
+#if !defined(__stdc__) && defined(USE_PROTOTYPES)
+#undef USE_PROTOTYPES
#endif
#define NTP_POSIX_SOURCE
#define HAVE_ATT_SETPGRP
#endif
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/ConvexOS"
+#endif
#endif
/*
@@ -224,6 +256,9 @@ See convex, aix and sun configurations see how complex it get.
#define HAVE_ATT_SETPGRP
#define HAVE_BSD_NICE
#define NTP_POSIX_SOURCE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/IRIX"
+#endif
#endif
/*
@@ -236,12 +271,16 @@ See convex, aix and sun configurations see how complex it get.
#define HAVE_BSD_NICE
#define RETSIGTYPE void
#define NTP_SYSCALLS_STD
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/Ultrix"
+#endif
+#define HAVE_TERMIOS
#endif
/*
* AUX
*/
-#if defined(SYS_AUX2)||defined(SYS_AUX3)
+#if defined(SYS_AUX2) || defined(SYS_AUX3)
#define NO_SIGNED_CHAR_DECL
#define HAVE_READKMEM
#define HAVE_ATT_NICE
@@ -261,6 +300,9 @@ See convex, aix and sun configurations see how complex it get.
#define HAVE_BSD_TTYS
#define LOG_NTP LOG_LOCAL1
#define HAVE_SIGNALED_IO
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/AUX"
+#endif
#endif
/*
@@ -272,6 +314,9 @@ See convex, aix and sun configurations see how complex it get.
#define HAVE_BSD_NICE
#define HAVE_N_UN
#undef NTP_POSIX_SOURCE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/Next"
+#endif
#endif
/*
@@ -280,7 +325,8 @@ See convex, aix and sun configurations see how complex it get.
#if defined(SYS_HPUX)
#define NTP_POSIX_SOURCE
#define HAVE_SIGNALED_IO
-#define HAVE_UNISTD_H
+#define getdtablesize() sysconf(_SC_OPEN_MAX)
+#define setlinebuf(f) setvbuf(f, NULL, _IOLBF, 0)
#define NO_SIGNED_CHAR_DECL
#define LOCK_PROCESS
#define HAVE_NO_NICE /* HPUX uses rtprio instead */
@@ -290,6 +336,9 @@ See convex, aix and sun configurations see how complex it get.
#else
#define HAVE_READKMEM
#endif
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/HPUX"
+#endif
#endif
/*
@@ -300,6 +349,11 @@ See convex, aix and sun configurations see how complex it get.
#define HAVE_LIBKVM
#define NTP_POSIX_SOURCE
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/BSDI"
+#endif
+#define HAVE_BSD_TTYS
+#define HAVE_TERMIOS
#endif
/*
@@ -311,8 +365,13 @@ See convex, aix and sun configurations see how complex it get.
#define NTP_POSIX_SOURCE
#define ADJTIME_IS_ACCURATE
#define HAVE_SYS_TIMEX_H
-#define ntp_adjtime adjtimex
+/* hope there will be a standard interface
+ * along with a standard name one day ! */
+#define ntp_adjtime __adjtimex
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/Linux"
+#endif
#endif
/*
@@ -324,10 +383,13 @@ See convex, aix and sun configurations see how complex it get.
#define HAVE_READKMEM
#define NTP_POSIX_SOURCE
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/*BSD"
+#endif
#endif
/*
- * DECOSF1
+ * DEC AXP OSF/1
*/
#if defined(SYS_DECOSF1)
#define HAVE_SIGNALED_IO
@@ -335,15 +397,22 @@ See convex, aix and sun configurations see how complex it get.
#define NTP_POSIX_SOURCE
#define NTP_SYSCALLS_STD
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/DECOSF1"
+#endif
#endif
/*
* I386
+ * XXX - what OS?
*/
#if defined(SYS_I386)
#define HAVE_READKMEM
#define S_CHAR_DEFINED
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/I386"
+#endif
#endif
/*
@@ -352,6 +421,9 @@ See convex, aix and sun configurations see how complex it get.
#if defined(SYS_MIPS)
#define NOKMEM
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/Mips"
+#endif
#endif
/*
@@ -359,6 +431,9 @@ See convex, aix and sun configurations see how complex it get.
*/
#if defined(SYS_SEQUENT)
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/Sequent Dynix 3"
+#endif
#endif
/*
@@ -369,6 +444,7 @@ See convex, aix and sun configurations see how complex it get.
#ifndef HAVE_SYSV_TTYS
#define HAVE_SYSV_TTYS
#endif
+#define STREAMS_TLI
#define HAVE_ATT_SETPGRP
#define HAVE_SIGNALED_IO
#define USE_UDP_SIGPOLL
@@ -392,25 +468,35 @@ typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned long u_long;
#endif
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/Sequent PTX"
+#endif
#endif
/*
- * Sony
+ * Sony NEWS
*/
#if defined(SYS_SONY)
#define NO_SIGNED_CHAR_DECL
#define HAVE_READKMEM
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/Sony"
+#endif
#endif
/*
* VAX
+ * XXX - VMS?
*/
#if defined(SYS_VAX)
#define NO_SIGNED_CHAR_DECL
#define HAVE_READKMEM
#define HAVE_BSD_NICE
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/VAX"
+#endif
#endif
/*
@@ -419,11 +505,9 @@ typedef unsigned long u_long;
#if defined(SYS_SVR4)
#define HAVE_ATT_SETPGRP
#define USE_PROTOTYPES
-#define HAVE_UNISTD_H
#define NTP_POSIX_SOURCE
#define HAVE_ATT_NICE
#define HAVE_READKMEM
-#define HAVE_SIGNALED_IO
#define USE_TTY_SIGPOLL
#define USE_UDP_SIGPOLL
#define STREAM
@@ -431,6 +515,31 @@ typedef unsigned long u_long;
#define LOCK_PROCESS
#define SYSV_TIMEOFDAY
#define SIZE_RETURNED_IN_BUFFER
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/SysVR4"
+#endif
+#endif
+
+/*
+ * DomainOS
+ */
+#if defined(SYS_DOMAINOS)
+#define HAVE_BSD_NICE
+#define NOKMEM
+#define HAVE_SIGNALED_IO
+#define HAVE_BSD_TTYS
+#define NTP_SYSCALLS_STD
+#define USE_PROTOTYPES
+#define UDP_WILDCARD_DELIVERY
+#ifndef STR_SYSTEM
+#define STR_SYSTEM "UNIX/DOMAINOS"
+#endif
+#endif
+
+#ifdef STREAM /* STREAM implies TERMIOS */
+#ifndef HAVE_TERMIOS
+#define HAVE_TERMIOS
+#endif
#endif
#ifndef RETSIGTYPE
@@ -450,8 +559,64 @@ typedef unsigned long u_long;
#endif
#endif /* NTP_SYSCALLS_STD */
-#if !defined(HAVE_ATT_NICE) && !defined(HAVE_BSD_NICE) && !defined(HAVE_NO_NICE)
+#if !defined(HAVE_ATT_NICE) \
+ && !defined(HAVE_BSD_NICE) \
+ && !defined(HAVE_NO_NICE)
ERROR You_must_define_one_of_the_HAVE_xx_NICE_defines
#endif
+#if !defined(HAVE_SYSV_TTYS) \
+ && !defined(HAVE_BSD_TTYS) \
+ && !defined(HAVE_TERMIOS)
+ ERROR no_tty_type_defined
+#endif
+
+
+#if !defined(XNTP_BIG_ENDIAN) && !defined(XNTP_LITTLE_ENDIAN)
+
+# if defined(XNTP_AUTO_ENDIAN)
+# include <netinet/in.h>
+
+# if BYTE_ORDER == BIG_ENDIAN
+# define XNTP_BIG_ENDIAN
+# endif
+# if BYTE_ORDER == LITTLE_ENDIAN
+# define XNTP_LITTLE_ENDIAN
+# endif
+
+# else /* AUTO */
+
+# ifdef WORDS_BIGENDIAN
+# define XNTP_BIG_ENDIAN 1
+# else
+# define XNTP_LITTLE_ENDIAN 1
+# endif
+
+# endif /* AUTO */
+
+#endif /* !BIG && !LITTLE */
+
+/*
+ * Byte order woes. The DES code is sensitive to byte order. This
+ * used to be resolved by calling ntohl() and htonl() to swap things
+ * around, but this turned out to be quite costly on Vaxes where those
+ * things are actual functions. The code now straightens out byte
+ * order troubles on its own, with no performance penalty for little
+ * end first machines, but at great expense to cleanliness.
+ */
+#if !defined(XNTP_BIG_ENDIAN) && !defined(XNTP_LITTLE_ENDIAN)
+ /*
+ * Pick one or the other.
+ */
+ BYTE_ORDER_NOT_DEFINED_FOR_AUTHENTICATION
+#endif
+
+#if defined(XNTP_BIG_ENDIAN) && defined(XNTP_LITTLE_ENDIAN)
+ /*
+ * Pick one or the other.
+ */
+ BYTE_ORDER_NOT_DEFINED_FOR_AUTHENTICATION
+#endif
+
+
#endif /* __ntp_machine */
diff --git a/usr.sbin/xntpd/include/ntp_refclock.h b/usr.sbin/xntpd/include/ntp_refclock.h
index 96e63ac..cc026f5 100644
--- a/usr.sbin/xntpd/include/ntp_refclock.h
+++ b/usr.sbin/xntpd/include/ntp_refclock.h
@@ -75,10 +75,10 @@ struct refclockstat {
LONG fudgeval2;
u_char currentstatus;
u_char lastevent;
- u_char unused[1];
+ u_char unused;
+ struct ctl_var *kv_list; /* additional variables */
};
-
/*
* Reference clock I/O structure. Used to provide an interface between
* the reference clock drivers and the I/O module.
diff --git a/usr.sbin/xntpd/include/ntp_select.h b/usr.sbin/xntpd/include/ntp_select.h
index 5dd1868..e3ce0e7 100644
--- a/usr.sbin/xntpd/include/ntp_select.h
+++ b/usr.sbin/xntpd/include/ntp_select.h
@@ -14,7 +14,7 @@
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
-#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
+#define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p)))
#endif
#endif /* _ntp_select_h */
diff --git a/usr.sbin/xntpd/include/ntp_stdlib.h b/usr.sbin/xntpd/include/ntp_stdlib.h
index fcccd6e..0ec0625 100644
--- a/usr.sbin/xntpd/include/ntp_stdlib.h
+++ b/usr.sbin/xntpd/include/ntp_stdlib.h
@@ -47,7 +47,7 @@ extern U_LONG calyearstart P((U_LONG));
extern const char *clockname P((int));
extern int clocktime P((int, int, int, int, int, U_LONG, U_LONG *, U_LONG *));
extern char * emalloc P((u_int));
-extern int getopt_l P((int, char **, char *));
+extern int ntp_getopt P((int, char **, char *));
extern void init_auth P((void));
extern void init_lib P((void));
extern void init_random P((void));
diff --git a/usr.sbin/xntpd/include/ntp_string.h b/usr.sbin/xntpd/include/ntp_string.h
index f17905e..cc2eec8 100644
--- a/usr.sbin/xntpd/include/ntp_string.h
+++ b/usr.sbin/xntpd/include/ntp_string.h
@@ -1,29 +1,35 @@
/*
- * Define bcopy, bzero, and bcmp and string op's
+ * Define string ops: strchr strrchr memcmp memmove memset
*/
#ifndef _ntp_string_h
#define _ntp_string_h
-#ifdef NTP_POSIX_SOURCE
+#if defined(NTP_POSIX_SOURCE)
-#if defined(HAVE_MEMORY_H)
-#include <memory.h>
-#endif
+# if defined(HAVE_MEMORY_H)
+# include <memory.h>
+# endif
-#include <string.h>
+# include <string.h>
-#define bcopy(s1,s2,n) memcpy(s2, s1, n)
-#define bzero(s,n) memset(s, 0, n)
-#define bcmp(s1,s2,n) memcmp(s1, s2, n)
+#else
-#else /* NTP_POSIX_SOURCE */
+# include <strings.h>
+# define strchr(s,c) index(s,c)
+# define strrchr(s,c) rindex(s,c)
+# ifndef NTP_NEED_BOPS
+# define NTP_NEED_BOPS
+# endif
+#endif /* NTP_POSIX_SOURCE */
-#include <strings.h>
+#ifdef NTP_NEED_BOPS
-#define strrchr rindex
-#define strchr index
+# define memcmp(a,b,c) bcmp(a,b,c)
+# define memmove(t,f,c) bcopy(f,t,c)
+# define memset(a,x,c) if (x == 0x00) bzero(a,c); else ntp_memset((char*)a,x,c)
+void ntp_memset P((char *, int, int));
-#endif /* NTP_POSIX_SOURCE */
+#endif /* NTP_NEED_BOPS */
#endif /* _ntp_string_h */
diff --git a/usr.sbin/xntpd/include/ntpd.h b/usr.sbin/xntpd/include/ntpd.h
index 85a8125..f2c56af 100644
--- a/usr.sbin/xntpd/include/ntpd.h
+++ b/usr.sbin/xntpd/include/ntpd.h
@@ -1,4 +1,4 @@
-/* ntpd.h,v 3.1 1993/07/06 01:07:03 jbj Exp
+/*
* ntpd.h - Prototypes for xntpd.
*/
@@ -21,6 +21,35 @@ extern void init_control P((void));
extern void process_control P((struct recvbuf *, int));
extern void report_event P((int, struct peer *));
+/* ntp_control.c */
+/*
+ * Structure for translation tables between internal system
+ * variable indices and text format.
+ */
+struct ctl_var {
+ u_short code;
+ u_short flags;
+ char *text;
+};
+/*
+ * Flag values
+ */
+#define CAN_READ 0x01
+#define CAN_WRITE 0x02
+
+#define DEF 0x20
+#define PADDING 0x40
+#define EOV 0x80
+
+#define RO (CAN_READ)
+#define WO (CAN_WRITE)
+#define RW (CAN_READ|CAN_WRITE)
+
+extern char * add_var P((struct ctl_var **, unsigned long, int));
+extern void free_varlist P((struct ctl_var *));
+extern void set_var P((struct ctl_var **, char *, unsigned long, int));
+extern void set_sys_var P((char *, unsigned long, int));
+
/* ntp_intres.c */
extern void ntp_intres P((void));
diff --git a/usr.sbin/xntpd/include/parse.h b/usr.sbin/xntpd/include/parse.h
index 9c8befe..31041af 100644
--- a/usr.sbin/xntpd/include/parse.h
+++ b/usr.sbin/xntpd/include/parse.h
@@ -1,9 +1,9 @@
/*
- * /src/NTP/REPOSITORY/v3/include/parse.h,v 3.11 1993/11/11 11:20:18 kardel Exp
+ * /src/NTP/REPOSITORY/v3/include/parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp
*
- * parse.h,v 3.11 1993/11/11 11:20:18 kardel Exp
+ * parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp
*
- * Copyright (c) 1989,1990,1991,1992,1993
+ * Copyright (c) 1989,1990,1991,1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
*
* This program is distributed in the hope that it will be useful,
@@ -15,7 +15,7 @@
#ifndef __PARSE_H__
#define __PARSE_H__
#if !(defined(lint) || defined(__GNUC__))
- static char parsehrcsid[]="parse.h,v 3.11 1993/11/11 11:20:18 kardel Exp FAU";
+ static char parsehrcsid[]="parse.h,v 3.13 1994/01/25 19:04:21 kardel Exp FAU";
#endif
#include "ntp_types.h"
@@ -365,6 +365,12 @@ extern unsigned LONG pps_simple P((parse_t *, int status, timestamp_t *));
* History:
*
* parse.h,v
+ * Revision 3.13 1994/01/25 19:04:21 kardel
+ * 94/01/23 reconcilation
+ *
+ * Revision 3.12 1994/01/23 17:23:05 kardel
+ * 1994 reconcilation
+ *
* Revision 3.11 1993/11/11 11:20:18 kardel
* declaration fixes
*
diff --git a/usr.sbin/xntpd/include/parse_conf.h b/usr.sbin/xntpd/include/parse_conf.h
index 3cc6348..13cec55 100644
--- a/usr.sbin/xntpd/include/parse_conf.h
+++ b/usr.sbin/xntpd/include/parse_conf.h
@@ -1,9 +1,9 @@
/*
- * /src/NTP/REPOSITORY/v3/include/parse_conf.h,v 3.3 1993/10/22 14:27:10 kardel Exp
+ * /src/NTP/REPOSITORY/v3/include/parse_conf.h,v 3.5 1994/01/25 19:04:23 kardel Exp
*
- * parse_conf.h,v 3.3 1993/10/22 14:27:10 kardel Exp
+ * parse_conf.h,v 3.5 1994/01/25 19:04:23 kardel Exp
*
- * Copyright (c) 1993
+ * Copyright (c) 1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
*
* This program is distributed in the hope that it will be useful,
@@ -15,7 +15,7 @@
#ifndef __PARSE_CONF_H__
#define __PARSE_CONF_H__
#if !(defined(lint) || defined(__GNUC__))
- static char dcfhrcsid[]="parse_conf.h,v 3.3 1993/10/22 14:27:10 kardel Exp FAU";
+ static char dcfhrcsid[]="parse_conf.h,v 3.5 1994/01/25 19:04:23 kardel Exp FAU";
#endif
/*
diff --git a/usr.sbin/xntpd/include/sys/parsestreams.h b/usr.sbin/xntpd/include/sys/parsestreams.h
index 91786c1..d07e75c 100644
--- a/usr.sbin/xntpd/include/sys/parsestreams.h
+++ b/usr.sbin/xntpd/include/sys/parsestreams.h
@@ -1,9 +1,9 @@
/*
- * /src/NTP/REPOSITORY/v3/include/sys/parsestreams.h,v 3.9 1993/11/01 19:59:57 kardel Exp
+ * /src/NTP/REPOSITORY/v3/include/sys/parsestreams.h,v 3.11 1994/01/25 19:04:30 kardel Exp
*
- * parsestreams.h,v 3.9 1993/11/01 19:59:57 kardel Exp
+ * parsestreams.h,v 3.11 1994/01/25 19:04:30 kardel Exp
*
- * Copyright (c) 1989,1990,1991,1992,1993
+ * Copyright (c) 1989,1990,1991,1992,1993,1994
* Frank Kardel Friedrich-Alexander Universitaet Erlangen-Nuernberg
*
* This program is distributed in the hope that it will be useful,
@@ -13,7 +13,7 @@
*/
#if !(defined(lint) || defined(__GNUC__))
- static char parse77hrcsid[]="parsestreams.h,v 3.9 1993/11/01 19:59:57 kardel Exp";
+ static char parse77hrcsid[]="parsestreams.h,v 3.11 1994/01/25 19:04:30 kardel Exp";
#endif
#undef PARSEKERNEL
OpenPOWER on IntegriCloud