2.2.31.2 SRV_READ_HASH Request
The SRV_READ_HASH request is sent to the server by the client in an SMB2 IOCTL Request FSCTL_SRV_READ_HASH to retrieve data from the Content Information File associated with a specified file. The request is not valid for the SMB 2.0.2 dialect. It is set as the contents of the input data buffer. This packet consists of the following:
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HashType |
|||||||||||||||||||||||||||||||
HashVersion |
|||||||||||||||||||||||||||||||
HashRetrievalType |
|||||||||||||||||||||||||||||||
Length |
|||||||||||||||||||||||||||||||
Offset |
|||||||||||||||||||||||||||||||
... |
HashType (4 bytes): The hash type of the request indicates what the hash is used for. This field MUST be set to the following value:
-
Value
Meaning
SRV_HASH_TYPE_PEER_DIST
0x00000001
Indicates the hash is requested for branch caching as described in [MS-PCCRC].
HashVersion (4 bytes): The version number of the algorithm used to create the Content Information. This field MUST be set to one of the following values:
-
Value
Meaning
SRV_HASH_VER_1
0x00000001
Branch cache version 1.
SRV_HASH_VER_2
0x00000002
Branch cache version 2. This value is only applicable for the SMB 3.x dialect family.
HashRetrievalType (4 bytes): Indicates the nature of the Offset field. This field MUST be set to one of the following values:
-
Value
Meaning
SRV_HASH_RETRIEVE_HASH_BASED
0x00000001
The Offset field in the SRV_READ_HASH request is relative to the beginning of the Content Information File.
SRV_HASH_RETRIEVE_FILE_BASED
0x00000002
The Offset field in the SRV_READ_HASH request is relative to the beginning of the file indicated by the FileId field in the IOCTL request. This value is only applicable for the SMB 3.x dialect family.
Length (4 bytes): If HashRetrievalType is SRV_HASH_RETRIEVE_HASH_BASED, this value is the maximum length, in bytes, of the hash data to be returned in the SRV_READ_HASH response to the client. If HashRetrievalType is SRV_HASH_RETRIEVE_FILE_BASED, this value is the maximum length, in bytes, of the file data for which the hash information is to be retrieved and returned in the SRV_READ_HASH response to the client.
Offset (8 bytes): If HashRetrievalType is SRV_HASH_RETRIEVE_HASH_BASED, this value is the offset of the data to be retrieved, in bytes, from the beginning of the Content Information File. If HashRetrievalType is SRV_HASH_RETRIEVE_FILE_BASED, this value is the offset in the file for which the hash information is to be retrieved.