summaryrefslogtreecommitdiff
path: root/ntpd
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2015-02-05 20:53:33 +0000
committerCy Schubert <cy@FreeBSD.org>2015-02-05 20:53:33 +0000
commitf7cba3a80d9ebefc57776fffd17a4ae68f72e494 (patch)
treedc1c5074828f0c5fafe2fb8f5599339dfdc5bc97 /ntpd
parent44a728f815af203cd7a91db83b06325818433463 (diff)
Notes
Diffstat (limited to 'ntpd')
-rw-r--r--ntpd/Makefile.am2
-rw-r--r--ntpd/Makefile.in8
-rw-r--r--ntpd/invoke-ntp.conf.texi16
-rw-r--r--ntpd/invoke-ntp.keys.texi2
-rw-r--r--ntpd/invoke-ntpd.texi4
-rw-r--r--ntpd/keyword-gen-utd2
-rw-r--r--ntpd/keyword-gen.c3
-rw-r--r--ntpd/ntp.conf.5man25
-rw-r--r--ntpd/ntp.conf.5mdoc22
-rw-r--r--ntpd/ntp.conf.def14
-rw-r--r--ntpd/ntp.conf.html15
-rw-r--r--ntpd/ntp.conf.man.in25
-rw-r--r--ntpd/ntp.conf.mdoc.in22
-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.c46
-rw-r--r--ntpd/ntp_control.c159
-rw-r--r--ntpd/ntp_crypto.c141
-rw-r--r--ntpd/ntp_filegen.c2
-rw-r--r--ntpd/ntp_io.c113
-rw-r--r--ntpd/ntp_keyword.h1183
-rw-r--r--ntpd/ntp_leapsec.c5
-rw-r--r--ntpd/ntp_loopfilter.c52
-rw-r--r--ntpd/ntp_parser.c2007
-rw-r--r--ntpd/ntp_parser.h402
-rw-r--r--ntpd/ntp_parser.y3
-rw-r--r--ntpd/ntp_proto.c27
-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.c500
-rw-r--r--ntpd/ntpd-opts.h10
-rw-r--r--ntpd/ntpd.1ntpdman10
-rw-r--r--ntpd/ntpd.1ntpdmdoc8
-rw-r--r--ntpd/ntpd.c8
-rw-r--r--ntpd/ntpd.html4
-rw-r--r--ntpd/ntpd.man.in10
-rw-r--r--ntpd/ntpd.mdoc.in8
-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_irig.c4
-rw-r--r--ntpd/refclock_jjy.c45
-rw-r--r--ntpd/refclock_jupiter.c109
-rw-r--r--ntpd/refclock_mx4200.c6
-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_parse.c456
-rw-r--r--ntpd/refclock_pcf.c2
-rw-r--r--ntpd/refclock_shm.c200
-rw-r--r--ntpd/refclock_true.c1
-rw-r--r--ntpd/refclock_wwv.c6
59 files changed, 3125 insertions, 2868 deletions
diff --git a/ntpd/Makefile.am b/ntpd/Makefile.am
index b3af52738c12..344ac8eb2ce7 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 ae050114fd53..5ba1cbf6c2ad 100644
--- a/ntpd/Makefile.in
+++ b/ntpd/Makefile.in
@@ -158,8 +158,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) \
@@ -256,6 +255,7 @@ CHUTEST = @CHUTEST@
CONFIG_SHELL = @CONFIG_SHELL@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_LIBEVENT = @CPPFLAGS_LIBEVENT@
CPPFLAGS_NTP = @CPPFLAGS_NTP@
CXX = @CXX@
CXXCPP = @CXXCPP@
@@ -290,7 +290,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@
@@ -537,7 +539,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/invoke-ntp.conf.texi b/ntpd/invoke-ntp.conf.texi
index 2678c189270e..23569fc52f6f 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 19, 2014 at 07:49:02 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed February 4, 2015 at 02:41:59 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
diff --git a/ntpd/invoke-ntp.keys.texi b/ntpd/invoke-ntp.keys.texi
index c8dc904d122a..dbafe1c733e9 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 19, 2014 at 07:49:05 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed February 4, 2015 at 02:42:02 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 e59b72f785eb..75a525702309 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 19, 2014 at 07:49:06 AM by AutoGen 5.18.5pre4
+# It has been AutoGen-ed February 4, 2015 at 02:42:04 AM by AutoGen 5.18.5pre4
# From the definitions ntpd-opts.def
# and the template file agtexi-cmd.tpl
@end ignore
@@ -141,7 +141,7 @@ with a status code of 0.
@exampleindent 0
@example
-ntpd - NTP daemon program - Ver. 4.2.8
+ntpd - NTP daemon program - Ver. 4.2.8p1
Usage: ntpd [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]... \
[ <server1> ... <serverN> ]
Flg Arg Option-Name Description
diff --git a/ntpd/keyword-gen-utd b/ntpd/keyword-gen-utd
index 7474a56ed7b6..0485feecca0c 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-01-03 23:51:10 UTC diff_ignore_line
diff --git a/ntpd/keyword-gen.c b/ntpd/keyword-gen.c
index d4f77588d60c..bb593aba2e20 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 },
@@ -357,7 +358,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 95e9348cc55b..1e9ba668fe4d 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 "19 Dec 2014" "4.2.8" "File Formats"
+.TH ntp.conf 5man "04 Feb 2015" "4.2.8p1" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-eCaa6b/ag-rCai4b)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-sPaOCn/ag-RPaGBn)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:48:49 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:41:46 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
@@ -2974,9 +2989,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 3358d0c0b066..069a543cf2ea 100644
--- a/ntpd/ntp.conf.5mdoc
+++ b/ntpd/ntp.conf.5mdoc
@@ -1,9 +1,9 @@
-.Dd December 19 2014
+.Dd February 4 2015
.Dt NTP_CONF 5mdoc File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:49:09 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:42:07 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
@@ -2784,9 +2798,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 5a5af21f21d0..6f0bae12b3f5 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
diff --git a/ntpd/ntp.conf.html b/ntpd/ntp.conf.html
index a57560a9a21e..b237cc025085 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.8 of <code>ntp.conf</code>.
+ <p>This document applies to version 4.2.8p1 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>
diff --git a/ntpd/ntp.conf.man.in b/ntpd/ntp.conf.man.in
index eff1e4347ce6..ec2c866c750a 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 "19 Dec 2014" "4.2.8" "File Formats"
+.TH ntp.conf 5 "04 Feb 2015" "4.2.8p1" "File Formats"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-eCaa6b/ag-rCai4b)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-sPaOCn/ag-RPaGBn)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:48:49 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:41:46 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
@@ -2974,9 +2989,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 01e5901b321c..ec45a749c3a0 100644
--- a/ntpd/ntp.conf.mdoc.in
+++ b/ntpd/ntp.conf.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 19 2014
+.Dd February 4 2015
.Dt NTP_CONF 5 File Formats
.Os
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:49:09 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:42:07 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
@@ -2784,9 +2798,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 e6e57f7f0205..7ba8b5815f04 100644
--- a/ntpd/ntp.keys.5man
+++ b/ntpd/ntp.keys.5man
@@ -1,8 +1,8 @@
-.TH ntp.keys 5man "19 Dec 2014" "4.2.8" "File Formats"
+.TH ntp.keys 5man "04 Feb 2015" "4.2.8p1" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:48:54 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:41:51 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 f67c3198f2f6..8d7dacc0f1b1 100644
--- a/ntpd/ntp.keys.5mdoc
+++ b/ntpd/ntp.keys.5mdoc
@@ -1,9 +1,9 @@
-.Dd December 19 2014
+.Dd February 4 2015
.Dt NTP_KEYS 5mdoc File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:49:12 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:42:10 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 cbeee1961053..2329476e15ff 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.8 of <code>ntp.keys</code>.
+ <p>This document applies to version 4.2.8p1 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 6df8dff45f00..b1ec652d989f 100644
--- a/ntpd/ntp.keys.man.in
+++ b/ntpd/ntp.keys.man.in
@@ -1,8 +1,8 @@
-.TH ntp.keys 5 "19 Dec 2014" "4.2.8" "File Formats"
+.TH ntp.keys 5 "04 Feb 2015" "4.2.8p1" "File Formats"
.\"
.\" EDIT THIS FILE WITH CAUTION (ntp.man)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:48:54 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:41:51 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 b2906fb96941..1f3fea54ab96 100644
--- a/ntpd/ntp.keys.mdoc.in
+++ b/ntpd/ntp.keys.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 19 2014
+.Dd February 4 2015
.Dt NTP_KEYS 5 File Formats
.Os SunOS 5.10
.\" EDIT THIS FILE WITH CAUTION (ntp.mdoc)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:49:12 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:42:10 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 0f48983f82e5..b9f0e24e3ee1 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);
@@ -3033,7 +3038,7 @@ config_phone(
config_tree *ptree
)
{
- int i;
+ size_t i;
string_node * sn;
i = 0;
@@ -3045,13 +3050,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 +3125,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 +3134,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 +4301,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 +4443,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 +4457,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 +4902,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 f5f326ca4811..b339e7d83b86 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);
@@ -783,6 +780,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;
@@ -811,7 +809,7 @@ static char *reqend;
void
init_control(void)
{
- int i;
+ size_t i;
#ifdef HAVE_UNAME
uname(&utsnamebuf);
@@ -846,9 +844,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;
/*
@@ -923,6 +921,7 @@ 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)))
@@ -1007,7 +1006,7 @@ process_control(
const struct ctl_proc *cc;
keyid_t *pkid;
int properlen;
- int maclen;
+ size_t maclen;
DPRINTF(3, ("in process_control()\n"));
@@ -1023,11 +1022,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++;
@@ -1067,6 +1066,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];
@@ -1096,7 +1096,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));
@@ -1220,7 +1220,7 @@ ctl_flushpkt(
u_char more
)
{
- int i;
+ size_t i;
int dlen;
int sendlen;
int maclen;
@@ -1326,7 +1326,7 @@ ctl_putdata(
if (!bin) {
datanotbinflag = TRUE;
overhead = 3;
- if (datapt != rpkt.u.data) {
+ if (datasent) {
*datapt++ = ',';
datalinelen++;
if ((dlen + datalinelen + 1) >= MAXDATALINELEN) {
@@ -1347,7 +1347,7 @@ ctl_putdata(
/*
* Not enough room in this one, flush it out.
*/
- currentlen = MIN(dlen, dataend - datapt);
+ currentlen = MIN(dlen, (unsigned int)(dataend - datapt));
memcpy(datapt, dp, currentlen);
@@ -1362,6 +1362,7 @@ ctl_putdata(
memcpy(datapt, dp, dlen);
datapt += dlen;
datalinelen += dlen;
+ datasent = TRUE;
}
@@ -1439,7 +1440,8 @@ ctl_putunqstr(
static void
ctl_putdblf(
const char * tag,
- const char * fmt,
+ int use_f,
+ int precision,
double d
)
{
@@ -1452,8 +1454,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);
}
@@ -1477,13 +1480,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
@@ -1508,7 +1538,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);
@@ -1537,7 +1567,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);
@@ -1563,7 +1593,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);
@@ -1589,7 +1619,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);
@@ -1621,7 +1651,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);
@@ -1658,7 +1688,7 @@ ctl_putrefid(
iplim = iptr + sizeof(refid);
for ( ; optr < oplim && iptr < iplim && '\0' != *iptr;
iptr++, optr++)
- if (isprint(*iptr))
+ if (isprint((int)*iptr))
*optr = *iptr;
else
*optr = '.';
@@ -1692,7 +1722,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);
@@ -1715,9 +1745,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 */
@@ -1863,11 +1890,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);
@@ -1896,11 +1923,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) {
@@ -2113,7 +2140,7 @@ ctl_putsys(
case CS_K_OFFSET:
CTL_IF_KERNLOOP(
ctl_putdblf,
- (sys_var[varid].text, "%g", to_ms * ntx.offset)
+ (sys_var[varid].text, 0, -1, to_ms * ntx.offset)
);
break;
@@ -2127,7 +2154,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;
@@ -2135,7 +2162,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;
@@ -2159,7 +2186,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;
@@ -2334,14 +2361,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;
@@ -2902,7 +2926,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)
@@ -2974,7 +2998,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)];
@@ -3032,7 +3056,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;
@@ -3708,7 +3732,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;
@@ -3737,9 +3761,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);
}
@@ -3758,6 +3782,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)
@@ -3780,20 +3805,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++;
}
}
@@ -3827,7 +3852,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;
@@ -4902,7 +4927,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;
@@ -4965,7 +4990,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 0dc5e3269dad..089dc6f2887d 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,7 +448,7 @@ 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;
@@ -474,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) {
@@ -527,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;
}
@@ -1195,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;
}
@@ -1346,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;
}
@@ -1354,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);
}
@@ -1495,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);
/*
@@ -1559,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)
@@ -1571,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));
@@ -1613,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,
@@ -1633,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);
}
@@ -1705,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(
@@ -1717,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;
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);
}
@@ -1746,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(
@@ -1755,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;
@@ -1783,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;
@@ -1796,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);
}
@@ -1839,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
@@ -1956,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 */
@@ -2167,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
@@ -2182,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);
@@ -2195,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 */
@@ -2214,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);
}
@@ -3058,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);
@@ -3099,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);
@@ -3431,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 a1703a9d13a3..4ee90955c1be 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 f8c6ee0ba92e..1ee7098ae164 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)
@@ -550,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,
@@ -1647,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;
@@ -1670,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
@@ -1810,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
@@ -1969,6 +2006,9 @@ update_interfaces(
if (broadcast_client_enabled)
io_setbclient();
+ if (sys_bclient)
+ io_setbclient();
+
return new_interface_found;
}
@@ -2314,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
@@ -2795,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
@@ -2945,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);
}
@@ -3198,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);
@@ -3321,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 */
@@ -3449,28 +3482,24 @@ read_network_packet(
** Bug 2672: Some OSes (MacOSX and Linux) don't block spoofed ::1
*/
- // temporary hack...
-#ifndef HAVE_SOLARIS_PRIVS
if (AF_INET6 == itf->family) {
- DPRINTF(1, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n",
+ DPRINTF(2, ("Got an IPv6 packet, from <%s> (%d) to <%s> (%d)\n",
stoa(&rb->recv_srcadr),
- IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr),
+ IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&rb->recv_srcadr)),
stoa(&itf->sin),
- !IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr)
+ !IN6_IS_ADDR_LOOPBACK(PSOCK_ADDR6(&itf->sin))
));
- }
- if ( AF_INET6 == itf->family
- && IN6_IS_ADDR_LOOPBACK(&rb->recv_srcadr.sa6.sin6_addr)
- && !IN6_IS_ADDR_LOOPBACK(&itf->sin.sa6.sin6_addr)
- ) {
- packets_dropped++;
- DPRINTF(1, ("DROPPING that packet\n"));
- freerecvbuf(rb);
- return buflen;
+ 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"));
}
- DPRINTF(1, ("processing that packet\n"));
-#endif
/*
* Got one. Mark how and when it got here,
@@ -4040,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;
@@ -4083,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 8b82ec006c2b..131cf0fab1f9 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-01-03 23:51:10 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[187] = {
/* 0 258 T_Abbrev */ "abbrev",
/* 1 259 T_Age */ "age",
/* 2 260 T_All */ "all",
@@ -99,109 +99,110 @@ 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_Stepout */ "stepout",
+ /* 150 408 T_Stratum */ "stratum",
+ /* 151 409 T_String */ NULL,
+ /* 152 410 T_Sys */ "sys",
+ /* 153 411 T_Sysstats */ "sysstats",
+ /* 154 412 T_Tick */ "tick",
+ /* 155 413 T_Time1 */ "time1",
+ /* 156 414 T_Time2 */ "time2",
+ /* 157 415 T_Timer */ "timer",
+ /* 158 416 T_Timingstats */ "timingstats",
+ /* 159 417 T_Tinker */ "tinker",
+ /* 160 418 T_Tos */ "tos",
+ /* 161 419 T_Trap */ "trap",
+ /* 162 420 T_True */ "true",
+ /* 163 421 T_Trustedkey */ "trustedkey",
+ /* 164 422 T_Ttl */ "ttl",
+ /* 165 423 T_Type */ "type",
+ /* 166 424 T_U_int */ NULL,
+ /* 167 425 T_Unconfig */ "unconfig",
+ /* 168 426 T_Unpeer */ "unpeer",
+ /* 169 427 T_Version */ "version",
+ /* 170 428 T_WanderThreshold */ NULL,
+ /* 171 429 T_Week */ "week",
+ /* 172 430 T_Wildcard */ "wildcard",
+ /* 173 431 T_Xleave */ "xleave",
+ /* 174 432 T_Year */ "year",
+ /* 175 433 T_Flag */ NULL,
+ /* 176 434 T_EOC */ NULL,
+ /* 177 435 T_Simulate */ "simulate",
+ /* 178 436 T_Beep_Delay */ "beep_delay",
+ /* 179 437 T_Sim_Duration */ "simulation_duration",
+ /* 180 438 T_Server_Offset */ "server_offset",
+ /* 181 439 T_Duration */ "duration",
+ /* 182 440 T_Freq_Offset */ "freq_offset",
+ /* 183 441 T_Wander */ "wander",
+ /* 184 442 T_Jitter */ "jitter",
+ /* 185 443 T_Prop_Delay */ "prop_delay",
+ /* 186 444 T_Proc_Delay */ "proc_delay"
};
-#define SCANNER_INIT_S 822
+#define SCANNER_INIT_S 830
-const scan_state sst[825] = {
+const scan_state sst[833] = {
/*SS_T( ch, f-by, match, other ), */
0, /* 0 */
S_ST( '-', 3, 322, 0 ), /* 1 */
@@ -247,7 +248,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, 436, 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 +346,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, 439, 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 +372,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, 440, 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 +432,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, 442, 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 +457,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, 447, 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 +521,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, 409, 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 +550,492 @@ 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, 500, 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, 596, 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, 611, 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, 620, 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, 628, 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, 634 ), /* 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, 711, 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, 754, 749 ), /* 404 T_Stats */
+ S_ST( 'r', 1, 0, 0 ), /* 405 T_Statsdir */
+ S_ST( 'p', 0, 757, 0 ), /* 406 T_Step */
+ S_ST( 't', 0, 0, 0 ), /* 407 T_Stepout */
+ S_ST( 'm', 0, 0, 0 ), /* 408 T_Stratum */
+ S_ST( 'l', 3, 334, 0 ), /* 409 logfi */
+ S_ST( 's', 0, 764, 0 ), /* 410 T_Sys */
+ S_ST( 's', 0, 0, 0 ), /* 411 T_Sysstats */
+ S_ST( 'k', 0, 0, 0 ), /* 412 T_Tick */
+ S_ST( '1', 0, 0, 0 ), /* 413 T_Time1 */
+ S_ST( '2', 0, 0, 413 ), /* 414 T_Time2 */
+ S_ST( 'r', 0, 0, 414 ), /* 415 T_Timer */
+ S_ST( 's', 0, 0, 0 ), /* 416 T_Timingstats */
+ S_ST( 'r', 0, 0, 0 ), /* 417 T_Tinker */
+ S_ST( 's', 0, 0, 0 ), /* 418 T_Tos */
+ S_ST( 'p', 1, 0, 0 ), /* 419 T_Trap */
+ S_ST( 'e', 0, 0, 0 ), /* 420 T_True */
+ S_ST( 'y', 0, 0, 0 ), /* 421 T_Trustedkey */
+ S_ST( 'l', 0, 0, 0 ), /* 422 T_Ttl */
+ S_ST( 'e', 0, 0, 0 ), /* 423 T_Type */
+ S_ST( 'o', 3, 428, 254 ), /* 424 lo */
+ S_ST( 'g', 1, 0, 0 ), /* 425 T_Unconfig */
+ S_ST( 'r', 1, 0, 0 ), /* 426 T_Unpeer */
+ S_ST( 'n', 0, 0, 0 ), /* 427 T_Version */
+ S_ST( 'p', 3, 433, 0 ), /* 428 loo */
+ S_ST( 'k', 0, 0, 0 ), /* 429 T_Week */
+ S_ST( 'd', 0, 0, 0 ), /* 430 T_Wildcard */
+ S_ST( 'e', 0, 0, 0 ), /* 431 T_Xleave */
+ S_ST( 'r', 0, 0, 0 ), /* 432 T_Year */
+ S_ST( 's', 3, 434, 0 ), /* 433 loop */
+ S_ST( 't', 3, 445, 0 ), /* 434 loops */
+ S_ST( 'e', 0, 0, 0 ), /* 435 T_Simulate */
+ S_ST( 'y', 0, 0, 0 ), /* 436 T_Beep_Delay */
+ S_ST( 'n', 0, 0, 0 ), /* 437 T_Sim_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 438 T_Server_Offset */
+ S_ST( 'n', 0, 0, 0 ), /* 439 T_Duration */
+ S_ST( 't', 0, 0, 0 ), /* 440 T_Freq_Offset */
+ S_ST( 'r', 0, 0, 0 ), /* 441 T_Wander */
+ S_ST( 'r', 0, 0, 0 ), /* 442 T_Jitter */
+ S_ST( 'y', 0, 0, 0 ), /* 443 T_Prop_Delay */
+ S_ST( 'y', 0, 0, 0 ), /* 444 T_Proc_Delay */
+ S_ST( 'a', 3, 446, 0 ), /* 445 loopst */
+ S_ST( 't', 3, 335, 0 ), /* 446 loopsta */
+ S_ST( 'w', 3, 448, 424 ), /* 447 lo */
+ S_ST( 'p', 3, 449, 0 ), /* 448 low */
+ S_ST( 'r', 3, 450, 0 ), /* 449 lowp */
+ S_ST( 'i', 3, 451, 0 ), /* 450 lowpr */
+ S_ST( 'o', 3, 452, 0 ), /* 451 lowpri */
+ S_ST( 't', 3, 453, 0 ), /* 452 lowprio */
+ S_ST( 'r', 3, 454, 0 ), /* 453 lowpriot */
+ S_ST( 'a', 3, 336, 0 ), /* 454 lowpriotr */
+ S_ST( 'm', 3, 536, 237 ), /* 455 */
+ S_ST( 'a', 3, 474, 0 ), /* 456 m */
+ S_ST( 'n', 3, 458, 0 ), /* 457 ma */
+ S_ST( 'y', 3, 459, 0 ), /* 458 man */
+ S_ST( 'c', 3, 460, 0 ), /* 459 many */
+ S_ST( 'a', 3, 461, 0 ), /* 460 manyc */
+ S_ST( 's', 3, 462, 0 ), /* 461 manyca */
+ S_ST( 't', 3, 468, 0 ), /* 462 manycas */
+ S_ST( 'c', 3, 464, 0 ), /* 463 manycast */
+ S_ST( 'l', 3, 465, 0 ), /* 464 manycastc */
+ S_ST( 'i', 3, 466, 0 ), /* 465 manycastcl */
+ S_ST( 'e', 3, 467, 0 ), /* 466 manycastcli */
+ S_ST( 'n', 3, 337, 0 ), /* 467 manycastclie */
+ S_ST( 's', 3, 469, 463 ), /* 468 manycast */
+ S_ST( 'e', 3, 470, 0 ), /* 469 manycasts */
+ S_ST( 'r', 3, 471, 0 ), /* 470 manycastse */
+ S_ST( 'v', 3, 472, 0 ), /* 471 manycastser */
+ S_ST( 'e', 3, 338, 0 ), /* 472 manycastserv */
+ S_ST( 's', 3, 339, 457 ), /* 473 ma */
+ S_ST( 'x', 3, 489, 473 ), /* 474 ma */
+ S_ST( 'a', 3, 476, 0 ), /* 475 max */
+ S_ST( 'g', 3, 340, 0 ), /* 476 maxa */
+ S_ST( 'c', 3, 478, 475 ), /* 477 max */
+ S_ST( 'l', 3, 479, 0 ), /* 478 maxc */
+ S_ST( 'o', 3, 480, 0 ), /* 479 maxcl */
+ S_ST( 'c', 3, 341, 0 ), /* 480 maxclo */
+ S_ST( 'd', 3, 485, 477 ), /* 481 max */
+ S_ST( 'e', 3, 483, 0 ), /* 482 maxd */
+ S_ST( 'p', 3, 484, 0 ), /* 483 maxde */
+ S_ST( 't', 3, 342, 0 ), /* 484 maxdep */
+ S_ST( 'i', 3, 486, 482 ), /* 485 maxd */
+ S_ST( 's', 3, 343, 0 ), /* 486 maxdi */
+ S_ST( 'm', 3, 488, 481 ), /* 487 max */
+ S_ST( 'e', 3, 344, 0 ), /* 488 maxm */
+ S_ST( 'p', 3, 490, 487 ), /* 489 max */
+ S_ST( 'o', 3, 491, 0 ), /* 490 maxp */
+ S_ST( 'l', 3, 345, 0 ), /* 491 maxpo */
+ S_ST( 'd', 3, 493, 456 ), /* 492 m */
+ S_ST( 'n', 3, 494, 0 ), /* 493 md */
+ S_ST( 's', 3, 495, 0 ), /* 494 mdn */
+ S_ST( 't', 3, 496, 0 ), /* 495 mdns */
+ S_ST( 'r', 3, 497, 0 ), /* 496 mdnst */
+ S_ST( 'i', 3, 498, 0 ), /* 497 mdnstr */
+ S_ST( 'e', 3, 346, 0 ), /* 498 mdnstri */
+ S_ST( 'e', 3, 347, 492 ), /* 499 m */
+ S_ST( 'l', 3, 501, 0 ), /* 500 mem */
+ S_ST( 'o', 3, 502, 0 ), /* 501 meml */
+ S_ST( 'c', 3, 348, 0 ), /* 502 memlo */
+ S_ST( 'i', 3, 504, 499 ), /* 503 m */
+ S_ST( 'n', 3, 521, 0 ), /* 504 mi */
+ S_ST( 'c', 3, 506, 0 ), /* 505 min */
+ S_ST( 'l', 3, 507, 0 ), /* 506 minc */
+ S_ST( 'o', 3, 508, 0 ), /* 507 mincl */
+ S_ST( 'c', 3, 349, 0 ), /* 508 minclo */
+ S_ST( 'd', 3, 513, 505 ), /* 509 min */
+ S_ST( 'e', 3, 511, 0 ), /* 510 mind */
+ S_ST( 'p', 3, 512, 0 ), /* 511 minde */
+ S_ST( 't', 3, 350, 0 ), /* 512 mindep */
+ S_ST( 'i', 3, 514, 510 ), /* 513 mind */
+ S_ST( 's', 3, 351, 0 ), /* 514 mindi */
+ S_ST( 'i', 3, 516, 509 ), /* 515 min */
+ S_ST( 'm', 3, 517, 0 ), /* 516 mini */
+ S_ST( 'u', 3, 352, 0 ), /* 517 minim */
+ S_ST( 'p', 3, 519, 515 ), /* 518 min */
+ S_ST( 'o', 3, 520, 0 ), /* 519 minp */
+ S_ST( 'l', 3, 353, 0 ), /* 520 minpo */
+ S_ST( 's', 3, 522, 518 ), /* 521 min */
+ S_ST( 'a', 3, 523, 0 ), /* 522 mins */
+ S_ST( 'n', 3, 354, 0 ), /* 523 minsa */
+ S_ST( 'o', 3, 526, 503 ), /* 524 m */
+ S_ST( 'd', 3, 355, 0 ), /* 525 mo */
+ S_ST( 'n', 3, 530, 525 ), /* 526 mo */
+ S_ST( 'i', 3, 528, 0 ), /* 527 mon */
+ S_ST( 't', 3, 529, 0 ), /* 528 moni */
+ S_ST( 'o', 3, 357, 0 ), /* 529 monit */
+ S_ST( 't', 3, 358, 527 ), /* 530 mon */
+ S_ST( 'r', 3, 359, 524 ), /* 531 m */
+ S_ST( 's', 3, 533, 531 ), /* 532 m */
+ S_ST( 's', 3, 534, 0 ), /* 533 ms */
+ S_ST( 'n', 3, 535, 0 ), /* 534 mss */
+ S_ST( 't', 3, 328, 0 ), /* 535 mssn */
+ S_ST( 'u', 3, 537, 532 ), /* 536 m */
+ S_ST( 'l', 3, 538, 0 ), /* 537 mu */
+ S_ST( 't', 3, 539, 0 ), /* 538 mul */
+ S_ST( 'i', 3, 540, 0 ), /* 539 mult */
+ S_ST( 'c', 3, 541, 0 ), /* 540 multi */
+ S_ST( 'a', 3, 542, 0 ), /* 541 multic */
+ S_ST( 's', 3, 543, 0 ), /* 542 multica */
+ S_ST( 't', 3, 544, 0 ), /* 543 multicas */
+ S_ST( 'c', 3, 545, 0 ), /* 544 multicast */
+ S_ST( 'l', 3, 546, 0 ), /* 545 multicastc */
+ S_ST( 'i', 3, 547, 0 ), /* 546 multicastcl */
+ S_ST( 'e', 3, 548, 0 ), /* 547 multicastcli */
+ S_ST( 'n', 3, 360, 0 ), /* 548 multicastclie */
+ S_ST( 'n', 3, 592, 455 ), /* 549 */
+ S_ST( 'i', 3, 361, 0 ), /* 550 n */
+ S_ST( 'o', 3, 587, 550 ), /* 551 n */
+ S_ST( 'l', 3, 553, 0 ), /* 552 no */
+ S_ST( 'i', 3, 554, 0 ), /* 553 nol */
+ S_ST( 'n', 3, 362, 0 ), /* 554 noli */
+ S_ST( 'm', 3, 560, 552 ), /* 555 no */
+ S_ST( 'o', 3, 557, 0 ), /* 556 nom */
+ S_ST( 'd', 3, 558, 0 ), /* 557 nomo */
+ S_ST( 'i', 3, 559, 0 ), /* 558 nomod */
+ S_ST( 'f', 3, 363, 0 ), /* 559 nomodi */
+ S_ST( 'r', 3, 561, 556 ), /* 560 nom */
+ S_ST( 'u', 3, 562, 0 ), /* 561 nomr */
+ S_ST( 'l', 3, 563, 0 ), /* 562 nomru */
+ S_ST( 'i', 3, 564, 0 ), /* 563 nomrul */
+ S_ST( 's', 3, 364, 0 ), /* 564 nomruli */
+ S_ST( 'n', 3, 566, 555 ), /* 565 no */
+ S_ST( 'v', 3, 567, 365 ), /* 566 non */
+ S_ST( 'o', 3, 568, 0 ), /* 567 nonv */
+ S_ST( 'l', 3, 569, 0 ), /* 568 nonvo */
+ S_ST( 'a', 3, 570, 0 ), /* 569 nonvol */
+ S_ST( 't', 3, 571, 0 ), /* 570 nonvola */
+ S_ST( 'i', 3, 572, 0 ), /* 571 nonvolat */
+ S_ST( 'l', 3, 366, 0 ), /* 572 nonvolati */
+ S_ST( 'p', 3, 574, 565 ), /* 573 no */
+ S_ST( 'e', 3, 575, 0 ), /* 574 nop */
+ S_ST( 'e', 3, 367, 0 ), /* 575 nope */
+ S_ST( 'q', 3, 577, 573 ), /* 576 no */
+ S_ST( 'u', 3, 578, 0 ), /* 577 noq */
+ S_ST( 'e', 3, 579, 0 ), /* 578 noqu */
+ S_ST( 'r', 3, 368, 0 ), /* 579 noque */
+ S_ST( 's', 3, 581, 576 ), /* 580 no */
+ S_ST( 'e', 3, 585, 0 ), /* 581 nos */
+ S_ST( 'l', 3, 583, 0 ), /* 582 nose */
+ S_ST( 'e', 3, 584, 0 ), /* 583 nosel */
+ S_ST( 'c', 3, 369, 0 ), /* 584 nosele */
+ S_ST( 'r', 3, 586, 582 ), /* 585 nose */
+ S_ST( 'v', 3, 370, 0 ), /* 586 noser */
+ S_ST( 't', 3, 588, 580 ), /* 587 no */
+ S_ST( 'r', 3, 590, 0 ), /* 588 not */
+ S_ST( 'a', 3, 371, 0 ), /* 589 notr */
+ S_ST( 'u', 3, 591, 589 ), /* 590 notr */
+ S_ST( 's', 3, 372, 0 ), /* 591 notru */
+ S_ST( 't', 3, 373, 551 ), /* 592 n */
+ S_ST( 'p', 3, 594, 0 ), /* 593 ntp */
+ S_ST( 'o', 3, 595, 0 ), /* 594 ntpp */
+ S_ST( 'r', 3, 374, 0 ), /* 595 ntppo */
+ S_ST( 's', 3, 597, 593 ), /* 596 ntp */
+ S_ST( 'i', 3, 598, 0 ), /* 597 ntps */
+ S_ST( 'g', 3, 599, 0 ), /* 598 ntpsi */
+ S_ST( 'n', 3, 600, 0 ), /* 599 ntpsig */
+ S_ST( 'd', 3, 601, 0 ), /* 600 ntpsign */
+ S_ST( 's', 3, 602, 0 ), /* 601 ntpsignd */
+ S_ST( 'o', 3, 603, 0 ), /* 602 ntpsignds */
+ S_ST( 'c', 3, 604, 0 ), /* 603 ntpsigndso */
+ S_ST( 'k', 3, 605, 0 ), /* 604 ntpsigndsoc */
+ S_ST( 'e', 3, 375, 0 ), /* 605 ntpsigndsock */
+ S_ST( 'o', 3, 607, 549 ), /* 606 */
+ S_ST( 'r', 3, 608, 0 ), /* 607 o */
+ S_ST( 'p', 3, 609, 0 ), /* 608 or */
+ S_ST( 'h', 3, 610, 0 ), /* 609 orp */
+ S_ST( 'a', 3, 376, 0 ), /* 610 orph */
+ S_ST( 'w', 3, 612, 0 ), /* 611 orphan */
+ S_ST( 'a', 3, 613, 0 ), /* 612 orphanw */
+ S_ST( 'i', 3, 377, 0 ), /* 613 orphanwa */
+ S_ST( 'p', 3, 389, 606 ), /* 614 */
+ S_ST( 'a', 3, 616, 0 ), /* 615 p */
+ S_ST( 'n', 3, 617, 0 ), /* 616 pa */
+ S_ST( 'i', 3, 378, 0 ), /* 617 pan */
+ S_ST( 'e', 3, 619, 615 ), /* 618 p */
+ S_ST( 'e', 3, 379, 0 ), /* 619 pe */
+ S_ST( 's', 3, 621, 0 ), /* 620 peer */
+ S_ST( 't', 3, 622, 0 ), /* 621 peers */
+ S_ST( 'a', 3, 623, 0 ), /* 622 peerst */
+ S_ST( 't', 3, 380, 0 ), /* 623 peersta */
+ S_ST( 'h', 3, 625, 618 ), /* 624 p */
+ S_ST( 'o', 3, 626, 0 ), /* 625 ph */
+ S_ST( 'n', 3, 381, 0 ), /* 626 pho */
+ S_ST( 'i', 3, 382, 624 ), /* 627 p */
+ S_ST( 'f', 3, 629, 0 ), /* 628 pid */
+ S_ST( 'i', 3, 630, 0 ), /* 629 pidf */
+ S_ST( 'l', 3, 383, 0 ), /* 630 pidfi */
+ S_ST( 'o', 3, 633, 627 ), /* 631 p */
+ S_ST( 'o', 3, 384, 0 ), /* 632 po */
+ S_ST( 'r', 3, 385, 632 ), /* 633 po */
+ S_ST( 'r', 3, 641, 631 ), /* 634 p */
+ S_ST( 'e', 3, 639, 0 ), /* 635 pr */
+ S_ST( 'e', 3, 637, 0 ), /* 636 pre */
+ S_ST( 'm', 3, 638, 0 ), /* 637 pree */
+ S_ST( 'p', 3, 386, 0 ), /* 638 preem */
+ S_ST( 'f', 3, 640, 636 ), /* 639 pre */
+ S_ST( 'e', 3, 387, 0 ), /* 640 pref */
+ S_ST( 'o', 3, 654, 635 ), /* 641 pr */
+ S_ST( 'c', 3, 643, 0 ), /* 642 pro */
+ S_ST( '_', 3, 644, 0 ), /* 643 proc */
+ S_ST( 'd', 3, 645, 0 ), /* 644 proc_ */
+ S_ST( 'e', 3, 646, 0 ), /* 645 proc_d */
+ S_ST( 'l', 3, 647, 0 ), /* 646 proc_de */
+ S_ST( 'a', 3, 444, 0 ), /* 647 proc_del */
+ S_ST( 'p', 3, 649, 642 ), /* 648 pro */
+ S_ST( '_', 3, 650, 0 ), /* 649 prop */
+ S_ST( 'd', 3, 651, 0 ), /* 650 prop_ */
+ S_ST( 'e', 3, 652, 0 ), /* 651 prop_d */
+ S_ST( 'l', 3, 653, 0 ), /* 652 prop_de */
+ S_ST( 'a', 3, 443, 0 ), /* 653 prop_del */
+ S_ST( 't', 3, 655, 648 ), /* 654 pro */
+ S_ST( 'o', 3, 656, 0 ), /* 655 prot */
+ S_ST( 's', 3, 657, 0 ), /* 656 proto */
+ S_ST( 't', 3, 658, 0 ), /* 657 protos */
+ S_ST( 'a', 3, 659, 0 ), /* 658 protost */
+ S_ST( 't', 3, 388, 0 ), /* 659 protosta */
+ S_ST( 'r', 3, 691, 614 ), /* 660 */
+ S_ST( 'a', 3, 667, 0 ), /* 661 r */
+ S_ST( 'n', 3, 663, 0 ), /* 662 ra */
+ S_ST( 'd', 3, 664, 0 ), /* 663 ran */
+ S_ST( 'f', 3, 665, 0 ), /* 664 rand */
+ S_ST( 'i', 3, 666, 0 ), /* 665 randf */
+ S_ST( 'l', 3, 390, 0 ), /* 666 randfi */
+ S_ST( 'w', 3, 668, 662 ), /* 667 ra */
+ S_ST( 's', 3, 669, 0 ), /* 668 raw */
+ S_ST( 't', 3, 670, 0 ), /* 669 raws */
+ S_ST( 'a', 3, 671, 0 ), /* 670 rawst */
+ S_ST( 't', 3, 391, 0 ), /* 671 rawsta */
+ S_ST( 'e', 3, 688, 661 ), /* 672 r */
+ S_ST( 'f', 3, 674, 0 ), /* 673 re */
+ S_ST( 'i', 3, 392, 0 ), /* 674 ref */
+ S_ST( 'q', 3, 676, 673 ), /* 675 re */
+ S_ST( 'u', 3, 677, 0 ), /* 676 req */
+ S_ST( 'e', 3, 678, 0 ), /* 677 requ */
+ S_ST( 's', 3, 679, 0 ), /* 678 reque */
+ S_ST( 't', 3, 680, 0 ), /* 679 reques */
+ S_ST( 'k', 3, 681, 0 ), /* 680 request */
+ S_ST( 'e', 3, 393, 0 ), /* 681 requestk */
+ S_ST( 's', 3, 684, 675 ), /* 682 re */
+ S_ST( 'e', 3, 394, 0 ), /* 683 res */
+ S_ST( 't', 3, 685, 683 ), /* 684 res */
+ S_ST( 'r', 3, 686, 0 ), /* 685 rest */
+ S_ST( 'i', 3, 687, 0 ), /* 686 restr */
+ S_ST( 'c', 3, 395, 0 ), /* 687 restri */
+ S_ST( 'v', 3, 689, 682 ), /* 688 re */
+ S_ST( 'o', 3, 690, 0 ), /* 689 rev */
+ S_ST( 'k', 3, 396, 0 ), /* 690 revo */
+ S_ST( 'l', 3, 692, 672 ), /* 691 r */
+ S_ST( 'i', 3, 693, 0 ), /* 692 rl */
+ S_ST( 'm', 3, 694, 0 ), /* 693 rli */
+ S_ST( 'i', 3, 397, 0 ), /* 694 rlim */
+ S_ST( 's', 3, 763, 660 ), /* 695 */
+ S_ST( 'a', 3, 697, 0 ), /* 696 s */
+ S_ST( 'v', 3, 698, 0 ), /* 697 sa */
+ S_ST( 'e', 3, 699, 0 ), /* 698 sav */
+ S_ST( 'c', 3, 700, 0 ), /* 699 save */
+ S_ST( 'o', 3, 701, 0 ), /* 700 savec */
+ S_ST( 'n', 3, 702, 0 ), /* 701 saveco */
+ S_ST( 'f', 3, 703, 0 ), /* 702 savecon */
+ S_ST( 'i', 3, 704, 0 ), /* 703 saveconf */
+ S_ST( 'g', 3, 705, 0 ), /* 704 saveconfi */
+ S_ST( 'd', 3, 706, 0 ), /* 705 saveconfig */
+ S_ST( 'i', 3, 398, 0 ), /* 706 saveconfigd */
+ S_ST( 'e', 3, 717, 696 ), /* 707 s */
+ S_ST( 'r', 3, 709, 0 ), /* 708 se */
+ S_ST( 'v', 3, 710, 0 ), /* 709 ser */
+ S_ST( 'e', 3, 399, 0 ), /* 710 serv */
+ S_ST( '_', 3, 712, 0 ), /* 711 server */
+ S_ST( 'o', 3, 713, 0 ), /* 712 server_ */
+ S_ST( 'f', 3, 714, 0 ), /* 713 server_o */
+ S_ST( 'f', 3, 715, 0 ), /* 714 server_of */
+ S_ST( 's', 3, 716, 0 ), /* 715 server_off */
+ S_ST( 'e', 3, 438, 0 ), /* 716 server_offs */
+ S_ST( 't', 3, 718, 708 ), /* 717 se */
+ S_ST( 'v', 3, 719, 0 ), /* 718 set */
+ S_ST( 'a', 3, 400, 0 ), /* 719 setv */
+ S_ST( 'i', 3, 721, 707 ), /* 720 s */
+ S_ST( 'm', 3, 722, 0 ), /* 721 si */
+ S_ST( 'u', 3, 723, 0 ), /* 722 sim */
+ S_ST( 'l', 3, 724, 0 ), /* 723 simu */
+ S_ST( 'a', 3, 725, 0 ), /* 724 simul */
+ S_ST( 't', 3, 726, 0 ), /* 725 simula */
+ S_ST( 'i', 3, 727, 435 ), /* 726 simulat */
+ S_ST( 'o', 3, 728, 0 ), /* 727 simulati */
+ S_ST( 'n', 3, 729, 0 ), /* 728 simulatio */
+ S_ST( '_', 3, 730, 0 ), /* 729 simulation */
+ S_ST( 'd', 3, 731, 0 ), /* 730 simulation_ */
+ S_ST( 'u', 3, 732, 0 ), /* 731 simulation_d */
+ S_ST( 'r', 3, 733, 0 ), /* 732 simulation_du */
+ S_ST( 'a', 3, 734, 0 ), /* 733 simulation_dur */
+ S_ST( 't', 3, 735, 0 ), /* 734 simulation_dura */
+ S_ST( 'i', 3, 736, 0 ), /* 735 simulation_durat */
+ S_ST( 'o', 3, 437, 0 ), /* 736 simulation_durati */
+ S_ST( 'o', 3, 738, 720 ), /* 737 s */
+ S_ST( 'u', 3, 739, 0 ), /* 738 so */
+ S_ST( 'r', 3, 740, 0 ), /* 739 sou */
+ S_ST( 'c', 3, 401, 0 ), /* 740 sour */
+ S_ST( 't', 3, 759, 737 ), /* 741 s */
+ S_ST( 'a', 3, 748, 0 ), /* 742 st */
+ S_ST( 'c', 3, 744, 0 ), /* 743 sta */
+ S_ST( 'k', 3, 745, 0 ), /* 744 stac */
+ S_ST( 's', 3, 746, 0 ), /* 745 stack */
+ S_ST( 'i', 3, 747, 0 ), /* 746 stacks */
+ S_ST( 'z', 3, 402, 0 ), /* 747 stacksi */
+ S_ST( 't', 3, 404, 743 ), /* 748 sta */
+ S_ST( 'i', 3, 750, 0 ), /* 749 stat */
+ S_ST( 's', 3, 751, 0 ), /* 750 stati */
+ S_ST( 't', 3, 752, 0 ), /* 751 statis */
+ S_ST( 'i', 3, 753, 0 ), /* 752 statist */
+ S_ST( 'c', 3, 403, 0 ), /* 753 statisti */
+ S_ST( 'd', 3, 755, 0 ), /* 754 stats */
+ S_ST( 'i', 3, 405, 0 ), /* 755 statsd */
+ S_ST( 'e', 3, 406, 742 ), /* 756 st */
+ S_ST( 'o', 3, 758, 0 ), /* 757 step */
+ S_ST( 'u', 3, 407, 0 ), /* 758 stepo */
+ S_ST( 'r', 3, 760, 756 ), /* 759 st */
+ S_ST( 'a', 3, 761, 0 ), /* 760 str */
+ S_ST( 't', 3, 762, 0 ), /* 761 stra */
+ S_ST( 'u', 3, 408, 0 ), /* 762 strat */
+ S_ST( 'y', 3, 410, 741 ), /* 763 s */
+ S_ST( 's', 3, 765, 0 ), /* 764 sys */
+ S_ST( 't', 3, 766, 0 ), /* 765 syss */
+ S_ST( 'a', 3, 767, 0 ), /* 766 sysst */
+ S_ST( 't', 3, 411, 0 ), /* 767 syssta */
+ S_ST( 't', 3, 794, 695 ), /* 768 */
+ S_ST( 'i', 3, 780, 0 ), /* 769 t */
+ S_ST( 'c', 3, 412, 0 ), /* 770 ti */
+ S_ST( 'm', 3, 773, 770 ), /* 771 ti */
+ S_ST( 'e', 3, 415, 0 ), /* 772 tim */
+ S_ST( 'i', 3, 774, 772 ), /* 773 tim */
+ S_ST( 'n', 3, 775, 0 ), /* 774 timi */
+ S_ST( 'g', 3, 776, 0 ), /* 775 timin */
+ S_ST( 's', 3, 777, 0 ), /* 776 timing */
+ S_ST( 't', 3, 778, 0 ), /* 777 timings */
+ S_ST( 'a', 3, 779, 0 ), /* 778 timingst */
+ S_ST( 't', 3, 416, 0 ), /* 779 timingsta */
+ S_ST( 'n', 3, 781, 771 ), /* 780 ti */
+ S_ST( 'k', 3, 782, 0 ), /* 781 tin */
+ S_ST( 'e', 3, 417, 0 ), /* 782 tink */
+ S_ST( 'o', 3, 418, 769 ), /* 783 t */
+ S_ST( 'r', 3, 786, 783 ), /* 784 t */
+ S_ST( 'a', 3, 419, 0 ), /* 785 tr */
+ S_ST( 'u', 3, 787, 785 ), /* 786 tr */
+ S_ST( 's', 3, 788, 420 ), /* 787 tru */
+ S_ST( 't', 3, 789, 0 ), /* 788 trus */
+ S_ST( 'e', 3, 790, 0 ), /* 789 trust */
+ S_ST( 'd', 3, 791, 0 ), /* 790 truste */
+ S_ST( 'k', 3, 792, 0 ), /* 791 trusted */
+ S_ST( 'e', 3, 421, 0 ), /* 792 trustedk */
+ S_ST( 't', 3, 422, 784 ), /* 793 t */
+ S_ST( 'y', 3, 795, 793 ), /* 794 t */
+ S_ST( 'p', 3, 423, 0 ), /* 795 ty */
+ S_ST( 'u', 3, 797, 768 ), /* 796 */
+ S_ST( 'n', 3, 803, 0 ), /* 797 u */
+ S_ST( 'c', 3, 799, 0 ), /* 798 un */
+ S_ST( 'o', 3, 800, 0 ), /* 799 unc */
+ S_ST( 'n', 3, 801, 0 ), /* 800 unco */
+ S_ST( 'f', 3, 802, 0 ), /* 801 uncon */
+ S_ST( 'i', 3, 425, 0 ), /* 802 unconf */
+ S_ST( 'p', 3, 804, 798 ), /* 803 un */
+ S_ST( 'e', 3, 805, 0 ), /* 804 unp */
+ S_ST( 'e', 3, 426, 0 ), /* 805 unpe */
+ S_ST( 'v', 3, 807, 796 ), /* 806 */
+ S_ST( 'e', 3, 808, 0 ), /* 807 v */
+ S_ST( 'r', 3, 809, 0 ), /* 808 ve */
+ S_ST( 's', 3, 810, 0 ), /* 809 ver */
+ S_ST( 'i', 3, 811, 0 ), /* 810 vers */
+ S_ST( 'o', 3, 427, 0 ), /* 811 versi */
+ S_ST( 'w', 3, 819, 806 ), /* 812 */
+ S_ST( 'a', 3, 814, 0 ), /* 813 w */
+ S_ST( 'n', 3, 815, 0 ), /* 814 wa */
+ S_ST( 'd', 3, 816, 0 ), /* 815 wan */
+ S_ST( 'e', 3, 441, 0 ), /* 816 wand */
+ S_ST( 'e', 3, 818, 813 ), /* 817 w */
+ S_ST( 'e', 3, 429, 0 ), /* 818 we */
+ S_ST( 'i', 3, 820, 817 ), /* 819 w */
+ S_ST( 'l', 3, 821, 0 ), /* 820 wi */
+ S_ST( 'd', 3, 822, 0 ), /* 821 wil */
+ S_ST( 'c', 3, 823, 0 ), /* 822 wild */
+ S_ST( 'a', 3, 824, 0 ), /* 823 wildc */
+ S_ST( 'r', 3, 430, 0 ), /* 824 wildca */
+ S_ST( 'x', 3, 826, 812 ), /* 825 */
+ S_ST( 'l', 3, 827, 0 ), /* 826 x */
+ S_ST( 'e', 3, 828, 0 ), /* 827 xl */
+ S_ST( 'a', 3, 829, 0 ), /* 828 xle */
+ S_ST( 'v', 3, 431, 0 ), /* 829 xlea */
+ S_ST( 'y', 3, 831, 825 ), /* 830 [initial state] */
+ S_ST( 'e', 3, 832, 0 ), /* 831 y */
+ S_ST( 'a', 3, 432, 0 ) /* 832 ye */
};
diff --git a/ntpd/ntp_leapsec.c b/ntpd/ntp_leapsec.c
index 14b8cd99fa56..ec42a9740a07 100644
--- a/ntpd/ntp_leapsec.c
+++ b/ntpd/ntp_leapsec.c
@@ -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 87db726e417e..82ff1632e518 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"
@@ -182,6 +185,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 +207,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;
}
@@ -663,16 +683,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;
@@ -1142,6 +1163,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;
/*
diff --git a/ntpd/ntp_parser.c b/ntpd/ntp_parser.c
index b3f4e4fd8a6f..de3d73cedd65 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,105 @@ 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_Stepout = 407,
+ T_Stratum = 408,
+ T_String = 409,
+ T_Sys = 410,
+ T_Sysstats = 411,
+ T_Tick = 412,
+ T_Time1 = 413,
+ T_Time2 = 414,
+ T_Timer = 415,
+ T_Timingstats = 416,
+ T_Tinker = 417,
+ T_Tos = 418,
+ T_Trap = 419,
+ T_True = 420,
+ T_Trustedkey = 421,
+ T_Ttl = 422,
+ T_Type = 423,
+ T_U_int = 424,
+ T_Unconfig = 425,
+ T_Unpeer = 426,
+ T_Version = 427,
+ T_WanderThreshold = 428,
+ T_Week = 429,
+ T_Wildcard = 430,
+ T_Xleave = 431,
+ T_Year = 432,
+ T_Flag = 433,
+ T_EOC = 434,
+ T_Simulate = 435,
+ T_Beep_Delay = 436,
+ T_Sim_Duration = 437,
+ T_Server_Offset = 438,
+ T_Duration = 439,
+ T_Freq_Offset = 440,
+ T_Wander = 441,
+ T_Jitter = 442,
+ T_Prop_Delay = 443,
+ T_Proc_Delay = 444
};
#endif
/* Tokens. */
@@ -408,104 +409,105 @@ 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_Stepout 407
+#define T_Stratum 408
+#define T_String 409
+#define T_Sys 410
+#define T_Sysstats 411
+#define T_Tick 412
+#define T_Time1 413
+#define T_Time2 414
+#define T_Timer 415
+#define T_Timingstats 416
+#define T_Tinker 417
+#define T_Tos 418
+#define T_Trap 419
+#define T_True 420
+#define T_Trustedkey 421
+#define T_Ttl 422
+#define T_Type 423
+#define T_U_int 424
+#define T_Unconfig 425
+#define T_Unpeer 426
+#define T_Version 427
+#define T_WanderThreshold 428
+#define T_Week 429
+#define T_Wildcard 430
+#define T_Xleave 431
+#define T_Year 432
+#define T_Flag 433
+#define T_EOC 434
+#define T_Simulate 435
+#define T_Beep_Delay 436
+#define T_Sim_Duration 437
+#define T_Server_Offset 438
+#define T_Duration 439
+#define T_Freq_Offset 440
+#define T_Wander 441
+#define T_Jitter 442
+#define T_Prop_Delay 443
+#define T_Proc_Delay 444
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -531,7 +533,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 535 "../../ntpd/ntp_parser.c" /* yacc.c:355 */
+#line 537 "ntp_parser.c" /* yacc.c:355 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -546,7 +548,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 552 "ntp_parser.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -786,23 +788,23 @@ union yyalloc
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 203
+#define YYFINAL 205
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 653
+#define YYLAST 634
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 194
+#define YYNTOKENS 195
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 104
/* YYNRULES -- Number of rules. */
-#define YYNRULES 307
+#define YYNRULES 308
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 411
+#define YYNSTATES 413
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 443
+#define YYMAXUTOK 444
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -815,15 +817,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,
+ 191, 192, 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, 190, 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, 193, 2, 194, 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 +857,44 @@ 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
};
#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, 364, 364, 368, 369, 370, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 405, 415, 416, 417, 418, 419, 423, 424, 429, 434,
+ 436, 442, 443, 451, 452, 453, 457, 462, 463, 464,
+ 465, 466, 467, 468, 469, 473, 475, 480, 481, 482,
+ 483, 484, 485, 489, 494, 503, 513, 514, 524, 526,
+ 528, 530, 541, 548, 550, 555, 557, 559, 561, 563,
+ 572, 578, 579, 587, 589, 601, 602, 603, 604, 605,
+ 614, 619, 624, 632, 634, 636, 641, 642, 643, 644,
+ 645, 646, 650, 651, 652, 653, 662, 664, 673, 683,
+ 688, 696, 697, 698, 699, 700, 701, 702, 703, 708,
+ 709, 717, 727, 736, 751, 756, 757, 761, 762, 766,
+ 767, 768, 769, 770, 771, 772, 781, 785, 789, 797,
+ 805, 813, 828, 843, 856, 857, 865, 866, 867, 868,
+ 869, 870, 871, 872, 873, 874, 875, 876, 877, 878,
+ 879, 883, 888, 896, 901, 902, 903, 907, 912, 920,
+ 925, 926, 927, 928, 929, 930, 931, 932, 940, 950,
+ 955, 963, 965, 967, 969, 971, 976, 977, 981, 982,
+ 983, 984, 992, 997, 1002, 1010, 1015, 1016, 1017, 1026,
+ 1028, 1033, 1038, 1046, 1048, 1065, 1066, 1067, 1068, 1069,
+ 1070, 1074, 1075, 1083, 1088, 1093, 1101, 1106, 1107, 1108,
+ 1109, 1110, 1111, 1112, 1113, 1122, 1123, 1124, 1131, 1138,
+ 1154, 1173, 1178, 1180, 1182, 1184, 1186, 1193, 1198, 1199,
+ 1200, 1204, 1205, 1206, 1210, 1211, 1215, 1222, 1232, 1241,
+ 1246, 1248, 1253, 1254, 1262, 1264, 1272, 1277, 1285, 1310,
+ 1317, 1327, 1328, 1332, 1333, 1334, 1335, 1339, 1340, 1341,
+ 1345, 1350, 1355, 1363, 1364, 1365, 1366, 1367, 1368, 1369,
+ 1379, 1384, 1392, 1397, 1405, 1407, 1411, 1416, 1421, 1429,
+ 1434, 1442, 1451, 1452, 1456, 1457, 1466, 1484, 1488, 1493,
+ 1501, 1506, 1507, 1511, 1516, 1524, 1529, 1534, 1539, 1544,
+ 1552, 1557, 1562, 1570, 1575, 1576, 1577, 1578, 1579
};
#endif
@@ -918,26 +920,27 @@ 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",
+ "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_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",
@@ -994,15 +997,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,
+ 61, 40, 41, 123, 125
};
# endif
-#define YYPACT_NINF -178
+#define YYPACT_NINF -180
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-178)))
+ (!!((Yystate) == (-180)))
#define YYTABLE_NINF -7
@@ -1013,48 +1016,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
+ 26, -147, -9, -180, -180, -180, -6, -180, 222, 9,
+ -96, 222, -180, 276, -41, -180, -93, -180, -90, -86,
+ -180, -84, -180, -180, -41, 0, 443, -41, -180, -180,
+ -83, -180, -82, -180, -180, 20, 27, -20, 21, -19,
+ -180, -180, -68, 276, -66, -180, 221, 328, -65, -55,
+ 38, -180, -180, -180, 99, 188, -69, -180, -41, -180,
+ -41, -180, -180, -180, -180, -180, -180, -180, -180, -180,
+ -180, -3, -40, -39, -180, -4, -180, -180, -77, -180,
+ -180, -180, 254, -180, -180, -180, -180, -180, -180, -180,
+ -180, 222, -180, -180, -180, -180, -180, -180, 9, -180,
+ 47, 90, -180, 222, -180, -180, -180, -180, -180, -180,
+ -180, -180, -180, -180, -180, -180, 98, -180, -31, 347,
+ -180, -180, -180, -84, -180, -180, -41, -180, -180, -180,
+ -180, -180, -180, -180, -180, -180, 443, -180, 61, -41,
+ -180, -180, -30, -180, -180, -180, -180, -180, -180, -180,
+ -180, 27, -180, -180, 102, 106, -180, -180, 55, -180,
+ -180, -180, -180, -19, -180, 87, -42, -180, 276, -180,
+ -180, -180, -180, -180, -180, -180, -180, -180, -180, 221,
+ -180, -3, -180, -180, -27, -180, -180, -180, -180, -180,
+ -180, -180, -180, 328, -180, 91, -3, -180, -180, 93,
+ -55, -180, -180, -180, 96, -180, -21, -180, -180, -180,
+ -180, -180, -180, -180, -180, -180, -180, -180, 3, -144,
+ -180, -180, -180, -180, -180, 100, -180, -5, -180, -180,
+ -180, -180, -23, 5, -180, -180, -180, -180, 7, 103,
+ -180, -180, 98, -180, -3, -27, -180, -180, -180, -180,
+ -180, -180, -180, -180, 462, -180, -180, 462, 462, -65,
+ -180, -180, 8, -180, -180, -180, -180, -180, -180, -180,
+ -180, -180, -180, -47, 138, -180, -180, -180, 425, -180,
+ -180, -180, -180, -180, -180, -180, -180, -105, -2, -15,
+ -180, -180, -180, -180, 25, -180, -180, 17, -180, -180,
+ -180, -180, -180, -180, -180, -180, -180, -180, -180, -180,
+ -180, -180, -180, -180, -180, -180, -180, -180, -180, -180,
+ -180, -180, -180, 462, 462, -180, 154, -65, 124, -180,
+ 125, -180, -180, -180, -180, -180, -180, -180, -180, -180,
+ -180, -180, -180, -180, -180, -180, -180, -180, -180, -180,
+ -51, -180, 32, 10, 16, -116, -180, 6, -180, -3,
+ -180, -180, -180, -180, -180, -180, -180, -180, -180, 462,
+ -180, -180, -180, -180, 15, -180, -180, -180, -41, -180,
+ -180, -180, 18, -180, -180, -180, 22, 24, -3, 23,
+ -169, -180, 36, -3, -180, -180, -180, 29, -94, -180,
+ -180, -180, -180, -180, 89, 37, 30, -180, 40, -180,
+ -3, -180, -180
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -1062,80 +1065,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, 228, 0, 71, 0, 0,
+ 238, 0, 221, 0, 0, 231, 0, 251, 0, 0,
+ 232, 0, 234, 25, 0, 0, 0, 0, 252, 229,
+ 0, 23, 0, 233, 22, 0, 0, 0, 0, 0,
+ 235, 21, 0, 0, 0, 230, 0, 0, 0, 0,
+ 0, 56, 57, 287, 0, 2, 0, 7, 0, 8,
+ 0, 9, 10, 13, 11, 12, 14, 15, 16, 17,
+ 18, 0, 0, 0, 215, 0, 216, 19, 0, 5,
+ 62, 63, 64, 195, 196, 197, 198, 201, 199, 200,
+ 202, 190, 192, 193, 194, 154, 155, 156, 126, 152,
+ 0, 236, 222, 189, 101, 102, 103, 104, 108, 105,
+ 106, 107, 109, 29, 30, 28, 0, 26, 0, 6,
+ 65, 66, 248, 223, 247, 280, 59, 61, 160, 161,
+ 162, 163, 164, 165, 166, 167, 127, 158, 0, 60,
+ 70, 278, 224, 67, 263, 264, 265, 266, 267, 268,
+ 269, 260, 262, 134, 29, 30, 134, 134, 26, 68,
+ 188, 186, 187, 182, 184, 0, 0, 225, 96, 100,
+ 97, 207, 208, 209, 210, 211, 212, 213, 214, 203,
+ 205, 0, 91, 86, 0, 87, 95, 93, 94, 92,
+ 90, 88, 89, 80, 82, 0, 0, 242, 274, 0,
+ 69, 273, 275, 271, 227, 1, 0, 4, 31, 55,
+ 285, 284, 217, 218, 219, 259, 258, 257, 0, 0,
+ 79, 75, 76, 77, 78, 0, 72, 0, 191, 151,
+ 153, 237, 98, 0, 178, 179, 180, 181, 0, 0,
+ 176, 177, 168, 170, 0, 0, 27, 220, 246, 279,
+ 157, 159, 277, 261, 130, 134, 134, 133, 128, 0,
+ 183, 185, 0, 99, 204, 206, 283, 281, 282, 85,
+ 81, 83, 84, 226, 0, 272, 270, 3, 20, 253,
+ 254, 255, 250, 256, 249, 291, 292, 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, 241, 0, 0, 243,
+ 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, 294, 0, 289, 0,
+ 111, 125, 121, 123, 119, 120, 122, 124, 112, 129,
+ 240, 239, 245, 244, 0, 45, 46, 53, 0, 288,
+ 286, 293, 0, 290, 276, 297, 0, 0, 0, 0,
+ 0, 299, 0, 0, 295, 298, 296, 0, 0, 304,
+ 305, 306, 307, 308, 0, 0, 0, 300, 0, 302,
+ 0, 301, 303
};
/* 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
+ -180, -180, -180, -37, -180, -180, -14, -36, -180, -180,
+ -180, -180, -180, -180, -180, -180, -180, -180, -180, -180,
+ -180, -180, -180, -180, -180, -180, 33, -180, -180, -180,
+ -180, -33, -180, -180, -180, -180, -180, -180, -153, -180,
+ -180, 131, -180, -180, 97, -180, -180, -180, -10, -180,
+ -180, -180, -180, 73, -180, -180, 227, -72, -180, -180,
+ -180, -180, 60, -180, -180, -180, -180, -180, -180, -180,
+ -180, -180, -180, -180, 119, -180, -180, -180, -180, -180,
+ -180, 92, -180, -180, 44, -180, -180, 218, 1, -179,
+ -180, -180, -180, -34, -180, -180, -107, -180, -180, -180,
+ -140, -180, -150, -180
};
/* 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, 278,
+ 346, 347, 348, 349, 350, 351, 352, 59, 60, 61,
+ 62, 82, 226, 227, 63, 193, 194, 195, 196, 64,
+ 168, 112, 232, 298, 299, 300, 368, 65, 254, 322,
+ 98, 99, 100, 136, 137, 138, 66, 242, 243, 244,
+ 245, 67, 163, 164, 165, 68, 91, 92, 93, 94,
+ 69, 179, 180, 181, 70, 71, 72, 73, 102, 167,
+ 371, 273, 329, 123, 124, 74, 75, 284, 218, 76,
+ 151, 152, 204, 200, 201, 202, 142, 126, 269, 212,
+ 77, 78, 287, 288, 289, 355, 356, 387, 357, 390,
+ 391, 404, 405, 406
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -1143,142 +1146,138 @@ 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, 265, 257, 258, 198, 292, 153, 279, 375,
+ 169, 266, 197, 293, 327, 389, 294, 272, 206, 228,
+ 95, 361, 160, 157, 113, 394, 114, 1, 353, 210,
+ 215, 228, 79, 267, 144, 145, 2, 285, 286, 353,
+ 3, 4, 5, 362, 208, 154, 209, 155, 6, 7,
+ 216, 80, 146, 295, 81, 8, 9, 211, 101, 10,
+ 127, 119, 11, 12, 120, 305, 13, 280, 121, 281,
+ 122, 140, 141, 217, 161, 14, 285, 286, 380, 15,
+ 143, 159, 247, 328, 296, 16, 166, 17, 170, 115,
+ 147, 399, 400, 401, 402, 403, 18, 19, 203, 205,
+ 20, 233, 323, 324, 21, 22, 96, 230, 23, 24,
+ 207, 97, 249, 115, 213, 214, 219, 25, 376, 148,
+ 363, 251, 231, 246, 252, 249, 156, 364, 162, 255,
+ 26, 27, 28, 256, 115, 263, 199, 29, 268, 259,
+ 234, 235, 236, 237, 365, 297, 30, 261, 262, 291,
+ 31, 271, 32, 274, 33, 34, 276, 282, 277, 301,
+ 290, 302, 326, 303, 35, 36, 37, 38, 39, 40,
+ 41, 42, 369, 330, 43, 359, 44, 358, 283, 360,
+ 383, 370, 149, 45, 373, 374, 377, 150, 46, 47,
+ 48, 366, 49, 50, 367, 379, 51, 52, 2, 382,
+ 378, 386, 3, 4, 5, -6, 53, 384, 389, 392,
+ 6, 7, 388, 393, 397, 396, 409, 8, 9, 411,
+ 410, 10, 398, 325, 11, 12, 270, 171, 13, 229,
+ 83, 412, 304, 250, 84, 238, 260, 14, 103, 264,
+ 85, 15, 248, 253, 275, 139, 306, 16, 381, 17,
+ 395, 239, 172, 354, 408, 0, 240, 241, 18, 19,
+ 0, 0, 20, 0, 0, 0, 21, 22, 0, 173,
+ 23, 24, 174, 0, 399, 400, 401, 402, 403, 25,
+ 0, 0, 220, 407, 0, 0, 0, 0, 0, 0,
+ 86, 372, 26, 27, 28, 0, 104, 0, 0, 29,
+ 105, 0, 0, 0, 221, 0, 0, 222, 30, 0,
+ 0, 0, 31, 0, 32, 0, 33, 34, 0, 0,
+ 0, 0, 0, 87, 88, 0, 35, 36, 37, 38,
+ 39, 40, 41, 42, 0, 0, 43, 0, 44, 0,
+ 89, 182, 0, 0, 175, 45, 0, 183, 0, 184,
+ 46, 47, 48, 0, 49, 50, 106, 2, 51, 52,
+ 0, 3, 4, 5, 385, 0, 0, -6, 53, 6,
+ 7, 90, 176, 177, 0, 185, 8, 9, 178, 0,
+ 10, 0, 0, 11, 12, 0, 0, 13, 223, 224,
+ 0, 0, 0, 0, 0, 225, 14, 0, 0, 0,
+ 15, 107, 0, 0, 0, 0, 16, 0, 17, 108,
+ 0, 0, 109, 0, 186, 0, 187, 18, 19, 0,
+ 0, 20, 188, 0, 189, 21, 22, 190, 0, 23,
+ 24, 0, 110, 0, 331, 0, 0, 111, 25, 0,
+ 0, 0, 332, 0, 0, 0, 0, 0, 0, 191,
+ 192, 26, 27, 28, 0, 0, 0, 0, 29, 0,
+ 0, 0, 0, 0, 0, 0, 0, 30, 0, 0,
+ 0, 31, 0, 32, 0, 33, 34, 333, 334, 0,
+ 0, 0, 0, 0, 0, 35, 36, 37, 38, 39,
+ 40, 41, 42, 0, 335, 43, 0, 44, 128, 129,
+ 130, 131, 0, 0, 45, 0, 0, 0, 307, 46,
+ 47, 48, 0, 49, 50, 336, 308, 51, 52, 0,
+ 0, 0, 0, 337, 0, 338, 0, 53, 132, 0,
+ 133, 0, 134, 0, 309, 310, 0, 311, 135, 339,
+ 0, 0, 0, 312, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 340, 341, 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,
+ 313, 314, 0, 0, 315, 316, 0, 317, 318, 319,
+ 0, 320, 0, 0, 0, 0, 0, 0, 0, 0,
+ 342, 0, 343, 0, 0, 0, 0, 344, 0, 0,
+ 0, 345, 0, 0, 0, 0, 0, 0, 0, 0,
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, 321
};
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,
+ 14, 37, 181, 156, 157, 60, 29, 27, 5, 60,
+ 43, 38, 48, 36, 61, 184, 39, 196, 55, 91,
+ 11, 4, 41, 37, 65, 194, 67, 1, 144, 32,
+ 34, 103, 179, 60, 7, 8, 10, 181, 182, 144,
+ 14, 15, 16, 26, 58, 65, 60, 67, 22, 23,
+ 54, 60, 25, 76, 60, 29, 30, 60, 154, 33,
+ 60, 154, 36, 37, 154, 244, 40, 64, 154, 66,
+ 154, 154, 154, 77, 93, 49, 181, 182, 194, 53,
+ 60, 60, 119, 130, 107, 59, 154, 61, 154, 154,
+ 63, 185, 186, 187, 188, 189, 70, 71, 60, 0,
+ 74, 3, 255, 256, 78, 79, 97, 60, 82, 83,
+ 179, 102, 126, 154, 154, 154, 193, 91, 169, 92,
+ 103, 60, 32, 154, 154, 139, 146, 110, 147, 27,
+ 104, 105, 106, 27, 154, 168, 191, 111, 165, 84,
+ 42, 43, 44, 45, 127, 168, 120, 60, 190, 154,
+ 124, 60, 126, 60, 128, 129, 60, 154, 179, 154,
+ 60, 154, 154, 60, 138, 139, 140, 141, 142, 143,
+ 144, 145, 325, 35, 148, 190, 150, 179, 175, 154,
+ 359, 27, 155, 157, 60, 60, 154, 160, 162, 163,
+ 164, 174, 166, 167, 177, 179, 170, 171, 10, 193,
+ 190, 183, 14, 15, 16, 179, 180, 192, 184, 388,
+ 22, 23, 190, 190, 393, 179, 179, 29, 30, 179,
+ 190, 33, 193, 259, 36, 37, 193, 6, 40, 98,
+ 8, 410, 242, 136, 12, 137, 163, 49, 11, 179,
+ 18, 53, 123, 151, 200, 27, 245, 59, 355, 61,
+ 390, 153, 31, 287, 404, -1, 158, 159, 70, 71,
+ -1, -1, 74, -1, -1, -1, 78, 79, -1, 48,
+ 82, 83, 51, -1, 185, 186, 187, 188, 189, 91,
+ -1, -1, 28, 194, -1, -1, -1, -1, -1, -1,
+ 68, 327, 104, 105, 106, -1, 20, -1, -1, 111,
+ 24, -1, -1, -1, 50, -1, -1, 53, 120, -1,
+ -1, -1, 124, -1, 126, -1, 128, 129, -1, -1,
+ -1, -1, -1, 101, 102, -1, 138, 139, 140, 141,
+ 142, 143, 144, 145, -1, -1, 148, -1, 150, -1,
+ 118, 13, -1, -1, 123, 157, -1, 19, -1, 21,
+ 162, 163, 164, -1, 166, 167, 80, 10, 170, 171,
+ -1, 14, 15, 16, 378, -1, -1, 179, 180, 22,
+ 23, 149, 151, 152, -1, 47, 29, 30, 157, -1,
+ 33, -1, -1, 36, 37, -1, -1, 40, 134, 135,
+ -1, -1, -1, -1, -1, 141, 49, -1, -1, -1,
+ 53, 125, -1, -1, -1, -1, 59, -1, 61, 133,
+ -1, -1, 136, -1, 86, -1, 88, 70, 71, -1,
+ -1, 74, 94, -1, 96, 78, 79, 99, -1, 82,
+ 83, -1, 156, -1, 9, -1, -1, 161, 91, -1,
+ -1, -1, 17, -1, -1, -1, -1, -1, -1, 121,
+ 122, 104, 105, 106, -1, -1, -1, -1, 111, -1,
+ -1, -1, -1, -1, -1, -1, -1, 120, -1, -1,
+ -1, 124, -1, 126, -1, 128, 129, 52, 53, -1,
+ -1, -1, -1, -1, -1, 138, 139, 140, 141, 142,
+ 143, 144, 145, -1, 69, 148, -1, 150, 55, 56,
+ 57, 58, -1, -1, 157, -1, -1, -1, 46, 162,
+ 163, 164, -1, 166, 167, 90, 54, 170, 171, -1,
+ -1, -1, -1, 98, -1, 100, -1, 180, 85, -1,
+ 87, -1, 89, -1, 72, 73, -1, 75, 95, 114,
+ -1, -1, -1, 81, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 131, 132, -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,
+ 108, 109, -1, -1, 112, 113, -1, 115, 116, 117,
+ -1, 119, -1, -1, -1, -1, -1, -1, -1, -1,
+ 165, -1, 167, -1, -1, -1, -1, 172, -1, -1,
+ -1, 176, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-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, 172
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1287,82 +1286,82 @@ 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, 157, 162, 163, 164, 166,
+ 167, 170, 171, 180, 196, 197, 198, 199, 200, 212,
+ 213, 214, 215, 219, 224, 232, 241, 246, 250, 255,
+ 259, 260, 261, 262, 270, 271, 274, 285, 286, 179,
+ 60, 60, 216, 8, 12, 18, 68, 101, 102, 118,
+ 149, 251, 252, 253, 254, 11, 97, 102, 235, 236,
+ 237, 154, 263, 251, 20, 24, 80, 125, 133, 136,
+ 156, 161, 226, 65, 67, 154, 201, 202, 203, 154,
+ 154, 154, 154, 268, 269, 201, 282, 60, 55, 56,
+ 57, 58, 85, 87, 89, 95, 238, 239, 240, 282,
+ 154, 154, 281, 60, 7, 8, 25, 63, 92, 155,
+ 160, 275, 276, 27, 65, 67, 146, 201, 202, 60,
+ 41, 93, 147, 247, 248, 249, 154, 264, 225, 226,
+ 154, 6, 31, 48, 51, 123, 151, 152, 157, 256,
+ 257, 258, 13, 19, 21, 47, 86, 88, 94, 96,
+ 99, 121, 122, 220, 221, 222, 223, 202, 60, 191,
+ 278, 279, 280, 60, 277, 0, 198, 179, 201, 201,
+ 32, 60, 284, 154, 154, 34, 54, 77, 273, 193,
+ 28, 50, 53, 134, 135, 141, 217, 218, 252, 236,
+ 60, 32, 227, 3, 42, 43, 44, 45, 137, 153,
+ 158, 159, 242, 243, 244, 245, 154, 198, 269, 201,
+ 239, 60, 154, 276, 233, 27, 27, 233, 233, 84,
+ 248, 60, 190, 226, 257, 284, 38, 60, 165, 283,
+ 221, 60, 284, 266, 60, 279, 60, 179, 204, 5,
+ 64, 66, 154, 175, 272, 181, 182, 287, 288, 289,
+ 60, 154, 29, 36, 39, 76, 107, 168, 228, 229,
+ 230, 154, 154, 60, 243, 284, 283, 46, 54, 72,
+ 73, 75, 81, 108, 109, 112, 113, 115, 116, 117,
+ 119, 172, 234, 233, 233, 202, 154, 61, 130, 267,
+ 35, 9, 17, 52, 53, 69, 90, 98, 100, 114,
+ 131, 132, 165, 167, 172, 176, 205, 206, 207, 208,
+ 209, 210, 211, 144, 288, 290, 291, 293, 179, 190,
+ 154, 4, 26, 103, 110, 127, 174, 177, 231, 233,
+ 27, 265, 202, 60, 60, 60, 169, 154, 190, 179,
+ 194, 291, 193, 284, 192, 201, 183, 292, 190, 184,
+ 294, 295, 284, 190, 194, 295, 179, 284, 193, 185,
+ 186, 187, 188, 189, 296, 297, 298, 194, 297, 179,
+ 190, 179, 284
};
/* 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, 195, 196, 197, 197, 197, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 199, 200, 200, 200, 200, 200, 201, 201, 202, 203,
+ 203, 204, 204, 205, 205, 205, 206, 207, 207, 207,
+ 207, 207, 207, 207, 207, 208, 208, 209, 209, 209,
+ 209, 209, 209, 210, 211, 212, 213, 213, 214, 214,
+ 214, 214, 215, 215, 215, 215, 215, 215, 215, 215,
+ 215, 216, 216, 217, 217, 218, 218, 218, 218, 218,
+ 219, 220, 220, 221, 221, 221, 222, 222, 222, 222,
+ 222, 222, 223, 223, 223, 223, 224, 224, 224, 225,
+ 225, 226, 226, 226, 226, 226, 226, 226, 226, 227,
+ 227, 228, 228, 228, 228, 229, 229, 230, 230, 231,
+ 231, 231, 231, 231, 231, 231, 232, 232, 232, 232,
+ 232, 232, 232, 232, 233, 233, 234, 234, 234, 234,
+ 234, 234, 234, 234, 234, 234, 234, 234, 234, 234,
+ 234, 235, 235, 236, 237, 237, 237, 238, 238, 239,
+ 240, 240, 240, 240, 240, 240, 240, 240, 241, 242,
+ 242, 243, 243, 243, 243, 243, 244, 244, 245, 245,
+ 245, 245, 246, 247, 247, 248, 249, 249, 249, 250,
+ 250, 251, 251, 252, 252, 253, 253, 253, 253, 253,
+ 253, 254, 254, 255, 256, 256, 257, 258, 258, 258,
+ 258, 258, 258, 258, 258, 259, 259, 259, 259, 259,
+ 259, 259, 259, 259, 259, 259, 259, 259, 260, 260,
+ 260, 261, 261, 261, 262, 262, 263, 263, 263, 264,
+ 265, 265, 266, 266, 267, 267, 268, 268, 269, 270,
+ 270, 271, 271, 272, 272, 272, 272, 273, 273, 273,
+ 274, 275, 275, 276, 276, 276, 276, 276, 276, 276,
+ 277, 277, 278, 278, 279, 279, 280, 281, 281, 282,
+ 282, 283, 283, 283, 284, 284, 285, 286, 287, 287,
+ 288, 289, 289, 290, 290, 291, 292, 293, 294, 294,
+ 295, 296, 296, 297, 298, 298, 298, 298, 298
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
@@ -1375,30 +1374,30 @@ 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, 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
+ 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, 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 +2076,7 @@ yyreduce:
switch (yyn)
{
case 5:
-#line 370 "ntp_parser.y" /* yacc.c:1646 */
+#line 371 "ntp_parser.y" /* yacc.c:1646 */
{
/* I will need to incorporate much more fine grained
* error messages. The following should suffice for
@@ -2089,85 +2088,85 @@ yyreduce:
ip_file->err_line_no,
ip_file->err_col_no);
}
-#line 2093 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2092 "ntp_parser.c" /* yacc.c:1646 */
break;
case 20:
-#line 405 "ntp_parser.y" /* yacc.c:1646 */
+#line 406 "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 2103 "ntp_parser.c" /* yacc.c:1646 */
break;
case 27:
-#line 424 "ntp_parser.y" /* yacc.c:1646 */
+#line 425 "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 2109 "ntp_parser.c" /* yacc.c:1646 */
break;
case 28:
-#line 429 "ntp_parser.y" /* yacc.c:1646 */
+#line 430 "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 2115 "ntp_parser.c" /* yacc.c:1646 */
break;
case 29:
-#line 434 "ntp_parser.y" /* yacc.c:1646 */
+#line 435 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET; }
-#line 2122 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2121 "ntp_parser.c" /* yacc.c:1646 */
break;
case 30:
-#line 436 "ntp_parser.y" /* yacc.c:1646 */
+#line 437 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = AF_INET6; }
-#line 2128 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2127 "ntp_parser.c" /* yacc.c:1646 */
break;
case 31:
-#line 441 "ntp_parser.y" /* yacc.c:1646 */
+#line 442 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2134 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2133 "ntp_parser.c" /* yacc.c:1646 */
break;
case 32:
-#line 443 "ntp_parser.y" /* yacc.c:1646 */
+#line 444 "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 2142 "ntp_parser.c" /* yacc.c:1646 */
break;
case 36:
-#line 457 "ntp_parser.y" /* yacc.c:1646 */
+#line 458 "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 2148 "ntp_parser.c" /* yacc.c:1646 */
break;
case 45:
-#line 473 "ntp_parser.y" /* yacc.c:1646 */
+#line 474 "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 2154 "ntp_parser.c" /* yacc.c:1646 */
break;
case 46:
-#line 475 "ntp_parser.y" /* yacc.c:1646 */
+#line 476 "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 2160 "ntp_parser.c" /* yacc.c:1646 */
break;
case 53:
-#line 489 "ntp_parser.y" /* yacc.c:1646 */
+#line 490 "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 2166 "ntp_parser.c" /* yacc.c:1646 */
break;
case 55:
-#line 503 "ntp_parser.y" /* yacc.c:1646 */
+#line 504 "ntp_parser.y" /* yacc.c:1646 */
{
unpeer_node *my_node;
@@ -2175,79 +2174,85 @@ yyreduce:
if (my_node)
APPEND_G_FIFO(cfgt.unpeers, my_node);
}
-#line 2179 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2178 "ntp_parser.c" /* yacc.c:1646 */
break;
case 58:
-#line 524 "ntp_parser.y" /* yacc.c:1646 */
+#line 525 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.broadcastclient = 1; }
-#line 2185 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2184 "ntp_parser.c" /* yacc.c:1646 */
break;
case 59:
-#line 526 "ntp_parser.y" /* yacc.c:1646 */
+#line 527 "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 2190 "ntp_parser.c" /* yacc.c:1646 */
break;
case 60:
-#line 528 "ntp_parser.y" /* yacc.c:1646 */
+#line 529 "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 2196 "ntp_parser.c" /* yacc.c:1646 */
break;
case 61:
-#line 539 "ntp_parser.y" /* yacc.c:1646 */
+#line 531 "ntp_parser.y" /* yacc.c:1646 */
+ { cfgt.mdnstries = (yyvsp[0].Integer); }
+#line 2202 "ntp_parser.c" /* yacc.c:1646 */
+ break;
+
+ case 62:
+#line 542 "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 2213 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 62:
-#line 546 "ntp_parser.y" /* yacc.c:1646 */
+ case 63:
+#line 549 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.control_key = (yyvsp[0].Integer); }
-#line 2214 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2219 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 63:
-#line 548 "ntp_parser.y" /* yacc.c:1646 */
+ case 64:
+#line 551 "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 2228 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 64:
-#line 553 "ntp_parser.y" /* yacc.c:1646 */
+ case 65:
+#line 556 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keys = (yyvsp[0].String); }
-#line 2229 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2234 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 65:
-#line 555 "ntp_parser.y" /* yacc.c:1646 */
+ case 66:
+#line 558 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.keysdir = (yyvsp[0].String); }
-#line 2235 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2240 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 66:
-#line 557 "ntp_parser.y" /* yacc.c:1646 */
+ case 67:
+#line 560 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.request_key = (yyvsp[0].Integer); }
-#line 2241 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2246 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 67:
-#line 559 "ntp_parser.y" /* yacc.c:1646 */
+ case 68:
+#line 562 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.revoke = (yyvsp[0].Integer); }
-#line 2247 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2252 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 68:
-#line 561 "ntp_parser.y" /* yacc.c:1646 */
+ case 69:
+#line 564 "ntp_parser.y" /* yacc.c:1646 */
{
cfgt.auth.trusted_key_list = (yyvsp[0].Attr_val_fifo);
@@ -2256,38 +2261,38 @@ yyreduce:
// else
// LINK_SLIST(cfgt.auth.trusted_key_list, $2, link);
}
-#line 2260 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2265 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 69:
-#line 570 "ntp_parser.y" /* yacc.c:1646 */
+ case 70:
+#line 573 "ntp_parser.y" /* yacc.c:1646 */
{ cfgt.auth.ntp_signd_socket = (yyvsp[0].String); }
-#line 2266 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2271 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 70:
-#line 575 "ntp_parser.y" /* yacc.c:1646 */
+ case 71:
+#line 578 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2272 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2277 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 71:
-#line 577 "ntp_parser.y" /* yacc.c:1646 */
+ case 72:
+#line 580 "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 2286 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 72:
-#line 585 "ntp_parser.y" /* yacc.c:1646 */
+ case 73:
+#line 588 "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 2292 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 73:
-#line 587 "ntp_parser.y" /* yacc.c:1646 */
+ case 74:
+#line 590 "ntp_parser.y" /* yacc.c:1646 */
{
(yyval.Attr_val) = NULL;
cfgt.auth.revoke = (yyvsp[0].Integer);
@@ -2296,59 +2301,59 @@ yyreduce:
"please use 'revoke %d' instead.",
cfgt.auth.revoke, cfgt.auth.revoke);
}
-#line 2300 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2305 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 79:
-#line 612 "ntp_parser.y" /* yacc.c:1646 */
+ case 80:
+#line 615 "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 2311 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 80:
-#line 617 "ntp_parser.y" /* yacc.c:1646 */
+ case 81:
+#line 620 "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 2320 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 81:
-#line 622 "ntp_parser.y" /* yacc.c:1646 */
+ case 82:
+#line 625 "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 2329 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 82:
-#line 630 "ntp_parser.y" /* yacc.c:1646 */
+ case 83:
+#line 633 "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 2335 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 83:
-#line 632 "ntp_parser.y" /* yacc.c:1646 */
+ case 84:
+#line 635 "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 2341 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 84:
-#line 634 "ntp_parser.y" /* yacc.c:1646 */
+ case 85:
+#line 637 "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 2347 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 95:
-#line 660 "ntp_parser.y" /* yacc.c:1646 */
+ case 96:
+#line 663 "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 2353 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 96:
-#line 662 "ntp_parser.y" /* yacc.c:1646 */
+ case 97:
+#line 665 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
cfgt.stats_dir = (yyvsp[0].String);
@@ -2357,55 +2362,55 @@ yyreduce:
yyerror(ip_file, "statsdir remote configuration ignored");
}
}
-#line 2361 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2366 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 97:
-#line 671 "ntp_parser.y" /* yacc.c:1646 */
+ case 98:
+#line 674 "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 2377 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 98:
-#line 681 "ntp_parser.y" /* yacc.c:1646 */
+ case 99:
+#line 684 "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 2386 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 99:
-#line 686 "ntp_parser.y" /* yacc.c:1646 */
+ case 100:
+#line 689 "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 2395 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 108:
-#line 705 "ntp_parser.y" /* yacc.c:1646 */
+ case 109:
+#line 708 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2396 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2401 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 109:
-#line 707 "ntp_parser.y" /* yacc.c:1646 */
+ case 110:
+#line 710 "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 2410 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 110:
-#line 715 "ntp_parser.y" /* yacc.c:1646 */
+ case 111:
+#line 718 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_sval((yyvsp[-1].Integer), (yyvsp[0].String));
@@ -2415,11 +2420,11 @@ yyreduce:
yyerror(ip_file, "filegen file remote config ignored");
}
}
-#line 2419 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2424 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 111:
-#line 725 "ntp_parser.y" /* yacc.c:1646 */
+ case 112:
+#line 728 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_ival((yyvsp[-1].Integer), (yyvsp[0].Integer));
@@ -2428,11 +2433,11 @@ yyreduce:
yyerror(ip_file, "filegen type remote config ignored");
}
}
-#line 2432 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2437 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 112:
-#line 734 "ntp_parser.y" /* yacc.c:1646 */
+ case 113:
+#line 737 "ntp_parser.y" /* yacc.c:1646 */
{
const char *err;
@@ -2447,33 +2452,33 @@ yyreduce:
yyerror(ip_file, err);
}
}
-#line 2451 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2456 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 113:
-#line 749 "ntp_parser.y" /* yacc.c:1646 */
+ case 114:
+#line 752 "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 2462 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 125:
-#line 779 "ntp_parser.y" /* yacc.c:1646 */
+ case 126:
+#line 782 "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 2470 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 126:
-#line 783 "ntp_parser.y" /* yacc.c:1646 */
+ case 127:
+#line 786 "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 2478 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 127:
-#line 787 "ntp_parser.y" /* yacc.c:1646 */
+ case 128:
+#line 790 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2481,11 +2486,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2485 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2490 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 128:
-#line 795 "ntp_parser.y" /* yacc.c:1646 */
+ case 129:
+#line 798 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2493,11 +2498,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2497 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2502 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 129:
-#line 803 "ntp_parser.y" /* yacc.c:1646 */
+ case 130:
+#line 806 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2505,11 +2510,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2509 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2514 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 130:
-#line 811 "ntp_parser.y" /* yacc.c:1646 */
+ case 131:
+#line 814 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2524,11 +2529,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2528 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2533 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 131:
-#line 826 "ntp_parser.y" /* yacc.c:1646 */
+ case 132:
+#line 829 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node *rn;
@@ -2543,11 +2548,11 @@ yyreduce:
ip_file->line_no);
APPEND_G_FIFO(cfgt.restrict_opts, rn);
}
-#line 2547 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2552 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 132:
-#line 841 "ntp_parser.y" /* yacc.c:1646 */
+ case 133:
+#line 844 "ntp_parser.y" /* yacc.c:1646 */
{
restrict_node * rn;
@@ -2556,199 +2561,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 2565 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 133:
-#line 853 "ntp_parser.y" /* yacc.c:1646 */
+ case 134:
+#line 856 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Int_fifo) = NULL; }
-#line 2566 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2571 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 134:
-#line 855 "ntp_parser.y" /* yacc.c:1646 */
+ case 135:
+#line 858 "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 2580 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 150:
-#line 881 "ntp_parser.y" /* yacc.c:1646 */
+ case 151:
+#line 884 "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 2589 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 151:
-#line 886 "ntp_parser.y" /* yacc.c:1646 */
+ case 152:
+#line 889 "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 2598 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 152:
-#line 894 "ntp_parser.y" /* yacc.c:1646 */
+ case 153:
+#line 897 "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 2604 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 156:
-#line 905 "ntp_parser.y" /* yacc.c:1646 */
+ case 157:
+#line 908 "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 2613 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 157:
-#line 910 "ntp_parser.y" /* yacc.c:1646 */
+ case 158:
+#line 913 "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 2622 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 158:
-#line 918 "ntp_parser.y" /* yacc.c:1646 */
+ case 159:
+#line 921 "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 2628 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 167:
-#line 938 "ntp_parser.y" /* yacc.c:1646 */
+ case 168:
+#line 941 "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 2639 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 168:
-#line 948 "ntp_parser.y" /* yacc.c:1646 */
+ case 169:
+#line 951 "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 2648 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 169:
-#line 953 "ntp_parser.y" /* yacc.c:1646 */
+ case 170:
+#line 956 "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 */
+#line 2657 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 170:
-#line 961 "ntp_parser.y" /* yacc.c:1646 */
+ case 171:
+#line 964 "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 */
+ case 172:
+#line 966 "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 2669 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 172:
-#line 965 "ntp_parser.y" /* yacc.c:1646 */
+ case 173:
+#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 */
+ case 174:
+#line 970 "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 2681 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 174:
-#line 969 "ntp_parser.y" /* yacc.c:1646 */
+ case 175:
+#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 */
+ case 182:
+#line 993 "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 */
+#line 2693 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 182:
-#line 995 "ntp_parser.y" /* yacc.c:1646 */
+ case 183:
+#line 998 "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 2702 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 183:
-#line 1000 "ntp_parser.y" /* yacc.c:1646 */
+ case 184:
+#line 1003 "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 2711 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 184:
-#line 1008 "ntp_parser.y" /* yacc.c:1646 */
+ case 185:
+#line 1011 "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 2717 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 188:
-#line 1024 "ntp_parser.y" /* yacc.c:1646 */
+ case 189:
+#line 1027 "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 2723 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 189:
-#line 1026 "ntp_parser.y" /* yacc.c:1646 */
+ case 190:
+#line 1029 "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 2729 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 190:
-#line 1031 "ntp_parser.y" /* yacc.c:1646 */
+ case 191:
+#line 1034 "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 2738 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 191:
-#line 1036 "ntp_parser.y" /* yacc.c:1646 */
+ case 192:
+#line 1039 "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 2747 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 192:
-#line 1044 "ntp_parser.y" /* yacc.c:1646 */
+ case 193:
+#line 1047 "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 2753 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 193:
-#line 1046 "ntp_parser.y" /* yacc.c:1646 */
+ case 194:
+#line 1049 "ntp_parser.y" /* yacc.c:1646 */
{
if (input_from_file) {
(yyval.Attr_val) = create_attr_ival(T_Flag, (yyvsp[0].Integer));
@@ -2762,63 +2767,63 @@ yyreduce:
yyerror(ip_file, err_str);
}
}
-#line 2766 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2771 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 202:
-#line 1081 "ntp_parser.y" /* yacc.c:1646 */
+ case 203:
+#line 1084 "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 2777 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 203:
-#line 1086 "ntp_parser.y" /* yacc.c:1646 */
+ case 204:
+#line 1089 "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 2786 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 204:
-#line 1091 "ntp_parser.y" /* yacc.c:1646 */
+ case 205:
+#line 1094 "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 2795 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 205:
-#line 1099 "ntp_parser.y" /* yacc.c:1646 */
+ case 206:
+#line 1102 "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 2801 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 216:
-#line 1122 "ntp_parser.y" /* yacc.c:1646 */
+ case 217:
+#line 1125 "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 2812 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 217:
-#line 1129 "ntp_parser.y" /* yacc.c:1646 */
+ case 218:
+#line 1132 "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 2823 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 218:
-#line 1136 "ntp_parser.y" /* yacc.c:1646 */
+ case 219:
+#line 1139 "ntp_parser.y" /* yacc.c:1646 */
{
char error_text[64];
attr_val *av;
@@ -2834,11 +2839,11 @@ yyreduce:
yyerror(ip_file, error_text);
}
}
-#line 2838 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2843 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 219:
-#line 1152 "ntp_parser.y" /* yacc.c:1646 */
+ case 220:
+#line 1155 "ntp_parser.y" /* yacc.c:1646 */
{
if (!input_from_file) {
yyerror(ip_file, "remote includefile ignored");
@@ -2857,72 +2862,72 @@ yyreduce:
}
}
}
-#line 2861 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2866 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 220:
-#line 1171 "ntp_parser.y" /* yacc.c:1646 */
+ case 221:
+#line 1174 "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 2875 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 221:
-#line 1176 "ntp_parser.y" /* yacc.c:1646 */
+ case 222:
+#line 1179 "ntp_parser.y" /* yacc.c:1646 */
{ /* see drift_parm below for actions */ }
-#line 2876 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2881 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 222:
-#line 1178 "ntp_parser.y" /* yacc.c:1646 */
+ case 223:
+#line 1181 "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 2887 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 223:
-#line 1180 "ntp_parser.y" /* yacc.c:1646 */
+ case 224:
+#line 1183 "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 2893 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 224:
-#line 1182 "ntp_parser.y" /* yacc.c:1646 */
+ case 225:
+#line 1185 "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 2899 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 225:
-#line 1184 "ntp_parser.y" /* yacc.c:1646 */
+ case 226:
+#line 1187 "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 2910 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 226:
-#line 1191 "ntp_parser.y" /* yacc.c:1646 */
+ case 227:
+#line 1194 "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 2916 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 235:
-#line 1213 "ntp_parser.y" /* yacc.c:1646 */
+ case 236:
+#line 1216 "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 2927 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 236:
-#line 1220 "ntp_parser.y" /* yacc.c:1646 */
+ case 237:
+#line 1223 "ntp_parser.y" /* yacc.c:1646 */
{
attr_val *av;
@@ -2931,82 +2936,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 2940 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 237:
-#line 1229 "ntp_parser.y" /* yacc.c:1646 */
+ case 238:
+#line 1232 "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 2951 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 238:
-#line 1239 "ntp_parser.y" /* yacc.c:1646 */
+ case 239:
+#line 1242 "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 2957 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 240:
-#line 1245 "ntp_parser.y" /* yacc.c:1646 */
+ case 241:
+#line 1248 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 2958 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2963 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 241:
-#line 1250 "ntp_parser.y" /* yacc.c:1646 */
+ case 242:
+#line 1253 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Attr_val_fifo) = NULL; }
-#line 2964 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 2969 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 242:
-#line 1252 "ntp_parser.y" /* yacc.c:1646 */
+ case 243:
+#line 1255 "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 2978 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 243:
-#line 1260 "ntp_parser.y" /* yacc.c:1646 */
+ case 244:
+#line 1263 "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 2984 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 244:
-#line 1262 "ntp_parser.y" /* yacc.c:1646 */
+ case 245:
+#line 1265 "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 2993 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 245:
-#line 1270 "ntp_parser.y" /* yacc.c:1646 */
+ case 246:
+#line 1273 "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 3002 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 246:
-#line 1275 "ntp_parser.y" /* yacc.c:1646 */
+ case 247:
+#line 1278 "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 3011 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 247:
-#line 1283 "ntp_parser.y" /* yacc.c:1646 */
+ case 248:
+#line 1286 "ntp_parser.y" /* yacc.c:1646 */
{
char prefix;
char * type;
@@ -3028,141 +3033,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 3037 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 248:
-#line 1308 "ntp_parser.y" /* yacc.c:1646 */
+ case 249:
+#line 1311 "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 3048 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 249:
-#line 1315 "ntp_parser.y" /* yacc.c:1646 */
+ case 250:
+#line 1318 "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 3059 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 259:
-#line 1343 "ntp_parser.y" /* yacc.c:1646 */
+ case 260:
+#line 1346 "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 3065 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 260:
-#line 1348 "ntp_parser.y" /* yacc.c:1646 */
+ case 261:
+#line 1351 "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 3074 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 261:
-#line 1353 "ntp_parser.y" /* yacc.c:1646 */
+ case 262:
+#line 1356 "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 3083 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 269:
-#line 1377 "ntp_parser.y" /* yacc.c:1646 */
+ case 270:
+#line 1380 "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 3092 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 270:
-#line 1382 "ntp_parser.y" /* yacc.c:1646 */
+ case 271:
+#line 1385 "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 3101 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 271:
-#line 1390 "ntp_parser.y" /* yacc.c:1646 */
+ case 272:
+#line 1393 "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 3110 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 272:
-#line 1395 "ntp_parser.y" /* yacc.c:1646 */
+ case 273:
+#line 1398 "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 3119 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 273:
-#line 1403 "ntp_parser.y" /* yacc.c:1646 */
+ case 274:
+#line 1406 "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 3125 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 275:
-#line 1409 "ntp_parser.y" /* yacc.c:1646 */
+ case 276:
+#line 1412 "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 3131 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 276:
-#line 1414 "ntp_parser.y" /* yacc.c:1646 */
+ case 277:
+#line 1417 "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 3140 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 277:
-#line 1419 "ntp_parser.y" /* yacc.c:1646 */
+ case 278:
+#line 1422 "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 3149 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 278:
-#line 1427 "ntp_parser.y" /* yacc.c:1646 */
+ case 279:
+#line 1430 "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 3158 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 279:
-#line 1432 "ntp_parser.y" /* yacc.c:1646 */
+ case 280:
+#line 1435 "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 3167 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 280:
-#line 1440 "ntp_parser.y" /* yacc.c:1646 */
+ case 281:
+#line 1443 "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 +3176,29 @@ yyreduce:
(yyval.Integer) = (yyvsp[0].Integer);
}
}
-#line 3175 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3180 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 281:
-#line 1448 "ntp_parser.y" /* yacc.c:1646 */
+ case 282:
+#line 1451 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 1; }
-#line 3181 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3186 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 282:
-#line 1449 "ntp_parser.y" /* yacc.c:1646 */
+ case 283:
+#line 1452 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Integer) = 0; }
-#line 3187 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3192 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 283:
-#line 1453 "ntp_parser.y" /* yacc.c:1646 */
+ case 284:
+#line 1456 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (double)(yyvsp[0].Integer); }
-#line 3193 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3198 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 285:
-#line 1464 "ntp_parser.y" /* yacc.c:1646 */
+ case 286:
+#line 1467 "ntp_parser.y" /* yacc.c:1646 */
{
sim_node *sn;
@@ -3203,125 +3208,125 @@ yyreduce:
/* Revert from ; to \n for end-of-command */
old_config_style = 1;
}
-#line 3207 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3212 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 286:
-#line 1481 "ntp_parser.y" /* yacc.c:1646 */
+ case 287:
+#line 1484 "ntp_parser.y" /* yacc.c:1646 */
{ old_config_style = 0; }
-#line 3213 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3218 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 287:
-#line 1486 "ntp_parser.y" /* yacc.c:1646 */
+ case 288:
+#line 1489 "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 3227 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 288:
-#line 1491 "ntp_parser.y" /* yacc.c:1646 */
+ case 289:
+#line 1494 "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 3236 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 289:
-#line 1499 "ntp_parser.y" /* yacc.c:1646 */
+ case 290:
+#line 1502 "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 3242 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 292:
-#line 1509 "ntp_parser.y" /* yacc.c:1646 */
+ case 293:
+#line 1512 "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 3251 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 293:
-#line 1514 "ntp_parser.y" /* yacc.c:1646 */
+ case 294:
+#line 1517 "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 3260 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 294:
-#line 1522 "ntp_parser.y" /* yacc.c:1646 */
+ case 295:
+#line 1525 "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 3266 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 295:
-#line 1527 "ntp_parser.y" /* yacc.c:1646 */
+ case 296:
+#line 1530 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Double) = (yyvsp[-1].Double); }
-#line 3267 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3272 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 296:
-#line 1532 "ntp_parser.y" /* yacc.c:1646 */
+ case 297:
+#line 1535 "ntp_parser.y" /* yacc.c:1646 */
{ (yyval.Address_node) = (yyvsp[0].Address_node); }
-#line 3273 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3278 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 297:
-#line 1537 "ntp_parser.y" /* yacc.c:1646 */
+ case 298:
+#line 1540 "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 3287 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 298:
-#line 1542 "ntp_parser.y" /* yacc.c:1646 */
+ case 299:
+#line 1545 "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 3296 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 299:
-#line 1550 "ntp_parser.y" /* yacc.c:1646 */
+ case 300:
+#line 1553 "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 3302 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 300:
-#line 1555 "ntp_parser.y" /* yacc.c:1646 */
+ case 301:
+#line 1558 "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 3311 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 301:
-#line 1560 "ntp_parser.y" /* yacc.c:1646 */
+ case 302:
+#line 1563 "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 3320 "ntp_parser.c" /* yacc.c:1646 */
break;
- case 302:
-#line 1568 "ntp_parser.y" /* yacc.c:1646 */
+ case 303:
+#line 1571 "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 3326 "ntp_parser.c" /* yacc.c:1646 */
break;
-#line 3325 "../../ntpd/ntp_parser.c" /* yacc.c:1646 */
+#line 3330 "ntp_parser.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -3549,7 +3554,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 1579 "ntp_parser.y" /* yacc.c:1906 */
+#line 1582 "ntp_parser.y" /* yacc.c:1906 */
void
diff --git a/ntpd/ntp_parser.h b/ntpd/ntp_parser.h
index c8301572244b..fc2e971ce0a9 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,105 @@ 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_Stepout = 407,
+ T_Stratum = 408,
+ T_String = 409,
+ T_Sys = 410,
+ T_Sysstats = 411,
+ T_Tick = 412,
+ T_Time1 = 413,
+ T_Time2 = 414,
+ T_Timer = 415,
+ T_Timingstats = 416,
+ T_Tinker = 417,
+ T_Tos = 418,
+ T_Trap = 419,
+ T_True = 420,
+ T_Trustedkey = 421,
+ T_Ttl = 422,
+ T_Type = 423,
+ T_U_int = 424,
+ T_Unconfig = 425,
+ T_Unpeer = 426,
+ T_Version = 427,
+ T_WanderThreshold = 428,
+ T_Week = 429,
+ T_Wildcard = 430,
+ T_Xleave = 431,
+ T_Year = 432,
+ T_Flag = 433,
+ T_EOC = 434,
+ T_Simulate = 435,
+ T_Beep_Delay = 436,
+ T_Sim_Duration = 437,
+ T_Server_Offset = 438,
+ T_Duration = 439,
+ T_Freq_Offset = 440,
+ T_Wander = 441,
+ T_Jitter = 442,
+ T_Prop_Delay = 443,
+ T_Proc_Delay = 444
};
#endif
/* Tokens. */
@@ -322,104 +323,105 @@ 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_Stepout 407
+#define T_Stratum 408
+#define T_String 409
+#define T_Sys 410
+#define T_Sysstats 411
+#define T_Tick 412
+#define T_Time1 413
+#define T_Time2 414
+#define T_Timer 415
+#define T_Timingstats 416
+#define T_Tinker 417
+#define T_Tos 418
+#define T_Trap 419
+#define T_True 420
+#define T_Trustedkey 421
+#define T_Ttl 422
+#define T_Type 423
+#define T_U_int 424
+#define T_Unconfig 425
+#define T_Unpeer 426
+#define T_Version 427
+#define T_WanderThreshold 428
+#define T_Week 429
+#define T_Wildcard 430
+#define T_Xleave 431
+#define T_Year 432
+#define T_Flag 433
+#define T_EOC 434
+#define T_Simulate 435
+#define T_Beep_Delay 436
+#define T_Sim_Duration 437
+#define T_Server_Offset 438
+#define T_Duration 439
+#define T_Freq_Offset 440
+#define T_Wander 441
+#define T_Jitter 442
+#define T_Prop_Delay 443
+#define T_Proc_Delay 444
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -445,7 +447,7 @@ union YYSTYPE
script_info * Sim_script;
script_info_fifo * Sim_script_fifo;
-#line 449 "../../ntpd/ntp_parser.h" /* yacc.c:1909 */
+#line 451 "ntp_parser.h" /* yacc.c:1909 */
};
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
@@ -456,4 +458,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 e75bffe4f580..c55e0697dee4 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
@@ -526,6 +527,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; }
;
diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
index 091fcf527ff8..37c3f0325e07 100644
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -493,11 +493,11 @@ receive(
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;
@@ -706,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;
}
@@ -744,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(
@@ -2101,7 +2101,7 @@ poll_update(
void
peer_clear(
struct peer *peer, /* peer structure */
- char *ident /* tally lights */
+ const char *ident /* tally lights */
)
{
u_char u;
@@ -2391,7 +2391,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;
@@ -2420,7 +2420,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;
@@ -2990,7 +2989,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;
@@ -3074,7 +3073,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);
@@ -3321,7 +3320,7 @@ 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);
}
@@ -3363,7 +3362,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;
@@ -3388,7 +3387,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);
@@ -3599,7 +3598,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));
@@ -3705,7 +3704,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 157304b6da52..8ffebad32882 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 6e7566713e8d..9948d54d9e90 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 3e098562dda7..a7c19922bd53 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 a7da52b86141..c4bc9011a518 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 82fe62477fdc..953f39750de6 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 19, 2014 at 07:46:33 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed February 4, 2015 at 02:39:17 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+310)
+#define zLicenseDescrip (ntpd_opt_strs+340)
/*
* global included definitions
@@ -74,150 +74,151 @@ extern FILE * option_usage_fp;
/**
* static const strings for ntpd options
*/
-static char const ntpd_opt_strs[2999] =
-/* 0 */ "ntpd 4.2.8\n"
- "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n"
+static char const ntpd_opt_strs[3061] =
+/* 0 */ "ntpd 4.2.8p1\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"
-/* 310 */ "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"
-/* 950 */ "Force IPv4 DNS name resolution\0"
-/* 981 */ "IPV4\0"
-/* 986 */ "ipv4\0"
-/* 991 */ "Force IPv6 DNS name resolution\0"
-/* 1022 */ "IPV6\0"
-/* 1027 */ "ipv6\0"
-/* 1032 */ "Require crypto authentication\0"
-/* 1062 */ "AUTHREQ\0"
-/* 1070 */ "authreq\0"
-/* 1078 */ "Do not require crypto authentication\0"
-/* 1115 */ "AUTHNOREQ\0"
-/* 1125 */ "authnoreq\0"
-/* 1135 */ "Allow us to sync to broadcast servers\0"
-/* 1173 */ "BCASTSYNC\0"
-/* 1183 */ "bcastsync\0"
-/* 1193 */ "configuration file name\0"
-/* 1217 */ "CONFIGFILE\0"
-/* 1228 */ "configfile\0"
-/* 1239 */ "Increase debug verbosity level\0"
-/* 1270 */ "DEBUG_LEVEL\0"
-/* 1282 */ "debug-level\0"
-/* 1294 */ "Set the debug verbosity level\0"
-/* 1324 */ "SET_DEBUG_LEVEL\0"
-/* 1340 */ "set-debug-level\0"
-/* 1356 */ "frequency drift file name\0"
-/* 1382 */ "DRIFTFILE\0"
-/* 1392 */ "driftfile\0"
-/* 1402 */ "Allow the first adjustment to be Big\0"
-/* 1439 */ "PANICGATE\0"
-/* 1449 */ "panicgate\0"
-/* 1459 */ "Jail directory\0"
-/* 1474 */ "JAILDIR\0"
-/* 1482 */ "jaildir\0"
-/* 1490 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
-/* 1569 */ "Listen on an interface name or address\0"
-/* 1608 */ "INTERFACE\0"
-/* 1618 */ "interface\0"
-/* 1628 */ "path to symmetric keys\0"
-/* 1651 */ "KEYFILE\0"
-/* 1659 */ "keyfile\0"
-/* 1667 */ "path to the log file\0"
-/* 1688 */ "LOGFILE\0"
-/* 1696 */ "logfile\0"
-/* 1704 */ "Do not listen to virtual interfaces\0"
-/* 1740 */ "NOVIRTUALIPS\0"
-/* 1753 */ "novirtualips\0"
-/* 1766 */ "Modify Multimedia Timer (Windows only)\0"
-/* 1805 */ "MODIFYMMTIMER\0"
-/* 1819 */ "modifymmtimer\0"
-/* 1833 */ "Do not fork\0"
-/* 1845 */ "NOFORK\0"
-/* 1852 */ "nofork\0"
-/* 1859 */ "Run at high priority\0"
-/* 1880 */ "NICE\0"
-/* 1885 */ "nice\0"
-/* 1890 */ "path to the PID file\0"
-/* 1911 */ "PIDFILE\0"
-/* 1919 */ "pidfile\0"
-/* 1927 */ "Process priority\0"
-/* 1944 */ "PRIORITY\0"
-/* 1953 */ "priority\0"
-/* 1962 */ "Set the time and quit\0"
-/* 1984 */ "QUIT\0"
-/* 1989 */ "quit\0"
-/* 1994 */ "Broadcast/propagation delay\0"
-/* 2022 */ "PROPAGATIONDELAY\0"
-/* 2039 */ "propagationdelay\0"
-/* 2056 */ "Save parsed configuration and quit\0"
-/* 2091 */ "SAVECONFIGQUIT\0"
-/* 2106 */ "saveconfigquit\0"
-/* 2121 */ "Statistics file location\0"
-/* 2146 */ "STATSDIR\0"
-/* 2155 */ "statsdir\0"
-/* 2164 */ "Trusted key number\0"
-/* 2183 */ "TRUSTEDKEY\0"
-/* 2194 */ "trustedkey\0"
-/* 2205 */ "Run as userid (or userid:groupid)\0"
-/* 2239 */ "USER\0"
-/* 2244 */ "user\0"
-/* 2249 */ "interval in seconds between scans for new or dropped interfaces\0"
-/* 2313 */ "UPDATEINTERVAL\0"
-/* 2328 */ "updateinterval\0"
-/* 2343 */ "make ARG an ntp variable (RW)\0"
-/* 2373 */ "VAR\0"
-/* 2377 */ "var\0"
-/* 2381 */ "make ARG an ntp variable (RW|DEF)\0"
-/* 2415 */ "DVAR\0"
-/* 2420 */ "dvar\0"
-/* 2425 */ "Seconds to wait for first clock sync\0"
-/* 2462 */ "WAIT_SYNC\0"
-/* 2472 */ "wait-sync\0"
-/* 2482 */ "Slew up to 600 seconds\0"
-/* 2505 */ "SLEW\0"
-/* 2510 */ "slew\0"
-/* 2515 */ "Use CPU cycle counter (Windows only)\0"
-/* 2552 */ "USEPCC\0"
-/* 2559 */ "usepcc\0"
-/* 2566 */ "Force CPU cycle counter use (Windows only)\0"
-/* 2609 */ "PCCFREQ\0"
-/* 2617 */ "pccfreq\0"
-/* 2625 */ "Register with mDNS as a NTP server\0"
-/* 2660 */ "MDNS\0"
-/* 2665 */ "mdns\0"
-/* 2670 */ "display extended usage information and exit\0"
-/* 2714 */ "help\0"
-/* 2719 */ "extended usage information passed thru pager\0"
-/* 2764 */ "more-help\0"
-/* 2774 */ "output version information and exit\0"
-/* 2810 */ "version\0"
-/* 2818 */ "NTPD\0"
-/* 2823 */ "ntpd - NTP daemon program - Ver. 4.2.8\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 */ "Jail directory\0"
+/* 1532 */ "JAILDIR\0"
+/* 1540 */ "jaildir\0"
+/* 1548 */ "built without --enable-clockctl or --enable-linuxcaps or --enable-solarisprivs\0"
+/* 1627 */ "Listen on an interface name or address\0"
+/* 1666 */ "INTERFACE\0"
+/* 1676 */ "interface\0"
+/* 1686 */ "path to symmetric keys\0"
+/* 1709 */ "KEYFILE\0"
+/* 1717 */ "keyfile\0"
+/* 1725 */ "path to the log file\0"
+/* 1746 */ "LOGFILE\0"
+/* 1754 */ "logfile\0"
+/* 1762 */ "Do not listen to virtual interfaces\0"
+/* 1798 */ "NOVIRTUALIPS\0"
+/* 1811 */ "novirtualips\0"
+/* 1824 */ "Modify Multimedia Timer (Windows only)\0"
+/* 1863 */ "MODIFYMMTIMER\0"
+/* 1877 */ "modifymmtimer\0"
+/* 1891 */ "Do not fork\0"
+/* 1903 */ "NOFORK\0"
+/* 1910 */ "nofork\0"
+/* 1917 */ "Run at high priority\0"
+/* 1938 */ "NICE\0"
+/* 1943 */ "nice\0"
+/* 1948 */ "path to the PID file\0"
+/* 1969 */ "PIDFILE\0"
+/* 1977 */ "pidfile\0"
+/* 1985 */ "Process priority\0"
+/* 2002 */ "PRIORITY\0"
+/* 2011 */ "priority\0"
+/* 2020 */ "Set the time and quit\0"
+/* 2042 */ "QUIT\0"
+/* 2047 */ "quit\0"
+/* 2052 */ "Broadcast/propagation delay\0"
+/* 2080 */ "PROPAGATIONDELAY\0"
+/* 2097 */ "propagationdelay\0"
+/* 2114 */ "Save parsed configuration and quit\0"
+/* 2149 */ "SAVECONFIGQUIT\0"
+/* 2164 */ "saveconfigquit\0"
+/* 2179 */ "Statistics file location\0"
+/* 2204 */ "STATSDIR\0"
+/* 2213 */ "statsdir\0"
+/* 2222 */ "Trusted key number\0"
+/* 2241 */ "TRUSTEDKEY\0"
+/* 2252 */ "trustedkey\0"
+/* 2263 */ "Run as userid (or userid:groupid)\0"
+/* 2297 */ "USER\0"
+/* 2302 */ "user\0"
+/* 2307 */ "interval in seconds between scans for new or dropped interfaces\0"
+/* 2371 */ "UPDATEINTERVAL\0"
+/* 2386 */ "updateinterval\0"
+/* 2401 */ "make ARG an ntp variable (RW)\0"
+/* 2431 */ "VAR\0"
+/* 2435 */ "var\0"
+/* 2439 */ "make ARG an ntp variable (RW|DEF)\0"
+/* 2473 */ "DVAR\0"
+/* 2478 */ "dvar\0"
+/* 2483 */ "Seconds to wait for first clock sync\0"
+/* 2520 */ "WAIT_SYNC\0"
+/* 2530 */ "wait-sync\0"
+/* 2540 */ "Slew up to 600 seconds\0"
+/* 2563 */ "SLEW\0"
+/* 2568 */ "slew\0"
+/* 2573 */ "Use CPU cycle counter (Windows only)\0"
+/* 2610 */ "USEPCC\0"
+/* 2617 */ "usepcc\0"
+/* 2624 */ "Force CPU cycle counter use (Windows only)\0"
+/* 2667 */ "PCCFREQ\0"
+/* 2675 */ "pccfreq\0"
+/* 2683 */ "Register with mDNS as a NTP server\0"
+/* 2718 */ "MDNS\0"
+/* 2723 */ "mdns\0"
+/* 2728 */ "display extended usage information and exit\0"
+/* 2772 */ "help\0"
+/* 2777 */ "extended usage information passed thru pager\0"
+/* 2822 */ "more-help\0"
+/* 2832 */ "output version information and exit\0"
+/* 2868 */ "version\0"
+/* 2876 */ "NTPD\0"
+/* 2881 */ "ntpd - NTP daemon program - Ver. 4.2.8p1\n"
"Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n"
"\t\t[ <server1> ... <serverN> ]\n\0"
-/* 2952 */ "http://bugs.ntp.org, bugs@ntp.org\0"
-/* 2986 */ "\n\0"
-/* 2988 */ "ntpd 4.2.8";
+/* 3012 */ "http://bugs.ntp.org, bugs@ntp.org\0"
+/* 3046 */ "\n\0"
+/* 3048 */ "ntpd 4.2.8p1";
/**
* ipv4 option description with
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv4 option */
-#define IPV4_DESC (ntpd_opt_strs+950)
+#define IPV4_DESC (ntpd_opt_strs+1008)
/** Upper-cased name for the ipv4 option */
-#define IPV4_NAME (ntpd_opt_strs+981)
+#define IPV4_NAME (ntpd_opt_strs+1039)
/** Name string for the ipv4 option */
-#define IPV4_name (ntpd_opt_strs+986)
+#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 +230,11 @@ static int const aIpv4CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the ipv6 option */
-#define IPV6_DESC (ntpd_opt_strs+991)
+#define IPV6_DESC (ntpd_opt_strs+1049)
/** Upper-cased name for the ipv6 option */
-#define IPV6_NAME (ntpd_opt_strs+1022)
+#define IPV6_NAME (ntpd_opt_strs+1080)
/** Name string for the ipv6 option */
-#define IPV6_name (ntpd_opt_strs+1027)
+#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 +246,11 @@ static int const aIpv6CantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the authreq option */
-#define AUTHREQ_DESC (ntpd_opt_strs+1032)
+#define AUTHREQ_DESC (ntpd_opt_strs+1090)
/** Upper-cased name for the authreq option */
-#define AUTHREQ_NAME (ntpd_opt_strs+1062)
+#define AUTHREQ_NAME (ntpd_opt_strs+1120)
/** Name string for the authreq option */
-#define AUTHREQ_name (ntpd_opt_strs+1070)
+#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 +262,11 @@ static int const aAuthreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the authnoreq option */
-#define AUTHNOREQ_DESC (ntpd_opt_strs+1078)
+#define AUTHNOREQ_DESC (ntpd_opt_strs+1136)
/** Upper-cased name for the authnoreq option */
-#define AUTHNOREQ_NAME (ntpd_opt_strs+1115)
+#define AUTHNOREQ_NAME (ntpd_opt_strs+1173)
/** Name string for the authnoreq option */
-#define AUTHNOREQ_name (ntpd_opt_strs+1125)
+#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 +277,11 @@ static int const aAuthnoreqCantList[] = {
* bcastsync option description:
*/
/** Descriptive text for the bcastsync option */
-#define BCASTSYNC_DESC (ntpd_opt_strs+1135)
+#define BCASTSYNC_DESC (ntpd_opt_strs+1193)
/** Upper-cased name for the bcastsync option */
-#define BCASTSYNC_NAME (ntpd_opt_strs+1173)
+#define BCASTSYNC_NAME (ntpd_opt_strs+1231)
/** Name string for the bcastsync option */
-#define BCASTSYNC_name (ntpd_opt_strs+1183)
+#define BCASTSYNC_name (ntpd_opt_strs+1241)
/** Compiled in flag settings for the bcastsync option */
#define BCASTSYNC_FLAGS (OPTST_DISABLED)
@@ -288,11 +289,11 @@ static int const aAuthnoreqCantList[] = {
* configfile option description:
*/
/** Descriptive text for the configfile option */
-#define CONFIGFILE_DESC (ntpd_opt_strs+1193)
+#define CONFIGFILE_DESC (ntpd_opt_strs+1251)
/** Upper-cased name for the configfile option */
-#define CONFIGFILE_NAME (ntpd_opt_strs+1217)
+#define CONFIGFILE_NAME (ntpd_opt_strs+1275)
/** Name string for the configfile option */
-#define CONFIGFILE_name (ntpd_opt_strs+1228)
+#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 +302,11 @@ static int const aAuthnoreqCantList[] = {
* debug-level option description:
*/
/** Descriptive text for the debug-level option */
-#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1239)
+#define DEBUG_LEVEL_DESC (ntpd_opt_strs+1297)
/** Upper-cased name for the debug-level option */
-#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1270)
+#define DEBUG_LEVEL_NAME (ntpd_opt_strs+1328)
/** Name string for the debug-level option */
-#define DEBUG_LEVEL_name (ntpd_opt_strs+1282)
+#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 +314,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+1294)
+#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+1324)
+#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+1340)
+#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 +327,11 @@ static int const aAuthnoreqCantList[] = {
* driftfile option description:
*/
/** Descriptive text for the driftfile option */
-#define DRIFTFILE_DESC (ntpd_opt_strs+1356)
+#define DRIFTFILE_DESC (ntpd_opt_strs+1414)
/** Upper-cased name for the driftfile option */
-#define DRIFTFILE_NAME (ntpd_opt_strs+1382)
+#define DRIFTFILE_NAME (ntpd_opt_strs+1440)
/** Name string for the driftfile option */
-#define DRIFTFILE_name (ntpd_opt_strs+1392)
+#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,11 +340,11 @@ static int const aAuthnoreqCantList[] = {
* panicgate option description:
*/
/** Descriptive text for the panicgate option */
-#define PANICGATE_DESC (ntpd_opt_strs+1402)
+#define PANICGATE_DESC (ntpd_opt_strs+1460)
/** Upper-cased name for the panicgate option */
-#define PANICGATE_NAME (ntpd_opt_strs+1439)
+#define PANICGATE_NAME (ntpd_opt_strs+1497)
/** Name string for the panicgate option */
-#define PANICGATE_name (ntpd_opt_strs+1449)
+#define PANICGATE_name (ntpd_opt_strs+1507)
/** Compiled in flag settings for the panicgate option */
#define PANICGATE_FLAGS (OPTST_DISABLED)
@@ -352,11 +353,11 @@ static int const aAuthnoreqCantList[] = {
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the jaildir option */
-#define JAILDIR_DESC (ntpd_opt_strs+1459)
+#define JAILDIR_DESC (ntpd_opt_strs+1517)
/** Upper-cased name for the jaildir option */
-#define JAILDIR_NAME (ntpd_opt_strs+1474)
+#define JAILDIR_NAME (ntpd_opt_strs+1532)
/** Name string for the jaildir option */
-#define JAILDIR_name (ntpd_opt_strs+1482)
+#define JAILDIR_name (ntpd_opt_strs+1540)
/** Compiled in flag settings for the jaildir option */
#define JAILDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -365,19 +366,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+1490)
-#define JAILDIR_name (ntpd_opt_strs+1482)
+#define JAILDIR_DESC (ntpd_opt_strs+1548)
+#define JAILDIR_name (ntpd_opt_strs+1540)
#endif /* HAVE_DROPROOT */
/**
* interface option description:
*/
/** Descriptive text for the interface option */
-#define INTERFACE_DESC (ntpd_opt_strs+1569)
+#define INTERFACE_DESC (ntpd_opt_strs+1627)
/** Upper-cased name for the interface option */
-#define INTERFACE_NAME (ntpd_opt_strs+1608)
+#define INTERFACE_NAME (ntpd_opt_strs+1666)
/** Name string for the interface option */
-#define INTERFACE_name (ntpd_opt_strs+1618)
+#define INTERFACE_name (ntpd_opt_strs+1676)
/** Compiled in flag settings for the interface option */
#define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -386,11 +387,11 @@ static int const aAuthnoreqCantList[] = {
* keyfile option description:
*/
/** Descriptive text for the keyfile option */
-#define KEYFILE_DESC (ntpd_opt_strs+1628)
+#define KEYFILE_DESC (ntpd_opt_strs+1686)
/** Upper-cased name for the keyfile option */
-#define KEYFILE_NAME (ntpd_opt_strs+1651)
+#define KEYFILE_NAME (ntpd_opt_strs+1709)
/** Name string for the keyfile option */
-#define KEYFILE_name (ntpd_opt_strs+1659)
+#define KEYFILE_name (ntpd_opt_strs+1717)
/** Compiled in flag settings for the keyfile option */
#define KEYFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -399,11 +400,11 @@ static int const aAuthnoreqCantList[] = {
* logfile option description:
*/
/** Descriptive text for the logfile option */
-#define LOGFILE_DESC (ntpd_opt_strs+1667)
+#define LOGFILE_DESC (ntpd_opt_strs+1725)
/** Upper-cased name for the logfile option */
-#define LOGFILE_NAME (ntpd_opt_strs+1688)
+#define LOGFILE_NAME (ntpd_opt_strs+1746)
/** Name string for the logfile option */
-#define LOGFILE_name (ntpd_opt_strs+1696)
+#define LOGFILE_name (ntpd_opt_strs+1754)
/** Compiled in flag settings for the logfile option */
#define LOGFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -412,11 +413,11 @@ static int const aAuthnoreqCantList[] = {
* novirtualips option description:
*/
/** Descriptive text for the novirtualips option */
-#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1704)
+#define NOVIRTUALIPS_DESC (ntpd_opt_strs+1762)
/** Upper-cased name for the novirtualips option */
-#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1740)
+#define NOVIRTUALIPS_NAME (ntpd_opt_strs+1798)
/** Name string for the novirtualips option */
-#define NOVIRTUALIPS_name (ntpd_opt_strs+1753)
+#define NOVIRTUALIPS_name (ntpd_opt_strs+1811)
/** Compiled in flag settings for the novirtualips option */
#define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
@@ -425,11 +426,11 @@ static int const aAuthnoreqCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the modifymmtimer option */
-#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1766)
+#define MODIFYMMTIMER_DESC (ntpd_opt_strs+1824)
/** Upper-cased name for the modifymmtimer option */
-#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1805)
+#define MODIFYMMTIMER_NAME (ntpd_opt_strs+1863)
/** Name string for the modifymmtimer option */
-#define MODIFYMMTIMER_name (ntpd_opt_strs+1819)
+#define MODIFYMMTIMER_name (ntpd_opt_strs+1877)
/** Compiled in flag settings for the modifymmtimer option */
#define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
@@ -445,11 +446,11 @@ static int const aAuthnoreqCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the nofork option */
-#define NOFORK_DESC (ntpd_opt_strs+1833)
+#define NOFORK_DESC (ntpd_opt_strs+1891)
/** Upper-cased name for the nofork option */
-#define NOFORK_NAME (ntpd_opt_strs+1845)
+#define NOFORK_NAME (ntpd_opt_strs+1903)
/** Name string for the nofork option */
-#define NOFORK_name (ntpd_opt_strs+1852)
+#define NOFORK_name (ntpd_opt_strs+1910)
/** Other options that appear in conjunction with the nofork option */
static int const aNoforkCantList[] = {
INDEX_OPT_WAIT_SYNC, NO_EQUIVALENT };
@@ -460,11 +461,11 @@ static int const aNoforkCantList[] = {
* nice option description:
*/
/** Descriptive text for the nice option */
-#define NICE_DESC (ntpd_opt_strs+1859)
+#define NICE_DESC (ntpd_opt_strs+1917)
/** Upper-cased name for the nice option */
-#define NICE_NAME (ntpd_opt_strs+1880)
+#define NICE_NAME (ntpd_opt_strs+1938)
/** Name string for the nice option */
-#define NICE_name (ntpd_opt_strs+1885)
+#define NICE_name (ntpd_opt_strs+1943)
/** Compiled in flag settings for the nice option */
#define NICE_FLAGS (OPTST_DISABLED)
@@ -472,11 +473,11 @@ static int const aNoforkCantList[] = {
* pidfile option description:
*/
/** Descriptive text for the pidfile option */
-#define PIDFILE_DESC (ntpd_opt_strs+1890)
+#define PIDFILE_DESC (ntpd_opt_strs+1948)
/** Upper-cased name for the pidfile option */
-#define PIDFILE_NAME (ntpd_opt_strs+1911)
+#define PIDFILE_NAME (ntpd_opt_strs+1969)
/** Name string for the pidfile option */
-#define PIDFILE_name (ntpd_opt_strs+1919)
+#define PIDFILE_name (ntpd_opt_strs+1977)
/** Compiled in flag settings for the pidfile option */
#define PIDFILE_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -485,11 +486,11 @@ static int const aNoforkCantList[] = {
* priority option description:
*/
/** Descriptive text for the priority option */
-#define PRIORITY_DESC (ntpd_opt_strs+1927)
+#define PRIORITY_DESC (ntpd_opt_strs+1985)
/** Upper-cased name for the priority option */
-#define PRIORITY_NAME (ntpd_opt_strs+1944)
+#define PRIORITY_NAME (ntpd_opt_strs+2002)
/** Name string for the priority option */
-#define PRIORITY_name (ntpd_opt_strs+1953)
+#define PRIORITY_name (ntpd_opt_strs+2011)
/** Compiled in flag settings for the priority option */
#define PRIORITY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -499,11 +500,11 @@ static int const aNoforkCantList[] = {
* "Must also have options" and "Incompatible options":
*/
/** Descriptive text for the quit option */
-#define QUIT_DESC (ntpd_opt_strs+1962)
+#define QUIT_DESC (ntpd_opt_strs+2020)
/** Upper-cased name for the quit option */
-#define QUIT_NAME (ntpd_opt_strs+1984)
+#define QUIT_NAME (ntpd_opt_strs+2042)
/** Name string for the quit option */
-#define QUIT_name (ntpd_opt_strs+1989)
+#define QUIT_name (ntpd_opt_strs+2047)
/** Other options that appear in conjunction with the quit option */
static int const aQuitCantList[] = {
INDEX_OPT_SAVECONFIGQUIT,
@@ -515,11 +516,11 @@ static int const aQuitCantList[] = {
* propagationdelay option description:
*/
/** Descriptive text for the propagationdelay option */
-#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+1994)
+#define PROPAGATIONDELAY_DESC (ntpd_opt_strs+2052)
/** Upper-cased name for the propagationdelay option */
-#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2022)
+#define PROPAGATIONDELAY_NAME (ntpd_opt_strs+2080)
/** Name string for the propagationdelay option */
-#define PROPAGATIONDELAY_name (ntpd_opt_strs+2039)
+#define PROPAGATIONDELAY_name (ntpd_opt_strs+2097)
/** Compiled in flag settings for the propagationdelay option */
#define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -530,11 +531,11 @@ static int const aQuitCantList[] = {
*/
#ifdef SAVECONFIG
/** Descriptive text for the saveconfigquit option */
-#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2056)
+#define SAVECONFIGQUIT_DESC (ntpd_opt_strs+2114)
/** Upper-cased name for the saveconfigquit option */
-#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2091)
+#define SAVECONFIGQUIT_NAME (ntpd_opt_strs+2149)
/** Name string for the saveconfigquit option */
-#define SAVECONFIGQUIT_name (ntpd_opt_strs+2106)
+#define SAVECONFIGQUIT_name (ntpd_opt_strs+2164)
/** Other options that appear in conjunction with the saveconfigquit option */
static int const aSaveconfigquitCantList[] = {
INDEX_OPT_QUIT,
@@ -555,11 +556,11 @@ static int const aSaveconfigquitCantList[] = {
* statsdir option description:
*/
/** Descriptive text for the statsdir option */
-#define STATSDIR_DESC (ntpd_opt_strs+2121)
+#define STATSDIR_DESC (ntpd_opt_strs+2179)
/** Upper-cased name for the statsdir option */
-#define STATSDIR_NAME (ntpd_opt_strs+2146)
+#define STATSDIR_NAME (ntpd_opt_strs+2204)
/** Name string for the statsdir option */
-#define STATSDIR_name (ntpd_opt_strs+2155)
+#define STATSDIR_name (ntpd_opt_strs+2213)
/** Compiled in flag settings for the statsdir option */
#define STATSDIR_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -568,11 +569,11 @@ static int const aSaveconfigquitCantList[] = {
* trustedkey option description:
*/
/** Descriptive text for the trustedkey option */
-#define TRUSTEDKEY_DESC (ntpd_opt_strs+2164)
+#define TRUSTEDKEY_DESC (ntpd_opt_strs+2222)
/** Upper-cased name for the trustedkey option */
-#define TRUSTEDKEY_NAME (ntpd_opt_strs+2183)
+#define TRUSTEDKEY_NAME (ntpd_opt_strs+2241)
/** Name string for the trustedkey option */
-#define TRUSTEDKEY_name (ntpd_opt_strs+2194)
+#define TRUSTEDKEY_name (ntpd_opt_strs+2252)
/** Compiled in flag settings for the trustedkey option */
#define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -582,11 +583,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_DROPROOT
/** Descriptive text for the user option */
-#define USER_DESC (ntpd_opt_strs+2205)
+#define USER_DESC (ntpd_opt_strs+2263)
/** Upper-cased name for the user option */
-#define USER_NAME (ntpd_opt_strs+2239)
+#define USER_NAME (ntpd_opt_strs+2297)
/** Name string for the user option */
-#define USER_name (ntpd_opt_strs+2244)
+#define USER_name (ntpd_opt_strs+2302)
/** Compiled in flag settings for the user option */
#define USER_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -595,19 +596,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+1490)
-#define USER_name (ntpd_opt_strs+2244)
+#define USER_DESC (ntpd_opt_strs+1548)
+#define USER_name (ntpd_opt_strs+2302)
#endif /* HAVE_DROPROOT */
/**
* updateinterval option description:
*/
/** Descriptive text for the updateinterval option */
-#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2249)
+#define UPDATEINTERVAL_DESC (ntpd_opt_strs+2307)
/** Upper-cased name for the updateinterval option */
-#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2313)
+#define UPDATEINTERVAL_NAME (ntpd_opt_strs+2371)
/** Name string for the updateinterval option */
-#define UPDATEINTERVAL_name (ntpd_opt_strs+2328)
+#define UPDATEINTERVAL_name (ntpd_opt_strs+2386)
/** Compiled in flag settings for the updateinterval option */
#define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
@@ -616,11 +617,11 @@ static int const aSaveconfigquitCantList[] = {
* var option description:
*/
/** Descriptive text for the var option */
-#define VAR_DESC (ntpd_opt_strs+2343)
+#define VAR_DESC (ntpd_opt_strs+2401)
/** Upper-cased name for the var option */
-#define VAR_NAME (ntpd_opt_strs+2373)
+#define VAR_NAME (ntpd_opt_strs+2431)
/** Name string for the var option */
-#define VAR_name (ntpd_opt_strs+2377)
+#define VAR_name (ntpd_opt_strs+2435)
/** Compiled in flag settings for the var option */
#define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -629,11 +630,11 @@ static int const aSaveconfigquitCantList[] = {
* dvar option description:
*/
/** Descriptive text for the dvar option */
-#define DVAR_DESC (ntpd_opt_strs+2381)
+#define DVAR_DESC (ntpd_opt_strs+2439)
/** Upper-cased name for the dvar option */
-#define DVAR_NAME (ntpd_opt_strs+2415)
+#define DVAR_NAME (ntpd_opt_strs+2473)
/** Name string for the dvar option */
-#define DVAR_name (ntpd_opt_strs+2420)
+#define DVAR_name (ntpd_opt_strs+2478)
/** Compiled in flag settings for the dvar option */
#define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -644,11 +645,11 @@ static int const aSaveconfigquitCantList[] = {
*/
#ifdef HAVE_WORKING_FORK
/** Descriptive text for the wait-sync option */
-#define WAIT_SYNC_DESC (ntpd_opt_strs+2425)
+#define WAIT_SYNC_DESC (ntpd_opt_strs+2483)
/** Upper-cased name for the wait-sync option */
-#define WAIT_SYNC_NAME (ntpd_opt_strs+2462)
+#define WAIT_SYNC_NAME (ntpd_opt_strs+2520)
/** Name string for the wait-sync option */
-#define WAIT_SYNC_name (ntpd_opt_strs+2472)
+#define WAIT_SYNC_name (ntpd_opt_strs+2530)
/** Other options that appear in conjunction with the wait-sync option */
static int const aWait_SyncCantList[] = {
INDEX_OPT_NOFORK,
@@ -670,11 +671,11 @@ static int const aWait_SyncCantList[] = {
* slew option description:
*/
/** Descriptive text for the slew option */
-#define SLEW_DESC (ntpd_opt_strs+2482)
+#define SLEW_DESC (ntpd_opt_strs+2540)
/** Upper-cased name for the slew option */
-#define SLEW_NAME (ntpd_opt_strs+2505)
+#define SLEW_NAME (ntpd_opt_strs+2563)
/** Name string for the slew option */
-#define SLEW_name (ntpd_opt_strs+2510)
+#define SLEW_name (ntpd_opt_strs+2568)
/** Compiled in flag settings for the slew option */
#define SLEW_FLAGS (OPTST_DISABLED)
@@ -683,11 +684,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the usepcc option */
-#define USEPCC_DESC (ntpd_opt_strs+2515)
+#define USEPCC_DESC (ntpd_opt_strs+2573)
/** Upper-cased name for the usepcc option */
-#define USEPCC_NAME (ntpd_opt_strs+2552)
+#define USEPCC_NAME (ntpd_opt_strs+2610)
/** Name string for the usepcc option */
-#define USEPCC_name (ntpd_opt_strs+2559)
+#define USEPCC_name (ntpd_opt_strs+2617)
/** Compiled in flag settings for the usepcc option */
#define USEPCC_FLAGS (OPTST_DISABLED)
@@ -703,11 +704,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef SYS_WINNT
/** Descriptive text for the pccfreq option */
-#define PCCFREQ_DESC (ntpd_opt_strs+2566)
+#define PCCFREQ_DESC (ntpd_opt_strs+2624)
/** Upper-cased name for the pccfreq option */
-#define PCCFREQ_NAME (ntpd_opt_strs+2609)
+#define PCCFREQ_NAME (ntpd_opt_strs+2667)
/** Name string for the pccfreq option */
-#define PCCFREQ_name (ntpd_opt_strs+2617)
+#define PCCFREQ_name (ntpd_opt_strs+2675)
/** Compiled in flag settings for the pccfreq option */
#define PCCFREQ_FLAGS (OPTST_DISABLED \
| OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
@@ -724,11 +725,11 @@ static int const aWait_SyncCantList[] = {
*/
#ifdef HAVE_DNSREGISTRATION
/** Descriptive text for the mdns option */
-#define MDNS_DESC (ntpd_opt_strs+2625)
+#define MDNS_DESC (ntpd_opt_strs+2683)
/** Upper-cased name for the mdns option */
-#define MDNS_NAME (ntpd_opt_strs+2660)
+#define MDNS_NAME (ntpd_opt_strs+2718)
/** Name string for the mdns option */
-#define MDNS_name (ntpd_opt_strs+2665)
+#define MDNS_name (ntpd_opt_strs+2723)
/** Compiled in flag settings for the mdns option */
#define MDNS_FLAGS (OPTST_DISABLED)
@@ -742,11 +743,11 @@ static int const aWait_SyncCantList[] = {
/*
* Help/More_Help/Version option descriptions:
*/
-#define HELP_DESC (ntpd_opt_strs+2670)
-#define HELP_name (ntpd_opt_strs+2714)
+#define HELP_DESC (ntpd_opt_strs+2728)
+#define HELP_name (ntpd_opt_strs+2772)
#ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC (ntpd_opt_strs+2719)
-#define MORE_HELP_name (ntpd_opt_strs+2764)
+#define MORE_HELP_DESC (ntpd_opt_strs+2777)
+#define MORE_HELP_name (ntpd_opt_strs+2822)
#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
#else
#define MORE_HELP_DESC HELP_DESC
@@ -759,8 +760,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+2774)
-#define VER_name (ntpd_opt_strs+2810)
+#define VER_DESC (ntpd_opt_strs+2832)
+#define VER_name (ntpd_opt_strs+2868)
/**
* Declare option callback procedures
*/
@@ -1230,21 +1231,21 @@ static tOptDesc optDesc[OPTION_CT] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/** Reference to the upper cased version of ntpd. */
-#define zPROGNAME (ntpd_opt_strs+2818)
+#define zPROGNAME (ntpd_opt_strs+2876)
/** Reference to the title line for ntpd usage. */
-#define zUsageTitle (ntpd_opt_strs+2823)
+#define zUsageTitle (ntpd_opt_strs+2881)
/** 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+2952)
+#define zBugsAddr (ntpd_opt_strs+3012)
/** Clarification/explanation of what ntpd does. */
-#define zExplain (ntpd_opt_strs+2986)
+#define zExplain (ntpd_opt_strs+3046)
/** Extra detail explaining what ntpd does. */
#define zDetail (NULL)
/** The full version string for ntpd. */
-#define zFullVersion (ntpd_opt_strs+2988)
+#define zFullVersion (ntpd_opt_strs+3048)
/* extracted from optcode.tlib near line 364 */
#if defined(ENABLE_NLS)
@@ -1501,8 +1502,8 @@ static void bogus_function(void) {
translate option names.
*/
/* referenced via ntpdOptions.pzCopyright */
- puts(_("ntpd 4.2.8\n\
-Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\
+ puts(_("ntpd 4.2.8p1\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 +1517,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"));
@@ -1638,7 +1640,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.8\n\
+ puts(_("ntpd - NTP daemon program - Ver. 4.2.8p1\n\
Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
\t\t[ <server1> ... <serverN> ]\n"));
@@ -1646,7 +1648,7 @@ Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \\\n\
puts(_("\n"));
/* referenced via ntpdOptions.pzFullVersion */
- puts(_("ntpd 4.2.8"));
+ puts(_("ntpd 4.2.8p1"));
/* referenced via ntpdOptions.pzFullUsage */
puts(_("<<<NOT-FOUND>>>"));
diff --git a/ntpd/ntpd-opts.h b/ntpd/ntpd-opts.h
index 2cfea535ac3e..f4eb47b8e355 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 19, 2014 at 07:46:32 AM by AutoGen 5.18.5pre4
+ * It has been AutoGen-ed February 4, 2015 at 02:39:16 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.
*/
@@ -105,9 +105,9 @@ typedef enum {
/** count of all options for ntpd */
#define OPTION_CT 37
/** ntpd version */
-#define NTPD_VERSION "4.2.8"
+#define NTPD_VERSION "4.2.8p1"
/** Full ntpd version text */
-#define NTPD_FULL_VERSION "ntpd 4.2.8"
+#define NTPD_FULL_VERSION "ntpd 4.2.8p1"
/**
* Interface defines for all options. Replace "n" with the UPPER_CASED
diff --git a/ntpd/ntpd.1ntpdman b/ntpd/ntpd.1ntpdman
index 52bc51531421..4b37913615d5 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 "19 Dec 2014" "4.2.8" "User Commands"
+.TH ntpd 1ntpdman "04 Feb 2015" "4.2.8p1" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-WBaqpd/ag-9Baiod)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-YYaqWo/ag-.YaiVo)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:48:58 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:41:54 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -959,9 +959,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 f390d2c48b50..96d77e9fb0db 100644
--- a/ntpd/ntpd.1ntpdmdoc
+++ b/ntpd/ntpd.1ntpdmdoc
@@ -1,9 +1,9 @@
-.Dd December 19 2014
+.Dd February 4 2015
.Dt NTPD 1ntpdmdoc User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:49:14 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:42:12 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -867,9 +867,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 ef1baa7037a1..c017ef34d7db 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);
diff --git a/ntpd/ntpd.html b/ntpd/ntpd.html
index 7d588dd6374d..fe00030dde2b 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.8 of <code>ntpd</code>.
+ <p>This document applies to version 4.2.8p1 of <code>ntpd</code>.
<ul class="menu">
<li><a accesskey="1" href="#ntpd-Description">ntpd Description</a>: Description
@@ -219,7 +219,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.8-x
+<pre class="example">ntpd - NTP daemon program - Ver. 4.2.8p1-RC2
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
diff --git a/ntpd/ntpd.man.in b/ntpd/ntpd.man.in
index c115a4d8a55d..a5403086ae83 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@ "19 Dec 2014" "4.2.8" "User Commands"
+.TH ntpd @NTPD_MS@ "04 Feb 2015" "4.2.8p1" "User Commands"
.\"
-.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-WBaqpd/ag-9Baiod)
+.\" EDIT THIS FILE WITH CAUTION (/tmp/.ag-YYaqWo/ag-.YaiVo)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:48:58 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:41:54 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agman-cmd.tpl
.SH NAME
@@ -959,9 +959,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 bb24d02685e3..3017dc8d54d4 100644
--- a/ntpd/ntpd.mdoc.in
+++ b/ntpd/ntpd.mdoc.in
@@ -1,9 +1,9 @@
-.Dd December 19 2014
+.Dd February 4 2015
.Dt NTPD @NTPD_MS@ User Commands
.Os
.\" EDIT THIS FILE WITH CAUTION (ntpd-opts.mdoc)
.\"
-.\" It has been AutoGen-ed December 19, 2014 at 07:49:14 AM by AutoGen 5.18.5pre4
+.\" It has been AutoGen-ed February 4, 2015 at 02:42:12 AM by AutoGen 5.18.5pre4
.\" From the definitions ntpd-opts.def
.\" and the template file agmdoc-cmd.tpl
.Sh NAME
@@ -867,9 +867,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/refclock_acts.c b/ntpd/refclock_acts.c
index 36322fd91a25..f62cc466b25c 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 b2c063e432ec..e5d4cb44086c 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 9c7093d2c212..6b1ae5554adf 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 615098271e3b..2171a4fff788 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 435d8f6c4ffb..aed056c91497 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_irig.c b/ntpd/refclock_irig.c
index 46c01fbb7931..abc94f62e8fb 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 d8ec6b7446c1..e279ee307d73 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 377fc563229a..02b33dfb338d 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_mx4200.c b/ntpd/refclock_mx4200.c
index 16f83f0c91e8..c9422290d39a 100644
--- a/ntpd/refclock_mx4200.c
+++ b/ntpd/refclock_mx4200.c
@@ -1572,7 +1572,7 @@ mx4200_debug(struct peer *peer, char *fmt, ...)
* Print debug message to stdout
* In the future, we may want to get get more creative...
*/
- vprintf(fmt, ap);
+ mvprintf(fmt, ap);
va_end(ap);
}
@@ -1613,11 +1613,11 @@ mx4200_send(peer, fmt, va_alist)
cp = buf;
*cp++ = '$';
- n = vsnprintf(cp, sizeof(buf) - 1, fmt, ap);
+ n = VSNPRINTF((cp, sizeof(buf) - 1, fmt, ap));
ck = mx4200_cksum(cp, n);
cp += n;
++n;
- n += snprintf(cp, sizeof(buf) - n - 5, "*%02X\r\n", ck);
+ n += SNPRINTF((cp, sizeof(buf) - n - 5, "*%02X\r\n", ck));
m = write(pp->io.fd, buf, (unsigned)n);
if (m < 0)
diff --git a/ntpd/refclock_neoclock4x.c b/ntpd/refclock_neoclock4x.c
index a0067e9c4675..6fda0f0785be 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 58867f47b3d5..126b53026a9e 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 3bc60bf50321..30924b8bbc2d 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_parse.c b/ntpd/refclock_parse.c
index 052ec3a5ed99..aa4be6063c1d 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
@@ -1537,7 +1537,7 @@ clear_err(
{
if (lstate == ERR_ALL)
{
- int i;
+ size_t i;
for (i = 0; i < ERR_CNT; i++)
{
@@ -1638,7 +1638,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--;
@@ -1771,6 +1771,16 @@ static bind_t io_bindings[] =
},
{
(char *)0,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
}
};
@@ -2452,6 +2462,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
*/
@@ -2480,7 +2515,7 @@ parsestate(
{ PARSEB_TIMECODE, "TIME CODE" },
{ PARSEB_PPS, "PPS" },
{ PARSEB_POSITION, "POSITION" },
- { 0 }
+ { 0, NULL }
};
static struct sbits
@@ -2493,12 +2528,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 +2542,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 (t != s)
+ {
+ t = ap(buffer, size, t, "; ");
+ }
- if (strlcpy(t, sflagstrings[i].name, BUFFER_SIZES(buffer, t, size)) <
- BUFFER_SIZES(buffer, t, size))
- t += strlen(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 +2600,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 +2613,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 +2645,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 +2678,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 +2691,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;
}
@@ -2853,7 +2883,7 @@ parse_ppsapi(
)
{
int cap, mode_ppsoffset;
- char *cp;
+ const char *cp;
parse->flags &= ~PARSE_PPSCLOCK;
@@ -2961,7 +2991,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);
@@ -3233,12 +3263,9 @@ parse_start(
parse_shutdown(CLK_UNIT(parse->peer), peer); /* let our cleaning staff do the work */
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 = strlen(tmp_ctl.parseformat.parse_buffer);
if (!PARSE_SETFMT(parse, &tmp_ctl))
{
@@ -3408,7 +3435,7 @@ parse_poll(
parse->generic->polls++;
if (parse->pollneeddata &&
- ((current_time - parse->pollneeddata) > (1<<(max(min(parse->peer->hpoll, parse->peer->ppoll), parse->peer->minpoll)))))
+ ((int)(current_time - parse->pollneeddata) > (1<<(max(min(parse->peer->hpoll, parse->peer->ppoll), parse->peer->minpoll)))))
{
/*
* start worrying when exceeding a poll inteval
@@ -3521,16 +3548,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 +3568,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,9 +3576,11 @@ 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),
@@ -3569,11 +3597,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;
- strlcat(tt, tmpctl.parseformat.parse_buffer, 80);
- strlcat(tt,"\"", 80);
+ start = tt = add_var(&out->kv_list, 80, RO|DEF);
+ tt = ap(start, 80, tt, "refclock_format=\"");
+
+ if (count > 0) {
+ tt = ap(start, 80, tt, "%*.*s",
+ count,
+ count,
+ tmpctl.parseformat.parse_buffer);
+ }
+
+ tt = ap(start, 80, tt, "\"");
}
/*
@@ -3581,8 +3617,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++)
{
@@ -3616,14 +3651,15 @@ parse_control(
(int)(percent / 100), (int)(percent % 100));
if ((count = 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);
@@ -3990,7 +4026,7 @@ parse_process(
* 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
{
@@ -4142,20 +4178,7 @@ parse_process(
*/
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;
parse_hardpps(parse, PARSE_HARDPPS_ENABLE);
}
#endif
@@ -4297,32 +4320,32 @@ gps16x_message(
char *p, *b;
status = get_lsb_short(&bufp);
- snprintf(buffer, sizeof(buffer), "meinberg_gps_status=\"[0x%04x] ", status);
+ p = b = buffer;
+ p = ap(buffer, sizeof(buffer), p,
+ "meinberg_gps_status=\"[0x%04x] ",
+ status);
if (status)
{
- p = b = buffer + strlen(buffer);
+ 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, "<OK>\"");
}
set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
@@ -4373,53 +4396,54 @@ gps16x_message(
{
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);
+ p = ap(buffer, sizeof(buffer),
+ p, "<OK>");
break;
case ANT_DISCONN:
- strlcat(p, "DISCONNECTED since ", BUFFER_SIZE(buffer, p));
+ 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);
+ p = q;
mbg_tm_str(&p, &antinfo.tm_disconn, BUFFER_SIZE(buffer, p));
*p = '\0';
break;
case ANT_RECONN:
- strlcat(p, "RECONNECTED on ", BUFFER_SIZE(buffer, p));
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer),
+ p, "RECONNECTED on ");
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 ",
+ p = ap(buffer, sizeof(buffer),
+ p, ", reconnect clockoffset %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));
*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));
+ p = ap(buffer, sizeof(buffer), p, "\"");
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
@@ -4438,102 +4462,101 @@ gps16x_message(
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);
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);
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);
+ p = ap(buffer, sizeof(buffer),
+ p, "\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO);
for (i = MIN_SVNO; i < MAX_SVNO; i++)
{
p = buffer;
- snprintf(p, BUFFER_SIZE(buffer, p), "gps_cfg[%d]=\"[0x%x] ", i, cfgh.cfg[i]);
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer), p, "gps_cfg[%d]=\"[0x%x] ", i, cfgh.cfg[i]);
switch (cfgh.cfg[i] & 0x7)
{
case 0:
- strlcpy(p, "BLOCK I", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "BLOCK I");
break;
case 1:
- strlcpy(p, "BLOCK II", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "BLOCK II");
break;
default:
- strlcpy(p, "bad CFG", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "bad CFG");
break;
}
- strlcat(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);
p = buffer;
- snprintf(p, BUFFER_SIZE(buffer, p), "gps_health[%d]=\"[0x%x] ", i, cfgh.health[i]);
- p += strlen(p);
+ p = ap(buffer, sizeof(buffer), p, "gps_health[%d]=\"[0x%x] ", i, cfgh.health[i]);
switch ((cfgh.health[i] >> 5) & 0x7 )
{
case 0:
- strlcpy(p, "OK;", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "OK;");
break;
case 1:
- strlcpy(p, "PARITY;", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "PARITY;");
break;
case 2:
- strlcpy(p, "TLM/HOW;", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "TLM/HOW;");
break;
case 3:
- strlcpy(p, "Z-COUNT;", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "Z-COUNT;");
break;
case 4:
- strlcpy(p, "SUBFRAME 1,2,3;", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "SUBFRAME 1,2,3;");
break;
case 5:
- strlcpy(p, "SUBFRAME 4,5;", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "SUBFRAME 4,5;");
break;
case 6:
- strlcpy(p, "UPLOAD BAD;", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "UPLOAD BAD;");
break;
case 7:
- strlcpy(p, "DATA BAD;", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "DATA BAD;");
break;
}
- p += strlen(p);
-
switch (cfgh.health[i] & 0x1F)
{
case 0:
- strlcpy(p, "SIGNAL OK", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "SIGNAL OK");
break;
case 0x1C:
- strlcpy(p, "SV TEMP OUT", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "SV TEMP OUT");
break;
case 0x1D:
- strlcpy(p, "SV WILL BE TEMP OUT", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "SV WILL BE TEMP OUT");
break;
case 0x1E:
break;
case 0x1F:
- strlcpy(p, "MULTIPLE ERRS", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "MULTIPLE ERRS");
break;
default:
- strlcpy(p, "TRANSMISSION PROBLEMS", BUFFER_SIZE(buffer, p));
+ p = ap(buffer, sizeof(buffer), p, "TRANSMISSION PROBLEMS");
break;
}
- strlcat(p, "\"", sizeof(buffer));
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO);
+ p = ap(buffer, sizeof(buffer), p, "\"");
+ set_var(&parse->kv, buffer, sizeof(buffer), RO);
}
}
}
@@ -4557,16 +4580,16 @@ gps16x_message(
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;
@@ -4588,9 +4611,9 @@ gps16x_message(
snprintf(buffer, sizeof(buffer), "gps_message=\"%s\"", buffer1);
}
else
- strlcpy(buffer, "gps_message=<NONE>", sizeof(buffer));
+ snprintf(buffer, sizeof(buffer), "gps_message=<NONE>");
- set_var(&parse->kv, buffer, strlen(buffer)+1, RO|DEF);
+ set_var(&parse->kv, buffer, sizeof(buffer), RO|DEF);
}
break;
@@ -4863,7 +4886,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));
@@ -5394,7 +5417,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++) {
@@ -5417,7 +5440,7 @@ trimbletsip_message(
#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++) {
@@ -5435,7 +5458,7 @@ trimbletsip_message(
if (s)
{
- snprintf(t, BUFFER_SIZE(pbuffer, t), "%s=\"", s->varname);
+ t = ap(pbuffer, sizeof(pbuffer), t, "%s=\"", s->varname);
}
else
{
@@ -5445,45 +5468,41 @@ trimbletsip_message(
var_flag = 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);
+ t = ap(pbuffer, sizeof(pbuffer), t, "-AUTO, ");
- 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, "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)),
@@ -5493,7 +5512,7 @@ trimbletsip_message(
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;
@@ -5516,43 +5535,40 @@ trimbletsip_message(
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;
@@ -5577,24 +5593,21 @@ trimbletsip_message(
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;
@@ -5614,19 +5627,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)
@@ -5644,9 +5657,9 @@ trimbletsip_message(
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;
}
@@ -5659,10 +5672,10 @@ trimbletsip_message(
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,8 +5686,8 @@ 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;
@@ -5682,7 +5695,7 @@ trimbletsip_message(
{
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)));
@@ -5693,43 +5706,38 @@ trimbletsip_message(
{
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));
}
@@ -5743,52 +5751,46 @@ trimbletsip_message(
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));
+ t = ap(pbuffer, sizeof(pbuffer), t, "<NO MEASUREMENTS>");
var_flag &= ~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));
+ 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);
}
}
diff --git a/ntpd/refclock_pcf.c b/ntpd/refclock_pcf.c
index 4379832b4a7f..45b3475c0d68 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_shm.c b/ntpd/refclock_shm.c
index 6540e6f377da..7174abdbf4cf 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 36ade81c7ba5..7a5c491bb595 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 14183b46ce2d..79c0afd5bcfb 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 {