Pseudo header in UDP checksum

Source: Internet
Author: User

UDP checksum

The UDP checksum includes all the data in the UDP data packet, a pseudo-header, and an 8-bit word that makes up the number of 16-bit integers 0.

During verification calculation, the UDP protocol first constructs a pseudo header (this header does not exist at the time of sending), and then sets the validation field of the UDP packet to 0 and connects it to the pseudo header, add the UDP packet length to an integer multiple of 16 bits, calculate the checksum for the new structure based on the IP protocol checksum calculation method, and fill in the checksum field. The UDP pseudo-header and complement part are not transmitted, and their length is not included in the UDP packet length field.

UDP pseudo Header Format

0

8

16

31

Source IP Address

Destination IP address

0

Protocol code (17)

UDP Packet Length

It contains the source and destination IP addresses, and the protocol code is UDP protocol code 17. The length field is the value of the UDP packet length field of the UDP packet.

The purpose of the UDP pseudo-header is to allow the packet receiver to determine that the UDP packet sent and received comes from the correct source and is sent to itself. Because the UDP structure only contains the Source and Destination UDP port numbers, and there is no IP address information, the pseudo-header structure is used to calculate the checksum to determine the correctness of the packet.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.