Expand description
Secure DHCP Client Implementation
This module provides a comprehensive DHCP client supporting:
- DHCPv4 and BOOTP
- DHCPv6
- PXE boot
- Dynamic DNS updates
- Load balancing and failover
- TFTP client for PXE
- Security hardening
Re-exports§
pub use protocol::UnixServer;pub use protocol::ServerConfig;pub use protocol::DaemonClient;pub use protocol::UnixClient;pub use protocol::ClientConfig;pub use protocol::JsonRpcRequest;pub use protocol::JsonRpcResponse;pub use protocol::JsonRpcError;pub use protocol::ProtocolError;pub use protocol::ProtocolResult;pub use control::*;
Modules§
Structs§
- Ddns
Config - Dynamic DNS configuration
- Ddns
Updater - Dynamic DNS updater
- Dhcp
Client Config - Main DHCP client configuration
- Dhcp
Client Manager - Unified DHCP client manager
- Dhcp
Client Status - Overall DHCP client status
- Dhcp
Lease Info - Lease information extracted from DHCP ACK
- Dhcp
RawSocket - Raw socket wrapper for DHCP operations
- Dhcp
Server - DHCP server information
- Dhcpv4
Client - DHCPv4 client
- Dhcpv4
Config - DHCPv4 configuration
- Dhcpv4
Lease - DHCPv4 lease
- Dhcpv4
Lease Info - DHCPv4 lease information
- Dhcpv4
Status - DHCPv4 client status
- Dhcpv6
Auth Config - Configuration for DHCPv6 authentication DHCPv6 Authentication Configuration (RFC 8415 Section 20)
- Dhcpv6
Auth Context - DHCPv6 Authentication Context (RFC 8415 Section 20)
- Dhcpv6
Client - DHCPv6 client
- Dhcpv6
Config - DHCPv6 configuration
- Dhcpv6
IaNa - DHCPv6 Identity Association for Non-temporary Addresses (IA_NA)
- Dhcpv6
IaNa Info - DHCPv6 IA_NA information
- Dhcpv6
IaPd - DHCPv6 Identity Association for Prefix Delegation (IA_PD)
- Dhcpv6
IaPd Info - DHCPv6 IA_PD information (Prefix Delegation)
- Dhcpv6
Status - DHCPv6 client status
- Dhcpv6
TcpConnection - TCP connection wrapper for DHCPv6 over TCP
- Dhcpv6
TlsConfig - Configuration for DHCPv6 TLS DHCPv6 TLS/STARTTLS Configuration (RFC 7653)
- Dhcpv6
TlsContext - DHCPv6 TLS Context for STARTTLS support (RFC 7653)
- Failover
Config - Failover configuration
- Failover
Manager - Failover manager for DHCP servers
- PxeConfig
- PXE configuration
- PxeConfig
Settings - PXE configuration
- PxeHandler
- PXE client handler
- PxeMenu
Item - PXE boot menu item
- Security
Config - Security configuration
- Security
Context - Security context for DHCP client
- Tftp
Client - TFTP client
- Tftp
Config - TFTP configuration
- Wifi
Config - WiFi network configuration
- Wifi
Interface Config - WiFi interface configuration (mapping interfaces to networks)
- Wifi
Manager - WiFi connection manager
- Wifi
Network - WiFi network information from scan
- Wifi
Network Config - WiFi network configuration for a specific interface
Enums§
- Dhcp
Client Error - DHCP client errors
- Dhcpv4
State - DHCPv4 client state
- Dhcpv6
State - DHCPv6 client state
- RawSocket
Type - Raw socket types for DHCP
- Wifi
Security - WiFi security/authentication type
Constants§
- ARP_
OP_ REPLY - ARP_
OP_ REQUEST - ARP operation codes
Functions§
- arp_
probe_ address - Perform ARP probe to check if an IP address is in use (RFC 5227)
- build_
arp_ probe_ frame - Build ARP probe frame for duplicate address detection (RFC 5227)
- build_
dhcp_ decline_ ip_ packet - Build DHCP DECLINE packet for IP layer socket
- build_
dhcp_ decline_ link_ frame - Build DHCP DECLINE frame for link layer socket
- build_
dhcp_ discover_ ip_ packet - Build DHCP DISCOVER packet for IP layer socket
- build_
dhcp_ discover_ link_ frame - Build DHCP DISCOVER frame for link layer socket
- build_
dhcp_ release_ ip_ packet - Build DHCP RELEASE packet for IP layer socket
- build_
dhcp_ release_ link_ frame - Build DHCP RELEASE frame for link layer socket
- build_
dhcp_ request_ ip_ packet - Build DHCP REQUEST packet for IP layer socket
- build_
dhcp_ request_ link_ frame - Build DHCP REQUEST frame for link layer socket
- create_
arp_ socket - Create a raw socket for ARP (link layer)
- extract_
lease_ info - Extract full lease information from DHCP ACK message
- extract_
offered_ ip - Extract offered IP address from DHCP message
- extract_
server_ id - Extract server identifier from DHCP options
- parse_
dhcp_ packet - Parse DHCP response packet (Link Layer format with Ethernet header) Returns (message_type, xid, options_data) if valid DHCP packet
- sanitize_
domain_ name - Validate and sanitize a domain name per RFC 1123 Returns sanitized domain name or None if invalid
- sanitize_
hostname - Validate and sanitize a hostname per RFC 952/1123 Returns sanitized hostname or None if invalid
- sanitize_
resolv_ conf_ value - Sanitize a string for safe inclusion in resolv.conf Removes any characters that could be used for injection
- validate_
interface_ name - Validate network interface name to prevent command injection Interface names should only contain alphanumeric chars, hyphens, and underscores