6.2.4 Match report procedure for open ProSe direct discovery
24.3343GPPProximity-services (ProSe) User Equipment (UE) to ProSe function protocol aspectsRelease 17Stage 3TS
6.2.4.1 General
The purpose of the Match report procedure for open ProSe direct discovery is to allow a UE to send a ProSe Application Code that was matched during the monitoring operation and receive the corresponding ProSe Application ID or the updated metadata, if there is no such a mapping stored locally or the Metadata Index in the ProSe Application Code indicates the metadata is updated.
The UE shall only initiate the match report procedure if it has been authorised for open ProSe direct discovery monitoring in the monitored PLMN based on the service authorisation procedure.
As a result of the match report procedure completing successfully, the UE obtains a ProSe Application ID and potentially other information, which the UE may store locally and pass to the upper layers.
6.2.4.2 Match report procedure initiation
The UE shall meet the following pre-conditions before initiating this procedure:
– a request from upper layers to monitor for the ProSe Application ID, which resulted in the matched ProSe Application Code, is still in place;
– the lower layers have provided a "Monitored PLMN ID" value, and UTC time information, along with the discovery message containing a ProSe Application Code; and
– the TTL timer T4002 associated with the Discovery Filter, which resulted in a match event of the ProSe Application Code, has not expired.
If the UE is authorised to perform open ProSe direct discovery monitoring in the monitored PLMN, it should initiate a match report procedure:
a) when there is a match event of one of the ProSe Application Codes received from the lower layers, and the UE does not have a corresponding ProSe Application ID already locally stored;
b) when the UE has a locally stored mapping for the ProSe Application Code that resulted in a match event, but the validity timer T4004 of the ProSe Application Code has expired;
c) when the UE has a locally stored mapping for the ProSe Application Code that resulted in a match event, but the match report refresh timer T4006 of the ProSe Application Code has expired; or
d) when there is a match event of one of the ProSe Application Codes received from the lower layers, and the UE has a locally stored ProSe Application Code excluding the Metadata Index portion located by the locally stored Metadata Index Mask.
The UE initiates the match report procedure for open ProSe direct discovery by sending a MATCH_REPORT message with a new transaction ID and shall set the message contents as follows:
– the UE shall set the ProSe Application Code to the ProSe Application Code for which there was a match event;
– the UE shall set the UE identity to the UE’s IMSI;
– the UE shall set the UTC-based counter as follows:
– the UE shall generate two UTC-based counters with:
1) the first counter composed of:
– the 27 most significant bits of the UTC-based counter set to the 27 most significant bits of the UTC time provided by the lower layers for the PC5_DISCOVERY message that contained the ProSe Application Code for which there was a match event encoded as specified in subclause 12.2.2.18;
– the 28th most significant bit of the UTC-based counter set to ‘0’; and
– the 4 least significant bits of the UTC-based counter shall be set to the 4 least significant bits of the UTC-based counter contained in the PC5_DISCOVERY message that contained the ProSe Application Code for which there was a match event, as specified in 3GPP TS 33.303 [6]; and
2) the second counter composed of:
– the 27 most significant bits of the UTC-based counter set to the 27 most significant bits of the UTC time provided by the lower layers for the PC5_DISCOVERY message that contained the ProSe Application Code for which there was a match event encoded as specified in subclause 12.2.2.18;
– the 28th most significant bit of the UTC-based counter set to ‘1’; and
– the 4 least significant bits of the UTC-based counter set to the 4 least significant bits of the UTC-based counter contained in the PC5_DISCOVERY message that contained the ProSe Application Code for which there was a match event, as specified in 3GPP TS 33.303 [6]; and
– then the UE shall select, among the two counters described above, the counter that is nearest to the UTC time provided by the lower layers for the PC5_DISCOVERY message that contained the ProSe Application Code for which there was a match event encoded as specified in subclause 12.2.2.18, and set the UTC-based counter in the MATCH_REPORT message to that counter;
– the UE shall set the MIC to the MIC of the PC5_DISCOVERY message that contained the ProSe Application Code for which there was a match event;
– the UE shall set the Message Type to the value of Message Type field of the PC5_DISCOVERY message that contained the ProSe Application Code for which there was a match event;
– the UE shall set the Monitored PLMN ID to the PLMN ID of the PLMN where the PC5_DISCOVERY message was received, as provided by the lower layers;
– if the UE was roaming when the match event occurred, the UE shall set the VPLMN ID to the PLMN ID of the PLMN in which the UE was registered when the match event occurred;
– the UE shall set the Metadata Flag to indicate whether or not it wishes to receive metadata information associated with the ProSe Application ID in the MATCH_REPORT_ACK message from the ProSe Function; and
– optionally the PC5_tech set to the PC5 radio technology for which there was a match event. PC5_tech may include more than one PC5 radio technology.
NOTE 1: A UE can include one or multiple transactions in one MATCH_REPORT message for different ProSe Application Codes, and receive corresponding <match-ack> element or <match-reject> element in the MATCH_REPORT_ACK message for each respective transaction. In the following description of match report procedure, only one transaction is included.
NOTE 2: The value of the Metadata Flag is determined through an indication from upper layers in the original request to monitor for a ProSe Application ID.
Figure 6.2.4.2.1 illustrates the interaction between the UE and the ProSe Function in the match report procedure.
Figure 6.2.4.2.1: Match report procedure
6.2.4.3 Match report procedure accepted by the ProSe Function
Upon receiving a MATCH_REPORT message, the ProSe Function shall check whether there is an existing context for the UE identified by its IMSI. If there is no associated UE context, the ProSe Function checks with the HSS whether the UE is authorised for open ProSe direct discovery monitoring as described in 3GPP TS 29.344 [3].
The ProSe Function shall also check the PLMN ID in the ProSe Application Code received from the UE. If the PLMN ID in the ProSe Application Code is not the same of that of the PLMN to which the ProSe Function belongs, the ProSe Function shall execute the procedures defined in 3GPP TS 29.345 [5]. Otherwise, the ProSe Function shall check whether the received ProSe Application Code is authorised to be transmitted on the monitored PLMN indicated in the Monitored PLMN ID in the received message.
If the ProSe Application Code is PLMN-specific, the ProSe Function shall verify if the PLMN ID in the ProSe Application Code is the same as the PLMN of the ProSe Function. If so, the ProSe Function shall map the ProSe Application Code to the corresponding ProSe Application ID from the PLMN-specific database. If the ProSe Application Code is country-specific, as specified in subclause 24.3 of 3GPP TS 23.003 [4], the ProSe Function shall check whether the MCC of the PLMN ID part of the ProSe Application Code corresponds to the country of the ProSe Function. If so, the ProSe Function shall map the ProSe Application Code to the corresponding ProSe Application ID from the country-specific database. If the ProSe Application Code is global as specified in subclause 24.3 of 3GPP TS 23.003 [4], the ProSe Function shall map the ProSe Application Code to the corresponding ProSe Application ID from the global database. If the ProSe Application Code contains a ProSe Application Code Prefix, the ProSe Function maps the ProSe Application Code Prefix to the corresponding ProSe Application ID.
The ProSe Function shall analyse the ProSe Application Code received from the UE and determine the validity of the ProSe Application Code.
NOTE: This might require the ProSe Function to execute procedures defined in 3GPP TS 29.345 [5].
The ProSe Function shall check if the MIC value and its corresponding UTC-based counter are valid, as defined in 3GPP TS 33.303 [6].
If the VPLMN ID is included in the MATCH_REPORT message, the ProSe Function uses it for charging purposes as specified in 3GPP TS 32.277 [27].
If the outcome of above processing is successful, the ProSe Function shall send a MATCH_REPORT_ACK message containing a <match-ack> element with:
– the transaction ID set to the value of the transaction ID received in the MATCH_REPORT message from the UE;
– the ProSe Application ID set to the ProSe Application ID provided by the ProSe Function and corresponding to the ProSe Application Code contained in the MATCH_REPORT message;
– the Validity Timer T4004 set to indicate for how long this ProSe Application Code is valid; and
– the Match Report Refresh Timer T4006 set to indicate for how long the UE will wait before sending a new Match Report for this ProSe Application Code.
If the UE has set the Metadata Flag to indicate that it wishes to receive metadata information associated with the ProSe Application ID, the ProSe Function shall set the Metadata to the metadata information associated with the ProSe Application Code received in the MATCH_REPORT message and set the Metadata Index Mask to the Metadata Index Mask allocated by the ProSe Function for the ProSe Application Code received in the MATCH_REPORT message.
6.2.4.4 Match report procedure completion by the UE
Upon receipt of the MATCH_REPORT_ACK message, if the transaction ID contained in the <match-ack> element matches the value sent by the UE in a MATCH_REPORT message, the UE shall store the mapping between the ProSe Application Code and ProSe Application ID locally, start timers T4004 and T4006, and may inform the upper layers of this match of the ProSe Application ID. If the Metadata Index Mask is contained in the MATCH_REPORT_ACK message, the UE shall also store the Metadata Index Mask with the ProSe Application Code and the ProSe Application ID locally. If there is a locally stored mapping between the ProSe Application ID and a ProSe Application Code, the UE shall delete the old mapping. Otherwise the UE shall discard the MATCH_REPORT_ACK message.
Upon receipt of the MATCH_REPORT_ACK message, if the transaction ID contained in the <match-reject> element matches the value sent by the UE in a MATCH_REPORT message and if the received PC3 Control Protocol cause value is #5 "Invalid MIC", as specified in subclause 6.2.4.5, the UE shall stop timer T4004 if it is running.
NOTE 1: It is an implementation specific choice whether the UE informs the upper layers every time a ProSe Application ID triggers a match event, or only the first time this match occurs.
NOTE 2: The UE can also inform the upper layers if a ProSe Application ID is no longer matched, because the validity timer T4004 of the corresponding ProSe Application Code expires.
NOTE 3: The UE can also inform the upper layers if a ProSe Application ID is no longer matched, because the validity timer T4004 of the corresponding ProSe Application Code is stopped upon receiving MATCH_REPORT_ACK message with a <match-reject> element with PC3 Control Protocol cause value #5 "Invalid MIC".
6.2.4.5 Match report procedure not accepted by the ProSe Function
If the MATCH_REPORT message is not accepted by the ProSe Function, the ProSe Function sends a MATCH_REPORT_ACK message with a <match-reject> element to the UE including an appropriate PC3 Control Protocol cause value.
If the ProSe Application Code contained in the MATCH_REPORT message is unknown by the ProSe Function, the ProSe Function shall send the MATCH_REPORT_ACK message with a <match-reject> element with PC3 Control Protocol cause value #4 "Unknown ProSe Application Code".
If the check of the MIC contained in the MATCH_REPORT message fails, the ProSe Function shall send the MATCH_REPORT_ACK message with a <match-reject> element with PC3 Control Protocol cause value #5 "Invalid MIC".
If the check of the UTC-based counter contained in the MATCH_REPORT message fails, the ProSe Function shall send the MATCH_REPORT_ACK message with a <match-reject> element with PC3 Control Protocol cause value #6 "Invalid UTC-based counter".
If the UE is not authorised for open ProSe direct discovery monitoring in the monitored PLMN contained in the MATCH_REPORT message, the ProSe Function shall send the MATCH_REPORT_ACK message with a <match-reject> element with PC3 Control Protocol cause value #3 "UE authorisation failure".
6.2.4.6 Abnormal cases
6.2.4.6.1 Abnormal cases in the UE
The following abnormal cases can be identified:
a) Indication from the transport layer of transmission failure of MATCH_REPORT message (e.g. after TCP retransmission timeout)
The UE shall close the existing secure connection to the ProSe Function, establish a new secure connection and then restart the match report procedure.
b) No response from the ProSe Function after the MATCH_REPORT message has been successfully delivered (e.g. TCP ACK has been received for the MATCH_REPORT message)
If the TTL timer T4002 associated with the Discovery Filter which resulted in a match event has not expired, the UE shall retransmit the MATCH_REPORT message.
NOTE: The timer to trigger retransmission and the maximum number of allowed retransmissions are UE implementation specific.
c) Change of PLMN
If a PLMN change occurs before the match report procedure is completed, the procedure shall be aborted.