The DHCP protocol is
a request-response UDP-based protocol and, thus, the stimulation for a DHCP
server operation is usually a DHCP request from a client. The result is usually
a DHCP response sent back to that client.
The DHCP extension
facility makes the information input in the DHCP request available to
extensions at most of the extension points, and the information to be sent as a
response to a DHCP request available at the
pre-packet-encode extension point (see
In addition to this
DHCP packet-based information, there is additional data that the DHCP server
uses when processing DHCP requests. This data becomes associated with either
the DHCP request or the DHCP response as part of the architecture of the
server. Much of this data is also made available to extensions, and much of it
can be both read and written—in many cases altering the processing algorithms
of the DHCP server.
The request and
response dictionaries, therefore, contain two classes of data in each
dictionary. They contain decoded packet data items as well as other request or
response associated data items. The decoded packet data items are those data
items directly contained in or derived from the DHCP request or DHCP response.
Access to the decoded packet data items allows you to read and, in some cases,
rewrite the DHCP request and DHCP response packet. The following figure shows
the relationship between the request and the response dictionaries.
Figure 1. Extensions
Request and Response Dictionaries
You can access
information from the DHCP request packet, such as the
ciaddr , and all
the incoming DHCP options by using the decoded packet data items in the request
dictionary. Similarly, you can set the
ciaddr , and add
and remove DHCP options in the outgoing DHCP response by accessing the decoded
packet data items in the response dictionary.
It is important to
realize that access to the packet information provided by the decoded packet
data items is not all available to you. The specific data items available to
that extension point are listed in the description of each extension point.
Because the decoded packet data items are always accessible as a group, they
are listed as a group.
You access DHCP
options by name. If the option is not present, the server returns no data for
that option. If you place an option into the decoded request or decoded
response, it replaces any option with the same name already in the decoded
request or decoded response, unless, in the put operation, you want the data
specifically appended to existing data.
Some DHCP options can
have multiple values. For example, the routers option can have one or more IP
addresses associated with it. Access to these multiple values is by indexed
operations on the option name.
on the request or response dictionary removes all the options in the decoded