How to check if SCNetwork interface configuration is hidden?

154 views Asked by At

I have an SCNetworkInterfaceRef through which i want to get all details of the interface i was able to bsd name,type mac address but unable to get hiddenConfiguration (hiddenConfiguration is bool value )

prefrencePlist path/Library/Preferences/SystemConfiguration/preferences.plist

enter image description here


SCNetworkInterfaceRef interface = SCNetworkServiceGetInterface(service);
 NSString *type  = (__bridge NSString*) SCNetworkInterfaceGetInterfaceType(interface)
 NSString *bsd  = (__bridge NSString*) SCNetworkInterfaceGetBSDName(interface);
 NSString *m = (__bridge NSString*) SCNetworkInterfaceGetHardwareAddressString(interface);

How to get hidden configuration value

Any suggestions would be most appreciated.

1

There are 1 answers

0
Thomas Bartelmess On BEST ANSWER

If the interface is hidden or not is not part of the public interface.

However, a private API exists, have a look at SCNetworkConfigurationPrivate.h, from Apples Open Source, repos.

You could just declare it an extern:

extern BOOL _SCNetworkInterfaceIsHiddenConfiguration(SCNetworkInterfaceRef ref);