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.
NdisCoRequest issues an OID_GEN_CO_XXX or connection-oriented medium-specific OID_XXX request from a client to a stand-alone call manager or vice versa and from either client or call manager to the underlying miniport driver.
NDIS_STATUS NdisCoRequest( _In_ NDIS_HANDLE NdisBindingHandle, _In_opt_ NDIS_HANDLE NdisAfHandle, _In_opt_ NDIS_HANDLE NdisVcHandle, _In_opt_ NDIS_HANDLE NdisPartyHandle, _Inout_ PNDIS_REQUEST NdisRequest );
Specifies the handle returned by NdisOpenAdapter that identifies the target NIC or the virtual NIC of the next-lower driver to which the caller is bound.
NdisAfHandle [in, optional]
Specifies the handle identifying the open address family, which is shared among the client, call manager, and NDIS.
If the caller is a client making a request to the call manager, the client originally obtained this handle from a successful call to NdisClOpenAddressFamily.
If the caller is a stand-alone call manager making a request to the client, the CM originally obtained this handle as an input parameter to its ProtocolCmOpenAf function.
For a request from either a client or stand-alone call manager to the underlying miniport driver, this parameter must be NULL.
NdisVcHandle [in, optional]
Specifies the handle identifying the VC for which the caller is requesting or setting information if the request is VC-specific, or this parameter is NULL. For any VC-specific request, the caller originally obtained this handle either when it created the VC with NdisCoCreateVc, or as an input parameter to its ProtocolCoCreateVc function. For a VC-specific request directed to the underlying miniport driver, this handle identifies the VC, while NdisAfHandle and NdisPartyHandle are NULL.
NdisPartyHandle [in, optional]
Specifies the handle identifying the party on a multipoint VC for which the caller is requesting or setting information if the request is party-specific, or this parameter is NULL. For any party-specific request, the client originally obtained this handle from a successful call to NdisClAddParty or NdisClMakeCall, and the call manager obtained this handle as an input parameter to its ProtocolCmAddParty function. If NdisAfHandle is NULL, this parameter also is NULL.
NdisRequest [in, out]
Pointer to a caller-allocated resident buffer, formatted as a structure of type NDIS_REQUEST and set up by the caller.
When NdisCoRequest returns anything other than NDIS_STATUS_PENDING, the caller should make an internal call to its ProtocolCl/CmRequestComplete function. Otherwise, NDIS calls that driver's ProtocolCl/CmRequestComplete function when this operation is completed.
Before it calls NdisCoRequest, a protocol allocates a buffer for its request and initializes an NDIS_REQUEST structure. Such a driver sets the Oid member of the NDIS_REQUEST structure with a system-defined OID_GEN_CO_XXX code when communicating with the call manager or client. For requests directed to an underlying miniport driver, the protocol can set the Oid member either with an OID_GEN_CO_XXX or a connection-oriented, medium-specific OID_XXX code, such as OID_ATM_ALIGNMENT_REQUIRED when calling NdisCoRequest.
Depending on the value of NdisAfHandle, clients and stand-alone call managers call NdisCoRequest to communicate with each other or with the underlying connection-oriented miniport driver.
Passing a NULLNdisVcHandle makes such a request global in nature, whether the request is directed to the client, call manager, or miniport driver. For example, an OID_GEN_CO_RCV_CRC_ERROR request to an underlying connection-oriented miniport driver returns the number of CRC errors encountered in all receives the miniport driver has indicated on a particular VC if the caller supplies an explicit NdisVcHandle. For the same request with a NULLNdisVcHandle, the underlying miniport driver returns the total number of CRC errors encountered for all incoming receives through its NIC.
Clients and stand-alone call managers should call NdisRequest with all OIDs that are not connection-oriented, such as those returned for an OID_GEN_SUPPORTED_LIST query, commonly issued during initialization after the protocol has bound itself to the underlying NIC driver.
For more information about the sets of OIDs defined for use with NdisCoRequest and NdisRequest, see NDIS Object Identifiers.
Only clients and stand-alone call managers, which register themselves with NDIS as protocols, can call NdisCoRequest. Connection-oriented miniport drivers with integrated call-management support call NdisMCmRequest to communicate with their clients instead.
Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisCoOidRequestinstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.
|Ndis.h (include Ndis.h)|