Commit e41be698 authored by Yann Garcia's avatar Yann Garcia
Browse files

Make the data call affect the verdict

parent 25b1eed8
Loading
Loading
Loading
Loading
+74 −2
Changes for ttcn/AtsNGAP/NGAP_Steps.ttcn: 74 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -713,8 +713,11 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
         *            of the first one: while blocked on a confirmation, a_defaultNGAP would consume the
         *            REGISTRATION REQUEST.
         *          Finally awaits the REGISTRATION REQUEST (f_await_registration_request).
         * @param  p_dataCallCnf When true, the data call asks for a confirmation (CNF_REQUIRED), which is not
         *         waited on here: it stays queued on utPtcMtcPort until f_NGAP_gnb_UE_await_data_call reads it,
         *         once the PDU session is set up. When false (default), the data call result is not reported.
         */
        function f_NGAP_gnb_UE_Register() runs on gNBNGAPComponent {
        function f_NGAP_gnb_UE_Register(in boolean p_dataCallCnf := false) runs on gNBNGAPComponent {
            log(">>> f_NGAP_gnb_UE_Register");
            if (PICS_OFFLINE_MODE) {
                f_await_NGSetupRequest_await_NGSetupResponse();
@@ -735,7 +738,10 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
                // and only a local one (LOCAL_CNF_REQUIRED: confirmed as soon as the command is written
                // to the modem); a later request is only written once the previous ones are done, which
                // can be after the Registration Request. The actual results are only visible in the
                // upper tester log; here only the resulting NAS signalling is checked.
                // upper tester log; here only the resulting NAS signalling is checked, except for the
                // data call with p_dataCallCnf: its confirmation is sent, without waiting for it, and read
                // later by f_NGAP_gnb_UE_await_data_call (no default altstep reads utPtcMtcPort, so it
                // stays queued meanwhile).
                // The modem is restarted with AT+CFUN=1,1 (MODEM_RESTART); the upper tester only
                // carries on with the next request once the modem answers again, about 30 s later.
                // With PX_UT_PLMN_MANUAL_SELECT, the modem is then set to full functionality with
@@ -762,17 +768,83 @@ module NGAP_Steps { // TODO FSCOM f_xxx_UE_SecurityMode to be mmoved into NAG_NG
                }

                log("f_NGAP_gnb_UE_Register: Requesting a data call: APN=", PX_UT_DATA_CALL_APN, ", attach timeout=", PX_UT_DATA_CALL_ATTACH_TIMEOUT);
                if (p_dataCallCnf) {
                    fl_UT_ApplyCommand(utPtcMtcPort, cas_UT_Req(ACTIVATE_BEARER, CNF_REQUIRED, {
                                                                                                cs_Ut_Parameter_Common("APN", PX_UT_DATA_CALL_APN),
                                                                                                cs_Ut_Parameter_Common("ATTACH_TIMEOUT", float2str(PX_UT_DATA_CALL_ATTACH_TIMEOUT))
                                                                                                }), true); // Confirmation read by f_NGAP_gnb_UE_await_data_call
                } else {
                    fl_UT_ApplyCommand(utPtcMtcPort, cas_UT_Req(ACTIVATE_BEARER, NO_CNF_REQUIRED, {
                                                                                                   cs_Ut_Parameter_Common("APN", PX_UT_DATA_CALL_APN),
                                                                                                   cs_Ut_Parameter_Common("ATTACH_TIMEOUT", float2str(PX_UT_DATA_CALL_ATTACH_TIMEOUT))
                                                                                                   }));
                }
            }

            log("f_NGAP_gnb_UE_Register: f_send_NGSetupRequest_await_NGSetupResponse done");
            f_await_registration_request();
            log("<<< f_NGAP_gnb_UE_Register");
        } // End of function f_NGAP_gnb_UE_Register

        /**
         * @brief  Check the result of the data call requested by f_NGAP_gnb_UE_Register(true).
         * @details Awaits, for up to PX_UT_DATA_CALL_CNF_TIMEOUT, the confirmation of ACTIVATE_BEARER queued on
         *          utPtcMtcPort. The upper tester confirms success only once the modem reports an IP address; its
         *          ResultString then ends with "+UT: data call connected: cid=<cid> ip=<address>". The address must
         *          be the one the test system assigned in the PDU SESSION ESTABLISHMENT ACCEPT
         *          (PX_UT_PDU_ADDRESS_IPV4).
         *          The verdict is set to inconc, with the reason, if the data call failed (ResultString then holds
         *          the AT transcript of the request), was not confirmed in time, or the UE took another address.
         *          It is left unchanged otherwise.
         * @return true if the UE is connected with PX_UT_PDU_ADDRESS_IPV4, false otherwise.
         */
        function f_NGAP_gnb_UE_await_data_call() runs on gNBNGAPComponent return boolean {
            var UT_COMMON_CNF v_cnf;
            var charstring v_result := "";
            var charstring v_expected := int2str(oct2int(PX_UT_PDU_ADDRESS_IPV4[0])) & "." & int2str(oct2int(PX_UT_PDU_ADDRESS_IPV4[1])) & "."
                                         & int2str(oct2int(PX_UT_PDU_ADDRESS_IPV4[2])) & "." & int2str(oct2int(PX_UT_PDU_ADDRESS_IPV4[3]));
            var charstring v_address := "";
            timer t_cnf := PX_UT_DATA_CALL_CNF_TIMEOUT;

            log(">>> f_NGAP_gnb_UE_await_data_call");
            t_cnf.start;
            alt {
                [] utPtcMtcPort.receive(car_UT_COMMON_CNF) -> value v_cnf {
                    t_cnf.stop;
                }
                [] t_cnf.timeout {
                    log("*** " & __SCOPE__ & ": INCONC: no data call result from the upper tester within ", PX_UT_DATA_CALL_CNF_TIMEOUT, " s ***");
                    setverdict(inconc, "data call: no result from the upper tester");
                    return false;
                }
            }
            if (ispresent(v_cnf.ResultString)) {
                v_result := v_cnf.ResultString;
            }
            if (not v_cnf.Result) {
                log("*** " & __SCOPE__ & ": INCONC: data call failed: ", v_result, " ***");
                setverdict(inconc, "data call failed: " & v_result);
                return false;
            }

            // The address is what follows the last "ip=", up to the end of its line
            for (var integer i := lengthof(v_result) - 3; i >= 0; i := i - 1) {
                if (substr(v_result, i, 3) == "ip=") {
                    for (var integer j := i + 3; j < lengthof(v_result) and v_result[j] != "\r" and v_result[j] != "\n"; j := j + 1) {
                        v_address := v_address & v_result[j];
                    }
                    break;
                }
            }
            if (v_address != v_expected) {
                log("*** " & __SCOPE__ & ": INCONC: the UE is connected with address '", v_address, "', expected ", v_expected, " ***");
                setverdict(inconc, "data call: UE address " & v_address & ", expected " & v_expected);
                return false;
            }
            log("*** " & __SCOPE__ & ": INFO: data call connected, UE address ", v_address, " ***");
            return true;
        } // End of function f_NGAP_gnb_UE_await_data_call

        /**
         * @brief  ERROR INDICATION, the test system playing the AMF.
         * @details In offline mode (PICS_OFFLINE_MODE), both directions are read from a capture:
+10 −1
Changes for ttcn/AtsNGAP/NGAP_TCFunctions.ttcn: 10 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ module NGAP_TCFunctions {

                // Preamble
                f_NGAP_gnb_init();
                f_NGAP_gnb_UE_Register();       // f_await_NGSetupRequest_send_NGSetupRespone();
                f_NGAP_gnb_UE_Register(true);   // f_await_NGSetupRequest_send_NGSetupRespone();
                                                // f_await_registration_request();
                f_NGAP_gnb_UE_Authentication(); // f_send_authentication_request_await_authentication_response
                f_NGAP_gnb_UE_SecurityMode();   // f_send_security_mode_command_await_security_mode_complete
@@ -157,6 +157,15 @@ module NGAP_TCFunctions {
                        log("*** " & __SCOPE__ & ": FAIL: PDU session resources not set up by the gNB. ***");
                        setverdict(fail);
                    }

                    // With a real UE, the PDU session must also be usable from the UE: the upper tester reports
                    // the data call result once the modem has its IP address (inconc otherwise, see
                    // f_NGAP_gnb_UE_await_data_call)
                    if (PICS_USE_AT_COMMANDS and v_setup) {
                        if (not f_NGAP_gnb_UE_await_data_call()) {
                            log("*** " & __SCOPE__ & ": INCONC: the PDU session is set up, but the UE data call is not connected. ***");
                        }
                    }
                }

                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
+14 −5
Changes for ttcn/AtsNGAP/NGAP_UtDispatcher.ttcn: 14 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ module NGAP_UtDispatcher {
     * @brief  Main behaviour of the dedicated Upper Tester dispatcher component started by
     *         f_cf_Ut_Up.
     * @details Handles PTC requests, one at a time, until p_ptc terminates, then ends so the MTC
     *         does not wait tc_sync for it. Each confirmed UT command sets the verdict of this
     *         does not wait tc_sync for it, even while waiting for a UT confirmation (e.g. a data
     *         call the test case did not wait for). Each confirmed UT command sets the verdict of this
     *         component (pass on success, inconc on failure or timeout), which contributes to
     *         the test case verdict.
     *         Deliberately not activated as a default altstep on the MTC (see module @desc above).
@@ -29,7 +30,7 @@ module NGAP_UtDispatcher {
     */
    function f_UtDispatcherMain(in NGNASComponent p_ptc) runs on NGNASComponent {
        alt {
            [] as_UT_Dispatcher(true);
            [] as_UT_Dispatcher(true, p_ptc);
            [] p_ptc.done {
                log("f_UtDispatcherMain: PTC done, stopping the UT dispatcher");
            }
@@ -40,12 +41,13 @@ module NGAP_UtDispatcher {
     * @brief  Handle one PTC request, and go back to waiting for the next one.
     * @param  p_setVerdict When true, set the verdict from the UT confirmation
     *         (see f_UT_HandleRequest).
     * @param  p_ptc The PTC served, or null (see f_UT_HandleRequest).
     */
    altstep as_UT_Dispatcher(in boolean p_setVerdict := false) runs on NGNASComponent {
    altstep as_UT_Dispatcher(in boolean p_setVerdict := false, in NGNASComponent p_ptc := null) runs on NGNASComponent {
        var UT_COMMON_CMD v_cmd;

        [] utMtcPtcPort.receive(car_UT_ReqAny) -> value v_cmd {
            f_UT_HandleRequest(v_cmd, p_setVerdict);
            f_UT_HandleRequest(v_cmd, p_setVerdict, p_ptc);
            repeat;
        }
    }
@@ -58,8 +60,12 @@ module NGAP_UtDispatcher {
     *         Requests without confirmation (NO_CNF_REQUIRED) leave the verdict unchanged.
     *         A failure is logged with the confirmation's ResultString, which holds the AT
     *         transcript of the request; it is also the inconc verdict reason.
     * @param  p_ptc The PTC that sent the request, or null. When given, stop waiting for the
     *         confirmation as soon as it terminates: nobody is left to receive it, and the
     *         verdict is left unchanged.
     */
    function f_UT_HandleRequest(in UT_COMMON_CMD p_cmd, in boolean p_setVerdict := false) runs on NGNASComponent {
    function f_UT_HandleRequest(in UT_COMMON_CMD p_cmd, in boolean p_setVerdict := false,
                                in NGNASComponent p_ptc := null) runs on NGNASComponent {
        var Ut_System_Cmd_Type v_sys;
        var UT_COMMON_CNF v_cnf;
        timer t_cnf := PX_UT_CNF_TIMEOUT;
@@ -97,6 +103,9 @@ module NGAP_UtDispatcher {
                }
                utMtcPtcPort.send(v_cnf);
            }
            [p_ptc != null] p_ptc.done {
                log("f_UT_HandleRequest: PTC done before the confirmation of ", p_cmd.Cmd, ", no longer waiting for it");
            }
            [] t_cnf.timeout {
                log("f_UT_HandleRequest: no confirmation for ", p_cmd.Cmd);
                if (p_setVerdict) { setverdict(inconc, "UT command not confirmed in time"); }
+4 −0
Changes for ttcn/LibNGAP/lib/LibNGAP_Pixits.ttcn: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -742,6 +742,10 @@ module LibNGAP_Pixits {
    /** @desc Time, in seconds, the upper tester waits for the real UE to be attached before it dials the data call; it must cover the registration procedure */
    modulepar float      PX_UT_DATA_CALL_ATTACH_TIMEOUT := 60.0;

    /** @desc Time, in seconds, the test waits for the result of the data call of the real UE once the PDU session is set up;
     *        see f_NGAP_gnb_UE_await_data_call */
    modulepar float      PX_UT_DATA_CALL_CNF_TIMEOUT := 30.0;

    /** @desc Whether, after its restart (AT+CFUN=1,1), the real UE (AT commands) is set to full functionality (AT+CFUN=1) and
     *        forced onto PX_UT_PLMN_MCC/PX_UT_PLMN_MNC (AT+COPS=1); see f_NGAP_gnb_UE_Register.
     *        false: it is only restarted, and registers by itself on the PLMN it selects. */
+33 −19
Changes for ttcn/LibNGAP/lib_system/LibNGAP_Functions.ttcn: 33 added lines, 19 removed lines.
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ module LibNGAP_Functions {
                                                                 PX_PAGING_DRX
            )));
        }
        setverdict(pass, "Received NG_SETUP_REQUEST NGAP message");

        // Send NGSetupResponse
        f_send_NGAP_PDU(
@@ -149,6 +150,8 @@ module LibNGAP_Functions {
                                                              *
                                                              }
                        )));

        setverdict(pass, "Received NG_SETUP_RESPONSE NGAP message");
    }

    /**
@@ -208,6 +211,7 @@ module LibNGAP_Functions {
                                                              *
                                                              }
                        )));
        setverdict(pass, "Received NG_SETUP_RESPONSE NGAP message");
    }

    /**
@@ -251,6 +255,7 @@ module LibNGAP_Functions {
                                                                           },
                                                                           PX_PAGING_DRX
                        )));
        setverdict(pass, "Received NG_SETUP_REQUEST NGAP message");

        // Await NGSetupResponse
        f_recv_NGAP_PDU(
@@ -266,6 +271,7 @@ module LibNGAP_Functions {
                                                              *
                                                              }
                        )));
        setverdict(pass, "Received NG_SETUP_RESPONSE NGAP message");
    }

    /**
@@ -406,6 +412,8 @@ module LibNGAP_Functions {
                vc_ngKSI := int2bit((bit2int(vc_registration_request.ngNasKSI.nasKeySetId) + 1) mod 7, 3);
            }
            log("f_await_registration_request: ngKSI of the UE: ", vc_registration_request.ngNasKSI.nasKeySetId, ", allocated ngKSI: ", vc_ngKSI);

            setverdict(pass, "Received NG_REGISTRATION_REQUEST NAS message");
        } else {
            log("*** " & __SCOPE__ & ": FAIL: Unexpected NAS message");
            setverdict(fail, "*** " & __SCOPE__ & ": FAIL: Unexpected NAS message");
@@ -450,7 +458,7 @@ module LibNGAP_Functions {
        }
        log("v_message: ", v_message);
        if (not(isbound(v_message))) {
            setverdict(fail);
            setverdict(fail, "*** " & __SCOPE__ & ": FAIL: Unbound inner message");
            return;
        }
        vc_ngKSI := v_message.authentication_Request.ngNasKeySetId.nasKeySetId;
@@ -465,9 +473,10 @@ module LibNGAP_Functions {

        // Compute RES/XRES
        if (f_5g_aka_compute_res_xres(-, v_message.authentication_Request.rand.randValue, v_message.authentication_Request.autn.aUTN, v_message.authentication_Request.abba, fl_NasNN_MCC2PlmnId(PX_NAS_MCC, PX_NAS_MNC), -/*oct2hex(PX_SUPI_DIGITS)*/, px_IMSI_Def, vc_ng_nas_security_params_type) == false) {
            setverdict(fail);
            setverdict(fail, "*** " & __SCOPE__ & ": FAIL: Failed to compute RES/XRES");
            return;
        }
        setverdict(pass, "Received AUTHENTICATION_REQUEST NAS message");

        // Send response for AUTHENTICATION_RESPONSE
        vt_NgNasUl_Msg := m_NG_AUTHENTICATION_RESPONSE(
@@ -486,7 +495,7 @@ module LibNGAP_Functions {
                                                                                                                                                    m_tAI
                        )))));

        setverdict(pass);
        setverdict(pass, "Sent AUTHENTICATION_RESPONSE NAS message");
    }

    /**
@@ -525,7 +534,7 @@ module LibNGAP_Functions {
        }
        log("v_message: ", v_message);
        if (not(isbound(v_message))) {
            setverdict(fail);
            setverdict(fail, "*** " & __SCOPE__ & ": FAIL: Unbound inner message");
            return;
        }
        vc_ngKSI := v_message.authentication_Request.ngNasKeySetId.nasKeySetId;
@@ -540,9 +549,10 @@ module LibNGAP_Functions {

        // Compute RES/XRES
        if (f_5g_aka_compute_res_xres(-, v_message.authentication_Request.rand.randValue, v_message.authentication_Request.autn.aUTN, v_message.authentication_Request.abba, fl_NasNN_MCC2PlmnId(PX_NAS_MCC, PX_NAS_MNC), -/*oct2hex(PX_SUPI_DIGITS)*/, px_IMSI_Def, vc_ng_nas_security_params_type) == false) {
            setverdict(fail);
            setverdict(fail, "*** " & __SCOPE__ & ": FAIL: Failed to compute RES/XRES");
            return;
        }
        setverdict(pass, "Received AUTHENTICATION_REQUEST NAS message");

        // Send invalid response for AUTHENTICATION_RESPONSE
        vc_ng_nas_security_params_type.AuthParams.XRES := vc_ng_nas_security_params_type.AuthParams.XRES xor4b vc_ng_nas_security_params_type.AuthParams.XRES; // Invalidate the authentication response value by flipping all bits with the value of the 7th byte of XRES
@@ -605,7 +615,7 @@ module LibNGAP_Functions {
        }
        log("v_message: ", v_message);
        if (not(isbound(v_message))) {
            setverdict(fail);
            setverdict(fail, "*** " & __SCOPE__ & ": FAIL: Unbound inner message");
            return;
        }
        vc_ngKSI := v_message.authentication_Request.ngNasKeySetId.nasKeySetId;
@@ -617,6 +627,7 @@ module LibNGAP_Functions {
        // Extract RAN_UE_NGAP_ID
        vc_RAN_UE_ID  := vc_recvNGAP_PDU.initiatingMessage.value_.downlinkNASTransport.protocolIEs[1].value_.rAN_UE_NGAP_ID;
        log("vc_RAN_UE_ID: ", vc_RAN_UE_ID);
        setverdict(pass, "Received AUTHENTICATION_REQUEST NAS message");

        // Await response for AUTHENTICATION_REJECT
        f_recv_NGAP_PDU(
@@ -637,8 +648,8 @@ module LibNGAP_Functions {
            setverdict(fail, "*** " & __SCOPE__ & ": FAIL: Unexpected NG_AUTHENTICATION_REJECT");
        }

        setverdict(pass);
    }

        setverdict(pass, "Received AUTHENTICATION_RESPONSE NAS message");    }

    /**
     * @brief  Offline mode: await the AUTHENTICATION REQUEST and the AUTHENTICATION RESPONSE.
@@ -687,9 +698,10 @@ module LibNGAP_Functions {

        // Compute RES/XRES
        if (f_5g_aka_compute_res_xres(-, v_dl_message.authentication_Request.rand.randValue, v_dl_message.authentication_Request.autn.aUTN, v_dl_message.authentication_Request.abba, fl_NasNN_MCC2PlmnId(PX_NAS_MCC, PX_NAS_MNC), -/*oct2hex(PX_SUPI_DIGITS)*/, px_IMSI_Def, vc_ng_nas_security_params_type) == false) {
            setverdict(fail);
            setverdict(fail, "*** " & __SCOPE__ & ": FAIL: Failed to compute RES/XRES");
            return;
        }
        setverdict(pass, "Received AUTHENTICATION_REQUEST NAS message");

        // Await response for AUTHENTICATION_REQUEST
        f_recv_NGAP_PDU(
@@ -712,7 +724,7 @@ module LibNGAP_Functions {
            setverdict(fail, "*** " & __SCOPE__ & ": FAIL: Unexpected NG_AUTHENTICATION_RESPONSE");
        }

        setverdict(pass);
        setverdict(pass, "Received AUTHENTICATION_RESPONSE NAS message");
    }

    /**
@@ -754,7 +766,7 @@ module LibNGAP_Functions {
        var integer v_result := f_f1(PX_SUBSCRIPTION_KEY, vc_ng_nas_security_params_type.AuthParams.RandValue, v_sqn, v_amf, v_mac_a);
        if (v_result != 0) {
            log("*** " & __SCOPE__ & ": ERROR: 'fx_f1' returned an error code: " & int2str(v_result) & ". ***");
            setverdict(fail);
            setverdict(fail, "*** " & __SCOPE__ & ": ERROR: 'fx_f1' returned an error code: " & int2str(v_result) & ". ***");
        }
        log("v_sqn: ", bit2oct(v_sqn));
        log("v_mac_a: ", bit2oct(v_mac_a));
@@ -763,7 +775,7 @@ module LibNGAP_Functions {
        v_result := f_f2345(PX_SUBSCRIPTION_KEY, vc_ng_nas_security_params_type.AuthParams.RandValue, vc_ng_nas_security_params_type.AuthParams.XRES, vc_ng_nas_security_params_type.AuthParams.CK, vc_ng_nas_security_params_type.AuthParams.IK, v_ak);
        if (v_result != 0) {
            log("*** " & __SCOPE__ & ": ERROR: 'f_f2345' returned an error code: " & int2str(v_result) & ". ***");
            setverdict(fail);
            setverdict(fail, "*** " & __SCOPE__ & ": ERROR: 'f_f2345' returned an error code: " & int2str(v_result) & ". ***");
        }
        log("v_ak: ", bit2oct(v_ak));
        vc_ng_nas_security_params_type.AuthParams.XRESLength := lengthof(vc_ng_nas_security_params_type.AuthParams.XRES);
@@ -773,7 +785,7 @@ module LibNGAP_Functions {
        log("vc_ng_nas_security_params_type.AuthParams.AUTN: ", bit2oct(vc_ng_nas_security_params_type.AuthParams.AUTN));
        // RE-compute RES/XRES and finalyze security context
        if (f_5g_aka_compute_res_xres(-, vc_ng_nas_security_params_type.AuthParams.RandValue, vc_ng_nas_security_params_type.AuthParams.AUTN, valueof(cs_ABBA('0000'O, omit)), fl_NasNN_MCC2PlmnId(PX_NAS_MCC, PX_NAS_MNC), -/*oct2hex(PX_SUPI_DIGITS)*/, px_IMSI_Def, vc_ng_nas_security_params_type) == false) {
            setverdict(fail);
            setverdict(fail, "*** " & __SCOPE__ & ": ERROR: Failed to compute RES/XRES. ***");
            return;
        }
        // Build the NAS message for AuthenticationRequest
@@ -956,6 +968,7 @@ module LibNGAP_Functions {
        // Extract RAN_UE_NGAP_ID
        vc_RAN_UE_ID  := vc_recvNGAP_PDU.initiatingMessage.value_.downlinkNASTransport.protocolIEs[1].value_.rAN_UE_NGAP_ID;
        log("vc_RAN_UE_ID: ", vc_RAN_UE_ID);
        setverdict(pass, "Received DOWNLINK_NAS_TRANSPORT NAS message");

        // Await response for AUTHENTICATION_RESPONSE failure
        f_recv_NGAP_PDU(
@@ -965,7 +978,7 @@ module LibNGAP_Functions {
                                                                  vc_RAN_UE_ID
                        )));

        setverdict(pass);
        setverdict(pass, "Received ERROR_INDICATION NAS message");
    }

    /**
@@ -989,6 +1002,7 @@ module LibNGAP_Functions {
        // Extract RAN_UE_NGAP_ID
        vc_RAN_UE_ID  := vc_recvNGAP_PDU.initiatingMessage.value_.downlinkNASTransport.protocolIEs[1].value_.rAN_UE_NGAP_ID;
        log("vc_RAN_UE_ID: ", vc_RAN_UE_ID);
        setverdict(pass, "Received DOWNLINK_NAS_TRANSPORT NAS message");

        // Await response for AUTHENTICATION_RESPONSE failure
        f_send_NGAP_PDU(
@@ -1093,7 +1107,7 @@ module LibNGAP_Functions {

        // TODO Check plainNASMessage content

        setverdict(pass);
        setverdict(pass, "Received SECURITY_MODE_COMPLETE NAS message");
    }

    /**
@@ -1128,7 +1142,7 @@ module LibNGAP_Functions {
            setverdict(fail);
        } else {
            log("*** " & __SCOPE__ & ": PASS: Expected NG_SECURITY_MODE_COMMAND");
            setverdict(pass);
            setverdict(pass, "Received SECURITY_MODE_COMMAND NAS message");
        }
        log("v_message: ", v_message);

@@ -1202,7 +1216,7 @@ module LibNGAP_Functions {
                                                                                                                                                    m_tAI
                        )))));

        setverdict(pass);
        setverdict(pass, "Sent SECURITY_MODE_COMPLETE NAS message");
    }

    /**
@@ -1233,7 +1247,7 @@ module LibNGAP_Functions {
            setverdict(fail);
        } else {
            log("*** " & __SCOPE__ & ": PASS: Expected NG_SECURITY_MODE_COMMAND");
            setverdict(pass);
            setverdict(pass, "Received SECURITY_MODE_COMMAND NAS message");
        }
        log("v_message: ", v_message);

@@ -1266,7 +1280,7 @@ module LibNGAP_Functions {

        // TODO Check plainNASMessage content

        setverdict(pass);
        setverdict(pass, "Received SECURITY_MODE_COMPLETE NAS message");
    }

    /**