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

Re: [ns] Urgent - Reg node id!!



>From the trace file, I believe you are aware that 
the third and the fourth field are the source and
the destination (precisely the two nodes) between
which the packet is currently flowing through.

If you are only interested in identifying the two
nodes through which the packet is currently between
in c++, you can always get the values of the
src_ and the dst_ which are the Trace class variables
and are set when the Tracing between these two nodes
are enabled (in the create-trace subroutine).  To
find out how Trace stores these two, look at
create-trace routine in ns-lib.tcl.


Sowmya.



On Sun, 22 Jul 2001, Archana Krishna wrote:

> 
> Hi Sowmya,
> Can you please be more clear. I actually tried reading this document, but
> didnt get enough info. 
> 
> I need to know the nodeid during runtime.....i.e. between which two nodes
> is the packet currently present just like how the trace function gets to
> know....
> 
> can you please let me know....
> Thanks for your help,
> Archana
> 
> On Sun, 22 Jul 2001, Sowmya Manjanatha wrote:
> 
> > 
> > 
> > check the trace format at
> > 
> > http://www.isi.edu/nsnam/ns/doc/node232.html
> > 
> > 
> > Sowmya.
> > 
> > 
> > On Sat, 21 Jul 2001, Archana Krishna wrote:
> > 
> > > Hi all,
> > > 
> > > Can somebody please try to answer this question.
> > > 
> > > I have the following topology
> > > 
> > >  node0 ---- node1 ---- node2 ---- node3
> > > 
> > > HOw can I get the nodeid in c++. As the packet flows from the source to
> > > the destination, I would like to know which node is servicing it, i.e. get
> > > the nodeid like how the trace.cc does. I tried looking into trace.cc but I
> > > am not able to understand how the trace function knows currently the
> > > packet is between which two nodes.
> > > 
> > > I am not able to proceed with my work. can someone please tell me how to
> > > get the nodeid from the c++ code at run time. I cannot use the trace file
> > > in my code, so that option is ruled out. I have to therefore determine
> > > between which two nodes the packet is currently present.
> > > 
> > > Please someone try to answer my question.
> > > I will greatly appreciate your help.
> > > 
> > > Thanks,
> > > Archana
> > > 
> > > 
> > 
> > 
> 
>