Available since: Windows Packet Filter 3.6.1
The InsertStaticFilter function inserts a static filter rule at a specific zero-based index in the driver’s active static filter table. Existing rules at and after the specified position are shifted down by one slot.
Syntax
BOOL WINAPI InsertStaticFilter(
_In_ HANDLE hOpen,
_In_ PSTATIC_FILTER pFilter,
_In_ unsigned long Position
);
Parameters
hOpen
[in] Filter device driver handle returned by OpenFilterDriver.
pFilter
[in] Pointer to a STATIC_FILTER structure defining the filter criteria and action.
Position
[in] Zero-based index specifying where to insert the filter in the active table. If Position is 0, the filter is placed at the front. If Position equals or exceeds current table size, the rule is appended to the back.
Return Value
Returns TRUE if the filter was successfully inserted; otherwise returns FALSE.
Remarks
Internally, this function wraps the filter and target position into a STATIC_FILTER_WITH_POSITION structure and issues IOCTL_NDISRD_INSERT_FILTER_BY_INDEX to the driver.
See Also
AddStaticFilterFront, AddStaticFilterBack, RemoveStaticFilter, STATIC_FILTER_WITH_POSITION