/// <summary>
 /// Deep copy constructor.
 /// </summary>
 public SmbTransWriteNmpipeSuccessResponsePacket(SmbTransWriteNmpipeSuccessResponsePacket packet)
     : base(packet)
 {
     this.InitDefaultValue();
     this.transParameters.BytesWritten = packet.transParameters.BytesWritten;
 }
 /// <summary>
 /// Deep copy constructor.
 /// </summary>
 public SmbTransWriteNmpipeSuccessResponsePacket(SmbTransWriteNmpipeSuccessResponsePacket packet)
     : base(packet)
 {
     this.InitDefaultValue();
     this.transParameters.BytesWritten = packet.transParameters.BytesWritten;
 }
コード例 #3
0
        public SmbTransWriteNmpipeSuccessResponsePacket CreateTransWriteNmpipeSuccessResponse(
            CifsServerPerConnection connection,
            SmbTransWriteNmpipeRequestPacket request)
        {
            SmbTransWriteNmpipeSuccessResponsePacket response = new SmbTransWriteNmpipeSuccessResponsePacket();
            response.SmbHeader = CifsMessageUtils.CreateSmbHeader(connection, request);

            TRANS_WRITE_NMPIPE_Response_Trans_Parameters transParameters = response.TransParameters;
            transParameters.BytesWritten = (ushort)request.TransData.WriteData.Length;
            response.TransParameters = transParameters;

            response.UpdateCountAndOffset();

            return response;
        }