/// <summary>
        /// Deep copy constructor.
        /// </summary>
        public SmbFindCloseResponsePacket(SmbFindCloseResponsePacket packet)
            : base(packet)
        {
            this.InitDefaultValue();

            this.smbParameters.WordCount = packet.SmbParameters.WordCount;
            this.smbParameters.Count = packet.SmbParameters.Count;
            this.smbData.ByteCount = packet.SmbData.ByteCount;
            this.smbData.BufferFormat = packet.SmbData.BufferFormat;
            this.smbData.DataLength = packet.SmbData.DataLength;
        }
示例#2
0
        /// <summary>
        /// Deep copy constructor.
        /// </summary>
        public SmbFindCloseResponsePacket(SmbFindCloseResponsePacket packet)
            : base(packet)
        {
            this.InitDefaultValue();

            this.smbParameters.WordCount = packet.SmbParameters.WordCount;
            this.smbParameters.Count     = packet.SmbParameters.Count;
            this.smbData.ByteCount       = packet.SmbData.ByteCount;
            this.smbData.BufferFormat    = packet.SmbData.BufferFormat;
            this.smbData.DataLength      = packet.SmbData.DataLength;
        }
        public SmbFindCloseResponsePacket CreateFindCloseResponse(
            CifsServerPerConnection connection,
            SmbFindCloseRequestPacket request)
        {
            SmbFindCloseResponsePacket response = new SmbFindCloseResponsePacket();
            response.SmbHeader = CifsMessageUtils.CreateSmbHeader(connection, request);

            SMB_COM_FIND_CLOSE_Response_SMB_Parameters smbParameters = response.SmbParameters;
            smbParameters.Count = 0x00;
            smbParameters.WordCount = (byte)(TypeMarshal.GetBlockMemorySize(smbParameters) / 2);
            response.SmbParameters = smbParameters;

            SMB_COM_FIND_CLOSE_Response_SMB_Data smbData = response.SmbData;
            smbData.BufferFormat = 0x05;
            smbData.DataLength = 0x0000;
            smbData.ByteCount = 0x0003;
            response.SmbData = smbData;

            return response;
        }