Skip to main content
. 2010 Feb 26;10(3):1447–1472. doi: 10.3390/s100301447

Algorithm 1.

IRL - Routing at Source Node.

1: prevhop ← ∅; nexthop ←∅;
2: ifM(tF) ≠ ∅ then
3:   nexthop(k) = Rand(M (tF));
4: else
5:   ifM(tBr) ∪ M(tBl) ≠ ∅ then
6:     nexthop(k) = Rand(M (tBr) ∪ M (tBl));
7:   else ifM(tBm ≠ ∅ then
8:     nexthop(k) = Rand(M (tBm));
9:   else
10:     Drop packet and Exit;
11:   end if
12: end if
13: Set prevhop = myid;
14: Form pkt p = {prevhop; nexthop; seqID; payload};
15: Create Signature and save in buffer;
16: Forward packet to nexthop;
17: Set timer Δt=Ddnexthop×pt;
18: while Δt = truedo
19:   Signature remains in buffer;
20: end while
21: Signature removed from buffer;