TCP packetSize and Applications
Mon, 13 Sep 1999 13:42:21 -0700
On Thu, 09 Sep 1999 13:26:08 +0200, Anton Riedl wrote:
>I have the following two questions about ns-2.1b5:
>Is it possible to send TCP packets which are smaller than packetSize_ ?
>Although my application does a "sendmsg(n)" with n<packetSize_ , the
>tracefile still shows that the TCP packet is of size packetSize_ . The
>same is true when I do a "$tcp1 send n" in the script file.
>Do I have to set a certain parameter?
The one way tcps only send packetSize_ packets, except for the option
that sends a 40B first packet. (Internally one-way tcp rounds sendmsg
requests up to the nearest full packet.)
Two-way TCP should send variable-length packets.
>I checked the tcp source code (in tcp.cc) and it looks like tcp always
>sends packets with size_ = packetSize_ . UDP sources, however, do it
>differently. Is there a reason for that?
The intent is that one-way tcp be very simple.
>Is there a way (or which would be the best way to implement it) to feed
>the output of an application into two agents simultaneously? Are there
>applications that can be attached to several agents?
Some existing applications (like some of the web traffic emulators)
have a web application which drives parallel tcp agents.
Just do it :-).