Research Article

A Secure 3-Way Routing Protocols for Intermittently Connected Mobile Ad Hoc Networks

Algorithm 3

Pseudocode for Ant routing in A-LA.
Ant in sleep mode
 PH = 0;
Generate packet at node A
Random mode()
//node move in random manner in search of another node to deliver the data packet
do
 Relay Ant()
 //chose the relay node by using gossiping technique
 Trail()
  PH += 1;
Until destined node is reached
if Relay Ant is inactive
for every  sec
 PH ;
if
node is ahead of transmission