begin quoting [EMAIL PROTECTED] as of Fri, Nov 18, 2005 at 12:10:41PM -0800:
> > the TCP stack just does a sizeof(buf) to find out how much data it has
> > to play with with this one packet (or the fucntion call to enter the
> > stack is tcp(buf,count), I don't know without looking)
>
> If it was that easy then how come UDP couldn't do the same thing?
> How come UDP needs an explicit field then?
It probably seemed like a good idea at the time. :)
You're looking for a rationale document. I haven't found one yet.
It probably has to do with the next layer up -- with UDP, the size of
the datagram would be important. With TCP, it's meaningless (to that
layer).
[snip]
> Did you read this part? I've been wondering about this for a while.
> Seems IP pseudoheader breaks encapsulation.
It's allowed to have coupling[1] between layers. It's just a bad idea to
couple *across* layers.
-Stewart "{TCP/UDP}/IP is not a *clean* system -- it just works" Stremler
[1] Which should still be minimized, nevertheless.
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list