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

Re: [ns] Addressing structure



On Thu, 12 Apr 2001, Theo Pagtzis wrote:

> > >    I would like to ask the list about the reasoning of having an address
> > > of 16 bits in the default addressing. This is only 8 bits for the node
> > > id
> >
> > Where did you read that? Expanded addressing has been the default for
> > some time.
> 
> Page 130 chapter 15

Ouch. Keeping docs uptodate is a problem...

> > > What if you want to measure overheads for headers?
> >
> > First, you would have to simulate headers.
> 
> so headers are not simulated? so what sort of packet structure does one
> create for a simulation ?? an arbitary one?

Some of the overhead of simulation comes from having unused fields in
each packet, placed there in case you use a protocol that uses them -
see packet.h. (Haobo recently added a way of stripping out unused
headers for better memory overhead and speed. Really, I think you
ought to have derived packet classes with multiple inheritance,
replacing the per-packet field overhead with the unwieldy complexity
of C++ and basically moving the simulation overhead somewhere else a 
bit less obvious.)

But this is a virtual way of storing the information the simulation
needs to work on any packet; the space that that information would
actually need in a real packet is not simulated. 

We don't have an 'overhead' struct that keeps count of all the structs
used and the space they'd take up. Things like one-way TCP - where
headers are neglected entirely and packetSize_ equates to segment
size, which is more-or-less fine for large serial packets, but... show
this deficiency quite well.

header overhead computation is basically at the mercy of whatever
decides to tweak the payload size field to add some header overhead.
If they don't bother, header overhead isn't included.

Considering such overheads wasn't in ns's original design goals. Now
ns is being used in simulation of multiple layers (especially in
wireless), it's becoming more important.

L.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>