Filter Weight Assignment
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.