views:

26

answers:

2

Hi,

I'm developing an application in RealBASIC, but I need the list of interface names to populate a dropdown box.

Parsing ifconfig didn't work (Got eth0, eth1, lo, etc...) I need the name that is displayed in system preferences (Ethernet, Airport, etc...)

Is this possible in RealBASIC or is there a terminal command I can parse?

Thanks, Justin

A: 

First off I'd ask on a place like the REAL Software forums or one the "NUG" mailing list http://www.realsoftware.com/support/listmanager/ as there's tons more folks that are likely to answer there than there are here.

you might try parsing the output from system_profiler -xml SPNetworkDataType

npalardy
Thanks, I'll take a look at the forums.
Justin
A: 

networksetup -listallnetworkservices will give you just the names (with an asterisk before disabled ports, in case you want to leave them out). networksetup -listnetworkserviceorder gives some additional info, like what /dev entry (en0, etc) they correspond to. Check the man page for networksetup for even lots more options...

Gordon Davisson
Thanks, I appreciate it :)
Justin