How to retrieve the Network authentication, the Data Encryption type, the channel number from the listed SSIDs

Q: I can scan, I can list, I can even connect to (open) SSIDs.  But how can I retrieve the Network authentication, the Data Encryption type, the channel number from the SSIDs for display and use in connecting to secured SSIDs.  I don't see that information in the documentation but its there somewhere.  A structure, a special IOD, what??

I'm using OID_802_11_BSSID_LIST with PNDIS_WLAN_BSSID_EX and PNDIS_802_11_BSSID_LIST_EX to get the list of SSIDs and to display their info.  but where is authentication, Data Encryption type, and other info????

Question make sense??

Who is Participating?
This is among the most poorly documented parts of this whole mess.  To determine OPEN vs. Encrypted you simply examine the Privacy flag in the NDIS_WLAN_BSSID_EX structure as returned by OID_802_11_BSSID_LIST.  Unfortunately, this tells you only that it's encrypted or open.  The TYPE of encryption is more complex.

To deterimine that you must examine the IEs that are also returned but are poorly documented.  In the same struct you have:

    ULONG IELength;
    UCHAR IEs[1];

This is where what you want is hidden away...  You have the fixed IEs and the variable IEs.  The one you want is in the variable list called WPA_OUI.  The details of the IEs are buried in the IEEE 802.11 documents.  As I recall, the "g" one has the latest information on this.
Oh, one last but important item.  The IEEE 802.11 documents are NOT the final authority for WiFi devices.  The WiFi Alliance produced the WPA specification and the specifics of the IEs for WPA are in the WPA document not the IEEE document.

Get it from

Unfortuately the link to get to the specs seems to be missing at of this date.  So I guess you'll have to contact them to purchase a copy of the spec.  It's titled:

WiFi Protected Access (WPA)
Enhanced Security Implementation

Version 3.1
August, 2004
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.