WLAN_QOS_INFO結構 (wlanapi.h)
重要
有些資訊與發行前版本產品有關,在正式發行前可能會大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表 WFA Wi-Fi QoS 管理規格中所述之四項功能的相關信息,並定義於 802.11 規格中。
語法
typedef struct _WLAN_QOS_INFO {
WLAN_QOS_CAPABILITIES interfaceCapabilities;
BOOL bConnected;
WLAN_CONNECTION_QOS_INFO connectionQoSInfo;
} WLAN_QOS_INFO, *PWLAN_QOS_INFO;
成員
interfaceCapabilities
介面的 QoS 功能。
bConnected
類型: BOOL
表示是否有已建立的連接。 如果 TRUE
為 , 則 connectionQoSInfo 會保存目前連線的 QoS 資訊。 否則, connectionoQoSInfo 將會為零。
connectionQoSInfo
WFA Wi-Fi QoS 管理規格) 與目前連線相關的 QoS 功能相關信息 (。 只有當 bConnected 為 TRUE
時,此結構才會包含相關信息;否則為零,您應該忽略它。
備註
範例
void DisplayQoSInfo(GUID interfaceGuid)
{
wil::unique_wlan_handle clientHandle;
const DWORD maxClientVersion = 2;
DWORD currentClientVersion = 0;
DWORD status = WlanOpenHandle(maxClientVersion, nullptr, ¤tClientVersion, &clientHandle);
if (status != ERROR_SUCCESS)
{
wprintf(L"WlanOpenHandle failed with error: %u\n", status);
return;
}
wil::unique_wlan_ptr<WLAN_QOS_INFO> qosInfo;
DWORD dataSize;
status = WlanQueryInterface(clientHandle.get(), &interfaceGuid, wlan_intf_opcode_qos_info, nullptr, &dataSize, wil::out_param_ptr<void **>(qosInfo), nullptr);
if (status != ERROR_SUCCESS)
{
wprintf(L"WlanQueryInterface failed with error %u\n", status);
return;
}
wprintf(
L"Interface QoS Capabilities: MSCS Supported = %u, DSCP To UP Mapping Supported = %u, SCS Supported = %u, DSCP Policy Supported = %u\n",
qosInfo->interfaceCapabilities.bMSCSSupported,
qosInfo->interfaceCapabilities.bDSCPToUPMappingSupported,
qosInfo->interfaceCapabilities.bSCSSupported,
qosInfo->interfaceCapabilities.bDSCPPolicySupported);
if (!qosInfo->bConnected)
{
// Not connected, so the data that follows in connectionQoSInfo is meaningless.
return;
}
const auto& connectionQoSInfo = qosInfo->connectionQoSInfo;
wprintf(
L"AP QoS Capabilities: MSCS Supported = %u, DSCP To UP Mapping Supported = %u, SCS Supported = %u, DSCP Policy Supported = %u\n",
connectionQoSInfo.peerCapabilities.bMSCSSupported,
connectionQoSInfo.peerCapabilities.bDSCPToUPMappingSupported,
connectionQoSInfo.peerCapabilities.bSCSSupported,
connectionQoSInfo.peerCapabilities.bDSCPPolicySupported);
wprintf(
L"Connection QoS Info:\n\tMSCS Configured = %u\n\tDSCP To UP Mapping Configured = %u\n\tNumber of SCS Streams = %u\n\tNumber of DSCP Policies = %u\n",
connectionQoSInfo.bMSCSConfigured,
connectionQoSInfo.bDSCPToUPMappingConfigured,
connectionQoSInfo.ulNumConfiguredSCSStreams,
connectionQoSInfo.ulNumConfiguredDSCPPolicies);
}
規格需求
需求 | 值 |
---|---|
標頭 | wlanapi.h |