We need to enumerate the available network interfaces(NWInterface) which can be used to initialize a NWEthernetChannel.
Note that this is for creating a custom network protocol. So we don't expect these interfaces to have any Internet connectivity.
In fact, we want to be able to enumerate the interfaces even when the cable is disconnected.
So we cannot use use the method described in this thread - which only works for interfaces which have a cable connection:
Getting NWInterface for ... - https://developer.apple.com/forums/thread/128215
Alternatively, is there a way to get an NWInterface from a SCNetworkInterfaceRef (obtained via SCNetworkServiceCopyAll() - SCNetworkServiceGetInterface())?
There is the undocumented nw_interface_create_with_name() - but I'm not sure if that's a good idea.
Thanks.
Devendra.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Even when SIP is disabled.
It shows an error, and dumps the dtrace script to console!
Used to work fine until BigSur.