xarxa

Crates

git

Versions

default

Flavors

Skip to main content

Module dhcpv4

Module dhcpv4 

Source
Expand description

DHCPv4 client.

The client is part of an interface. Turn it on with Iface::set_dhcpv4 and it runs from Stack::poll: it finds a server, gets a lease, and renews it. The leased address and default route are installed on the interface by the stack itself. Read the lease with Iface::dhcpv4_lease, and watch Iface::config_generation to notice changes.

Only Ethernet interfaces are supported.

Structsยง

DhcpConfig
Configuration of the DHCP client, passed to Iface::set_dhcpv4.
DhcpLease
A lease obtained from a DHCP server.
DhcpLeaseOptions
The received options of a lease. See DhcpLease::options.
DhcpServerInfo
How to reach a DHCP server.