Sunday 2 November 2014

Steps to create my own packets in aodv ns2 ?

Create your own packet :

           >  In aodv, sometimes we need to get/pass our own information  to neighbors.  Like RouteRequest( RREQ ), RouteReply( RREP ) , we can easily get/pass our own information.
           >  e.g  
                       i)   CH may wants to know the trust value of its neighbors.
                       ii)  Passing Voting information.
           >  We need to modify four files
                        i)   aodv-packet.h , where you will define your own packet structure.
                        ii)  aodv.cc , where you will define your own function. We need two receive function for  receiving request and reply. Also, we need two other functions to send request and reply.
                       iii)  In aodv.h , include the function declaration.     
                       iv)  In ns-2.35/trace/cmu-trace.cc , We need to add tracing information otherwise, we will get a "invalid AODV packet type" error.

how to add tracing information of new packet into cmu-trace.cc. Can u give an example.
Give it a try, this is the place where you will add new packets tracing info...
void
CMUTrace::format_aodv(Packet *p, int offset)
{
}
hope, it helps. If you really need an example, leav a comment

No comments:

Post a Comment