CoNDIS Protocol Driver OID Requests

CoNDIS protocol drivers, either clients or call managers, can query or set the operating parameters of miniport drivers and other protocol drivers. CoNDIS protocol drivers can also query or set information in miniport call managers (MCMs). For more information about OID requests and MCMs, see CoNDIS MCM OID Requests.

To originate an OID request to an underlying driver, a protocol driver calls the NdisCoOidRequest function and sets the address family (AF) handle, at the NdisAfHandle parameter, to NULL. To originate an OID request to another CoNDIS protocol driver, a protocol driver calls NdisCoOidRequest and provides a valid AF handle.

After a protocol driver calls the NdisCoOidRequest function, NDIS calls the OID request function of the other driver (an underlying driver or another CoNDIS protocol driver). For miniport drivers, NDIS calls the MiniportCoOidRequest function. For protocol drivers, NDIS calls the ProtocolCoOidRequest function.

The following figure illustrates an OID request that is directed to a miniport driver.

Diagram illustrating an OID request directed to a miniport driver.

The following figure illustrates an OID request that is directed to a protocol driver.

Diagram illustrating an OID request directed to a protocol driver.

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

If NdisCoOidRequest returns NDIS_STATUS_PENDING, NDIS calls the ProtocolCoOidRequestComplete function after the other driver completes the OID request by calling the NdisMCoOidRequestComplete function or the NdisCoOidRequestComplete function. In this case, NDIS passes the results of the request at the OidRequest parameter of ProtocolCoOidRequestComplete. NDIS passes the final status of the request at the Status parameter of ProtocolCoOidRequestComplete.

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

If an underlying driver should associate the OID request with a subsequent status indication, the protocol driver should set the RequestId and RequestHandle members in the NDIS_OID_REQUEST structure. If the underlying driver makes a status indication, the driver sets the RequestId member in the NDIS_STATUS_INDICATION structure to the value from the RequestId member of the NDIS_OID_REQUEST structure and the DestinationHandle member in the NDIS_STATUS_INDICATION structure to the value from the RequestHandle member of the NDIS_OID_REQUEST structure.

A driver can call NdisCoOidRequest when a binding is in the Restarting, Running, Pausing, or Paused state.