Skip to content

Latest commit

 

History

History
150 lines (109 loc) · 6.04 KB

nc-ndkpi-ndk_fn_get_connection_data.md

File metadata and controls

150 lines (109 loc) · 6.04 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NC:ndkpi.NDK_FN_GET_CONNECTION_DATA
NDK_FN_GET_CONNECTION_DATA (ndkpi.h)
The NdkGetConnectionData (NDK_FN_GET_CONNECTION_DATA) function gets read limit values and the private data sent by the peer.
netvista\ndk_fn_get_connection_data.htm
netvista
05/02/2018
NDK_FN_GET_CONNECTION_DATA callback function
NDK_FN_GET_CONNECTION_DATA, NDK_FN_GET_CONNECTION_DATA callback, NdkGetConnectionData, NdkGetConnectionData callback function [Network Drivers Starting with Windows Vista], ndkpi/NdkGetConnectionData, netvista.ndk_fn_get_connection_data
ndkpi.h
Ndkpi.h
Windows
None supported,Supported in NDIS 6.30 and later.
Windows Server 2012
<=DISPATCH_LEVEL
Windows
NDK_FN_GET_CONNECTION_DATA
ndkpi/NDK_FN_GET_CONNECTION_DATA
APIRef
kbSyntax
UserDefined
ndkpi.h
NDK_FN_GET_CONNECTION_DATA

NDK_FN_GET_CONNECTION_DATA callback function

-description

The NdkGetConnectionData (NDK_FN_GET_CONNECTION_DATA) function gets read limit values and the private data sent by the peer.

-parameters

-param pNdkConnector [in]

A pointer to an NDK connector object (NDK_CONNECTOR).

-param pInboundReadLimit [out, optional]

The maximum number of incoming in-progress read operations to allow on the QP is returned in this location.

-param pOutboundReadLimit [out, optional]

The maximum number of outgoing in-progress read operations to allow on the QP is returned in this location.

-param pPrivateData

A pointer to private data that is returned.

-param pPrivateDataLength

The length, in bytes, of the private data that is provided in the pPrivateData parameter.

Note  The output value does not indicate the actual length of private data stored in the buffer. NDK consumers must negotiate the format and length of the actual private data. For more information about private data, see the Remarks section.
 

-returns

The NdkGetConnectionData function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The operation completed successfully.
STATUS_BUFFER_TOO_SMALL
The value in the *pPrivateDataLength parameter specified a buffer size that was too small to hold the connection private data. *pPrivateDataLength is updated with the required size.
Other status codes
An error occurred.

-remarks

The NdkGetConnectionData function gets the private data sent by the peer with connect, accept, or reject requests and the effective inbound and outbound read limit values. These values are derived from the local and remote peers' requested values and the provider's maximum limits.

To access the private data and the effective inbound read limit (IRD) and outbound read limit (ORD) values from the active side, an NDK consumer can call NdkGetConnectionData for a connector object that was passed to the NDK_FN_CONNECT_EVENT_CALLBACK function.

To access the private data and effective IRD and ORD values from the passive side, the consumer can call NdkGetConnectionData for a connector object for which NDK_FN_CONNECT or NDK_FN_CONNECT_WITH_SHARED_ENDPOINT completed successfully An NDK consumer will not call this function after it calls the NDK_FN_ACCEPT function on the passive side or the NDK_FN_COMPLETE_CONNECT function on the active side.

If the pPrivateData parameter is NULL and *pPrivateDataLength is zero, an NDK provider must return STATUS_SUCCESS and store the required private data buffer size (RDS) in *pPrivateDataLength.

Note  The required private data buffer size (RDS) does not indicate that the peer has sent that much private data. The NDK consumer must, on both ends, have a common scheme to allow the receiving end to determine if there is any private data or not in the private data buffer. The RDS might be different for each connection.
 
If pPrivateData is NULL and *pPrivateDataLength is greater than zero, this is an invalid request. A consumer must never do this.

If pPrivateData is not NULL, the provider must copy the private data to the buffer at pPrivateData up to the smaller of *pPrivateDataLength or RDS in bytes.

If *pPrivateDataLength is greater than or equal to RDS, the provider must return STATUS_SUCCESS. Otherwise, the provider must return STATUS_BUFFER_TOO_SMALL. In both cases, the provider must store the RDS in *pPrivateDataLength before returning.

-see-also

NDK_CONNECTOR

NDK_CONNECTOR_DISPATCH