Summary of Changes Required to Port an Intermediate Driver to NDIS 6.0
This topic summarizes the changes that are required to port an NDIS 5.x intermediate driver to NDIS 6.0. Porting earlier drivers is similar to porting NDIS 5.x drivers.
The following general issues apply to intermediate drivers:
Except where noted otherwise, protocol driver and miniport driver changes also apply to intermediate drivers. Before you read this summary, see the protocol driver porting summary at Summary of Changes Required to Port a Protocol Driver to NDIS 6.0 and the miniport driver porting summary at Summary of Changes Required to Port a Miniport Driver to NDIS 6.0.
If the intermediate driver is a filter intermediate driver, rewrite it as an NDIS 6.0 filter driver, because filter intermediate drivers are not supported in NDIS 6.0. For more information about filter drivers, see NDIS 6.0 Filter Drivers.
To run in the NDIS 6.0 environment, NDIS 5.x intermediate drivers must be modified as follows:
Replace the NDIS51_MINIPORT_DRIVER preprocessor definition with NDIS60_MINIPORT_DRIVER.
Replace the NDIS51 preprocessor definition with NDIS60.
Remove calls to the NdisIMRegisterLayeredMiniport function.
To register its MiniportXxx functions, an intermediate driver must call the NdisMRegisterMiniportDriver function with the NDIS_INTERMEDIATE_DRIVER flag set.
Optional. Create the intermediate driver's ProtocolUninstall function. This function is called ProtocolUnload in NDIS 5.x. For NDIS 6.0, the ProtocolUninstall entry point is in the NDIS_PROTOCOL_DRIVER_CHARACTERISTICS structure (previously known as NDIS_PROTOCOL_CHARACTERISTICS).
Call the NdisDeregisterProtocolDriver function from the MiniportDriverUnload function.
The MiniportCheckForHangEx function (previously known as MiniportCheckForHang) is not required for intermediate drivers, so intermediate drivers should set its entry point to NULL.
The MiniportResetEx function (previously known as MiniportReset) is not required for intermediate drivers, so intermediate drivers should set its entry point to NULL.
Rewrite the send and receive code paths to use NET_BUFFER structures and NET_BUFFER_LIST structures instead of NDIS_PACKET structures.
Specify the intermediate driver's backfill size requirements. The driver receives backfill requirements from underlying drivers in the NDIS_BIND_PARAMETERS or restart attributes. The driver adds its backfill size requirements to the size that the underlying drivers reported. The driver specfies backfill size requirements for its virtual miniports in the NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure or restart attributes.
Optional. Use the clone, fragment, and reassemble interfaces when handling NET_BUFFER_LIST structures. For more information about handling NET_BUFFER_LIST structures, see Derived NET_BUFFER_LIST Structures.
Remove code, if any, that handles "packet stacking" special cases. Instead, use the NET_BUFFER_LIST_CONTEXT structure and related interfaces to create and manage context space.
Use the NdisAllocateCloneOidRequest function to allocate and forward OID requests.
Use the NdisCancelOidRequest function to cancel OID requests.
- Similar to NDIS 5.x. For interface changes, see Summary of Changes Required to Port a Protocol Driver to NDIS 6.0 and Summary of Changes Required to Port a Miniport Driver to NDIS 6.0.
Similar to NDIS 5.x. For interface changes, see Summary of Changes Required to Port a Protocol Driver to NDIS 6.0 and Summary of Changes Required to Port a Miniport Driver to NDIS 6.0.
Use the NdisMNetPnPEvent function to propagate a network Plug and Play or Power Management event notification to overlying drivers.
- Include NDIS 6.0 pause and restart functionality. Optionally include support for pause and restart of virtual miniports when NDIS pauses an underlying driver stack. For more information about pause and restart, see Driver Stack Management.