Re: Network Devices (en0, en1, etc.) in an NSPopUpButton
Re: Network Devices (en0, en1, etc.) in an NSPopUpButton
- Subject: Re: Network Devices (en0, en1, etc.) in an NSPopUpButton
- From: Chris Garaffa <email@hidden>
- Date: Thu, 27 Nov 2003 12:21:23 -0500
On Nov 27, 2003, at 10:21 AM, Chris Ridd wrote:
The BSD getifaddrs() call returns a linked list of interface
configurations
(type man getifaddrs).
Thanks for the tip -- I've been looking for something like this for a
while!
You may also want to display the friendly name associated with each
interface like System Preferences (eg "Built-in Ethernet", "Airport").
I
think you can get that from the SystemConfiguration.framework, but I'm
not
sure how and I can't find any documentation of it apart from the header
files.
For this, the OP may find it helpful to parse the XML output from the
command
system_profiler -xml SPNetworkDataType
I use Jim Rankin's excellent Excelsior! framework for the XML parsing
-- much easier than the CF calls. (see
<
http://homepage.mac.com/jimbokun/Excelsior.html>).
--
Chris Garaffa
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.