2.2.1.6.7 TID Generation
Tree IDs (TIDs) are generated on CIFS servers. The generation of TIDs MUST satisfy the following constraints:
The TID MUST be a 16-bit opaque value.
The TID MUST be unique within a specified client/server SMB connection.
The TID MUST remain valid for the lifetime of the SMB connection on which the tree connect request is performed, or until the client sends a request to the server to close the TID.
Once a TID has been closed, the value can be reused in the response to another tree connect request.
The value 0xFFFF MUST NOT be used as a valid TID. All other possible values for TID, including zero (0x0000), are valid. The value 0xFFFF is used to specify all TIDs or no TID, depending upon the context in which it is used.