Summary of Changes Required to Port a CoNDIS Driver to CoNDIS 6.0
This topic summarizes what you must change to port a connection-oriented NDIS (CoNDIS) 5.x driver to CoNDIS 6.0. You can port earlier drivers (before NDIS 5.x) in a way similar to porting NDIS 5.x drivers.
The following general issues apply to CoNDIS drivers:
- Except where noted otherwise, connectionless protocol driver and miniport driver porting issues also apply to CoNDIS drivers. Before you read this summary, see Summary of Changes Required to Port a Protocol Driver to NDIS 6.0, Summary of Changes Required to Port a Miniport Driver to NDIS 6.0, and Summary of Changes Required to Port an Intermediate Driver to NDIS 6.0.
To run in the CoNDIS 6.0 environment, CoNDIS 5.x drivers must be modified in the following areas:
Replace the NDIS51_MINIPORT_DRIVER preprocessor definition with NDIS60_MINIPORT_DRIVER.
Replace the NDIS51 preprocessor definition with NDIS60.
To register CoNDIS ProtocolXxx and MiniportXxx functions, all CoNDIS drivers must call the NdisSetOptionalHandlers function.
To register its CoNDIS MiniportXxx functions, a miniport driver or miniport call manager (MCM) must call the NdisSetOptionalHandlers function from its MiniportSetOptions function and pass it an NDIS_MINIPORT_CO_CHARACTERISTICS structure. To register call manager ProtocolXxx functions, MCMs also provide an NDIS_CO_CALL_MANAGER_OPTIONAL_HANDLERS structure.
To register its CoNDIS ProtocolXxx functions, a client or call managers must call the NdisSetOptionalHandlers function from its ProtocolSetOptions function and must provide an NDIS_PROTOCOL_CO_CHARACTERISTICS structure. Clients must also provide an NDIS_CO_CLIENT_OPTIONAL_HANDLERS structure and call managers must also provide an NDIS_CO_CALL_MANAGER_OPTIONAL_HANDLERS structure.
Registering and Opening an Address Family
Replace the client calls to the NdisClOpenAddressFamily function with calls to the NdisClOpenAddressFamilyEx function and replace calls to the ProtocolClOpenAfComplete function with calls to the ProtocolClOpenAfCompleteEx function.
Replace the call manager calls to the NdisCmRegisterAddressFamily function with calls to the NdisCmRegisterAddressFamilyEx function.
Replace the MCM calls to the NdisMCmRegisterAddressFamily function with calls to the NdisMCmRegisterAddressFamilyEx function.
Remove OID_CO_AF_CLOSE OID requests. Instead, call the NdisCmNotifyCloseAddressFamily function or the NdisMCmNotifyCloseAddressFamily function.
Clients must register the ProtocolClNotifyCloseAf function.
Call managers and MCMs must register the ProtocolCmNotifyCloseAfComplete function. NDIS calls ProtocolCmNotifyCloseAfComplete if a client completes the address family (AF) close operation by calling the NdisClNotifyCloseAddressFamilyComplete function.
- Rewrite the send and receive code paths to use NET_BUFFER structures and NET_BUFFER_LIST structures instead of NDIS_PACKET structures.
Replace references to the NDIS_REQUEST structure with references to the NDIS_OID_REQUEST structure.
Replace the miniport driver and MCM MiniportCoRequest function with the MiniportCoOidRequest function. Replace calls to NdisMCoRequestComplete with calls to the NdisMCoOidRequestComplete function.
Replace the client and call manager ProtocolCoRequestComplete and ProtocolCoRequest functions with the ProtocolCoOidRequestComplete and ProtocolCoOidRequest functions respectively. Replace calls to the NdisCoRequestComplete and NdisCoRequest functions with calls to the NdisCoOidRequestComplete and NdisCoOidRequest respectively.
Replace MCM calls to the NdisMCmRequestComplete and NdisMCmRequest functions with calls to the NdisMCmOidRequestComplete and NdisMCmOidRequest functions respectively.
Use the NdisCancelOidRequest function to cancel OID requests.
Replace miniport driver and MCM calls to the NdisMCoIndicateStatus function with calls to the NdisMCoIndicateStatusEx function.
Replace the protocol driver ProtocolCoStatus function with the ProtocolCoStatusEx function.
- Include NDIS 6.0 pause and restart functionality. For more information about pause and restart, see Driver Stack Management.