Пример #1
0
        public Packet(byte[] data, PacketDirection direction) : base(data)
        {
            this.PacketDirection = direction;

            ArrivalTime = DateTime.Now;

            EthernetHeader ethernetHeader = new EthernetHeader(data);
            IpHeader       ipHeader       = new IpHeader(this, ethernetHeader);

            this.SourceIpAddress      = ipHeader.SourceIpAddress;
            this.DestinationIpAddress = ipHeader.DestinationIpAddress;
            this.Protocol             = ipHeader.Protocol;

            this.Data = null;
        }
Пример #2
0
        public Packet(byte[] data, PacketDirection direction)
            : base(data)
        {
            this.PacketDirection = direction;

            ArrivalTime = DateTime.Now;

            EthernetHeader ethernetHeader = new EthernetHeader(data);
            IpHeader ipHeader = new IpHeader(this, ethernetHeader);

            this.SourceIpAddress = ipHeader.SourceIpAddress;
            this.DestinationIpAddress = ipHeader.DestinationIpAddress;
            this.Protocol = ipHeader.Protocol;

            this.Data = null;
        }