MacChangeFilter

NDIS_STATUS
   MacChangeFilter(
       IN UINT OldFilterClasses,
       IN UINT NewFilterClasses,
       IN NDIS_HANDLE MacBindingHandle,
       IN PNDIS_REQUEST NdisRequest,
       IN BOOLEAN Set
       );

MacChangeFilter is called by an Ethernet, Token Ring, or FDDI filter library function to change a binding filter class.

Parameters

OldFilterClasses

Specifies the value representing the original combined filter classes.

NewFilterClasses

Specifies the value representing the new combined filter classes.

MacBindingHandle

Specifies the handle that the NIC driver associates with the binding.

NdisRequest

Points to a request structure.

Set

Specifies TRUE if changes are being caused by a set request rather than the closing of a binding.

Return Value

MacChangeFilter can return the following status codes:

NDIS_STATUS_FAILURE
NDIS_STATUS_PENDING
NDIS_STATUS_RESET_IN_PROGRESS
NDIS_STATUS_SUCCESS

Comments

The NIC driver supplied the entry point for MacChangeFilter when it called EthCreateFilter, FddiCreateFilter, or TrCreateFilter to set up the corresponding filter database.

The NIC driver first acquires the spin lock protecting the filter database and then calls one of the following functions, which, in turn, calls MacChangeFilter:

·EthFilterAdjust or EthDeleteFilterOpenAdapter

·FddiFilterAdjust or FddiDeleteFilterOpenAdapter

·TrFilterAdjust or TrDeleteFilterOpenAdapter

The filter library also calls MacChangeFilter when it sets a filter class for the first time or when no more bindings require the filter class.

If MacChangeFilter returns anything other than NDIS_STATUS_SUCCESS or NDIS_STATUS_PENDING, the filter function discards any changes MacChangeFilter made.

MacChangeFilter runs at IRQL DISPATCH_LEVEL.

See Also

EthCreateFilter, EthDeleteFilterOpenAdapter, EthFilterAdjust, FddiCreateFilter, FddiDeleteFilterOpenAdapter, FddiFilterAdjust, MacAddAdapter, NdisAcquireSpinLock, TrCreateFilter, TrDeleteFilterOpenAdapter, TrFilterAdjust