/// <summary>
        /// Deep copy constructor.
        /// </summary>
        public SmbEchoResponsePacket(SmbEchoResponsePacket packet)
            : base(packet)
        {
            this.InitDefaultValue();

            this.smbParameters.WordCount = packet.SmbParameters.WordCount;
            this.smbParameters.SequenceNumber = packet.SmbParameters.SequenceNumber;
            this.smbData.ByteCount = packet.SmbData.ByteCount;

            if (packet.smbData.Data != null)
            {
                this.smbData.Data = new byte[packet.smbData.Data.Length];
                Array.Copy(packet.smbData.Data, this.smbData.Data, packet.smbData.Data.Length);
            }
            else
            {
                this.smbData.Data = new byte[0];
            }
        }
        /// <summary>
        /// Deep copy constructor.
        /// </summary>
        public SmbEchoResponsePacket(SmbEchoResponsePacket packet)
            : base(packet)
        {
            this.InitDefaultValue();

            this.smbParameters.WordCount      = packet.SmbParameters.WordCount;
            this.smbParameters.SequenceNumber = packet.SmbParameters.SequenceNumber;
            this.smbData.ByteCount            = packet.SmbData.ByteCount;

            if (packet.smbData.Data != null)
            {
                this.smbData.Data = new byte[packet.smbData.Data.Length];
                Array.Copy(packet.smbData.Data, this.smbData.Data, packet.smbData.Data.Length);
            }
            else
            {
                this.smbData.Data = new byte[0];
            }
        }
        public SmbEchoResponsePacket CreateEchoResponse(
            CifsServerPerConnection connection,
            SmbEchoRequestPacket request)
        {
            SmbEchoResponsePacket response = new SmbEchoResponsePacket();
            response.SmbHeader = CifsMessageUtils.CreateSmbHeader(connection, request);

            SMB_COM_ECHO_Response_SMB_Parameters smbParameters = response.SmbParameters;
            smbParameters.WordCount = 0x01;
            //The SMB_Parameters.Words.SequenceNumber field MUST be set to 1.(3.3.5.32)
            smbParameters.SequenceNumber = 0x01;
            response.SmbParameters = smbParameters;

            SMB_COM_ECHO_Response_SMB_Data smbData = response.SmbData;
            smbData.ByteCount = request.SmbData.ByteCount;
            smbData.Data = request.SmbData.Data;
            response.SmbData = smbData;

            return response;
        }