Previous Next

NDIS_TASK_OFFLOAD

When supplied by a miniport driver in response to OID_TCP_TASK_OFFLOAD, the NDIS_TASK_OFFLOAD structure specifies a NIC's capabilities for performing a particular type of task offloaded from the TCP/IP transport. When supplied by the TCP/IP transport in a set of OID_TCP_TASK_OFFLOAD, the NDIS_TASK_OFFLOAD structure specifies an offload task that the TCP/IP transport is enabling.

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;

Members

Version
The version number of this task-offload capability. If the miniport driver's NIC supports more than one version of a particular task-offload capability, each version of the capability should be indicated with a separate NDIS_TASK_OFFLOAD structure. The TCP/IP transport chooses the most suitable version to enable.
Size
Specifies the size in bytes of the NDIS_TASK_OFFLOAD structure. Size is set to sizeof(NDIS_TASK_OFFLOAD) and is used to determine the version of the NDIS_TASK_OFFLOAD structure.
Task
Specifies the type of offload task as one of the following:
TcpIpChecksumNdisTask
Checksum offload. The TaskBuffer contains an NDIS_TASK_TCP_IP_CHECKSUM structure.
IpSecNdisTask
IP Security offload. The TaskBuffer contains an NDIS_TASK_IPSEC structure.
TcpLargeSendNdisTask
Segmentation offload. The TaskBuffer contains an NDIS_TASK_TCP_LARGE_SEND structure.
OffsetNextTask
Specifies in bytes the offset from the beginning of the NDIS_TASK_OFFLOAD_STRUCTURE to the next NDIS_TASK_OFFLOAD structure in the InformationBuffer. If this NDIS_TASK_OFFLOAD structure is the last one in the InformationBuffer, OffsetNextTask is set to 0.
TaskBufferLength
Specifies the size in bytes of the structure at TaskBuffer.
TaskBuffer
Specifies a variable-length array that contains information specific to the offload task indicated by Task. The contents of the TaskBuffer vary according to the Task type:
Task Type Contents of TaskBuffer
TcpIpChecksumNdisTask NDIS_TASK_TCP_IP_CHECKSUM structure
IpSecNdisTask NDIS_TASK_IPSEC structure
TcpLargeSendNdisTask NDIS_TASK_TCP_LARGE_SEND structure

Headers

Declared in ndis.h. Include ndis.h.

Comments

If a NIC has the appropriate capabilities, the Microsoft TCP/IP transport can offload one or more of the following tasks to a NIC:

The TCP/IP transport determines a NIC's task-offload capabilities by querying OID_TCP_TASK_OFFLOAD. In response, a miniport driver returns in the InformationBuffer an NDIS_TASK_OFFLOAD_HEADER structure followed by one or more NDIS_TASK_OFFLOAD structures. The TaskBuffer of each NDIS_TASK_OFFLOAD structure contains a task-specific structure (NDIS_TASK_TCP_IP_CHECKSUM, NDIS_TASK_IPSEC, or NDIS_TASK_TCP_LARGE_SEND) that specifies a particular task-offload capability supported by the miniport driver's NIC. If the miniport's NIC supports multiple versions of a particular task-offload capability, it returns one NDIS_TASK_OFFLOAD structure for each version.

After querying a NIC's task-offload capabilities, the TCP/IP transport enables a NIC's task-offload capabilities by setting OID_TCP_TASK_OFFLOAD. In this set operation, the TCP/IP transport supplies in the InformationBuffer an NDIS_TASK_OFFLOAD_HEADER structure followed by an NDIS_TASK_OFFLOAD structure for each offload task that it is enabling. The miniport driver must examine each NDIS_TASK_OFFLOAD structure to determine which offload tasks are being enabled. The miniport driver must also examine the task-specific structure in the TaskBuffer of each NDIS_TASK_OFFLOAD structure to determine which specific capabilities for a particular offload task are being enabled.

See Also

OID_TCP_TASK_OFFLOAD, NDIS_TASK_IPSEC, NDIS_TASK_OFFLOAD_HEADER, NDIS_TASK_TCP_IP_CHECKSUM, NDIS_TASK_TCP_LARGE_SEND