public SmbNtTransactRenameResponsePacket CreateNtTransactRenameResponse( CifsServerPerConnection connection, SmbNtTransactRenameRequestPacket request) { SmbNtTransactRenameResponsePacket response = new SmbNtTransactRenameResponsePacket(); 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_BAD_COMMAND; } else { SmbStatus smbStatus = new SmbStatus(); smbStatus.ErrorClass = SmbErrorClass.ERRSRV; smbStatus.Reserved = 0; smbStatus.ErrorCode = (ushort)SmbErrorCodeOfERRSRV.ERRbadcmd; smbHeader.Status = smbStatus; } response.SmbHeader = smbHeader; response.UpdateCountAndOffset(); return response; }
/// <summary> /// Deep copy constructor. /// </summary> public SmbNtTransactRenameResponsePacket(SmbNtTransactRenameResponsePacket packet) : base(packet) { this.InitDefaultValue(); }