# Context-Aware Data Dissemination for ICN-Based Vehicular Ad Hoc Networks
## 3 Context-Aware Packet Forwarding
### Distance-Based Forwarding Control
Therefore, we calculate the deferral time as follows:  
\[t_{b}=\frac{T_{m}}{D_{m}^{2}}d^{2}-\frac{2T_{m}}{D_{m}}\cdot d+T_{m}\quad\text {when the density }\rho\geq\text{ds} \tag{1}\]  
\[t_{b}=-\frac{c}{D_{m}}\cdot d+T_{m}\quad\text{when the density }\rho<\text{ds} \tag{2}\]  
\[T_{m}=m-20/p \tag{3}\]  
here, \(d\) is the distance between the current node receiving a packet and the previous node sending the packet, which can be calculated according to the geo-position carried in the packet and the geo-position of the current node. \(D_{m}\) is the longest distance between two vehicles sending and receiving data, i.e., the longest distance for reliable wireless data transmission. In practice, it is determined by the maximum distance of radio transmission \(R\). For simplicity, here we suppose all the vehicles have the same \(R\). \(D_{m}\) is also related with the maximum velocity \(V_{m}\) of the vehicles and the maximum tolerated latency \(L_{m}\) for one hop. Namely \(D_{m}=R-2V_{m}\times L_{m}\), which is the case that two vehicles travel in the opposite directions at the maximum speed. \(T_{m}\) is the maximum deferral time, which is related to the priority of the requested content and can be extracted from the Interest packet. \(c\), \(m\), and \(ds\) are constants which can be adjusted and optimized through experiments. Figure 3 illustrates the curves of the two types of deferral functions by showing the general shape of the curves. The actual values of the parameters for these curves used in the experiments in this paper are given in the simulation setup described in Section 4.1. The major fields used for the forwarding control of the Interest and Data packet are shown in Figures 4 and 5, respectively. Besides the fields used in the original NDN (i.e., name, for the requested content; Nonce, the unique ID for the packet; and the lifetime of the packet), we use selector to denote the priority of the packet, namely the priority \(p\) used in Equations (3) and (4). In addition, we add two fields, Previous_position which denotes the position of the previous node from which the Interest  
Figure 3: Exponential and linear deferral time. (**a**) Exponential decreasing deferral time; (**b**) linear decreasing deferral time. Figure 2: Deferral Forwarding Table (DFT) and an example entry. packet is received and Current_position which will record the position of the current node before forwarding it. In this way, a node can know the position of the previous two passing nodes when receiving an Interest packet. For the Data packet, too, we add to the original NDN fields (name, signature, and content) the priority of the content, in the MetaInfo field, and specify who should receive, process, and forward the Data packet, in the Next_position field. In NDN, a node uses the Pending Interest Table (PIT) to record the prefix of a named content and the corresponding requesting interfaces. In this way, a node can forward the Data packets along the same path the Interest packets traverse. However, in the wireless environment, the wireless interface is not related to the path: Sending and receiving data are normally achieved in the same wireless interface. Therefore, it is not always possible to return the Data packets along the same path that the corresponding Interest packets traversed, as in the fixed networks. Nevertheless, to return the requested Data packets along the same path as the Interest packets can avoid broadcasting too many Data packets by the intermediate nodes, and at the same time increase the possibility of the requested data delivery. Therefore, we redefined the PIT table used in NDN in order to realize the \"reverse-path routing\" mechanism. Each entry of the PIT consists of three fields, Nonce, Name, and Previous_position (they have the same meaning as the corresponding fields in the Interest packet), as shown in Figure 6. Nonce and Name are used to identify the Interest packet for which no Data packets have been sent in response, as the NDN did.