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.

Value Meaning
dot11_phy_type_unknown
Specifies an unknown or uninitialized PHY type.
dot11_phy_type_any
Specifies any PHY type.
dot11_phy_type_fhss
Specifies a frequency-hopping spread-spectrum (FHSS) PHY. Bluetooth devices can use FHSS or an adaptation of FHSS.
dot11_phy_type_dsss
Specifies a direct sequence spread spectrum (DSSS) PHY.
dot11_phy_type_irbaseband
Specifies an infrared (IR) baseband PHY.
dot11_phy_type_ofdm
Specifies an orthogonal frequency division multiplexing (OFDM) PHY. 802.11a devices can use OFDM.
dot11_phy_type_hrdsss
Specifies a high-rate DSSS (HRDSSS) PHY.
dot11_phy_type_erp
Specifies an extended rate PHY (ERP). 802.11g devices can use ERP.
dot11_phy_type_ht
Specifies an 802.11n PHY type.
dot11_phy_type_vht
Specifies the 802.11ac PHY type. This is the very high throughput PHY type specified in IEEE 802.11ac.

This value is supported on Windows 8.1, Windows Server 2012 R2, and later.

dot11_phy_type_IHV_start
Specifies the start of the range that is used to define PHY types that are developed by an independent hardware vendor (IHV).
dot11_phy_type_IHV_end
Specifies the end of the range that is used to define PHY types that are developed by an independent hardware vendor (IHV).

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
WLAN_AVAILABLE_NETWORK_CONNECTED
This network is currently connected.
WLAN_AVAILABLE_NETWORK_HAS_PROFILE
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

See also

WLAN_AVAILABLE_NETWORK_LIST