could you pleeeease help me with your code?
i need to implement in inet the highlight part as follow in aodvrouting.cc
void AODVRouting::handleHelloMessage(AODVRREP *helloMessage)
{
const IPv4Address& helloOriginatorAddr = helloMessage->getDestAddr();
IPv4Route *routeHelloOriginator = routingTable->findBestMatchingRoute(helloOriginatorAddr);
// Whenever a node receives a Hello message from a neighbor, the node
// SHOULD make sure that it has an active route to the neighbor, and
// create one if necessary. If a route already exists, then the
// Lifetime for the route should be increased, if necessary, to be at
// least ALLOWED_HELLO_LOSS * HELLO_INTERVAL. The route to the
// neighbor, if it exists, MUST subsequently contain the latest
// Destination Sequence Number from the Hello message. The current node
// can now begin using this route to forward data packets. Routes that
// are created by hello messages and not used by any other active routes
// will have empty precursor lists and would not trigger a RERR message
// if the neighbor moves away and a neighbor timeout occurs.
unsigned int latestDestSeqNum = helloMessage->getDestSeqNum();
simtime_t newLifeTime = simTime() + allowedHelloLoss * helloInterval;
if (!routeHelloOriginator || routeHelloOriginator->getSource() != this)
createRoute(helloOriginatorAddr, helloOriginatorAddr, 1, true, latestDestSeqNum, true, newLifeTime);
else {
AODVRouteData *routeData = check_and_cast<AODVRouteData *>(routeHelloOriginator->getProtocolData());
simtime_t lifeTime = routeData->getLifeTime();
updateRoutingTable(routeHelloOriginator, helloOriginatorAddr, 1, true, latestDestSeqNum, true, std::max(lifeTime, newLifeTime));
}
// TODO: This feature has not implemented yet.
// A node MAY determine connectivity by listening for packets from its
// set of neighbors. If, within the past DELETE_PERIOD, it has received
// a Hello message from a neighbor, and then for that neighbor does not
// receive any packets (Hello messages or otherwise) for more than
// ALLOWED_HELLO_LOSS * HELLO_INTERVAL milliseconds, the node SHOULD
// assume that the link to this neighbor is currently lost. When this
// happens, the node SHOULD proceed as in Section 6.11.
}