Skip to content

lightgun-poc / lib/net / parseHardwarePorts

Function: parseHardwarePorts()

parseHardwarePorts(output): Set<string>

Defined in: lib/net.ts:27

Parses networksetup -listallhardwareports (macOS): "Hardware Port:" / "Device:" line pairs. Collects the device names whose port is the WiFi adapter — macOS names interfaces en0/en1, which no name heuristic can tell apart from Ethernet (en0 is WiFi on laptops but wired on a Mac mini).

Parameters

output

string

Returns

Set<string>

Released under the MIT License.