OPEN_NDK_ADAPTER_HANDLER callback function (ndisndk.h)

The OpenNDKAdapterHandler (OPEN_NDK_ADAPTER_HANDLER) function opens an NDK adapter instance on an NDK-capable NDIS miniport adapter.

Syntax

OPEN_NDK_ADAPTER_HANDLER OpenNdkAdapterHandler;

NDIS_STATUS OpenNdkAdapterHandler(
  [in] NDIS_HANDLE MiniportAdapterContext,
  [in] PNDIS_OPEN_NDK_ADAPTER_PARAMETERS Parameters,
       NDK_ADAPTER **ppNdkAdapter
)
{...}

Parameters

[in] MiniportAdapterContext

A handle to a context area that the miniport driver allocated in its MiniportInitializeEx function. The miniport driver uses this context area to maintain state information for an NDIS miniport adapter.

[in] Parameters

A pointer to an NDIS_OPEN_NDK_ADAPTER_PARAMETERS structure that defines the input parameters to open an NDK_ADAPTER instance.

The NDIS_OPEN_NDK_ADAPTER_PARAMETERS structure must specify the NDKPI major version, and the lowest NDKPI minor version that the NDK consumer can support.

If the provider does not support the consumer-specified major version, the provider must fail the request with NDIS_STATUS_BAD_VERSION.

If the provider supports the consumer-specified major version and the specified minor version is less than or equal to the highest minor version that the provider supports, the provider must succeed the request and use the highest minor version that the provider supports.

For example, if the consumer requests version 1.0, and the provider supports 1.1, the provider must report version 1.1 in the NDK_ADAPTER_INFO structure and NDK object headers.

Note  Higher minor versions at the provider are always fully backward-compatible with (that is, a superset of) lower minor versions.
 
If the provider supports the consumer-specified major version and the specified minor version is greater than the highest minor version that the provider supports, the provider must fail the request with NDIS_STATUS_BAD_VERSION.

ppNdkAdapter

A pointer to a variable that holds the pointer to an NDK_ADAPTER structure. On return from OPEN_NDK_ADAPTER_HANDLER, the NDK_ADAPTER structure referenced by ppNdkAdapter identifies the newly opened NDK adapter instance.

Return value

OPEN_NDK_ADAPTER_HANDLER can return one of the following values:

Return code Description
NDIS_STATUS_SUCCESS
The NDK adapter instance was successfully opened.
NDIS_STATUS_BAD_VERSION
The requested version number is not supported.
NDIS_STATUS_ADAPTER_NOT_READY
The NDK functionality of the miniport adapter is not enabled.
NDIS_STATUS_RESOURCES
NDIS was unable to open the NDK adapter due to insufficient resources.

Remarks

OPEN_NDK_ADAPTER_HANDLER opens an NDK_ADAPTER instance on an NDK-capable NDIS miniport adapter. Multiple NDK_ADAPTER instances can be created on the same NDIS miniport adapter. Each NDK_ADAPTER instance contains a pointer to a table of dispatch functions that implement the NDK application programming interface. The miniport driver calls the CLOSE_NDK_ADAPTER_HANDLER function to close the NDK adapter instance and release the associated resources.

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 ndisndk.h
IRQL PASSIVE_LEVEL

See also

CLOSE_NDK_ADAPTER_HANDLER

MiniportInitializeEx

NDIS_OPEN_NDK_ADAPTER_PARAMETERS

NDK_ADAPTER

NDK_ADAPTER_DISPATCH

NDK_ADAPTER_INFO