DhcpOptions¶
Namespace: inet
class DhcpOptions
Represents options in a DHCP message. In the DHCP protocol, options are added to the message as tagged data items. In the simulation, this DhcpOptions class statically holds the union of all options actually used by the DHCP protocol models. Options absent from a packet are represented by empty/unfilled DhcpOptions fields.
See also: DhcpMessage, DhcpClient, DhcpServer
Usage diagram¶
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
cObject |
(unknown – not in documented files) |
Fields¶
Name |
Type |
Description |
|---|---|---|
messageType |
to convey the type of the DHCP message |
|
hostName |
string |
name of the client |
parameterRequestList |
used by a DHCP client to request values for specified configuration parameters |
|
clientIdentifier |
used by DHCP clients to specify their unique identifier |
|
requestedIp |
used in a client request (DHCPDISCOVER) to allow the client to request that a particular IP address be assigned |
|
subnetMask |
client’s subnet mask |
|
router |
IP addresses for routers on the client’s subnet |
|
dns |
list of DNSs available to the client |
|
ntp |
list of IP addresses indicating NTP servers available to the client |
|
serverIdentifier |
client use this field as the destination address for any unicast DHCP messages to the server |
|
renewalTime |
simtime_t |
time interval (T1) from address assignment until the client transitions to the RENEWING state |
rebindingTime |
simtime_t |
time interval (T2) from address assignment until the client transitions to the REBINDING state |
leaseTime |
simtime_t |
request for lease time (client), offered lease time (server) |
Properties¶
Name |
Value |
Description |
|---|---|---|
packetData |
Source code¶
//
// Represents options in a DHCP message. In the DHCP protocol, options are
// added to the message as tagged data items. In the simulation, this DhcpOptions
// class statically holds the union of all options actually used by the DHCP
// protocol models. Options absent from a packet are represented by empty/unfilled
// DhcpOptions fields.
//
// @see DhcpMessage, DhcpClient, DhcpServer
//
class DhcpOptions extends cObject
{
@packetData;
DhcpMessageType messageType; // to convey the type of the DHCP message
string hostName; // name of the client
DhcpOptionCode parameterRequestList[]; // used by a DHCP client to request values for specified configuration parameters
MacAddress clientIdentifier; // used by DHCP clients to specify their unique identifier
Ipv4Address requestedIp; // used in a client request (DHCPDISCOVER) to allow the client to request that a particular IP address be assigned
Ipv4Address subnetMask; // client's subnet mask
Ipv4Address router[]; // IP addresses for routers on the client's subnet
Ipv4Address dns[]; // list of DNSs available to the client
Ipv4Address ntp[]; // list of IP addresses indicating NTP servers available to the client
Ipv4Address serverIdentifier; // client use this field as the destination address for any unicast DHCP messages to the server
simtime_t renewalTime; // time interval (T1) from address assignment until the client transitions to the RENEWING state
simtime_t rebindingTime; // time interval (T2) from address assignment until the client transitions to the REBINDING state
simtime_t leaseTime; // request for lease time (client), offered lease time (server)
}