I am simulating a Flying Ad Hoc Network using aodv routing protocol. I want to get the list of neighbor's node to send random numbers to these neighbors. I found this code in google omnet++ forum :
#include "IRoutingTable.h"
#include "RoutingTableAccess.h"
vector<IPAddress> neigh;
IRoutingTable *inet_rt = RoutingTableAccess().get();
neigh.clear();
for (int i=0;i<inet_rt->getNumRoutes(); ++i)
{
const IPRoute *e = inet_rt->getRoute(i);
if (e->getMetric()==1)
{
neigh.push_back(e->getHost());
}
}
But when i try to use it, i can't find the file "RoutingTableAccess.h" in the inet directory? Is there any other method to get the list of neighbors in Mobile Ad hod Network using aodv?
Many Thanks.