Research Article

Reaching Consensus with Byzantine Faulty Controllers in Software-Defined Networks

Algorithm 2

The proposed CPSDN protocol (for each controller).
/ phase 1: Msg_Exchanging/
1. crt(root,vi);
2. for to do
3.  ;
4.  fordo
5.   ;
7.  wait until (time-out interval)
6.  end
8.   fordo
9.    then
10.     ;
11.     fordo
12.      ;
13.      ;
14.     end
15.    else if receive from then
16.     ;
17.     fordo
18.      ifthen
19.       ;
20.      else
21.       ;
22.      ;
23.     end
24.   ;
25.   end
/ Phase 2: Cons_Making/
26.  ifdo
27.   ;
28.  returnconsensus value;