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; }
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; }
/// <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; }
/// <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; }