Returns the networks an interface found in its most recent scan, without starting a new scan.
Avoid calling this frequently: it has been seen to leak memory each time macOS refreshes the
scan cache, so polling it in a long-running configuration can grow Hammerspoon's memory use. Use
scanNetworks() for a fresh scan, or on('scanCacheUpdated', ...) to learn when the cache changes.
Parameters
Optionalinterface: string|null
the interface name as returned by interfaces(); omit for the system's default Wi-Fi interface
Returns Record<string,any>[]|null
an array of network tables, with the same keys as scanNetworks(); or null if the interface doesn't exist
Returns the networks an interface found in its most recent scan, without starting a new scan.
Avoid calling this frequently: it has been seen to leak memory each time macOS refreshes the scan cache, so polling it in a long-running configuration can grow Hammerspoon's memory use. Use
scanNetworks()for a fresh scan, oron('scanCacheUpdated', ...)to learn when the cache changes.