Step 1: Intiate_DummyTransact ( ) |
{ Step 1.1: Source Node broadcasts Dummy RREQ with fake Destination Address and |
Destination Sequence Number using Send_Dummy_RREQ ( ) function. |
Step 1.2: if (RREP = = received) |
Mark corresponding node as Malicious Node. |
Propagate this malicious node ID to other nodes in a network. |
} |
Step 2: Route Discovery Initiated by Source Node. |
Step 3: Route Establishment by considering trust values of nodes. |
Step 4: Packet Transmission from Source Node to Destination |
for each node on the existing route do |
Check Trust value (trust_val), Congestion status and Available energy level |
If ((trust_val>0.6) andand (QS = = 0) andand (Avail_Pow > Thresh_Pow)) |
{ |
Send DREQ to the next node in routing table and wait for DREP |
if (DREP = = received) |
Send data packets to the next node and wait for DR (Data Received) packet |
if (DR = = received) |
Mark node as trusted. |
Update and propagate trust value of node. |
} |
else if ((turst_val>0.6) |
{ |
if ((QS = = 1) || (Avail_Pow ≤ Thresh_energy)) |
{ |
Select Alternate route from cache for forwarding the packets. |
goto Step 4. |
} |
else if (trust_val<0.6) |
{ |
Marks node as malicious and remove from the routing table. |
Select alternate route if available, Otherwise |
goto Step 2. |
} |
else |
re-establish route using step 2 and repeat the process. |
} |