[ih] UDP Length Field?

Vint Cerf vint at google.com
Sun Nov 29 04:33:00 PST 2020


the primary proponents of splitting off IP from TCP were Jon Postel, Danny
Cohen  and David Reed, I believe. Sadly, Jon and Danny are no longer with
us. My recollection is primarily that UDP was to allow for real-time,
non-retransmitted, non-sequenced delivery for voice, video, radar in which
low latency was more important than sequenced and assured delivery. As to
the length field, it may merely have been habit to include, even if the
value could have been computed. Sometimes <length> was used to distinguish
real data from padding to achieve preferred word boundaries.

v


On Sat, Nov 28, 2020 at 8:21 PM Brian E Carpenter via Internet-history <
internet-history at elists.isoc.org> wrote:

> Reverse designing it (a bit like reverse engineering), it seems useful
> to be able to check that the intended payload length fits inside the
> actual packet length. If it doesn't, you are exposed to what you might
> call buffer underrun issues. Conversely, if you don't like covert channels,
> you might want to detect any spare bits after the payload.
>
> Regards
>    Brian Carpenter
>
> On 29-Nov-20 12:42, Timothy J. Salo via Internet-history wrote:
> > Hi,
> >
> > Can anyone provide some [historical] insight into why the UDP header
> > contains a length field?  TCP manages to ascertain the length of data in
> > a packet just fine without a length field, so why couldn't UDP?
> >
> > Several people have noted that the UDP length field is redundant,
> > including for example, the current Internet Draft "Transport Options for
> > UDP",
> > <https://www.ietf.org/archive/id/draft-ietf-tsvwg-udp-options-09.txt>.
> >
> > There are some other opinions, some of which sound to me like
> > after-the-fact reasoning:
> >
> > - So that UDP can run over network protocols other than IP (although
> >    presumably TCP could do this just fine without a length field).  But,
> >    the UDP spec says that an IP-like pseudo header needs to be created,
> >    in any case.
> >
> > - Layering and encapsulation reasons, (although, again, TCP seems like
> >    a counter example).
> >
> > - Word alignment, (there were 16-bits left over, so why not use it for
> >    the length?).  Personally, this sounds the most likely to me.
> >
> > Thanks,
> >
> > -tjs
> >
> --
> Internet-history mailing list
> Internet-history at elists.isoc.org
> https://elists.isoc.org/mailman/listinfo/internet-history
>


-- 
Please send any postal/overnight deliveries to:
Vint Cerf
1435 Woodhurst Blvd
McLean, VA 22102
703-448-0965

until further notice


More information about the Internet-history mailing list