toe_beans/v4/server/
mod.rs

1mod config;
2mod leases;
3mod server;
4
5pub use config::*;
6pub use leases::*;
7pub use server::*;
8
9/// The standard port for dhcpv4 servers defined in the RFC.
10pub const SERVER_PORT: u16 = 67;
11/// This is an arbitrary port number above 1024 that can be used when testing the server.
12/// Port numbers below 1024 are privileged ports that require root access to bind to.
13/// See: <https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html>
14pub const TEST_SERVER_PORT: u16 = 8067;
15/// Resolves to `TEST_SERVER_PORT` for debug builds and `SERVER_PORT` for release builds
16pub const RESOLVED_SERVER_PORT: u16 = if cfg!(debug_assertions) {
17    TEST_SERVER_PORT
18} else {
19    SERVER_PORT
20};