Hi all,

Can anybody tell how to obtain the coordinates of the node movements from
nam.

On Sun, Jan 22, 2012 at 4:28 AM, shoaib saleem <shoaib.sal...@it-sudparis.eu
> wrote:

>
> Hi again ,
>
> ok what you can do is that the code which i wrote earlier , you can modify
> it a bit as follow
>
> *1. include Packet *p in the following function in aodv.h*
>
> void  rt_print(nsaddr_t node_id, Packet *p);
>
> *2.  In  aodv.cc   , in  **void  AODV::rt_print(nsaddr_t id, Packet* p ) *
>    include the following structure
>
> struct hdr_cmn *ch = HDR_CMN(p);
>
> *include ch ->ptype() in the following line *
>
> fprintf (dumpFile, " NODE: %it %.4lft %it %it %it %it %it %.4lft %d \n",
>             id, CURRENT_TIME, rt->rt_dst, rt->rt_nexthop, rt->rt_hops,
> rt->rt_seqno, rt->rt_expire, rt->rt_flags,*ch->ptype()*);
>
> *3.  Put    rt_print(index,p);    after the following lines in aodv.cc*
>
> if (ch->ptype() != PT_TCP && ch->ptype() != PT_ACK) {
> ch->size() += IP_HDR_LEN;
>
> }
> * rt_print(index,p);*
> *
> *
> *
> *
> *
> *
> *4.  Now make clean , make , sudo make install *
> *
> *
> *run your tcl script. you will have a rtable.txt file  with the following
> information. In ns-2.xx/common/packet.h file you have all types of packet
> defined in ns 2. Like for example, *
> *PT_TCP = 0 , PT_ AODV = 38 , PT_ACK = 5 . In rtable.txt , you have info
> about each node like in the first line , we have Node 0, sending 1st (1)
> PT_TCP packet = 0 at 13 sec .  Similary there two other packets PT_AODV =
> 38 and PT_ACK = 5 . *
>
>  NODE: 0  t 13.0000t 1t 0t 255t 0t 0t 0.0000t 0 n
>
>  NODE: 0   t 19.0000t 1t 0t 255t 0t 0t 0.0000t 0 n
>
>  NODE: 2   t 28.0059t 0t 0t 1t 14t 1t 38.0059t 38 n
>
>  NODE: 0   t 31.0000t 2t 2t 1t 6t 1t 34.0012t 0 n
>  NODE: 0   t 31.0000t 1t 0t 255t 0t 0t 0.0000t 0 n
>
>  NODE: 0   t 34.5030t 2t 2t 1t 10t 1t 44.5030t 38 n
>  NODE: 0   t 34.5030t 1t 0t 255t 0t 0t 0.0000t 38 n
>
>  NODE: 0   t 39.0149t 2t 2t 1t 10t 1t 44.5030t 38 n
>  NODE: 0   t 39.0149t 1t 2t 2t 6t 1t 49.0149t 38 n
>
> ..........................................................................
> ..........................................................................
> ..........................................................................
> ..........................................................................
> ..........................................................................
> ..........................................................................
> ..........................................................................
>  NODE: 1t 149.9275t 0t 0t 1t 48t 1t 159.9153t 5
>  NODE: 0t 149.9293t 2t 2t 1t 60t 1t 150.5402t 0
>  NODE: 0t 149.9293t 1t 1t 1t 34t 1t 159.9172t 0
>  NODE: 0t 149.9315t 2t 2t 1t 60t 1t 150.5402t 0
>  NODE: 0t 149.9315t 1t 1t 1t 34t 1t 159.9293t 0
>  NODE: 1t 149.9414t 2t 0t 2t 60t 1t 150.5243t 5
>  NODE: 1t 149.9414t 0t 0t 1t 48t 1t 159.9275t 5
>  NODE: 1t 149.9513t 2t 0t 2t 60t 1t 150.5243t 5
>  NODE: 1t 149.9513t 0t 0t 1t 48t 1t 159.9414t 5
>  NODE: 1t 149.9614t 2t 0t 2t 60t 1t 150.5243t 5
>  NODE: 1t 149.9614t 0t 0t 1t 48t 1t 159.9513t 5
>  NODE: 0t 149.9632t 2t 2t 1t 60t 1t 150.5402t 0
>
> I hope this will help you a little to understand your problem
>
> Regards
> ---------- Forwarded message ----------
> From: Fatima Kader <kader.el...@gmail.com>
> Date: Sat, Jan 21, 2012 at 9:18 PM
> Subject:
> To: shoaib saleem <shoaib.sal...@it-sudparis.eu>
>
>
> ok sir, i have understand you, but i need all this information for another
> pupose, so i want each node calculate the number of data received from
> another node, and count another packet also, that's why i want to define an
> activity table independant and maintained by each node
> thanks in advance
>
>
>
> --
> [image: http://www.etudinfo.com/image/logo-ecole/telecom-sudparis.jpg]
> Muhammad Shoaib SALEEM
> PhD Student
> Wireless Networks & Multimedia Services Department
> Institut Télécom - Télécom SudParis
> 9 Rue Charles Fourier 91011 Evry, France.
> Office: +33 1 60 76 43 91
> https://sites.google.com/site/shoaibsal/
>
> <https://sites.google.com/site/shoaibsal/>
>

Reply via email to