Querying Packet Coalescing Receive Filters
Overlying drivers and applications can query packet coalescing receive filters that have been downloaded to a miniport driver by doing the following:
Request an enumerated list of the receive filters on the miniport driver by issuing an OID method request of OID_RECEIVE_FILTER_ENUM_FILTERS. For more information, see Enumerating the Receive Filters on a Miniport Driver.
Request the test criterion parameters for a receive filter on the miniport driver by issuing an OID method request of OID_RECEIVE_FILTER_PARAMETERS. For more information, see Querying the Receive Filters on a Miniport Driver
NDIS handles the OID_RECEIVE_FILTER_ENUM_FILTERS and OID_RECEIVE_FILTER_PARAMETERS method OID requests for miniport drivers. NDIS obtained the information from an internal cache of the data that it received from the OID_RECEIVE_FILTER_SET_FILTER OID request.
Enumerating the Receive Filters on a Miniport Driver
To obtain a list of all the packet coalescing receive filters that have been downloaded to a miniport driver, overlying drivers and applications issue 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, 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_INFO_ARRAY structure that specifies a list of receive filters that are currently configured on a miniport driver.
An array of NDIS_RECEIVE_FILTER_INFO structures about a receive filter that is currently configured on a miniport driver.
Querying the Parameters of a Receive Filters on a Miniport Driver
To obtain the parameters of a specific packet coalescing receive filter that was downloaded to the miniport driver, overlying drivers or applications issue an 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.
Note The overlying driver obtained the filter ID from an earlier OID method request of OID_RECEIVE_FILTER_SET_FILTER or OID_RECEIVE_FILTER_ENUM_FILTERS. The application can only obtain the filter ID from an earlier OID method request of OID_RECEIVE_FILTER_ENUM_FILTERS.
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 an 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.