# Priority-Based Content Delivery in the Internet of Vehicles through Named Data Networking +
## 4 The Priority-Based Forwarding Framework
### IEEE 802.11 OCB Timing Algorithm  
If the face selection module decides to forward packets over the 802.11 OCB face, a proper mechanism is required to enable efficient and effective forwarding over multiple hops, by ensuring prioritization of HP contents over LP ones. Figure 4: Interest processing at an intermediate vehicle node. Figure 3: Interest processing at the consumer. We preliminarily introduced such a forwarding algorithm in [35], and we briefly recall it in the following for the sake of completeness. Basically, it consists of a timer-based rebroadcast mechanism for Interest and Data packets, where the defer time is set locally by each forwarder according to the priority embedded in the content name of the incoming packet. Timers are computed in a totally distributed way by each vehicle without incurring any additional signaling overhead. Any potential forwarder \(N\) defers its Interest retransmission of an additional delay, during which it listens to the channel: if it overhears the requested Data or the same Interest, then it cancels the Interest forwarding and deletes the related PIT entry. Similarly, any node \(N\) defers its Data transmission: if it overhears the same Data during the waiting time, then it drops the delayed packet. In order to give Data packets priority over Interest packets, we let defer timers for Data and Interest forwarding be initialized from two distinct and adjacent time windows. They are, respectively, the Data Defer Window (DDW), in the range \([0;DDW_{m})\), and the Interest Defer Window (IDW), in the range \([DDW_{m},IDW_{m}]\). \(DDW\) and \(IDW\) sizes are set according to the 802.11 slot time and the short inter-frame spacing (SIFS) [3] to better and quickly adapt to MAC dynamics; a detailed study about their tuning can be found e.g., in [27]. To let HP (Interest and Data) packets be prioritized over LP ones, both IDW and DDW are then split into two disjoint sub-windows. In the first DDW sub-window, only HP Data packets are transmitted according to a high priority timer, \(HPT_{D}\), extracted in the range \([0;HPD_{m})\). In the second DDW sub-window, LP Data packets are transmitted by selecting a low priority timer \(LPT_{D}\) in the range \([HPD_{m};DDW_{m}]\). A similar division between high and low-priority parts is used for IDW; see Figure 5.  
The \(HPD_{m}\) and \(HPI_{m}\) bounds are dynamically computed by each node according to the overheard traffic load for each traffic priority. To this aim, each node tracks the number of (HP and LP) received Data bytes. The number of received high and low priority bytes (\(N_{HP}\) and \(N_{LP}\), respectively) can be easily inferred by a node from the packet-size field in the header of each NDN packet [32]. Notice that the number of bytes, instead of the number of packets, permits a more precise channel load estimation at the NDN layer, since in a general case, the size of HP and LP IoV Data packets can be different, and differences can be appreciable also within the same priority class (e.g., a few bytes for environmental sensing data, a large chunk of a digital map). The bound between HP and LP Data packets in the \(DDW\) is dynamically computed as follows:  
\[HPD_{m}=\frac{N_{HP}}{N_{LP}+N_{HP}}\cdot DDW_{m}. \tag{1}\]  
The higher the number of overheard HP packets, the higher \(HPD_{m}\). The bound in IDW for the Interest timer is computed analogously. Once the window bounds have been computed, the defer times (\(HPT_{D}\), \(LPT_{D}\), \(HPT_{I}\), \(LPT_{I}\) for high priority and low priority Data and Interest, respectively) are calculated every time a node has to forward a packet. The timer is randomly chosen in its dedicated window, e.g., the \(HPT_{D}\) value is uniformly distributed in the range \([0;HPD_{m})\). However, more sophisticated calculations can be conceived for future work, e.g., by leveraging the spatial/temporal attributes of content.