NdisRequest - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ndis.h

VOID NdisRequest(
  [out] PNDIS_STATUS  Status,
  [in]  NDIS_HANDLE   NdisBindingHandle,
  [in]  PNDIS_REQUEST NdisRequest
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ndis-ndisrequest)

NdisRequest function

Description

Note NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisRequest forwards a request to the underlying driver that it query the capabilities or status of its NIC or that it set the state of its NIC.

Parameters

Status [out]

Pointer to a caller-supplied variable that is set on return from this function. The underlying driver determines which NDIS_STATUS_XXX is returned, but it is usually one of the following values:

NdisBindingHandle [in]

Specifies the handle returned by NdisOpenAdapter that identifies the target NIC or the virtual adapter of the next-lower driver to which the caller is bound.

NdisRequest [in]

Pointer to a buffered structure specifying the operation requested with a given OID_ XXX code for either a query or a set.

Remarks

A protocol driver must allocate sufficient memory for the information buffer associated with the OID_XXX of the operation it will request. The driver also must allocate and set up the buffer at NdisRequest before it calls NdisRequest. Both buffers must be allocated from nonpaged pool because the underlying driver runs at raised IRQL while processing the request.

For callers layered above an intermediate NDIS driver, NdisRequest forwards a request to the next-lower driver that it return information about its own capabilities or directs that driver to handle specific functionality in a caller-determined manner. If the next-lower driver is an NDIS intermediate driver, it can call NdisRequest with an OID-specific request of its own before completing the request originally submitted by the higher-level protocol.

Some errors returned at Status are recoverable, including the following:

NDIS_STATUS_INVALID_OID

NDIS_STATUS_INVALID_LENGTH

NDIS_STATUS_BUFFER_TOO_SHORT

NDIS_STATUS_INVALID_DATA

NDIS_STATUS_RESOURCES

NDIS_STATUS_RESET_IN_PROGRESS

That is, a driver can modify the packet at NdisRequest appropriately to correct the OID_XXX code and/or the size or contents of the buffer at InformationBuffer and resubmit the request packet to NdisRequest. The same packet might be satisfied on resubmission to NdisRequest if the original call indicated a reset in progress or that a resource shortage, which might be temporary, prevented that request from being carried out.

The NDIS library maintains bindings for underlying miniport drivers. NDIS can return information for binding-specific queries if a given OID is associated with a system-defined medium type for which the system provides a filter library.

For more information about the general and media-specific OIDs and their respective associated information buffers, see NDIS Object Identifiers.

See also