struct DhcpClient {
int state;
unsigned int xid;
struct DhcpLease lease;
unsigned char mac[NET_MAC_LEN];
}Fields
transaction ID
Methods
Build a DHCPDISCOVER packet.
§
void request(
&PacketBuf pkt,
const unsigned char eth_dst[NET_MAC_LEN],
unsigned int offered_ip,
unsigned int server_ip,
)source · definitionBuild a DHCPREQUEST for offered_ip from server_ip.
Parse an incoming DHCP reply; fills lease on ACK/OFFER. Returns DHCP_OFFER, DHCP_ACK, DHCP_NAK, or 0 on unrecognised.
Is the client bound (has a valid lease)?