aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2020-02-28 10:07:54 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2020-02-28 10:07:54 +0200
commit73bfc3bdfac590266ad67c48de5e866bb5d5fa4d (patch)
tree2488c3b3b009c0c49f56a63f10df7340432588c4 /doc
parent7e8ff0ed908913de7467daa28feb25164abc7ad9 (diff)
downloadping903-73bfc3bdfac590266ad67c48de5e866bb5d5fa4d.tar.gz
ping903-73bfc3bdfac590266ad67c48de5e866bb5d5fa4d.tar.bz2
Implement here-document syntax in configuration file.
Here-document is supported for ip-list and trusted-ip statements. * doc/ping903.conf.5: Document the here-document syntax. * NEWS: Likewise. * examples/inspect: Mention that the created output is a valid configuration file. * src/config.c: Support for here-document. * src/defs.h: Mark printf-like functions as such. * src/ping903.h (CF_HEREDOC_OPCODE): New data type. (cf_callback_arg): Add heredoc member. (STMT_T_HEREDOC): New statement type. * src/remoteip.c (cf_trusted_ip_heredoc): New function. * src/ping903.c: Fix format strings and unused variables. * src/ping903q.c: Likewise. * src/pinger.c: Likewise.
Diffstat (limited to 'doc')
-rw-r--r--doc/ping903.conf.525
1 files changed, 21 insertions, 4 deletions
diff --git a/doc/ping903.conf.5 b/doc/ping903.conf.5
index c6835f3..befe082 100644
--- a/doc/ping903.conf.5
+++ b/doc/ping903.conf.5
@@ -13,7 +13,7 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Ping903. If not, see <http://www.gnu.org/licenses/>.
-.TH PING903.CONF 5 "February 27, 2020" "PING903.CONF" "File Formats Manual"
+.TH PING903.CONF 5 "February 28, 2020" "PING903.CONF" "File Formats Manual"
.SH NAME
ping903.conf \- configuration file for high-performance ICMP monitoring daemon
.SH DESCRIPTION
@@ -29,6 +29,10 @@ Leading and trailing whitespace characters are ignored.
The pound sign (\fB#\fR) appearing as the first non-whitespace
character on a line introduces a comment. Such lines are ignored.
Empty lines are ignored as well.
+.PP
+Maximum length of a statement line is limited to 1022 characters.
+Lines longer than that cause syntax error to be reported and are
+ignored otherwise.
.SH STATEMENTS
.SS Server configuration
.TP
@@ -65,9 +69,17 @@ Name of the file supplying a list of IP addresses (or hostnames) to
monitor. Each IP must be listed on a separate line. Empty lines,
leading and trailing whitespace is ignored. Comments are introduced
by a hash sign as the first non-whitespace character on the line.
+.TP
+\fBip\-list <<\fIWORD\fR
+A \fIhere-document\fR version of the above statement. \fIWORD\fR is
+an arbitrary word. The material following this statement is scanned
+up to the line consisting only of \fIWORD\fR (surrounding whitespace
+allowed). Each line in the collected material must contain a single IP
+address or host name to be incorporated into IP list.
-Multiple \fBip\-list\fR statements accumulate. At least
-one must be present.
+Empty lines and comments are allowed within \fIhere-document\fR.
+.PP
+Multiple \fBip\-list\fR statements of any form accumulate.
.TP
\fBprobe\-interval \fIN\fR
Sets interval between subsequent probes, in seconds. Default is 60
@@ -149,7 +161,12 @@ first IP in the list is encountered, whichever occurs first.
\fICIDR\fR is either an IPv4 address, or an address followed by slash
and the network mask in dotted quad, or the length of the network mask
in decimal.
-
+.TP
+\fBtrusted\-ip <<\fIWORD\fR
+A \fIhere-document\fR version of the above statement. See the
+description of \fBip\-list\fR above for the description of
+\fIhere-document\fR syntax. The collected material must contain a
+single CIDR per line.
.SS HTTP Authorization configuration
It is suggested that HTTP entry points be protected by the HTTP
authorization. This is especially critical for \fB/config\fR and

Return to:

Send suggestions and report system problems to the System administrator.