Export (0) Print
Expand All

3.2.4.20.7 Application Requests Content Information for a File

An application can request Content Information from the server that contains a set of hashes that can be used by the application to retrieve the contents of a specific file using the branch cache, as specified in [MS-PCCRC]. This request is not supported for the SMB 2.002 dialect. To retrieve the Content Information, the application provides the following:

  • The HashType, as specified in section 2.2.31.2.

  • The HashVersion, as specified in section 2.2.31.2.

  • The HashRetrievalType, as specified in section 2.2.31.2.

  • A handle to the Open identifying the remote file with which the Content Information is associated.

  • The maximum number of bytes to get from the associated Content Information data structure.

  • The offset into the Content Information data structure, if the structure is being retrieved across multiple requests, in bytes.

If the handle is invalid, or if no Open referenced by the handle is found, the client MUST return an implementation-specific error code. If the handle is valid and Open is found, the client MUST proceed as follows.

If Open.Connection is NULL, and Open.Durable is TRUE, the client SHOULD attempt to reconnect to this open, as specified in section 3.2.4.4. If the reconnect succeeds, this FSCTL MUST be retried. If it fails, the error code MUST be returned to the application.

If Open.Connection is NULL, and Open.Durable is FALSE, the client MUST fail this FSCTL operation.

If Open.Connection is not NULL and Open.Connection.Dialect is "2.002", the client MUST fail the application request with STATUS_NOT_SUPPORTED.

If Open.Connection is not NULL, the client MUST format a SMB2 IOCTL Request following the syntax specified in section 2.2.31. The SMB2 header MUST be initialized as follows:

  • The Command field is set to SMB2 IOCTL.

  • The MessageId field is set as specified in section 3.2.4.1.3.

  • The SessionId field is set to Open.TreeConnect.Session.SessionId.

  • The TreeId field is set to Open.TreeConnect.TreeConnectId.

The SMB2 IOCTL Request MUST be initialized as follows:

  • The CtlCode field is set to FSCTL_SRV_READ_HASH.

  • The FileId field is set to Open.FileId.

  • The InputOffset field is set to the offset to the Buffer[], in bytes, from the beginning of the SMB2 header.

  • The InputCount is set to the size, in bytes, of the SRV_READ_HASH request structure that is constructed following the syntax specified in section 2.2.31.2 with the client input parameters as follows:

    • The client initializes a SRV_READ_HASH request structure following the syntax specified in section 2.2.31.2 using the application provided hash type, hash version, hash retrieval type, length and offset, in bytes.

  • The SRV_READ_HASH request structure is copied into the request at InputOffset bytes from the beginning of the SMB2 header.

  • The OutputOffset field SHOULD<136> be set to zero.

  • The OutputCount field is set to 0.

  • The MaxInputResponse field is set to 0.

  • The MaxOutputResponse field is set to the maximum number of bytes that the application expects to retrieve.

  • The SMB2_0_IOCTL_IS_FSCTL in the Flags field is set to TRUE.

The request MUST be sent to the server, and the response from the server MUST be handled as described in section 3.2.5.14.7.

The status of the response MUST be returned to the application.

 
Show:
© 2014 Microsoft