Beispiel #1
0
 /// <summary>
 /// Deep copy constructor.
 /// </summary>
 public SmbTrans2SetFsInformationFinalResponsePacket(SmbTrans2SetFsInformationFinalResponsePacket packet)
     : base(packet)
 {
     this.InitDefaultValue();
 }
 /// <summary>
 /// Deep copy constructor.
 /// </summary>
 public SmbTrans2SetFsInformationFinalResponsePacket(SmbTrans2SetFsInformationFinalResponsePacket packet)
     : base(packet)
 {
     this.InitDefaultValue();
 }
        public SmbTrans2SetFsInformationFinalResponsePacket CreateTrans2SetFsInformationFinalResponse(
            CifsServerPerConnection connection,
            SmbTrans2SetFsInformationRequestPacket request)
        {
            SmbTrans2SetFsInformationFinalResponsePacket response = new SmbTrans2SetFsInformationFinalResponsePacket();
            SmbHeader smbHeader = CifsMessageUtils.CreateSmbHeader(connection, request);

            if ((smbHeader.Flags2 & SmbFlags2.SMB_FLAGS2_NT_STATUS) == SmbFlags2.SMB_FLAGS2_NT_STATUS)
            {
                smbHeader.Status = (uint)NTSTATUS.STATUS_SMB_NO_SUPPORT;
            }
            else
            {
                SmbStatus smbStatus = new SmbStatus();
                smbStatus.ErrorClass = SmbErrorClass.ERRSRV;
                smbStatus.Reserved = 0;
                smbStatus.ErrorCode = (ushort)SmbErrorCodeOfERRSRV.ERRnosupport;
                smbHeader.Status = smbStatus;
            }
            response.SmbHeader = smbHeader;

            response.UpdateCountAndOffset();

            return response;
        }