## 4 The Proposed Mechanisms
### The ReCIF Mechanism  
The Retransmission-Counter-based Interest Forwarding (ReCIF) mechanism introduces one field in the interest packet header (Algorithm 2). This field, referred to as a forwarding counter, receives zero  
Figure 2: An example of the PIF mechanism in action. as initial value and is increased by one unit each time that the packet is forwarded. Nodes that have a degree centrality (\(g\geq G\)), where \(G\) is the centrality threshold, forward an interest packet only if \(c_{i}<C\), where \(c_{i}\) is the value of the forwarding counter in the header of packet \(i\), and \(C\) is the retransmission threshold. Otherwise, nodes that have \(g<G\) forward interest packets based on the default NDN forwarding mechanism. ReCIF assumes that the forwarding counter of a packet increases quickly during broadcast storm periods. Thus, ReCIF limits the forwarding of packets that were already in a broadcast storm. The fewer the number of copies of these packets, the lower the collision probability is. ```
Data: (\(g\),\(G\), \(C\), \(c_{i}\), \(pck\).interest.) begin if\(>=G\)then if\(c_{i}<=C\)then \(Forward(pck\).interest) ; else \(Discard(pck\).interest);  end if else \(Forward(pck\).interest) end if  end if
```  
**Algorithm 2**Retransmission-Counter-based Interest Forwarding (ReCIF)-hard mechanism. Defining the retransmission threshold (\(C\)) is a challenge in the employment of ReCIF. If \(C\) is low, interest packets may not reach their destinations. Otherwise, if \(C\) is high, the efficiency of ReCIF is compromised. Therefore, we propose two operation modes for ReCIF: ReCIF-hard and ReCIF-soft. With ReCIF-hard, \(C\) is fixed and has been previously defined based on the network density. The threshold \(C\) is the same for all contents. On the other hand, ReCIF-soft calculates \(C\) dynamically (Algorithm 3). Thus, with ReCIF-soft, each content (\(n\)) has its own threshold (\(C_{n}\)). ```
Data: (\(g\),\(G\), \(c_{i}\), \(pck\).interest.) begin if\(g>=G\)then if\(g\) >= \(G\)then ifthen \(ReceivedPcksN\) <= \(P\) else \(sumCi\gets c_{i}+sumCi\); ifthen \(ReceivedPcksN\) == \(P\) end if \(C_{n}(t)\gets sumCi/P\)\(Forward(pck\).interest);  end if \(C_{n}(t)\leftarrow((1-\alpha)*c_{i}+\alpha*C_{j}(t-1))\); if\(c_{i}<=C_{n}(t)\)then \(Forward(pck\).interest) ; else \(Discard(pck\).interest);  end if \(Forward(pck\).interest) end if  end if
```  
**Algorithm 3**ReCIF-soft mechanism. ReCIF-soft employs a two-phase algorithm to calculate threshold \(C_{n}\). The first phase occurs when a node receives an interest packet for a specific content for the first time. To calculate the first value of \(C_{n}\), a given node has to receive \(P\) interest packets. All of these \(P\) interest packets are forwarded by the node following the default NDN forwarding mechanism. After that, the node calculates the mean value of the forwarding counter (\(c\)) of these \(P\) packets and sets \(C_{n}(0)\), as defined in Equation (1),  
\[C_{n}(0)=\big{(}\sum_{i=1}^{P}c_{i}\big{)}/P. \tag{1}\]  
We defined \(P=10\) based on preliminary experiments. With \(C_{n}(0)\) defined, a node starts the second phase of the algorithm. To calculate \(C_{n}\) dynamically, ReCIF-soft employs an exponential moving average defined by Equation (2):  
\[C_{n}(t)=\big{(}((1-\alpha)*c_{i}+\alpha*C_{j}(t-1)),t>0\big{)}. \tag{2}\]  
The idea is to prioritize prior values of interest retransmissions and give small weights to the recent ones. We used, by default, \(\alpha=0.9\) to adjust the threshold \(C_{n}\) for every interest received for the same content. This small weight can modify the threshold on a low scale. Therefore, high hop count values from few packets will produce a reduced impact on \(C_{n}\). If a received interest packet of content \(n\) has \(c_{i}\) less or equal to \(C_{n}\), then this packet will be forwarded, and the new \(C_{n}\) value will be computed. Otherwise, if \(c_{i}\) is higher than \(C_{n}\), the packet will be dropped, but the new \(C_{n}\) will be computed.