3.1.5.4 Receiving a Probegap Probe message from sink device

When a Probegap Probe message arrives through a UDP Socket, it is correlated back to a Probegap Session object.

The initiator validates the fields in the message header as per section 2.2.1.1 and section 2.2.2.3. Note that the Proto_and_Msg_ID field in the Handshake header of the message MUST be set to 0x06 (Probegap Probe originating from sink). If any of the headers contain an invalid value, the initiator MUST fail the Probegap Experiment request that instantiated the session and the associated session object is deleted.

Next, the initiator MUST search the per-session Results array, starting at the index specified by the per-session Next Result Index and ending immediately at per-session Next Send Index, matching the value of the Sequence_Number field in the Probegap Probe message header against the Sequence_Number field in each Probe Description entry. If a match is not found, the message is ignored and event processing is complete.

Match- If a match is found, the matching Probe Description's Destination Receive Timestamp field MUST be set to the value of the Sink_Recv_Timestamp field in the message header. The Probe Description's Destination Send Timestamp field MUST be set to the value of the Sink_Send_Timestamp field in the message header. The Probe Description's Source Receive Timestamp MUST be set to the current timestamp of the initiator device. The per-session Next Result Index MUST be incremented by 1. The initiator then invokes the routine identified by the per-session Estimation Callback field.