2.2.10 SMB2 TREE_CONNECT Response
The SMB2 TREE_CONNECT Response packet is sent by the server when an SMB2 TREE_CONNECT request is processed successfully by the server. This response is composed of an SMB2 Packet Header (section 2.2.1) that is followed by this response structure.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
StructureSize |
ShareType |
Reserved |
|||||||||||||||||||||||||||||
ShareFlags |
|||||||||||||||||||||||||||||||
Capabilities |
|||||||||||||||||||||||||||||||
MaximalAccess |
StructureSize (2 bytes): The server MUST set this field to 16, indicating the size of the response structure, not including the header.
ShareType (1 byte): The type of share being accessed. This field MUST contain one of the following values.
-
Value
Meaning
SMB2_SHARE_TYPE_DISK
0x01
Physical disk share.
SMB2_SHARE_TYPE_PIPE
0x02
Named pipe share.
SMB2_SHARE_TYPE_PRINT
0x03
Printer share.
Reserved (1 byte): This field MUST NOT be used and MUST be reserved. The server MUST set this to 0, and the client MUST ignore it on receipt.
ShareFlags (4 bytes): This field contains properties for this share.
-
This field MUST contain one of the following offline caching properties: SMB2_SHAREFLAG_MANUAL_CACHING, SMB2_SHAREFLAG_AUTO_CACHING, SMB2_SHAREFLAG_VDO_CACHING and SMB2_SHAREFLAG_NO_CACHING.
-
For more information about offline caching, see [OFFLINE].
-
This field MUST contain zero or more of the following values.
-
Value
Meaning
SMB2_SHAREFLAG_MANUAL_CACHING
0x00000000
The client can cache files that are explicitly selected by the user for offline use.
SMB2_SHAREFLAG_AUTO_CACHING
0x00000010
The client can automatically cache files that are used by the user for offline access.
SMB2_SHAREFLAG_VDO_CACHING
0x00000020
The client can automatically cache files that are used by the user for offline access and can use those files in an offline mode even if the share is available.
SMB2_SHAREFLAG_NO_CACHING
0x00000030
Offline caching MUST NOT occur.
SMB2_SHAREFLAG_DFS
0x00000001
The specified share is present in a Distributed File System (DFS) tree structure.
SMB2_SHAREFLAG_DFS_ROOT
0x00000002
The specified share is present in a DFS Root (as specified in [MS-DFSC]) tree structure.
SMB2_SHAREFLAG_RESTRICT_EXCLUSIVE_OPENS
0x00000100
The specified share disallows exclusive file opens that deny reads to an open file.
SMB2_SHAREFLAG_FORCE_SHARED_DELETE
0x00000200
The specified share disallows clients from opening files on the share in an exclusive mode that prevents the file from being deleted until the client closes the file.
SMB2_SHAREFLAG_ALLOW_NAMESPACE_CACHING
0x00000400
The client MUST ignore this flag.
SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM
0x00000800
The server will filter directory entries based on the access permissions of the client.
SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK
0x00001000
The server will not issue exclusive caching rights on this share.<33>
SMB2_SHAREFLAG_ENABLE_HASH_V1
0x00002000
The share supports hash generation for branch cache retrieval of data. For more information, see section 2.2.31.2. This flag is not valid for the SMB 2.0.2 dialect.
SMB2_SHAREFLAG_ENABLE_HASH_V2
0x00004000
The share supports v2 hash generation for branch cache retrieval of data. For more information, see section 2.2.31.2. This flag is not valid for the SMB 2.0.2 and SMB 2.1 dialects.
SMB2_SHAREFLAG_ENCRYPT_DATA
0x00008000
The server requires encryption of remote file access messages on this share, per the conditions specified in section 3.3.5.2.11. This flag is only valid for the SMB 3.x dialect family.
SMB2_SHAREFLAG_IDENTITY_REMOTING
0x00040000
The share supports identity remoting. The client can request remoted identity access for the share via the SMB2_REMOTED_IDENTITY_TREE_CONNECT context as specified in section 2.2.9.2.1.<34>
SMB2_SHAREFLAG_COMPRESS_DATA
0x00100000
The server supports compression of read/write messages on this share. This flag is only valid for the SMB 3.1.1 dialect.<35>
SMB2_SHAREFLAG_ISOLATED_TRANSPORT
0x00200000
The server indicates that administrator set share property telling client that it is preferable to isolate communication to that share on a separate set of connections. This flag is advisory and can be ignored by SMB clients.
Capabilities (4 bytes): Indicates various capabilities for this share. This field MUST be constructed using the following values.
-
Value
Meaning
SMB2_SHARE_CAP_DFS
0x00000008
The specified share is present in a DFS tree structure.
SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY
0x00000010
The specified share is continuously available. This flag is only valid for the SMB 3.x dialect family.
SMB2_SHARE_CAP_SCALEOUT
0x00000020
The specified share is present on a server configuration which facilitates faster recovery of durable handles. This flag is only valid for the SMB 3.x dialect family.
SMB2_SHARE_CAP_CLUSTER
0x00000040
The specified share is present on a server configuration which provides monitoring of the availability of share through the Witness service specified in [MS-SWN]. This flag is only valid for the SMB 3.x dialect family.
SMB2_SHARE_CAP_ASYMMETRIC
0x00000080
The specified share is present on a server configuration that allows dynamic changes in the ownership of the share. This flag is not valid for the SMB 2.0.2, 2.1, and 3.0 dialects.
SMB2_SHARE_CAP_REDIRECT_TO_OWNER
0x00000100
The specified share is present on a server configuration that supports synchronous share level redirection via a Share Redirect error context response (section 2.2.2.2.2). This flag is not valid for SMB 2.0.2, 2.1, 3.0, and 3.0.2 dialects.
MaximalAccess (4 bytes): Contains the maximal access for the user that establishes the tree connect on the share based on the share's permissions. This value takes the form as specified in section 2.2.13.1.