Wireshark-bugs: [Wireshark-bugs] [Bug 6875] Network interface icons not correct on MacBook Air

Date: Tue, 20 Mar 2012 11:58:39 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6875

--- Comment #1 from Guy Harris <guy@xxxxxxxxxxxx> 2012-03-20 11:58:39 PDT ---
There are some System Configuration framework APIs that could return the
interface type.

SCNetworkInterfaceCopyAll() "returns all network-capable interfaces on the
system"; what it returns is a CFArray of SCNetworkInterfaceRefs.

SCNetworkInterfaceGetBSDName() gets the "BSD name" of the interface, so to find
the SCNetworkInterfaceRef for an interface given its name, do
SCNetworkInterfaceCopyAll() and then scan the array for an interface with a
matching "BSD name".

SCNetworkInterfaceGetInterfaceType() takes an SCNetworkInterfaceRef as an
argument and returns "the network interface type of the specified interface";
those are kSCNetworkInterfaceTypexxx CFStrings.

(That could also get a "localized display name" with
SCNetworkInterfaceGetLocalizedDisplayName().)

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.