# An Efficient Void Aware Framework for Enabling Internet of Underwater Things
## 3 The Proposed Efficient Void Aware Routing Protocol for Enabling Internet of Underwater Things
### An Efficient Void Aware Routing Protocol: Design Approach
#### 3.4.4 Data Forwarding Phase  
In this phase, the data forwarding algorithm is designed to select the non-void nodes in the process of forwarding the data packet. Here, the data forwarding method in SPREPBR is modified to suppress the void nodes in joining the forwarding process. The OSPA algorithm proposed in SPRE-PBR is enhanced to select the best candidate from the ordinary nodes with ignoring both cases of void nodes mentioned previously. All sensors have enough information collected from both phases one and two. This information has been utilized to select the efficient void aware candidate sensor among neighbors. In this phase, once a sensor has data to send it to calculate the route cost based on the triangle metric for all neighbors and store it in the routing table. Then, the best candidate has been selected based on the non-void sensors with high link quality. Table 2 shows the notations that are used in the efficient void aware data forwarding algorithms.  
Algorithm 2 illustrates how the modified algorithm named Efficient Void Aware Data Forwarding (EVA-DF) algorithm chooses the best efficient candidate among neighbors. This algorithm consists of one procedure and one method. Firstly, line 13-41 (EVA-DF) is designed to select the set of candidate neighbors from the ordinary nodes in the highest layer. Secondly, line 1-12 Procedure \(LayerClassification\) is designed to distinguish the number of best candidates set among neighbors in the RT based on the efficient non-void sensors. The rest of the methods have been briefly described in SPRE-PBR. As a result, the EVA-DF is normally called by the data forwarding algorithm to select the efficient void aware sensor nodes that have a direct impact on increasing the packet delivery ratio.  
```
1:procedure\(LayerClassification(n_{i},\ R1,\ R2,\ BestN,\ EN,\ OCSet)\)
2:\(j\gets 1\)
3:whileEN \(<\ BestN\) and \(j\leq C\)
4:\(depthDiff\leftarrow|n_{i}depth|-|n_{i}RT[j].depth|\)
5:if\((n_{i}RT[j].iv==0)\) and \((R1<depthDiff\leq R2)\)then
6:\(EN\leftarrow\text{EN}+1\)
7:\(OCSet[EN]\gets n_{i}RT[j].id\)
8:endif
9:\(j\gets j+1\)
10:endwhile
11:endprocedure
12:
13:method\(EVA\)-DF \((n_{i})\)
14: Sort \(n_{i}.RT\) based on \(n_{i}.RT.RCost\) in ascending order
15: Let \(BestN\gets 0\)
16: Let \(VC\leftarrow 0\)
17:for\(j=1\) to \(C\)do
18:if\((n_{i}RT[j].iv==1)\)then
19:\(VC\gets VC+1\)
20:endif
21:endfor
22:if\((C-VC>Threshold)\)then
23:\(BestN\gets Threshold\)
24:else
25:if\(C-VC\leq Threshold\)then
26:\(BestN\gets C-VC\)
27:endif
28:endif
29:Clear \((OCSet)\)
30: Let \(EN\gets 0\)
31:if\(EN<BestN\)then
32:\(LayerClassification\)\((n_{i},\frac{2R}{3},R,BestN,\ EN,OCSet)\)
33:endif
34:if\(EN<BestN\)then
35:\(LayerClassification\)\((n_{i},\frac{R}{3},\frac{2R}{3},BestN,\ EN,OCSet)\)
36:endif
37:if\(EN<BestN\)then
38:\(LayerClassification\)\((n_{i},0,\frac{R}{3},BestN,\ EN,OCSet)\)
39:endif
40:return\(OCSet\)
41:endmethod
```  
**Algorithm 2**EVA: Efficient Void Aware Data Forwarding.