I don't have clear what do you want, you can access to the last know sequence number using the routing table, it is an attribute of the routing entries
}
entrada_routing is a NULL pointer. But the other strange part is that it is entering the loop,
if (entrada_routing != nullptr)
rt->deleteRoute(entrada_routing);
{
e->setDestination(src);
e->setNetmask(netmask);
e->setGateway(next);
e->setInterface(interface80211ptr);
e->setSourceType(IRoute::MANET);
e->setMetric(numHops);
e->setSequencenumber(msgsequencenumber);
e->setExpiryTime(simTime()+routeLifetime);
}
How can it enter the loop if the condition is false?Is there something wrong that I am doing?
Hello Sir,
I have written a method which collects these values and stores them. and later this method is called through a scheduler after every second to check these values. I have managed to get these values. However, I am trying to schedule this event for only 10 Nodes from a total of 30 nodes in my network. I am trying to do this with the help of the ini file. For example, in the ini file, I have set
**.host[5-15].manetrouting.myevent = true.
In the DSDV.cc file, in the initialize stage, I read this boolean value and schedule an event like this:
if(par ("myevent").boolvalue())
{
myEvent = new cMessage("myEvent");
simtime_t eventTime = par ("eventTime")
scheduleAt(simTime()+eventTime, myEvent);
}
However, when I check the GUI during simulation, myEvent has been scheduled for all the 30 nodes. I want this event("myEvent") to be scheduled for only 10 nodes. What am I doing wrong here?
Thanks and Regards.
On Monday, May 15, 2017 at 12:58 PM UTC+2, Hazard wrote:
I don’t understand, all the conditions that are in the check are already in the default code,
if (_entrada_routing == nullptr
|| (_entrada_routing != nullptr && _entrada_routing->getNetmask() != IPv4Address::ALLONES_ADDRESS)
|| (entrada_routing != nullptr && (msgsequencenumber>(entrada_routing->getSequencenumber()) || (msgsequencenumber == (entrada_routing->getSequencenumber()) && numHops < (entrada_routing->getMetric())))))
Also, you need to check the condition of equal number of sequence
neighbourHello -> setSequencenumber(sequencenumber);
neighbourHello -> setNextIPAddress(source); → current nodes IP address
neighbourHello -> setHopdistance(1);
sendDelayed(neighbourHello, waitTime, "ipOut");
after this check, the entrada_routing pointer check the information about the "src" field in the received Hello message. I hope this will make it clear what I am trying to do.
Thanks and Regards.