|
Algorithm 3: The proposed modified protocols: AODV-M and DSR-M. |
for each node i
do
Node i turns on;
SEND HELLO packet;
RECEIVE ACK packet;
Detection testing algorithm (Algorithm 2);
if TRAFFIC packet then
if Node i does not have this route then
Route discovery
SEND RREQ packet;
RECEIVE RREP packet;
else
Route maintenance
SEND TRAFFIC packet;
end if
end if
if a CONTROL packet is received from Node j
then
REMOVE Node j from neighbor table;
else
DO nothing;
end if
if a route expires then
SEND RERR packet;
else
DO nothing;
end if
end for
|