/// <summary> /// Deep copy constructor. /// </summary> public SmbWriteRawFinalResponsePacket(SmbWriteRawFinalResponsePacket packet) : base(packet) { this.InitDefaultValue(); this.smbParameters.WordCount = packet.SmbParameters.WordCount; this.smbParameters.Count = packet.SmbParameters.Count; this.smbData.ByteCount = packet.SmbData.ByteCount; }
/// <summary> /// Deep copy constructor. /// </summary> public SmbWriteRawFinalResponsePacket(SmbWriteRawFinalResponsePacket packet) : base(packet) { this.InitDefaultValue(); this.smbParameters.WordCount = packet.SmbParameters.WordCount; this.smbParameters.Count = packet.SmbParameters.Count; this.smbData.ByteCount = packet.SmbData.ByteCount; }
public SmbWriteRawFinalResponsePacket CreateWriteRawFinalResponse( CifsServerPerConnection connection, SmbWriteRawRequestPacket request, ushort count) { SmbWriteRawFinalResponsePacket response = new SmbWriteRawFinalResponsePacket(); SmbHeader smbHeader = CifsMessageUtils.CreateSmbHeader(connection, request); smbHeader.Command = SmbCommand.SMB_COM_WRITE_COMPLETE; response.SmbHeader = smbHeader; SMB_COM_WRITE_RAW_FinalResponse_SMB_Parameters smbParameters = response.SmbParameters; smbParameters.Count = count; smbParameters.WordCount = (byte)(TypeMarshal.GetBlockMemorySize(smbParameters) / 2); response.SmbParameters = smbParameters; return response; }