Expand description
Lightweight DHCP server and IP allocator for ArcBox.
This crate provides a self-contained DHCP server implementation with:
- DHCP DISCOVER/OFFER/REQUEST/ACK flow
- IP address pool allocation and lease management
- DNS server and gateway configuration
- MAC-based IP reservations
§Example
use arcbox_dhcp::{DhcpServer, DhcpConfig};
use std::net::Ipv4Addr;
let config = DhcpConfig::new(
Ipv4Addr::new(192, 168, 64, 1),
Ipv4Addr::new(255, 255, 255, 0),
);
let mut server = DhcpServer::new(config);Re-exports§
pub use allocator::IpAllocator;pub use config::DEFAULT_LEASE_DURATION;pub use config::DHCP_CLIENT_PORT;pub use config::DHCP_SERVER_PORT;pub use config::DhcpConfig;pub use error::DhcpError;pub use error::Result;pub use packet::DhcpMessageType;pub use packet::DhcpPacket;pub use server::DhcpLease;pub use server::DhcpServer;