TrCreateFilter

BOOLEAN
   TrCreateFilter(
       IN TR_ADDRESS_CHANGE AddressChangeAction,
       IN TR_GROUP_CHANGE GroupChangeAction,
       IN TR_FILTER_CHANGE FilterChangeAction,
       IN TR_DEFERRED_CLOSE CloseAction,
       IN PUCHAR AdapterAddress,
       IN PNDIS_SPIN_LOCK Lock,
       OUT PTR_FILTER *Filter
       );

TrCreateFilter is called by a NIC driver. It creates and initializes a Token Ring filter library database associated with one network interface card.

Parameters

AddressChangeAction

Specifies the address of the caller’s MacChangeTrAddress function, which the Token Ring filter library calls when a change occurs in the ORing of the functional addresses desired by all the bindings.

GroupChangeAction

Specifies the address of the caller’s MacChangeGroup function, which the Token Ring filter library calls when a change occurs in the group address for the bindings.

FilterChangeAction

Specifies the address of the caller’s MacChangeFilter function, which the Token Ring 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 Token Ring filter library calls if a binding closes while it is indicating incoming data through NdisIndicateReceive.

AdapterAddress

Points to the network address of the NIC.

Lock

Points to an already initialized spin lock that the driver holds when it requires exclusive access to the filter library database.

Filter

Points to a caller-supplied memory location in which this function writes a pointer to the created filter.

Return Value

TrCreateFilter returns TRUE if it creates the Token Ring filter library database successfully.

Comments

The NIC driver uses the Token Ring 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 TrCreateFilter run at IRQL PASSIVE_LEVEL.

See Also

MacChangeFilter, MacChangeGroup, MacChangeTrAddress, MacCloseAction, NdisAllocateSpinLock, TrDeleteFilter