Ejemplo n.º 1
0
        public PPPPacket(PPPoECode Code, ushort SessionId) : base(new PosixTimeval())
        {
            int offset       = 0;
            int headerLength = PPPFields.HeaderLength;

            byte[] bytes = new byte[headerLength];
            base.header   = new ByteArraySegment(bytes, offset, headerLength);
            this.Protocol = PPPProtocol.Padding;
        }
Ejemplo n.º 2
0
        public PPPoEPacket(PPPoECode Code, ushort SessionId) : base(new PosixTimeval())
        {
            int offset       = 0;
            int headerLength = PPPoEFields.HeaderLength;

            byte[] bytes = new byte[headerLength];
            base.header    = new ByteArraySegment(bytes, offset, headerLength);
            this.Code      = Code;
            this.SessionId = SessionId;
            this.Version   = 1;
            this.Type      = 1;
            this.Length    = 0;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Construct a new PPPPacket from source and destination mac addresses
        /// </summary>
        public PPPPacket(PPPoECode Code,
                         UInt16 SessionId)
        {
            // allocate memory for this packet
            int offset      = 0;
            int length      = PPPFields.HeaderLength;
            var headerBytes = new byte[length];

            header = new ByteArraySegment(headerBytes, offset, length);

            // setup some typical values and default values
            this.Protocol = PPPProtocol.Padding;
        }
Ejemplo n.º 4
0
 public PPPoEPacket(PPPoECode Code, ushort SessionId)
     : base(new PosixTimeval())
 {
     int offset = 0;
     int headerLength = PPPoEFields.HeaderLength;
     byte[] bytes = new byte[headerLength];
     base.header = new ByteArraySegment(bytes, offset, headerLength);
     this.Code = Code;
     this.SessionId = SessionId;
     this.Version = 1;
     this.Type = 1;
     this.Length = 0;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Construct a new PPPoEPacket from source and destination mac addresses
        /// </summary>
        public PPPoEPacket(PPPoECode Code,
                           UInt16 SessionId)
        {
            // allocate memory for this packet
            int offset      = 0;
            int length      = PPPoEFields.HeaderLength;
            var headerBytes = new byte[length];

            header = new ByteArraySegment(headerBytes, offset, length);

            // set the instance values
            this.Code      = Code;
            this.SessionId = SessionId;

            // setup some typical values and default values
            this.Version = 1;
            this.Type    = 1;
            this.Length  = 0;
        }