mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
The five scanners (ARP, SNMP, mDNS, SSDP, DHCP) duplicated their
persist-and-notify pipeline, device enrichment, and status state
machines across same-family files. Extract the shared logic so a change
lands in one place instead of three to five.
- scanners/common/pipeline.rs: single record_sighting() persist+notify
path, replacing the per-scanner match blocks. ARP/SNMP now use the
same merge rules as the passive scanners (keep a stored hostname,
never overwrite a known IP with an empty one).
- scanners/common/enrichment.rs: build_device() for vendor/device-type
lookup with the privacy-MAC service fallback.
- scanners/common/{active,passive}_status.rs: the two status state
machines plus their tests, written once. Each scanner status.rs is now
a thin wrapper over its own static.
- utils/network::format_mac(): replaces three identical copies.
- web_server/scanner_status.rs: Active/Passive response types and two
handler helpers, replacing five near-identical structs+handlers. JSON
field names are unchanged so the frontend is unaffected; only OpenAPI
schema names change.
27 files changed, ~900 lines net removed. Build, clippy and all 113
tests (4 new) pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
OOTT ToDo list
- Add linting to CLAUDE.md for both Rust and Dart
- Review and document the release process
- Add support for push notifications to the app (iOS and Android)
- Review the README.md file
Backend
- Add configuration options to enable/disable each scanner
- Implement the pushover API call directly to support HTML content and review notification text to use it
- Add "devices seen on last scan" to the ARP and SNMP scanners status
- Modify the passive scanners status to count devices seen in the last hour
- Simplify the code of scanners (repeated logic)
- Modify the event management to ignore duplicate events if they happen within a time threshold
- Review the recommended timings for the ARP scanner (change defaults) — SNMP defaults set to 10m/5s
Frontend
- Can we add front-end tests?
- Break down oott_api.dart in modules
Improve engine
Passive (low noise, no probing):
- Passive packet capture — observe any broadcast/multicast traffic; a device that never responds to ARP still generates traffic
Active (you probe the network):
- NDP (Neighbor Discovery Protocol) — IPv6 equivalent of ARP; important if the network uses IPv6
Via infrastructure:
- SNMP query to router/firewall — pull the ARP table directly via SNMPv2c (no local probing); see
[snmp_scanner]config - Extend the SNMP scanner: SNMPv3 support, and switch MAC/forwarding table (port/VLAN) polling