Microsoft Windows CE 3.0  

NDIS_REQUEST

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This structure specifies a packet set up by NDIS or by a protocol for a call to the NdisRequestfunction. NDIS submits these requests to the underlying driver's MiniportQueryInformationor MiniportSetInformationfunctions.

typedef struct _ NDIS_REQUEST {
UCHAR
MacReserved[16]; 
NDIS_REQUEST _TYPE
RequestType; 
union _DATA {
struct QUERY_INFORMATION {
NDIS_OID
Oid; 
PVOID
InformationBuffer; 
UINT
InformationBufferLength; 
UINT
BytesWritten; 
UINT
BytesNeeded; 
} QUERY_INFORMATION;
struct SET_INFORMATION {
NDIS_OID
Oid; 
PVOID
InformationBuffer; 
UINT
InformationBufferLength; 
UINT
BytesRead; 
UINT
BytesNeeded; 
} SET_INFORMATION;
} DATA;
} NDIS_REQUEST, *PNDIS_REQUEST;

Members

MacReserved[16]
Specifies a 16-byte area reserved for use by the underlying driver.
RequestType
Specifies the request type as one of the following:
Value Description
NdisRequestQueryInformation Specifies a query-information request. NDIS forwards such a request to the underlying driver's MiniportQueryInformationfunction.
NdisRequestSetInformation Specifies a set-information request. NDIS forwards such a request to the underlying driver's MiniportSetInformationfunction.
NdisRequestQueryStatistics Specifies a query-statistics request. For most statistics queries, NDIS satisfies the request itself. Otherwise, NDIS forwards such requests to the underlying driver's MiniportQueryInformationfunction. This type of request originates in a user-mode application, never in a protocol driver.

For any of the preceding values, the OID_ XXXspecified in the Oidmember must be compatible with the type of operation requested.

Value Description
NdisRequestOpen This type is obsolete. A protocol driver calls NdisOpenAdapterinstead.
NdisRequestClose This type is obsolete. A protocol driver calls NdisCloseAdapterinstead.
NdisRequestSend This type is obsolete. A protocol driver calls NdisSendor NdisSendPacketsinstead.
NdisRequestTransferData This type is obsolete. A protocol driver calls NdisTransferDatainstead.
NdisRequestReset This type is obsolete. A protocol driver calls NdisResetinstead.
NdisRequestGeneric1 Specifies an NIC-driver-specific request.
NdisRequestGeneric2 Specifies an NIC-driver-specific request.
NdisRequestGeneric3 Specifies an NIC-driver-specific request.
NdisRequestGeneric4 Specifies an NIC-driver-specific request.
Oid
Specifies the object identifier of the requested operation. The value is an OID_ XXXcode.
InformationBuffer
Pointer to a buffer into which the underlying driver or NDIS returns the requested information for queries or from which the underlying driver reads caller-supplied information for sets.
InformationBufferLength
Specifies the size, in bytes, of the buffer at InformationBuffer. The value at Oiddetermines the value appropriate to this member.
BytesWritten
Specifies the number of bytes that the underlying driver or NDIS transfers into the buffer at InformationBufferfor query-information requests. If NdisRequestreturns NDIS_STATUS_INVALID_LENGTH, the value of this member is meaningless.
BytesRead
Specifies the number of bytes that the underlying driver read from the buffer at InformationBufferfor set-information requests.
BytesNeeded
Specifies the number of bytes needed to return query information or to carry out the set operation requested by the given OID_ XXXcode.

If NdisRequestreturns NDIS_STATUS_SUCCESS, the value of this member is meaningless. If the InformationBufferLengthis too small for the given OID_ XXXon a query, this member indicates how large a buffer is required to satisfy the request. If the buffer at InformationBufferdoes not contain sufficient data for the given OID_ XXXon a set, this member indicates how much data is required.

Remarks

A protocol should allocate nonpaged memory for the buffer at InformationBufferand for this structure itself. Passing in a packet or buffer allocated from paged memory can cause fatal page faults because the underlying driver(s) run at IRQL DISPATCH_LEVEL to carry out the requested operation.

This structure contains a DATAsubstructure for each type of operation that a protocol driver can request of an underlying driver. Before calling NdisRequest, the protocol fills in the relevant members of the substructure that represents the query or set operation that it specified in the Oidmember. NDIS or the underlying driver fills in the remaining members before it returns control to the caller.

The NdisRequestGenerictypes are available for NIC drivers that create their own internal requests. To indicate a requested operation, an NIC driver sets an internal variable to one of these types.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

NdisCloseAdapter, NdisMQueryInformationComplete, NdisMSetInformationComplete, NdisOpenAdapter, NdisRequest, NdisReset, NdisSend, NdisTransferData



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.