| Crates.io | mini-dhcp |
| lib.rs | mini-dhcp |
| version | 0.3.2 |
| created_at | 2024-11-25 09:05:17.767115+00 |
| updated_at | 2025-07-22 12:30:59.258862+00 |
| description | A minimalistic DHCP server |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1460092 |
| size | 85,203 |
A lightweight DHCP server implementation in Rust that handles basic DHCP operations including IP address assignment and lease management.
Basic usage example:
use mini_dhcp::MiniDHCPConfiguration;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Initialize the DHCP server with network interface
let config = MiniDHCPConfiguration::new("eth0".to_string()).await?;
// Start the DHCP server
mini_dhcp::start(config).await?;
Ok(())
}
The DHCP server is configured to:
The server uses SQLite to store lease information. The database file is automatically created as dhcp.db in the current directory.