コード例 #1
0
        void WatchAddress(object ipAddress)
        {
            Sniffer s = new Sniffer();

            // s.IpPacketReceived += new EventHandler(s_IpPacketReceived);
            s.IpPacketSent += new EventHandler(s_IpPacketSent);
            s.TcpPort       = ((FtpConfig)Configuration.AgentSettings).FtpPort;
            System.Diagnostics.EventLog.WriteEntry("Cyberarms.Agents.FtpServer", String.Format("Ftp Server Security Agent is listening on port {0}", s.TcpPort));
            s.WatchAddress((IPAddress)ipAddress);
            sniffers.Add(s);
        }