Example #1
0
        public static void Analyze(PacketDevice device)
        {
            AnalyzeTcpStreamTest tcpAnalyze = new AnalyzeTcpStreamTest();

            //__communicator = null;
            //_rs.OnAbortExecution += new OnAbortEvent(OnAbortExecution);
            try
            {
                using (PacketCommunicator communicator = device.Open(65536, PacketDeviceOpenAttributes.Promiscuous, 1000))
                {
                    PPacketManager ppacketManager = new PPacketManager();
                    communicator.ReceivePackets(0, packet => tcpAnalyze.Add(ppacketManager.CreatePPacket(packet)));
                }
            }
            finally
            {
                //_rs.OnAbortExecution -= new OnAbortEvent(OnAbortExecution);
            }
        }
Example #2
0
        public static void Analyze(PacketDevice device)
        {
            AnalyzeTcpStreamTest tcpAnalyze = new AnalyzeTcpStreamTest();

            //__communicator = null;
            //_rs.OnAbortExecution += new OnAbortEvent(OnAbortExecution);
            try
            {
                using (PacketCommunicator communicator = device.Open(65536, PacketDeviceOpenAttributes.Promiscuous, 1000))
                {
                    PPacketManager ppacketManager = new PPacketManager();
                    communicator.ReceivePackets(0, packet => tcpAnalyze.Add(ppacketManager.CreatePPacket(packet)));
                }
            }
            finally
            {
                //_rs.OnAbortExecution -= new OnAbortEvent(OnAbortExecution);
            }
        }