Skip to main content
. 2021 Dec 30;22(1):251. doi: 10.3390/s22010251
Algorithm 1: AODV Routing Protocol
1: Input Parameters:  N → The amount of deployed nodes (50)
2:    Coverage → Wireless communication range (25% of Network Area)
3: Output Parameters: Route → ‘S’ to ‘D’ Route
4: Initialize the variables
5: ‘S’: Corresponds to Source_Node; ‘D’: Respect to ‘Destination_Node
6: Nb-Add: Address of Nearby_Node; RREQ: Route request control message
7: RREP: Route reply control message; RP_Table: Maintain Reply Table
8: Start Routing
9:  Route = [] // Create an empty matrix to store Route Nodes
10: Route (1st Node) = S // Route 1st node is Source
11: While (D not founded) // Search Next Nodes in Route
12:  ‘S’ broadcast RREQ within Coverage Area
13:  If Nb-Add is ‘D’ then
14:   RREP acknowledge to the ‘S’
15:   D founded
16:   Route (Next) = D // Consider D as a next node in the route
17:  Else
18:   This broadcasting process is continued until ‘D’ is not founded
19:   Route (Next) = Neighbour node with a minimum hop count
20:  End—If
21: End—While
22: RP_Table = Route // Store in the Table
23: End—Function