passive

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2026 License: MIT Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL