]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ChangeLog, ntp.h, ntp_config.h, ntp_machine.h, ntp_config.c:
authorHarlan Stenn <stenn@ntp.org>
Wed, 25 Apr 2001 23:49:01 +0000 (23:49 -0000)
committerHarlan Stenn <stenn@ntp.org>
Wed, 25 Apr 2001 23:49:01 +0000 (23:49 -0000)
  * ntpd/ntp_config.c: Add "version" support.
  (getconfig): version support.
  * include/ntp_config.h (CONF_RES_VERSION): Added.
  * include/ntp.h (RES_VERSION): Added.
  From: Dave Mills.
  * include/ntp_machine.h (ifreq): WinNT cleanup

bk: 3ae7626dZ-Ux6FLF9WxOUD_mBHjQRA

ChangeLog
include/ntp.h
include/ntp_config.h
include/ntp_machine.h
ntpd/ntp_config.c

index 4e6b5afb1f03a01930fc71882b1386d460ae63d2..5ad7db218ecf12165eea8fa2b1de63136aa1a266 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-04-25  Harlan Stenn  <stenn@whimsy.udel.edu>
+
+       * ntpd/ntp_config.c: Add "version" support.
+       (getconfig): version support.
+       * include/ntp_config.h (CONF_RES_VERSION): Added.
+       * include/ntp.h (RES_VERSION): Added.
+       From: Dave Mills.
+
+       * include/ntp_machine.h (ifreq): WinNT cleanup
+
 2001-04-23  Harlan Stenn  <stenn@whimsy.udel.edu>
 
        * configure.in: 4.0.99k29
index fa9776f32bc443699c2a34215befec6b713d9dc8..8aafc89d15757dd40bab38f13d2adb43c1c775ce 100644 (file)
@@ -739,15 +739,16 @@ struct restrictlist {
 /*
  * Access flags
  */
-#define        RES_IGNORE              0x1     /* ignore if matched */
-#define        RES_DONTSERVE           0x2     /* don't give him any time */
-#define        RES_DONTTRUST           0x4     /* don't trust if matched */
-#define        RES_NOQUERY             0x8     /* don't allow queries if matched */
-#define        RES_NOMODIFY            0x10    /* don't allow him to modify server */
-#define        RES_NOPEER              0x20    /* don't allocate memory resources */
-#define        RES_NOTRAP              0x40    /* don't allow him to set traps */
-#define        RES_LPTRAP              0x80    /* traps set by him are low priority */
-#define RES_LIMITED            0x100   /* limit per net number of clients */
+#define        RES_IGNORE              0x001   /* ignore if matched */
+#define        RES_DONTSERVE           0x002   /* don't give him any time */
+#define        RES_DONTTRUST           0x004   /* don't trust if matched */
+#define        RES_NOQUERY             0x008   /* don't allow queries if matched */
+#define        RES_NOMODIFY            0x010   /* don't allow him to modify server */
+#define        RES_NOPEER              0x020   /* don't allocate memory resources */
+#define        RES_NOTRAP              0x040   /* don't allow him to set traps */
+#define        RES_LPTRAP              0x080   /* traps set by him are low priority */
+#define RES_VERSION            0x100   /* serve only current version */
+#define RES_LIMITED            0x200   /* limit per net number of clients */
 
 #define        RES_ALLFLAGS \
     (RES_IGNORE|RES_DONTSERVE|RES_DONTTRUST|RES_NOQUERY\
index 131b945e0e10bb8f6a2d28414b2b78b1ec124885..9a03eb0ece1f69951f5bcc56cc3ade71674bdfac 100644 (file)
@@ -87,7 +87,8 @@
 #define CONF_RES_NOTRAP                8
 #define CONF_RES_LPTRAP                9
 #define CONF_RES_NTPPORT       10
-#define CONF_RES_LIMITED       11
+#define CONF_RES_VERSION       11
+#define CONF_RES_LIMITED       12
 
 /*
  * "trap" modifier keywords
index 7cac8e1593bfc9231a51492722ae32a960f5307d..d14f5c1d28b300d34bbda453cbffe34a52195375 100644 (file)
@@ -242,18 +242,18 @@ typedef unsigned long u_long;
     error "NT requires config.h to be included"
 # endif /* HAVE_CONFIG_H) */
 
-#if defined SYS_WINNT
 # define ifreq _INTERFACE_INFO
 # define ifr_flags iiFlags
 # define ifr_addr iiAddress.AddressIn
 # define ifr_broadaddr iiBroadcastAddress.AddressIn
 # define ifr_mask iiNetmask.AddressIn
-#endif /* SYS_WINNT */
 
 # define isascii __isascii
 # define isatty _isatty
 # define mktemp _mktemp
-# define getpid GetCurrentProcessId
+# if 0
+#  define getpid GetCurrentProcessId
+# endif
 # include <windows.h>
 # include <ws2tcpip.h>
 # undef interface
index 6c668f9b8d5bb5dbd13a94b055672d61ab477609..4ba3aa98de0ee42afde3fd72a2cd9fef87ae431a 100644 (file)
@@ -176,6 +176,7 @@ static      struct keyword res_keywords[] = {
        { "notrap",             CONF_RES_NOTRAP },
        { "notrust",            CONF_RES_NOTRUST },
        { "ntpport",            CONF_RES_NTPPORT },
+       { "version",            CONF_RES_VERSION },
        { "",                   CONFIG_UNKNOWN }
 };
 
@@ -1093,6 +1094,10 @@ getconfig(
                                        peerkey |= RESM_NTPONLY;
                                        break;
 
+                                   case CONF_RES_VERSION:
+                                       peerversion |= RES_VERSION;
+                                       break;
+
                                    case CONF_RES_LIMITED:
                                        peerversion |= RES_LIMITED;
                                        break;