Many people doing project on AODV modification, but most of them have trouble in doing the same. The best way to modify aodv is to study aodv.cc and aodv.h well before starting your work. So here we are going to provide some help to modify AODV protocol.
First of all you have to study the function of each timer in aodv.cc; for that put a printf message inside each function of aodv.cc separately and then you can see how many times each function calls while executing a simple aodv program.Step 1: open /ns-allinone-2.35/ns-2.35/aodv directory
Step 2: open aodv.cc file and add the commands which is shown in yellow outline.
void
HelloTimer::handle(Event*) {
// Begin ns2blogger.blogspot.in
printf("DEBUG TEST TEST \n");
// End ns2blogger.blogspot.in
agent->sendHello();
double interval = MinHelloInterval +
((MaxHelloInterval - MinHelloInterval) * Random::uniform());
assert(interval >= 0);
Scheduler::instance().schedule(this, &intr, interval);
}
Step 3: Save the aodv.cc file and open the terminal and execute these commands.
make clean
make
sudo make install
Step 4: Change directory and run any aodv program. You can see how many times the function 'HellowTimer::handle(Event*)' was called in this program.
For more details on aodv, click here to download pdf.
Comments
Post a Comment