[e2e] UDP length field

Jonathan Stone jonathan at DSG.Stanford.EDU
Wed Apr 11 11:48:43 PDT 2001


In message <5.0.2.1.2.20010411132637.02d9da80 at mail.reed.com>,
"David P. Reed" writes:


>A reasonable question.  The main reason as I recall from the design work 
>around the TCP/IP split decision was that IP fragmentation makes it 
>difficult to trust that the size of the underlying datagram was not 
>corrupted.  If you did use the IP length to transmit e2e length data, it 
>would have to be part of the virtual header used by checksumming.


Which is what TCP does, except there is no explicit "TCP length"
field; its computed from the IP length, and included in the
pseudo-header which is checksummed.

>In any case, if the UDP or TCP length isn't less than or equal to the 
>reconstructed IP datagram size, the datagram should be discarded by the UDP 
>or TCP layer (the IP layer, of course, can't: it does not know the codings 
>of upper level protocols).

TCP can't perform this check; it derives the `TCP length' (TCP header
size plus payload length) from info given by the underlying protocol
(IP datagram length less IP header length, iirc).



More information about the end2end-interest mailing list