コード例 #1
0
        public void ParsingTestSource()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(5), "0C5B8F279A64");
        }
コード例 #2
0
        public void ParsingTestTimeDestination()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(6), "FFFFFFFFFFFF");
        }
コード例 #3
0
        public void ParsingTestTimeDestinationIp()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(4), "169.254.169.254");
        }
コード例 #4
0
        public void ParsingTestSourceIp()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(3), "192.168.8.100");
        }
コード例 #5
0
        public void ParsingTestTimeLen()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(2), "42");
        }
コード例 #6
0
        public void ParsingTestName()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(0), "Ethernet");
        }
コード例 #7
0
        public void ParsingTestTime()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(1), "20:18:32 160");
        }