Bewerken

Delen via


Configuring Optional Protocol Driver Services

NDIS calls a protocol driver's ProtocolSetOptions function to allow a protocol driver to configure optional services. NDIS calls ProtocolSetOptions within the context of the protocol driver's call to the NdisRegisterProtocolDriver function

ProtocolSetOptions registers default entry points for optional ProtocolXxx functions and can allocate other driver resources. To register optional ProtocolXxx functions, the protocol driver calls the NdisSetOptionalHandlers function and passes a characteristics structure at the OptionalHandlers parameter. In this case, the protocol driver passes the handle from the NdisDriverHandle parameter of ProtocolSetOptions at the NdisHandle parameter of NdisSetOptionalHandlers.

A protocol driver can also call NdisSetOptionalHandlers from the ProtocolBindAdapterEx function or the ProtocolOpenAdapterCompleteEx function after the protocol driver has a valid handle from the NdisOpenAdapterEx function. In this case, the protocol driver passes the handle from the NdisBindingHandle parameter of NdisOpenAdapterEx at the NdisHandle parameter of NdisSetOptionalHandlers.

In this case, the valid characteristics structures are:

NDIS_PROTOCOL_CO_CHARACTERISTICS

NDIS_CO_CLIENT_OPTIONAL_HANDLERS

NDIS_CO_CALL_MANAGER_OPTIONAL_HANDLERS

NDIS_CLIENT_CHIMNEY_OFFLOAD_GENERIC_CHARACTERISTICS (see NDIS 6.0 TCP chimney offload documentation)

NDIS_CLIENT_CHIMNEY_OFFLOAD_TCP_CHARACTERISTICS (see NDIS 6.0 TCP chimney offload documentation)