Struct smoltcp::socket::Dhcpv4Socket [−][src]
pub struct Dhcpv4Socket { /* fields omitted */ }
Implementations
DHCP client socket.
The socket acquires an IP address configuration through DHCP autonomously.
You must query the configuration with .poll()
after every call to Interface::poll()
,
and apply the configuration to the Interface
.
Get the configured max lease duration.
See also Self::set_max_lease_duration()
Set the max lease duration.
When set, the lease duration will be capped at the configured duration if the DHCP server gives us a longer lease. This is generally not recommended, but can be useful for debugging or reacting faster to network configuration changes.
If None, no max is applied (the lease duration from the DHCP server is used.)
Get whether to ignore NAKs.
See also Self::set_ignore_naks()
Set whether to ignore NAKs.
This is not compliant with the DHCP RFCs, since theoretically we must stop using the assigned IP when receiving a NAK. This can increase reliability on broken networks with buggy routers or rogue DHCP servers, however.
Reset state and restart discovery phase.
Use this to speed up acquisition of an address in a new network if a link was down and it is now back up.