A miniport driver that supports Network Direct kernel (NDK) is initialized in the same way as other miniport drivers. However, it must also register additional NDKPI entry points.
The NDK-capable miniport driver must do the following when initializing the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure:
In the OidRequestHandler member, the miniport driver must register a MiniportOidRequest function that supports:
In the SetOptionsHandler member, the miniport driver must register a MiniportSetOptions function as described in Configuring Optional Miniport Driver Services and the following MiniportSetOptions function section.
NDIS calls the MiniportSetOptions function immediately after the miniport driver's DriverEntry function returns. The MiniportSetOptions function is called in the context of the miniport driver's call to NdisMRegisterMiniportDriver.
In its MiniportSetOptions function, the NDK-capable miniport driver registers its NDK capability and registers the following required NDKPI function entry points as described in Configuring Optional Miniport Driver Services:
To register NDKPI entry points for these functions, the miniport driver's MiniportSetOptions function must do the following:
Initialize an NDIS_NDK_PROVIDER_CHARACTERISTICS structure.
Note Pay particular attention to the Header member description. The miniport driver must set this member correctly to identify itself as an NDK-capable miniport driver.
Store the function entry points in the OpenNDKAdapterHandler and CloseNDKAdapterHandler members of the structure.
Call the NdisSetOptionalHandlers function, passing the structure in the OptionalHandlers parameter.