EthCreateFilter
This function is called by an NIC driver. It creates and initializes an Ethernet filter library database associated with one network interface card.
At a Glance
Header file: |
Ndis.h |
Windows CE versions: |
2.0 and later |
Syntax
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 );
Parameters
- MaximumMulticastAddresses
- Specifies the maximum number of multicast addresses supported by the filter.
- AddressChangeAction
- Handle to 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
- Handle to 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 the NdisMEthIndicateReceive function.
- AdapterAddress
- Pointer to the network address of the network interface card.
- Lock
- Pointer to an initialized spin lock that the driver must hold when it requires exclusive access to the Ethernet filter library database.
- Filter
- Pointer to a caller-supplied variable in which this function writes a pointer to the created filter.
Return Values
TRUE indicates success.
Remarks
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.
A driver that calls this function runs at IRQL PASSIVE_LEVEL.
See Also
EthDeleteFilter, NdisAllocateSpinLock, NdisMEthIndicateReceive