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

Re: [ns] Packet size?



 From what I ran just now, it looks like it gives me just the data size 
which is just what I want.  I calculate the headers separately since I'm 
using custom C++ code for the replication.  Thanks again

At 10:06 PM 5/11/2001 +0100, Lloyd Wood wrote:
>On Fri, 11 May 2001, Nicolas Christin wrote:
>
> > On Fri, 11 May 2001, Nicolas Christin wrote:
> >
> > > hdr_cmn* cm_h = hdr_cmn::access(p); // access the common header of p
> > > int mySize = cm_h->size(); // in bytes
> >
> >       Oops, I forgot to mention that this method gives the total packet
> > size, so you'll have to subtract the header(s) size to get the size of the
> > payload.
>
>Rather hard to justify doing that subtraction when ns doesn't simulate
>header size (unless you're using FullTcp). If you adjust for header
>size here, you might end up having to adjust for header size in a lot
>of other places.
>
>L.
>
><[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>