다음을 통해 공유


NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO (Compact 2013)

3/26/2014

This structure specifies information that is used in offloading checksum tasks from the TCP/IP transport to a network adapter. The NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO structure is part of the NET_BUFFER_LIST information (out-of-band data) that is associated with a NET_BUFFER_LIST structure.

Syntax

typedef struct _NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO
{
  union
  {
    struct
    {
      ULONG  IsIPv4:1;
      ULONG  IsIPv6:1;
      ULONG  TcpChecksum:1;
      ULONG  UdpChecksum:1;
      ULONG  IpHeaderChecksum:1;
      ULONG  Reserved:11;
      ULONG  TcpHeaderOffset:10;
    } Transmit;

    struct
    {
      ULONG  TcpChecksumFailed:1;
      ULONG  UdpChecksumFailed:1;
      ULONG  IpChecksumFailed:1;
      ULONG  TcpChecksumSucceeded:1;
      ULONG  UdpChecksumSucceeded:1;
      ULONG  IpChecksumSucceeded:1;
      ULONG  Loopback:1;
    } Receive;

    PVOID  Value;
    };
} NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO, *PNDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO;

Members

Transmit

  • IsIPv4
    Set by the TCP/IP transport to indicate that the send packet contains IPv4 addresses.
  • IsIPv6
    Set by the TCP/IP transport to indicate that the send packet contains IPv6 addresses.
  • TcpChecksum
    Set by the TCP/IP transport to indicate that the network adapter should calculate the packet's TCP checksum.
  • UdpChecksum
    Set by the TCP/IP transport to indicate that the network adapter should calculate the packet's UDP checksum.
  • IpHeaderChecksum
    Set by the TCP/IP transport to indicate that the network adapter should calculate the IP checksum for the first IP header in the packet. If the packet contains both a tunnel IP header and a transport IP header, the network adapter should calculate the checksum for the tunnel IP header. The TCP/IP transport calculates the checksum for the transport IP header of such a packet.
  • Reserved
    Reserved.
  • TcpHeaderOffset
    The offset, in bytes, of the TCP header from the beginning of the packet for TCP packets. Miniport drivers can use TcpHeaderOffset to determine the location of the TCP header so that they do not have to parse the MAC and IP header.

Receive

  • TcpChecksumFailed
    Set by the miniport driver to indicate that the TCP checksum calculated by the network adapter did not match the checksum in the receive packet's TCP header.
  • UdpChecksumFailed
    Set by the miniport driver to indicate that the UDP checksum calculated by the network adapter did not match the checksum in the receive packet's UDP header.
  • IpChecksumFailed
    Set by the miniport driver to indicate that the IP checksum calculated by the network adapter did not match the checksum in the receive packet's first IP header. If the receive packet contains both a tunnel IP header and a transport IP header, the network adapter validates only the checksum for the tunnel IP header. The TCP/IP transport validates the checksum for the transport IP header of such a packet.
  • TcpChecksumSucceeded
    Set by the miniport driver to indicate that the TCP checksum calculated by the network adapter matched the checksum in the receive packet's TCP header.
  • UdpChecksumSucceeded
    Set by the miniport driver to indicate that the UDP checksum calculated by the network adapter matched the checksum in the receive packet's UDP header.
  • IpChecksumSucceeded
    Set by the miniport driver to indicate that the IP checksum calculated by the network adapter matched the checksum in the receive packet's first IP header. If the receive packet contains both a tunnel IP header and a transport IP header, the network adapter validates only the checksum for the tunnel IP header. The TCP/IP transport validates the checksum for the transport IP header of such a packet.
  • Loopback
    NDIS uses this bit. The miniport driver must not examine or set this bit. The miniport driver should merely ignore this bit.
  • Value
    A PVOID version of the checksum information. Miniport drivers can use this member to access the raw information instead of the specific fields.

Remarks

The NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO structure specifies information that is used in offloading checksum tasks from the TCP/IP transport to a network adapter. The NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO structure is part of the NET_BUFFER_LIST information (out-of-band data) that is associated with a NET_BUFFER_LIST structure.

Before the TCP/IP transport passes to the miniport driver a TCP/IP packet on which the miniport driver will perform checksum tasks, the TCP/IP transport updates the NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO structure that is associated with the NET_BUFFER_LIST structure. Specifically, the TCP/IP transport sets the IsIPv4 or IsIPv6 flag to indicate that the send packet is an IPv4 or IPv6 packet. If the TCP/IP transport does not set either the IsIPv4 or IsIPv6 flag, the miniport driver should not perform checksum tasks on the packet. If the TCP/IP transport sets the IsIPv4 or IsIPv6 flag, it also sets the IpHeaderChecksum, TcpChecksum, or IpHeaderChecksum flags that are required to indicate which checksums the miniport driver should calculate for the packet.

Before indicating up a receive TCP/IP packet on which it performs checksum tasks, a miniport driver sets the appropriate XxxChecksumFailed or XxxChecksumSucceeded flags in the NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO structure.

To obtain the NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO structure, a driver should call the NET_BUFFER_LIST_INFO macro with an _Id of TcpIpChecksumNetBufferListInfo.

Requirements

Header

ntddndis.h

See Also

Reference

NDIS TCP/IP Offload Structures
NET_BUFFER_LIST
NET_BUFFER_LIST_INFO