I couldn't understand why UDP header has 'length' field, and why it is needed?
If the reason is to know where the 'application message(L5 data)' begins in the segment, it can just be gotten from 'UDP data - UDP header length(it is already known value)'.
Because UDP can be transmitted over another protocol than IP.
And also because UDP transmits datagram messages with a length (udp length) which can be sent over multiple IP fragmented packets.
Source: https://notes.shichao.io/tcpv1/ch10/
The UDP header length field is the length of the UDP header plus the UDP data. It is indeed redundant since this length can be calculated from the IP header total length field where the UDP datagram length is the IP total length minus the IP header length.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With