Modifying Packet Coalescing Receive Filters
To modify a receive filter on a miniport driver that supports packet coalescing, an overlying protocol or filter driver performs the following steps:
To obtain a list of all the packet coalescing receive filters that have been downloaded to a miniport driver, the overlying driver issues an OID method request of OID_RECEIVE_FILTER_ENUM_FILTERS. The InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_RECEIVE_FILTER_INFO_ARRAY structure.
Note When the overlying driver or application initializes the NDIS_RECEIVE_FILTER_INFO_ARRAY structure, it must set the QueueId member to NDIS_DEFAULT_RECEIVE_QUEUE_ID.
After a successful return from the OID method request of OID_RECEIVE_FILTER_ENUM_FILTERS, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an updated NDIS_RECEIVE_FILTER_INFO_ARRAY structure that is followed by one or more NDIS_RECEIVE_FILTER_INFO structures. Each NDIS_RECEIVE_FILTER_INFO structure specifies the identifier (ID) for a filter that is set on the network adapter.
To obtain the parameters of a specific packet coalescing receive filter that was downloaded to the miniport driver, the overlying driver issues OID method request of OID_RECEIVE_FILTER_PARAMETERS. The InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_RECEIVE_FILTER_PARAMETERS structure. The overlying driver or application initializes the NDIS_RECEIVE_FILTER_PARAMETERS structure by setting the FilterId member to the nonzero ID value of the filter whose parameters are to be returned.
After a successful return from the OID method request, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to a buffer. This buffer is formatted to contain the following:
An NDIS_RECEIVE_FILTER_PARAMETERS structure that specifies the parameters for the NDIS receive filter.
An array of NDIS_RECEIVE_FILTER_FIELD_PARAMETERS structures that specifies the filter test criterion for one field in a network packet header.
The overlying driver modifies the receive filter to add, delete, or change the filter's set of test criterion. The driver does this by adding, deleting, or modifying individual NDIS_RECEIVE_FILTER_FIELD_PARAMETERS structures from the field parameter array specified by the NDIS_RECEIVE_FILTER_PARAMETERS structure.
When the overlying driver has completed the modifications to the test criterion, it must update the members of the NDIS_RECEIVE_FILTER_PARAMETERS structure to reflect the changes that were made to the receive filter. For example, the overlying driver must update the FieldParametersArrayNumElements member to contain the new number of elements in the array.
For more information, see Specifying a Packet Coalescing Receive Filter.
The overlying driver issues an OID method request of OID_RECEIVE_FILTER_SET_FILTER to download the modified receive filter to the miniport driver.
For more information, see Setting a Packet Coalescing Receive Filter.