summaryrefslogtreecommitdiff
path: root/ntpd
diff options
context:
space:
mode:
Diffstat (limited to 'ntpd')
-rw-r--r--ntpd/Makefile.am2
-rw-r--r--ntpd/Makefile.in19
-rw-r--r--ntpd/cmd_args.c9
-rw-r--r--ntpd/invoke-ntp.conf.texi31
-rw-r--r--ntpd/invoke-ntp.keys.texi2
-rw-r--r--ntpd/invoke-ntpd.texi25
-rw-r--r--ntpd/keyword-gen-utd2
-rw-r--r--ntpd/keyword-gen.c5
-rw-r--r--ntpd/ntp.conf.5man42
-rw-r--r--ntpd/ntp.conf.5mdoc39
-rw-r--r--ntpd/ntp.conf.def31
-rw-r--r--ntpd/ntp.conf.html28
-rw-r--r--ntpd/ntp.conf.man.in42
-rw-r--r--ntpd/ntp.conf.mdoc.in39
-rw-r--r--ntpd/ntp.keys.5man8
-rw-r--r--ntpd/ntp.keys.5mdoc8
-rw-r--r--ntpd/ntp.keys.html2
-rw-r--r--ntpd/ntp.keys.man.in8
-rw-r--r--ntpd/ntp.keys.mdoc.in8
-rw-r--r--ntpd/ntp_config.c54
-rw-r--r--ntpd/ntp_control.c289
-rw-r--r--ntpd/ntp_crypto.c157
-rw-r--r--ntpd/ntp_filegen.c2
-rw-r--r--ntpd/ntp_io.c113
-rw-r--r--ntpd/ntp_keyword.h1192
-rw-r--r--ntpd/ntp_leapsec.c17
-rw-r--r--ntpd/ntp_loopfilter.c188
-rw-r--r--ntpd/ntp_parser.c2047
-rw-r--r--ntpd/ntp_parser.h406
-rw-r--r--ntpd/ntp_parser.y7
-rw-r--r--ntpd/ntp_peer.c20
-rw-r--r--ntpd/ntp_proto.c125
-rw-r--r--ntpd/ntp_request.c17
-rw-r--r--ntpd/ntp_restrict.c4
-rw-r--r--ntpd/ntp_scanner.c28
-rw-r--r--ntpd/ntp_util.c4
-rw-r--r--ntpd/ntpd-opts.c628
-rw-r--r--ntpd/ntpd-opts.h73
-rw-r--r--ntpd/ntpd.1ntpdman28
-rw-r--r--ntpd/ntpd.1ntpdmdoc25
-rw-r--r--ntpd/ntpd.c9
-rw-r--r--ntpd/ntpd.html76
-rw-r--r--ntpd/ntpd.man.in28
-rw-r--r--ntpd/ntpd.mdoc.in25
-rw-r--r--ntpd/ntpdbase-opts.def22
-rw-r--r--ntpd/refclock_acts.c4
-rw-r--r--ntpd/refclock_arc.c6
-rw-r--r--ntpd/refclock_chu.c4
-rw-r--r--ntpd/refclock_gpsdjson.c14
-rw-r--r--ntpd/refclock_heath.c2
-rw-r--r--ntpd/refclock_hpgps.c9
-rw-r--r--ntpd/refclock_irig.c4
-rw-r--r--ntpd/refclock_jjy.c45
-rw-r--r--ntpd/refclock_jupiter.c109
-rw-r--r--ntpd/refclock_neoclock4x.c14
-rw-r--r--ntpd/refclock_nmea.c15
-rw-r--r--ntpd/refclock_oncore.c160
-rw-r--r--ntpd/refclock_palisade.c10
-rw-r--r--ntpd/refclock_palisade.h1
-rw-r--r--ntpd/refclock_parse.c1226
-rw-r--r--ntpd/refclock_pcf.c2
-rw-r--r--ntpd/refclock_ripencc.c2
-rw-r--r--ntpd/refclock_shm.c200
-rw-r--r--ntpd/refclock_true.c1
-rw-r--r--ntpd/refclock_wwv.c6
65 files changed, 4249 insertions, 3519 deletions
diff --git a/ntpd/Makefile.am b/ntpd/Makefile.am
index b3af527..344ac8e 100644
--- a/ntpd/Makefile.am
+++ b/ntpd/Makefile.am
@@ -90,7 +90,7 @@ man_MANS= ntpd.$(NTPD_MS)
LDADD_NTPD_COMMON = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS)
LDADD_NTPD_COMMON += $(LIBM) $(LDADD_NTP) $(LSCF)
-ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_NTPD_COMMON)
+ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_NTPD_COMMON) $(LDADD_LIBUTIL)
ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a $(LDADD_NTPD_COMMON)
ntpdsim_CPPFLAGS = $(AM_CPPFLAGS) -DSIM
check_y2k_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_LIBNTP) $(PTHREAD_LIBS)
diff --git a/ntpd/Makefile.in b/ntpd/Makefile.in
index ddb2ad3..0eccb11 100644
--- a/ntpd/Makefile.in
+++ b/ntpd/Makefile.in
@@ -52,8 +52,7 @@ subdir = ntpd
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/libopts/m4/stdnoreturn.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap-thread-check.m4 \
- $(top_srcdir)/sntp/libevent/m4/openldap.m4 \
+ $(top_srcdir)/sntp/m4/ax_c99_struct_init.m4 \
$(top_srcdir)/sntp/m4/define_dir.m4 \
$(top_srcdir)/sntp/m4/hms_search_lib.m4 \
$(top_srcdir)/sntp/m4/libtool.m4 \
@@ -64,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_cacheversion.m4 \
$(top_srcdir)/sntp/m4/ntp_compiler.m4 \
$(top_srcdir)/sntp/m4/ntp_crosscompile.m4 \
+ $(top_srcdir)/sntp/m4/ntp_crypto_rand.m4 \
$(top_srcdir)/sntp/m4/ntp_debug.m4 \
$(top_srcdir)/sntp/m4/ntp_dir_sep.m4 \
$(top_srcdir)/sntp/m4/ntp_facilitynames.m4 \
@@ -81,6 +81,8 @@ am__aclocal_m4_deps = $(top_srcdir)/sntp/libopts/m4/libopts.m4 \
$(top_srcdir)/sntp/m4/ntp_sntp.m4 \
$(top_srcdir)/sntp/m4/ntp_ver_suffix.m4 \
$(top_srcdir)/sntp/m4/ntp_vpathhack.m4 \
+ $(top_srcdir)/sntp/m4/openldap-thread-check.m4 \
+ $(top_srcdir)/sntp/m4/openldap.m4 \
$(top_srcdir)/sntp/m4/os_cflags.m4 \
$(top_srcdir)/sntp/m4/snprintf.m4 \
$(top_srcdir)/sntp/m4/version.m4 $(top_srcdir)/configure.ac
@@ -157,8 +159,7 @@ am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
ntpd_DEPENDENCIES = $(am__DEPENDENCIES_2) ../libntp/libntp.a \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_3)
+ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1)
am__objects_2 = ntpdsim-ntp_config.$(OBJEXT) ntpdsim-ntp_io.$(OBJEXT) \
ntpdsim-ntp_parser.$(OBJEXT) ntpdsim-ntp_scanner.$(OBJEXT) \
ntpdsim-ntpd.$(OBJEXT) ntpdsim-ntpd-opts.$(OBJEXT) \
@@ -255,6 +256,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -289,7 +291,9 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
+LDADD_LIBEVENT = @LDADD_LIBEVENT@
LDADD_LIBNTP = @LDADD_LIBNTP@
+LDADD_LIBUTIL = @LDADD_LIBUTIL@
LDADD_NLIST = @LDADD_NLIST@
LDADD_NTP = @LDADD_NTP@
LDFLAGS = @LDFLAGS@
@@ -428,6 +432,11 @@ TIMETRIM_DL = @TIMETRIM_DL@
TIMETRIM_DS = @TIMETRIM_DS@
TIMETRIM_MS = @TIMETRIM_MS@
TIMETRIM_NI = @TIMETRIM_NI@
+UPDATE_LEAP_DB = @UPDATE_LEAP_DB@
+UPDATE_LEAP_DL = @UPDATE_LEAP_DL@
+UPDATE_LEAP_DS = @UPDATE_LEAP_DS@
+UPDATE_LEAP_MS = @UPDATE_LEAP_MS@
+UPDATE_LEAP_NI = @UPDATE_LEAP_NI@
VERSION = @VERSION@
VER_SUFFIX = @VER_SUFFIX@
YACC = @YACC@
@@ -536,7 +545,7 @@ man_MANS = ntpd.$(NTPD_MS)
# longer a reason to have ntpdbase-opts.def split off of ntpd-opts.def.
LDADD_NTPD_COMMON = $(LDADD_LIBNTP) $(LIBOPTS_LDADD) $(PTHREAD_LIBS) \
$(LIBM) $(LDADD_NTP) $(LSCF)
-ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_NTPD_COMMON)
+ntpd_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_NTPD_COMMON) $(LDADD_LIBUTIL)
ntpdsim_LDADD = $(LDADD) ../libntp/libntpsim.a $(LDADD_NTPD_COMMON)
ntpdsim_CPPFLAGS = $(AM_CPPFLAGS) -DSIM
check_y2k_LDADD = $(LDADD) ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM) $(LDADD_LIBNTP) $(PTHREAD_LIBS)
diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c
index 045c0a9..14e86f7 100644
--- a/ntpd/cmd_args.c
+++ b/ntpd/cmd_args.c
@@ -76,6 +76,9 @@ getCmdOpts(
if (HAVE_OPT( PANICGATE ))
allow_panic = TRUE;
+ if (HAVE_OPT( FORCE_STEP_ONCE ))
+ force_step_once = TRUE;
+
#ifdef HAVE_DROPROOT
if (HAVE_OPT( JAILDIR )) {
droproot = 1;
@@ -175,14 +178,14 @@ getCmdOpts(
if (HAVE_OPT( UPDATEINTERVAL )) {
long val = OPT_VALUE_UPDATEINTERVAL;
-
+
if (val >= 0)
interface_interval = val;
else {
- fprintf(stderr,
+ fprintf(stderr,
"command line interface update interval %ld must not be negative\n",
val);
- msyslog(LOG_ERR,
+ msyslog(LOG_ERR,
"command line interface update interval %ld must not be negative",
val);
errflg++;
diff --git a/ntpd/invoke-ntp.conf.texi b/ntpd/invoke-ntp.conf.texi
index 78d3baf..7151efb 100644
--- a/ntpd/invoke-ntp.conf.texi
+++ b/ntpd/invoke-ntp.conf.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.conf.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:56:50 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:25:50 AM by AutoGen 5.18.5pre4
# From the definitions ntp.conf.def
# and the template file agtexi-file.tpl
@end ignore
@@ -365,6 +365,20 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
@ref{Authentication Options}.
+@item @code{mdnstries} @kbd{number}
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+@code{mdnstries}
+times.
+After all,
+@code{ntpd}
+may be starting before mDNS.
+The default value for
+@code{mdnstries}
+is 5.
@end table
@node Authentication Support
@subsection Authentication Support
@@ -2468,7 +2482,7 @@ holds
the names of all peer variables and the
@code{clock_var_list}
holds the names of the reference clock variables.
-@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{srep} | @code{stepout} @kbd{stepout}]}
+@item @code{tinker} @code{[@code{allan} @kbd{allan} | @code{dispersion} @kbd{dispersion} | @code{freq} @kbd{freq} | @code{huffpuff} @kbd{huffpuff} | @code{panic} @kbd{panic} | @code{step} @kbd{step} | @code{stepback} @kbd{stepback} | @code{stepfwd} @kbd{stepfwd} | @code{stepout} @kbd{stepout}]}
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@@ -2525,6 +2539,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+@item @code{stepback} @kbd{stepback}
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+@item @code{stepfwd} @kbd{stepfwd}
+As for stepback, but for the forward direction.
@item @code{stepout} @kbd{stepout}
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/invoke-ntp.keys.texi b/ntpd/invoke-ntp.keys.texi
index b79bba8..b0d4940 100644
--- a/ntpd/invoke-ntp.keys.texi
+++ b/ntpd/invoke-ntp.keys.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntp.keys.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:56:52 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:25:52 AM by AutoGen 5.18.5pre4
# From the definitions ntp.keys.def
# and the template file agtexi-file.tpl
@end ignore
diff --git a/ntpd/invoke-ntpd.texi b/ntpd/invoke-ntpd.texi
index 11ccce4..b6c69db 100644
--- a/ntpd/invoke-ntpd.texi
+++ b/ntpd/invoke-ntpd.texi
@@ -6,7 +6,7 @@
#
# EDIT THIS FILE WITH CAUTION (invoke-ntpd.texi)
#
-# It has been AutoGen-ed December 2, 2014 at 08:56:55 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed April 7, 2015 at 04:25:54 AM by AutoGen 5.18.5pre4
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -95,6 +95,7 @@ This software is released under the NTP license, <http://ntp.org/license>.
* ntpd configfile:: configfile option (-c)
* ntpd driftfile:: driftfile option (-f)
* ntpd panicgate:: panicgate option (-g)
+* ntpd force-step-once:: force-step-once option (-G)
* ntpd jaildir:: jaildir option (-i)
* ntpd interface:: interface option (-I)
* ntpd keyfile:: keyfile option (-k)
@@ -141,7 +142,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.7p482
+ntpd - NTP daemon program - Ver. 4.2.8p2
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
@@ -162,6 +163,7 @@ Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
-f Str driftfile frequency drift file name
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
+ -G no force-step-once Step any initial offset correction.
-i Str jaildir Jail directory
-I Str interface Listen on an interface name or address
- may appear multiple times
@@ -298,7 +300,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
@code{driftfile} @kbd{driftfile}
-configuration specification in the
+configuration specification in the
@file{/etc/ntp.conf}
file.
@node ntpd panicgate
@@ -326,6 +328,21 @@ options.
See the
@code{tinker}
configuration file directive for other options.
+@node ntpd force-step-once
+@subsection force-step-once option (-G)
+@cindex ntpd-force-step-once
+
+This is the ``step any initial offset correction.'' option.
+Normally,
+@code{ntpd}
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the @code{tinker} configuration file directive for other options.
@node ntpd jaildir
@subsection jaildir option (-i)
@cindex ntpd-jaildir
@@ -370,7 +387,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-@code{interface} command, which is more versatile.
+@code{interface} command, which is more versatile.
@node ntpd keyfile
@subsection keyfile option (-k)
@cindex ntpd-keyfile
diff --git a/ntpd/keyword-gen-utd b/ntpd/keyword-gen-utd
index 7474a56..b9b59bd 100644
--- a/ntpd/keyword-gen-utd
+++ b/ntpd/keyword-gen-utd
@@ -1 +1 @@
- * Generated 2013-08-04 04:56:14 UTC diff_ignore_line
+ * Generated 2015-03-16 09:05:44 UTC diff_ignore_line
diff --git a/ntpd/keyword-gen.c b/ntpd/keyword-gen.c
index d4f7758..5872e2a 100644
--- a/ntpd/keyword-gen.c
+++ b/ntpd/keyword-gen.c
@@ -97,6 +97,7 @@ struct key_tok ntp_keywords[] = {
{ "iburst", T_Iburst, FOLLBY_TOKEN },
{ "key", T_Key, FOLLBY_TOKEN },
{ "maxpoll", T_Maxpoll, FOLLBY_TOKEN },
+{ "mdnstries", T_Mdnstries, FOLLBY_TOKEN },
{ "minpoll", T_Minpoll, FOLLBY_TOKEN },
{ "mode", T_Mode, FOLLBY_TOKEN },
{ "noselect", T_Noselect, FOLLBY_TOKEN },
@@ -205,6 +206,8 @@ struct key_tok ntp_keywords[] = {
{ "filenum", T_Filenum, FOLLBY_TOKEN },
/* tinker_option */
{ "step", T_Step, FOLLBY_TOKEN },
+{ "stepback", T_Stepback, FOLLBY_TOKEN },
+{ "stepfwd", T_Stepfwd, FOLLBY_TOKEN },
{ "panic", T_Panic, FOLLBY_TOKEN },
{ "dispersion", T_Dispersion, FOLLBY_TOKEN },
{ "stepout", T_Stepout, FOLLBY_TOKEN },
@@ -357,7 +360,7 @@ generate_fsm(void)
fprintf(stderr,
"keyword-gen sst[%u] too small "
"for keyword '%s' id %d\n",
- COUNTOF(sst),
+ (int)COUNTOF(sst),
ntp_keywords[i].key,
token);
exit(4);
diff --git a/ntpd/ntp.conf.5man b/ntpd/ntp.conf.5man
index 389f23e..f1ed4b2 100644
--- a/ntpd/ntp.conf.5man
+++ b/ntpd/ntp.conf.5man
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5man "02 Dec 2014" "4.2.7p482" "File Formats"
+.TH ntp.conf 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-7eaizK/ag-wfaayK)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:37 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -415,6 +415,21 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]mdnstries\f[] \f\*[I-Font]number\f[]
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+\f\*[B-Font]mdnstries\f[]
+times.
+After all,
+\f\*[B-Font]ntpd\f[]
+may be starting before mDNS.
+The default value for
+\f\*[B-Font]mdnstries\f[]
+is 5.
.PP
.SH Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2771,7 +2786,7 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
-.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
+.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@@ -2837,6 +2852,21 @@ Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.TP 7
+.NOP \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[]
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.TP 7
+.NOP \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[]
+As for stepback, but for the forward direction.
+.TP 7
.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
The argument is the stepout timeout, which by default is 900 s.
It can
@@ -2974,9 +3004,9 @@ RFC5905
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
diff --git a/ntpd/ntp.conf.5mdoc b/ntpd/ntp.conf.5mdoc
index 998a274..1a52a12 100644
--- a/ntpd/ntp.conf.5mdoc
+++ b/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:58 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -402,6 +402,20 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric\-key or
public\-key authentication as described in
.Sx Authentication Options .
+.It Ic mdnstries Ar number
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+.Ic mdnstries
+times.
+After all,
+.Ic ntpd
+may be starting before mDNS.
+The default value for
+.Ic mdnstries
+is 5.
.El
.Sh Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2604,7 +2618,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
-.Cm step Ar srep |
+.Cm step Ar step |
+.Cm stepback Ar stepback |
+.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@@ -2664,6 +2680,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+.It Cm stepback Ar stepback
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.It Cm stepfwd Ar stepfwd
+As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can
@@ -2784,9 +2813,9 @@ A snapshot of this documentation is available in HTML format in
.%O RFC5905
.Re
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
diff --git a/ntpd/ntp.conf.def b/ntpd/ntp.conf.def
index 5a5af21..e5c44b7 100644
--- a/ntpd/ntp.conf.def
+++ b/ntpd/ntp.conf.def
@@ -404,6 +404,20 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
.Sx Authentication Options .
+.It Ic mdnstries Ar number
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+.Ic mdnstries
+times.
+After all,
+.Ic ntpd
+may be starting before mDNS.
+The default value for
+.Ic mdnstries
+is 5.
.El
.Sh Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2606,7 +2620,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
-.Cm step Ar srep |
+.Cm step Ar step |
+.Cm stepback Ar stepback |
+.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@@ -2666,6 +2682,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+.It Cm stepback Ar stepback
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.It Cm stepfwd Ar stepfwd
+As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can
diff --git a/ntpd/ntp.conf.html b/ntpd/ntp.conf.html
index 15632da..7ab25e3 100644
--- a/ntpd/ntp.conf.html
+++ b/ntpd/ntp.conf.html
@@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the configuration file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.7p482 of <code>ntp.conf</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp.conf</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
@@ -403,6 +403,19 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
<a href="#Authentication-Options">Authentication Options</a>.
+<br><dt><code>mdnstries</code> <kbd>number</kbd><dd>If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+<code>mdnstries</code>
+times.
+After all,
+<code>ntpd</code>
+may be starting before mDNS.
+The default value for
+<code>mdnstries</code>
+is 5.
</dl>
<div class="node">
<p><hr>
@@ -2450,7 +2463,7 @@ holds
the names of all peer variables and the
<code>clock_var_list</code>
holds the names of the reference clock variables.
-<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>srep</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><dd>This command can be used to alter several system variables in
+<br><dt><code>tinker</code> <code>[allan </code><kbd>allan</kbd><code> | dispersion </code><kbd>dispersion</kbd><code> | freq </code><kbd>freq</kbd><code> | huffpuff </code><kbd>huffpuff</kbd><code> | panic </code><kbd>panic</kbd><code> | step </code><kbd>step</kbd><code> | stepback </code><kbd>stepback</kbd><code> | stepfwd </code><kbd>stepfwd</kbd><code> | stepout </code><kbd>stepout</kbd><code>]</code><dd>This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
configuration file before any other configuration options.
@@ -2500,6 +2513,17 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+<br><dt><code>stepback</code> <kbd>stepback</kbd><dd>The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+<br><dt><code>stepfwd</code> <kbd>stepfwd</kbd><dd>As for stepback, but for the forward direction.
<br><dt><code>stepout</code> <kbd>stepout</kbd><dd>The argument is the stepout timeout, which by default is 900 s.
It can
be set to any positive number in seconds.
diff --git a/ntpd/ntp.conf.man.in b/ntpd/ntp.conf.man.in
index 3261b6c..548151d 100644
--- a/ntpd/ntp.conf.man.in
+++ b/ntpd/ntp.conf.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntp.conf 5 "02 Dec 2014" "4.2.7p482" "File Formats"
+.TH ntp.conf 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-7eaizK/ag-wfaayK)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-gKaW.1/ag-tKaO91)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:37 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:37 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -415,6 +415,21 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric-key or
public-key authentication as described in
\fIAuthentication\f[] \fIOptions\f[].
+.TP 7
+.NOP \f\*[B-Font]mdnstries\f[] \f\*[I-Font]number\f[]
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+\f\*[B-Font]mdnstries\f[]
+times.
+After all,
+\f\*[B-Font]ntpd\f[]
+may be starting before mDNS.
+The default value for
+\f\*[B-Font]mdnstries\f[]
+is 5.
.PP
.SH Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2771,7 +2786,7 @@ the names of all peer variables and the
\fIclock_var_list\f[]
holds the names of the reference clock variables.
.TP 7
-.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]srep\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
+.NOP \f\*[B-Font]tinker\f[] [\f\*[B-Font]allan\f[] \f\*[I-Font]allan\f[] | \f\*[B-Font]dispersion\f[] \f\*[I-Font]dispersion\f[] | \f\*[B-Font]freq\f[] \f\*[I-Font]freq\f[] | \f\*[B-Font]huffpuff\f[] \f\*[I-Font]huffpuff\f[] | \f\*[B-Font]panic\f[] \f\*[I-Font]panic\f[] | \f\*[B-Font]step\f[] \f\*[I-Font]step\f[] | \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[] | \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[] | \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]]
This command can be used to alter several system variables in
very exceptional circumstances.
It should occur in the
@@ -2837,6 +2852,21 @@ Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
.TP 7
+.NOP \f\*[B-Font]stepback\f[] \f\*[I-Font]stepback\f[]
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.TP 7
+.NOP \f\*[B-Font]stepfwd\f[] \f\*[I-Font]stepfwd\f[]
+As for stepback, but for the forward direction.
+.TP 7
.NOP \f\*[B-Font]stepout\f[] \f\*[I-Font]stepout\f[]
The argument is the stepout timeout, which by default is 900 s.
It can
@@ -2974,9 +3004,9 @@ RFC5905
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The syntax checking is not picky; some combinations of
diff --git a/ntpd/ntp.conf.mdoc.in b/ntpd/ntp.conf.mdoc.in
index 3a236d5..da935ed 100644
--- a/ntpd/ntp.conf.mdoc.in
+++ b/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:58 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:57 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.conf.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -402,6 +402,20 @@ in order to avoid accidental or malicious disruption in this mode,
both the server and client should operate using symmetric\-key or
public\-key authentication as described in
.Sx Authentication Options .
+.It Ic mdnstries Ar number
+If we are participating in mDNS,
+after we have synched for the first time
+we attempt to register with the mDNS system.
+If that registration attempt fails,
+we try again at one minute intervals for up to
+.Ic mdnstries
+times.
+After all,
+.Ic ntpd
+may be starting before mDNS.
+The default value for
+.Ic mdnstries
+is 5.
.El
.Sh Authentication Support
Authentication support allows the NTP client to verify that the
@@ -2604,7 +2618,9 @@ holds the names of the reference clock variables.
.Cm freq Ar freq |
.Cm huffpuff Ar huffpuff |
.Cm panic Ar panic |
-.Cm step Ar srep |
+.Cm step Ar step |
+.Cm stepback Ar stepback |
+.Cm stepfwd Ar stepfwd |
.Cm stepout Ar stepout
.Oc
.Xc
@@ -2664,6 +2680,19 @@ adjustments will never occur.
Note: The kernel time discipline is
disabled if the step threshold is set to zero or greater than the
default.
+.It Cm stepback Ar stepback
+The argument is the step threshold for the backward direction,
+which by default is 0.128 s.
+It can
+be set to any positive number in seconds.
+If both the forward and backward step thresholds are set to zero, step
+adjustments will never occur.
+Note: The kernel time discipline is
+disabled if
+each direction of step threshold are either
+set to zero or greater than .5 second.
+.It Cm stepfwd Ar stepfwd
+As for stepback, but for the forward direction.
.It Cm stepout Ar stepout
The argument is the stepout timeout, which by default is 900 s.
It can
@@ -2784,9 +2813,9 @@ A snapshot of this documentation is available in HTML format in
.%O RFC5905
.Re
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The syntax checking is not picky; some combinations of
diff --git a/ntpd/ntp.keys.5man b/ntpd/ntp.keys.5man
index 52acb7f..a505afb 100644
--- a/ntpd/ntp.keys.5man
+++ b/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "02 Dec 2014" "4.2.7p482" "File Formats"
+.TH ntp.keys 5man "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:42 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -158,9 +158,9 @@ the default name of the configuration file
\fCntpdc\fR(1ntpdcmdoc)\f[],
\fCsntp\fR(1sntpmdoc)\f[]
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpd/ntp.keys.5mdoc b/ntpd/ntp.keys.5mdoc
index 56ad9c1..a7157ec 100644
--- a/ntpd/ntp.keys.5mdoc
+++ b/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:01 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -145,9 +145,9 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Xr ntpdc 1ntpdcmdoc ,
.Xr sntp 1sntpmdoc
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpd/ntp.keys.html b/ntpd/ntp.keys.html
index ab4b9b7..98a22ef 100644
--- a/ntpd/ntp.keys.html
+++ b/ntpd/ntp.keys.html
@@ -33,7 +33,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#dir">(dir)</a>
<p>This document describes the symmetric key file for the NTP Project's
<code>ntpd</code> program.
- <p>This document applies to version 4.2.7p482 of <code>ntp.keys</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntp.keys</code>.
<div class="shortcontents">
<h2>Short Contents</h2>
diff --git a/ntpd/ntp.keys.man.in b/ntpd/ntp.keys.man.in
index 943b27e..c7585af 100644
--- a/ntpd/ntp.keys.man.in
+++ b/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "02 Dec 2014" "4.2.7p482" "File Formats"
+.TH ntp.keys 5 "07 Apr 2015" "4.2.8p2" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:42 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:42 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agman-file.tpl
.Sh NAME
@@ -158,9 +158,9 @@ the default name of the configuration file
\fCntpdc\fR(@NTPDC_MS@)\f[],
\fCsntp\fR(@SNTP_MS@)\f[]
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpd/ntp.keys.mdoc.in b/ntpd/ntp.keys.mdoc.in
index b2a24e9..e6590db 100644
--- a/ntpd/ntp.keys.mdoc.in
+++ b/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:01 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:00 AM by AutoGen 5.18.5pre4
.\" From the definitions ntp.keys.def
.\" and the template file agmdoc-file.tpl
.Sh NAME
@@ -145,9 +145,9 @@ it to autogen\-users@lists.sourceforge.net. Thank you.
.Xr ntpdc @NTPDC_MS@ ,
.Xr sntp @SNTP_MS@
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh "BUGS"
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c
index 0f48983..a224579 100644
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -128,6 +128,8 @@ typedef struct peer_resolved_ctx_tag {
#define ISEOL(c) ((c) == '#' || (c) == '\n' || (c) == '\0')
#define ISSPACE(c) ((c) == ' ' || (c) == '\t')
+#define _UC(str) ((char *)(intptr_t)(str))
+
/*
* Definitions of things either imported from or exported to outside
*/
@@ -316,6 +318,7 @@ static void config_ntpd(config_tree *);
static void config_other_modes(config_tree *);
static void config_auth(config_tree *);
static void config_access(config_tree *);
+static void config_mdnstries(config_tree *);
static void config_phone(config_tree *);
static void config_setvar(config_tree *);
static void config_ttl(config_tree *);
@@ -355,6 +358,7 @@ static u_int32 get_logmask(const char *);
#ifndef SIM
static int getnetnum(const char *num, sockaddr_u *addr, int complain,
enum gnn_type a_type);
+
#endif
@@ -392,6 +396,7 @@ init_syntax_tree(
)
{
ZERO(*ptree);
+ ptree->mdnstries = 5;
}
@@ -502,7 +507,7 @@ dump_config_tree(
int_node *counter_set;
string_node *str_node;
- const char *s;
+ const char *s = NULL;
char *s1;
char *s2;
char timestamp[80];
@@ -1105,7 +1110,7 @@ create_attr_rangeval(
attr_val *
create_attr_sval(
int attr,
- char *s
+ const char *s
)
{
attr_val *my_val;
@@ -1114,7 +1119,7 @@ create_attr_sval(
my_val->attr = attr;
if (NULL == s) /* free() hates NULL */
s = estrdup("");
- my_val->value.s = s;
+ my_val->value.s = _UC(s);
my_val->type = T_String;
return my_val;
@@ -1329,7 +1334,7 @@ create_unpeer_node(
* We treat all valid 16-bit numbers as association IDs.
*/
pch = addr->address;
- while (*pch && isdigit(*pch))
+ while (*pch && isdigit((unsigned char)*pch))
pch++;
if (!*pch
@@ -2457,12 +2462,12 @@ config_access(
/* It would be swell if we could identify the line number */
if ((RES_KOD & flags) && !(RES_LIMITED & flags)) {
- char *kod_where = (my_node->addr)
+ const char *kod_where = (my_node->addr)
? my_node->addr->address
: (mflags & RESM_SOURCE)
? "source"
: "default";
- char *kod_warn = "KOD does nothing without LIMITED.";
+ const char *kod_warn = "KOD does nothing without LIMITED.";
fprintf(stderr, "restrict %s: %s\n", kod_where, kod_warn);
msyslog(LOG_WARNING, "restrict %s: %s", kod_where, kod_warn);
@@ -2700,6 +2705,14 @@ config_tinker(
item = LOOP_MAX;
break;
+ case T_Stepback:
+ item = LOOP_MAX_BACK;
+ break;
+
+ case T_Stepfwd:
+ item = LOOP_MAX_FWD;
+ break;
+
case T_Stepout:
item = LOOP_MINSTEP;
break;
@@ -3033,7 +3046,7 @@ config_phone(
config_tree *ptree
)
{
- int i;
+ size_t i;
string_node * sn;
i = 0;
@@ -3045,13 +3058,23 @@ config_phone(
sys_phone[i] = NULL;
} else {
msyslog(LOG_INFO,
- "phone: Number of phone entries exceeds %lu. Ignoring phone %s...",
- (u_long)(COUNTOF(sys_phone) - 1), sn->s);
+ "phone: Number of phone entries exceeds %zu. Ignoring phone %s...",
+ (COUNTOF(sys_phone) - 1), sn->s);
}
}
}
#endif /* !SIM */
+static void
+config_mdnstries(
+ config_tree *ptree
+ )
+{
+#ifdef HAVE_DNSREGISTRATION
+ extern int mdnstries;
+ mdnstries = ptree->mdnstries;
+#endif /* HAVE_DNSREGISTRATION */
+}
#ifdef FREE_CFG_T
static void
@@ -3110,7 +3133,7 @@ config_ttl(
config_tree *ptree
)
{
- int i = 0;
+ size_t i = 0;
int_node *curr_ttl;
curr_ttl = HEAD_PFIFO(ptree->ttl);
@@ -3119,8 +3142,8 @@ config_ttl(
sys_ttl[i++] = (u_char)curr_ttl->i;
else
msyslog(LOG_INFO,
- "ttl: Number of TTL entries exceeds %lu. Ignoring TTL %d...",
- (u_long)COUNTOF(sys_ttl), curr_ttl->i);
+ "ttl: Number of TTL entries exceeds %zu. Ignoring TTL %d...",
+ COUNTOF(sys_ttl), curr_ttl->i);
}
sys_ttlmax = i - 1;
}
@@ -4286,6 +4309,7 @@ config_ntpd(
config_system_opts(ptree);
config_logconfig(ptree);
config_phone(ptree);
+ config_mdnstries(ptree);
config_setvar(ptree);
config_ttl(ptree);
config_trap(ptree);
@@ -4427,7 +4451,7 @@ getconfig(
&& check_netinfo && !(config_netinfo = get_netinfo_config())
#endif /* HAVE_NETINFO */
) {
- msyslog(LOG_INFO, "getconfig: Couldn't open <%s>", FindConfig(config_file));
+ msyslog(LOG_INFO, "getconfig: Couldn't open <%s>: %m", FindConfig(config_file));
#ifndef SYS_WINNT
io_open_sockets();
@@ -4441,7 +4465,7 @@ getconfig(
* Broadcast clients can sometimes run without
* a configuration file.
*/
- msyslog(LOG_INFO, "getconfig: Couldn't open <%s>", FindConfig(alt_config_file));
+ msyslog(LOG_INFO, "getconfig: Couldn't open <%s>: %m", FindConfig(alt_config_file));
io_open_sockets();
return;
@@ -4886,7 +4910,7 @@ ntp_rlimit(
int rl_what,
rlim_t rl_value,
int rl_scale,
- char * rl_sstr
+ const char * rl_sstr
)
{
struct rlimit rl;
diff --git a/ntpd/ntp_control.c b/ntpd/ntp_control.c
index 266978e..aa9f78c 100644
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -58,13 +58,10 @@ static u_short ctlclkstatus (struct refclockstat *);
static void ctl_flushpkt (u_char);
static void ctl_putdata (const char *, unsigned int, int);
static void ctl_putstr (const char *, const char *, size_t);
-static void ctl_putdblf (const char *, const char *, double);
-const char ctl_def_dbl_fmt[] = "%.3f";
-#define ctl_putdbl(tag, d) ctl_putdblf(tag, ctl_def_dbl_fmt, d)
-const char ctl_def_dbl6_fmt[] = "%.6f";
-#define ctl_putdbl6(tag, d) ctl_putdblf(tag, ctl_def_dbl6_fmt, d)
-const char ctl_def_sfp_fmt[] = "%g";
-#define ctl_putsfp(tag, sfp) ctl_putdblf(tag, ctl_def_sfp_fmt, \
+static void ctl_putdblf (const char *, int, int, double);
+#define ctl_putdbl(tag, d) ctl_putdblf(tag, 1, 3, d)
+#define ctl_putdbl6(tag, d) ctl_putdblf(tag, 1, 6, d)
+#define ctl_putsfp(tag, sfp) ctl_putdblf(tag, 0, -1, \
FPTOD(sfp))
static void ctl_putuint (const char *, u_long);
static void ctl_puthex (const char *, u_long);
@@ -223,7 +220,8 @@ static const struct ctl_proc control_codes[] = {
#define CS_TIMER_OVERRUNS 86
#define CS_TIMER_XMTS 87
#define CS_FUZZ 88
-#define CS_MAX_NOAUTOKEY CS_FUZZ
+#define CS_WANDER_THRESH 89
+#define CS_MAX_NOAUTOKEY CS_WANDER_THRESH
#ifdef AUTOKEY
#define CS_FLAGS (1 + CS_MAX_NOAUTOKEY)
#define CS_HOST (2 + CS_MAX_NOAUTOKEY)
@@ -418,6 +416,7 @@ static const struct ctl_var sys_var[] = {
{ CS_TIMER_OVERRUNS, RO, "timer_overruns" }, /* 86 */
{ CS_TIMER_XMTS, RO, "timer_xmts" }, /* 87 */
{ CS_FUZZ, RO, "fuzz" }, /* 88 */
+ { CS_WANDER_THRESH, RO, "clk_wander_threshold" }, /* 89 */
#ifdef AUTOKEY
{ CS_FLAGS, RO, "flags" }, /* 1 + CS_MAX_NOAUTOKEY */
{ CS_HOST, RO, "host" }, /* 2 + CS_MAX_NOAUTOKEY */
@@ -480,7 +479,7 @@ static const struct ctl_var peer_var[] = {
{ 0, PADDING, "" }, /* 0 */
{ CP_CONFIG, RO, "config" }, /* 1 */
{ CP_AUTHENABLE, RO, "authenable" }, /* 2 */
- { CP_AUTHENTIC, RO, "authentic" }, /* 3 */
+ { CP_AUTHENTIC, RO, "authentic" }, /* 3 */
{ CP_SRCADR, RO, "srcadr" }, /* 4 */
{ CP_SRCPORT, RO, "srcport" }, /* 5 */
{ CP_DSTADR, RO, "dstadr" }, /* 6 */
@@ -532,7 +531,7 @@ static const struct ctl_var peer_var[] = {
{ CP_FLAGS, RO, "flags" }, /* 1 + CP_MAX_NOAUTOKEY */
{ CP_HOST, RO, "host" }, /* 2 + CP_MAX_NOAUTOKEY */
{ CP_VALID, RO, "valid" }, /* 3 + CP_MAX_NOAUTOKEY */
- { CP_INITSEQ, RO, "initsequence" }, /* 4 + CP_MAX_NOAUTOKEY */
+ { CP_INITSEQ, RO, "initsequence" }, /* 4 + CP_MAX_NOAUTOKEY */
{ CP_INITKEY, RO, "initkey" }, /* 5 + CP_MAX_NOAUTOKEY */
{ CP_INITTSP, RO, "timestamp" }, /* 6 + CP_MAX_NOAUTOKEY */
{ CP_SIGNATURE, RO, "signature" }, /* 7 + CP_MAX_NOAUTOKEY */
@@ -685,37 +684,37 @@ int num_ctl_traps;
*/
#ifdef REFCLOCK
static const u_char clocktypes[] = {
- CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
+ CTL_SST_TS_NTP, /* REFCLK_NONE (0) */
CTL_SST_TS_LOCAL, /* REFCLK_LOCALCLOCK (1) */
- CTL_SST_TS_UHF, /* deprecated REFCLK_GPS_TRAK (2) */
+ CTL_SST_TS_UHF, /* deprecated REFCLK_GPS_TRAK (2) */
CTL_SST_TS_HF, /* REFCLK_WWV_PST (3) */
CTL_SST_TS_LF, /* REFCLK_WWVB_SPECTRACOM (4) */
- CTL_SST_TS_UHF, /* REFCLK_TRUETIME (5) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_AUDIO (6) */
+ CTL_SST_TS_UHF, /* REFCLK_TRUETIME (5) */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_AUDIO (6) */
CTL_SST_TS_HF, /* REFCLK_CHU (7) */
CTL_SST_TS_LF, /* REFCLOCK_PARSE (default) (8) */
CTL_SST_TS_LF, /* REFCLK_GPS_MX4200 (9) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_AS2201 (10) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_ARBITER (11) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_TPRO (12) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_AS2201 (10) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_ARBITER (11) */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_TPRO (12) */
CTL_SST_TS_ATOM, /* REFCLK_ATOM_LEITCH (13) */
CTL_SST_TS_LF, /* deprecated REFCLK_MSF_EES (14) */
- CTL_SST_TS_NTP, /* not used (15) */
- CTL_SST_TS_UHF, /* REFCLK_IRIG_BANCOMM (16) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_DATU (17) */
+ CTL_SST_TS_NTP, /* not used (15) */
+ CTL_SST_TS_UHF, /* REFCLK_IRIG_BANCOMM (16) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_DATU (17) */
CTL_SST_TS_TELEPHONE, /* REFCLK_NIST_ACTS (18) */
CTL_SST_TS_HF, /* REFCLK_WWV_HEATH (19) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_NMEA (20) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_VME (21) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_NMEA (20) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_VME (21) */
CTL_SST_TS_ATOM, /* REFCLK_ATOM_PPS (22) */
CTL_SST_TS_NTP, /* not used (23) */
CTL_SST_TS_NTP, /* not used (24) */
- CTL_SST_TS_NTP, /* not used (25) */
- CTL_SST_TS_UHF, /* REFCLK_GPS_HP (26) */
+ CTL_SST_TS_NTP, /* not used (25) */
+ CTL_SST_TS_UHF, /* REFCLK_GPS_HP (26) */
CTL_SST_TS_LF, /* REFCLK_ARCRON_MSF (27) */
CTL_SST_TS_UHF, /* REFCLK_SHM (28) */
- CTL_SST_TS_UHF, /* REFCLK_PALISADE (29) */
- CTL_SST_TS_UHF, /* REFCLK_ONCORE (30) */
+ CTL_SST_TS_UHF, /* REFCLK_PALISADE (29) */
+ CTL_SST_TS_UHF, /* REFCLK_ONCORE (30) */
CTL_SST_TS_UHF, /* REFCLK_JUPITER (31) */
CTL_SST_TS_LF, /* REFCLK_CHRONOLOG (32) */
CTL_SST_TS_LF, /* REFCLK_DUMBCLOCK (33) */
@@ -723,7 +722,7 @@ static const u_char clocktypes[] = {
CTL_SST_TS_LF, /* REFCLK_PCF (35) */
CTL_SST_TS_HF, /* REFCLK_WWV (36) */
CTL_SST_TS_LF, /* REFCLK_FG (37) */
- CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
+ CTL_SST_TS_UHF, /* REFCLK_HOPF_SERIAL (38) */
CTL_SST_TS_UHF, /* REFCLK_HOPF_PCI (39) */
CTL_SST_TS_LF, /* REFCLK_JJY (40) */
CTL_SST_TS_UHF, /* REFCLK_TT560 (41) */
@@ -754,17 +753,17 @@ static u_char ctl_sys_num_events;
u_long ctltimereset; /* time stats reset */
u_long numctlreq; /* number of requests we've received */
u_long numctlbadpkts; /* number of bad control packets */
-u_long numctlresponses; /* number of resp packets sent with data */
-u_long numctlfrags; /* number of fragments sent */
+u_long numctlresponses; /* number of resp packets sent with data */
+u_long numctlfrags; /* number of fragments sent */
u_long numctlerrors; /* number of error responses sent */
u_long numctltooshort; /* number of too short input packets */
-u_long numctlinputresp; /* number of responses on input */
-u_long numctlinputfrag; /* number of fragments on input */
+u_long numctlinputresp; /* number of responses on input */
+u_long numctlinputfrag; /* number of fragments on input */
u_long numctlinputerr; /* number of input pkts with err bit set */
-u_long numctlbadoffset; /* number of input pkts with nonzero offset */
+u_long numctlbadoffset; /* number of input pkts with nonzero offset */
u_long numctlbadversion; /* number of input pkts with unknown version */
u_long numctldatatooshort; /* data too short for count */
-u_long numctlbadop; /* bad op code found in packet */
+u_long numctlbadop; /* bad op code found in packet */
u_long numasyncmsgs; /* number of async messages we've sent */
/*
@@ -783,6 +782,7 @@ static int res_offset; /* offset of payload in response */
static u_char * datapt;
static u_char * dataend;
static int datalinelen;
+static int datasent; /* flag to avoid initial ", " */
static int datanotbinflag;
static sockaddr_u *rmt_addr;
static struct interface *lcl_inter;
@@ -801,13 +801,17 @@ static u_char res_async; /* sending async trap response? */
static char *reqpt;
static char *reqend;
+#ifndef MIN
+#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
+#endif
+
/*
* init_control - initialize request data
*/
void
init_control(void)
{
- int i;
+ size_t i;
#ifdef HAVE_UNAME
uname(&utsnamebuf);
@@ -842,9 +846,9 @@ ctl_error(
* Fill in the fields. We assume rpkt.sequence and rpkt.associd
* have already been filled in.
*/
- rpkt.r_m_e_op = CTL_RESPONSE | CTL_ERROR |
+ rpkt.r_m_e_op = (u_char)CTL_RESPONSE | CTL_ERROR |
(res_opcode & CTL_OP_MASK);
- rpkt.status = htons((errcode << 8) & 0xff00);
+ rpkt.status = htons((u_short)(errcode << 8) & 0xff00);
rpkt.count = 0;
/*
@@ -860,7 +864,7 @@ ctl_error(
CTL_HEADER_LEN);
}
-/*
+/*
* save_config - Implements ntpq -c "saveconfig <filename>"
* Writes current configuration including any runtime
* changes by ntpq's :config or config-from-file
@@ -919,11 +923,12 @@ save_config(
* allow timestamping of the saved config filename with
* strftime() format such as:
* ntpq -c "saveconfig ntp-%Y%m%d-%H%M%S.conf"
+ * XXX: Nice feature, but not too safe.
*/
if (0 == strftime(filename, sizeof(filename), filespec,
localtime(&now)))
strlcpy(filename, filespec, sizeof(filename));
-
+
/*
* Conceptually we should be searching for DIRSEP in filename,
* however Windows actually recognizes both forward and
@@ -1003,7 +1008,7 @@ process_control(
const struct ctl_proc *cc;
keyid_t *pkid;
int properlen;
- int maclen;
+ size_t maclen;
DPRINTF(3, ("in process_control()\n"));
@@ -1019,11 +1024,11 @@ process_control(
* If the length is less than required for the header, or
* it is a response or a fragment, ignore this.
*/
- if (rbufp->recv_length < CTL_HEADER_LEN
+ if (rbufp->recv_length < (int)CTL_HEADER_LEN
|| (CTL_RESPONSE | CTL_MORE | CTL_ERROR) & pkt->r_m_e_op
|| pkt->offset != 0) {
DPRINTF(1, ("invalid format in control packet\n"));
- if (rbufp->recv_length < CTL_HEADER_LEN)
+ if (rbufp->recv_length < (int)CTL_HEADER_LEN)
numctltooshort++;
if (CTL_RESPONSE & pkt->r_m_e_op)
numctlinputresp++;
@@ -1063,6 +1068,7 @@ process_control(
req_count = (int)ntohs(pkt->count);
datanotbinflag = FALSE;
datalinelen = 0;
+ datasent = 0;
datapt = rpkt.u.data;
dataend = &rpkt.u.data[CTL_MAX_DATA_LEN];
@@ -1092,7 +1098,7 @@ process_control(
res_authenticate = TRUE;
pkid = (void *)((char *)pkt + properlen);
res_keyid = ntohl(*pkid);
- DPRINTF(3, ("recv_len %d, properlen %d, wants auth with keyid %08x, MAC length=%d\n",
+ DPRINTF(3, ("recv_len %d, properlen %d, wants auth with keyid %08x, MAC length=%zu\n",
rbufp->recv_length, properlen, res_keyid,
maclen));
@@ -1216,7 +1222,7 @@ ctl_flushpkt(
u_char more
)
{
- int i;
+ size_t i;
int dlen;
int sendlen;
int maclen;
@@ -1312,16 +1318,17 @@ static void
ctl_putdata(
const char *dp,
unsigned int dlen,
- int bin /* set to 1 when data is binary */
+ int bin /* set to 1 when data is binary */
)
{
int overhead;
+ unsigned int currentlen;
overhead = 0;
if (!bin) {
datanotbinflag = TRUE;
overhead = 3;
- if (datapt != rpkt.u.data) {
+ if (datasent) {
*datapt++ = ',';
datalinelen++;
if ((dlen + datalinelen + 1) >= MAXDATALINELEN) {
@@ -1338,15 +1345,26 @@ ctl_putdata(
/*
* Save room for trailing junk
*/
- if (dlen + overhead + datapt > dataend) {
+ while (dlen + overhead + datapt > dataend) {
/*
* Not enough room in this one, flush it out.
*/
+ currentlen = MIN(dlen, (unsigned int)(dataend - datapt));
+
+ memcpy(datapt, dp, currentlen);
+
+ datapt += currentlen;
+ dp += currentlen;
+ dlen -= currentlen;
+ datalinelen += currentlen;
+
ctl_flushpkt(CTL_MORE);
}
+
memcpy(datapt, dp, dlen);
datapt += dlen;
datalinelen += dlen;
+ datasent = TRUE;
}
@@ -1424,7 +1442,8 @@ ctl_putunqstr(
static void
ctl_putdblf(
const char * tag,
- const char * fmt,
+ int use_f,
+ int precision,
double d
)
{
@@ -1437,8 +1456,9 @@ ctl_putdblf(
while (*cq != '\0')
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
- snprintf(cp, sizeof(buffer) - (cp - buffer), fmt, d);
+ NTP_INSIST((size_t)(cp - buffer) < sizeof(buffer));
+ snprintf(cp, sizeof(buffer) - (cp - buffer), use_f ? "%.*f" : "%.*g",
+ precision, d);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
}
@@ -1462,13 +1482,40 @@ ctl_putuint(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "%lu", uval);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
}
/*
+ * ctl_putcal - write a decoded calendar data into the response
+ */
+static void
+ctl_putcal(
+ const char *tag,
+ const struct calendar *pcal
+ )
+{
+ char buffer[100];
+ unsigned numch;
+
+ numch = snprintf(buffer, sizeof(buffer),
+ "%s=%04d%02d%02d%02d%02d",
+ tag,
+ pcal->year,
+ pcal->month,
+ pcal->monthday,
+ pcal->hour,
+ pcal->minute
+ );
+ NTP_INSIST(numch < sizeof(buffer));
+ ctl_putdata(buffer, numch, 0);
+
+ return;
+}
+
+/*
* ctl_putfs - write a decoded filestamp into the response
*/
static void
@@ -1493,7 +1540,7 @@ ctl_putfs(
tm = gmtime(&fstamp);
if (NULL == tm)
return;
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer),
"%04d%02d%02d%02d%02d", tm->tm_year + 1900,
tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min);
@@ -1522,7 +1569,7 @@ ctl_puthex(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "0x%lx", uval);
cp += strlen(cp);
ctl_putdata(buffer,(unsigned)( cp - buffer ), 0);
@@ -1548,7 +1595,7 @@ ctl_putint(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "%ld", ival);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)( cp - buffer ), 0);
@@ -1574,7 +1621,7 @@ ctl_putts(
*cp++ = *cq++;
*cp++ = '=';
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((size_t)(cp - buffer) < sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "0x%08x.%08x",
(u_int)ts->l_ui, (u_int)ts->l_uf);
cp += strlen(cp);
@@ -1606,7 +1653,7 @@ ctl_putadr(
cq = numtoa(addr32);
else
cq = stoa(addr);
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer), "%s", cq);
cp += strlen(cp);
ctl_putdata(buffer, (unsigned)(cp - buffer), 0);
@@ -1641,9 +1688,9 @@ ctl_putrefid(
return;
iptr = (char *)&refid;
iplim = iptr + sizeof(refid);
- for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
+ for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
iptr++, optr++)
- if (isprint(*iptr))
+ if (isprint((int)*iptr))
*optr = *iptr;
else
*optr = '.';
@@ -1677,7 +1724,7 @@ ctl_putarray(
if (i == 0)
i = NTP_SHIFT;
i--;
- NTP_INSIST((cp - buffer) < sizeof(buffer));
+ NTP_INSIST((cp - buffer) < (int)sizeof(buffer));
snprintf(cp, sizeof(buffer) - (cp - buffer),
" %.2f", arr[i] * 1e3);
cp += strlen(cp);
@@ -1700,9 +1747,6 @@ ctl_putsys(
double kb;
double dtemp;
const char *ss;
- size_t len;
- int firstvarname;
- const struct ctl_var *k;
#ifdef AUTOKEY
struct cert_info *cp;
#endif /* AUTOKEY */
@@ -1712,7 +1756,7 @@ ctl_putsys(
static const double to_ms =
# ifdef STA_NANO
- 1.0e-6; /* nsec to msec */
+ 1.0e-6; /* nsec to msec */
# else
1.0e-3; /* usec to msec */
# endif
@@ -1848,11 +1892,11 @@ ctl_putsys(
{
char buf[CTL_MAX_DATA_LEN];
//buffPointer, firstElementPointer, buffEndPointer
- register char *buffp, *buffend;
- register int firstVarName;
- register const char *ss;
- register int len;
- register struct ctl_var *k;
+ char *buffp, *buffend;
+ int firstVarName;
+ const char *ss1;
+ int len;
+ const struct ctl_var *k;
buffp = buf;
buffend = buf + sizeof(buf);
@@ -1881,11 +1925,11 @@ ctl_putsys(
continue;
if (NULL == k->text)
continue;
- ss = strchr(k->text, '=');
- if (NULL == ss)
+ ss1 = strchr(k->text, '=');
+ if (NULL == ss1)
len = strlen(k->text);
else
- len = ss - k->text;
+ len = ss1 - k->text;
if (buffp + len + 1 >= buffend)
break;
if (firstVarName) {
@@ -1904,12 +1948,12 @@ ctl_putsys(
ctl_putdata(buf, (unsigned)( buffp - buf ), 0);
break;
}
-
+
case CS_TAI:
if (sys_tai > 0)
ctl_putuint(sys_var[CS_TAI].text, sys_tai);
break;
-
+
case CS_LEAPTAB:
{
leap_signature_t lsig;
@@ -1918,7 +1962,7 @@ ctl_putsys(
ctl_putfs(sys_var[CS_LEAPTAB].text, lsig.ttime);
break;
}
-
+
case CS_LEAPEND:
{
leap_signature_t lsig;
@@ -2063,7 +2107,7 @@ ctl_putsys(
break;
case CS_AUTHRESET:
- ctl_putuint(sys_var[varid].text,
+ ctl_putuint(sys_var[varid].text,
current_time - auth_timereset);
break;
@@ -2097,8 +2141,8 @@ ctl_putsys(
case CS_K_OFFSET:
CTL_IF_KERNLOOP(
- ctl_putdblf,
- (sys_var[varid].text, "%g", to_ms * ntx.offset)
+ ctl_putdblf,
+ (sys_var[varid].text, 0, -1, to_ms * ntx.offset)
);
break;
@@ -2112,7 +2156,7 @@ ctl_putsys(
case CS_K_MAXERR:
CTL_IF_KERNLOOP(
ctl_putdblf,
- (sys_var[varid].text, "%.6g",
+ (sys_var[varid].text, 0, 6,
to_ms * ntx.maxerror)
);
break;
@@ -2120,7 +2164,7 @@ ctl_putsys(
case CS_K_ESTERR:
CTL_IF_KERNLOOP(
ctl_putdblf,
- (sys_var[varid].text, "%.6g",
+ (sys_var[varid].text, 0, 6,
to_ms * ntx.esterror)
);
break;
@@ -2144,7 +2188,7 @@ ctl_putsys(
case CS_K_PRECISION:
CTL_IF_KERNLOOP(
ctl_putdblf,
- (sys_var[varid].text, "%.6g",
+ (sys_var[varid].text, 0, 6,
to_ms * ntx.precision)
);
break;
@@ -2277,6 +2321,9 @@ ctl_putsys(
case CS_FUZZ:
ctl_putdbl(sys_var[varid].text, sys_fuzz * 1e3);
break;
+ case CS_WANDER_THRESH:
+ ctl_putdbl(sys_var[varid].text, wander_threshold * 1e6);
+ break;
#ifdef AUTOKEY
case CS_FLAGS:
if (crypto_flags)
@@ -2319,14 +2366,11 @@ ctl_putsys(
case CS_CERTIF:
for (cp = cinfo; cp != NULL; cp = cp->link) {
- tstamp_t tstamp;
-
snprintf(str, sizeof(str), "%s %s 0x%x",
cp->subject, cp->issuer, cp->flags);
ctl_putstr(sys_var[CS_CERTIF].text, str,
strlen(str));
- tstamp = caltontp(&(cp->last)); /* XXX too small to hold some values, but that's what ctl_putfs requires */
- ctl_putfs(sys_var[CS_REVTIME].text, tstamp);
+ ctl_putcal(sys_var[CS_REVTIME].text, &(cp->last));
}
break;
@@ -2586,7 +2630,7 @@ ctl_putpeer(
memcpy(s, k->text, i);
s += i;
}
- if (s + 2 < be) {
+ if (s + 2 < be) {
*s++ = '"';
*s = '\0';
ctl_putdata(buf, (u_int)(s - buf), 0);
@@ -2665,7 +2709,7 @@ ctl_putpeer(
strlen(p->ident));
break;
-
+
#endif /* AUTOKEY */
}
}
@@ -2774,7 +2818,7 @@ ctl_putclock(
sizeof(buf))
break; /* really long var name */
- snprintf(s, sizeof(buf), "%s=\"",
+ snprintf(s, sizeof(buf), "%s=\"",
clock_var[CC_VARLIST].text);
s += strlen(s);
t = s;
@@ -2887,7 +2931,7 @@ ctl_getitem(
cp++;
while (cp < reqend && *cp != ',') {
*tp++ = *cp++;
- if (tp - buf >= sizeof(buf)) {
+ if ((size_t)(tp - buf) >= sizeof(buf)) {
ctl_error(CERR_BADFMT);
numctlbadpkts++;
NLOG(NLOG_SYSEVENT)
@@ -2959,7 +3003,7 @@ read_status(
{
struct peer *peer;
const u_char *cp;
- int n;
+ size_t n;
/* a_st holds association ID, status pairs alternating */
u_short a_st[CTL_MAX_DATA_LEN / sizeof(u_short)];
@@ -3017,7 +3061,7 @@ read_peervars(void)
const struct ctl_var *v;
struct peer *peer;
const u_char *cp;
- int i;
+ size_t i;
char * valuep;
u_char wants[CP_MAXCODE + 1];
u_int gotvar;
@@ -3262,7 +3306,7 @@ static void configure(
snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"runtime configuration prohibited by restrict ... nomodify");
- ctl_putdata(remote_config.err_msg,
+ ctl_putdata(remote_config.err_msg,
strlen(remote_config.err_msg), 0);
ctl_flushpkt(0);
NLOG(NLOG_SYSINFO)
@@ -3275,6 +3319,20 @@ static void configure(
/* Initialize the remote config buffer */
data_count = reqend - reqpt;
+
+ if (data_count > sizeof(remote_config.buffer) - 2) {
+ snprintf(remote_config.err_msg,
+ sizeof(remote_config.err_msg),
+ "runtime configuration failed: request too long");
+ ctl_putdata(remote_config.err_msg,
+ strlen(remote_config.err_msg), 0);
+ ctl_flushpkt(0);
+ msyslog(LOG_NOTICE,
+ "runtime config from %s rejected: request too long",
+ stoa(&rbufp->recv_srcadr));
+ return;
+ }
+
memcpy(remote_config.buffer, reqpt, data_count);
if (data_count > 0
&& '\n' != remote_config.buffer[data_count - 1])
@@ -3304,7 +3362,7 @@ static void configure(
config_remotely(&rbufp->recv_srcadr);
- /*
+ /*
* Check if errors were reported. If not, output 'Config
* Succeeded'. Else output the error count. It would be nice
* to output any parser error messages.
@@ -3313,10 +3371,10 @@ static void configure(
retval = snprintf(remote_config.err_msg,
sizeof(remote_config.err_msg),
"Config Succeeded");
- if (retval > 0)
+ if (retval > 0)
remote_config.err_pos += retval;
}
-
+
ctl_putdata(remote_config.err_msg, remote_config.err_pos, 0);
ctl_flushpkt(0);
@@ -3679,7 +3737,7 @@ static void read_mru_list(
const char * pch;
char * pnonce;
int nonce_valid;
- int i;
+ size_t i;
int priors;
u_short hash;
mon_entry * mon;
@@ -3708,9 +3766,9 @@ static void read_mru_list(
set_var(&in_parms, maxlstint_text, sizeof(maxlstint_text), 0);
set_var(&in_parms, laddr_text, sizeof(laddr_text), 0);
for (i = 0; i < COUNTOF(last); i++) {
- snprintf(buf, sizeof(buf), last_fmt, i);
+ snprintf(buf, sizeof(buf), last_fmt, (int)i);
set_var(&in_parms, buf, strlen(buf) + 1, 0);
- snprintf(buf, sizeof(buf), addr_fmt, i);
+ snprintf(buf, sizeof(buf), addr_fmt, (int)i);
set_var(&in_parms, buf, strlen(buf) + 1, 0);
}
@@ -3729,6 +3787,7 @@ static void read_mru_list(
while (NULL != (v = ctl_getitem(in_parms, &val)) &&
!(EOV & v->flags)) {
+ int si;
if (!strcmp(nonce_text, v->text)) {
if (NULL != pnonce)
@@ -3751,20 +3810,20 @@ static void read_mru_list(
} else if (!strcmp(laddr_text, v->text)) {
if (decodenetnum(val, &laddr))
lcladr = getinterface(&laddr, 0);
- } else if (1 == sscanf(v->text, last_fmt, &i) &&
- i < COUNTOF(last)) {
+ } else if (1 == sscanf(v->text, last_fmt, &si) &&
+ (size_t)si < COUNTOF(last)) {
if (2 == sscanf(val, "0x%08x.%08x", &ui, &uf)) {
- last[i].l_ui = ui;
- last[i].l_uf = uf;
- if (!SOCK_UNSPEC(&addr[i]) &&
- i == priors)
+ last[si].l_ui = ui;
+ last[si].l_uf = uf;
+ if (!SOCK_UNSPEC(&addr[si]) &&
+ si == priors)
priors++;
}
- } else if (1 == sscanf(v->text, addr_fmt, &i) &&
- i < COUNTOF(addr)) {
- if (decodenetnum(val, &addr[i])
- && last[i].l_ui && last[i].l_uf &&
- i == priors)
+ } else if (1 == sscanf(v->text, addr_fmt, &si) &&
+ (size_t)si < COUNTOF(addr)) {
+ if (decodenetnum(val, &addr[si])
+ && last[si].l_ui && last[si].l_uf &&
+ si == priors)
priors++;
}
}
@@ -3798,7 +3857,7 @@ static void read_mru_list(
* Find the starting point if one was provided.
*/
mon = NULL;
- for (i = 0; i < priors; i++) {
+ for (i = 0; i < (size_t)priors; i++) {
hash = MON_HASH(&addr[i]);
for (mon = mon_hash[hash];
mon != NULL;
@@ -3825,7 +3884,7 @@ static void read_mru_list(
pch = sptoa(&mon->rmtadr);
ctl_putunqstr("addr.older", pch, strlen(pch));
- /*
+ /*
* Move on to the first entry the client doesn't have,
* except in the special case of a limit of one. In
* that case return the starting point entry.
@@ -3835,7 +3894,7 @@ static void read_mru_list(
} else { /* start with the oldest */
mon = TAIL_DLIST(mon_mru_list, mru);
}
-
+
/*
* send up to limit= entries in up to frags= datagrams
*/
@@ -4594,7 +4653,7 @@ ctlfindtrap(
for (n = 0; n < COUNTOF(ctl_traps); n++)
if ((ctl_traps[n].tr_flags & TRAP_INUSE)
&& ADDR_PORT_EQ(raddr, &ctl_traps[n].tr_addr)
- && (linter == ctl_traps[n].tr_localaddr))
+ && (linter == ctl_traps[n].tr_localaddr))
return &ctl_traps[n];
return NULL;
@@ -4651,7 +4710,7 @@ report_event(
const char * src;
u_char errlast;
- errlast = (u_char)err & ~PEER_EVENT;
+ errlast = (u_char)err & ~PEER_EVENT;
if (peer->last_event == errlast)
peer->num_events = 0;
if (peer->num_events >= CTL_PEER_MAXEVENTS)
@@ -4873,7 +4932,7 @@ set_var(
t++;
}
if (*s == *t && ((*t == '=') || !*t)) {
- td = erealloc(k->text, size);
+ td = erealloc((void *)(intptr_t)k->text, size);
memcpy(td, data, size);
k->text = td;
k->flags = def;
@@ -4923,7 +4982,7 @@ get_ext_sys_var(const char *tag)
}
}
}
-
+
return val;
}
@@ -4936,7 +4995,7 @@ free_varlist(
struct ctl_var *k;
if (kv) {
for (k = kv; !(k->flags & EOV); k++)
- free((void *)k->text);
+ free((void *)(intptr_t)k->text);
free((void *)kv);
}
}
diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c
index e66d5c7..5795ae8 100644
--- a/ntpd/ntp_crypto.c
+++ b/ntpd/ntp_crypto.c
@@ -139,6 +139,7 @@ static int calcomp(struct calendar *pjd1, struct calendar *pjd2)
#define TAI_1972 10 /* initial TAI offset (s) */
#define MAX_LEAP 100 /* max UTC leapseconds (s) */
#define VALUE_LEN (6 * 4) /* min response field length */
+#define MAX_VALLEN (65535 - VALUE_LEN)
#define YEAR (60 * 60 * 24 * 365) /* seconds in year */
/*
@@ -179,8 +180,8 @@ static char *rand_file = NULL; /* random seed file */
*/
static int crypto_verify (struct exten *, struct value *,
struct peer *);
-static int crypto_encrypt (struct exten *, struct value *,
- keyid_t *);
+static int crypto_encrypt (const u_char *, u_int, keyid_t *,
+ struct value *);
static int crypto_alice (struct peer *, struct value *);
static int crypto_alice2 (struct peer *, struct value *);
static int crypto_alice3 (struct peer *, struct value *);
@@ -423,7 +424,6 @@ crypto_recv(
int has_mac; /* length of MAC field */
int authlen; /* offset of MAC field */
associd_t associd; /* association ID */
- tstamp_t tstamp = 0; /* timestamp */
tstamp_t fstamp = 0; /* filestamp */
u_int len; /* extension field length */
u_int code; /* extension field opcode */
@@ -448,11 +448,12 @@ crypto_recv(
*/
authlen = LEN_PKT_NOMAC;
hismode = (int)PKT_MODE((&rbufp->recv_pkt)->li_vn_mode);
- while ((has_mac = rbufp->recv_length - authlen) > MAX_MAC_LEN) {
+ while ((has_mac = rbufp->recv_length - authlen) > (int)MAX_MAC_LEN) {
pkt = (u_int32 *)&rbufp->recv_pkt + authlen / 4;
ep = (struct exten *)pkt;
code = ntohl(ep->opcode) & 0xffff0000;
len = ntohl(ep->opcode) & 0x0000ffff;
+ // HMS: Why pkt[1] instead of ep->associd ?
associd = (associd_t)ntohl(pkt[1]);
rval = XEVNT_OK;
#ifdef DEBUG
@@ -473,9 +474,14 @@ crypto_recv(
}
if (len >= VALUE_LEN) {
- tstamp = ntohl(ep->tstamp);
fstamp = ntohl(ep->fstamp);
vallen = ntohl(ep->vallen);
+ /*
+ * Bug 2761: I hope this isn't too early...
+ */
+ if ( vallen == 0
+ || len - VALUE_LEN < vallen)
+ return XEVNT_LEN;
}
switch (code) {
@@ -526,8 +532,9 @@ crypto_recv(
rval = XEVNT_ERR;
break;
}
+ INSIST(len >= VALUE_LEN);
if (vallen == 0 || vallen > MAXHOSTNAME ||
- len < VALUE_LEN + vallen) {
+ len - VALUE_LEN < vallen) {
rval = XEVNT_LEN;
break;
}
@@ -820,15 +827,24 @@ crypto_recv(
* errors.
*/
if (vallen == (u_int)EVP_PKEY_size(host_pkey)) {
+ u_int32 *cookiebuf = malloc(
+ RSA_size(host_pkey->pkey.rsa));
+ if (!cookiebuf) {
+ rval = XEVNT_CKY;
+ break;
+ }
+
if (RSA_private_decrypt(vallen,
(u_char *)ep->pkt,
- (u_char *)&temp32,
+ (u_char *)cookiebuf,
host_pkey->pkey.rsa,
- RSA_PKCS1_OAEP_PADDING) <= 0) {
+ RSA_PKCS1_OAEP_PADDING) != 4) {
rval = XEVNT_CKY;
+ free(cookiebuf);
break;
} else {
- cookie = ntohl(temp32);
+ cookie = ntohl(*cookiebuf);
+ free(cookiebuf);
}
} else {
rval = XEVNT_CKY;
@@ -1185,8 +1201,9 @@ crypto_xmit(
* choice.
*/
case CRYPTO_CERT | CRYPTO_RESP:
- vallen = ntohl(ep->vallen);
- if (vallen == 0 || vallen > MAXHOSTNAME) {
+ vallen = ntohl(ep->vallen); /* Must be <64k */
+ if (vallen == 0 || vallen > MAXHOSTNAME ||
+ len - VALUE_LEN < vallen) {
rval = XEVNT_LEN;
break;
}
@@ -1336,7 +1353,10 @@ crypto_xmit(
* anything goes wrong.
*/
case CRYPTO_COOK | CRYPTO_RESP:
- if ((opcode & 0xffff) < VALUE_LEN) {
+ vallen = ntohl(ep->vallen); /* Must be <64k */
+ if ( vallen == 0
+ || (vallen >= MAX_VALLEN)
+ || (opcode & 0x0000ffff) < VALUE_LEN + vallen) {
rval = XEVNT_LEN;
break;
}
@@ -1344,8 +1364,8 @@ crypto_xmit(
tcookie = cookie;
else
tcookie = peer->hcookie;
- if ((rval = crypto_encrypt(ep, &vtemp, &tcookie)) ==
- XEVNT_OK) {
+ if ((rval = crypto_encrypt((const u_char *)ep->pkt, vallen, &tcookie, &vtemp))
+ == XEVNT_OK) {
len = crypto_send(fp, &vtemp, start);
value_free(&vtemp);
}
@@ -1485,13 +1505,16 @@ crypto_verify(
* up to the next word (4 octets).
*/
vallen = ntohl(ep->vallen);
- if (vallen == 0)
+ if ( vallen == 0
+ || vallen > MAX_VALLEN)
return (XEVNT_LEN);
i = (vallen + 3) / 4;
siglen = ntohl(ep->pkt[i++]);
- if (len < VALUE_LEN + ((vallen + 3) / 4) * 4 + ((siglen + 3) /
- 4) * 4)
+ if ( siglen > MAX_VALLEN
+ || len - VALUE_LEN < ((vallen + 3) / 4) * 4
+ || len - VALUE_LEN - ((vallen + 3) / 4) * 4
+ < ((siglen + 3) / 4) * 4)
return (XEVNT_LEN);
/*
@@ -1549,6 +1572,7 @@ crypto_verify(
* proventic bit. What a relief.
*/
EVP_VerifyInit(&ctx, peer->digest);
+ /* XXX: the "+ 12" needs to be at least documented... */
EVP_VerifyUpdate(&ctx, (u_char *)&ep->tstamp, vallen + 12);
if (EVP_VerifyFinal(&ctx, (u_char *)&ep->pkt[i], siglen,
pkey) <= 0)
@@ -1561,35 +1585,32 @@ crypto_verify(
/*
- * crypto_encrypt - construct encrypted cookie and signature from
- * extension field and cookie
+ * crypto_encrypt - construct vp (encrypted cookie and signature) from
+ * the public key and cookie.
*
- * Returns
+ * Returns:
* XEVNT_OK success
* XEVNT_CKY bad or missing cookie
* XEVNT_PUB bad or missing public key
*/
static int
crypto_encrypt(
- struct exten *ep, /* extension pointer */
- struct value *vp, /* value pointer */
- keyid_t *cookie /* server cookie */
+ const u_char *ptr, /* Public Key */
+ u_int vallen, /* Length of Public Key */
+ keyid_t *cookie, /* server cookie */
+ struct value *vp /* value pointer */
)
{
EVP_PKEY *pkey; /* public key */
EVP_MD_CTX ctx; /* signature context */
tstamp_t tstamp; /* NTP timestamp */
u_int32 temp32;
- u_int len;
- const u_char *ptr;
u_char *puch;
/*
* Extract the public key from the request.
*/
- len = ntohl(ep->vallen);
- ptr = (void *)ep->pkt;
- pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, len);
+ pkey = d2i_PublicKey(EVP_PKEY_RSA, NULL, &ptr, vallen);
if (pkey == NULL) {
msyslog(LOG_ERR, "crypto_encrypt: %s",
ERR_error_string(ERR_get_error(), NULL));
@@ -1603,9 +1624,9 @@ crypto_encrypt(
tstamp = crypto_time();
vp->tstamp = htonl(tstamp);
vp->fstamp = hostval.tstamp;
- len = EVP_PKEY_size(pkey);
- vp->vallen = htonl(len);
- vp->ptr = emalloc(len);
+ vallen = EVP_PKEY_size(pkey);
+ vp->vallen = htonl(vallen);
+ vp->ptr = emalloc(vallen);
puch = vp->ptr;
temp32 = htonl(*cookie);
if (RSA_public_encrypt(4, (u_char *)&temp32, puch,
@@ -1623,8 +1644,8 @@ crypto_encrypt(
vp->sig = emalloc(sign_siglen);
EVP_SignInit(&ctx, sign_digest);
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
- EVP_SignUpdate(&ctx, vp->ptr, len);
- if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ EVP_SignUpdate(&ctx, vp->ptr, vallen);
+ if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey))
vp->siglen = htonl(sign_siglen);
return (XEVNT_OK);
}
@@ -1695,6 +1716,9 @@ crypto_ident(
* call in the protocol module.
*
* Returns extension field pointer (no errors)
+ *
+ * XXX: opcode and len should really be 32-bit quantities and
+ * we should make sure that str is not too big.
*/
struct exten *
crypto_args(
@@ -1707,23 +1731,30 @@ crypto_args(
tstamp_t tstamp; /* NTP timestamp */
struct exten *ep; /* extension field pointer */
u_int len; /* extension field length */
+ size_t slen = 0;
tstamp = crypto_time();
len = sizeof(struct exten);
- if (str != NULL)
- len += strlen(str);
+ if (str != NULL) {
+ slen = strlen(str);
+ INSIST(slen < MAX_VALLEN);
+ len += slen;
+ }
ep = emalloc_zero(len);
if (opcode == 0)
return (ep);
+ REQUIRE(0 == (len & ~0x0000ffff));
+ REQUIRE(0 == (opcode & ~0xffff0000));
+
ep->opcode = htonl(opcode + len);
ep->associd = htonl(associd);
ep->tstamp = htonl(tstamp);
ep->fstamp = hostval.tstamp;
ep->vallen = 0;
if (str != NULL) {
- ep->vallen = htonl(strlen(str));
- memcpy((char *)ep->pkt, str, strlen(str));
+ ep->vallen = htonl(slen);
+ memcpy((char *)ep->pkt, str, slen);
}
return (ep);
}
@@ -1736,6 +1767,8 @@ crypto_args(
* Note: it is not polite to send a nonempty signature with zero
* timestamp or a nonzero timestamp with an empty signature, but those
* rules are not enforced here.
+ *
+ * XXX This code won't work on a box with 16-bit ints.
*/
int
crypto_send(
@@ -1745,14 +1778,15 @@ crypto_send(
)
{
u_int len, vallen, siglen, opcode;
- int i, j;
+ u_int i, j;
/*
* Calculate extension field length and check for buffer
* overflow. Leave room for the MAC.
*/
- len = 16;
+ len = 16; /* XXX Document! */
vallen = ntohl(vp->vallen);
+ INSIST(vallen <= MAX_VALLEN);
len += ((vallen + 3) / 4 + 1) * 4;
siglen = ntohl(vp->siglen);
len += ((siglen + 3) / 4 + 1) * 4;
@@ -1773,7 +1807,7 @@ crypto_send(
i = 0;
if (vallen > 0 && vp->ptr != NULL) {
j = vallen / 4;
- if (j * 4 < (int)vallen)
+ if (j * 4 < vallen)
ep->pkt[i + j++] = 0;
memcpy(&ep->pkt[i], vp->ptr, vallen);
i += j;
@@ -1786,13 +1820,14 @@ crypto_send(
ep->pkt[i++] = vp->siglen;
if (siglen > 0 && vp->sig != NULL) {
j = siglen / 4;
- if (j * 4 < (int)siglen)
+ if (j * 4 < siglen)
ep->pkt[i + j++] = 0;
memcpy(&ep->pkt[i], vp->sig, siglen);
i += j;
}
opcode = ntohl(ep->opcode);
ep->opcode = htonl((opcode & 0xffff0000) | len);
+ ENSURE(len <= MAX_VALLEN);
return (len);
}
@@ -1829,7 +1864,6 @@ crypto_update(void)
if (hostval.tstamp == 0)
return;
-
/*
* Sign public key and timestamps. The filestamp is derived from
* the host key file extension from wherever the file was
@@ -1946,7 +1980,7 @@ asn_to_calendar (
struct calendar *pjd /* pointer to result */
)
{
- int len; /* length of ASN1_TIME string */
+ size_t len; /* length of ASN1_TIME string */
char v[24]; /* writable copy of ASN1_TIME string */
unsigned long temp; /* result from strtoul */
@@ -2157,7 +2191,8 @@ crypto_bob(
tstamp_t tstamp; /* NTP timestamp */
BIGNUM *bn, *bk, *r;
u_char *ptr;
- u_int len;
+ u_int len; /* extension field length */
+ u_int vallen = 0; /* value length */
/*
* If the IFF parameters are not valid, something awful
@@ -2172,8 +2207,11 @@ crypto_bob(
/*
* Extract r from the challenge.
*/
- len = ntohl(ep->vallen);
- if ((r = BN_bin2bn((u_char *)ep->pkt, len, NULL)) == NULL) {
+ vallen = ntohl(ep->vallen);
+ len = ntohl(ep->opcode) & 0x0000ffff;
+ if (vallen == 0 || len < VALUE_LEN || len - VALUE_LEN < vallen)
+ return XEVNT_LEN;
+ if ((r = BN_bin2bn((u_char *)ep->pkt, vallen, NULL)) == NULL) {
msyslog(LOG_ERR, "crypto_bob: %s",
ERR_error_string(ERR_get_error(), NULL));
return (XEVNT_ERR);
@@ -2185,7 +2223,7 @@ crypto_bob(
*/
bctx = BN_CTX_new(); bk = BN_new(); bn = BN_new();
sdsa = DSA_SIG_new();
- BN_rand(bk, len * 8, -1, 1); /* k */
+ BN_rand(bk, vallen * 8, -1, 1); /* k */
BN_mod_mul(bn, dsa->priv_key, r, dsa->q, bctx); /* b r mod q */
BN_add(bn, bn, bk);
BN_mod(bn, bn, dsa->q, bctx); /* k + b r mod q */
@@ -2204,30 +2242,37 @@ crypto_bob(
* Encode the values in ASN.1 and sign. The filestamp is from
* the local file.
*/
- len = i2d_DSA_SIG(sdsa, NULL);
- if (len == 0) {
+ vallen = i2d_DSA_SIG(sdsa, NULL);
+ if (vallen == 0) {
msyslog(LOG_ERR, "crypto_bob: %s",
ERR_error_string(ERR_get_error(), NULL));
DSA_SIG_free(sdsa);
return (XEVNT_ERR);
}
+ if (vallen > MAX_VALLEN) {
+ msyslog(LOG_ERR, "crypto_bob: signature is too big: %d",
+ vallen);
+ DSA_SIG_free(sdsa);
+ return (XEVNT_LEN);
+ }
memset(vp, 0, sizeof(struct value));
tstamp = crypto_time();
vp->tstamp = htonl(tstamp);
vp->fstamp = htonl(iffkey_info->fstamp);
- vp->vallen = htonl(len);
- ptr = emalloc(len);
+ vp->vallen = htonl(vallen);
+ ptr = emalloc(vallen);
vp->ptr = ptr;
i2d_DSA_SIG(sdsa, &ptr);
DSA_SIG_free(sdsa);
if (tstamp == 0)
return (XEVNT_OK);
+ /* XXX: more validation to make sure the sign fits... */
vp->sig = emalloc(sign_siglen);
EVP_SignInit(&ctx, sign_digest);
EVP_SignUpdate(&ctx, (u_char *)&vp->tstamp, 12);
- EVP_SignUpdate(&ctx, vp->ptr, len);
- if (EVP_SignFinal(&ctx, vp->sig, &len, sign_pkey))
+ EVP_SignUpdate(&ctx, vp->ptr, vallen);
+ if (EVP_SignFinal(&ctx, vp->sig, &vallen, sign_pkey))
vp->siglen = htonl(sign_siglen);
return (XEVNT_OK);
}
@@ -3048,7 +3093,7 @@ cert_sign(
X509_gmtime_adj(X509_get_notAfter(cert), YEAR);
subj = X509_get_issuer_name(cert);
X509_NAME_add_entry_by_txt(subj, "commonName", MBSTRING_ASC,
- hostval.ptr, strlen(hostval.ptr), -1, 0);
+ hostval.ptr, strlen((const char *)hostval.ptr), -1, 0);
subj = X509_get_subject_name(req);
X509_set_subject_name(cert, subj);
X509_set_pubkey(cert, pkey);
@@ -3089,7 +3134,7 @@ cert_sign(
vp->vallen = htonl(len);
vp->ptr = emalloc(len);
ptr = vp->ptr;
- i2d_X509(cert, &ptr);
+ i2d_X509(cert, (unsigned char **)(intptr_t)&ptr);
vp->siglen = 0;
if (tstamp != 0) {
vp->sig = emalloc(sign_siglen);
@@ -3421,7 +3466,7 @@ cert_parse(
/*
* Check for a certificate loop.
*/
- if (strcmp(hostval.ptr, ret->issuer) == 0) {
+ if (strcmp((const char *)hostval.ptr, ret->issuer) == 0) {
msyslog(LOG_NOTICE,
"cert_parse: certificate trail loop %s",
ret->subject);
diff --git a/ntpd/ntp_filegen.c b/ntpd/ntp_filegen.c
index a1703a9..4ee9095 100644
--- a/ntpd/ntp_filegen.c
+++ b/ntpd/ntp_filegen.c
@@ -617,7 +617,7 @@ filegen_statsdir(void)
#ifdef DEBUG
void
filegen_unregister(
- char *name
+ const char *name
)
{
struct filegen_entry ** ppfe;
diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c
index 0f335ea..1ee7098 100644
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -217,7 +217,7 @@ static isc_boolean_t socket_multicast_disable(endpt *, sockaddr_u *);
#ifdef DEBUG
static void interface_dump (const endpt *);
static void sockaddr_dump (const sockaddr_u *);
-static void print_interface (const endpt *, char *, char *);
+static void print_interface (const endpt *, const char *, const char *);
#define DPRINT_INTERFACE(level, args) do { if (debug >= (level)) { print_interface args; } } while (0)
#else
#define DPRINT_INTERFACE(level, args) do {} while (0)
@@ -269,7 +269,9 @@ static SOCKET open_socket (sockaddr_u *, int, int, endpt *);
static char * fdbits (int, fd_set *);
static void set_reuseaddr (int);
static isc_boolean_t socket_broadcast_enable (struct interface *, SOCKET, sockaddr_u *);
+#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
static isc_boolean_t socket_broadcast_disable (struct interface *, sockaddr_u *);
+#endif
typedef struct remaddr remaddr_t;
@@ -548,7 +550,7 @@ sockaddr_dump(const sockaddr_u *psau)
* print_interface - helper to output debug information
*/
static void
-print_interface(const endpt *iface, char *pfx, char *sfx)
+print_interface(const endpt *iface, const char *pfx, const char *sfx)
{
printf("%sinterface #%d: fd=%d, bfd=%d, name=%s, flags=0x%x, ifindex=%u, sin=%s",
pfx,
@@ -714,7 +716,6 @@ is_ip_address(
)
{
struct in_addr in4;
- struct in6_addr in6;
struct addrinfo hints;
struct addrinfo *result;
struct sockaddr_in6 *resaddr6;
@@ -1646,16 +1647,15 @@ set_wildcard_reuse(
static isc_boolean_t
-is_anycast(
+check_flags6(
sockaddr_u *psau,
- const char *name
+ const char *name,
+ u_int32 flags6
)
{
-#if defined(INCLUDE_IPV6_SUPPORT) && defined(SIOCGIFAFLAG_IN6) && \
- defined(IN6_IFF_ANYCAST)
+#if defined(INCLUDE_IPV6_SUPPORT) && defined(SIOCGIFAFLAG_IN6)
struct in6_ifreq ifr6;
int fd;
- u_int32 flags6;
if (psau->sa.sa_family != AF_INET6)
return ISC_FALSE;
@@ -1669,13 +1669,45 @@ is_anycast(
return ISC_FALSE;
}
close(fd);
- flags6 = ifr6.ifr_ifru.ifru_flags6;
- if ((flags6 & IN6_IFF_ANYCAST) != 0)
+ if ((ifr6.ifr_ifru.ifru_flags6 & flags6) != 0)
return ISC_TRUE;
-#endif /* INCLUDE_IPV6_SUPPORT && SIOCGIFAFLAG_IN6 && IN6_IFF_ANYCAST */
+#endif /* INCLUDE_IPV6_SUPPORT && SIOCGIFAFLAG_IN6 */
+ return ISC_FALSE;
+}
+
+static isc_boolean_t
+is_anycast(
+ sockaddr_u *psau,
+ const char *name
+ )
+{
+#ifdef IN6_IFF_ANYCAST
+ return check_flags6(psau, name, IN6_IFF_ANYCAST);
+#else
return ISC_FALSE;
+#endif
}
+static isc_boolean_t
+is_valid(
+ sockaddr_u *psau,
+ const char *name
+ )
+{
+ u_int32 flags6;
+
+ flags6 = 0;
+#ifdef IN6_IFF_DEPARTED
+ flags6 |= IN6_IFF_DEPARTED;
+#endif
+#ifdef IN6_IFF_DETACHED
+ flags6 |= IN6_IFF_DETACHED;
+#endif
+#ifdef IN6_IFF_TENTATIVE
+ flags6 |= IN6_IFF_TENTATIVE;
+#endif
+ return check_flags6(psau, name, flags6) ? ISC_FALSE : ISC_TRUE;
+}
/*
* update_interface strategy
@@ -1809,6 +1841,12 @@ update_interfaces(
continue;
/*
+ * skip any address that is an invalid state to be used
+ */
+ if (!is_valid(&enumep.sin, isc_if.name))
+ continue;
+
+ /*
* map to local *address* in order to map all duplicate
* interfaces to an endpt structure with the appropriate
* socket. Our name space is (ip-address), NOT
@@ -1968,6 +2006,9 @@ update_interfaces(
if (broadcast_client_enabled)
io_setbclient();
+ if (sys_bclient)
+ io_setbclient();
+
return new_interface_found;
}
@@ -2232,6 +2273,7 @@ socket_broadcast_enable(
#endif /* SO_BROADCAST */
}
+#ifdef OS_MISSES_SPECIFIC_ROUTE_UPDATES
/*
* Remove a broadcast address from a given socket
* The socket is in the ep_list all we need to do is disable
@@ -2258,6 +2300,7 @@ socket_broadcast_disable(
return ISC_FALSE;
#endif /* SO_BROADCAST */
}
+#endif /* OS_MISSES_SPECIFIC_ROUTE_UPDATES */
#endif /* OPEN_BCAST_SOCKET */
@@ -2311,7 +2354,7 @@ enable_multicast_if(
#ifdef IP_MULTICAST_LOOP
TYPEOF_IP_MULTICAST_LOOP off = 0;
#endif
-#ifdef IPV6_MULTICAST_LOOP
+#if defined(INCLUDE_IPV6_MULTICAST_SUPPORT) && defined(IPV6_MULTICAST_LOOP)
u_int off6 = 0;
#endif
@@ -2792,7 +2835,6 @@ open_socket(
{
SOCKET fd;
int errval;
- char scopetext[16];
/*
* int is OK for REUSEADR per
* http://www.kohala.com/start/mcast.api.txt
@@ -2942,16 +2984,10 @@ open_socket(
|| debug > 1
#endif
) {
- if (SCOPE(addr))
- snprintf(scopetext, sizeof(scopetext),
- "%%%d", SCOPE(addr));
- else
- scopetext[0] = 0;
-
msyslog(LOG_ERR,
- "bind(%d) AF_INET%s %s%s#%d%s flags 0x%x failed: %m",
+ "bind(%d) AF_INET%s %s#%d%s flags 0x%x failed: %m",
fd, IS_IPV6(addr) ? "6" : "",
- stoa(addr), scopetext, SRCPORT(addr),
+ stoa(addr), SRCPORT(addr),
IS_MCAST(addr) ? " (multicast)" : "",
interf->flags);
}
@@ -3195,8 +3231,8 @@ read_refclock_packet(
}
i = (rp->datalen == 0
- || rp->datalen > sizeof(rb->recv_space))
- ? sizeof(rb->recv_space)
+ || rp->datalen > (int)sizeof(rb->recv_space))
+ ? (int)sizeof(rb->recv_space)
: rp->datalen;
do {
buflen = read(fd, (char *)&rb->recv_space, (u_int)i);
@@ -3318,8 +3354,8 @@ fetch_timestamp(
tvp->tv_usec = (long)(ticks * 1e6 *
sys_tick);
}
- DPRINTF(4, ("fetch_timestamp: system usec network time stamp: %ld.%06ld\n",
- tvp->tv_sec, tvp->tv_usec));
+ DPRINTF(4, ("fetch_timestamp: system usec network time stamp: %jd.%06ld\n",
+ (intmax_t)tvp->tv_sec, (long)tvp->tv_usec));
nts = tval_stamp_to_lfp(*tvp);
break;
#endif /* HAVE_TIMESTAMP */
@@ -3443,6 +3479,29 @@ read_network_packet(
fd, buflen, stoa(&rb->recv_srcadr)));
/*
+ ** Bug 2672: Some OSes (MacOSX and Linux) don't block spoofed ::1
+ */
+
+ if (AF_INET6 == itf->family) {
+ DPRINTF(2, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n",
+ stoa(&rb->recv_srcadr),
+ IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr)),
+ stoa(&itf->sin),
+ !IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&itf->sin))
+ ));
+
+ if ( IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr))
+ && !IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&itf->sin))
+ ) {
+ packets_dropped++;
+ DPRINTF(2, ("DROPPING that packet\n"));
+ freerecvbuf(rb);
+ return buflen;
+ }
+ DPRINTF(2, ("processing that packet\n"));
+ }
+
+ /*
* Got one. Mark how and when it got here,
* put it on the full list and do bookkeeping.
*/
@@ -4010,7 +4069,7 @@ calc_addr_distance(
found_greater = FALSE;
a1_greater = FALSE; /* suppress pot. uninit. warning */
- for (i = 0; i < sizeof(NSRCADR6(a1)); i++) {
+ for (i = 0; i < (int)sizeof(NSRCADR6(a1)); i++) {
if (!found_greater &&
NSRCADR6(a1)[i] != NSRCADR6(a2)[i]) {
found_greater = TRUE;
@@ -4053,7 +4112,7 @@ cmp_addr_distance(
return 1;
}
- for (i = 0; i < sizeof(NSRCADR6(d1)); i++) {
+ for (i = 0; i < (int)sizeof(NSRCADR6(d1)); i++) {
if (NSRCADR6(d1)[i] < NSRCADR6(d2)[i])
return -1;
else if (NSRCADR6(d1)[i] > NSRCADR6(d2)[i])
diff --git a/ntpd/ntp_keyword.h b/ntpd/ntp_keyword.h
index 8b82ec0..7237936 100644
--- a/ntpd/ntp_keyword.h
+++ b/ntpd/ntp_keyword.h
@@ -2,7 +2,7 @@
* ntp_keyword.h
*
* NOTE: edit this file with caution, it is generated by keyword-gen.c
- * Generated 2013-08-04 04:56:14 UTC diff_ignore_line
+ * Generated 2015-03-16 09:05:44 UTC diff_ignore_line
*
*/
#include "ntp_scanner.h"
@@ -10,7 +10,7 @@
#define LOWEST_KEYWORD_ID 258
-const char * const keyword_text[186] = {
+const char * const keyword_text[189] = {
/* 0 258 T_Abbrev */ "abbrev",
/* 1 259 T_Age */ "age",
/* 2 260 T_All */ "all",
@@ -99,109 +99,112 @@ const char * const keyword_text[186] = {
/* 85 343 T_Maxdist */ "maxdist",
/* 86 344 T_Maxmem */ "maxmem",
/* 87 345 T_Maxpoll */ "maxpoll",
- /* 88 346 T_Mem */ "mem",
- /* 89 347 T_Memlock */ "memlock",
- /* 90 348 T_Minclock */ "minclock",
- /* 91 349 T_Mindepth */ "mindepth",
- /* 92 350 T_Mindist */ "mindist",
- /* 93 351 T_Minimum */ "minimum",
- /* 94 352 T_Minpoll */ "minpoll",
- /* 95 353 T_Minsane */ "minsane",
- /* 96 354 T_Mode */ "mode",
- /* 97 355 T_Mode7 */ "mode7",
- /* 98 356 T_Monitor */ "monitor",
- /* 99 357 T_Month */ "month",
- /* 100 358 T_Mru */ "mru",
- /* 101 359 T_Multicastclient */ "multicastclient",
- /* 102 360 T_Nic */ "nic",
- /* 103 361 T_Nolink */ "nolink",
- /* 104 362 T_Nomodify */ "nomodify",
- /* 105 363 T_Nomrulist */ "nomrulist",
- /* 106 364 T_None */ "none",
- /* 107 365 T_Nonvolatile */ "nonvolatile",
- /* 108 366 T_Nopeer */ "nopeer",
- /* 109 367 T_Noquery */ "noquery",
- /* 110 368 T_Noselect */ "noselect",
- /* 111 369 T_Noserve */ "noserve",
- /* 112 370 T_Notrap */ "notrap",
- /* 113 371 T_Notrust */ "notrust",
- /* 114 372 T_Ntp */ "ntp",
- /* 115 373 T_Ntpport */ "ntpport",
- /* 116 374 T_NtpSignDsocket */ "ntpsigndsocket",
- /* 117 375 T_Orphan */ "orphan",
- /* 118 376 T_Orphanwait */ "orphanwait",
- /* 119 377 T_Panic */ "panic",
- /* 120 378 T_Peer */ "peer",
- /* 121 379 T_Peerstats */ "peerstats",
- /* 122 380 T_Phone */ "phone",
- /* 123 381 T_Pid */ "pid",
- /* 124 382 T_Pidfile */ "pidfile",
- /* 125 383 T_Pool */ "pool",
- /* 126 384 T_Port */ "port",
- /* 127 385 T_Preempt */ "preempt",
- /* 128 386 T_Prefer */ "prefer",
- /* 129 387 T_Protostats */ "protostats",
- /* 130 388 T_Pw */ "pw",
- /* 131 389 T_Randfile */ "randfile",
- /* 132 390 T_Rawstats */ "rawstats",
- /* 133 391 T_Refid */ "refid",
- /* 134 392 T_Requestkey */ "requestkey",
- /* 135 393 T_Reset */ "reset",
- /* 136 394 T_Restrict */ "restrict",
- /* 137 395 T_Revoke */ "revoke",
- /* 138 396 T_Rlimit */ "rlimit",
- /* 139 397 T_Saveconfigdir */ "saveconfigdir",
- /* 140 398 T_Server */ "server",
- /* 141 399 T_Setvar */ "setvar",
- /* 142 400 T_Source */ "source",
- /* 143 401 T_Stacksize */ "stacksize",
- /* 144 402 T_Statistics */ "statistics",
- /* 145 403 T_Stats */ "stats",
- /* 146 404 T_Statsdir */ "statsdir",
- /* 147 405 T_Step */ "step",
- /* 148 406 T_Stepout */ "stepout",
- /* 149 407 T_Stratum */ "stratum",
- /* 150 408 T_String */ NULL,
- /* 151 409 T_Sys */ "sys",
- /* 152 410 T_Sysstats */ "sysstats",
- /* 153 411 T_Tick */ "tick",
- /* 154 412 T_Time1 */ "time1",
- /* 155 413 T_Time2 */ "time2",
- /* 156 414 T_Timer */ "timer",
- /* 157 415 T_Timingstats */ "timingstats",
- /* 158 416 T_Tinker */ "tinker",
- /* 159 417 T_Tos */ "tos",
- /* 160 418 T_Trap */ "trap",
- /* 161 419 T_True */ "true",
- /* 162 420 T_Trustedkey */ "trustedkey",
- /* 163 421 T_Ttl */ "ttl",
- /* 164 422 T_Type */ "type",
- /* 165 423 T_U_int */ NULL,
- /* 166 424 T_Unconfig */ "unconfig",
- /* 167 425 T_Unpeer */ "unpeer",
- /* 168 426 T_Version */ "version",
- /* 169 427 T_WanderThreshold */ NULL,
- /* 170 428 T_Week */ "week",
- /* 171 429 T_Wildcard */ "wildcard",
- /* 172 430 T_Xleave */ "xleave",
- /* 173 431 T_Year */ "year",
- /* 174 432 T_Flag */ NULL,
- /* 175 433 T_EOC */ NULL,
- /* 176 434 T_Simulate */ "simulate",
- /* 177 435 T_Beep_Delay */ "beep_delay",
- /* 178 436 T_Sim_Duration */ "simulation_duration",
- /* 179 437 T_Server_Offset */ "server_offset",
- /* 180 438 T_Duration */ "duration",
- /* 181 439 T_Freq_Offset */ "freq_offset",
- /* 182 440 T_Wander */ "wander",
- /* 183 441 T_Jitter */ "jitter",
- /* 184 442 T_Prop_Delay */ "prop_delay",
- /* 185 443 T_Proc_Delay */ "proc_delay"
+ /* 88 346 T_Mdnstries */ "mdnstries",
+ /* 89 347 T_Mem */ "mem",
+ /* 90 348 T_Memlock */ "memlock",
+ /* 91 349 T_Minclock */ "minclock",
+ /* 92 350 T_Mindepth */ "mindepth",
+ /* 93 351 T_Mindist */ "mindist",
+ /* 94 352 T_Minimum */ "minimum",
+ /* 95 353 T_Minpoll */ "minpoll",
+ /* 96 354 T_Minsane */ "minsane",
+ /* 97 355 T_Mode */ "mode",
+ /* 98 356 T_Mode7 */ "mode7",
+ /* 99 357 T_Monitor */ "monitor",
+ /* 100 358 T_Month */ "month",
+ /* 101 359 T_Mru */ "mru",
+ /* 102 360 T_Multicastclient */ "multicastclient",
+ /* 103 361 T_Nic */ "nic",
+ /* 104 362 T_Nolink */ "nolink",
+ /* 105 363 T_Nomodify */ "nomodify",
+ /* 106 364 T_Nomrulist */ "nomrulist",
+ /* 107 365 T_None */ "none",
+ /* 108 366 T_Nonvolatile */ "nonvolatile",
+ /* 109 367 T_Nopeer */ "nopeer",
+ /* 110 368 T_Noquery */ "noquery",
+ /* 111 369 T_Noselect */ "noselect",
+ /* 112 370 T_Noserve */ "noserve",
+ /* 113 371 T_Notrap */ "notrap",
+ /* 114 372 T_Notrust */ "notrust",
+ /* 115 373 T_Ntp */ "ntp",
+ /* 116 374 T_Ntpport */ "ntpport",
+ /* 117 375 T_NtpSignDsocket */ "ntpsigndsocket",
+ /* 118 376 T_Orphan */ "orphan",
+ /* 119 377 T_Orphanwait */ "orphanwait",
+ /* 120 378 T_Panic */ "panic",
+ /* 121 379 T_Peer */ "peer",
+ /* 122 380 T_Peerstats */ "peerstats",
+ /* 123 381 T_Phone */ "phone",
+ /* 124 382 T_Pid */ "pid",
+ /* 125 383 T_Pidfile */ "pidfile",
+ /* 126 384 T_Pool */ "pool",
+ /* 127 385 T_Port */ "port",
+ /* 128 386 T_Preempt */ "preempt",
+ /* 129 387 T_Prefer */ "prefer",
+ /* 130 388 T_Protostats */ "protostats",
+ /* 131 389 T_Pw */ "pw",
+ /* 132 390 T_Randfile */ "randfile",
+ /* 133 391 T_Rawstats */ "rawstats",
+ /* 134 392 T_Refid */ "refid",
+ /* 135 393 T_Requestkey */ "requestkey",
+ /* 136 394 T_Reset */ "reset",
+ /* 137 395 T_Restrict */ "restrict",
+ /* 138 396 T_Revoke */ "revoke",
+ /* 139 397 T_Rlimit */ "rlimit",
+ /* 140 398 T_Saveconfigdir */ "saveconfigdir",
+ /* 141 399 T_Server */ "server",
+ /* 142 400 T_Setvar */ "setvar",
+ /* 143 401 T_Source */ "source",
+ /* 144 402 T_Stacksize */ "stacksize",
+ /* 145 403 T_Statistics */ "statistics",
+ /* 146 404 T_Stats */ "stats",
+ /* 147 405 T_Statsdir */ "statsdir",
+ /* 148 406 T_Step */ "step",
+ /* 149 407 T_Stepback */ "stepback",
+ /* 150 408 T_Stepfwd */ "stepfwd",
+ /* 151 409 T_Stepout */ "stepout",
+ /* 152 410 T_Stratum */ "stratum",
+ /* 153 411 T_String */ NULL,
+ /* 154 412 T_Sys */ "sys",
+ /* 155 413 T_Sysstats */ "sysstats",
+ /* 156 414 T_Tick */ "tick",
+ /* 157 415 T_Time1 */ "time1",
+ /* 158 416 T_Time2 */ "time2",
+ /* 159 417 T_Timer */ "timer",
+ /* 160 418 T_Timingstats */ "timingstats",
+ /* 161 419 T_Tinker */ "tinker",
+ /* 162 420 T_Tos */ "tos",
+ /* 163 421 T_Trap */ "trap",
+ /* 164 422 T_True */ "true",
+ /* 165 423 T_Trustedkey */ "trustedkey",
+ /* 166 424 T_Ttl */ "ttl",
+ /* 167 425 T_Type */ "type",
+ /* 168 426 T_U_int */ NULL,
+ /* 169 427 T_Unconfig */ "unconfig",
+ /* 170 428 T_Unpeer */ "unpeer",
+ /* 171 429 T_Version */ "version",
+ /* 172 430 T_WanderThreshold */ NULL,
+ /* 173 431 T_Week */ "week",
+ /* 174 432 T_Wildcard */ "wildcard",
+ /* 175 433 T_Xleave */ "xleave",
+ /* 176 434 T_Year */ "year",
+ /* 177 435 T_Flag */ NULL,
+ /* 178 436 T_EOC */ NULL,
+ /* 179 437 T_Simulate */ "simulate",
+ /* 180 438 T_Beep_Delay */ "beep_delay",
+ /* 181 439 T_Sim_Duration */ "simulation_duration",
+ /* 182 440 T_Server_Offset */ "server_offset",
+ /* 183 441 T_Duration */ "duration",
+ /* 184 442 T_Freq_Offset */ "freq_offset",
+ /* 185 443 T_Wander */ "wander",
+ /* 186 444 T_Jitter */ "jitter",
+ /* 187 445 T_Prop_Delay */ "prop_delay",
+ /* 188 446 T_Proc_Delay */ "proc_delay"
};
-#define SCANNER_INIT_S 822
+#define SCANNER_INIT_S 837
-const scan_state sst[825] = {
+const scan_state sst[840] = {
/*SS_T( ch, f-by, match, other ), */
0, /* 0 */
S_ST( '-', 3, 322, 0 ), /* 1 */
@@ -247,7 +250,7 @@ const scan_state sst[825] = {
S_ST( 'd', 3, 42, 0 ), /* 41 beep_ */
S_ST( 'e', 3, 43, 0 ), /* 42 beep_d */
S_ST( 'l', 3, 44, 0 ), /* 43 beep_de */
- S_ST( 'a', 3, 435, 0 ), /* 44 beep_del */
+ S_ST( 'a', 3, 438, 0 ), /* 44 beep_del */
S_ST( 'r', 3, 46, 34 ), /* 45 b */
S_ST( 'o', 3, 47, 0 ), /* 46 br */
S_ST( 'a', 3, 48, 0 ), /* 47 bro */
@@ -345,7 +348,7 @@ const scan_state sst[825] = {
S_ST( 'a', 3, 140, 0 ), /* 139 dur */
S_ST( 't', 3, 141, 0 ), /* 140 dura */
S_ST( 'i', 3, 142, 0 ), /* 141 durat */
- S_ST( 'o', 3, 438, 0 ), /* 142 durati */
+ S_ST( 'o', 3, 441, 0 ), /* 142 durati */
S_ST( 'e', 3, 144, 105 ), /* 143 */
S_ST( 'n', 3, 292, 0 ), /* 144 e */
S_ST( 'a', 3, 146, 0 ), /* 145 en */
@@ -371,7 +374,7 @@ const scan_state sst[825] = {
S_ST( 'f', 3, 166, 0 ), /* 165 freq_o */
S_ST( 'f', 3, 167, 0 ), /* 166 freq_of */
S_ST( 's', 3, 168, 0 ), /* 167 freq_off */
- S_ST( 'e', 3, 439, 0 ), /* 168 freq_offs */
+ S_ST( 'e', 3, 442, 0 ), /* 168 freq_offs */
S_ST( 'u', 3, 170, 161 ), /* 169 f */
S_ST( 'd', 3, 171, 0 ), /* 170 fu */
S_ST( 'g', 3, 304, 0 ), /* 171 fud */
@@ -431,7 +434,7 @@ const scan_state sst[825] = {
S_ST( 'i', 3, 226, 0 ), /* 225 j */
S_ST( 't', 3, 227, 0 ), /* 226 ji */
S_ST( 't', 3, 228, 0 ), /* 227 jit */
- S_ST( 'e', 3, 441, 0 ), /* 228 jitt */
+ S_ST( 'e', 3, 444, 0 ), /* 228 jitt */
S_ST( 'k', 3, 236, 224 ), /* 229 */
S_ST( 'e', 3, 324, 0 ), /* 230 k */
S_ST( 'r', 3, 232, 0 ), /* 231 ke */
@@ -456,7 +459,7 @@ const scan_state sst[825] = {
S_ST( 's', 3, 251, 249 ), /* 250 li */
S_ST( 't', 3, 252, 0 ), /* 251 lis */
S_ST( 'e', 3, 332, 0 ), /* 252 list */
- S_ST( 'o', 3, 446, 244 ), /* 253 l */
+ S_ST( 'o', 3, 449, 244 ), /* 253 l */
S_ST( 'g', 3, 315, 0 ), /* 254 lo */
S_ST( 'c', 3, 256, 0 ), /* 255 log */
S_ST( 'o', 3, 257, 0 ), /* 256 logc */
@@ -520,7 +523,7 @@ const scan_state sst[825] = {
S_ST( 'e', 1, 0, 0 ), /* 314 T_Includefile */
S_ST( 'f', 3, 317, 255 ), /* 315 log */
S_ST( 'e', 0, 0, 0 ), /* 316 T_Interface */
- S_ST( 'i', 3, 408, 0 ), /* 317 logf */
+ S_ST( 'i', 3, 411, 0 ), /* 317 logf */
S_ST( 'o', 0, 0, 193 ), /* 318 T_Io */
S_ST( '4', 0, 0, 0 ), /* 319 T_Ipv4 */
S_ST( '4', 0, 0, 0 ), /* 320 T_Ipv4_flag */
@@ -549,484 +552,499 @@ const scan_state sst[825] = {
S_ST( 't', 0, 0, 0 ), /* 343 T_Maxdist */
S_ST( 'm', 0, 0, 0 ), /* 344 T_Maxmem */
S_ST( 'l', 0, 0, 0 ), /* 345 T_Maxpoll */
- S_ST( 'm', 0, 492, 0 ), /* 346 T_Mem */
- S_ST( 'k', 0, 0, 0 ), /* 347 T_Memlock */
- S_ST( 'k', 0, 0, 0 ), /* 348 T_Minclock */
- S_ST( 'h', 0, 0, 0 ), /* 349 T_Mindepth */
- S_ST( 't', 0, 0, 0 ), /* 350 T_Mindist */
- S_ST( 'm', 0, 0, 0 ), /* 351 T_Minimum */
- S_ST( 'l', 0, 0, 0 ), /* 352 T_Minpoll */
- S_ST( 'e', 0, 0, 0 ), /* 353 T_Minsane */
- S_ST( 'e', 0, 355, 0 ), /* 354 T_Mode */
- S_ST( '7', 0, 0, 0 ), /* 355 T_Mode7 */
- S_ST( 'r', 0, 0, 0 ), /* 356 T_Monitor */
- S_ST( 'h', 0, 0, 0 ), /* 357 T_Month */
- S_ST( 'u', 0, 0, 0 ), /* 358 T_Mru */
- S_ST( 't', 2, 0, 0 ), /* 359 T_Multicastclient */
- S_ST( 'c', 0, 0, 0 ), /* 360 T_Nic */
- S_ST( 'k', 0, 0, 0 ), /* 361 T_Nolink */
- S_ST( 'y', 0, 0, 0 ), /* 362 T_Nomodify */
- S_ST( 't', 0, 0, 0 ), /* 363 T_Nomrulist */
- S_ST( 'e', 0, 0, 0 ), /* 364 T_None */
- S_ST( 'e', 0, 0, 0 ), /* 365 T_Nonvolatile */
- S_ST( 'r', 0, 0, 0 ), /* 366 T_Nopeer */
- S_ST( 'y', 0, 0, 0 ), /* 367 T_Noquery */
- S_ST( 't', 0, 0, 0 ), /* 368 T_Noselect */
- S_ST( 'e', 0, 0, 0 ), /* 369 T_Noserve */
- S_ST( 'p', 0, 0, 0 ), /* 370 T_Notrap */
- S_ST( 't', 0, 0, 0 ), /* 371 T_Notrust */
- S_ST( 'p', 0, 588, 0 ), /* 372 T_Ntp */
- S_ST( 't', 0, 0, 0 ), /* 373 T_Ntpport */
- S_ST( 't', 1, 0, 0 ), /* 374 T_NtpSignDsocket */
- S_ST( 'n', 0, 603, 0 ), /* 375 T_Orphan */
- S_ST( 't', 0, 0, 0 ), /* 376 T_Orphanwait */
- S_ST( 'c', 0, 0, 0 ), /* 377 T_Panic */
- S_ST( 'r', 1, 612, 0 ), /* 378 T_Peer */
- S_ST( 's', 0, 0, 0 ), /* 379 T_Peerstats */
- S_ST( 'e', 2, 0, 0 ), /* 380 T_Phone */
- S_ST( 'd', 0, 620, 0 ), /* 381 T_Pid */
- S_ST( 'e', 1, 0, 0 ), /* 382 T_Pidfile */
- S_ST( 'l', 1, 0, 0 ), /* 383 T_Pool */
- S_ST( 't', 0, 0, 0 ), /* 384 T_Port */
- S_ST( 't', 0, 0, 0 ), /* 385 T_Preempt */
- S_ST( 'r', 0, 0, 0 ), /* 386 T_Prefer */
- S_ST( 's', 0, 0, 0 ), /* 387 T_Protostats */
- S_ST( 'w', 1, 0, 626 ), /* 388 T_Pw */
- S_ST( 'e', 1, 0, 0 ), /* 389 T_Randfile */
- S_ST( 's', 0, 0, 0 ), /* 390 T_Rawstats */
- S_ST( 'd', 1, 0, 0 ), /* 391 T_Refid */
- S_ST( 'y', 0, 0, 0 ), /* 392 T_Requestkey */
- S_ST( 't', 0, 0, 0 ), /* 393 T_Reset */
- S_ST( 't', 0, 0, 0 ), /* 394 T_Restrict */
- S_ST( 'e', 0, 0, 0 ), /* 395 T_Revoke */
- S_ST( 't', 0, 0, 0 ), /* 396 T_Rlimit */
- S_ST( 'r', 1, 0, 0 ), /* 397 T_Saveconfigdir */
- S_ST( 'r', 1, 703, 0 ), /* 398 T_Server */
- S_ST( 'r', 1, 0, 0 ), /* 399 T_Setvar */
- S_ST( 'e', 0, 0, 0 ), /* 400 T_Source */
- S_ST( 'e', 0, 0, 0 ), /* 401 T_Stacksize */
- S_ST( 's', 0, 0, 0 ), /* 402 T_Statistics */
- S_ST( 's', 0, 746, 741 ), /* 403 T_Stats */
- S_ST( 'r', 1, 0, 0 ), /* 404 T_Statsdir */
- S_ST( 'p', 0, 749, 0 ), /* 405 T_Step */
- S_ST( 't', 0, 0, 0 ), /* 406 T_Stepout */
- S_ST( 'm', 0, 0, 0 ), /* 407 T_Stratum */
- S_ST( 'l', 3, 334, 0 ), /* 408 logfi */
- S_ST( 's', 0, 756, 0 ), /* 409 T_Sys */
- S_ST( 's', 0, 0, 0 ), /* 410 T_Sysstats */
- S_ST( 'k', 0, 0, 0 ), /* 411 T_Tick */
- S_ST( '1', 0, 0, 0 ), /* 412 T_Time1 */
- S_ST( '2', 0, 0, 412 ), /* 413 T_Time2 */
- S_ST( 'r', 0, 0, 413 ), /* 414 T_Timer */
- S_ST( 's', 0, 0, 0 ), /* 415 T_Timingstats */
- S_ST( 'r', 0, 0, 0 ), /* 416 T_Tinker */
- S_ST( 's', 0, 0, 0 ), /* 417 T_Tos */
- S_ST( 'p', 1, 0, 0 ), /* 418 T_Trap */
- S_ST( 'e', 0, 0, 0 ), /* 419 T_True */
- S_ST( 'y', 0, 0, 0 ), /* 420 T_Trustedkey */
- S_ST( 'l', 0, 0, 0 ), /* 421 T_Ttl */
- S_ST( 'e', 0, 0, 0 ), /* 422 T_Type */
- S_ST( 'o', 3, 427, 254 ), /* 423 lo */
- S_ST( 'g', 1, 0, 0 ), /* 424 T_Unconfig */
- S_ST( 'r', 1, 0, 0 ), /* 425 T_Unpeer */
- S_ST( 'n', 0, 0, 0 ), /* 426 T_Version */
- S_ST( 'p', 3, 432, 0 ), /* 427 loo */
- S_ST( 'k', 0, 0, 0 ), /* 428 T_Week */
- S_ST( 'd', 0, 0, 0 ), /* 429 T_Wildcard */
- S_ST( 'e', 0, 0, 0 ), /* 430 T_Xleave */
- S_ST( 'r', 0, 0, 0 ), /* 431 T_Year */
- S_ST( 's', 3, 433, 0 ), /* 432 loop */
- S_ST( 't', 3, 444, 0 ), /* 433 loops */
- S_ST( 'e', 0, 0, 0 ), /* 434 T_Simulate */
- S_ST( 'y', 0, 0, 0 ), /* 435 T_Beep_Delay */
- S_ST( 'n', 0, 0, 0 ), /* 436 T_Sim_Duration */
- S_ST( 't', 0, 0, 0 ), /* 437 T_Server_Offset */
- S_ST( 'n', 0, 0, 0 ), /* 438 T_Duration */
- S_ST( 't', 0, 0, 0 ), /* 439 T_Freq_Offset */
- S_ST( 'r', 0, 0, 0 ), /* 440 T_Wander */
- S_ST( 'r', 0, 0, 0 ), /* 441 T_Jitter */
- S_ST( 'y', 0, 0, 0 ), /* 442 T_Prop_Delay */
- S_ST( 'y', 0, 0, 0 ), /* 443 T_Proc_Delay */
- S_ST( 'a', 3, 445, 0 ), /* 444 loopst */
- S_ST( 't', 3, 335, 0 ), /* 445 loopsta */
- S_ST( 'w', 3, 447, 423 ), /* 446 lo */
- S_ST( 'p', 3, 448, 0 ), /* 447 low */
- S_ST( 'r', 3, 449, 0 ), /* 448 lowp */
- S_ST( 'i', 3, 450, 0 ), /* 449 lowpr */
- S_ST( 'o', 3, 451, 0 ), /* 450 lowpri */
- S_ST( 't', 3, 452, 0 ), /* 451 lowprio */
- S_ST( 'r', 3, 453, 0 ), /* 452 lowpriot */
- S_ST( 'a', 3, 336, 0 ), /* 453 lowpriotr */
- S_ST( 'm', 3, 528, 237 ), /* 454 */
- S_ST( 'a', 3, 473, 0 ), /* 455 m */
- S_ST( 'n', 3, 457, 0 ), /* 456 ma */
- S_ST( 'y', 3, 458, 0 ), /* 457 man */
- S_ST( 'c', 3, 459, 0 ), /* 458 many */
- S_ST( 'a', 3, 460, 0 ), /* 459 manyc */
- S_ST( 's', 3, 461, 0 ), /* 460 manyca */
- S_ST( 't', 3, 467, 0 ), /* 461 manycas */
- S_ST( 'c', 3, 463, 0 ), /* 462 manycast */
- S_ST( 'l', 3, 464, 0 ), /* 463 manycastc */
- S_ST( 'i', 3, 465, 0 ), /* 464 manycastcl */
- S_ST( 'e', 3, 466, 0 ), /* 465 manycastcli */
- S_ST( 'n', 3, 337, 0 ), /* 466 manycastclie */
- S_ST( 's', 3, 468, 462 ), /* 467 manycast */
- S_ST( 'e', 3, 469, 0 ), /* 468 manycasts */
- S_ST( 'r', 3, 470, 0 ), /* 469 manycastse */
- S_ST( 'v', 3, 471, 0 ), /* 470 manycastser */
- S_ST( 'e', 3, 338, 0 ), /* 471 manycastserv */
- S_ST( 's', 3, 339, 456 ), /* 472 ma */
- S_ST( 'x', 3, 488, 472 ), /* 473 ma */
- S_ST( 'a', 3, 475, 0 ), /* 474 max */
- S_ST( 'g', 3, 340, 0 ), /* 475 maxa */
- S_ST( 'c', 3, 477, 474 ), /* 476 max */
- S_ST( 'l', 3, 478, 0 ), /* 477 maxc */
- S_ST( 'o', 3, 479, 0 ), /* 478 maxcl */
- S_ST( 'c', 3, 341, 0 ), /* 479 maxclo */
- S_ST( 'd', 3, 484, 476 ), /* 480 max */
- S_ST( 'e', 3, 482, 0 ), /* 481 maxd */
- S_ST( 'p', 3, 483, 0 ), /* 482 maxde */
- S_ST( 't', 3, 342, 0 ), /* 483 maxdep */
- S_ST( 'i', 3, 485, 481 ), /* 484 maxd */
- S_ST( 's', 3, 343, 0 ), /* 485 maxdi */
- S_ST( 'm', 3, 487, 480 ), /* 486 max */
- S_ST( 'e', 3, 344, 0 ), /* 487 maxm */
- S_ST( 'p', 3, 489, 486 ), /* 488 max */
- S_ST( 'o', 3, 490, 0 ), /* 489 maxp */
- S_ST( 'l', 3, 345, 0 ), /* 490 maxpo */
- S_ST( 'e', 3, 346, 455 ), /* 491 m */
- S_ST( 'l', 3, 493, 0 ), /* 492 mem */
- S_ST( 'o', 3, 494, 0 ), /* 493 meml */
- S_ST( 'c', 3, 347, 0 ), /* 494 memlo */
- S_ST( 'i', 3, 496, 491 ), /* 495 m */
- S_ST( 'n', 3, 513, 0 ), /* 496 mi */
- S_ST( 'c', 3, 498, 0 ), /* 497 min */
- S_ST( 'l', 3, 499, 0 ), /* 498 minc */
- S_ST( 'o', 3, 500, 0 ), /* 499 mincl */
- S_ST( 'c', 3, 348, 0 ), /* 500 minclo */
- S_ST( 'd', 3, 505, 497 ), /* 501 min */
- S_ST( 'e', 3, 503, 0 ), /* 502 mind */
- S_ST( 'p', 3, 504, 0 ), /* 503 minde */
- S_ST( 't', 3, 349, 0 ), /* 504 mindep */
- S_ST( 'i', 3, 506, 502 ), /* 505 mind */
- S_ST( 's', 3, 350, 0 ), /* 506 mindi */
- S_ST( 'i', 3, 508, 501 ), /* 507 min */
- S_ST( 'm', 3, 509, 0 ), /* 508 mini */
- S_ST( 'u', 3, 351, 0 ), /* 509 minim */
- S_ST( 'p', 3, 511, 507 ), /* 510 min */
- S_ST( 'o', 3, 512, 0 ), /* 511 minp */
- S_ST( 'l', 3, 352, 0 ), /* 512 minpo */
- S_ST( 's', 3, 514, 510 ), /* 513 min */
- S_ST( 'a', 3, 515, 0 ), /* 514 mins */
- S_ST( 'n', 3, 353, 0 ), /* 515 minsa */
- S_ST( 'o', 3, 518, 495 ), /* 516 m */
- S_ST( 'd', 3, 354, 0 ), /* 517 mo */
- S_ST( 'n', 3, 522, 517 ), /* 518 mo */
- S_ST( 'i', 3, 520, 0 ), /* 519 mon */
- S_ST( 't', 3, 521, 0 ), /* 520 moni */
- S_ST( 'o', 3, 356, 0 ), /* 521 monit */
- S_ST( 't', 3, 357, 519 ), /* 522 mon */
- S_ST( 'r', 3, 358, 516 ), /* 523 m */
- S_ST( 's', 3, 525, 523 ), /* 524 m */
- S_ST( 's', 3, 526, 0 ), /* 525 ms */
- S_ST( 'n', 3, 527, 0 ), /* 526 mss */
- S_ST( 't', 3, 328, 0 ), /* 527 mssn */
- S_ST( 'u', 3, 529, 524 ), /* 528 m */
- S_ST( 'l', 3, 530, 0 ), /* 529 mu */
- S_ST( 't', 3, 531, 0 ), /* 530 mul */
- S_ST( 'i', 3, 532, 0 ), /* 531 mult */
- S_ST( 'c', 3, 533, 0 ), /* 532 multi */
- S_ST( 'a', 3, 534, 0 ), /* 533 multic */
- S_ST( 's', 3, 535, 0 ), /* 534 multica */
- S_ST( 't', 3, 536, 0 ), /* 535 multicas */
- S_ST( 'c', 3, 537, 0 ), /* 536 multicast */
- S_ST( 'l', 3, 538, 0 ), /* 537 multicastc */
- S_ST( 'i', 3, 539, 0 ), /* 538 multicastcl */
- S_ST( 'e', 3, 540, 0 ), /* 539 multicastcli */
- S_ST( 'n', 3, 359, 0 ), /* 540 multicastclie */
- S_ST( 'n', 3, 584, 454 ), /* 541 */
- S_ST( 'i', 3, 360, 0 ), /* 542 n */
- S_ST( 'o', 3, 579, 542 ), /* 543 n */
- S_ST( 'l', 3, 545, 0 ), /* 544 no */
- S_ST( 'i', 3, 546, 0 ), /* 545 nol */
- S_ST( 'n', 3, 361, 0 ), /* 546 noli */
- S_ST( 'm', 3, 552, 544 ), /* 547 no */
- S_ST( 'o', 3, 549, 0 ), /* 548 nom */
- S_ST( 'd', 3, 550, 0 ), /* 549 nomo */
- S_ST( 'i', 3, 551, 0 ), /* 550 nomod */
- S_ST( 'f', 3, 362, 0 ), /* 551 nomodi */
- S_ST( 'r', 3, 553, 548 ), /* 552 nom */
- S_ST( 'u', 3, 554, 0 ), /* 553 nomr */
- S_ST( 'l', 3, 555, 0 ), /* 554 nomru */
- S_ST( 'i', 3, 556, 0 ), /* 555 nomrul */
- S_ST( 's', 3, 363, 0 ), /* 556 nomruli */
- S_ST( 'n', 3, 558, 547 ), /* 557 no */
- S_ST( 'v', 3, 559, 364 ), /* 558 non */
- S_ST( 'o', 3, 560, 0 ), /* 559 nonv */
- S_ST( 'l', 3, 561, 0 ), /* 560 nonvo */
- S_ST( 'a', 3, 562, 0 ), /* 561 nonvol */
- S_ST( 't', 3, 563, 0 ), /* 562 nonvola */
- S_ST( 'i', 3, 564, 0 ), /* 563 nonvolat */
- S_ST( 'l', 3, 365, 0 ), /* 564 nonvolati */
- S_ST( 'p', 3, 566, 557 ), /* 565 no */
- S_ST( 'e', 3, 567, 0 ), /* 566 nop */
- S_ST( 'e', 3, 366, 0 ), /* 567 nope */
- S_ST( 'q', 3, 569, 565 ), /* 568 no */
- S_ST( 'u', 3, 570, 0 ), /* 569 noq */
- S_ST( 'e', 3, 571, 0 ), /* 570 noqu */
- S_ST( 'r', 3, 367, 0 ), /* 571 noque */
- S_ST( 's', 3, 573, 568 ), /* 572 no */
- S_ST( 'e', 3, 577, 0 ), /* 573 nos */
- S_ST( 'l', 3, 575, 0 ), /* 574 nose */
- S_ST( 'e', 3, 576, 0 ), /* 575 nosel */
- S_ST( 'c', 3, 368, 0 ), /* 576 nosele */
- S_ST( 'r', 3, 578, 574 ), /* 577 nose */
- S_ST( 'v', 3, 369, 0 ), /* 578 noser */
- S_ST( 't', 3, 580, 572 ), /* 579 no */
- S_ST( 'r', 3, 582, 0 ), /* 580 not */
- S_ST( 'a', 3, 370, 0 ), /* 581 notr */
- S_ST( 'u', 3, 583, 581 ), /* 582 notr */
- S_ST( 's', 3, 371, 0 ), /* 583 notru */
- S_ST( 't', 3, 372, 543 ), /* 584 n */
- S_ST( 'p', 3, 586, 0 ), /* 585 ntp */
- S_ST( 'o', 3, 587, 0 ), /* 586 ntpp */
- S_ST( 'r', 3, 373, 0 ), /* 587 ntppo */
- S_ST( 's', 3, 589, 585 ), /* 588 ntp */
- S_ST( 'i', 3, 590, 0 ), /* 589 ntps */
- S_ST( 'g', 3, 591, 0 ), /* 590 ntpsi */
- S_ST( 'n', 3, 592, 0 ), /* 591 ntpsig */
- S_ST( 'd', 3, 593, 0 ), /* 592 ntpsign */
- S_ST( 's', 3, 594, 0 ), /* 593 ntpsignd */
- S_ST( 'o', 3, 595, 0 ), /* 594 ntpsignds */
- S_ST( 'c', 3, 596, 0 ), /* 595 ntpsigndso */
- S_ST( 'k', 3, 597, 0 ), /* 596 ntpsigndsoc */
- S_ST( 'e', 3, 374, 0 ), /* 597 ntpsigndsock */
- S_ST( 'o', 3, 599, 541 ), /* 598 */
- S_ST( 'r', 3, 600, 0 ), /* 599 o */
- S_ST( 'p', 3, 601, 0 ), /* 600 or */
- S_ST( 'h', 3, 602, 0 ), /* 601 orp */
- S_ST( 'a', 3, 375, 0 ), /* 602 orph */
- S_ST( 'w', 3, 604, 0 ), /* 603 orphan */
- S_ST( 'a', 3, 605, 0 ), /* 604 orphanw */
- S_ST( 'i', 3, 376, 0 ), /* 605 orphanwa */
- S_ST( 'p', 3, 388, 598 ), /* 606 */
- S_ST( 'a', 3, 608, 0 ), /* 607 p */
- S_ST( 'n', 3, 609, 0 ), /* 608 pa */
- S_ST( 'i', 3, 377, 0 ), /* 609 pan */
- S_ST( 'e', 3, 611, 607 ), /* 610 p */
- S_ST( 'e', 3, 378, 0 ), /* 611 pe */
- S_ST( 's', 3, 613, 0 ), /* 612 peer */
- S_ST( 't', 3, 614, 0 ), /* 613 peers */
- S_ST( 'a', 3, 615, 0 ), /* 614 peerst */
- S_ST( 't', 3, 379, 0 ), /* 615 peersta */
- S_ST( 'h', 3, 617, 610 ), /* 616 p */
- S_ST( 'o', 3, 618, 0 ), /* 617 ph */
- S_ST( 'n', 3, 380, 0 ), /* 618 pho */
- S_ST( 'i', 3, 381, 616 ), /* 619 p */
- S_ST( 'f', 3, 621, 0 ), /* 620 pid */
- S_ST( 'i', 3, 622, 0 ), /* 621 pidf */
- S_ST( 'l', 3, 382, 0 ), /* 622 pidfi */
- S_ST( 'o', 3, 625, 619 ), /* 623 p */
- S_ST( 'o', 3, 383, 0 ), /* 624 po */
- S_ST( 'r', 3, 384, 624 ), /* 625 po */
- S_ST( 'r', 3, 633, 623 ), /* 626 p */
- S_ST( 'e', 3, 631, 0 ), /* 627 pr */
- S_ST( 'e', 3, 629, 0 ), /* 628 pre */
- S_ST( 'm', 3, 630, 0 ), /* 629 pree */
- S_ST( 'p', 3, 385, 0 ), /* 630 preem */
- S_ST( 'f', 3, 632, 628 ), /* 631 pre */
- S_ST( 'e', 3, 386, 0 ), /* 632 pref */
- S_ST( 'o', 3, 646, 627 ), /* 633 pr */
- S_ST( 'c', 3, 635, 0 ), /* 634 pro */
- S_ST( '_', 3, 636, 0 ), /* 635 proc */
- S_ST( 'd', 3, 637, 0 ), /* 636 proc_ */
- S_ST( 'e', 3, 638, 0 ), /* 637 proc_d */
- S_ST( 'l', 3, 639, 0 ), /* 638 proc_de */
- S_ST( 'a', 3, 443, 0 ), /* 639 proc_del */
- S_ST( 'p', 3, 641, 634 ), /* 640 pro */
- S_ST( '_', 3, 642, 0 ), /* 641 prop */
- S_ST( 'd', 3, 643, 0 ), /* 642 prop_ */
- S_ST( 'e', 3, 644, 0 ), /* 643 prop_d */
- S_ST( 'l', 3, 645, 0 ), /* 644 prop_de */
- S_ST( 'a', 3, 442, 0 ), /* 645 prop_del */
- S_ST( 't', 3, 647, 640 ), /* 646 pro */
- S_ST( 'o', 3, 648, 0 ), /* 647 prot */
- S_ST( 's', 3, 649, 0 ), /* 648 proto */
- S_ST( 't', 3, 650, 0 ), /* 649 protos */
- S_ST( 'a', 3, 651, 0 ), /* 650 protost */
- S_ST( 't', 3, 387, 0 ), /* 651 protosta */
- S_ST( 'r', 3, 683, 606 ), /* 652 */
- S_ST( 'a', 3, 659, 0 ), /* 653 r */
- S_ST( 'n', 3, 655, 0 ), /* 654 ra */
- S_ST( 'd', 3, 656, 0 ), /* 655 ran */
- S_ST( 'f', 3, 657, 0 ), /* 656 rand */
- S_ST( 'i', 3, 658, 0 ), /* 657 randf */
- S_ST( 'l', 3, 389, 0 ), /* 658 randfi */
- S_ST( 'w', 3, 660, 654 ), /* 659 ra */
- S_ST( 's', 3, 661, 0 ), /* 660 raw */
- S_ST( 't', 3, 662, 0 ), /* 661 raws */
- S_ST( 'a', 3, 663, 0 ), /* 662 rawst */
- S_ST( 't', 3, 390, 0 ), /* 663 rawsta */
- S_ST( 'e', 3, 680, 653 ), /* 664 r */
- S_ST( 'f', 3, 666, 0 ), /* 665 re */
- S_ST( 'i', 3, 391, 0 ), /* 666 ref */
- S_ST( 'q', 3, 668, 665 ), /* 667 re */
- S_ST( 'u', 3, 669, 0 ), /* 668 req */
- S_ST( 'e', 3, 670, 0 ), /* 669 requ */
- S_ST( 's', 3, 671, 0 ), /* 670 reque */
- S_ST( 't', 3, 672, 0 ), /* 671 reques */
- S_ST( 'k', 3, 673, 0 ), /* 672 request */
- S_ST( 'e', 3, 392, 0 ), /* 673 requestk */
- S_ST( 's', 3, 676, 667 ), /* 674 re */
- S_ST( 'e', 3, 393, 0 ), /* 675 res */
- S_ST( 't', 3, 677, 675 ), /* 676 res */
- S_ST( 'r', 3, 678, 0 ), /* 677 rest */
- S_ST( 'i', 3, 679, 0 ), /* 678 restr */
- S_ST( 'c', 3, 394, 0 ), /* 679 restri */
- S_ST( 'v', 3, 681, 674 ), /* 680 re */
- S_ST( 'o', 3, 682, 0 ), /* 681 rev */
- S_ST( 'k', 3, 395, 0 ), /* 682 revo */
- S_ST( 'l', 3, 684, 664 ), /* 683 r */
- S_ST( 'i', 3, 685, 0 ), /* 684 rl */
- S_ST( 'm', 3, 686, 0 ), /* 685 rli */
- S_ST( 'i', 3, 396, 0 ), /* 686 rlim */
- S_ST( 's', 3, 755, 652 ), /* 687 */
- S_ST( 'a', 3, 689, 0 ), /* 688 s */
- S_ST( 'v', 3, 690, 0 ), /* 689 sa */
- S_ST( 'e', 3, 691, 0 ), /* 690 sav */
- S_ST( 'c', 3, 692, 0 ), /* 691 save */
- S_ST( 'o', 3, 693, 0 ), /* 692 savec */
- S_ST( 'n', 3, 694, 0 ), /* 693 saveco */
- S_ST( 'f', 3, 695, 0 ), /* 694 savecon */
- S_ST( 'i', 3, 696, 0 ), /* 695 saveconf */
- S_ST( 'g', 3, 697, 0 ), /* 696 saveconfi */
- S_ST( 'd', 3, 698, 0 ), /* 697 saveconfig */
- S_ST( 'i', 3, 397, 0 ), /* 698 saveconfigd */
- S_ST( 'e', 3, 709, 688 ), /* 699 s */
- S_ST( 'r', 3, 701, 0 ), /* 700 se */
- S_ST( 'v', 3, 702, 0 ), /* 701 ser */
- S_ST( 'e', 3, 398, 0 ), /* 702 serv */
- S_ST( '_', 3, 704, 0 ), /* 703 server */
- S_ST( 'o', 3, 705, 0 ), /* 704 server_ */
- S_ST( 'f', 3, 706, 0 ), /* 705 server_o */
- S_ST( 'f', 3, 707, 0 ), /* 706 server_of */
- S_ST( 's', 3, 708, 0 ), /* 707 server_off */
- S_ST( 'e', 3, 437, 0 ), /* 708 server_offs */
- S_ST( 't', 3, 710, 700 ), /* 709 se */
- S_ST( 'v', 3, 711, 0 ), /* 710 set */
- S_ST( 'a', 3, 399, 0 ), /* 711 setv */
- S_ST( 'i', 3, 713, 699 ), /* 712 s */
- S_ST( 'm', 3, 714, 0 ), /* 713 si */
- S_ST( 'u', 3, 715, 0 ), /* 714 sim */
- S_ST( 'l', 3, 716, 0 ), /* 715 simu */
- S_ST( 'a', 3, 717, 0 ), /* 716 simul */
- S_ST( 't', 3, 718, 0 ), /* 717 simula */
- S_ST( 'i', 3, 719, 434 ), /* 718 simulat */
- S_ST( 'o', 3, 720, 0 ), /* 719 simulati */
- S_ST( 'n', 3, 721, 0 ), /* 720 simulatio */
- S_ST( '_', 3, 722, 0 ), /* 721 simulation */
- S_ST( 'd', 3, 723, 0 ), /* 722 simulation_ */
- S_ST( 'u', 3, 724, 0 ), /* 723 simulation_d */
- S_ST( 'r', 3, 725, 0 ), /* 724 simulation_du */
- S_ST( 'a', 3, 726, 0 ), /* 725 simulation_dur */
- S_ST( 't', 3, 727, 0 ), /* 726 simulation_dura */
- S_ST( 'i', 3, 728, 0 ), /* 727 simulation_durat */
- S_ST( 'o', 3, 436, 0 ), /* 728 simulation_durati */
- S_ST( 'o', 3, 730, 712 ), /* 729 s */
- S_ST( 'u', 3, 731, 0 ), /* 730 so */
- S_ST( 'r', 3, 732, 0 ), /* 731 sou */
- S_ST( 'c', 3, 400, 0 ), /* 732 sour */
- S_ST( 't', 3, 751, 729 ), /* 733 s */
- S_ST( 'a', 3, 740, 0 ), /* 734 st */
- S_ST( 'c', 3, 736, 0 ), /* 735 sta */
- S_ST( 'k', 3, 737, 0 ), /* 736 stac */
- S_ST( 's', 3, 738, 0 ), /* 737 stack */
- S_ST( 'i', 3, 739, 0 ), /* 738 stacks */
- S_ST( 'z', 3, 401, 0 ), /* 739 stacksi */
- S_ST( 't', 3, 403, 735 ), /* 740 sta */
- S_ST( 'i', 3, 742, 0 ), /* 741 stat */
- S_ST( 's', 3, 743, 0 ), /* 742 stati */
- S_ST( 't', 3, 744, 0 ), /* 743 statis */
- S_ST( 'i', 3, 745, 0 ), /* 744 statist */
- S_ST( 'c', 3, 402, 0 ), /* 745 statisti */
- S_ST( 'd', 3, 747, 0 ), /* 746 stats */
- S_ST( 'i', 3, 404, 0 ), /* 747 statsd */
- S_ST( 'e', 3, 405, 734 ), /* 748 st */
- S_ST( 'o', 3, 750, 0 ), /* 749 step */
- S_ST( 'u', 3, 406, 0 ), /* 750 stepo */
- S_ST( 'r', 3, 752, 748 ), /* 751 st */
- S_ST( 'a', 3, 753, 0 ), /* 752 str */
- S_ST( 't', 3, 754, 0 ), /* 753 stra */
- S_ST( 'u', 3, 407, 0 ), /* 754 strat */
- S_ST( 'y', 3, 409, 733 ), /* 755 s */
- S_ST( 's', 3, 757, 0 ), /* 756 sys */
- S_ST( 't', 3, 758, 0 ), /* 757 syss */
- S_ST( 'a', 3, 759, 0 ), /* 758 sysst */
- S_ST( 't', 3, 410, 0 ), /* 759 syssta */
- S_ST( 't', 3, 786, 687 ), /* 760 */
- S_ST( 'i', 3, 772, 0 ), /* 761 t */
- S_ST( 'c', 3, 411, 0 ), /* 762 ti */
- S_ST( 'm', 3, 765, 762 ), /* 763 ti */
- S_ST( 'e', 3, 414, 0 ), /* 764 tim */
- S_ST( 'i', 3, 766, 764 ), /* 765 tim */
- S_ST( 'n', 3, 767, 0 ), /* 766 timi */
- S_ST( 'g', 3, 768, 0 ), /* 767 timin */
- S_ST( 's', 3, 769, 0 ), /* 768 timing */
- S_ST( 't', 3, 770, 0 ), /* 769 timings */
- S_ST( 'a', 3, 771, 0 ), /* 770 timingst */
- S_ST( 't', 3, 415, 0 ), /* 771 timingsta */
- S_ST( 'n', 3, 773, 763 ), /* 772 ti */
- S_ST( 'k', 3, 774, 0 ), /* 773 tin */
- S_ST( 'e', 3, 416, 0 ), /* 774 tink */
- S_ST( 'o', 3, 417, 761 ), /* 775 t */
- S_ST( 'r', 3, 778, 775 ), /* 776 t */
- S_ST( 'a', 3, 418, 0 ), /* 777 tr */
- S_ST( 'u', 3, 779, 777 ), /* 778 tr */
- S_ST( 's', 3, 780, 419 ), /* 779 tru */
- S_ST( 't', 3, 781, 0 ), /* 780 trus */
- S_ST( 'e', 3, 782, 0 ), /* 781 trust */
- S_ST( 'd', 3, 783, 0 ), /* 782 truste */
- S_ST( 'k', 3, 784, 0 ), /* 783 trusted */
- S_ST( 'e', 3, 420, 0 ), /* 784 trustedk */
- S_ST( 't', 3, 421, 776 ), /* 785 t */
- S_ST( 'y', 3, 787, 785 ), /* 786 t */
- S_ST( 'p', 3, 422, 0 ), /* 787 ty */
- S_ST( 'u', 3, 789, 760 ), /* 788 */
- S_ST( 'n', 3, 795, 0 ), /* 789 u */
- S_ST( 'c', 3, 791, 0 ), /* 790 un */
- S_ST( 'o', 3, 792, 0 ), /* 791 unc */
- S_ST( 'n', 3, 793, 0 ), /* 792 unco */
- S_ST( 'f', 3, 794, 0 ), /* 793 uncon */
- S_ST( 'i', 3, 424, 0 ), /* 794 unconf */
- S_ST( 'p', 3, 796, 790 ), /* 795 un */
- S_ST( 'e', 3, 797, 0 ), /* 796 unp */
- S_ST( 'e', 3, 425, 0 ), /* 797 unpe */
- S_ST( 'v', 3, 799, 788 ), /* 798 */
- S_ST( 'e', 3, 800, 0 ), /* 799 v */
- S_ST( 'r', 3, 801, 0 ), /* 800 ve */
- S_ST( 's', 3, 802, 0 ), /* 801 ver */
- S_ST( 'i', 3, 803, 0 ), /* 802 vers */
- S_ST( 'o', 3, 426, 0 ), /* 803 versi */
- S_ST( 'w', 3, 811, 798 ), /* 804 */
- S_ST( 'a', 3, 806, 0 ), /* 805 w */
- S_ST( 'n', 3, 807, 0 ), /* 806 wa */
- S_ST( 'd', 3, 808, 0 ), /* 807 wan */
- S_ST( 'e', 3, 440, 0 ), /* 808 wand */
- S_ST( 'e', 3, 810, 805 ), /* 809 w */
- S_ST( 'e', 3, 428, 0 ), /* 810 we */
- S_ST( 'i', 3, 812, 809 ), /* 811 w */
- S_ST( 'l', 3, 813, 0 ), /* 812 wi */
- S_ST( 'd', 3, 814, 0 ), /* 813 wil */
- S_ST( 'c', 3, 815, 0 ), /* 814 wild */
- S_ST( 'a', 3, 816, 0 ), /* 815 wildc */
- S_ST( 'r', 3, 429, 0 ), /* 816 wildca */
- S_ST( 'x', 3, 818, 804 ), /* 817 */
- S_ST( 'l', 3, 819, 0 ), /* 818 x */
- S_ST( 'e', 3, 820, 0 ), /* 819 xl */
- S_ST( 'a', 3, 821, 0 ), /* 820 xle */
- S_ST( 'v', 3, 430, 0 ), /* 821 xlea */
- S_ST( 'y', 3, 823, 817 ), /* 822 [initial state] */
- S_ST( 'e', 3, 824, 0 ), /* 823 y */
- S_ST( 'a', 3, 431, 0 ) /* 824 ye */
+ S_ST( 's', 0, 0, 0 ), /* 346 T_Mdnstries */
+ S_ST( 'm', 0, 502, 0 ), /* 347 T_Mem */
+ S_ST( 'k', 0, 0, 0 ), /* 348 T_Memlock */
+ S_ST( 'k', 0, 0, 0 ), /* 349 T_Minclock */
+ S_ST( 'h', 0, 0, 0 ), /* 350 T_Mindepth */
+ S_ST( 't', 0, 0, 0 ), /* 351 T_Mindist */
+ S_ST( 'm', 0, 0, 0 ), /* 352 T_Minimum */
+ S_ST( 'l', 0, 0, 0 ), /* 353 T_Minpoll */
+ S_ST( 'e', 0, 0, 0 ), /* 354 T_Minsane */
+ S_ST( 'e', 0, 356, 0 ), /* 355 T_Mode */
+ S_ST( '7', 0, 0, 0 ), /* 356 T_Mode7 */
+ S_ST( 'r', 0, 0, 0 ), /* 357 T_Monitor */
+ S_ST( 'h', 0, 0, 0 ), /* 358 T_Month */
+ S_ST( 'u', 0, 0, 0 ), /* 359 T_Mru */
+ S_ST( 't', 2, 0, 0 ), /* 360 T_Multicastclient */
+ S_ST( 'c', 0, 0, 0 ), /* 361 T_Nic */
+ S_ST( 'k', 0, 0, 0 ), /* 362 T_Nolink */
+ S_ST( 'y', 0, 0, 0 ), /* 363 T_Nomodify */
+ S_ST( 't', 0, 0, 0 ), /* 364 T_Nomrulist */
+ S_ST( 'e', 0, 0, 0 ), /* 365 T_None */
+ S_ST( 'e', 0, 0, 0 ), /* 366 T_Nonvolatile */
+ S_ST( 'r', 0, 0, 0 ), /* 367 T_Nopeer */
+ S_ST( 'y', 0, 0, 0 ), /* 368 T_Noquery */
+ S_ST( 't', 0, 0, 0 ), /* 369 T_Noselect */
+ S_ST( 'e', 0, 0, 0 ), /* 370 T_Noserve */
+ S_ST( 'p', 0, 0, 0 ), /* 371 T_Notrap */
+ S_ST( 't', 0, 0, 0 ), /* 372 T_Notrust */
+ S_ST( 'p', 0, 598, 0 ), /* 373 T_Ntp */
+ S_ST( 't', 0, 0, 0 ), /* 374 T_Ntpport */
+ S_ST( 't', 1, 0, 0 ), /* 375 T_NtpSignDsocket */
+ S_ST( 'n', 0, 613, 0 ), /* 376 T_Orphan */
+ S_ST( 't', 0, 0, 0 ), /* 377 T_Orphanwait */
+ S_ST( 'c', 0, 0, 0 ), /* 378 T_Panic */
+ S_ST( 'r', 1, 622, 0 ), /* 379 T_Peer */
+ S_ST( 's', 0, 0, 0 ), /* 380 T_Peerstats */
+ S_ST( 'e', 2, 0, 0 ), /* 381 T_Phone */
+ S_ST( 'd', 0, 630, 0 ), /* 382 T_Pid */
+ S_ST( 'e', 1, 0, 0 ), /* 383 T_Pidfile */
+ S_ST( 'l', 1, 0, 0 ), /* 384 T_Pool */
+ S_ST( 't', 0, 0, 0 ), /* 385 T_Port */
+ S_ST( 't', 0, 0, 0 ), /* 386 T_Preempt */
+ S_ST( 'r', 0, 0, 0 ), /* 387 T_Prefer */
+ S_ST( 's', 0, 0, 0 ), /* 388 T_Protostats */
+ S_ST( 'w', 1, 0, 636 ), /* 389 T_Pw */
+ S_ST( 'e', 1, 0, 0 ), /* 390 T_Randfile */
+ S_ST( 's', 0, 0, 0 ), /* 391 T_Rawstats */
+ S_ST( 'd', 1, 0, 0 ), /* 392 T_Refid */
+ S_ST( 'y', 0, 0, 0 ), /* 393 T_Requestkey */
+ S_ST( 't', 0, 0, 0 ), /* 394 T_Reset */
+ S_ST( 't', 0, 0, 0 ), /* 395 T_Restrict */
+ S_ST( 'e', 0, 0, 0 ), /* 396 T_Revoke */
+ S_ST( 't', 0, 0, 0 ), /* 397 T_Rlimit */
+ S_ST( 'r', 1, 0, 0 ), /* 398 T_Saveconfigdir */
+ S_ST( 'r', 1, 713, 0 ), /* 399 T_Server */
+ S_ST( 'r', 1, 0, 0 ), /* 400 T_Setvar */
+ S_ST( 'e', 0, 0, 0 ), /* 401 T_Source */
+ S_ST( 'e', 0, 0, 0 ), /* 402 T_Stacksize */
+ S_ST( 's', 0, 0, 0 ), /* 403 T_Statistics */
+ S_ST( 's', 0, 756, 751 ), /* 404 T_Stats */
+ S_ST( 'r', 1, 0, 0 ), /* 405 T_Statsdir */
+ S_ST( 'p', 0, 764, 0 ), /* 406 T_Step */
+ S_ST( 'k', 0, 0, 0 ), /* 407 T_Stepback */
+ S_ST( 'd', 0, 0, 0 ), /* 408 T_Stepfwd */
+ S_ST( 't', 0, 0, 0 ), /* 409 T_Stepout */
+ S_ST( 'm', 0, 0, 0 ), /* 410 T_Stratum */
+ S_ST( 'l', 3, 334, 0 ), /* 411 logfi */
+ S_ST( 's', 0, 771, 0 ), /* 412 T_Sys */
+ S_ST( 's', 0, 0, 0 ), /* 413 T_Sysstats */
+ S_ST( 'k', 0, 0, 0 ), /* 414 T_Tick */
+ S_ST( '1', 0, 0, 0 ), /* 415 T_Time1 */
+ S_ST( '2', 0, 0, 415 ), /* 416 T_Time2 */
+ S_ST( 'r', 0, 0, 416 ), /* 417 T_Timer */
+ S_ST( 's', 0, 0, 0 ), /* 418 T_Timingstats */
+ S_ST( 'r', 0, 0, 0 ), /* 419 T_Tinker */
+ S_ST( 's', 0, 0, 0 ), /* 420 T_Tos */
+ S_ST( 'p', 1, 0, 0 ), /* 421 T_Trap */
+ S_ST( 'e', 0, 0, 0 ), /* 422 T_True */
+ S_ST( 'y', 0, 0, 0 ), /* 423 T_Trustedkey */
+ S_ST( 'l', 0, 0, 0 ), /* 424 T_Ttl */
+ S_ST( 'e', 0, 0, 0 ), /* 425 T_Type */
+ S_ST( 'o', 3, 430, 254 ), /* 426 lo */
+ S_ST( 'g', 1, 0, 0 ), /* 427 T_Unconfig */
+ S_ST( 'r', 1, 0, 0 ), /* 428 T_Unpeer */
+ S_ST( 'n', 0, 0, 0 ), /* 429 T_Version */
+ S_ST( 'p', 3, 435, 0 ), /* 430 loo */
+ S_ST( 'k', 0, 0, 0 ), /* 431 T_Week */
+ S_ST( 'd', 0, 0, 0 ), /* 432 T_Wildcard */
+ S_ST( 'e', 0, 0, 0 ), /* 433 T_Xleave */
+ S_ST( 'r', 0, 0, 0 ), /* 434 T_Year */
+ S_ST( 's', 3, 436, 0 ), /* 435 loop */
+ S_ST( 't', 3, 447, 0 ), /* 436 loops */
+ S_ST( 'e', 0, 0, 0 ), /* 437 T_Simulate */
+ S_ST( 'y', 0, 0, 0 ), /* 438 T_Beep_Delay */
+ S_ST( 'n', 0, 0, 0 ), /* 439 T_Sim_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 440 T_Server_Offset */
+ S_ST( 'n', 0, 0, 0 ), /* 441 T_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 442 T_Freq_Offset */
+ S_ST( 'r', 0, 0, 0 ), /* 443 T_Wander */
+ S_ST( 'r', 0, 0, 0 ), /* 444 T_Jitter */
+ S_ST( 'y', 0, 0, 0 ), /* 445 T_Prop_Delay */
+ S_ST( 'y', 0, 0, 0 ), /* 446 T_Proc_Delay */
+ S_ST( 'a', 3, 448, 0 ), /* 447 loopst */
+ S_ST( 't', 3, 335, 0 ), /* 448 loopsta */
+ S_ST( 'w', 3, 450, 426 ), /* 449 lo */
+ S_ST( 'p', 3, 451, 0 ), /* 450 low */
+ S_ST( 'r', 3, 452, 0 ), /* 451 lowp */
+ S_ST( 'i', 3, 453, 0 ), /* 452 lowpr */
+ S_ST( 'o', 3, 454, 0 ), /* 453 lowpri */
+ S_ST( 't', 3, 455, 0 ), /* 454 lowprio */
+ S_ST( 'r', 3, 456, 0 ), /* 455 lowpriot */
+ S_ST( 'a', 3, 336, 0 ), /* 456 lowpriotr */
+ S_ST( 'm', 3, 538, 237 ), /* 457 */
+ S_ST( 'a', 3, 476, 0 ), /* 458 m */
+ S_ST( 'n', 3, 460, 0 ), /* 459 ma */
+ S_ST( 'y', 3, 461, 0 ), /* 460 man */
+ S_ST( 'c', 3, 462, 0 ), /* 461 many */
+ S_ST( 'a', 3, 463, 0 ), /* 462 manyc */
+ S_ST( 's', 3, 464, 0 ), /* 463 manyca */
+ S_ST( 't', 3, 470, 0 ), /* 464 manycas */
+ S_ST( 'c', 3, 466, 0 ), /* 465 manycast */
+ S_ST( 'l', 3, 467, 0 ), /* 466 manycastc */
+ S_ST( 'i', 3, 468, 0 ), /* 467 manycastcl */
+ S_ST( 'e', 3, 469, 0 ), /* 468 manycastcli */
+ S_ST( 'n', 3, 337, 0 ), /* 469 manycastclie */
+ S_ST( 's', 3, 471, 465 ), /* 470 manycast */
+ S_ST( 'e', 3, 472, 0 ), /* 471 manycasts */
+ S_ST( 'r', 3, 473, 0 ), /* 472 manycastse */
+ S_ST( 'v', 3, 474, 0 ), /* 473 manycastser */
+ S_ST( 'e', 3, 338, 0 ), /* 474 manycastserv */
+ S_ST( 's', 3, 339, 459 ), /* 475 ma */
+ S_ST( 'x', 3, 491, 475 ), /* 476 ma */
+ S_ST( 'a', 3, 478, 0 ), /* 477 max */
+ S_ST( 'g', 3, 340, 0 ), /* 478 maxa */
+ S_ST( 'c', 3, 480, 477 ), /* 479 max */
+ S_ST( 'l', 3, 481, 0 ), /* 480 maxc */
+ S_ST( 'o', 3, 482, 0 ), /* 481 maxcl */
+ S_ST( 'c', 3, 341, 0 ), /* 482 maxclo */
+ S_ST( 'd', 3, 487, 479 ), /* 483 max */
+ S_ST( 'e', 3, 485, 0 ), /* 484 maxd */
+ S_ST( 'p', 3, 486, 0 ), /* 485 maxde */
+ S_ST( 't', 3, 342, 0 ), /* 486 maxdep */
+ S_ST( 'i', 3, 488, 484 ), /* 487 maxd */
+ S_ST( 's', 3, 343, 0 ), /* 488 maxdi */
+ S_ST( 'm', 3, 490, 483 ), /* 489 max */
+ S_ST( 'e', 3, 344, 0 ), /* 490 maxm */
+ S_ST( 'p', 3, 492, 489 ), /* 491 max */
+ S_ST( 'o', 3, 493, 0 ), /* 492 maxp */
+ S_ST( 'l', 3, 345, 0 ), /* 493 maxpo */
+ S_ST( 'd', 3, 495, 458 ), /* 494 m */
+ S_ST( 'n', 3, 496, 0 ), /* 495 md */
+ S_ST( 's', 3, 497, 0 ), /* 496 mdn */
+ S_ST( 't', 3, 498, 0 ), /* 497 mdns */
+ S_ST( 'r', 3, 499, 0 ), /* 498 mdnst */
+ S_ST( 'i', 3, 500, 0 ), /* 499 mdnstr */
+ S_ST( 'e', 3, 346, 0 ), /* 500 mdnstri */
+ S_ST( 'e', 3, 347, 494 ), /* 501 m */
+ S_ST( 'l', 3, 503, 0 ), /* 502 mem */
+ S_ST( 'o', 3, 504, 0 ), /* 503 meml */
+ S_ST( 'c', 3, 348, 0 ), /* 504 memlo */
+ S_ST( 'i', 3, 506, 501 ), /* 505 m */
+ S_ST( 'n', 3, 523, 0 ), /* 506 mi */
+ S_ST( 'c', 3, 508, 0 ), /* 507 min */
+ S_ST( 'l', 3, 509, 0 ), /* 508 minc */
+ S_ST( 'o', 3, 510, 0 ), /* 509 mincl */
+ S_ST( 'c', 3, 349, 0 ), /* 510 minclo */
+ S_ST( 'd', 3, 515, 507 ), /* 511 min */
+ S_ST( 'e', 3, 513, 0 ), /* 512 mind */
+ S_ST( 'p', 3, 514, 0 ), /* 513 minde */
+ S_ST( 't', 3, 350, 0 ), /* 514 mindep */
+ S_ST( 'i', 3, 516, 512 ), /* 515 mind */
+ S_ST( 's', 3, 351, 0 ), /* 516 mindi */
+ S_ST( 'i', 3, 518, 511 ), /* 517 min */
+ S_ST( 'm', 3, 519, 0 ), /* 518 mini */
+ S_ST( 'u', 3, 352, 0 ), /* 519 minim */
+ S_ST( 'p', 3, 521, 517 ), /* 520 min */
+ S_ST( 'o', 3, 522, 0 ), /* 521 minp */
+ S_ST( 'l', 3, 353, 0 ), /* 522 minpo */
+ S_ST( 's', 3, 524, 520 ), /* 523 min */
+ S_ST( 'a', 3, 525, 0 ), /* 524 mins */
+ S_ST( 'n', 3, 354, 0 ), /* 525 minsa */
+ S_ST( 'o', 3, 528, 505 ), /* 526 m */
+ S_ST( 'd', 3, 355, 0 ), /* 527 mo */
+ S_ST( 'n', 3, 532, 527 ), /* 528 mo */
+ S_ST( 'i', 3, 530, 0 ), /* 529 mon */
+ S_ST( 't', 3, 531, 0 ), /* 530 moni */
+ S_ST( 'o', 3, 357, 0 ), /* 531 monit */
+ S_ST( 't', 3, 358, 529 ), /* 532 mon */
+ S_ST( 'r', 3, 359, 526 ), /* 533 m */
+ S_ST( 's', 3, 535, 533 ), /* 534 m */
+ S_ST( 's', 3, 536, 0 ), /* 535 ms */
+ S_ST( 'n', 3, 537, 0 ), /* 536 mss */
+ S_ST( 't', 3, 328, 0 ), /* 537 mssn */
+ S_ST( 'u', 3, 539, 534 ), /* 538 m */
+ S_ST( 'l', 3, 540, 0 ), /* 539 mu */
+ S_ST( 't', 3, 541, 0 ), /* 540 mul */
+ S_ST( 'i', 3, 542, 0 ), /* 541 mult */
+ S_ST( 'c', 3, 543, 0 ), /* 542 multi */
+ S_ST( 'a', 3, 544, 0 ), /* 543 multic */
+ S_ST( 's', 3, 545, 0 ), /* 544 multica */
+ S_ST( 't', 3, 546, 0 ), /* 545 multicas */
+ S_ST( 'c', 3, 547, 0 ), /* 546 multicast */
+ S_ST( 'l', 3, 548, 0 ), /* 547 multicastc */
+ S_ST( 'i', 3, 549, 0 ), /* 548 multicastcl */
+ S_ST( 'e', 3, 550, 0 ), /* 549 multicastcli */
+ S_ST( 'n', 3, 360, 0 ), /* 550 multicastclie */
+ S_ST( 'n', 3, 594, 457 ), /* 551 */
+ S_ST( 'i', 3, 361, 0 ), /* 552 n */
+ S_ST( 'o', 3, 589, 552 ), /* 553 n */
+ S_ST( 'l', 3, 555, 0 ), /* 554 no */
+ S_ST( 'i', 3, 556, 0 ), /* 555 nol */
+ S_ST( 'n', 3, 362, 0 ), /* 556 noli */
+ S_ST( 'm', 3, 562, 554 ), /* 557 no */
+ S_ST( 'o', 3, 559, 0 ), /* 558 nom */
+ S_ST( 'd', 3, 560, 0 ), /* 559 nomo */
+ S_ST( 'i', 3, 561, 0 ), /* 560 nomod */
+ S_ST( 'f', 3, 363, 0 ), /* 561 nomodi */
+ S_ST( 'r', 3, 563, 558 ), /* 562 nom */
+ S_ST( 'u', 3, 564, 0 ), /* 563 nomr */
+ S_ST( 'l', 3, 565, 0 ), /* 564 nomru */
+ S_ST( 'i', 3, 566, 0 ), /* 565 nomrul */
+ S_ST( 's', 3, 364, 0 ), /* 566 nomruli */
+ S_ST( 'n', 3, 568, 557 ), /* 567 no */
+ S_ST( 'v', 3, 569, 365 ), /* 568 non */
+ S_ST( 'o', 3, 570, 0 ), /* 569 nonv */
+ S_ST( 'l', 3, 571, 0 ), /* 570 nonvo */
+ S_ST( 'a', 3, 572, 0 ), /* 571 nonvol */
+ S_ST( 't', 3, 573, 0 ), /* 572 nonvola */
+ S_ST( 'i', 3, 574, 0 ), /* 573 nonvolat */
+ S_ST( 'l', 3, 366, 0 ), /* 574 nonvolati */
+ S_ST( 'p', 3, 576, 567 ), /* 575 no */
+ S_ST( 'e', 3, 577, 0 ), /* 576 nop */
+ S_ST( 'e', 3, 367, 0 ), /* 577 nope */
+ S_ST( 'q', 3, 579, 575 ), /* 578 no */
+ S_ST( 'u', 3, 580, 0 ), /* 579 noq */
+ S_ST( 'e', 3, 581, 0 ), /* 580 noqu */
+ S_ST( 'r', 3, 368, 0 ), /* 581 noque */
+ S_ST( 's', 3, 583, 578 ), /* 582 no */
+ S_ST( 'e', 3, 587, 0 ), /* 583 nos */
+ S_ST( 'l', 3, 585, 0 ), /* 584 nose */
+ S_ST( 'e', 3, 586, 0 ), /* 585 nosel */
+ S_ST( 'c', 3, 369, 0 ), /* 586 nosele */
+ S_ST( 'r', 3, 588, 584 ), /* 587 nose */
+ S_ST( 'v', 3, 370, 0 ), /* 588 noser */
+ S_ST( 't', 3, 590, 582 ), /* 589 no */
+ S_ST( 'r', 3, 592, 0 ), /* 590 not */
+ S_ST( 'a', 3, 371, 0 ), /* 591 notr */
+ S_ST( 'u', 3, 593, 591 ), /* 592 notr */
+ S_ST( 's', 3, 372, 0 ), /* 593 notru */
+ S_ST( 't', 3, 373, 553 ), /* 594 n */
+ S_ST( 'p', 3, 596, 0 ), /* 595 ntp */
+ S_ST( 'o', 3, 597, 0 ), /* 596 ntpp */
+ S_ST( 'r', 3, 374, 0 ), /* 597 ntppo */
+ S_ST( 's', 3, 599, 595 ), /* 598 ntp */
+ S_ST( 'i', 3, 600, 0 ), /* 599 ntps */
+ S_ST( 'g', 3, 601, 0 ), /* 600 ntpsi */
+ S_ST( 'n', 3, 602, 0 ), /* 601 ntpsig */
+ S_ST( 'd', 3, 603, 0 ), /* 602 ntpsign */
+ S_ST( 's', 3, 604, 0 ), /* 603 ntpsignd */
+ S_ST( 'o', 3, 605, 0 ), /* 604 ntpsignds */
+ S_ST( 'c', 3, 606, 0 ), /* 605 ntpsigndso */
+ S_ST( 'k', 3, 607, 0 ), /* 606 ntpsigndsoc */
+ S_ST( 'e', 3, 375, 0 ), /* 607 ntpsigndsock */
+ S_ST( 'o', 3, 609, 551 ), /* 608 */
+ S_ST( 'r', 3, 610, 0 ), /* 609 o */
+ S_ST( 'p', 3, 611, 0 ), /* 610 or */
+ S_ST( 'h', 3, 612, 0 ), /* 611 orp */
+ S_ST( 'a', 3, 376, 0 ), /* 612 orph */
+ S_ST( 'w', 3, 614, 0 ), /* 613 orphan */
+ S_ST( 'a', 3, 615, 0 ), /* 614 orphanw */
+ S_ST( 'i', 3, 377, 0 ), /* 615 orphanwa */
+ S_ST( 'p', 3, 389, 608 ), /* 616 */
+ S_ST( 'a', 3, 618, 0 ), /* 617 p */
+ S_ST( 'n', 3, 619, 0 ), /* 618 pa */
+ S_ST( 'i', 3, 378, 0 ), /* 619 pan */
+ S_ST( 'e', 3, 621, 617 ), /* 620 p */
+ S_ST( 'e', 3, 379, 0 ), /* 621 pe */
+ S_ST( 's', 3, 623, 0 ), /* 622 peer */
+ S_ST( 't', 3, 624, 0 ), /* 623 peers */
+ S_ST( 'a', 3, 625, 0 ), /* 624 peerst */
+ S_ST( 't', 3, 380, 0 ), /* 625 peersta */
+ S_ST( 'h', 3, 627, 620 ), /* 626 p */
+ S_ST( 'o', 3, 628, 0 ), /* 627 ph */
+ S_ST( 'n', 3, 381, 0 ), /* 628 pho */
+ S_ST( 'i', 3, 382, 626 ), /* 629 p */
+ S_ST( 'f', 3, 631, 0 ), /* 630 pid */
+ S_ST( 'i', 3, 632, 0 ), /* 631 pidf */
+ S_ST( 'l', 3, 383, 0 ), /* 632 pidfi */
+ S_ST( 'o', 3, 635, 629 ), /* 633 p */
+ S_ST( 'o', 3, 384, 0 ), /* 634 po */
+ S_ST( 'r', 3, 385, 634 ), /* 635 po */
+ S_ST( 'r', 3, 643, 633 ), /* 636 p */
+ S_ST( 'e', 3, 641, 0 ), /* 637 pr */
+ S_ST( 'e', 3, 639, 0 ), /* 638 pre */
+ S_ST( 'm', 3, 640, 0 ), /* 639 pree */
+ S_ST( 'p', 3, 386, 0 ), /* 640 preem */
+ S_ST( 'f', 3, 642, 638 ), /* 641 pre */
+ S_ST( 'e', 3, 387, 0 ), /* 642 pref */
+ S_ST( 'o', 3, 656, 637 ), /* 643 pr */
+ S_ST( 'c', 3, 645, 0 ), /* 644 pro */
+ S_ST( '_', 3, 646, 0 ), /* 645 proc */
+ S_ST( 'd', 3, 647, 0 ), /* 646 proc_ */
+ S_ST( 'e', 3, 648, 0 ), /* 647 proc_d */
+ S_ST( 'l', 3, 649, 0 ), /* 648 proc_de */
+ S_ST( 'a', 3, 446, 0 ), /* 649 proc_del */
+ S_ST( 'p', 3, 651, 644 ), /* 650 pro */
+ S_ST( '_', 3, 652, 0 ), /* 651 prop */
+ S_ST( 'd', 3, 653, 0 ), /* 652 prop_ */
+ S_ST( 'e', 3, 654, 0 ), /* 653 prop_d */
+ S_ST( 'l', 3, 655, 0 ), /* 654 prop_de */
+ S_ST( 'a', 3, 445, 0 ), /* 655 prop_del */
+ S_ST( 't', 3, 657, 650 ), /* 656 pro */
+ S_ST( 'o', 3, 658, 0 ), /* 657 prot */
+ S_ST( 's', 3, 659, 0 ), /* 658 proto */
+ S_ST( 't', 3, 660, 0 ), /* 659 protos */
+ S_ST( 'a', 3, 661, 0 ), /* 660 protost */
+ S_ST( 't', 3, 388, 0 ), /* 661 protosta */
+ S_ST( 'r', 3, 693, 616 ), /* 662 */
+ S_ST( 'a', 3, 669, 0 ), /* 663 r */
+ S_ST( 'n', 3, 665, 0 ), /* 664 ra */
+ S_ST( 'd', 3, 666, 0 ), /* 665 ran */
+ S_ST( 'f', 3, 667, 0 ), /* 666 rand */
+ S_ST( 'i', 3, 668, 0 ), /* 667 randf */
+ S_ST( 'l', 3, 390, 0 ), /* 668 randfi */
+ S_ST( 'w', 3, 670, 664 ), /* 669 ra */
+ S_ST( 's', 3, 671, 0 ), /* 670 raw */
+ S_ST( 't', 3, 672, 0 ), /* 671 raws */
+ S_ST( 'a', 3, 673, 0 ), /* 672 rawst */
+ S_ST( 't', 3, 391, 0 ), /* 673 rawsta */
+ S_ST( 'e', 3, 690, 663 ), /* 674 r */
+ S_ST( 'f', 3, 676, 0 ), /* 675 re */
+ S_ST( 'i', 3, 392, 0 ), /* 676 ref */
+ S_ST( 'q', 3, 678, 675 ), /* 677 re */
+ S_ST( 'u', 3, 679, 0 ), /* 678 req */
+ S_ST( 'e', 3, 680, 0 ), /* 679 requ */
+ S_ST( 's', 3, 681, 0 ), /* 680 reque */
+ S_ST( 't', 3, 682, 0 ), /* 681 reques */
+ S_ST( 'k', 3, 683, 0 ), /* 682 request */
+ S_ST( 'e', 3, 393, 0 ), /* 683 requestk */
+ S_ST( 's', 3, 686, 677 ), /* 684 re */
+ S_ST( 'e', 3, 394, 0 ), /* 685 res */
+ S_ST( 't', 3, 687, 685 ), /* 686 res */
+ S_ST( 'r', 3, 688, 0 ), /* 687 rest */
+ S_ST( 'i', 3, 689, 0 ), /* 688 restr */
+ S_ST( 'c', 3, 395, 0 ), /* 689 restri */
+ S_ST( 'v', 3, 691, 684 ), /* 690 re */
+ S_ST( 'o', 3, 692, 0 ), /* 691 rev */
+ S_ST( 'k', 3, 396, 0 ), /* 692 revo */
+ S_ST( 'l', 3, 694, 674 ), /* 693 r */
+ S_ST( 'i', 3, 695, 0 ), /* 694 rl */
+ S_ST( 'm', 3, 696, 0 ), /* 695 rli */
+ S_ST( 'i', 3, 397, 0 ), /* 696 rlim */
+ S_ST( 's', 3, 770, 662 ), /* 697 */
+ S_ST( 'a', 3, 699, 0 ), /* 698 s */
+ S_ST( 'v', 3, 700, 0 ), /* 699 sa */
+ S_ST( 'e', 3, 701, 0 ), /* 700 sav */
+ S_ST( 'c', 3, 702, 0 ), /* 701 save */
+ S_ST( 'o', 3, 703, 0 ), /* 702 savec */
+ S_ST( 'n', 3, 704, 0 ), /* 703 saveco */
+ S_ST( 'f', 3, 705, 0 ), /* 704 savecon */
+ S_ST( 'i', 3, 706, 0 ), /* 705 saveconf */
+ S_ST( 'g', 3, 707, 0 ), /* 706 saveconfi */
+ S_ST( 'd', 3, 708, 0 ), /* 707 saveconfig */
+ S_ST( 'i', 3, 398, 0 ), /* 708 saveconfigd */
+ S_ST( 'e', 3, 719, 698 ), /* 709 s */
+ S_ST( 'r', 3, 711, 0 ), /* 710 se */
+ S_ST( 'v', 3, 712, 0 ), /* 711 ser */
+ S_ST( 'e', 3, 399, 0 ), /* 712 serv */
+ S_ST( '_', 3, 714, 0 ), /* 713 server */
+ S_ST( 'o', 3, 715, 0 ), /* 714 server_ */
+ S_ST( 'f', 3, 716, 0 ), /* 715 server_o */
+ S_ST( 'f', 3, 717, 0 ), /* 716 server_of */
+ S_ST( 's', 3, 718, 0 ), /* 717 server_off */
+ S_ST( 'e', 3, 440, 0 ), /* 718 server_offs */
+ S_ST( 't', 3, 720, 710 ), /* 719 se */
+ S_ST( 'v', 3, 721, 0 ), /* 720 set */
+ S_ST( 'a', 3, 400, 0 ), /* 721 setv */
+ S_ST( 'i', 3, 723, 709 ), /* 722 s */
+ S_ST( 'm', 3, 724, 0 ), /* 723 si */
+ S_ST( 'u', 3, 725, 0 ), /* 724 sim */
+ S_ST( 'l', 3, 726, 0 ), /* 725 simu */
+ S_ST( 'a', 3, 727, 0 ), /* 726 simul */
+ S_ST( 't', 3, 728, 0 ), /* 727 simula */
+ S_ST( 'i', 3, 729, 437 ), /* 728 simulat */
+ S_ST( 'o', 3, 730, 0 ), /* 729 simulati */
+ S_ST( 'n', 3, 731, 0 ), /* 730 simulatio */
+ S_ST( '_', 3, 732, 0 ), /* 731 simulation */
+ S_ST( 'd', 3, 733, 0 ), /* 732 simulation_ */
+ S_ST( 'u', 3, 734, 0 ), /* 733 simulation_d */
+ S_ST( 'r', 3, 735, 0 ), /* 734 simulation_du */
+ S_ST( 'a', 3, 736, 0 ), /* 735 simulation_dur */
+ S_ST( 't', 3, 737, 0 ), /* 736 simulation_dura */
+ S_ST( 'i', 3, 738, 0 ), /* 737 simulation_durat */
+ S_ST( 'o', 3, 439, 0 ), /* 738 simulation_durati */
+ S_ST( 'o', 3, 740, 722 ), /* 739 s */
+ S_ST( 'u', 3, 741, 0 ), /* 740 so */
+ S_ST( 'r', 3, 742, 0 ), /* 741 sou */
+ S_ST( 'c', 3, 401, 0 ), /* 742 sour */
+ S_ST( 't', 3, 766, 739 ), /* 743 s */
+ S_ST( 'a', 3, 750, 0 ), /* 744 st */
+ S_ST( 'c', 3, 746, 0 ), /* 745 sta */
+ S_ST( 'k', 3, 747, 0 ), /* 746 stac */
+ S_ST( 's', 3, 748, 0 ), /* 747 stack */
+ S_ST( 'i', 3, 749, 0 ), /* 748 stacks */
+ S_ST( 'z', 3, 402, 0 ), /* 749 stacksi */
+ S_ST( 't', 3, 404, 745 ), /* 750 sta */
+ S_ST( 'i', 3, 752, 0 ), /* 751 stat */
+ S_ST( 's', 3, 753, 0 ), /* 752 stati */
+ S_ST( 't', 3, 754, 0 ), /* 753 statis */
+ S_ST( 'i', 3, 755, 0 ), /* 754 statist */
+ S_ST( 'c', 3, 403, 0 ), /* 755 statisti */
+ S_ST( 'd', 3, 757, 0 ), /* 756 stats */
+ S_ST( 'i', 3, 405, 0 ), /* 757 statsd */
+ S_ST( 'e', 3, 406, 744 ), /* 758 st */
+ S_ST( 'b', 3, 760, 0 ), /* 759 step */
+ S_ST( 'a', 3, 761, 0 ), /* 760 stepb */
+ S_ST( 'c', 3, 407, 0 ), /* 761 stepba */
+ S_ST( 'f', 3, 763, 759 ), /* 762 step */
+ S_ST( 'w', 3, 408, 0 ), /* 763 stepf */
+ S_ST( 'o', 3, 765, 762 ), /* 764 step */
+ S_ST( 'u', 3, 409, 0 ), /* 765 stepo */
+ S_ST( 'r', 3, 767, 758 ), /* 766 st */
+ S_ST( 'a', 3, 768, 0 ), /* 767 str */
+ S_ST( 't', 3, 769, 0 ), /* 768 stra */
+ S_ST( 'u', 3, 410, 0 ), /* 769 strat */
+ S_ST( 'y', 3, 412, 743 ), /* 770 s */
+ S_ST( 's', 3, 772, 0 ), /* 771 sys */
+ S_ST( 't', 3, 773, 0 ), /* 772 syss */
+ S_ST( 'a', 3, 774, 0 ), /* 773 sysst */
+ S_ST( 't', 3, 413, 0 ), /* 774 syssta */
+ S_ST( 't', 3, 801, 697 ), /* 775 */
+ S_ST( 'i', 3, 787, 0 ), /* 776 t */
+ S_ST( 'c', 3, 414, 0 ), /* 777 ti */
+ S_ST( 'm', 3, 780, 777 ), /* 778 ti */
+ S_ST( 'e', 3, 417, 0 ), /* 779 tim */
+ S_ST( 'i', 3, 781, 779 ), /* 780 tim */
+ S_ST( 'n', 3, 782, 0 ), /* 781 timi */
+ S_ST( 'g', 3, 783, 0 ), /* 782 timin */
+ S_ST( 's', 3, 784, 0 ), /* 783 timing */
+ S_ST( 't', 3, 785, 0 ), /* 784 timings */
+ S_ST( 'a', 3, 786, 0 ), /* 785 timingst */
+ S_ST( 't', 3, 418, 0 ), /* 786 timingsta */
+ S_ST( 'n', 3, 788, 778 ), /* 787 ti */
+ S_ST( 'k', 3, 789, 0 ), /* 788 tin */
+ S_ST( 'e', 3, 419, 0 ), /* 789 tink */
+ S_ST( 'o', 3, 420, 776 ), /* 790 t */
+ S_ST( 'r', 3, 793, 790 ), /* 791 t */
+ S_ST( 'a', 3, 421, 0 ), /* 792 tr */
+ S_ST( 'u', 3, 794, 792 ), /* 793 tr */
+ S_ST( 's', 3, 795, 422 ), /* 794 tru */
+ S_ST( 't', 3, 796, 0 ), /* 795 trus */
+ S_ST( 'e', 3, 797, 0 ), /* 796 trust */
+ S_ST( 'd', 3, 798, 0 ), /* 797 truste */
+ S_ST( 'k', 3, 799, 0 ), /* 798 trusted */
+ S_ST( 'e', 3, 423, 0 ), /* 799 trustedk */
+ S_ST( 't', 3, 424, 791 ), /* 800 t */
+ S_ST( 'y', 3, 802, 800 ), /* 801 t */
+ S_ST( 'p', 3, 425, 0 ), /* 802 ty */
+ S_ST( 'u', 3, 804, 775 ), /* 803 */
+ S_ST( 'n', 3, 810, 0 ), /* 804 u */
+ S_ST( 'c', 3, 806, 0 ), /* 805 un */
+ S_ST( 'o', 3, 807, 0 ), /* 806 unc */
+ S_ST( 'n', 3, 808, 0 ), /* 807 unco */
+ S_ST( 'f', 3, 809, 0 ), /* 808 uncon */
+ S_ST( 'i', 3, 427, 0 ), /* 809 unconf */
+ S_ST( 'p', 3, 811, 805 ), /* 810 un */
+ S_ST( 'e', 3, 812, 0 ), /* 811 unp */
+ S_ST( 'e', 3, 428, 0 ), /* 812 unpe */
+ S_ST( 'v', 3, 814, 803 ), /* 813 */
+ S_ST( 'e', 3, 815, 0 ), /* 814 v */
+ S_ST( 'r', 3, 816, 0 ), /* 815 ve */
+ S_ST( 's', 3, 817, 0 ), /* 816 ver */
+ S_ST( 'i', 3, 818, 0 ), /* 817 vers */
+ S_ST( 'o', 3, 429, 0 ), /* 818 versi */
+ S_ST( 'w', 3, 826, 813 ), /* 819 */
+ S_ST( 'a', 3, 821, 0 ), /* 820 w */
+ S_ST( 'n', 3, 822, 0 ), /* 821 wa */
+ S_ST( 'd', 3, 823, 0 ), /* 822 wan */
+ S_ST( 'e', 3, 443, 0 ), /* 823 wand */
+ S_ST( 'e', 3, 825, 820 ), /* 824 w */
+ S_ST( 'e', 3, 431, 0 ), /* 825 we */
+ S_ST( 'i', 3, 827, 824 ), /* 826 w */
+ S_ST( 'l', 3, 828, 0 ), /* 827 wi */
+ S_ST( 'd', 3, 829, 0 ), /* 828 wil */
+ S_ST( 'c', 3, 830, 0 ), /* 829 wild */
+ S_ST( 'a', 3, 831, 0 ), /* 830 wildc */
+ S_ST( 'r', 3, 432, 0 ), /* 831 wildca */
+ S_ST( 'x', 3, 833, 819 ), /* 832 */
+ S_ST( 'l', 3, 834, 0 ), /* 833 x */
+ S_ST( 'e', 3, 835, 0 ), /* 834 xl */
+ S_ST( 'a', 3, 836, 0 ), /* 835 xle */
+ S_ST( 'v', 3, 433, 0 ), /* 836 xlea */
+ S_ST( 'y', 3, 838, 832 ), /* 837 [initial state] */
+ S_ST( 'e', 3, 839, 0 ), /* 838 y */
+ S_ST( 'a', 3, 434, 0 ) /* 839 ye */
};
diff --git a/ntpd/ntp_leapsec.c b/ntpd/ntp_leapsec.c
index 14b8cd9..eeef89f 100644
--- a/ntpd/ntp_leapsec.c
+++ b/ntpd/ntp_leapsec.c
@@ -787,7 +787,7 @@ leapsec_add(
const vint64 * now64 ,
int insert)
{
- vint64 ttime, stime;
+ vint64 ttime, starttime;
struct calendar fts;
leap_info_t li;
@@ -815,12 +815,12 @@ leapsec_add(
fts.hour = 0;
fts.minute = 0;
fts.second = 0;
- stime = ntpcal_date_to_ntp64(&fts);
+ starttime = ntpcal_date_to_ntp64(&fts);
fts.month++;
ttime = ntpcal_date_to_ntp64(&fts);
li.ttime = ttime;
- li.stime = ttime.D_s.lo - stime.D_s.lo;
+ li.stime = ttime.D_s.lo - starttime.D_s.lo;
li.taiof = (pt->head.size ? pt->info[0].taiof : pt->head.base_tai)
+ (insert ? 1 : -1);
li.dynls = 1;
@@ -839,7 +839,7 @@ leapsec_raw(
int taiof,
int dynls)
{
- vint64 stime;
+ vint64 starttime;
struct calendar fts;
leap_info_t li;
@@ -856,9 +856,9 @@ leapsec_raw(
return FALSE;
}
fts.month--; /* was in range 1..12, no overflow here! */
- stime = ntpcal_date_to_ntp64(&fts);
+ starttime = ntpcal_date_to_ntp64(&fts);
li.ttime = *ttime;
- li.stime = ttime->D_s.lo - stime.D_s.lo;
+ li.stime = ttime->D_s.lo - starttime.D_s.lo;
li.taiof = (int16_t)taiof;
li.dynls = (dynls != 0);
return add_range(pt, &li);
@@ -920,7 +920,8 @@ do_leap_hash(
/* now do the byte twiddle */
for (wi=0; wi < 5; ++wi)
for (di=3; di >= 0; --di) {
- mac->hv[wi*4 + di] = (unsigned char)tmp[wi];
+ mac->hv[wi*4 + di] =
+ (unsigned char)(tmp[wi] & 0x0FF);
tmp[wi] >>= 8;
}
return TRUE;
@@ -972,7 +973,7 @@ leapsec_validate(
do_hash_data(&mdctx, line+2);
else if (!strncmp(line, "#$", 2))
do_hash_data(&mdctx, line+2);
- else if (isdigit(line[0]))
+ else if (isdigit((unsigned char)line[0]))
do_hash_data(&mdctx, line);
}
isc_sha1_final(&mdctx, ldig.hv);
diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c
index 87db726..e47f83b 100644
--- a/ntpd/ntp_loopfilter.c
+++ b/ntpd/ntp_loopfilter.c
@@ -8,6 +8,9 @@
# include <config.h>
#endif
+#ifdef USE_SNPRINTB
+# include <util.h>
+#endif
#include "ntpd.h"
#include "ntp_io.h"
#include "ntp_unixtime.h"
@@ -43,7 +46,7 @@
#define CLOCK_LIMIT 30 /* poll-adjust threshold */
#define CLOCK_PGATE 4. /* poll-adjust gate */
#define PPS_MAXAGE 120 /* kernel pps signal timeout (s) */
-#define FREQTOD(x) ((x) / 65536e6) /* NTP to double */
+#define FREQTOD(x) ((x) / 65536e6) /* NTP to double */
#define DTOFREQ(x) ((int32)((x) * 65536e6)) /* double to NTP */
/*
@@ -103,7 +106,8 @@
/*
* Program variables that can be tinkered.
*/
-double clock_max = CLOCK_MAX; /* step threshold */
+double clock_max_back = CLOCK_MAX; /* step threshold */
+double clock_max_fwd = CLOCK_MAX; /* step threshold */
double clock_minstep = CLOCK_MINSTEP; /* stepout threshold */
double clock_panic = CLOCK_PANIC; /* panic threshold */
double clock_phi = CLOCK_PHI; /* dispersion rate (s/s) */
@@ -149,8 +153,10 @@ int kern_enable = TRUE; /* kernel support enabled */
int hardpps_enable; /* kernel PPS discipline enabled */
int ext_enable; /* external clock enabled */
int pps_stratum; /* pps stratum */
-int allow_panic = FALSE; /* allow panic correction */
-int mode_ntpdate = FALSE; /* exit on first clock set */
+int kernel_status; /* from ntp_adjtime */
+int allow_panic = FALSE; /* allow panic correction (-g) */
+int force_step_once = FALSE; /* always step time once at startup (-G) */
+int mode_ntpdate = FALSE; /* exit on first clock set (-q) */
int freq_cnt; /* initial frequency clamp */
int freq_set; /* initial set frequency switch */
@@ -182,6 +188,21 @@ static sigjmp_buf env; /* environment var. for pll_trap() */
#endif /* SIGSYS */
#endif /* KERNEL_PLL */
+static void
+sync_status(const char *what, int ostatus, int nstatus)
+{
+ char obuf[256], nbuf[256], tbuf[1024];
+#if defined(USE_SNPRINTB) && defined (STA_FMT)
+ snprintb(obuf, sizeof(obuf), STA_FMT, ostatus);
+ snprintb(nbuf, sizeof(nbuf), STA_FMT, nstatus);
+#else
+ snprintf(obuf, sizeof(obuf), "%04x", ostatus);
+ snprintf(nbuf, sizeof(nbuf), "%04x", nstatus);
+#endif
+ snprintf(tbuf, sizeof(tbuf), "%s status: %s -> %s", what, obuf, nbuf);
+ report_event(EVNT_KERN, NULL, tbuf);
+}
+
/*
* file_name - return pointer to non-relative portion of this C file pathname
*/
@@ -189,7 +210,9 @@ static char *file_name(void)
{
if (this_file == NULL) {
(void)strncpy(relative_path, __FILE__, PATH_MAX);
- for (this_file=relative_path; *this_file && ! isalnum(*this_file); this_file++) ;
+ for (this_file=relative_path;
+ *this_file && ! isalnum((unsigned char)*this_file);
+ this_file++) ;
}
return this_file;
}
@@ -259,47 +282,69 @@ ntp_adjtime_error_handler(
}
break;
#ifdef TIME_OK
- case TIME_OK: /* 0 no leap second warning */
- /* OK means OK */
+ case TIME_OK: /* 0: synchronized, no leap second warning */
+ /* msyslog(LOG_INFO, "kernel reports time is synchronized normally"); */
break;
+#else
+# warning TIME_OK is not defined
#endif
#ifdef TIME_INS
- case TIME_INS: /* 1 positive leap second warning */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports positive leap second warning state",
- caller, file_name(), line
- );
+ case TIME_INS: /* 1: positive leap second warning */
+ msyslog(LOG_INFO, "kernel reports leap second insertion scheduled");
break;
+#else
+# warning TIME_INS is not defined
#endif
#ifdef TIME_DEL
- case TIME_DEL: /* 2 negative leap second warning */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports negative leap second warning state",
- caller, file_name(), line
- );
+ case TIME_DEL: /* 2: negative leap second warning */
+ msyslog(LOG_INFO, "kernel reports leap second deletion scheduled");
break;
+#else
+# warning TIME_DEL is not defined
#endif
#ifdef TIME_OOP
- case TIME_OOP: /* 3 leap second in progress */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second in progress",
- caller, file_name(), line
- );
+ case TIME_OOP: /* 3: leap second in progress */
+ msyslog(LOG_INFO, "kernel reports leap second in progress");
break;
+#else
+# warning TIME_OOP is not defined
#endif
#ifdef TIME_WAIT
- case TIME_WAIT: /* 4 leap second has occured */
- msyslog(LOG_INFO, "%s: %s line %d: kernel reports leap second has occured",
- caller, file_name(), line
- );
+ case TIME_WAIT: /* 4: leap second has occured */
+ msyslog(LOG_INFO, "kernel reports leap second has occurred");
break;
+#else
+# warning TIME_WAIT is not defined
#endif
#ifdef TIME_ERROR
- case TIME_ERROR: /* loss of synchronization */
+ case TIME_ERROR: /* 5: unsynchronized, or loss of synchronization */
+ /* error (see status word) */
if (pps_call && !(ptimex->status & STA_PPSSIGNAL))
report_event(EVNT_KERN, NULL,
"PPS no signal");
errno = saved_errno;
DPRINTF(1, ("kernel loop status (%s) %d %m\n",
k_st_flags(ptimex->status), errno));
+ /*
+ * This code may be returned when ntp_adjtime() has just
+ * been called for the first time, quite a while after
+ * startup, when ntpd just starts to discipline the kernel
+ * time. In this case the occurrence of this message
+ * can be pretty confusing.
+ *
+ * HMS: How about a message when we begin kernel processing:
+ * Determining kernel clock state...
+ * so an initial TIME_ERROR message is less confising,
+ * or skipping the first message (ugh),
+ * or ???
+ * msyslog(LOG_INFO, "kernel reports time synchronization lost");
+ */
+ errno = saved_errno; /* may not be needed */
+ msyslog(LOG_INFO, "kernel reports TIME_ERROR: %#x: %s %m",
+ ptimex->status, k_st_flags(ptimex->status));
break;
+#else
+# warning TIME_ERROR is not defined
#endif
default:
msyslog(LOG_NOTICE, "%s: %s line %d: unhandled return value %d from ntp_adjtime in %s at line %d",
@@ -383,7 +428,8 @@ local_clock(
* directly to the terminal.
*/
if (mode_ntpdate) {
- if (fabs(fp_offset) > clock_max && clock_max > 0) {
+ if ( ( fp_offset > clock_max_fwd && clock_max_fwd > 0)
+ || (-fp_offset > clock_max_back && clock_max_back > 0)) {
step_systime(fp_offset);
msyslog(LOG_NOTICE, "ntpd: time set %+.6f s",
fp_offset);
@@ -432,10 +478,10 @@ local_clock(
* threshold (128 ms) and when it does not. Under certain
* conditions updates are suspended until the stepout theshold
* (900 s) is exceeded. See the documentation on how these
- * thresholds interact with commands and command line options.
+ * thresholds interact with commands and command line options.
*
* Note the kernel is disabled if step is disabled or greater
- * than 0.5 s or in ntpdate mode.
+ * than 0.5 s or in ntpdate mode.
*/
osys_poll = sys_poll;
if (sys_poll < peer->minpoll)
@@ -445,7 +491,14 @@ local_clock(
mu = current_time - clock_epoch;
clock_frequency = drift_comp;
rval = 1;
- if (fabs(fp_offset) > clock_max && clock_max > 0) {
+ if ( ( fp_offset > clock_max_fwd && clock_max_fwd > 0)
+ || (-fp_offset > clock_max_back && clock_max_back > 0)
+ || force_step_once ) {
+ if (force_step_once) {
+ force_step_once = FALSE; /* we want this only once after startup */
+ msyslog(LOG_NOTICE, "Doing intital time step" );
+ }
+
switch (state) {
/*
@@ -505,7 +558,7 @@ local_clock(
* threshold. Note that a single spike greater than the
* step threshold is always suppressed, even with a
* long time constant.
- */
+ */
default:
snprintf(tbuf, sizeof(tbuf), "%+.6f s",
fp_offset);
@@ -523,7 +576,6 @@ local_clock(
}
rstclock(EVNT_SYNC, 0);
} else {
-
/*
* The offset is less than the step threshold. Calculate
* the jitter as the exponentially weighted offset
@@ -585,9 +637,9 @@ local_clock(
/*
* The PLL frequency gain (numerator) depends on
* the minimum of the update interval and Allan
- * intercept. This reduces the PLL gain when the
+ * intercept. This reduces the PLL gain when the
* FLL becomes effective.
- */
+ */
etemp = min(ULOGTOD(allan_xpt), mu);
dtemp = 4 * CLOCK_PLL * ULOGTOD(sys_poll);
clock_frequency += fp_offset * etemp / (dtemp *
@@ -663,16 +715,17 @@ local_clock(
* Enable/disable the PPS if requested.
*/
if (hardpps_enable) {
+ ntv.status |= (STA_PPSTIME | STA_PPSFREQ);
if (!(pll_status & STA_PPSTIME))
- report_event(EVNT_KERN,
- NULL, "PPS enabled");
- ntv.status |= STA_PPSTIME | STA_PPSFREQ;
+ sync_status("PPS enabled",
+ pll_status,
+ ntv.status);
} else {
+ ntv.status &= ~(STA_PPSTIME | STA_PPSFREQ);
if (pll_status & STA_PPSTIME)
- report_event(EVNT_KERN,
- NULL, "PPS disabled");
- ntv.status &= ~(STA_PPSTIME |
- STA_PPSFREQ);
+ sync_status("PPS disabled",
+ pll_status,
+ ntv.status);
}
if (sys_leap == LEAP_ADDSECOND)
ntv.status |= STA_INS;
@@ -685,8 +738,13 @@ local_clock(
* the pps. In any case, fetch the kernel offset,
* frequency and jitter.
*/
- if ((ntp_adj_ret = ntp_adjtime(&ntv)) != 0) {
- ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
+ ntp_adj_ret = ntp_adjtime(&ntv);
+ /*
+ * A squeal is a return status < 0, or a state change.
+ */
+ if ((0 > ntp_adj_ret) || (ntp_adj_ret != kernel_status)) {
+ kernel_status = ntp_adj_ret;
+ ntp_adjtime_error_handler(__func__, &ntv, ntp_adj_ret, errno, hardpps_enable, 0, __LINE__ - 1);
}
pll_status = ntv.status;
#ifdef STA_NANO
@@ -867,7 +925,7 @@ adj_host_clock(
clock_offset -= offset_adj;
/*
* Windows port adj_systime() must be called each second,
- * even if the argument is zero, to ease emulation of
+ * even if the argument is zero, to ease emulation of
* adjtime() using Windows' slew API which controls the rate
* but does not automatically stop slewing when an offset
* has decayed to zero.
@@ -896,7 +954,7 @@ rstclock(
report_event(trans, NULL, NULL);
state = trans;
last_offset = clock_offset = offset;
- clock_epoch = current_time;
+ clock_epoch = current_time;
}
@@ -1142,6 +1200,21 @@ loop_config(
break;
case LOOP_KERN_CLEAR:
+#if 0 /* XXX: needs more review, and how can we get here? */
+#ifndef LOCKCLOCK
+# ifdef KERNEL_PLL
+ if (pll_control && kern_enable) {
+ memset((char *)&ntv, 0, sizeof(ntv));
+ ntv.modes = MOD_STATUS;
+ ntv.status = STA_UNSYNC;
+ ntp_adjtime(&ntv);
+ sync_status("kernel time sync disabled",
+ pll_status,
+ ntv.status);
+ }
+# endif /* KERNEL_PLL */
+#endif /* LOCKCLOCK */
+#endif
break;
/*
@@ -1154,12 +1227,12 @@ loop_config(
case LOOP_CODEC: /* audio codec frequency (codec) */
clock_codec = freq / 1e6;
break;
-
+
case LOOP_PHI: /* dispersion threshold (dispersion) */
clock_phi = freq / 1e6;
break;
- case LOOP_FREQ: /* initial frequency (freq) */
+ case LOOP_FREQ: /* initial frequency (freq) */
init_drift_comp = freq;
freq_set++;
break;
@@ -1180,8 +1253,27 @@ loop_config(
break;
case LOOP_MAX: /* step threshold (step) */
- clock_max = freq;
- if (clock_max == 0 || clock_max > 0.5)
+ clock_max_fwd = clock_max_back = freq;
+ if (freq == 0 || freq > 0.5)
+ select_loop(FALSE);
+ break;
+
+ case LOOP_MAX_BACK: /* step threshold (step) */
+ clock_max_back = freq;
+ /*
+ * Leave using the kernel discipline code unless both
+ * limits are massive. This assumes the reason to stop
+ * using it is that it's pointless, not that it goes wrong.
+ */
+ if ( (clock_max_back == 0 || clock_max_back > 0.5)
+ || (clock_max_fwd == 0 || clock_max_fwd > 0.5))
+ select_loop(FALSE);
+ break;
+
+ case LOOP_MAX_FWD: /* step threshold (step) */
+ clock_max_fwd = freq;
+ if ( (clock_max_back == 0 || clock_max_back > 0.5)
+ || (clock_max_fwd == 0 || clock_max_fwd > 0.5))
select_loop(FALSE);
break;
@@ -1189,7 +1281,7 @@ loop_config(
if (freq < CLOCK_MINSTEP)
clock_minstep = CLOCK_MINSTEP;
else
- clock_minstep = freq;
+ clock_minstep = freq;
break;
case LOOP_TICK: /* tick increment (tick) */
diff --git a/ntpd/ntp_parser.c b/ntpd/ntp_parser.c
index b3f4e4f..0cf5519 100644
--- a/ntpd/ntp_parser.c
+++ b/ntpd/ntp_parser.c
@@ -96,7 +96,7 @@
# define ONLY_SIM(a) NULL
#endif
-#line 100 "../../ntpd/ntp_parser.c" /* yacc.c:339 */
+#line 100 "ntp_parser.c" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
@@ -219,104 +219,107 @@ extern int yydebug;
T_Maxdist = 343,
T_Maxmem = 344,
T_Maxpoll = 345,
- T_Mem = 346,
- T_Memlock = 347,
- T_Minclock = 348,
- T_Mindepth = 349,
- T_Mindist = 350,
- T_Minimum = 351,
- T_Minpoll = 352,
- T_Minsane = 353,
- T_Mode = 354,
- T_Mode7 = 355,
- T_Monitor = 356,
- T_Month = 357,
- T_Mru = 358,
- T_Multicastclient = 359,
- T_Nic = 360,
- T_Nolink = 361,
- T_Nomodify = 362,
- T_Nomrulist = 363,
- T_None = 364,
- T_Nonvolatile = 365,
- T_Nopeer = 366,
- T_Noquery = 367,
- T_Noselect = 368,
- T_Noserve = 369,
- T_Notrap = 370,
- T_Notrust = 371,
- T_Ntp = 372,
- T_Ntpport = 373,
- T_NtpSignDsocket = 374,
- T_Orphan = 375,
- T_Orphanwait = 376,
- T_Panic = 377,
- T_Peer = 378,
- T_Peerstats = 379,
- T_Phone = 380,
- T_Pid = 381,
- T_Pidfile = 382,
- T_Pool = 383,
- T_Port = 384,
- T_Preempt = 385,
- T_Prefer = 386,
- T_Protostats = 387,
- T_Pw = 388,
- T_Randfile = 389,
- T_Rawstats = 390,
- T_Refid = 391,
- T_Requestkey = 392,
- T_Reset = 393,
- T_Restrict = 394,
- T_Revoke = 395,
- T_Rlimit = 396,
- T_Saveconfigdir = 397,
- T_Server = 398,
- T_Setvar = 399,
- T_Source = 400,
- T_Stacksize = 401,
- T_Statistics = 402,
- T_Stats = 403,
- T_Statsdir = 404,
- T_Step = 405,
- T_Stepout = 406,
- T_Stratum = 407,
- T_String = 408,
- T_Sys = 409,
- T_Sysstats = 410,
- T_Tick = 411,
- T_Time1 = 412,
- T_Time2 = 413,
- T_Timer = 414,
- T_Timingstats = 415,
- T_Tinker = 416,
- T_Tos = 417,
- T_Trap = 418,
- T_True = 419,
- T_Trustedkey = 420,
- T_Ttl = 421,
- T_Type = 422,
- T_U_int = 423,
- T_Unconfig = 424,
- T_Unpeer = 425,
- T_Version = 426,
- T_WanderThreshold = 427,
- T_Week = 428,
- T_Wildcard = 429,
- T_Xleave = 430,
- T_Year = 431,
- T_Flag = 432,
- T_EOC = 433,
- T_Simulate = 434,
- T_Beep_Delay = 435,
- T_Sim_Duration = 436,
- T_Server_Offset = 437,
- T_Duration = 438,
- T_Freq_Offset = 439,
- T_Wander = 440,
- T_Jitter = 441,
- T_Prop_Delay = 442,
- T_Proc_Delay = 443
+ T_Mdnstries = 346,
+ T_Mem = 347,
+ T_Memlock = 348,
+ T_Minclock = 349,
+ T_Mindepth = 350,
+ T_Mindist = 351,
+ T_Minimum = 352,
+ T_Minpoll = 353,
+ T_Minsane = 354,
+ T_Mode = 355,
+ T_Mode7 = 356,
+ T_Monitor = 357,
+ T_Month = 358,
+ T_Mru = 359,
+ T_Multicastclient = 360,
+ T_Nic = 361,
+ T_Nolink = 362,
+ T_Nomodify = 363,
+ T_Nomrulist = 364,
+ T_None = 365,
+ T_Nonvolatile = 366,
+ T_Nopeer = 367,
+ T_Noquery = 368,
+ T_Noselect = 369,
+ T_Noserve = 370,
+ T_Notrap = 371,
+ T_Notrust = 372,
+ T_Ntp = 373,
+ T_Ntpport = 374,
+ T_NtpSignDsocket = 375,
+ T_Orphan = 376,
+ T_Orphanwait = 377,
+ T_Panic = 378,
+ T_Peer = 379,
+ T_Peerstats = 380,
+ T_Phone = 381,
+ T_Pid = 382,
+ T_Pidfile = 383,
+ T_Pool = 384,
+ T_Port = 385,
+ T_Preempt = 386,
+ T_Prefer = 387,
+ T_Protostats = 388,
+ T_Pw = 389,
+ T_Randfile = 390,
+ T_Rawstats = 391,
+ T_Refid = 392,
+ T_Requestkey = 393,
+ T_Reset = 394,
+ T_Restrict = 395,
+ T_Revoke = 396,
+ T_Rlimit = 397,
+ T_Saveconfigdir = 398,
+ T_Server = 399,
+ T_Setvar = 400,
+ T_Source = 401,
+ T_Stacksize = 402,
+ T_Statistics = 403,
+ T_Stats = 404,
+ T_Statsdir = 405,
+ T_Step = 406,
+ T_Stepback = 407,
+ T_Stepfwd = 408,
+ T_Stepout = 409,
+ T_Stratum = 410,
+ T_String = 411,
+ T_Sys = 412,
+ T_Sysstats = 413,
+ T_Tick = 414,
+ T_Time1 = 415,
+ T_Time2 = 416,
+ T_Timer = 417,
+ T_Timingstats = 418,
+ T_Tinker = 419,
+ T_Tos = 420,
+ T_Trap = 421,
+ T_True = 422,
+ T_Trustedkey = 423,
+ T_Ttl = 424,
+ T_Type = 425,
+ T_U_int = 426,
+ T_Unconfig = 427,
+ T_Unpeer = 428,
+ T_Version = 429,
+ T_WanderThreshold = 430,
+ T_Week = 431,
+ T_Wildcard = 432,
+ T_Xleave = 433,
+ T_Year = 434,
+ T_Flag = 435,
+ T_EOC = 436,
+ T_Simulate = 437,
+ T_Beep_Delay = 438,
+ T_Sim_Duration = 439,
+ T_Server_Offset = 440,
+ T_Duration = 441,
+ T_Freq_Offset = 442,
+ T_Wander = 443,
+ T_Jitter = 444,
+ T_Prop_Delay = 445,
+ T_Proc_Delay = 446
};
#endif
/* Tokens. */
@@ -408,104 +411,107 @@ extern int yydebug;
#define T_Maxdist 343
#define T_Maxmem 344
#define T_Maxpoll 345
-#define T_Mem 346
-#define T_Memlock 347
-#define T_Minclock 348
-#define T_Mindepth 349
-#define T_Mindist 350
-#define T_Minimum 351
-#define T_Minpoll 352
-#define T_Minsane 353
-#define T_Mode 354
-#define T_Mode7 355
-#define T_Monitor 356
-#define T_Month 357
-#define T_Mru 358
-#define T_Multicastclient 359
-#define T_Nic 360
-#define T_Nolink 361
-#define T_Nomodify 362
-#define T_Nomrulist 363
-#define T_None 364
-#define T_Nonvolatile 365
-#define T_Nopeer 366
-#define T_Noquery 367
-#define T_Noselect 368
-#define T_Noserve 369
-#define T_Notrap 370
-#define T_Notrust 371
-#define T_Ntp 372
-#define T_Ntpport 373
-#define T_NtpSignDsocket 374
-#define T_Orphan 375
-#define T_Orphanwait 376
-#define T_Panic 377
-#define T_Peer 378
-#define T_Peerstats 379
-#define T_Phone 380
-#define T_Pid 381
-#define T_Pidfile 382
-#define T_Pool 383
-#define T_Port 384
-#define T_Preempt 385
-#define T_Prefer 386
-#define T_Protostats 387
-#define T_Pw 388
-#define T_Randfile 389
-#define T_Rawstats 390
-#define T_Refid 391
-#define T_Requestkey 392
-#define T_Reset 393
-#define T_Restrict 394
-#define T_Revoke 395
-#define T_Rlimit 396
-#define T_Saveconfigdir 397
-#define T_Server 398
-#define T_Setvar 399
-#define T_Source 400
-#define T_Stacksize 401
-#define T_Statistics 402
-#define T_Stats 403
-#define T_Statsdir 404
-#define T_Step 405
-#define T_Stepout 406
-#define T_Stratum 407
-#define T_String 408
-#define T_Sys 409
-#define T_Sysstats 410
-#define T_Tick 411
-#define T_Time1 412
-#define T_Time2 413
-#define T_Timer 414
-#define T_Timingstats 415
-#define T_Tinker 416
-#define T_Tos 417
-#define T_Trap 418
-#define T_True 419
-#define T_Trustedkey 420
-#define T_Ttl 421
-#define T_Type 422
-#define T_U_int 423
-#define T_Unconfig 424
-#define T_Unpeer 425
-#define T_Version 426
-#define T_WanderThreshold 427
-#define T_Week 428
-#define T_Wildcard 429
-#define T_Xleave 430
-#define T_Year 431
-#define T_Flag 432
-#define T_EOC 433
-#define T_Simulate 434
-#define T_Beep_Delay 435
-#define T_Sim_Duration 436
-#define T_Server_Offset 437
-#define T_Duration 438
-#define T_Freq_Offset 439
-#define T_Wander 440
-#define T_Jitter 441
-#define T_Prop_Delay 442
-#define T_Proc_Delay 443
+#define T_Mdnstries 346
+#define T_Mem 347
+#define T_Memlock 348
+#define T_Minclock 349
+#define T_Mindepth 350
+#define T_Mindist 351
+#define T_Minimum 352
+#define T_Minpoll 353
+#define T_Minsane 354
+#define T_Mode 355
+#define T_Mode7 356
+#define T_Monitor 357
+#define T_Month 358
+#define T_Mru 359
+#define T_Multicastclient 360
+#define T_Nic 361
+#define T_Nolink 362
+#define T_Nomodify 363
+#define T_Nomrulist 364
+#define T_None 365
+#define T_Nonvolatile 366
+#define T_Nopeer 367
+#define T_Noquery 368
+#define T_Noselect 369
+#define T_Noserve 370
+#define T_Notrap 371
+#define T_Notrust 372
+#define T_Ntp 373
+#define T_Ntpport 374
+#define T_NtpSignDsocket 375
+#define T_Orphan 376
+#define T_Orphanwait 377
+#define T_Panic 378
+#define T_Peer 379
+#define T_Peerstats 380
+#define T_Phone 381
+#define T_Pid 382
+#define T_Pidfile 383
+#define T_Pool 384
+#define T_Port 385
+#define T_Preempt 386
+#define T_Prefer 387
+#define T_Protostats 388
+#define T_Pw 389
+#define T_Randfile 390
+#define T_Rawstats 391
+#define T_Refid 392
+#define T_Requestkey 393
+#define T_Reset 394
+#define T_Restrict 395
+#define T_Revoke 396
+#define T_Rlimit 397
+#define T_Saveconfigdir 398
+#define T_Server 399
+#define T_Setvar 400
+#define T_Source 401
+#define T_Stacksize 402
+#define T_Statistics 403
+#define T_Stats 404
+#define T_Statsdir 405
+#define T_Step 406
+#define T_Stepback 407
+#define T_Stepfwd 408
+#define T_Stepout 409
+#define T_Stratum 410
+#define T_String 411
+#define T_Sys 412
+#define T_Sysstats 413
+#define T_Tick 414
+#define T_Time1 415
+#define T_Time2 416
+#define T_Timer 417
+#define T_Timingstats 418
+#define T_Tinker 419
+#define T_Tos 420
+#define T_Trap 421
+#define T_True 422
+#define T_Trustedkey 423
+#define T_Ttl 424
+#define T_Type 425
+#define T_U_int 426
+#define T_Unconfig 427
+#define T_Unpeer 428
+#define T_Version 429
+#define T_WanderThreshold 430
+#define T_Week 431
+#define T_Wildcard 432
+#define T_Xleave 433
+#define T_Year 434
+#define T_Flag 435
+#define T_EOC 436
+#define T_Simulate 437
+#define T_Beep_Delay 438
+#define T_Sim_Duration 439
+#define T_Server_Offset 440
+#define T_Duration 441
+#define T_Freq_Offset 442
+#define T_Wander 443
+#define T_Jitter 444
+#define T_Prop_Delay 445
+#define T_Proc_Delay 446
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -531,7 +537,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 535 "../../ntpd/ntp_parser.c" /* yacc.c:355 */
+#line 541 "ntp_parser.c" /* yacc.c:355 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -546,7 +552,7 @@ int yyparse (struct FILE_INFO *ip_file);
/* Copy the second part of user declarations. */
-#line 550 "../../ntpd/ntp_parser.c" /* yacc.c:358 */
+#line 556 "ntp_parser.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -786,23 +792,23 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 203
+#define YYFINAL 207
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 653
+#define YYLAST 622
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 194
+#define YYNTOKENS 197
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 104
/* YYNRULES -- Number of rules. */
-#define YYNRULES 307
+#define YYNRULES 310
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 411
+#define YYNSTATES 415
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 443
+#define YYMAXUTOK 446
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -815,15 +821,15 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 190, 191, 2, 2, 2, 2, 2, 2, 2, 2,
+ 193, 194, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 189, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 192, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 192, 2, 193, 2, 2, 2, 2,
+ 2, 2, 2, 195, 2, 196, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -855,44 +861,45 @@ static const yytype_uint8 yytranslate[] =
155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
175, 176, 177, 178, 179, 180, 181, 182, 183, 184,
- 185, 186, 187, 188
+ 185, 186, 187, 188, 189, 190, 191
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 363, 363, 367, 368, 369, 383, 384, 385, 386,
- 387, 388, 389, 390, 391, 392, 393, 394, 395, 396,
- 404, 414, 415, 416, 417, 418, 422, 423, 428, 433,
- 435, 441, 442, 450, 451, 452, 456, 461, 462, 463,
- 464, 465, 466, 467, 468, 472, 474, 479, 480, 481,
- 482, 483, 484, 488, 493, 502, 512, 513, 523, 525,
- 527, 538, 545, 547, 552, 554, 556, 558, 560, 569,
- 575, 576, 584, 586, 598, 599, 600, 601, 602, 611,
- 616, 621, 629, 631, 633, 638, 639, 640, 641, 642,
- 643, 647, 648, 649, 650, 659, 661, 670, 680, 685,
- 693, 694, 695, 696, 697, 698, 699, 700, 705, 706,
- 714, 724, 733, 748, 753, 754, 758, 759, 763, 764,
- 765, 766, 767, 768, 769, 778, 782, 786, 794, 802,
- 810, 825, 840, 853, 854, 862, 863, 864, 865, 866,
- 867, 868, 869, 870, 871, 872, 873, 874, 875, 876,
- 880, 885, 893, 898, 899, 900, 904, 909, 917, 922,
- 923, 924, 925, 926, 927, 928, 929, 937, 947, 952,
- 960, 962, 964, 966, 968, 973, 974, 978, 979, 980,
- 981, 989, 994, 999, 1007, 1012, 1013, 1014, 1023, 1025,
- 1030, 1035, 1043, 1045, 1062, 1063, 1064, 1065, 1066, 1067,
- 1071, 1072, 1080, 1085, 1090, 1098, 1103, 1104, 1105, 1106,
- 1107, 1108, 1109, 1110, 1119, 1120, 1121, 1128, 1135, 1151,
- 1170, 1175, 1177, 1179, 1181, 1183, 1190, 1195, 1196, 1197,
- 1201, 1202, 1203, 1207, 1208, 1212, 1219, 1229, 1238, 1243,
- 1245, 1250, 1251, 1259, 1261, 1269, 1274, 1282, 1307, 1314,
- 1324, 1325, 1329, 1330, 1331, 1332, 1336, 1337, 1338, 1342,
- 1347, 1352, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1376,
- 1381, 1389, 1394, 1402, 1404, 1408, 1413, 1418, 1426, 1431,
- 1439, 1448, 1449, 1453, 1454, 1463, 1481, 1485, 1490, 1498,
- 1503, 1504, 1508, 1513, 1521, 1526, 1531, 1536, 1541, 1549,
- 1554, 1559, 1567, 1572, 1573, 1574, 1575, 1576
+ 0, 366, 366, 370, 371, 372, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 407, 417, 418, 419, 420, 421, 425, 426, 431, 436,
+ 438, 444, 445, 453, 454, 455, 459, 464, 465, 466,
+ 467, 468, 469, 470, 471, 475, 477, 482, 483, 484,
+ 485, 486, 487, 491, 496, 505, 515, 516, 526, 528,
+ 530, 532, 543, 550, 552, 557, 559, 561, 563, 565,
+ 574, 580, 581, 589, 591, 603, 604, 605, 606, 607,
+ 616, 621, 626, 634, 636, 638, 643, 644, 645, 646,
+ 647, 648, 652, 653, 654, 655, 664, 666, 675, 685,
+ 690, 698, 699, 700, 701, 702, 703, 704, 705, 710,
+ 711, 719, 729, 738, 753, 758, 759, 763, 764, 768,
+ 769, 770, 771, 772, 773, 774, 783, 787, 791, 799,
+ 807, 815, 830, 845, 858, 859, 867, 868, 869, 870,
+ 871, 872, 873, 874, 875, 876, 877, 878, 879, 880,
+ 881, 885, 890, 898, 903, 904, 905, 909, 914, 922,
+ 927, 928, 929, 930, 931, 932, 933, 934, 942, 952,
+ 957, 965, 967, 969, 971, 973, 978, 979, 983, 984,
+ 985, 986, 994, 999, 1004, 1012, 1017, 1018, 1019, 1028,
+ 1030, 1035, 1040, 1048, 1050, 1067, 1068, 1069, 1070, 1071,
+ 1072, 1076, 1077, 1085, 1090, 1095, 1103, 1108, 1109, 1110,
+ 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1126, 1127, 1128,
+ 1135, 1142, 1158, 1177, 1182, 1184, 1186, 1188, 1190, 1197,
+ 1202, 1203, 1204, 1208, 1209, 1210, 1214, 1215, 1219, 1226,
+ 1236, 1245, 1250, 1252, 1257, 1258, 1266, 1268, 1276, 1281,
+ 1289, 1314, 1321, 1331, 1332, 1336, 1337, 1338, 1339, 1343,
+ 1344, 1345, 1349, 1354, 1359, 1367, 1368, 1369, 1370, 1371,
+ 1372, 1373, 1383, 1388, 1396, 1401, 1409, 1411, 1415, 1420,
+ 1425, 1433, 1438, 1446, 1455, 1456, 1460, 1461, 1470, 1488,
+ 1492, 1497, 1505, 1510, 1511, 1515, 1520, 1528, 1533, 1538,
+ 1543, 1548, 1556, 1561, 1566, 1574, 1579, 1580, 1581, 1582,
+ 1583
};
#endif
@@ -918,42 +925,44 @@ static const char *const yytname[] =
"T_Link", "T_Listen", "T_Logconfig", "T_Logfile", "T_Loopstats",
"T_Lowpriotrap", "T_Manycastclient", "T_Manycastserver", "T_Mask",
"T_Maxage", "T_Maxclock", "T_Maxdepth", "T_Maxdist", "T_Maxmem",
- "T_Maxpoll", "T_Mem", "T_Memlock", "T_Minclock", "T_Mindepth",
- "T_Mindist", "T_Minimum", "T_Minpoll", "T_Minsane", "T_Mode", "T_Mode7",
- "T_Monitor", "T_Month", "T_Mru", "T_Multicastclient", "T_Nic",
- "T_Nolink", "T_Nomodify", "T_Nomrulist", "T_None", "T_Nonvolatile",
- "T_Nopeer", "T_Noquery", "T_Noselect", "T_Noserve", "T_Notrap",
- "T_Notrust", "T_Ntp", "T_Ntpport", "T_NtpSignDsocket", "T_Orphan",
- "T_Orphanwait", "T_Panic", "T_Peer", "T_Peerstats", "T_Phone", "T_Pid",
- "T_Pidfile", "T_Pool", "T_Port", "T_Preempt", "T_Prefer", "T_Protostats",
- "T_Pw", "T_Randfile", "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset",
- "T_Restrict", "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server",
- "T_Setvar", "T_Source", "T_Stacksize", "T_Statistics", "T_Stats",
- "T_Statsdir", "T_Step", "T_Stepout", "T_Stratum", "T_String", "T_Sys",
- "T_Sysstats", "T_Tick", "T_Time1", "T_Time2", "T_Timer", "T_Timingstats",
- "T_Tinker", "T_Tos", "T_Trap", "T_True", "T_Trustedkey", "T_Ttl",
- "T_Type", "T_U_int", "T_Unconfig", "T_Unpeer", "T_Version",
- "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave", "T_Year",
- "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay", "T_Sim_Duration",
- "T_Server_Offset", "T_Duration", "T_Freq_Offset", "T_Wander", "T_Jitter",
- "T_Prop_Delay", "T_Proc_Delay", "'='", "'('", "')'", "'{'", "'}'",
- "$accept", "configuration", "command_list", "command", "server_command",
- "client_type", "address", "ip_address", "address_fam", "option_list",
- "option", "option_flag", "option_flag_keyword", "option_int",
- "option_int_keyword", "option_str", "option_str_keyword",
- "unpeer_command", "unpeer_keyword", "other_mode_command",
- "authentication_command", "crypto_command_list", "crypto_command",
- "crypto_str_keyword", "orphan_mode_command", "tos_option_list",
- "tos_option", "tos_option_int_keyword", "tos_option_dbl_keyword",
- "monitoring_command", "stats_list", "stat", "filegen_option_list",
- "filegen_option", "link_nolink", "enable_disable", "filegen_type",
- "access_control_command", "ac_flag_list", "access_control_flag",
- "discard_option_list", "discard_option", "discard_option_keyword",
- "mru_option_list", "mru_option", "mru_option_keyword", "fudge_command",
- "fudge_factor_list", "fudge_factor", "fudge_factor_dbl_keyword",
- "fudge_factor_bool_keyword", "rlimit_command", "rlimit_option_list",
- "rlimit_option", "rlimit_option_keyword", "system_option_command",
- "system_option_list", "system_option", "system_option_flag_keyword",
+ "T_Maxpoll", "T_Mdnstries", "T_Mem", "T_Memlock", "T_Minclock",
+ "T_Mindepth", "T_Mindist", "T_Minimum", "T_Minpoll", "T_Minsane",
+ "T_Mode", "T_Mode7", "T_Monitor", "T_Month", "T_Mru",
+ "T_Multicastclient", "T_Nic", "T_Nolink", "T_Nomodify", "T_Nomrulist",
+ "T_None", "T_Nonvolatile", "T_Nopeer", "T_Noquery", "T_Noselect",
+ "T_Noserve", "T_Notrap", "T_Notrust", "T_Ntp", "T_Ntpport",
+ "T_NtpSignDsocket", "T_Orphan", "T_Orphanwait", "T_Panic", "T_Peer",
+ "T_Peerstats", "T_Phone", "T_Pid", "T_Pidfile", "T_Pool", "T_Port",
+ "T_Preempt", "T_Prefer", "T_Protostats", "T_Pw", "T_Randfile",
+ "T_Rawstats", "T_Refid", "T_Requestkey", "T_Reset", "T_Restrict",
+ "T_Revoke", "T_Rlimit", "T_Saveconfigdir", "T_Server", "T_Setvar",
+ "T_Source", "T_Stacksize", "T_Statistics", "T_Stats", "T_Statsdir",
+ "T_Step", "T_Stepback", "T_Stepfwd", "T_Stepout", "T_Stratum",
+ "T_String", "T_Sys", "T_Sysstats", "T_Tick", "T_Time1", "T_Time2",
+ "T_Timer", "T_Timingstats", "T_Tinker", "T_Tos", "T_Trap", "T_True",
+ "T_Trustedkey", "T_Ttl", "T_Type", "T_U_int", "T_Unconfig", "T_Unpeer",
+ "T_Version", "T_WanderThreshold", "T_Week", "T_Wildcard", "T_Xleave",
+ "T_Year", "T_Flag", "T_EOC", "T_Simulate", "T_Beep_Delay",
+ "T_Sim_Duration", "T_Server_Offset", "T_Duration", "T_Freq_Offset",
+ "T_Wander", "T_Jitter", "T_Prop_Delay", "T_Proc_Delay", "'='", "'('",
+ "')'", "'{'", "'}'", "$accept", "configuration", "command_list",
+ "command", "server_command", "client_type", "address", "ip_address",
+ "address_fam", "option_list", "option", "option_flag",
+ "option_flag_keyword", "option_int", "option_int_keyword", "option_str",
+ "option_str_keyword", "unpeer_command", "unpeer_keyword",
+ "other_mode_command", "authentication_command", "crypto_command_list",
+ "crypto_command", "crypto_str_keyword", "orphan_mode_command",
+ "tos_option_list", "tos_option", "tos_option_int_keyword",
+ "tos_option_dbl_keyword", "monitoring_command", "stats_list", "stat",
+ "filegen_option_list", "filegen_option", "link_nolink", "enable_disable",
+ "filegen_type", "access_control_command", "ac_flag_list",
+ "access_control_flag", "discard_option_list", "discard_option",
+ "discard_option_keyword", "mru_option_list", "mru_option",
+ "mru_option_keyword", "fudge_command", "fudge_factor_list",
+ "fudge_factor", "fudge_factor_dbl_keyword", "fudge_factor_bool_keyword",
+ "rlimit_command", "rlimit_option_list", "rlimit_option",
+ "rlimit_option_keyword", "system_option_command", "system_option_list",
+ "system_option", "system_option_flag_keyword",
"system_option_local_flag_keyword", "tinker_command",
"tinker_option_list", "tinker_option", "tinker_option_keyword",
"miscellaneous_command", "misc_cmd_dbl_keyword", "misc_cmd_str_keyword",
@@ -994,15 +1003,15 @@ static const yytype_uint16 yytoknum[] =
405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
425, 426, 427, 428, 429, 430, 431, 432, 433, 434,
- 435, 436, 437, 438, 439, 440, 441, 442, 443, 61,
- 40, 41, 123, 125
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ 445, 446, 61, 40, 41, 123, 125
};
# endif
-#define YYPACT_NINF -178
+#define YYPACT_NINF -182
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-178)))
+ (!!((Yystate) == (-182)))
#define YYTABLE_NINF -7
@@ -1013,48 +1022,48 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- 26, -153, -30, -178, -178, -178, -28, -178, 166, 18,
- -109, 166, -178, 200, -47, -178, -102, -178, -96, -93,
- -178, -89, -178, -178, -47, 330, -47, -178, -178, -85,
- -178, -76, -178, -178, 20, -2, 45, 22, -22, -178,
- -178, -67, 200, -65, -178, 107, 520, -63, -53, 35,
- -178, -178, -178, 46, 203, -94, -178, -47, -178, -47,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -21, -55, -54, -178, 4, -178, -178, -77, -178, -178,
- -178, 158, -178, -178, -178, -178, -178, -178, -178, -178,
- 166, -178, -178, -178, -178, -178, -178, 18, -178, 47,
- 84, -178, 166, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, 49, -178, -33, 361, -178,
- -178, -178, -89, -178, -178, -47, -178, -178, -178, -178,
- -178, -178, -178, -178, 330, -178, 58, -47, -178, -178,
- -31, -178, -178, -178, -178, -178, -178, -178, -178, -2,
- -178, -178, 94, 98, -178, -178, 43, -178, -178, -178,
- -178, -22, -178, 68, -57, -178, 200, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, 107, -178, -21,
- -178, -178, -25, -178, -178, -178, -178, -178, -178, -178,
- -178, 520, -178, 75, -21, -178, -178, 86, -53, -178,
- -178, -178, 87, -178, -19, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, 3, -107, -178, -178,
- -178, -178, -178, 88, -178, 7, -178, -178, -178, -178,
- -5, 8, -178, -178, -178, -178, 23, 111, -178, -178,
- 49, -178, -21, -25, -178, -178, -178, -178, -178, -178,
- -178, -178, 482, -178, -178, 482, 482, -63, -178, -178,
- 28, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, -46, 144, -178, -178, -178, 416, -178, -178, -178,
- -178, -178, -178, -178, -178, -127, 5, 10, -178, -178,
- -178, -178, 40, -178, -178, 24, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, 482, 482, -178, 167, -63, 142, -178, 143, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -51, -178,
- 57, 27, 34, -117, -178, 29, -178, -21, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, 482, -178, -178,
- -178, -178, 32, -178, -178, -178, -47, -178, -178, -178,
- 33, -178, -178, -178, 38, 52, -21, 39, -146, -178,
- 59, -21, -178, -178, -178, 50, -44, -178, -178, -178,
- -178, -178, 60, 63, 41, -178, 71, -178, -21, -178,
- -178
+ 18, -161, -18, -182, -182, -182, -10, -182, 189, 11,
+ -103, 189, -182, 7, -49, -182, -100, -182, -97, -90,
+ -182, -84, -182, -182, -49, 13, 365, -49, -182, -182,
+ -81, -182, -80, -182, -182, 20, 86, 104, 21, -33,
+ -182, -182, -73, 7, -72, -182, 51, 500, -71, -54,
+ 26, -182, -182, -182, 90, 205, -83, -182, -49, -182,
+ -49, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -8, -65, -51, -182, -9, -182, -182, -91, -182,
+ -182, -182, -15, -182, -182, -182, -182, -182, -182, -182,
+ -182, 189, -182, -182, -182, -182, -182, -182, 11, -182,
+ 46, 85, -182, 189, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 92, -182, -35, 366,
+ -182, -182, -182, -84, -182, -182, -49, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 365, -182, 68, -49,
+ -182, -182, -23, -182, -182, -182, -182, -182, -182, -182,
+ -182, 86, -182, -182, 114, 121, -182, -182, 67, -182,
+ -182, -182, -182, -33, -182, 93, -28, -182, 7, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, 51, -182, -8, -182, -182, -17, -182, -182, -182,
+ -182, -182, -182, -182, -182, 500, -182, 107, -8, -182,
+ -182, 112, -54, -182, -182, -182, 113, -182, 8, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -2, -147, -182, -182, -182, -182, -182, 128, -182, 25,
+ -182, -182, -182, -182, 116, 37, -182, -182, -182, -182,
+ 38, 135, -182, -182, 92, -182, -8, -17, -182, -182,
+ -182, -182, -182, -182, -182, -182, 445, -182, -182, 445,
+ 445, -71, -182, -182, 40, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -52, 163, -182, -182, -182,
+ 261, -182, -182, -182, -182, -182, -182, -182, -182, -114,
+ 27, 14, -182, -182, -182, -182, 55, -182, -182, 0,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, 445, 445, -182, 185, -71,
+ 153, -182, 156, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -53, -182, 61, 30, 43, -133, -182, 23,
+ -182, -8, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, 445, -182, -182, -182, -182, 32, -182, -182, -182,
+ -49, -182, -182, -182, 45, -182, -182, -182, 41, 50,
+ -8, 47, -157, -182, 56, -8, -182, -182, -182, 49,
+ 130, -182, -182, -182, -182, -182, 110, 59, 54, -182,
+ 70, -182, -8, -182, -182
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1062,80 +1071,80 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 0, 0, 0, 24, 58, 227, 0, 70, 0, 0,
- 237, 0, 220, 0, 0, 230, 0, 250, 0, 0,
- 231, 0, 233, 25, 0, 0, 0, 251, 228, 0,
- 23, 0, 232, 22, 0, 0, 0, 0, 0, 234,
- 21, 0, 0, 0, 229, 0, 0, 0, 0, 0,
- 56, 57, 286, 0, 2, 0, 7, 0, 8, 0,
- 9, 10, 13, 11, 12, 14, 15, 16, 17, 18,
- 0, 0, 0, 214, 0, 215, 19, 0, 5, 61,
- 62, 63, 194, 195, 196, 197, 200, 198, 199, 201,
- 189, 191, 192, 193, 153, 154, 155, 125, 151, 0,
- 235, 221, 188, 100, 101, 102, 103, 107, 104, 105,
- 106, 108, 29, 30, 28, 0, 26, 0, 6, 64,
- 65, 247, 222, 246, 279, 59, 159, 160, 161, 162,
- 163, 164, 165, 166, 126, 157, 0, 60, 69, 277,
- 223, 66, 262, 263, 264, 265, 266, 267, 268, 259,
- 261, 133, 29, 30, 133, 133, 26, 67, 187, 185,
- 186, 181, 183, 0, 0, 224, 95, 99, 96, 206,
- 207, 208, 209, 210, 211, 212, 213, 202, 204, 0,
- 90, 85, 0, 86, 94, 92, 93, 91, 89, 87,
- 88, 79, 81, 0, 0, 241, 273, 0, 68, 272,
- 274, 270, 226, 1, 0, 4, 31, 55, 284, 283,
- 216, 217, 218, 258, 257, 256, 0, 0, 78, 74,
- 75, 76, 77, 0, 71, 0, 190, 150, 152, 236,
- 97, 0, 177, 178, 179, 180, 0, 0, 175, 176,
- 167, 169, 0, 0, 27, 219, 245, 278, 156, 158,
- 276, 260, 129, 133, 133, 132, 127, 0, 182, 184,
- 0, 98, 203, 205, 282, 280, 281, 84, 80, 82,
- 83, 225, 0, 271, 269, 3, 20, 252, 253, 254,
- 249, 255, 248, 290, 291, 0, 0, 0, 73, 72,
- 117, 116, 0, 114, 115, 0, 109, 112, 113, 173,
- 174, 172, 168, 170, 171, 135, 136, 137, 138, 139,
- 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
- 134, 130, 131, 133, 240, 0, 0, 242, 0, 37,
- 38, 39, 54, 47, 49, 48, 51, 40, 41, 42,
- 43, 50, 52, 44, 32, 33, 36, 34, 0, 35,
- 0, 0, 0, 0, 293, 0, 288, 0, 110, 124,
- 120, 122, 118, 119, 121, 123, 111, 128, 239, 238,
- 244, 243, 0, 45, 46, 53, 0, 287, 285, 292,
- 0, 289, 275, 296, 0, 0, 0, 0, 0, 298,
- 0, 0, 294, 297, 295, 0, 0, 303, 304, 305,
- 306, 307, 0, 0, 0, 299, 0, 301, 0, 300,
- 302
+ 0, 0, 0, 24, 58, 230, 0, 71, 0, 0,
+ 240, 0, 223, 0, 0, 233, 0, 253, 0, 0,
+ 234, 0, 236, 25, 0, 0, 0, 0, 254, 231,
+ 0, 23, 0, 235, 22, 0, 0, 0, 0, 0,
+ 237, 21, 0, 0, 0, 232, 0, 0, 0, 0,
+ 0, 56, 57, 289, 0, 2, 0, 7, 0, 8,
+ 0, 9, 10, 13, 11, 12, 14, 15, 16, 17,
+ 18, 0, 0, 0, 217, 0, 218, 19, 0, 5,
+ 62, 63, 64, 195, 196, 197, 198, 201, 199, 200,
+ 202, 190, 192, 193, 194, 154, 155, 156, 126, 152,
+ 0, 238, 224, 189, 101, 102, 103, 104, 108, 105,
+ 106, 107, 109, 29, 30, 28, 0, 26, 0, 6,
+ 65, 66, 250, 225, 249, 282, 59, 61, 160, 161,
+ 162, 163, 164, 165, 166, 167, 127, 158, 0, 60,
+ 70, 280, 226, 67, 265, 266, 267, 268, 269, 270,
+ 271, 262, 264, 134, 29, 30, 134, 134, 26, 68,
+ 188, 186, 187, 182, 184, 0, 0, 227, 96, 100,
+ 97, 207, 208, 209, 210, 211, 212, 213, 214, 215,
+ 216, 203, 205, 0, 91, 86, 0, 87, 95, 93,
+ 94, 92, 90, 88, 89, 80, 82, 0, 0, 244,
+ 276, 0, 69, 275, 277, 273, 229, 1, 0, 4,
+ 31, 55, 287, 286, 219, 220, 221, 261, 260, 259,
+ 0, 0, 79, 75, 76, 77, 78, 0, 72, 0,
+ 191, 151, 153, 239, 98, 0, 178, 179, 180, 181,
+ 0, 0, 176, 177, 168, 170, 0, 0, 27, 222,
+ 248, 281, 157, 159, 279, 263, 130, 134, 134, 133,
+ 128, 0, 183, 185, 0, 99, 204, 206, 285, 283,
+ 284, 85, 81, 83, 84, 228, 0, 274, 272, 3,
+ 20, 255, 256, 257, 252, 258, 251, 293, 294, 0,
+ 0, 0, 74, 73, 118, 117, 0, 115, 116, 0,
+ 110, 113, 114, 174, 175, 173, 169, 171, 172, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 147, 148, 149, 150, 135, 131, 132, 134, 243, 0,
+ 0, 245, 0, 37, 38, 39, 54, 47, 49, 48,
+ 51, 40, 41, 42, 43, 50, 52, 44, 32, 33,
+ 36, 34, 0, 35, 0, 0, 0, 0, 296, 0,
+ 291, 0, 111, 125, 121, 123, 119, 120, 122, 124,
+ 112, 129, 242, 241, 247, 246, 0, 45, 46, 53,
+ 0, 290, 288, 295, 0, 292, 278, 299, 0, 0,
+ 0, 0, 0, 301, 0, 0, 297, 300, 298, 0,
+ 0, 306, 307, 308, 309, 310, 0, 0, 0, 302,
+ 0, 304, 0, 303, 305
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -178, -178, -178, -40, -178, -178, -14, -35, -178, -178,
- -178, -178, -178, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, -178, -178, 64, -178, -178, -178,
- -178, -32, -178, -178, -178, -178, -178, -178, -151, -178,
- -178, 141, -178, -178, 116, -178, -178, -178, 11, -178,
- -178, -178, -178, 93, -178, -178, 248, -69, -178, -178,
- -178, -178, 83, -178, -178, -178, -178, -178, -178, -178,
- -178, -178, -178, -178, 139, -178, -178, -178, -178, -178,
- -178, 119, -178, -178, 67, -178, -178, 243, 36, -177,
- -178, -178, -178, -15, -178, -178, -82, -178, -178, -178,
- -116, -178, -126, -178
+ -182, -182, -182, -45, -182, -182, -14, -36, -182, -182,
+ -182, -182, -182, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, -182, -182, 60, -182, -182, -182,
+ -182, -38, -182, -182, -182, -182, -182, -182, -142, -182,
+ -182, 134, -182, -182, 120, -182, -182, -182, 5, -182,
+ -182, -182, -182, 96, -182, -182, 250, -42, -182, -182,
+ -182, -182, 81, -182, -182, -182, -182, -182, -182, -182,
+ -182, -182, -182, -182, 140, -182, -182, -182, -182, -182,
+ -182, 117, -182, -182, 63, -182, -182, 240, 22, -181,
+ -182, -182, -182, -16, -182, -182, -86, -182, -182, -182,
+ -120, -182, -132, -182
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 53, 54, 55, 56, 57, 124, 116, 117, 276,
- 344, 345, 346, 347, 348, 349, 350, 58, 59, 60,
- 61, 81, 224, 225, 62, 191, 192, 193, 194, 63,
- 166, 111, 230, 296, 297, 298, 366, 64, 252, 320,
- 97, 98, 99, 134, 135, 136, 65, 240, 241, 242,
- 243, 66, 161, 162, 163, 67, 90, 91, 92, 93,
- 68, 177, 178, 179, 69, 70, 71, 72, 101, 165,
- 369, 271, 327, 122, 123, 73, 74, 282, 216, 75,
- 149, 150, 202, 198, 199, 200, 140, 125, 267, 210,
- 76, 77, 285, 286, 287, 353, 354, 385, 355, 388,
- 389, 402, 403, 404
+ -1, 54, 55, 56, 57, 58, 125, 117, 118, 280,
+ 348, 349, 350, 351, 352, 353, 354, 59, 60, 61,
+ 62, 82, 228, 229, 63, 195, 196, 197, 198, 64,
+ 168, 112, 234, 300, 301, 302, 370, 65, 256, 324,
+ 98, 99, 100, 136, 137, 138, 66, 244, 245, 246,
+ 247, 67, 163, 164, 165, 68, 91, 92, 93, 94,
+ 69, 181, 182, 183, 70, 71, 72, 73, 102, 167,
+ 373, 275, 331, 123, 124, 74, 75, 286, 220, 76,
+ 151, 152, 206, 202, 203, 204, 142, 126, 271, 214,
+ 77, 78, 289, 290, 291, 357, 358, 389, 359, 392,
+ 393, 406, 407, 408
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1143,142 +1152,136 @@ static const yytype_int16 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
- 115, 156, 263, 255, 256, 142, 143, 196, 277, 373,
- 167, 208, 195, 264, 204, 325, 351, 270, 112, 158,
- 113, 226, 155, 144, 290, 78, 351, 1, 359, 94,
- 79, 291, 80, 226, 292, 265, 2, 387, 213, 209,
- 3, 4, 5, 206, 100, 207, 203, 392, 6, 7,
- 360, 118, 231, 283, 284, 8, 9, 119, 214, 10,
- 120, 145, 11, 12, 121, 303, 13, 278, 138, 279,
- 159, 293, 151, 283, 284, 14, 378, 139, 245, 15,
- 141, 215, 157, 326, 205, 16, 164, 17, 168, 146,
- 114, 232, 233, 234, 235, 201, 18, 19, 211, 212,
- 20, 294, 321, 322, 21, 22, 114, 228, 23, 24,
- 152, 247, 153, 169, 95, 217, 229, 374, 249, 96,
- 244, 253, 250, 247, 160, 254, 361, 257, 259, 25,
- 26, 27, 260, 362, 261, 269, 28, 197, 170, 266,
- 397, 398, 399, 400, 401, 29, 272, 274, 288, 30,
- 363, 31, 147, 32, 33, 171, 280, 148, 172, 275,
- 289, 299, 295, 34, 35, 36, 37, 38, 39, 40,
- 41, 301, 367, 42, 82, 43, 300, 281, 83, 328,
- 381, 324, 44, 356, 84, 236, 218, 45, 46, 47,
- 154, 48, 49, 358, 368, 50, 51, 364, 114, 357,
- 365, 237, 371, 372, -6, 52, 238, 239, 219, 390,
- 375, 220, 377, 2, 395, 384, 376, 3, 4, 5,
- 103, 380, 323, 382, 104, 6, 7, 386, 391, 173,
- 408, 410, 8, 9, 85, 387, 10, 394, 227, 11,
- 12, 407, 396, 13, 397, 398, 399, 400, 401, 409,
- 248, 302, 14, 405, 258, 268, 15, 174, 175, 102,
- 262, 246, 16, 176, 17, 273, 86, 87, 251, 137,
- 352, 379, 393, 18, 19, 0, 406, 20, 0, 304,
- 105, 21, 22, 88, 0, 23, 24, 0, 0, 0,
- 370, 221, 222, 0, 0, 0, 0, 0, 223, 0,
- 0, 0, 0, 0, 0, 0, 25, 26, 27, 0,
- 0, 0, 0, 28, 89, 0, 0, 0, 0, 0,
- 0, 0, 29, 0, 106, 0, 30, 0, 31, 0,
- 32, 33, 107, 0, 0, 108, 0, 0, 0, 0,
- 34, 35, 36, 37, 38, 39, 40, 41, 0, 0,
- 42, 0, 43, 0, 0, 109, 0, 0, 0, 44,
- 110, 0, 383, 0, 45, 46, 47, 0, 48, 49,
- 0, 2, 50, 51, 0, 3, 4, 5, 0, 0,
- 0, -6, 52, 6, 7, 126, 127, 128, 129, 0,
- 8, 9, 0, 0, 10, 0, 0, 11, 12, 0,
- 0, 13, 0, 0, 0, 0, 0, 0, 0, 0,
- 14, 0, 0, 0, 15, 130, 0, 131, 0, 132,
- 16, 0, 17, 0, 133, 329, 0, 0, 0, 0,
- 0, 18, 19, 330, 0, 20, 0, 0, 0, 21,
- 22, 0, 0, 23, 24, 0, 0, 0, 0, 0,
+ 116, 158, 267, 281, 363, 169, 200, 377, 160, 329,
+ 208, 355, 199, 222, 259, 260, 113, 274, 114, 1,
+ 79, 268, 95, 157, 212, 217, 364, 104, 2, 391,
+ 355, 105, 3, 4, 5, 223, 287, 288, 224, 396,
+ 6, 7, 80, 269, 210, 218, 211, 8, 9, 230,
+ 81, 10, 213, 101, 11, 12, 119, 171, 13, 120,
+ 161, 230, 282, 382, 283, 307, 121, 14, 219, 287,
+ 288, 15, 122, 127, 249, 140, 141, 16, 330, 17,
+ 143, 159, 172, 166, 170, 115, 205, 106, 18, 19,
+ 207, 215, 20, 144, 145, 235, 21, 22, 209, 173,
+ 23, 24, 174, 365, 221, 216, 232, 115, 96, 25,
+ 366, 146, 251, 97, 162, 325, 326, 233, 378, 225,
+ 226, 248, 26, 27, 28, 251, 227, 367, 253, 29,
+ 265, 153, 107, 254, 236, 237, 238, 239, 30, 201,
+ 108, 257, 31, 109, 32, 294, 33, 34, 258, 147,
+ 270, 261, 295, 263, 284, 296, 35, 36, 37, 38,
+ 39, 40, 41, 42, 264, 110, 43, 273, 44, 154,
+ 111, 155, 276, 278, 175, 285, 368, 45, 148, 369,
+ 385, 293, 46, 47, 48, 371, 49, 50, 292, 279,
+ 51, 52, 297, 303, 304, 305, 328, 83, 332, -6,
+ 53, 84, 176, 177, 178, 179, 361, 85, 360, 394,
+ 180, 362, 372, 375, 399, 2, 376, 379, 384, 3,
+ 4, 5, 380, 298, 381, 327, 386, 6, 7, 240,
+ 388, 414, 231, 390, 8, 9, 391, 398, 10, 395,
+ 411, 11, 12, 149, 400, 13, 412, 241, 150, 306,
+ 156, 413, 242, 243, 14, 272, 252, 86, 15, 262,
+ 115, 103, 266, 250, 16, 277, 17, 139, 255, 308,
+ 333, 383, 397, 356, 410, 18, 19, 0, 334, 20,
+ 0, 0, 0, 21, 22, 0, 299, 23, 24, 0,
+ 87, 88, 0, 374, 0, 0, 25, 401, 402, 403,
+ 404, 405, 0, 0, 0, 0, 409, 89, 0, 26,
+ 27, 28, 0, 335, 336, 0, 29, 401, 402, 403,
+ 404, 405, 0, 0, 0, 30, 0, 0, 0, 31,
+ 337, 32, 0, 33, 34, 0, 0, 0, 90, 0,
+ 0, 0, 0, 35, 36, 37, 38, 39, 40, 41,
+ 42, 338, 0, 43, 0, 44, 0, 0, 0, 339,
+ 0, 340, 0, 0, 45, 0, 387, 0, 0, 46,
+ 47, 48, 0, 49, 50, 341, 2, 51, 52, 0,
+ 3, 4, 5, 0, 0, 0, -6, 53, 6, 7,
+ 0, 0, 342, 343, 0, 8, 9, 0, 0, 10,
+ 0, 0, 11, 12, 0, 0, 13, 0, 0, 0,
+ 0, 0, 0, 0, 0, 14, 0, 0, 0, 15,
+ 128, 129, 130, 131, 0, 16, 0, 17, 344, 0,
+ 345, 0, 0, 0, 0, 346, 18, 19, 0, 347,
+ 20, 0, 0, 0, 21, 22, 0, 0, 23, 24,
+ 132, 0, 133, 0, 134, 0, 0, 25, 0, 0,
+ 135, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 26, 27, 28, 0, 0, 0, 0, 29, 0, 0,
+ 0, 0, 0, 0, 0, 0, 30, 0, 0, 0,
+ 31, 309, 32, 0, 33, 34, 0, 0, 0, 310,
+ 0, 0, 0, 0, 35, 36, 37, 38, 39, 40,
+ 41, 42, 0, 184, 43, 0, 44, 311, 312, 185,
+ 313, 186, 0, 0, 0, 45, 314, 0, 0, 0,
+ 46, 47, 48, 0, 49, 50, 0, 0, 51, 52,
+ 0, 0, 0, 0, 0, 0, 0, 187, 53, 0,
+ 0, 0, 0, 315, 316, 0, 0, 317, 318, 0,
+ 319, 320, 321, 0, 322, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 25, 26, 27, 0, 331, 332,
- 0, 28, 0, 0, 0, 0, 0, 0, 0, 0,
- 29, 0, 0, 0, 30, 333, 31, 0, 32, 33,
- 0, 0, 0, 0, 0, 0, 0, 0, 34, 35,
- 36, 37, 38, 39, 40, 41, 334, 0, 42, 0,
- 43, 0, 0, 335, 0, 336, 0, 44, 0, 0,
- 0, 0, 45, 46, 47, 0, 48, 49, 305, 337,
- 50, 51, 0, 180, 0, 0, 306, 0, 0, 181,
- 52, 182, 0, 0, 0, 0, 338, 339, 0, 0,
- 0, 0, 0, 0, 307, 308, 0, 309, 0, 0,
- 0, 0, 0, 310, 0, 0, 0, 183, 0, 0,
+ 0, 0, 0, 0, 0, 0, 188, 0, 189, 0,
+ 0, 0, 0, 0, 190, 0, 191, 0, 0, 192,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 340, 0, 341, 0, 0, 0, 0, 342, 0, 311,
- 312, 343, 0, 313, 314, 0, 315, 316, 317, 0,
- 318, 0, 0, 0, 0, 0, 184, 0, 185, 0,
- 0, 0, 0, 186, 0, 187, 0, 0, 188, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 189, 190, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 319
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 323,
+ 0, 193, 194
};
static const yytype_int16 yycheck[] =
{
- 14, 36, 179, 154, 155, 7, 8, 60, 5, 60,
- 42, 32, 47, 38, 54, 61, 143, 194, 65, 41,
- 67, 90, 36, 25, 29, 178, 143, 1, 4, 11,
- 60, 36, 60, 102, 39, 60, 10, 183, 34, 60,
- 14, 15, 16, 57, 153, 59, 0, 193, 22, 23,
- 26, 153, 3, 180, 181, 29, 30, 153, 54, 33,
- 153, 63, 36, 37, 153, 242, 40, 64, 153, 66,
- 92, 76, 27, 180, 181, 49, 193, 153, 118, 53,
- 60, 77, 60, 129, 178, 59, 153, 61, 153, 91,
- 153, 42, 43, 44, 45, 60, 70, 71, 153, 153,
- 74, 106, 253, 254, 78, 79, 153, 60, 82, 83,
- 65, 125, 67, 6, 96, 192, 32, 168, 60, 101,
- 153, 27, 153, 137, 146, 27, 102, 84, 60, 103,
- 104, 105, 189, 109, 166, 60, 110, 190, 31, 164,
- 184, 185, 186, 187, 188, 119, 60, 60, 60, 123,
- 126, 125, 154, 127, 128, 48, 153, 159, 51, 178,
- 153, 153, 167, 137, 138, 139, 140, 141, 142, 143,
- 144, 60, 323, 147, 8, 149, 153, 174, 12, 35,
- 357, 153, 156, 178, 18, 136, 28, 161, 162, 163,
- 145, 165, 166, 153, 27, 169, 170, 173, 153, 189,
- 176, 152, 60, 60, 178, 179, 157, 158, 50, 386,
- 153, 53, 178, 10, 391, 182, 189, 14, 15, 16,
- 20, 192, 257, 191, 24, 22, 23, 189, 189, 122,
- 189, 408, 29, 30, 68, 183, 33, 178, 97, 36,
- 37, 178, 192, 40, 184, 185, 186, 187, 188, 178,
- 134, 240, 49, 193, 161, 191, 53, 150, 151, 11,
- 177, 122, 59, 156, 61, 198, 100, 101, 149, 26,
- 285, 353, 388, 70, 71, -1, 402, 74, -1, 243,
- 80, 78, 79, 117, -1, 82, 83, -1, -1, -1,
- 325, 133, 134, -1, -1, -1, -1, -1, 140, -1,
- -1, -1, -1, -1, -1, -1, 103, 104, 105, -1,
- -1, -1, -1, 110, 148, -1, -1, -1, -1, -1,
- -1, -1, 119, -1, 124, -1, 123, -1, 125, -1,
- 127, 128, 132, -1, -1, 135, -1, -1, -1, -1,
- 137, 138, 139, 140, 141, 142, 143, 144, -1, -1,
- 147, -1, 149, -1, -1, 155, -1, -1, -1, 156,
- 160, -1, 376, -1, 161, 162, 163, -1, 165, 166,
- -1, 10, 169, 170, -1, 14, 15, 16, -1, -1,
- -1, 178, 179, 22, 23, 55, 56, 57, 58, -1,
- 29, 30, -1, -1, 33, -1, -1, 36, 37, -1,
- -1, 40, -1, -1, -1, -1, -1, -1, -1, -1,
- 49, -1, -1, -1, 53, 85, -1, 87, -1, 89,
- 59, -1, 61, -1, 94, 9, -1, -1, -1, -1,
- -1, 70, 71, 17, -1, 74, -1, -1, -1, 78,
- 79, -1, -1, 82, 83, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 103, 104, 105, -1, 52, 53,
- -1, 110, -1, -1, -1, -1, -1, -1, -1, -1,
- 119, -1, -1, -1, 123, 69, 125, -1, 127, 128,
- -1, -1, -1, -1, -1, -1, -1, -1, 137, 138,
- 139, 140, 141, 142, 143, 144, 90, -1, 147, -1,
- 149, -1, -1, 97, -1, 99, -1, 156, -1, -1,
- -1, -1, 161, 162, 163, -1, 165, 166, 46, 113,
- 169, 170, -1, 13, -1, -1, 54, -1, -1, 19,
- 179, 21, -1, -1, -1, -1, 130, 131, -1, -1,
- -1, -1, -1, -1, 72, 73, -1, 75, -1, -1,
- -1, -1, -1, 81, -1, -1, -1, 47, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 164, -1, 166, -1, -1, -1, -1, 171, -1, 107,
- 108, 175, -1, 111, 112, -1, 114, 115, 116, -1,
- 118, -1, -1, -1, -1, -1, 86, -1, 88, -1,
- -1, -1, -1, 93, -1, 95, -1, -1, 98, -1,
+ 14, 37, 183, 5, 4, 43, 60, 60, 41, 61,
+ 55, 144, 48, 28, 156, 157, 65, 198, 67, 1,
+ 181, 38, 11, 37, 32, 34, 26, 20, 10, 186,
+ 144, 24, 14, 15, 16, 50, 183, 184, 53, 196,
+ 22, 23, 60, 60, 58, 54, 60, 29, 30, 91,
+ 60, 33, 60, 156, 36, 37, 156, 6, 40, 156,
+ 93, 103, 64, 196, 66, 246, 156, 49, 77, 183,
+ 184, 53, 156, 60, 119, 156, 156, 59, 130, 61,
+ 60, 60, 31, 156, 156, 156, 60, 80, 70, 71,
+ 0, 156, 74, 7, 8, 3, 78, 79, 181, 48,
+ 82, 83, 51, 103, 195, 156, 60, 156, 97, 91,
+ 110, 25, 126, 102, 147, 257, 258, 32, 171, 134,
+ 135, 156, 104, 105, 106, 139, 141, 127, 60, 111,
+ 168, 27, 125, 156, 42, 43, 44, 45, 120, 193,
+ 133, 27, 124, 136, 126, 29, 128, 129, 27, 63,
+ 167, 84, 36, 60, 156, 39, 138, 139, 140, 141,
+ 142, 143, 144, 145, 192, 158, 148, 60, 150, 65,
+ 163, 67, 60, 60, 123, 177, 176, 159, 92, 179,
+ 361, 156, 164, 165, 166, 327, 168, 169, 60, 181,
+ 172, 173, 76, 156, 156, 60, 156, 8, 35, 181,
+ 182, 12, 151, 152, 153, 154, 192, 18, 181, 390,
+ 159, 156, 27, 60, 395, 10, 60, 156, 195, 14,
+ 15, 16, 192, 107, 181, 261, 194, 22, 23, 137,
+ 185, 412, 98, 192, 29, 30, 186, 181, 33, 192,
+ 181, 36, 37, 157, 195, 40, 192, 155, 162, 244,
+ 146, 181, 160, 161, 49, 195, 136, 68, 53, 163,
+ 156, 11, 181, 123, 59, 202, 61, 27, 151, 247,
+ 9, 357, 392, 289, 406, 70, 71, -1, 17, 74,
+ -1, -1, -1, 78, 79, -1, 170, 82, 83, -1,
+ 101, 102, -1, 329, -1, -1, 91, 187, 188, 189,
+ 190, 191, -1, -1, -1, -1, 196, 118, -1, 104,
+ 105, 106, -1, 52, 53, -1, 111, 187, 188, 189,
+ 190, 191, -1, -1, -1, 120, -1, -1, -1, 124,
+ 69, 126, -1, 128, 129, -1, -1, -1, 149, -1,
+ -1, -1, -1, 138, 139, 140, 141, 142, 143, 144,
+ 145, 90, -1, 148, -1, 150, -1, -1, -1, 98,
+ -1, 100, -1, -1, 159, -1, 380, -1, -1, 164,
+ 165, 166, -1, 168, 169, 114, 10, 172, 173, -1,
+ 14, 15, 16, -1, -1, -1, 181, 182, 22, 23,
+ -1, -1, 131, 132, -1, 29, 30, -1, -1, 33,
+ -1, -1, 36, 37, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, -1, -1, 49, -1, -1, -1, 53,
+ 55, 56, 57, 58, -1, 59, -1, 61, 167, -1,
+ 169, -1, -1, -1, -1, 174, 70, 71, -1, 178,
+ 74, -1, -1, -1, 78, 79, -1, -1, 82, 83,
+ 85, -1, 87, -1, 89, -1, -1, 91, -1, -1,
+ 95, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 104, 105, 106, -1, -1, -1, -1, 111, -1, -1,
+ -1, -1, -1, -1, -1, -1, 120, -1, -1, -1,
+ 124, 46, 126, -1, 128, 129, -1, -1, -1, 54,
+ -1, -1, -1, -1, 138, 139, 140, 141, 142, 143,
+ 144, 145, -1, 13, 148, -1, 150, 72, 73, 19,
+ 75, 21, -1, -1, -1, 159, 81, -1, -1, -1,
+ 164, 165, 166, -1, 168, 169, -1, -1, 172, 173,
+ -1, -1, -1, -1, -1, -1, -1, 47, 182, -1,
+ -1, -1, -1, 108, 109, -1, -1, 112, 113, -1,
+ 115, 116, 117, -1, 119, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 86, -1, 88, -1,
+ -1, -1, -1, -1, 94, -1, 96, -1, -1, 99,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 120, 121, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 171
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 174,
+ -1, 121, 122
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1287,82 +1290,83 @@ static const yytype_uint16 yystos[] =
{
0, 1, 10, 14, 15, 16, 22, 23, 29, 30,
33, 36, 37, 40, 49, 53, 59, 61, 70, 71,
- 74, 78, 79, 82, 83, 103, 104, 105, 110, 119,
- 123, 125, 127, 128, 137, 138, 139, 140, 141, 142,
- 143, 144, 147, 149, 156, 161, 162, 163, 165, 166,
- 169, 170, 179, 195, 196, 197, 198, 199, 211, 212,
- 213, 214, 218, 223, 231, 240, 245, 249, 254, 258,
- 259, 260, 261, 269, 270, 273, 284, 285, 178, 60,
- 60, 215, 8, 12, 18, 68, 100, 101, 117, 148,
- 250, 251, 252, 253, 11, 96, 101, 234, 235, 236,
- 153, 262, 250, 20, 24, 80, 124, 132, 135, 155,
- 160, 225, 65, 67, 153, 200, 201, 202, 153, 153,
- 153, 153, 267, 268, 200, 281, 55, 56, 57, 58,
- 85, 87, 89, 94, 237, 238, 239, 281, 153, 153,
- 280, 60, 7, 8, 25, 63, 91, 154, 159, 274,
- 275, 27, 65, 67, 145, 200, 201, 60, 41, 92,
- 146, 246, 247, 248, 153, 263, 224, 225, 153, 6,
- 31, 48, 51, 122, 150, 151, 156, 255, 256, 257,
- 13, 19, 21, 47, 86, 88, 93, 95, 98, 120,
- 121, 219, 220, 221, 222, 201, 60, 190, 277, 278,
- 279, 60, 276, 0, 197, 178, 200, 200, 32, 60,
- 283, 153, 153, 34, 54, 77, 272, 192, 28, 50,
- 53, 133, 134, 140, 216, 217, 251, 235, 60, 32,
- 226, 3, 42, 43, 44, 45, 136, 152, 157, 158,
- 241, 242, 243, 244, 153, 197, 268, 200, 238, 60,
- 153, 275, 232, 27, 27, 232, 232, 84, 247, 60,
- 189, 225, 256, 283, 38, 60, 164, 282, 220, 60,
- 283, 265, 60, 278, 60, 178, 203, 5, 64, 66,
- 153, 174, 271, 180, 181, 286, 287, 288, 60, 153,
- 29, 36, 39, 76, 106, 167, 227, 228, 229, 153,
- 153, 60, 242, 283, 282, 46, 54, 72, 73, 75,
- 81, 107, 108, 111, 112, 114, 115, 116, 118, 171,
- 233, 232, 232, 201, 153, 61, 129, 266, 35, 9,
- 17, 52, 53, 69, 90, 97, 99, 113, 130, 131,
- 164, 166, 171, 175, 204, 205, 206, 207, 208, 209,
- 210, 143, 287, 289, 290, 292, 178, 189, 153, 4,
- 26, 102, 109, 126, 173, 176, 230, 232, 27, 264,
- 201, 60, 60, 60, 168, 153, 189, 178, 193, 290,
- 192, 283, 191, 200, 182, 291, 189, 183, 293, 294,
- 283, 189, 193, 294, 178, 283, 192, 184, 185, 186,
- 187, 188, 295, 296, 297, 193, 296, 178, 189, 178,
- 283
+ 74, 78, 79, 82, 83, 91, 104, 105, 106, 111,
+ 120, 124, 126, 128, 129, 138, 139, 140, 141, 142,
+ 143, 144, 145, 148, 150, 159, 164, 165, 166, 168,
+ 169, 172, 173, 182, 198, 199, 200, 201, 202, 214,
+ 215, 216, 217, 221, 226, 234, 243, 248, 252, 257,
+ 261, 262, 263, 264, 272, 273, 276, 287, 288, 181,
+ 60, 60, 218, 8, 12, 18, 68, 101, 102, 118,
+ 149, 253, 254, 255, 256, 11, 97, 102, 237, 238,
+ 239, 156, 265, 253, 20, 24, 80, 125, 133, 136,
+ 158, 163, 228, 65, 67, 156, 203, 204, 205, 156,
+ 156, 156, 156, 270, 271, 203, 284, 60, 55, 56,
+ 57, 58, 85, 87, 89, 95, 240, 241, 242, 284,
+ 156, 156, 283, 60, 7, 8, 25, 63, 92, 157,
+ 162, 277, 278, 27, 65, 67, 146, 203, 204, 60,
+ 41, 93, 147, 249, 250, 251, 156, 266, 227, 228,
+ 156, 6, 31, 48, 51, 123, 151, 152, 153, 154,
+ 159, 258, 259, 260, 13, 19, 21, 47, 86, 88,
+ 94, 96, 99, 121, 122, 222, 223, 224, 225, 204,
+ 60, 193, 280, 281, 282, 60, 279, 0, 200, 181,
+ 203, 203, 32, 60, 286, 156, 156, 34, 54, 77,
+ 275, 195, 28, 50, 53, 134, 135, 141, 219, 220,
+ 254, 238, 60, 32, 229, 3, 42, 43, 44, 45,
+ 137, 155, 160, 161, 244, 245, 246, 247, 156, 200,
+ 271, 203, 241, 60, 156, 278, 235, 27, 27, 235,
+ 235, 84, 250, 60, 192, 228, 259, 286, 38, 60,
+ 167, 285, 223, 60, 286, 268, 60, 281, 60, 181,
+ 206, 5, 64, 66, 156, 177, 274, 183, 184, 289,
+ 290, 291, 60, 156, 29, 36, 39, 76, 107, 170,
+ 230, 231, 232, 156, 156, 60, 245, 286, 285, 46,
+ 54, 72, 73, 75, 81, 108, 109, 112, 113, 115,
+ 116, 117, 119, 174, 236, 235, 235, 204, 156, 61,
+ 130, 269, 35, 9, 17, 52, 53, 69, 90, 98,
+ 100, 114, 131, 132, 167, 169, 174, 178, 207, 208,
+ 209, 210, 211, 212, 213, 144, 290, 292, 293, 295,
+ 181, 192, 156, 4, 26, 103, 110, 127, 176, 179,
+ 233, 235, 27, 267, 204, 60, 60, 60, 171, 156,
+ 192, 181, 196, 293, 195, 286, 194, 203, 185, 294,
+ 192, 186, 296, 297, 286, 192, 196, 297, 181, 286,
+ 195, 187, 188, 189, 190, 191, 298, 299, 300, 196,
+ 299, 181, 192, 181, 286
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 194, 195, 196, 196, 196, 197, 197, 197, 197,
- 197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
- 198, 199, 199, 199, 199, 199, 200, 200, 201, 202,
- 202, 203, 203, 204, 204, 204, 205, 206, 206, 206,
- 206, 206, 206, 206, 206, 207, 207, 208, 208, 208,
- 208, 208, 208, 209, 210, 211, 212, 212, 213, 213,
- 213, 214, 214, 214, 214, 214, 214, 214, 214, 214,
- 215, 215, 216, 216, 217, 217, 217, 217, 217, 218,
- 219, 219, 220, 220, 220, 221, 221, 221, 221, 221,
- 221, 222, 222, 222, 222, 223, 223, 223, 224, 224,
- 225, 225, 225, 225, 225, 225, 225, 225, 226, 226,
- 227, 227, 227, 227, 228, 228, 229, 229, 230, 230,
- 230, 230, 230, 230, 230, 231, 231, 231, 231, 231,
- 231, 231, 231, 232, 232, 233, 233, 233, 233, 233,
- 233, 233, 233, 233, 233, 233, 233, 233, 233, 233,
- 234, 234, 235, 236, 236, 236, 237, 237, 238, 239,
- 239, 239, 239, 239, 239, 239, 239, 240, 241, 241,
- 242, 242, 242, 242, 242, 243, 243, 244, 244, 244,
- 244, 245, 246, 246, 247, 248, 248, 248, 249, 249,
- 250, 250, 251, 251, 252, 252, 252, 252, 252, 252,
- 253, 253, 254, 255, 255, 256, 257, 257, 257, 257,
- 257, 257, 257, 257, 258, 258, 258, 258, 258, 258,
- 258, 258, 258, 258, 258, 258, 258, 259, 259, 259,
- 260, 260, 260, 261, 261, 262, 262, 262, 263, 264,
- 264, 265, 265, 266, 266, 267, 267, 268, 269, 269,
- 270, 270, 271, 271, 271, 271, 272, 272, 272, 273,
- 274, 274, 275, 275, 275, 275, 275, 275, 275, 276,
- 276, 277, 277, 278, 278, 279, 280, 280, 281, 281,
- 282, 282, 282, 283, 283, 284, 285, 286, 286, 287,
- 288, 288, 289, 289, 290, 291, 292, 293, 293, 294,
- 295, 295, 296, 297, 297, 297, 297, 297
+ 0, 197, 198, 199, 199, 199, 200, 200, 200, 200,
+ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200,
+ 201, 202, 202, 202, 202, 202, 203, 203, 204, 205,
+ 205, 206, 206, 207, 207, 207, 208, 209, 209, 209,
+ 209, 209, 209, 209, 209, 210, 210, 211, 211, 211,
+ 211, 211, 211, 212, 213, 214, 215, 215, 216, 216,
+ 216, 216, 217, 217, 217, 217, 217, 217, 217, 217,
+ 217, 218, 218, 219, 219, 220, 220, 220, 220, 220,
+ 221, 222, 222, 223, 223, 223, 224, 224, 224, 224,
+ 224, 224, 225, 225, 225, 225, 226, 226, 226, 227,
+ 227, 228, 228, 228, 228, 228, 228, 228, 228, 229,
+ 229, 230, 230, 230, 230, 231, 231, 232, 232, 233,
+ 233, 233, 233, 233, 233, 233, 234, 234, 234, 234,
+ 234, 234, 234, 234, 235, 235, 236, 236, 236, 236,
+ 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
+ 236, 237, 237, 238, 239, 239, 239, 240, 240, 241,
+ 242, 242, 242, 242, 242, 242, 242, 242, 243, 244,
+ 244, 245, 245, 245, 245, 245, 246, 246, 247, 247,
+ 247, 247, 248, 249, 249, 250, 251, 251, 251, 252,
+ 252, 253, 253, 254, 254, 255, 255, 255, 255, 255,
+ 255, 256, 256, 257, 258, 258, 259, 260, 260, 260,
+ 260, 260, 260, 260, 260, 260, 260, 261, 261, 261,
+ 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
+ 262, 262, 262, 263, 263, 263, 264, 264, 265, 265,
+ 265, 266, 267, 267, 268, 268, 269, 269, 270, 270,
+ 271, 272, 272, 273, 273, 274, 274, 274, 274, 275,
+ 275, 275, 276, 277, 277, 278, 278, 278, 278, 278,
+ 278, 278, 279, 279, 280, 280, 281, 281, 282, 283,
+ 283, 284, 284, 285, 285, 285, 286, 286, 287, 288,
+ 289, 289, 290, 291, 291, 292, 292, 293, 294, 295,
+ 296, 296, 297, 298, 298, 299, 300, 300, 300, 300,
+ 300
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -1375,30 +1379,31 @@ static const yytype_uint8 yyr2[] =
1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
1, 1, 1, 2, 1, 2, 1, 1, 1, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 0, 2, 2, 2, 1, 1, 1, 1, 1, 2,
- 2, 1, 2, 2, 2, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 2, 3, 2, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 0, 2,
- 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 2, 3, 5, 3,
- 4, 4, 3, 0, 2, 1, 1, 1, 1, 1,
+ 2, 0, 2, 2, 2, 1, 1, 1, 1, 1,
+ 2, 2, 1, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 3, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 2, 3, 5,
+ 3, 4, 4, 3, 0, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 1, 2, 1, 1, 1, 2, 1, 2, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 2, 1,
- 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
- 1, 2, 2, 1, 2, 1, 1, 1, 2, 2,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 2, 1, 2, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 2, 2, 3,
- 1, 2, 2, 2, 2, 3, 2, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 0, 4, 1,
- 0, 0, 2, 2, 2, 2, 1, 1, 3, 3,
+ 1, 2, 1, 2, 1, 1, 1, 2, 1, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
+ 1, 2, 2, 2, 2, 2, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 2, 1, 1, 1, 2,
+ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 2, 1, 2, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 1, 2, 1, 1, 1, 5, 2, 1, 2, 1,
- 1, 1, 1, 1, 1, 5, 1, 3, 2, 3,
- 1, 1, 2, 1, 5, 4, 3, 2, 1, 6,
- 3, 2, 3, 1, 1, 1, 1, 1
+ 2, 2, 3, 1, 2, 2, 2, 2, 3, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 0, 4, 1, 0, 0, 2, 2, 2, 2, 1,
+ 1, 3, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 1, 2, 1, 1, 1, 5, 2,
+ 1, 2, 1, 1, 1, 1, 1, 1, 5, 1,
+ 3, 2, 3, 1, 1, 2, 1, 5, 4, 3,
+ 2, 1, 6, 3, 2, 3, 1, 1, 1, 1,
+ 1
};
@@ -2077,7 +2082,7 @@ yyreduce:
switch (yyn)
{
case 5:
-#line 370 "ntp_parser.y" /* yacc.c:1646 */
+#line 373 "ntp_parser.y" /* yacc.c:1646 */
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2089,85 +2094,85 @@ yyreduce:
ip_file->err_line_no,
ip_file->err_col_no);
}
-#line 2093 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2098 "ntp_parser.c" /* yacc.c:1646 */
break;
case 20:
-#line 405 "ntp_parser.y" /* yacc.c:1646 */
+#line 408 "ntp_parser.y" /* yacc.c:1646 */
{
peer_node *my_node;
my_node = create_peer_node((yyvsp[-2].Integer), (yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.peers, my_node);
}
-#line 2104 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2109 "ntp_parser.c" /* yacc.c:1646 */
break;
case 27:
-#line 424 "ntp_parser.y" /* yacc.c:1646 */
+#line 427 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), (yyvsp[-1].Integer)); }
-#line 2110 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2115 "ntp_parser.c" /* yacc.c:1646 */
break;
case 28:
-#line 429 "ntp_parser.y" /* yacc.c:1646 */
+#line 432 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = create_address_node((yyvsp[0].String), AF_UNSPEC); }
-#line 2116 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2121 "ntp_parser.c" /* yacc.c:1646 */
break;
case 29:
-#line 434 "ntp_parser.y" /* yacc.c:1646 */
+#line 437 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET; }
-#line 2122 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2127 "ntp_parser.c" /* yacc.c:1646 */
break;
case 30:
-#line 436 "ntp_parser.y" /* yacc.c:1646 */
+#line 439 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET6; }
-#line 2128 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2133 "ntp_parser.c" /* yacc.c:1646 */
break;
case 31:
-#line 441 "ntp_parser.y" /* yacc.c:1646 */
+#line 444 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2134 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2139 "ntp_parser.c" /* yacc.c:1646 */
break;
case 32:
-#line 443 "ntp_parser.y" /* yacc.c:1646 */
+#line 446 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2143 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2148 "ntp_parser.c" /* yacc.c:1646 */
break;
case 36:
-#line 457 "ntp_parser.y" /* yacc.c:1646 */
+#line 460 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2149 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2154 "ntp_parser.c" /* yacc.c:1646 */
break;
case 45:
-#line 473 "ntp_parser.y" /* yacc.c:1646 */
+#line 476 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2155 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2160 "ntp_parser.c" /* yacc.c:1646 */
break;
case 46:
-#line 475 "ntp_parser.y" /* yacc.c:1646 */
+#line 478 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_uval((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2161 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2166 "ntp_parser.c" /* yacc.c:1646 */
break;
case 53:
-#line 489 "ntp_parser.y" /* yacc.c:1646 */
+#line 492 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2167 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2172 "ntp_parser.c" /* yacc.c:1646 */
break;
case 55:
-#line 503 "ntp_parser.y" /* yacc.c:1646 */
+#line 506 "ntp_parser.y" /* yacc.c:1646 */
{
unpeer_node *my_node;
@@ -2175,79 +2180,85 @@ yyreduce:
if (my_node)
APPEND_G_FIFO(cfgt.unpeers, my_node);
}
-#line 2179 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2184 "ntp_parser.c" /* yacc.c:1646 */
break;
case 58:
-#line 524 "ntp_parser.y" /* yacc.c:1646 */
+#line 527 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.broadcastclient = 1; }
-#line 2185 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2190 "ntp_parser.c" /* yacc.c:1646 */
break;
case 59:
-#line 526 "ntp_parser.y" /* yacc.c:1646 */
+#line 529 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.manycastserver, (yyvsp[0].Address_fifo)); }
-#line 2191 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2196 "ntp_parser.c" /* yacc.c:1646 */
break;
case 60:
-#line 528 "ntp_parser.y" /* yacc.c:1646 */
+#line 531 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.multicastclient, (yyvsp[0].Address_fifo)); }
-#line 2197 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2202 "ntp_parser.c" /* yacc.c:1646 */
break;
case 61:
-#line 539 "ntp_parser.y" /* yacc.c:1646 */
+#line 533 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.mdnstries = (yyvsp[0].Integer); }
+#line 2208 "ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 62:
+#line 544 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *atrv;
atrv = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
APPEND_G_FIFO(cfgt.vars, atrv);
}
-#line 2208 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2219 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 62:
-#line 546 "ntp_parser.y" /* yacc.c:1646 */
+ case 63:
+#line 551 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.control_key = (yyvsp[0].Integer); }
-#line 2214 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2225 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 63:
-#line 548 "ntp_parser.y" /* yacc.c:1646 */
+ case 64:
+#line 553 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.cryptosw++;
CONCAT_G_FIFOS(cfgt.auth.crypto_cmd_list, (yyvsp[0].Attr_val_fifo));
}
-#line 2223 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2234 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 64:
-#line 553 "ntp_parser.y" /* yacc.c:1646 */
+ case 65:
+#line 558 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keys = (yyvsp[0].String); }
-#line 2229 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2240 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 65:
-#line 555 "ntp_parser.y" /* yacc.c:1646 */
+ case 66:
+#line 560 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keysdir = (yyvsp[0].String); }
-#line 2235 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2246 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 66:
-#line 557 "ntp_parser.y" /* yacc.c:1646 */
+ case 67:
+#line 562 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.request_key = (yyvsp[0].Integer); }
-#line 2241 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2252 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 67:
-#line 559 "ntp_parser.y" /* yacc.c:1646 */
+ case 68:
+#line 564 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.revoke = (yyvsp[0].Integer); }
-#line 2247 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2258 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 68:
-#line 561 "ntp_parser.y" /* yacc.c:1646 */
+ case 69:
+#line 566 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
@@ -2256,38 +2267,38 @@ yyreduce:
// else
// LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
}
-#line 2260 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2271 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 69:
-#line 570 "ntp_parser.y" /* yacc.c:1646 */
+ case 70:
+#line 575 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
-#line 2266 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2277 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 70:
-#line 575 "ntp_parser.y" /* yacc.c:1646 */
+ case 71:
+#line 580 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2272 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2283 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 71:
-#line 577 "ntp_parser.y" /* yacc.c:1646 */
+ case 72:
+#line 582 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2281 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2292 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 72:
-#line 585 "ntp_parser.y" /* yacc.c:1646 */
+ case 73:
+#line 590 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2287 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2298 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 73:
-#line 587 "ntp_parser.y" /* yacc.c:1646 */
+ case 74:
+#line 592 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = NULL;
cfgt.auth.revoke = (yyvsp[0].Integer);
@@ -2296,59 +2307,59 @@ yyreduce:
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
-#line 2300 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2311 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 79:
-#line 612 "ntp_parser.y" /* yacc.c:1646 */
+ case 80:
+#line 617 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.orphan_cmds, (yyvsp[0].Attr_val_fifo)); }
-#line 2306 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2317 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 80:
-#line 617 "ntp_parser.y" /* yacc.c:1646 */
+ case 81:
+#line 622 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2326 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 81:
-#line 622 "ntp_parser.y" /* yacc.c:1646 */
+ case 82:
+#line 627 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2324 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2335 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 82:
-#line 630 "ntp_parser.y" /* yacc.c:1646 */
+ case 83:
+#line 635 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2330 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2341 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 83:
-#line 632 "ntp_parser.y" /* yacc.c:1646 */
+ case 84:
+#line 637 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2336 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2347 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 84:
-#line 634 "ntp_parser.y" /* yacc.c:1646 */
+ case 85:
+#line 639 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (double)(yyvsp[0].Integer)); }
-#line 2342 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2353 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 95:
-#line 660 "ntp_parser.y" /* yacc.c:1646 */
+ case 96:
+#line 665 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.stats_list, (yyvsp[0].Int_fifo)); }
-#line 2348 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2359 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 96:
-#line 662 "ntp_parser.y" /* yacc.c:1646 */
+ case 97:
+#line 667 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
cfgt.stats_dir = (yyvsp[0].String);
@@ -2357,55 +2368,55 @@ yyreduce:
yyerror(ip_file, "statsdir remote configuration ignored");
}
}
-#line 2361 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2372 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 97:
-#line 671 "ntp_parser.y" /* yacc.c:1646 */
+ case 98:
+#line 676 "ntp_parser.y" /* yacc.c:1646 */
{
filegen_node *fgn;
fgn = create_filegen_node((yyvsp[-1].Integer), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.filegen_opts, fgn);
}
-#line 2372 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2383 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 98:
-#line 681 "ntp_parser.y" /* yacc.c:1646 */
+ case 99:
+#line 686 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2381 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2392 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 99:
-#line 686 "ntp_parser.y" /* yacc.c:1646 */
+ case 100:
+#line 691 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2390 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2401 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 108:
-#line 705 "ntp_parser.y" /* yacc.c:1646 */
+ case 109:
+#line 710 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2396 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2407 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 109:
-#line 707 "ntp_parser.y" /* yacc.c:1646 */
+ case 110:
+#line 712 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2405 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2416 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 110:
-#line 715 "ntp_parser.y" /* yacc.c:1646 */
+ case 111:
+#line 720 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
@@ -2415,11 +2426,11 @@ yyreduce:
yyerror(ip_file, "filegen file remote config ignored");
}
}
-#line 2419 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2430 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 111:
-#line 725 "ntp_parser.y" /* yacc.c:1646 */
+ case 112:
+#line 730 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2428,11 +2439,11 @@ yyreduce:
yyerror(ip_file, "filegen type remote config ignored");
}
}
-#line 2432 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2443 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 112:
-#line 734 "ntp_parser.y" /* yacc.c:1646 */
+ case 113:
+#line 739 "ntp_parser.y" /* yacc.c:1646 */
{
const char *err;
@@ -2447,33 +2458,33 @@ yyreduce:
yyerror(ip_file, err);
}
}
-#line 2451 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2462 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 113:
-#line 749 "ntp_parser.y" /* yacc.c:1646 */
+ case 114:
+#line 754 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2457 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2468 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 125:
-#line 779 "ntp_parser.y" /* yacc.c:1646 */
+ case 126:
+#line 784 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.discard_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2465 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2476 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 126:
-#line 783 "ntp_parser.y" /* yacc.c:1646 */
+ case 127:
+#line 788 "ntp_parser.y" /* yacc.c:1646 */
{
CONCAT_G_FIFOS(cfgt.mru_opts, (yyvsp[0].Attr_val_fifo));
}
-#line 2473 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2484 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 127:
-#line 787 "ntp_parser.y" /* yacc.c:1646 */
+ case 128:
+#line 792 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2481,11 +2492,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2485 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2496 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 128:
-#line 795 "ntp_parser.y" /* yacc.c:1646 */
+ case 129:
+#line 800 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2493,11 +2504,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2497 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2508 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 129:
-#line 803 "ntp_parser.y" /* yacc.c:1646 */
+ case 130:
+#line 808 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2505,11 +2516,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2509 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2520 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 130:
-#line 811 "ntp_parser.y" /* yacc.c:1646 */
+ case 131:
+#line 816 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2524,11 +2535,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2528 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2539 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 131:
-#line 826 "ntp_parser.y" /* yacc.c:1646 */
+ case 132:
+#line 831 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2543,11 +2554,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2547 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2558 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 132:
-#line 841 "ntp_parser.y" /* yacc.c:1646 */
+ case 133:
+#line 846 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node * rn;
@@ -2556,199 +2567,199 @@ yyreduce:
NULL, NULL, (yyvsp[0].Int_fifo), ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2560 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2571 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 133:
-#line 853 "ntp_parser.y" /* yacc.c:1646 */
+ case 134:
+#line 858 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Int_fifo) = NULL; }
-#line 2566 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2577 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 134:
-#line 855 "ntp_parser.y" /* yacc.c:1646 */
+ case 135:
+#line 860 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 2575 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2586 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 150:
-#line 881 "ntp_parser.y" /* yacc.c:1646 */
+ case 151:
+#line 886 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2584 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2595 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 151:
-#line 886 "ntp_parser.y" /* yacc.c:1646 */
+ case 152:
+#line 891 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2593 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2604 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 152:
-#line 894 "ntp_parser.y" /* yacc.c:1646 */
+ case 153:
+#line 899 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2599 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2610 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 156:
-#line 905 "ntp_parser.y" /* yacc.c:1646 */
+ case 157:
+#line 910 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2608 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2619 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 157:
-#line 910 "ntp_parser.y" /* yacc.c:1646 */
+ case 158:
+#line 915 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2617 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2628 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 158:
-#line 918 "ntp_parser.y" /* yacc.c:1646 */
+ case 159:
+#line 923 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2623 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2634 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 167:
-#line 938 "ntp_parser.y" /* yacc.c:1646 */
+ case 168:
+#line 943 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.fudge, aon);
}
-#line 2634 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2645 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 168:
-#line 948 "ntp_parser.y" /* yacc.c:1646 */
+ case 169:
+#line 953 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2643 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2654 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 169:
-#line 953 "ntp_parser.y" /* yacc.c:1646 */
+ case 170:
+#line 958 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2652 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
- break;
-
- case 170:
-#line 961 "ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2658 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2663 "ntp_parser.c" /* yacc.c:1646 */
break;
case 171:
-#line 963 "ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2664 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 966 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
+#line 2669 "ntp_parser.c" /* yacc.c:1646 */
break;
case 172:
-#line 965 "ntp_parser.y" /* yacc.c:1646 */
+#line 968 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2670 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2675 "ntp_parser.c" /* yacc.c:1646 */
break;
case 173:
-#line 967 "ntp_parser.y" /* yacc.c:1646 */
- { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2676 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 970 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
+#line 2681 "ntp_parser.c" /* yacc.c:1646 */
break;
case 174:
-#line 969 "ntp_parser.y" /* yacc.c:1646 */
+#line 972 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
-#line 2682 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2687 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 181:
-#line 990 "ntp_parser.y" /* yacc.c:1646 */
- { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
-#line 2688 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+ case 175:
+#line 974 "ntp_parser.y" /* yacc.c:1646 */
+ { (yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String)); }
+#line 2693 "ntp_parser.c" /* yacc.c:1646 */
break;
case 182:
#line 995 "ntp_parser.y" /* yacc.c:1646 */
+ { CONCAT_G_FIFOS(cfgt.rlimit, (yyvsp[0].Attr_val_fifo)); }
+#line 2699 "ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 183:
+#line 1000 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2697 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2708 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 183:
-#line 1000 "ntp_parser.y" /* yacc.c:1646 */
+ case 184:
+#line 1005 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2706 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2717 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 184:
-#line 1008 "ntp_parser.y" /* yacc.c:1646 */
+ case 185:
+#line 1013 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2712 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2723 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 188:
-#line 1024 "ntp_parser.y" /* yacc.c:1646 */
+ case 189:
+#line 1029 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.enable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2718 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2729 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 189:
-#line 1026 "ntp_parser.y" /* yacc.c:1646 */
+ case 190:
+#line 1031 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.disable_opts, (yyvsp[0].Attr_val_fifo)); }
-#line 2724 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2735 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 190:
-#line 1031 "ntp_parser.y" /* yacc.c:1646 */
+ case 191:
+#line 1036 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2733 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2744 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 191:
-#line 1036 "ntp_parser.y" /* yacc.c:1646 */
+ case 192:
+#line 1041 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2742 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2753 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 192:
-#line 1044 "ntp_parser.y" /* yacc.c:1646 */
+ case 193:
+#line 1049 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer)); }
-#line 2748 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2759 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 193:
-#line 1046 "ntp_parser.y" /* yacc.c:1646 */
+ case 194:
+#line 1051 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
@@ -2762,63 +2773,63 @@ yyreduce:
yyerror(ip_file, err_str);
}
}
-#line 2766 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2777 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 202:
-#line 1081 "ntp_parser.y" /* yacc.c:1646 */
+ case 203:
+#line 1086 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.tinker, (yyvsp[0].Attr_val_fifo)); }
-#line 2772 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2783 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 203:
-#line 1086 "ntp_parser.y" /* yacc.c:1646 */
+ case 204:
+#line 1091 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2781 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2792 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 204:
-#line 1091 "ntp_parser.y" /* yacc.c:1646 */
+ case 205:
+#line 1096 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2790 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2801 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 205:
-#line 1099 "ntp_parser.y" /* yacc.c:1646 */
+ case 206:
+#line 1104 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double)); }
-#line 2796 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2807 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 216:
-#line 1122 "ntp_parser.y" /* yacc.c:1646 */
+ case 219:
+#line 1129 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_dval((yyvsp[-1].Integer), (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2807 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2818 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 217:
-#line 1129 "ntp_parser.y" /* yacc.c:1646 */
+ case 220:
+#line 1136 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2818 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2829 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 218:
-#line 1136 "ntp_parser.y" /* yacc.c:1646 */
+ case 221:
+#line 1143 "ntp_parser.y" /* yacc.c:1646 */
{
char error_text[64];
attr_val *av;
@@ -2834,11 +2845,11 @@ yyreduce:
yyerror(ip_file, error_text);
}
}
-#line 2838 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2849 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 219:
-#line 1152 "ntp_parser.y" /* yacc.c:1646 */
+ case 222:
+#line 1159 "ntp_parser.y" /* yacc.c:1646 */
{
if (!input_from_file) {
yyerror(ip_file, "remote includefile ignored");
@@ -2857,72 +2868,72 @@ yyreduce:
}
}
}
-#line 2861 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2872 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 220:
-#line 1171 "ntp_parser.y" /* yacc.c:1646 */
+ case 223:
+#line 1178 "ntp_parser.y" /* yacc.c:1646 */
{
while (curr_include_level != -1)
FCLOSE(fp[curr_include_level--]);
}
-#line 2870 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2881 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 221:
-#line 1176 "ntp_parser.y" /* yacc.c:1646 */
+ case 224:
+#line 1183 "ntp_parser.y" /* yacc.c:1646 */
{ /* see drift_parm below for actions */ }
-#line 2876 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2887 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 222:
-#line 1178 "ntp_parser.y" /* yacc.c:1646 */
+ case 225:
+#line 1185 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.logconfig, (yyvsp[0].Attr_val_fifo)); }
-#line 2882 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2893 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 223:
-#line 1180 "ntp_parser.y" /* yacc.c:1646 */
+ case 226:
+#line 1187 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.phone, (yyvsp[0].String_fifo)); }
-#line 2888 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2899 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 224:
-#line 1182 "ntp_parser.y" /* yacc.c:1646 */
+ case 227:
+#line 1189 "ntp_parser.y" /* yacc.c:1646 */
{ APPEND_G_FIFO(cfgt.setvar, (yyvsp[0].Set_var)); }
-#line 2894 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2905 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 225:
-#line 1184 "ntp_parser.y" /* yacc.c:1646 */
+ case 228:
+#line 1191 "ntp_parser.y" /* yacc.c:1646 */
{
addr_opts_node *aon;
aon = create_addr_opts_node((yyvsp[-1].Address_node), (yyvsp[0].Attr_val_fifo));
APPEND_G_FIFO(cfgt.trap, aon);
}
-#line 2905 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2916 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 226:
-#line 1191 "ntp_parser.y" /* yacc.c:1646 */
+ case 229:
+#line 1198 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.ttl, (yyvsp[0].Attr_val_fifo)); }
-#line 2911 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2922 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 235:
-#line 1213 "ntp_parser.y" /* yacc.c:1646 */
+ case 238:
+#line 1220 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval(T_Driftfile, (yyvsp[0].String));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2922 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2933 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 236:
-#line 1220 "ntp_parser.y" /* yacc.c:1646 */
+ case 239:
+#line 1227 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
@@ -2931,82 +2942,82 @@ yyreduce:
av = create_attr_dval(T_WanderThreshold, (yyvsp[0].Double));
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2935 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2946 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 237:
-#line 1229 "ntp_parser.y" /* yacc.c:1646 */
+ case 240:
+#line 1236 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
av = create_attr_sval(T_Driftfile, "");
APPEND_G_FIFO(cfgt.vars, av);
}
-#line 2946 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2957 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 238:
-#line 1239 "ntp_parser.y" /* yacc.c:1646 */
+ case 241:
+#line 1246 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Set_var) = create_setvar_node((yyvsp[-3].String), (yyvsp[-1].String), (yyvsp[0].Integer)); }
-#line 2952 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2963 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 240:
-#line 1245 "ntp_parser.y" /* yacc.c:1646 */
+ case 243:
+#line 1252 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 2958 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2969 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 241:
-#line 1250 "ntp_parser.y" /* yacc.c:1646 */
+ case 244:
+#line 1257 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2964 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2975 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 242:
-#line 1252 "ntp_parser.y" /* yacc.c:1646 */
+ case 245:
+#line 1259 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2973 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2984 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 243:
-#line 1260 "ntp_parser.y" /* yacc.c:1646 */
+ case 246:
+#line 1267 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer)); }
-#line 2979 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2990 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 244:
-#line 1262 "ntp_parser.y" /* yacc.c:1646 */
+ case 247:
+#line 1269 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), estrdup((yyvsp[0].Address_node)->address));
destroy_address_node((yyvsp[0].Address_node));
}
-#line 2988 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2999 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 245:
-#line 1270 "ntp_parser.y" /* yacc.c:1646 */
+ case 248:
+#line 1277 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 2997 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3008 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 246:
-#line 1275 "ntp_parser.y" /* yacc.c:1646 */
+ case 249:
+#line 1282 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3006 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3017 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 247:
-#line 1283 "ntp_parser.y" /* yacc.c:1646 */
+ case 250:
+#line 1290 "ntp_parser.y" /* yacc.c:1646 */
{
char prefix;
char * type;
@@ -3028,141 +3039,141 @@ yyreduce:
(yyval.Attr_val) = create_attr_sval(prefix, estrdup(type));
YYFREE((yyvsp[0].String));
}
-#line 3032 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3043 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 248:
-#line 1308 "ntp_parser.y" /* yacc.c:1646 */
+ case 251:
+#line 1315 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
nrn = create_nic_rule_node((yyvsp[0].Integer), NULL, (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3043 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3054 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 249:
-#line 1315 "ntp_parser.y" /* yacc.c:1646 */
+ case 252:
+#line 1322 "ntp_parser.y" /* yacc.c:1646 */
{
nic_rule_node *nrn;
nrn = create_nic_rule_node(0, (yyvsp[0].String), (yyvsp[-1].Integer));
APPEND_G_FIFO(cfgt.nic_rules, nrn);
}
-#line 3054 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3065 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 259:
-#line 1343 "ntp_parser.y" /* yacc.c:1646 */
+ case 262:
+#line 1350 "ntp_parser.y" /* yacc.c:1646 */
{ CONCAT_G_FIFOS(cfgt.reset_counters, (yyvsp[0].Int_fifo)); }
-#line 3060 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3071 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 260:
-#line 1348 "ntp_parser.y" /* yacc.c:1646 */
+ case 263:
+#line 1355 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = (yyvsp[-1].Int_fifo);
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3069 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3080 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 261:
-#line 1353 "ntp_parser.y" /* yacc.c:1646 */
+ case 264:
+#line 1360 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Int_fifo) = NULL;
APPEND_G_FIFO((yyval.Int_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3078 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3089 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 269:
-#line 1377 "ntp_parser.y" /* yacc.c:1646 */
+ case 272:
+#line 1384 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3087 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3098 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 270:
-#line 1382 "ntp_parser.y" /* yacc.c:1646 */
+ case 273:
+#line 1389 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), create_int_node((yyvsp[0].Integer)));
}
-#line 3096 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3107 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 271:
-#line 1390 "ntp_parser.y" /* yacc.c:1646 */
+ case 274:
+#line 1397 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-1].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3105 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3116 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 272:
-#line 1395 "ntp_parser.y" /* yacc.c:1646 */
+ case 275:
+#line 1402 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[0].Attr_val));
}
-#line 3114 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3125 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 273:
-#line 1403 "ntp_parser.y" /* yacc.c:1646 */
+ case 276:
+#line 1410 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_ival('i', (yyvsp[0].Integer)); }
-#line 3120 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3131 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 275:
-#line 1409 "ntp_parser.y" /* yacc.c:1646 */
+ case 278:
+#line 1416 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_rangeval('-', (yyvsp[-3].Integer), (yyvsp[-1].Integer)); }
-#line 3126 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3137 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 276:
-#line 1414 "ntp_parser.y" /* yacc.c:1646 */
+ case 279:
+#line 1421 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = (yyvsp[-1].String_fifo);
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3135 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3146 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 277:
-#line 1419 "ntp_parser.y" /* yacc.c:1646 */
+ case 280:
+#line 1426 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.String_fifo) = NULL;
APPEND_G_FIFO((yyval.String_fifo), create_string_node((yyvsp[0].String)));
}
-#line 3144 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3155 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 278:
-#line 1427 "ntp_parser.y" /* yacc.c:1646 */
+ case 281:
+#line 1434 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = (yyvsp[-1].Address_fifo);
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3153 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3164 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 279:
-#line 1432 "ntp_parser.y" /* yacc.c:1646 */
+ case 282:
+#line 1439 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Address_fifo) = NULL;
APPEND_G_FIFO((yyval.Address_fifo), (yyvsp[0].Address_node));
}
-#line 3162 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3173 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 280:
-#line 1440 "ntp_parser.y" /* yacc.c:1646 */
+ case 283:
+#line 1447 "ntp_parser.y" /* yacc.c:1646 */
{
if ((yyvsp[0].Integer) != 0 && (yyvsp[0].Integer) != 1) {
yyerror(ip_file, "Integer value is not boolean (0 or 1). Assuming 1");
@@ -3171,29 +3182,29 @@ yyreduce:
(yyval.Integer) = (yyvsp[0].Integer);
}
}
-#line 3175 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3186 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 281:
-#line 1448 "ntp_parser.y" /* yacc.c:1646 */
+ case 284:
+#line 1455 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 1; }
-#line 3181 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3192 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 282:
-#line 1449 "ntp_parser.y" /* yacc.c:1646 */
+ case 285:
+#line 1456 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 3187 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3198 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 283:
-#line 1453 "ntp_parser.y" /* yacc.c:1646 */
+ case 286:
+#line 1460 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (double)(yyvsp[0].Integer); }
-#line 3193 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3204 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 285:
-#line 1464 "ntp_parser.y" /* yacc.c:1646 */
+ case 288:
+#line 1471 "ntp_parser.y" /* yacc.c:1646 */
{
sim_node *sn;
@@ -3203,125 +3214,125 @@ yyreduce:
/* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
-#line 3207 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3218 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 286:
-#line 1481 "ntp_parser.y" /* yacc.c:1646 */
+ case 289:
+#line 1488 "ntp_parser.y" /* yacc.c:1646 */
{ old_config_style = 0; }
-#line 3213 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3224 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 287:
-#line 1486 "ntp_parser.y" /* yacc.c:1646 */
+ case 290:
+#line 1493 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3222 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3233 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 288:
-#line 1491 "ntp_parser.y" /* yacc.c:1646 */
+ case 291:
+#line 1498 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3231 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3242 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 289:
-#line 1499 "ntp_parser.y" /* yacc.c:1646 */
+ case 292:
+#line 1506 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3237 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3248 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 292:
-#line 1509 "ntp_parser.y" /* yacc.c:1646 */
+ case 295:
+#line 1516 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = (yyvsp[-1].Sim_server_fifo);
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3246 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3257 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 293:
-#line 1514 "ntp_parser.y" /* yacc.c:1646 */
+ case 296:
+#line 1521 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_server_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_server_fifo), (yyvsp[0].Sim_server));
}
-#line 3255 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3266 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 294:
-#line 1522 "ntp_parser.y" /* yacc.c:1646 */
+ case 297:
+#line 1529 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_server) = ONLY_SIM(create_sim_server((yyvsp[-4].Address_node), (yyvsp[-2].Double), (yyvsp[-1].Sim_script_fifo))); }
-#line 3261 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3272 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 295:
-#line 1527 "ntp_parser.y" /* yacc.c:1646 */
+ case 298:
+#line 1534 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (yyvsp[-1].Double); }
-#line 3267 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3278 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 296:
-#line 1532 "ntp_parser.y" /* yacc.c:1646 */
+ case 299:
+#line 1539 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = (yyvsp[0].Address_node); }
-#line 3273 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3284 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 297:
-#line 1537 "ntp_parser.y" /* yacc.c:1646 */
+ case 300:
+#line 1544 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = (yyvsp[-1].Sim_script_fifo);
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3282 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3293 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 298:
-#line 1542 "ntp_parser.y" /* yacc.c:1646 */
+ case 301:
+#line 1549 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Sim_script_fifo) = NULL;
APPEND_G_FIFO((yyval.Sim_script_fifo), (yyvsp[0].Sim_script));
}
-#line 3291 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3302 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 299:
-#line 1550 "ntp_parser.y" /* yacc.c:1646 */
+ case 302:
+#line 1557 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Sim_script) = ONLY_SIM(create_sim_script_info((yyvsp[-3].Double), (yyvsp[-1].Attr_val_fifo))); }
-#line 3297 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3308 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 300:
-#line 1555 "ntp_parser.y" /* yacc.c:1646 */
+ case 303:
+#line 1562 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = (yyvsp[-2].Attr_val_fifo);
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3306 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3317 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 301:
-#line 1560 "ntp_parser.y" /* yacc.c:1646 */
+ case 304:
+#line 1567 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val_fifo) = NULL;
APPEND_G_FIFO((yyval.Attr_val_fifo), (yyvsp[-1].Attr_val));
}
-#line 3315 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3326 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 302:
-#line 1568 "ntp_parser.y" /* yacc.c:1646 */
+ case 305:
+#line 1575 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val) = create_attr_dval((yyvsp[-2].Integer), (yyvsp[0].Double)); }
-#line 3321 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3332 "ntp_parser.c" /* yacc.c:1646 */
break;
-#line 3325 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3336 "ntp_parser.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3549,7 +3560,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1579 "ntp_parser.y" /* yacc.c:1906 */
+#line 1586 "ntp_parser.y" /* yacc.c:1906 */
void
diff --git a/ntpd/ntp_parser.h b/ntpd/ntp_parser.h
index c830157..2804e54 100644
--- a/ntpd/ntp_parser.h
+++ b/ntpd/ntp_parser.h
@@ -30,8 +30,8 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-#ifndef YY_YY_______NTPD_NTP_PARSER_H_INCLUDED
-# define YY_YY_______NTPD_NTP_PARSER_H_INCLUDED
+#ifndef YY_YY_NTP_PARSER_H_INCLUDED
+# define YY_YY_NTP_PARSER_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@@ -133,104 +133,107 @@ extern int yydebug;
T_Maxdist = 343,
T_Maxmem = 344,
T_Maxpoll = 345,
- T_Mem = 346,
- T_Memlock = 347,
- T_Minclock = 348,
- T_Mindepth = 349,
- T_Mindist = 350,
- T_Minimum = 351,
- T_Minpoll = 352,
- T_Minsane = 353,
- T_Mode = 354,
- T_Mode7 = 355,
- T_Monitor = 356,
- T_Month = 357,
- T_Mru = 358,
- T_Multicastclient = 359,
- T_Nic = 360,
- T_Nolink = 361,
- T_Nomodify = 362,
- T_Nomrulist = 363,
- T_None = 364,
- T_Nonvolatile = 365,
- T_Nopeer = 366,
- T_Noquery = 367,
- T_Noselect = 368,
- T_Noserve = 369,
- T_Notrap = 370,
- T_Notrust = 371,
- T_Ntp = 372,
- T_Ntpport = 373,
- T_NtpSignDsocket = 374,
- T_Orphan = 375,
- T_Orphanwait = 376,
- T_Panic = 377,
- T_Peer = 378,
- T_Peerstats = 379,
- T_Phone = 380,
- T_Pid = 381,
- T_Pidfile = 382,
- T_Pool = 383,
- T_Port = 384,
- T_Preempt = 385,
- T_Prefer = 386,
- T_Protostats = 387,
- T_Pw = 388,
- T_Randfile = 389,
- T_Rawstats = 390,
- T_Refid = 391,
- T_Requestkey = 392,
- T_Reset = 393,
- T_Restrict = 394,
- T_Revoke = 395,
- T_Rlimit = 396,
- T_Saveconfigdir = 397,
- T_Server = 398,
- T_Setvar = 399,
- T_Source = 400,
- T_Stacksize = 401,
- T_Statistics = 402,
- T_Stats = 403,
- T_Statsdir = 404,
- T_Step = 405,
- T_Stepout = 406,
- T_Stratum = 407,
- T_String = 408,
- T_Sys = 409,
- T_Sysstats = 410,
- T_Tick = 411,
- T_Time1 = 412,
- T_Time2 = 413,
- T_Timer = 414,
- T_Timingstats = 415,
- T_Tinker = 416,
- T_Tos = 417,
- T_Trap = 418,
- T_True = 419,
- T_Trustedkey = 420,
- T_Ttl = 421,
- T_Type = 422,
- T_U_int = 423,
- T_Unconfig = 424,
- T_Unpeer = 425,
- T_Version = 426,
- T_WanderThreshold = 427,
- T_Week = 428,
- T_Wildcard = 429,
- T_Xleave = 430,
- T_Year = 431,
- T_Flag = 432,
- T_EOC = 433,
- T_Simulate = 434,
- T_Beep_Delay = 435,
- T_Sim_Duration = 436,
- T_Server_Offset = 437,
- T_Duration = 438,
- T_Freq_Offset = 439,
- T_Wander = 440,
- T_Jitter = 441,
- T_Prop_Delay = 442,
- T_Proc_Delay = 443
+ T_Mdnstries = 346,
+ T_Mem = 347,
+ T_Memlock = 348,
+ T_Minclock = 349,
+ T_Mindepth = 350,
+ T_Mindist = 351,
+ T_Minimum = 352,
+ T_Minpoll = 353,
+ T_Minsane = 354,
+ T_Mode = 355,
+ T_Mode7 = 356,
+ T_Monitor = 357,
+ T_Month = 358,
+ T_Mru = 359,
+ T_Multicastclient = 360,
+ T_Nic = 361,
+ T_Nolink = 362,
+ T_Nomodify = 363,
+ T_Nomrulist = 364,
+ T_None = 365,
+ T_Nonvolatile = 366,
+ T_Nopeer = 367,
+ T_Noquery = 368,
+ T_Noselect = 369,
+ T_Noserve = 370,
+ T_Notrap = 371,
+ T_Notrust = 372,
+ T_Ntp = 373,
+ T_Ntpport = 374,
+ T_NtpSignDsocket = 375,
+ T_Orphan = 376,
+ T_Orphanwait = 377,
+ T_Panic = 378,
+ T_Peer = 379,
+ T_Peerstats = 380,
+ T_Phone = 381,
+ T_Pid = 382,
+ T_Pidfile = 383,
+ T_Pool = 384,
+ T_Port = 385,
+ T_Preempt = 386,
+ T_Prefer = 387,
+ T_Protostats = 388,
+ T_Pw = 389,
+ T_Randfile = 390,
+ T_Rawstats = 391,
+ T_Refid = 392,
+ T_Requestkey = 393,
+ T_Reset = 394,
+ T_Restrict = 395,
+ T_Revoke = 396,
+ T_Rlimit = 397,
+ T_Saveconfigdir = 398,
+ T_Server = 399,
+ T_Setvar = 400,
+ T_Source = 401,
+ T_Stacksize = 402,
+ T_Statistics = 403,
+ T_Stats = 404,
+ T_Statsdir = 405,
+ T_Step = 406,
+ T_Stepback = 407,
+ T_Stepfwd = 408,
+ T_Stepout = 409,
+ T_Stratum = 410,
+ T_String = 411,
+ T_Sys = 412,
+ T_Sysstats = 413,
+ T_Tick = 414,
+ T_Time1 = 415,
+ T_Time2 = 416,
+ T_Timer = 417,
+ T_Timingstats = 418,
+ T_Tinker = 419,
+ T_Tos = 420,
+ T_Trap = 421,
+ T_True = 422,
+ T_Trustedkey = 423,
+ T_Ttl = 424,
+ T_Type = 425,
+ T_U_int = 426,
+ T_Unconfig = 427,
+ T_Unpeer = 428,
+ T_Version = 429,
+ T_WanderThreshold = 430,
+ T_Week = 431,
+ T_Wildcard = 432,
+ T_Xleave = 433,
+ T_Year = 434,
+ T_Flag = 435,
+ T_EOC = 436,
+ T_Simulate = 437,
+ T_Beep_Delay = 438,
+ T_Sim_Duration = 439,
+ T_Server_Offset = 440,
+ T_Duration = 441,
+ T_Freq_Offset = 442,
+ T_Wander = 443,
+ T_Jitter = 444,
+ T_Prop_Delay = 445,
+ T_Proc_Delay = 446
};
#endif
/* Tokens. */
@@ -322,104 +325,107 @@ extern int yydebug;
#define T_Maxdist 343
#define T_Maxmem 344
#define T_Maxpoll 345
-#define T_Mem 346
-#define T_Memlock 347
-#define T_Minclock 348
-#define T_Mindepth 349
-#define T_Mindist 350
-#define T_Minimum 351
-#define T_Minpoll 352
-#define T_Minsane 353
-#define T_Mode 354
-#define T_Mode7 355
-#define T_Monitor 356
-#define T_Month 357
-#define T_Mru 358
-#define T_Multicastclient 359
-#define T_Nic 360
-#define T_Nolink 361
-#define T_Nomodify 362
-#define T_Nomrulist 363
-#define T_None 364
-#define T_Nonvolatile 365
-#define T_Nopeer 366
-#define T_Noquery 367
-#define T_Noselect 368
-#define T_Noserve 369
-#define T_Notrap 370
-#define T_Notrust 371
-#define T_Ntp 372
-#define T_Ntpport 373
-#define T_NtpSignDsocket 374
-#define T_Orphan 375
-#define T_Orphanwait 376
-#define T_Panic 377
-#define T_Peer 378
-#define T_Peerstats 379
-#define T_Phone 380
-#define T_Pid 381
-#define T_Pidfile 382
-#define T_Pool 383
-#define T_Port 384
-#define T_Preempt 385
-#define T_Prefer 386
-#define T_Protostats 387
-#define T_Pw 388
-#define T_Randfile 389
-#define T_Rawstats 390
-#define T_Refid 391
-#define T_Requestkey 392
-#define T_Reset 393
-#define T_Restrict 394
-#define T_Revoke 395
-#define T_Rlimit 396
-#define T_Saveconfigdir 397
-#define T_Server 398
-#define T_Setvar 399
-#define T_Source 400
-#define T_Stacksize 401
-#define T_Statistics 402
-#define T_Stats 403
-#define T_Statsdir 404
-#define T_Step 405
-#define T_Stepout 406
-#define T_Stratum 407
-#define T_String 408
-#define T_Sys 409
-#define T_Sysstats 410
-#define T_Tick 411
-#define T_Time1 412
-#define T_Time2 413
-#define T_Timer 414
-#define T_Timingstats 415
-#define T_Tinker 416
-#define T_Tos 417
-#define T_Trap 418
-#define T_True 419
-#define T_Trustedkey 420
-#define T_Ttl 421
-#define T_Type 422
-#define T_U_int 423
-#define T_Unconfig 424
-#define T_Unpeer 425
-#define T_Version 426
-#define T_WanderThreshold 427
-#define T_Week 428
-#define T_Wildcard 429
-#define T_Xleave 430
-#define T_Year 431
-#define T_Flag 432
-#define T_EOC 433
-#define T_Simulate 434
-#define T_Beep_Delay 435
-#define T_Sim_Duration 436
-#define T_Server_Offset 437
-#define T_Duration 438
-#define T_Freq_Offset 439
-#define T_Wander 440
-#define T_Jitter 441
-#define T_Prop_Delay 442
-#define T_Proc_Delay 443
+#define T_Mdnstries 346
+#define T_Mem 347
+#define T_Memlock 348
+#define T_Minclock 349
+#define T_Mindepth 350
+#define T_Mindist 351
+#define T_Minimum 352
+#define T_Minpoll 353
+#define T_Minsane 354
+#define T_Mode 355
+#define T_Mode7 356
+#define T_Monitor 357
+#define T_Month 358
+#define T_Mru 359
+#define T_Multicastclient 360
+#define T_Nic 361
+#define T_Nolink 362
+#define T_Nomodify 363
+#define T_Nomrulist 364
+#define T_None 365
+#define T_Nonvolatile 366
+#define T_Nopeer 367
+#define T_Noquery 368
+#define T_Noselect 369
+#define T_Noserve 370
+#define T_Notrap 371
+#define T_Notrust 372
+#define T_Ntp 373
+#define T_Ntpport 374
+#define T_NtpSignDsocket 375
+#define T_Orphan 376
+#define T_Orphanwait 377
+#define T_Panic 378
+#define T_Peer 379
+#define T_Peerstats 380
+#define T_Phone 381
+#define T_Pid 382
+#define T_Pidfile 383
+#define T_Pool 384
+#define T_Port 385
+#define T_Preempt 386
+#define T_Prefer 387
+#define T_Protostats 388
+#define T_Pw 389
+#define T_Randfile 390
+#define T_Rawstats 391
+#define T_Refid 392
+#define T_Requestkey 393
+#define T_Reset 394
+#define T_Restrict 395
+#define T_Revoke 396
+#define T_Rlimit 397
+#define T_Saveconfigdir 398
+#define T_Server 399
+#define T_Setvar 400
+#define T_Source 401
+#define T_Stacksize 402
+#define T_Statistics 403
+#define T_Stats 404
+#define T_Statsdir 405
+#define T_Step 406
+#define T_Stepback 407
+#define T_Stepfwd 408
+#define T_Stepout 409
+#define T_Stratum 410
+#define T_String 411
+#define T_Sys 412
+#define T_Sysstats 413
+#define T_Tick 414
+#define T_Time1 415
+#define T_Time2 416
+#define T_Timer 417
+#define T_Timingstats 418
+#define T_Tinker 419
+#define T_Tos 420
+#define T_Trap 421
+#define T_True 422
+#define T_Trustedkey 423
+#define T_Ttl 424
+#define T_Type 425
+#define T_U_int 426
+#define T_Unconfig 427
+#define T_Unpeer 428
+#define T_Version 429
+#define T_WanderThreshold 430
+#define T_Week 431
+#define T_Wildcard 432
+#define T_Xleave 433
+#define T_Year 434
+#define T_Flag 435
+#define T_EOC 436
+#define T_Simulate 437
+#define T_Beep_Delay 438
+#define T_Sim_Duration 439
+#define T_Server_Offset 440
+#define T_Duration 441
+#define T_Freq_Offset 442
+#define T_Wander 443
+#define T_Jitter 444
+#define T_Prop_Delay 445
+#define T_Proc_Delay 446
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -445,7 +451,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 449 "../../ntpd/ntp_parser.h" /* yacc.c:1909 */
+#line 455 "ntp_parser.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -456,4 +462,4 @@ extern YYSTYPE yylval;
int yyparse (struct FILE_INFO *ip_file);
-#endif /* !YY_YY_______NTPD_NTP_PARSER_H_INCLUDED */
+#endif /* !YY_YY_NTP_PARSER_H_INCLUDED */
diff --git a/ntpd/ntp_parser.y b/ntpd/ntp_parser.y
index e75bffe..e878e79 100644
--- a/ntpd/ntp_parser.y
+++ b/ntpd/ntp_parser.y
@@ -159,6 +159,7 @@
%token <Integer> T_Maxdist
%token <Integer> T_Maxmem
%token <Integer> T_Maxpoll
+%token <Integer> T_Mdnstries
%token <Integer> T_Mem
%token <Integer> T_Memlock
%token <Integer> T_Minclock
@@ -219,6 +220,8 @@
%token <Integer> T_Stats
%token <Integer> T_Statsdir
%token <Integer> T_Step
+%token <Integer> T_Stepback
+%token <Integer> T_Stepfwd
%token <Integer> T_Stepout
%token <Integer> T_Stratum
%token <String> T_String /* not a token */
@@ -526,6 +529,8 @@ other_mode_command
{ CONCAT_G_FIFOS(cfgt.manycastserver, $2); }
| T_Multicastclient address_list
{ CONCAT_G_FIFOS(cfgt.multicastclient, $2); }
+ | T_Mdnstries T_Integer
+ { cfgt.mdnstries = $2; }
;
@@ -1106,6 +1111,8 @@ tinker_option_keyword
| T_Huffpuff
| T_Panic
| T_Step
+ | T_Stepback
+ | T_Stepfwd
| T_Stepout
| T_Tick
;
diff --git a/ntpd/ntp_peer.c b/ntpd/ntp_peer.c
index 495ee30..d42d804 100644
--- a/ntpd/ntp_peer.c
+++ b/ntpd/ntp_peer.c
@@ -92,6 +92,7 @@ int peer_free_count; /* count of free structures */
* value every time an association is mobilized.
*/
static associd_t current_association_ID; /* association ID */
+static associd_t initial_association_ID; /* association ID */
/*
* Memory allocation watermarks.
@@ -147,6 +148,7 @@ init_peer(void)
do
current_association_ID = ntp_random() & ASSOCID_MAX;
while (!current_association_ID);
+ initial_association_ID = current_association_ID;
}
@@ -1036,3 +1038,21 @@ findmanycastpeer(
return peer;
}
+
+/* peer_cleanup - clean peer list prior to shutdown */
+void peer_cleanup(void)
+{
+ struct peer *peer;
+ associd_t assoc;
+
+ for (assoc = initial_association_ID; assoc != current_association_ID; assoc++) {
+ if (assoc != 0U) {
+ peer = findpeerbyassoc(assoc);
+ if (peer != NULL)
+ unpeer(peer);
+ }
+ }
+ peer = findpeerbyassoc(current_association_ID);
+ if (peer != NULL)
+ unpeer(peer);
+}
diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
index 2f7543f..577b5fb 100644
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -245,7 +245,7 @@ transmit(
/*
* Update the reachability status. If not heard for
* three consecutive polls, stuff infinity in the clock
- * filter.
+ * filter.
*/
oreach = peer->reach;
peer->outdate = current_time;
@@ -290,7 +290,7 @@ transmit(
* If preemptible and we have more peers than maxclock,
* and this peer has the minimum score of preemptibles,
* demobilize.
- */
+ */
if (peer->unreach >= NTP_UNREACH) {
hpoll++;
/* ephemeral: no FLAG_CONFIG nor FLAG_PREEMPT */
@@ -335,7 +335,7 @@ transmit(
peer->retry--;
/*
- * Do not transmit if in broadcast client mode.
+ * Do not transmit if in broadcast client mode.
*/
if (peer->hmode != MODE_BCLIENT)
peer_xmit(peer);
@@ -442,7 +442,7 @@ receive(
return; /* no flakeway */
}
}
-
+
/*
* Version check must be after the query packets, since they
* intentionally use an early version.
@@ -486,18 +486,18 @@ receive(
*/
authlen = LEN_PKT_NOMAC;
has_mac = rbufp->recv_length - authlen;
- while (has_mac != 0) {
+ while (has_mac > 0) {
u_int32 len;
#ifdef AUTOKEY
u_int32 hostlen;
struct exten *ep;
#endif /*AUTOKEY */
- if (has_mac % 4 != 0 || has_mac < MIN_MAC_LEN) {
+ if (has_mac % 4 != 0 || has_mac < (int)MIN_MAC_LEN) {
sys_badlength++;
return; /* bad length */
}
- if (has_mac <= MAX_MAC_LEN) {
+ if (has_mac <= (int)MAX_MAC_LEN) {
skeyid = ntohl(((u_int32 *)pkt)[authlen / 4]);
break;
@@ -541,6 +541,14 @@ receive(
}
/*
+ * If has_mac is < 0 we had a malformed packet.
+ */
+ if (has_mac < 0) {
+ sys_badlength++;
+ return; /* bad length */
+ }
+
+ /*
* If authentication required, a MAC must be present.
*/
if (restrict_mask & RES_DONTTRUST && has_mac == 0) {
@@ -651,7 +659,7 @@ receive(
* If the signature is 20 bytes long, the last 16 of
* which are zero, then this is a Microsoft client
* wanting AD-style authentication of the server's
- * reply.
+ * reply.
*
* This is described in Microsoft's WSPP docs, in MS-SNTP:
* http://msdn.microsoft.com/en-us/library/cc212930.aspx
@@ -672,7 +680,7 @@ receive(
* broadcast or unicast address as appropriate.
*/
if (crypto_flags && skeyid > NTP_MAXKEY) {
-
+
/*
* More on the autokey dance (AKD). A cookie is
* constructed from public and private values.
@@ -698,7 +706,7 @@ receive(
* # if unsync, 0
* % can't happen
*/
- if (has_mac < MAX_MD5_LEN) {
+ if (has_mac < (int)MAX_MD5_LEN) {
sys_badauth++;
return;
}
@@ -736,7 +744,7 @@ receive(
* purposes is zero. Note the hash is saved for
* use later in the autokey mambo.
*/
- if (authlen > LEN_PKT_NOMAC && pkeyid != 0) {
+ if (authlen > (int)LEN_PKT_NOMAC && pkeyid != 0) {
session_key(&rbufp->recv_srcadr,
dstadr_sin, skeyid, 0, 2);
tkeyid = session_key(
@@ -866,7 +874,7 @@ receive(
* curious and could be an intruder attempting to clog, so we
* just ignore it.
*
- * If the packet is authentic and the manycastclient or pool
+ * If the packet is authentic and the manycastclient or pool
* association is found, we mobilize a client association and
* copy pertinent variables from the manycastclient or pool
* association to the new client association. If not, just
@@ -1089,6 +1097,7 @@ receive(
fast_xmit(rbufp, MODE_ACTIVE, 0,
restrict_mask);
sys_restricted++;
+ return;
}
}
@@ -1247,16 +1256,6 @@ receive(
}
/*
- * Update the state variables.
- */
- if (peer->flip == 0) {
- if (hismode != MODE_BROADCAST)
- peer->rec = p_xmt;
- peer->dst = rbufp->recv_time;
- }
- peer->xmt = p_xmt;
-
- /*
* If this is a crypto_NAK, the server cannot authenticate a
* client packet. The server might have just changed keys. Clear
* the association and restart the protocol.
@@ -1275,19 +1274,21 @@ receive(
#endif /* AUTOKEY */
return;
- /*
- * If the digest fails, the client cannot authenticate a server
+ /*
+ * If the digest fails or it's missing for authenticated
+ * associations, the client cannot authenticate a server
* reply to a client packet previously sent. The loopback check
* is designed to avoid a bait-and-switch attack, which was
* possible in past versions. If symmetric modes, return a
* crypto-NAK. The peer should restart the protocol.
*/
- } else if (!AUTH(has_mac || (restrict_mask & RES_DONTTRUST),
- is_authentic)) {
+ } else if (!AUTH(peer->keyid || has_mac ||
+ (restrict_mask & RES_DONTTRUST), is_authentic)) {
report_event(PEVNT_AUTH, peer, "digest");
peer->flash |= TEST5; /* bad auth */
peer->badauth++;
- if (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE)
+ if (has_mac &&
+ (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE))
fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask);
if (peer->flags & FLAG_PREEMPT) {
unpeer(peer);
@@ -1301,6 +1302,16 @@ receive(
}
/*
+ * Update the state variables.
+ */
+ if (peer->flip == 0) {
+ if (hismode != MODE_BROADCAST)
+ peer->rec = p_xmt;
+ peer->dst = rbufp->recv_time;
+ }
+ peer->xmt = p_xmt;
+
+ /*
* Set the peer ppoll to the maximum of the packet ppoll and the
* peer minpoll. If a kiss-o'-death, set the peer minpoll to
* this maximum and advance the headway to give the sender some
@@ -1568,7 +1579,7 @@ process_packet(
/*
* If the peer was previously unreachable, raise a trap. In any
* case, mark it reachable.
- */
+ */
if (!peer->reach) {
report_event(PEVNT_REACH, peer, NULL);
peer->timereachable = current_time;
@@ -1635,8 +1646,8 @@ process_packet(
* Interleaved broadcast mode. Use interleaved timestamps.
* t1 = peer->borg, t2 = p_org, t3 = p_org, t4 = aorg
*/
- if (peer->flags & FLAG_XB) {
- ci = p_org; /* delay */
+ if (peer->flags & FLAG_XB) {
+ ci = p_org; /* delay */
L_SUB(&ci, &peer->aorg);
LFPTOD(&ci, t34);
ci = p_org; /* t2 - t1 */
@@ -1765,7 +1776,7 @@ process_packet(
p_del, peer->r21 / 1e3, peer->r34 / 1e3,
td);
#endif
- }
+ }
#endif /* ASSYM */
/*
@@ -2092,7 +2103,7 @@ poll_update(
void
peer_clear(
struct peer *peer, /* peer structure */
- char *ident /* tally lights */
+ const char *ident /* tally lights */
)
{
u_char u;
@@ -2231,7 +2242,7 @@ clock_filter(
for (i = NTP_SHIFT - 1; i >= 0; i--) {
if (i != 0)
peer->filter_disp[j] += dtemp;
- if (peer->filter_disp[j] >= MAXDISPERSE) {
+ if (peer->filter_disp[j] >= MAXDISPERSE) {
peer->filter_disp[j] = MAXDISPERSE;
dst[i] = MAXDISPERSE;
} else if (peer->update - peer->filter_epoch[j] >
@@ -2246,7 +2257,7 @@ clock_filter(
}
/*
- * If the clock has stabilized, sort the samples by distance.
+ * If the clock has stabilized, sort the samples by distance.
*/
if (freq_cnt == 0) {
for (i = 1; i < NTP_SHIFT; i++) {
@@ -2280,7 +2291,7 @@ clock_filter(
continue;
m++;
}
-
+
/*
* Compute the dispersion and jitter. The dispersion is weighted
* exponentially by NTP_FWEIGHT (0.5) so it is normalized close
@@ -2382,7 +2393,7 @@ clock_select(void)
struct peer *peer;
int i, j, k, n;
int nlist, nl2;
- int allow, osurv;
+ int allow;
int speer;
double d, e, f, g;
double high, low;
@@ -2411,7 +2422,6 @@ clock_select(void)
* enough to handle all associations.
*/
osys_peer = sys_peer;
- osurv = sys_survivors;
sys_survivors = 0;
#ifdef LOCKCLOCK
sys_leap = LEAP_NOTINSYNC;
@@ -2485,9 +2495,9 @@ clock_select(void)
/*
* If this peer could have the orphan parent
* as a synchronization ancestor, exclude it
- * from selection to avoid forming a
+ * from selection to avoid forming a
* synchronization loop within the orphan mesh,
- * triggering stratum climb to infinity
+ * triggering stratum climb to infinity
* instability. Peers at stratum higher than
* the orphan stratum could have the orphan
* parent in ancestry so are excluded.
@@ -2595,7 +2605,7 @@ clock_select(void)
for (allow = 0; 2 * allow < nlist; allow++) {
/*
- * Bound the interval (low, high) as the smallest
+ * Bound the interval (low, high) as the smallest
* interval containing points from the most sources.
*/
n = 0;
@@ -2631,7 +2641,7 @@ clock_select(void)
* We assert the correct time is contained in the interval, but
* the best offset estimate for the interval might not be
* contained in the interval. For this purpose, a truechimer is
- * defined as the midpoint of an interval that overlaps the
+ * defined as the midpoint of an interval that overlaps the
* intersection interval.
*/
j = 0;
@@ -2651,9 +2661,10 @@ clock_select(void)
* include any of them in the cluster population.
*/
if (peer->flags & FLAG_PPS) {
- if (typepps == NULL)
+ if (typepps == NULL)
typepps = peer;
- continue;
+ if (!(peer->flags & FLAG_TSTAMP_PPS))
+ continue;
}
#endif /* REFCLOCK */
@@ -2664,7 +2675,7 @@ clock_select(void)
nlist = j;
/*
- * If no survivors remain at this point, check if the modem
+ * If no survivors remain at this point, check if the modem
* driver, local driver or orphan parent in that order. If so,
* nominate the first one found as the only survivor.
* Otherwise, give up and leave the island to the rats.
@@ -2701,7 +2712,7 @@ clock_select(void)
* by root distance. Continue voting as long as there are more
* than sys_minclock survivors and the select jitter of the peer
* with the worst metric is greater than the minimum peer
- * jitter. Stop if we are about to discard a TRUE or PREFER
+ * jitter. Stop if we are about to discard a TRUE or PREFER
* peer, who of course have the immunity idol.
*/
while (1) {
@@ -2807,7 +2818,7 @@ clock_select(void)
typesystem = peers[speer].peer;
if (osys_peer == NULL || osys_peer == typesystem) {
- sys_clockhop = 0;
+ sys_clockhop = 0;
} else if ((x = fabs(typesystem->offset -
osys_peer->offset)) < sys_mindisp) {
if (sys_clockhop == 0)
@@ -2981,7 +2992,7 @@ peer_xmit(
)
{
struct pkt xpkt; /* transmit packet */
- int sendlen, authlen;
+ size_t sendlen, authlen;
keyid_t xkeyid = 0; /* transmit key ID */
l_fp xmt_tx, xmt_ty;
@@ -3065,7 +3076,7 @@ peer_xmit(
LFPTOD(&xmt_ty, peer->xleave);
#ifdef DEBUG
if (debug)
- printf("transmit: at %ld %s->%s mode %d len %d\n",
+ printf("transmit: at %ld %s->%s mode %d len %zu\n",
current_time, peer->dstadr ?
stoa(&peer->dstadr->sin) : "-",
stoa(&peer->srcadr), peer->hmode, sendlen);
@@ -3105,7 +3116,7 @@ peer_xmit(
* the session key is generated.
*/
while (1) {
-
+
/*
* Allocate and initialize a keylist if not
* already done. Then, use the list in inverse
@@ -3157,7 +3168,7 @@ peer_xmit(
break;
/*
- * In symmetric modes the parameter, certificate,
+ * In symmetric modes the parameter, certificate,
* identity, cookie and autokey exchanges are
* required. The leapsecond exchange is optional. But, a
* peer will not believe the other peer until the other
@@ -3312,11 +3323,11 @@ peer_xmit(
* Calculate the next session key. Since extension
* fields are present, the cookie value is zero.
*/
- if (sendlen > LEN_PKT_NOMAC) {
+ if (sendlen > (int)LEN_PKT_NOMAC) {
session_key(&peer->dstadr->sin, &peer->srcadr,
xkeyid, 0, 2);
}
- }
+ }
#endif /* AUTOKEY */
/*
@@ -3354,7 +3365,7 @@ peer_xmit(
authtrust(xkeyid, 0);
#endif /* AUTOKEY */
if (sendlen > sizeof(xpkt)) {
- msyslog(LOG_ERR, "proto: buffer overflow %u", sendlen);
+ msyslog(LOG_ERR, "proto: buffer overflow %zu", sendlen);
exit (-1);
}
peer->t21_bytes = sendlen;
@@ -3379,7 +3390,7 @@ peer_xmit(
#ifdef AUTOKEY
#ifdef DEBUG
if (debug)
- printf("transmit: at %ld %s->%s mode %d keyid %08x len %d index %d\n",
+ printf("transmit: at %ld %s->%s mode %d keyid %08x len %zu index %d\n",
current_time, latoa(peer->dstadr),
ntoa(&peer->srcadr), peer->hmode, xkeyid, sendlen,
peer->keynumber);
@@ -3590,7 +3601,7 @@ pool_xmit(
&hints,
0, /* no retry */
&pool_name_resolved,
- (void *)(u_int)pool->associd);
+ (void *)(intptr_t)pool->associd);
if (!rc)
DPRINTF(1, ("pool DNS lookup %s started\n",
pool->hostname));
@@ -3611,7 +3622,7 @@ pool_xmit(
return; /* out of addresses, re-query DNS next poll */
restrict_mask = restrictions(rmtadr);
if (RES_FLAGS & restrict_mask)
- restrict_source(rmtadr, 0,
+ restrict_source(rmtadr, 0,
current_time + POOL_SOLICIT_WINDOW + 1);
lcladr = findinterface(rmtadr);
memset(&xpkt, 0, sizeof(xpkt));
@@ -3696,7 +3707,7 @@ pool_name_resolved(
return;
}
- assoc = (associd_t)(u_int)context;
+ assoc = (associd_t)(intptr_t)context;
pool = findpeerbyassoc(assoc);
if (NULL == pool) {
msyslog(LOG_ERR,
diff --git a/ntpd/ntp_request.c b/ntpd/ntp_request.c
index 157304b..8ffebad 100644
--- a/ntpd/ntp_request.c
+++ b/ntpd/ntp_request.c
@@ -58,7 +58,7 @@ struct req_proc {
* Universal request codes
*/
static const struct req_proc univ_codes[] = {
- { NO_REQUEST, NOAUTH, 0, 0 }
+ { NO_REQUEST, NOAUTH, 0, 0, NULL }
};
static void req_ack (sockaddr_u *, endpt *, struct req_pkt *, int);
@@ -231,7 +231,7 @@ static endpt *frominter;
void
init_request (void)
{
- int i;
+ size_t i;
numrequests = 0;
numresppkts = 0;
@@ -261,7 +261,7 @@ req_ack(
rpkt.auth_seq = AUTH_SEQ(0, 0);
rpkt.implementation = inpkt->implementation;
rpkt.request = inpkt->request;
- rpkt.err_nitems = ERR_NITEMS(errcode, 0);
+ rpkt.err_nitems = ERR_NITEMS(errcode, 0);
rpkt.mbz_itemsize = MBZ_ITEMSIZE(0);
/*
@@ -448,7 +448,7 @@ process_private(
|| (++ec, INFO_SEQ(inpkt->auth_seq) != 0)
|| (++ec, INFO_ERR(inpkt->err_nitems) != 0)
|| (++ec, INFO_MBZ(inpkt->mbz_itemsize) != 0)
- || (++ec, rbufp->recv_length < REQ_LEN_HDR)
+ || (++ec, rbufp->recv_length < (int)REQ_LEN_HDR)
) {
NLOG(NLOG_SYSEVENT)
if (current_time >= quiet_until) {
@@ -599,11 +599,10 @@ process_private(
return;
}
if (recv_len > REQ_LEN_NOMAC + MAX_MAC_LEN) {
- DPRINTF(5, ("bad pkt length %lu\n",
- (u_long)recv_len));
+ DPRINTF(5, ("bad pkt length %zu\n", recv_len));
msyslog(LOG_ERR,
- "process_private: bad pkt length %lu",
- (u_long)recv_len);
+ "process_private: bad pkt length %zu",
+ recv_len);
req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
return;
}
@@ -2076,7 +2075,7 @@ req_get_traps(
{
struct info_trap *it;
struct ctl_trap *tr;
- int i;
+ size_t i;
if (num_ctl_traps == 0) {
req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA);
diff --git a/ntpd/ntp_restrict.c b/ntpd/ntp_restrict.c
index 6e75667..9948d54 100644
--- a/ntpd/ntp_restrict.c
+++ b/ntpd/ntp_restrict.c
@@ -46,7 +46,7 @@
#define MASK_IPV6_ADDR(dst, src, msk) \
do { \
int idx; \
- for (idx = 0; idx < COUNTOF((dst)->s6_addr); idx++) { \
+ for (idx = 0; idx < (int)COUNTOF((dst)->s6_addr); idx++) { \
(dst)->s6_addr[idx] = (src)->s6_addr[idx] \
& (msk)->s6_addr[idx]; \
} \
@@ -298,7 +298,7 @@ match_restrict6_addr(
MASK_IPV6_ADDR(&masked, addr, &res->u.v6.mask);
if (ADDR6_EQ(&masked, &res->u.v6.addr)
&& (!(RESM_NTPONLY & res->mflags)
- || NTP_PORT == port))
+ || NTP_PORT == (int)port))
break;
}
return res;
diff --git a/ntpd/ntp_scanner.c b/ntpd/ntp_scanner.c
index 3e09856..a7c1992 100644
--- a/ntpd/ntp_scanner.c
+++ b/ntpd/ntp_scanner.c
@@ -70,12 +70,12 @@ keyword(
int token
)
{
- int i;
+ size_t i;
const char *text;
i = token - LOWEST_KEYWORD_ID;
- if (i >= 0 && i < COUNTOF(keyword_text))
+ if (i < COUNTOF(keyword_text))
text = keyword_text[i];
else
text = NULL;
@@ -297,7 +297,7 @@ is_integer(
/* Check that all the remaining characters are digits */
for (; lexeme[i] != '\0'; i++) {
- if (!isdigit(lexeme[i]))
+ if (!isdigit((unsigned char)lexeme[i]))
return FALSE;
}
@@ -322,7 +322,7 @@ is_u_int(
int is_hex;
i = 0;
- if ('0' == lexeme[i] && 'x' == tolower(lexeme[i + 1])) {
+ if ('0' == lexeme[i] && 'x' == tolower((unsigned char)lexeme[i + 1])) {
i += 2;
is_hex = TRUE;
} else {
@@ -331,9 +331,9 @@ is_u_int(
/* Check that all the remaining characters are digits */
for (; lexeme[i] != '\0'; i++) {
- if (is_hex && !isxdigit(lexeme[i]))
+ if (is_hex && !isxdigit((unsigned char)lexeme[i]))
return FALSE;
- if (!is_hex && !isdigit(lexeme[i]))
+ if (!is_hex && !isdigit((unsigned char)lexeme[i]))
return FALSE;
}
@@ -357,14 +357,14 @@ is_double(
i++;
/* Read the integer part */
- for (; lexeme[i] && isdigit(lexeme[i]); i++)
+ for (; lexeme[i] && isdigit((unsigned char)lexeme[i]); i++)
num_digits++;
/* Check for the optional decimal point */
if ('.' == lexeme[i]) {
i++;
/* Check for any digits after the decimal point */
- for (; lexeme[i] && isdigit(lexeme[i]); i++)
+ for (; lexeme[i] && isdigit((unsigned char)lexeme[i]); i++)
num_digits++;
}
@@ -380,7 +380,7 @@ is_double(
return 1;
/* There is still more input, read the exponent */
- if ('e' == tolower(lexeme[i]))
+ if ('e' == tolower((unsigned char)lexeme[i]))
i++;
else
return 0;
@@ -390,7 +390,7 @@ is_double(
i++;
/* Now read the exponent part */
- while (lexeme[i] && isdigit(lexeme[i]))
+ while (lexeme[i] && isdigit((unsigned char)lexeme[i]))
i++;
/* Check if we are done */
@@ -455,7 +455,7 @@ create_string_token(
* ignore end of line whitespace
*/
pch = lexeme;
- while (*pch && isspace(*pch))
+ while (*pch && isspace((unsigned char)*pch))
pch++;
if (!*pch) {
@@ -481,7 +481,7 @@ yylex(
)
{
static follby followedby = FOLLBY_TOKEN;
- int i;
+ size_t i;
int instring;
int yylval_was_set;
int converted;
@@ -502,7 +502,7 @@ yylex(
if (EOF == ch) {
- if (!input_from_file || !curr_include_level)
+ if (!input_from_file || curr_include_level <= 0)
return 0;
FCLOSE(fp[curr_include_level]);
@@ -640,7 +640,7 @@ yylex(
} else if (is_u_int(yytext)) {
yylval_was_set = TRUE;
if ('0' == yytext[0] &&
- 'x' == tolower(yytext[1]))
+ 'x' == tolower((unsigned char)yytext[1]))
converted = sscanf(&yytext[2], "%x",
&yylval.U_int);
else
diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c
index a7da52b..c4bc901 100644
--- a/ntpd/ntp_util.c
+++ b/ntpd/ntp_util.c
@@ -679,7 +679,7 @@ record_raw_stats(
int version,
int mode,
int stratum,
- int poll,
+ int ppoll,
int precision,
double root_delay, /* seconds */
double root_dispersion,/* seconds */
@@ -702,7 +702,7 @@ record_raw_stats(
stoa(srcadr), dstadr ? stoa(dstadr) : "-",
ulfptoa(t1, 9), ulfptoa(t2, 9),
ulfptoa(t3, 9), ulfptoa(t4, 9),
- leap, version, mode, stratum, poll, precision,
+ leap, version, mode, stratum, ppoll, precision,
root_delay, root_dispersion, refid_str(refid, stratum));
fflush(rawstats.fp);
}
diff --git a/ntpd/ntpd-opts.c b/ntpd/ntpd-opts.c
index 4c298c5..910689d 100644
--- a/ntpd/ntpd-opts.c
+++ b/ntpd/ntpd-opts.c
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.c)
*
- * It has been AutoGen-ed December 2, 2014 at 08:54:08 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:23:14 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -50,7 +50,7 @@ extern "C" {
#endif
extern FILE * option_usage_fp;
#define zCopyright (ntpd_opt_strs+0)
-#define zLicenseDescrip (ntpd_opt_strs+314)
+#define zLicenseDescrip (ntpd_opt_strs+340)
/*
* global included definitions
@@ -74,150 +74,154 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpd options
*/
-static char const ntpd_opt_strs[3011] =
-/* 0 */ "ntpd 4.2.7p482\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const ntpd_opt_strs[3129] =
+/* 0 */ "ntpd 4.2.8p2\n"
+ "Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n"
"This is free software. It is licensed for use, modification and\n"
"redistribution under the terms of the NTP License, copies of which\n"
"can be seen at:\n"
" <http://ntp.org/license>\n"
" <http://opensource.org/licenses/ntp-license.php>\n\0"
-/* 314 */ "Permission to use, copy, modify, and distribute this software and its\n"
+/* 340 */ "Permission to use, copy, modify, and distribute this software and its\n"
"documentation for any purpose with or without fee is hereby granted,\n"
"provided that the above copyright notice appears in all copies and that\n"
"both the copyright notice and this permission notice appear in supporting\n"
"documentation, and that the name The University of Delaware not be used in\n"
"advertising or publicity pertaining to distribution of the software without\n"
- "specific, written prior permission. The University of Delaware makes no\n"
- "representations about the suitability this software for any purpose. It is\n"
- "provided \"as is\" without express or implied warranty.\n\0"
-/* 954 */ "Force IPv4 DNS name resolution\0"
-/* 985 */ "IPV4\0"
-/* 990 */ "ipv4\0"
-/* 995 */ "Force IPv6 DNS name resolution\0"
-/* 1026 */ "IPV6\0"
-/* 1031 */ "ipv6\0"
-/* 1036 */ "Require crypto authentication\0"
-/* 1066 */ "AUTHREQ\0"
-/* 1074 */ "authreq\0"
-/* 1082 */ "Do not require crypto authentication\0"
-/* 1119 */ "AUTHNOREQ\0"
-/* 1129 */ "authnoreq\0"
-/* 1139 */ "Allow us to sync to broadcast servers\0"
-/* 1177 */ "BCASTSYNC\0"
-/* 1187 */ "bcastsync\0"
-/* 1197 */ "configuration file name\0"
-/* 1221 */ "CONFIGFILE\0"
-/* 1232 */ "configfile\0"
-/* 1243 */ "Increase debug verbosity level\0"
-/* 1274 */ "DEBUG_LEVEL\0"
-/* 1286 */ "debug-level\0"
-/* 1298 */ "Set the debug verbosity level\0"
-/* 1328 */ "SET_DEBUG_LEVEL\0"
-/* 1344 */ "set-debug-level\0"
-/* 1360 */ "frequency drift file name\0"
-/* 1386 */ "DRIFTFILE\0"
-/* 1396 */ "driftfile\0"
-/* 1406 */ "Allow the first adjustment to be Big\0"
-/* 1443 */ "PANICGATE\0"
-/* 1453 */ "panicgate\0"
-/* 1463 */ "Jail directory\0"
-/* 1478 */ "JAILDIR\0"
-/* 1486 */ "jaildir\0"
-/* 1494 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
-/* 1573 */ "Listen on an interface name or address\0"
-/* 1612 */ "INTERFACE\0"
-/* 1622 */ "interface\0"
-/* 1632 */ "path to symmetric keys\0"
-/* 1655 */ "KEYFILE\0"
-/* 1663 */ "keyfile\0"
-/* 1671 */ "path to the log file\0"
-/* 1692 */ "LOGFILE\0"
-/* 1700 */ "logfile\0"
-/* 1708 */ "Do not listen to virtual interfaces\0"
-/* 1744 */ "NOVIRTUALIPS\0"
-/* 1757 */ "novirtualips\0"
-/* 1770 */ "Modify Multimedia Timer (Windows only)\0"
-/* 1809 */ "MODIFYMMTIMER\0"
-/* 1823 */ "modifymmtimer\0"
-/* 1837 */ "Do not fork\0"
-/* 1849 */ "NOFORK\0"
-/* 1856 */ "nofork\0"
-/* 1863 */ "Run at high priority\0"
-/* 1884 */ "NICE\0"
-/* 1889 */ "nice\0"
-/* 1894 */ "path to the PID file\0"
-/* 1915 */ "PIDFILE\0"
-/* 1923 */ "pidfile\0"
-/* 1931 */ "Process priority\0"
-/* 1948 */ "PRIORITY\0"
-/* 1957 */ "priority\0"
-/* 1966 */ "Set the time and quit\0"
-/* 1988 */ "QUIT\0"
-/* 1993 */ "quit\0"
-/* 1998 */ "Broadcast/propagation delay\0"
-/* 2026 */ "PROPAGATIONDELAY\0"
-/* 2043 */ "propagationdelay\0"
-/* 2060 */ "Save parsed configuration and quit\0"
-/* 2095 */ "SAVECONFIGQUIT\0"
-/* 2110 */ "saveconfigquit\0"
-/* 2125 */ "Statistics file location\0"
-/* 2150 */ "STATSDIR\0"
-/* 2159 */ "statsdir\0"
-/* 2168 */ "Trusted key number\0"
-/* 2187 */ "TRUSTEDKEY\0"
-/* 2198 */ "trustedkey\0"
-/* 2209 */ "Run as userid (or userid:groupid)\0"
-/* 2243 */ "USER\0"
-/* 2248 */ "user\0"
-/* 2253 */ "interval in seconds between scans for new or dropped interfaces\0"
-/* 2317 */ "UPDATEINTERVAL\0"
-/* 2332 */ "updateinterval\0"
-/* 2347 */ "make ARG an ntp variable (RW)\0"
-/* 2377 */ "VAR\0"
-/* 2381 */ "var\0"
-/* 2385 */ "make ARG an ntp variable (RW|DEF)\0"
-/* 2419 */ "DVAR\0"
-/* 2424 */ "dvar\0"
-/* 2429 */ "Seconds to wait for first clock sync\0"
-/* 2466 */ "WAIT_SYNC\0"
-/* 2476 */ "wait-sync\0"
-/* 2486 */ "Slew up to 600 seconds\0"
-/* 2509 */ "SLEW\0"
-/* 2514 */ "slew\0"
-/* 2519 */ "Use CPU cycle counter (Windows only)\0"
-/* 2556 */ "USEPCC\0"
-/* 2563 */ "usepcc\0"
-/* 2570 */ "Force CPU cycle counter use (Windows only)\0"
-/* 2613 */ "PCCFREQ\0"
-/* 2621 */ "pccfreq\0"
-/* 2629 */ "Register with mDNS as a NTP server\0"
-/* 2664 */ "MDNS\0"
-/* 2669 */ "mdns\0"
-/* 2674 */ "display extended usage information and exit\0"
-/* 2718 */ "help\0"
-/* 2723 */ "extended usage information passed thru pager\0"
-/* 2768 */ "more-help\0"
-/* 2778 */ "output version information and exit\0"
-/* 2814 */ "version\0"
-/* 2822 */ "NTPD\0"
-/* 2827 */ "ntpd - NTP daemon program - Ver. 4.2.7p482\n"
+ "specific, written prior permission. The University of Delaware and Network\n"
+ "Time Foundation makes no representations about the suitability this\n"
+ "software for any purpose. It is provided \"as is\" without express or\n"
+ "implied warranty.\n\0"
+/* 1008 */ "Force IPv4 DNS name resolution\0"
+/* 1039 */ "IPV4\0"
+/* 1044 */ "ipv4\0"
+/* 1049 */ "Force IPv6 DNS name resolution\0"
+/* 1080 */ "IPV6\0"
+/* 1085 */ "ipv6\0"
+/* 1090 */ "Require crypto authentication\0"
+/* 1120 */ "AUTHREQ\0"
+/* 1128 */ "authreq\0"
+/* 1136 */ "Do not require crypto authentication\0"
+/* 1173 */ "AUTHNOREQ\0"
+/* 1183 */ "authnoreq\0"
+/* 1193 */ "Allow us to sync to broadcast servers\0"
+/* 1231 */ "BCASTSYNC\0"
+/* 1241 */ "bcastsync\0"
+/* 1251 */ "configuration file name\0"
+/* 1275 */ "CONFIGFILE\0"
+/* 1286 */ "configfile\0"
+/* 1297 */ "Increase debug verbosity level\0"
+/* 1328 */ "DEBUG_LEVEL\0"
+/* 1340 */ "debug-level\0"
+/* 1352 */ "Set the debug verbosity level\0"
+/* 1382 */ "SET_DEBUG_LEVEL\0"
+/* 1398 */ "set-debug-level\0"
+/* 1414 */ "frequency drift file name\0"
+/* 1440 */ "DRIFTFILE\0"
+/* 1450 */ "driftfile\0"
+/* 1460 */ "Allow the first adjustment to be Big\0"
+/* 1497 */ "PANICGATE\0"
+/* 1507 */ "panicgate\0"
+/* 1517 */ "Step any initial offset correction.\0"
+/* 1553 */ "FORCE_STEP_ONCE\0"
+/* 1569 */ "force-step-once\0"
+/* 1585 */ "Jail directory\0"
+/* 1600 */ "JAILDIR\0"
+/* 1608 */ "jaildir\0"
+/* 1616 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
+/* 1695 */ "Listen on an interface name or address\0"
+/* 1734 */ "INTERFACE\0"
+/* 1744 */ "interface\0"
+/* 1754 */ "path to symmetric keys\0"
+/* 1777 */ "KEYFILE\0"
+/* 1785 */ "keyfile\0"
+/* 1793 */ "path to the log file\0"
+/* 1814 */ "LOGFILE\0"
+/* 1822 */ "logfile\0"
+/* 1830 */ "Do not listen to virtual interfaces\0"
+/* 1866 */ "NOVIRTUALIPS\0"
+/* 1879 */ "novirtualips\0"
+/* 1892 */ "Modify Multimedia Timer (Windows only)\0"
+/* 1931 */ "MODIFYMMTIMER\0"
+/* 1945 */ "modifymmtimer\0"
+/* 1959 */ "Do not fork\0"
+/* 1971 */ "NOFORK\0"
+/* 1978 */ "nofork\0"
+/* 1985 */ "Run at high priority\0"
+/* 2006 */ "NICE\0"
+/* 2011 */ "nice\0"
+/* 2016 */ "path to the PID file\0"
+/* 2037 */ "PIDFILE\0"
+/* 2045 */ "pidfile\0"
+/* 2053 */ "Process priority\0"
+/* 2070 */ "PRIORITY\0"
+/* 2079 */ "priority\0"
+/* 2088 */ "Set the time and quit\0"
+/* 2110 */ "QUIT\0"
+/* 2115 */ "quit\0"
+/* 2120 */ "Broadcast/propagation delay\0"
+/* 2148 */ "PROPAGATIONDELAY\0"
+/* 2165 */ "propagationdelay\0"
+/* 2182 */ "Save parsed configuration and quit\0"
+/* 2217 */ "SAVECONFIGQUIT\0"
+/* 2232 */ "saveconfigquit\0"
+/* 2247 */ "Statistics file location\0"
+/* 2272 */ "STATSDIR\0"
+/* 2281 */ "statsdir\0"
+/* 2290 */ "Trusted key number\0"
+/* 2309 */ "TRUSTEDKEY\0"
+/* 2320 */ "trustedkey\0"
+/* 2331 */ "Run as userid (or userid:groupid)\0"
+/* 2365 */ "USER\0"
+/* 2370 */ "user\0"
+/* 2375 */ "interval in seconds between scans for new or dropped interfaces\0"
+/* 2439 */ "UPDATEINTERVAL\0"
+/* 2454 */ "updateinterval\0"
+/* 2469 */ "make ARG an ntp variable (RW)\0"
+/* 2499 */ "VAR\0"
+/* 2503 */ "var\0"
+/* 2507 */ "make ARG an ntp variable (RW|DEF)\0"
+/* 2541 */ "DVAR\0"
+/* 2546 */ "dvar\0"
+/* 2551 */ "Seconds to wait for first clock sync\0"
+/* 2588 */ "WAIT_SYNC\0"
+/* 2598 */ "wait-sync\0"
+/* 2608 */ "Slew up to 600 seconds\0"
+/* 2631 */ "SLEW\0"
+/* 2636 */ "slew\0"
+/* 2641 */ "Use CPU cycle counter (Windows only)\0"
+/* 2678 */ "USEPCC\0"
+/* 2685 */ "usepcc\0"
+/* 2692 */ "Force CPU cycle counter use (Windows only)\0"
+/* 2735 */ "PCCFREQ\0"
+/* 2743 */ "pccfreq\0"
+/* 2751 */ "Register with mDNS as a NTP server\0"
+/* 2786 */ "MDNS\0"
+/* 2791 */ "mdns\0"
+/* 2796 */ "display extended usage information and exit\0"
+/* 2840 */ "help\0"
+/* 2845 */ "extended usage information passed thru pager\0"
+/* 2890 */ "more-help\0"
+/* 2900 */ "output version information and exit\0"
+/* 2936 */ "version\0"
+/* 2944 */ "NTPD\0"
+/* 2949 */ "ntpd - NTP daemon program - Ver. 4.2.8p2\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
-/* 2960 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2994 */ "\n\0"
-/* 2996 */ "ntpd 4.2.7p482";
+/* 3080 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 3114 */ "\n\0"
+/* 3116 */ "ntpd 4.2.8p2";
/**
* ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv4 option */
-#define IPV4_DESC (ntpd_opt_strs+954)
+#define IPV4_DESC (ntpd_opt_strs+1008)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpd_opt_strs+985)
+#define IPV4_NAME (ntpd_opt_strs+1039)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpd_opt_strs+990)
+#define IPV4_name (ntpd_opt_strs+1044)
/** Other options that appear in conjunction with the ipv4 option */
static int const aIpv4CantList[] = {
INDEX_OPT_IPV6, NO_EQUIVALENT };
@@ -229,11 +233,11 @@ static int const aIpv4CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (ntpd_opt_strs+995)
+#define IPV6_DESC (ntpd_opt_strs+1049)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpd_opt_strs+1026)
+#define IPV6_NAME (ntpd_opt_strs+1080)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpd_opt_strs+1031)
+#define IPV6_name (ntpd_opt_strs+1085)
/** Other options that appear in conjunction with the ipv6 option */
static int const aIpv6CantList[] = {
INDEX_OPT_IPV4, NO_EQUIVALENT };
@@ -245,11 +249,11 @@ static int const aIpv6CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the authreq option */
-#define AUTHREQ_DESC (ntpd_opt_strs+1036)
+#define AUTHREQ_DESC (ntpd_opt_strs+1090)
/** Upper-cased name for the authreq option */
-#define AUTHREQ_NAME (ntpd_opt_strs+1066)
+#define AUTHREQ_NAME (ntpd_opt_strs+1120)
/** Name string for the authreq option */
-#define AUTHREQ_name (ntpd_opt_strs+1074)
+#define AUTHREQ_name (ntpd_opt_strs+1128)
/** Other options that appear in conjunction with the authreq option */
static int const aAuthreqCantList[] = {
INDEX_OPT_AUTHNOREQ, NO_EQUIVALENT };
@@ -261,11 +265,11 @@ static int const aAuthreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the authnoreq option */
-#define AUTHNOREQ_DESC (ntpd_opt_strs+1082)
+#define AUTHNOREQ_DESC (ntpd_opt_strs+1136)
/** Upper-cased name for the authnoreq option */
-#define AUTHNOREQ_NAME (ntpd_opt_strs+1119)
+#define AUTHNOREQ_NAME (ntpd_opt_strs+1173)
/** Name string for the authnoreq option */
-#define AUTHNOREQ_name (ntpd_opt_strs+1129)
+#define AUTHNOREQ_name (ntpd_opt_strs+1183)
/** Other options that appear in conjunction with the authnoreq option */
static int const aAuthnoreqCantList[] = {
INDEX_OPT_AUTHREQ, NO_EQUIVALENT };
@@ -276,11 +280,11 @@ static int const aAuthnoreqCantList[] = {
* bcastsync option description:
*/
/** Descriptive text for the bcastsync option */
-#define BCASTSYNC_DESC (ntpd_opt_strs+1139)
+#define BCASTSYNC_DESC (ntpd_opt_strs+1193)
/** Upper-cased name for the bcastsync option */
-#define BCASTSYNC_NAME (ntpd_opt_strs+1177)
+#define BCASTSYNC_NAME (ntpd_opt_strs+1231)
/** Name string for the bcastsync option */
-#define BCASTSYNC_name (ntpd_opt_strs+1187)
+#define BCASTSYNC_name (ntpd_opt_strs+1241)
/** Compiled in flag settings for the bcastsync option */
#define BCASTSYNC_FLAGS (OPTST_DISABLED)
@@ -288,11 +292,11 @@ static int const aAuthnoreqCantList[] = {
* configfile option description:
*/
/** Descriptive text for the configfile option */
-#define CONFIGFILE_DESC (ntpd_opt_strs+1197)
+#define CONFIGFILE_DESC (ntpd_opt_strs+1251)
/** Upper-cased name for the configfile option */
-#define CONFIGFILE_NAME (ntpd_opt_strs+1221)
+#define CONFIGFILE_NAME (ntpd_opt_strs+1275)
/** Name string for the configfile option */
-#define CONFIGFILE_name (ntpd_opt_strs+1232)
+#define CONFIGFILE_name (ntpd_opt_strs+1286)
/** Compiled in flag settings for the configfile option */
#define CONFIGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -301,11 +305,11 @@ static int const aAuthnoreqCantList[] = {
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1243)
+#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1297)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1274)
+#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1328)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpd_opt_strs+1286)
+#define DEBUG_LEVEL_name (ntpd_opt_strs+1340)
/** Compiled in flag settings for the debug-level option */
#define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
@@ -313,11 +317,11 @@ static int const aAuthnoreqCantList[] = {
* set-debug-level option description:
*/
/** Descriptive text for the set-debug-level option */
-#define SET_DEBUG_LEVEL_DESC (ntpd_opt_strs+1298)
+#define SET_DEBUG_LEVEL_DESC (ntpd_opt_strs+1352)
/** Upper-cased name for the set-debug-level option */
-#define SET_DEBUG_LEVEL_NAME (ntpd_opt_strs+1328)
+#define SET_DEBUG_LEVEL_NAME (ntpd_opt_strs+1382)
/** Name string for the set-debug-level option */
-#define SET_DEBUG_LEVEL_name (ntpd_opt_strs+1344)
+#define SET_DEBUG_LEVEL_name (ntpd_opt_strs+1398)
/** Compiled in flag settings for the set-debug-level option */
#define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -326,11 +330,11 @@ static int const aAuthnoreqCantList[] = {
* driftfile option description:
*/
/** Descriptive text for the driftfile option */
-#define DRIFTFILE_DESC (ntpd_opt_strs+1360)
+#define DRIFTFILE_DESC (ntpd_opt_strs+1414)
/** Upper-cased name for the driftfile option */
-#define DRIFTFILE_NAME (ntpd_opt_strs+1386)
+#define DRIFTFILE_NAME (ntpd_opt_strs+1440)
/** Name string for the driftfile option */
-#define DRIFTFILE_name (ntpd_opt_strs+1396)
+#define DRIFTFILE_name (ntpd_opt_strs+1450)
/** Compiled in flag settings for the driftfile option */
#define DRIFTFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -339,24 +343,36 @@ static int const aAuthnoreqCantList[] = {
* panicgate option description:
*/
/** Descriptive text for the panicgate option */
-#define PANICGATE_DESC (ntpd_opt_strs+1406)
+#define PANICGATE_DESC (ntpd_opt_strs+1460)
/** Upper-cased name for the panicgate option */
-#define PANICGATE_NAME (ntpd_opt_strs+1443)
+#define PANICGATE_NAME (ntpd_opt_strs+1497)
/** Name string for the panicgate option */
-#define PANICGATE_name (ntpd_opt_strs+1453)
+#define PANICGATE_name (ntpd_opt_strs+1507)
/** Compiled in flag settings for the panicgate option */
#define PANICGATE_FLAGS (OPTST_DISABLED)
/**
+ * force_step_once option description:
+ */
+/** Descriptive text for the force_step_once option */
+#define FORCE_STEP_ONCE_DESC (ntpd_opt_strs+1517)
+/** Upper-cased name for the force_step_once option */
+#define FORCE_STEP_ONCE_NAME (ntpd_opt_strs+1553)
+/** Name string for the force_step_once option */
+#define FORCE_STEP_ONCE_name (ntpd_opt_strs+1569)
+/** Compiled in flag settings for the force_step_once option */
+#define FORCE_STEP_ONCE_FLAGS (OPTST_DISABLED)
+
+/**
* jaildir option description:
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the jaildir option */
-#define JAILDIR_DESC (ntpd_opt_strs+1463)
+#define JAILDIR_DESC (ntpd_opt_strs+1585)
/** Upper-cased name for the jaildir option */
-#define JAILDIR_NAME (ntpd_opt_strs+1478)
+#define JAILDIR_NAME (ntpd_opt_strs+1600)
/** Name string for the jaildir option */
-#define JAILDIR_name (ntpd_opt_strs+1486)
+#define JAILDIR_name (ntpd_opt_strs+1608)
/** Compiled in flag settings for the jaildir option */
#define JAILDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -365,19 +381,19 @@ static int const aAuthnoreqCantList[] = {
#define JAILDIR_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define JAILDIR_NAME NULL
/** Descriptive text for the jaildir option */
-#define JAILDIR_DESC (ntpd_opt_strs+1494)
-#define JAILDIR_name (ntpd_opt_strs+1486)
+#define JAILDIR_DESC (ntpd_opt_strs+1616)
+#define JAILDIR_name (ntpd_opt_strs+1608)
#endif /* HAVE_DROPROOT */
/**
* interface option description:
*/
/** Descriptive text for the interface option */
-#define INTERFACE_DESC (ntpd_opt_strs+1573)
+#define INTERFACE_DESC (ntpd_opt_strs+1695)
/** Upper-cased name for the interface option */
-#define INTERFACE_NAME (ntpd_opt_strs+1612)
+#define INTERFACE_NAME (ntpd_opt_strs+1734)
/** Name string for the interface option */
-#define INTERFACE_name (ntpd_opt_strs+1622)
+#define INTERFACE_name (ntpd_opt_strs+1744)
/** Compiled in flag settings for the interface option */
#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -386,11 +402,11 @@ static int const aAuthnoreqCantList[] = {
* keyfile option description:
*/
/** Descriptive text for the keyfile option */
-#define KEYFILE_DESC (ntpd_opt_strs+1632)
+#define KEYFILE_DESC (ntpd_opt_strs+1754)
/** Upper-cased name for the keyfile option */
-#define KEYFILE_NAME (ntpd_opt_strs+1655)
+#define KEYFILE_NAME (ntpd_opt_strs+1777)
/** Name string for the keyfile option */
-#define KEYFILE_name (ntpd_opt_strs+1663)
+#define KEYFILE_name (ntpd_opt_strs+1785)
/** Compiled in flag settings for the keyfile option */
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -399,11 +415,11 @@ static int const aAuthnoreqCantList[] = {
* logfile option description:
*/
/** Descriptive text for the logfile option */
-#define LOGFILE_DESC (ntpd_opt_strs+1671)
+#define LOGFILE_DESC (ntpd_opt_strs+1793)
/** Upper-cased name for the logfile option */
-#define LOGFILE_NAME (ntpd_opt_strs+1692)
+#define LOGFILE_NAME (ntpd_opt_strs+1814)
/** Name string for the logfile option */
-#define LOGFILE_name (ntpd_opt_strs+1700)
+#define LOGFILE_name (ntpd_opt_strs+1822)
/** Compiled in flag settings for the logfile option */
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -412,11 +428,11 @@ static int const aAuthnoreqCantList[] = {
* novirtualips option description:
*/
/** Descriptive text for the novirtualips option */
-#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1708)
+#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1830)
/** Upper-cased name for the novirtualips option */
-#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1744)
+#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1866)
/** Name string for the novirtualips option */
-#define NOVIRTUALIPS_name (ntpd_opt_strs+1757)
+#define NOVIRTUALIPS_name (ntpd_opt_strs+1879)
/** Compiled in flag settings for the novirtualips option */
#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
@@ -425,11 +441,11 @@ static int const aAuthnoreqCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the modifymmtimer option */
-#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1770)
+#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1892)
/** Upper-cased name for the modifymmtimer option */
-#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1809)
+#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1931)
/** Name string for the modifymmtimer option */
-#define MODIFYMMTIMER_name (ntpd_opt_strs+1823)
+#define MODIFYMMTIMER_name (ntpd_opt_strs+1945)
/** Compiled in flag settings for the modifymmtimer option */
#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
@@ -445,11 +461,11 @@ static int const aAuthnoreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the nofork option */
-#define NOFORK_DESC (ntpd_opt_strs+1837)
+#define NOFORK_DESC (ntpd_opt_strs+1959)
/** Upper-cased name for the nofork option */
-#define NOFORK_NAME (ntpd_opt_strs+1849)
+#define NOFORK_NAME (ntpd_opt_strs+1971)
/** Name string for the nofork option */
-#define NOFORK_name (ntpd_opt_strs+1856)
+#define NOFORK_name (ntpd_opt_strs+1978)
/** Other options that appear in conjunction with the nofork option */
static int const aNoforkCantList[] = {
INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
@@ -460,11 +476,11 @@ static int const aNoforkCantList[] = {
* nice option description:
*/
/** Descriptive text for the nice option */
-#define NICE_DESC (ntpd_opt_strs+1863)
+#define NICE_DESC (ntpd_opt_strs+1985)
/** Upper-cased name for the nice option */
-#define NICE_NAME (ntpd_opt_strs+1884)
+#define NICE_NAME (ntpd_opt_strs+2006)
/** Name string for the nice option */
-#define NICE_name (ntpd_opt_strs+1889)
+#define NICE_name (ntpd_opt_strs+2011)
/** Compiled in flag settings for the nice option */
#define NICE_FLAGS (OPTST_DISABLED)
@@ -472,11 +488,11 @@ static int const aNoforkCantList[] = {
* pidfile option description:
*/
/** Descriptive text for the pidfile option */
-#define PIDFILE_DESC (ntpd_opt_strs+1894)
+#define PIDFILE_DESC (ntpd_opt_strs+2016)
/** Upper-cased name for the pidfile option */
-#define PIDFILE_NAME (ntpd_opt_strs+1915)
+#define PIDFILE_NAME (ntpd_opt_strs+2037)
/** Name string for the pidfile option */
-#define PIDFILE_name (ntpd_opt_strs+1923)
+#define PIDFILE_name (ntpd_opt_strs+2045)
/** Compiled in flag settings for the pidfile option */
#define PIDFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -485,11 +501,11 @@ static int const aNoforkCantList[] = {
* priority option description:
*/
/** Descriptive text for the priority option */
-#define PRIORITY_DESC (ntpd_opt_strs+1931)
+#define PRIORITY_DESC (ntpd_opt_strs+2053)
/** Upper-cased name for the priority option */
-#define PRIORITY_NAME (ntpd_opt_strs+1948)
+#define PRIORITY_NAME (ntpd_opt_strs+2070)
/** Name string for the priority option */
-#define PRIORITY_name (ntpd_opt_strs+1957)
+#define PRIORITY_name (ntpd_opt_strs+2079)
/** Compiled in flag settings for the priority option */
#define PRIORITY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -499,11 +515,11 @@ static int const aNoforkCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the quit option */
-#define QUIT_DESC (ntpd_opt_strs+1966)
+#define QUIT_DESC (ntpd_opt_strs+2088)
/** Upper-cased name for the quit option */
-#define QUIT_NAME (ntpd_opt_strs+1988)
+#define QUIT_NAME (ntpd_opt_strs+2110)
/** Name string for the quit option */
-#define QUIT_name (ntpd_opt_strs+1993)
+#define QUIT_name (ntpd_opt_strs+2115)
/** Other options that appear in conjunction with the quit option */
static int const aQuitCantList[] = {
INDEX_OPT_SAVECONFIGQUIT,
@@ -515,11 +531,11 @@ static int const aQuitCantList[] = {
* propagationdelay option description:
*/
/** Descriptive text for the propagationdelay option */
-#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+1998)
+#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+2120)
/** Upper-cased name for the propagationdelay option */
-#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2026)
+#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2148)
/** Name string for the propagationdelay option */
-#define PROPAGATIONDELAY_name (ntpd_opt_strs+2043)
+#define PROPAGATIONDELAY_name (ntpd_opt_strs+2165)
/** Compiled in flag settings for the propagationdelay option */
#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -530,11 +546,11 @@ static int const aQuitCantList[] = {
*/
#ifdef SAVECONFIG
/** Descriptive text for the saveconfigquit option */
-#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2060)
+#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2182)
/** Upper-cased name for the saveconfigquit option */
-#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2095)
+#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2217)
/** Name string for the saveconfigquit option */
-#define SAVECONFIGQUIT_name (ntpd_opt_strs+2110)
+#define SAVECONFIGQUIT_name (ntpd_opt_strs+2232)
/** Other options that appear in conjunction with the saveconfigquit option */
static int const aSaveconfigquitCantList[] = {
INDEX_OPT_QUIT,
@@ -555,11 +571,11 @@ static int const aSaveconfigquitCantList[] = {
* statsdir option description:
*/
/** Descriptive text for the statsdir option */
-#define STATSDIR_DESC (ntpd_opt_strs+2125)
+#define STATSDIR_DESC (ntpd_opt_strs+2247)
/** Upper-cased name for the statsdir option */
-#define STATSDIR_NAME (ntpd_opt_strs+2150)
+#define STATSDIR_NAME (ntpd_opt_strs+2272)
/** Name string for the statsdir option */
-#define STATSDIR_name (ntpd_opt_strs+2159)
+#define STATSDIR_name (ntpd_opt_strs+2281)
/** Compiled in flag settings for the statsdir option */
#define STATSDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -568,11 +584,11 @@ static int const aSaveconfigquitCantList[] = {
* trustedkey option description:
*/
/** Descriptive text for the trustedkey option */
-#define TRUSTEDKEY_DESC (ntpd_opt_strs+2168)
+#define TRUSTEDKEY_DESC (ntpd_opt_strs+2290)
/** Upper-cased name for the trustedkey option */
-#define TRUSTEDKEY_NAME (ntpd_opt_strs+2187)
+#define TRUSTEDKEY_NAME (ntpd_opt_strs+2309)
/** Name string for the trustedkey option */
-#define TRUSTEDKEY_name (ntpd_opt_strs+2198)
+#define TRUSTEDKEY_name (ntpd_opt_strs+2320)
/** Compiled in flag settings for the trustedkey option */
#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -582,11 +598,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the user option */
-#define USER_DESC (ntpd_opt_strs+2209)
+#define USER_DESC (ntpd_opt_strs+2331)
/** Upper-cased name for the user option */
-#define USER_NAME (ntpd_opt_strs+2243)
+#define USER_NAME (ntpd_opt_strs+2365)
/** Name string for the user option */
-#define USER_name (ntpd_opt_strs+2248)
+#define USER_name (ntpd_opt_strs+2370)
/** Compiled in flag settings for the user option */
#define USER_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -595,19 +611,19 @@ static int const aSaveconfigquitCantList[] = {
#define USER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
#define USER_NAME NULL
/** Descriptive text for the user option */
-#define USER_DESC (ntpd_opt_strs+1494)
-#define USER_name (ntpd_opt_strs+2248)
+#define USER_DESC (ntpd_opt_strs+1616)
+#define USER_name (ntpd_opt_strs+2370)
#endif /* HAVE_DROPROOT */
/**
* updateinterval option description:
*/
/** Descriptive text for the updateinterval option */
-#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2253)
+#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2375)
/** Upper-cased name for the updateinterval option */
-#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2317)
+#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2439)
/** Name string for the updateinterval option */
-#define UPDATEINTERVAL_name (ntpd_opt_strs+2332)
+#define UPDATEINTERVAL_name (ntpd_opt_strs+2454)
/** Compiled in flag settings for the updateinterval option */
#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -616,11 +632,11 @@ static int const aSaveconfigquitCantList[] = {
* var option description:
*/
/** Descriptive text for the var option */
-#define VAR_DESC (ntpd_opt_strs+2347)
+#define VAR_DESC (ntpd_opt_strs+2469)
/** Upper-cased name for the var option */
-#define VAR_NAME (ntpd_opt_strs+2377)
+#define VAR_NAME (ntpd_opt_strs+2499)
/** Name string for the var option */
-#define VAR_name (ntpd_opt_strs+2381)
+#define VAR_name (ntpd_opt_strs+2503)
/** Compiled in flag settings for the var option */
#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -629,11 +645,11 @@ static int const aSaveconfigquitCantList[] = {
* dvar option description:
*/
/** Descriptive text for the dvar option */
-#define DVAR_DESC (ntpd_opt_strs+2385)
+#define DVAR_DESC (ntpd_opt_strs+2507)
/** Upper-cased name for the dvar option */
-#define DVAR_NAME (ntpd_opt_strs+2419)
+#define DVAR_NAME (ntpd_opt_strs+2541)
/** Name string for the dvar option */
-#define DVAR_name (ntpd_opt_strs+2424)
+#define DVAR_name (ntpd_opt_strs+2546)
/** Compiled in flag settings for the dvar option */
#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -644,11 +660,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_WORKING_FORK
/** Descriptive text for the wait-sync option */
-#define WAIT_SYNC_DESC (ntpd_opt_strs+2429)
+#define WAIT_SYNC_DESC (ntpd_opt_strs+2551)
/** Upper-cased name for the wait-sync option */
-#define WAIT_SYNC_NAME (ntpd_opt_strs+2466)
+#define WAIT_SYNC_NAME (ntpd_opt_strs+2588)
/** Name string for the wait-sync option */
-#define WAIT_SYNC_name (ntpd_opt_strs+2476)
+#define WAIT_SYNC_name (ntpd_opt_strs+2598)
/** Other options that appear in conjunction with the wait-sync option */
static int const aWait_SyncCantList[] = {
INDEX_OPT_NOFORK,
@@ -670,11 +686,11 @@ static int const aWait_SyncCantList[] = {
* slew option description:
*/
/** Descriptive text for the slew option */
-#define SLEW_DESC (ntpd_opt_strs+2486)
+#define SLEW_DESC (ntpd_opt_strs+2608)
/** Upper-cased name for the slew option */
-#define SLEW_NAME (ntpd_opt_strs+2509)
+#define SLEW_NAME (ntpd_opt_strs+2631)
/** Name string for the slew option */
-#define SLEW_name (ntpd_opt_strs+2514)
+#define SLEW_name (ntpd_opt_strs+2636)
/** Compiled in flag settings for the slew option */
#define SLEW_FLAGS (OPTST_DISABLED)
@@ -683,11 +699,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the usepcc option */
-#define USEPCC_DESC (ntpd_opt_strs+2519)
+#define USEPCC_DESC (ntpd_opt_strs+2641)
/** Upper-cased name for the usepcc option */
-#define USEPCC_NAME (ntpd_opt_strs+2556)
+#define USEPCC_NAME (ntpd_opt_strs+2678)
/** Name string for the usepcc option */
-#define USEPCC_name (ntpd_opt_strs+2563)
+#define USEPCC_name (ntpd_opt_strs+2685)
/** Compiled in flag settings for the usepcc option */
#define USEPCC_FLAGS (OPTST_DISABLED)
@@ -703,11 +719,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the pccfreq option */
-#define PCCFREQ_DESC (ntpd_opt_strs+2570)
+#define PCCFREQ_DESC (ntpd_opt_strs+2692)
/** Upper-cased name for the pccfreq option */
-#define PCCFREQ_NAME (ntpd_opt_strs+2613)
+#define PCCFREQ_NAME (ntpd_opt_strs+2735)
/** Name string for the pccfreq option */
-#define PCCFREQ_name (ntpd_opt_strs+2621)
+#define PCCFREQ_name (ntpd_opt_strs+2743)
/** Compiled in flag settings for the pccfreq option */
#define PCCFREQ_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -724,11 +740,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef HAVE_DNSREGISTRATION
/** Descriptive text for the mdns option */
-#define MDNS_DESC (ntpd_opt_strs+2629)
+#define MDNS_DESC (ntpd_opt_strs+2751)
/** Upper-cased name for the mdns option */
-#define MDNS_NAME (ntpd_opt_strs+2664)
+#define MDNS_NAME (ntpd_opt_strs+2786)
/** Name string for the mdns option */
-#define MDNS_name (ntpd_opt_strs+2669)
+#define MDNS_name (ntpd_opt_strs+2791)
/** Compiled in flag settings for the mdns option */
#define MDNS_FLAGS (OPTST_DISABLED)
@@ -742,11 +758,11 @@ static int const aWait_SyncCantList[] = {
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpd_opt_strs+2674)
-#define HELP_name (ntpd_opt_strs+2718)
+#define HELP_DESC (ntpd_opt_strs+2796)
+#define HELP_name (ntpd_opt_strs+2840)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpd_opt_strs+2723)
-#define MORE_HELP_name (ntpd_opt_strs+2768)
+#define MORE_HELP_DESC (ntpd_opt_strs+2845)
+#define MORE_HELP_name (ntpd_opt_strs+2890)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -759,8 +775,8 @@ static int const aWait_SyncCantList[] = {
# define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
#endif
-#define VER_DESC (ntpd_opt_strs+2778)
-#define VER_name (ntpd_opt_strs+2814)
+#define VER_DESC (ntpd_opt_strs+2900)
+#define VER_name (ntpd_opt_strs+2936)
/**
* Declare option callback procedures
*/
@@ -900,8 +916,20 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PANICGATE_DESC, PANICGATE_NAME, PANICGATE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 10, VALUE_OPT_JAILDIR,
- /* equiv idx, value */ 10, VALUE_OPT_JAILDIR,
+ { /* entry idx, value */ 10, VALUE_OPT_FORCE_STEP_ONCE,
+ /* equiv idx, value */ 10, VALUE_OPT_FORCE_STEP_ONCE,
+ /* equivalenced to */ NO_EQUIVALENT,
+ /* min, max, act ct */ 0, 1, 0,
+ /* opt state flags */ FORCE_STEP_ONCE_FLAGS, 0,
+ /* last opt argumnt */ { NULL }, /* --force_step_once */
+ /* arg list/cookie */ NULL,
+ /* must/cannot opts */ NULL, NULL,
+ /* option proc */ NULL,
+ /* desc, NAME, name */ FORCE_STEP_ONCE_DESC, FORCE_STEP_ONCE_NAME, FORCE_STEP_ONCE_name,
+ /* disablement strs */ NULL, NULL },
+
+ { /* entry idx, value */ 11, VALUE_OPT_JAILDIR,
+ /* equiv idx, value */ 11, VALUE_OPT_JAILDIR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ JAILDIR_FLAGS, 0,
@@ -912,8 +940,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ JAILDIR_DESC, JAILDIR_NAME, JAILDIR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 11, VALUE_OPT_INTERFACE,
- /* equiv idx, value */ 11, VALUE_OPT_INTERFACE,
+ { /* entry idx, value */ 12, VALUE_OPT_INTERFACE,
+ /* equiv idx, value */ 12, VALUE_OPT_INTERFACE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ INTERFACE_FLAGS, 0,
@@ -924,8 +952,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ INTERFACE_DESC, INTERFACE_NAME, INTERFACE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 12, VALUE_OPT_KEYFILE,
- /* equiv idx, value */ 12, VALUE_OPT_KEYFILE,
+ { /* entry idx, value */ 13, VALUE_OPT_KEYFILE,
+ /* equiv idx, value */ 13, VALUE_OPT_KEYFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ KEYFILE_FLAGS, 0,
@@ -936,8 +964,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ KEYFILE_DESC, KEYFILE_NAME, KEYFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 13, VALUE_OPT_LOGFILE,
- /* equiv idx, value */ 13, VALUE_OPT_LOGFILE,
+ { /* entry idx, value */ 14, VALUE_OPT_LOGFILE,
+ /* equiv idx, value */ 14, VALUE_OPT_LOGFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ LOGFILE_FLAGS, 0,
@@ -948,8 +976,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ LOGFILE_DESC, LOGFILE_NAME, LOGFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
- /* equiv idx, value */ 14, VALUE_OPT_NOVIRTUALIPS,
+ { /* entry idx, value */ 15, VALUE_OPT_NOVIRTUALIPS,
+ /* equiv idx, value */ 15, VALUE_OPT_NOVIRTUALIPS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOVIRTUALIPS_FLAGS, 0,
@@ -960,8 +988,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NOVIRTUALIPS_DESC, NOVIRTUALIPS_NAME, NOVIRTUALIPS_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
- /* equiv idx, value */ 15, VALUE_OPT_MODIFYMMTIMER,
+ { /* entry idx, value */ 16, VALUE_OPT_MODIFYMMTIMER,
+ /* equiv idx, value */ 16, VALUE_OPT_MODIFYMMTIMER,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MODIFYMMTIMER_FLAGS, 0,
@@ -972,8 +1000,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ MODIFYMMTIMER_DESC, MODIFYMMTIMER_NAME, MODIFYMMTIMER_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 16, VALUE_OPT_NOFORK,
- /* equiv idx, value */ 16, VALUE_OPT_NOFORK,
+ { /* entry idx, value */ 17, VALUE_OPT_NOFORK,
+ /* equiv idx, value */ 17, VALUE_OPT_NOFORK,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NOFORK_FLAGS, 0,
@@ -984,8 +1012,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NOFORK_DESC, NOFORK_NAME, NOFORK_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 17, VALUE_OPT_NICE,
- /* equiv idx, value */ 17, VALUE_OPT_NICE,
+ { /* entry idx, value */ 18, VALUE_OPT_NICE,
+ /* equiv idx, value */ 18, VALUE_OPT_NICE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ NICE_FLAGS, 0,
@@ -996,8 +1024,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ NICE_DESC, NICE_NAME, NICE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 18, VALUE_OPT_PIDFILE,
- /* equiv idx, value */ 18, VALUE_OPT_PIDFILE,
+ { /* entry idx, value */ 19, VALUE_OPT_PIDFILE,
+ /* equiv idx, value */ 19, VALUE_OPT_PIDFILE,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PIDFILE_FLAGS, 0,
@@ -1008,8 +1036,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PIDFILE_DESC, PIDFILE_NAME, PIDFILE_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 19, VALUE_OPT_PRIORITY,
- /* equiv idx, value */ 19, VALUE_OPT_PRIORITY,
+ { /* entry idx, value */ 20, VALUE_OPT_PRIORITY,
+ /* equiv idx, value */ 20, VALUE_OPT_PRIORITY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PRIORITY_FLAGS, 0,
@@ -1020,8 +1048,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 20, VALUE_OPT_QUIT,
- /* equiv idx, value */ 20, VALUE_OPT_QUIT,
+ { /* entry idx, value */ 21, VALUE_OPT_QUIT,
+ /* equiv idx, value */ 21, VALUE_OPT_QUIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ QUIT_FLAGS, 0,
@@ -1032,8 +1060,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ QUIT_DESC, QUIT_NAME, QUIT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
- /* equiv idx, value */ 21, VALUE_OPT_PROPAGATIONDELAY,
+ { /* entry idx, value */ 22, VALUE_OPT_PROPAGATIONDELAY,
+ /* equiv idx, value */ 22, VALUE_OPT_PROPAGATIONDELAY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PROPAGATIONDELAY_FLAGS, 0,
@@ -1044,8 +1072,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PROPAGATIONDELAY_DESC, PROPAGATIONDELAY_NAME, PROPAGATIONDELAY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
- /* equiv idx, value */ 22, VALUE_OPT_SAVECONFIGQUIT,
+ { /* entry idx, value */ 23, VALUE_OPT_SAVECONFIGQUIT,
+ /* equiv idx, value */ 23, VALUE_OPT_SAVECONFIGQUIT,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SAVECONFIGQUIT_FLAGS, 0,
@@ -1056,8 +1084,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ SAVECONFIGQUIT_DESC, SAVECONFIGQUIT_NAME, SAVECONFIGQUIT_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 23, VALUE_OPT_STATSDIR,
- /* equiv idx, value */ 23, VALUE_OPT_STATSDIR,
+ { /* entry idx, value */ 24, VALUE_OPT_STATSDIR,
+ /* equiv idx, value */ 24, VALUE_OPT_STATSDIR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ STATSDIR_FLAGS, 0,
@@ -1068,8 +1096,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ STATSDIR_DESC, STATSDIR_NAME, STATSDIR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
- /* equiv idx, value */ 24, VALUE_OPT_TRUSTEDKEY,
+ { /* entry idx, value */ 25, VALUE_OPT_TRUSTEDKEY,
+ /* equiv idx, value */ 25, VALUE_OPT_TRUSTEDKEY,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ TRUSTEDKEY_FLAGS, 0,
@@ -1080,8 +1108,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ TRUSTEDKEY_DESC, TRUSTEDKEY_NAME, TRUSTEDKEY_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 25, VALUE_OPT_USER,
- /* equiv idx, value */ 25, VALUE_OPT_USER,
+ { /* entry idx, value */ 26, VALUE_OPT_USER,
+ /* equiv idx, value */ 26, VALUE_OPT_USER,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USER_FLAGS, 0,
@@ -1092,8 +1120,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ USER_DESC, USER_NAME, USER_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
- /* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL,
+ { /* entry idx, value */ 27, VALUE_OPT_UPDATEINTERVAL,
+ /* equiv idx, value */ 27, VALUE_OPT_UPDATEINTERVAL,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ UPDATEINTERVAL_FLAGS, 0,
@@ -1104,8 +1132,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ UPDATEINTERVAL_DESC, UPDATEINTERVAL_NAME, UPDATEINTERVAL_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 27, VALUE_OPT_VAR,
- /* equiv idx, value */ 27, VALUE_OPT_VAR,
+ { /* entry idx, value */ 28, VALUE_OPT_VAR,
+ /* equiv idx, value */ 28, VALUE_OPT_VAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ VAR_FLAGS, 0,
@@ -1116,8 +1144,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ VAR_DESC, VAR_NAME, VAR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 28, VALUE_OPT_DVAR,
- /* equiv idx, value */ 28, VALUE_OPT_DVAR,
+ { /* entry idx, value */ 29, VALUE_OPT_DVAR,
+ /* equiv idx, value */ 29, VALUE_OPT_DVAR,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, NOLIMIT, 0,
/* opt state flags */ DVAR_FLAGS, 0,
@@ -1128,8 +1156,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ DVAR_DESC, DVAR_NAME, DVAR_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 29, VALUE_OPT_WAIT_SYNC,
- /* equiv idx, value */ 29, VALUE_OPT_WAIT_SYNC,
+ { /* entry idx, value */ 30, VALUE_OPT_WAIT_SYNC,
+ /* equiv idx, value */ 30, VALUE_OPT_WAIT_SYNC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ WAIT_SYNC_FLAGS, 0,
@@ -1140,8 +1168,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ WAIT_SYNC_DESC, WAIT_SYNC_NAME, WAIT_SYNC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 30, VALUE_OPT_SLEW,
- /* equiv idx, value */ 30, VALUE_OPT_SLEW,
+ { /* entry idx, value */ 31, VALUE_OPT_SLEW,
+ /* equiv idx, value */ 31, VALUE_OPT_SLEW,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ SLEW_FLAGS, 0,
@@ -1152,8 +1180,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ SLEW_DESC, SLEW_NAME, SLEW_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 31, VALUE_OPT_USEPCC,
- /* equiv idx, value */ 31, VALUE_OPT_USEPCC,
+ { /* entry idx, value */ 32, VALUE_OPT_USEPCC,
+ /* equiv idx, value */ 32, VALUE_OPT_USEPCC,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ USEPCC_FLAGS, 0,
@@ -1164,8 +1192,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ USEPCC_DESC, USEPCC_NAME, USEPCC_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 32, VALUE_OPT_PCCFREQ,
- /* equiv idx, value */ 32, VALUE_OPT_PCCFREQ,
+ { /* entry idx, value */ 33, VALUE_OPT_PCCFREQ,
+ /* equiv idx, value */ 33, VALUE_OPT_PCCFREQ,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ PCCFREQ_FLAGS, 0,
@@ -1176,8 +1204,8 @@ static tOptDesc optDesc[OPTION_CT] = {
/* desc, NAME, name */ PCCFREQ_DESC, PCCFREQ_NAME, PCCFREQ_name,
/* disablement strs */ NULL, NULL },
- { /* entry idx, value */ 33, VALUE_OPT_MDNS,
- /* equiv idx, value */ 33, VALUE_OPT_MDNS,
+ { /* entry idx, value */ 34, VALUE_OPT_MDNS,
+ /* equiv idx, value */ 34, VALUE_OPT_MDNS,
/* equivalenced to */ NO_EQUIVALENT,
/* min, max, act ct */ 0, 1, 0,
/* opt state flags */ MDNS_FLAGS, 0,
@@ -1230,21 +1258,21 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpd. */
-#define zPROGNAME (ntpd_opt_strs+2822)
+#define zPROGNAME (ntpd_opt_strs+2944)
/** Reference to the title line for ntpd usage. */
-#define zUsageTitle (ntpd_opt_strs+2827)
+#define zUsageTitle (ntpd_opt_strs+2949)
/** There is no ntpd configuration file. */
#define zRcName NULL
/** There are no directories to search for ntpd config files. */
#define apzHomeList NULL
/** The ntpd program bug email address. */
-#define zBugsAddr (ntpd_opt_strs+2960)
+#define zBugsAddr (ntpd_opt_strs+3080)
/** Clarification/explanation of what ntpd does. */
-#define zExplain (ntpd_opt_strs+2994)
+#define zExplain (ntpd_opt_strs+3114)
/** Extra detail explaining what ntpd does. */
#define zDetail (NULL)
/** The full version string for ntpd. */
-#define zFullVersion (ntpd_opt_strs+2996)
+#define zFullVersion (ntpd_opt_strs+3116)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -1366,7 +1394,7 @@ tOptions ntpdOptions = {
NO_EQUIVALENT, /* '-#' option index */
NO_EQUIVALENT /* index of default opt */
},
- 37 /* full option count */, 34 /* user option count */,
+ 38 /* full option count */, 35 /* user option count */,
ntpd_full_usage, ntpd_short_usage,
NULL, NULL,
PKGDATADIR, ntpd_packager_info
@@ -1501,8 +1529,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.7p482\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("ntpd 4.2.8p2\n\
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.\n\
This is free software. It is licensed for use, modification and\n\
redistribution under the terms of the NTP License, copies of which\n\
can be seen at:\n"));
@@ -1516,9 +1544,10 @@ provided that the above copyright notice appears in all copies and that\n\
both the copyright notice and this permission notice appear in supporting\n\
documentation, and that the name The University of Delaware not be used in\n\
advertising or publicity pertaining to distribution of the software without\n\
-specific, written prior permission. The University of Delaware makes no\n\
-representations about the suitability this software for any purpose. It is\n\
-provided \"as is\" without express or implied warranty.\n"));
+specific, written prior permission. The University of Delaware and Network\n\
+Time Foundation makes no representations about the suitability this\n\
+software for any purpose. It is provided \"as is\" without express or\n\
+implied warranty.\n"));
/* referenced via ntpdOptions.pOptDesc->pzText */
puts(_("Force IPv4 DNS name resolution"));
@@ -1551,6 +1580,9 @@ provided \"as is\" without express or implied warranty.\n"));
puts(_("Allow the first adjustment to be Big"));
/* referenced via ntpdOptions.pOptDesc->pzText */
+ puts(_("Step any initial offset correction."));
+
+ /* referenced via ntpdOptions.pOptDesc->pzText */
puts(_("Jail directory"));
/* referenced via ntpdOptions.pOptDesc->pzText */
@@ -1638,7 +1670,7 @@ provided \"as is\" without express or implied warranty.\n"));
puts(_("output version information and exit"));
/* referenced via ntpdOptions.pzUsageTitle */
- puts(_("ntpd - NTP daemon program - Ver. 4.2.7p482\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p2\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@@ -1646,7 +1678,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
- puts(_("ntpd 4.2.7p482"));
+ puts(_("ntpd 4.2.8p2"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpd/ntpd-opts.h b/ntpd/ntpd-opts.h
index 7a33779..682aebd 100644
--- a/ntpd/ntpd-opts.h
+++ b/ntpd/ntpd-opts.h
@@ -1,7 +1,7 @@
/*
* EDIT THIS FILE WITH CAUTION (ntpd-opts.h)
*
- * It has been AutoGen-ed December 2, 2014 at 08:54:07 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed April 7, 2015 at 04:23:13 AM by AutoGen 5.18.5pre4
* From the definitions ntpd-opts.def
* and the template file options
*
@@ -18,7 +18,7 @@
* The ntpd program is copyrighted and licensed
* under the following terms:
*
- * Copyright (C) 1970-2014 The University of Delaware, all rights reserved.
+ * Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation, all rights reserved.
* This is free software. It is licensed for use, modification and
* redistribution under the terms of the NTP License, copies of which
* can be seen at:
@@ -31,7 +31,7 @@
* both the copyright notice and this permission notice appear in
* supporting documentation, and that the name The University of Delaware not be used in
* advertising or publicity pertaining to distribution of the software
- * without specific, written prior permission. The University of Delaware makes no
+ * without specific, written prior permission. The University of Delaware and Network Time Foundation makes no
* representations about the suitability this software for any purpose. It
* is provided "as is" without express or implied warranty.
*/
@@ -74,40 +74,41 @@ typedef enum {
INDEX_OPT_SET_DEBUG_LEVEL = 7,
INDEX_OPT_DRIFTFILE = 8,
INDEX_OPT_PANICGATE = 9,
- INDEX_OPT_JAILDIR = 10,
- INDEX_OPT_INTERFACE = 11,
- INDEX_OPT_KEYFILE = 12,
- INDEX_OPT_LOGFILE = 13,
- INDEX_OPT_NOVIRTUALIPS = 14,
- INDEX_OPT_MODIFYMMTIMER = 15,
- INDEX_OPT_NOFORK = 16,
- INDEX_OPT_NICE = 17,
- INDEX_OPT_PIDFILE = 18,
- INDEX_OPT_PRIORITY = 19,
- INDEX_OPT_QUIT = 20,
- INDEX_OPT_PROPAGATIONDELAY = 21,
- 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_WAIT_SYNC = 29,
- INDEX_OPT_SLEW = 30,
- INDEX_OPT_USEPCC = 31,
- INDEX_OPT_PCCFREQ = 32,
- INDEX_OPT_MDNS = 33,
- INDEX_OPT_VERSION = 34,
- INDEX_OPT_HELP = 35,
- INDEX_OPT_MORE_HELP = 36
+ INDEX_OPT_FORCE_STEP_ONCE = 10,
+ INDEX_OPT_JAILDIR = 11,
+ INDEX_OPT_INTERFACE = 12,
+ INDEX_OPT_KEYFILE = 13,
+ INDEX_OPT_LOGFILE = 14,
+ INDEX_OPT_NOVIRTUALIPS = 15,
+ INDEX_OPT_MODIFYMMTIMER = 16,
+ INDEX_OPT_NOFORK = 17,
+ INDEX_OPT_NICE = 18,
+ INDEX_OPT_PIDFILE = 19,
+ INDEX_OPT_PRIORITY = 20,
+ INDEX_OPT_QUIT = 21,
+ INDEX_OPT_PROPAGATIONDELAY = 22,
+ INDEX_OPT_SAVECONFIGQUIT = 23,
+ INDEX_OPT_STATSDIR = 24,
+ INDEX_OPT_TRUSTEDKEY = 25,
+ INDEX_OPT_USER = 26,
+ INDEX_OPT_UPDATEINTERVAL = 27,
+ INDEX_OPT_VAR = 28,
+ INDEX_OPT_DVAR = 29,
+ INDEX_OPT_WAIT_SYNC = 30,
+ INDEX_OPT_SLEW = 31,
+ INDEX_OPT_USEPCC = 32,
+ INDEX_OPT_PCCFREQ = 33,
+ INDEX_OPT_MDNS = 34,
+ INDEX_OPT_VERSION = 35,
+ INDEX_OPT_HELP = 36,
+ INDEX_OPT_MORE_HELP = 37
} teOptIndex;
/** count of all options for ntpd */
-#define OPTION_CT 37
+#define OPTION_CT 38
/** ntpd version */
-#define NTPD_VERSION "4.2.7p482"
+#define NTPD_VERSION "4.2.8p2"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.7p482"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p2"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
@@ -199,6 +200,10 @@ typedef enum {
# warning undefining PANICGATE due to option name conflict
# undef PANICGATE
# endif
+# ifdef FORCE_STEP_ONCE
+# warning undefining FORCE_STEP_ONCE due to option name conflict
+# undef FORCE_STEP_ONCE
+# endif
# ifdef JAILDIR
# warning undefining JAILDIR due to option name conflict
# undef JAILDIR
@@ -306,6 +311,7 @@ typedef enum {
# undef SET_DEBUG_LEVEL
# undef DRIFTFILE
# undef PANICGATE
+# undef FORCE_STEP_ONCE
# undef JAILDIR
# undef INTERFACE
# undef KEYFILE
@@ -348,6 +354,7 @@ typedef enum {
#define OPT_VALUE_SET_DEBUG_LEVEL (DESC(SET_DEBUG_LEVEL).optArg.argInt)
#define VALUE_OPT_DRIFTFILE 'f'
#define VALUE_OPT_PANICGATE 'g'
+#define VALUE_OPT_FORCE_STEP_ONCE 'G'
#define VALUE_OPT_JAILDIR 'i'
#define VALUE_OPT_INTERFACE 'I'
#define VALUE_OPT_KEYFILE 'k'
diff --git a/ntpd/ntpd.1ntpdman b/ntpd/ntpd.1ntpdman
index 810e071..5ded89b 100644
--- a/ntpd/ntpd.1ntpdman
+++ b/ntpd/ntpd.1ntpdman
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd 1ntpdman "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpd 1ntpdman "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-AtaWSL/ag-MtaORL)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-TQays3/ag-5Qaqr3)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:46 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:45 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -175,7 +175,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.TP
@@ -196,6 +196,20 @@ See the
\fBtinker\fP
configuration file directive for other options.
.TP
+.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-force\-step\-once\f[]
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
+.TP
.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
Jail directory.
.sp
@@ -220,7 +234,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
path to symmetric keys.
@@ -959,9 +973,9 @@ RFC5908
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/ntpd/ntpd.1ntpdmdoc b/ntpd/ntpd.1ntpdmdoc
index 5b02dd1..14b38e4 100644
--- a/ntpd/ntpd.1ntpdmdoc
+++ b/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:03 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:02 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -144,7 +144,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.It Fl g , Fl \-panicgate
@@ -163,6 +163,19 @@ options.
See the
\fBtinker\fP
configuration file directive for other options.
+.It Fl G , Fl \-force\-step\-once
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
Jail directory.
.sp
@@ -186,7 +199,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
path to symmetric keys.
.sp
@@ -867,9 +880,9 @@ A snapshot of this documentation is available in HTML format in
.%O RFC5908
.Re
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c
index ef1baa7..529e6ce 100644
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -168,8 +168,8 @@ int root_dropped;
char *user; /* User to switch to */
char *group; /* group to switch to */
const char *chrootdir; /* directory to chroot to */
-int sw_uid;
-int sw_gid;
+uid_t sw_uid;
+gid_t sw_gid;
char *endp;
struct group *gr;
struct passwd *pw;
@@ -937,6 +937,10 @@ getgroup:
msyslog(LOG_ERR, "Cannot setegid() to group `%s': %m", group);
exit (-1);
}
+ if (group)
+ setgroups(1, &sw_gid);
+ else
+ initgroups(pw->pw_name, pw->pw_gid);
if (user && setuid(sw_uid)) {
msyslog(LOG_ERR, "Cannot setuid() to user `%s': %m", user);
exit (-1);
@@ -1258,6 +1262,7 @@ finish(
if (mdns != NULL)
DNSServiceRefDeallocate(mdns);
# endif
+ peer_cleanup();
exit(0);
}
#endif /* !SIM && SIGDIE1 */
diff --git a/ntpd/ntpd.html b/ntpd/ntpd.html
index 25b6caa..8919ee9 100644
--- a/ntpd/ntpd.html
+++ b/ntpd/ntpd.html
@@ -39,7 +39,7 @@ The program can operate in any of several modes, including client/server,
symmetric and broadcast modes, and with both symmetric-key and public-key
cryptography.
- <p>This document applies to version 4.2.7p482 of <code>ntpd</code>.
+ <p>This document applies to version 4.2.8p2 of <code>ntpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description
@@ -169,7 +169,8 @@ This software is released under the NTP license, &lt;http://ntp.org/license&gt;.
<li><a accesskey="6" href="#ntpd-configfile">ntpd configfile</a>: configfile option (-c)
<li><a accesskey="7" href="#ntpd-driftfile">ntpd driftfile</a>: driftfile option (-f)
<li><a accesskey="8" href="#ntpd-panicgate">ntpd panicgate</a>: panicgate option (-g)
-<li><a accesskey="9" href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
+<li><a accesskey="9" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>: force-step-once option (-G)
+<li><a href="#ntpd-jaildir">ntpd jaildir</a>: jaildir option (-i)
<li><a href="#ntpd-interface">ntpd interface</a>: interface option (-I)
<li><a href="#ntpd-keyfile">ntpd keyfile</a>: keyfile option (-k)
<li><a href="#ntpd-logfile">ntpd logfile</a>: logfile option (-l)
@@ -219,7 +220,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">ntpd - NTP daemon program - Ver. 4.2.7p481
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p2-RC3
Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ]... \
[ &lt;server1&gt; ... &lt;serverN&gt; ]
Flg Arg Option-Name Description
@@ -240,6 +241,7 @@ Usage: ntpd [ -&lt;flag&gt; [&lt;val&gt;] | --&lt;name&gt;[{=| }&lt;val&gt;] ].
-f Str driftfile frequency drift file name
-g no panicgate Allow the first adjustment to be Big
- may appear multiple times
+ -G no force-step-once Step any initial offset correction.
-i Str jaildir Jail directory
-I Str interface Listen on an interface name or address
- may appear multiple times
@@ -413,7 +415,7 @@ configuration specification in the
file.
<div class="node">
<p><hr>
-<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
+<a name="ntpd-panicgate"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-driftfile">ntpd driftfile</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<br>
@@ -443,15 +445,37 @@ See the
configuration file directive for other options.
<div class="node">
<p><hr>
-<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
+<a name="ntpd-force_002dstep_002donce"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-jaildir">ntpd jaildir</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-panicgate">ntpd panicgate</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<br>
</div>
+<h4 class="subsection">force-step-once option (-G)</h4>
+
+<p><a name="index-ntpd_002dforce_002dstep_002donce-11"></a>
+This is the &ldquo;step any initial offset correction.&rdquo; option.
+Normally,
+<code>ntpd</code>
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the <code>tinker</code> configuration file directive for other options.
+<div class="node">
+<p><hr>
+<a name="ntpd-jaildir"></a>Next:&nbsp;<a rel="next" accesskey="n" href="#ntpd-interface">ntpd interface</a>,
+Previous:&nbsp;<a rel="previous" accesskey="p" href="#ntpd-force_002dstep_002donce">ntpd force-step-once</a>,
+Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
+<br>
+</div>
+
<h4 class="subsection">jaildir option (-i)</h4>
-<p><a name="index-ntpd_002djaildir-11"></a>
+<p><a name="index-ntpd_002djaildir-12"></a>
This is the &ldquo;jail directory&rdquo; option.
This option takes a string argument.
@@ -482,7 +506,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">interface option (-I)</h4>
-<p><a name="index-ntpd_002dinterface-12"></a>
+<p><a name="index-ntpd_002dinterface-13"></a>
This is the &ldquo;listen on an interface name or address&rdquo; option.
This option takes a string argument <span class="file">iface</span>.
@@ -506,7 +530,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">keyfile option (-k)</h4>
-<p><a name="index-ntpd_002dkeyfile-13"></a>
+<p><a name="index-ntpd_002dkeyfile-14"></a>
This is the &ldquo;path to symmetric keys&rdquo; option.
This option takes a string argument.
Specify the name and path of the symmetric key file.
@@ -525,7 +549,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">logfile option (-l)</h4>
-<p><a name="index-ntpd_002dlogfile-14"></a>
+<p><a name="index-ntpd_002dlogfile-15"></a>
This is the &ldquo;path to the log file&rdquo; option.
This option takes a string argument.
Specify the name and path of the log file.
@@ -543,7 +567,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">novirtualips option (-L)</h4>
-<p><a name="index-ntpd_002dnovirtualips-15"></a>
+<p><a name="index-ntpd_002dnovirtualips-16"></a>
This is the &ldquo;do not listen to virtual interfaces&rdquo; option.
Do not listen to virtual interfaces, defined as those with
names containing a colon. This option is deprecated. Please
@@ -559,7 +583,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">modifymmtimer option (-M)</h4>
-<p><a name="index-ntpd_002dmodifymmtimer-16"></a>
+<p><a name="index-ntpd_002dmodifymmtimer-17"></a>
This is the &ldquo;modify multimedia timer (windows only)&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@@ -580,7 +604,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">nice option (-N)</h4>
-<p><a name="index-ntpd_002dnice-17"></a>
+<p><a name="index-ntpd_002dnice-18"></a>
This is the &ldquo;run at high priority&rdquo; option.
To the extent permitted by the operating system, run
<code>ntpd</code>
@@ -595,7 +619,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">pidfile option (-p)</h4>
-<p><a name="index-ntpd_002dpidfile-18"></a>
+<p><a name="index-ntpd_002dpidfile-19"></a>
This is the &ldquo;path to the pid file&rdquo; option.
This option takes a string argument.
Specify the name and path of the file used to record
@@ -614,7 +638,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">priority option (-P)</h4>
-<p><a name="index-ntpd_002dpriority-19"></a>
+<p><a name="index-ntpd_002dpriority-20"></a>
This is the &ldquo;process priority&rdquo; option.
This option takes a number argument.
To the extent permitted by the operating system, run
@@ -632,7 +656,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">quit option (-q)</h4>
-<p><a name="index-ntpd_002dquit-20"></a>
+<p><a name="index-ntpd_002dquit-21"></a>
This is the &ldquo;set the time and quit&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@@ -662,7 +686,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">propagationdelay option (-r)</h4>
-<p><a name="index-ntpd_002dpropagationdelay-21"></a>
+<p><a name="index-ntpd_002dpropagationdelay-22"></a>
This is the &ldquo;broadcast/propagation delay&rdquo; option.
This option takes a string argument.
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.
@@ -676,7 +700,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">saveconfigquit option</h4>
-<p><a name="index-ntpd_002dsaveconfigquit-22"></a>
+<p><a name="index-ntpd_002dsaveconfigquit-23"></a>
This is the &ldquo;save parsed configuration and quit&rdquo; option.
This option takes a string argument.
@@ -700,7 +724,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">statsdir option (-s)</h4>
-<p><a name="index-ntpd_002dstatsdir-23"></a>
+<p><a name="index-ntpd_002dstatsdir-24"></a>
This is the &ldquo;statistics file location&rdquo; option.
This option takes a string argument.
Specify the directory path for files created by the statistics facility.
@@ -717,7 +741,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">trustedkey option (-t)</h4>
-<p><a name="index-ntpd_002dtrustedkey-24"></a>
+<p><a name="index-ntpd_002dtrustedkey-25"></a>
This is the &ldquo;trusted key number&rdquo; option.
This option takes a string argument <span class="file">tkey</span>.
@@ -737,7 +761,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">user option (-u)</h4>
-<p><a name="index-ntpd_002duser-25"></a>
+<p><a name="index-ntpd_002duser-26"></a>
This is the &ldquo;run as userid (or userid:groupid)&rdquo; option.
This option takes a string argument.
@@ -762,7 +786,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">updateinterval option (-U)</h4>
-<p><a name="index-ntpd_002dupdateinterval-26"></a>
+<p><a name="index-ntpd_002dupdateinterval-27"></a>
This is the &ldquo;interval in seconds between scans for new or dropped interfaces&rdquo; option.
This option takes a number argument.
Give the time in seconds between two scans for new or dropped interfaces.
@@ -779,7 +803,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">wait-sync option (-w)</h4>
-<p><a name="index-ntpd_002dwait_002dsync-27"></a>
+<p><a name="index-ntpd_002dwait_002dsync-28"></a>
This is the &ldquo;seconds to wait for first clock sync&rdquo; option.
This option takes a number argument.
@@ -808,7 +832,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">slew option (-x)</h4>
-<p><a name="index-ntpd_002dslew-28"></a>
+<p><a name="index-ntpd_002dslew-29"></a>
This is the &ldquo;slew up to 600 seconds&rdquo; option.
Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
@@ -833,7 +857,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">usepcc option</h4>
-<p><a name="index-ntpd_002dusepcc-29"></a>
+<p><a name="index-ntpd_002dusepcc-30"></a>
This is the &ldquo;use cpu cycle counter (windows only)&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
@@ -855,7 +879,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">pccfreq option</h4>
-<p><a name="index-ntpd_002dpccfreq-30"></a>
+<p><a name="index-ntpd_002dpccfreq-31"></a>
This is the &ldquo;force cpu cycle counter use (windows only)&rdquo; option.
This option takes a string argument.
@@ -877,7 +901,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#ntpd-Invocation">ntpd Invocation</a>
<h4 class="subsection">mdns option (-m)</h4>
-<p><a name="index-ntpd_002dmdns-31"></a>
+<p><a name="index-ntpd_002dmdns-32"></a>
This is the &ldquo;register with mdns as a ntp server&rdquo; option.
<p class="noindent">This option has some usage constraints. It:
diff --git a/ntpd/ntpd.man.in b/ntpd/ntpd.man.in
index a6824ca..d9497a3 100644
--- a/ntpd/ntpd.man.in
+++ b/ntpd/ntpd.man.in
@@ -10,11 +10,11 @@
.ds B-Font B
.ds I-Font I
.ds R-Font R
-.TH ntpd @NTPD_MS@ "02 Dec 2014" "4.2.7p482" "User Commands"
+.TH ntpd @NTPD_MS@ "07 Apr 2015" "4.2.8p2" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-AtaWSL/ag-MtaORL)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-TQays3/ag-5Qaqr3)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:56:46 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:25:45 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -175,7 +175,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.TP
@@ -196,6 +196,20 @@ See the
\fBtinker\fP
configuration file directive for other options.
.TP
+.NOP \f\*[B-Font]\-G\f[], \f\*[B-Font]\-\-force\-step\-once\f[]
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
+.TP
.NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-jaildir\f[]=\f\*[I-Font]string\f[]
Jail directory.
.sp
@@ -220,7 +234,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.TP
.NOP \f\*[B-Font]\-k\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-keyfile\f[]=\f\*[I-Font]string\f[]
path to symmetric keys.
@@ -959,9 +973,9 @@ RFC5908
.PP
.SH "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.SH "COPYRIGHT"
-Copyright (C) 1970-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.SH BUGS
The
diff --git a/ntpd/ntpd.mdoc.in b/ntpd/ntpd.mdoc.in
index 1c06102..4458532 100644
--- a/ntpd/ntpd.mdoc.in
+++ b/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 2 2014
+.Dd April 7 2015
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 2, 2014 at 08:57:03 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed April 7, 2015 at 04:26:02 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -144,7 +144,7 @@ The name and path of the frequency file,
by default.
This is the same operation as the
\fBdriftfile\fP \fIdriftfile\fP
-configuration specification in the
+configuration specification in the
\fI/etc/ntp.conf\fP
file.
.It Fl g , Fl \-panicgate
@@ -163,6 +163,19 @@ options.
See the
\fBtinker\fP
configuration file directive for other options.
+.It Fl G , Fl \-force\-step\-once
+Step any initial offset correction..
+.sp
+Normally,
+\fBntpd\fP
+steps the time if the time offset exceeds the step threshold,
+which is 128 ms by default, and otherwise slews the time.
+This option forces the initial offset correction to be stepped,
+so the highest time accuracy can be achieved quickly.
+However, this may also cause the time to be stepped back
+so this option must not be used if
+applications requiring monotonic time are running.
+See the \fBtinker\fP configuration file directive for other options.
.It Fl i Ar string , Fl \-jaildir Ns = Ns Ar string
Jail directory.
.sp
@@ -186,7 +199,7 @@ Open the network address given, or all the addresses associated with the
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
-\fBinterface\fP command, which is more versatile.
+\fBinterface\fP command, which is more versatile.
.It Fl k Ar string , Fl \-keyfile Ns = Ns Ar string
path to symmetric keys.
.sp
@@ -867,9 +880,9 @@ A snapshot of this documentation is available in HTML format in
.%O RFC5908
.Re
.Sh "AUTHORS"
-The University of Delaware
+The University of Delaware and Network Time Foundation
.Sh "COPYRIGHT"
-Copyright (C) 1970\-2014 The University of Delaware all rights reserved.
+Copyright (C) 1992\-2015 The University of Delaware and Network Time Foundation all rights reserved.
This program is released under the terms of the NTP license, <http://ntp.org/license>.
.Sh BUGS
The
diff --git a/ntpd/ntpdbase-opts.def b/ntpd/ntpdbase-opts.def
index 110504e..66b9535 100644
--- a/ntpd/ntpdbase-opts.def
+++ b/ntpd/ntpdbase-opts.def
@@ -87,7 +87,7 @@ flag = {
by default.
This is the same operation as the
@code{driftfile} @kbd{driftfile}
- configuration specification in the
+ configuration specification in the
@file{/etc/ntp.conf}
file.
_EndOfDoc_;
@@ -115,6 +115,24 @@ flag = {
};
flag = {
+ name = force_step_once;
+ value = G;
+ descrip = "Step any initial offset correction.";
+ doc = <<- _EndOfDoc_
+ Normally,
+ @code{ntpd}
+ steps the time if the time offset exceeds the step threshold,
+ which is 128 ms by default, and otherwise slews the time.
+ This option forces the initial offset correction to be stepped,
+ so the highest time accuracy can be achieved quickly.
+ However, this may also cause the time to be stepped back
+ so this option must not be used if
+ applications requiring monotonic time are running.
+ See the @code{tinker} configuration file directive for other options.
+ _EndOfDoc_;
+};
+
+flag = {
ifdef = HAVE_DROPROOT;
name = jaildir;
value = i;
@@ -150,7 +168,7 @@ flag = {
given interface name. This option may appear multiple times. This option
also implies not opening other addresses, except wildcard and localhost.
This option is deprecated. Please consider using the configuration file
- @code{interface} command, which is more versatile.
+ @code{interface} command, which is more versatile.
_EndOfDoc_;
};
diff --git a/ntpd/refclock_acts.c b/ntpd/refclock_acts.c
index 36322fd..f62cc46 100644
--- a/ntpd/refclock_acts.c
+++ b/ntpd/refclock_acts.c
@@ -343,7 +343,7 @@ acts_receive(
up->bufptr = up->buf;
acts_message(peer, up->buf);
}
- } else if (!iscntrl(*tptr)) {
+ } else if (!iscntrl((unsigned char)*tptr)) {
*up->bufptr++ = *tptr;
if (*tptr == '*' || *tptr == '#') {
up->tstamp = pp->lastrec;
@@ -515,7 +515,7 @@ acts_timeout(
up->unit);
fd = refclock_open(device, SPEED232, LDISC_ACTS |
LDISC_RAW | LDISC_REMOTE);
- if (fd <= 0) {
+ if (fd < 0) {
msyslog(LOG_ERR, "acts: open fails %m");
return;
}
diff --git a/ntpd/refclock_arc.c b/ntpd/refclock_arc.c
index b2c063e..e5d4cb4 100644
--- a/ntpd/refclock_arc.c
+++ b/ntpd/refclock_arc.c
@@ -843,7 +843,7 @@ send_slow(
static int
get2(char *p, int *val)
{
- if (!isdigit((int)p[0]) || !isdigit((int)p[1])) return 0;
+ if (!isdigit((unsigned char)p[0]) || !isdigit((unsigned char)p[1])) return 0;
*val = (p[0] - '0') * 10 + p[1] - '0';
return 1;
}
@@ -851,7 +851,7 @@ get2(char *p, int *val)
static int
get1(char *p, int *val)
{
- if (!isdigit((int)p[0])) return 0;
+ if (!isdigit((unsigned char)p[0])) return 0;
*val = p[0] - '0';
return 1;
}
@@ -943,7 +943,7 @@ arc_receive(
#ifdef DEBUG
if(debug) { /* Show \r as `R', other non-printing char as `?'. */
printf("arc: stamp -->%c<-- (%d chars rcvd)\n",
- ((c == '\r') ? 'R' : (isgraph((int)c) ? c : '?')),
+ ((c == '\r') ? 'R' : (isgraph((unsigned char)c) ? c : '?')),
rbufp->recv_length);
}
#endif
diff --git a/ntpd/refclock_chu.c b/ntpd/refclock_chu.c
index 9c7093d..6b1ae55 100644
--- a/ntpd/refclock_chu.c
+++ b/ntpd/refclock_chu.c
@@ -967,15 +967,11 @@ chu_serial_receive(
struct recvbuf *rbufp /* receive buffer structure pointer */
)
{
- struct chuunit *up;
- struct refclockproc *pp;
struct peer *peer;
u_char *dpt; /* receive buffer pointer */
peer = rbufp->recv_peer;
- pp = peer->procptr;
- up = pp->unitptr;
dpt = (u_char *)&rbufp->recv_space;
chu_decode(peer, *dpt, rbufp->recv_time);
diff --git a/ntpd/refclock_gpsdjson.c b/ntpd/refclock_gpsdjson.c
index 6150982..2171a4f 100644
--- a/ntpd/refclock_gpsdjson.c
+++ b/ntpd/refclock_gpsdjson.c
@@ -52,7 +52,7 @@
#if defined(HAVE_SYS_POLL_H)
# include <sys/poll.h>
-#elif defined(HAVE_SYS_SLECET_H)
+#elif defined(HAVE_SYS_SELECT_H)
# include <sys/select.h>
#else
# error need poll() or select()
@@ -204,8 +204,8 @@ static int syslogok(clockprocT * const pp, gpsd_unitT * const up);
* data and selecting the GPS device name we created from our unit
* number. [Note: This is a format string!]
*/
-static const char * s_logon =
- "?WATCH={\"enable\":true,\"json\":true,\"device\":\"%s\"};\r\n";
+#define s_logon \
+ "?WATCH={\"enable\":true,\"json\":true,\"device\":\"%s\"};\r\n"
/* We keep a static list of network addresses for 'localhost:gpsd', and
* we try to connect to them in round-robin fashion.
@@ -854,7 +854,7 @@ process_tpv(
const char * gps_time;
int gps_mode;
double ept, epp, epx, epy, epv;
- int log2;
+ int xlog2;
gps_mode = (int)json_object_lookup_int_default(
jctx, 0, "mode", 0);
@@ -920,9 +920,9 @@ process_tpv(
ept = min(ept, epp );
ept = min(ept, 0.5 );
ept = max(ept, 1.0-9);
- ept = frexp(ept, &log2);
+ ept = frexp(ept, &xlog2);
- peer->precision = log2;
+ peer->precision = xlog2;
}
/* ------------------------------------------------------------------ */
@@ -1270,7 +1270,7 @@ convert_ascii_time(
ep = strptime(gps_time, "%Y-%m-%dT%H:%M:%S", &gd);
if (*ep == '.') {
dw = 100000000;
- while (isdigit(*++ep)) {
+ while (isdigit((unsigned char)*++ep)) {
ts.tv_nsec += (*ep - '0') * dw;
dw /= 10;
}
diff --git a/ntpd/refclock_heath.c b/ntpd/refclock_heath.c
index 435d8f6..aed056c 100644
--- a/ntpd/refclock_heath.c
+++ b/ntpd/refclock_heath.c
@@ -379,7 +379,7 @@ heath_receive(
/*
* Determine synchronization and last update
*/
- if (!isdigit((int)dsec))
+ if (!isdigit((unsigned char)dsec))
pp->leap = LEAP_NOTINSYNC;
else {
pp->nsec = (dsec - '0') * 100000000;
diff --git a/ntpd/refclock_hpgps.c b/ntpd/refclock_hpgps.c
index 1d26d25..0b45fc7 100644
--- a/ntpd/refclock_hpgps.c
+++ b/ntpd/refclock_hpgps.c
@@ -156,7 +156,7 @@ hpgps_start(
register struct hpgpsunit *up;
struct refclockproc *pp;
int fd;
- int ldisc;
+ int speed, ldisc;
char device[20];
/*
@@ -165,10 +165,13 @@ hpgps_start(
*/
snprintf(device, sizeof(device), DEVICE, unit);
ldisc = LDISC_CLK;
+ speed = SPEED232;
/* mode parameter to server config line shares ttl slot */
- if (1 == peer->ttl)
+ if (1 == peer->ttl) {
ldisc |= LDISC_7O1;
- fd = refclock_open(device, SPEED232Z, ldisc);
+ speed = SPEED232Z;
+ }
+ fd = refclock_open(device, speed, ldisc);
if (fd <= 0)
return (0);
/*
diff --git a/ntpd/refclock_irig.c b/ntpd/refclock_irig.c
index 46c01fb..abc94f6 100644
--- a/ntpd/refclock_irig.c
+++ b/ntpd/refclock_irig.c
@@ -762,7 +762,7 @@ irig_baud(
* persist for lots of samples.
*/
up->exing = -up->yxing;
- if (fabs(up->envxing - up->envphase) <= 1) {
+ if (abs(up->envxing - up->envphase) <= 1) {
up->tcount++;
if (up->tcount > 20 * up->tc) {
up->tc++;
@@ -980,10 +980,8 @@ irig_poll(
)
{
struct refclockproc *pp;
- struct irigunit *up;
pp = peer->procptr;
- up = pp->unitptr;
if (pp->coderecv == pp->codeproc) {
refclock_report(peer, CEVNT_TIMEOUT);
diff --git a/ntpd/refclock_jjy.c b/ntpd/refclock_jjy.c
index d8ec6b7..e279ee3 100644
--- a/ntpd/refclock_jjy.c
+++ b/ntpd/refclock_jjy.c
@@ -297,9 +297,9 @@ struct refclock refclock_jjy = {
static struct
{
- char commandNumber ;
- char *commandLog ;
- char *command ;
+ const char commandNumber ;
+ const char *commandLog ;
+ const char *command ;
int commandLength ;
} tristate_jjy01_command_sequence[] =
{
@@ -337,8 +337,8 @@ static struct
static struct
{
char commandNumber ;
- char *commandLog ;
- char *command ;
+ const char *commandLog ;
+ const char *command ;
int commandLength ;
} tristate_gpsclock01_command_sequence[] =
{
@@ -741,7 +741,7 @@ static int
jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_tristate_jjy01" ;
+ static const char *sFunctionName = "jjy_receive_tristate_jjy01" ;
#endif
struct jjyunit *up ;
@@ -756,7 +756,7 @@ jjy_receive_tristate_jjy01 ( struct recvbuf *rbufp )
char sLogText [ MAX_LOGTEXT ], sReplyText [ MAX_LOGTEXT ] ;
- char *pCmd ;
+ const char *pCmd ;
int iCmdLen ;
/*
@@ -930,7 +930,7 @@ static int
jjy_receive_cdex_jst2000 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_cdex_jst2000" ;
+ static const char *sFunctionName = "jjy_receive_cdex_jst2000" ;
#endif
struct jjyunit *up ;
@@ -1010,7 +1010,7 @@ static int
jjy_receive_echokeisokuki_lt2000 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_echokeisokuki_lt2000" ;
+ static const char *sFunctionName = "jjy_receive_echokeisokuki_lt2000" ;
#endif
struct jjyunit *up ;
@@ -1052,7 +1052,7 @@ jjy_receive_echokeisokuki_lt2000 ( struct recvbuf *rbufp )
if ( up->operationmode == 1 ) {
#ifdef DEBUG
if ( debug ) {
- printf ( "%s (refclock_jjy.c) : send '#'\n", sFunctionName ) ;
+ printf ( "%s (refclock_jjy.c) : send '#'\n", __func__ ) ;
}
#endif
if ( write ( pp->io.fd, "#",1 ) != 1 ) {
@@ -1169,7 +1169,7 @@ static int
jjy_receive_citizentic_jjy200 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_citizentic_jjy200" ;
+ static const char *sFunctionName = "jjy_receive_citizentic_jjy200" ;
#endif
struct jjyunit *up ;
@@ -1264,7 +1264,7 @@ static int
jjy_receive_tristate_gpsclock01 ( struct recvbuf *rbufp )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_receive_tristate_gpsclock01" ;
+ static const char *sFunctionName = "jjy_receive_tristate_gpsclock01" ;
#endif
struct jjyunit *up ;
@@ -1279,7 +1279,7 @@ jjy_receive_tristate_gpsclock01 ( struct recvbuf *rbufp )
char sLogText [ MAX_LOGTEXT ], sReplyText [ MAX_LOGTEXT ] ;
- char *pCmd ;
+ const char *pCmd ;
int iCmdLen ;
/*
@@ -1519,13 +1519,13 @@ static void
jjy_poll_tristate_jjy01 ( int unit, struct peer *peer )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_poll_tristate_jjy01" ;
+ static const char *sFunctionName = "jjy_poll_tristate_jjy01" ;
#endif
struct jjyunit *up;
struct refclockproc *pp;
- char *pCmd ;
+ const char *pCmd ;
int iCmdLen ;
pp = peer->procptr;
@@ -1641,13 +1641,13 @@ static void
jjy_poll_tristate_gpsclock01 ( int unit, struct peer *peer )
{
#ifdef DEBUG
- static char *sFunctionName = "jjy_poll_tristate_gpsclock01" ;
+ static const char *sFunctionName = "jjy_poll_tristate_gpsclock01" ;
#endif
struct jjyunit *up;
struct refclockproc *pp;
- char *pCmd ;
+ const char *pCmd ;
int iCmdLen ;
pp = peer->procptr;
@@ -1690,7 +1690,7 @@ jjy_poll_tristate_gpsclock01 ( int unit, struct peer *peer )
static void
printableString ( char *sOutput, int iOutputLen, char *sInput, int iInputLen )
{
- char *printableControlChar[] = {
+ const char *printableControlChar[] = {
"<NUL>", "<SOH>", "<STX>", "<ETX>",
"<EOT>", "<ENQ>", "<ACK>", "<BEL>",
"<BS>" , "<HT>" , "<LF>" , "<VT>" ,
@@ -1700,16 +1700,15 @@ printableString ( char *sOutput, int iOutputLen, char *sInput, int iInputLen )
"<CAN>", "<EM>" , "<SUB>", "<ESC>",
"<FS>" , "<GS>" , "<RS>" , "<US>" ,
" " } ;
+
+ size_t i, j, n ;
size_t InputLen;
size_t OutputLen;
- size_t i;
- size_t j;
- size_t n;
InputLen = (size_t)iInputLen;
OutputLen = (size_t)iOutputLen;
for ( i = j = 0 ; i < InputLen && j < OutputLen ; i ++ ) {
- if ( isprint( sInput[i] ) ) {
+ if ( isprint( (unsigned char)sInput[i] ) ) {
n = 1 ;
if ( j + 1 >= OutputLen )
break ;
@@ -1732,7 +1731,7 @@ printableString ( char *sOutput, int iOutputLen, char *sInput, int iInputLen )
j += n ;
}
- sOutput[min(j, iOutputLen - 1)] = '\0' ;
+ sOutput[min(j, (size_t)iOutputLen - 1)] = '\0' ;
}
diff --git a/ntpd/refclock_jupiter.c b/ntpd/refclock_jupiter.c
index 377fc56..02b33df 100644
--- a/ntpd/refclock_jupiter.c
+++ b/ntpd/refclock_jupiter.c
@@ -136,8 +136,8 @@ static int jupiter_config (struct instance *);
static void jupiter_debug (struct peer *, const char *,
const char *, ...)
__attribute__ ((format (printf, 3, 4)));
-static char * jupiter_parse_t (struct instance *, u_short *);
-static char * jupiter_parse_gpos (struct instance *, u_short *);
+static const char * jupiter_parse_t (struct instance *, u_short *);
+static const char * jupiter_parse_gpos (struct instance *, u_short *);
static void jupiter_platform (struct instance *, u_int);
static void jupiter_poll (int, struct peer *);
static void jupiter_control (int, const struct refclockstat *,
@@ -275,7 +275,7 @@ jupiter_shutdown(int unit, struct peer *peer)
static int
jupiter_config(struct instance *instance)
{
- jupiter_debug(instance->peer, "jupiter_config", "init receiver");
+ jupiter_debug(instance->peer, __func__, "init receiver");
/*
* Initialize the unit variables
@@ -283,8 +283,7 @@ jupiter_config(struct instance *instance)
instance->sloppyclockflag = instance->peer->procptr->sloppyclockflag;
instance->moving = !!(instance->sloppyclockflag & CLK_FLAG2);
if (instance->moving)
- jupiter_debug(instance->peer, "jupiter_config",
- "mobile platform");
+ jupiter_debug(instance->peer, __func__, "mobile platform");
instance->pollcnt = 2;
instance->polled = 0;
@@ -368,7 +367,7 @@ jupiter_ppsapi(
#if DEBUG
if (debug) {
time_pps_getparams(instance->pps_handle, &instance->pps_params);
- jupiter_debug(instance->peer, "refclock_jupiter",
+ jupiter_debug(instance->peer, __func__,
"pps capability 0x%x version %d mode 0x%x kern %d",
capability, instance->pps_params.api_version,
instance->pps_params.mode, instance->hardpps);
@@ -498,8 +497,7 @@ jupiter_control(
instance->sloppyclockflag = pp->sloppyclockflag;
if ((instance->sloppyclockflag & CLK_FLAG2) !=
(sloppyclockflag & CLK_FLAG2)) {
- jupiter_debug(peer,
- "jupiter_control",
+ jupiter_debug(peer, __func__,
"mode switch: reset receiver");
jupiter_config(instance);
return;
@@ -513,10 +511,11 @@ jupiter_control(
static void
jupiter_receive(struct recvbuf *rbufp)
{
- int bpcnt, cc, size, ppsret;
+ size_t bpcnt;
+ int cc, size, ppsret;
time_t last_timecode;
u_int32 laststime;
- char *cp;
+ const char *cp;
u_char *bp;
u_short *sp;
struct jid *ip;
@@ -535,7 +534,7 @@ jupiter_receive(struct recvbuf *rbufp)
bpcnt = rbufp->recv_length;
/* This shouldn't happen */
- if (bpcnt > (int)sizeof(instance->sbuf) - instance->ssize)
+ if (bpcnt > sizeof(instance->sbuf) - instance->ssize)
bpcnt = sizeof(instance->sbuf) - instance->ssize;
/* Append to input buffer */
@@ -543,7 +542,7 @@ jupiter_receive(struct recvbuf *rbufp)
instance->ssize += bpcnt;
/* While there's at least a header and we parse an intact message */
- while (instance->ssize > sizeof(*hp) && (cc = jupiter_recv(instance)) > 0) {
+ while (instance->ssize > (int)sizeof(*hp) && (cc = jupiter_recv(instance)) > 0) {
instance->pollcnt = 2;
tstamp = rbufp->recv_time;
@@ -554,8 +553,8 @@ jupiter_receive(struct recvbuf *rbufp)
case JUPITER_O_PULSE:
if (size != sizeof(struct jpulse)) {
- jupiter_debug(peer,
- "jupiter_receive", "pulse: len %d != %u",
+ jupiter_debug(peer, __func__,
+ "pulse: len %d != %u",
size, (int)sizeof(struct jpulse));
refclock_report(peer, CEVNT_BADREPLY);
break;
@@ -574,7 +573,7 @@ jupiter_receive(struct recvbuf *rbufp)
laststime = instance->stime;
instance->stime = DS2UI(((struct jpulse *)sp)->stime);
if (laststime != 0 && instance->stime - laststime <= 21) {
- jupiter_debug(peer, "jupiter_receive",
+ jupiter_debug(peer, __func__,
"avoided firmware bug (stime %.2f, laststime %.2f)",
(double)instance->stime * 0.01, (double)laststime * 0.01);
break;
@@ -595,8 +594,8 @@ jupiter_receive(struct recvbuf *rbufp)
/* Parse timecode (even when there's no pps) */
last_timecode = instance->timecode;
if ((cp = jupiter_parse_t(instance, sp)) != NULL) {
- jupiter_debug(peer,
- "jupiter_receive", "pulse: %s", cp);
+ jupiter_debug(peer, __func__,
+ "pulse: %s", cp);
break;
}
@@ -645,24 +644,24 @@ jupiter_receive(struct recvbuf *rbufp)
case JUPITER_O_GPOS:
if (size != sizeof(struct jgpos)) {
- jupiter_debug(peer,
- "jupiter_receive", "gpos: len %d != %u",
+ jupiter_debug(peer, __func__,
+ "gpos: len %d != %u",
size, (int)sizeof(struct jgpos));
refclock_report(peer, CEVNT_BADREPLY);
break;
}
if ((cp = jupiter_parse_gpos(instance, sp)) != NULL) {
- jupiter_debug(peer,
- "jupiter_receive", "gpos: %s", cp);
+ jupiter_debug(peer, __func__,
+ "gpos: %s", cp);
break;
}
break;
case JUPITER_O_ID:
if (size != sizeof(struct jid)) {
- jupiter_debug(peer,
- "jupiter_receive", "id: len %d != %u",
+ jupiter_debug(peer, __func__,
+ "id: len %d != %u",
size, (int)sizeof(struct jid));
refclock_report(peer, CEVNT_BADREPLY);
break;
@@ -672,8 +671,8 @@ jupiter_receive(struct recvbuf *rbufp)
* just powered instance, it needs to be reconfigured.
*/
ip = (struct jid *)sp;
- jupiter_debug(peer,
- "jupiter_receive", "%s chan ver %s, %s (%s)",
+ jupiter_debug(peer, __func__,
+ "%s chan ver %s, %s (%s)",
ip->chans, ip->vers, ip->date, ip->opts);
msyslog(LOG_DEBUG,
"jupiter_receive: %s chan ver %s, %s (%s)",
@@ -681,8 +680,7 @@ jupiter_receive(struct recvbuf *rbufp)
if (instance->wantid)
instance->wantid = 0;
else {
- jupiter_debug(peer,
- "jupiter_receive", "reset receiver");
+ jupiter_debug(peer, __func__, "reset receiver");
jupiter_config(instance);
/*
* Restore since jupiter_config() just
@@ -693,8 +691,7 @@ jupiter_receive(struct recvbuf *rbufp)
break;
default:
- jupiter_debug(peer,
- "jupiter_receive", "unknown message id %d",
+ jupiter_debug(peer, __func__, "unknown message id %d",
getshort(hp->id));
break;
}
@@ -707,7 +704,7 @@ jupiter_receive(struct recvbuf *rbufp)
}
}
-static char *
+static const char *
jupiter_parse_t(struct instance *instance, u_short *sp)
{
struct tm *tm;
@@ -757,8 +754,8 @@ jupiter_parse_t(struct instance *instance, u_short *sp)
}
else if (sweek == 0 && instance->lastsweek == WEEKSECS - 1) {
++instance->gweek;
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "NEW gps week %u", instance->gweek);
+ jupiter_debug(instance->peer, __func__,
+ "NEW gps week %u", instance->gweek);
}
/*
@@ -774,14 +771,14 @@ jupiter_parse_t(struct instance *instance, u_short *sp)
* Then we warped.
*/
if (instance->lastsweek == sweek)
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "gps sweek not incrementing (%d)",
+ jupiter_debug(instance->peer, __func__,
+ "gps sweek not incrementing (%d)",
sweek);
else if (instance->lastsweek != 2 * WEEKSECS &&
instance->lastsweek + 1 != sweek &&
!(sweek == 0 && instance->lastsweek == WEEKSECS - 1))
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "gps sweek jumped (was %d, now %d)",
+ jupiter_debug(instance->peer, __func__,
+ "gps sweek jumped (was %d, now %d)",
instance->lastsweek, sweek);
instance->lastsweek = sweek;
@@ -792,16 +789,16 @@ jupiter_parse_t(struct instance *instance, u_short *sp)
if (last_timecode == 0)
/* XXX debugging */
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "UTC <none> (gweek/sweek %u/%u)",
+ jupiter_debug(instance->peer, __func__,
+ "UTC <none> (gweek/sweek %u/%u)",
instance->gweek, sweek);
else {
/* XXX debugging */
tm = gmtime(&last_timecode);
cp = asctime(tm);
- jupiter_debug(instance->peer,
- "jupiter_parse_t", "UTC %.24s (gweek/sweek %u/%u)",
+ jupiter_debug(instance->peer, __func__,
+ "UTC %.24s (gweek/sweek %u/%u)",
cp, instance->gweek, sweek);
/* Billboard last_timecode (which is now the current time) */
@@ -829,7 +826,7 @@ jupiter_parse_t(struct instance *instance, u_short *sp)
return (NULL);
}
-static char *
+static const char *
jupiter_parse_gpos(struct instance *instance, u_short *sp)
{
struct jgpos *jg;
@@ -861,8 +858,8 @@ jupiter_parse_gpos(struct instance *instance, u_short *sp)
tm = gmtime(&t);
cp = asctime(tm);
- jupiter_debug(instance->peer,
- "jupiter_parse_g", "GPS %.24s (gweek/sweek %u/%u)",
+ jupiter_debug(instance->peer, __func__,
+ "GPS %.24s (gweek/sweek %u/%u)",
cp, instance->gpos_gweek, instance->gpos_sweek);
return (NULL);
}
@@ -903,7 +900,7 @@ static char *
jupiter_send(struct instance *instance, struct jheader *hp)
{
u_int len, size;
- int cc;
+ ssize_t cc;
u_short *sp;
static char errstr[132];
@@ -921,7 +918,7 @@ jupiter_send(struct instance *instance, struct jheader *hp)
msnprintf(errstr, sizeof(errstr), "write: %m");
return (errstr);
} else if (cc != (int)size) {
- snprintf(errstr, sizeof(errstr), "short write (%d != %u)", cc, size);
+ snprintf(errstr, sizeof(errstr), "short write (%zd != %u)", cc, size);
return (errstr);
}
return (NULL);
@@ -954,7 +951,7 @@ jupiter_reqmsg(struct instance *instance, u_int id,
rp->trigger = putshort(interval == 0);
rp->interval = putshort(interval);
if ((cp = jupiter_send(instance, hp)) != NULL)
- jupiter_debug(instance->peer, "jupiter_reqmsg", "%u: %s", id, cp);
+ jupiter_debug(instance->peer, __func__, "%u: %s", id, cp);
}
/* Cancel periodic message output */
@@ -973,7 +970,7 @@ jupiter_canmsg(struct instance *instance, u_int id)
hp = &canmsg;
hp->id = putshort(id);
if ((cp = jupiter_send(instance, hp)) != NULL)
- jupiter_debug(instance->peer, "jupiter_canmsg", "%u: %s", id, cp);
+ jupiter_debug(instance->peer, __func__, "%u: %s", id, cp);
}
/* Request a single message output */
@@ -992,7 +989,7 @@ jupiter_reqonemsg(struct instance *instance, u_int id)
hp = &reqonemsg;
hp->id = putshort(id);
if ((cp = jupiter_send(instance, hp)) != NULL)
- jupiter_debug(instance->peer, "jupiter_reqonemsg", "%u: %s", id, cp);
+ jupiter_debug(instance->peer, __func__, "%u: %s", id, cp);
}
/* Set the platform dynamics */
@@ -1017,7 +1014,7 @@ jupiter_platform(struct instance *instance, u_int platform)
pp = &platmsg.jplat;
pp->platform = putshort(platform);
if ((cp = jupiter_send(instance, hp)) != NULL)
- jupiter_debug(instance->peer, "jupiter_platform", "%u: %s", platform, cp);
+ jupiter_debug(instance->peer, __func__, "%u: %s", platform, cp);
}
/* Checksum "len" shorts */
@@ -1054,13 +1051,14 @@ jupiter_recv(struct instance *instance)
hp = (struct jheader *)sp;
if (getshort(hp->sync) != JUPITER_SYNC) {
/* Wasn't at the front, sync up */
- jupiter_debug(instance->peer, "jupiter_recv", "syncing");
+ jupiter_debug(instance->peer, __func__, "syncing");
bp = (u_char *)sp;
n = size;
while (n >= 2) {
if (bp[0] != (JUPITER_SYNC & 0xff)) {
/*
- jupiter_debug(instance->peer, "{0x%x}", bp[0]);
+ jupiter_debug(instance->peer, __func__,
+ "{0x%x}", bp[0]);
*/
++bp;
--n;
@@ -1069,13 +1067,14 @@ jupiter_recv(struct instance *instance)
if (bp[1] == ((JUPITER_SYNC >> 8) & 0xff))
break;
/*
- jupiter_debug(instance->peer, "{0x%x 0x%x}", bp[0], bp[1]);
+ jupiter_debug(instance->peer, __func__,
+ "{0x%x 0x%x}", bp[0], bp[1]);
*/
bp += 2;
n -= 2;
}
/*
- jupiter_debug(instance->peer, "\n");
+ jupiter_debug(instance->peer, __func__, "\n");
*/
/* Shuffle data to front of input buffer */
if (n > 0)
@@ -1088,7 +1087,7 @@ jupiter_recv(struct instance *instance)
if (jupiter_cksum(sp, (cc / sizeof(u_short) - 1)) !=
getshort(hp->hsum)) {
- jupiter_debug(instance->peer, "jupiter_recv", "bad header checksum!");
+ jupiter_debug(instance->peer, __func__, "bad header checksum!");
/* This is drastic but checksum errors should be rare */
instance->ssize = 0;
return (0);
@@ -1106,7 +1105,7 @@ jupiter_recv(struct instance *instance)
sp = (u_short *)(hp + 1);
if (jupiter_cksum(sp, len) != getshort(sp[len])) {
jupiter_debug(instance->peer,
- "jupiter_recv", "bad payload checksum!");
+ __func__, "bad payload checksum!");
/* This is drastic but checksum errors should be rare */
instance->ssize = 0;
return (0);
diff --git a/ntpd/refclock_neoclock4x.c b/ntpd/refclock_neoclock4x.c
index a0067e9..6fda0f0 100644
--- a/ntpd/refclock_neoclock4x.c
+++ b/ntpd/refclock_neoclock4x.c
@@ -143,7 +143,7 @@ static void neol_jdn_to_ymd (unsigned long, int *, int *, int *);
static void neol_localtime (unsigned long, int* , int*, int*, int*, int*, int*);
static unsigned long neol_mktime (int, int, int, int, int, int);
#if !defined(NEOCLOCK4X_FIRMWARE)
-static int neol_query_firmware (int, int, char *, int);
+static int neol_query_firmware (int, int, char *, size_t);
static int neol_check_firmware (int, const char*, char *);
#endif
@@ -785,9 +785,9 @@ neol_hexatoi_len(const char str[],
int i;
int n = 0;
- for(i=0; isxdigit((int)str[i]) && i < maxlen; i++)
+ for(i=0; isxdigit((unsigned char)str[i]) && i < maxlen; i++)
{
- hexdigit = isdigit((int)str[i]) ? toupper(str[i]) - '0' : toupper(str[i]) - 'A' + 10;
+ hexdigit = isdigit((unsigned char)str[i]) ? toupper((unsigned char)str[i]) - '0' : toupper((unsigned char)str[i]) - 'A' + 10;
n = 16 * n + hexdigit;
}
*result = n;
@@ -803,7 +803,7 @@ neol_atoi_len(const char str[],
int i;
int n = 0;
- for(i=0; isdigit((int)str[i]) && i < maxlen; i++)
+ for(i=0; isdigit((unsigned char)str[i]) && i < maxlen; i++)
{
digit = str[i] - '0';
n = 10 * n + digit;
@@ -898,10 +898,10 @@ static int
neol_query_firmware(int fd,
int unit,
char *firmware,
- int maxlen)
+ size_t maxlen)
{
char tmpbuf[256];
- int len;
+ size_t len;
int lastsearch;
unsigned char c;
int last_c_was_crlf;
@@ -1001,7 +1001,7 @@ neol_query_firmware(int fd,
tmpbuf[len++] = (char) c;
}
tmpbuf[len] = '\0';
- if(len > sizeof(tmpbuf)-5)
+ if (len > sizeof(tmpbuf)-5)
break;
}
}
diff --git a/ntpd/refclock_nmea.c b/ntpd/refclock_nmea.c
index 58867f4..126b530 100644
--- a/ntpd/refclock_nmea.c
+++ b/ntpd/refclock_nmea.c
@@ -29,6 +29,9 @@
#include <sys/stat.h>
#include <stdio.h>
#include <ctype.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
#include "ntpd.h"
#include "ntp_io.h"
@@ -311,7 +314,7 @@ static int unfold_century (struct calendar * jd, u_int32 rec_ui);
static int gpsfix_century (struct calendar * jd, const gps_weektm * wd,
u_short * ccentury);
static l_fp eval_gps_time (struct peer * peer, const struct calendar * gpst,
- const struct timespec * gpso, const l_fp * recv);
+ const struct timespec * gpso, const l_fp * xrecv);
static int nmead_open (const char * device);
static void save_ltc (struct refclockproc * const, const char * const,
@@ -406,7 +409,7 @@ nmea_start(
size_t devlen;
u_int32 rate;
int baudrate;
- char * baudtext;
+ const char * baudtext;
/* Get baudrate choice from mode byte bits 4/5/6 */
@@ -1145,7 +1148,7 @@ nmea_poll(
*/
if (peer->ttl & NMEA_EXTLOG_MASK) {
/* Log & reset counters with extended logging */
- char *nmea = pp->a_lastcode;
+ const char *nmea = pp->a_lastcode;
if (*nmea == '\0') nmea = "(none)";
mprintf_clock_stats(
&peer->srcadr, "%s %u %u %u %u %u %u",
@@ -1779,7 +1782,7 @@ eval_gps_time(
struct peer * peer, /* for logging etc */
const struct calendar * gpst, /* GPS time stamp */
const struct timespec * tofs, /* GPS frac second & offset */
- const l_fp * recv /* receive time stamp */
+ const l_fp * xrecv /* receive time stamp */
)
{
struct refclockproc * const pp = peer->procptr;
@@ -1835,7 +1838,7 @@ eval_gps_time(
}
/* - get unfold base: day of full recv time - 512 weeks */
- vi64 = ntpcal_ntp_to_ntp(recv->l_ui, NULL);
+ vi64 = ntpcal_ntp_to_ntp(xrecv->l_ui, NULL);
rs64 = ntpcal_daysplit(&vi64);
rcv_sec = rs64.lo;
rcv_day = rs64.hi - 512 * 7;
@@ -1845,7 +1848,7 @@ eval_gps_time(
* fractional day of the receive time, we shift the base day for
* the unfold by 1. */
if ( gps_sec < rcv_sec
- || (gps_sec == rcv_sec && retv.l_uf < recv->l_uf))
+ || (gps_sec == rcv_sec && retv.l_uf < xrecv->l_uf))
rcv_day += 1;
/* - don't warp ahead of GPS invention! */
diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c
index 3bc60bf..30924b8 100644
--- a/ntpd/refclock_oncore.c
+++ b/ntpd/refclock_oncore.c
@@ -328,7 +328,7 @@ struct instance {
u_char printed;
u_char polled;
u_long ev_serial;
- int Rcvptr;
+ unsigned Rcvptr;
u_char Rcvbuf[500];
u_char BEHa[160]; /* Ba, Ea or Ha */
u_char BEHn[80]; /* Bn , En , or Hn */
@@ -436,47 +436,47 @@ static struct msg_desc {
int shmem;
} oncore_messages[] = {
/* Ea and En first since they're most common */
- { "Ea", 76, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdimsdimsdsC" },
- { "Ba", 68, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdsC" },
- { "Ha", 154, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmaaaaoooohhhhmmmmVVvvhhddntimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddssrrccooooTTushmvvvvvvC" },
- { "Bn", 59, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffC" },
- { "En", 69, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffsffffsffffC" },
- { "Hn", 78, oncore_msg_BnEnHn, "" },
- { "Ab", 10, 0, "" },
- { "Ac", 11, 0, "" },
- { "Ad", 11, oncore_msg_Adef, "" },
- { "Ae", 11, oncore_msg_Adef, "" },
- { "Af", 15, oncore_msg_Adef, "" },
- { "Ag", 8, oncore_msg_Ag, "" }, /* Satellite mask angle */
- { "As", 20, oncore_msg_As, "" },
- { "At", 8, oncore_msg_At, "" },
- { "Au", 12, 0, "" },
- { "Av", 8, 0, "" },
- { "Aw", 8, 0, "" },
- { "Ay", 11, oncore_msg_Ay, "" },
- { "Az", 11, oncore_msg_Az, "" },
- { "AB", 8, 0, "" },
- { "Bb", 92, 0, "" },
- { "Bd", 23, oncore_msg_Bd, "" },
- { "Bj", 8, oncore_msg_Bj, "" },
- { "Bl", 41, oncore_msg_Bl, "" },
- { "Ca", 9, oncore_msg_CaFaIa, "" },
- { "Cb", 33, oncore_msg_Cb, "" },
- { "Cf", 7, oncore_msg_Cf, "" },
- { "Cg", 8, 0, "" },
- { "Ch", 9, 0, "" },
- { "Cj", 294, oncore_msg_Cj, "" },
- { "Ek", 71, 0, "" },
- { "Fa", 9, oncore_msg_CaFaIa, "" },
- { "Ga", 20, oncore_msg_Ga, "" },
- { "Gb", 17, oncore_msg_Gb, "" },
- { "Gc", 8, oncore_msg_Gc, "" },
- { "Gd", 8, 0, "" },
- { "Ge", 8, 0, "" },
- { "Gj", 21, oncore_msg_Gj, "" },
- { "Ia", 10, oncore_msg_CaFaIa, "" },
- { "Sz", 8, oncore_msg_Sz, "" },
- { {0}, 7, 0, "" }
+ { "Ea", 76, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdimsdimsdsC", 0 },
+ { "Ba", 68, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmvvhhddtntimsdimsdimsdimsdimsdimsdsC", 0 },
+ { "Ha", 154, oncore_msg_BaEaHa, "mdyyhmsffffaaaaoooohhhhmmmmaaaaoooohhhhmmmmVVvvhhddntimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddimsiddssrrccooooTTushmvvvvvvC", 0 },
+ { "Bn", 59, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffC", 0 },
+ { "En", 69, oncore_msg_BnEnHn, "otaapxxxxxxxxxxpysreensffffsffffsffffsffffsffffsffffsffffsffffC", 0 },
+ { "Hn", 78, oncore_msg_BnEnHn, "", 0 },
+ { "Ab", 10, 0, "", 0 },
+ { "Ac", 11, 0, "", 0 },
+ { "Ad", 11, oncore_msg_Adef, "", 0 },
+ { "Ae", 11, oncore_msg_Adef, "", 0 },
+ { "Af", 15, oncore_msg_Adef, "", 0 },
+ { "Ag", 8, oncore_msg_Ag, "", 0 }, /* Satellite mask angle */
+ { "As", 20, oncore_msg_As, "", 0 },
+ { "At", 8, oncore_msg_At, "", 0 },
+ { "Au", 12, 0, "", 0 },
+ { "Av", 8, 0, "", 0 },
+ { "Aw", 8, 0, "", 0 },
+ { "Ay", 11, oncore_msg_Ay, "", 0 },
+ { "Az", 11, oncore_msg_Az, "", 0 },
+ { "AB", 8, 0, "", 0 },
+ { "Bb", 92, 0, "", 0 },
+ { "Bd", 23, oncore_msg_Bd, "", 0 },
+ { "Bj", 8, oncore_msg_Bj, "", 0 },
+ { "Bl", 41, oncore_msg_Bl, "", 0 },
+ { "Ca", 9, oncore_msg_CaFaIa, "", 0 },
+ { "Cb", 33, oncore_msg_Cb, "", 0 },
+ { "Cf", 7, oncore_msg_Cf, "", 0 },
+ { "Cg", 8, 0, "", 0 },
+ { "Ch", 9, 0, "", 0 },
+ { "Cj", 294, oncore_msg_Cj, "", 0 },
+ { "Ek", 71, 0, "", 0 },
+ { "Fa", 9, oncore_msg_CaFaIa, "", 0 },
+ { "Ga", 20, oncore_msg_Ga, "", 0 },
+ { "Gb", 17, oncore_msg_Gb, "", 0 },
+ { "Gc", 8, oncore_msg_Gc, "", 0 },
+ { "Gd", 8, 0, "", 0 },
+ { "Ge", 8, 0, "", 0 },
+ { "Gj", 21, oncore_msg_Gj, "", 0 },
+ { "Ia", 10, oncore_msg_CaFaIa, "", 0 },
+ { "Sz", 8, oncore_msg_Sz, "", 0 },
+ { {0}, 7, 0, "", 0 }
};
@@ -848,7 +848,7 @@ oncore_ppsapi(
)
{
int cap, mode, mode1;
- char *cp;
+ const char *cp;
if (time_pps_getcap(instance->pps_h, &cap) < 0) {
oncore_log_f(instance, LOG_ERR, "time_pps_getcap failed: %m");
@@ -932,11 +932,11 @@ oncore_init_shmem(
struct instance *instance
)
{
- int i, l, n, fd, shmem_old_size, n1;
+ int l, fd;
u_char *cp, *cp1, *buf, *shmem_old;
struct msg_desc *mp;
struct stat sbuf;
- size_t shmem_length;
+ size_t i, n, n1, shmem_length, shmem_old_size;
/*
* The first thing we do is see if there is an instance->shmem_fname file (still)
@@ -1210,8 +1210,9 @@ oncore_read_config(
*/
FILE *fd;
- char *cp, *cc, *ca, line[100], units[2], device[64], **cpp;
- char *dirs[] = { "/etc/ntp", "/etc", 0 };
+ char *cc, *ca, line[100], units[2], device[64];
+ const char *dirs[] = { "/etc/ntp", "/etc", 0 };
+ const char *cp, **cpp;
int i, sign, lat_flg, long_flg, ht_flg, mode, mask;
double f1, f2, f3;
@@ -1239,19 +1240,20 @@ oncore_read_config(
mode = mask = 0;
lat_flg = long_flg = ht_flg = 0;
while (fgets(line, 100, fd)) {
+ char *cpw;
/* Remove comments */
- if ((cp = strchr(line, '#')))
- *cp = '\0';
+ if ((cpw = strchr(line, '#')))
+ *cpw = '\0';
/* Remove trailing space */
for (i = strlen(line);
- i > 0 && isascii((int)line[i - 1]) && isspace((int)line[i - 1]);
+ i > 0 && isascii((unsigned char)line[i - 1]) && isspace((unsigned char)line[i - 1]);
)
line[--i] = '\0';
/* Remove leading space */
- for (cc = line; *cc && isascii((int)*cc) && isspace((int)*cc); cc++)
+ for (cc = line; *cc && isascii((unsigned char)*cc) && isspace((unsigned char)*cc); cc++)
continue;
/* Stop if nothing left */
@@ -1260,16 +1262,16 @@ oncore_read_config(
/* Uppercase the command and find the arg */
for (ca = cc; *ca; ca++) {
- if (isascii((int)*ca)) {
- if (islower((int)*ca)) {
- *ca = toupper(*ca);
- } else if (isspace((int)*ca) || (*ca == '='))
+ if (isascii((unsigned char)*ca)) {
+ if (islower((unsigned char)*ca)) {
+ *ca = toupper((unsigned char)*ca);
+ } else if (isspace((unsigned char)*ca) || (*ca == '='))
break;
}
}
/* Remove space (and possible =) leading the arg */
- for (; *ca && isascii((int)*ca) && (isspace((int)*ca) || (*ca == '=')); ca++)
+ for (; *ca && isascii((unsigned char)*ca) && (isspace((unsigned char)*ca) || (*ca == '=')); ca++)
continue;
if (!strncmp(cc, "STATUS", (size_t) 6) || !strncmp(cc, "SHMEM", (size_t) 5)) {
@@ -1278,9 +1280,9 @@ oncore_read_config(
}
/* Uppercase argument as well */
- for (cp = ca; *cp; cp++)
- if (isascii((int)*cp) && islower((int)*cp))
- *cp = toupper(*cp);
+ for (cpw = ca; *cpw; cpw++)
+ if (isascii((unsigned char)*cpw) && islower((unsigned char)*cpw))
+ *cpw = toupper((unsigned char)*cpw);
if (!strncmp(cc, "LAT", (size_t) 3)) {
f1 = f2 = f3 = 0;
@@ -1477,8 +1479,7 @@ oncore_consume(
struct instance *instance
)
{
- int i, m;
- unsigned l;
+ unsigned i, m, l;
while (rcvptr >= 7) {
if (rcvbuf[0] != '@' || rcvbuf[1] != '@') {
@@ -1984,7 +1985,7 @@ oncore_msg_Ag(
size_t len
)
{
- char *cp;
+ const char *cp;
cp = "set to";
if (instance->o_state == ONCORE_RUN)
@@ -2503,9 +2504,9 @@ oncore_msg_Bl(
size_t len
)
{
- int chan, id, subframe, valid, page, i, j, tow;
+ int subframe, valid, page, i, j, tow;
int day_now, day_lsf;
- char *cp;
+ const char *cp;
enum {
WARN_NOT_YET,
WARN_0,
@@ -2516,8 +2517,6 @@ oncore_msg_Bl(
day_now = day_lsf = 0;
cp = NULL; /* keep gcc happy */
- chan = buf[4] & 0377;
- id = buf[5] & 0377;
subframe = buf[6] & 017;
valid = (buf[6] >> 4) & 017;
page = buf[7];
@@ -2889,19 +2888,20 @@ oncore_msg_Cj_id(
size_t len
)
{
- char *cp, *cp1, *cp2, Model[21];
+ char *cp2, Model[21];
+ const char *cp, *cp1;
/* Write Receiver ID message to clockstats file */
instance->Cj[294] = '\0';
- for (cp=(char *)instance->Cj; cp< (char *) &instance->Cj[294]; ) {
- cp1 = strchr(cp, '\r');
- if (!cp1)
- cp1 = (char *)&instance->Cj[294];
- *cp1 = '\0';
+ for (cp= (char *)instance->Cj; cp< (char *) &instance->Cj[294]; ) {
+ char *cpw = strchr(cp, '\r');
+ if (!cpw)
+ cpw = (char *)&instance->Cj[294];
+ *cpw = '\0';
oncore_log(instance, LOG_NOTICE, cp);
- *cp1 = '\r';
- cp = cp1+2;
+ *cpw = '\r';
+ cp = cpw+2;
}
/* next, the Firmware Version and Revision numbers */
@@ -2916,7 +2916,7 @@ oncore_msg_Cj_id(
;
cp1 = cp;
cp2 = Model;
- for (; !isspace((int)*cp) && cp-cp1 < 20; cp++, cp2++)
+ for (; !isspace((unsigned char)*cp) && cp-cp1 < 20; cp++, cp2++)
*cp2 = *cp;
*cp2 = '\0';
@@ -3046,7 +3046,7 @@ oncore_msg_Cj_init(
if (mode != 0) {
/* cable delay in ns */
memcpy(Cmd, oncore_cmd_Az, (size_t) sizeof(oncore_cmd_Az));
- w32_buf(&Cmd[-2+4], instance->delay);
+ w32_buf(&Cmd[-2+4], (int)instance->delay);
oncore_sendmsg(instance, Cmd, sizeof(oncore_cmd_Az)); /* 6,8,12 */
/* PPS offset in ns */
@@ -3146,7 +3146,7 @@ oncore_msg_Gb(
size_t len
)
{
- char * gmts;
+ const char * gmts;
int mo, d, y, h, m, s, gmth, gmtm;
mo = buf[4];
@@ -3177,7 +3177,7 @@ oncore_msg_Gc(
size_t len
)
{
- char *tbl[] = {"OFF", "ON", "SATELLITE", "TRAIM" };
+ const char *tbl[] = {"OFF", "ON", "SATELLITE", "TRAIM" };
instance->pps_control_msg_seen = 1;
oncore_log_f(instance, LOG_INFO, "PPS Control set to %s",
@@ -3202,7 +3202,7 @@ oncore_msg_Gj(
};
int dt;
- char *cp;
+ const char *cp;
instance->saw_Gj = 1; /* flag, saw_Gj, dont need to try Bj in check_leap */
@@ -3282,7 +3282,7 @@ oncore_antenna_report(
struct instance *instance,
enum antenna_state new_state)
{
- char *cp;
+ const char *cp;
if (instance->ant_state == new_state)
return;
diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c
index 2b396d8..0520311 100644
--- a/ntpd/refclock_palisade.c
+++ b/ntpd/refclock_palisade.c
@@ -584,7 +584,10 @@ TSIP_decode (
break;
}
- if (up->leap_status & PALISADE_LEAP_PENDING) {
+ up->month = mb(15);
+ if ( (up->leap_status & PALISADE_LEAP_PENDING) &&
+ /* Avoid early announce: https://bugs.ntp.org/2773 */
+ (6 == up->month || 12 == up->month) ) {
if (up->leap_status & PALISADE_UTC_TIME)
pp->leap = LEAP_ADDSECOND;
else
@@ -615,6 +618,7 @@ TSIP_decode (
pp->hour = mb(11);
pp->minute = mb(12);
pp->second = mb(13);
+ up->month = mb(14); /* Save for LEAP check */
#ifdef DEBUG
if (debug > 1)
@@ -645,7 +649,9 @@ TSIP_decode (
printf("TSIP_decode: unit %d\n", up->unit);
}
#endif
- if (getint((u_char *) &mb(10)) & 0x80)
+ if ( (getint((u_char *) &mb(10)) & 0x80) &&
+ /* Avoid early announce: https://bugs.ntp.org/2773 */
+ (6 == up->month || 12 == up->month) )
pp->leap = LEAP_ADDSECOND; /* we ASSUME addsecond */
else
pp->leap = LEAP_NOWARNING;
diff --git a/ntpd/refclock_palisade.h b/ntpd/refclock_palisade.h
index 4f1ab26..3782a5e 100644
--- a/ntpd/refclock_palisade.h
+++ b/ntpd/refclock_palisade.h
@@ -169,6 +169,7 @@ struct palisade_unit {
short rpt_cnt; /* TSIP packet length so far */
char rpt_buf[BMAX]; /* packet assembly buffer */
int type; /* Clock mode type */
+ int month; /* for LEAP filter */
};
/*
diff --git a/ntpd/refclock_parse.c b/ntpd/refclock_parse.c
index 052ec3a..195ec39 100644
--- a/ntpd/refclock_parse.c
+++ b/ntpd/refclock_parse.c
@@ -16,7 +16,7 @@
* SunOS 4.x and SunOS5.x.
*
* Copyright (c) 1995-2009 by Frank Kardel <kardel <AT> ntp.org>
- * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
+ * Copyright (c) 1989-1994 by Frank Kardel, Friedrich-Alexander Universitaet Erlangen-Nuernberg, Germany
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -54,36 +54,36 @@
/*
* This driver currently provides the support for
- * - Meinberg receiver DCF77 PZF 535 (TCXO version) (DCF)
- * - Meinberg receiver DCF77 PZF 535 (OCXO version) (DCF)
- * - Meinberg receiver DCF77 PZF 509 (DCF)
+ * - Meinberg receiver DCF77 PZF535 (TCXO version) (DCF)
+ * - Meinberg receiver DCF77 PZF535 (OCXO version) (DCF)
+ * - Meinberg receiver DCF77 PZF509 (DCF)
* - Meinberg receiver DCF77 AM receivers (e.g. C51) (DCF)
* - IGEL CLOCK (DCF)
* - ELV DCF7000 (DCF)
* - Schmid clock (DCF)
* - Conrad DCF77 receiver module (DCF)
* - FAU DCF77 NTP receiver (TimeBrick) (DCF)
- * - WHARTON 400A Series clock (DCF)
+ * - WHARTON 400A Series clock (DCF)
*
- * - Meinberg GPS166/GPS167 (GPS)
+ * - Meinberg GPS receivers (GPS)
* - Trimble (TSIP and TAIP protocol) (GPS)
*
* - RCC8000 MSF Receiver (MSF)
- * - VARITEXT clock (MSF)
+ * - VARITEXT clock (MSF)
*/
/*
* Meinberg receivers are usually connected via a
- * 9600 baud serial line
+ * 9600/7E1 or 19200/8N1 serial line.
*
* The Meinberg GPS receivers also have a special NTP time stamp
* format. The firmware release is Uni-Erlangen.
*
* Meinberg generic receiver setup:
- * output time code every second
- * Baud rate 9600 7E2S
+ * output time code every second
+ * Baud rate 9600 7E2S
*
- * Meinberg GPS16x setup:
+ * Meinberg GPS receiver setup:
* output time code every second
* Baudrate 19200 8N1
*
@@ -91,7 +91,9 @@
* in Meinberg receivers.
*
* Special software versions are only sensible for the
- * GPS 16x family of receivers.
+ * oldest GPS receiver, GPS16x. For newer receiver types
+ * the output string format can be configured at the device,
+ * and the device name is generally GPSxxx instead of GPS16x.
*
* Meinberg can be reached via: http://www.meinberg.de/
*/
@@ -156,13 +158,13 @@
# endif
#endif
-#define BUFFER_SIZE(_BUF, _PTR) ((_BUF) + sizeof(_BUF) - (_PTR))
-#define BUFFER_SIZES(_BUF, _PTR, _SZ) ((_BUF) + (_SZ) - (_PTR))
+# define BUFFER_SIZE(_BUF, _PTR) ((int)((_BUF) + sizeof(_BUF) - (_PTR)))
+# define BUFFER_SIZES(_BUF, _PTR, _SZ) ((int)((_BUF) + (_SZ) - (_PTR)))
/*
* document type of PPS interfacing - copy of ifdef mechanism in local_input()
*/
-#undef PPS_METHOD
+#undef PPS_METHOD
#ifdef HAVE_PPSAPI
#define PPS_METHOD "PPS API"
@@ -181,6 +183,18 @@
#endif /* TIOCDCDTIMESTAMP */
#endif /* HAVE_PPSAPI */
+/*
+ * COND_DEF can be conditionally defined as DEF or 0. If defined as DEF
+ * then some more parse-specific variables are flagged to be printed with
+ * "ntpq -c cv <assid>". This can be lengthy, so by default COND_DEF
+ * should be defined as 0.
+ */
+#if 0
+# define COND_DEF DEF // enable this for testing
+#else
+# define COND_DEF 0 // enable this by default
+#endif
+
#include "ntp_io.h"
#include "ntp_stdlib.h"
@@ -382,7 +396,7 @@ struct parseunit
* PARSE io
*/
bind_t *binding; /* io handling binding */
-
+
/*
* parse state
*/
@@ -450,23 +464,23 @@ typedef struct poll_info
#define DCF_P_ID "DCFp" /* psuedo random phase shift */
#define GPS_ID "GPS" /* GPS receiver */
-#define NOCLOCK_ROOTDELAY 0.0
-#define NOCLOCK_BASEDELAY 0.0
-#define NOCLOCK_DESCRIPTION 0
+#define NOCLOCK_ROOTDELAY 0.0
+#define NOCLOCK_BASEDELAY 0.0
+#define NOCLOCK_DESCRIPTION 0
#define NOCLOCK_MAXUNSYNC 0
#define NOCLOCK_CFLAG 0
#define NOCLOCK_IFLAG 0
#define NOCLOCK_OFLAG 0
#define NOCLOCK_LFLAG 0
-#define NOCLOCK_ID "TILT"
-#define NOCLOCK_POLL NO_POLL
-#define NOCLOCK_INIT NO_INIT
-#define NOCLOCK_END NO_END
-#define NOCLOCK_DATA NO_LCLDATA
-#define NOCLOCK_FORMAT ""
-#define NOCLOCK_TYPE CTL_SST_TS_UNSPEC
-#define NOCLOCK_SAMPLES 0
-#define NOCLOCK_KEEP 0
+#define NOCLOCK_ID "TILT"
+#define NOCLOCK_POLL NO_POLL
+#define NOCLOCK_INIT NO_INIT
+#define NOCLOCK_END NO_END
+#define NOCLOCK_DATA NO_LCLDATA
+#define NOCLOCK_FORMAT ""
+#define NOCLOCK_TYPE CTL_SST_TS_UNSPEC
+#define NOCLOCK_SAMPLES 0
+#define NOCLOCK_KEEP 0
#define DCF_TYPE CTL_SST_TS_LF
#define GPS_TYPE CTL_SST_TS_UHF
@@ -536,14 +550,14 @@ typedef struct poll_info
#define DCFPZF535OCXO_FORMAT "Meinberg Standard"
/*
- * Meinberg GPS16X receiver
+ * Meinberg GPS receivers
*/
static void gps16x_message (struct parseunit *, parsetime_t *);
static int gps16x_poll_init (struct parseunit *);
#define GPS16X_ROOTDELAY 0.0 /* nothing here */
#define GPS16X_BASEDELAY 0.001968 /* XXX to be fixed ! 1.968ms +- 104us (oscilloscope) - relative to start (end of STX) */
-#define GPS16X_DESCRIPTION "Meinberg GPS16x receiver"
+#define GPS16X_DESCRIPTION "Meinberg GPS receiver"
#define GPS16X_MAXUNSYNC 60*60*96 /* only trust clock for 4 days
* @ 5e-9df/f we have accumulated
* at most an error of 1.73 ms
@@ -745,9 +759,9 @@ static void trimbletsip_event (struct parseunit *, int);
#define TRIMBLETAIP_INIT trimbletaip_init
#define TRIMBLETSIP_INIT trimbletsip_init
-#define TRIMBLETAIP_EVENT trimbletaip_event
+#define TRIMBLETAIP_EVENT trimbletaip_event
-#define TRIMBLETSIP_EVENT trimbletsip_event
+#define TRIMBLETSIP_EVENT trimbletsip_event
#define TRIMBLETSIP_MESSAGE trimbletsip_message
#define TRIMBLETAIP_END 0
@@ -804,7 +818,7 @@ static poll_info_t rcc8000_pollinfo = { RCC_POLLRATE, RCC_POLLCMD, RCC_CMDSIZE }
#define RCC8000_KEEP 3
/*
- * Hopf Radio clock 6021 Format
+ * Hopf Radio clock 6021 Format
*
*/
#define HOPF6021_ROOTDELAY 0.0
@@ -1200,7 +1214,7 @@ static struct parse_clockinfo
},
{ /* mode 12 */
HOPF6021_FLAGS,
- NO_POLL,
+ NO_POLL,
NO_INIT,
NO_EVENT,
NO_END,
@@ -1537,7 +1551,7 @@ clear_err(
{
if (lstate == ERR_ALL)
{
- int i;
+ size_t i;
for (i = 0; i < ERR_CNT; i++)
{
@@ -1576,7 +1590,7 @@ list_err(
if (do_it)
err->err_cnt++;
-
+
if (err->err_stage->err_count &&
(err->err_cnt >= err->err_stage->err_count))
{
@@ -1600,7 +1614,7 @@ list_err(
l_mktime(current_time - err->err_started));
err->err_suppressed = 0;
}
-
+
return do_it;
}
@@ -1638,7 +1652,7 @@ mkreadable(
if (!hex && /* no binary only */
(*src != '\\') && /* no plain \ */
(*src != '"') && /* no " */
- isprint((int)*src)) /* only printables */
+ isprint((unsigned char)*src)) /* only printables */
{ /* they are easy... */
*buffer++ = *src++;
blen--;
@@ -1715,7 +1729,7 @@ static int stream_setfmt (struct parseunit *, parsectl_t *);
static int stream_timecode (struct parseunit *, parsectl_t *);
static void stream_receive (struct recvbuf *);
#endif
-
+
static int local_init (struct parseunit *);
static void local_end (struct parseunit *);
static int local_nop (struct parseunit *);
@@ -1771,6 +1785,16 @@ static bind_t io_bindings[] =
},
{
(char *)0,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
}
};
@@ -1786,7 +1810,7 @@ ppsclock_init(
{
static char m1[] = "ppsclocd";
static char m2[] = "ppsclock";
-
+
/*
* now push the parse streams module
* it will ensure exclusive access to the device
@@ -1875,7 +1899,7 @@ stream_setcs(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_SETCS;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1898,7 +1922,7 @@ stream_enable(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_ENABLE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)0;
@@ -1922,7 +1946,7 @@ stream_disable(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_DISABLE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)0;
@@ -1947,7 +1971,7 @@ stream_getfmt(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_GETFMT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1970,7 +1994,7 @@ stream_setfmt(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_SETFMT;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
@@ -1995,12 +2019,12 @@ stream_timecode(
)
{
struct strioctl strioc;
-
+
strioc.ic_cmd = PARSEIOC_TIMECODE;
strioc.ic_timout = 0;
strioc.ic_dp = (char *)tcl;
strioc.ic_len = sizeof (*tcl);
-
+
if (ioctl(parse->generic->io.fd, I_STR, (caddr_t)&strioc) == -1)
{
ERR(ERR_INTERNAL)
@@ -2035,7 +2059,7 @@ stream_receive(
return;
}
clear_err(parse, ERR_BADIO);
-
+
memmove((caddr_t)&parsetime,
(caddr_t)rbufp->recv_buffer,
sizeof(parsetime_t));
@@ -2201,7 +2225,7 @@ local_input(
{
struct timespec pps_timeout;
pps_info_t pps_info;
-
+
pps_timeout.tv_sec = 0;
pps_timeout.tv_nsec = 0;
@@ -2222,9 +2246,9 @@ local_input(
else
pts = pps_info.assert_timestamp;
- parse->parseio.parse_dtime.parse_ptime.fp.l_ui = pts.tv_sec + JAN_1970;
+ parse->parseio.parse_dtime.parse_ptime.fp.l_ui = (uint32_t) (pts.tv_sec + JAN_1970);
- dtemp = pts.tv_nsec / 1e9;
+ dtemp = (double) pts.tv_nsec / 1e9;
if (dtemp < 0.) {
dtemp += 1;
parse->parseio.parse_dtime.parse_ptime.fp.l_ui--;
@@ -2233,9 +2257,9 @@ local_input(
dtemp -= 1;
parse->parseio.parse_dtime.parse_ptime.fp.l_ui++;
}
- parse->parseio.parse_dtime.parse_ptime.fp.l_uf = dtemp * FRAC;
+ parse->parseio.parse_dtime.parse_ptime.fp.l_uf = (uint32_t)(dtemp * FRAC);
- parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
+ parse->parseio.parse_dtime.parse_state |= PARSEB_PPS|PARSEB_S_PPS;
#ifdef DEBUG
if (debug > 3)
{
@@ -2277,11 +2301,11 @@ local_input(
#else
#ifdef TIOCDCDTIMESTAMP
struct timeval dcd_time;
-
+
if (ioctl(parse->ppsfd, TIOCDCDTIMESTAMP, &dcd_time) != -1)
{
l_fp tstmp;
-
+
TVTOTS(&dcd_time, &tstmp);
tstmp.l_ui += JAN_1970;
L_SUB(&ts.fp, &tstmp);
@@ -2403,7 +2427,7 @@ local_receive(
return;
}
clear_err(parse, ERR_BADIO);
-
+
memmove((caddr_t)&parsetime,
(caddr_t)rbufp->recv_buffer,
sizeof(parsetime_t));
@@ -2452,6 +2476,31 @@ init_iobinding(
** support routines
**/
+static NTP_PRINTF(4, 5) char *
+ap(char *buffer, size_t len, char *pos, const char *fmt, ...)
+{
+ va_list va;
+ int l;
+ size_t rem = len - (pos - buffer);
+
+ if (rem == 0)
+ return pos;
+
+ va_start(va, fmt);
+ l = vsnprintf(pos, rem, fmt, va);
+ va_end(va);
+
+ if (l != -1) {
+ rem--;
+ if (rem >= (size_t)l)
+ pos += l;
+ else
+ pos += rem;
+ }
+
+ return pos;
+}
+
/*--------------------------------------------------
* convert a flag field to a string
*/
@@ -2476,11 +2525,11 @@ parsestate(
{ PARSEB_LEAPADD, "LEAP ADD WARNING" },
{ PARSEB_LEAPDEL, "LEAP DELETE WARNING" },
{ PARSEB_LEAPSECOND, "LEAP SECOND" },
- { PARSEB_ALTERNATE, "ALTERNATE ANTENNA" },
+ { PARSEB_CALLBIT, "CALL BIT" },
{ PARSEB_TIMECODE, "TIME CODE" },
{ PARSEB_PPS, "PPS" },
{ PARSEB_POSITION, "POSITION" },
- { 0 }
+ { 0, NULL }
};
static struct sbits
@@ -2493,12 +2542,11 @@ parsestate(
{ PARSEB_S_PPS, "PPS SIGNAL" },
{ PARSEB_S_ANTENNA, "ANTENNA" },
{ PARSEB_S_POSITION, "POSITION" },
- { 0 }
+ { 0, NULL }
};
int i;
char *s, *t;
-
*buffer = '\0';
s = t = buffer;
@@ -2508,42 +2556,37 @@ parsestate(
if (flagstrings[i].bit & lstate)
{
if (s != t)
- strlcpy(t, "; ", BUFFER_SIZES(buffer, t, size));
- if (strlcat(t, flagstrings[i].name, BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- t += strlen(t);
+ t = ap(buffer, size, t, "; ");
+ t = ap(buffer, size, t, "%s", flagstrings[i].name);
}
i++;
}
if (lstate & (PARSEB_S_LEAP|PARSEB_S_ANTENNA|PARSEB_S_PPS|PARSEB_S_POSITION))
{
- if (s != t &&
- strlcpy(t, "; ", BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- t += strlen(t);
+ if (s != t)
+ t = ap(buffer, size, t, "; ");
+
+ t = ap(buffer, size, t, "(");
- if (strlcpy(t, "(", BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- s = t = t + strlen(t);
+ s = t;
i = 0;
while (sflagstrings[i].bit)
{
if (sflagstrings[i].bit & lstate)
{
- if (t != s &&
- strlcpy(t, "; ", BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- t += 2;
-
- if (strlcpy(t, sflagstrings[i].name, BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- t += strlen(t);
+ if (t != s)
+ {
+ t = ap(buffer, size, t, "; ");
+ }
+
+ t = ap(buffer, size, t, "%s",
+ sflagstrings[i].name);
}
i++;
}
- strlcpy(t, ")", BUFFER_SIZES(buffer, t, size));
+ t = ap(buffer, size, t, ")");
}
return buffer;
}
@@ -2571,10 +2614,12 @@ parsestatus(
{ CVT_BADDATE, "DATE ILLEGAL" },
{ CVT_BADTIME, "TIME ILLEGAL" },
{ CVT_ADDITIONAL, "ADDITIONAL DATA" },
- { 0 }
+ { 0, NULL }
};
int i;
+ char *t;
+ t = buffer;
*buffer = '\0';
i = 0;
@@ -2582,9 +2627,9 @@ parsestatus(
{
if (flagstrings[i].bit & lstate)
{
- if (buffer[0])
- strlcat(buffer, "; ", size);
- strlcat(buffer, flagstrings[i].name, size);
+ if (t != buffer)
+ t = ap(buffer, size, t, "; ");
+ t = ap(buffer, size, t, "%s", flagstrings[i].name);
}
i++;
}
@@ -2614,12 +2659,12 @@ clockstatus(
{ CEVNT_PROP, "PROPAGATION DELAY" },
{ CEVNT_BADDATE, "ILLEGAL DATE" },
{ CEVNT_BADTIME, "ILLEGAL TIME" },
- { (unsigned)~0L }
+ { (unsigned)~0L, NULL }
};
int i;
i = 0;
- while (flagstrings[i].value != ~0)
+ while (flagstrings[i].value != (u_int)~0)
{
if (flagstrings[i].value == lstate)
{
@@ -2647,10 +2692,11 @@ l_mktime(
char *t;
buffer[0] = '\0';
+ t = buffer;
if ((tmp = delta / (60*60*24)) != 0)
{
- snprintf(buffer, BUFFER_SIZE(buffer, buffer), "%ldd+", (u_long)tmp);
+ t = ap(buffer, sizeof(buffer), t, "%ldd+", (u_long)tmp);
delta -= tmp * 60*60*24;
}
@@ -2659,10 +2705,8 @@ l_mktime(
m = delta % 60;
delta /= 60;
- t = buffer + strlen(buffer);
-
- snprintf(t, BUFFER_SIZE(buffer, t), "%02d:%02d:%02d",
- (int)delta, (int)m, (int)s);
+ t = ap(buffer, sizeof(buffer), t, "%02d:%02d:%02d",
+ (int)delta, (int)m, (int)s);
return buffer;
}
@@ -2778,7 +2822,7 @@ parse_shutdown(
{
parse->parse_type->cl_end(parse);
}
-
+
/*
* cleanup before leaving this world
*/
@@ -2791,7 +2835,7 @@ parse_shutdown(
io_closeclock(&parse->generic->io);
free_varlist(parse->kv);
-
+
NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
msyslog(LOG_INFO, "PARSE receiver #%d: reference clock \"%s\" removed",
CLK_UNIT(parse->peer), parse->parse_type->cl_description);
@@ -2817,14 +2861,14 @@ parse_hardpps(
if (CLK_PPS(parse->peer) && (parse->flags & PARSE_PPSKERNEL)) {
int i = 0;
- if (mode == PARSE_HARDPPS_ENABLE)
+ if (mode == PARSE_HARDPPS_ENABLE)
{
if (parse->flags & PARSE_CLEAR)
i = PPS_CAPTURECLEAR;
else
i = PPS_CAPTUREASSERT;
}
-
+
if (time_pps_kcbind(parse->atom.handle, PPS_KC_HARDPPS, i,
PPS_TSFMT_TSPEC) < 0) {
msyslog(LOG_ERR, "PARSE receiver #%d: time_pps_kcbind failed: %m",
@@ -2853,9 +2897,9 @@ parse_ppsapi(
)
{
int cap, mode_ppsoffset;
- char *cp;
-
- parse->flags &= ~PARSE_PPSCLOCK;
+ const char *cp;
+
+ parse->flags &= (u_char) (~PARSE_PPSCLOCK);
/*
* collect PPSAPI offset capability - should move into generic handling
@@ -2863,7 +2907,7 @@ parse_ppsapi(
if (time_pps_getcap(parse->atom.handle, &cap) < 0) {
msyslog(LOG_ERR, "PARSE receiver #%d: parse_ppsapi: time_pps_getcap failed: %m",
CLK_UNIT(parse->peer));
-
+
return 0;
}
@@ -2897,19 +2941,19 @@ parse_ppsapi(
CLK_UNIT(parse->peer), cp, cap);
mode_ppsoffset = 0;
} else {
- if (mode_ppsoffset == PPS_OFFSETCLEAR)
- {
- parse->atom.pps_params.clear_offset.tv_sec = -parse->ppsphaseadjust;
- parse->atom.pps_params.clear_offset.tv_nsec = -1e9*(parse->ppsphaseadjust - (long)parse->ppsphaseadjust);
+ if (mode_ppsoffset == PPS_OFFSETCLEAR)
+ {
+ parse->atom.pps_params.clear_offset.tv_sec = (time_t)(-parse->ppsphaseadjust);
+ parse->atom.pps_params.clear_offset.tv_nsec = (long)(-1e9*(parse->ppsphaseadjust - (double)(long)parse->ppsphaseadjust));
}
-
+
if (mode_ppsoffset == PPS_OFFSETASSERT)
- {
- parse->atom.pps_params.assert_offset.tv_sec = -parse->ppsphaseadjust;
- parse->atom.pps_params.assert_offset.tv_nsec = -1e9*(parse->ppsphaseadjust - (long)parse->ppsphaseadjust);
+ {
+ parse->atom.pps_params.assert_offset.tv_sec = (time_t)(-parse->ppsphaseadjust);
+ parse->atom.pps_params.assert_offset.tv_nsec = (long)(-1e9*(parse->ppsphaseadjust - (double)(long)parse->ppsphaseadjust));
}
}
-
+
parse->atom.pps_params.mode |= mode_ppsoffset;
if (time_pps_setparams(parse->atom.handle, &parse->atom.pps_params) < 0) {
@@ -2961,7 +3005,7 @@ parse_start(
type = CLK_TYPE(peer);
unit = CLK_UNIT(peer);
- if ((type == ~0) || (parse_clockinfo[type].cl_description == (char *)0))
+ if ((type == (u_int)~0) || (parse_clockinfo[type].cl_description == (char *)0))
{
msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: unsupported clock type %d (max %d)",
unit, CLK_REALTYPE(peer), ncltypes-1);
@@ -3013,9 +3057,9 @@ parse_start(
parse->kv = (struct ctl_var *)0;
clear_err(parse, ERR_ALL);
-
+
parse->parse_type = &parse_clockinfo[type];
-
+
parse->maxunsync = parse->parse_type->cl_maxunsync;
parse->generic->fudgetime1 = parse->parse_type->cl_basedelay;
@@ -3028,16 +3072,16 @@ parse_start(
peer->rootdelay = parse->parse_type->cl_rootdelay;
peer->sstclktype = parse->parse_type->cl_type;
peer->precision = sys_precision;
-
+
peer->stratum = STRATUM_REFCLOCK;
if (peer->stratum <= 1)
memmove((char *)&parse->generic->refid, parse->parse_type->cl_id, 4);
else
parse->generic->refid = htonl(PARSEHSREFID);
-
+
parse->generic->io.fd = fd232;
-
+
parse->peer = peer; /* marks it also as busy */
/*
@@ -3080,15 +3124,15 @@ parse_start(
}
#endif
- tio.c_cflag = parse_clockinfo[type].cl_cflag;
- tio.c_iflag = parse_clockinfo[type].cl_iflag;
- tio.c_oflag = parse_clockinfo[type].cl_oflag;
- tio.c_lflag = parse_clockinfo[type].cl_lflag;
-
+ tio.c_cflag = (tcflag_t) parse_clockinfo[type].cl_cflag;
+ tio.c_iflag = (tcflag_t) parse_clockinfo[type].cl_iflag;
+ tio.c_oflag = (tcflag_t) parse_clockinfo[type].cl_oflag;
+ tio.c_lflag = (tcflag_t) parse_clockinfo[type].cl_lflag;
+
#ifdef HAVE_TERMIOS
- if ((cfsetospeed(&tio, parse_clockinfo[type].cl_speed) == -1) ||
- (cfsetispeed(&tio, parse_clockinfo[type].cl_speed) == -1))
+ if ((cfsetospeed(&tio, (speed_t) parse_clockinfo[type].cl_speed) == -1) ||
+ (cfsetispeed(&tio, (speed_t) parse_clockinfo[type].cl_speed) == -1))
{
msyslog(LOG_ERR, "PARSE receiver #%d: parse_start: tcset{i,o}speed(&tio, speed): %m", unit);
parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
@@ -3148,7 +3192,7 @@ parse_start(
if (CLK_PPS(parse->peer))
{
int i = 1;
-
+
if (ioctl(parse->ppsfd, TIOCSPPS, (caddr_t)&i) == 0)
{
parse->flags |= PARSE_PPSCLOCK;
@@ -3187,7 +3231,7 @@ parse_start(
*/
parse->generic->io.srcclock = peer;
parse->generic->io.datalen = 0;
-
+
parse->binding = init_iobinding(parse);
if (parse->binding == (bind_t *)0)
@@ -3234,11 +3278,8 @@ parse_start(
return 0; /* well, ok - special initialisation broke */
}
- tmp_ctl.parseformat.parse_count = strlcpy(tmp_ctl.parseformat.parse_buffer,
- parse->parse_type->cl_format,
- sizeof(tmp_ctl.parseformat.parse_buffer));
- if (tmp_ctl.parseformat.parse_count >= sizeof(tmp_ctl.parseformat.parse_buffer))
- tmp_ctl.parseformat.parse_count = sizeof(tmp_ctl.parseformat.parse_buffer) - 1;
+ strlcpy(tmp_ctl.parseformat.parse_buffer, parse->parse_type->cl_format, sizeof(tmp_ctl.parseformat.parse_buffer));
+ tmp_ctl.parseformat.parse_count = (u_short) strlen(tmp_ctl.parseformat.parse_buffer);
if (!PARSE_SETFMT(parse, &tmp_ctl))
{
@@ -3246,7 +3287,7 @@ parse_start(
parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
return 0; /* well, ok - special initialisation broke */
}
-
+
/*
* get rid of all IO accumulated so far
*/
@@ -3273,7 +3314,7 @@ parse_start(
return 0; /* well, ok - special initialisation broke */
}
}
-
+
/*
* Insert in async io device list.
*/
@@ -3338,8 +3379,8 @@ parse_ctl(
{
if (in->haveflags & (CLK_HAVEFLAG1|CLK_HAVEFLAG2|CLK_HAVEFLAG3|CLK_HAVEFLAG4))
{
- parse->flags = (parse->flags & ~(CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4)) |
- (in->flags & (CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4));
+ u_char mask = CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4;
+ parse->flags = (parse->flags & (u_char)(~mask)) | (in->flags & mask);
#if defined(HAVE_PPSAPI)
if (CLK_PPS(parse->peer))
{
@@ -3347,7 +3388,7 @@ parse_ctl(
}
#endif
}
-
+
if (in->haveflags & CLK_HAVETIME1)
{
parse->generic->fudgetime1 = in->fudgetime1;
@@ -3355,11 +3396,11 @@ parse_ctl(
CLK_UNIT(parse->peer),
parse->generic->fudgetime1);
}
-
+
if (in->haveflags & CLK_HAVETIME2)
{
parse->generic->fudgetime2 = in->fudgetime2;
- if (parse->flags & PARSE_TRUSTTIME)
+ if (parse->flags & PARSE_TRUSTTIME)
{
parse->maxunsync = (u_long)ABS(in->fudgetime2);
msyslog(LOG_INFO, "PARSE receiver #%d: new trust time %s",
@@ -3407,8 +3448,8 @@ parse_poll(
*/
parse->generic->polls++;
- if (parse->pollneeddata &&
- ((current_time - parse->pollneeddata) > (1<<(max(min(parse->peer->hpoll, parse->peer->ppoll), parse->peer->minpoll)))))
+ if (parse->pollneeddata &&
+ ((int)(current_time - parse->pollneeddata) > (1<<(max(min(parse->peer->hpoll, parse->peer->ppoll), parse->peer->minpoll)))))
{
/*
* start worrying when exceeding a poll inteval
@@ -3416,7 +3457,7 @@ parse_poll(
*/
parse->lastmissed = current_time;
parse_event(parse, CEVNT_TIMEOUT);
-
+
ERR(ERR_NODATA)
msyslog(LOG_WARNING, "PARSE receiver #%d: no data from device within poll interval (check receiver / wiring)", CLK_UNIT(parse->peer));
}
@@ -3474,7 +3515,7 @@ parse_control(
* handle changes
*/
parse_ctl(parse, in);
-
+
/*
* supply data
*/
@@ -3521,16 +3562,16 @@ parse_control(
}
start = tt = add_var(&out->kv_list, 128, RO|DEF);
- snprintf(tt, 128, "refclock_time=\"");
- tt += strlen(tt);
+ tt = ap(start, 128, tt, "refclock_time=\"");
if (parse->timedata.parse_time.fp.l_ui == 0)
{
- strlcpy(tt, "<UNDEFINED>\"", BUFFER_SIZES(start, tt, 128));
+ tt = ap(start, 128, tt, "<UNDEFINED>\"");
}
else
{
- snprintf(tt, 128, "%s\"", gmprettydate(&parse->timedata.parse_time.fp));
+ tt = ap(start, 128, tt, "%s\"",
+ gmprettydate(&parse->timedata.parse_time.fp));
}
if (!PARSE_GETTIMECODE(parse, &tmpctl))
@@ -3541,8 +3582,7 @@ parse_control(
else
{
start = tt = add_var(&out->kv_list, 512, RO|DEF);
- snprintf(tt, 512, "refclock_status=\"");
- tt += strlen(tt);
+ tt = ap(start, 512, tt, "refclock_status=\"");
/*
* copy PPS flags from last read transaction (informational only)
@@ -3550,18 +3590,20 @@ parse_control(
tmpctl.parsegettc.parse_state |= parse->timedata.parse_state &
(PARSEB_PPS|PARSEB_S_PPS);
- (void) parsestate(tmpctl.parsegettc.parse_state, tt, BUFFER_SIZES(start, tt, 512));
+ (void)parsestate(tmpctl.parsegettc.parse_state, tt, BUFFER_SIZES(start, tt, 512));
- strlcat(tt, "\"", BUFFER_SIZES(start, tt, 512));
+ tt += strlen(tt);
+
+ tt = ap(start, 512, tt, "\"");
if (tmpctl.parsegettc.parse_count)
mkascii(outstatus+strlen(outstatus), (int)(sizeof(outstatus)- strlen(outstatus) - 1),
tmpctl.parsegettc.parse_buffer, (unsigned)(tmpctl.parsegettc.parse_count));
}
-
+
tmpctl.parseformat.parse_format = tmpctl.parsegettc.parse_format;
-
+
if (!PARSE_GETFMT(parse, &tmpctl))
{
ERR(ERR_INTERNAL)
@@ -3569,11 +3611,19 @@ parse_control(
}
else
{
- tt = add_var(&out->kv_list, 80, RO|DEF);
- snprintf(tt, 80, "refclock_format=\"");
+ int count = tmpctl.parseformat.parse_count - 1;
+
+ start = tt = add_var(&out->kv_list, 80, RO|DEF);
+ tt = ap(start, 80, tt, "refclock_format=\"");
- strlcat(tt, tmpctl.parseformat.parse_buffer, 80);
- strlcat(tt,"\"", 80);
+ if (count > 0) {
+ tt = ap(start, 80, tt, "%*.*s",
+ count,
+ count,
+ tmpctl.parseformat.parse_buffer);
+ }
+
+ tt = ap(start, 80, tt, "\"");
}
/*
@@ -3581,8 +3631,7 @@ parse_control(
*/
start = tt = add_var(&out->kv_list, LEN_STATES, RO|DEF);
- strlcpy(tt, "refclock_states=\"", LEN_STATES);
- tt += strlen(tt);
+ tt = ap(start, LEN_STATES, tt, "refclock_states=\"");
for (i = 0; i <= CEVNT_MAX; i++)
{
@@ -3597,7 +3646,7 @@ parse_control(
percent /= 10;
d /= 10;
}
-
+
if (d)
percent = (percent * 10000) / d;
else
@@ -3607,36 +3656,37 @@ parse_control(
{
char item[80];
int count;
-
+
snprintf(item, 80, "%s%s%s: %s (%d.%02d%%)",
sum ? "; " : "",
(parse->generic->currentstatus == i) ? "*" : "",
clockstatus((unsigned int)i),
l_mktime(s_time),
(int)(percent / 100), (int)(percent % 100));
- if ((count = strlen(item)) < (LEN_STATES - 40 - (tt - start)))
+ if ((count = (int) strlen(item)) < (LEN_STATES - 40 - (tt - start)))
{
- strlcpy(tt, item, BUFFER_SIZES(start, tt, LEN_STATES));
- tt += count;
+ tt = ap(start, LEN_STATES, tt,
+ "%s", item);
}
sum += s_time;
}
}
-
- snprintf(tt, BUFFER_SIZES(start, tt, LEN_STATES), "; running time: %s\"", l_mktime(sum));
-
+
+ tt = ap(start, LEN_STATES, tt,
+ "; running time: %s\"", l_mktime(sum));
+
tt = add_var(&out->kv_list, 32, RO);
snprintf(tt, 32, "refclock_id=\"%s\"", parse->parse_type->cl_id);
-
+
tt = add_var(&out->kv_list, 80, RO);
snprintf(tt, 80, "refclock_iomode=\"%s\"", parse->binding->bd_description);
tt = add_var(&out->kv_list, 128, RO);
snprintf(tt, 128, "refclock_driver_version=\"%s\"", rcsid);
-
+
{
struct ctl_var *k;
-
+
k = parse->kv;
while (k && !(k->flags & EOV))
{
@@ -3644,8 +3694,8 @@ parse_control(
k++;
}
}
-
- out->lencode = strlen(outstatus);
+
+ out->lencode = (u_short) strlen(outstatus);
out->p_lastcode = outstatus;
}
}
@@ -3694,7 +3744,7 @@ parse_process(
{
l_fp off, rectime, reftime;
double fudge;
-
+
/* silence warning: 'off.Ul_i.Xl_i' may be used uninitialized in this function */
ZERO(off);
@@ -3707,11 +3757,11 @@ parse_process(
(parse->timedata.parse_status != parsetime->parse_status))
{
char buffer[400];
-
+
NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
msyslog(LOG_WARNING, "PARSE receiver #%d: conversion status \"%s\"",
CLK_UNIT(parse->peer), parsestatus(parsetime->parse_status, buffer, sizeof(buffer)));
-
+
if ((parsetime->parse_status & CVT_MASK) == CVT_FAIL)
{
/*
@@ -3720,7 +3770,7 @@ parse_process(
* the time code might be overwritten by the next packet
*/
parsectl_t tmpctl;
-
+
if (!PARSE_GETTIMECODE(parse, &tmpctl))
{
ERR(ERR_INTERNAL)
@@ -3758,7 +3808,7 @@ parse_process(
parse->timedata.parse_ptime = parsetime->parse_ptime;
}
break; /* well, still waiting - timeout is handled at higher levels */
-
+
case CVT_FAIL:
if (parsetime->parse_status & CVT_BADFMT)
{
@@ -3789,7 +3839,7 @@ parse_process(
if (parse->lastformat != parsetime->parse_format)
{
parsectl_t tmpctl;
-
+
tmpctl.parseformat.parse_format = parsetime->parse_format;
if (!PARSE_GETFMT(parse, &tmpctl))
@@ -3817,10 +3867,10 @@ parse_process(
/*
* something happend - except for PPS events
*/
-
+
(void) parsestate(parsetime->parse_state, tmp1, sizeof(tmp1));
(void) parsestate(parse->timedata.parse_state, tmp2, sizeof(tmp2));
-
+
NLOG(NLOG_CLOCKINFO) /* conditional if clause for conditional syslog */
msyslog(LOG_INFO,"PARSE receiver #%d: STATE CHANGE: %s -> %s",
CLK_UNIT(parse->peer), tmp2, tmp1);
@@ -3923,12 +3973,12 @@ parse_process(
}
fudge = parse->generic->fudgetime1; /* standard RS232 Fudgefactor */
-
+
if (PARSE_TIMECODE(parsetime->parse_state))
{
rectime = parsetime->parse_stime.fp;
off = reftime = parsetime->parse_time.fp;
-
+
L_SUB(&off, &rectime); /* prepare for PPS adjustments logic */
#ifdef DEBUG
@@ -3973,7 +4023,7 @@ parse_process(
M_ISGEQ(0, 0x7fffffff, off.l_i, off.l_uf))
{
fudge = ppsphaseadjust; /* pick PPS fudge factor */
-
+
/*
* RS232 offsets within [-0.5..0.5[ - take PPS offsets
*/
@@ -3985,12 +4035,12 @@ parse_process(
reftime.l_ui++;
reftime.l_uf = 0;
-
+
/*
* implied on second offset
*/
off.l_uf = ~off.l_uf; /* map [0.5..1[ -> [-0.5..0[ */
- off.l_i = (off.l_uf & 0x8000000) ? -1 : 0; /* sign extend */
+ off.l_i = (off.l_uf & 0x80000000) ? -1 : 0; /* sign extend */
}
else
{
@@ -4051,7 +4101,7 @@ parse_process(
rectime = reftime;
L_SUB(&rectime, &off); /* just to keep the ntp interface happy */
-
+
#ifdef DEBUG
if (debug > 3)
printf("PARSE receiver #%d: calculated Reftime %s, Recvtime %s\n",
@@ -4076,14 +4126,14 @@ parse_process(
clear_err(parse, ERR_BADDATA);
clear_err(parse, ERR_NODATA);
clear_err(parse, ERR_INTERNAL);
-
+
/*
* and now stick it into the clock machine
* samples are only valid iff lastsync is not too old and
* we have seen the clock in sync at least once
* after the last time we didn't see an expected data telegram
* at startup being not in sync is also bad just like
- * POWERUP state unless PARSE_F_POWERUPTRUST is set
+ * POWERUP state unless PARSE_F_POWERUPTRUST is set
* see the clock states section above for more reasoning
*/
if (((current_time - parse->lastsync) > parse->maxunsync) ||
@@ -4123,9 +4173,9 @@ parse_process(
* only good/trusted samples are interesting
*/
#ifdef DEBUG
- if (debug > 2)
- {
- printf("PARSE receiver #%d: refclock_process_offset(reftime=%s, rectime=%s, Fudge=%f)\n",
+ if (debug > 2)
+ {
+ printf("PARSE receiver #%d: refclock_process_offset(reftime=%s, rectime=%s, Fudge=%f)\n",
CLK_UNIT(parse->peer),
prettydate(&reftime),
prettydate(&rectime),
@@ -4133,7 +4183,7 @@ parse_process(
}
#endif
parse->generic->lastref = reftime;
-
+
refclock_process_offset(parse->generic, reftime, rectime, fudge);
#ifdef HAVE_PPSAPI
@@ -4141,31 +4191,18 @@ parse_process(
* pass PPS information on to PPS clock
*/
if (PARSE_PPS(parsetime->parse_state) && CLK_PPS(parse->peer))
- {
- /* refclock_pps includes fudgetime1 - we keep the RS232 offset in there :-( */
- double savedtime1 = parse->generic->fudgetime1;
-
- parse->generic->fudgetime1 = fudge;
-
- if (refclock_pps(parse->peer, &parse->atom,
- parse->flags & (CLK_FLAG1|CLK_FLAG2|CLK_FLAG3|CLK_FLAG4))) {
- parse->peer->flags |= FLAG_PPS;
- } else {
- parse->peer->flags &= ~FLAG_PPS;
- }
-
- parse->generic->fudgetime1 = savedtime1;
-
+ {
+ parse->peer->flags |= (FLAG_PPS | FLAG_TSTAMP_PPS);
parse_hardpps(parse, PARSE_HARDPPS_ENABLE);
}
#endif
} else {
- parse_hardpps(parse, PARSE_HARDPPS_DISABLE);
- parse->peer->flags &= ~FLAG_PPS;
+ parse_hardpps(parse, PARSE_HARDPPS_DISABLE);
+ parse->peer->flags &= ~(FLAG_PPS | FLAG_TSTAMP_PPS);
}
/*
- * ready, unless the machine wants a sample or
+ * ready, unless the machine wants a sample or
* we are in fast startup mode (peer->dist > MAXDISTANCE)
*/
if (!parse->pollneeddata && parse->peer->disp <= MAXDISTANCE)
@@ -4177,56 +4214,71 @@ parse_process(
refclock_receive(parse->peer);
}
-
+
/**===========================================================================
** special code for special clocks
**/
static void
mk_utcinfo(
- char *t,
+ char *t, // pointer to the output string buffer
int wnt,
int wnlsf,
int dn,
int dtls,
int dtlsf,
- int size
+ int size // size of the output string buffer
)
{
- l_fp leapdate;
- char *start = t;
-
- snprintf(t, size, "current correction %d sec", dtls);
- t += strlen(t);
-
- if (wnlsf < 990)
- wnlsf += 1024;
-
- if (wnt < 990)
- wnt += 1024;
-
- gpstolfp((unsigned short)wnlsf, (unsigned short)dn, 0, &leapdate);
-
- if ((dtlsf != dtls) &&
- ((wnlsf - wnt) < 52))
- {
- snprintf(t, BUFFER_SIZES(start, t, size), ", next correction %d sec on %s, new GPS-UTC offset %d",
- dtlsf - dtls, gmprettydate(&leapdate), dtlsf);
- }
- else
- {
- snprintf(t, BUFFER_SIZES(start, t, size), ", last correction on %s",
- gmprettydate(&leapdate));
- }
+ /*
+ * The week number transmitted by the GPS satellites for the leap date
+ * is truncated to 8 bits only. If the nearest leap second date is off
+ * the current date by more than +/- 128 weeks then conversion to a
+ * calendar date is ambiguous. On the other hand, if a leap second is
+ * currently being announced (i.e. dtlsf != dtls) then the week number
+ * wnlsf is close enough, and we can unambiguously determine the date
+ * for which the leap second is scheduled.
+ */
+ if ( dtlsf != dtls )
+ {
+ time_t t_ls;
+ struct tm *tm;
+ int n = 0;
+
+ if (wnlsf < GPSWRAP)
+ wnlsf += GPSWEEKS;
+
+ if (wnt < GPSWRAP)
+ wnt += GPSWEEKS;
+
+ t_ls = (time_t) wnlsf * SECSPERWEEK
+ + (time_t) dn * SECSPERDAY
+ + GPS_SEC_BIAS - 1;
+
+ tm = gmtime( &t_ls );
+ if (tm == NULL) // gmtime() failed
+ {
+ snprintf( t, size, "** (gmtime() failed in mk_utcinfo())" );
+ return;
+ }
+
+ n += snprintf( t, size, "UTC offset transition from %is to %is due to leap second %s",
+ dtls, dtlsf, ( dtls < dtlsf ) ? "insertion" : "deletion" );
+ n += snprintf( t + n, size - n, " at UTC midnight at the end of %s, %04i-%02i-%02i",
+ daynames[tm->tm_wday], tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday );
+ }
+ else
+ snprintf( t, size, "UTC offset parameter: %is, no leap second announced.\n", dtls );
+
}
#ifdef CLOCK_MEINBERG
/**===========================================================================
- ** Meinberg GPS166/GPS167 support
+ ** Meinberg GPS receiver support
**/
/*------------------------------------------------------------
- * gps16x_message - process GPS16x messages
+ * gps16x_message - process messages from Meinberg GPS receiver
*/
static void
gps16x_message(
@@ -4238,12 +4290,12 @@ gps16x_message(
{
GPS_MSG_HDR header;
unsigned char *bufp = (unsigned char *)parsetime->parse_msg + 1;
-
+
#ifdef DEBUG
if (debug > 2)
{
char msgbuffer[600];
-
+
mkreadable(msgbuffer, sizeof(msgbuffer), (char *)parsetime->parse_msg, parsetime->parse_msglen, 1);
printf("PARSE receiver #%d: received message (%d bytes) >%s<\n",
CLK_UNIT(parse->peer),
@@ -4252,21 +4304,21 @@ gps16x_message(
}
#endif
get_mbg_header(&bufp, &header);
- if (header.gps_hdr_csum == mbg_csum(parsetime->parse_msg + 1, 6) &&
- (header.gps_len == 0 ||
- (header.gps_len < sizeof(parsetime->parse_msg) &&
- header.gps_data_csum == mbg_csum(bufp, header.gps_len))))
+ if (header.hdr_csum == mbg_csum(parsetime->parse_msg + 1, 6) &&
+ (header.len == 0 ||
+ (header.len < sizeof(parsetime->parse_msg) &&
+ header.data_csum == mbg_csum(bufp, header.len))))
{
/*
* clean message
*/
- switch (header.gps_cmd)
+ switch (header.cmd)
{
case GPS_SW_REV:
{
char buffer[64];
SW_REV gps_sw_rev;
-
+
get_mbg_sw_rev(&bufp, &gps_sw_rev);
snprintf(buffer, sizeof(buffer), "meinberg_gps_version=\"%x.%02x%s%s\"",
(gps_sw_rev.code >> 8) & 0xFF,
@@ -4277,54 +4329,56 @@ gps16x_message(
}
break;
- case GPS_STAT:
+ case GPS_BVAR_STAT:
{
static struct state
{
- unsigned short flag; /* status flag */
- unsigned const char *string; /* bit name */
+ BVAR_STAT flag; /* status flag */
+ const char *string; /* bit name */
} states[] =
{
- { TM_ANT_DISCONN, (const unsigned char *)"ANTENNA FAULTY" },
- { TM_SYN_FLAG, (const unsigned char *)"NO SYNC SIGNAL" },
- { TM_NO_SYNC, (const unsigned char *)"NO SYNC POWERUP" },
- { TM_NO_POS, (const unsigned char *)"NO POSITION" },
- { 0, (const unsigned char *)"" }
+ { BVAR_CFGH_INVALID, "Configuration/Health" },
+ { BVAR_ALM_NOT_COMPLETE, "Almanachs" },
+ { BVAR_UTC_INVALID, "UTC Correction" },
+ { BVAR_IONO_INVALID, "Ionospheric Correction" },
+ { BVAR_RCVR_POS_INVALID, "Receiver Position" },
+ { 0, "" }
};
- unsigned short status;
+ BVAR_STAT status;
struct state *s = states;
char buffer[512];
char *p, *b;
-
- status = get_lsb_short(&bufp);
- snprintf(buffer, sizeof(buffer), "meinberg_gps_status=\"[0x%04x] ", status);
-
+
+ status = (BVAR_STAT) get_lsb_short(&bufp);
+ p = b = buffer;
+ p = ap(buffer, sizeof(buffer), p,
+ "meinberg_gps_status=\"[0x%04x] ",
+ status);
+
if (status)
{
- p = b = buffer + strlen(buffer);
+ p = ap(buffer, sizeof(buffer), p, "incomplete buffered data: ");
+ b = p;
while (s->flag)
{
if (status & s->flag)
{
if (p != b)
{
- *p++ = ',';
- *p++ = ' ';
+ p = ap(buffer, sizeof(buffer), p, ", ");
}
-
- strlcat(p, (const char *)s->string, sizeof(buffer));
+
+ p = ap(buffer, sizeof(buffer), p, "%s", (const char *)s->string);
}
s++;
}
-
- *p++ = '"';
- *p = '\0';
+ p = ap(buffer, sizeof(buffer), p, "\"");
}
else
{
- strlcat(buffer, "<OK>\"", sizeof(buffer));
+ p = ap(buffer, sizeof(buffer), p, "<all buffered data complete>\"");
}
-
+
set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
}
break;
@@ -4333,282 +4387,259 @@ gps16x_message(
{
XYZ xyz;
char buffer[256];
-
+
get_mbg_xyz(&bufp, xyz);
snprintf(buffer, sizeof(buffer), "gps_position(XYZ)=\"%s m, %s m, %s m\"",
mfptoa(xyz[XP].l_ui, xyz[XP].l_uf, 1),
mfptoa(xyz[YP].l_ui, xyz[YP].l_uf, 1),
mfptoa(xyz[ZP].l_ui, xyz[ZP].l_uf, 1));
-
+
set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_POS_LLA:
{
LLA lla;
char buffer[256];
-
+
get_mbg_lla(&bufp, lla);
-
+
snprintf(buffer, sizeof(buffer), "gps_position(LLA)=\"%s deg, %s deg, %s m\"",
mfptoa(lla[LAT].l_ui, lla[LAT].l_uf, 4),
- mfptoa(lla[LON].l_ui, lla[LON].l_uf, 4),
+ mfptoa(lla[LON].l_ui, lla[LON].l_uf, 4),
mfptoa(lla[ALT].l_ui, lla[ALT].l_uf, 1));
-
+
set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_TZDL:
break;
-
+
case GPS_PORT_PARM:
break;
-
+
case GPS_SYNTH:
break;
-
+
case GPS_ANT_INFO:
{
ANT_INFO antinfo;
char buffer[512];
- char *p;
-
+ char *p, *q;
+
get_mbg_antinfo(&bufp, &antinfo);
- snprintf(buffer, sizeof(buffer), "meinberg_antenna_status=\"");
- p = buffer + strlen(buffer);
-
+ p = buffer;
+ p = ap(buffer, sizeof(buffer), p, "meinberg_antenna_status=\"");
switch (antinfo.status)
{
- case ANT_INVALID:
- strlcat(p, "<OK>", BUFFER_SIZE(buffer, p));
- p += strlen(p);
+ case ANT_INVALID: // No other fields valid since antenna has not yet been disconnected
+ p = ap(buffer, sizeof(buffer),
+ p, "<OK>");
break;
-
- case ANT_DISCONN:
- strlcat(p, "DISCONNECTED since ", BUFFER_SIZE(buffer, p));
+
+ case ANT_DISCONN: // Antenna is disconnected, tm_reconn and delta_t not yet set
+ q = ap(buffer, sizeof(buffer),
+ p, "DISCONNECTED since ");
NLOG(NLOG_CLOCKSTATUS)
ERR(ERR_BADSTATUS)
msyslog(LOG_ERR,"PARSE receiver #%d: ANTENNA FAILURE: %s",
CLK_UNIT(parse->peer), p);
-
- p += strlen(p);
- mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p));
+
+ p = q;
+ mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p), 0);
*p = '\0';
break;
-
- case ANT_RECONN:
- strlcat(p, "RECONNECTED on ", BUFFER_SIZE(buffer, p));
- p += strlen(p);
- mbg_tm_str(&p, &antinfo.tm_reconn, BUFFER_SIZE(buffer, p));
- snprintf(p, BUFFER_SIZE(buffer, p), ", reconnect clockoffset %c%ld.%07ld s, disconnect time ",
+
+ case ANT_RECONN: // Antenna had been disconnect, but receiver sync. after reconnect, so all fields valid
+ p = ap(buffer, sizeof(buffer),
+ p, "SYNC AFTER RECONNECT on ");
+ mbg_tm_str(&p, &antinfo.tm_reconn, BUFFER_SIZE(buffer, p), 0);
+ p = ap(buffer, sizeof(buffer),
+ p, ", clock offset at reconnect %c%ld.%07ld s, disconnect time ",
(antinfo.delta_t < 0) ? '-' : '+',
- ABS(antinfo.delta_t) / 10000,
- ABS(antinfo.delta_t) % 10000);
- p += strlen(p);
- mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p));
+ (long) ABS(antinfo.delta_t) / 10000,
+ (long) ABS(antinfo.delta_t) % 10000);
+ mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p), 0);
*p = '\0';
break;
-
+
default:
- snprintf(p, BUFFER_SIZE(buffer, p), "bad status 0x%04x", antinfo.status);
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer),
+ p, "bad status 0x%04x",
+ antinfo.status);
break;
}
-
- strlcat(p, "\"", BUFFER_SIZE(buffer, p));
-
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
+
+ p = ap(buffer, sizeof(buffer), p, "\"");
+
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_UCAP:
break;
-
+
case GPS_CFGH:
{
CFGH cfgh;
char buffer[512];
char *p;
-
+
get_mbg_cfgh(&bufp, &cfgh);
if (cfgh.valid)
{
+ const char *cp;
+ uint16_t tmp_val;
int i;
-
+
p = buffer;
- strlcpy(buffer, "gps_tot_51=\"", BUFFER_SIZE(buffer, p));
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer),
+ p, "gps_tot_51=\"");
mbg_tgps_str(&p, &cfgh.tot_51, BUFFER_SIZE(buffer, p));
- strlcpy(p, "\"", BUFFER_SIZE(buffer, p));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
-
+ p = ap(buffer, sizeof(buffer),
+ p, "\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
+
p = buffer;
- strlcpy(buffer, "gps_tot_63=\"", BUFFER_SIZE(buffer, p));
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer),
+ p, "gps_tot_63=\"");
mbg_tgps_str(&p, &cfgh.tot_63, BUFFER_SIZE(buffer, p));
- strlcpy(p, "\"", BUFFER_SIZE(buffer, p));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
-
+ p = ap(buffer, sizeof(buffer),
+ p, "\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
+
p = buffer;
- strlcpy(buffer, "gps_t0a=\"", BUFFER_SIZE(buffer, p));
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer),
+ p, "gps_t0a=\"");
mbg_tgps_str(&p, &cfgh.t0a, BUFFER_SIZE(buffer, p));
- strlcpy(p, "\"", BUFFER_SIZE(buffer, p));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
-
- for (i = MIN_SVNO; i < MAX_SVNO; i++)
+ p = ap(buffer, sizeof(buffer),
+ p, "\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
+
+ for (i = 0; i < N_SVNO_GPS; i++)
{
p = buffer;
- snprintf(p, BUFFER_SIZE(buffer, p), "gps_cfg[%d]=\"[0x%x] ", i, cfgh.cfg[i]);
- p += strlen(p);
- switch (cfgh.cfg[i] & 0x7)
- {
- case 0:
- strlcpy(p, "BLOCK I", BUFFER_SIZE(buffer, p));
- break;
- case 1:
- strlcpy(p, "BLOCK II", BUFFER_SIZE(buffer, p));
- break;
- default:
- strlcpy(p, "bad CFG", BUFFER_SIZE(buffer, p));
- break;
- }
- strlcat(p, "\"", BUFFER_SIZE(buffer, p));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
-
- p = buffer;
- snprintf(p, BUFFER_SIZE(buffer, p), "gps_health[%d]=\"[0x%x] ", i, cfgh.health[i]);
- p += strlen(p);
- switch ((cfgh.health[i] >> 5) & 0x7 )
- {
- case 0:
- strlcpy(p, "OK;", BUFFER_SIZE(buffer, p));
- break;
- case 1:
- strlcpy(p, "PARITY;", BUFFER_SIZE(buffer, p));
- break;
- case 2:
- strlcpy(p, "TLM/HOW;", BUFFER_SIZE(buffer, p));
- break;
- case 3:
- strlcpy(p, "Z-COUNT;", BUFFER_SIZE(buffer, p));
- break;
- case 4:
- strlcpy(p, "SUBFRAME 1,2,3;", BUFFER_SIZE(buffer, p));
- break;
- case 5:
- strlcpy(p, "SUBFRAME 4,5;", BUFFER_SIZE(buffer, p));
- break;
- case 6:
- strlcpy(p, "UPLOAD BAD;", BUFFER_SIZE(buffer, p));
- break;
- case 7:
- strlcpy(p, "DATA BAD;", BUFFER_SIZE(buffer, p));
- break;
+ p = ap(buffer, sizeof(buffer), p, "sv_info[%d]=\"PRN%d", i, i + N_SVNO_GPS);
+
+ tmp_val = cfgh.health[i]; /* a 6 bit SV health code */
+ p = ap(buffer, sizeof(buffer), p, "; health=0x%02x (", tmp_val);
+ /* "All Ones" has a special meaning" */
+ if (tmp_val == 0x3F) /* satellite is unusable or doesn't even exist */
+ cp = "SV UNAVAILABLE";
+ else {
+ /* The MSB contains a summary of the 3 MSBs of the 8 bit health code,
+ * indicating if the data sent by the satellite is OK or not. */
+ p = ap(buffer, sizeof(buffer), p, "DATA %s, ", (tmp_val & 0x20) ? "BAD" : "OK" );
+
+ /* The 5 LSBs contain the status of the different signals sent by the satellite. */
+ switch (tmp_val & 0x1F)
+ {
+ case 0x00: cp = "SIGNAL OK"; break;
+ /* codes 0x01 through 0x1B indicate that one or more
+ * specific signal components are weak or dead.
+ * We don't decode this here in detail. */
+ case 0x1C: cp = "SV IS TEMP OUT"; break;
+ case 0x1D: cp = "SV WILL BE TEMP OUT"; break;
+ default: cp = "TRANSMISSION PROBLEMS"; break;
+ }
}
-
- p += strlen(p);
-
- switch (cfgh.health[i] & 0x1F)
+ p = ap(buffer, sizeof(buffer), p, "%s)", cp );
+
+ tmp_val = cfgh.cfg[i]; /* a 4 bit SV configuration/type code */
+ p = ap(buffer, sizeof(buffer), p, "; cfg=0x%02x (", tmp_val);
+ switch (tmp_val & 0x7)
{
- case 0:
- strlcpy(p, "SIGNAL OK", BUFFER_SIZE(buffer, p));
- break;
- case 0x1C:
- strlcpy(p, "SV TEMP OUT", BUFFER_SIZE(buffer, p));
- break;
- case 0x1D:
- strlcpy(p, "SV WILL BE TEMP OUT", BUFFER_SIZE(buffer, p));
- break;
- case 0x1E:
- break;
- case 0x1F:
- strlcpy(p, "MULTIPLE ERRS", BUFFER_SIZE(buffer, p));
- break;
- default:
- strlcpy(p, "TRANSMISSION PROBLEMS", BUFFER_SIZE(buffer, p));
- break;
+ case 0x00: cp = "(reserved)"; break;
+ case 0x01: cp = "BLOCK II/IIA/IIR"; break;
+ case 0x02: cp = "BLOCK IIR-M"; break;
+ case 0x03: cp = "BLOCK IIF"; break;
+ case 0x04: cp = "BLOCK III"; break;
+ default: cp = "unknown SV type"; break;
}
-
- strlcat(p, "\"", sizeof(buffer));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
+ p = ap(buffer, sizeof(buffer), p, "%s", cp );
+ if (tmp_val & 0x08) /* A-S is on, P-code is encrypted */
+ p = ap( buffer, sizeof(buffer), p, ", A-S on" );
+
+ p = ap(buffer, sizeof(buffer), p, ")\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|COND_DEF);
}
}
}
break;
-
+
case GPS_ALM:
break;
-
+
case GPS_EPH:
break;
-
+
case GPS_UTC:
{
UTC utc;
char buffer[512];
char *p;
-
+
p = buffer;
-
+
get_mbg_utc(&bufp, &utc);
-
+
if (utc.valid)
{
- strlcpy(p, "gps_utc_correction=\"", sizeof(buffer));
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer), p, "gps_utc_correction=\"");
mk_utcinfo(p, utc.t0t.wn, utc.WNlsf, utc.DNt, utc.delta_tls, utc.delta_tlsf, BUFFER_SIZE(buffer, p));
- strlcat(p, "\"", BUFFER_SIZE(buffer, p));
+ p += strlen(p);
+ p = ap(buffer, sizeof(buffer), p, "\"");
}
else
{
- strlcpy(p, "gps_utc_correction=\"<NO UTC DATA>\"", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "gps_utc_correction=\"<NO UTC DATA>\"");
}
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
-
+
case GPS_IONO:
break;
-
+
case GPS_ASCII_MSG:
{
ASCII_MSG gps_ascii_msg;
char buffer[128];
-
+
get_mbg_ascii_msg(&bufp, &gps_ascii_msg);
-
+
if (gps_ascii_msg.valid)
{
char buffer1[128];
mkreadable(buffer1, sizeof(buffer1), gps_ascii_msg.s, strlen(gps_ascii_msg.s), (int)0);
-
+
snprintf(buffer, sizeof(buffer), "gps_message=\"%s\"", buffer1);
}
else
- strlcpy(buffer, "gps_message=<NONE>", sizeof(buffer));
-
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
+ snprintf(buffer, sizeof(buffer), "gps_message=<NONE>");
+
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
-
+
break;
-
+
default:
break;
}
}
else
{
- msyslog(LOG_DEBUG, "PARSE receiver #%d: gps16x_message: message checksum error: hdr_csum = 0x%x (expected 0x%lx), data_len = %d, data_csum = 0x%x (expected 0x%lx)",
+ msyslog(LOG_DEBUG, "PARSE receiver #%d: gps16x_message: message checksum error: hdr_csum = 0x%x (expected 0x%x), "
+ "data_len = %d, data_csum = 0x%x (expected 0x%x)",
CLK_UNIT(parse->peer),
- header.gps_hdr_csum, mbg_csum(parsetime->parse_msg + 1, 6),
- header.gps_len,
- header.gps_data_csum, mbg_csum(bufp, (unsigned)((header.gps_len < sizeof(parsetime->parse_msg)) ? header.gps_len : 0)));
+ header.hdr_csum, mbg_csum(parsetime->parse_msg + 1, 6),
+ header.len,
+ header.data_csum, mbg_csum(bufp, (unsigned)((header.len < sizeof(parsetime->parse_msg)) ? header.len : 0)));
}
}
-
+
return;
}
@@ -4621,11 +4652,11 @@ gps16x_poll(
)
{
struct parseunit *parse = peer->procptr->unitptr;
-
- static GPS_MSG_HDR sequence[] =
+
+ static GPS_MSG_HDR sequence[] =
{
{ GPS_SW_REV, 0, 0, 0 },
- { GPS_STAT, 0, 0, 0 },
+ { GPS_BVAR_STAT, 0, 0, 0 },
{ GPS_UTC, 0, 0, 0 },
{ GPS_ASCII_MSG, 0, 0, 0 },
{ GPS_ANT_INFO, 0, 0, 0 },
@@ -4639,41 +4670,41 @@ gps16x_poll(
unsigned char cmd_buffer[64];
unsigned char *outp = cmd_buffer;
GPS_MSG_HDR *header;
-
+
if (((poll_info_t *)parse->parse_type->cl_data)->rate)
{
parse->peer->procptr->nextaction = current_time + ((poll_info_t *)parse->parse_type->cl_data)->rate;
}
- if (sequence[parse->localstate].gps_cmd == (unsigned short)~0)
+ if (sequence[parse->localstate].cmd == (unsigned short)~0)
parse->localstate = 0;
-
+
header = sequence + parse->localstate++;
-
+
*outp++ = SOH; /* start command */
-
+
put_mbg_header(&outp, header);
outp = cmd_buffer + 1;
-
- header->gps_hdr_csum = (short)mbg_csum(outp, 6);
+
+ header->hdr_csum = (short)mbg_csum(outp, 6);
put_mbg_header(&outp, header);
-
+
#ifdef DEBUG
if (debug > 2)
{
char buffer[128];
-
+
mkreadable(buffer, sizeof(buffer), (char *)cmd_buffer, (unsigned)(outp - cmd_buffer), 1);
printf("PARSE receiver #%d: transmitted message #%ld (%d bytes) >%s<\n",
CLK_UNIT(parse->peer),
parse->localstate - 1,
(int)(outp - cmd_buffer),
- buffer);
+ buffer);
}
#endif
-
- rtc = write(parse->generic->io.fd, cmd_buffer, (unsigned long)(outp - cmd_buffer));
-
+
+ rtc = (int) write(parse->generic->io.fd, cmd_buffer, (unsigned long)(outp - cmd_buffer));
+
if (rtc < 0)
{
ERR(ERR_BADIO)
@@ -4722,7 +4753,7 @@ gps16x_poll_init(
return 1;
}
#endif /* CLOCK_MEINBERG */
-
+
/**===========================================================================
** clock polling support
**/
@@ -4735,11 +4766,11 @@ poll_dpoll(
struct parseunit *parse
)
{
- int rtc;
+ long rtc;
const char *ps = ((poll_info_t *)parse->parse_type->cl_data)->string;
- int ct = ((poll_info_t *)parse->parse_type->cl_data)->count;
+ long ct = ((poll_info_t *)parse->parse_type->cl_data)->count;
- rtc = write(parse->generic->io.fd, ps, (unsigned long)ct);
+ rtc = write(parse->generic->io.fd, ps, ct);
if (rtc < 0)
{
ERR(ERR_BADIO)
@@ -4749,7 +4780,7 @@ poll_dpoll(
if (rtc != ct)
{
ERR(ERR_BADIO)
- msyslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd incomplete (%d of %d bytes sent)", CLK_UNIT(parse->peer), rtc, ct);
+ msyslog(LOG_ERR, "PARSE receiver #%d: poll_dpoll: failed to send cmd incomplete (%ld of %ld bytes sent)", CLK_UNIT(parse->peer), rtc, ct);
}
clear_err(parse, ERR_BADIO);
}
@@ -4763,7 +4794,7 @@ poll_poll(
)
{
struct parseunit *parse = peer->procptr->unitptr;
-
+
if (parse->parse_type->cl_poll)
parse->parse_type->cl_poll(parse);
@@ -4789,7 +4820,7 @@ poll_init(
return 0;
}
-
+
/**===========================================================================
** Trimble support
**/
@@ -4819,7 +4850,7 @@ trimbletaip_init(
else
{
tio.c_cc[VEOL] = TRIMBLETAIP_EOL;
-
+
if (TTY_SETATTR(parse->generic->io.fd, &tio) == -1)
{
msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_init: tcsetattr(fd, &tio): %m", CLK_UNIT(parse->peer));
@@ -4838,7 +4869,7 @@ static const char *taipinit[] = {
">FTM00020001<",
(char *)0
};
-
+
static void
trimbletaip_event(
struct parseunit *parse,
@@ -4855,7 +4886,7 @@ trimbletaip_event(
iv = taipinit;
while (*iv)
{
- int rtc = write(parse->generic->io.fd, *iv, strlen(*iv));
+ int rtc = (int) write(parse->generic->io.fd, *iv, strlen(*iv));
if (rtc < 0)
{
msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_event: failed to send cmd to clock: %m", CLK_UNIT(parse->peer));
@@ -4863,7 +4894,7 @@ trimbletaip_event(
}
else
{
- if (rtc != strlen(*iv))
+ if (rtc != (int)strlen(*iv))
{
msyslog(LOG_ERR, "PARSE receiver #%d: trimbletaip_event: failed to send cmd incomplete (%d of %d bytes sent)",
CLK_UNIT(parse->peer), rtc, (int)strlen(*iv));
@@ -4983,19 +5014,19 @@ union uval {
float fv;
double dv;
};
-
+
struct txbuf
{
short idx; /* index to first unused byte */
u_char *txt; /* pointer to actual data buffer */
};
-void sendcmd (struct txbuf *buf, int c);
-void sendbyte (struct txbuf *buf, int b);
-void sendetx (struct txbuf *buf, struct parseunit *parse);
-void sendint (struct txbuf *buf, int a);
-void sendflt (struct txbuf *buf, double a);
-
+void sendcmd (struct txbuf *buf, int c);
+void sendbyte (struct txbuf *buf, int b);
+void sendetx (struct txbuf *buf, struct parseunit *parse);
+void sendint (struct txbuf *buf, int a);
+void sendflt (struct txbuf *buf, double a);
+
void
sendcmd(
struct txbuf *buf,
@@ -5007,12 +5038,12 @@ sendcmd(
buf->idx = 2;
}
-void sendcmd (struct txbuf *buf, int c);
-void sendbyte (struct txbuf *buf, int b);
-void sendetx (struct txbuf *buf, struct parseunit *parse);
-void sendint (struct txbuf *buf, int a);
-void sendflt (struct txbuf *buf, double a);
-
+void sendcmd (struct txbuf *buf, int c);
+void sendbyte (struct txbuf *buf, int b);
+void sendetx (struct txbuf *buf, struct parseunit *parse);
+void sendint (struct txbuf *buf, int a);
+void sendflt (struct txbuf *buf, double a);
+
void
sendbyte(
struct txbuf *buf,
@@ -5044,18 +5075,18 @@ sendetx(
if (debug > 2)
{
char buffer[256];
-
+
mkreadable(buffer, sizeof(buffer), (char *)buf->txt, (unsigned)buf->idx, 1);
printf("PARSE receiver #%d: transmitted message (%d bytes) >%s<\n",
CLK_UNIT(parse->peer),
- buf->idx, buffer);
+ buf->idx, buffer);
}
#endif
clear_err(parse, ERR_BADIO);
}
}
-void
+void
sendint(
struct txbuf *buf,
int a
@@ -5075,7 +5106,7 @@ sendflt(
int i;
union uval uval;
- uval.fv = a;
+ uval.fv = (float) a;
#ifdef WORDS_BIGENDIAN
for (i=0; i<=3; i++)
#else
@@ -5107,12 +5138,12 @@ trimbletsip_setup(
if (t)
t->last_reset = current_time;
-
+
buf.txt = buffer;
-
+
sendcmd(&buf, CMD_CVERSION); /* request software versions */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_COPERPARAM); /* set operating parameters */
sendbyte(&buf, 4); /* static */
sendflt(&buf, 5.0*D2R); /* elevation angle mask = 10 deg XXX */
@@ -5120,25 +5151,25 @@ trimbletsip_setup(
sendflt(&buf, 12.0); /* PDOP mask = 12 */
sendflt(&buf, 8.0); /* PDOP switch level = 8 */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CMODESEL); /* fix mode select */
sendbyte(&buf, 1); /* time transfer mode */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CMESSAGE); /* request system message */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CSUPER); /* superpacket fix */
sendbyte(&buf, 0x2); /* binary mode */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CIOOPTIONS); /* set I/O options */
sendbyte(&buf, TRIM_POS_OPT); /* position output */
sendbyte(&buf, 0x00); /* no velocity output */
sendbyte(&buf, TRIM_TIME_OPT); /* UTC, compute on seconds */
sendbyte(&buf, 0x00); /* no raw measurements */
sendetx(&buf, parse);
-
+
sendcmd(&buf, CMD_CUTCPARAM); /* request UTC correction data */
sendetx(&buf, parse);
@@ -5162,7 +5193,7 @@ trimble_check(
u_char buffer[256];
struct txbuf buf;
buf.txt = buffer;
-
+
if (t)
{
if (current_time > t->last_msg + TRIMBLETSIP_IDLE_TIME)
@@ -5170,18 +5201,18 @@ trimble_check(
}
poll_poll(parse->peer); /* emit query string and re-arm timer */
-
+
if (t && t->qtracking)
{
u_long oldsats = t->ltrack & ~t->ctrack;
-
+
t->qtracking = 0;
t->ltrack = t->ctrack;
-
+
if (oldsats)
{
int i;
-
+
for (i = 0; oldsats; i++) {
if (oldsats & (1 << i))
{
@@ -5192,7 +5223,7 @@ trimble_check(
oldsats &= ~(1 << i);
}
}
-
+
sendcmd(&buf, CMD_CSTATTRACK);
sendbyte(&buf, 0x00); /* current tracking set */
sendetx(&buf, parse);
@@ -5207,7 +5238,7 @@ trimbletsip_end(
struct parseunit *parse
)
{ trimble_t *t = parse->localdata;
-
+
if (t)
{
free(t);
@@ -5238,9 +5269,9 @@ trimbletsip_init(
if (!parse->localdata)
{
trimble_t *t;
-
+
t = (trimble_t *)(parse->localdata = emalloc(sizeof(trimble_t)));
-
+
if (t)
{
memset((char *)t, 0, sizeof(trimble_t));
@@ -5320,7 +5351,7 @@ getflt(
)
{
union uval uval;
-
+
#ifdef WORDS_BIGENDIAN
uval.bd[0] = *bp++;
uval.bd[1] = *bp++;
@@ -5341,7 +5372,7 @@ getdbl(
)
{
union uval uval;
-
+
#ifdef WORDS_BIGENDIAN
uval.bd[0] = *bp++;
uval.bd[1] = *bp++;
@@ -5369,7 +5400,7 @@ getshort(
unsigned char *p
)
{
- return get_msb_short(&p);
+ return (int) get_msb_short(&p);
}
/*--------------------------------------------------
@@ -5386,7 +5417,7 @@ trimbletsip_message(
{
unsigned char *buffer = parsetime->parse_msg;
unsigned int size = parsetime->parse_msglen;
-
+
if ((size < 4) ||
(buffer[0] != DLE) ||
(buffer[size-1] != ETX) ||
@@ -5394,7 +5425,7 @@ trimbletsip_message(
{
#ifdef DEBUG
if (debug > 2) {
- int i;
+ size_t i;
printf("TRIMBLE BAD packet, size %d:\n ", size);
for (i = 0; i < size; i++) {
@@ -5408,16 +5439,16 @@ trimbletsip_message(
}
else
{
- int var_flag;
+ u_short var_flag;
trimble_t *tr = parse->localdata;
unsigned int cmd = buffer[1];
char pbuffer[200];
char *t = pbuffer;
cmd_info_t *s;
-
+
#ifdef DEBUG
if (debug > 3) {
- int i;
+ size_t i;
printf("TRIMBLE packet 0x%02x, size %d:\n ", cmd, size);
for (i = 0; i < size; i++) {
@@ -5430,12 +5461,12 @@ trimbletsip_message(
if (tr)
tr->last_msg = current_time;
-
+
s = trimble_convert(cmd, trimble_rcmds);
-
+
if (s)
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%s=\"", s->varname);
+ t = ap(pbuffer, sizeof(pbuffer), t, "%s=\"", s->varname);
}
else
{
@@ -5443,47 +5474,43 @@ trimbletsip_message(
return;
}
- var_flag = s->varmode;
+ var_flag = (u_short) s->varmode;
- t += strlen(t);
-
switch(cmd)
{
case CMD_RCURTIME:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%f, %d, %f",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%f, %d, %f",
getflt((unsigned char *)&mb(0)), getshort((unsigned char *)&mb(4)),
getflt((unsigned char *)&mb(6)));
break;
-
+
case CMD_RBEST4:
- strlcpy(t, "mode: ", BUFFER_SIZE(pbuffer, t));
- t += strlen(t);
+ t = ap(pbuffer, sizeof(pbuffer), t, "mode: ");
switch (mb(0) & 0xF)
{
default:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "0x%x", mb(0) & 0x7);
+ t = ap(pbuffer, sizeof(pbuffer), t,
+ "0x%x", mb(0) & 0x7);
break;
case 1:
- strlcpy(t, "0D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "0D");
break;
-
+
case 3:
- strlcpy(t, "2D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "2D");
break;
-
+
case 4:
- strlcpy(t, "3D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "3D");
break;
}
- t += strlen(t);
if (mb(0) & 0x10)
- strlcpy(t, "-MANUAL, ", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "-MANUAL, ");
else
- strlcpy(t, "-AUTO, ", BUFFER_SIZE(pbuffer, t));
- t += strlen(t);
-
- snprintf(t, BUFFER_SIZE(pbuffer, t), "satellites %02d %02d %02d %02d, PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f",
+ t = ap(pbuffer, sizeof(pbuffer), t, "-AUTO, ");
+
+ t = ap(pbuffer, sizeof(pbuffer), t, "satellites %02d %02d %02d %02d, PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f",
mb(1), mb(2), mb(3), mb(4),
getflt((unsigned char *)&mb(5)),
getflt((unsigned char *)&mb(9)),
@@ -5491,12 +5518,12 @@ trimbletsip_message(
getflt((unsigned char *)&mb(17)));
break;
-
+
case CMD_RVERSION:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%d.%d (%d/%d/%d)",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%d.%d (%d/%d/%d)",
mb(0)&0xff, mb(1)&0xff, 1900+(mb(4)&0xff), mb(2)&0xff, mb(3)&0xff);
break;
-
+
case CMD_RRECVHEALTH:
{
static const char *msgs[] =
@@ -5510,57 +5537,54 @@ trimbletsip_message(
"<BIT 6>",
"<BIT 7>"
};
-
+
int i, bits;
-
+
switch (mb(0) & 0xFF)
{
default:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "illegal value 0x%02x", mb(0) & 0xFF);
+ t = ap(pbuffer, sizeof(pbuffer), t, "illegal value 0x%02x", mb(0) & 0xFF);
break;
case 0x00:
- strlcpy(t, "doing position fixes", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "doing position fixes");
break;
case 0x01:
- strlcpy(t, "no GPS time yet", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "no GPS time yet");
break;
case 0x03:
- strlcpy(t, "PDOP too high", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "PDOP too high");
break;
case 0x08:
- strlcpy(t, "no usable satellites", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "no usable satellites");
break;
case 0x09:
- strlcpy(t, "only ONE usable satellite", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "only ONE usable satellite");
break;
case 0x0A:
- strlcpy(t, "only TWO usable satellites", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "only TWO usable satellites");
break;
case 0x0B:
- strlcpy(t, "only THREE usable satellites", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "only THREE usable satellites");
break;
case 0x0C:
- strlcpy(t, "the chosen satellite is unusable", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "the chosen satellite is unusable");
break;
}
- t += strlen(t);
-
bits = mb(1) & 0xFF;
-
+
for (i = 0; i < 8; i++)
if (bits & (0x1<<i))
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), ", %s", msgs[i]);
- t += strlen(t);
+ t = ap(pbuffer, sizeof(pbuffer), t, ", %s", msgs[i]);
}
}
break;
-
+
case CMD_RMESSAGE:
mkreadable(t, (int)BUFFER_SIZE(pbuffer, t), (char *)&mb(0), (unsigned)(size - 2 - (&mb(0) - buffer)), 0);
break;
-
+
case CMD_RMACHSTAT:
{
static const char *msgs[] =
@@ -5574,39 +5598,36 @@ trimbletsip_message(
"<BIT 6>",
"<BIT 7>"
};
-
+
int i, bits;
- snprintf(t, BUFFER_SIZE(pbuffer, t), "machine id 0x%02x", mb(0) & 0xFF);
- t += strlen(t);
-
+ t = ap(pbuffer, sizeof(pbuffer), t, "machine id 0x%02x", mb(0) & 0xFF);
bits = mb(1) & 0xFF;
-
+
for (i = 0; i < 8; i++)
if (bits & (0x1<<i))
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), ", %s", msgs[i]);
- t += strlen(t);
+ t = ap(pbuffer, sizeof(pbuffer), t, ", %s", msgs[i]);
}
- snprintf(t, BUFFER_SIZE(pbuffer, t), ", Superpackets %ssupported", (mb(2) & 0xFF) ? "" :"un" );
+ t = ap(pbuffer, sizeof(pbuffer), t, ", Superpackets %ssupported", (mb(2) & 0xFF) ? "" :"un" );
}
break;
-
+
case CMD_ROPERPARAM:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%2x %.1f %.1f %.1f %.1f",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%2x %.1f %.1f %.1f %.1f",
mb(0), getflt((unsigned char *)&mb(1)), getflt((unsigned char *)&mb(5)),
getflt((unsigned char *)&mb(9)), getflt((unsigned char *)&mb(13)));
break;
-
+
case CMD_RUTCPARAM:
{
float t0t = getflt((unsigned char *)&mb(14));
- short wnt = getshort((unsigned char *)&mb(18));
- short dtls = getshort((unsigned char *)&mb(12));
- short wnlsf = getshort((unsigned char *)&mb(20));
- short dn = getshort((unsigned char *)&mb(22));
- short dtlsf = getshort((unsigned char *)&mb(24));
+ short wnt = (short) getshort((unsigned char *)&mb(18));
+ short dtls = (short) getshort((unsigned char *)&mb(12));
+ short wnlsf = (short) getshort((unsigned char *)&mb(20));
+ short dn = (short) getshort((unsigned char *)&mb(22));
+ short dtlsf = (short) getshort((unsigned char *)&mb(24));
if ((int)t0t != 0)
{
@@ -5614,19 +5635,19 @@ trimbletsip_message(
}
else
{
- strlcpy(t, "<NO UTC DATA>", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "<NO UTC DATA>");
}
}
break;
case CMD_RSAT1BIAS:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%.1fm %.2fm/s at %.1fs",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%.1fm %.2fm/s at %.1fs",
getflt(&mb(0)), getflt(&mb(4)), getflt(&mb(8)));
break;
case CMD_RIOOPTIONS:
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%02x %02x %02x %02x",
+ t = ap(pbuffer, sizeof(pbuffer), t, "%02x %02x %02x %02x",
mb(0), mb(1), mb(2), mb(3));
if (mb(0) != TRIM_POS_OPT ||
mb(2) != TRIM_TIME_OPT)
@@ -5635,18 +5656,18 @@ trimbletsip_message(
}
}
break;
-
+
case CMD_RSPOSXYZ:
{
double x = getflt((unsigned char *)&mb(0));
double y = getflt((unsigned char *)&mb(4));
double z = getflt((unsigned char *)&mb(8));
double f = getflt((unsigned char *)&mb(12));
-
+
if (f > 0.0)
- snprintf(t, BUFFER_SIZE(pbuffer, t), "x= %.1fm, y= %.1fm, z= %.1fm, time_of_fix= %f sec",
- x, y, z,
- f);
+ t = ap(pbuffer, sizeof(pbuffer), t, "x= %.1fm, y= %.1fm, z= %.1fm, time_of_fix= %f sec",
+ x, y, z,
+ f);
else
return;
}
@@ -5657,12 +5678,12 @@ trimbletsip_message(
double lat = getflt((unsigned char *)&mb(0));
double lng = getflt((unsigned char *)&mb(4));
double f = getflt((unsigned char *)&mb(12));
-
+
if (f > 0.0)
- snprintf(t, BUFFER_SIZE(pbuffer, t), "lat %f %c, long %f %c, alt %.2fm",
- ((lat < 0.0) ? (-lat) : (lat))*RTOD, (lat < 0.0 ? 'S' : 'N'),
- ((lng < 0.0) ? (-lng) : (lng))*RTOD, (lng < 0.0 ? 'W' : 'E'),
- getflt((unsigned char *)&mb(8)));
+ t = ap(pbuffer, sizeof(pbuffer), t, "lat %f %c, long %f %c, alt %.2fm",
+ ((lat < 0.0) ? (-lat) : (lat))*RTOD, (lat < 0.0 ? 'S' : 'N'),
+ ((lng < 0.0) ? (-lng) : (lng))*RTOD, (lng < 0.0 ? 'W' : 'E'),
+ getflt((unsigned char *)&mb(8)));
else
return;
}
@@ -5673,16 +5694,16 @@ trimbletsip_message(
double x = getdbl((unsigned char *)&mb(0));
double y = getdbl((unsigned char *)&mb(8));
double z = getdbl((unsigned char *)&mb(16));
- snprintf(t, BUFFER_SIZE(pbuffer, t), "x= %.1fm, y= %.1fm, z= %.1fm",
- x, y, z);
+ t = ap(pbuffer, sizeof(pbuffer), t, "x= %.1fm, y= %.1fm, z= %.1fm",
+ x, y, z);
}
break;
-
+
case CMD_RDOUBLELLA:
{
double lat = getdbl((unsigned char *)&mb(0));
double lng = getdbl((unsigned char *)&mb(8));
- snprintf(t, BUFFER_SIZE(pbuffer, t), "lat %f %c, lon %f %c, alt %.2fm",
+ t = ap(pbuffer, sizeof(pbuffer), t, "lat %f %c, lon %f %c, alt %.2fm",
((lat < 0.0) ? (-lat) : (lat))*RTOD, (lat < 0.0 ? 'S' : 'N'),
((lng < 0.0) ? (-lng) : (lng))*RTOD, (lng < 0.0 ? 'W' : 'E'),
getdbl((unsigned char *)&mb(16)));
@@ -5692,44 +5713,39 @@ trimbletsip_message(
case CMD_RALLINVIEW:
{
int i, sats;
-
- strlcpy(t, "mode: ", BUFFER_SIZE(pbuffer, t));
- t += strlen(t);
+
+ t = ap(pbuffer, sizeof(pbuffer), t, "mode: ");
switch (mb(0) & 0x7)
{
default:
- snprintf(t, BUFFER_SIZE(pbuffer, t), "0x%x", mb(0) & 0x7);
+ t = ap(pbuffer, sizeof(pbuffer), t, "0x%x", mb(0) & 0x7);
break;
case 3:
- strlcpy(t, "2D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "2D");
break;
-
+
case 4:
- strlcpy(t, "3D", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "3D");
break;
}
- t += strlen(t);
if (mb(0) & 0x8)
- strlcpy(t, "-MANUAL, ", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "-MANUAL, ");
else
- strlcpy(t, "-AUTO, ", BUFFER_SIZE(pbuffer, t));
- t += strlen(t);
-
+ t = ap(pbuffer, sizeof(pbuffer), t, "-AUTO, ");
+
sats = (mb(0)>>4) & 0xF;
-
- snprintf(t, BUFFER_SIZE(pbuffer, t), "PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f, %d satellite%s in view: ",
+
+ t = ap(pbuffer, sizeof(pbuffer), t, "PDOP %.2f, HDOP %.2f, VDOP %.2f, TDOP %.2f, %d satellite%s in view: ",
getflt((unsigned char *)&mb(1)),
getflt((unsigned char *)&mb(5)),
getflt((unsigned char *)&mb(9)),
getflt((unsigned char *)&mb(13)),
sats, (sats == 1) ? "" : "s");
- t += strlen(t);
for (i=0; i < sats; i++)
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%s%02d", i ? ", " : "", mb(17+i));
- t += strlen(t);
+ t = ap(pbuffer, sizeof(pbuffer), t, "%s%02d", i ? ", " : "", mb(17+i));
if (tr)
tr->ctrack |= (1 << (mb(17+i)-1));
}
@@ -5740,60 +5756,54 @@ trimbletsip_message(
}
}
break;
-
+
case CMD_RSTATTRACK:
{
- snprintf(t-2, BUFFER_SIZE(pbuffer, t-2), "[%02d]=\"", mb(0)); /* add index to var name */
- t += strlen(t);
-
+ t = ap(pbuffer, sizeof(pbuffer), t-2, "[%02d]=\"", mb(0)); /* add index to var name */
if (getflt((unsigned char *)&mb(4)) < 0.0)
{
- strlcpy(t, "<NO MEASUREMENTS>", BUFFER_SIZE(pbuffer, t));
- var_flag &= ~DEF;
+ t = ap(pbuffer, sizeof(pbuffer), t, "<NO MEASUREMENTS>");
+ var_flag &= (u_short)(~DEF);
}
else
- {
- snprintf(t, BUFFER_SIZE(pbuffer, t), "ch=%d, acq=%s, eph=%d, signal_level= %5.2f, elevation= %5.2f, azimuth= %6.2f",
+ {
+ t = ap(pbuffer, sizeof(pbuffer), t, "ch=%d, acq=%s, eph=%d, signal_level= %5.2f, elevation= %5.2f, azimuth= %6.2f",
(mb(1) & 0xFF)>>3,
mb(2) ? ((mb(2) == 1) ? "ACQ" : "SRCH") : "NEVER",
mb(3),
getflt((unsigned char *)&mb(4)),
getflt((unsigned char *)&mb(12)) * RTOD,
getflt((unsigned char *)&mb(16)) * RTOD);
- t += strlen(t);
if (mb(20))
{
- var_flag &= ~DEF;
- strlcpy(t, ", OLD", BUFFER_SIZE(pbuffer, t));
+ var_flag &= (u_short)(~DEF);
+ t = ap(pbuffer, sizeof(pbuffer), t, ", OLD");
}
- t += strlen(t);
if (mb(22))
{
if (mb(22) == 1)
- strlcpy(t, ", BAD PARITY", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, ", BAD PARITY");
else
if (mb(22) == 2)
- strlcpy(t, ", BAD EPH HEALTH", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, ", BAD EPH HEALTH");
}
- t += strlen(t);
if (mb(23))
- strlcpy(t, ", collecting data", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, ", collecting data");
}
}
break;
-
+
default:
- strlcpy(t, "<UNDECODED>", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "<UNDECODED>");
break;
}
- t += strlen(t);
- strlcpy(t,"\"", BUFFER_SIZE(pbuffer, t));
+ t = ap(pbuffer, sizeof(pbuffer), t, "\"");
set_var(&parse->kv, pbuffer, sizeof(pbuffer), var_flag);
}
}
-
+
/**============================================================
** RAWDCF support
**/
diff --git a/ntpd/refclock_pcf.c b/ntpd/refclock_pcf.c
index 4379832..45b3475 100644
--- a/ntpd/refclock_pcf.c
+++ b/ntpd/refclock_pcf.c
@@ -140,7 +140,7 @@ pcf_poll(
pp = peer->procptr;
buf[0] = 0;
- if (read(pp->io.fd, buf, sizeof(buf)) < sizeof(buf) || buf[0] != 9) {
+ if (read(pp->io.fd, buf, sizeof(buf)) < (ssize_t)sizeof(buf) || buf[0] != 9) {
refclock_report(peer, CEVNT_FAULT);
return;
}
diff --git a/ntpd/refclock_ripencc.c b/ntpd/refclock_ripencc.c
index 75d8f38..602ca9d 100644
--- a/ntpd/refclock_ripencc.c
+++ b/ntpd/refclock_ripencc.c
@@ -680,7 +680,7 @@ ripencc_ppsapi(
"refclock_ripencc: time_pps_kcbind failed: %m");
return (0);
}
- pps_enable = 1;
+ hardpps_enable = 1;
}
peer->precision = PPS_PRECISION;
diff --git a/ntpd/refclock_shm.c b/ntpd/refclock_shm.c
index 6540e6f..7174abd 100644
--- a/ntpd/refclock_shm.c
+++ b/ntpd/refclock_shm.c
@@ -51,13 +51,17 @@
#define NSAMPLES 3 /* stages of median filter */
/*
+ * Mode flags
+ */
+#define SHM_MODE_PRIVATE 0x0001
+
+/*
* Function prototypes
*/
static int shm_start (int unit, struct peer *peer);
static void shm_shutdown (int unit, struct peer *peer);
static void shm_poll (int unit, struct peer *peer);
static void shm_timer (int unit, struct peer *peer);
-static void shm_peek (int unit, struct peer *peer);
static void shm_clockstats (int unit, struct peer *peer);
static void shm_control (int unit, const struct refclockstat * in_st,
struct refclockstat * out_st, struct peer *peer);
@@ -100,6 +104,7 @@ struct shmTime {
struct shmunit {
struct shmTime *shm; /* pointer to shared memory segment */
+ int forall; /* access for all UIDs? */
/* debugging/monitoring counters - reset when printed */
int ticks; /* number of attempts to read data*/
@@ -112,76 +117,87 @@ struct shmunit {
time_t max_delay; /* age/stale limit */
};
+static struct shmTime*
+getShmTime(
+ int unit,
+ int/*BOOL*/ forall
+ )
+{
+ struct shmTime *p = NULL;
-struct shmTime *getShmTime(int);
-
-struct shmTime *getShmTime (int unit) {
#ifndef SYS_WINNT
- int shmid=0;
+
+ int shmid;
/* 0x4e545030 is NTP0.
* Big units will give non-ascii but that's OK
* as long as everybody does it the same way.
*/
- shmid=shmget (0x4e545030 + unit, sizeof (struct shmTime),
- IPC_CREAT | ((unit < 2) ? 0600 : 0666));
+ shmid=shmget(0x4e545030 + unit, sizeof (struct shmTime),
+ IPC_CREAT | (forall ? 0666 : 0600));
if (shmid == -1) { /* error */
msyslog(LOG_ERR, "SHM shmget (unit %d): %m", unit);
- return 0;
+ return NULL;
}
- else { /* no error */
- struct shmTime *p = (struct shmTime *)shmat (shmid, 0, 0);
- if (p == (struct shmTime *)-1) { /* error */
- msyslog(LOG_ERR, "SHM shmat (unit %d): %m", unit);
- return 0;
- }
- return p;
+ p = (struct shmTime *)shmat (shmid, 0, 0);
+ if (p == (struct shmTime *)-1) { /* error */
+ msyslog(LOG_ERR, "SHM shmat (unit %d): %m", unit);
+ return NULL;
}
+ return p;
+
#else
- char buf[10];
+
+ static const char * nspref[2] = { "Local", "Global" };
+ char buf[20];
LPSECURITY_ATTRIBUTES psec = 0;
HANDLE shmid = 0;
SECURITY_DESCRIPTOR sd;
SECURITY_ATTRIBUTES sa;
+ unsigned int numch;
- snprintf(buf, sizeof(buf), "NTP%d", unit);
- if (unit >= 2) { /* world access */
+ numch = snprintf(buf, sizeof(buf), "%s\\NTP%d",
+ nspref[forall != 0], (unit & 0xFF));
+ if (numch >= sizeof(buf)) {
+ msyslog(LOG_ERR, "SHM name too long (unit %d)", unit);
+ return NULL;
+ }
+ if (forall) { /* world access */
if (!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION)) {
msyslog(LOG_ERR,"SHM InitializeSecurityDescriptor (unit %d): %m", unit);
- return 0;
+ return NULL;
}
- if (!SetSecurityDescriptorDacl(&sd, 1, 0, 0)) {
+ if (!SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE)) {
msyslog(LOG_ERR, "SHM SetSecurityDescriptorDacl (unit %d): %m", unit);
- return 0;
+ return NULL;
}
- sa.nLength=sizeof (SECURITY_ATTRIBUTES);
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.lpSecurityDescriptor = &sd;
- sa.bInheritHandle = 0;
+ sa.bInheritHandle = FALSE;
psec = &sa;
}
shmid = CreateFileMapping ((HANDLE)0xffffffff, psec, PAGE_READWRITE,
- 0, sizeof (struct shmTime), buf);
- if (!shmid) { /*error*/
- char buf[1000];
-
+ 0, sizeof (struct shmTime), buf);
+ if (shmid == NULL) { /*error*/
+ char buf[1000];
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
0, GetLastError (), 0, buf, sizeof (buf), 0);
msyslog(LOG_ERR, "SHM CreateFileMapping (unit %d): %s", unit, buf);
- return 0;
- } else {
- struct shmTime *p = (struct shmTime *) MapViewOfFile (shmid,
- FILE_MAP_WRITE, 0, 0, sizeof (struct shmTime));
- if (p == 0) { /*error*/
- char buf[1000];
-
- FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
- 0, GetLastError (), 0, buf, sizeof (buf), 0);
- msyslog(LOG_ERR,"SHM MapViewOfFile (unit %d): %s", unit, buf)
- return 0;
- }
- return p;
+ return NULL;
}
+ p = (struct shmTime *)MapViewOfFile(shmid, FILE_MAP_WRITE, 0, 0,
+ sizeof (struct shmTime));
+ if (p == NULL) { /*error*/
+ char buf[1000];
+ FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM,
+ 0, GetLastError (), 0, buf, sizeof (buf), 0);
+ msyslog(LOG_ERR,"SHM MapViewOfFile (unit %d): %s", unit, buf);
+ return NULL;
+ }
+
#endif
+
+ return p;
}
/*
* shm_start - attach to shared memory
@@ -192,18 +208,17 @@ shm_start(
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = emalloc_zero(sizeof(*up));
- pp = peer->procptr;
pp->io.clock_recv = noentry;
pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = -1;
- up = emalloc_zero(sizeof(*up));
+ up->forall = (unit >= 2) && !(peer->ttl & SHM_MODE_PRIVATE);
- up->shm = getShmTime(unit);
+ up->shm = getShmTime(unit, up->forall);
/*
* Initialize miscellaneous peer variables
@@ -243,12 +258,12 @@ shm_control(
struct peer * peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
-
- pp = peer->procptr;
- up = pp->unitptr;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
+ UNUSED_ARG(unit);
+ UNUSED_ARG(in_st);
+ UNUSED_ARG(out_st);
if (NULL == up)
return;
if (pp->sloppyclockflag & CLK_FLAG1)
@@ -269,31 +284,23 @@ shm_shutdown(
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
-
- pp = peer->procptr;
- up = pp->unitptr;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
+ UNUSED_ARG(unit);
if (NULL == up)
return;
#ifndef SYS_WINNT
+
/* HMS: shmdt() wants char* or const void * */
- (void) shmdt ((char *)up->shm);
+ (void)shmdt((char *)up->shm);
+
#else
- UnmapViewOfFile (up->shm);
-#endif
- free(up);
-}
+ UnmapViewOfFile(up->shm);
-/*
- * shm_timer - called every second
- */
-static void
-shm_timer(int unit, struct peer *peer)
-{
- shm_peek(unit, peer);
+#endif
+ free(up);
}
@@ -306,13 +313,10 @@ shm_poll(
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
int major_error;
- pp = peer->procptr;
- up = pp->unitptr;
-
pp->polls++;
/* get dominant reason if we have no samples at all */
@@ -345,16 +349,18 @@ shm_poll(
}
/*
- * shm_peek - try to grab a sample
+ * shm_timer - called onece every second.
+ *
+ * This tries to grab a sample from the SHM segment
*/
static void
-shm_peek(
+shm_timer(
int unit,
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
/* access order is important for lock-free SHM access; we
** enforce order by treating the whole structure volatile.
@@ -383,19 +389,16 @@ shm_peek(
* This is the main routine. It snatches the time from the shm
* board and tacks on a local timestamp.
*/
- pp = peer->procptr;
- up = pp->unitptr;
up->ticks++;
- if (up->shm == 0) {
+ if ((shm = up->shm) == NULL) {
/* try to map again - this may succeed if meanwhile some-
body has ipcrm'ed the old (unaccessible) shared mem segment */
- up->shm = getShmTime(unit);
- }
- shm = up->shm;
- if (shm == 0) {
- DPRINTF(1, ("%s: no SHM segment\n",
- refnumtoa(&peer->srcadr)));
- return;
+ shm = up->shm = getShmTime(unit, up->forall);
+ if (shm == NULL) {
+ DPRINTF(1, ("%s: no SHM segment\n",
+ refnumtoa(&peer->srcadr)));
+ return;
+ }
}
if ( ! shm->valid) {
DPRINTF(1, ("%s: SHM not ready\n",
@@ -542,28 +545,17 @@ static void shm_clockstats(
struct peer *peer
)
{
- struct refclockproc *pp;
- struct shmunit *up;
- char logbuf[64];
- unsigned int llen;
-
- pp = peer->procptr;
- up = pp->unitptr;
+ struct refclockproc * const pp = peer->procptr;
+ struct shmunit * const up = pp->unitptr;
+ UNUSED_ARG(unit);
if (pp->sloppyclockflag & CLK_FLAG4) {
- /* if snprintf() returns a negative values on errors
- ** (some older ones do) make sure we are NUL
- ** terminated. Using an unsigned result does the trick.
- */
- llen = snprintf(logbuf, sizeof(logbuf),
- "%3d %3d %3d %3d %3d",
- up->ticks, up->good, up->notready,
- up->bad, up->clash);
- logbuf[min(llen, sizeof(logbuf)-1)] = '\0';
- record_clock_stats(&peer->srcadr, logbuf);
+ mprintf_clock_stats(
+ &peer->srcadr, "%3d %3d %3d %3d %3d",
+ up->ticks, up->good, up->notready,
+ up->bad, up->clash);
}
up->ticks = up->good = up->notready = up->bad = up->clash = 0;
-
}
#else
diff --git a/ntpd/refclock_true.c b/ntpd/refclock_true.c
index 36ade81..7a5c491 100644
--- a/ntpd/refclock_true.c
+++ b/ntpd/refclock_true.c
@@ -215,6 +215,7 @@ struct refclock refclock_true = {
#if !defined(__STDC__)
# define true_debug (void)
#else
+NTP_PRINTF(2, 3)
static void
true_debug(struct peer *peer, const char *fmt, ...)
{
diff --git a/ntpd/refclock_wwv.c b/ntpd/refclock_wwv.c
index 14183b4..79c0afd 100644
--- a/ntpd/refclock_wwv.c
+++ b/ntpd/refclock_wwv.c
@@ -1338,7 +1338,7 @@ wwv_qrz(
if (sp->reach & (1 << AMAX))
sp->count--;
if (sp->synmax > ATHR && sp->synsnr > ASNR) {
- if (abs(epoch) < AWND * MS) {
+ if (labs(epoch) < AWND * MS) {
sp->reach |= 1;
sp->count++;
sp->mepoch = sp->lastpos = sp->pos;
@@ -1540,14 +1540,14 @@ wwv_endpoc(
*/
dtemp = (mepoch - zepoch) % WWV_SEC;
if (up->status & FGATE) {
- if (abs(dtemp) < MAXFREQ * MINAVG) {
+ if (fabs(dtemp) < MAXFREQ * MINAVG) {
up->freq += (dtemp / 2.) / ((mcount - zcount) *
FCONST);
if (up->freq > MAXFREQ)
up->freq = MAXFREQ;
else if (up->freq < -MAXFREQ)
up->freq = -MAXFREQ;
- if (abs(dtemp) < MAXFREQ * MINAVG / 2.) {
+ if (fabs(dtemp) < MAXFREQ * MINAVG / 2.) {
if (avginc < 3) {
avginc++;
} else {