PDA

View Full Version : [ubuntu_studio] Network Simulator 2 (ns 2.34) Simulating a blackhole



silentcoder89
October 20th, 2010, 04:28 PM
I'm trying to create a manual transmission of RREP packet to simulate a blackhole.
the following is how i do it :

if(rtable.rt_lookup(IP_BROADCAST)==0){
rtable.rt_add(IP_BROADCAST);
}
sendReply(IP_BROADCAST, 1, index, 1000, MY_ROUTE_TIMEOUT, CURRENT_TIME);
rtable.rt_delete(IP_BROADCAST);

however the simulation fails with message :

ns: scheduler going backwards from .... to ....

i have suspected the incorrect argument value was CURRENT_TIME. But what else should i replace
into it?

or did i used an incorrect approach?
Please help. I'm really stuck in here.

Any help is appreciated.
Thanks in advance.

silentcoder89
October 21st, 2010, 01:38 PM
Never mind. I found the cause -- i have to schedule the sendReply() function using TimerHandler.