Commit 94d12f0e authored by Steffen Ludtke's avatar Steffen Ludtke
Browse files

Merge branch 'TTF_T041' of https://forge.etsi.org/rep/int/5g-core/nas into TTF_T041

parents 7808884f 2d4f6603
Loading
Loading
Loading
Loading
+80 −0
Original line number Diff line number Diff line
@@ -14,10 +14,13 @@ module NGAP_Steps {
    // LibNGAP
    import from LibNGAP_Steps  all;
    import from LibNGAP_Interface all;
    import from LibNGAP_Pixits all;
    import from LibNGAP_Templates all;

    // NGAP_Ats
    import from NGAP_Pixits all;
  

    group GlobalSteps {

        /**
@@ -58,6 +61,83 @@ module NGAP_Steps {
            vc_SUT_address := PX_NGAP_SUT_IPADDR;
            vc_SUT_port    := PX_NGAP_SUT_PORT;

            f_send_NGAP_PDU(
                m_ngap_initMsg(
                    m_n2_NGSetupRequest(
                            m_globalRANNodeID_globalGNB_ID(
                                m_ie_globalGnbId(
                                PX_PLMN_IDENTITY,
                                PX_GNB_ID,//'0000000000000000000000'B,//in template (value) bitstring p_gnbId,
                                -//in template (omit) GlobalGNB_ID.iE_Extensions p_iE_Extensions := omit
                        )),
                        {
                            m_supportedTAItem(
                                PX_TACode,
                                {
                                    m_ie_broadcastPLMNItem(
                                        PX_PLMN_IDENTITY,//m_ie_pLMNIdentity('00f110'O),
                                        {
                                            m_sliceSupportItem(
                                                    m_s_NSSAI(
                                                        PX_SST,
                                                        PX_SD,//      in template (omit) SD p_sD := omit,
                                                        -//      in template (omit) S_NSSAI.iE_Extensions p_iE_Extensions := omit
                                                    ),
                                                    -//in template (omit) SliceSupportItem.iE_Extensions p_iE_Extensions := omit
                                                )
                                        }
                                    )
                                },//in template (value) BroadcastPLMNList p_broadcastPLMNList,
                                -//in template (omit) SupportedTAItem.iE_Extensions p_iE_Extensions := omit
                            )
                        },
                        PX_PAGING_DRX
                    )
                )
            );               

            f_recv_NGAP_PDU(
                mw_ngap_succMsg(
                    mw_n2_NGSetupResponse(-,-,-,-)
                    )
            );
            // f_recv_NGAP_PDU(
            //     mw_ngap_succMsg(
            //         mw_n2_NGSetupResponse(
            //         ?,
            //         {
            //             mw_servedGUAMIItem(
            //             mw_gUAMI(
            //                 ?,//template (present) PLMNIdentity p_pLMNIdentity := ?,
            //                 ?,//template (present) AMFRegionID p_aMFRegionID := ?,
            //                 ?,//template (present) AMFSetID p_aMFSetID := ?,
            //                 ?,//template (present) AMFPointer p_aMFPointer := ?,
            //                 *//template GUAMI.iE_Extensions p_iE_Extensions := *
            //             ),//template (present) GUAMI p_gUAMI := ?,
            //             *,//template AMFName p_backupAMFName := *,
            //             *//template ServedGUAMIItem.iE_Extensions p_iE_Extensions := *
            //             )
            //         },//template (present) ServedGUAMIList p_servedGUAMIList := ?,
            //         ?,//template (present) RelativeAMFCapacity p_relativeAmfCap:= ?,
            //         {
            //             mw_pLMNSupportItem(
            //             ?,//template (present) PLMNIdentity p_pLMNIdentity := ?,
            //             {
            //                 mw_sliceSupportItem(
            //                 mw_s_NSSAI(
            //                     ?,//template (present) SST p_sST := ?,
            //                     *,//template SD p_sD := *,
            //                     *//template S_NSSAI.iE_Extensions p_iE_Extensions := *
            //                 ),//template (present) S_NSSAI p_s_NSSAI := ?,
            //                 ?//template SliceSupportItem.iE_Extensions p_iE_Extensions := *
            //                 )
            //             },//template (present) SliceSupportList p_sliceSupportList := ?,
            //             *//template PLMNSupportItem.iE_Extensions p_iE_Extensions := *
            //             )
            //         }//template (present) PLMNSupportList p_plmnSuppList := ?
            //         )
            //     )
            // );
        } // End of function f_NGAP_gnb_init

        /**
+135 −159
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ module NG_NAS_TCFunctions {
    // NG_NAS
    import from NG_NAS_TypeDefs all;
    import from NG_NAS_TestSystem all;
    import from NG_NAS_Templates all;
    import from NAS_CommonTypeDefs all;
    import from NG_NAS_Templates all;

@@ -744,7 +745,7 @@ module NG_NAS_TCFunctions {
                // Body
                vt_NgNasUl_Msg := 
                    m_NG_REGISTRATION_REQUEST(
                        {'0'B,'001'B},//in template (value) RegistrationType p_RegistrationType,
                        {'1'B,'001'B},//in template (value) RegistrationType p_RegistrationType,
                        '111'B,//in template (value) NAS_KsiValue p_KeySetId,
                        '0'B,//in template (value) B1_Type p_Tsc,
                        m_NG_MobileIdentitySUCI('0000'B,'00f110214300014444330302'O)//in template (value) NG_MobileIdentity p_MobileId,  // 24.501 cl. 9.11.3.4
@@ -817,12 +818,33 @@ module NG_NAS_TCFunctions {
                f_recv_NGAP_PDU(
                    mw_ngap_initMsg(
                        mw_n2_DownlinkNASTransport(
                            ?,//template (present) AMF_UE_NGAP_ID p_amfUeNgapID := ?,
                            ?,//template (present) RAN_UE_NGAP_ID p_ranUeNgapID := ?,
                            PX_AMF_UE_NGAP_ID,
                            PX_RAN_UE_NGAP_ID,
                            ?//template (present) NAS_PDU p_nasPdu := ?
                    ))
                );

                f_NASPDU_Get(vc_recvNGAP_PDU);
                if (f_Check_5GAKA_NAS_DL_Message(vc_recvNAS_PDU,
                                                 mw_NG_REGISTRATION_REJECT(
                                                        cr_GMM_GSM_Cause(*,'00010110'B),//tsc_NR5GCCause_Congestion //template (present) GMM_GSM_Cause p_Cause := ?,
                                                        ?//template GPRS_Timer2 p_T3346 := *
                                                        /*template GPRS_Timer2 p_T3502 := *,
                                                        template EAP_Message p_EAP := *,
                                                        template RejectedNSSAI p_RejectedNSSAI := *,
                                                        template CAGInfoList p_CAGInfoList := *,
                                                        template ExtdRejectedNSSAI p_ExtdRejectedNSSAI := *,
                                                        template RegistrationWaitRange p_DisasterReturnWaitRange := *,
                                                        template ExtdCAGInfoList p_ExtdCAGInfoList := *,
                                                        template GPRS_Timer3 p_LowerBoundTimerValue := *,
                                                        template NG_TrackingAreaIdList p_ForbidTAIList_Roaming := *,
                                                        template NG_TrackingAreaIdList p_ForbidTAIList_RegProvService := **/
                                                 )) == false) {

                    log("*** " & __SCOPE__ & ": FAIL: NG_REGISTRATION_REJECT mismatch. ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                }

                log(vc_recvNGAP_PDU);
                f_NASPDU_Get(vc_recvNGAP_PDU);
                s := oct2bit(vc_recvNAS_PDU);
@@ -833,6 +855,33 @@ module NG_NAS_TCFunctions {
                log(ir);
                log(recdl);

                 vt_NgNasDl_Msg := 
                    m_NG_REGISTRATION_REJECT(
                                                cs_GMM_GSM_Cause(omit,
                                                  '00001101'B/*;tsc_Cause_Roaming_NotAllowed*/)
                                                /*in template (omit) GPRS_Timer2 p_T3346 := omit,
                                                in template (omit) GPRS_Timer2 p_T3502 := omit,
                                                in template (omit) EAP_Message p_EAP := omit,
                                                in template (omit) RejectedNSSAI p_RejectedNSSAI := omit,
                                                in template (omit) CAGInfoList p_CAGInfoList := omit,
                                                in template (omit) ExtdRejectedNSSAI p_ExtdRejectedNSSAI := omit,
                                                in template (omit) RegistrationWaitRange p_DisasterReturnWaitRange := omit,
                                                in template (omit) ExtdCAGInfoList p_ExtdCAGInfoList := omit,
                                                in template (omit) GPRS_Timer3 p_LowerBoundTimerValue := omit,
                                                in template (omit) NG_TrackingAreaIdList p_ForbidTAIList_Roaming := omit,
                                                in template (omit) NG_TrackingAreaIdList p_ForbidTAIList_RegProvService := omit
                                        */);
                 vc_sendNAS_PDU := bit2oct(encvalue( vt_NgNasDl_Msg ));
                s := encvalue( vt_NgNasDl_Msg );
                //int i := decvalue(encvalue( vt_NgNasUl_Msg),vt_NgNasUl_Msg);
                log(vt_NgNasDl_Msg);
                log(vc_sendNAS_PDU);
                var NG_NAS_DL_Message_Type recdl1;
                
                i := decvalue(s,recdl1);
                log(i);
                log(recdl1);


                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");
@@ -856,112 +905,18 @@ module NG_NAS_TCFunctions {
                log("*** " & __SCOPE__ & ": INFO: Preamble done. ***");

                // Body
            
                f_send_NGAP_PDU(
                    m_ngap_initMsg(
                    m_n2_NGSetupRequest(
                        m_globalRANNodeID_globalGNB_ID(
                        m_ie_globalGnbId(
                        PX_PLMN_IDENTITY,
                        PX_GNB_ID,//'0000000000000000000000'B,//in template (value) bitstring p_gnbId,
                        -//in template (omit) GlobalGNB_ID.iE_Extensions p_iE_Extensions := omit
                        )
                        ),
                        {
                        m_supportedTAItem(
                            PX_TACode,
                            {
                            m_ie_broadcastPLMNItem(
                                PX_PLMN_IDENTITY,//m_ie_pLMNIdentity('00f110'O),
                                {
                                m_sliceSupportItem(
                                    m_s_NSSAI(
                                    PX_SST,
                                    -,//      in template (omit) SD p_sD := omit,
                                    -//      in template (omit) S_NSSAI.iE_Extensions p_iE_Extensions := omit
                                    ),
                                    -//in template (omit) SliceSupportItem.iE_Extensions p_iE_Extensions := omit
                                    )
                                }
                            )
                            },//in template (value) BroadcastPLMNList p_broadcastPLMNList,
                            -//in template (omit) SupportedTAItem.iE_Extensions p_iE_Extensions := omit
                        )
                        },
                        PX_PAGING_DRX
                    )
                    )
                );
                
                f_recv_NGAP_PDU(
                    mw_ngap_unsuccMsg(
                        mw_n2_NGSetupFailure(
                            mw_cause_radioNetwork(
                                mww_causeRadioNetwork(?)
                            )
                        )
                    )

                );

                // f_recv_NGAP_PDU(
                //     mw_ngap_succMsg(
                //         mw_n2_NGSetupResponse(
                //         ?,
                //         {
                //             mw_servedGUAMIItem(
                //             mw_gUAMI(
                //                 ?,//template (present) PLMNIdentity p_pLMNIdentity := ?,
                //                 ?,//template (present) AMFRegionID p_aMFRegionID := ?,
                //                 ?,//template (present) AMFSetID p_aMFSetID := ?,
                //                 ?,//template (present) AMFPointer p_aMFPointer := ?,
                //                 *//template GUAMI.iE_Extensions p_iE_Extensions := *
                //             ),//template (present) GUAMI p_gUAMI := ?,
                //             *,//template AMFName p_backupAMFName := *,
                //             *//template ServedGUAMIItem.iE_Extensions p_iE_Extensions := *
                //             )
                //         },//template (present) ServedGUAMIList p_servedGUAMIList := ?,
                //         ?,//template (present) RelativeAMFCapacity p_relativeAmfCap:= ?,
                //         {
                //             mw_pLMNSupportItem(
                //             ?,//template (present) PLMNIdentity p_pLMNIdentity := ?,
                //             {
                //                 mw_sliceSupportItem(
                //                 mw_s_NSSAI(
                //                     ?,//template (present) SST p_sST := ?,
                //                     *,//template SD p_sD := *,
                //                     *//template S_NSSAI.iE_Extensions p_iE_Extensions := *
                //                 ),//template (present) S_NSSAI p_s_NSSAI := ?,
                //                 ?//template SliceSupportItem.iE_Extensions p_iE_Extensions := *
                //                 )
                //             },//template (present) SliceSupportList p_sliceSupportList := ?,
                //             *//template PLMNSupportItem.iE_Extensions p_iE_Extensions := *
                //             )
                //         }//template (present) PLMNSupportList p_plmnSuppList := ?
                //         )
                //     )
                // );

                f_recv_NGAP_PDU(?);

                vt_NgNasUl_Msg := m_NG_REGISTRATION_REQUEST(
                vt_NgNasUl_Msg := 
                    m_NG_REGISTRATION_REQUEST(
                            {'1'B,'001'B},//in template (value) RegistrationType p_RegistrationType,
                                    '000'B,//in template (value) NAS_KsiValue p_KeySetId,
                            '111'B,//in template (value) NAS_KsiValue p_KeySetId,
                            '0'B,//in template (value) B1_Type p_Tsc,
                                    {                              // 24.501 cl. 9.11.3.4
                                        iei:=omit,
                                        iel:='0002'O,
                                        idDigit1:='0000'B,                // 1st identitity digit
                                        oddEvenInd:='0'B,              // Odd/even indicator or Spare
                                        typeOfId:='000'B,                // Type of identity
                                        otherDigits:='00'O// length (1..infinity) optional  // Other identity digits, could be any length @sic R5-192389, @sic R5w190307 sic@ sic@
                                    }//in template (value) NG_MobileIdentity p_MobileId,
                            m_NG_MobileIdentitySUCI('0000'B,'00f110214300014444330302'O),//in template (value) NG_MobileIdentity p_MobileId,
                            
                                    /* in template (omit) NAS_KeySetIdentifier p_NonCurrentKSI := omit,
                                    in template (omit) NG_GMM_Cap p_GMM_Cap := omit,
                                    in template (omit) NG_UE_SecurityCapability p_UESecurityCap := omit,
                                    in template (omit) NSSAI p_ReqNSSAI := omit,
                                    in template (omit) NG_TrackingAreaId p_TAI := omit,
                            omit, // in template (omit) NAS_KeySetIdentifier p_NonCurrentKSI := omit,
                            omit, // in template (omit) NG_GMM_Cap p_GMM_Cap := omit,
                            omit //in template (omit) NG_UE_SecurityCapability p_UESecurityCap := omit,
                            //in template (omit) NSSAI p_ReqNSSAI := omit,
                            /*in template (omit) NG_TrackingAreaId p_TAI := omit,
                            in template (omit) UE_NetworkCap p_UE_NetworkCap := omit,
                            in template (omit) ULDataStatus p_ULDataStatus := omit,
                            in template (omit) PDU_SessionStatus p_PDU_SessionStatus := omit,
@@ -997,15 +952,13 @@ module NG_NAS_TCFunctions {
                            in template (omit) PEIPS_AssistInfo p_RequestedPEIPS_AssistInfo := omit,
                            in template (omit) GPRS_Timer3 p_T3512 := omit */
                    )
                vc_sendNAS_PDU := bit2oct(encvalue( vt_NgNasUl_Msg ));
                log(vt_NgNasUl_Msg);
                log(vc_sendNAS_PDU);

                //vc_sendNAS_PDU := bit2oct(encvalue( vt_NgNasUl_Msg ));
                f_send_NGAP_PDU(
                    m_ngap_initMsg(
                        m_n2_initialUeMessage(
                            -,
                                                vc_sendNAS_PDU,
                            bit2oct(encvalue( vt_NgNasUl_Msg )),//vc_sendNAS_PDU
                            m_uPTransportLayerInformation_userLocationInformationNR(
                                                                                    m_userLocationInformationNR(
                                                                                        m_nR_CGI,
@@ -1014,12 +967,35 @@ module NG_NAS_TCFunctions {
                    ))
                );

                f_recv_NGAP_PDU(?);

                f_recv_NGAP_PDU(
                    mw_ngap_initMsg(
                        mw_n2_DownlinkNASTransport(
                            PX_AMF_UE_NGAP_ID,
                            PX_RAN_UE_NGAP_ID,
                            ?//template (present) NAS_PDU p_nasPdu := ?
                    ))
                );

                f_NASPDU_Get(vc_recvNGAP_PDU);
                if (f_Check_5GAKA_NAS_DL_Message(vc_recvNAS_PDU, 
                                                 mw_NG_REGISTRATION_REJECT(
                                                        cr_GMM_GSM_Cause(*,'00111110'B)//tsc_Cause_NoNetworkSlices_Available //template (present) GMM_GSM_Cause p_Cause := ?,
                                                        /*template GPRS_Timer2 p_T3346 := *
                                                        template GPRS_Timer2 p_T3502 := *,
                                                        template EAP_Message p_EAP := *,
                                                        template RejectedNSSAI p_RejectedNSSAI := *,
                                                        template CAGInfoList p_CAGInfoList := *,
                                                        template ExtdRejectedNSSAI p_ExtdRejectedNSSAI := *,
                                                        template RegistrationWaitRange p_DisasterReturnWaitRange := *,
                                                        template ExtdCAGInfoList p_ExtdCAGInfoList := *,
                                                        template GPRS_Timer3 p_LowerBoundTimerValue := *,
                                                        template NG_TrackingAreaIdList p_ForbidTAIList_Roaming := *,
                                                        template NG_TrackingAreaIdList p_ForbidTAIList_RegProvService := **/
                                                 )) == false) {

                //f_send_NGAP_PDU(m_ngap_initMsg(/*initiating msgtemplate*/));
                //f_recv_NGAP_PDU(?);
                    log("*** " & __SCOPE__ & ": FAIL: NG_REGISTRATION_REJECT mismatch. ***");
                    f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
                }

                f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict());
                log("*** " & __SCOPE__ & ": INFO: Testbody done. ***");
+2 −3
Original line number Diff line number Diff line
@@ -129,7 +129,6 @@ module NG_NAS_MsgContainers
      )"
    } 


  //****************************************************************************
  // NAS SECURITY PROTECTION
  //****************************************************************************
@@ -192,4 +191,4 @@ module NG_NAS_MsgContainers
  type record of NG_NAS_MSG_Request_Type NG_NAS_MSG_RequestList_Type;

// The encoding rule is needed because the types in this file are part of the overall message sent over the air
}  with { encode "RAW"/*"NAS Types"*/}
}  with { encode "RAW"/*"NAS Types"*/extension "errorbehavior(ALL:WARNING)"}