Exemplo n.º 1
0
        public void ParsingTestSource()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(5), "0C5B8F279A64");
        }
Exemplo n.º 2
0
        public void ParsingTestTimeDestination()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(6), "FFFFFFFFFFFF");
        }
Exemplo n.º 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");
        }
Exemplo n.º 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");
        }
Exemplo n.º 5
0
        public void ParsingTestTimeLen()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(2), "42");
        }
Exemplo n.º 6
0
        public void ParsingTestName()
        {
            var     ethernet = new EthernetParser();
            PPacket pack     = ethernet.Parsing(ethernetPacket, time, len);

            Assert.AreEqual(pack.GetPacket(0), "Ethernet");
        }
Exemplo n.º 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");
        }