/// <summary>
 /// Deep copy constructor.
 /// </summary>
 public SmbTrans2Ioctl2FinalResponsePacket(SmbTrans2Ioctl2FinalResponsePacket packet)
     : base(packet)
 {
     this.InitDefaultValue();
 }
        public SmbTrans2Ioctl2FinalResponsePacket CreateTrans2Ioctl2FinalResponse(
            CifsServerPerConnection connection,
            SmbTrans2Ioctl2RequestPacket request)
        {
            SmbTrans2Ioctl2FinalResponsePacket response = new SmbTrans2Ioctl2FinalResponsePacket();
            SmbHeader smbHeader = CifsMessageUtils.CreateSmbHeader(connection, request);

            if ((smbHeader.Flags2 & SmbFlags2.SMB_FLAGS2_NT_STATUS) == SmbFlags2.SMB_FLAGS2_NT_STATUS)
            {
                smbHeader.Status = (uint)NtStatus.STATUS_NOT_IMPLEMENTED;
            }
            else
            {
                SmbStatus smbStatus = new SmbStatus();
                smbStatus.ErrorClass = SmbErrorClass.ERRDOS;
                smbStatus.Reserved = 0;
                smbStatus.ErrorCode = (ushort)SmbErrorCodeOfERRDOS.ERRbadfunc;
                smbHeader.Status = smbStatus;
            }
            response.SmbHeader = smbHeader;

            response.UpdateCountAndOffset();

            return response;
        }
 /// <summary>
 /// Deep copy constructor.
 /// </summary>
 public SmbTrans2Ioctl2FinalResponsePacket(SmbTrans2Ioctl2FinalResponsePacket packet)
     : base(packet)
 {
     this.InitDefaultValue();
 }