3.1.5.2 Receiving a Connect Response Message

  1. When a Connect Response Message (section 2.2.2.2) arrives through a per-session Socket, the initiator checks if the Common Message Header (section 2.2.1.2) is valid. If not, the initiator MUST tear down the Diagnostic Session and return failure of the request to the calling layer.

  2. Next, the initiator checks the state of the per-session Handshaking field. If it is set, the initiator MUST tear down the Diagnostic Session and return failure of the request to the calling layer.

  3. Next, the initiator checks that the Pended Request is set to Connect. If not, the initiator MUST tear down the Diagnostic Session and return failure of the request to the calling layer.

  4. The Per-Session Response timer MUST then be reset. The information returned in the Connect Response Message-specific header MUST be copied into the per-session Connect Response Cache field.

  5. If the W bit in the Connect Response Message-specific header is cleared, then the initiator MUST tear down the Diagnostic Session and return success of the request to the calling layer.

  6. If the Diag_Support_Level field in the Connect Response Message-specific header is neither 0x00000001 nor 0x00000002, then the initiator MUST tear down the Diagnostic Session and return success of the request to the calling layer. Otherwise, the Pended Request MUST be set to Collect Data (value 0x000B). The initiator MUST send a Collect Data Message (section 2.2.2.3) to the sink. The Per-Session Response timer MUST be enabled and set to expire after 5 seconds.

  7. The initiator then waits for a message to arrive in order to continue processing.