/// <summary>
 /// Writes the layer to the buffer.
 /// </summary>
 /// <param name="buffer">The buffer to write the layer to.</param>
 /// <param name="offset">The offset in the buffer to start writing the layer at.</param>
 /// <param name="payloadLength">The length of the layer's payload (the number of bytes after the layer in the packet).</param>
 /// <param name="previousLayer">The layer that comes before this layer. null if this is the first layer.</param>
 /// <param name="nextLayer">The layer that comes after this layer. null if this is the last layer.</param>
 public override void Write(byte[] buffer, int offset, int payloadLength, ILayer previousLayer, ILayer nextLayer)
 {
     TcpDatagram.WriteHeader(buffer, offset,
                             SourcePort, DestinationPort,
                             SequenceNumber, AcknowledgmentNumber,
                             ControlBits, Window, UrgentPointer,
                             Options);
 }