Exemple #1
0
        public void Get()
        {
            var icmpv4Packet = new ICMPv4Packet
            {
                Bytes = new Byte[32]
            };

            icmpv4Packet.SetBytes(4, 2, new Byte[] { 0x00, 0x01 });

            icmpv4Packet.Id.Should().Be(1);
        }
Exemple #2
0
        public void Get(Byte[] input, ICMPv4TypeCode expected)
        {
            var icmpv4Packet = new ICMPv4Packet
            {
                Bytes = new Byte[32]
            };

            icmpv4Packet.SetBytes(0, 2, input);

            icmpv4Packet.TypeCode.Should().Be(expected);
        }
Exemple #3
0
        public void Get()
        {
            var icmpv4Packet = new ICMPv4Packet
            {
                Bytes = new Byte[32]
            };

            icmpv4Packet.SetBytes(2, 2, new Byte[] { 0x4d, 0x4a });

            icmpv4Packet.Checksum.Should().Be(19786);
        }
        public void Get()
        {
            var icmpv4Packet = new ICMPv4Packet
            {
                Bytes = new Byte[32]
            };

            icmpv4Packet.SetBytes(6, 2, new Byte[] { 0x00, 0x11 });

            icmpv4Packet.Sequence.Should().Be(17);
        }