Re: [System Configuration] What is the correct notification key to be informed when a new Network Interface is made available or disappear?
Re: [System Configuration] What is the correct notification key to be informed when a new Network Interface is made available or disappear?
- Subject: Re: [System Configuration] What is the correct notification key to be informed when a new Network Interface is made available or disappear?
- From: Allan Nathanson <email@hidden>
- Date: Thu, 29 Mar 2007 11:07:20 -0400
On Mar 29, 2007, at 10:55 AM, Stephane Sudre wrote:
I want to maintain a list of all the potential/capable network
interface. I need/would like to be informed when a new interface is
made available or disappear (WiFi PCMCI card, Bluetooth Dongle, etc…).
I can get the list of all the network interfaces with
SCNetworkInterfaceCopyAll.
What I can't figure out is whether there is a key to be informed by
the Dynamic Store about such modification and which one it would be.
I've looked for one in SCNetworkConfiguration.h and
SCDynamicStoreKey. Google did not prove very helpful.
Does such a key exist?
Yes/No. Watching the SCDynamicStore's "State:/Network/Interface" key
you can look at the "Interfaces" (kSCPropNetInterfaces) property to
see the BSD interfaces (en#, fw#, bond#, vlan#, and the ppp#
interfaces as they are created/removed). What's not posted here is
the availability of Modems, Bluetooth devices, etc. For those, you'd
have to watch the IORegistry.
- Allan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden