+[Bug 1318] Allow multiple -g options on ntpd command line.
+[Bug 1327] ntpq, ntpdc, ntp-keygen -d and -D should work with configure
+ --disable-debugging.
+* Add ntpd --saveconfigquit <filename> option for future build-time
+ testing of saveconfig fidelity.
(4.2.5p225) 2009/09/30 Released by Harlan Stenn <stenn@ntp.org>
* authopt documentation changes from Dave Mills/Dave Hart.
* [Bug 1324] support bracketed IPv6 numeric addresses for restrict.
yes) AC_DEFINE(NO_PARENB_IGNPAR, 1, [Is there a problem using PARENB and IGNPAR (IRIX)?]) ;;
esac
-AC_MSG_CHECKING([if we're including debugging code])
+AC_MSG_CHECKING([if we're including ntpd debugging code])
AC_ARG_ENABLE(debugging,
- AC_HELP_STRING([--enable-debugging], [+ include debugging code]),
+ AC_HELP_STRING([--enable-debugging], [+ include ntpd debugging code]),
[ntp_ok=$enableval], [ntp_ok=yes])
if test "$ntp_ok" = "yes"; then
- AC_DEFINE(DEBUG, 1, [Enable debugging?])
+ AC_DEFINE(DEBUG, 1, [Enable ntpd debugging code?])
fi
AC_MSG_RESULT($ntp_ok)
name = debug-level;
value = d;
max = NOLIMIT;
- ifdef = DEBUG;
nopreset;
descrip = "Increase output debug message level";
doc = <<- _EndOfDoc_
name = set-debug-level;
value = D;
max = NOLIMIT;
- ifdef = DEBUG;
descrip = "Set the output debug message level";
arg-type = string;
flag-code = 'DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );';
void config_remotely(sockaddr_u *);
#ifdef SAVECONFIG
-int dump_config_tree(struct config_tree *ptree, FILE *df);
-int dump_all_config_trees(FILE *df);
+int dump_config_tree(struct config_tree *ptree, FILE *df, int comment);
+int dump_all_config_trees(FILE *df, int comment);
#endif
libntp_a_SOURCES = systime.c $(libntp_a_SRCS)
libntpsim_a_SOURCES = systime_s.c $(libntp_a_SRCS)
EXTRA_libntp_a_SOURCES = adjtimex.c
-INCLUDES = -I$(top_srcdir)/include \
- -I../include \
- -I$(top_srcdir)/lib/isc/include \
- -I../lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I../lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- -I../lib/isc/unix/include \
- $(NULL)
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/nothreads/include \
+ -I$(top_srcdir)/lib/isc/unix/include
ETAGS_ARGS = Makefile.am
noinst_HEADERS = lib_strbuf.h
K_CFLAGS = -DPARSESTREAM -DNTP_NEED_BOPS
libparse_a_SOURCES = parse.c \
- parse_conf.c \
- clk_meinberg.c \
- clk_schmid.c \
+ parse_conf.c \
+ clk_meinberg.c \
+ clk_schmid.c \
clk_rawdcf.c \
clk_trimtsip.c \
- clk_dcf7000.c \
- clk_trimtaip.c \
- clk_rcc8000.c \
- clk_hopf6021.c \
- clk_computime.c \
+ clk_dcf7000.c \
+ clk_trimtaip.c \
+ clk_rcc8000.c \
+ clk_hopf6021.c \
+ clk_computime.c \
clk_wharton.c \
clk_varitext.c \
- data_mbg.c \
+ data_mbg.c \
info_trimble.c \
trim_info.c \
binio.c \
$(NULL)
-INCLUDES = -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- -I$(top_srcdir)/kernel \
- $(NULL)
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/nothreads/include \
+ -I$(top_srcdir)/lib/isc/unix/include -I$(top_srcdir)/kernel
+
ETAGS_ARGS = Makefile.am
EXTRA_DIST = parsesolaris.c parsestreams.c mkinfo_scmd.sed mkinfo_rcmd.sed info_trimble.c
noinst_LIBRARIES= libntpd.a
-AM_CPPFLAGS= -I$(top_srcdir)/include \
- -I../include \
- -I$(top_srcdir)/lib/isc/include \
- -I../lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I../lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- -I../lib/isc/unix/include \
- $(LIBOPTS_CFLAGS) \
- $(NULL)
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/nothreads/include \
+ -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+
# LDADD might need RESLIB and ADJLIB.
LDADD= version.o libntpd.a @LIBPARSE@
AM_YFLAGS= -d -t -r all
)
BUILT_SOURCES= $(VPHACK) ntp_parser.c ntp_parser.h $(VPHACK_AFTER) \
- ntpd-opts.c ntpd-opts.h ntpd.1 ntpd-opts.texi ntpd-opts.menu
+ ntpd-opts.c ntpd-opts.h ntpd.1 ntpd-opts.texi ntpd-opts.menu
man_MANS= ntpd.1
-# What about ntpdsim.1?
+# ntpdsim.1 is a remnant along with all the ntpdsim-opts.* files, the
+# simulator currently uses ntpd-opts.[ch]. This also means there is no
+# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
# ntpd may need:
# log10 refclock_wwv.o
check_PROGRAMS = @MAKE_CHECK_Y2K@
EXTRA_PROGRAMS = check_y2k ntpdsim
run_ag= cd $(srcdir) && autogen -L ../include --writable
-std_def_list= $(top_srcdir)/include/debug-opt.def \
- $(top_srcdir)/include/autogen-version.def \
+std_def_list= $(top_srcdir)/include/autogen-version.def \
$(top_srcdir)/include/copyright.def \
$(top_srcdir)/include/version.def
check-local: @MAKE_CHECK_Y2K@
test -z "@MAKE_CHECK_Y2K@" || ./@MAKE_CHECK_Y2K@
-# SIM: cmd_args.c ntp_config.c ntp_io.c ntpd.c + ntpsim.c (include/ntpsim.h)
-# ntp_resolver.c is presently unused...
-ntpd_SOURCES = cmd_args.c ntp_config.c ntp_io.c ntp_parser.y \
- ntp_data_structures.c ntp_scanner.c ntp_scanner.h ntpd.c \
- ntpd-opts.c ntpd-opts.h
-ntpdsim_SOURCES = $(ntpd_SOURCES) ntpsim.c
-libntpd_a_SOURCES = jupiter.h ntp_control.c \
- ntp_crypto.c ntp_filegen.c \
- ntp_intres.c ntp_loopfilter.c ntp_monitor.c ntp_peer.c \
- ntp_proto.c ntp_refclock.c ntp_request.c \
- ntp_restrict.c ntp_timer.c ntp_util.c ntp_signd.c \
- ppsapi_timepps.h \
- refclock_acts.c refclock_arbiter.c refclock_arc.c refclock_as2201.c \
- refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
- refclock_chu.c refclock_conf.c refclock_datum.c refclock_dumbclock.c \
- refclock_fg.c refclock_gpsvme.c refclock_heath.c refclock_hopfser.c \
- refclock_hopfpci.c refclock_hpgps.c refclock_irig.c refclock_jjy.c \
- refclock_jupiter.c refclock_leitch.c refclock_local.c \
- refclock_mx4200.c refclock_neoclock4x.c \
- refclock_nmea.c refclock_oncore.c refclock_palisade.c \
- refclock_palisade.h refclock_parse.c \
- refclock_pcf.c refclock_pst.c refclock_ripencc.c refclock_shm.c \
- refclock_tpro.c refclock_true.c refclock_tt560.c \
- refclock_ulink.c refclock_wwv.c refclock_wwvb.c \
- refclock_zyfer.c
+ntpd_SOURCES = \
+ cmd_args.c \
+ ntp_config.c \
+ ntp_data_structures.c \
+ ntp_io.c \
+ ntp_parser.y \
+ ntp_scanner.c \
+ ntp_scanner.h \
+ ntpd.c \
+ ntpd-opts.c \
+ ntpd-opts.h \
+ $(NULL)
+
+ntpdsim_SOURCES = \
+ $(ntpd_SOURCES) \
+ ntpsim.c \
+ $(NULL)
+
+# libntpd_a_SOURCES do not use #ifdef SIM
+
+libntpd_a_SOURCES = \
+ jupiter.h \
+ ntp_control.c \
+ ntp_crypto.c \
+ ntp_filegen.c \
+ ntp_intres.c \
+ ntp_loopfilter.c \
+ ntp_monitor.c \
+ ntp_peer.c \
+ ntp_proto.c \
+ ntp_refclock.c \
+ ntp_request.c \
+ ntp_restrict.c \
+ ntp_signd.c \
+ ntp_timer.c \
+ ntp_util.c \
+ ppsapi_timepps.h \
+ refclock_acts.c \
+ refclock_arbiter.c \
+ refclock_arc.c \
+ refclock_as2201.c \
+ refclock_atom.c \
+ refclock_bancomm.c \
+ refclock_chronolog.c \
+ refclock_chu.c \
+ refclock_conf.c \
+ refclock_datum.c \
+ refclock_dumbclock.c \
+ refclock_fg.c \
+ refclock_gpsvme.c \
+ refclock_heath.c \
+ refclock_hopfser.c \
+ refclock_hopfpci.c \
+ refclock_hpgps.c \
+ refclock_irig.c \
+ refclock_jjy.c \
+ refclock_jupiter.c \
+ refclock_leitch.c \
+ refclock_local.c \
+ refclock_mx4200.c \
+ refclock_neoclock4x.c \
+ refclock_nmea.c \
+ refclock_oncore.c \
+ refclock_palisade.c \
+ refclock_palisade.h \
+ refclock_parse.c \
+ refclock_pcf.c \
+ refclock_pst.c \
+ refclock_ripencc.c \
+ refclock_shm.c \
+ refclock_tpro.c \
+ refclock_true.c \
+ refclock_tt560.c \
+ refclock_ulink.c \
+ refclock_wwv.c \
+ refclock_wwvb.c \
+ refclock_zyfer.c \
+ $(NULL)
$(srcdir)/ntpd-opts.h: $(srcdir)/ntpd-opts.c
$(srcdir)/ntpd-opts.c: $(srcdir)/ntpd-opts.def $(srcdir)/ntpdbase-opts.def $(std_def_list)
#include "ntp_stdlib.h"
#include "ntp_assert.h"
#include "ntpsim.h"
+#include "ntpd-opts.h"
#include <ntp_random.h>
#include <isc/net.h>
#include <isc/result.h>
#ifdef SAVECONFIG
/* Dump all trees */
int
-dump_all_config_trees (
- FILE *df
- )
+dump_all_config_trees(
+ FILE *df,
+ int comment
+ )
{
struct config_tree *cfg_ptr = cfg_tree_history;
int return_value = 0;
- for(; cfg_ptr != NULL; cfg_ptr = cfg_ptr->link)
- return_value |= dump_config_tree(cfg_ptr, df);
+ for (cfg_ptr = cfg_tree_history;
+ cfg_ptr != NULL;
+ cfg_ptr = cfg_ptr->link)
+ return_value |= dump_config_tree(cfg_ptr, df, comment);
return return_value;
}
int
dump_config_tree(
struct config_tree *ptree,
- FILE *df
+ FILE *df,
+ int comment
)
{
struct peer_node *peer = NULL;
char timestamp[80];
int enable;
- printf("dump_config_tree(%p)\n", ptree);
+ DPRINTF(1, ("dump_config_tree(%p)\n", ptree));
- if (!strftime(timestamp, sizeof(timestamp), "%Y-%m-%d %H:%M:%S",
- localtime(&ptree->timestamp)))
- timestamp[0] = '\0';
+ if (comment) {
+ if (!strftime(timestamp, sizeof(timestamp),
+ "%Y-%m-%d %H:%M:%S",
+ localtime(&ptree->timestamp)))
+ timestamp[0] = '\0';
- fprintf(df, "# %s %s %s\n",
- timestamp,
- (CONF_SOURCE_NTPQ == ptree->source.attr)
- ? "ntpq remote config from"
- : "startup configuration file",
- ptree->source.value.s);
+ fprintf(df, "# %s %s %s\n",
+ timestamp,
+ (CONF_SOURCE_NTPQ == ptree->source.attr)
+ ? "ntpq remote config from"
+ : "startup configuration file",
+ ptree->source.value.s);
+ }
/* For options I didn't find documentation I'll just output its name and the cor. value */
list_ptr = queue_head(ptree->vars);
free_netinfo_config(config_netinfo);
#endif /* HAVE_NETINFO */
+#ifdef SAVECONFIG
+ if (HAVE_OPT( SAVECONFIGQUIT )) {
+ FILE *dumpfile;
+ int dumpfailed;
+
+ dumpfile = fopen(OPT_ARG( SAVECONFIGQUIT ), "w");
+ dumpfailed = dump_all_config_trees(dumpfile, 0);
+ if (dumpfailed)
+ fprintf(stderr,
+ "--saveconfigquit %s error %d\n",
+ OPT_ARG( SAVECONFIGQUIT ),
+ dumpfailed);
+ exit(dumpfailed);
+ }
+#endif /* SAVECONFIG */
+
/*
printf("getconfig: res_fp <%p> call_resolver: %d", res_fp, call_resolver);
*/
else
fptr = fdopen(fd, "w");
- if (NULL == fptr || -1 == dump_all_config_trees(fptr)) {
+ if (NULL == fptr || -1 == dump_all_config_trees(fptr, 1)) {
snprintf(reply, sizeof(reply),
"Unable to save configuration to file %s",
filename);
#include "ntp.h"
#include "ntp_unixtime.h"
#include "ntp_assert.h"
+#include "ntpd-opts.h"
/* Don't include ISC's version of IPv6 variables and structures */
#define ISC_IPV6_H 1
{
static int already_opened;
- if (already_opened)
+ if (already_opened || HAVE_OPT( SAVECONFIGQUIT ))
return;
already_opened = 1;
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed September 30, 2009 at 07:33:07 AM by AutoGen 5.9.9pre5
+ * It has been AutoGen-ed Saturday October 3, 2009 at 03:52:55 AM UTC
* From the definitions ntpd-opts.def
* and the template file options
*
*
* This source file is copyrighted and licensed under the following terms:
*
- * ntpd copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpd copyright 1970-2009 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
*/
* global included definitions
*/
#ifdef __windows
- extern int atoi(const char*);
+ extern int atoi(const char *);
#else
# include <stdlib.h>
#endif
#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+/*
+ * Saveconfigquit option description:
+ */
+#ifdef SAVECONFIG
+tSCC zSaveconfigquitText[] =
+ "Save parsed configuration and quit";
+tSCC zSaveconfigquit_NAME[] = "SAVECONFIGQUIT";
+tSCC zSaveconfigquit_Name[] = "saveconfigquit";
+#define SAVECONFIGQUIT_FLAGS (OPTST_DISABLED \
+ | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+#else /* disable Saveconfigquit */
+#define VALUE_OPT_SAVECONFIGQUIT NO_EQUIVALENT
+#define SAVECONFIGQUIT_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#define zSaveconfigquitText NULL
+#define zSaveconfigquit_NAME NULL
+#define zSaveconfigquit_Name NULL
+#endif /* SAVECONFIG */
+
/*
* Statsdir option description:
*/
{ /* entry idx, value */ 9, VALUE_OPT_PANICGATE,
/* equiv idx, value */ 9, VALUE_OPT_PANICGATE,
/* equivalenced to */ NO_EQUIVALENT,
- /* min, max, act ct */ 0, 1, 0,
+ /* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ PANICGATE_FLAGS, 0,
/* last opt argumnt */ { NULL },
/* arg list/cookie */ NULL,
/* desc, NAME, name */ zPropagationdelayText, zPropagationdelay_NAME, zPropagationdelay_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 22, VALUE_OPT_STATSDIR,
- /* equiv idx, value */ 22, VALUE_OPT_STATSDIR,
+ { /* entry idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
+ /* equiv idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ SAVECONFIGQUIT_FLAGS, 0,
+ /* last opt argumnt */ { NULL },
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ zSaveconfigquitText, zSaveconfigquit_NAME, zSaveconfigquit_Name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 23, VALUE_OPT_STATSDIR,
+ /* equiv idx, value */ 23, VALUE_OPT_STATSDIR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ STATSDIR_FLAGS, 0,
/* desc, NAME, name */ zStatsdirText, zStatsdir_NAME, zStatsdir_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 23, VALUE_OPT_TRUSTEDKEY,
- /* equiv idx, value */ 23, VALUE_OPT_TRUSTEDKEY,
+ { /* entry idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
+ /* equiv idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ TRUSTEDKEY_FLAGS, 0,
/* desc, NAME, name */ zTrustedkeyText, zTrustedkey_NAME, zTrustedkey_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 24, VALUE_OPT_USER,
- /* equiv idx, value */ 24, VALUE_OPT_USER,
+ { /* entry idx, value */ 25, VALUE_OPT_USER,
+ /* equiv idx, value */ 25, VALUE_OPT_USER,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USER_FLAGS, 0,
/* desc, NAME, name */ zUserText, zUser_NAME, zUser_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 25, VALUE_OPT_UPDATEINTERVAL,
- /* equiv idx, value */ 25, VALUE_OPT_UPDATEINTERVAL,
+ { /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
+ /* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ UPDATEINTERVAL_FLAGS, 0,
/* desc, NAME, name */ zUpdateintervalText, zUpdateinterval_NAME, zUpdateinterval_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 26, VALUE_OPT_VAR,
- /* equiv idx, value */ 26, VALUE_OPT_VAR,
+ { /* entry idx, value */ 27, VALUE_OPT_VAR,
+ /* equiv idx, value */ 27, VALUE_OPT_VAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ VAR_FLAGS, 0,
/* desc, NAME, name */ zVarText, zVar_NAME, zVar_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 27, VALUE_OPT_DVAR,
- /* equiv idx, value */ 27, VALUE_OPT_DVAR,
+ { /* entry idx, value */ 28, VALUE_OPT_DVAR,
+ /* equiv idx, value */ 28, VALUE_OPT_DVAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ DVAR_FLAGS, 0,
/* desc, NAME, name */ zDvarText, zDvar_NAME, zDvar_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 28, VALUE_OPT_SLEW,
- /* equiv idx, value */ 28, VALUE_OPT_SLEW,
+ { /* entry idx, value */ 29, VALUE_OPT_SLEW,
+ /* equiv idx, value */ 29, VALUE_OPT_SLEW,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SLEW_FLAGS, 0,
/* desc, NAME, name */ zSlewText, zSlew_NAME, zSlew_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 29, VALUE_OPT_USEPCC,
- /* equiv idx, value */ 29, VALUE_OPT_USEPCC,
+ { /* entry idx, value */ 30, VALUE_OPT_USEPCC,
+ /* equiv idx, value */ 30, VALUE_OPT_USEPCC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USEPCC_FLAGS, 0,
/* desc, NAME, name */ zUsepccText, zUsepcc_NAME, zUsepcc_Name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 30, VALUE_OPT_PCCFREQ,
- /* equiv idx, value */ 30, VALUE_OPT_PCCFREQ,
+ { /* entry idx, value */ 31, VALUE_OPT_PCCFREQ,
+ /* equiv idx, value */ 31, VALUE_OPT_PCCFREQ,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PCCFREQ_FLAGS, 0,
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 34 /* full option count */, 31 /* user option count */,
+ 35 /* full option count */, 32 /* user option count */,
ntpd_full_usage, ntpd_short_usage,
NULL, NULL
};
static void
doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
{
- /* extracted from ../include/debug-opt.def, line 29 */
+ /* extracted from ntpdbase-opts.def, line 98 */
DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
}
#endif /* defined DEBUG */
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed September 30, 2009 at 07:33:06 AM by AutoGen 5.9.9pre5
+ * It has been AutoGen-ed Saturday October 3, 2009 at 03:52:54 AM UTC
* From the definitions ntpd-opts.def
* and the template file options
*
*
* This source file is copyrighted and licensed under the following terms:
*
- * ntpd copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpd copyright 1970-2009 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
*/
INDEX_OPT_PRIORITY = 19,
INDEX_OPT_QUIT = 20,
INDEX_OPT_PROPAGATIONDELAY = 21,
- INDEX_OPT_STATSDIR = 22,
- INDEX_OPT_TRUSTEDKEY = 23,
- INDEX_OPT_USER = 24,
- INDEX_OPT_UPDATEINTERVAL = 25,
- INDEX_OPT_VAR = 26,
- INDEX_OPT_DVAR = 27,
- INDEX_OPT_SLEW = 28,
- INDEX_OPT_USEPCC = 29,
- INDEX_OPT_PCCFREQ = 30,
- INDEX_OPT_VERSION = 31,
- INDEX_OPT_HELP = 32,
- INDEX_OPT_MORE_HELP = 33
+ INDEX_OPT_SAVECONFIGQUIT = 22,
+ INDEX_OPT_STATSDIR = 23,
+ INDEX_OPT_TRUSTEDKEY = 24,
+ INDEX_OPT_USER = 25,
+ INDEX_OPT_UPDATEINTERVAL = 26,
+ INDEX_OPT_VAR = 27,
+ INDEX_OPT_DVAR = 28,
+ INDEX_OPT_SLEW = 29,
+ INDEX_OPT_USEPCC = 30,
+ INDEX_OPT_PCCFREQ = 31,
+ INDEX_OPT_VERSION = 32,
+ INDEX_OPT_HELP = 33,
+ INDEX_OPT_MORE_HELP = 34
} teOptIndex;
-#define OPTION_CT 34
+#define OPTION_CT 35
#define NTPD_VERSION "4.2.5p225"
#define NTPD_FULL_VERSION "ntpd - NTP daemon program - Ver. 4.2.5p225"
# warning undefining PROPAGATIONDELAY due to option name conflict
# undef PROPAGATIONDELAY
# endif
+# ifdef SAVECONFIGQUIT
+# warning undefining SAVECONFIGQUIT due to option name conflict
+# undef SAVECONFIGQUIT
+# endif
# ifdef STATSDIR
# warning undefining STATSDIR due to option name conflict
# undef STATSDIR
# undef PRIORITY
# undef QUIT
# undef PROPAGATIONDELAY
+# undef SAVECONFIGQUIT
# undef STATSDIR
# undef TRUSTEDKEY
# undef USER
#define OPT_VALUE_PRIORITY (DESC(PRIORITY).optArg.argInt)
#define VALUE_OPT_QUIT 'q'
#define VALUE_OPT_PROPAGATIONDELAY 'r'
+#ifdef SAVECONFIG
+#define VALUE_OPT_SAVECONFIGQUIT 22
+#endif /* SAVECONFIG */
#define VALUE_OPT_STATSDIR 's'
#define VALUE_OPT_TRUSTEDKEY 't'
#ifdef HAVE_DROPROOT
#endif /* HAVE_DROPROOT */
#define VALUE_OPT_UPDATEINTERVAL 'U'
#define OPT_VALUE_UPDATEINTERVAL (DESC(UPDATEINTERVAL).optArg.argInt)
-#define VALUE_OPT_VAR 26
-#define VALUE_OPT_DVAR 27
+#define VALUE_OPT_VAR 27
+#define VALUE_OPT_DVAR 28
#define VALUE_OPT_SLEW 'x'
#ifdef SYS_WINNT
-#define VALUE_OPT_USEPCC 29
+#define VALUE_OPT_USEPCC 30
#endif /* SYS_WINNT */
#ifdef SYS_WINNT
-#define VALUE_OPT_PCCFREQ 30
+#define VALUE_OPT_PCCFREQ 31
#endif /* SYS_WINNT */
#define VALUE_OPT_HELP '?'
#define VALUE_OPT_MORE_HELP '!'
#
# EDIT THIS FILE WITH CAUTION (ntpd-opts.texi)
#
-# It has been AutoGen-ed September 30, 2009 at 07:33:10 AM by AutoGen 5.9.9pre5
+# It has been AutoGen-ed Saturday October 3, 2009 at 03:52:56 AM UTC
# From the definitions ntpd-opts.def
# and the template file aginfo.tpl
@end ignore
* ntpd priority:: priority option (-P)
* ntpd propagationdelay:: propagationdelay option (-r)
* ntpd quit:: quit option (-q)
+* ntpd saveconfigquit:: saveconfigquit option
* ntpd set-debug-level:: set-debug-level option (-D)
* ntpd slew:: slew option (-x)
* ntpd statsdir:: statsdir option (-s)
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.5p220
+ntpd - NTP daemon program - Ver. 4.2.5p225
USAGE: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
@cindex ntpd-panicgate
This is the ``allow the first adjustment to be big'' option.
+
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+may appear an unlimited number of times.
+@end itemize
+
Normally,
ntpd
exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that,
This is the ``broadcast/propagation delay'' option.
Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
+@node ntpd saveconfigquit
+@subsection saveconfigquit option
+@cindex ntpd-saveconfigquit
+
+This is the ``save parsed configuration and quit'' option.
+
+This option has some usage constraints. It:
+@itemize @bullet
+@item
+must be compiled in by defining @code{SAVECONFIG} during the compilation.
+@end itemize
+
+Cause ntpd to parse its startup configuration file and save an
+equivalent to the given filename and exit. This option was
+designed for automated testing.
+
@node ntpd statsdir
@subsection statsdir option (-s)
@cindex ntpd-statsdir
-.TH NTPD 1 2009-09-30 "( 4.2.5p225)" "Programmer's Manual"
+.TH NTPD 1 2009-10-03 "( 4.2.5p225)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpd.1)
.\"
-.\" It has been AutoGen-ed September 30, 2009 at 07:33:09 AM by AutoGen 5.9.9pre5
+.\" It has been AutoGen-ed Saturday October 3, 2009 at 03:52:55 AM UTC
.\" From the definitions ntpd-opts.def
.\" and the template file agman1.tpl
.\"
.TP
.BR \-g ", " \--panicgate
Allow the first adjustment to be Big.
+This option may appear an unlimited number of times.
.sp
Normally,
ntpd
.sp
Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
.TP
+.BR \--saveconfigquit "=\fIstring\fP"
+Save parsed configuration and quit.
+.sp
+Cause ntpd to parse its startup configuration file and save an
+equivalent to the given filename and exit. This option was
+designed for automated testing.
+.TP
.BR \-s " \fIstring\fP, " \--statsdir "=" \fIstring\fP
Statistics file location.
.sp
static void set_process_priority (void);
void init_logging (char const *, int);
void setup_logfile (void);
+static void process_commandline_opts(int *, char ***);
static void assertion_failed (const char *file, int line,
isc_assertiontype_t type, const char *cond);
}
}
+
+static void
+process_commandline_opts(
+ int *pargc,
+ char ***pargv
+ )
+{
+ int optct;
+
+ optct = optionProcess(&ntpdOptions, *pargc, *pargv);
+ *pargc -= optct;
+ *pargv += optct;
+}
+
+
#ifdef SIM
int
main(
char *argv[]
)
{
+ process_commandline_opts(&argc, &argv);
+
return ntpsim(argc, argv);
}
#else /* SIM */
#endif
progname = argv[0];
-
initializing = 1; /* mark that we are initializing */
-
- {
- int optct = optionProcess(
- &ntpdOptions
- , argc, argv);
- argc -= optct;
- argv += optct;
- }
-
+ process_commandline_opts(&argc, &argv);
init_logging(progname, 1); /* Open the log file */
#ifdef HAVE_UMASK
uid_t uid;
uid = getuid();
- if (uid)
- {
+ if (uid && !HAVE_OPT( SAVECONFIGQUIT )) {
msyslog(LOG_ERR, "ntpd: must be run as root, not uid %ld", (long)uid);
printf("must be run as root, not uid %ld\n", (long)uid);
exit(1);
set_mm_timer(MM_TIMER_HIRES);
#endif
- if (HAVE_OPT( NOFORK ) || HAVE_OPT( QUIT ))
+ if (HAVE_OPT( NOFORK ) || HAVE_OPT( QUIT )
+#ifdef DEBUG
+ || debug
+#endif
+ || HAVE_OPT( SAVECONFIGQUIT ))
nofork = 1;
if (HAVE_OPT( NOVIRTUALIPS ))
/*
* Detach us from the terminal. May need an #ifndef GIZMO.
*/
- if (
-# ifdef DEBUG
- !debug &&
-# endif /* DEBUG */
- !nofork)
- {
+ if (!nofork) {
- /*
- * Install trap handlers to log errors and assertion failures.
- * Default handlers print to stderr which doesn't work if detached.
- */
- isc_assertion_setcallback(assertion_failed);
- isc_error_setfatal(library_fatal_error);
- isc_error_setunexpected(library_unexpected_error);
+ /*
+ * Install trap handlers to log errors and assertion
+ * failures. Default handlers print to stderr which
+ * doesn't work if detached.
+ */
+ isc_assertion_setcallback(assertion_failed);
+ isc_error_setfatal(library_fatal_error);
+ isc_error_setunexpected(library_unexpected_error);
# ifndef SYS_WINNT
# ifdef HAVE_DAEMON
#ifdef HAVE_LINUX_CAPABILITIES
/* set flag: keep privileges accross setuid() call (we only really need cap_sys_time): */
- if( prctl( PR_SET_KEEPCAPS, 1L, 0L, 0L, 0L ) == -1 ) {
+ if (prctl( PR_SET_KEEPCAPS, 1L, 0L, 0L, 0L ) == -1) {
msyslog( LOG_ERR, "prctl( PR_SET_KEEPCAPS, 1L ) failed: %m" );
exit(-1);
}
#else
/* we need a user to switch to */
- if( user == NULL ) {
+ if (user == NULL) {
msyslog(LOG_ERR, "Need user name to drop root privileges (see -u flag!)" );
exit(-1);
}
#include autogen-version.def
+include = <<- _EOF_
+ #ifdef __windows
+ extern int atoi(const char *);
+ #else
+ # include <stdlib.h>
+ #endif
+ _EOF_;
+
test-main;
flag = {
_EndOfDoc_;
};
-#include debug-opt.def
+flag = {
+ name = debug-level;
+ value = d;
+ max = NOLIMIT;
+ ifdef = DEBUG;
+ nopreset;
+ descrip = "Increase output debug message level";
+ doc = <<- _EndOfDoc_
+ Increase the debugging message output level.
+ _EndOfDoc_;
+};
+
+flag = {
+ name = set-debug-level;
+ value = D;
+ max = NOLIMIT;
+ ifdef = DEBUG;
+ descrip = "Set the output debug message level";
+ arg-type = string;
+ flag-code = 'DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );';
+ doc = <<- _EndOfDoc_
+ Set the output debugging level. Can be supplied multiple times,
+ but each overrides the previous value(s).
+ _EndOfDoc_;
+};
flag = {
name = driftfile;
flag = {
name = panicgate;
value = g;
+ max = NOLIMIT;
descrip = "Allow the first adjustment to be Big";
doc = <<- _EndOfDoc_
Normally,
_EndOfDoc_;
};
+flag = {
+ ifdef = SAVECONFIG;
+ name = saveconfigquit;
+ arg-type = string;
+ descrip = "Save parsed configuration and quit";
+ doc = <<- _EndOfDoc_
+ Cause ntpd to parse its startup configuration file and save an
+ equivalent to the given filename and exit. This option was
+ designed for automated testing.
+ _EndOfDoc_;
+};
+
flag = {
name = statsdir;
value = s;
EXTRA_PROGRAMS= ntptimeset
ntptimeset_SOURCES= ntptimeset.c ntptime_config.c
-AM_CPPFLAGS= -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- $(NULL)
+
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/nothreads/include \
+ -I$(top_srcdir)/lib/isc/unix/include
+
# LDADD might need RESLIB and ADJLIB
LDADD= version.o ../libntp/libntp.a
DISTCLEANFILES= .version version.c stamp-v
EXTRA_PROGRAMS= ntpdc-layout
EXTRA_DATA= check-layout
BUILT_SOURCES= @MAKE_CHECK_LAYOUT@
-AM_CPPFLAGS= -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- $(LIBOPTS_CFLAGS) \
- $(NULL)
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/nothreads/include \
+ -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
# LDADD might need RESLIB and ADJLIB
ntpdc_LDADD= version.o @EDITLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
# ntpdc-layout doesn't need any additional libraries at all
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.c)
*
- * It has been AutoGen-ed September 30, 2009 at 07:35:47 AM by AutoGen 5.9.9pre5
+ * It has been AutoGen-ed Saturday October 3, 2009 at 03:57:35 AM UTC
* From the definitions ntpdc-opts.def
* and the template file options
*
*
* This source file is copyrighted and licensed under the following terms:
*
- * ntpdc copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpdc copyright 1970-2009 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
*/
/*
* Debug_Level option description:
*/
-#ifdef DEBUG
tSCC zDebug_LevelText[] =
"Increase output debug message level";
tSCC zDebug_Level_NAME[] = "DEBUG_LEVEL";
tSCC zDebug_Level_Name[] = "debug-level";
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
-#else /* disable Debug_Level */
-#define VALUE_OPT_DEBUG_LEVEL NO_EQUIVALENT
-#define DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zDebug_LevelText NULL
-#define zDebug_Level_NAME NULL
-#define zDebug_Level_Name NULL
-#endif /* DEBUG */
-
/*
* Set_Debug_Level option description:
*/
-#ifdef DEBUG
tSCC zSet_Debug_LevelText[] =
"Set the output debug message level";
tSCC zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Set_Debug_Level */
-#define VALUE_OPT_SET_DEBUG_LEVEL NO_EQUIVALENT
-#define SET_DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSet_Debug_LevelText NULL
-#define zSet_Debug_Level_NAME NULL
-#define zSet_Debug_Level_Name NULL
-#endif /* DEBUG */
-
/*
* Numeric option description:
*/
/*
* Declare option callback procedures
*/
-#ifdef DEBUG
- static tOptProc doOptSet_Debug_Level;
-#else /* not DEBUG */
-# define doOptSet_Debug_Level NULL
-#endif /* def/not DEBUG */
#if defined(TEST_NTPDC_OPTS)
/*
* Under test, omit argument processing, or call optionStackArg,
extern tOptProc
optionPagedUsage, optionPrintVersion, optionStackArg;
static tOptProc
- doUsageOpt;
+ doOptSet_Debug_Level, doUsageOpt;
/*
* #define map the "normal" callout procs
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * For the set-debug-level option, when DEBUG is #define-d.
+ * For the set-debug-level option.
*/
-#ifdef DEBUG
static void
doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
{
- /* extracted from ../include/debug-opt.def, line 29 */
+ /* extracted from ../include/debug-opt.def, line 27 */
DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
}
-#endif /* defined DEBUG */
#endif /* defined(TEST_NTPDC_OPTS) */
/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
/*
* EDIT THIS FILE WITH CAUTION (ntpdc-opts.h)
*
- * It has been AutoGen-ed September 30, 2009 at 07:35:46 AM by AutoGen 5.9.9pre5
+ * It has been AutoGen-ed Saturday October 3, 2009 at 03:57:35 AM UTC
* From the definitions ntpdc-opts.def
* and the template file options
*
*
* This source file is copyrighted and licensed under the following terms:
*
- * ntpdc copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpdc copyright 1970-2009 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
*/
#define VALUE_OPT_PEERS 'p'
#define VALUE_OPT_SHOWPEERS 's'
#define VALUE_OPT_INTERACTIVE 'i'
-#ifdef DEBUG
#define VALUE_OPT_DEBUG_LEVEL 'd'
-#endif /* DEBUG */
-#ifdef DEBUG
#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
-#endif /* DEBUG */
#define VALUE_OPT_NUMERIC 'n'
#define VALUE_OPT_HELP '?'
#define VALUE_OPT_MORE_HELP '!'
#
# EDIT THIS FILE WITH CAUTION (ntpdc-opts.texi)
#
-# It has been AutoGen-ed September 30, 2009 at 07:35:49 AM by AutoGen 5.9.9pre5
+# It has been AutoGen-ed Saturday October 3, 2009 at 03:57:36 AM UTC
# From the definitions ntpdc-opts.def
# and the template file aginfo.tpl
@end ignore
@exampleindent 0
@example
-ntpdc - vendor-specific NTP query program - Ver. 4.2.5p220
+ntpdc - vendor-specific NTP query program - Ver. 4.2.5p225
USAGE: ntpdc [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
or by a single hyphen and the flag character.
The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/ntpdc/.ntprc
+ - reading file /m/pogo/users/hart/.ntprc
+ - reading file /m/pogo/users/hart/ntp-dev-1318-27/ntpdc/.ntprc
- examining environment variables named NTPDC_*
The
@itemize @bullet
@item
may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
@end itemize
Increase the debugging message output level.
@itemize @bullet
@item
may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
@end itemize
Set the output debugging level. Can be supplied multiple times,
-.TH NTPDC 1 2009-09-30 "( 4.2.5p225)" "Programmer's Manual"
+.TH NTPDC 1 2009-10-03 "( 4.2.5p225)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpdc.1)
.\"
-.\" It has been AutoGen-ed September 30, 2009 at 07:35:48 AM by AutoGen 5.9.9pre5
+.\" It has been AutoGen-ed Saturday October 3, 2009 at 03:57:35 AM UTC
.\" From the definitions ntpdc-opts.def
.\" and the template file agman1.tpl
.\"
AUTOMAKE_OPTIONS=
bin_PROGRAMS= ntpq
-AM_CPPFLAGS= -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- $(LIBOPTS_CFLAGS) \
- $(NULL)
+
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/nothreads/include \
+ -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+
# LDADD might need RESLIB and ADJLIB
ntpq_LDADD= version.o @EDITLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
noinst_HEADERS= ntpq.h
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.c)
*
- * It has been AutoGen-ed September 30, 2009 at 07:36:23 AM by AutoGen 5.9.9pre5
+ * It has been AutoGen-ed Saturday October 3, 2009 at 03:57:53 AM UTC
* From the definitions ntpq-opts.def
* and the template file options
*
*
* This source file is copyrighted and licensed under the following terms:
*
- * ntpq copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpq copyright 1970-2009 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
*/
/*
* Debug_Level option description:
*/
-#ifdef DEBUG
tSCC zDebug_LevelText[] =
"Increase output debug message level";
tSCC zDebug_Level_NAME[] = "DEBUG_LEVEL";
tSCC zDebug_Level_Name[] = "debug-level";
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
-#else /* disable Debug_Level */
-#define VALUE_OPT_DEBUG_LEVEL NO_EQUIVALENT
-#define DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zDebug_LevelText NULL
-#define zDebug_Level_NAME NULL
-#define zDebug_Level_Name NULL
-#endif /* DEBUG */
-
/*
* Set_Debug_Level option description:
*/
-#ifdef DEBUG
tSCC zSet_Debug_LevelText[] =
"Set the output debug message level";
tSCC zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Set_Debug_Level */
-#define VALUE_OPT_SET_DEBUG_LEVEL NO_EQUIVALENT
-#define SET_DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSet_Debug_LevelText NULL
-#define zSet_Debug_Level_NAME NULL
-#define zSet_Debug_Level_Name NULL
-#endif /* DEBUG */
-
/*
* Peers option description with
* "Must also have options" and "Incompatible options":
/*
* Declare option callback procedures
*/
-#ifdef DEBUG
- static tOptProc doOptSet_Debug_Level;
-#else /* not DEBUG */
-# define doOptSet_Debug_Level NULL
-#endif /* def/not DEBUG */
#if defined(TEST_NTPQ_OPTS)
/*
* Under test, omit argument processing, or call optionStackArg,
extern tOptProc
ntpq_custom_opt_handler, optionPagedUsage, optionPrintVersion;
static tOptProc
- doUsageOpt;
+ doOptSet_Debug_Level, doUsageOpt;
/*
* #define map the "normal" callout procs
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * For the set-debug-level option, when DEBUG is #define-d.
+ * For the set-debug-level option.
*/
-#ifdef DEBUG
static void
doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
{
- /* extracted from ../include/debug-opt.def, line 29 */
+ /* extracted from ../include/debug-opt.def, line 27 */
DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
}
-#endif /* defined DEBUG */
#endif /* defined(TEST_NTPQ_OPTS) */
/* extracted from /usr/local/gnu/share/autogen/optmain.tpl near line 109 */
/*
* EDIT THIS FILE WITH CAUTION (ntpq-opts.h)
*
- * It has been AutoGen-ed September 30, 2009 at 07:36:22 AM by AutoGen 5.9.9pre5
+ * It has been AutoGen-ed Saturday October 3, 2009 at 03:57:53 AM UTC
* From the definitions ntpq-opts.def
* and the template file options
*
*
* This source file is copyrighted and licensed under the following terms:
*
- * ntpq copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntpq copyright 1970-2009 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
*/
#define WHICH_IDX_IPV4 (DESC(IPV4).optActualIndex)
#define VALUE_OPT_IPV6 '6'
#define VALUE_OPT_COMMAND 'c'
-#ifdef DEBUG
#define VALUE_OPT_DEBUG_LEVEL 'd'
-#endif /* DEBUG */
-#ifdef DEBUG
#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
-#endif /* DEBUG */
#define VALUE_OPT_PEERS 'p'
#define VALUE_OPT_INTERACTIVE 'i'
#define VALUE_OPT_NUMERIC 'n'
#
# EDIT THIS FILE WITH CAUTION (ntpq-opts.texi)
#
-# It has been AutoGen-ed September 30, 2009 at 07:36:25 AM by AutoGen 5.9.9pre5
+# It has been AutoGen-ed Saturday October 3, 2009 at 03:57:54 AM UTC
# From the definitions ntpq-opts.def
# and the template file aginfo.tpl
@end ignore
@exampleindent 0
@example
-ntpq - standard NTP query program - Ver. 4.2.5p220
+ntpq - standard NTP query program - Ver. 4.2.5p225
USAGE: ntpq [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... [ host ...]
Flg Arg Option-Name Description
-4 no ipv4 Force IPv4 DNS name resolution
or by a single hyphen and the flag character.
The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/ntpq/.ntprc
+ - reading file /m/pogo/users/hart/.ntprc
+ - reading file /m/pogo/users/hart/ntp-dev-1318-27/ntpq/.ntprc
- examining environment variables named NTPQ_*
The
@itemize @bullet
@item
may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
@end itemize
Increase the debugging message output level.
@itemize @bullet
@item
may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
@end itemize
Set the output debugging level. Can be supplied multiple times,
-.TH NTPQ 1 2009-09-30 "( 4.2.5p225)" "Programmer's Manual"
+.TH NTPQ 1 2009-10-03 "( 4.2.5p225)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpq.1)
.\"
-.\" It has been AutoGen-ed September 30, 2009 at 07:36:24 AM by AutoGen 5.9.9pre5
+.\" It has been AutoGen-ed Saturday October 3, 2009 at 03:57:54 AM UTC
.\" From the definitions ntpq-opts.def
.\" and the template file agman1.tpl
.\"
# HMS: we probably want a version.o file here, too.
LDADD= ../ntpq/libntpq.a ../libntp/libntp.a @SNMP_LIBS@ \
$(LIBOPTS_LDADD)
-AM_CPPFLAGS= -I$(top_srcdir)/ntpq \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- @SNMP_CPPFLAGS@ \
- $(LIBOPTS_CFLAGS) \
- $(NULL)
+AM_CPPFLAGS= -I$(top_srcdir)/ntpq -I$(top_srcdir)/include \
+ -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/nothreads/include \
+ -I$(top_srcdir)/lib/isc/unix/include \
+ @SNMP_CPPFLAGS@ $(LIBOPTS_CFLAGS)
+
AM_CFLAGS= @SNMP_CFLAGS@
EXTRA_DIST= ntpsnmpd-opts.def ntpsnmpd.1 ntpsnmpd-opts.texi \
ntpsnmpd-opts.menu ntpv4-mib.mib
ntpsnmpd-opts.menu
man_MANS= ntpsnmpd.1
run_ag= cd $(srcdir) && autogen -L ../include --writable
-std_def_list= $(top_srcdir)/include/debug-opt.def \
- $(top_srcdir)/include/autogen-version.def \
+std_def_list= $(top_srcdir)/include/autogen-version.def \
$(top_srcdir)/include/copyright.def \
$(top_srcdir)/include/homerc.def \
$(top_srcdir)/include/version.def
AUTOMAKE_OPTIONS =
noinst_PROGRAMS = @TESTDCF@ @DCFD@
EXTRA_PROGRAMS = testdcf dcfd
-INCLUDES = -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- $(NULL)
+
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/nothreads/include \
+ -I$(top_srcdir)/lib/isc/unix/include
+
ETAGS_ARGS = Makefile.am
DISTCLEANFILES = $(EXTRA_PROGRAMS)
#EXTRA_DIST= TAGS
/* Command line users should put -n in the options */
while (argv[i]) {
if (!_strnicmp(argv[i], "-d", 2) ||
+ !strcmp(argv[i], "--debug_level") ||
+ !strcmp(argv[i], "--set-debug_level") ||
!strcmp(argv[i], "-q") ||
+ !strcmp(argv[i], "--quit") ||
+ !strcmp(argv[i], "-?") ||
!strcmp(argv[i], "--help") ||
- !strcmp(argv[i], "-n")) {
+ !strcmp(argv[i], "-n") ||
+ !strcmp(argv[i], "--nofork") ||
+ !strcmp(argv[i], "--saveconfigquit")) {
foreground = TRUE;
break;
}
RelativePath="..\..\..\..\include\ntp_malloc.h"
>
</File>
+ <File
+ RelativePath="..\..\..\..\include\ntp_md5.h"
+ >
+ </File>
<File
RelativePath="..\..\..\..\include\ntp_net.h"
>
>
</File>
<File
- RelativePath="..\..\include\sys\time.h"
+ RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
>
</File>
<File
- RelativePath="..\..\..\..\lib\isc\win32\include\isc\time.h"
+ RelativePath="..\..\include\sys\time.h"
>
</File>
<File
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS= -I ../m4 -I libopts/m4
-AM_CPPFLAGS= $(LIBOPTS_CFLAGS) \
- -I$(top_srcdir)/../include \
- -I$(top_srcdir)/../lib/isc/include \
- -I$(top_srcdir)/../lib/isc/nothreads/include \
- -I$(top_srcdir)/../lib/isc/unix/include \
- $(NULL)
+AM_CPPFLAGS= $(LIBOPTS_CFLAGS) -I$(top_srcdir)/../include \
+ -I$(top_srcdir)/../lib/isc/include \
+ -I$(top_srcdir)/../lib/isc/nothreads/include \
+ -I$(top_srcdir)/../lib/isc/unix/include
+
LDADD= $(LIBOPTS_LDADD) -lm ../libntp/libntp.a
run_ag= cd $(srcdir) && autogen -L ../include --writable
EXTRA_PROGRAMS= audio-pcm byteorder hist jitter kern longsize \
ntptime pps-api precision sht testrs6000 tg tickadj timetrim
-AM_CPPFLAGS= -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- $(LIBOPTS_CFLAGS) \
- $(NULL)
+AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \
+ -I$(top_srcdir)/lib/isc/nothreads/include \
+ -I$(top_srcdir)/lib/isc/unix/include $(LIBOPTS_CFLAGS)
+
# LDADD might need RESLIB and ADJLIB
LDADD= ../libntp/libntp.a
ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.c)
*
- * It has been AutoGen-ed September 30, 2009 at 07:42:23 AM by AutoGen 5.9.9pre5
+ * It has been AutoGen-ed Saturday October 3, 2009 at 03:59:09 AM UTC
* From the definitions ntp-keygen-opts.def
* and the template file options
*
*
* This source file is copyrighted and licensed under the following terms:
*
- * ntp-keygen copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntp-keygen copyright 1970-2009 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
*/
/*
* Debug_Level option description:
*/
-#ifdef DEBUG
tSCC zDebug_LevelText[] =
"Increase output debug message level";
tSCC zDebug_Level_NAME[] = "DEBUG_LEVEL";
tSCC zDebug_Level_Name[] = "debug-level";
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
-#else /* disable Debug_Level */
-#define VALUE_OPT_DEBUG_LEVEL NO_EQUIVALENT
-#define DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zDebug_LevelText NULL
-#define zDebug_Level_NAME NULL
-#define zDebug_Level_Name NULL
-#endif /* DEBUG */
-
/*
* Set_Debug_Level option description:
*/
-#ifdef DEBUG
tSCC zSet_Debug_LevelText[] =
"Set the output debug message level";
tSCC zSet_Debug_Level_NAME[] = "SET_DEBUG_LEVEL";
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
-#else /* disable Set_Debug_Level */
-#define VALUE_OPT_SET_DEBUG_LEVEL NO_EQUIVALENT
-#define SET_DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
-#define zSet_Debug_LevelText NULL
-#define zSet_Debug_Level_NAME NULL
-#define zSet_Debug_Level_Name NULL
-#endif /* DEBUG */
-
/*
* Id_Key option description:
*/
/*
* Declare option callback procedures
*/
-#ifdef DEBUG
- static tOptProc doOptSet_Debug_Level;
-#else /* not DEBUG */
-# define doOptSet_Debug_Level NULL
-#endif /* def/not DEBUG */
#ifdef OPENSSL
static tOptProc doOptModulus;
#else /* not OPENSSL */
extern tOptProc
optionPagedUsage, optionPrintVersion;
static tOptProc
- doUsageOpt;
+ doOptSet_Debug_Level, doUsageOpt;
/*
* #define map the "normal" callout procs
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * For the set-debug-level option, when DEBUG is #define-d.
+ * For the set-debug-level option.
*/
-#ifdef DEBUG
static void
doOptSet_Debug_Level(tOptions* pOptions, tOptDesc* pOptDesc)
{
- /* extracted from ../include/debug-opt.def, line 29 */
+ /* extracted from ../include/debug-opt.def, line 27 */
DESC(DEBUG_LEVEL).optOccCt = atoi( pOptDesc->pzLastArg );
}
-#endif /* defined DEBUG */
#endif /* defined(TEST_NTP_KEYGEN_OPTS) */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/*
* EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.h)
*
- * It has been AutoGen-ed September 30, 2009 at 07:42:22 AM by AutoGen 5.9.9pre5
+ * It has been AutoGen-ed Saturday October 3, 2009 at 03:59:08 AM UTC
* From the definitions ntp-keygen-opts.def
* and the template file options
*
*
* This source file is copyrighted and licensed under the following terms:
*
- * ntp-keygen copyright (c) 1970-2009 David L. Mills and/or others - all rights reserved
+ * ntp-keygen copyright 1970-2009 David L. Mills and/or others - all rights reserved
*
* see html/copyright.html
*/
#ifdef OPENSSL
#define VALUE_OPT_CERTIFICATE 'c'
#endif /* OPENSSL */
-#ifdef DEBUG
#define VALUE_OPT_DEBUG_LEVEL 'd'
-#endif /* DEBUG */
-#ifdef DEBUG
#define VALUE_OPT_SET_DEBUG_LEVEL 'D'
-#endif /* DEBUG */
#ifdef OPENSSL
#define VALUE_OPT_ID_KEY 'e'
#endif /* OPENSSL */
#
# EDIT THIS FILE WITH CAUTION (ntp-keygen-opts.texi)
#
-# It has been AutoGen-ed September 30, 2009 at 07:42:25 AM by AutoGen 5.9.9pre5
+# It has been AutoGen-ed Saturday October 3, 2009 at 03:59:10 AM UTC
# From the definitions ntp-keygen-opts.def
# and the template file aginfo.tpl
@end ignore
@exampleindent 0
@example
Using OpenSSL version 90704f
-ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.5p220
+ntp-keygen (ntp) - Create a NTP host key - Ver. 4.2.5p225
USAGE: ntp-keygen [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
Flg Arg Option-Name Description
-c Str certificate certificate scheme
or by a single hyphen and the flag character.
The following option preset mechanisms are supported:
- - reading file /users/stenn/.ntprc
- - reading file /deacon/backroom/snaps/ntp-dev/util/.ntprc
+ - reading file /m/pogo/users/hart/.ntprc
+ - reading file /m/pogo/users/hart/ntp-dev-1318-27/util/.ntprc
- examining environment variables named NTP_KEYGEN_*
If there is no new host key, look for an existing one.
@itemize @bullet
@item
may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
@end itemize
Increase the debugging message output level.
@itemize @bullet
@item
may appear an unlimited number of times.
-@item
-must be compiled in by defining @code{DEBUG} during the compilation.
@end itemize
Set the output debugging level. Can be supplied multiple times,
-.TH NTP-KEYGEN 1 2009-09-30 "(ntp 4.2.5p225)" "Programmer's Manual"
+.TH NTP-KEYGEN 1 2009-10-03 "(ntp 4.2.5p225)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen.1)
.\"
-.\" It has been AutoGen-ed September 30, 2009 at 07:42:24 AM by AutoGen 5.9.9pre5
+.\" It has been AutoGen-ed Saturday October 3, 2009 at 03:59:09 AM UTC
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman1.tpl
.\"