xarxa

Crates

git

Versions

default

Flavors

Skip to main content

Module dhcpv4_server

Module dhcpv4_server 

Source
Expand description

DHCPv4 server.

The server is part of an interface. Turn it on with Iface::set_dhcpv4_server and it answers DHCP requests arriving on that interface, handing out addresses from a configured pool. Inspect the leases with Iface::dhcpv4_server_leases and remove one with Iface::remove_dhcpv4_server_lease.

The interface must have an IPv4 address: it is the server’s own address and its subnet provides the subnet mask sent to clients. The pool must be inside that subnet.

Only Ethernet interfaces are supported. Requests relayed by a DHCP relay agent are ignored, and offered addresses are not probed with ICMP before being handed out (a client that detects a conflict declines the address, which takes it out of the pool for a while).

Structs§

DhcpServerConfig
Configuration of the DHCP server, passed to Iface::set_dhcpv4_server.
DhcpServerLease
One entry of the DHCP server’s lease table.

Enums§

DhcpServerError
Error returned by Iface::set_dhcpv4_server.
DhcpServerLeaseState
The state of one DhcpServerLease.