Research Article

Neighboring and Connectivity-Aware Routing in VANETs

Algorithm 1

If (the network is fully connected)
{
Source sends RRBM using greedy forwarding
Destination receives RRBM and sends back RRM
Path is formed, Starts transmission
}
Else if (network is sparse)
{
Source sends RRBM using store-carry-and-forward
approach
   If (there is no vehicle)
{
If (current time − generation time > message lifetime)
  {Packet drops (most critical situation)}
Else
{keeps the packet}.
}
Destination receives RRBM and sends back RRM
Path is formed, Starts transmission
}
Else
}
Stops transmission
}