Skip to main content
. 2022 Sep 14;22(18):6958. doi: 10.3390/s22186958
Algorithm 1 DA-DIS detection and isolation algorithm

Input: Current Topology G = (Sw,E)

Output: Path/Backup path (P i) between source-destination node pair

Contract_Observer(Sw i, Port P i)

Status Sw m  = Check_Status_Change();

for all Sw i  ∈ G do

   if Check_Status_Change() == Sw j  do

        List P i  =  all_k_shortest_path(Sw i, Sw j);

        if  Sw m   ∈ P i  then

               graph_list G l  = graph.monitor.path - Sw m;

          Identify_attack( Sw m,Port P i);

          call k_shortest_path(Sw i, Sw j) ; 

      else

            return P i;

    end if

    end if

end for