大网数据广告活动
网络与域名解析

Filter Weight Assignment

· 52CE 我爱测

Every filter in the Windows Filtering Platform (WFP) has an associated weight, which is used during filter arbitration.

Every filter in the Windows Filtering Platform (WFP) has an associated weight, which is used during filter arbitration.

The filter weight used by the Base Filtering Engine (BFE) is of type FWP_UINT64. Callers have three options when adding filters.

  • Set the weight to an FWP_UINT64. BFE uses the supplied weight as is.

  • Set the weight to FWP_EMPTY. BFE automatically generates a weight in the range [0, 2⁶⁰).

  • Set the weight to an FWP_UINT8 in the range [0, 15]. BFE uses the supplied weight as a weight range identifier.

    BFE automatically generates the low-order 60 bits (exactly as if the weight had been set to FWP_EMPTY), and then uses the supplied value to set the 4 high-order bits. This allows callers to manually divide the weight space into 16 ranges, while still using automatic weighting within a range.

Note:
When two or more callouts are registered at the same sublayer, problems may occur when the same weight is assigned to the filters. This issue can be prevented by having callouts create their own sublayer by using FwpmSubLayerAdd0.

Related topics

Filter Weight Identifiers

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。