WLAN_AVAILABLE_NETWORK structure (wlanapi.h)
The WLAN_AVAILABLE_NETWORK structure contains information about an available wireless network.
Syntax
typedef struct _WLAN_AVAILABLE_NETWORK {
WCHAR strProfileName[WLAN_MAX_NAME_LENGTH];
DOT11_SSID dot11Ssid;
DOT11_BSS_TYPE dot11BssType;
ULONG uNumberOfBssids;
BOOL bNetworkConnectable;
WLAN_REASON_CODE wlanNotConnectableReason;
ULONG uNumberOfPhyTypes;
DOT11_PHY_TYPE dot11PhyTypes[WLAN_MAX_PHY_TYPE_NUMBER];
BOOL bMorePhyTypes;
WLAN_SIGNAL_QUALITY wlanSignalQuality;
BOOL bSecurityEnabled;
DOT11_AUTH_ALGORITHM dot11DefaultAuthAlgorithm;
DOT11_CIPHER_ALGORITHM dot11DefaultCipherAlgorithm;
DWORD dwFlags;
DWORD dwReserved;
} WLAN_AVAILABLE_NETWORK, *PWLAN_AVAILABLE_NETWORK;
Members
strProfileName[WLAN_MAX_NAME_LENGTH]
Contains the profile name associated with the network. If the network does not have a profile, this member will be empty. If multiple profiles are associated with the network, there will be multiple entries with the same SSID in the visible network list. Profile names are case-sensitive. This string must be NULL-terminated.
dot11Ssid
A DOT11_SSID structure that contains the SSID of the visible wireless network.
dot11BssType
A DOT11_BSS_TYPE value that specifies whether the network is infrastructure or ad hoc.
uNumberOfBssids
Indicates the number of BSSIDs in the network.
Windows XP with SP3 and Wireless LAN API for Windows XP with SP2: uNumberofBssids is at most 1, regardless of the number of access points broadcasting the SSID.
bNetworkConnectable
Indicates whether the network is connectable or not. If set to TRUE, the network is connectable, otherwise the network cannot be connected to.
wlanNotConnectableReason
A WLAN_REASON_CODE value that indicates why a network cannot be connected to. This member is only valid when bNetworkConnectable is FALSE.
uNumberOfPhyTypes
The number of PHY types supported on available networks. The maximum value of uNumberOfPhyTypes is WLAN_MAX_PHY_TYPE_NUMBER, which has a value of 8. If more than WLAN_MAX_PHY_TYPE_NUMBER PHY types are supported, bMorePhyTypes must be set to TRUE.
dot11PhyTypes[WLAN_MAX_PHY_TYPE_NUMBER]
Contains an array of DOT11_PHY_TYPE values that represent the PHY types supported by the available networks. When uNumberOfPhyTypes is greater than WLAN_MAX_PHY_TYPE_NUMBER, this array contains only the first WLAN_MAX_PHY_TYPE_NUMBER PHY types.
bMorePhyTypes
Specifies if there are more than WLAN_MAX_PHY_TYPE_NUMBER PHY types supported.
When this member is set to TRUE, an application must call WlanGetNetworkBssList to get the complete list of PHY types. The returned WLAN_BSS_LIST structure has an array of WLAN_BSS_ENTRY structures. The uPhyId member of the WLAN_BSS_ENTRY structure contains the PHY type for an entry.
wlanSignalQuality
A percentage value that represents the signal quality of the network. WLAN_SIGNAL_QUALITY is of type ULONG. This member contains a value between 0 and 100. A value of 0 implies an actual RSSI signal strength of -100 dbm. A value of 100 implies an actual RSSI signal strength of -50 dbm. You can calculate the RSSI signal strength value for wlanSignalQuality values between 1 and 99 using linear interpolation.
bSecurityEnabled
Indicates whether security is enabled on the network. A value of TRUE indicates that security is enabled, otherwise it is not.
dot11DefaultAuthAlgorithm
A DOT11_AUTH_ALGORITHM value that indicates the default authentication algorithm used to join this network for the first time.
dot11DefaultCipherAlgorithm
A DOT11_CIPHER_ALGORITHM value that indicates the default cipher algorithm to be used when joining this network.
dwFlags
Contains various flags for the network.
Value | Meaning |
---|---|
|
This network is currently connected. |
|
There is a profile for this network. |
dwReserved
Reserved for future use. Must be set to NULL.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista, Windows XP with SP3 [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Header | wlanapi.h |
Redistributable | Wireless LAN API for Windows XP with SP2 |