summaryrefslogtreecommitdiff
path: root/contrib/ntp/ntpq
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/ntpq')
-rw-r--r--contrib/ntp/ntpq/Makefile.in394
-rw-r--r--contrib/ntp/ntpq/invoke-ntpq.texi18
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.c54
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.def12
-rw-r--r--contrib/ntp/ntpq/ntpq-opts.h6
-rw-r--r--contrib/ntp/ntpq/ntpq-subs.c156
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqman23
-rw-r--r--contrib/ntp/ntpq/ntpq.1ntpqmdoc16
-rw-r--r--contrib/ntp/ntpq/ntpq.c150
-rw-r--r--contrib/ntp/ntpq/ntpq.html18
-rw-r--r--contrib/ntp/ntpq/ntpq.man.in23
-rw-r--r--contrib/ntp/ntpq/ntpq.mdoc.in16
12 files changed, 679 insertions, 207 deletions
diff --git a/contrib/ntp/ntpq/Makefile.in b/contrib/ntp/ntpq/Makefile.in
index fad90018b7611..39b1b65a2f9ed 100644
--- a/contrib/ntp/ntpq/Makefile.in
+++ b/contrib/ntp/ntpq/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -23,6 +22,61 @@
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -42,10 +96,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
EXTRA_PROGRAMS = ntpq$(EXEEXT)
-DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
- $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf \
- $(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf
subdir = ntpq
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
@@ -77,6 +127,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_prog_cc.m4 \
$(top_srcdir)/sntp/m4/ntp_rlimit.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
+ $(top_srcdir)/sntp/m4/ntp_unitytest.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
$(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
@@ -86,18 +137,18 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
-AM_V_AR = $(am__v_AR_$(V))
-am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
-am__v_AR_0 = @echo " AR " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
-am__v_at_0 = @
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo " AR " $@;
+am__v_AR_1 =
libntpq_a_AR = $(AR) $(ARFLAGS)
libntpq_a_LIBADD =
am_libntpq_a_OBJECTS = libntpq_a-libntpq.$(OBJEXT) \
@@ -115,9 +166,22 @@ ntpq_DEPENDENCIES = version.o $(am__DEPENDENCIES_1) ../libntp/libntp.a \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/sntp/libevent/build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -128,21 +192,25 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
-am__v_CC_0 = @echo " CC " $@;
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(libntpq_a_SOURCES) $(ntpq_SOURCES)
DIST_SOURCES = $(libntpq_a_SOURCES) $(ntpq_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -164,14 +232,41 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
man1dir = $(mandir)/man1
man8dir = $(mandir)/man8
NROFF = nroff
MANS = $(man1_MANS) $(man8_MANS) $(man_MANS)
DATA = $(html_DATA) $(noinst_DATA)
HEADERS = $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/bincheck.mf \
+ $(top_srcdir)/check-libopts.mf $(top_srcdir)/depsver.mf \
+ $(top_srcdir)/includes.mf $(top_srcdir)/sntp/check-libntp.mf \
+ $(top_srcdir)/sntp/libevent/build-aux/depcomp README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
@@ -222,6 +317,7 @@ GTEST_CXXFLAGS = @GTEST_CXXFLAGS@
GTEST_LDFLAGS = @GTEST_LDFLAGS@
GTEST_LIBS = @GTEST_LIBS@
HAVE_INLINE = @HAVE_INLINE@
+HAVE_LEAPSMEARINTERVAL = @HAVE_LEAPSMEARINTERVAL@
HAVE_RLIMIT_MEMLOCK = @HAVE_RLIMIT_MEMLOCK@
HAVE_RLIMIT_STACK = @HAVE_RLIMIT_STACK@
INSTALL = @INSTALL@
@@ -338,6 +434,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_NET_SNMP_CONFIG = @PATH_NET_SNMP_CONFIG@
PATH_PERL = @PATH_PERL@
+PATH_RUBY = @PATH_RUBY@
PATH_SEPARATOR = @PATH_SEPARATOR@
PATH_TEST = @PATH_TEST@
PERLLIBDIR = @PERLLIBDIR@
@@ -514,7 +611,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/bincheck.mf $(top_sr
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign ntpq/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign ntpq/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -523,6 +619,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
+$(top_srcdir)/bincheck.mf $(top_srcdir)/check-libopts.mf $(top_srcdir)/sntp/check-libntp.mf $(top_srcdir)/depsver.mf $(top_srcdir)/includes.mf $(am__empty):
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -535,20 +632,26 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libntpq.a: $(libntpq_a_OBJECTS) $(libntpq_a_DEPENDENCIES)
+
+libntpq.a: $(libntpq_a_OBJECTS) $(libntpq_a_DEPENDENCIES) $(EXTRA_libntpq_a_DEPENDENCIES)
$(AM_V_at)-rm -f libntpq.a
$(AM_V_AR)$(libntpq_a_AR) libntpq.a $(libntpq_a_OBJECTS) $(libntpq_a_LIBADD)
$(AM_V_at)$(RANLIB) libntpq.a
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
@@ -569,7 +672,8 @@ uninstall-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
@@ -584,14 +688,19 @@ clean-binPROGRAMS:
rm -f $$list
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
@@ -612,7 +721,8 @@ uninstall-libexecPROGRAMS:
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
@@ -627,14 +737,19 @@ clean-libexecPROGRAMS:
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
@@ -655,7 +770,8 @@ uninstall-sbinPROGRAMS:
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(sbindir)" && rm -f $$files
@@ -668,7 +784,8 @@ clean-sbinPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-ntpq$(EXEEXT): $(ntpq_OBJECTS) $(ntpq_DEPENDENCIES)
+
+ntpq$(EXEEXT): $(ntpq_OBJECTS) $(ntpq_DEPENDENCIES) $(EXTRA_ntpq_DEPENDENCIES)
@rm -f ntpq$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ntpq_OBJECTS) $(ntpq_LDADD) $(LIBS)
@@ -687,58 +804,51 @@ distclean-compile:
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
libntpq_a-libntpq.o: libntpq.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq.Tpo $(DEPDIR)/libntpq_a-libntpq.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libntpq.c' object='libntpq_a-libntpq.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libntpq.c' object='libntpq_a-libntpq.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.o `test -f 'libntpq.c' || echo '$(srcdir)/'`libntpq.c
libntpq_a-libntpq.obj: libntpq.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq.Tpo -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq.Tpo $(DEPDIR)/libntpq_a-libntpq.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libntpq.c' object='libntpq_a-libntpq.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libntpq.c' object='libntpq_a-libntpq.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq.obj `if test -f 'libntpq.c'; then $(CYGPATH_W) 'libntpq.c'; else $(CYGPATH_W) '$(srcdir)/libntpq.c'; fi`
libntpq_a-libntpq_subs.o: libntpq_subs.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.o -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq_subs.Tpo $(DEPDIR)/libntpq_a-libntpq_subs.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libntpq_subs.c' object='libntpq_a-libntpq_subs.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libntpq_subs.c' object='libntpq_a-libntpq_subs.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.o `test -f 'libntpq_subs.c' || echo '$(srcdir)/'`libntpq_subs.c
libntpq_a-libntpq_subs.obj: libntpq_subs.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -MT libntpq_a-libntpq_subs.obj -MD -MP -MF $(DEPDIR)/libntpq_a-libntpq_subs.Tpo -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libntpq_a-libntpq_subs.Tpo $(DEPDIR)/libntpq_a-libntpq_subs.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libntpq_subs.c' object='libntpq_a-libntpq_subs.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libntpq_subs.c' object='libntpq_a-libntpq_subs.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libntpq_a_CFLAGS) $(CFLAGS) -c -o libntpq_a-libntpq_subs.obj `if test -f 'libntpq_subs.c'; then $(CYGPATH_W) 'libntpq_subs.c'; else $(CYGPATH_W) '$(srcdir)/libntpq_subs.c'; fi`
mostlyclean-libtool:
-rm -f *.lo
@@ -747,11 +857,18 @@ clean-libtool:
-rm -rf .libs _libs
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.1[a-z]*$$/p'; \
+ @list1='$(man1_MANS)'; \
+ list2='$(man_MANS)'; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@@ -780,16 +897,21 @@ uninstall-man1:
sed -n '/\.1[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
install-man8: $(man8_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
- @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
- l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
- sed -n '/\.8[a-z]*$$/p'; \
+ @list1='$(man8_MANS)'; \
+ list2='$(man_MANS)'; \
+ test -n "$(man8dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.8[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@@ -818,13 +940,14 @@ uninstall-man8:
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
- test -z "$$files" || { \
- echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+ dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
install-htmlDATA: $(html_DATA)
@$(NORMAL_INSTALL)
- test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
@list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -838,30 +961,17 @@ uninstall-htmlDATA:
@$(NORMAL_UNINSTALL)
@list='$(html_DATA)'; test -n "$(htmldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(htmldir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -873,15 +983,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -890,24 +996,26 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @list='$(MANS)'; if test -n "$$list"; then \
- list=`for p in $$list; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
- if test -n "$$list" && \
- grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
- echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
- echo " typically \`make maintainer-clean' will remove them" >&2; \
- exit 1; \
- else :; fi; \
- else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -956,10 +1064,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -1053,25 +1166,28 @@ uninstall-man: uninstall-man1 uninstall-man8
.MAKE: all check install install-am install-exec-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libexecPROGRAMS clean-libtool \
- clean-noinstLIBRARIES clean-sbinPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-binPROGRAMS install-data \
- install-data-am install-data-local install-dvi install-dvi-am \
- install-exec install-exec-am install-exec-hook install-html \
- install-html-am install-htmlDATA install-info install-info-am \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
+ clean-libtool clean-noinstLIBRARIES clean-sbinPROGRAMS \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am \
+ install-data-local install-dvi install-dvi-am install-exec \
+ install-exec-am install-exec-hook install-html install-html-am \
+ install-htmlDATA install-info install-info-am \
install-libexecPROGRAMS install-man install-man1 install-man8 \
install-pdf install-pdf-am install-ps install-ps-am \
install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-binPROGRAMS \
+ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
uninstall-htmlDATA uninstall-libexecPROGRAMS uninstall-man \
uninstall-man1 uninstall-man8 uninstall-sbinPROGRAMS
+.PRECIOUS: Makefile
+
install-data-local: install-html
diff --git a/contrib/ntp/ntpq/invoke-ntpq.texi b/contrib/ntp/ntpq/invoke-ntpq.texi
index 505bb23d8c3cc..7c28d922a0299 100644
--- a/contrib/ntp/ntpq/invoke-ntpq.texi
+++ b/contrib/ntp/ntpq/invoke-ntpq.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpq.texi)
#
-# It has been AutoGen-ed April 7, 2015 at 04:27:07 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed June 29, 2015 at 04:31:39 PM by AutoGen 5.18.5
# From the definitions ntpq-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -213,7 +213,9 @@ switch.
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
-to a key number the server has been configured to use for this
+to the
+@code{controlkey}
+key number the server has been configured to use for this
purpose.
@item @code{keytype} @code{[@code{md5} | @code{OpenSSLDigestType}]}
Specify the type of key to use for authenticating requests.
@@ -472,6 +474,16 @@ offset of server relative to this host
@item @code{jitter}
jitter
@end table
+@item @code{apeers}
+Display a list of peers in the form:
+@example
+[tally]remote refid assid st t when pool reach delay offset jitter
+@end example
+where the output is just like the
+@code{peers}
+command except that the
+@code{refid}
+is displayed in hex format and the association number is also displayed.
@item @code{pstats} @kbd{assocID}
Show the statistics for the peer with the given
@kbd{assocID}.
@@ -835,7 +847,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.8p2
+ntpq - standard NTP query program - Ver. 4.2.8p3
Usage: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
diff --git a/contrib/ntp/ntpq/ntpq-opts.c b/contrib/ntp/ntpq/ntpq-opts.c
index 74f3d3d8e51a8..798a0cdb34b93 100644
--- a/contrib/ntp/ntpq/ntpq-opts.c
+++ b/contrib/ntp/ntpq/ntpq-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed April 7, 2015 at 04:26:37 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed June 29, 2015 at 04:31:10 PM by AutoGen 5.18.5
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -69,7 +69,7 @@ extern FILE * option_usage_fp;
* static const strings for ntpq options
*/
static char const ntpq_opt_strs[1925] =
-/* 0 */ "ntpq 4.2.8p2\n"
+/* 0 */ "ntpq 4.2.8p3\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"
@@ -129,13 +129,13 @@ static char const ntpq_opt_strs[1925] =
/* 1723 */ "no-load-opts\0"
/* 1736 */ "no\0"
/* 1739 */ "NTPQ\0"
-/* 1744 */ "ntpq - standard NTP query program - Ver. 4.2.8p2\n"
+/* 1744 */ "ntpq - standard NTP query program - Ver. 4.2.8p3\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0"
/* 1863 */ "$HOME\0"
/* 1869 */ ".\0"
/* 1871 */ ".ntprc\0"
/* 1878 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 1912 */ "ntpq 4.2.8p2";
+/* 1912 */ "ntpq 4.2.8p3";
/**
* ipv4 option description with
@@ -588,7 +588,7 @@ OPT_VALUE_SET_DEBUG_LEVEL++;
(void)pOptDesc;
(void)pOptions;
}
-/* extracted from optmain.tlib near line 1245 */
+/* extracted from optmain.tlib near line 1250 */
/**
* The directory containing the data associated with ntpq.
@@ -700,11 +700,11 @@ AO_gettext(char const * pz)
if (option_xlateable_txt.field_ct != 0) {
res = dgettext("libopts", pz);
if (res == pz)
- res = (char *)(void *)_(pz);
+ res = (char *)VOIDP(_(pz));
} else
- res = (char *)(void *)_(pz);
+ res = (char *)VOIDP(_(pz));
#else
- res = (char *)(void *)_(pz);
+ res = (char *)VOIDP(_(pz));
#endif
if (res == pz)
return res;
@@ -741,7 +741,7 @@ translate_option_strings(void)
* Do the translations. The first pointer follows the field count
* field. The field count field is the size of a pointer.
*/
- char ** ppz = (char**)(void*)&(option_xlateable_txt);
+ char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
int ix = option_xlateable_txt.field_ct;
do {
@@ -751,16 +751,16 @@ translate_option_strings(void)
/* prevent re-translation and disable "libopts" domain lookup */
option_xlateable_txt.field_ct = 0;
- coerce_it((void*)&(opts->pzCopyright));
- coerce_it((void*)&(opts->pzCopyNotice));
- coerce_it((void*)&(opts->pzFullVersion));
- coerce_it((void*)&(opts->pzUsageTitle));
- coerce_it((void*)&(opts->pzExplain));
- coerce_it((void*)&(opts->pzDetail));
+ coerce_it(VOIDP(&(opts->pzCopyright)));
+ coerce_it(VOIDP(&(opts->pzCopyNotice)));
+ coerce_it(VOIDP(&(opts->pzFullVersion)));
+ coerce_it(VOIDP(&(opts->pzUsageTitle)));
+ coerce_it(VOIDP(&(opts->pzExplain)));
+ coerce_it(VOIDP(&(opts->pzDetail)));
{
tOptDesc * od = opts->pOptDesc;
for (ix = opts->optCt; ix > 0; ix--, od++)
- coerce_it((void*)&(od->pzText));
+ coerce_it(VOIDP(&(od->pzText)));
}
}
}
@@ -786,7 +786,7 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpqOptions.pzCopyright */
- puts(_("ntpq 4.2.8p2\n\
+ puts(_("ntpq 4.2.8p3\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\
@@ -852,11 +852,11 @@ implied warranty.\n"));
puts(_("load options from a config file"));
/* referenced via ntpqOptions.pzUsageTitle */
- puts(_("ntpq - standard NTP query program - Ver. 4.2.8p2\n\
+ puts(_("ntpq - standard NTP query program - Ver. 4.2.8p3\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
/* referenced via ntpqOptions.pzFullVersion */
- puts(_("ntpq 4.2.8p2"));
+ puts(_("ntpq 4.2.8p3"));
/* referenced via ntpqOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
@@ -882,7 +882,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
#line 121 "../version.c"
puts(_("Automated Options version %s\n"
"\tCopyright (C) 1999-2014 by Bruce Korb - all rights reserved\n"));
-#line 82 "../makeshell.c"
+#line 87 "../makeshell.c"
puts(_("(AutoOpts bug): %s.\n"));
#line 90 "../reset.c"
puts(_("optionResetOpt() called, but reset-option not configured"));
@@ -906,9 +906,9 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
puts(_("%s: Command line arguments required\n"));
#line 43 "../alias.c"
puts(_("%d %s%s options allowed\n"));
-#line 89 "../makeshell.c"
+#line 94 "../makeshell.c"
puts(_("%s error %d (%s) calling %s for '%s'\n"));
-#line 301 "../makeshell.c"
+#line 306 "../makeshell.c"
puts(_("interprocess pipe"));
#line 168 "../version.c"
puts(_("error: version option argument '%c' invalid. Use:\n"
@@ -986,9 +986,9 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
puts(_("Try '%s %s' for more information.\n"));
#line 45 "../alias.c"
puts(_("one %s%s option allowed\n"));
-#line 203 "../makeshell.c"
+#line 208 "../makeshell.c"
puts(_("standard output"));
-#line 938 "../makeshell.c"
+#line 943 "../makeshell.c"
puts(_("standard output"));
#line 274 "../usage.c"
puts(_("standard output"));
@@ -1006,9 +1006,9 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
puts(_("standard error"));
#line 175 "../version.c"
puts(_("standard error"));
-#line 203 "../makeshell.c"
+#line 208 "../makeshell.c"
puts(_("write"));
-#line 938 "../makeshell.c"
+#line 943 "../makeshell.c"
puts(_("write"));
#line 273 "../usage.c"
puts(_("write"));
@@ -1060,7 +1060,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n"));
#line 380 "../usage.c"
puts(_("Options are specified by doubled hyphens and their name or by a single\n"
"hyphen and the flag character.\n"));
-#line 916 "../makeshell.c"
+#line 921 "../makeshell.c"
puts(_("\n"
"= = = = = = = =\n\n"
"This incarnation of genshell will produce\n"
diff --git a/contrib/ntp/ntpq/ntpq-opts.def b/contrib/ntp/ntpq/ntpq-opts.def
index d0c57a0293124..bac20d79af937 100644
--- a/contrib/ntp/ntpq/ntpq-opts.def
+++ b/contrib/ntp/ntpq/ntpq-opts.def
@@ -325,7 +325,9 @@ switch.
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
-to a key number the server has been configured to use for this
+to the
+.Cm controlkey
+key number the server has been configured to use for this
purpose.
.It Ic keytype Xo Oo
.Cm md5 |
@@ -606,6 +608,14 @@ offset of server relative to this host
.It Ic jitter
jitter
.El
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Ic refid
+is displayed in hex format and the association number is also displayed.
.It Ic pstats Ar assocID
Show the statistics for the peer with the given
.Ar assocID .
diff --git a/contrib/ntp/ntpq/ntpq-opts.h b/contrib/ntp/ntpq/ntpq-opts.h
index 43301b9a69f5d..fecb970f9dd4b 100644
--- a/contrib/ntp/ntpq/ntpq-opts.h
+++ b/contrib/ntp/ntpq/ntpq-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed April 7, 2015 at 04:26:37 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed June 29, 2015 at 04:31:10 PM by AutoGen 5.18.5
* From the definitions ntpq-opts.def
* and the template file options
*
@@ -83,9 +83,9 @@ typedef enum {
/** count of all options for ntpq */
#define OPTION_CT 15
/** ntpq version */
-#define NTPQ_VERSION "4.2.8p2"
+#define NTPQ_VERSION "4.2.8p3"
/** Full ntpq version text */
-#define NTPQ_FULL_VERSION "ntpq 4.2.8p2"
+#define NTPQ_FULL_VERSION "ntpq 4.2.8p3"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/contrib/ntp/ntpq/ntpq-subs.c b/contrib/ntp/ntpq/ntpq-subs.c
index 8bd4fdbbcf4e8..c6478701eb273 100644
--- a/contrib/ntp/ntpq/ntpq-subs.c
+++ b/contrib/ntp/ntpq/ntpq-subs.c
@@ -60,6 +60,8 @@ static int doprintpeers (struct varlist *, int, int, int, const char *, FILE *,
static int dogetpeers (struct varlist *, associd_t, FILE *, int);
static void dopeers (int, FILE *, int);
static void peers (struct parse *, FILE *);
+static void doapeers (int, FILE *, int);
+static void apeers (struct parse *, FILE *);
static void lpeers (struct parse *, FILE *);
static void doopeers (int, FILE *, int);
static void opeers (struct parse *, FILE *);
@@ -156,6 +158,9 @@ struct xcmd opcmds[] = {
{ "peers", peers, { OPT|IP_VERSION, NO, NO, NO },
{ "-4|-6", "", "", "" },
"obtain and print a list of the server's peers [IP version]" },
+ { "apeers", apeers, { OPT|IP_VERSION, NO, NO, NO },
+ { "-4|-6", "", "", "" },
+ "obtain and print a list of the server's peers and their assocIDs [IP version]" },
{ "lpeers", lpeers, { OPT|IP_VERSION, NO, NO, NO },
{ "-4|-6", "", "", "" },
"obtain and print a list of all peers and clients [IP version]" },
@@ -1559,6 +1564,26 @@ struct varlist peervarlist[] = {
{ 0, 0 }
};
+struct varlist apeervarlist[] = {
+ { "srcadr", 0 }, /* 0 */
+ { "refid", 0 }, /* 1 */
+ { "assid", 0 }, /* 2 */
+ { "stratum", 0 }, /* 3 */
+ { "hpoll", 0 }, /* 4 */
+ { "ppoll", 0 }, /* 5 */
+ { "reach", 0 }, /* 6 */
+ { "delay", 0 }, /* 7 */
+ { "offset", 0 }, /* 8 */
+ { "jitter", 0 }, /* 9 */
+ { "dispersion", 0 }, /* 10 */
+ { "rec", 0 }, /* 11 */
+ { "reftime", 0 }, /* 12 */
+ { "srcport", 0 }, /* 13 */
+ { "hmode", 0 }, /* 14 */
+ { "srchost", 0 }, /* 15 */
+ { 0, 0 }
+};
+
/*
* Decode an incoming data buffer and print a line in the peer list
@@ -1629,7 +1654,7 @@ doprintpeers(
fprintf(stderr, "malformed %s=%s\n",
name, value);
} else if (!strcmp("srchost", name)) {
- if (pvl == peervarlist) {
+ if (pvl == peervarlist || pvl == apeervarlist) {
len = strlen(value);
if (2 < len &&
(size_t)len < sizeof(clock_name)) {
@@ -1675,6 +1700,35 @@ doprintpeers(
} else {
have_da_rid = FALSE;
}
+ } else if (pvl == apeervarlist) {
+ have_da_rid = TRUE;
+ drlen = strlen(value);
+ if (0 == drlen) {
+ dstadr_refid = "";
+ } else if (drlen <= 4) {
+ ZERO(u32);
+ memcpy(&u32, value, drlen);
+ dstadr_refid = refid_str(u32, 1);
+ //fprintf(stderr, "apeervarlist S1 refid: value=<%s>\n", value);
+ } else if (decodenetnum(value, &refidadr)) {
+ if (SOCK_UNSPEC(&refidadr))
+ dstadr_refid = "0.0.0.0";
+ else if (ISREFCLOCKADR(&refidadr))
+ dstadr_refid =
+ refnumtoa(&refidadr);
+ else {
+ char *buf = emalloc(10);
+ int i = ntohl(refidadr.sa4.sin_addr.s_addr);
+
+ snprintf(buf, 10,
+ "%0x", i);
+ dstadr_refid = buf;
+ //fprintf(stderr, "apeervarlist refid: value=<%x>\n", i);
+ }
+ //fprintf(stderr, "apeervarlist refid: value=<%s>\n", value);
+ } else {
+ have_da_rid = FALSE;
+ }
}
} else if (!strcmp("stratum", name)) {
decodeuint(value, &stratum);
@@ -1691,8 +1745,8 @@ doprintpeers(
} else if (!strcmp("offset", name)) {
decodetime(value, &estoffset);
} else if (!strcmp("jitter", name)) {
- if (pvl == peervarlist &&
- decodetime(value, &estjitter))
+ if ((pvl == peervarlist || pvl == apeervarlist)
+ && decodetime(value, &estjitter))
have_jitter = 1;
} else if (!strcmp("rootdisp", name) ||
!strcmp("dispersion", name)) {
@@ -1705,6 +1759,8 @@ doprintpeers(
} else if (!strcmp("reftime", name)) {
if (!decodets(value, &reftime))
L_CLR(&reftime);
+ } else {
+ // fprintf(stderr, "UNRECOGNIZED name=%s ", name);
}
}
@@ -1756,7 +1812,8 @@ doprintpeers(
else
c = flash2[CTL_PEER_STATVAL(rstatus) & 0x3];
if (numhosts > 1) {
- if (peervarlist == pvl && have_dstadr) {
+ if ((pvl == peervarlist || pvl == apeervarlist)
+ && have_dstadr) {
serverlocal = nntohost_col(&dstadr,
(size_t)min(LIB_BUFLENGTH - 1, maxhostlen),
TRUE);
@@ -1783,8 +1840,14 @@ doprintpeers(
drlen = strlen(dstadr_refid);
makeascii(drlen, dstadr_refid, fp);
}
- while (drlen++ < 15)
- fputc(' ', fp);
+ if (pvl == apeervarlist) {
+ while (drlen++ < 9)
+ fputc(' ', fp);
+ fprintf(fp, "%-6d", associd);
+ } else {
+ while (drlen++ < 15)
+ fputc(' ', fp);
+ }
fprintf(fp,
" %2ld %c %4.4s %4.4s %3lo %7.7s %8.7s %7.7s\n",
stratum, type,
@@ -1904,6 +1967,60 @@ dopeers(
/*
+ * doapeers - print a peer spreadsheet with assocIDs
+ */
+static void
+doapeers(
+ int showall,
+ FILE *fp,
+ int af
+ )
+{
+ u_int u;
+ char fullname[LENHOSTNAME];
+ sockaddr_u netnum;
+ const char * name_or_num;
+ size_t sl;
+
+ if (!dogetassoc(fp))
+ return;
+
+ for (u = 0; u < numhosts; u++) {
+ if (getnetnum(chosts[u].name, &netnum, fullname, af)) {
+ name_or_num = nntohost(&netnum);
+ sl = strlen(name_or_num);
+ maxhostlen = max(maxhostlen, sl);
+ }
+ }
+ if (numhosts > 1)
+ fprintf(fp, "%-*.*s ", (int)maxhostlen, (int)maxhostlen,
+ "server (local)");
+ fprintf(fp,
+ " remote refid assid st t when poll reach delay offset jitter\n");
+ if (numhosts > 1)
+ for (u = 0; u <= maxhostlen; u++)
+ fprintf(fp, "=");
+ fprintf(fp,
+ "==============================================================================\n");
+
+ for (u = 0; u < numassoc; u++) {
+ if (!showall &&
+ !(CTL_PEER_STATVAL(assoc_cache[u].status)
+ & (CTL_PST_CONFIG|CTL_PST_REACH))) {
+ if (debug)
+ fprintf(stderr, "eliding [%d]\n",
+ (int)assoc_cache[u].assid);
+ continue;
+ }
+ if (!dogetpeers(apeervarlist, (int)assoc_cache[u].assid,
+ fp, af))
+ return;
+ }
+ return;
+}
+
+
+/*
* peers - print a peer spreadsheet
*/
/*ARGSUSED*/
@@ -1926,6 +2043,28 @@ peers(
/*
+ * apeers - print a peer spreadsheet, with assocIDs
+ */
+/*ARGSUSED*/
+static void
+apeers(
+ struct parse *pcmd,
+ FILE *fp
+ )
+{
+ int af = 0;
+
+ if (pcmd->nargs == 1) {
+ if (pcmd->argval->ival == 6)
+ af = AF_INET6;
+ else
+ af = AF_INET;
+ }
+ doapeers(0, fp, af);
+}
+
+
+/*
* lpeers - print a peer spreadsheet including all fuzzball peers
*/
/*ARGSUSED*/
@@ -3002,7 +3141,7 @@ mrulist(
goto cleanup_return;
/* construct an array of entry pointers in default order */
- sorted = emalloc(mru_count * sizeof(*sorted));
+ sorted = eallocarray(mru_count, sizeof(*sorted));
ppentry = sorted;
if (MRUSORT_R_DEF != order) {
ITER_DLIST_BEGIN(mru_list, recent, mlink, mru)
@@ -3099,7 +3238,7 @@ validate_ifnum(
{
if (prow->ifnum == ifnum)
return;
- if (prow->ifnum + 1 == ifnum) {
+ if (prow->ifnum + 1 <= ifnum) {
if (*pfields < IFSTATS_FIELDS)
fprintf(fp, "Warning: incomplete row with %d (of %d) fields",
*pfields, IFSTATS_FIELDS);
@@ -3245,6 +3384,7 @@ ifstats(
case 'n':
if (1 == sscanf(tag, name_fmt, &ui)) {
/* strip quotes */
+ INSIST(val);
len = strlen(val);
if (len >= 2 &&
len - 2 < sizeof(row.name)) {
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqman b/contrib/ntp/ntpq/ntpq.1ntpqman
index 444a91f4e9a2e..afdd8cbecdbe9 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqman
+++ b/contrib/ntp/ntpq/ntpq.1ntpqman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq 1ntpqman "07 Apr 2015" "4.2.8p2" "User Commands"
+.TH ntpq 1ntpqman "29 Jun 2015" "4.2.8p3" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-SOays6/ag-4Oaqr6)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6GaipG/ag-fHaaoG)
.\"
-.\" It has been AutoGen-ed April 7, 2015 at 04:27:03 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed June 29, 2015 at 04:31:32 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -267,7 +267,9 @@ switch.
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
-to a key number the server has been configured to use for this
+to the
+\f\*[B-Font]controlkey\f[]
+key number the server has been configured to use for this
purpose.
.br
.ns
@@ -665,6 +667,17 @@ jitter
.br
.ns
.TP 10
+.NOP \f\*[B-Font]apeers\f[]
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+\f\*[B-Font]peers\f[]
+command except that the
+\f\*[B-Font]refid\f[]
+is displayed in hex format and the association number is also displayed.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
Show the statistics for the peer with the given
\f\*[I-Font]assocID\f[].
@@ -735,7 +748,7 @@ appears in the
configuration file.
\f\*[I-Font]filename\f[]
can use
-\fCstrftime\fR()\f[]
+\fCstrftime\f[]\fR()\f[]
format specifies to substitute the current date and time, for example,
\f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
The filename used is stored in system variable
diff --git a/contrib/ntp/ntpq/ntpq.1ntpqmdoc b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
index d28b09eadbde6..4ed69cf03e4ca 100644
--- a/contrib/ntp/ntpq/ntpq.1ntpqmdoc
+++ b/contrib/ntp/ntpq/ntpq.1ntpqmdoc
@@ -1,9 +1,9 @@
-.Dd April 7 2015
+.Dd June 29 2015
.Dt NTPQ 1ntpqmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed April 7, 2015 at 04:27:09 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed June 29, 2015 at 04:31:41 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -224,7 +224,9 @@ switch.
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
-to a key number the server has been configured to use for this
+to the
+.Cm controlkey
+key number the server has been configured to use for this
purpose.
.It Ic keytype Xo Oo
.Cm md5 |
@@ -504,6 +506,14 @@ offset of server relative to this host
.It Ic jitter
jitter
.El
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Ic refid
+is displayed in hex format and the association number is also displayed.
.It Ic pstats Ar assocID
Show the statistics for the peer with the given
.Ar assocID .
diff --git a/contrib/ntp/ntpq/ntpq.c b/contrib/ntp/ntpq/ntpq.c
index 90cae41b1ca31..af5f6815c4f83 100644
--- a/contrib/ntp/ntpq/ntpq.c
+++ b/contrib/ntp/ntpq/ntpq.c
@@ -21,6 +21,7 @@
#include <isc/result.h>
#include "ntpq.h"
+#include "ntp_assert.h"
#include "ntp_stdlib.h"
#include "ntp_unixtime.h"
#include "ntp_calendar.h"
@@ -32,13 +33,13 @@
#ifdef OPENSSL
#include "openssl/evp.h"
#include "openssl/objects.h"
+#include "openssl/err.h"
#endif
#include <ssl_applink.c>
#include "ntp_libopts.h"
#include "ntpq-opts.h"
-
#ifdef SYS_VXWORKS /* vxWorks needs mode flag -casey*/
# define open(name, flags) open(name, flags, 0777)
# define SERVER_PORT_NUM 123
@@ -218,6 +219,13 @@ static int assoccmp (const void *, const void *);
void ntpq_custom_opt_handler (tOptions *, tOptDesc *);
+#ifdef OPENSSL
+# ifdef HAVE_EVP_MD_DO_ALL_SORTED
+static void list_md_fn(const EVP_MD *m, const char *from,
+ const char *to, void *arg );
+# endif
+#endif
+static char *list_digest_names(void);
/*
* Built-in commands we understand
@@ -275,8 +283,8 @@ struct xcmd builtins[] = {
{ "version number", "", "", "" },
"set the NTP version number to use for requests" },
{ "keytype", keytype, { OPT|NTP_STR, NO, NO, NO },
- { "key type (md5|des)", "", "", "" },
- "set key type to use for authenticated requests (des|md5)" },
+ { "key type %s", "", "", "" },
+ NULL },
{ 0, 0, { NO, NO, NO, NO },
{ "", "", "", "" }, "" }
};
@@ -458,6 +466,35 @@ ntpqmain(
if (!ipv6_works)
ai_fam_default = AF_INET;
+ /* Fixup keytype's help based on available digest names */
+
+ {
+ char *list;
+ char *msg, *fmt;
+
+ list = list_digest_names();
+ for (icmd = 0; icmd < sizeof(builtins)/sizeof(builtins[0]); icmd++) {
+ if (strcmp("keytype", builtins[icmd].keyword) == 0)
+ break;
+ }
+
+ /* CID: 1295478 */
+ /* This should only "trip" if "keytype" is removed from builtins */
+ INSIST(icmd < sizeof(builtins)/sizeof(builtins[0]));
+
+#ifdef OPENSSL
+ builtins[icmd].desc[0] = "digest-name";
+ fmt = "set key type to use for authenticated requests, one of:%s";
+#else
+ builtins[icmd].desc[0] = "md5";
+ fmt = "set key type to use for authenticated requests (%s)";
+#endif
+ msg = malloc(strlen(fmt) + strlen(list) - strlen("%s") +1);
+ sprintf(msg, fmt, list);
+ builtins[icmd].comment = msg;
+ free(list);
+ }
+
progname = argv[0];
{
@@ -2408,11 +2445,11 @@ keytype(
key_type = keytype_from_text(digest_name, &digest_len);
if (!key_type) {
- fprintf(fp, "keytype must be 'md5'%s\n",
+ fprintf(fp, "keytype is not valid. "
#ifdef OPENSSL
- " or a digest type provided by OpenSSL");
+ "Type \"help keytype\" for the available digest types.\n");
#else
- "");
+ "Only \"md5\" is available.\n");
#endif
return;
}
@@ -3424,3 +3461,104 @@ ntpq_custom_opt_handler(
break;
}
}
+/*
+ * Obtain list of digest names
+ */
+
+#ifdef OPENSSL
+# ifdef HAVE_EVP_MD_DO_ALL_SORTED
+struct hstate {
+ char *list;
+ const char **seen;
+ int idx;
+};
+#define K_PER_LINE 8
+#define K_NL_PFX_STR "\n "
+#define K_DELIM_STR ", "
+static void list_md_fn(const EVP_MD *m, const char *from, const char *to, void *arg )
+{
+ size_t len, n;
+ const char *name, *cp, **seen;
+ struct hstate *hstate = arg;
+ EVP_MD_CTX ctx;
+ u_int digest_len;
+ u_char digest[EVP_MAX_MD_SIZE];
+
+ if (!m)
+ return; /* Ignore aliases */
+
+ name = EVP_MD_name(m);
+
+ /* Lowercase names aren't accepted by keytype_from_text in ssl_init.c */
+
+ for( cp = name; *cp; cp++ ) {
+ if( islower(*cp) )
+ return;
+ }
+ len = (cp - name) + 1;
+
+ /* There are duplicates. Discard if name has been seen. */
+
+ for (seen = hstate->seen; *seen; seen++)
+ if (!strcmp(*seen, name))
+ return;
+ n = (seen - hstate->seen) + 2;
+ hstate->seen = realloc(hstate->seen, n * sizeof(*seen));
+ hstate->seen[n-2] = name;
+ hstate->seen[n-1] = NULL;
+
+ /* Discard MACs that NTP won't accept.
+ * Keep this consistent with keytype_from_text() in ssl_init.c.
+ */
+
+ EVP_DigestInit(&ctx, EVP_get_digestbyname(name));
+ EVP_DigestFinal(&ctx, digest, &digest_len);
+ if (digest_len > (MAX_MAC_LEN - sizeof(keyid_t)))
+ return;
+
+ if (hstate->list != NULL)
+ len += strlen(hstate->list);
+ len += (hstate->idx >= K_PER_LINE)? strlen(K_NL_PFX_STR): strlen(K_DELIM_STR);
+
+ if (hstate->list == NULL) {
+ hstate->list = (char *)malloc(len);
+ hstate->list[0] = '\0';
+ } else
+ hstate->list = (char *)realloc(hstate->list, len);
+
+ sprintf(hstate->list + strlen(hstate->list), "%s%s",
+ ((hstate->idx >= K_PER_LINE)? K_NL_PFX_STR : K_DELIM_STR),
+ name);
+ if (hstate->idx >= K_PER_LINE)
+ hstate->idx = 1;
+ else
+ hstate->idx++;
+}
+# endif
+#endif
+
+static char *list_digest_names(void)
+{
+ char *list = NULL;
+
+#ifdef OPENSSL
+# ifdef HAVE_EVP_MD_DO_ALL_SORTED
+ struct hstate hstate = { NULL, NULL, K_PER_LINE+1 };
+
+ hstate.seen = (const char **)calloc(1, sizeof( const char * ));
+
+ INIT_SSL();
+ EVP_MD_do_all_sorted(list_md_fn, &hstate);
+ list = hstate.list;
+ free(hstate.seen);
+# else
+ list = (char *)malloc(sizeof("md5, others (upgrade to OpenSSL-1.0 for full list)"));
+ strcpy(list, "md5, others (upgrade to OpenSSL-1.0 for full list)");
+# endif
+#else
+ list = (char *)malloc(sizeof("md5"));
+ strcpy(list, "md5");
+#endif
+
+ return list;
+}
diff --git a/contrib/ntp/ntpq/ntpq.html b/contrib/ntp/ntpq/ntpq.html
index 5d7a8f3c54bdc..e567419f6ed0b 100644
--- a/contrib/ntp/ntpq/ntpq.html
+++ b/contrib/ntp/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.8p2 of <code>ntpq</code>.
+ <p>This document applies to version 4.2.8p3 of <code>ntpq</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpq-Description">ntpq Description</a>
@@ -284,7 +284,9 @@ switch.
<br><dt><code>keyid</code> <kbd>keyid</kbd><dd>This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
-to a key number the server has been configured to use for this
+to the
+<code>controlkey</code>
+key number the server has been configured to use for this
purpose.
<br><dt><code>keytype</code> <code>[md5 | OpenSSLDigestType]</code><dd>Specify the type of key to use for authenticating requests.
<code>md5</code>
@@ -484,7 +486,15 @@ multicast server
<br><dt><code>offset</code><dd>offset of server relative to this host
<br><dt><code>jitter</code><dd>jitter
</dl>
- <br><dt><code>pstats</code> <kbd>assocID</kbd><dd>Show the statistics for the peer with the given
+ <br><dt><code>apeers</code><dd>Display a list of peers in the form:
+ <pre class="example"> [tally]remote refid assid st t when pool reach delay offset jitter
+ </pre>
+ <p>where the output is just like the
+<code>peers</code>
+command except that the
+<code>refid</code>
+is displayed in hex format and the association number is also displayed.
+<br><dt><code>pstats</code> <kbd>assocID</kbd><dd>Show the statistics for the peer with the given
<kbd>assocID</kbd>.
<br><dt><code>readlist</code> <kbd>assocID</kbd><br><dt><code>rl</code> <kbd>assocID</kbd><dd>Read the system or peer variables included in the variable list.
<br><dt><code>readvar</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><br><dt><code>rv</code> <kbd>assocID</kbd> <kbd>name</kbd><code>[=</code><kbd>value</kbd><code>]</code> <code>[, ...]</code><dd>Display the specified variables.
@@ -759,7 +769,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.8p2-RC3
+<pre class="example">ntpq - standard NTP query program - Ver. 4.2.8p3-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/contrib/ntp/ntpq/ntpq.man.in b/contrib/ntp/ntpq/ntpq.man.in
index c5b9fb560a3e1..7d5dcd32f4bf0 100644
--- a/contrib/ntp/ntpq/ntpq.man.in
+++ b/contrib/ntp/ntpq/ntpq.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpq @NTPQ_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
+.TH ntpq @NTPQ_MS@ "29 Jun 2015" "4.2.8p3" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-SOays6/ag-4Oaqr6)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-6GaipG/ag-fHaaoG)
.\"
-.\" It has been AutoGen-ed April 7, 2015 at 04:27:03 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed June 29, 2015 at 04:31:32 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -267,7 +267,9 @@ switch.
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
-to a key number the server has been configured to use for this
+to the
+\f\*[B-Font]controlkey\f[]
+key number the server has been configured to use for this
purpose.
.br
.ns
@@ -665,6 +667,17 @@ jitter
.br
.ns
.TP 10
+.NOP \f\*[B-Font]apeers\f[]
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+\f\*[B-Font]peers\f[]
+command except that the
+\f\*[B-Font]refid\f[]
+is displayed in hex format and the association number is also displayed.
+.br
+.ns
+.TP 10
.NOP \f\*[B-Font]pstats\f[] \f\*[I-Font]assocID\f[]
Show the statistics for the peer with the given
\f\*[I-Font]assocID\f[].
@@ -735,7 +748,7 @@ appears in the
configuration file.
\f\*[I-Font]filename\f[]
can use
-\fCstrftime\fR()\f[]
+\fCstrftime\f[]\fR()\f[]
format specifies to substitute the current date and time, for example,
\f\*[B-Font]q]saveconfig\f[] \f\*[B-Font]ntp-%Y%m%d-%H%M%S.confq]\f[].
The filename used is stored in system variable
diff --git a/contrib/ntp/ntpq/ntpq.mdoc.in b/contrib/ntp/ntpq/ntpq.mdoc.in
index 32224f2bb6e98..69c28e4acf59b 100644
--- a/contrib/ntp/ntpq/ntpq.mdoc.in
+++ b/contrib/ntp/ntpq/ntpq.mdoc.in
@@ -1,9 +1,9 @@
-.Dd April 7 2015
+.Dd June 29 2015
.Dt NTPQ @NTPQ_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpq-opts.mdoc)
.\"
-.\" It has been AutoGen-ed April 7, 2015 at 04:27:09 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed June 29, 2015 at 04:31:41 PM by AutoGen 5.18.5
.\" From the definitions ntpq-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -224,7 +224,9 @@ switch.
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
-to a key number the server has been configured to use for this
+to the
+.Cm controlkey
+key number the server has been configured to use for this
purpose.
.It Ic keytype Xo Oo
.Cm md5 |
@@ -504,6 +506,14 @@ offset of server relative to this host
.It Ic jitter
jitter
.El
+.It Ic apeers
+Display a list of peers in the form:
+.Dl [tally]remote refid assid st t when pool reach delay offset jitter
+where the output is just like the
+.Ic peers
+command except that the
+.Ic refid
+is displayed in hex format and the association number is also displayed.
.It Ic pstats Ar assocID
Show the statistics for the peer with the given
.Ar assocID .