summaryrefslogtreecommitdiff
path: root/ntpq
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-07 08:29:34 +0000
committer <>2015-04-13 18:52:43 +0000
commitb2ccf8dd31d1457ae9f0ae270054117179220370 (patch)
tree4ccd4a16d5e9ef5869630ba624e822665a6e248c /ntpq
parentbdab5265fcbf3f472545073a23f8999749a9f2b9 (diff)
downloadntp-master.tar.gz
Imported from /home/lorry/working-area/delta_ntp/ntp-4.2.8p2.tar.gz.HEADntp-4.2.8p2master
Diffstat (limited to 'ntpq')
-rw-r--r--ntpq/Makefile.in14
-rw-r--r--ntpq/invoke-ntpq.texi4
-rw-r--r--ntpq/ntpq-opts.c234
-rw-r--r--ntpq/ntpq-opts.h10
-rw-r--r--ntpq/ntpq-subs.c215
-rw-r--r--ntpq/ntpq.1ntpqman10
-rw-r--r--ntpq/ntpq.1ntpqmdoc8
-rw-r--r--ntpq/ntpq.c75
-rw-r--r--ntpq/ntpq.h2
-rw-r--r--ntpq/ntpq.html4
-rw-r--r--ntpq/ntpq.man.in10
-rw-r--r--ntpq/ntpq.mdoc.in8
12 files changed, 308 insertions, 286 deletions
diff --git a/ntpq/Makefile.in b/ntpq/Makefile.in
index ccb5a84..fad9001 100644
--- a/ntpq/Makefile.in
+++ b/ntpq/Makefile.in
@@ -50,8 +50,7 @@ subdir = ntpq
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
@@ -193,6 +195,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -227,7 +230,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@
@@ -366,6 +371,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/ntpq/invoke-ntpq.texi b/ntpq/invoke-ntpq.texi
index e30ccd1..505bb23 100644
--- a/ntpq/invoke-ntpq.texi
+++ b/ntpq/invoke-ntpq.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:58:08 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:27:07 AM by AutoGen 5.18.5pre4
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -835,7 +835,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.7p482
+ntpq - standard NTP query program - Ver. 4.2.8p2
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/ntpq/ntpq-opts.c b/ntpq/ntpq-opts.c
index 733b0dd..74f3d3d 100644
--- a/ntpq/ntpq-opts.c
+++ b/ntpq/ntpq-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed December 2, 2014 at 08:57:37 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:37 AM by AutoGen 5.18.5pre4
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpq 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 (ntpq_opt_strs+0)
-#define zLicenseDescrip (ntpq_opt_strs+314)
+#define zLicenseDescrip (ntpq_opt_strs+340)
/*
* global included definitions
@@ -68,84 +68,85 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpq options
*/
-static char const ntpq_opt_strs[1875] =
-/* 0 */ "ntpq 4.2.7p482\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const ntpq_opt_strs[1925] =
+/* 0 */ "ntpq 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"
-/* 314 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 340 */ "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"
-/* 954 */ "Force IPv4 DNS name resolution\0"
-/* 985 */ "IPV4\0"
-/* 990 */ "ipv4\0"
-/* 995 */ "Force IPv6 DNS name resolution\0"
-/* 1026 */ "IPV6\0"
-/* 1031 */ "ipv6\0"
-/* 1036 */ "run a command and exit\0"
-/* 1059 */ "COMMAND\0"
-/* 1067 */ "command\0"
-/* 1075 */ "Increase debug verbosity level\0"
-/* 1106 */ "DEBUG_LEVEL\0"
-/* 1118 */ "debug-level\0"
-/* 1130 */ "Set the debug verbosity level\0"
-/* 1160 */ "SET_DEBUG_LEVEL\0"
-/* 1176 */ "set-debug-level\0"
-/* 1192 */ "Force ntpq to operate in interactive mode\0"
-/* 1234 */ "INTERACTIVE\0"
-/* 1246 */ "interactive\0"
-/* 1258 */ "numeric host addresses\0"
-/* 1281 */ "NUMERIC\0"
-/* 1289 */ "numeric\0"
-/* 1297 */ "Always output status line with readvar\0"
-/* 1336 */ "OLD_RV\0"
-/* 1343 */ "old-rv\0"
-/* 1350 */ "Print a list of the peers\0"
-/* 1376 */ "PEERS\0"
-/* 1382 */ "peers\0"
-/* 1388 */ "Display the full 'remote' value\0"
-/* 1420 */ "WIDE\0"
-/* 1425 */ "wide\0"
-/* 1430 */ "display extended usage information and exit\0"
-/* 1474 */ "help\0"
-/* 1479 */ "extended usage information passed thru pager\0"
-/* 1524 */ "more-help\0"
-/* 1534 */ "output version information and exit\0"
-/* 1570 */ "version\0"
-/* 1578 */ "save the option state to a config file\0"
-/* 1617 */ "save-opts\0"
-/* 1627 */ "load options from a config file\0"
-/* 1659 */ "LOAD_OPTS\0"
-/* 1669 */ "no-load-opts\0"
-/* 1682 */ "no\0"
-/* 1685 */ "NTPQ\0"
-/* 1690 */ "ntpq - standard NTP query 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"
+/* 1008 */ "Force IPv4 DNS name resolution\0"
+/* 1039 */ "IPV4\0"
+/* 1044 */ "ipv4\0"
+/* 1049 */ "Force IPv6 DNS name resolution\0"
+/* 1080 */ "IPV6\0"
+/* 1085 */ "ipv6\0"
+/* 1090 */ "run a command and exit\0"
+/* 1113 */ "COMMAND\0"
+/* 1121 */ "command\0"
+/* 1129 */ "Increase debug verbosity level\0"
+/* 1160 */ "DEBUG_LEVEL\0"
+/* 1172 */ "debug-level\0"
+/* 1184 */ "Set the debug verbosity level\0"
+/* 1214 */ "SET_DEBUG_LEVEL\0"
+/* 1230 */ "set-debug-level\0"
+/* 1246 */ "Force ntpq to operate in interactive mode\0"
+/* 1288 */ "INTERACTIVE\0"
+/* 1300 */ "interactive\0"
+/* 1312 */ "numeric host addresses\0"
+/* 1335 */ "NUMERIC\0"
+/* 1343 */ "numeric\0"
+/* 1351 */ "Always output status line with readvar\0"
+/* 1390 */ "OLD_RV\0"
+/* 1397 */ "old-rv\0"
+/* 1404 */ "Print a list of the peers\0"
+/* 1430 */ "PEERS\0"
+/* 1436 */ "peers\0"
+/* 1442 */ "Display the full 'remote' value\0"
+/* 1474 */ "WIDE\0"
+/* 1479 */ "wide\0"
+/* 1484 */ "display extended usage information and exit\0"
+/* 1528 */ "help\0"
+/* 1533 */ "extended usage information passed thru pager\0"
+/* 1578 */ "more-help\0"
+/* 1588 */ "output version information and exit\0"
+/* 1624 */ "version\0"
+/* 1632 */ "save the option state to a config file\0"
+/* 1671 */ "save-opts\0"
+/* 1681 */ "load options from a config file\0"
+/* 1713 */ "LOAD_OPTS\0"
+/* 1723 */ "no-load-opts\0"
+/* 1736 */ "no\0"
+/* 1739 */ "NTPQ\0"
+/* 1744 */ "ntpq - standard NTP query program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
-/* 1811 */ "$HOME\0"
-/* 1817 */ ".\0"
-/* 1819 */ ".ntprc\0"
-/* 1826 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1860 */ "ntpq 4.2.7p482";
+/* 1863 */ "$HOME\0"
+/* 1869 */ ".\0"
+/* 1871 */ ".ntprc\0"
+/* 1878 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 1912 */ "ntpq 4.2.8p2";
/**
* ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv4 option */
-#define IPV4_DESC (ntpq_opt_strs+954)
+#define IPV4_DESC (ntpq_opt_strs+1008)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpq_opt_strs+985)
+#define IPV4_NAME (ntpq_opt_strs+1039)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpq_opt_strs+990)
+#define IPV4_name (ntpq_opt_strs+1044)
/** 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 (ntpq_opt_strs+995)
+#define IPV6_DESC (ntpq_opt_strs+1049)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpq_opt_strs+1026)
+#define IPV6_NAME (ntpq_opt_strs+1080)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpq_opt_strs+1031)
+#define IPV6_name (ntpq_opt_strs+1085)
/** 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 (ntpq_opt_strs+1036)
+#define COMMAND_DESC (ntpq_opt_strs+1090)
/** Upper-cased name for the command option */
-#define COMMAND_NAME (ntpq_opt_strs+1059)
+#define COMMAND_NAME (ntpq_opt_strs+1113)
/** Name string for the command option */
-#define COMMAND_name (ntpq_opt_strs+1067)
+#define COMMAND_name (ntpq_opt_strs+1121)
/** Compiled in flag settings for the command option */
#define COMMAND_FLAGS (OPTST_DISABLED \
| 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 (ntpq_opt_strs+1075)
+#define DEBUG_LEVEL_DESC (ntpq_opt_strs+1129)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1106)
+#define DEBUG_LEVEL_NAME (ntpq_opt_strs+1160)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpq_opt_strs+1118)
+#define DEBUG_LEVEL_name (ntpq_opt_strs+1172)
/** 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 (ntpq_opt_strs+1130)
+#define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1184)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1160)
+#define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1214)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1176)
+#define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1230)
/** 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 (ntpq_opt_strs+1192)
+#define INTERACTIVE_DESC (ntpq_opt_strs+1246)
/** Upper-cased name for the interactive option */
-#define INTERACTIVE_NAME (ntpq_opt_strs+1234)
+#define INTERACTIVE_NAME (ntpq_opt_strs+1288)
/** Name string for the interactive option */
-#define INTERACTIVE_name (ntpq_opt_strs+1246)
+#define INTERACTIVE_name (ntpq_opt_strs+1300)
/** Other options that appear in conjunction with the interactive option */
static int const aInteractiveCantList[] = {
INDEX_OPT_COMMAND,
@@ -227,11 +228,11 @@ static int const aInteractiveCantList[] = {
* numeric option description:
*/
/** Descriptive text for the numeric option */
-#define NUMERIC_DESC (ntpq_opt_strs+1258)
+#define NUMERIC_DESC (ntpq_opt_strs+1312)
/** Upper-cased name for the numeric option */
-#define NUMERIC_NAME (ntpq_opt_strs+1281)
+#define NUMERIC_NAME (ntpq_opt_strs+1335)
/** Name string for the numeric option */
-#define NUMERIC_name (ntpq_opt_strs+1289)
+#define NUMERIC_name (ntpq_opt_strs+1343)
/** Compiled in flag settings for the numeric option */
#define NUMERIC_FLAGS (OPTST_DISABLED)
@@ -239,11 +240,11 @@ static int const aInteractiveCantList[] = {
* old-rv option description:
*/
/** Descriptive text for the old-rv option */
-#define OLD_RV_DESC (ntpq_opt_strs+1297)
+#define OLD_RV_DESC (ntpq_opt_strs+1351)
/** Upper-cased name for the old-rv option */
-#define OLD_RV_NAME (ntpq_opt_strs+1336)
+#define OLD_RV_NAME (ntpq_opt_strs+1390)
/** Name string for the old-rv option */
-#define OLD_RV_name (ntpq_opt_strs+1343)
+#define OLD_RV_name (ntpq_opt_strs+1397)
/** Compiled in flag settings for the old-rv option */
#define OLD_RV_FLAGS (OPTST_DISABLED)
@@ -252,11 +253,11 @@ static int const aInteractiveCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the peers option */
-#define PEERS_DESC (ntpq_opt_strs+1350)
+#define PEERS_DESC (ntpq_opt_strs+1404)
/** Upper-cased name for the peers option */
-#define PEERS_NAME (ntpq_opt_strs+1376)
+#define PEERS_NAME (ntpq_opt_strs+1430)
/** Name string for the peers option */
-#define PEERS_name (ntpq_opt_strs+1382)
+#define PEERS_name (ntpq_opt_strs+1436)
/** Other options that appear in conjunction with the peers option */
static int const aPeersCantList[] = {
INDEX_OPT_INTERACTIVE, NO_EQUIVALENT };
@@ -267,22 +268,22 @@ static int const aPeersCantList[] = {
* wide option description:
*/
/** Descriptive text for the wide option */
-#define WIDE_DESC (ntpq_opt_strs+1388)
+#define WIDE_DESC (ntpq_opt_strs+1442)
/** Upper-cased name for the wide option */
-#define WIDE_NAME (ntpq_opt_strs+1420)
+#define WIDE_NAME (ntpq_opt_strs+1474)
/** Name string for the wide option */
-#define WIDE_name (ntpq_opt_strs+1425)
+#define WIDE_name (ntpq_opt_strs+1479)
/** Compiled in flag settings for the wide option */
#define WIDE_FLAGS (OPTST_DISABLED)
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpq_opt_strs+1430)
-#define HELP_name (ntpq_opt_strs+1474)
+#define HELP_DESC (ntpq_opt_strs+1484)
+#define HELP_name (ntpq_opt_strs+1528)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpq_opt_strs+1479)
-#define MORE_HELP_name (ntpq_opt_strs+1524)
+#define MORE_HELP_DESC (ntpq_opt_strs+1533)
+#define MORE_HELP_name (ntpq_opt_strs+1578)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -295,14 +296,14 @@ static int const aPeersCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpq_opt_strs+1534)
-#define VER_name (ntpq_opt_strs+1570)
-#define SAVE_OPTS_DESC (ntpq_opt_strs+1578)
-#define SAVE_OPTS_name (ntpq_opt_strs+1617)
-#define LOAD_OPTS_DESC (ntpq_opt_strs+1627)
-#define LOAD_OPTS_NAME (ntpq_opt_strs+1659)
-#define NO_LOAD_OPTS_name (ntpq_opt_strs+1669)
-#define LOAD_OPTS_pfx (ntpq_opt_strs+1682)
+#define VER_DESC (ntpq_opt_strs+1588)
+#define VER_name (ntpq_opt_strs+1624)
+#define SAVE_OPTS_DESC (ntpq_opt_strs+1632)
+#define SAVE_OPTS_name (ntpq_opt_strs+1671)
+#define LOAD_OPTS_DESC (ntpq_opt_strs+1681)
+#define LOAD_OPTS_NAME (ntpq_opt_strs+1713)
+#define NO_LOAD_OPTS_name (ntpq_opt_strs+1723)
+#define LOAD_OPTS_pfx (ntpq_opt_strs+1736)
#define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3)
/**
* Declare option callback procedures
@@ -511,24 +512,24 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpq. */
-#define zPROGNAME (ntpq_opt_strs+1685)
+#define zPROGNAME (ntpq_opt_strs+1739)
/** Reference to the title line for ntpq usage. */
-#define zUsageTitle (ntpq_opt_strs+1690)
+#define zUsageTitle (ntpq_opt_strs+1744)
/** ntpq configuration file name. */
-#define zRcName (ntpq_opt_strs+1819)
+#define zRcName (ntpq_opt_strs+1871)
/** Directories to search for ntpq config files. */
static char const * const apzHomeList[3] = {
- ntpq_opt_strs+1811,
- ntpq_opt_strs+1817,
+ ntpq_opt_strs+1863,
+ ntpq_opt_strs+1869,
NULL };
/** The ntpq program bug email address. */
-#define zBugsAddr (ntpq_opt_strs+1826)
+#define zBugsAddr (ntpq_opt_strs+1878)
/** Clarification/explanation of what ntpq does. */
#define zExplain (NULL)
/** Extra detail explaining what ntpq does. */
#define zDetail (NULL)
/** The full version string for ntpq. */
-#define zFullVersion (ntpq_opt_strs+1860)
+#define zFullVersion (ntpq_opt_strs+1912)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -785,8 +786,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpqOptions.pzCopyright */
- puts(_("ntpq 4.2.7p482\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("ntpq 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"));
@@ -800,9 +801,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 ntpqOptions.pOptDesc->pzText */
puts(_("Force IPv4 DNS name resolution"));
@@ -850,11 +852,11 @@ provided \"as is\" without express or implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpqOptions.pzUsageTitle */
- puts(_("ntpq - standard NTP query program - Ver. 4.2.7p482\n\
+ puts(_("ntpq - standard NTP query program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */
- puts(_("ntpq 4.2.7p482"));
+ puts(_("ntpq 4.2.8p2"));
/* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpq/ntpq-opts.h b/ntpq/ntpq-opts.h
index c6c4f8d..43301b9 100644
--- a/ntpq/ntpq-opts.h
+++ b/ntpq/ntpq-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed December 2, 2014 at 08:57:37 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:26:37 AM by AutoGen 5.18.5pre4
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpq 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 ntpq */
#define OPTION_CT 15
/** ntpq version */
-#define NTPQ_VERSION "4.2.7p482"
+#define NTPQ_VERSION "4.2.8p2"
/** Full ntpq version text */
-#define NTPQ_FULL_VERSION "ntpq 4.2.7p482"
+#define NTPQ_FULL_VERSION "ntpq 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c
index 5460f80..8bd4fdb 100644
--- a/ntpq/ntpq-subs.c
+++ b/ntpq/ntpq-subs.c
@@ -269,7 +269,7 @@ char flash2[] = " .+* "; /* flash decode for version 2 */
char flash3[] = " x.-+#*o"; /* flash decode for peer status version 3 */
struct varlist {
- char *name;
+ const char *name;
char *value;
} g_varlist[MAXLIST] = { { 0, 0 } };
@@ -330,7 +330,11 @@ typedef struct var_display_collection_tag {
l_fp lfp; /* NTP_LFP */
} v; /* retrieved value */
} vdc;
-
+#if !defined(MISSING_C99_STRUCT_INIT)
+# define VDC_INIT(a, b, c) { .tag = a, .display = b, .type = c }
+#else
+# define VDC_INIT(a, b, c) { a, b, c }
+#endif
/*
* other local function prototypes
*/
@@ -362,7 +366,7 @@ static mru ** hash_table;
* qsort comparison function table for mrulist(). The first two
* entries are NULL because they are handled without qsort().
*/
-const static qsort_cmp mru_qcmp_table[MRUSORT_MAX] = {
+static const qsort_cmp mru_qcmp_table[MRUSORT_MAX] = {
NULL, /* MRUSORT_DEF unused */
NULL, /* MRUSORT_R_DEF unused */
&qcmp_mru_avgint, /* MRUSORT_AVGINT */
@@ -477,7 +481,7 @@ dormvlist(
(void) fprintf(stderr, "Variable `%s' not found\n",
name);
} else {
- free((void *)vl->name);
+ free((void *)(intptr_t)vl->name);
if (vl->value != 0)
free(vl->value);
for ( ; (vl+1) < (g_varlist + MAXLIST)
@@ -502,7 +506,7 @@ doclearvlist(
register struct varlist *vl;
for (vl = vlist; vl < vlist + MAXLIST && vl->name != 0; vl++) {
- free((void *)vl->name);
+ free((void *)(intptr_t)vl->name);
vl->name = 0;
if (vl->value != 0) {
free(vl->value);
@@ -2192,7 +2196,7 @@ fetch_nonce(
return FALSE;
}
- if (rsize <= sizeof(nonce_eq) - 1 ||
+ if ((size_t)rsize <= sizeof(nonce_eq) - 1 ||
strncmp(rdata, nonce_eq, sizeof(nonce_eq) - 1)) {
fprintf(stderr, "unexpected nonce response format: %.*s\n",
rsize, rdata);
@@ -2935,7 +2939,7 @@ mrulist(
double flstint;
int avgint;
int lstint;
- int i;
+ size_t i;
order = MRUSORT_DEF;
parms_buf[0] = '\0';
@@ -3041,7 +3045,7 @@ mrulist(
LFPTOD(&interval, favgint);
favgint /= recent->count;
avgint = (int)(favgint + 0.5);
- fprintf(fp, "%6d %6d %4hx %c %d %d %6d %5hu %s\n",
+ fprintf(fp, "%6d %6d %4hx %c %d %d %6d %5u %s\n",
lstint, avgint, recent->rs,
(RES_KOD & recent->rs)
? 'K'
@@ -3179,7 +3183,6 @@ ifstats(
char * tag;
char * val;
int fields;
- u_int ifnum;
u_int ui;
ifstats_row row;
int comprende;
@@ -3198,7 +3201,6 @@ ifstats(
ZERO(row);
fields = 0;
- ifnum = 0;
ui = 0;
while (nextvar(&dsize, &datap, &tag, &val)) {
if (debug > 1)
@@ -3396,7 +3398,6 @@ reslist(
char * tag;
char * val;
int fields;
- u_int idx;
u_int ui;
reslist_row row;
int comprende;
@@ -3415,7 +3416,6 @@ reslist(
ZERO(row);
fields = 0;
- idx = 0;
ui = 0;
while (nextvar(&dsize, &datap, &tag, &val)) {
if (debug > 1)
@@ -3656,19 +3656,19 @@ sysstats(
)
{
static vdc sysstats_vdc[] = {
- { "ss_uptime", "uptime: ", NTP_STR },
- { "ss_reset", "sysstats reset: ", NTP_STR },
- { "ss_received", "packets received: ", NTP_STR },
- { "ss_thisver", "current version: ", NTP_STR },
- { "ss_oldver", "older version: ", NTP_STR },
- { "ss_badformat", "bad length or format: ", NTP_STR },
- { "ss_badauth", "authentication failed:", NTP_STR },
- { "ss_declined", "declined: ", NTP_STR },
- { "ss_restricted", "restricted: ", NTP_STR },
- { "ss_limited", "rate limited: ", NTP_STR },
- { "ss_kodsent", "KoD responses: ", NTP_STR },
- { "ss_processed", "processed for time: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("ss_uptime", "uptime: ", NTP_STR),
+ VDC_INIT("ss_reset", "sysstats reset: ", NTP_STR),
+ VDC_INIT("ss_received", "packets received: ", NTP_STR),
+ VDC_INIT("ss_thisver", "current version: ", NTP_STR),
+ VDC_INIT("ss_oldver", "older version: ", NTP_STR),
+ VDC_INIT("ss_badformat", "bad length or format: ", NTP_STR),
+ VDC_INIT("ss_badauth", "authentication failed:", NTP_STR),
+ VDC_INIT("ss_declined", "declined: ", NTP_STR),
+ VDC_INIT("ss_restricted", "restricted: ", NTP_STR),
+ VDC_INIT("ss_limited", "rate limited: ", NTP_STR),
+ VDC_INIT("ss_kodsent", "KoD responses: ", NTP_STR),
+ VDC_INIT("ss_processed", "processed for time: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, sysstats_vdc, FALSE, fp);
@@ -3685,21 +3685,21 @@ sysinfo(
)
{
static vdc sysinfo_vdc[] = {
- { "peeradr", "system peer: ", NTP_ADP },
- { "peermode", "system peer mode: ", NTP_MODE },
- { "leap", "leap indicator: ", NTP_2BIT },
- { "stratum", "stratum: ", NTP_STR },
- { "precision", "log2 precision: ", NTP_STR },
- { "rootdelay", "root delay: ", NTP_STR },
- { "rootdisp", "root dispersion: ", NTP_STR },
- { "refid", "reference ID: ", NTP_STR },
- { "reftime", "reference time: ", NTP_LFP },
- { "sys_jitter", "system jitter: ", NTP_STR },
- { "clk_jitter", "clock jitter: ", NTP_STR },
- { "clk_wander", "clock wander: ", NTP_STR },
- { "bcastdelay", "broadcast delay: ", NTP_STR },
- { "authdelay", "symm. auth. delay:", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("peeradr", "system peer: ", NTP_ADP),
+ VDC_INIT("peermode", "system peer mode: ", NTP_MODE),
+ VDC_INIT("leap", "leap indicator: ", NTP_2BIT),
+ VDC_INIT("stratum", "stratum: ", NTP_STR),
+ VDC_INIT("precision", "log2 precision: ", NTP_STR),
+ VDC_INIT("rootdelay", "root delay: ", NTP_STR),
+ VDC_INIT("rootdisp", "root dispersion: ", NTP_STR),
+ VDC_INIT("refid", "reference ID: ", NTP_STR),
+ VDC_INIT("reftime", "reference time: ", NTP_LFP),
+ VDC_INIT("sys_jitter", "system jitter: ", NTP_STR),
+ VDC_INIT("clk_jitter", "clock jitter: ", NTP_STR),
+ VDC_INIT("clk_wander", "clock wander: ", NTP_STR),
+ VDC_INIT("bcastdelay", "broadcast delay: ", NTP_STR),
+ VDC_INIT("authdelay", "symm. auth. delay:", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, sysinfo_vdc, TRUE, fp);
@@ -3716,23 +3716,23 @@ kerninfo(
)
{
static vdc kerninfo_vdc[] = {
- { "koffset", "pll offset: ", NTP_STR },
- { "kfreq", "pll frequency: ", NTP_STR },
- { "kmaxerr", "maximum error: ", NTP_STR },
- { "kesterr", "estimated error: ", NTP_STR },
- { "kstflags", "kernel status: ", NTP_STR },
- { "ktimeconst", "pll time constant: ", NTP_STR },
- { "kprecis", "precision: ", NTP_STR },
- { "kfreqtol", "frequency tolerance: ", NTP_STR },
- { "kppsfreq", "pps frequency: ", NTP_STR },
- { "kppsstab", "pps stability: ", NTP_STR },
- { "kppsjitter", "pps jitter: ", NTP_STR },
- { "kppscalibdur", "calibration interval ", NTP_STR },
- { "kppscalibs", "calibration cycles: ", NTP_STR },
- { "kppsjitexc", "jitter exceeded: ", NTP_STR },
- { "kppsstbexc", "stability exceeded: ", NTP_STR },
- { "kppscaliberrs", "calibration errors: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("koffset", "pll offset: ", NTP_STR),
+ VDC_INIT("kfreq", "pll frequency: ", NTP_STR),
+ VDC_INIT("kmaxerr", "maximum error: ", NTP_STR),
+ VDC_INIT("kesterr", "estimated error: ", NTP_STR),
+ VDC_INIT("kstflags", "kernel status: ", NTP_STR),
+ VDC_INIT("ktimeconst", "pll time constant: ", NTP_STR),
+ VDC_INIT("kprecis", "precision: ", NTP_STR),
+ VDC_INIT("kfreqtol", "frequency tolerance: ", NTP_STR),
+ VDC_INIT("kppsfreq", "pps frequency: ", NTP_STR),
+ VDC_INIT("kppsstab", "pps stability: ", NTP_STR),
+ VDC_INIT("kppsjitter", "pps jitter: ", NTP_STR),
+ VDC_INIT("kppscalibdur", "calibration interval ", NTP_STR),
+ VDC_INIT("kppscalibs", "calibration cycles: ", NTP_STR),
+ VDC_INIT("kppsjitexc", "jitter exceeded: ", NTP_STR),
+ VDC_INIT("kppsstbexc", "stability exceeded: ", NTP_STR),
+ VDC_INIT("kppscaliberrs", "calibration errors: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, kerninfo_vdc, TRUE, fp);
@@ -3749,15 +3749,15 @@ monstats(
)
{
static vdc monstats_vdc[] = {
- { "mru_enabled", "enabled: ", NTP_STR },
- { "mru_depth", "addresses: ", NTP_STR },
- { "mru_deepest", "peak addresses: ", NTP_STR },
- { "mru_maxdepth", "maximum addresses: ", NTP_STR },
- { "mru_mindepth", "reclaim above count:", NTP_STR },
- { "mru_maxage", "reclaim older than: ", NTP_STR },
- { "mru_mem", "kilobytes: ", NTP_STR },
- { "mru_maxmem", "maximum kilobytes: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("mru_enabled", "enabled: ", NTP_STR),
+ VDC_INIT("mru_depth", "addresses: ", NTP_STR),
+ VDC_INIT("mru_deepest", "peak addresses: ", NTP_STR),
+ VDC_INIT("mru_maxdepth", "maximum addresses: ", NTP_STR),
+ VDC_INIT("mru_mindepth", "reclaim above count:", NTP_STR),
+ VDC_INIT("mru_maxage", "reclaim older than: ", NTP_STR),
+ VDC_INIT("mru_mem", "kilobytes: ", NTP_STR),
+ VDC_INIT("mru_maxmem", "maximum kilobytes: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, monstats_vdc, FALSE, fp);
@@ -3774,19 +3774,19 @@ iostats(
)
{
static vdc iostats_vdc[] = {
- { "iostats_reset", "time since reset: ", NTP_STR },
- { "total_rbuf", "receive buffers: ", NTP_STR },
- { "free_rbuf", "free receive buffers: ", NTP_STR },
- { "used_rbuf", "used receive buffers: ", NTP_STR },
- { "rbuf_lowater", "low water refills: ", NTP_STR },
- { "io_dropped", "dropped packets: ", NTP_STR },
- { "io_ignored", "ignored packets: ", NTP_STR },
- { "io_received", "received packets: ", NTP_STR },
- { "io_sent", "packets sent: ", NTP_STR },
- { "io_sendfailed", "packet send failures: ", NTP_STR },
- { "io_wakeups", "input wakeups: ", NTP_STR },
- { "io_goodwakeups", "useful input wakeups: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("iostats_reset", "time since reset: ", NTP_STR),
+ VDC_INIT("total_rbuf", "receive buffers: ", NTP_STR),
+ VDC_INIT("free_rbuf", "free receive buffers: ", NTP_STR),
+ VDC_INIT("used_rbuf", "used receive buffers: ", NTP_STR),
+ VDC_INIT("rbuf_lowater", "low water refills: ", NTP_STR),
+ VDC_INIT("io_dropped", "dropped packets: ", NTP_STR),
+ VDC_INIT("io_ignored", "ignored packets: ", NTP_STR),
+ VDC_INIT("io_received", "received packets: ", NTP_STR),
+ VDC_INIT("io_sent", "packets sent: ", NTP_STR),
+ VDC_INIT("io_sendfailed", "packet send failures: ", NTP_STR),
+ VDC_INIT("io_wakeups", "input wakeups: ", NTP_STR),
+ VDC_INIT("io_goodwakeups", "useful input wakeups: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, iostats_vdc, FALSE, fp);
@@ -3803,10 +3803,10 @@ timerstats(
)
{
static vdc timerstats_vdc[] = {
- { "timerstats_reset", "time since reset: ", NTP_STR },
- { "timer_overruns", "timer overruns: ", NTP_STR },
- { "timer_xmts", "calls to transmit: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("timerstats_reset", "time since reset: ", NTP_STR),
+ VDC_INIT("timer_overruns", "timer overruns: ", NTP_STR),
+ VDC_INIT("timer_xmts", "calls to transmit: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, timerstats_vdc, FALSE, fp);
@@ -3823,16 +3823,16 @@ authinfo(
)
{
static vdc authinfo_vdc[] = {
- { "authreset", "time since reset:", NTP_STR },
- { "authkeys", "stored keys: ", NTP_STR },
- { "authfreek", "free keys: ", NTP_STR },
- { "authklookups", "key lookups: ", NTP_STR },
- { "authknotfound", "keys not found: ", NTP_STR },
- { "authkuncached", "uncached keys: ", NTP_STR },
- { "authkexpired", "expired keys: ", NTP_STR },
- { "authencrypts", "encryptions: ", NTP_STR },
- { "authdecrypts", "decryptions: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("authreset", "time since reset:", NTP_STR),
+ VDC_INIT("authkeys", "stored keys: ", NTP_STR),
+ VDC_INIT("authfreek", "free keys: ", NTP_STR),
+ VDC_INIT("authklookups", "key lookups: ", NTP_STR),
+ VDC_INIT("authknotfound", "keys not found: ", NTP_STR),
+ VDC_INIT("authkuncached", "uncached keys: ", NTP_STR),
+ VDC_INIT("authkexpired", "expired keys: ", NTP_STR),
+ VDC_INIT("authencrypts", "encryptions: ", NTP_STR),
+ VDC_INIT("authdecrypts", "decryptions: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
collect_display_vdc(0, authinfo_vdc, FALSE, fp);
@@ -3849,20 +3849,20 @@ pstats(
)
{
static vdc pstats_vdc[] = {
- { "src", "remote host: ", NTP_ADD },
- { "dst", "local address: ", NTP_ADD },
- { "timerec", "time last received: ", NTP_STR },
- { "timer", "time until next send:", NTP_STR },
- { "timereach", "reachability change: ", NTP_STR },
- { "sent", "packets sent: ", NTP_STR },
- { "received", "packets received: ", NTP_STR },
- { "badauth", "bad authentication: ", NTP_STR },
- { "bogusorg", "bogus origin: ", NTP_STR },
- { "oldpkt", "duplicate: ", NTP_STR },
- { "seldisp", "bad dispersion: ", NTP_STR },
- { "selbroken", "bad reference time: ", NTP_STR },
- { "candidate", "candidate order: ", NTP_STR },
- { NULL, NULL, 0 }
+ VDC_INIT("src", "remote host: ", NTP_ADD),
+ VDC_INIT("dst", "local address: ", NTP_ADD),
+ VDC_INIT("timerec", "time last received: ", NTP_STR),
+ VDC_INIT("timer", "time until next send:", NTP_STR),
+ VDC_INIT("timereach", "reachability change: ", NTP_STR),
+ VDC_INIT("sent", "packets sent: ", NTP_STR),
+ VDC_INIT("received", "packets received: ", NTP_STR),
+ VDC_INIT("badauth", "bad authentication: ", NTP_STR),
+ VDC_INIT("bogusorg", "bogus origin: ", NTP_STR),
+ VDC_INIT("oldpkt", "duplicate: ", NTP_STR),
+ VDC_INIT("seldisp", "bad dispersion: ", NTP_STR),
+ VDC_INIT("selbroken", "bad reference time: ", NTP_STR),
+ VDC_INIT("candidate", "candidate order: ", NTP_STR),
+ VDC_INIT(NULL, NULL, 0)
};
associd_t associd;
@@ -3872,4 +3872,3 @@ pstats(
collect_display_vdc(associd, pstats_vdc, TRUE, fp);
}
-
diff --git a/ntpq/ntpq.1ntpqman b/ntpq/ntpq.1ntpqman
index bc203c3..444a91f 100644
--- a/ntpq/ntpq.1ntpqman
+++ b/ntpq/ntpq.1ntpqman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpq 1ntpqman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-fJaqSO/ag-rJaiRO)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-SOays6/ag-4Oaqr6)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:04 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:03 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1397,9 +1397,9 @@ libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.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"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpq/ntpq.1ntpqmdoc b/ntpq/ntpq.1ntpqmdoc
index 8d70a07..d28b09e 100644
--- a/ntpq/ntpq.1ntpqmdoc
+++ b/ntpq/ntpq.1ntpqmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPQ 1ntpqmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:10 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:09 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -943,9 +943,9 @@ libopts had an internal operational error. Please report
it to autogen\-users@lists.sourceforge.net. Thank you.
.El
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.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"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpq/ntpq.c b/ntpq/ntpq.c
index 2ffdfc7..90cae41 100644
--- a/ntpq/ntpq.c
+++ b/ntpq/ntpq.c
@@ -201,8 +201,10 @@ static void raw (struct parse *, FILE *);
static void cooked (struct parse *, FILE *);
static void authenticate (struct parse *, FILE *);
static void ntpversion (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 *);
static void atoascii (const char *, size_t, char *, size_t);
static void cookedprint (int, int, const char *, int, int, FILE *);
@@ -315,7 +317,7 @@ struct sock_timeval tvsout = { DEFSTIMEOUT, 0 };/* secondary time out */
l_fp delay_time; /* delay time */
char currenthost[LENHOSTNAME]; /* current host name */
int currenthostisnum; /* is prior text from IP? */
-struct sockaddr_in hostaddr = { 0 }; /* host address */
+struct sockaddr_in hostaddr; /* host address */
int showhostnames = 1; /* show host names by default */
int wideremote = 0; /* show wide remote names? */
@@ -678,7 +680,7 @@ openhost(
sockfd = socket(ai->ai_family, ai->ai_socktype,
ai->ai_protocol);
if (sockfd == INVALID_SOCKET) {
- error("socket", "", "");
+ error("socket");
freeaddrinfo(ai);
return 0;
}
@@ -689,7 +691,7 @@ openhost(
{ int rbufsize = DATASIZE + 2048; /* 2K for slop */
if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
&rbufsize, sizeof(int)) == -1)
- error("setsockopt", "", "");
+ error("setsockopt");
}
# endif
#endif
@@ -703,7 +705,7 @@ openhost(
ai->ai_addrlen) == -1)
#endif /* SYS_VXWORKS */
{
- error("connect", "", "");
+ error("connect");
freeaddrinfo(ai);
return 0;
}
@@ -761,10 +763,10 @@ sendpkt(
)
{
if (debug >= 3)
- printf("Sending %lu octets\n", (u_long)xdatalen);
+ printf("Sending %zu octets\n", xdatalen);
if (send(sockfd, xdata, (size_t)xdatalen, 0) == -1) {
- warning("write to %s failed", currenthost, "");
+ warning("write to %s failed", currenthost);
return -1;
}
@@ -835,7 +837,7 @@ getresponse(
n = select(sockfd + 1, &fds, NULL, NULL, &tvo);
if (n == -1) {
- warning("select fails", "", "");
+ warning("select fails");
return -1;
}
if (n == 0) {
@@ -874,7 +876,7 @@ getresponse(
n = recv(sockfd, (char *)&rpkt, sizeof(rpkt), 0);
if (n == -1) {
- warning("read", "", "");
+ warning("read");
return -1;
}
@@ -886,7 +888,7 @@ getresponse(
/*
* Check for format errors. Bug proofing.
*/
- if (n < CTL_HEADER_LEN) {
+ if (n < (int)CTL_HEADER_LEN) {
if (debug)
printf("Short (%d byte) packet received\n", n);
continue;
@@ -994,7 +996,7 @@ getresponse(
shouldbesize = (shouldbesize + 7) & ~7;
maclen = n - shouldbesize;
- if (maclen >= MIN_MAC_LEN) {
+ if (maclen >= (int)MIN_MAC_LEN) {
printf(
"Packet shows signs of authentication (total %d, data %d, mac %d)\n",
n, shouldbesize, maclen);
@@ -1226,9 +1228,9 @@ sendrequest(
return 1;
} else if ((size_t)maclen != (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;
}
@@ -2620,37 +2622,46 @@ ntpversion(
}
+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", 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);
}
-
/*
* getkeyid - prompt the user for a keyid to use
*/
@@ -2900,7 +2911,7 @@ nextvar(
srclen = strcspn(cp, ",=\r\n");
srclen = min(srclen, (size_t)(cpend - cp));
len = srclen;
- while (len > 0 && isspace(cp[len - 1]))
+ while (len > 0 && isspace((unsigned char)cp[len - 1]))
len--;
if (len > 0)
memcpy(name, cp, len);
@@ -2924,7 +2935,7 @@ nextvar(
* So far, so good. Copy out the value
*/
cp++; /* past '=' */
- while (cp < cpend && (isspace(*cp) && *cp != '\r' && *cp != '\n'))
+ while (cp < cpend && (isspace((unsigned char)*cp) && *cp != '\r' && *cp != '\n'))
cp++;
np = cp;
if ('"' == *np) {
@@ -2945,7 +2956,7 @@ nextvar(
/*
* Trim off any trailing whitespace
*/
- while (len > 0 && isspace(value[len - 1]))
+ while (len > 0 && isspace((unsigned char)value[len - 1]))
len--;
value[len] = '\0';
@@ -3028,7 +3039,7 @@ rawprint(
*/
if (cp == (cpend - 1) || *(cp + 1) != '\n')
makeascii(1, cp, fp);
- } else if (isspace(*cp) || isprint(*cp))
+ } else if (isspace((unsigned char)*cp) || isprint((unsigned char)*cp))
putc(*cp, fp);
else
makeascii(1, cp, fp);
@@ -3176,7 +3187,7 @@ tstflags(
*cp++ = ' ';
cb--;
}
- for (i = 0; i < COUNTOF(tstflagnames); i++) {
+ for (i = 0; i < (int)COUNTOF(tstflagnames); i++) {
if (val & 0x1) {
snprintf(cp, cb, "%s%s", sep,
tstflagnames[i]);
diff --git a/ntpq/ntpq.h b/ntpq/ntpq.h
index ec2bcb9..2575b88 100644
--- a/ntpq/ntpq.h
+++ b/ntpq/ntpq.h
@@ -79,7 +79,7 @@ typedef union {
struct parse {
const char *keyword;
arg_v argval[MAXARGS];
- int nargs;
+ size_t nargs;
};
/*
diff --git a/ntpq/ntpq.html b/ntpq/ntpq.html
index b3e7c67..5d7a8f3 100644
--- a/ntpq/ntpq.html
+++ b/ntpq/ntpq.html
@@ -44,7 +44,7 @@ monitor the operational status
and determine the performance of
<code>ntpd</code>, the NTP daemon.
- <p>This document applies to version 4.2.7p482 of <code>ntpq</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpq</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
@@ -759,7 +759,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">ntpq - standard NTP query program - Ver. 4.2.7p481
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p2-RC3
Usage: ntpq [ -&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/ntpq/ntpq.man.in b/ntpq/ntpq.man.in
index 4daca5a..c5b9fb5 100644
--- a/ntpq/ntpq.man.in
+++ b/ntpq/ntpq.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpq @NTPQ_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-fJaqSO/ag-rJaiRO)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-SOays6/ag-4Oaqr6)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:04 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:03 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -1397,9 +1397,9 @@ libopts had an internal operational error. Please report
it to autogen-users@lists.sourceforge.net. Thank you.
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.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"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpq/ntpq.mdoc.in b/ntpq/ntpq.mdoc.in
index 9666347..32224f2 100644
--- a/ntpq/ntpq.mdoc.in
+++ b/ntpq/ntpq.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPQ @NTPQ_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:58:10 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:27:09 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -943,9 +943,9 @@ libopts had an internal operational error. Please report
it to autogen\-users@lists.sourceforge.net. Thank you.
.El
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.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"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org