Поделиться через


NDIS_TASK_OFFLOAD structure

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.

When supplied by a miniport driver in response to a query of OID_TCP_TASK_OFFLOAD, the NDIS_TASK_OFFLOAD structure specifies a NIC's capabilities for offloading tasks or TCP connections from the host stack. When supplied by the host stack (when the host stack sets the OID_TCP_TASK_OFFLOAD OID), the NDIS_TASK_OFFLOAD structure specifies an offload task or capability that the host stack is enabling.

Syntax

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 the offload capability. If the miniport driver's NIC supports more than one version of a particular offload capability, it should specify each version of the capability with a separate NDIS_TASK_OFFLOAD structure. The host stack chooses the most suitable version to enable.

  • Size
    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
    The type of offload capability, such as one of the following:

    • TcpIpChecksumNdisTask
      Checksum offload. The TaskBuffer member contains an NDIS_TASK_TCP_IP_CHECKSUM structure.

    • IpSecNdisTask
      Internet Protocol (IP) security offload. The TaskBuffer member contains an NDIS_TASK_IPSEC structure.

    • TcpLargeSendNdisTask
      Segmentation offload. The TaskBuffer member contains an NDIS_TASK_TCP_LARGE_SEND structure.

  • OffsetNextTask
    The offset amount, in bytes, from the beginning of the NDIS_TASK_OFFLOAD structure to the next NDIS_TASK_OFFLOAD structure in the buffer pointed to by the InformationBuffer member of the NDIS_REQUEST structure. If the NDIS_TASK_OFFLOAD structure is the last one in the buffer, OffsetNextTask is set to zero.

  • TaskBufferLength
    The size, in bytes, of the structure at TaskBuffer.

  • TaskBuffer
    A variable-length array that contains information specific to the offload task that is indicated by Task. The contents of the TaskBuffer member vary according to the Task member 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

     

Remarks

If a NIC has the appropriate capabilities, the host stack can offload one or more of the following:

  • Calculation and/or validation of IP or TCP checksums.

  • IP security processing.

  • Segmentation of large TCP packets into smaller TCP packets.

The host stack determines a NIC's offload capabilities by querying OID_TCP_TASK_OFFLOAD. In response, a miniport driver returns (in the buffer pointed to by the InformationBuffer member of the NDIS_REQUEST structure) an NDIS_TASK_OFFLOAD_HEADER structure followed by one or more NDIS_TASK_OFFLOAD structures. The TaskBuffer member of each NDIS_TASK_OFFLOAD structure contains a capability-specific structure ( NDIS_TASK_TCP_IP_CHECKSUM, NDIS_TASK_IPSEC, or NDIS_TASK_TCP_LARGE_SEND, ) that specifies a particular offload capability supported by the miniport driver's NIC. If the 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 offload capabilities, the host stack enables offload capabilities by setting OID_TCP_TASK_OFFLOAD. In this set operation, the host stack supplies (in the buffer pointed to by the InformationBuffer member of the NDIS_REQUEST structure) 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 capability-specific structure in the TaskBuffer member of each NDIS_TASK_OFFLOAD structure to determine the specific capabilities that are being enabled.

Requirements

Header

Ndis.h (include Ndis.h)

See also

OID_TCP_TASK_OFFLOAD

NDIS_REQUEST

NDIS_TASK_IPSEC

NDIS_TASK_OFFLOAD_HEADER

NDIS_TASK_TCP_IP_CHECKSUM

NDIS_TASK_TCP_LARGE_SEND

 

 

Send comments about this topic to Microsoft