[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TCP packetSize



Is packetSize_ the parameter for the *maximum* size of TCP packets or for the size of *every* packet? What if the
application has only a few bytes to send (n<packetSize_)?

In my case, I have set packetSize_ to 1500. When my application sends 250 Bytes of data, it still results in a TCP packet
with size 1500 (and not just 250). How can I make TCP send packets smaller than packetSize_?

- Anton


> > I have the following two questions about ns-2.1b5:
> >
> > 1.)
> > 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?
> packetSize is the parameter: $source set packetSize_ $value
> depending on your version of ns, maybe you should use packet_size_
> >
> > 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?
> >

------------------------------------------------------------------------
Anton Riedl

Lehrstuhl fuer Kommunikationsnetze
TU Muenchen, Arcisstr. 21, D-80290 Muenchen
Tel:   ++49 89 289-23506
Email: [email protected]
WWW:   http://www.lkn.e-technik.tu-muenchen.de/~anton
------------------------------------------------------------------------