Пример #1
0
 public IpV4Packet(
     IpV4Header header
     , byte[] payload
     )
 {
     header_  = new IpV4Header(header);
     payload_ = payload;
 }
Пример #2
0
        public IpV4Header(
            IpV4Header src
            )
            : this()
        {
            if (src == null)
            {
                throw new ArgumentNullException("src");
            }

            versionAndHeaderLength_         = src.versionAndHeaderLength_;
            typeOfService_                  = src.typeOfService_;
            totalLength_                    = src.totalLength_;
            fragmentId_                     = src.fragmentId_;
            fragmentFlagsAndFragmentOffset_ = src.fragmentFlagsAndFragmentOffset_;
            timeToLive_                     = src.timeToLive_;
            protocol_          = src.protocol_;
            checksum_          = src.checksum_;
            SourceAddress      = src.SourceAddress;
            DestinationAddress = src.DestinationAddress;
            Options            = src.Options;
        }
Пример #3
0
 public IpV4Packet()
 {
     header_  = new IpV4Header();
     payload_ = new byte[0];
 }
Пример #4
0
 public IpV4PacketParser()
 {
     state_  = 0;
     buffer_ = new ByteBuffer(32, true);
     header_ = new IpV4Header();
 }