# Context-Aware Data Dissemination for ICN-Based Vehicular Ad Hoc Networks
## 3 Context-Aware Packet Forwarding
### Data Processing and Forwarding Control at Vehicular Nodes  
Figure 9 shows the processing of the Interest packet at a vehicular node. When a node gets an Interest packet, it will first extract the Name, Nonce, Current_position, and Previous_position from the Interest and check if there is already an entry for the Interest in the DFT. If yes, which means the Interest requesting the same content has been received earlier (i.e., the Interest has not been forwarded, but the timer is still running), it will check if the Interest it received earlier should be suppressed by comparing the direction similarity angle \(\alpha_{F}\) and the suppression angle \(\alpha_{SA}\). If \(\alpha_{F}<\alpha_{SA}\), which means the current node is in the direction similar enough to the node from which the current Interest is received towards the content holder, the current receiving Interest will be discarded and the entry kept in the DFT should be deleted, since in this direction the Interest requesting the same content has already been forwarded and there is no need to forward it again. Otherwise, if \(\alpha_{F}>\alpha_{SA}\), which means the current node is not in the similar direction as the node that forwarded the Interest packet earlier, the Interest packet received earlier (i.e., for the first time) will be forwarded when the timer expires.  
Figure 8: Format of Hello and Response packet.  
If no entry in the DFT is found, which means the Interest packet is being received for the first time, the node will check if it has the requested data in its CS and, if yes, will respond with the Data packet. If not, it will check if the Interest requesting the same content has already been forwarded in the PIT. If yes, it will further check if the Interest was sent from the same source through the Nonce, the unique message ID. If the Nonce does not match with the Interest in the PIT, which means the current Interest came from another source node, the position information of the node from which it received the Interest will be recorded in the PIT, so that the corresponding Data packet can be returned along the same path. If no entry about the Interest in PIT is found, the node will register the Interest in its DFT by starting a timer based on the calculation of the distance from the previous node.  
The forwarding control of the Data packet is shown in Figure 10. When a node receives a Data packet, it will cache it according to its caching strategy and then check if the Data packet has been requested from it through the corresponding Interest packet in the PIT table. If yes and the Previous_position registered in the PIT entry is not empty, it will set the Next_position field of the Data packet to the value of Previous_position recorded in the PIT and forward the Data packet, deleting the corresponding entry. If the Previous_position is empty, it means the current node is the node requesting the data, no further forwarding processing will happen (the received Data packet will be delivered to the applications). If there is no entry in the PIT table, the data request has not been sent or forwarded by the node. In this case, the node will calculate the distance between it and the destination node carried in the Data packet (i.e., in the Next_position field). If it is shorter than a threshold value \(D\) (which can be tuned by the data response time and radio transmission range), this means the node is not far away from the destination, in other words, the deviation may be caused by the movement of the vehicles. In this case, the node will forward the Data packet instead of discarding it, which not only increases the possibility of successful data delivery but also reduces the number of nodes broadcasting the Data packets.  
Figure 9: Forwarding control of Interest packet.