Skip to main content

netscli_core/common/
constants.rs

1pub const DEFAULT_SUBNET: &str = "192.168.1.0/24";
2pub const DEFAULT_PORTS: &[u16] = &[22, 80, 443];
3pub const DEFAULT_CONCURRENCY: usize = 256;
4pub const DEFAULT_SCAN_TIMEOUT_MS: u64 = 500;
5pub const DEFAULT_PING_TIMEOUT_MS: u64 = 1000;
6pub const DEFAULT_DNS_TIMEOUT_MS: u64 = 1500;
7
8/// Longest an mDNS browse will run.
9///
10/// This was the one engine knob with no core-side ceiling: `netscli mdns
11/// --timeout-ms 86400000` blocked for a day. The TUI clamped to this value
12/// itself, which is exactly the per-surface divergence the limits in this
13/// crate exist to prevent.
14pub const MAX_MDNS_TIMEOUT_MS: u64 = 30_000;
15
16/// Most pings a single `ping_host_summary` call will send.
17///
18/// The loop is sequential and each iteration waits up to `ping_timeout_ms`,
19/// so an unbounded count multiplies straight into wall-clock time: 256 pings
20/// at the 10-minute ceiling is roughly 42 hours. Every other engine knob is
21/// clamped in core; this one was not.
22pub const MAX_PING_COUNT: u32 = 256;