toe-beans 0.10.0

DHCP library, client, and server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod client;
mod config;

pub use client::*;
pub use config::*;

/// The standard port for dhcpv4 clients defined in the RFC.
pub const CLIENT_PORT: u16 = 68;
/// This is an arbitrary port number above 1024 that can be used when testing the client.
/// Port numbers below 1024 are privileged ports that require admin access to bind to.
/// See: <https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html>
pub const TEST_CLIENT_PORT: u16 = 8068;
/// Resolves to TEST_PORT for debug builds and PORT for release builds
pub const RESOLVED_CLIENT_PORT: u16 = if cfg!(debug_assertions) {
    TEST_CLIENT_PORT
} else {
    CLIENT_PORT
};