BOOLEAN
EthCreateFilter(
IN UINT MaximumMulticastAddresses,
IN ETH_ADDRESS_CHANGE AddressChangeAction,
IN ETH_FILTER_CHANGE FilterChangeAction,
IN ETH_DEFERRED_CLOSE CloseAction,
IN PUCHAR AdapterAddress,
IN PNDIS_SPIN_LOCK Lock,
OUT PETH_FILTER *Filter
);
EthCreateFilter is called by a NIC driver. It creates and initializes an Ethernet filter library database associated with one network interface card.
Parameters
MaximumMulticastAddresses
Specifies the maximum number of multicast addresses supported by the filter.
AddressChangeAction
Specifies the address of the caller’s MacChangeEthAddresses function, which the Ethernet filter library calls when a change occurs in the list of multicast addresses that the network interface card enables.
FilterChangeAction
Specifies the address of the caller’s MacChangeFilter function, which the Ethernet filter library calls when a binding sets or clears a particular filter class. The binding must be the first or only binding using the filter class.
CloseAction
Specifies the address of the caller’s MacCloseAction function, which the Ethernet filter library calls if a binding closes while it is indicating incoming data through NdisIndicateReceive.
AdapterAddress
Points to the network address of the network interface card.
Lock
Points to an initialized spin lock that the driver must hold when it requires exclusive access to the Ethernet filter library database.
Filter
Points to a caller-supplied variable in which this function writes a pointer to the created filter.
Return Value
EthCreateFilter returns TRUE if it creates the Ethernet filter library database successfully.
Comments
The NIC driver uses the Ethernet filter library to filter received network packets. Using the destination address of a received packet, the filter library determines the protocol driver bindings that receive indications for the packet.
Callers of EthCreateFilter run at IRQL PASSIVE_LEVEL.
See Also
EthDeleteFilter, MacChangeEthAddresses, MacChangeFilter, MacCloseAction, NdisAllocateSpinLock, NdisIndicateReceive