コード例 #1
0
            public static void PacketBlockFlags_Inbound_Test()
            {
                PacketBlockFlags packetFlagInbound = new PacketBlockFlags(511);
                Assert.IsTrue(packetFlagInbound.Inbound);

                PacketBlockFlags packetFlagNoInbound = new PacketBlockFlags(512);
                Assert.IsFalse(packetFlagNoInbound.Inbound);
            }
コード例 #2
0
            public static void PacketBlockFlags_Broadcast_Test()
            {
                PacketBlockFlags packetFlagBroadcast = new PacketBlockFlags(255);
                Assert.IsTrue(packetFlagBroadcast.Broadcast);

                PacketBlockFlags packetFlagNoBroadcast = new PacketBlockFlags(128);
                Assert.IsFalse(packetFlagNoBroadcast.Broadcast);
            }
コード例 #3
0
            public static void PacketBlockFlags_Multicast_Test()
            {
                PacketBlockFlags packetFlagMulticast = new PacketBlockFlags(255);
                Assert.IsTrue(packetFlagMulticast.Multicast);

                PacketBlockFlags packetFlagNoMulticast = new PacketBlockFlags(128);
                Assert.IsFalse(packetFlagNoMulticast.Multicast);
            }
コード例 #4
0
            public static void PacketBlockFlags_Promisious_Test()
            {
                PacketBlockFlags packetFlagPromisious = new PacketBlockFlags(255);
                Assert.IsTrue(packetFlagPromisious.Promiscuous);

                PacketBlockFlags packetFlagNoPromisious = new PacketBlockFlags(128);
                Assert.IsFalse(packetFlagNoPromisious.Promiscuous);
            }
コード例 #5
0
            public static void PacketBlockFlags_FCSLength_Test()
            {
                PacketBlockFlags packetFlagFCSLength = new PacketBlockFlags(480);
                Assert.IsTrue(packetFlagFCSLength.FCSLength);

                PacketBlockFlags packetFlagNoFCSLength = new PacketBlockFlags(128);
                Assert.IsFalse(packetFlagNoFCSLength.FCSLength);
            }
コード例 #6
0
            public static void PacketBlockFlags_Outbound_Test()
            {
                PacketBlockFlags packetFlagOutbound = new PacketBlockFlags(254);
                Assert.IsTrue(packetFlagOutbound.Outbound);

                PacketBlockFlags packetFlagNoOutbound = new PacketBlockFlags(253);
                Assert.IsFalse(packetFlagNoOutbound.Outbound);
            }
コード例 #7
0
            public static void PacketBlockFlags_UnalignedFrameError_Test()
            {
                PacketBlockFlags packetUnalignedFrameError = new PacketBlockFlags(0xFF000000);

                Assert.IsTrue(packetUnalignedFrameError.UnalignedFrameError);

                PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);

                Assert.IsFalse(packetFlagNoError.UnalignedFrameError);
            }
コード例 #8
0
            public static void PacketBlockFlags_Promisious_Test()
            {
                PacketBlockFlags packetFlagPromisious = new PacketBlockFlags(255);

                Assert.IsTrue(packetFlagPromisious.Promiscuous);

                PacketBlockFlags packetFlagNoPromisious = new PacketBlockFlags(128);

                Assert.IsFalse(packetFlagNoPromisious.Promiscuous);
            }
コード例 #9
0
            public static void PacketBlockFlags_Broadcast_Test()
            {
                PacketBlockFlags packetFlagBroadcast = new PacketBlockFlags(255);

                Assert.IsTrue(packetFlagBroadcast.Broadcast);

                PacketBlockFlags packetFlagNoBroadcast = new PacketBlockFlags(128);

                Assert.IsFalse(packetFlagNoBroadcast.Broadcast);
            }
コード例 #10
0
            public static void PacketBlockFlags_Multicast_Test()
            {
                PacketBlockFlags packetFlagMulticast = new PacketBlockFlags(255);

                Assert.IsTrue(packetFlagMulticast.Multicast);

                PacketBlockFlags packetFlagNoMulticast = new PacketBlockFlags(128);

                Assert.IsFalse(packetFlagNoMulticast.Multicast);
            }
コード例 #11
0
            public static void PacketBlockFlags_Outbound_Test()
            {
                PacketBlockFlags packetFlagOutbound = new PacketBlockFlags(254);

                Assert.IsTrue(packetFlagOutbound.Outbound);

                PacketBlockFlags packetFlagNoOutbound = new PacketBlockFlags(253);

                Assert.IsFalse(packetFlagNoOutbound.Outbound);
            }
コード例 #12
0
            public static void PacketBlockFlags_SymbolError_Test()
            {
                PacketBlockFlags packetSymbolError = new PacketBlockFlags(0xFF000000);

                Assert.IsTrue(packetSymbolError.SymbolError);

                PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);

                Assert.IsFalse(packetFlagNoError.SymbolError);
            }
コード例 #13
0
            public static void PacketBlockFlags_PreambleError_Test()
            {
                PacketBlockFlags packetPreambleError = new PacketBlockFlags(0xFF000000);

                Assert.IsTrue(packetPreambleError.PreambleError);

                PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);

                Assert.IsFalse(packetFlagNoError.PreambleError);
            }
コード例 #14
0
            public static void PacketBlockFlags_Inbound_Test()
            {
                PacketBlockFlags packetFlagInbound = new PacketBlockFlags(511);

                Assert.IsTrue(packetFlagInbound.Inbound);

                PacketBlockFlags packetFlagNoInbound = new PacketBlockFlags(512);

                Assert.IsFalse(packetFlagNoInbound.Inbound);
            }
コード例 #15
0
            public static void PacketBlockFlags_tartFrameDelimiterError_Test()
            {
                PacketBlockFlags packetStartFrameDelimiterError = new PacketBlockFlags(0xFF000000);

                Assert.IsTrue(packetStartFrameDelimiterError.StartFrameDelimiterError);

                PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);

                Assert.IsFalse(packetFlagNoError.StartFrameDelimiterError);
            }
コード例 #16
0
            public static void PacketBlockFlags_FCSLength_Test()
            {
                PacketBlockFlags packetFlagFCSLength = new PacketBlockFlags(480);

                Assert.IsTrue(packetFlagFCSLength.FCSLength);

                PacketBlockFlags packetFlagNoFCSLength = new PacketBlockFlags(128);

                Assert.IsFalse(packetFlagNoFCSLength.FCSLength);
            }
コード例 #17
0
            public static void PacketBlockFlags_WrongInterFrameGapError_Test()
            {
                PacketBlockFlags packetWrongInterFrameGapError = new PacketBlockFlags(0xFF000000);

                Assert.IsTrue(packetWrongInterFrameGapError.WrongInterFrameGapError);

                PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);

                Assert.IsFalse(packetFlagNoError.WrongInterFrameGapError);
            }
コード例 #18
0
        public override bool Equals(Object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            PacketBlockFlags p = (PacketBlockFlags)obj;

            return(this.Flag == p.Flag);
        }
コード例 #19
0
            public static void PacketBlockFlags_PacketTooLongError_Test()
            {
                PacketBlockFlags packetTooLongError = new PacketBlockFlags(0xFF000000);
                Assert.IsTrue(packetTooLongError.PacketTooLongError);

                PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);
                Assert.IsFalse(packetFlagNoError.PacketTooLongError);
            }
コード例 #20
0
            public static void PacketBlockFlags_UnalignedFrameError_Test()
            {
                PacketBlockFlags packetUnalignedFrameError = new PacketBlockFlags(0xFF000000);
                Assert.IsTrue(packetUnalignedFrameError.UnalignedFrameError);

                PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);
                Assert.IsFalse(packetFlagNoError.UnalignedFrameError);
            }
コード例 #21
0
 public EnchantedPacketOption(string Comment = null, PacketBlockFlags PacketFlag = null, long? DropCount = null, HashBlock Hash = null) 
 {
     this.Comment = Comment;
     this.PacketFlag = PacketFlag;
     this.DropCount = DropCount;
     this.Hash = Hash;
 }
コード例 #22
0
            public static void PacketBlockFlags_tartFrameDelimiterError_Test()
            {
                PacketBlockFlags packetStartFrameDelimiterError = new PacketBlockFlags(0xFF000000);
                Assert.IsTrue(packetStartFrameDelimiterError.StartFrameDelimiterError);

                PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);
                Assert.IsFalse(packetFlagNoError.StartFrameDelimiterError);
            }
コード例 #23
0
ファイル: PacketOption.cs プロジェクト: GemikGmbH/PcapngUtils
 public PacketOption(string Comment = null, PacketBlockFlags PacketFlag = null, HashBlock Hash = null)
 {
     this.Comment = Comment;
     this.PacketFlag = PacketFlag;
     this.Hash = Hash;
 }
コード例 #24
0
            public static void PacketBlockFlags_WrongInterFrameGapError_Test()
            {
                PacketBlockFlags packetWrongInterFrameGapError = new PacketBlockFlags(0xFF000000);
                Assert.IsTrue(packetWrongInterFrameGapError.WrongInterFrameGapError);

                PacketBlockFlags packetFlagNoError = new PacketBlockFlags(128);
                Assert.IsFalse(packetFlagNoError.WrongInterFrameGapError);
            }