Packet Dropping in Aodv
by Anduamlak from LinuxQuestions.org on (#5DW8M)
Dears,
I have modified the AODV recv function as below to drop data packets when malicious node is participated in the routing process and it's working well while running the Awk script but my question is in the #nam file that node number 2 is not showing the packet dropping while simulating, so what will* be the case for this issue?
void
AODV::recv(Packet *p, Handler*) {
if(malicuous== true)
{
if( (index==2)* && (ch->ptype()== PT_CBR))
{
drop(p, DROP_RTR_ROUTE_LOOP);
return;
}
}


I have modified the AODV recv function as below to drop data packets when malicious node is participated in the routing process and it's working well while running the Awk script but my question is in the #nam file that node number 2 is not showing the packet dropping while simulating, so what will* be the case for this issue?
void
AODV::recv(Packet *p, Handler*) {
if(malicuous== true)
{
if( (index==2)* && (ch->ptype()== PT_CBR))
{
drop(p, DROP_RTR_ROUTE_LOOP);
return;
}
}