]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Document setting value of parameters through expressions.
authorTed Lemon <source@isc.org>
Sun, 9 Jul 2000 06:49:39 +0000 (06:49 +0000)
committerTed Lemon <source@isc.org>
Sun, 9 Jul 2000 06:49:39 +0000 (06:49 +0000)
common/dhcp-options.5
server/dhcpd.conf.5

index d1776fb1e96a5ca211265d461128232daf25f8c0..e15620594e7e03c15531a095884206e29ceef9f4 100644 (file)
@@ -87,7 +87,25 @@ hexadecimal, seperated by colons.   For example:
 or
   option dhcp-client-identifier 43:4c:49:45:54:2d:46:4f:4f;
 .fi
+.SH SETTING OPTION VALUES USING EXPRESSIONS
+Sometimes it's helpful to be able to set the value of a DHCP option
+based on some value that the client has sent.   To do this, you can
+use expression evaluation.   The 
+.B dhcp-eval(5)
+manual page describes how to write expressions.   To assign the result
+of an evaluation to an option, define the option as follows:
+.nf
+.sp 1
+  \fBoption \fImy-option \fB= \fIexpression \fB;\fR
+.fi
 .PP
+For example:
+.nf
+.sp 1
+  option hostname = binary-to-ascii (16, 8, "-",
+                                     substring (hardware, 1, 6));
+.fi
+.SH STANDARD DHCP OPTIONS
 The documentation for the various options mentioned below is taken
 from the latest IETF draft document on DHCP options.   Options which
 are not listed by name may be defined by the name option-\fInnn\fR,
index e4e5be811c5e21b5e6d5534ada13831e5760f222..bb4a44199273f634a980842ba692e352c8ed82f1 100644 (file)
@@ -1404,6 +1404,24 @@ The \fIddns-updates\fR parameter controls whether or not the server will
 attempt to do a ddns update when a lease is confirmed.   Set this to \fIoff\fR
 if the server should not attempt to do updates within a certain scope.
 The \fIddns-updates\fR parameter is on by default.
+.SH SETTING PARAMETER VALUES USING EXPRESSIONS
+Sometimes it's helpful to be able to set the value of a DHCP server
+parameter based on some value that the client has sent.   To do this,
+you can use expression evaluation.   The 
+.B dhcp-eval(5)
+manual page describes how to write expressions.   To assign the result
+of an evaluation to an option, define the option as follows:
+.nf
+.sp 1
+  \fImy-parameter \fB= \fIexpression \fB;\fR
+.fi
+.PP
+For example:
+.nf
+.sp 1
+  ddns-hostname = binary-to-ascii (16, 8, "-",
+                                   substring (hardware, 1, 6));
+.fi
 .SH REFERENCE: OPTION STATEMENTS
 .PP
 DHCP option statements are documented in the