Upravit

Sdílet prostřednictvím


Generating OID Requests from an NDIS Filter Driver

A filter driver can originate OID query or set requests to underlying drivers by calling the NdisFOidRequest function.

The following figure illustrates an OID request that is originated by a filter driver.

Diagram illustrating an OID request originated by an NDIS filter driver.

After a filter driver calls the NdisFOidRequest function, NDIS calls the request function of the next underlying driver. For more information about how a miniport driver handles OID requests, see OID Requests for an Adapter.

To complete synchronously, NdisFOidRequest returns NDIS_STATUS_SUCCESS or an error status. To complete asynchronously, NdisFOidRequest returns NDIS_STATUS_PENDING.

To determine what information was successfully handled by an underlying driver, filter drivers that issue OID requests must check the value in the SupportedRevision member in the NDIS_OID_REQUEST structure after the OID request returns. For more information about NDIS version information, see Specifying NDIS Version Information.

If NdisFOidRequest returns NDIS_STATUS_PENDING, NDIS calls the FilterOidRequestComplete function after the underlying drivers complete the OID request. In this case, NDIS passes the results of the request at the OidRequest parameter of FilterOidRequestComplete. NDIS passes the final status of the request at the Status parameter of FilterOidRequestComplete.

If NdisFOidRequest returns NDIS_STATUS_SUCCESS, it returns the results of a query request in the NDIS_OID_REQUEST structure at the OidRequest parameter. In this case, NDIS does not call the FilterOidRequestComplete function.

A driver can call NdisFOidRequest when it is in the Restarting, Running, Pausing, or Paused state.

Note  A filter driver should keep track of OID requests that it originates and make sure that it does not call the NdisFOidRequestComplete function when such requests are complete.