|
Algorithm 1 The group table selection algorithm. |
-
1:
procedure TABLESELECT
-
2:
last_arrival_time ← None;
-
3:
last_output_channel ← None;
-
4:
timeout ←δ;
-
5:
while receive one packet do
-
6:
key ← hash(packet);
-
7:
current_time ← getTimeNow();
-
8:
if
key not in keys of last_arrival_time
then
-
9:
add () to ;
-
10:
← ;
-
11:
add () to ;
-
12:
else
-
13:
← ;
-
14:
if
then
-
15:
update to ;
-
16:
;
-
17:
update to ;
-
18:
else
-
19:
update to ;
-
20:
;
-
21:
if
corresponding bucket is not alive then
-
22:
;
-
23:
update to ;
-
24:
send one port down message to controller;
-
25:
else
-
26:
;
-
27:
end if
-
28:
end if
-
29:
end if
-
30:
send packet to output_channel;
-
31:
end while
-
32:
end procedure
|