Add ARP scanner status API endpoint and rename scanner module

Renames scanner.rs to arp_scanner.rs to future-proof for additional scanner
types. Renames the [timings] config section to [arp_scanner] and simplifies
field names (arp_sender_timeout -> sender_timeout, arp_scan_duration ->
scan_duration). Introduces arp_scanner_status module to track whether the
scan is actively running or sleeping, and exposes this via a new
GET /api/arp_scanner/status endpoint returning is_running,
running_for_seconds, and next_run_in_seconds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-05-28 17:57:26 -04:00
co-authored by Claude Sonnet 4.6
parent 97e4bb1000
commit 020c7d2c49
8 changed files with 193 additions and 15 deletions
+3 -3
View File
@@ -7,10 +7,10 @@ interface = "eno1" # Network interface to use for scans
[log]
level = "info" # off, error, warn, info, debug, trace
[timings]
[arp_scanner]
wait_between_scans="10m" # Wait time between scans. This does not include the scan time
arp_sender_timeout="1m" # If the ARP sender process takes longer than this it will be stopped (for a class C network - 254 IPs - it should take less than a minute)
arp_scan_duration="10m" # How long to wait for response packets on each scan (5m to 10m is a good timeframe for a class B or C network)
sender_timeout="1m" # If the ARP sender process takes longer than this it will be stopped (for a class C network - 254 IPs - it should take less than a minute)
scan_duration="10m" # How long to wait for response packets on each scan (5m to 10m is a good timeframe for a class B or C network)
[notifications]
method="pushover" # For now just pushover, you can set this to "none" to avoid sending notifications (it will just log)