tr265
2010-04-16 17:03:42 UTC
I just thought I would share something that took a bit of work.
When I enumerated adapters, I needed to distinguish the wired versus
the wireless LAN adapters on XP. The way to actually get this
information is somewhat non-intuitive.
What didn't work:
GetAdaptersInfo - both wired and wireless are MIB_IF_TYPE_ETHERNET
GetAdaptersAddresses - both are reported as IF_TYPE_ETHERNET_CSMACD
(not IF_TYPE_IEEE80211)
OID_GEN_MEDIA_IN_USE - both are reported as 802.3
OID_GEN_MEDIA_SUPPORTED - both are reported as 802.3
OID_GEN_PHYSICAL_MEDIUM - wired did not support this, wireless
reported as token ring
What did work:
OID_802_11_SSID - fails on wired, succeeds on wireless. This approach
appears to work with Administrator and limited user privileges.
Hope I save someone a little time.
When I enumerated adapters, I needed to distinguish the wired versus
the wireless LAN adapters on XP. The way to actually get this
information is somewhat non-intuitive.
What didn't work:
GetAdaptersInfo - both wired and wireless are MIB_IF_TYPE_ETHERNET
GetAdaptersAddresses - both are reported as IF_TYPE_ETHERNET_CSMACD
(not IF_TYPE_IEEE80211)
OID_GEN_MEDIA_IN_USE - both are reported as 802.3
OID_GEN_MEDIA_SUPPORTED - both are reported as 802.3
OID_GEN_PHYSICAL_MEDIUM - wired did not support this, wireless
reported as token ring
What did work:
OID_802_11_SSID - fails on wired, succeeds on wireless. This approach
appears to work with Administrator and limited user privileges.
Hope I save someone a little time.