Lines Matching +full:external +full:- +full:contents

1 .\"	$NetBSD: dhcp-eval.5,v 1.1.1.3 2014/07/12 11:57:40 spz Exp $
3 .\" Id: dhcp-eval.5,v 1.33 2012/05/17 15:50:14 sar Exp
5 .\" Copyright (c) 2009-2012,2014 by Internet Systems Consortium, Inc. ("ISC")
7 .\" Copyright (c) 1996-2003 by Internet Software Consortium
27 .\" Support and other services are available for ISC products - see
30 .TH dhcp-eval 5
32 dhcp-eval - ISC DHCP conditional evaluation
35 the ability to perform conditional behavior depending on the contents
46 if option dhcp-user-class = "accounting" {
47 max-lease-time 17600;
48 option domain-name "accounting.example.org";
49 option domain-name-servers ns1.accounting.example.org,
51 } elsif option dhcp-user-class = "sales" {
52 max-lease-time 17600;
53 option domain-name "sales.example.org";
54 option domain-name-servers ns1.sales.example.org,
56 } elsif option dhcp-user-class = "engineering" {
57 max-lease-time 17600;
58 option domain-name "engineering.example.org";
59 option domain-name-servers ns1.engineering.example.org,
62 max-lease-time 600;
63 option domain-name "misc.example.org";
64 option domain-name-servers ns1.misc.example.org,
75 if not option domain-name = "example.org" {
76 prepend domain-name-servers 127.0.0.1;
117 .I data-expression-1 \fB=\fR \fIdata-expression-2\fR
122 either the left-hand side or the right-hand side are null, the
126 .I data-expression-1 \fB~=\fR \fIdata-expression-2\fR
127 .I data-expression-1 \fB~~\fR \fIdata-expression-2\fR
132 true if \fIdata-expression-1\fR matches against the regular expression
133 evaluated by \fIdata-expression-2\fR, or false if it does not match or
134 encounters some error. If either the left-hand side or the right-hand side
136 differs from the \fB~=\fR operator in that it is case-insensitive.
139 .I boolean-expression-1 \fBand\fR \fIboolean-expression-2\fR
143 the left-hand side and the boolean expression on the right-hand side
145 the expression on the left-hand side or the expression on the
146 right-hand side are null, the result is null.
149 .I boolean-expression-1 \fBor\fR \fIboolean-expression-2\fR
153 expression on the left-hand side or the boolean expression on the
154 right-hand side evaluate to true. Otherwise, it evaluates to false.
155 If either the expression on the left-hand side or the expression on
156 the right-hand side are null, the result is null.
159 .B not \fIboolean-expression
162 The \fBnot\fR operator evaluates to true if \fIboolean-expression\fR
163 evaluates to false, and returns false if \fIboolean-expression\fR evaluates
164 to true. If \fIboolean-expression\fR evaluates to null, the result
168 .B exists \fIoption-name\fR
178 currently being processed is known - that is, if there's a host
193 .B substring (\fIdata-expr\fB, \fIoffset\fB, \fIlength\fB)\fR
200 If \fIdata-expr\fR, \fIoffset\fR or \fIlength\fR evaluate to null,
202 equal to the length of the evaluated data, then a zero-length data
209 .B suffix (\fIdata-expr\fB, \fIlength\fB)\fR
212 The \fBsuffix\fR operator evaluates \fIdata-expr\fR and returns the
214 is a numeric expression. If \fIdata-expr\fR or \fIlength\fR evaluate
220 .B lcase (\fIdata-expr\fB)\fR
224 \fIdata-expr\fR converted to lower case. If \fIdata-expr\fR evaluates
228 .B ucase (\fIdata-expr\fB)\fR
232 \fIdata-expr\fR converted to upper case. If \fIdata-expr\fR evaluates
236 .B option \fIoption-name\fR
239 The \fBoption\fR operator returns the contents of the specified option in
243 .B config-option \fIoption-name\fR
246 The \fBconfig-option\fR operator returns the value for the specified option
253 The \fBgethostname()\fR function returns a data string whose contents are a
265 and whose subsequent elements are client's link-layer address. If
268 token-ring (6), and fddi (8). Hardware types are specified by the
280 contents packet as in the \fBsubstring\fR operator.
296 .I colon-separated hexadecimal list
303 .B concat (\fIdata-expr1\fB, ..., \fIdata-exprN\fB)\fR
311 .B reverse (\fInumeric-expr1\fB, \fIdata-expr2\fB)\fR
323 .B leased-address
335 .B binary-to-ascii (\fInumeric-expr1\fB, \fInumeric-expr2\fB,
336 .B \fIdata-expr1\fB,\fR \fIdata-expr2\fB)\fR
338 Converts the result of evaluating data-expr2 into a text string
340 data-expr2. Each number is separated from the other by the result of
341 evaluating data-expr1. The result of evaluating numeric-expr1
343 converted. The result of evaluating numeric-expr2 specifies the
352 concat (binary-to-ascii (10, 8, ".",
353 reverse (1, leased-address)),
354 ".in-addr.arpa.");
359 .B encode-int (\fInumeric-expr\fB, \fIwidth\fB)\fR
361 Numeric-expr is evaluated and encoded as a data string of the
367 .B pick-first-value (\fIdata-expr1\fR [ ... \fIexpr\fRn ] \fB)\fR
369 The pick-first-value function takes any number of data expressions as
377 .B host-decl-name
379 The host-decl-name function returns the name of the host declaration
389 .B extract-int (\fIdata-expr\fB, \fIwidth\fB)\fR
392 The \fBextract-int\fR operator extracts an integer value in network
400 .B lease-time
403 The duration of the current lease - that is, the difference between
414 .B client-state
421 Booting - DHCP client is in the INIT state, and does not yet have an
426 Reboot - DHCP client is in the INIT-REBOOT state. It has an IP
432 Select - DHCP client is in the SELECTING state - it has received at
438 Request - DHCP client is in the REQUESTING state - it has received at
444 Bound - DHCP client is in the BOUND state - it has an IP address. No
448 Renew - DHCP client is in the RENEWING state - it has an IP address,
454 Rebind - DHCP client is in the REBINDING state - it has an IP address,
460 .B log (\fIpriority\fB, \fIdata-expr\fB)\fR
472 .B execute (\fIcommand-path\fB [, \fIdata-expr1\fB, ... \fIdata-exprN\fB]);\fR
475 The \fBexecute\fR statement runs an external command. The first argument
477 The other arguments, if present, are either string literals or data-
478 expressions which evaluate to text strings, to be passed as command-line
481 \fBexecute\fR is synchronous; the program will block until the external
484 bad performance and timeouts. Only external applications with very short
487 Passing user-supplied data to an external application might be dangerous.
488 Make sure the external application checks input buffers for validity.
489 Non-printable ASCII characters will be converted into dhcpd.conf language
490 octal escapes ("\\nnn"), make sure your external command handles them as
502 dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcp-options(5), dhcpd(8),