Initializing a Header-Data Split Provider

To support header-data split, a miniport driver must register as an NDIS 6.1 or later driver. The sources file for the miniport driver must specify DNDIS61_MINIPORT=1 instead of DNDIS60_MINIPORT=1. The miniport driver must also specify NDIS 6.1 or a later version in the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure.

To register its header-data split attributes, an NDIS 6.1 miniport driver calls the NdisMSetMiniportAttributes function from its MiniportInitializeEx function and passes NdisMSetMiniportAttributes an initialized NDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES structure.

The NDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES structure contains the following information:

  • The HDSplitAttributes member of NDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES contains a pointer to an NDIS_HD_SPLIT_ATTRIBUTES structure that specifies the header-data split capabilities that a miniport adapter provides.

  • The HardwareCapabilities member of NDIS_HD_SPLIT_ATTRIBUTES contains the header-data split capabilities that the miniport adapter supports. These capabilities can include capabilities that are currently disabled by INF file settings or through the Advanced properties page.

  • The CurrentCapabilities member of NDIS_HD_SPLIT_ATTRIBUTES contains the current header-data split capabilities that the miniport adapter supports. If header-data split is enabled through the *HeaderDataSplit standardized INF keyword, the miniport driver uses the same flags as the HardwareCapabilities member to indicate the current header-data split configuration. For more information about *HeaderDataSplit, see Standardized INF Keywords for Header-Data Split.

  • The HDSplitFlags member of NDIS_HD_SPLIT_ATTRIBUTES contains header-data split configuration flags. The miniport driver should set this member to zero before calling NdisMSetMiniportAttributes. NDIS sets this member with a bitwise OR of the configuration flags. After NdisMSetMiniportAttributes successfully returns, the miniport driver must check the flag settings in HDSplitFlags and configure the hardware accordingly.

NDIS uses the NDIS_HD_SPLIT_ENABLE_HEADER_DATA_SPLIT flag to enable header-data split for the miniport adapter. NDIS will not set NDIS_HD_SPLIT_ENABLE_HEADER_DATA_SPLIT if the miniport driver did not set the NDIS_HD_SPLIT_CAPS_SUPPORTS_HEADER_DATA_SPLIT flag in the CurrentCapabilities member of the NDIS_HD_SPLIT_ATTRIBUTES structure. The miniport driver should enable header-data split in the NIC if NDIS sets the NDIS_HD_SPLIT_ENABLE_HEADER_DATA_SPLIT flag.

The miniport driver should set the BackfillSize member of the NDIS_HD_SPLIT_ATTRIBUTES structure to zero before calling NdisMSetMiniportAttributes. NDIS sets the BackfillSize member if the miniport driver must pre-allocate backfill storage in the data buffer of the split frames. After NdisMSetMiniportAttributes successfully returns, the miniport driver must use the BackfillSize value that NDIS specified and pre-allocate the data buffers. For more information about the data buffer backfill size, see Allocating Backfill for the Data Buffer.

The miniport driver should set the MaxHeaderSize member of the NDIS_HD_SPLIT_ATTRIBUTES structure to zero before calling NdisMSetMiniportAttributes. NDIS sets this member to the maximum size that is allowed for the header buffer of the split frames. After NdisMSetMiniportAttributes successfully returns, the miniport driver must use the MaxHeaderSize value that NDIS specified. For more information about the maximum header size, see Allocating the Header Buffer.