/* This function calculates the checksum for the Packet, utilizing the pre-calculated pseudo HeadSum to reduce some overhead. */
UINT16 Udp6Checksum(IN NET_BUF *Packet, IN UINT16 HeadSum)
/* This function calculates the checksum for the Packet, utilizing the pre-calculated pseudo HeadSum to reduce some overhead. */
UINT16 Udp6Checksum(IN NET_BUF *Packet, IN UINT16 HeadSum)
{
  UINT16  Checksum;
  Checksum = NetbufChecksum (Packet);
  Checksum = NetAddChecksum (Checksum, HeadSum);
  Checksum = NetAddChecksum (Checksum, HTONS ((UINT16)Packet->TotalSize));
  Checksum = (UINT16)(~Checksum);
  return Checksum;
}