From: Harlan Stenn Date: Wed, 25 Apr 2001 23:49:01 +0000 (-0000) Subject: ChangeLog, ntp.h, ntp_config.h, ntp_machine.h, ntp_config.c: X-Git-Tag: NTP_4_0_99_M~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6bf85fd8a2eda3fc9c52ced71cd7fc928397f67;p=thirdparty%2Fntp.git ChangeLog, ntp.h, ntp_config.h, ntp_machine.h, ntp_config.c: * 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 --- diff --git a/ChangeLog b/ChangeLog index 4e6b5afb1f..5ad7db218e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-04-25 Harlan Stenn + + * 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 * configure.in: 4.0.99k29 diff --git a/include/ntp.h b/include/ntp.h index fa9776f32b..8aafc89d15 100644 --- a/include/ntp.h +++ b/include/ntp.h @@ -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\ diff --git a/include/ntp_config.h b/include/ntp_config.h index 131b945e0e..9a03eb0ece 100644 --- a/include/ntp_config.h +++ b/include/ntp_config.h @@ -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 diff --git a/include/ntp_machine.h b/include/ntp_machine.h index 7cac8e1593..d14f5c1d28 100644 --- a/include/ntp_machine.h +++ b/include/ntp_machine.h @@ -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 # include # undef interface diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index 6c668f9b8d..4ba3aa98de 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -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;