## 4 Methodology
### TMR Routing Protocol  
RSU sends frequent information messages to all vehicles in its range, informing them about its MAC address. If the vehicle joins newly to the network and does not receive such a message promptly, it can solicit through sending ICMP messages. Normal and emergency messages are sent from vehicles to RSU, which in turn would be conveyed to other vehicles. TMR algorithm is used by RSU to send unicast normal messages to vehicles. Communication between RSU and OBU of vehicles is explained below:  
1. All vehicles present in the range of RSU send and receive messages that can be either emergency or normal messages such as vehicle accidents, fire alerts, car speed limits, snow alerts, etc. 2. Initially, OBU sends a message to the RSU using the TMR protocol with assigned priority based on the content in the message. If the message is an emergency, it is assigned 1; whereas, the normal message is assigned 0. 3. If the message is for an emergency case, RSU broadcasts to all vehicles, in its range, without any delay. 4. The normal message is pushed into the queue where it follows the FIFO mechanism. RSU sends these normal messages to vehicles in the network using TMR protocol in that RSU range. 5. Once the RSU receives a message from an OBU, it adds the sending vehicle ID (VID) to the certificate revocation list (CRL) if it does not exist. 6. As shown in Figure 2, RSU checks the routing table for the destination vehicle. If the routing table is empty, RSU broadcasts an RREQ message to all vehicles in that RSU range, and it contains a vehicle ID (VID) of the intended vehicle as being its destination address. 7. The intermediate vehicle OBU adds the VID in the RREQ message to its CRL list if it is not there. 8. If the intermediate vehicle OBU has a path to the destination, it returns RREP, and the RSU, in turn, would calculate the \(RTT_{ij}\). If there is no path, OBU will send other RREQ messages to other nodes. 9. \(RTT_{ij}\) is measured for every request in all the paths and is stored in an array. 10. The average RTT will be calculated using the following formula. \[RTT_{ia}=\sum_{i=0}^{n}\frac{RTT_{ij}}{n}\] where, \(i=\text{Number of a specific path}\) \(j=\text{Number of requests per path}\) \(n=\text{Total number of requests}\) \(a=\text{Average of RTT}\) 11. Instant round trip time (\(RTT_{ij}\)) is compared with a threshold value which is the average round trip time (\(RTT_{ia}\)). If \(RTT_{ij}\) is greater than the average \(RTT_{ia}\) then drop the route with that instant \(RTT_{ij}\). 12. If the instant \(RTT_{ij}\) is less than or equal to the average \(RTT_{ia}\), the instant \(RTT_{ij}\) route will be added into an array. Then the array is sorted in ascending order. Accordingly, the routing table will be updated using [PERSON]'s algorithm. 13. RSU sends the packet using the first minimum RTT path in the array and waits for the acknowledgment from the destination vehicle. 14. If the time out occurs before receiving an acknowledgment, TMR uses the next minimum RTT path to resend the data packets. 15. This loop performs till the packets are successfully delivered to the destination vehicle. Steps 1 to 4 are summarized in Algorithm 1. Steps 5 to 8 are summarized in Algorithm 2. Steps 9 to 15 are summarized in Algorithm 3.