Compartir a través de


MiniportOidRequest (Compact 2013)

3/26/2014

NDIS calls a miniport driver's MiniportOidRequest function to handle an OID request to query or set information in the driver.

Syntax

NDIS_STATUS
  MiniportOidRequest(
    IN NDIS_HANDLE  MiniportAdapterContext,
    IN PNDIS_OID_REQUEST  OidRequest
    );

Parameters

  • MiniportAdapterContext
    A handle to a context area that the miniport driver allocated in its MiniportInitializeEx function. The miniport driver uses this context area to maintain state information for a miniport adapter.
  • OidRequest
    A pointer to an NDIS_OID_REQUEST structure that contains both the buffer and the request packet for the miniport driver to handle. Depending on the request, the driver returns requested information in the structure provided.

Return Value

MiniportOidRequest can return one of the following status values:

Value

Description

NDIS_STATUS_SUCCESS

The miniport driver has either set or obtained the data as requested.

NDIS_STATUS_PENDING

The miniport driver will complete the request asynchronously. After the miniport driver has completed all processing, it must call the NdisMOidRequestComplete function to inform NDIS that the request is is completed.

NDIS_STATUS_INVALID_OID

The request, specified at OidRequest, is invalid or not recognized.

NDIS_STATUS_NOT_SUPPORTED

The request, specified at OidRequest, is recognized, but not supported by the miniport driver.

NDIS_STATUS_BUFFER_TOO_SHORT

The buffer, supplied at OidRequest, is too small to hold the requested data.

NDIS_STATUS_INVALID_LENGTH

The value specified in the InformationBufferLength member of the NDIS_OID_REQUEST-structure at OidRequest is incorrect for the specified OID_XXX code.

NDIS_STATUS_INVALID_DATA

One or more of the parameters specified for the request at OidRequest is invalid.

NDIS_STATUS_NOT_ACCEPTED

After it calls the MiniportDevicePnPEventNotify function to indicate a surprise removal, NDIS calls the driver's MiniportHaltEx function. If the driver receives any OID requests before NDIS calls MiniportHaltEx, it should immediately complete such requests with a status value of NDIS_STATUS_NOT_ACCEPTED.

NDIS_STATUS_REQUEST_ABORTED

The miniport driver stopped processing the request. For example, NDIS called the MiniportResetEx function.

NDIS_STATUS_INDICATION_REQUIRED

The miniport driver will provide an OID completion status with a subsequent status indication. A miniport driver cannot return NDIS_STATUS_INDICATION_REQUIRED unless the particular OID allows it. To determine whether this status is allowed, see the OID reference page. For more information about NDIS_STATUS_INDICATION_REQUIRED, see NDIS_OID_REQUEST and NDIS_STATUS_INDICATION.

Remarks

A driver specifies the MiniportOidRequest entry point when it calls the NdisMRegisterMiniportDriver function.

NDIS calls the MiniportOidRequest function either on its own behalf or on behalf of a bound protocol driver that called the NdisOidRequest function. Miniport drivers should examine the request supplied at OidRequest and take the action requested. For more information about the OIDs that miniport drivers handle, see NDIS OIDs.

Notice that NDIS does not validate the OID-specific contents at OidRequest. Therefore, the driver itself must validate these contents. If the driver determines that the value to be set is out of bounds, it should fail the request and return NDIS_STATUS_INVALID_DATA.

If MiniportOidRequest returns NDIS_STATUS_PENDING, NDIS will not call MiniportOidRequest with another request, for the miniport adapter specified at MiniportAdapterContext, until the pending request is completed.

NDIS calls MiniportOidRequest at IRQL <= DISPATCH_LEVEL.

See Also

Reference

NDIS OID Request Interface for Connectionless Miniport Drivers
MiniportHaltEx
MiniportInitializeEx
MiniportDevicePnPEventNotify
MiniportOidRequest
MiniportResetEx
NDIS_OID_REQUEST
NDIS_STATUS_INDICATION
NdisMRegisterMiniportDriver
NdisMOidRequestComplete
NdisOidRequest