What is the Significance of Pseudo Header used in UDP/TCP

前端 未结 5 1080
孤街浪徒
孤街浪徒 2020-12-15 18:00

Why is the Pseudo header prepended to the UDP datagram for the computation of the UDP checksum? What\'s the rational behind this?

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-15 18:19

    From the TCP or UDP point of view, the packet does not contain IP addresses. (IP being the layer beneath them.)

    Thus, to do a proper checksum, a "pseudo header" is included. It's "pseudo", because it is not actaully part of the UDP datagram. It contains the most important parts of the IP header, that is, source and destination address, protocol number and data length.

    This is to ensure that the UDP checksum takes into account these fields.

提交回复
热议问题