Compartir a través de


Querying Task-Offload Capabilities (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

The TCP/IP transport determines a NIC's task-offload capabilities by querying OID_TCP_TASK_OFFLOAD. In this query, the TCP/IP transport supplies, in the InformationBuffer, an NDIS_TASK_OFFLOAD_HEADER, which is defined as:

typedef struct _NDIS_TASK_OFFLOAD_HEADER
{
    ULONG  Version;
    ULONG  Size;
    ULONG  Reserved;
    UCHAR  OffsetFirstTask;
    NDIS_ENCAPSULATION_FORMAT  EncapsulationFormat;
} NDIS_TASK_OFFLOAD_HEADER, *PNDIS_TASK_OFFLOAD_HEADER;

The NDIS_TASK_OFFLOAD_HEADERstructure specifies the following:

  • The task-offload version supported by the TCP/IP transport

  • The size of the NDIS_TASK_OFFLOAD_HEADER structure (which is used to check the version of the structure).

  • The offset in bytes from the beginning of the InformationBuffer to the first NDIS_TASK_OFFLOAD structure.

  • The encapsulation format for send and receive packets that were passed between the TCP/IP transport and the miniport driver.

By using the information supplied by the NDIS_TASK_OFFLOAD_HEADER, the miniport driver or its NIC can locate the beginning of the first IP header in a send or receive packet. This is a prerequisite for performing offload tasks.

In response to a query of OID_TCP_TASK_OFFLOAD, a miniport driver returns, in the InformationBuffer, the NDIS_TASK_OFFLOAD_HEADER followed by one or more NDIS_TASK_OFFLOAD structures. The NDIS_TASK_OFFLOAD structure is defined as:

typedef struct _NDIS_TASK_OFFLOAD
{
    ULONG      Version;
    ULONG      Size;
    NDIS_TASK  Task;
    ULONG      OffsetNextTask;
    ULONG      TaskBufferLength;
    UCHAR      TaskBuffer[1];
} NDIS_TASK_OFFLOAD, *PNDIS_TASK_OFFLOAD;

The NDIS_TASK_OFFLOAD structure specifies the following:

  • The version of the specified offload task.

  • The size of the NDIS_TASK_OFFLOAD structure (which is used to check the version of the structure).

  • The offload task.

  • The offset from the beginning of the InformationBuffer to the next NDIS_TASK_OFFLOAD structure.

  • The length of the TaskBuffer.

  • A variable-length array that contains task-specific information.

Each NDIS_TASK_OFFLOAD structure specifies a task-offload capability supported by the miniport driver's NIC. If the miniport driver's NIC supports multiple versions of a particular task-offload capability, it returns one NDIS_TASK_OFFLOAD structure for each version.

 

 

Send comments about this topic to Microsoft