NDK_FN_LISTEN routine

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

Syntax


NDK_FN_LISTEN NdkListen;

NTSTATUS NdkListen(
  _In_      NDK_LISTENER *pNdkListener,
  _In_reads_bytes_(AddressLength) const PSOCKADDR pAddress,
  _In_      ULONG AddressLength,
  _In_      NDK_FN_REQUEST_COMPLETION RequestCompletion,
  _In_opt_  PVOID RequestContext
)
{ ... }

Parameters

pNdkListener [in]

A pointer to an NDK listener object (NDK_LISTENER).

pAddress

A local address to listen on. For AF_INET or AF_INET6 pAddress contains the local IP address and local ND port.

AddressLength [in]

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

RequestCompletion [in]

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

RequestContext [in, optional]

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 codeDescription
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

Minimum supported client

None supported

Minimum supported server

Windows Server 2012

Version

Supported in NDIS 6.30 and later.

Header

Ndkpi.h (include Ndkpi.h)

IRQL

<=DISPATCH_LEVEL

See also

NDK_FN_REQUEST_COMPLETION
NDK_LISTENER
NDKPI Object Lifetime Requirements

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.