2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-22 18:07:25 +00:00

[master] Add defintiions for options

This commit is contained in:
Shawn Routhier 2014-01-15 18:54:35 -08:00
parent fe2ac9e327
commit bc30c84e65
4 changed files with 384 additions and 21 deletions

View File

@ -141,6 +141,9 @@ work on other platforms. Please report any problems and suggested fixes to
server to find the hardware address during on-expiry processing.
[ISC-Bugs #24584]
- Add definitions for some options that have been specified by the IETF.
[ISC-Bugs #29268]
Changes since 4.2.5
- Address static analysis warnings.

View File

@ -1,6 +1,6 @@
.\" $Id: dhcp-options.5,v 1.50 2011/05/20 13:48:32 tomasz Exp $
.\"
.\" Copyright (c) 2012-2013 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 2012-2014 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
@ -90,10 +90,8 @@ option root-path "10.0.1.4:/var/tmp/rootfs";
.PP
The
.B domain-name
data type specifies a domain name, which must not be
enclosed in double quotes. This data type is not used for any
existing DHCP options. The domain name is stored just as if it were
a text option.
data type specifies a domain name, which must not be enclosed in double
quotes. The domain name is stored just as if it were a text option.
.PP
The
.B domain-list
@ -134,6 +132,17 @@ For example:
option hostname = binary-to-ascii (16, 8, "-",
substring (hardware, 1, 6));
.fi
.SH INCLUDING OPTION DEFINITIONS
Starting with 4.3.0 when ISC adds new option definitions those definitions
will be included in the code based on the definition of an argument for
the RFC that defines the option in includes/site.h. This provides you
with a method for over-riding the ISC definitions if necessary - for
example if you have previously defined the option with a different
format using the mechanism from DEFINING NEW OPTIONS below.
.PP
By default all of the options are enabled. In order to disable an option
you would edit the includes/site.h file and comment out the definition for
the proper RFC.
.SH STANDARD DHCPV4 OPTIONS
The documentation for the various options mentioned below is taken
from the latest IETF draft document on DHCP options. Options not
@ -211,6 +220,19 @@ subnet. Legal values for broadcast addresses are specified in
section 3.2.1.3 of STD 3 (RFC1122).
.RE
.PP
.B option
.B capwap-ac-v4
.I ip-address \fR[\fB,
.I ip-address \fR... ]
.B ;
.RS 0.25i
.PP
A list of IPv4 addresses of CAPWAP ACs that the WTP may use.
The addresses are listed in preference order.
.PP
This option is included based on RFC 5417.
.RE
.PP
.B option \fBcookie-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
]\fB;\fR
.RS 0.25i
@ -753,6 +775,19 @@ NetWare/IP suboptions - see the NETWARE/IP SUBOPTIONS section for more
information.
.RE
.PP
.B option
.B pana-agent
.I ip-address \fR[\fB,
.I ip-address \fR... ]
.B ;
.RS 0.25i
.PP
A set of IPv4 addresses of a PAA for the client to use. The
addresses are listed in preferred order.
.PP
This option is included based on RFC 5192.
.RE
.PP
.B option \fBpath-mtu-aging-timeout\fR \fIuint32\fR\fB;\fR
.RS 0.25i
.PP
@ -770,6 +805,14 @@ a list of 16-bit unsigned integers, ordered from smallest to largest.
The minimum MTU value cannot be smaller than 68.
.RE
.PP
.B option \fBpcode\fR \fItext\fR\fB;\fR
.RS 0.25i
.PP
This option specifies a string suitable for the TZ variable.
.PP
This option is included based on RFC 4833.
.RE
.PP
.B option \fBperform-mask-discovery\fR \fIflag\fR\fB;\fR
.RS 0.25i
.PP
@ -988,6 +1031,14 @@ indicates that the client should not generate keepalive messages on
connections unless specifically requested by an application.
.RE
.PP
.B option \fBtcode\fR \fItext\fR\fB;\fR
.RS 0.25i
.PP
This option specifies a name of a zone entry in the TZ database.
.PP
This option is included based on RFC 4833.
.RE
.PP
.B option \fBtftp-server-name\fR \fItext\fR\fB;\fR
.RS 0.25i
.PP
@ -1047,6 +1098,23 @@ DHCP clients have a way in the user interface to specify the value for
this identifier, usually as a text string.
.RE
.PP
.B option \fBv4-access-domain\fR \fIdomain-name\fR\fB;\fR
.RS 0.25i
.PP
The domain name associated with the access network for use with
LIS Discovery.
.PP
This option is included based on RFC 5986.
.RE
.PP
.B option \fBv4-lost\fR \fIdomain-name\fR\fB;\fR
.RS 0.25i
.PP
The domain name of the LoST server for the client to use.
.PP
This option is included based on RFC 5223.
.RE
.PP
.B option \fBvendor-class-identifier\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
@ -1650,6 +1718,14 @@ The \fBbcms-server-a\fR option contains the IPv6 addresses of local BCMS
may use.
.RE
.PP
.B option \fBdhcp6.geoconf-civic\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
A string to hold the geoconf civic structure.
.PP
This option is included based on RFC 4776.
.RE
.PP
.B option \fBdhcp6.remote-id\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
@ -1679,28 +1755,67 @@ Client FQDN SubOptions for full details (the DHCPv4 and DHCPv6 FQDN options
use the same "fqdn." encapsulated space, so are in all ways identical).
.RE
.PP
.B option \fBdhcp6.pana-agent\fR
.I ip6-address \fR[\fB,
.I ip6-address \fR... ]
.B ;
.RS 0.25i
.PP
A set of IPv6 addresses of a PAA for the client to use. The
addresses are listed in preferred order.
.PP
This option is included based on RFC 5192.
.RE
.PP
.B option \fBdhcp6.new-posix-timezone\fR \fItext\fR\fB;\fR
.RS 0.25i
.PP
This option specifies a string suitable for the TZ variable.
.PP
This option is included based on RFC 4833.
.RE
.PP
.B option \fBdhcp6.new-tzdb-timezone\fR \fItext\fR\fB;\fR
.RS 0.25i
.PP
This option specifies a name of a zone entry in the TZ database.
.PP
This option is included based on RFC 4833.
.RE
.PP
.B option \fBdhcp6.ero\fR
.I uint16 \fR[\fB,
.I uint16 \fR... ]
.B ;
.RS 0.25i
.PP
A list of the options requested by the relay agent.
.PP
This option is included based on RFC 4994.
.RE
.PP
.B option \fBdhcp6.lq-query\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
The \fBlq-query\fR option is used internally by for lease query.
The \fBlq-query\fR option is used internally for lease query.
.RE
.PP
.B option \fBdhcp6.client-data\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
The \fBclient-data\fR option is used internally by for lease query.
The \fBclient-data\fR option is used internally for lease query.
.RE
.PP
.B option \fBdhcp6.clt-time\fR \fIuint32\fR\fB;\fR
.RS 0.25i
.PP
The \fBclt-time\fR option is used internally by for lease query.
The \fBclt-time\fR option is used internally for lease query.
.RE
.PP
.B option \fBdhcp6.lq-relay-data\fR \fIip6-address string\fR\fB;\fR
.RS 0.25i
.PP
The \fBlq-relay-data\fR option is used internally by for lease query.
The \fBlq-relay-data\fR option is used internally for lease query.
.RE
.PP
.B option
@ -1710,7 +1825,154 @@ The \fBlq-relay-data\fR option is used internally by for lease query.
.B ;
.RS 0.25i
.PP
The \fBlq-client-link\fR option is used internally by for lease query.
The \fBlq-client-link\fR option is used internally for lease query.
.RE
.PP
.B option \fBdhcp6.v6-lost\fR \fIdomain-name\fR\fB;\fR
.RS 0.25i
.PP
The domain name of the LoST server for the client to use.
.PP
This option is included based on RFC 5223.
.RE
.PP
.B option \fBdhcp6.capwap-ac-v6\fR
.I ip6-address \fR[\fB,
.I ip6-address \fR... ]
.B ;
.RS 0.25i
.PP
A list of IPv6 addresses of CAPWAP ACs that the WTP may use.
The addresses are listed in preference order.
.PP
This option is included based on RFC 5417.
.RE
.PP
.B option \fBdhcp6.relay-id\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
The DUID for the relay agent.
.PP
This option is included based on RFC 5460.
.RE
.PP
.B option \fBdhcp6.v6-access-domain\fR \fIdomain-name\fR\fB;\fR
.RS 0.25i
.PP
The domain name associated with the access network for use with
LIS Discovery.
.PP
This option is included based on RFC5986.
.RE
.PP
.B option \fBdhcp6.sip-ua-cs-list\fR \fIdomain-list\fR\fB;\fR
.RS 0.25i
.PP
The list of domain names in the SIP User Agent Configuration
Service Domains.
.PP
This option is included based on RFC 6011.
.RE
.PP
.B option \fBdhcp6.bootfile-url\fR \fItext\fR\fB;\fR
.RS 0.25i
.PP
The URL for a boot file.
.PP
This option is included based on RFC 5970.
.RE
.PP
.B option \fBdhcp6.bootfile-param\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
A string for the parameters to the bootfile. See RFC 5970
for more description of the layout of the parameters within
the string.
.PP
This option is included based on RFC 5970.
.RE
.PP
.B option \fBdhcp6.client-arch-type\fR
.I uint16 \fR[\fB,
.I uint16 \fR... ]
.B ;
.RS 0.25i
.PP
A list of one or more architecture types described as 16 bit
values.
.PP
This option is included based on RFC 5970.
.RE
.PP
.B option \fBdhcp6.nii\fR \fIuint8 uint8 uint8\fR\fB;\fR
.RS 0.25i
.PP
The client network interface identitier option supplies information
about a client's level of UNDI support. The values are, in order,
the type, the major value and the minor value.
.PP
This option is included based on RFC5970.
.RE
.PP
.B option \fBdhcp6.aftr-name\fR \fIdomain-name\fR\fB;\fR
.RS 0.25i
.PP
A domain name of the AFTR tunnel endpoint.
.PP
This option is included based on RFC 6334.
.RE
.PP
.B option \fBdhcp6.erp-local-domain-name\fR \fIdomain-name\fR\fB;\fR
.RS 0.25i
.PP
A domain name for the ERP domain.
.PP
This option is included based on RFC 6440.
.RE
.PP
.B option \fBdhcp6.rdnss-selection\fR \fIip6-address uint8 domain-name\fR\fB;\fR
.RS 0.25i
.PP
RDNSS information consists of an IPv6 address of RDNSS, a 8 bit flags field and
a domain-list of domains for which the RDNSS has specail knowledge.
.PP
This option is included based on RFC 6731.
.RE
.PP
.B option \fBdhcp6.client-linklayer-addr\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
A client link-layer address. The first two bytes must be the type
of the link-layer followed by the address itself.
.PP
This option is included based on RFC 6939.
.RE
.PP
.B option \fBdhcp6.link-address\fR \fIip6-address\fR\fB;\fR
.RS 0.25i
.PP
An IPv6 address used by a relay agent to indicate to the server
the link on which the client is located.
.PP
This option is included based on RFC 6977.
.RE
.PP
.B option \fBdhcp6.solmax-rt\fR \fIuint32\fR\fB;\fR
.RS 0.25i
.PP
A value to override the default for SOL_MAX_RT. This is a
32 bit value.
.PP
This option is included based on RFC 7083.
.RE
.PP
.B option \fBdhcp6.inf-max-rt\fR \fIuint32\fR\fB;\fR
.RS 0.25i
.PP
A value to override the default for INF_MAX_RT. This is a
32 bit value.
.PP
This option is included based on RFC 7083.
.RE
.SH ACCESSING DHCPV6 RELAY OPTIONS
.PP

View File

@ -3,7 +3,7 @@
Tables of information... */
/*
* Copyright (c) 2011-2012 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2011-2014 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
@ -205,6 +205,10 @@ static struct option dhcp_options[] = {
{ "pxe-client-id", "BX", &dhcp_universe, 97, 1 },
#endif
{ "uap-servers", "t", &dhcp_universe, 98, 1 },
#if defined(RFC4833_OPTIONS)
{ "pcode", "t", &dhcp_universe, 100, 1 },
{ "tcode", "t", &dhcp_universe, 101, 1 },
#endif
{ "netinfo-server-address", "Ia", &dhcp_universe, 112, 1 },
{ "netinfo-server-tag", "t", &dhcp_universe, 113, 1 },
{ "default-url", "t", &dhcp_universe, 114, 1 },
@ -226,6 +230,15 @@ static struct option dhcp_options[] = {
{ "pxe-undefined-7", "X", &dhcp_universe, 134, 1 },
{ "pxe-undefined-8", "X", &dhcp_universe, 135, 1 },
#endif
#if defined(RFC5192_OPTIONS)
{"pana-agent", "Ia", &dhcp_universe, 136, 1 },
#endif
#if defined(RFC5223_OPTIONS)
{"v4-lost", "d", &dhcp_universe, 137, 1 },
#endif
#if defined(RFC5417_OPTIONS)
{"capwap-ac-v4", "Ia", &dhcp_universe, 138, 1 },
#endif
#if 0
/* Not defined by RFC yet */
{ "tftp-server-address", "Ia", &dhcp_universe, 150, 1 },
@ -237,9 +250,8 @@ static struct option dhcp_options[] = {
{ "loader-pathprefix", "t", &dhcp_universe, 210, 1 },
{ "loader-reboottime", "L", &dhcp_universe, 211, 1 },
#endif
#if 0
/* Not defined by RFC yet */
{ "vss-info", "BX", &dhcp_universe, 221, 1 },
#if defined(RFC5986_OPTIONS)
{"v4-access-domain", "d", &dhcp_universe, 213, 1 },
#endif
{ NULL, NULL, NULL, 0, 0 }
};
@ -403,8 +415,7 @@ static struct option dhcpv6_options[] = {
/* Note that 35 is not assigned. */
/* Not yet considering for inclusion. */
#if 0
#if defined(RFC4776_OPTIONS)
/* RFC4776 OPTIONS */
{ "geoconf-civic", "X", &dhcpv6_universe, 36, 1 },
@ -438,18 +449,20 @@ static struct option dhcpv6_options[] = {
{ "fqdn", "Efqdn6-if-you-see-me-its-a-bug-bug-bug.",
&dhcpv6_universe, 39, 1 },
/* Not yet considering for inclusion. */
#if 0
/* draft-ietf-dhc-paa-option-05 */
/* RFC5192 */
#if defined(RFC5192_OPTIONS)
{ "pana-agent", "6A", &dhcpv6_universe, 40, 1 },
#endif
/* RFC4833 OPTIONS */
#if defined(RFC4833_OPTIONS)
{ "new-posix-timezone", "t", &dhcpv6_universe, 41, 1 },
{ "new-tzdb-timezone", "t", &dhcpv6_universe, 42, 1 },
#endif
/* RFC4994 OPTIONS */
#if defined(RFC4994_OPTIONS)
{ "ero", "SA", &dhcpv6_universe, 43, 1 },
#endif
@ -461,6 +474,70 @@ static struct option dhcpv6_options[] = {
{ "lq-relay-data", "6X", &dhcpv6_universe, 47, 1 },
{ "lq-client-link", "6A", &dhcpv6_universe, 48, 1 },
/* RFC5223 OPTIONS */
#if defined(RFC5223_OPTIONS)
{ "v6-lost", "d", &dhcpv6_universe, 51, 1 },
#endif
/* RFC5417 OPTIONS */
#if defined(RFC5417_OPTIONS)
{ "capwap-ac-v6", "6a", &dhcpv6_universe, 52, 1 },
#endif
/* RFC5460 OPTIONS */
#if defined(RFC5460_OPTIONS)
{ "relay-id", "X", &dhcpv6_universe, 53, 1 },
#endif
/* RFC5986 OPTIONS */
#if defined(RFC5986_OPTIONS)
{ "v6-access-domain", "d", &dhcpv6_universe, 57, 1 },
#endif
/* RFC6011 OPTIONS */
#if defined(RFC6011_OPTIONS)
{ "sip-ua-cs-list", "D", &dhcpv6_universe, 58, 1 },
#endif
/* RFC5970 OPTIONS */
#if defined(RFC5970_OPTIONS)
{ "bootfile-url", "t", &dhcpv6_universe, 59, 1 },
{ "bootfile-param", "X", &dhcpv6_universe, 60, 1 },
{ "client-arch-type", "SA", &dhcpv6_universe, 61, 1 },
{ "nii", "BBB", &dhcpv6_universe, 62, 1 },
#endif
/* RFC6334 OPTIONS */
#if defined(RFC6334_OPTIONS)
{ "aftr-name", "d", &dhcpv6_universe, 64, 1 },
#endif
/* RFC6440 OPTIONS */
#if defined(RFC6440_OPTIONS)
{ "erp-local-domain-name", "d", &dhcpv6_universe, 65, 1 },
#endif
/* RFC6731 OPTIONS */
#if defined(RFC6731_OPTIONS)
{ "rdnss-selection", "6BD", &dhcpv6_universe, 74, 1 },
#endif
/* RFC6939 OPTIONS */
#if defined(RFC6939_OPTIONS)
{ "client-linklayer-addr", "X", &dhcpv6_universe, 79, 1 },
#endif
/* RFC6977 OPTIONS */
#if defined(RFC6977_OPTIONS)
{ "link-address", "6", &dhcpv6_universe, 80, 1 },
#endif
/* RFC7083 OPTIONS */
#if defined(RFC7083_OPTIONS)
{ "solmax-rt", "L", &dhcpv6_universe, 82, 1 },
{ "inf-max-rt", "L", &dhcpv6_universe, 83, 1 },
#endif
{ NULL, NULL, NULL, 0, 0 }
};

View File

@ -295,3 +295,24 @@
up. */
#define DDNS_UPDATE_SLOW_TRANSITION
/* Include definitions for various options. In general these
should be left as is, but if you have already defined one
of these and prefer your definition you can comment the
RFC define out to avoid conflicts */
#define RFC4776_OPTIONS
#define RFC4833_OPTIONS
#define RFC4994_OPTIONS
#define RFC5192_OPTIONS
#define RFC5223_OPTIONS
#define RFC5417_OPTIONS
#define RFC5460_OPTIONS
#define RFC5970_OPTIONS
#define RFC5986_OPTIONS
#define RFC6011_OPTIONS
#define RFC6334_OPTIONS
#define RFC6440_OPTIONS
#define RFC6731_OPTIONS
#define RFC6939_OPTIONS
#define RFC6977_OPTIONS
#define RFC7083_OPTIONS