Connecting to the Target Server

The ServerName and the optional TransportIdentifier provided by the caller are used to establish the connection. The client SHOULD resolve the ServerName as described in [MS-WPO] section 7.1.4, and SHOULD attempt connections to one or more of the returned addresses. The client can attempt to initiate each such SMB2 connection on all configured transports that it allows<98>, most commonly Direct TCP and the other transports described in section 2.1.

The client can choose to prioritize the addresses and/or transport order and try each one sequentially, or try to connect on them all and select one using any implementation-specific heuristic<99>. The client can accept the TransportIdentifier parameter from the calling application, which specifies what transport to use, and then attempt to use the transport specified. If the connection attempt is successful, a connection object MUST be created, as specified in section, with the following default parameters:

  • Connection.SessionTable MUST be set to an empty table.

  • Connection.OutstandingRequests MUST be set to an empty table.

  • Connection.SequenceWindow MUST be set to a sequence window, as specified in section, with a single starting sequence number available, which is "0".

  • Connection.GSSNegotiateToken MUST be set to an empty array.

  • Connection.Dialect, if implemented, MUST be set to "Unknown".

  • Connection.RequireSigning MUST be set to FALSE.

  • Connection.ServerName MUST be set to the application-supplied server name.

This connection MUST be inserted into ConnectionTable, and processing MUST continue, as specified in section

If the connection attempt fails, the client returns the error code to the calling application.