3.3.5.4 PRELOGIN Ready State

Applies to only TDS 8.0

If the packet is not a structurally correct PRELOGIN packet or if the PRELOGIN packet does not contain the client version as the first option token, the TDS server closes the underlying transport connection, indicates an error to the upper layer, and enters the "Final State" state. Otherwise, the TDS server MUST return to the client a PRELOGIN structure wrapped in a table response (0x04) packet and enter the "Login Ready" state if encryption is negotiated.

If a FEDAUTHREQUIRED option is contained in the PRELOGIN structure sent by the server to the client, the TDS server MUST maintain the value of the FEDAUTHREQUIRED option in a state variable to validate the LOGIN7 message with the FEDAUTH FeatureId when the message arrives, as described in section 3.3.5.5.

If no FEDAUTHREQUIRED option is contained in the PRELOGIN structure sent by the server to the client or if the value of B_FEDAUTHREQUIRED = 0, the TDS client can treat both events as equivalent and MUST remember the event in a state variable. Either state is treated the same when the state variables are examined in the "Login Ready" state (see section 3.3.5.5 for further details).

If NONCEOPT is specified in both the client PRELOGIN message and the server PRELOGIN message, the TDS server MUST maintain a state variable that includes the values of both the NONCE it sent to the client and the NONCE the client sent to it during the PRELOGIN exchange.