|
Algorithm1: Neighbor Discovery. |
|
Input: Ack,N
|
|
Output: NG
|
-
1.
Begin:
-
2.
Flush NGs
-
3.
i←0
-
4.
S broadcast Hello packets
-
5.
Repeat:
-
6.
for Ack received from node ni
-
7.
S updates the NGs
-
8.
NGs (i, 1)←NIDni
-
9.
NGs (i, 2)←CNPni
-
10.
NGs (i, 3)←𝜏ni
-
11.
increment
i
-
12.
until: All the received Acks are processed or each cluster
-
13.
Return NG
-
14.
end
|