NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO structure

The NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO structure specifies information used in offloading checksum tasks from the TCP/IP transport to a NIC. 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;
#if (NDIS_SUPPORT_NDIS630)
      ULONG TcpChecksumValueInvalid  :1;
      ULONG IpChecksumValueInvalid  :1;
#endif 
    } Receive;
    PVOID  Value;
  };
} NDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO, *PNDIS_TCP_IP_CHECKSUM_NET_BUFFER_LIST_INFO;

Members

Transmit

A structure that contains the following members:

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 NIC should calculate the packet's TCP checksum.

UdpChecksum

Set by the TCP/IP transport to indicate that the NIC should calculate the packet's UDP checksum.

IpHeaderChecksum

Set by the TCP/IP transport to indicate that the NIC 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 NIC should calculate the checksum for both IP headers.

Reserved

Reserved for NDIS.

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 need to parse the MAC and IP header.

Receive

A structure that contains the following members:

TcpChecksumFailed

Set by the miniport driver to indicate that the TCP checksum calculated by the NIC 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 NIC 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 NIC 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 NIC validates the checksum for both IP headers.

Note  For encapsulated packets that have both a tunnel (outer) IPv4 header and a transport (inner) IPv4 header, the miniport driver should set this flag if either of the IP header checksum validations failed.

TcpChecksumSucceeded

Set by the miniport driver to indicate that the TCP checksum calculated by the NIC 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 NIC 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 NIC 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 NIC validates the checksum for the both IP headers.

Note  For encapsulated packets that have both a tunnel (outer) IPv4 header and a transport (inner) IPv4 header, the miniport driver should set this flag only if both IP header checksum validations succeeded.

Loopback

NDIS uses this bit. The miniport driver must not examine or set this bit; the miniport driver should just ignore this bit.

TcpChecksumValueInvalid

A miniport driver that supports Receive Segment Coalescing (RSC) sets this flag to indicate that the TCP header checksum was validated by the NIC but the TCP header checksum value in the packet is not valid. For more information, see Indicating Coalesced Segments.

Miniport drivers that do not support RSC should set this flag to zero.

Note  This flag is supported in NDIS 6.30 and later miniport drivers in Windows 8, Windows Server 2012, and later.

IpChecksumValueInvalid

A miniport driver that supports RSC sets this flag to indicate that for an IPv4 packet, the IP header checksum was validated by the NIC but the IP header checksum value in the packet is not valid. For a packet consisting of both a tunnel and a transport IP header, this bit is applicable only to the tunnel IP header. For more information, see Indicating Coalesced Segments.

Miniport drivers that do not support RSC should set this flag to zero.

Note  This flag is supported in NDIS 6.30 and later miniport drivers in Windows 8, Windows Server 2012, and later.

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 NIC. 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 UdpChecksum 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

Version

Supported in NDIS 6.0 and later.

Header

Ndis.h (include Ndis.h)

See also

NET_BUFFER_LIST
NET_BUFFER_LIST_INFO
Indicating Coalesced Segments

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft