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

Re: [ns] Packet size?



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/>