summaryrefslogtreecommitdiff
path: root/ntpdc
diff options
context:
space:
mode:
Diffstat (limited to 'ntpdc')
-rw-r--r--ntpdc/Makefile.in14
-rw-r--r--ntpdc/invoke-ntpdc.texi4
-rw-r--r--ntpdc/ntpdc-opts.c236
-rw-r--r--ntpdc/ntpdc-opts.h10
-rw-r--r--ntpdc/ntpdc.1ntpdcman8
-rw-r--r--ntpdc/ntpdc.1ntpdcmdoc6
-rw-r--r--ntpdc/ntpdc.c72
-rw-r--r--ntpdc/ntpdc.h2
-rw-r--r--ntpdc/ntpdc.html4
-rw-r--r--ntpdc/ntpdc.man.in8
-rw-r--r--ntpdc/ntpdc.mdoc.in6
-rw-r--r--ntpdc/ntpdc_ops.c12
12 files changed, 203 insertions, 179 deletions
diff --git a/ntpdc/Makefile.in b/ntpdc/Makefile.in
index b31604d..0bb1e30 100644
--- a/ntpdc/Makefile.in
+++ b/ntpdc/Makefile.in
@@ -50,8 +50,7 @@ subdir = ntpdc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -62,6 +61,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
$(top_srcdir)/sntp/m4/ntp_compiler.m4 \
$(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
@@ -79,6 +79,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -186,6 +188,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -220,7 +223,9 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
+LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NLIST = @LDADD_NLIST@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
@@ -359,6 +364,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
diff --git a/ntpdc/invoke-ntpdc.texi b/ntpdc/invoke-ntpdc.texi
index 57c73e5..246e51e 100644
--- a/ntpdc/invoke-ntpdc.texi
+++ b/ntpdc/invoke-ntpdc.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpdc.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:57:32 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:26:32 AM by AutoGen 5.18.5pre4
# From the definitions ntpdc-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -76,7 +76,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpdc - vendor-specific NTPD control program - Ver. 4.2.7p482
+ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2
Usage: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpdc/ntpdc-opts.c b/ntpdc/ntpdc-opts.c
index 8e595a4..94ccea7 100644
--- a/ntpdc/ntpdc-opts.c
+++ b/ntpdc/ntpdc-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed December 2, 2014 at 08:57:15 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpdc program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -50,7 +50,7 @@ extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright (ntpdc_opt_strs+0)
-#define zLicenseDescrip (ntpdc_opt_strs+315)
+#define zLicenseDescrip (ntpdc_opt_strs+341)
/*
* global included definitions
@@ -68,84 +68,85 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpdc options
*/
-static char const ntpdc_opt_strs[1861] =
-/* 0 */ "ntpdc 4.2.7p482\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const ntpdc_opt_strs[1911] =
+/* 0 */ "ntpdc 4.2.8p2\n"
+ "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
" <http://ntp.org/license>\n"
" <http://opensource.org/licenses/ntp-license.php>\n\0"
-/* 315 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 341 */ "Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose with or without fee is hereby granted,\n"
"provided that the above copyright notice appears in all copies and that\n"
"both the copyright notice and this permission notice appear in supporting\n"
"documentation, and that the name The University of Delaware not be used in\n"
"advertising or publicity pertaining to distribution of the software without\n"
- "specific, written prior permission. The University of Delaware makes no\n"
- "representations about the suitability this software for any purpose. It is\n"
- "provided \"as is\" without express or implied warranty.\n\0"
-/* 955 */ "Force IPv4 DNS name resolution\0"
-/* 986 */ "IPV4\0"
-/* 991 */ "ipv4\0"
-/* 996 */ "Force IPv6 DNS name resolution\0"
-/* 1027 */ "IPV6\0"
-/* 1032 */ "ipv6\0"
-/* 1037 */ "run a command and exit\0"
-/* 1060 */ "COMMAND\0"
-/* 1068 */ "command\0"
-/* 1076 */ "Increase debug verbosity level\0"
-/* 1107 */ "DEBUG_LEVEL\0"
-/* 1119 */ "debug-level\0"
-/* 1131 */ "Set the debug verbosity level\0"
-/* 1161 */ "SET_DEBUG_LEVEL\0"
-/* 1177 */ "set-debug-level\0"
-/* 1193 */ "Force ntpq to operate in interactive mode\0"
-/* 1235 */ "INTERACTIVE\0"
-/* 1247 */ "interactive\0"
-/* 1259 */ "Print a list of the peers\0"
-/* 1285 */ "LISTPEERS\0"
-/* 1295 */ "listpeers\0"
-/* 1305 */ "numeric host addresses\0"
-/* 1328 */ "NUMERIC\0"
-/* 1336 */ "numeric\0"
-/* 1344 */ "PEERS\0"
-/* 1350 */ "peers\0"
-/* 1356 */ "Show a list of the peers\0"
-/* 1381 */ "SHOWPEERS\0"
-/* 1391 */ "showpeers\0"
-/* 1401 */ "display extended usage information and exit\0"
-/* 1445 */ "help\0"
-/* 1450 */ "extended usage information passed thru pager\0"
-/* 1495 */ "more-help\0"
-/* 1505 */ "output version information and exit\0"
-/* 1541 */ "version\0"
-/* 1549 */ "save the option state to a config file\0"
-/* 1588 */ "save-opts\0"
-/* 1598 */ "load options from a config file\0"
-/* 1630 */ "LOAD_OPTS\0"
-/* 1640 */ "no-load-opts\0"
-/* 1653 */ "no\0"
-/* 1656 */ "NTPDC\0"
-/* 1662 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.7p482\n"
+ "specific, written prior permission. The University of Delaware and Network\n"
+ "Time Foundation makes no representations about the suitability this\n"
+ "software for any purpose. It is provided \"as is\" without express or\n"
+ "implied warranty.\n\0"
+/* 1009 */ "Force IPv4 DNS name resolution\0"
+/* 1040 */ "IPV4\0"
+/* 1045 */ "ipv4\0"
+/* 1050 */ "Force IPv6 DNS name resolution\0"
+/* 1081 */ "IPV6\0"
+/* 1086 */ "ipv6\0"
+/* 1091 */ "run a command and exit\0"
+/* 1114 */ "COMMAND\0"
+/* 1122 */ "command\0"
+/* 1130 */ "Increase debug verbosity level\0"
+/* 1161 */ "DEBUG_LEVEL\0"
+/* 1173 */ "debug-level\0"
+/* 1185 */ "Set the debug verbosity level\0"
+/* 1215 */ "SET_DEBUG_LEVEL\0"
+/* 1231 */ "set-debug-level\0"
+/* 1247 */ "Force ntpq to operate in interactive mode\0"
+/* 1289 */ "INTERACTIVE\0"
+/* 1301 */ "interactive\0"
+/* 1313 */ "Print a list of the peers\0"
+/* 1339 */ "LISTPEERS\0"
+/* 1349 */ "listpeers\0"
+/* 1359 */ "numeric host addresses\0"
+/* 1382 */ "NUMERIC\0"
+/* 1390 */ "numeric\0"
+/* 1398 */ "PEERS\0"
+/* 1404 */ "peers\0"
+/* 1410 */ "Show a list of the peers\0"
+/* 1435 */ "SHOWPEERS\0"
+/* 1445 */ "showpeers\0"
+/* 1455 */ "display extended usage information and exit\0"
+/* 1499 */ "help\0"
+/* 1504 */ "extended usage information passed thru pager\0"
+/* 1549 */ "more-help\0"
+/* 1559 */ "output version information and exit\0"
+/* 1595 */ "version\0"
+/* 1603 */ "save the option state to a config file\0"
+/* 1642 */ "save-opts\0"
+/* 1652 */ "load options from a config file\0"
+/* 1684 */ "LOAD_OPTS\0"
+/* 1694 */ "no-load-opts\0"
+/* 1707 */ "no\0"
+/* 1710 */ "NTPDC\0"
+/* 1716 */ "ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
-/* 1794 */ "$HOME\0"
-/* 1800 */ ".\0"
-/* 1802 */ ".ntprc\0"
-/* 1809 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1843 */ "\n\0"
-/* 1845 */ "ntpdc 4.2.7p482";
+/* 1846 */ "$HOME\0"
+/* 1852 */ ".\0"
+/* 1854 */ ".ntprc\0"
+/* 1861 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1895 */ "\n\0"
+/* 1897 */ "ntpdc 4.2.8p2";
/**
* ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv4 option */
-#define IPV4_DESC (ntpdc_opt_strs+955)
+#define IPV4_DESC (ntpdc_opt_strs+1009)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpdc_opt_strs+986)
+#define IPV4_NAME (ntpdc_opt_strs+1040)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpdc_opt_strs+991)
+#define IPV4_name (ntpdc_opt_strs+1045)
/** Other options that appear in conjunction with the ipv4 option */
static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
@@ -157,11 +158,11 @@ static int const aIpv4CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (ntpdc_opt_strs+996)
+#define IPV6_DESC (ntpdc_opt_strs+1050)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpdc_opt_strs+1027)
+#define IPV6_NAME (ntpdc_opt_strs+1081)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpdc_opt_strs+1032)
+#define IPV6_name (ntpdc_opt_strs+1086)
/** Other options that appear in conjunction with the ipv6 option */
static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
@@ -172,11 +173,11 @@ static int const aIpv6CantList[] = {
* command option description:
*/
/** Descriptive text for the command option */
-#define COMMAND_DESC (ntpdc_opt_strs+1037)
+#define COMMAND_DESC (ntpdc_opt_strs+1091)
/** Upper-cased name for the command option */
-#define COMMAND_NAME (ntpdc_opt_strs+1060)
+#define COMMAND_NAME (ntpdc_opt_strs+1114)
/** Name string for the command option */
-#define COMMAND_name (ntpdc_opt_strs+1068)
+#define COMMAND_name (ntpdc_opt_strs+1122)
/** Compiled in flag settings for the command option */
#define COMMAND_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -185,11 +186,11 @@ static int const aIpv6CantList[] = {
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntpdc_opt_strs+1076)
+#define DEBUG_LEVEL_DESC (ntpdc_opt_strs+1130)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpdc_opt_strs+1107)
+#define DEBUG_LEVEL_NAME (ntpdc_opt_strs+1161)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpdc_opt_strs+1119)
+#define DEBUG_LEVEL_name (ntpdc_opt_strs+1173)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
@@ -197,11 +198,11 @@ static int const aIpv6CantList[] = {
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (ntpdc_opt_strs+1131)
+#define SET_DEBUG_LEVEL_DESC (ntpdc_opt_strs+1185)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntpdc_opt_strs+1161)
+#define SET_DEBUG_LEVEL_NAME (ntpdc_opt_strs+1215)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntpdc_opt_strs+1177)
+#define SET_DEBUG_LEVEL_name (ntpdc_opt_strs+1231)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -211,11 +212,11 @@ static int const aIpv6CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the interactive option */
-#define INTERACTIVE_DESC (ntpdc_opt_strs+1193)
+#define INTERACTIVE_DESC (ntpdc_opt_strs+1247)
/** Upper-cased name for the interactive option */
-#define INTERACTIVE_NAME (ntpdc_opt_strs+1235)
+#define INTERACTIVE_NAME (ntpdc_opt_strs+1289)
/** Name string for the interactive option */
-#define INTERACTIVE_name (ntpdc_opt_strs+1247)
+#define INTERACTIVE_name (ntpdc_opt_strs+1301)
/** Other options that appear in conjunction with the interactive option */
static int const aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
@@ -230,11 +231,11 @@ static int const aInteractiveCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the listpeers option */
-#define LISTPEERS_DESC (ntpdc_opt_strs+1259)
+#define LISTPEERS_DESC (ntpdc_opt_strs+1313)
/** Upper-cased name for the listpeers option */
-#define LISTPEERS_NAME (ntpdc_opt_strs+1285)
+#define LISTPEERS_NAME (ntpdc_opt_strs+1339)
/** Name string for the listpeers option */
-#define LISTPEERS_name (ntpdc_opt_strs+1295)
+#define LISTPEERS_name (ntpdc_opt_strs+1349)
/** Other options that appear in conjunction with the listpeers option */
static int const aListpeersCantList[] = {
INDEX_OPT_COMMAND, NO_EQUIVALENT };
@@ -245,11 +246,11 @@ static int const aListpeersCantList[] = {
* numeric option description:
*/
/** Descriptive text for the numeric option */
-#define NUMERIC_DESC (ntpdc_opt_strs+1305)
+#define NUMERIC_DESC (ntpdc_opt_strs+1359)
/** Upper-cased name for the numeric option */
-#define NUMERIC_NAME (ntpdc_opt_strs+1328)
+#define NUMERIC_NAME (ntpdc_opt_strs+1382)
/** Name string for the numeric option */
-#define NUMERIC_name (ntpdc_opt_strs+1336)
+#define NUMERIC_name (ntpdc_opt_strs+1390)
/** Compiled in flag settings for the numeric option */
#define NUMERIC_FLAGS (OPTST_DISABLED)
@@ -258,11 +259,11 @@ static int const aListpeersCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the peers option */
-#define PEERS_DESC (ntpdc_opt_strs+1259)
+#define PEERS_DESC (ntpdc_opt_strs+1313)
/** Upper-cased name for the peers option */
-#define PEERS_NAME (ntpdc_opt_strs+1344)
+#define PEERS_NAME (ntpdc_opt_strs+1398)
/** Name string for the peers option */
-#define PEERS_name (ntpdc_opt_strs+1350)
+#define PEERS_name (ntpdc_opt_strs+1404)
/** Other options that appear in conjunction with the peers option */
static int const aPeersCantList[] = {
INDEX_OPT_COMMAND, NO_EQUIVALENT };
@@ -274,11 +275,11 @@ static int const aPeersCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the showpeers option */
-#define SHOWPEERS_DESC (ntpdc_opt_strs+1356)
+#define SHOWPEERS_DESC (ntpdc_opt_strs+1410)
/** Upper-cased name for the showpeers option */
-#define SHOWPEERS_NAME (ntpdc_opt_strs+1381)
+#define SHOWPEERS_NAME (ntpdc_opt_strs+1435)
/** Name string for the showpeers option */
-#define SHOWPEERS_name (ntpdc_opt_strs+1391)
+#define SHOWPEERS_name (ntpdc_opt_strs+1445)
/** Other options that appear in conjunction with the showpeers option */
static int const aShowpeersCantList[] = {
INDEX_OPT_COMMAND, NO_EQUIVALENT };
@@ -288,11 +289,11 @@ static int const aShowpeersCantList[] = {
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpdc_opt_strs+1401)
-#define HELP_name (ntpdc_opt_strs+1445)
+#define HELP_DESC (ntpdc_opt_strs+1455)
+#define HELP_name (ntpdc_opt_strs+1499)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpdc_opt_strs+1450)
-#define MORE_HELP_name (ntpdc_opt_strs+1495)
+#define MORE_HELP_DESC (ntpdc_opt_strs+1504)
+#define MORE_HELP_name (ntpdc_opt_strs+1549)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -305,14 +306,14 @@ static int const aShowpeersCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpdc_opt_strs+1505)
-#define VER_name (ntpdc_opt_strs+1541)
-#define SAVE_OPTS_DESC (ntpdc_opt_strs+1549)
-#define SAVE_OPTS_name (ntpdc_opt_strs+1588)
-#define LOAD_OPTS_DESC (ntpdc_opt_strs+1598)
-#define LOAD_OPTS_NAME (ntpdc_opt_strs+1630)
-#define NO_LOAD_OPTS_name (ntpdc_opt_strs+1640)
-#define LOAD_OPTS_pfx (ntpdc_opt_strs+1653)
+#define VER_DESC (ntpdc_opt_strs+1559)
+#define VER_name (ntpdc_opt_strs+1595)
+#define SAVE_OPTS_DESC (ntpdc_opt_strs+1603)
+#define SAVE_OPTS_name (ntpdc_opt_strs+1642)
+#define LOAD_OPTS_DESC (ntpdc_opt_strs+1652)
+#define LOAD_OPTS_NAME (ntpdc_opt_strs+1684)
+#define NO_LOAD_OPTS_name (ntpdc_opt_strs+1694)
+#define LOAD_OPTS_pfx (ntpdc_opt_strs+1707)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -521,24 +522,24 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpdc. */
-#define zPROGNAME (ntpdc_opt_strs+1656)
+#define zPROGNAME (ntpdc_opt_strs+1710)
/** Reference to the title line for ntpdc usage. */
-#define zUsageTitle (ntpdc_opt_strs+1662)
+#define zUsageTitle (ntpdc_opt_strs+1716)
/** ntpdc configuration file name. */
-#define zRcName (ntpdc_opt_strs+1802)
+#define zRcName (ntpdc_opt_strs+1854)
/** Directories to search for ntpdc config files. */
static char const * const apzHomeList[3] = {
- ntpdc_opt_strs+1794,
- ntpdc_opt_strs+1800,
+ ntpdc_opt_strs+1846,
+ ntpdc_opt_strs+1852,
NULL };
/** The ntpdc program bug email address. */
-#define zBugsAddr (ntpdc_opt_strs+1809)
+#define zBugsAddr (ntpdc_opt_strs+1861)
/** Clarification/explanation of what ntpdc does. */
-#define zExplain (ntpdc_opt_strs+1843)
+#define zExplain (ntpdc_opt_strs+1895)
/** Extra detail explaining what ntpdc does. */
#define zDetail (NULL)
/** The full version string for ntpdc. */
-#define zFullVersion (ntpdc_opt_strs+1845)
+#define zFullVersion (ntpdc_opt_strs+1897)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -795,8 +796,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdcOptions.pzCopyright */
- puts(_("ntpdc 4.2.7p482\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("ntpdc 4.2.8p2\n\
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -810,9 +811,10 @@ provided that the above copyright notice appears in all copies and that\n\
both the copyright notice and this permission notice appear in supporting\n\
documentation, and that the name The University of Delaware not be used in\n\
advertising or publicity pertaining to distribution of the software without\n\
-specific, written prior permission. The University of Delaware makes no\n\
-representations about the suitability this software for any purpose. It is\n\
-provided \"as is\" without express or implied warranty.\n"));
+specific, written prior permission. The University of Delaware and Network\n\
+Time Foundation makes no representations about the suitability this\n\
+software for any purpose. It is provided \"as is\" without express or\n\
+implied warranty.\n"));
/* referenced via ntpdcOptions.pOptDesc->pzText */
puts(_("Force IPv4 DNS name resolution"));
@@ -860,14 +862,14 @@ provided \"as is\" without express or implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpdcOptions.pzUsageTitle */
- puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.7p482\n\
+ puts(_("ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpdcOptions.pzExplain */
puts(_("\n"));
/* referenced via ntpdcOptions.pzFullVersion */
- puts(_("ntpdc 4.2.7p482"));
+ puts(_("ntpdc 4.2.8p2"));
/* referenced via ntpdcOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpdc/ntpdc-opts.h b/ntpdc/ntpdc-opts.h
index 182f77a..8476359 100644
--- a/ntpdc/ntpdc-opts.h
+++ b/ntpdc/ntpdc-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed December 2, 2014 at 08:57:15 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpdc-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpdc program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -83,9 +83,9 @@ typedef enum {
/** count of all options for ntpdc */
#define OPTION_CT 15
/** ntpdc version */
-#define NTPDC_VERSION "4.2.7p482"
+#define NTPDC_VERSION "4.2.8p2"
/** Full ntpdc version text */
-#define NTPDC_FULL_VERSION "ntpdc 4.2.7p482"
+#define NTPDC_FULL_VERSION "ntpdc 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpdc/ntpdc.1ntpdcman b/ntpdc/ntpdc.1ntpdcman
index a3579bb..ecff16b 100644
--- a/ntpdc/ntpdc.1ntpdcman
+++ b/ntpdc/ntpdc.1ntpdcman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc 1ntpdcman "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpdc 1ntpdcman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6QaWHN/ag-hRaOGN)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-dXaWh5/ag-rXaOg5)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:28 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:27 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -848,7 +848,7 @@ RFC1305
.SH AUTHORS
The formatting directives in this document came from FreeBSD.
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/ntpdc/ntpdc.1ntpdcmdoc b/ntpdc/ntpdc.1ntpdcmdoc
index 46f1fa5..7f0c363 100644
--- a/ntpdc/ntpdc.1ntpdcmdoc
+++ b/ntpdc/ntpdc.1ntpdcmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPDC 1ntpdcmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:34 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:34 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -787,7 +787,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
The formatting directives in this document came from FreeBSD.
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/ntpdc/ntpdc.c b/ntpdc/ntpdc.c
index 3595184..ce35bd4 100644
--- a/ntpdc/ntpdc.c
+++ b/ntpdc/ntpdc.c
@@ -96,8 +96,10 @@ static void hostnames (struct parse *, FILE *);
static void setdebug (struct parse *, FILE *);
static void quit (struct parse *, FILE *);
static void version (struct parse *, FILE *);
-static void warning (const char *, const char *, const char *);
-static void error (const char *, const char *, const char *);
+static void warning (const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
+static void error (const char *, ...)
+ __attribute__((__format__(__printf__, 1, 2)));
static u_long getkeyid (const char *);
@@ -506,7 +508,7 @@ openhost(
sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
if (sockfd == INVALID_SOCKET) {
- error("socket", "", "");
+ error("socket");
exit(-1);
}
@@ -517,7 +519,7 @@ openhost(
if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
&rbufsize, sizeof(int)) == -1)
- error("setsockopt", "", "");
+ error("setsockopt");
}
# endif
#endif
@@ -528,7 +530,7 @@ openhost(
#else
if (connect(sockfd, ai->ai_addr, ai->ai_addrlen) == -1) {
#endif /* SYS_VXWORKS */
- error("connect", "", "");
+ error("connect");
exit(-1);
}
@@ -551,7 +553,7 @@ sendpkt(
)
{
if (send(sockfd, xdata, xdatalen, 0) == -1) {
- warning("write to %s failed", currenthost, "");
+ warning("write to %s failed", currenthost);
return -1;
}
@@ -600,7 +602,7 @@ getresponse(
int numrecv;
int seq;
fd_set fds;
- int n;
+ ssize_t n;
int pad;
/*
@@ -629,7 +631,7 @@ getresponse(
n = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvo);
if (n == -1) {
- warning("select fails", "", "");
+ warning("select fails");
return -1;
}
if (n == 0) {
@@ -648,7 +650,7 @@ getresponse(
printf("Received sequence numbers");
for (n = 0; n <= MAXSEQ; n++)
if (haveseq[n])
- printf(" %d,", n);
+ printf(" %zd,", n);
if (lastseq != 999)
printf(" last frame received\n");
else
@@ -660,7 +662,7 @@ getresponse(
n = recv(sockfd, (char *)&rpkt, sizeof(rpkt), 0);
if (n == -1) {
- warning("read", "", "");
+ warning("read");
return -1;
}
@@ -668,9 +670,9 @@ getresponse(
/*
* Check for format errors. Bug proofing.
*/
- if (n < RESP_HEADER_SIZE) {
+ if (n < (ssize_t)RESP_HEADER_SIZE) {
if (debug)
- printf("Short (%d byte) packet received\n", n);
+ printf("Short (%zd byte) packet received\n", n);
goto again;
}
if (INFO_VERSION(rpkt.rm_vn_mode) > NTP_VERSION ||
@@ -738,8 +740,8 @@ getresponse(
if ((size_t)datasize > (n-RESP_HEADER_SIZE)) {
if (debug)
printf(
- "Received items %d, size %d (total %d), data in packet is %lu\n",
- items, size, datasize, (u_long)(n-RESP_HEADER_SIZE));
+ "Received items %d, size %d (total %d), data in packet is %zu\n",
+ items, size, datasize, n-RESP_HEADER_SIZE);
goto again;
}
@@ -920,11 +922,11 @@ sendrequest(
if (!maclen) {
fprintf(stderr, "Key not found\n");
return 1;
- } else if (maclen != (info_auth_hashlen + sizeof(keyid_t))) {
+ } else if (maclen != (int)(info_auth_hashlen + sizeof(keyid_t))) {
fprintf(stderr,
- "%d octet MAC, %lu expected with %lu octet digest\n",
- maclen, (u_long)(info_auth_hashlen + sizeof(keyid_t)),
- (u_long)info_auth_hashlen);
+ "%d octet MAC, %zu expected with %zu octet digest\n",
+ maclen, (info_auth_hashlen + sizeof(keyid_t)),
+ info_auth_hashlen);
return 1;
}
return sendpkt(&qpkt, reqsize + maclen);
@@ -973,7 +975,7 @@ again:
res = select(sockfd+1, &fds, (fd_set *)0, (fd_set *)0, &tvzero);
if (res == -1) {
- warning("polling select", "", "");
+ warning("polling select");
return -1;
} else if (res > 0)
@@ -1868,34 +1870,44 @@ version(
}
+static void __attribute__((__format__(__printf__, 1, 0)))
+vwarning(const char *fmt, va_list ap)
+{
+ int serrno = errno;
+ (void) fprintf(stderr, "%s: ", progname);
+ vfprintf(stderr, fmt, ap);
+ (void) fprintf(stderr, ": %s\n", strerror(serrno));
+}
+
/*
* warning - print a warning message
*/
-static void
+static void __attribute__((__format__(__printf__, 1, 2)))
warning(
const char *fmt,
- const char *st1,
- const char *st2
+ ...
)
{
- (void) fprintf(stderr, "%s: ", progname);
- (void) fprintf(stderr, fmt, st1, st2);
- (void) fprintf(stderr, ": ");
- perror("");
+ va_list ap;
+ va_start(ap, fmt);
+ vwarning(fmt, ap);
+ va_end(ap);
}
/*
* error - print a message and exit
*/
-static void
+static void __attribute__((__format__(__printf__, 1, 2)))
error(
const char *fmt,
- const char *st1,
- const char *st2
+ ...
)
{
- warning(fmt, st1, st2);
+ va_list ap;
+ va_start(ap, fmt);
+ vwarning(fmt, ap);
+ va_end(ap);
exit(1);
}
diff --git a/ntpdc/ntpdc.h b/ntpdc/ntpdc.h
index bfc2228..6da4a5c 100644
--- a/ntpdc/ntpdc.h
+++ b/ntpdc/ntpdc.h
@@ -43,7 +43,7 @@ typedef struct {
struct parse {
char *keyword;
arg_v argval[MAXARGS + MOREARGS];
- int nargs;
+ size_t nargs;
};
/*
diff --git a/ntpdc/ntpdc.html b/ntpdc/ntpdc.html
index 8381a2b..37e195c 100644
--- a/ntpdc/ntpdc.html
+++ b/ntpdc/ntpdc.html
@@ -36,7 +36,7 @@ display the time offset of the system clock relative to the server
clock. Run as root, it can correct the system clock to this offset as
well. It can be run as an interactive command or from a cron job.
- <p>This document applies to version 4.2.7p482 of <code>ntpdc</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpdc</code>.
<p>The program implements the SNTP protocol as defined by RFC 5905, the NTPv4
IETF specification.
@@ -152,7 +152,7 @@ the usage text by passing it through a pager program.
used to select the program, defaulting to <span class="file">more</span>. Both will exit
with a status code of 0.
-<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.7p482
+<pre class="example">ntpdc - vendor-specific NTPD control program - Ver. 4.2.8p2
Usage: ntpdc [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpdc/ntpdc.man.in b/ntpdc/ntpdc.man.in
index db5d1cc..71aa128 100644
--- a/ntpdc/ntpdc.man.in
+++ b/ntpdc/ntpdc.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpdc @NTPDC_MS@ "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpdc @NTPDC_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6QaWHN/ag-hRaOGN)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-dXaWh5/ag-rXaOg5)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:28 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:27 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -848,7 +848,7 @@ RFC1305
.SH AUTHORS
The formatting directives in this document came from FreeBSD.
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/ntpdc/ntpdc.mdoc.in b/ntpdc/ntpdc.mdoc.in
index 95b2a23..8a89e48 100644
--- a/ntpdc/ntpdc.mdoc.in
+++ b/ntpdc/ntpdc.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPDC @NTPDC_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpdc-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:34 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:34 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpdc-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -787,7 +787,7 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Sh AUTHORS
The formatting directives in this document came from FreeBSD.
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/ntpdc/ntpdc_ops.c b/ntpdc/ntpdc_ops.c
index b0e7af0..be8ffa2 100644
--- a/ntpdc/ntpdc_ops.c
+++ b/ntpdc/ntpdc_ops.c
@@ -1346,7 +1346,7 @@ again:
sendsize = v4sizeof(struct conf_peer);
items = 1;
- while (pcmd->nargs > items) {
+ while (pcmd->nargs > (size_t)items) {
if (STREQ(pcmd->argval[items].string, "prefer"))
flags |= CONF_FLAG_PREFER;
else if (STREQ(pcmd->argval[items].string, "burst"))
@@ -1571,7 +1571,7 @@ doset(
sys.flags = 0;
res = 0;
- for (items = 0; items < pcmd->nargs; items++) {
+ for (items = 0; (size_t)items < pcmd->nargs; items++) {
if (STREQ(pcmd->argval[items].string, "auth"))
sys.flags |= SYS_FLAG_AUTH;
else if (STREQ(pcmd->argval[items].string, "bclient"))
@@ -1833,7 +1833,7 @@ do_restrict(
u_int32 num;
u_long bit;
int i;
- int res;
+ size_t res;
int err;
int sendsize;
@@ -2095,7 +2095,7 @@ reset(
int itemsize;
char *dummy;
int i;
- int res;
+ size_t res;
int err;
err = 0;
@@ -2262,7 +2262,7 @@ do_trustkey(
)
{
u_long keyids[MAXARGS];
- int i;
+ size_t i;
int items;
int itemsize;
char *dummy;
@@ -3055,7 +3055,7 @@ iflist(
int res
)
{
- static char *actions = "?.+-";
+ static const char *actions = "?.+-";
sockaddr_u saddr;
if (res != 0)