次の方法で共有


3.4.4.9 A Local Client Application Queries DFS Referrals

The local client application provides:

  • ClientGenericContext: An opaque blob encapsulating the underlying protocol and the protocol-specific client side context.

  • ServerName: The name of the server from which to query referrals.

  • UserCredentials: An opaque implementation-specific entity that contains the credentials to be used when authenticating to the remote server.

  • MaxOutputSize: The maximum output buffer response size, in bytes.

  • An input buffer containing the application-provided structure REQ_GET_DFS_REFERRAL specified in [MS-DFSC] section 2.2.2 or REQ_GET_DFS_REFERRAL_EX specified in [MS-DFSC] section 2.2.3.

  • FSCTL Code

If ClientGenericContext.ProtocolSpecificOpen.Connection.ServerCapabilities does not have the CAP_DFS flag set, the client SHOULD<357> return STATUS_DFS_UNAVAILABLE to the caller.

If ClientGenericContext.ProtocolDialect indicates the CIFS or the SMB protocol, the client MUST invoke the Application Requests Querying DFS Referrals (section 3.2.4.44) event, providing ServerName, UserCredentials, MaxOutputSize, and the input buffer as the parameters.

If the Application Requests Querying DFS Referrals event returns success, the client MUST return the RESP_GET_DFS_REFERRAL structure from the Trans2_Data block of the TRANS2_GET_DFS_REFERRAL Response (section 2.2.6.16.2) and MUST return success to the calling application; otherwise, the client MUST return the status code received from the event.

If ClientGenericContext.ProtocolDialect indicates the SMB2 protocol, the client MUST invoke the Application Requests DFS Referral Information ([MS-SMB2] section 3.2.4.20.3) event, providing ServerName, UserCredentials, MaxOutputSize, input buffer, and an FSCTL code as the parameters.

If the Application Requests DFS Referral Information event returns success, the client MUST return the buffer ([MS-SMB2] section 3.2.5.14.4) received from the server and MUST return success to the calling application; otherwise, the client MUST return the status code received from the event.