Represents a DHCP message. DHCP (Dynamic Host Configuration Protocol, RFC 2131) provides a framework for passing configuration information to hosts on a TCP/IP network.
See also: DHCPClient, DHCPServer
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Name | Type | Description |
---|---|---|
op | int |
message op code / message type. 1 = BOOTREQUEST, 2 = BOOTREPLY |
htype | int |
hardware address type, see ARP section in "Assigned Numbers" RFC; e.g., '1' = 10mb ethernet |
hlen | int |
hardware address length (e.g. '6' for 10mb ethernet) |
hops | int |
client sets to zero, optionally used by relay agents when booting via a relay agent |
xid | unsigned int |
transaction ID, a random number chosen by the client, used by the client and server to associate messages and responses between a client and a server |
secs | int |
filled in by client, seconds elapsed since client began address acquisition or renewal process |
broadcast | bool |
the broadcast bit in the flags field |
ciaddr | IPv4Address |
client IP address; only filled in if client is in BOUND, RENEW or REBINDING state and can respond to ARP requests |
yiaddr | IPv4Address |
'your' (client) IP address |
giaddr | IPv4Address |
relay agent IP address, used in booting via a relay agent |
chaddr | MACAddress |
client hardware address (MAC) |
sname | string |
optional server host name |
file | string |
boot file name (unused in the simulation) |
options | DHCPOptions |
holds DHCP options |
// // Represents a DHCP message. DHCP (Dynamic Host Configuration Protocol, RFC 2131) // provides a framework for passing configuration information to hosts on a TCP/IP network. // // @see DHCPClient, DHCPServer // packet DHCPMessage { int op @enum(DHCPOpcode); // message op code / message type. 1 = BOOTREQUEST, 2 = BOOTREPLY int htype; // hardware address type, see ARP section in "Assigned Numbers" RFC; e.g., '1' = 10mb ethernet int hlen; // hardware address length (e.g. '6' for 10mb ethernet) int hops; // client sets to zero, optionally used by relay agents when booting via a relay agent unsigned int xid; // transaction ID, a random number chosen by the client, used by the client and server to associate messages and responses between a client and a server int secs; // filled in by client, seconds elapsed since client began address acquisition or renewal process bool broadcast; // the broadcast bit in the flags field IPv4Address ciaddr; // client IP address; only filled in if client is in BOUND, RENEW or REBINDING state and can respond to ARP requests IPv4Address yiaddr; // 'your' (client) IP address IPv4Address giaddr; // relay agent IP address, used in booting via a relay agent MACAddress chaddr; // client hardware address (MAC) string sname; // optional server host name string file; // boot file name (unused in the simulation) DHCPOptions options; // holds DHCP options }