Discussion:
Detecting wired vs wireless network interface
(too old to reply)
tr265
2010-04-16 17:03:42 UTC
Permalink
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.
Pavel A.
2010-04-17 14:10:44 UTC
Permalink
"tr265" <***@yahoo.com> wrote in message news:46557f58-8b56-4d52-a2f6-***@c21g2000yqk.googlegroups.com...
...........
Post by tr265
OID_GEN_PHYSICAL_MEDIUM - wired did not support this, wireless
reported as token ring
Strange, wireless should report correct value for OID_GEN_PHYSICAL_MEDIUM.
You have not dislosed how you query the OID values: WMI usually does work.
Hacks, such as using ndisuio driver, usually don't.

Regards,
--pa
Post by tr265
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.
Vishal Swarankar
2010-05-18 07:26:10 UTC
Permalink
This post might be inappropriate. Click to display it.
Pavel A.
2010-05-19 01:40:29 UTC
Permalink
Post by Vishal Swarankar
I would prefer to read the data from "XXXX72" registry instead of
going through OIDs, because that's a faster approach.
What data can you find in the registry that can distinguish a wireless
interface on NT5.x?

-- pa

santapanda
2010-04-30 16:59:02 UTC
Permalink
Thanks for sharing,

But could you give an example of your code? What namespace or class did you
use to access OID_802_11_SSID? Is that a property?
Post by tr265
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.
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
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.
.
Loading...