The "advances in networking" talks for WWDC had this example of using NWEthernetChannel to monitor a custom protocol.import FoundationImport Networklet path = NWPathMonitor(requiredInterfaceType: .wiredEthernet).currentPathguard let interface = path.availableInterfaces.first else { fatalError("not connected to Internet")}let channel = NWEthernetChannel(on: interface, etherType: 0xB26E)For my application I need to use a NWEthernetChannel to monitor a custom protocol* on an Ethernet link which does not have IP Internet connectivity (but it does have physical link to a switch). NWPath appears to only give me a NWInterface struct if it is a valid path to the Internet.How can I get a list of NWInterface Structs on the Mac without having a valid Internet path?In my particular use case I'm only interested in .wiredEthernet.Darrell* I'm trying to use Network.framework to receive LLDP (link-layer discovery protocol) and CDP (Cisco discovery protocol) traffic when I'm plugged into an ethernet switch, which may or may not have Internet connectivity.
15
0
4.0k