Research Article
SDNDefender: A Comprehensive DDoS Defense Mechanism Using Hybrid Approaches over Software Defined Networking
Algorithm 1
Calculate the forwarding path.
| (1) | Input: G, D, , m, src, dst | | (2) | Output: path | | (3) | nextt = [][] | | (4) | Function initial () | | (5) | for i = 0; i < m; i++ | | (6) | for j = 0; j < m; j++ | | (7) | D[i][j] = | | (8) | nextt[i][j] = j | | (9) | Function Floyd (G, m, nextt) | | (10) | for k = 0; k < m; k++ | | (11) | for i = 0; i < m; i++ | | (12) | for j = 0; j < m; j++ | | (13) | if D[i][j] > D[i][k] + D[k][j] | | (14) | D[i][j] = D[i][k] + D[k][j] | | (15) | nextt[i][j] = nextt[i][k] | | (16) | Function Path (nextt, src, dst) | | (17) | P = [src] | | (18) | While src! = dst | | (19) | src = nextt[src][dst] | | (20) P.append(src) | | (21) | return P |
|