Freigeben über


NDIS_TCP_IP_CHECKSUM_PACKET_INFO (Windows CE 5.0)

Send Feedback

This structure contains information used in offloading checksum tasks from the TCP/IP transport to a NIC. The NDIS_TCP_IP_CHECKSUM_PACKET_INFO structure is part of the per-packet information (extended out-of-band data) associated with a packet descriptor.

typedef struct _NDIS_TCP_IP_CHECKSUM_PACKET_INFO {union {  struct {     ULONGNdisPacketChecksumV4:1;    ULONGNdisPacketChecksumV6:1;    ULONGNdisPacketTcpChecksum:1;    ULONGNdisPacketUdpChecksum:1;    ULONGNdisPacketIpChecksum:1;  } Transmit;  struct {    ULONGNdisPacketTcpChecksumFailed:1;    ULONGNdisPacketUdpChecksumFailed:1;    ULONGNdisPacketIpChecksumFailed:1;    ULONGNdisPacketTcpChecksumSucceeded:1;    ULONGNdisPacketUdpChecksumSucceeded:1;    ULONGNdisPacketIpChecksumSucceeded:1;    ULONGNdisPacketLoopback:1;  } Receive;  ULONG Value;};} NDIS_TCP_IP_CHECKSUM_PACKET_INFO, *PNDIS_TCP_IP_CHECKSUM_PACKET_INFO;

Members

  • NdisPacketChecksumV4:1
    Set by the TCP/IP transport to indicate that the send packet contains IPv4 addresses. If the transport does not set NdisPacketChecksumV4, the miniport should not perform checksum tasks on the packet.
  • NdisPacketChecksumV6:1
    Set by the TCP/IP transport to indicate that the send packet contains IPv6 addresses.
  • NdisPacketTcpChecksum:1
    Set by the TCP/IP transport to indicate that the NIC should calculate the packet's TCP checksum.
  • NdisPacketUdpChecksum:1
    Set by the TCP/IP transport to indicate that the NIC should calculate the packet's UDP checksum.
  • NdisPacketIpChecksum:1
    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 the tunnel IP header. The TCP/IP transport calculates the checksum for the transport IP header of such a packet.
  • NdisPacketTcpChecksumFailed:1
    Set by the miniport to indicate that the TCP checksum calculated by its NIC did not match the checksum in the receive packet's TCP header.
  • NdisPacketUdpChecksumFailed:1
    Set by the miniport to indicate that that the UDP checksum calculated by its NIC did not match the checksum in the receive packet's UDP header.
  • NdisPacketIpChecksumFailed:1
    Set by the miniport to indicate that the IP checksum calculated by its 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 only the checksum for the tunnel IP header. The TCP/IP transport validates the checksum for the transport IP header of such a packet.
  • NdisPacketTcpChecksumSucceeded:1
    Set by the miniport to indicate that the TCP checksum calculated by its NIC matched the checksum in the receive packet's TCP header.
  • NdisPacketUdpChecksumSucceeded:1
    Set by the miniport to indicate that the UDP checksum calculated by its NIC matched the checksum in the receive packet's UDP header.
  • NdisPacketIpChecksumSucceeded:1
    Set by the miniport to indicate that the IP checksum calculated by its 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 only the checksum for the tunnel IP header. The TCP/IP transport validates the checksum for the transport IP header of such a packet.
  • NdisPacketLoopback:1
    Set by the miniport to indicate that the receive packet is a loopback packet that NDIS has handled. The miniport, in this case, sets all the NdisPacketXXXChecksumSucceeded flags.
  • Value
    Checksum value.

Remarks

The NDIS**_TCP_IP_CHECKSUM_PACKET_INFO** structure specifies information used in offloading checksum tasks from the TCP/IP transport to a NIC. The NDIS_TCP_IP_CHECKSUM_PACKET_INFO structure is part of the per-packet information (extended out-of-band data) associated with a packet descriptor.

Before the TCP/IP transport passes to the miniport a packet on which the miniport will perform checksum tasks, the TCP/IP transport updates the NDIS_TCP_IP_CHECKSUM_PACKET_INFO structure associated with the packet descriptor. Specifically, the TCP/IP transport sets the NdisPacketChecksumV4 flag to indicate that the send packet contains IPv4 addresses. If the TCP/IP transport does not set this flag, the miniport should not perform checksum tasks on the packet. If the TCP/IP transport sets NdisPacketChecksumV4 flag, it also sets NdisPacketTcpChecksum and/or NdisPacketIpChecksum to indicate which checksums the miniport should calculate for the packet.

Before indicating up a receive packet on which it performs checksum tasks, a miniport sets the appropriate NdisPackeXXXChecksumFailed and/or NdisPacketXXXChecksumSucceeded flags in the NDIS_TCP_IP_CHECKSUM_PACKET_INFO structure. If the packet is a loopback packet, the miniport sets the NdisPacketLoopback flag and all the NdisPacketXXXChecksumSucceeded flags.

To obtain a pointer to the NDIS_TCP_IP_CHECKSUM_PACKET_INFO structure, a driver calls the NDIS_PER_PACKET_INFO_FROM_PACKET macro with an InfoType of TcpIpCheckSumPacketInfo. Alternatively, a driver can call the NDIS_PACKET_EXTENSION_FROM_PACKET macro to obtain a pointer to the NDIS_PACKET_EXTENSION structure associated with a given packet descriptor. The miniport can then use the TcpIpCheckSumPacketInfo array index to obtain a pointer to the NDIS_TCP_IP_CHECKSUM_PACKET_INFO structure.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.

See Also

NDIS_PER_PACKET_INFO_FROM_PACKET | NDIS_PACKET_EXTENSION_FROM_PACKET | NDIS_PACKET_EXTENSION

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.