[ih] UDP Length Field?

Timothy J. Salo salo at saloits.com
Sun Nov 29 16:30:18 PST 2020


On 11/29/2020 12:45 PM, Noel Chiappa via Internet-history wrote:
> [...]
> Oh, looking at IEN-71, in the packet format description, it says "data, padded
> with zero octets at the end to make a multiple of two octets". So Vint's comment
> about the length was right on target.
> [...] 

Actually, I don't think that this is describing the packet format.
Rather, this specifies how to compute the checksum when the data is
an odd number of bytes long.

Here is more context from IEN 71 for the text quoted above:

   Fields
      ...
   Length is the length in octets of the data of the datagram.

   Checksum is the 16-bit one's complement of the one's complement sum of
   the parts of the internet header involved in the TCP checksum, the
   fields above, and the data, padded with zero octets at the end to make
   a multiple of two octets.

So, again, I read this to say that the zero padding is only associated
with checksum calculation.  This doesn't not seem to suggest (to me)
that the data itself (in the actual packet) is padded to an even number
of bytes.

It doesn't appear to me that this text justifies the need for a length
field in the UDP header.  Of course, there might be other justifications
that I don't know about.

-tjs



More information about the Internet-history mailing list