# Retransmission Avoidance for Reliable Data Delivery in Underwater WSNs
## 3 FLMPC: Proposed Protocols
### Network Configuration and Data Transmission
#### 3.6.1 Potential Neighbor Selection  
When a sensor node has a data packet to transmit, it selects a potential forwarder node \((PFN)\) among all of its neighbors. Before describing the selection process of \(PFN\), we firstly define the term \(PFN\) here:  
_PFN:_ Let a sensor node \(n\) lying \(h\) hops away from the destination having a neighbor of \(h-1\) hops which further has neighbors up to \(h-1\) or \(h-2\) hops, this neighbor is a \(PFN\). Sensor node \(E\) in Figure 4a is a \(PFN\). In the \(PFN\) selection phase, every senor node processes all the neighbors to select cross node which is also a \(PFN\). Cross node increases duplicate packets which helps in achieving the purpose of high reliability. If no such neighbor is found, sensor node selects relay node which is a \(PFN\). In the case that no \(PFN\) is found, data packet is dropped to save energy of the node. PFN Selection in FLMPC-One  
Figure 4a,b illustrate \(PFN\) selection mechanism of FLMPC-One. Let \(C\) be the current forwarder lying at depth \(d\) and \(h\) hops away from the surface of the water. \(A\), \(B\) and \(E\) lie at \(h-1\) hops. \(B\) is at lowest depth among all the neighbors, data packet should be sent to it. However, \(A\) and \(E\) are cross nodes, they have higher priority than \(B\). Existence of cross nodes reduce the chances of data packet transmission to relay node \(B\). If we look precisely at Figure 4a, \(A\) can not be selected as \(PFN\). Although, there is a sensor node at lower depth than \(A\). However, it does not lie in \(A^{\prime}s\) transmission range. At this stage, \(C\) processes only left cross node \(E\) which has \(D\) in its range. \(D\) ensures neighbor information up to \(h-2\) hops. Thus, \(E\) is a \(PFN\) and data packet is transmitted to it. There can be a scenario, when cross node is not the \(PFN\) as shown in Figure 3(b). \(A\) is a cross node having high priority, however, its not a \(PFN\). Now \(C\) looks in it's neighbor table to find another cross node. If there is not any cross node then \(C\) makes an effort to find relay node which is also a \(PFN\). If we look at \(B\), we can see, it is a relay node and also has a node in its transmission range, so \(B\) has priority in this case. \(C\) selects \(B\) as a forwarder. ```
1:procedurePotential-Forwarder
2:for each node \(i\in\) Nodes do
3:for each node \(n\in\) Neighbor-Table do
4:if\(\left|neighbor(n)\right|\geq 1\)then
5:go to 7
6:if\(\left|neighbor(neighbors(n))\right|\geq 1\)then
7:ifn==Cross-node then
8:\(PFN\gets n\)
9:go to 2 \(\triangleright\) Find \(PFN\) for next node
10:endif
11:endif
12:endif
13:if\(\left|Cross\text{'node}\right|==0\)then
14:go to 16
15:if\(\left|neighbor(neighbor(n))\right|\geq 1\)then
16:\(PFN\gets relay\)
17:endif
18:endif
19:endfor
20:endfor
21:endprocedure
22:procedureData-transmission
23: Node \(i\) received data packet
24:if\(i\) is Cross-node then
25: Multicast data packet
26:else Unicast data packet
27:endif
28:endprocedure
```  
**Algorithm 1** FLMPC Pseudocode. Algorithm 1 shows the selection and transmission of both proposed schemes. Line 4 states that two hop information is fulfilled, thus, line 6 is skipped for FLMPC-One. After \(PFN\) selection at step 8, the next iteration starts. Afterwards, transmission phase starts. If current forwarder is a cross node, data packet is multicasted, otherwise, unicasted. PFN Selection in FLMPC-Two  
FLMPC-Two forwards data packets after ensuring neighbor information up to \(h-3\) number of hops from the current forwarder. The \(PFN\) selection mechanism of FLMPC-Two is shown in Figure 5(a),b. \(A\), \(B\) and \(E\) are \(h-1\) hops away from the gateways and they are neighbors of the current forwarder \(C\) which itself is \(h\) hops away. Let \(C\) has a data packet to forward and it computes all the neighbors to find \(PFN\). Being cross nodes \(A\) and \(E\) has high priority. \(A\) does not have any node in its range, so \(A\) is eliminated from this competition. \(C\) now makes an attempt to spot cross node which is \(E\) in this state.