EN
Este contenido no se encuentra disponible en su idioma, pero aquí tiene la versión en inglés.

NDK_FN_CREATE_SHARED_ENDPOINT routine

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

Syntax


NDK_FN_CREATE_SHARED_ENDPOINT NdkCreateSharedEndpoint;

NTSTATUS NdkCreateSharedEndpoint(
  _In_      NDK_ADAPTER *pNdkAdapter,
  _In_reads_bytes_(AddressLength) const PSOCKADDR pAddress,
  _In_      ULONG AddressLength,
  _In_      NDK_FN_CREATE_COMPLETION CreateCompletion,
  _In_opt_  PVOID RequestContext,
  _Outptr_ NDK_SHARED_ENDPOINT **ppNdkSharedEndpoint
)
{ ... }

Parameters

pNdkAdapter [in]

A pointer to an NDK adapter object (NDK_ADAPTER).

pAddress

A local address to use for initiating outgoing connections. 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.

CreateCompletion [in]

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

RequestContext [in, optional]

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

ppNdkSharedEndpoint

A pointer to a created shared endpoint object (NDK_SHARED_ENDPOINT) is returned in this location if the request succeeds without returning STATUS_PENDING. If the request returns STATUS_PENDING then this parameter is ignored and the created object is returned with the callback that is specified in the CreateCompletion parameter.

Return value

The NdkCreateSharedEndpoint function returns one of the following NTSTATUS codes.

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

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_ADAPTER
NDK_ADAPTER_DISPATCH
NDK_FN_CREATE_COMPLETION
NDK_SHARED_ENDPOINT
NDKPI Object Lifetime Requirements

 

 

Send comments about this topic to Microsoft

Mostrar:
© 2014 Microsoft