Re: Using SystemConfiguration to get BSD network device properties
Re: Using SystemConfiguration to get BSD network device properties
- Subject: Re: Using SystemConfiguration to get BSD network device properties
- From: Andrew White <email@hidden>
- Date: Fri, 08 Aug 2008 10:27:19 +1000
Allan Nathanson wrote:
If you are looking for information about the interface "type" (Ethernet,
FireWire, Bluetooth, ...) than I'll point you towards the
<SystemConfiguration/SCNetworkConfiguration.h> APIs. Specifically :
SCNetworkInterfaceCopyAll()
will give you an array of available network interfaces
SCNetworkInterfaceGetInterfaceType()
will tell you what "type" of a given interface
SCNetworkInterfaceGetLocalizedDisplayName()
will return a string like "Built-in Ethernet"
Ah. That's the sort of information I want to get my hands on.
Of course, there's many more questions to ask. For example, do you want
information about ALL of the available interfaces or just those that
have been configured? or just those that are active? or ...
We have a relatively low-level multi-process networking service that needs
to be tied to a particular interface (or interfaces), and I'm writing a
preference pane and other admin stuff to allow the user to configure it.
As such, I need to access the list of interfaces, filter them based on
which ones are appropriate, and then present the results to the user to
select from.
SCNetworkInterface seems to be exactly the information I'm looking for.
The higher level APIs all assume I'm wanting to manage connections, but I'm
actually just concerned with the local interfaces (the service components
themselves handle connections, where required). I won't use the 'write'
parts of the API, but I need the 'read' parts. :)
--
Andrew White
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden