ns user schrieb:
>  
>    i'm beginner with ns2.29, anr i'm trying  to calculate the number of 
> collisions (or packet loss rate) made on a  node in an ad hoc network.
>  
You need to enable MAC tracing. Then go through the generated trace file 
and lock for lines where packets are dropped because of a collision. 
This should look like:

d .............   COL ....................

To get the packet loss rate you should count send and received packets 
on the MAC or AGT layer that are not broadcast. The lines look like:

s  .......... MAC ...................
r  .......... MAC ...................

or

s  .......... AGT ...................
r  .......... AGT ...................

For broadcast packets (destination -1) you first need to define what a 
lost packet is.

You will find the exact format in the ns2 documentation (trace file format)

Daniel.

Reply via email to