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

Re: [ns] tracing colliding packets on aloha (fwd)



resending after the first-time-author bounce...

Mark,

If you haven't already figured out how to get the trace elements 
that you want, the below may help.

What is being traced is the enque and deque operation of all ground 
terminal node queues, and the packets successfully received at all 
terminals (i.e., every node in the simulation except the satellite
repeater).  Figure 16.6 of the documentation shows where these trace 
objects are inserted, and the relevant OTcl code can be found in 
tcl/lib/ns-sat.tcl.  

In the function UnslottedAlohaMac::sendUp() of satlink.cc, if there
is a collision, the affected packets will be dropped in the Mac layer.
Similarly, if the packet is not destined to a particular node, the Mac
layer will throw it away and it won't get traced.    

What I would recommend doing is creating a new Trace/Sat/Collision
object (maybe using character "c").  However, you can't simply make it
a drop target of the Mac, because then you will be tracing all packets that
each node's Mac drops (including those that simply were addressed to a 
different node).  Instead of drop target, you may want to define
in C++ something like "collision target" that is similar to drop target
(with a function collision() that looks alot like Connector::drop() ).
Then assign the collision trace object to a pointer "collision_" in the
Mac layer, and put some code around the place in sendUp() where
a collision is detected that will send the packet to collision() instead
of drop() only if it in fact was a true collision and the destination 
address matches the "index_" of the node.

hth,
Tom


> >> Date: Thu, 26 Apr 2001 11:35:42
> >> From: Mark Elsegood <[email protected]>
> >> To: [email protected]
> >> Subject: [ns] tracing colliding packets on aloha
> >> 
> >> 
> >> >
> >> >hi ns -users
> >> >
> >> >im using the generic sat-aloha.tcl script located in the ns-2.1`b7a/tcl/?
> >>  directory
> >> >
> >> >when simulated the trace file produced is similar to below
> >> >withe the extra long/lat pos cordinates appended to the end of eahc line
> >> >
> >> >+ 1 3 0 cbr 210 ------- 0 3.0 4.0 0 0
> >> >- 1 3 0 cbr 210 ------- 0 3.0 4.0 0 0
> >> >r 1.120889 3 0 cbr 210 ------- 0 3.0 4.0 0 0
> >> >+ 1.120889 0 1 cbr 210 ------- 0 3.0 4.0 0 0
> >> >- 1.120889 0 1 cbr 210 ------- 0 3.0 4.0 0 0
> >> >r 1.364484 0 1 cbr 210 ------- 0 3.0 4.0 0 0
> >> >+ 1.364484 1 4 cbr 210 ------- 0 3.0 4.0 0 0
> >> >- 1.364484 1 4 cbr 210 ------- 0 3.0 4.0 0 0
> >> >r 1.485373 1 4 cbr 210 ------- 0 3.0 4.0 0 0
> >> >
> >> >how am i to determine the throughput of the sat-network?
> >> >for this is need to trace the total sat connections made (including
> >> packets collided).  the above trace
> >> >doesnt seem to tell me this (it only seems to show connections from which
> >> packets are recieved "r".
> >> >
> >> >i would much appreciate your help
> >> >
> >> >regards
> >> >mark