NDK_FN_LISTEN callback function

The NdkListen (NDK_FN_LISTEN) function puts an NDK listener object into listening mode.

Syntax

NDK_FN_LISTEN NdkFnListen;

NTSTATUS NdkFnListen(
  NDK_LISTENER *pNdkListener,
  CONST PSOCKADDR,
  ULONG AddressLength,
  NDK_FN_REQUEST_COMPLETION RequestCompletion,
  PVOID RequestContext
)
{...}

Parameters

*pNdkListener

A pointer to an NDK listener object (NDK_LISTENER).

PSOCKADDR

AddressLength

The size, in bytes, of local address data at the pAddress parameter.

RequestCompletion

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

RequestContext

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

Return Value

The NdkListen function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The listen request succeeded.
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_INSUFFICIENT_RESOURCES
The request failed due to insufficient resources.
Important The request can fail inline as well as asynchronously with this status code.
STATUS_SHARING_VIOLATION
The request failed because the specified local address is already in use.
Important The request can fail inline as well as asynchronously with this status code.
STATUS_INVALID_ADDRESS
The request failed because the specified local address is not a valid address for the adapter.
Important The request can fail inline as well as asynchronously with this status code.
STATUS_TOO_MANY_ADDRESSES
The request failed because the consumer specified a local port number of zero, and the Network Direct provider was unable to allocate a port from the ephemeral port space (ports 49152-65535.)
Other status codes
An error occurred.

Remarks

NdkListen puts a listener object into listening mode on the specified local address.

Requirements

   
Windows version None supported,Supported in NDIS 6.30 and later. Windows Server 2012
Target Platform Windows
Header ndkpi.h (include Ndkpi.h)
IRQL "<=DISPATCH_LEVEL"

See Also

NDKPI Object Lifetime Requirements

NDK_FN_REQUEST_COMPLETION

NDK_LISTENER