Accessing TCP/IP Offload NET_BUFFER_LIST Information
NDIS versions 6.0 and later provide TCP/IP offload out-of-band (OOB) data in the NetBufferListInfo member of the NET_BUFFER_LIST structure, which specifies a linked list of NET_BUFFER structures. The NetBufferListInfo member is an array of values that contain information that is common to all of the NET_BUFFER structures in the list.
Use the following identifiers with the NET_BUFFER_LIST_INFO macro to set and get the TCP/IP offload OOB data in the NetBufferListInfo array:
Specifies checksum information that is used in offloading checksum tasks from the TCP/IP protocol to a miniport driver. When you specify TcpIpChecksumNetBufferListInfo, NET_BUFFER_LIST_INFO returns an NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO structure (not a pointer to the structure). This structure contains a union that enables the checksum information to be accessed as a single PVOID value or as bit fields.
Specifies Internet protocol security (IPsec) offload information that is used in offloading IPsec tasks from the TCP/IP protocol to a miniport driver. When you specify IPsecOffloadV1NetBufferListInfo, NET_BUFFER_LIST_INFO returns an NDIS_IPSEC_OFFLOAD_V1_NET_BUFFER_LIST_INFO structure.
Specifies information that is used in offloading the segmentation of a large TCP packet from the TCP/IP protocol to a miniport driver. When you specify TcpLargeSendNetBufferListInfo, NET_BUFFER_LIST_INFO returns an NDIS_TCP_LARGE_SEND_OFFLOAD_NET_BUFFER_LIST_INFO structure (not a pointer to the structure). This structure contains a union that enables the information to be accessed as a single PVOID value or as bit fields.
Specifies 802.1Q information about a packet. When you specify Ieee8021QNetBufferListInfo, NET_BUFFER_LIST_INFO returns the Value member of an NDIS_NET_BUFFER_LIST_8021Q_INFO structure. This structure can specify 802.1p priority and virtual LAN (VLAN) identifier information. 802.1p priority information is used to establish packet priority in shared-media 802 networks.
If a miniport driver reports support for the NDIS_ENCAPSULATION_IEEE_802_3_P_AND_Q_IN_OOB encapsulation, it must insert the Ieee8021QNetBufferListInfo data into large send offload version 1 (LSOV1) and large send offload version 2 (LSOV2) Ethernet packets.
Specifies a Boolean value that represents the push mode of a TCP chimney offload receive request. If TRUE, the receive request is in non-push mode. Otherwise, the receive request is in push mode.
For LSOV1, LSOV2, checksum, and IPsec offload types, a miniport driver performs task offload based on the type of OOB data and the offload capabilities that it reported. For example, if a protocol driver requires LSOV1 services for an IPv4 packet, each send request that the protocol driver provides includes the information from the LsoV1Transmit member in the NDIS_TCP_LARGE_SEND_OFFLOAD_NET_BUFFER_LIST_INFO OOB data. Note that the protocol driver must verify that the miniport driver supports IPv4, with the specified encapsulation type, before making the send request.
The NDIS_TCP_LARGE_SEND_OFFLOAD_NET_BUFFER_LIST_INFO structure contains the maximum segment size (MSS). The TcpHeaderOffset member specifies the location of the TCP header so that the miniport driver does not have to parse IP headers, IP options, or IP extension headers.
The NDIS 6.0 and later miniport driver that supports LSOV2 and LSOV1 must check the Type member of NDIS_TCP_LARGE_SEND_OFFLOAD_NET_BUFFER_LIST_INFO to determine whether the driver stack is using LSOV2 or LSOV1 and must perform the appropriate offload.
Before a miniport driver completes the send of a large TCP packet that it has segmented into smaller packets by using LSO, the driver writes the number of TCP payload bytes that it sent in the segmented packets in the TcpPayload member of NDIS_TCP_LARGE_SEND_OFFLOAD_NET_BUFFER_LIST_INFO.
If a miniport driver specifies the NDIS_ENCAPSULATION_IEEE_802_3_P_AND_Q flag in its capabilities, the driver can perform task offload services for NET_BUFFER_LIST structures that contain the VLAN header in the buffer data. In the case of received data, this flag indicates that the miniport driver will perform the receive checksum calculation and put the VLAN header in the Ethernet packet.
If a miniport driver specifies the NDIS_ENCAPSULATION_IEEE_802_3_P_AND_Q_IN_OOB flag in its capabilities, the driver can perform offload on NET_BUFFER_LIST structures that contain the VLAN header in the Ieee8021QnetBufferListInfo OOB data. In the receive checksum offload case, the miniport inserts the VLAN header into the Ieee8021QnetBufferListInfo OOB data.