# Void Avoidance Opportunistic Routing Protocol for Underwater Wireless Sensor Networks
## 3 EEDOR Void Avoidance with Hop Count Discovery Mechanism
### Description of the Proposed EEDOR-VA Protocol
#### 3.3.2 Forwarding Set Formation Phase  
The next step of our protocol is forming a forwarding candidate set that can forward the data packet to reach the sink(s) through the relay nodes. Algorithm A2 presented in Appendix B illustrates the forwarding set selection for any P\({}_{\mathrm{holder}}\) node (i.e., source or next-hop forwarding node). In the EEDOR-VA protocol, if the P\({}_{\mathrm{holder}}\) is not the sink (line 1), then we assume one of the two possible cases:  
1. If one of the sinks is in a P\({}_{\mathrm{holder}}\) transmission range, then that sink will send HCREP with hop count 0 directly to the P\({}_{\mathrm{holder}}\) node (line 2). In this case, the P\({}_{\mathrm{holder}}\) ignores the forwarding set formation phase and forwards the data packet to the corresponding sink directly (lines 3-4).
2. If the current P\({}_{\mathrm{holder}}\) node cannot reach any of the sinks directly, then a group of relay nodes is selected to form a next-hop forwarding set (lines 5-10).  
Figure 4: Energy Efficient Depth-based Opportunistic Routing with Void Avoidance for UWSNs (EEDOR-VA) hop count discovery paths. (**a**) Shows Hop Count Request (HCREQ) path from source node n1 to destination s1. (**b**) Shows Hop Count Reply (HCREP) path from destination s1 to source n1.  
A next-hop forwarder set is determined based on the extracted candidate information (IDs, depth and hop count) received with HCREP responses, as explained in the previous subsection. When the Pholder receives the HCREP from the candidate nodes, it checks the candidate's hop count and compares it with its own hop count. The candidate node is added to the Pholder's next-hop forwarding set only if its hop count is less than the Pholder hop count (lines 7-9), no matter if the candidate node has less depth than the Pholder or not. From the example presented in the previous subsection and illustrated in Figure 4, to determine node n1 next-hop forwarding set, node n1 checks the HCREP received from its neighbor nodes n2, n3 and n10. Node n1 compares its hop count (i.e., n1 hop count is 4 in the example) with its neighbors' hop counts (i.e., n2 and n3 hop count is 3 while n10 hop count is 4) and includes the neighbors with lower hop counts in its next-hop forwarding set. Based on the forwarding set selection procedure, we can conclude that the forwarding set of node n1 consists of n2 and n3, as shown in Figure 5. Node n10 is excluded from the forwarding candidate set since its hop count is not less than n1's hop count, while node n4 is excluded from the forwarding candidate set since it has no route to any of the sinks on the surface.  
This technique leads to lower energy waste by removing the candidates with higher hop count from the forwarding set. Furthermore, the technique reduces the number of retransmissions as well as energy consumption. The Pholder node now knows its forwarding set nodes.  
The current Pholder node then sorts its own forwarding set nodes in a list based on their hop count from the sink, and if two or more nodes have the same hop count from the sink, their depths will be used to break the tie (line 11). At each hop, only the list of sorted forwarding candidate IDs will be sent out along with the data packet.