wlanapi.h) (WLAN_QOS_INFO 结构
重要
某些信息与预发行产品相关,该产品在商业发布之前可能会进行重大修改。 对于此处提供的信息,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);
}
要求
要求 | 值 |
---|---|
Header | wlanapi.h |