Dear all,
I am working with ns-2 2.31, I have added the multi-interface capability
according to Multi-interface support howto, by Ramon Aguero
I have modified the routing agent (I have worked with AODV) to support
broadcasting packets on all interfaces as follows:
if(nIfaces) {
for(int i = 0; i < nIfaces; i++){
Packet *p_copy = p->copy();
Scheduler::instance().schedule(targetlist[i], p_copy, 0.);
}
Packet::free(p);
}
when I run my simulation scenario ( which is a static grid topology of 20
wireless nodes)
I got the error of:
"Scheduler: Event uid is not valid" at time 67 sec of the simulation time.
I have searched the mailing list and the available sources about this error,
I have fixed all MAC bugs (most of them are already fixed in the ns
distribution), then I have found a FAQ in which the following is stated:
"2. You are dealing with packets. A packet is also a kind of event to be
scheduled and a UID is associated with it. When you create a copy or alloc
again before freeing it, due to the same packet with a positive UID, it cannot
be scheduled again. "
So, I gussed that the error is in copying the packet to be sent on all
interfaces (in the modifed code presented above). So, I have modifed that code
as follows to free the copies of the packet:
if(nIfaces) {
for(int i = 0; i < nIfaces; i++){
Packet *p_copy = p->copy();
Scheduler::instance().schedule(targetlist[i], p_copy, 0.);
Packet::free(p_copy);
}
Packet::free(p);
}
but when I run my simulation scenario I got:
" segmentation fault 'core dumped'"
I am sure that the error is in the routing agent module, since I have run
simulation scenarios without the modified AODV and it worked, but I cannot
congifure where the bug is.
Is there anybody have worked in multi-interface support for AODV? have you
faced such problem in your testing?
any useful comments and hints will be highly apreciated.
Thanx,
Ghada
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news,
photos & more.