Share via


NDIS_TASK_OFFLOAD_HEADER (Windows Embedded CE 6.0)

1/6/2010

This structure contains the encapsulation format for send and receive packets on which a miniport may perform tasks offloaded from the TCP/IP transport.

Syntax

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

Members

  • Version
    Specifies the task-offload version supported by the TCP/IP transport. This value is always set to NDIS_TASK_OFFLOAD_VERSION.
  • Size
    Specifies, in bytes, the size of the NDIS_TASK_OFFLOAD_HEADER structure. Size is set to sizeof(NDIS_TASK_OFFLOAD_HEADER) and is used to determine the version of the NDIS_TASK_OFFLOAD_HEADER structure.
  • Reserved
    Reserved for future use.
  • OffsetFirstTask
    Specifies, in bytes, the offset from the beginning of the enclosing buffer to the first NDIS_TASK_OFFLOAD structure. The miniport is responsible for setting this value when responding to a query of OID_TCP_TASK_OFFLOAD. The TCP/IP transport is responsible for setting this value when setting OID_TCP_TASK_OFFLOAD. If no NDIS_TASK_OFFLOAD structures are in the buffer, OffsetFirstTask is set to zero.
  • EncapsulationFormat
    Specifies the encapsulation format for both send and receive packets that are passed to or from the TCP/IP transport through the miniport's NIC. This information is formatted as an NDIS_ENCAPSULATION_FORMAT structure.

Remarks

When the TCP/IP transport queries OID_TCP_TASK_OFFLOAD, it initializes and passes an NDIS_TASK_OFFLOAD_HEADER structure in the information buffer pointed to by the InformationBuffer member of the NDIS_REQUEST structure associated with the query. The miniport that receives this query examines the NDIS_TASK_OFFLOAD_HEADER structure to determine the encapsulation format for send and receive packets processed by the TCP/IP transport. The miniport or its NIC uses the encapsulation information to determine the format of the encapsulation header, as well as the start of the first IP header, in such packets so that the NIC can perform offload tasks on these packets.

The miniport responds to the OID_TCP_TASK_OFFLOAD query by appending one or more NDIS_TASK_OFFLOAD structures to the NDIS_TASK_OFFLOAD_HEADER structure in the information buffer. Each NDIS_TASK_OFFLOAD structure represents an offload task supported by the miniport's NIC. The miniport sets the OffsetFirstTask member of the NDIS_TASK_OFFLOAD_HEADER structure to the offset, in bytes, from the start of the information buffer to the first NDIS_TASK_OFFLOAD structure. The miniport does not alter any other values in the NDIS_TASK_OFFLOAD_HEADER structure. If the Version, Size, or EncapsulationFormat value specified in the NDIS_TASK_OFFLOAD_HEADER structure are not acceptable to the miniport, the miniport should fail the OID_TCP_TASK_OFFLOAD query.

To support task offloads for a particular frame type, a miniport's NIC must support the appropriate encapsulation types. The following table indicates which encapsulation types a miniport must support to be able to offload tasks for a given frame type.

Frame type Encapsulation type

Ethernet

IEEE_802_3_Encapsulation

Token Ring

IEEE_802_5_Encapsulation

ATM (CLIP)

LLC_SNAP_ROUTED_Encapsulation

Other

UNSPECIFIED_Encapsulation

A NIC does not have to support the same set of offload tasks for each encapsulation type. For example, an Ethernet NIC can support checksum and IP security offloads for the IEEE_802_3_Encapsulation type (Ethernet DIX) but only checksum offloads for the LLC_SNAP_ROUTED_Encapsulation type.

A NIC can offload the segmentation of large TCP packets only if one of the following is true:

  • It supports the encapsulation format specified by the TCP/IP protocol in the NDIS_TASK_OFFLOAD_HEADER structure.
  • The specified encapsulation type is UNSPECIFIED_Encapsulation and Encapsulation
  • HeaderSize is set to the size of the encapsulation header for the media supported by the miniport and its NIC.

The encapsulation format specified by the TCP/IP transport in the NDIS_TASK_OFFLOAD_HEADER structure applies to both send and receive packets that are passed to or from the TCP/IP transport through the NIC. Only one encapsulation format is supported per NIC at any given time.

To disable all of a NIC's task-offload capabilities, the TCP/IP transport sets OID_TCP_TASK_OFFLOAD, passing only NDIS_TASK_OFFLOAD_HEADER in the information buffer. In this case, the TCP/IP transport sets the OffsetFirstTask member of NDIS_TASK_OFFLOAD_HEADER to zero.

Requirements

Header ndis.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

NDIS Structures
NDIS_ENCAPSULATION_FORMAT
NDIS_TASK_OFFLOAD
NDIS_REQUEST
NDIS_TASK_TCP_LARGE_SEND
NDIS_TASK_TCP_IP_CHECKSUM
OID_TCP_TASK_OFFLOAD