internal static void WriteHeader(byte[] buffer, int offset, ClassOfService priorityCodePoint, bool canonicalFormatIndicator, ushort vLanIdentifier, EthernetType etherType) { ushort num = VLanTaggedFrameDatagram.CalculateTagControlInformation(priorityCodePoint, canonicalFormatIndicator, vLanIdentifier); ByteArrayExtensions.Write(buffer, offset, num, Endianity.Big); ByteArrayExtensions.Write(buffer, offset + 2, (ushort)etherType, Endianity.Big); }
public override void Write(byte[] buffer, int offset, int payloadLength, ILayer previousLayer, ILayer nextLayer) { EthernetType ethernetType = EthernetBaseLayer.GetEthernetType(this.EtherType, nextLayer); VLanTaggedFrameDatagram.WriteHeader(buffer, offset, this.PriorityCodePoint, this.CanonicalFormatIndicator, this.VLanIdentifier, ethernetType); }