Switch (App-type) case P2P-TCP: Flow-set{F1…Fx} // Pure Traffic Flow Set For Fi[] in Flow-set if(Is-TCP-Flow==True && Fi.packet-num < 3) continue For Fj in Flow-set if(Is-TCP-Flow==True && Fi.packet-num < 3) continue While m from 0 to Fi.packet-num While n from 0 to Fj.packet-num If(|Fi[].payload-len – Fj.payload-len| < threshold) CommonString = Smith-Waterman(Fi[m],Fj[n]) if CommonString in SigSet SigSet[CommonString]++ else SigSet.insert(CommonString) n++ //end while m++ //end while j++ //end for i++ //end for case P2P-UDP://omit case NOT-P2P-TCP: //omit case NOT-P2P-UDP://omit