Hello Fernando

I am telling you the flow of AODV Protocol. It may be useful to you.

1. In the TCL script one call the "start" and this start cause the pointer
to come to the Command Function of AODV Protocol.
2. Then you can see in the Command of "start", you find two timers
    * btimer.handle((Event*) 0);
    * htimer.handle((Event*) 0);
3. Lets take the case of htimer.
4. Now the flow points to HelloTimer::handle(Event*) Function and you can
see in this fucntion, we are calling
    agent->sendHello();

   double interval = MinHelloInterval +
                 ((MaxHelloInterval - MinHelloInterval) *
Random::uniform());
   assert(interval >= 0);
   Scheduler::instance().schedule(this, &intr, interval);
5. And now you are in AODV::sendHello() Funciton and you can see
Scheduler::instance().schedule(target_, p, 0.0); which will cause the packet
to send.
6. Now the packet has sent and now the flows comes to the AODV::recv(Packet
*p, Handler*) Function.
7. This will call recvAODV(p); Function.
8. Now the flow is in AODV::recvAODV(Packet *p) Function, which will check
different packets types and based upon that call the relevant function.
9. In our case, flow will go to
case AODVTYPE_HELLO:
   recvHello(p);
   break;
10. Now we will be in recvHello() Function and in this way a packet is
received.

Hope now you understand the flow of AODV Protocol.

Regards

-- 
Mubashir Husain Rehmani

Mobile : 00 33 (0)6 32 00 89 35

Reply via email to