|
Algorithm 4: The proposed modified protocol: MPH-M. |
for each node i
do
Node i turns on;
;
SEND HELLO packet;
RECEIVE ACK packet;
Detection testing algorithm (Algorithm 2);
if
then
if Node i does not have this route then
Route discovery;
SEND HELLO packet;
RECEIVE ACK packet;
else
DO nothing;
end if
end if
if TRAFFIC packet then
if Node i does not have this route then
SEND TRAFFIC packet to its parents;
else
SEND TRAFFIC packet to specific parent;
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
;
end for
|