I'd like to use static forwarding (manually configured routing table) for the current available MANETs routing protocols in NS-2 (like AODV) for just a simple topological scenario. Is it possible by modifying AODV files? Or some by other way?
1. Add a static routing table to aodv.h and popolate it manually in aodv.cc
2. Look for the the code in aodv.cc where a node actually forwading the received paket. That shoud be in "recv" fuction and it will look something like
forward((aodv_rt_entry*) 0, p, NO_DELAY);
3. The argumnet of the forward function "(aodv_rt_entry*)0" gives e pointer to the next hop.
You can comment this line and write you own something like this
forward(destination id from your routing table, p, NO_DELAY);
In summary you just have to change the next-hop id as per your routing table just before forwading the packet