#[non_exhaustive]pub struct DhcpConfig {
pub outgoing_options: &'static [DhcpOption<'static>],
pub parameter_request_list: Option<&'static [u8]>,
pub max_lease_duration: Option<Duration>,
pub ignore_naks: bool,
}Expand description
Configuration of the DHCP client, passed to Iface::set_dhcpv4.
Start from DhcpConfig::default and change the fields you need.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.outgoing_options: &'static [DhcpOption<'static>]Extra options added to every outgoing packet.
parameter_request_list: Option<&'static [u8]>The parameter request list option sent to the server.
None asks for the subnet mask, router and DNS servers. Changing this does
not change which options the client itself reads from the lease.
max_lease_duration: Option<Duration>A cap on the lease duration the server gives.
Useful to react faster to IP configuration changes, and to test renewals.
ignore_naks: boolIgnore NAKs from the server.
This is not RFC compliant. It is a workaround for servers that send spurious NAKs, for example when several servers share a network.
Trait Implementations§
Auto Trait Implementations§
impl Forget for DhcpConfig
impl Freeze for DhcpConfig
impl Move for DhcpConfig
impl RefUnwindSafe for DhcpConfig
impl Send for DhcpConfig
impl Sync for DhcpConfig
impl Unpin for DhcpConfig
impl UnsafeUnpin for DhcpConfig
impl UnwindSafe for DhcpConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more