NDK_FN_DISCONNECT callback function (ndkpi.h)

The NdkDisconnect (NDK_FN_DISCONNECT) function starts a disconnect on an NDK connection.

Syntax

NDK_FN_DISCONNECT NdkFnDisconnect;

NTSTATUS NdkFnDisconnect(
  [in]           NDK_CONNECTOR *pNdkConnector,
  [in]           NDK_FN_REQUEST_COMPLETION RequestCompletion,
  [in, optional] PVOID RequestContext
)
{...}

Parameters

[in] pNdkConnector

A pointer to a connector object (NDK_CONNECTOR).

[in] RequestCompletion

A pointer to a request completion callback routine NdkRequestCompletion (NDK_FN_REQUEST_COMPLETION).

[in, optional] RequestContext

A context value to pass to the Context parameter of the callback function that is specified in the RequestCompletion parameter.

Return value

The NdkDisconnect function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The disconnect request was completed successfully.
STATUS_PENDING
The operation is pending and will be completed later. The driver will call the specified RequestCompletion (NDK_FN_REQUEST_COMPLETION) function to complete the pending operation.
STATUS_IO_TIMEOUT
The disconnect handshake timed out.
Important  The request can fail inline as well as asynchronously with this status code.
 
Other status codes
An error occurred.

Remarks

NdkDisconnect initiates a graceful disconnect on a connection. After the underlying protocol driver performs a graceful disconnect, the NDK provider must also perform an implicit flush on the QP.

Requirements

Requirement Value
Minimum supported client None supported,Supported in NDIS 6.30 and later.
Minimum supported server Windows Server 2012
Target Platform Windows
Header ndkpi.h (include Ndkpi.h)
IRQL <=DISPATCH_LEVEL

See also

NDKPI Object Lifetime Requirements

NDK_CONNECTOR_DISPATCH

NDK_FN_CONNECT

NDK_FN_REQUEST_COMPLETION