Using SystemConfiguration to get BSD network device properties
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707) CFStringRef intfKey = SCDynamicStoreKeyCreateNetworkInterface ( NULL, kSCDynamicStoreDomainState ); CFPropertyListRef intfRef = SCDynamicStoreCopyValue (_store, intfKey); CFStringRef intfEntityKey = SCDynamicStoreKeyCreateNetworkInterfaceEntity ( NULL, kSCDynamicStoreDomainState, name, kSCEntNetIPv4 ); CFPropertyListRef intf = SCDynamicStoreCopyValue (_store, intfEntityKey); Platform is 10.4.x and up. Currently using 10.4.11 and XCode 2.4.1. Thanks -- Andrew White _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I'm trying to use Core Foundation's system configuration to get information on the installed network devices. The following gets me a dictionary containing a key 'Interfaces' which has an array of BSD interface names: Given this info, I can iterate through the interfaces, but the info I can get seems limited. What I really want to know is the interface type, but using the Hardware key (for example) doesn't seem to do anything. I can get the IPv4 addressing information (see next snipppet), but that's not really what I want. Getting addresses: for interface 'name', this gets an dictionary containing "Addresses", "Broadcast Masks", and "Subnet Masks". Is there a way to get this stuff from the dynamic store NetworkInterface info, or do I need to go digging elsewhere? Do I need to use the POSIX API to get this info? This email sent to site_archiver@lists.apple.com
participants (1)
-
Andrew White