| Algorithm: Flooding_attack_protect (T_data, R_data, P, H, L) |
| Data: Transmitting data=T_data, Receiving data=R_data, Authorize bit=H, Unauthorized bit=L. Result: Flooding_attack=F_attack. |
| (1) Start |
| (2) Connection==Serial Communication(); /*Check serial communication between router and coordinator*/ |
| (3) If connection==Fail |
| (4) Return Start; /*Step 1*/ |
| (5) End |
| (6) If connection==True then |
| (7) T_data==Encrypt(data); /*AES 128 bit encryption*/ |
| (8) If R_data==‘H’ OR ‘L’ then /*128 bit decryption*/ |
| (9) Initialization I, data; |
| (10) Fori=1 to 20 do |
| (11) Data=data+1; |
| (12) Delay==200 ms; |
| (13) If Data>7 |
| (14) F_Attack==Yes; |
| (15) Update Web(F_attack); /*Update web page with Flooding attack data*/ |
| (16) Send Email(Admin); /*Send email to Admin notifying Flooding attack*/ |
| (17) Return Start; /*Step 1*/ |
| (18) End |
| (19) End |
| (20) End |
| (21) End |