Ejemplo n.º 1
0
 public override string Description()
 {
     return("[" + SourcePort.ToString() + "] -> [" + DestPort.ToString() + "]" + " Seq: " + SequenceNumber.ToString() + " Ack: " + AcknowledgementNumber.ToString() + " WindowSize: " + WindowSize.ToString());
 }
Ejemplo n.º 2
0
        public string featuresToString()
        {
            String features = "";
            String SrcIP2   = "";
            String DestIP2  = "";
            String SrcMAC2  = "";
            String DestMAC2 = "";

            Utilities convertor = new Utilities();

            if (SrcMAC != null)
            {
                SrcMAC2 = convertor.convertMACtoString(SrcMAC);
            }

            if (DestMAC != null)
            {
                DestMAC2 = convertor.convertMACtoString(DestMAC);
            }
            //DestMAC[0].ToString() + "-" + DestMAC[1].ToString() + "-" + DestMAC[2].ToString() + "-" + DestMAC[3].ToString()+ "-" + DestMAC[4].ToString() + "-" + DestMAC[5].ToString();

            if (SrcIP != null)
            {
                SrcIP2 = convertor.convertIPtoString(SrcIP);
            }
            //SrcIP[0].ToString() + "." + SrcIP[1].ToString() + "." + SrcIP[2].ToString()+"." + SrcIP[3].ToString();

            if (DestIP != null)
            {
                DestIP2 = convertor.convertIPtoString(DestIP);
            }


            features += SrcMAC2 + "," + DestMAC2 + "," + SrcIP2 + "," + DestIP2 + "," + SrcPort.ToString() + "," + DestPort.ToString() + "," + Protocol.ToString() + "," + TBT.ToString() + "," + FPS.ToString() + "," +
                        APL.ToString() + "," + AB.ToString() + "," + BS.ToString() + "," + PS.ToString() + "," + DPL.ToString() + "," + PPS.ToString() + "," + PV.ToString() + "," + PX.ToString() + "," +
                        NNP.ToString() + "," + NSP.ToString() + "," + PSP.ToString() + "," + Duration.ToString() + "," + this.Type.ToString() + "," + IOPR + "," + AIT + "," + Reconnect;

            return(features);
        }
Ejemplo n.º 3
0
 public override string Description()
 {
     return("[" + SourcePort.ToString() + "] -> [" + DestPort.ToString() + "]");
 }
Ejemplo n.º 4
0
 public override int GetHashCode()
 {
     return(((SrcIp.GetHashCode() ^ SrcPort.GetHashCode()) as object).GetHashCode() ^
            ((DestIp.GetHashCode() ^ DestPort.GetHashCode()) as object).GetHashCode());
 }