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;
NDIS_REQUEST specifies a packet set up by NDIS or by a protocol for a call to NdisRequest. NDIS submits these requests to the underlying driver’s MiniportQueryInformation or MiniportSetInformation functions.
For any of the preceding values, the OID_XXX specified in the Oid member must be compatible with the type of operation requested.
If NdisRequest returns NDIS_STATUS_SUCCESS, the value of this member is meaningless. If the InformationBufferLength is too small for the given OID_XXX on a query, this member indicates how large a buffer is required to satisfy the request. If the buffer at InformationBuffer does not contain sufficient data for the given OID_XXX on a set, this member indicates how much data is required.
A protocol should allocate nonpaged memory for the buffer at InformationBuffer and for the NDIS_REQUEST packet 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.
NDIS_REQUEST contains a DATA substructure 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 it specified in the Oid member. NDIS or the underlying driver fills in the remaining members before it returns control to the caller.
For more information about OID_XXX codes and which system-defined OIDs permit queries, statistics queries, and/or set requests, see Chapter 5.
The NdisRequestGeneric types are available for NIC drivers that create their own internal requests. To indicate a requested operation, a NIC driver sets an internal variable to one of these types.
MiniportQueryInformation, MiniportSetInformation, NdisCloseAdapter, NdisMQueryInformationComplete, NdisMSetInformationComplete, NdisOpenAdapter, NdisRequest, NdisReset, NdisSend, NdisSendPackets, NdisTransferData, ProtocolRequestComplete