mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Add per-scanner enable/disable configuration
Each scanner (ARP, mDNS, SSDP/UPnP, DHCP) can now be turned off via an `enabled` flag in its config section, defaulting to true so existing deployments are unchanged. A disabled scanner's entry function returns early and never starts. Documented in the README options table (also fixing the stale `timings.*` key names to the actual `arp_scanner.*` keys), and added to the TOML samples and the NixOS module. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4e975598f9
commit
08ee4fc0ea
@@ -17,6 +17,11 @@ use crate::settings::get_settings;
|
||||
/// Passively listen for SSDP/UPnP NOTIFY announcements and feed discovered devices into the same
|
||||
/// pipeline used by the ARP and mDNS scanners (devices table + events + notifications).
|
||||
pub async fn listen() -> Result<(), Box<dyn std::error::Error>> {
|
||||
if !get_settings().ssdp_scanner.enabled {
|
||||
info!("SSDP scanner disabled in configuration; not starting");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let interface = get_settings().networking.interface.clone();
|
||||
let socket = finder::open_socket(interface.clone())?;
|
||||
status::set_listening();
|
||||
|
||||
Reference in New Issue
Block a user