Documentation
¶
Overview ¶
Package passive runs an always-on broadcast sniffer on the iface and feeds learned MAC/IP/hostname facts into a callback. onObs is invoked from this function's goroutine; it must be safe for concurrent use if called from multiple Run invocations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(ctx context.Context, ifaceName string, onObs func(devicestore.Observation)) error
Run blocks until ctx is done. Every observation extracted from a supported broadcast frame is passed to onObs. The order of parsers matters: ARP/DHCP yield strictly more identity info than the generic UDP-broadcast parser, so try them first; the UDP-broadcast fallback is what extracts (MAC, IP) from mDNS/SSDP/NetBIOS frames whose upper protocol we don't parse, plus mDNS hostname enrichment when present.
Types ¶
This section is empty.