NDK_FN_CREATE_SHARED_ENDPOINT callback function

The NdkCreateSharedEndpoint (NDK_FN_CREATE_SHARED_ENDPOINT) function creates an NDK shared endpoint.

Syntax

NDK_FN_CREATE_SHARED_ENDPOINT NdkFnCreateSharedEndpoint;

NTSTATUS NdkFnCreateSharedEndpoint(
  NDK_ADAPTER *pNdkAdapter,
  const PSOCKADDR pAddress,
  ULONG AddressLength,
  NDK_FN_CREATE_COMPLETION CreateCompletion,
  PVOID RequestContext,
  NDK_SHARED_ENDPOINT **ppNdkSharedEndpoint
)
{...}

Parameters

pNdkAdapter

pAddress

AddressLength

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

CreateCompletion

A pointer to an NdkCreateCompletion (NDK_FN_CREATE_COMPLETION) function that completes the creation of an NDK object.

RequestContext

A context value that the NDK provider passes back to the NdkCreateCompletion function that is specified in the CreateCompletion parameter.

*ppNdkSharedEndpoint

Return Value

The NdkCreateSharedEndpoint function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The shared endpoint object was created successfully and returned with the *ppNdkSharedEndpoint parameter.
STATUS_PENDING
The operation is pending and will be completed later. The provider will call the function specified in the CreateCompletion parameter (NDK_FN_CREATE_COMPLETION) 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_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.)
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.
 
Other status codes
An error occurred.

Remarks

The NdkCreateSharedEndpoint function creates an NDK shared endpoint to use as the local address for multiple outgoing connections that are destined to different remote addresses. This is analogous to having multiple incoming connections to the same local address that are represented by a listener object.

If the function returns STATUS_SUCCESS, the created object is returned in the ppNdkSharedEndpoint parameter. If NdkCreateSharedEndpoint returns STATUS_PENDING, the created object is returned by the NdkCreateCompletion (NDK_FN_CREATE_COMPLETION) function that is specified in the CreateCompletion parameter.

Requirements

   
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_ADAPTER

NDK_ADAPTER_DISPATCH

NDK_FN_CREATE_COMPLETION

NDK_SHARED_ENDPOINT