[e2e] UDP length field

Mikael Degermark micke at CS.Arizona.EDU
Thu Apr 12 16:41:42 PDT 2001


Hi Hari and others, 

I'd like to clarify one thing about the UDP Length field. 

The UDP spec, rfc768, says that the UDP pseudo header is to contain 
the UDP Length. It does not state explicitly where this UDP Length is 
to be found, however. The length field of the UDP header is called "Length"
in rfc768, so they could be different. 

However, when discussing the interface to the IP module, rfc768 says that 

"The UDP module must be able to determine the source and destination 
internet addresses and the protocol field from the internet header."

The IP length field, or derived UDP length information, is not mentioned. 
I thus conclude that the UDP Length value in the UDP pseudo header can
only be taken from the Length field in the UDP header itself.

If I read the spec correctly, this would mean that it is ok to accept
a UDP packet even if it does not completely fill the IP payload.

Does anyone know if there is an UDP implementation out there that
derives the pseudo header length field from the IP length?

The reason I ask is because I'm worrying about interoperability aspects 
of UDP and (the infamous) UDP Lite.

Finally, I suspect that UDPs Length field is there to make the 
UDP header a multiple of 4 bytes.

Cheers, 

Mikael Degermark





More information about the end2end-interest mailing list