12.07.2015 Views

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

The ns Manual (formerly ns Notes and Documentation)1 - NM Lab at ...

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

dst_portaddr,seqno,flags,sname);A nam trace file has a basic form<strong>at</strong> to it. Each line is a nam event. <strong>The</strong> first character on the line defines the type of event <strong>and</strong>is followed by several flags to set optio<strong>ns</strong> on th<strong>at</strong> event. Each event is termin<strong>at</strong>ed by a newline character. -t ...Depending on the event type, there are different flags following the time flag.<strong>The</strong>re are 2 sectio<strong>ns</strong> in th<strong>at</strong> file, st<strong>at</strong>ic intial configur<strong>at</strong>ion events <strong>and</strong> anim<strong>at</strong>ion events. All events with -t * in them areconfigur<strong>at</strong>ion events <strong>and</strong> should be <strong>at</strong> the beginning of the file. One thing to note is th<strong>at</strong> nam can also be fed the trace file froma stream which enables it to be used with realtime applic<strong>at</strong>io<strong>ns</strong>. See the section Using Streams with Realtime Applic<strong>at</strong>io<strong>ns</strong>for more inform<strong>at</strong>ion.Following we describe nam trace file form<strong>at</strong> for different classes events <strong>and</strong> anim<strong>at</strong>ion objects.46.1.1 Initializ<strong>at</strong>ion Events<strong>The</strong> first section of a trace file must contain initializ<strong>at</strong>ion inform<strong>at</strong>ion. All initializ<strong>at</strong>ion events will have the flag -t *. Thistells nam th<strong>at</strong> this event needs to be parsed before any anim<strong>at</strong>ion has started.Version <strong>The</strong> following line define the nam version as required to visualize the given trace:V -t -v -a Normally there is only one version string in a given tracefile, <strong>and</strong> it is usually the first line of the file. An example is thefollowing:V -t * -v 1.0a5 -a 0<strong>The</strong> flag -v 1.0a5 tells nam th<strong>at</strong> this script requires a version of nam > 1.0a5. For more inform<strong>at</strong>ion on this eventlook <strong>at</strong> the file tcl/st<strong>at</strong>s.tcl under the procedure nam_analysis.Wireless If you want to use wireless nodes in nam you need the wireless intializ<strong>at</strong>ion event.W -t * -x 600 -y 600This gives nam the size of the layout for the wireless world. <strong>The</strong> -x value is the width <strong>and</strong> -y is height. For moreinform<strong>at</strong>ion look <strong>at</strong> the file anim<strong>at</strong>or.tcl in the procedure infer-network-model.Hierarchy Hierarchical address inform<strong>at</strong>ion is defined by:A -t -n -o -c -a -h -m -s This trace gives the details of hierarchy, if hierarchical addressing is being used for simul<strong>at</strong>ion. Flag -n indic<strong>at</strong>e the total number of hierarchical tiers, which is 1 for fl<strong>at</strong> addressing, 2 for a 2-level hierarchy etc. Flag -o denotes the total number of bits used for addressing. Flag -h specifiesthe level of the address hierarchy. Flag -m <strong>and</strong> -s describes the address mask <strong>and</strong> the bit shiftof a given level in the address hierarchy, respectively. Here is an example of a trace for topology with 3 level hierachy:396

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!