From f7efee98848020155d28019ab821deb88fce4e6a Mon Sep 17 00:00:00 2001 From: Francisco Date: Mon, 10 Jan 2022 20:50:12 +0000 Subject: [PATCH] asn1: use typedefs for amf_ue_ngap_id, ran_ue_ngap_id, mme_ue_s1ap_id and enb_ue_s1ap_id and changed interface to access s1ap and ngap protocol_ies --- lib/include/srsran/asn1/asn1_utils.h | 10 +- lib/include/srsran/asn1/ngap.h | 560 ++++++------ lib/include/srsran/asn1/s1ap.h | 1033 ++++++++++++----------- lib/include/srsran/asn1/s1ap_utils.h | 27 +- lib/test/asn1/ngap_test.cc | 77 +- lib/test/asn1/s1ap_test.cc | 62 +- srsenb/src/stack/rrc/rrc_mobility.cc | 18 +- srsenb/src/stack/rrc/rrc_ue.cc | 30 +- srsenb/src/stack/s1ap/s1ap.cc | 461 +++++----- srsenb/test/rrc/erab_setup_test.cc | 8 +- srsenb/test/rrc/rrc_mobility_test.cc | 15 +- srsenb/test/rrc/test_helpers.cc | 3 +- srsenb/test/s1ap/s1ap_test.cc | 50 +- srsepc/src/mme/s1ap_ctx_mngmt_proc.cc | 55 +- srsepc/src/mme/s1ap_erab_mngmt_proc.cc | 32 +- srsepc/src/mme/s1ap_mngmt_proc.cc | 41 +- srsepc/src/mme/s1ap_nas_transport.cc | 28 +- srsepc/src/mme/s1ap_paging.cc | 20 +- srsgnb/src/stack/ngap/ngap.cc | 89 +- srsgnb/src/stack/ngap/ngap_ue.cc | 98 +-- srsgnb/src/stack/ngap/ngap_ue_proc.cc | 40 +- srsgnb/src/stack/ngap/test/ngap_test.cc | 36 +- 22 files changed, 1398 insertions(+), 1395 deletions(-) diff --git a/lib/include/srsran/asn1/asn1_utils.h b/lib/include/srsran/asn1/asn1_utils.h index 7180c5a6d..0c287aab2 100644 --- a/lib/include/srsran/asn1/asn1_utils.h +++ b/lib/include/srsran/asn1/asn1_utils.h @@ -1826,11 +1826,17 @@ using protocol_ext_container_empty_l = protocol_ie_container_empty_l; template class elementary_procedure_option { -public: - bool ext; ProtocolIEs protocol_ies; + +public: + bool ext; // ... + ProtocolIEs* operator->() { return &protocol_ies; } + const ProtocolIEs* operator->() const { return &protocol_ies; } + ProtocolIEs& operator*() { return protocol_ies; } + const ProtocolIEs& operator*() const { return protocol_ies; } + // sequence methods SRSASN_CODE pack(bit_ref& bref) const { diff --git a/lib/include/srsran/asn1/ngap.h b/lib/include/srsran/asn1/ngap.h index 1e78a7e53..af6e822d0 100644 --- a/lib/include/srsran/asn1/ngap.h +++ b/lib/include/srsran/asn1/ngap.h @@ -291,6 +291,12 @@ namespace ngap { * Struct Definitions ******************************************************************************/ +// INTEGER (0..4294967295) ::= INTEGER (0..4294967295) +using ran_ue_ngap_id_t = integer; + +// INTEGER (0..1099511627775) ::= INTEGER (0..1099511627775) +using amf_ue_ngap_id_t = integer; + // CPTransportLayerInformation-ExtIEs ::= OBJECT SET OF NGAP-PROTOCOL-IES using cp_transport_layer_info_ext_ies_o = protocol_ies_empty_o; @@ -3026,11 +3032,11 @@ struct cell_traffic_trace_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > ngran_trace_id; - ie_field_s ngran_cgi; - ie_field_s > trace_collection_entity_ip_address; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > ngran_trace_id; + ie_field_s ngran_cgi; + ie_field_s > trace_collection_entity_ip_address; // sequence methods cell_traffic_trace_ies_container(); @@ -3625,9 +3631,9 @@ struct deactiv_trace_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > ngran_trace_id; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > ngran_trace_id; // sequence methods deactiv_trace_ies_container(); @@ -3871,21 +3877,21 @@ struct dl_nas_transport_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool old_amf_present = false; - bool ran_paging_prio_present = false; - bool mob_restrict_list_present = false; - bool idx_to_rfsp_present = false; - bool ue_aggregate_maximum_bit_rate_present = false; - bool allowed_nssai_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > old_amf; - ie_field_s > ran_paging_prio; - ie_field_s > nas_pdu; - ie_field_s mob_restrict_list; - ie_field_s > idx_to_rfsp; - ie_field_s ue_aggregate_maximum_bit_rate; - ie_field_s > allowed_nssai; + bool old_amf_present = false; + bool ran_paging_prio_present = false; + bool mob_restrict_list_present = false; + bool idx_to_rfsp_present = false; + bool ue_aggregate_maximum_bit_rate_present = false; + bool allowed_nssai_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > old_amf; + ie_field_s > ran_paging_prio; + ie_field_s > nas_pdu; + ie_field_s mob_restrict_list; + ie_field_s > idx_to_rfsp; + ie_field_s ue_aggregate_maximum_bit_rate; + ie_field_s > allowed_nssai; // sequence methods dl_nas_transport_ies_container(); @@ -4295,9 +4301,9 @@ struct dl_ran_status_transfer_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s ran_status_transfer_transparent_container; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s ran_status_transfer_transparent_container; // sequence methods dl_ran_status_transfer_ies_container(); @@ -4360,10 +4366,10 @@ struct dl_ueassociated_nrp_pa_transport_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > routing_id; - ie_field_s > nrp_pa_pdu; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > routing_id; + ie_field_s > nrp_pa_pdu; // sequence methods dl_ueassociated_nrp_pa_transport_ies_container(); @@ -4583,14 +4589,14 @@ struct error_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool amf_ue_ngap_id_present = false; - bool ran_ue_ngap_id_present = false; - bool cause_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool amf_ue_ngap_id_present = false; + bool ran_ue_ngap_id_present = false; + bool cause_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods error_ind_ies_container(); @@ -4708,9 +4714,9 @@ struct ho_cancel_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s cause; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s cause; // sequence methods ho_cancel_ies_container(); @@ -4771,10 +4777,10 @@ struct ho_cancel_ack_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s crit_diagnostics; // sequence methods ho_cancel_ack_ies_container(); @@ -4913,13 +4919,13 @@ struct ho_cmd_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool nas_security_params_from_ngran_present = false; - bool pdu_session_res_to_release_list_ho_cmd_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s handov_type; - ie_field_s > nas_security_params_from_ngran; + bool nas_security_params_from_ngran_present = false; + bool pdu_session_res_to_release_list_ho_cmd_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s handov_type; + ie_field_s > nas_security_params_from_ngran; ie_field_s > pdu_session_res_ho_list; ie_field_s > pdu_session_res_to_release_list_ho_cmd; @@ -5102,10 +5108,10 @@ struct ho_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods ho_fail_ies_container(); @@ -5317,9 +5323,9 @@ struct ho_notify_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s user_location_info; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s user_location_info; // sequence methods ho_notify_ies_container(); @@ -5382,11 +5388,11 @@ struct ho_prep_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods ho_prep_fail_ies_container(); @@ -5717,24 +5723,24 @@ struct ho_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool core_network_assist_info_present = false; - bool new_security_context_ind_present = false; - bool nasc_present = false; - bool trace_activation_present = false; - bool masked_imeisv_present = false; - bool mob_restrict_list_present = false; - bool location_report_request_type_present = false; - bool rrc_inactive_transition_report_request_present = false; - bool redirection_voice_fallback_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s handov_type; - ie_field_s cause; - ie_field_s ue_aggregate_maximum_bit_rate; - ie_field_s core_network_assist_info; - ie_field_s ue_security_cap; - ie_field_s security_context; - ie_field_s new_security_context_ind; - ie_field_s > nasc; + bool core_network_assist_info_present = false; + bool new_security_context_ind_present = false; + bool nasc_present = false; + bool trace_activation_present = false; + bool masked_imeisv_present = false; + bool mob_restrict_list_present = false; + bool location_report_request_type_present = false; + bool rrc_inactive_transition_report_request_present = false; + bool redirection_voice_fallback_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s handov_type; + ie_field_s cause; + ie_field_s ue_aggregate_maximum_bit_rate; + ie_field_s core_network_assist_info; + ie_field_s ue_security_cap; + ie_field_s security_context; + ie_field_s new_security_context_ind; + ie_field_s > nasc; ie_field_s > pdu_session_res_setup_list_ho_req; ie_field_s > allowed_nssai; ie_field_s trace_activation; @@ -5869,10 +5875,10 @@ struct ho_request_ack_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool pdu_session_res_failed_to_setup_list_ho_ack_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + bool pdu_session_res_failed_to_setup_list_ho_ack_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_admitted_list; ie_field_s > pdu_session_res_failed_to_setup_list_ho_ack; @@ -6187,13 +6193,13 @@ struct ho_required_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool direct_forwarding_path_availability_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s handov_type; - ie_field_s cause; - ie_field_s target_id; - ie_field_s direct_forwarding_path_availability; + bool direct_forwarding_path_availability_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s handov_type; + ie_field_s cause; + ie_field_s target_id; + ie_field_s direct_forwarding_path_availability; ie_field_s > pdu_session_res_list_ho_rqd; ie_field_s > source_to_target_transparent_container; @@ -6392,10 +6398,10 @@ struct init_context_setup_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool pdu_session_res_failed_to_setup_list_cxt_fail_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + bool pdu_session_res_failed_to_setup_list_cxt_fail_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_failed_to_setup_list_cxt_fail; ie_field_s cause; @@ -6577,26 +6583,26 @@ struct init_context_setup_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool old_amf_present = false; - bool ue_aggregate_maximum_bit_rate_present = false; - bool core_network_assist_info_present = false; - bool pdu_session_res_setup_list_cxt_req_present = false; - bool trace_activation_present = false; - bool mob_restrict_list_present = false; - bool ue_radio_cap_present = false; - bool idx_to_rfsp_present = false; - bool masked_imeisv_present = false; - bool nas_pdu_present = false; - bool emergency_fallback_ind_present = false; - bool rrc_inactive_transition_report_request_present = false; - bool ue_radio_cap_for_paging_present = false; - bool redirection_voice_fallback_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > old_amf; - ie_field_s ue_aggregate_maximum_bit_rate; - ie_field_s core_network_assist_info; - ie_field_s guami; + bool old_amf_present = false; + bool ue_aggregate_maximum_bit_rate_present = false; + bool core_network_assist_info_present = false; + bool pdu_session_res_setup_list_cxt_req_present = false; + bool trace_activation_present = false; + bool mob_restrict_list_present = false; + bool ue_radio_cap_present = false; + bool idx_to_rfsp_present = false; + bool masked_imeisv_present = false; + bool nas_pdu_present = false; + bool emergency_fallback_ind_present = false; + bool rrc_inactive_transition_report_request_present = false; + bool ue_radio_cap_for_paging_present = false; + bool redirection_voice_fallback_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > old_amf; + ie_field_s ue_aggregate_maximum_bit_rate; + ie_field_s core_network_assist_info; + ie_field_s guami; ie_field_s > pdu_session_res_setup_list_cxt_req; ie_field_s > allowed_nssai; ie_field_s ue_security_cap; @@ -6731,11 +6737,11 @@ struct init_context_setup_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool pdu_session_res_setup_list_cxt_res_present = false; - bool pdu_session_res_failed_to_setup_list_cxt_res_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + bool pdu_session_res_setup_list_cxt_res_present = false; + bool pdu_session_res_failed_to_setup_list_cxt_res_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_setup_list_cxt_res; ie_field_s > pdu_session_res_failed_to_setup_list_cxt_res; @@ -6857,18 +6863,18 @@ struct init_ue_msg_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool five_g_s_tmsi_present = false; - bool amf_set_id_present = false; - bool ue_context_request_present = false; - bool allowed_nssai_present = false; - ie_field_s > ran_ue_ngap_id; - ie_field_s > nas_pdu; - ie_field_s user_location_info; - ie_field_s rrcestablishment_cause; - ie_field_s five_g_s_tmsi; - ie_field_s > amf_set_id; - ie_field_s ue_context_request; - ie_field_s > allowed_nssai; + bool five_g_s_tmsi_present = false; + bool amf_set_id_present = false; + bool ue_context_request_present = false; + bool allowed_nssai_present = false; + ie_field_s ran_ue_ngap_id; + ie_field_s > nas_pdu; + ie_field_s user_location_info; + ie_field_s rrcestablishment_cause; + ie_field_s five_g_s_tmsi; + ie_field_s > amf_set_id; + ie_field_s ue_context_request; + ie_field_s > allowed_nssai; // sequence methods init_ue_msg_ies_container(); @@ -10807,11 +10813,11 @@ struct location_report_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ue_presence_in_area_of_interest_list_present = false; - bool ps_cell_info_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s user_location_info; + bool ue_presence_in_area_of_interest_list_present = false; + bool ps_cell_info_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s user_location_info; ie_field_s > ue_presence_in_area_of_interest_list; ie_field_s location_report_request_type; ie_field_s ps_cell_info; @@ -10831,9 +10837,9 @@ struct location_report_ctrl_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s location_report_request_type; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s location_report_request_type; // sequence methods location_report_ctrl_ies_container(); @@ -10850,9 +10856,9 @@ struct location_report_fail_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s cause; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s cause; // sequence methods location_report_fail_ind_ies_container(); @@ -10869,10 +10875,10 @@ struct nas_non_delivery_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > nas_pdu; - ie_field_s cause; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > nas_pdu; + ie_field_s cause; // sequence methods nas_non_delivery_ind_ies_container(); @@ -11022,10 +11028,10 @@ struct pdu_session_res_modify_confirm_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool pdu_session_res_failed_to_modify_list_mod_cfm_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + bool pdu_session_res_failed_to_modify_list_mod_cfm_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_modify_list_mod_cfm; ie_field_s > pdu_session_res_failed_to_modify_list_mod_cfm; @@ -11046,8 +11052,8 @@ struct pdu_session_res_modify_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_modify_list_mod_ind; // sequence methods @@ -11066,8 +11072,8 @@ struct pdu_session_res_modify_request_ies_container { // member variables bool ran_paging_prio_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > ran_paging_prio; ie_field_s > pdu_session_res_modify_list_mod_req; @@ -11086,12 +11092,12 @@ struct pdu_session_res_modify_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool pdu_session_res_modify_list_mod_res_present = false; - bool pdu_session_res_failed_to_modify_list_mod_res_present = false; - bool user_location_info_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + bool pdu_session_res_modify_list_mod_res_present = false; + bool pdu_session_res_failed_to_modify_list_mod_res_present = false; + bool user_location_info_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_modify_list_mod_res; ie_field_s > pdu_session_res_failed_to_modify_list_mod_res; @@ -11113,11 +11119,11 @@ struct pdu_session_res_notify_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool pdu_session_res_notify_list_present = false; - bool pdu_session_res_released_list_not_present = false; - bool user_location_info_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + bool pdu_session_res_notify_list_present = false; + bool pdu_session_res_released_list_not_present = false; + bool user_location_info_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_notify_list; ie_field_s > pdu_session_res_released_list_not; ie_field_s user_location_info; @@ -11137,12 +11143,12 @@ struct pdu_session_res_release_cmd_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ran_paging_prio_present = false; - bool nas_pdu_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > ran_paging_prio; - ie_field_s > nas_pdu; + bool ran_paging_prio_present = false; + bool nas_pdu_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > ran_paging_prio; + ie_field_s > nas_pdu; ie_field_s > pdu_session_res_to_release_list_rel_cmd; @@ -11163,8 +11169,8 @@ struct pdu_session_res_release_resp_ies_container { // member variables bool user_location_info_present = false; bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_released_list_rel_res; ie_field_s user_location_info; ie_field_s crit_diagnostics; @@ -11184,13 +11190,13 @@ struct pdu_session_res_setup_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ran_paging_prio_present = false; - bool nas_pdu_present = false; - bool ue_aggregate_maximum_bit_rate_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > ran_paging_prio; - ie_field_s > nas_pdu; + bool ran_paging_prio_present = false; + bool nas_pdu_present = false; + bool ue_aggregate_maximum_bit_rate_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > ran_paging_prio; + ie_field_s > nas_pdu; ie_field_s > pdu_session_res_setup_list_su_req; ie_field_s ue_aggregate_maximum_bit_rate; @@ -11209,11 +11215,11 @@ struct pdu_session_res_setup_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool pdu_session_res_setup_list_su_res_present = false; - bool pdu_session_res_failed_to_setup_list_su_res_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + bool pdu_session_res_setup_list_su_res_present = false; + bool pdu_session_res_failed_to_setup_list_su_res_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_setup_list_su_res; ie_field_s > pdu_session_res_failed_to_setup_list_su_res; @@ -11345,8 +11351,8 @@ struct path_switch_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool pdu_session_res_failed_to_setup_list_ps_req_present = false; - ie_field_s > ran_ue_ngap_id; + bool pdu_session_res_failed_to_setup_list_ps_req_present = false; + ie_field_s ran_ue_ngap_id; ie_field_s > source_amf_ue_ngap_id; ie_field_s user_location_info; ie_field_s ue_security_cap; @@ -11370,18 +11376,18 @@ struct path_switch_request_ack_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ue_security_cap_present = false; - bool new_security_context_ind_present = false; - bool pdu_session_res_released_list_ps_ack_present = false; - bool core_network_assist_info_present = false; - bool rrc_inactive_transition_report_request_present = false; - bool crit_diagnostics_present = false; - bool redirection_voice_fallback_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s ue_security_cap; - ie_field_s security_context; - ie_field_s new_security_context_ind; + bool ue_security_cap_present = false; + bool new_security_context_ind_present = false; + bool pdu_session_res_released_list_ps_ack_present = false; + bool core_network_assist_info_present = false; + bool rrc_inactive_transition_report_request_present = false; + bool crit_diagnostics_present = false; + bool redirection_voice_fallback_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s ue_security_cap; + ie_field_s security_context; + ie_field_s new_security_context_ind; ie_field_s > pdu_session_res_switched_list; ie_field_s > pdu_session_res_released_list_ps_ack; ie_field_s > allowed_nssai; @@ -11406,8 +11412,8 @@ struct path_switch_request_fail_ies_container { // member variables bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_released_list_ps_fail; ie_field_s crit_diagnostics; @@ -11510,10 +11516,10 @@ struct rrc_inactive_transition_report_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s rrc_state; - ie_field_s user_location_info; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s rrc_state; + ie_field_s user_location_info; // sequence methods rrc_inactive_transition_report_ies_container(); @@ -11530,13 +11536,13 @@ struct reroute_nas_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool amf_ue_ngap_id_present = false; - bool allowed_nssai_present = false; - ie_field_s > ran_ue_ngap_id; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ngap_msg; - ie_field_s > amf_set_id; - ie_field_s > allowed_nssai; + bool amf_ue_ngap_id_present = false; + bool allowed_nssai_present = false; + ie_field_s ran_ue_ngap_id; + ie_field_s amf_ue_ngap_id; + ie_field_s > ngap_msg; + ie_field_s > amf_set_id; + ie_field_s > allowed_nssai; // sequence methods reroute_nas_request_ies_container(); @@ -11553,9 +11559,9 @@ struct secondary_rat_data_usage_report_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ho_flag_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + bool ho_flag_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_secondary_ratusage_list; ie_field_s ho_flag; @@ -11575,10 +11581,10 @@ struct trace_fail_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > ngran_trace_id; - ie_field_s cause; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > ngran_trace_id; + ie_field_s cause; // sequence methods trace_fail_ind_ies_container(); @@ -11595,9 +11601,9 @@ struct trace_start_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s trace_activation; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s trace_activation; // sequence methods trace_start_ies_container(); @@ -11614,11 +11620,11 @@ struct ue_context_mod_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods ue_context_mod_fail_ies_container(); @@ -11644,8 +11650,8 @@ struct ue_context_mod_request_ies_container { bool emergency_fallback_ind_present = false; bool new_amf_ue_ngap_id_present = false; bool rrc_inactive_transition_report_request_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > ran_paging_prio; ie_field_s > security_key; ie_field_s > idx_to_rfsp; @@ -11671,14 +11677,14 @@ struct ue_context_mod_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool rrc_state_present = false; - bool user_location_info_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s rrc_state; - ie_field_s user_location_info; - ie_field_s crit_diagnostics; + bool rrc_state_present = false; + bool user_location_info_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s rrc_state; + ie_field_s user_location_info; + ie_field_s crit_diagnostics; // sequence methods ue_context_mod_resp_ies_container(); @@ -11713,13 +11719,13 @@ struct ue_context_release_complete_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool user_location_info_present = false; - bool info_on_recommended_cells_and_ran_nodes_for_paging_present = false; - bool pdu_session_res_list_cxt_rel_cpl_present = false; - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s user_location_info; + bool user_location_info_present = false; + bool info_on_recommended_cells_and_ran_nodes_for_paging_present = false; + bool pdu_session_res_list_cxt_rel_cpl_present = false; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s user_location_info; ie_field_s info_on_recommended_cells_and_ran_nodes_for_paging; ie_field_s > pdu_session_res_list_cxt_rel_cpl; ie_field_s crit_diagnostics; @@ -11739,9 +11745,9 @@ struct ue_context_release_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool pdu_session_res_list_cxt_rel_req_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + bool pdu_session_res_list_cxt_rel_req_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; ie_field_s > pdu_session_res_list_cxt_rel_req; ie_field_s cause; @@ -11760,10 +11766,10 @@ struct ue_radio_cap_check_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ue_radio_cap_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > ue_radio_cap; + bool ue_radio_cap_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > ue_radio_cap; // sequence methods ue_radio_cap_check_request_ies_container(); @@ -11780,11 +11786,11 @@ struct ue_radio_cap_check_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s ims_voice_support_ind; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s ims_voice_support_ind; + ie_field_s crit_diagnostics; // sequence methods ue_radio_cap_check_resp_ies_container(); @@ -11801,11 +11807,11 @@ struct ue_radio_cap_info_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ue_radio_cap_for_paging_present = false; - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > ue_radio_cap; - ie_field_s ue_radio_cap_for_paging; + bool ue_radio_cap_for_paging_present = false; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > ue_radio_cap; + ie_field_s ue_radio_cap_for_paging; // sequence methods ue_radio_cap_info_ind_ies_container(); @@ -11822,8 +11828,8 @@ struct uetnla_binding_release_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; // sequence methods uetnla_binding_release_request_ies_container(); @@ -11840,10 +11846,10 @@ struct ul_nas_transport_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > nas_pdu; - ie_field_s user_location_info; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > nas_pdu; + ie_field_s user_location_info; // sequence methods ul_nas_transport_ies_container(); @@ -11899,9 +11905,9 @@ struct ul_ran_status_transfer_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s ran_status_transfer_transparent_container; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s ran_status_transfer_transparent_container; // sequence methods ul_ran_status_transfer_ies_container(); @@ -11918,10 +11924,10 @@ struct ul_ueassociated_nrp_pa_transport_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > amf_ue_ngap_id; - ie_field_s > ran_ue_ngap_id; - ie_field_s > routing_id; - ie_field_s > nrp_pa_pdu; + ie_field_s amf_ue_ngap_id; + ie_field_s ran_ue_ngap_id; + ie_field_s > routing_id; + ie_field_s > nrp_pa_pdu; // sequence methods ul_ueassociated_nrp_pa_transport_ies_container(); diff --git a/lib/include/srsran/asn1/s1ap.h b/lib/include/srsran/asn1/s1ap.h index 8db291af7..4ccebef20 100644 --- a/lib/include/srsran/asn1/s1ap.h +++ b/lib/include/srsran/asn1/s1ap.h @@ -428,6 +428,12 @@ namespace s1ap { * Struct Definitions ******************************************************************************/ +// INTEGER (0..16777215) ::= INTEGER (0..16777215) +using enb_ue_s1ap_id_t = integer; + +// INTEGER (0..4294967295) ::= INTEGER (0..4294967295) +using mme_ue_s1ap_id_t = integer; + // PrivateIE-ID ::= CHOICE struct private_ie_id_c { struct types_opts { @@ -2387,13 +2393,13 @@ struct cell_traffic_trace_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool privacy_ind_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > e_utran_trace_id; - ie_field_s eutran_cgi; - ie_field_s > trace_collection_entity_ip_address; - ie_field_s privacy_ind; + bool privacy_ind_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > e_utran_trace_id; + ie_field_s eutran_cgi; + ie_field_s > trace_collection_entity_ip_address; + ie_field_s privacy_ind; // sequence methods cell_traffic_trace_ies_container(); @@ -2883,22 +2889,22 @@ struct conn_establishment_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ue_radio_cap_present = false; - bool enhanced_coverage_restricted_present = false; - bool dl_cp_security_info_present = false; - bool ce_mode_brestricted_present = false; - bool end_ind_present = false; - bool subscription_based_ue_differentiation_info_present = false; - bool ue_level_qos_params_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > ue_radio_cap; - ie_field_s enhanced_coverage_restricted; - ie_field_s dl_cp_security_info; - ie_field_s ce_mode_brestricted; - ie_field_s end_ind; - ie_field_s subscription_based_ue_differentiation_info; - ie_field_s ue_level_qos_params; + bool ue_radio_cap_present = false; + bool enhanced_coverage_restricted_present = false; + bool dl_cp_security_info_present = false; + bool ce_mode_brestricted_present = false; + bool end_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool ue_level_qos_params_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > ue_radio_cap; + ie_field_s enhanced_coverage_restricted; + ie_field_s dl_cp_security_info; + ie_field_s ce_mode_brestricted; + ie_field_s end_ind; + ie_field_s subscription_based_ue_differentiation_info; + ie_field_s ue_level_qos_params; // sequence methods conn_establishment_ind_ies_container(); @@ -3267,9 +3273,9 @@ struct deactiv_trace_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > e_utran_trace_id; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > e_utran_trace_id; // sequence methods deactiv_trace_ies_container(); @@ -3622,35 +3628,35 @@ struct dl_nas_transport_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ho_restrict_list_present = false; - bool subscriber_profile_idfor_rfp_present = false; - bool srvcc_operation_possible_present = false; - bool ue_radio_cap_present = false; - bool dlnaspdu_delivery_ack_request_present = false; - bool enhanced_coverage_restricted_present = false; - bool nrue_security_cap_present = false; - bool ce_mode_brestricted_present = false; - bool ue_cap_info_request_present = false; - bool end_ind_present = false; - bool pending_data_ind_present = false; - bool subscription_based_ue_differentiation_info_present = false; - bool add_rrm_prio_idx_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > nas_pdu; - ie_field_s ho_restrict_list; - ie_field_s > subscriber_profile_idfor_rfp; - ie_field_s srvcc_operation_possible; - ie_field_s > ue_radio_cap; - ie_field_s dlnaspdu_delivery_ack_request; - ie_field_s enhanced_coverage_restricted; - ie_field_s nrue_security_cap; - ie_field_s ce_mode_brestricted; - ie_field_s ue_cap_info_request; - ie_field_s end_ind; - ie_field_s pending_data_ind; - ie_field_s subscription_based_ue_differentiation_info; - ie_field_s > add_rrm_prio_idx; + bool ho_restrict_list_present = false; + bool subscriber_profile_idfor_rfp_present = false; + bool srvcc_operation_possible_present = false; + bool ue_radio_cap_present = false; + bool dlnaspdu_delivery_ack_request_present = false; + bool enhanced_coverage_restricted_present = false; + bool nrue_security_cap_present = false; + bool ce_mode_brestricted_present = false; + bool ue_cap_info_request_present = false; + bool end_ind_present = false; + bool pending_data_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool add_rrm_prio_idx_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > nas_pdu; + ie_field_s ho_restrict_list; + ie_field_s > subscriber_profile_idfor_rfp; + ie_field_s srvcc_operation_possible; + ie_field_s > ue_radio_cap; + ie_field_s dlnaspdu_delivery_ack_request; + ie_field_s enhanced_coverage_restricted; + ie_field_s nrue_security_cap; + ie_field_s ce_mode_brestricted; + ie_field_s ue_cap_info_request; + ie_field_s end_ind; + ie_field_s pending_data_ind; + ie_field_s subscription_based_ue_differentiation_info; + ie_field_s > add_rrm_prio_idx; // sequence methods dl_nas_transport_ies_container(); @@ -3874,10 +3880,10 @@ struct dl_s1cdma2000tunnelling_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_subjectto_data_forwarding_list_present = false; - bool cdma2000_ho_status_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool erab_subjectto_data_forwarding_list_present = false; + bool cdma2000_ho_status_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s > erab_subjectto_data_forwarding_list; ie_field_s cdma2000_ho_status; ie_field_s cdma2000_rat_type; @@ -3944,10 +3950,10 @@ struct dl_ueassociated_lp_pa_transport_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > routing_id; - ie_field_s > lp_pa_pdu; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > routing_id; + ie_field_s > lp_pa_pdu; // sequence methods dl_ueassociated_lp_pa_transport_ies_container(); @@ -3966,8 +3972,7 @@ using protocol_ie_container_pair_item_l = protocol_ie_container_pair_l -using erab_ie_container_pair_list_l = - dyn_seq_of, 0, 65535, true>, 1, 256>; +using erab_ie_container_pair_list_l = dyn_seq_of, 1, 256>; // E-RABAdmittedItem-ExtIEs ::= OBJECT SET OF S1AP-PROTOCOL-EXTENSION using erab_admitted_item_ext_ies_o = protocol_ext_empty_o; @@ -4427,13 +4432,13 @@ struct erab_mod_confirm_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_modify_list_bearer_mod_conf_present = false; - bool erab_failed_to_modify_list_bearer_mod_conf_present = false; - bool erab_to_be_released_list_bearer_mod_conf_present = false; - bool crit_diagnostics_present = false; - bool csg_membership_status_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool erab_modify_list_bearer_mod_conf_present = false; + bool erab_failed_to_modify_list_bearer_mod_conf_present = false; + bool erab_to_be_released_list_bearer_mod_conf_present = false; + bool crit_diagnostics_present = false; + bool csg_membership_status_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s, 1, 256, true> > erab_modify_list_bearer_mod_conf; ie_field_s, 1, 256, true> > @@ -4870,13 +4875,13 @@ struct erab_mod_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_not_to_be_modified_list_bearer_mod_ind_present = false; - bool csg_membership_info_present = false; - bool tunnel_info_for_bbf_present = false; - bool secondary_rat_data_usage_report_list_present = false; - bool user_location_info_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool erab_not_to_be_modified_list_bearer_mod_ind_present = false; + bool csg_membership_info_present = false; + bool tunnel_info_for_bbf_present = false; + bool secondary_rat_data_usage_report_list_present = false; + bool user_location_info_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s > erab_to_be_modified_list_bearer_mod_ind; ie_field_s > @@ -5197,11 +5202,11 @@ struct erab_modify_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ueaggregate_maximum_bitrate_present = false; - bool secondary_rat_data_usage_request_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s ueaggregate_maximum_bitrate; + bool ueaggregate_maximum_bitrate_present = false; + bool secondary_rat_data_usage_request_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s ueaggregate_maximum_bitrate; ie_field_s, 1, 256, true> > erab_to_be_modified_list_bearer_mod_req; ie_field_s secondary_rat_data_usage_request; @@ -5283,12 +5288,12 @@ struct erab_modify_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_modify_list_bearer_mod_res_present = false; - bool erab_failed_to_modify_list_present = false; - bool crit_diagnostics_present = false; - bool secondary_rat_data_usage_report_list_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool erab_modify_list_bearer_mod_res_present = false; + bool erab_failed_to_modify_list_present = false; + bool crit_diagnostics_present = false; + bool secondary_rat_data_usage_report_list_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s, 1, 256, true> > erab_modify_list_bearer_mod_res; ie_field_s, 1, 256, true> > erab_failed_to_modify_list; @@ -5366,11 +5371,11 @@ struct erab_release_cmd_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ueaggregate_maximum_bitrate_present = false; - bool nas_pdu_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s ueaggregate_maximum_bitrate; + bool ueaggregate_maximum_bitrate_present = false; + bool nas_pdu_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s ueaggregate_maximum_bitrate; ie_field_s, 1, 256, true> > erab_to_be_released_list; ie_field_s > nas_pdu; @@ -5444,10 +5449,10 @@ struct erab_release_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool user_location_info_present = false; - bool secondary_rat_data_usage_report_list_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool user_location_info_present = false; + bool secondary_rat_data_usage_report_list_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s, 1, 256, true> > erab_released_list; ie_field_s user_location_info; ie_field_s, 1, 256, true> > @@ -5590,13 +5595,13 @@ struct erab_release_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_release_list_bearer_rel_comp_present = false; - bool erab_failed_to_release_list_present = false; - bool crit_diagnostics_present = false; - bool user_location_info_present = false; - bool secondary_rat_data_usage_report_list_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool erab_release_list_bearer_rel_comp_present = false; + bool erab_failed_to_release_list_present = false; + bool crit_diagnostics_present = false; + bool user_location_info_present = false; + bool secondary_rat_data_usage_report_list_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s, 1, 256, true> > erab_release_list_bearer_rel_comp; ie_field_s, 1, 256, true> > erab_failed_to_release_list; @@ -5910,10 +5915,10 @@ struct erab_setup_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ueaggregate_maximum_bitrate_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s ueaggregate_maximum_bitrate; + bool ueaggregate_maximum_bitrate_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s ueaggregate_maximum_bitrate; ie_field_s, 1, 256, true> > erab_to_be_setup_list_bearer_su_req; @@ -5987,11 +5992,11 @@ struct erab_setup_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_setup_list_bearer_su_res_present = false; - bool erab_failed_to_setup_list_bearer_su_res_present = false; - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool erab_setup_list_bearer_su_res_present = false; + bool erab_failed_to_setup_list_bearer_su_res_present = false; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s, 1, 256, true> > erab_setup_list_bearer_su_res; ie_field_s, 1, 256, true> > @@ -7078,11 +7083,11 @@ struct enbcp_relocation_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > enb_ue_s1ap_id; - ie_field_s s_tmsi; - ie_field_s eutran_cgi; - ie_field_s tai; - ie_field_s ul_cp_security_info; + ie_field_s enb_ue_s1ap_id; + ie_field_s s_tmsi; + ie_field_s eutran_cgi; + ie_field_s tai; + ie_field_s ul_cp_security_info; // sequence methods enbcp_relocation_ind_ies_container(); @@ -7800,9 +7805,9 @@ struct enb_status_transfer_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s enb_status_transfer_transparent_container; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s enb_status_transfer_transparent_container; // sequence methods enb_status_transfer_ies_container(); @@ -7886,16 +7891,16 @@ struct error_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool mme_ue_s1ap_id_present = false; - bool enb_ue_s1ap_id_present = false; - bool cause_present = false; - bool crit_diagnostics_present = false; - bool s_tmsi_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; - ie_field_s s_tmsi; + bool mme_ue_s1ap_id_present = false; + bool enb_ue_s1ap_id_present = false; + bool cause_present = false; + bool crit_diagnostics_present = false; + bool s_tmsi_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; + ie_field_s s_tmsi; // sequence methods error_ind_ies_container(); @@ -8139,9 +8144,9 @@ struct ho_cancel_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cause; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cause; // sequence methods ho_cancel_ies_container(); @@ -8202,10 +8207,10 @@ struct ho_cancel_ack_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s crit_diagnostics; // sequence methods ho_cancel_ack_ies_container(); @@ -8312,15 +8317,15 @@ struct ho_cmd_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool nas_security_paramsfrom_e_utran_present = false; - bool erab_subjectto_data_forwarding_list_present = false; - bool erab_to_release_list_ho_cmd_present = false; - bool target_to_source_transparent_container_secondary_present = false; - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s handov_type; - ie_field_s > nas_security_paramsfrom_e_utran; + bool nas_security_paramsfrom_e_utran_present = false; + bool erab_subjectto_data_forwarding_list_present = false; + bool erab_to_release_list_ho_cmd_present = false; + bool target_to_source_transparent_container_secondary_present = false; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s handov_type; + ie_field_s > nas_security_paramsfrom_e_utran; ie_field_s > erab_subjectto_data_forwarding_list; ie_field_s, 1, 256, true> > erab_to_release_list_ho_cmd; ie_field_s > target_to_source_transparent_container; @@ -8388,10 +8393,10 @@ struct ho_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods ho_fail_ies_container(); @@ -8469,16 +8474,16 @@ struct ho_notify_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool tunnel_info_for_bbf_present = false; - bool lhn_id_present = false; - bool ps_cell_info_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s eutran_cgi; - ie_field_s tai; - ie_field_s tunnel_info_for_bbf; - ie_field_s > lhn_id; - ie_field_s ps_cell_info; + bool tunnel_info_for_bbf_present = false; + bool lhn_id_present = false; + bool ps_cell_info_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s eutran_cgi; + ie_field_s tai; + ie_field_s tunnel_info_for_bbf; + ie_field_s > lhn_id; + ie_field_s ps_cell_info; // sequence methods ho_notify_ies_container(); @@ -8541,11 +8546,11 @@ struct ho_prep_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods ho_prep_fail_ies_container(); @@ -9904,34 +9909,34 @@ struct ho_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ho_restrict_list_present = false; - bool trace_activation_present = false; - bool request_type_present = false; - bool srvcc_operation_possible_present = false; - bool nas_security_paramsto_e_utran_present = false; - bool csg_id_present = false; - bool csg_membership_status_present = false; - bool gummei_id_present = false; - bool mme_ue_s1ap_id_minus2_present = false; - bool management_based_mdt_allowed_present = false; - bool management_based_mdtplmn_list_present = false; - bool masked_imeisv_present = false; - bool expected_ue_behaviour_present = false; - bool pro_se_authorized_present = false; - bool ueuser_plane_cio_tsupport_ind_present = false; - bool v2xservices_authorized_present = false; - bool ue_sidelink_aggregate_maximum_bitrate_present = false; - bool enhanced_coverage_restricted_present = false; - bool nrue_security_cap_present = false; - bool ce_mode_brestricted_present = false; - bool aerial_uesubscription_info_present = false; - bool pending_data_ind_present = false; - bool subscription_based_ue_differentiation_info_present = false; - bool add_rrm_prio_idx_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s handov_type; - ie_field_s cause; - ie_field_s ueaggregate_maximum_bitrate; + bool ho_restrict_list_present = false; + bool trace_activation_present = false; + bool request_type_present = false; + bool srvcc_operation_possible_present = false; + bool nas_security_paramsto_e_utran_present = false; + bool csg_id_present = false; + bool csg_membership_status_present = false; + bool gummei_id_present = false; + bool mme_ue_s1ap_id_minus2_present = false; + bool management_based_mdt_allowed_present = false; + bool management_based_mdtplmn_list_present = false; + bool masked_imeisv_present = false; + bool expected_ue_behaviour_present = false; + bool pro_se_authorized_present = false; + bool ueuser_plane_cio_tsupport_ind_present = false; + bool v2xservices_authorized_present = false; + bool ue_sidelink_aggregate_maximum_bitrate_present = false; + bool enhanced_coverage_restricted_present = false; + bool nrue_security_cap_present = false; + bool ce_mode_brestricted_present = false; + bool aerial_uesubscription_info_present = false; + bool pending_data_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool add_rrm_prio_idx_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s handov_type; + ie_field_s cause; + ie_field_s ueaggregate_maximum_bitrate; ie_field_s > erab_to_be_setup_list_ho_req; ie_field_s > source_to_target_transparent_container; ie_field_s ue_security_cap; @@ -10062,8 +10067,8 @@ struct ho_request_ack_ies_container { bool crit_diagnostics_present = false; bool cell_access_mode_present = false; bool ce_mode_b_support_ind_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s > erab_admitted_list; ie_field_s > erab_failed_to_setup_list_ho_req_ack; ie_field_s > target_to_source_transparent_container; @@ -10285,28 +10290,28 @@ struct ho_required_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool direct_forwarding_path_availability_present = false; - bool srvccho_ind_present = false; - bool source_to_target_transparent_container_secondary_present = false; - bool ms_classmark2_present = false; - bool ms_classmark3_present = false; - bool csg_id_present = false; - bool cell_access_mode_present = false; - bool ps_service_not_available_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s handov_type; - ie_field_s cause; - ie_field_s target_id; - ie_field_s direct_forwarding_path_availability; - ie_field_s srvccho_ind; - ie_field_s > source_to_target_transparent_container; - ie_field_s > source_to_target_transparent_container_secondary; - ie_field_s > ms_classmark2; - ie_field_s > ms_classmark3; - ie_field_s > csg_id; - ie_field_s cell_access_mode; - ie_field_s ps_service_not_available; + bool direct_forwarding_path_availability_present = false; + bool srvccho_ind_present = false; + bool source_to_target_transparent_container_secondary_present = false; + bool ms_classmark2_present = false; + bool ms_classmark3_present = false; + bool csg_id_present = false; + bool cell_access_mode_present = false; + bool ps_service_not_available_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s handov_type; + ie_field_s cause; + ie_field_s target_id; + ie_field_s direct_forwarding_path_availability; + ie_field_s srvccho_ind; + ie_field_s > source_to_target_transparent_container; + ie_field_s > source_to_target_transparent_container_secondary; + ie_field_s > ms_classmark2; + ie_field_s > ms_classmark3; + ie_field_s > csg_id; + ie_field_s cell_access_mode; + ie_field_s ps_service_not_available; // sequence methods ho_required_ies_container(); @@ -10512,11 +10517,11 @@ struct init_context_setup_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods init_context_setup_fail_ies_container(); @@ -10701,35 +10706,35 @@ struct init_context_setup_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool trace_activation_present = false; - bool ho_restrict_list_present = false; - bool ue_radio_cap_present = false; - bool subscriber_profile_idfor_rfp_present = false; - bool cs_fallback_ind_present = false; - bool srvcc_operation_possible_present = false; - bool csg_membership_status_present = false; - bool registered_lai_present = false; - bool gummei_id_present = false; - bool mme_ue_s1ap_id_minus2_present = false; - bool management_based_mdt_allowed_present = false; - bool management_based_mdtplmn_list_present = false; - bool add_cs_fallback_ind_present = false; - bool masked_imeisv_present = false; - bool expected_ue_behaviour_present = false; - bool pro_se_authorized_present = false; - bool ueuser_plane_cio_tsupport_ind_present = false; - bool v2xservices_authorized_present = false; - bool ue_sidelink_aggregate_maximum_bitrate_present = false; - bool enhanced_coverage_restricted_present = false; - bool nrue_security_cap_present = false; - bool ce_mode_brestricted_present = false; - bool aerial_uesubscription_info_present = false; - bool pending_data_ind_present = false; - bool subscription_based_ue_differentiation_info_present = false; - bool add_rrm_prio_idx_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s ueaggregate_maximum_bitrate; + bool trace_activation_present = false; + bool ho_restrict_list_present = false; + bool ue_radio_cap_present = false; + bool subscriber_profile_idfor_rfp_present = false; + bool cs_fallback_ind_present = false; + bool srvcc_operation_possible_present = false; + bool csg_membership_status_present = false; + bool registered_lai_present = false; + bool gummei_id_present = false; + bool mme_ue_s1ap_id_minus2_present = false; + bool management_based_mdt_allowed_present = false; + bool management_based_mdtplmn_list_present = false; + bool add_cs_fallback_ind_present = false; + bool masked_imeisv_present = false; + bool expected_ue_behaviour_present = false; + bool pro_se_authorized_present = false; + bool ueuser_plane_cio_tsupport_ind_present = false; + bool v2xservices_authorized_present = false; + bool ue_sidelink_aggregate_maximum_bitrate_present = false; + bool enhanced_coverage_restricted_present = false; + bool nrue_security_cap_present = false; + bool ce_mode_brestricted_present = false; + bool aerial_uesubscription_info_present = false; + bool pending_data_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool add_rrm_prio_idx_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s ueaggregate_maximum_bitrate; ie_field_s, 1, 256, true> > erab_to_be_setup_list_ctxt_su_req; ie_field_s ue_security_cap; @@ -10831,10 +10836,10 @@ struct init_context_setup_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_failed_to_setup_list_ctxt_su_res_present = false; - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool erab_failed_to_setup_list_ctxt_su_res_present = false; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s, 1, 256, true> > erab_setup_list_ctxt_su_res; ie_field_s, 1, 256, true> > @@ -11025,45 +11030,45 @@ struct init_ue_msg_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool s_tmsi_present = false; - bool csg_id_present = false; - bool gummei_id_present = false; - bool cell_access_mode_present = false; - bool gw_transport_layer_address_present = false; - bool relay_node_ind_present = false; - bool gummei_type_present = false; - bool tunnel_info_for_bbf_present = false; - bool sipto_l_gw_transport_layer_address_present = false; - bool lhn_id_present = false; - bool mme_group_id_present = false; - bool ue_usage_type_present = false; - bool ce_mode_b_support_ind_present = false; - bool dcn_id_present = false; - bool coverage_level_present = false; - bool ue_application_layer_meas_cap_present = false; - bool edt_session_present = false; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > nas_pdu; - ie_field_s tai; - ie_field_s eutran_cgi; - ie_field_s rrc_establishment_cause; - ie_field_s s_tmsi; - ie_field_s > csg_id; - ie_field_s gummei_id; - ie_field_s cell_access_mode; - ie_field_s > gw_transport_layer_address; - ie_field_s relay_node_ind; - ie_field_s gummei_type; - ie_field_s tunnel_info_for_bbf; - ie_field_s > sipto_l_gw_transport_layer_address; - ie_field_s > lhn_id; - ie_field_s > mme_group_id; - ie_field_s > ue_usage_type; - ie_field_s ce_mode_b_support_ind; - ie_field_s > dcn_id; - ie_field_s coverage_level; - ie_field_s > ue_application_layer_meas_cap; - ie_field_s edt_session; + bool s_tmsi_present = false; + bool csg_id_present = false; + bool gummei_id_present = false; + bool cell_access_mode_present = false; + bool gw_transport_layer_address_present = false; + bool relay_node_ind_present = false; + bool gummei_type_present = false; + bool tunnel_info_for_bbf_present = false; + bool sipto_l_gw_transport_layer_address_present = false; + bool lhn_id_present = false; + bool mme_group_id_present = false; + bool ue_usage_type_present = false; + bool ce_mode_b_support_ind_present = false; + bool dcn_id_present = false; + bool coverage_level_present = false; + bool ue_application_layer_meas_cap_present = false; + bool edt_session_present = false; + ie_field_s enb_ue_s1ap_id; + ie_field_s > nas_pdu; + ie_field_s tai; + ie_field_s eutran_cgi; + ie_field_s rrc_establishment_cause; + ie_field_s s_tmsi; + ie_field_s > csg_id; + ie_field_s gummei_id; + ie_field_s cell_access_mode; + ie_field_s > gw_transport_layer_address; + ie_field_s relay_node_ind; + ie_field_s gummei_type; + ie_field_s tunnel_info_for_bbf; + ie_field_s > sipto_l_gw_transport_layer_address; + ie_field_s > lhn_id; + ie_field_s > mme_group_id; + ie_field_s > ue_usage_type; + ie_field_s ce_mode_b_support_ind; + ie_field_s > dcn_id; + ie_field_s coverage_level; + ie_field_s > ue_application_layer_meas_cap; + ie_field_s edt_session; // sequence methods init_ue_msg_ies_container(); @@ -14801,13 +14806,13 @@ struct location_report_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ps_cell_info_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s eutran_cgi; - ie_field_s tai; - ie_field_s request_type; - ie_field_s ps_cell_info; + bool ps_cell_info_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s eutran_cgi; + ie_field_s tai; + ie_field_s request_type; + ie_field_s ps_cell_info; // sequence methods location_report_ies_container(); @@ -14824,9 +14829,9 @@ struct location_report_ctrl_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s request_type; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s request_type; // sequence methods location_report_ctrl_ies_container(); @@ -14843,9 +14848,9 @@ struct location_report_fail_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cause; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cause; // sequence methods location_report_fail_ind_ies_container(); @@ -14862,8 +14867,8 @@ struct mmecp_relocation_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; // sequence methods mmecp_relocation_ind_ies_container(); @@ -14952,9 +14957,9 @@ struct mme_status_transfer_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s enb_status_transfer_transparent_container; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s enb_status_transfer_transparent_container; // sequence methods mme_status_transfer_ies_container(); @@ -14971,8 +14976,8 @@ struct nas_delivery_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; // sequence methods nas_delivery_ind_ies_container(); @@ -14989,10 +14994,10 @@ struct nas_non_delivery_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > nas_pdu; - ie_field_s cause; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > nas_pdu; + ie_field_s cause; // sequence methods nas_non_delivery_ind_ies_container(); @@ -15123,7 +15128,7 @@ struct path_switch_request_ies_container { bool rrc_resume_cause_present = false; bool nrue_security_cap_present = false; bool ps_cell_info_present = false; - ie_field_s > enb_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s > erab_to_be_switched_dl_list; ie_field_s > source_mme_ue_s1ap_id; ie_field_s eutran_cgi; @@ -15154,27 +15159,27 @@ struct path_switch_request_ack_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ueaggregate_maximum_bitrate_present = false; - bool erab_to_be_switched_ul_list_present = false; - bool erab_to_be_released_list_present = false; - bool crit_diagnostics_present = false; - bool mme_ue_s1ap_id_minus2_present = false; - bool csg_membership_status_present = false; - bool pro_se_authorized_present = false; - bool ueuser_plane_cio_tsupport_ind_present = false; - bool v2xservices_authorized_present = false; - bool ue_sidelink_aggregate_maximum_bitrate_present = false; - bool enhanced_coverage_restricted_present = false; - bool nrue_security_cap_present = false; - bool ce_mode_brestricted_present = false; - bool aerial_uesubscription_info_present = false; - bool pending_data_ind_present = false; - bool subscription_based_ue_differentiation_info_present = false; - bool ho_restrict_list_present = false; - bool add_rrm_prio_idx_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s ueaggregate_maximum_bitrate; + bool ueaggregate_maximum_bitrate_present = false; + bool erab_to_be_switched_ul_list_present = false; + bool erab_to_be_released_list_present = false; + bool crit_diagnostics_present = false; + bool mme_ue_s1ap_id_minus2_present = false; + bool csg_membership_status_present = false; + bool pro_se_authorized_present = false; + bool ueuser_plane_cio_tsupport_ind_present = false; + bool v2xservices_authorized_present = false; + bool ue_sidelink_aggregate_maximum_bitrate_present = false; + bool enhanced_coverage_restricted_present = false; + bool nrue_security_cap_present = false; + bool ce_mode_brestricted_present = false; + bool aerial_uesubscription_info_present = false; + bool pending_data_ind_present = false; + bool subscription_based_ue_differentiation_info_present = false; + bool ho_restrict_list_present = false; + bool add_rrm_prio_idx_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s ueaggregate_maximum_bitrate; ie_field_s > erab_to_be_switched_ul_list; ie_field_s, 1, 256, true> > erab_to_be_released_list; ie_field_s security_context; @@ -15209,11 +15214,11 @@ struct path_switch_request_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods path_switch_request_fail_ies_container(); @@ -15266,15 +15271,15 @@ struct reroute_nas_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool mme_ue_s1ap_id_present = false; - bool add_guti_present = false; - bool ue_usage_type_present = false; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > s1_msg; - ie_field_s > mme_group_id; - ie_field_s add_guti; - ie_field_s > ue_usage_type; + bool mme_ue_s1ap_id_present = false; + bool add_guti_present = false; + bool ue_usage_type_present = false; + ie_field_s enb_ue_s1ap_id; + ie_field_s mme_ue_s1ap_id; + ie_field_s > s1_msg; + ie_field_s > mme_group_id; + ie_field_s add_guti; + ie_field_s > ue_usage_type; // sequence methods reroute_nas_request_ies_container(); @@ -15411,11 +15416,11 @@ struct secondary_rat_data_usage_report_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ho_flag_present = false; - bool user_location_info_present = false; - bool time_since_secondary_node_release_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool ho_flag_present = false; + bool user_location_info_present = false; + bool time_since_secondary_node_release_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s, 1, 256, true> > secondary_rat_data_usage_report_list; ie_field_s ho_flag; @@ -15437,10 +15442,10 @@ struct trace_fail_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > e_utran_trace_id; - ie_field_s cause; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > e_utran_trace_id; + ie_field_s cause; // sequence methods trace_fail_ind_ies_container(); @@ -15457,9 +15462,9 @@ struct trace_start_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s trace_activation; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s trace_activation; // sequence methods trace_start_ies_container(); @@ -15476,15 +15481,15 @@ struct ue_cap_info_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ue_radio_cap_for_paging_present = false; - bool ue_application_layer_meas_cap_present = false; - bool lte_m_ind_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > ue_radio_cap; - ie_field_s > ue_radio_cap_for_paging; - ie_field_s > ue_application_layer_meas_cap; - ie_field_s lte_m_ind; + bool ue_radio_cap_for_paging_present = false; + bool ue_application_layer_meas_cap_present = false; + bool lte_m_ind_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > ue_radio_cap; + ie_field_s > ue_radio_cap_for_paging; + ie_field_s > ue_application_layer_meas_cap; + ie_field_s lte_m_ind; // sequence methods ue_cap_info_ind_ies_container(); @@ -15501,12 +15506,12 @@ struct ue_context_mod_confirm_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool csg_membership_status_present = false; - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s csg_membership_status; - ie_field_s crit_diagnostics; + bool csg_membership_status_present = false; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s csg_membership_status; + ie_field_s crit_diagnostics; // sequence methods ue_context_mod_confirm_ies_container(); @@ -15523,11 +15528,11 @@ struct ue_context_mod_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods ue_context_mod_fail_ies_container(); @@ -15544,10 +15549,10 @@ struct ue_context_mod_ind_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool csg_membership_info_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s csg_membership_info; + bool csg_membership_info_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s csg_membership_info; // sequence methods ue_context_mod_ind_ies_container(); @@ -15564,40 +15569,40 @@ struct ue_context_mod_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool security_key_present = false; - bool subscriber_profile_idfor_rfp_present = false; - bool ueaggregate_maximum_bitrate_present = false; - bool cs_fallback_ind_present = false; - bool ue_security_cap_present = false; - bool csg_membership_status_present = false; - bool registered_lai_present = false; - bool add_cs_fallback_ind_present = false; - bool pro_se_authorized_present = false; - bool srvcc_operation_possible_present = false; - bool srvcc_operation_not_possible_present = false; - bool v2xservices_authorized_present = false; - bool ue_sidelink_aggregate_maximum_bitrate_present = false; - bool nrue_security_cap_present = false; - bool aerial_uesubscription_info_present = false; - bool add_rrm_prio_idx_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > security_key; - ie_field_s > subscriber_profile_idfor_rfp; - ie_field_s ueaggregate_maximum_bitrate; - ie_field_s cs_fallback_ind; - ie_field_s ue_security_cap; - ie_field_s csg_membership_status; - ie_field_s registered_lai; - ie_field_s add_cs_fallback_ind; - ie_field_s pro_se_authorized; - ie_field_s srvcc_operation_possible; - ie_field_s srvcc_operation_not_possible; - ie_field_s v2xservices_authorized; - ie_field_s ue_sidelink_aggregate_maximum_bitrate; - ie_field_s nrue_security_cap; - ie_field_s aerial_uesubscription_info; - ie_field_s > add_rrm_prio_idx; + bool security_key_present = false; + bool subscriber_profile_idfor_rfp_present = false; + bool ueaggregate_maximum_bitrate_present = false; + bool cs_fallback_ind_present = false; + bool ue_security_cap_present = false; + bool csg_membership_status_present = false; + bool registered_lai_present = false; + bool add_cs_fallback_ind_present = false; + bool pro_se_authorized_present = false; + bool srvcc_operation_possible_present = false; + bool srvcc_operation_not_possible_present = false; + bool v2xservices_authorized_present = false; + bool ue_sidelink_aggregate_maximum_bitrate_present = false; + bool nrue_security_cap_present = false; + bool aerial_uesubscription_info_present = false; + bool add_rrm_prio_idx_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > security_key; + ie_field_s > subscriber_profile_idfor_rfp; + ie_field_s ueaggregate_maximum_bitrate; + ie_field_s cs_fallback_ind; + ie_field_s ue_security_cap; + ie_field_s csg_membership_status; + ie_field_s registered_lai; + ie_field_s add_cs_fallback_ind; + ie_field_s pro_se_authorized; + ie_field_s srvcc_operation_possible; + ie_field_s srvcc_operation_not_possible; + ie_field_s v2xservices_authorized; + ie_field_s ue_sidelink_aggregate_maximum_bitrate; + ie_field_s nrue_security_cap; + ie_field_s aerial_uesubscription_info; + ie_field_s > add_rrm_prio_idx; // sequence methods ue_context_mod_request_ies_container(); @@ -15614,10 +15619,10 @@ struct ue_context_mod_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s crit_diagnostics; // sequence methods ue_context_mod_resp_ies_container(); @@ -15652,16 +15657,16 @@ struct ue_context_release_complete_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - bool user_location_info_present = false; - bool info_on_recommended_cells_and_enbs_for_paging_present = false; - bool cell_id_and_ce_level_for_ce_capable_ues_present = false; - bool secondary_rat_data_usage_report_list_present = false; - bool time_since_secondary_node_release_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s crit_diagnostics; - ie_field_s user_location_info; + bool crit_diagnostics_present = false; + bool user_location_info_present = false; + bool info_on_recommended_cells_and_enbs_for_paging_present = false; + bool cell_id_and_ce_level_for_ce_capable_ues_present = false; + bool secondary_rat_data_usage_report_list_present = false; + bool time_since_secondary_node_release_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s crit_diagnostics; + ie_field_s user_location_info; ie_field_s info_on_recommended_cells_and_enbs_for_paging; ie_field_s cell_id_and_ce_level_for_ce_capable_ues; ie_field_s, 1, 256, true> > @@ -15683,12 +15688,12 @@ struct ue_context_release_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool gw_context_release_ind_present = false; - bool secondary_rat_data_usage_report_list_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cause; - ie_field_s gw_context_release_ind; + bool gw_context_release_ind_present = false; + bool secondary_rat_data_usage_report_list_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cause; + ie_field_s gw_context_release_ind; ie_field_s, 1, 256, true> > secondary_rat_data_usage_report_list; @@ -15707,11 +15712,11 @@ struct ue_context_resume_fail_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cause; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cause; + ie_field_s crit_diagnostics; // sequence methods ue_context_resume_fail_ies_container(); @@ -15728,10 +15733,10 @@ struct ue_context_resume_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_failed_to_resume_list_resume_req_present = false; - bool rrc_resume_cause_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool erab_failed_to_resume_list_resume_req_present = false; + bool rrc_resume_cause_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s > erab_failed_to_resume_list_resume_req; ie_field_s rrc_resume_cause; @@ -15751,12 +15756,12 @@ struct ue_context_resume_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool erab_failed_to_resume_list_resume_res_present = false; - bool crit_diagnostics_present = false; - bool security_context_present = false; - bool pending_data_ind_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool erab_failed_to_resume_list_resume_res_present = false; + bool crit_diagnostics_present = false; + bool security_context_present = false; + bool pending_data_ind_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s > erab_failed_to_resume_list_resume_res; ie_field_s crit_diagnostics; @@ -15778,13 +15783,13 @@ struct ue_context_suspend_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool info_on_recommended_cells_and_enbs_for_paging_present = false; - bool cell_id_and_ce_level_for_ce_capable_ues_present = false; - bool secondary_rat_data_usage_report_list_present = false; - bool user_location_info_present = false; - bool time_since_secondary_node_release_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; + bool info_on_recommended_cells_and_enbs_for_paging_present = false; + bool cell_id_and_ce_level_for_ce_capable_ues_present = false; + bool secondary_rat_data_usage_report_list_present = false; + bool user_location_info_present = false; + bool time_since_secondary_node_release_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; ie_field_s info_on_recommended_cells_and_enbs_for_paging; ie_field_s cell_id_and_ce_level_for_ce_capable_ues; ie_field_s, 1, 256, true> > @@ -15807,12 +15812,12 @@ struct ue_context_suspend_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - bool security_context_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s crit_diagnostics; - ie_field_s security_context; + bool crit_diagnostics_present = false; + bool security_context_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s crit_diagnostics; + ie_field_s security_context; // sequence methods ue_context_suspend_resp_ies_container(); @@ -15854,10 +15859,10 @@ struct ue_radio_cap_match_request_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool ue_radio_cap_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > ue_radio_cap; + bool ue_radio_cap_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > ue_radio_cap; // sequence methods ue_radio_cap_match_request_ies_container(); @@ -15874,11 +15879,11 @@ struct ue_radio_cap_match_resp_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool crit_diagnostics_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s voice_support_match_ind; - ie_field_s crit_diagnostics; + bool crit_diagnostics_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s voice_support_match_ind; + ie_field_s crit_diagnostics; // sequence methods ue_radio_cap_match_resp_ies_container(); @@ -15895,19 +15900,19 @@ struct ul_nas_transport_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool gw_transport_layer_address_present = false; - bool sipto_l_gw_transport_layer_address_present = false; - bool lhn_id_present = false; - bool ps_cell_info_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > nas_pdu; - ie_field_s eutran_cgi; - ie_field_s tai; - ie_field_s > gw_transport_layer_address; - ie_field_s > sipto_l_gw_transport_layer_address; - ie_field_s > lhn_id; - ie_field_s ps_cell_info; + bool gw_transport_layer_address_present = false; + bool sipto_l_gw_transport_layer_address_present = false; + bool lhn_id_present = false; + bool ps_cell_info_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > nas_pdu; + ie_field_s eutran_cgi; + ie_field_s tai; + ie_field_s > gw_transport_layer_address; + ie_field_s > sipto_l_gw_transport_layer_address; + ie_field_s > lhn_id; + ie_field_s ps_cell_info; // sequence methods ul_nas_transport_ies_container(); @@ -15943,19 +15948,19 @@ struct ul_s1cdma2000tunnelling_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - bool cdma2000_ho_required_ind_present = false; - bool cdma2000_one_xsrvcc_info_present = false; - bool cdma2000_one_xrand_present = false; - bool eutran_round_trip_delay_estimation_info_present = false; - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s cdma2000_rat_type; - ie_field_s > cdma2000_sector_id; - ie_field_s cdma2000_ho_required_ind; - ie_field_s cdma2000_one_xsrvcc_info; - ie_field_s > cdma2000_one_xrand; - ie_field_s > cdma2000_pdu; - ie_field_s > eutran_round_trip_delay_estimation_info; + bool cdma2000_ho_required_ind_present = false; + bool cdma2000_one_xsrvcc_info_present = false; + bool cdma2000_one_xrand_present = false; + bool eutran_round_trip_delay_estimation_info_present = false; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s cdma2000_rat_type; + ie_field_s > cdma2000_sector_id; + ie_field_s cdma2000_ho_required_ind; + ie_field_s cdma2000_one_xsrvcc_info; + ie_field_s > cdma2000_one_xrand; + ie_field_s > cdma2000_pdu; + ie_field_s > eutran_round_trip_delay_estimation_info; // sequence methods ul_s1cdma2000tunnelling_ies_container(); @@ -15972,10 +15977,10 @@ struct ul_ueassociated_lp_pa_transport_ies_container { using ie_field_s = protocol_ie_container_item_s; // member variables - ie_field_s > mme_ue_s1ap_id; - ie_field_s > enb_ue_s1ap_id; - ie_field_s > routing_id; - ie_field_s > lp_pa_pdu; + ie_field_s mme_ue_s1ap_id; + ie_field_s enb_ue_s1ap_id; + ie_field_s > routing_id; + ie_field_s > lp_pa_pdu; // sequence methods ul_ueassociated_lp_pa_transport_ies_container(); diff --git a/lib/include/srsran/asn1/s1ap_utils.h b/lib/include/srsran/asn1/s1ap_utils.h index ba3c0d611..30b14ff47 100644 --- a/lib/include/srsran/asn1/s1ap_utils.h +++ b/lib/include/srsran/asn1/s1ap_utils.h @@ -22,21 +22,30 @@ namespace asn1 { namespace s1ap { -struct init_context_setup_request_s; -struct ue_context_mod_request_s; -struct erab_setup_request_s; -struct erab_release_cmd_s; -struct erab_modify_request_s; +struct init_context_setup_request_ies_container; +using init_context_setup_request_s = elementary_procedure_option; +struct ue_context_mod_request_ies_container; +using ue_context_mod_request_s = elementary_procedure_option; +struct erab_setup_request_ies_container; +using erab_setup_request_s = elementary_procedure_option; +struct erab_release_cmd_ies_container; +using erab_release_cmd_s = elementary_procedure_option; +struct erab_modify_request_ies_container; +using erab_modify_request_s = elementary_procedure_option; struct ue_paging_id_c; -struct ho_request_s; +struct ho_request_ies_container; +using ho_request_s = elementary_procedure_option; struct sourceenb_to_targetenb_transparent_container_s; -struct init_context_setup_resp_s; -struct erab_setup_resp_s; +struct init_context_setup_resp_ies_container; +using init_context_setup_resp_s = elementary_procedure_option; +struct erab_setup_resp_ies_container; +using erab_setup_resp_s = elementary_procedure_option; struct rrc_establishment_cause_opts; struct cause_radio_network_opts; struct bearers_subject_to_status_transfer_item_ies_o; struct erab_level_qos_params_s; -struct ho_cmd_s; +struct ho_cmd_ies_container; +using ho_cmd_s = elementary_procedure_option; struct erab_admitted_item_s; struct erab_to_be_modified_item_bearer_mod_req_s; struct cause_c; diff --git a/lib/test/asn1/ngap_test.cc b/lib/test/asn1/ngap_test.cc index dd5c08701..ab803b354 100644 --- a/lib/test/asn1/ngap_test.cc +++ b/lib/test/asn1/ngap_test.cc @@ -35,8 +35,8 @@ int test_amf_upd() TESTASSERT_EQ(ngap_elem_procs_o::init_msg_c::types_opts::amf_cfg_upd, init_choice.type().value); amf_cfg_upd_s& amf_upd = init_choice.amf_cfg_upd(); TESTASSERT(not amf_upd.ext); - auto& amf_name = amf_upd.protocol_ies.amf_name; - TESTASSERT(amf_upd.protocol_ies.amf_name_present); + auto& amf_name = amf_upd->amf_name; + TESTASSERT(amf_upd->amf_name_present); TESTASSERT_EQ(1, amf_name.id); TESTASSERT_EQ(crit_opts::reject, amf_name.crit); TESTASSERT_EQ("srsran", amf_name.value.to_string()); @@ -70,30 +70,29 @@ int test_ngsetup_request() ng_setup_request_s& ngsetup = pdu.init_msg().value.ng_setup_request(); TESTASSERT(not ngsetup.ext); // Field 0 - TESTASSERT(ngsetup.protocol_ies.global_ran_node_id.id == 27); - TESTASSERT(ngsetup.protocol_ies.global_ran_node_id.crit.value == crit_opts::reject); - TESTASSERT(ngsetup.protocol_ies.global_ran_node_id.value.type().value == - global_ran_node_id_c::types_opts::global_gnb_id); - global_gnb_id_s& global_gnb = ngsetup.protocol_ies.global_ran_node_id.value.global_gnb_id(); + TESTASSERT(ngsetup->global_ran_node_id.id == 27); + TESTASSERT(ngsetup->global_ran_node_id.crit.value == crit_opts::reject); + TESTASSERT(ngsetup->global_ran_node_id.value.type().value == global_ran_node_id_c::types_opts::global_gnb_id); + global_gnb_id_s& global_gnb = ngsetup->global_ran_node_id.value.global_gnb_id(); TESTASSERT(global_gnb.plmn_id.to_number() == 0xF110); TESTASSERT(global_gnb.gnb_id.type().value == gnb_id_c::types_opts::gnb_id); TESTASSERT(global_gnb.gnb_id.gnb_id().to_number() == 1); // Field 1 - TESTASSERT(ngsetup.protocol_ies.ran_node_name_present); + TESTASSERT(ngsetup->ran_node_name_present); // Field 2 - TESTASSERT(ngsetup.protocol_ies.supported_ta_list.id == 102); - TESTASSERT(ngsetup.protocol_ies.supported_ta_list.crit.value == crit_opts::reject); - TESTASSERT(ngsetup.protocol_ies.supported_ta_list.value.size() == 1); - TESTASSERT(ngsetup.protocol_ies.supported_ta_list.value[0].tac.to_number() == 0x75); - TESTASSERT(ngsetup.protocol_ies.supported_ta_list.value[0].broadcast_plmn_list.size() == 1); - auto& bcast_item = ngsetup.protocol_ies.supported_ta_list.value[0].broadcast_plmn_list[0]; + TESTASSERT(ngsetup->supported_ta_list.id == 102); + TESTASSERT(ngsetup->supported_ta_list.crit.value == crit_opts::reject); + TESTASSERT(ngsetup->supported_ta_list.value.size() == 1); + TESTASSERT(ngsetup->supported_ta_list.value[0].tac.to_number() == 0x75); + TESTASSERT(ngsetup->supported_ta_list.value[0].broadcast_plmn_list.size() == 1); + auto& bcast_item = ngsetup->supported_ta_list.value[0].broadcast_plmn_list[0]; TESTASSERT(bcast_item.plmn_id.to_number() == 0xF110); TESTASSERT(bcast_item.tai_slice_support_list.size()); TESTASSERT(bcast_item.tai_slice_support_list[0].s_nssai.sst.to_number() == 1); // Field 3 - TESTASSERT(ngsetup.protocol_ies.default_paging_drx.id == 21); - TESTASSERT(ngsetup.protocol_ies.default_paging_drx.crit.value == crit_opts::ignore); - TESTASSERT(ngsetup.protocol_ies.default_paging_drx.value.value == paging_drx_opts::v256); + TESTASSERT(ngsetup->default_paging_drx.id == 21); + TESTASSERT(ngsetup->default_paging_drx.crit.value == crit_opts::ignore); + TESTASSERT(ngsetup->default_paging_drx.value.value == paging_drx_opts::v256); TESTASSERT(ceil(bref.distance(ngap_msg) / 8.0) == sizeof(ngap_msg)); TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS); @@ -128,19 +127,18 @@ int test_ngsetup_response() ngap_elem_procs_o::successful_outcome_c::types_opts::ng_setup_resp); ng_setup_resp_s& resp = pdu.successful_outcome().value.ng_setup_resp(); // field 0 - TESTASSERT(resp.protocol_ies.amf_name.id == 1); - TESTASSERT(resp.protocol_ies.amf_name.crit.value == crit_opts::reject); - TESTASSERT(resp.protocol_ies.amf_name.value.size() == 56); - TESTASSERT(resp.protocol_ies.amf_name.value.to_string() == - "amf1.cluster1.net2.amf.5gc.mnc001.mcc001.3gppnetwork.org"); + TESTASSERT(resp->amf_name.id == 1); + TESTASSERT(resp->amf_name.crit.value == crit_opts::reject); + TESTASSERT(resp->amf_name.value.size() == 56); + TESTASSERT(resp->amf_name.value.to_string() == "amf1.cluster1.net2.amf.5gc.mnc001.mcc001.3gppnetwork.org"); // field 1 - TESTASSERT(resp.protocol_ies.served_guami_list.id == 96); - TESTASSERT(resp.protocol_ies.served_guami_list.crit.value == crit_opts::reject); - TESTASSERT(resp.protocol_ies.served_guami_list.value.size() == 1); - TESTASSERT(resp.protocol_ies.served_guami_list.value[0].guami.plmn_id.to_number() == 0xF110); - TESTASSERT(resp.protocol_ies.served_guami_list.value[0].guami.amf_region_id.to_number() == 0b111000); - TESTASSERT(resp.protocol_ies.served_guami_list.value[0].guami.amf_set_id.to_number() == 0b100010); - TESTASSERT(resp.protocol_ies.served_guami_list.value[0].guami.amf_pointer.to_number() == 0b10111); + TESTASSERT(resp->served_guami_list.id == 96); + TESTASSERT(resp->served_guami_list.crit.value == crit_opts::reject); + TESTASSERT(resp->served_guami_list.value.size() == 1); + TESTASSERT(resp->served_guami_list.value[0].guami.plmn_id.to_number() == 0xF110); + TESTASSERT(resp->served_guami_list.value[0].guami.amf_region_id.to_number() == 0b111000); + TESTASSERT(resp->served_guami_list.value[0].guami.amf_set_id.to_number() == 0b100010); + TESTASSERT(resp->served_guami_list.value[0].guami.amf_pointer.to_number() == 0b10111); // field 2 // ... @@ -172,7 +170,7 @@ int test_init_ue_msg() TESTASSERT(pdu.init_msg().proc_code == 15); TESTASSERT(pdu.init_msg().crit.value == crit_opts::ignore); TESTASSERT(pdu.init_msg().value.type().value == ngap_elem_procs_o::init_msg_c::types_opts::init_ue_msg); - auto& container = pdu.init_msg().value.init_ue_msg().protocol_ies; + auto& container = *pdu.init_msg().value.init_ue_msg(); // Field 0 TESTASSERT(container.ran_ue_ngap_id.id == 85); TESTASSERT(container.ran_ue_ngap_id.crit.value == crit_opts::reject); @@ -211,7 +209,7 @@ int test_dl_nas_transport() // Field 0 // ... // Field 1 - TESTASSERT(dl_nas.protocol_ies.nas_pdu.value.size() == 42); + TESTASSERT(dl_nas->nas_pdu.value.size() == 42); TESTASSERT(ceil(bref.distance(ngap_msg) / 8.0) == sizeof(ngap_msg)); TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS); @@ -237,7 +235,7 @@ int test_ul_ran_status_transfer() TESTASSERT(pdu.init_msg().value.type().value == ngap_elem_procs_o::init_msg_c::types_opts::ul_nas_transport); auto& ul_nas = pdu.init_msg().value.ul_nas_transport(); // Field 1 - TESTASSERT(ul_nas.protocol_ies.nas_pdu.value.size() == 21); + TESTASSERT(ul_nas->nas_pdu.value.size() == 21); TESTASSERT(ceil(bref.distance(ngap_msg) / 8.0) == sizeof(ngap_msg)); TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS); @@ -308,10 +306,10 @@ int test_session_res_setup_request() TESTASSERT(pdu.init_msg().crit.value == crit_opts::reject); TESTASSERT(pdu.init_msg().value.type().value == ngap_elem_procs_o::init_msg_c::types_opts::pdu_session_res_setup_request); - auto& container = pdu.init_msg().value.pdu_session_res_setup_request().protocol_ies; - TESTASSERT(container.pdu_session_res_setup_list_su_req.id == ASN1_NGAP_ID_PDU_SESSION_RES_SETUP_LIST_SU_REQ); - TESTASSERT(container.pdu_session_res_setup_list_su_req.value.size() == 1); - auto& item = container.pdu_session_res_setup_list_su_req.value[0]; + auto& container = pdu.init_msg().value.pdu_session_res_setup_request(); + TESTASSERT(container->pdu_session_res_setup_list_su_req.id == ASN1_NGAP_ID_PDU_SESSION_RES_SETUP_LIST_SU_REQ); + TESTASSERT(container->pdu_session_res_setup_list_su_req.value.size() == 1); + auto& item = container->pdu_session_res_setup_list_su_req.value[0]; TESTASSERT(item.pdu_session_id == 1); TESTASSERT(item.s_nssai.sst.to_number() == 0); TESTASSERT(item.pdu_session_res_setup_request_transfer.to_string() == @@ -321,10 +319,9 @@ int test_session_res_setup_request() item.pdu_session_res_setup_request_transfer.size()); pdu_session_res_setup_request_transfer_s req; TESTASSERT(req.unpack(bref2) == SRSASN_SUCCESS); - TESTASSERT(req.protocol_ies.ul_ngu_up_tnl_info.id == 139); - TESTASSERT(req.protocol_ies.ul_ngu_up_tnl_info.value.type().value == - up_transport_layer_info_c::types_opts::gtp_tunnel); - TESTASSERT(req.protocol_ies.ul_ngu_up_tnl_info.value.gtp_tunnel().transport_layer_address.to_string() == + TESTASSERT(req->ul_ngu_up_tnl_info.id == 139); + TESTASSERT(req->ul_ngu_up_tnl_info.value.type().value == up_transport_layer_info_c::types_opts::gtp_tunnel); + TESTASSERT(req->ul_ngu_up_tnl_info.value.gtp_tunnel().transport_layer_address.to_string() == "11000000101010000001000111010010"); TESTASSERT(bref2.distance_bytes() == (int)item.pdu_session_res_setup_request_transfer.size()); diff --git a/lib/test/asn1/s1ap_test.cc b/lib/test/asn1/s1ap_test.cc index 8c59aa716..439c43605 100644 --- a/lib/test/asn1/s1ap_test.cc +++ b/lib/test/asn1/s1ap_test.cc @@ -39,10 +39,10 @@ int test_s1setup_request() TESTASSERT(init_choice.type().value == s1ap_elem_procs_o::init_msg_c::types_opts::s1_setup_request); s1_setup_request_s& s1req = init_choice.s1_setup_request(); TESTASSERT(not s1req.ext); - TESTASSERT(s1req.protocol_ies.global_enb_id.id == ASN1_S1AP_ID_GLOBAL_ENB_ID); - TESTASSERT(s1req.protocol_ies.global_enb_id.crit.value == crit_opts::reject); - TESTASSERT(s1req.protocol_ies.global_enb_id.value.enb_id.type().value == enb_id_c::types_opts::macro_enb_id); - TESTASSERT(s1req.protocol_ies.global_enb_id.value.enb_id.macro_enb_id().to_number() == 0x0019B); + TESTASSERT(s1req->global_enb_id.id == ASN1_S1AP_ID_GLOBAL_ENB_ID); + TESTASSERT(s1req->global_enb_id.crit.value == crit_opts::reject); + TESTASSERT(s1req->global_enb_id.value.enb_id.type().value == enb_id_c::types_opts::macro_enb_id); + TESTASSERT(s1req->global_enb_id.value.enb_id.macro_enb_id().to_number() == 0x0019B); // // // json_writer js; // // pdu.to_json(js); @@ -77,10 +77,10 @@ int test_init_ctxt_setup_req() TESTASSERT(pdu.init_msg().proc_code == 9); TESTASSERT(pdu.init_msg().crit.value == crit_opts::reject); s1ap_elem_procs_o::init_msg_c& init_choice = pdu.init_msg().value; - auto& ctxt_setup = init_choice.init_context_setup_request().protocol_ies; - TESTASSERT(ctxt_setup.ue_security_cap.id == 107); - TESTASSERT(ctxt_setup.ue_security_cap.value.encryption_algorithms.to_string() == "1100000000000000"); - TESTASSERT(ctxt_setup.ue_security_cap.value.integrity_protection_algorithms.to_string() == "1100000000000000"); + auto& ctxt_setup = init_choice.init_context_setup_request(); + TESTASSERT(ctxt_setup->ue_security_cap.id == 107); + TESTASSERT(ctxt_setup->ue_security_cap.value.encryption_algorithms.to_string() == "1100000000000000"); + TESTASSERT(ctxt_setup->ue_security_cap.value.integrity_protection_algorithms.to_string() == "1100000000000000"); TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS); @@ -99,11 +99,11 @@ int test_ue_ctxt_release_req() TESTASSERT(pdu.type().value == s1ap_pdu_c::types_opts::init_msg); TESTASSERT(pdu.init_msg().proc_code == ASN1_S1AP_ID_UE_CONTEXT_RELEASE_REQUEST); - auto& req = pdu.init_msg().value.ue_context_release_request().protocol_ies; - TESTASSERT(req.mme_ue_s1ap_id.value.value == 1); - TESTASSERT(req.enb_ue_s1ap_id.value.value == 1); - TESTASSERT(req.cause.value.type().value == cause_c::types_opts::radio_network); - TESTASSERT(req.cause.value.radio_network().value == cause_radio_network_opts::user_inactivity); + auto& req = pdu.init_msg().value.ue_context_release_request(); + TESTASSERT(req->mme_ue_s1ap_id.value.value == 1); + TESTASSERT(req->enb_ue_s1ap_id.value.value == 1); + TESTASSERT(req->cause.value.type().value == cause_c::types_opts::radio_network); + TESTASSERT(req->cause.value.radio_network().value == cause_radio_network_opts::user_inactivity); TESTASSERT(test_pack_unpack_consistency(pdu) == SRSASN_SUCCESS); @@ -178,9 +178,9 @@ int test_ho_request() TESTASSERT(pdu.type().value == s1ap_pdu_c::types_opts::init_msg); TESTASSERT(pdu.init_msg().proc_code == ASN1_S1AP_ID_HO_RES_ALLOC); TESTASSERT(pdu.init_msg().crit.value == crit_opts::reject); - auto& horeq = pdu.init_msg().value.ho_request().protocol_ies; + auto& horeq = pdu.init_msg().value.ho_request(); - auto& erab_item = horeq.erab_to_be_setup_list_ho_req.value[0]->erab_to_be_setup_item_ho_req(); + auto& erab_item = horeq->erab_to_be_setup_list_ho_req.value[0]->erab_to_be_setup_item_ho_req(); TESTASSERT(erab_item.erab_id == 5); TESTASSERT(erab_item.gtp_teid.to_string() == "b7361c56"); @@ -194,12 +194,13 @@ int test_enb_status_transfer() s1ap_pdu_c pdu; TESTASSERT(pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_ENB_STATUS_TRANSFER)); - auto& enb_status_transfer = pdu.init_msg().value.enb_status_transfer().protocol_ies; - enb_status_transfer.mme_ue_s1ap_id.value.value = 1; - enb_status_transfer.enb_ue_s1ap_id.value.value = 1; - enb_status_transfer.enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list.resize(1); + auto& enb_status_transfer = pdu.init_msg().value.enb_status_transfer(); + enb_status_transfer->mme_ue_s1ap_id.value.value = 1; + enb_status_transfer->enb_ue_s1ap_id.value.value = 1; + enb_status_transfer->enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list.resize( + 1); auto& bearer = - enb_status_transfer.enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list[0]; + enb_status_transfer->enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list[0]; TESTASSERT(bearer.load_info_obj(ASN1_S1AP_ID_BEARERS_SUBJECT_TO_STATUS_TRANSFER_ITEM)); auto& bearer_item = bearer->bearers_subject_to_status_transfer_item(); @@ -221,10 +222,9 @@ int test_enb_status_transfer() s1ap_pdu_c pdu2; TESTASSERT(pdu2.unpack(bref2) == SRSASN_SUCCESS); - auto& bearer2 = - pdu2.init_msg() - .value.enb_status_transfer() - .protocol_ies.enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list[0]; + auto& bearer2 = pdu2.init_msg() + .value.enb_status_transfer() + ->enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list[0]; auto& bearer_item2 = bearer2->bearers_subject_to_status_transfer_item(); TESTASSERT(bearer_item2.dl_coun_tvalue.hfn == bearer_item.dl_coun_tvalue.hfn); TESTASSERT(bearer_item2.dl_coun_tvalue.hfn == 0); @@ -267,15 +267,15 @@ int test_initial_ctxt_setup_response() tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_INIT_CONTEXT_SETUP); // Fill in the MME and eNB IDs - auto& container = tx_pdu.successful_outcome().value.init_context_setup_resp().protocol_ies; - container.mme_ue_s1ap_id.value = 1; - container.enb_ue_s1ap_id.value = 1; + auto& container = tx_pdu.successful_outcome().value.init_context_setup_resp(); + container->mme_ue_s1ap_id.value = 1; + container->enb_ue_s1ap_id.value = 1; - container.erab_setup_list_ctxt_su_res.value.resize(1); + container->erab_setup_list_ctxt_su_res.value.resize(1); // Fill in the GTP bind address for all bearers - for (uint32_t i = 0; i < container.erab_setup_list_ctxt_su_res.value.size(); ++i) { - container.erab_setup_list_ctxt_su_res.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_SETUP_ITEM_CTXT_SU_RES); - auto& item = container.erab_setup_list_ctxt_su_res.value[i]->erab_setup_item_ctxt_su_res(); + for (uint32_t i = 0; i < container->erab_setup_list_ctxt_su_res.value.size(); ++i) { + container->erab_setup_list_ctxt_su_res.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_SETUP_ITEM_CTXT_SU_RES); + auto& item = container->erab_setup_list_ctxt_su_res.value[i]->erab_setup_item_ctxt_su_res(); item.erab_id = 1; // uint32_to_uint8(teid_in, item.gtp_teid.data()); item.transport_layer_address.resize(32); diff --git a/srsenb/src/stack/rrc/rrc_mobility.cc b/srsenb/src/stack/rrc/rrc_mobility.cc index b8649ab9c..805935f1a 100644 --- a/srsenb/src/stack/rrc/rrc_mobility.cc +++ b/srsenb/src/stack/rrc/rrc_mobility.cc @@ -434,9 +434,9 @@ void rrc::ue::rrc_mobility::handle_ho_preparation_complete(rrc::ho_prep_result } // Check if any E-RAB that was not admitted. Cancel Handover, in such case. - if (msg.protocol_ies.erab_to_release_list_ho_cmd_present) { + if (msg->erab_to_release_list_ho_cmd_present) { get_logger().warning("E-RAB id=%d was not admitted in target eNB. Cancelling handover...", - msg.protocol_ies.erab_to_release_list_ho_cmd.value[0]->erab_item().erab_id); + msg->erab_to_release_list_ho_cmd.value[0]->erab_item().erab_id); asn1::s1ap::cause_c cause; cause.set_radio_network().value = asn1::s1ap::cause_radio_network_opts::no_radio_res_available_in_target_cell; trigger(ho_cancel_ev{cause}); @@ -622,8 +622,8 @@ rrc::ue::rrc_mobility::s1_source_ho_st::start_enb_status_transfer(const asn1::s1 } // Setup GTPU forwarding tunnel - if (s1ap_ho_cmd.protocol_ies.erab_subjectto_data_forwarding_list_present) { - const auto& fwd_erab_list = s1ap_ho_cmd.protocol_ies.erab_subjectto_data_forwarding_list.value; + if (s1ap_ho_cmd->erab_subjectto_data_forwarding_list_present) { + const auto& fwd_erab_list = s1ap_ho_cmd->erab_subjectto_data_forwarding_list.value; const auto& erab_list = rrc_ue->bearer_list.get_erabs(); for (const auto& e : fwd_erab_list) { const auto& fwd_erab = e->erab_data_forwarding_item(); @@ -810,7 +810,7 @@ void rrc::ue::rrc_mobility::handle_ho_requested(idle_st& s, const ho_req_rx_ev& rrc_ue->ue_security_cfg.get_security_algorithm_cfg(); recfg_r8.security_cfg_ho.handov_type.intra_lte().key_change_ind = false; recfg_r8.security_cfg_ho.handov_type.intra_lte().next_hop_chaining_count = - ho_req.ho_req_msg->protocol_ies.security_context.value.next_hop_chaining_count; + (*ho_req.ho_req_msg)->security_context.value.next_hop_chaining_count; /* Prepare Handover Command to be sent via S1AP */ srsran::unique_byte_buffer_t ho_cmd_pdu = srsran::make_byte_buffer(); @@ -935,7 +935,7 @@ bool rrc::ue::rrc_mobility::apply_ho_prep_cfg(const ho_prep_info_r8_ies_s& const cell_cfg_t& target_cell_cfg = target_cell->cell_common->cell_cfg; // Establish ERABs/DRBs - for (const auto& erab_item : ho_req_msg.protocol_ies.erab_to_be_setup_list_ho_req.value) { + for (const auto& erab_item : ho_req_msg->erab_to_be_setup_list_ho_req.value) { const auto& erab = erab_item->erab_to_be_setup_item_ho_req(); if (erab.ext) { get_logger().warning("Not handling E-RABToBeSetupList extensions"); @@ -972,13 +972,13 @@ bool rrc::ue::rrc_mobility::apply_ho_prep_cfg(const ho_prep_info_r8_ies_s& // Regenerate AS Keys // See TS 33.401, Sec. 7.2.8.4.3 - if (not rrc_ue->ue_security_cfg.set_security_capabilities(ho_req_msg.protocol_ies.ue_security_cap.value)) { + if (not rrc_ue->ue_security_cfg.set_security_capabilities(ho_req_msg->ue_security_cap.value)) { cause.set_radio_network().value = asn1::s1ap::cause_radio_network_opts::encryption_and_or_integrity_protection_algorithms_not_supported; return false; } - rrc_ue->ue_security_cfg.set_security_key(ho_req_msg.protocol_ies.security_context.value.next_hop_param); - rrc_ue->ue_security_cfg.set_ncc(ho_req_msg.protocol_ies.security_context.value.next_hop_chaining_count); + rrc_ue->ue_security_cfg.set_security_key(ho_req_msg->security_context.value.next_hop_param); + rrc_ue->ue_security_cfg.set_ncc(ho_req_msg->security_context.value.next_hop_chaining_count); rrc_ue->ue_security_cfg.regenerate_keys_handover(target_cell_cfg.pci, target_cell_cfg.dl_earfcn); // Save UE Capabilities diff --git a/srsenb/src/stack/rrc/rrc_ue.cc b/srsenb/src/stack/rrc/rrc_ue.cc index 23fd53c03..67cc2b557 100644 --- a/srsenb/src/stack/rrc/rrc_ue.cc +++ b/srsenb/src/stack/rrc/rrc_ue.cc @@ -1136,14 +1136,14 @@ void rrc::ue::send_connection_release() */ void rrc::ue::handle_ue_init_ctxt_setup_req(const asn1::s1ap::init_context_setup_request_s& msg) { - set_bitrates(msg.protocol_ies.ueaggregate_maximum_bitrate.value); - ue_security_cfg.set_security_capabilities(msg.protocol_ies.ue_security_cap.value); - ue_security_cfg.set_security_key(msg.protocol_ies.security_key.value); + set_bitrates(msg->ueaggregate_maximum_bitrate.value); + ue_security_cfg.set_security_capabilities(msg->ue_security_cap.value); + ue_security_cfg.set_security_key(msg->security_key.value); // CSFB - if (msg.protocol_ies.cs_fallback_ind_present) { - if (msg.protocol_ies.cs_fallback_ind.value.value == asn1::s1ap::cs_fallback_ind_opts::cs_fallback_required or - msg.protocol_ies.cs_fallback_ind.value.value == asn1::s1ap::cs_fallback_ind_opts::cs_fallback_high_prio) { + if (msg->cs_fallback_ind_present) { + if (msg->cs_fallback_ind.value.value == asn1::s1ap::cs_fallback_ind_opts::cs_fallback_required or + msg->cs_fallback_ind.value.value == asn1::s1ap::cs_fallback_ind_opts::cs_fallback_high_prio) { is_csfb = true; } } @@ -1154,25 +1154,25 @@ void rrc::ue::handle_ue_init_ctxt_setup_req(const asn1::s1ap::init_context_setup bool rrc::ue::handle_ue_ctxt_mod_req(const asn1::s1ap::ue_context_mod_request_s& msg) { - if (msg.protocol_ies.cs_fallback_ind_present) { - if (msg.protocol_ies.cs_fallback_ind.value.value == asn1::s1ap::cs_fallback_ind_opts::cs_fallback_required || - msg.protocol_ies.cs_fallback_ind.value.value == asn1::s1ap::cs_fallback_ind_opts::cs_fallback_high_prio) { + if (msg->cs_fallback_ind_present) { + if (msg->cs_fallback_ind.value.value == asn1::s1ap::cs_fallback_ind_opts::cs_fallback_required || + msg->cs_fallback_ind.value.value == asn1::s1ap::cs_fallback_ind_opts::cs_fallback_high_prio) { /* Remember that we are in a CSFB right now */ is_csfb = true; } } // UEAggregateMaximumBitrate - if (msg.protocol_ies.ueaggregate_maximum_bitrate_present) { - set_bitrates(msg.protocol_ies.ueaggregate_maximum_bitrate.value); + if (msg->ueaggregate_maximum_bitrate_present) { + set_bitrates(msg->ueaggregate_maximum_bitrate.value); } - if (msg.protocol_ies.ue_security_cap_present) { - ue_security_cfg.set_security_capabilities(msg.protocol_ies.ue_security_cap.value); + if (msg->ue_security_cap_present) { + ue_security_cfg.set_security_capabilities(msg->ue_security_cap.value); } - if (msg.protocol_ies.security_key_present) { - ue_security_cfg.set_security_key(msg.protocol_ies.security_key.value); + if (msg->security_key_present) { + ue_security_cfg.set_security_key(msg->security_key.value); send_security_mode_command(); } diff --git a/srsenb/src/stack/s1ap/s1ap.cc b/srsenb/src/stack/s1ap/s1ap.cc index e18d1325d..933ef6d9e 100644 --- a/srsenb/src/stack/s1ap/s1ap.cc +++ b/srsenb/src/stack/s1ap/s1ap.cc @@ -149,7 +149,7 @@ srsran::proc_outcome_t s1ap::ue::ho_prep_proc_t::react(const ho_prep_fail_s& msg { ue_ptr->ts1_reloc_prep.stop(); - std::string cause = s1ap_ptr->get_cause(msg.protocol_ies.cause.value); + std::string cause = s1ap_ptr->get_cause(msg->cause.value); procError("HO preparation Failure. Cause: %s", cause.c_str()); srsran::console("HO preparation Failure. Cause: %s\n", cause.c_str()); @@ -167,16 +167,16 @@ srsran::proc_outcome_t s1ap::ue::ho_prep_proc_t::react(const asn1::s1ap::ho_cmd_ ue_ptr->ts1_reloc_overall.run(); // Check for unsupported S1AP fields - if (msg.ext or msg.protocol_ies.target_to_source_transparent_container_secondary_present or - msg.protocol_ies.handov_type.value.value != handov_type_opts::intralte or - msg.protocol_ies.crit_diagnostics_present or msg.protocol_ies.nas_security_paramsfrom_e_utran_present) { + if (msg.ext or msg->target_to_source_transparent_container_secondary_present or + msg->handov_type.value.value != handov_type_opts::intralte or msg->crit_diagnostics_present or + msg->nas_security_paramsfrom_e_utran_present) { procWarning("Not handling HandoverCommand extensions and non-intraLTE params"); } // In case of intra-system Handover, Target to Source Transparent Container IE shall be encoded as // Target eNB to Source eNB Transparent Container IE - asn1::cbit_ref bref(msg.protocol_ies.target_to_source_transparent_container.value.data(), - msg.protocol_ies.target_to_source_transparent_container.value.size()); + asn1::cbit_ref bref(msg->target_to_source_transparent_container.value.data(), + msg->target_to_source_transparent_container.value.size()); asn1::s1ap::targetenb_to_sourceenb_transparent_container_s container; if (container.unpack(bref) != asn1::SRSASN_SUCCESS) { procError("Failed to decode TargeteNBToSourceeNBTransparentContainer"); @@ -528,25 +528,25 @@ bool s1ap::setup_s1() s1ap_pdu_c pdu; pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_S1_SETUP); - s1_setup_request_ies_container& container = pdu.init_msg().value.s1_setup_request().protocol_ies; - container.global_enb_id.value.plm_nid[0] = ((uint8_t*)&plmn)[1]; - container.global_enb_id.value.plm_nid[1] = ((uint8_t*)&plmn)[2]; - container.global_enb_id.value.plm_nid[2] = ((uint8_t*)&plmn)[3]; + s1_setup_request_s& container = pdu.init_msg().value.s1_setup_request(); + container->global_enb_id.value.plm_nid[0] = ((uint8_t*)&plmn)[1]; + container->global_enb_id.value.plm_nid[1] = ((uint8_t*)&plmn)[2]; + container->global_enb_id.value.plm_nid[2] = ((uint8_t*)&plmn)[3]; - container.global_enb_id.value.enb_id.set_macro_enb_id().from_number(args.enb_id); + container->global_enb_id.value.enb_id.set_macro_enb_id().from_number(args.enb_id); - container.enbname_present = true; - container.enbname.value.from_string(args.enb_name); + container->enbname_present = true; + container->enbname.value.from_string(args.enb_name); - container.supported_tas.value.resize(1); + container->supported_tas.value.resize(1); tmp16 = htons(args.tac); - memcpy(container.supported_tas.value[0].tac.data(), (uint8_t*)&tmp16, 2); - container.supported_tas.value[0].broadcast_plmns.resize(1); - container.supported_tas.value[0].broadcast_plmns[0][0] = ((uint8_t*)&plmn)[1]; - container.supported_tas.value[0].broadcast_plmns[0][1] = ((uint8_t*)&plmn)[2]; - container.supported_tas.value[0].broadcast_plmns[0][2] = ((uint8_t*)&plmn)[3]; + memcpy(container->supported_tas.value[0].tac.data(), (uint8_t*)&tmp16, 2); + container->supported_tas.value[0].broadcast_plmns.resize(1); + container->supported_tas.value[0].broadcast_plmns[0][0] = ((uint8_t*)&plmn)[1]; + container->supported_tas.value[0].broadcast_plmns[0][1] = ((uint8_t*)&plmn)[2]; + container->supported_tas.value[0].broadcast_plmns[0][2] = ((uint8_t*)&plmn)[3]; - container.default_paging_drx.value.value = asn1::s1ap::paging_drx_opts::v128; // Todo: add to args, config file + container->default_paging_drx.value.value = asn1::s1ap::paging_drx_opts::v128; // Todo: add to args, config file return sctp_send_s1ap_pdu(pdu, 0, "s1SetupRequest"); } @@ -732,16 +732,15 @@ bool s1ap::handle_dlnastransport(const dl_nas_transport_s& msg) if (msg.ext) { logger.warning("Not handling S1AP message extension"); } - ue* u = - handle_s1apmsg_ue_id(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + ue* u = handle_s1apmsg_ue_id(msg->enb_ue_s1ap_id.value.value, msg->mme_ue_s1ap_id.value.value); if (u == nullptr) { return false; } - if (msg.protocol_ies.ho_restrict_list_present) { + if (msg->ho_restrict_list_present) { logger.warning("Not handling HandoverRestrictionList"); } - if (msg.protocol_ies.subscriber_profile_idfor_rfp_present) { + if (msg->subscriber_profile_idfor_rfp_present) { logger.warning("Not handling SubscriberProfileIDforRFP"); } @@ -750,31 +749,29 @@ bool s1ap::handle_dlnastransport(const dl_nas_transport_s& msg) logger.error("Fatal Error: Couldn't allocate buffer in s1ap::run_thread()."); return false; } - memcpy(pdu->msg, msg.protocol_ies.nas_pdu.value.data(), msg.protocol_ies.nas_pdu.value.size()); - pdu->N_bytes = msg.protocol_ies.nas_pdu.value.size(); + memcpy(pdu->msg, msg->nas_pdu.value.data(), msg->nas_pdu.value.size()); + pdu->N_bytes = msg->nas_pdu.value.size(); rrc->write_dl_info(u->ctxt.rnti, std::move(pdu)); return true; } bool s1ap::handle_initialctxtsetuprequest(const init_context_setup_request_s& msg) { - const auto& prot_ies = msg.protocol_ies; WarnUnsupportFeature(msg.ext, "message extension"); - WarnUnsupportFeature(prot_ies.add_cs_fallback_ind_present, "AdditionalCSFallbackIndicator"); - WarnUnsupportFeature(prot_ies.csg_membership_status_present, "CSGMembershipStatus"); - WarnUnsupportFeature(prot_ies.gummei_id_present, "GUMMEI_ID"); - WarnUnsupportFeature(prot_ies.ho_restrict_list_present, "HandoverRestrictionList"); - WarnUnsupportFeature(prot_ies.management_based_mdt_allowed_present, "ManagementBasedMDTAllowed"); - WarnUnsupportFeature(prot_ies.management_based_mdtplmn_list_present, "ManagementBasedMDTPLMNList"); - WarnUnsupportFeature(prot_ies.mme_ue_s1ap_id_minus2_present, "MME_UE_S1AP_ID_2"); - WarnUnsupportFeature(prot_ies.registered_lai_present, "RegisteredLAI"); - WarnUnsupportFeature(prot_ies.srvcc_operation_possible_present, "SRVCCOperationPossible"); - WarnUnsupportFeature(prot_ies.subscriber_profile_idfor_rfp_present, "SubscriberProfileIDforRFP"); - WarnUnsupportFeature(prot_ies.trace_activation_present, "TraceActivation"); - WarnUnsupportFeature(prot_ies.ue_radio_cap_present, "UERadioCapability"); - - ue* u = - handle_s1apmsg_ue_id(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + WarnUnsupportFeature(msg->add_cs_fallback_ind_present, "AdditionalCSFallbackIndicator"); + WarnUnsupportFeature(msg->csg_membership_status_present, "CSGMembershipStatus"); + WarnUnsupportFeature(msg->gummei_id_present, "GUMMEI_ID"); + WarnUnsupportFeature(msg->ho_restrict_list_present, "HandoverRestrictionList"); + WarnUnsupportFeature(msg->management_based_mdt_allowed_present, "ManagementBasedMDTAllowed"); + WarnUnsupportFeature(msg->management_based_mdtplmn_list_present, "ManagementBasedMDTPLMNList"); + WarnUnsupportFeature(msg->mme_ue_s1ap_id_minus2_present, "MME_UE_S1AP_ID_2"); + WarnUnsupportFeature(msg->registered_lai_present, "RegisteredLAI"); + WarnUnsupportFeature(msg->srvcc_operation_possible_present, "SRVCCOperationPossible"); + WarnUnsupportFeature(msg->subscriber_profile_idfor_rfp_present, "SubscriberProfileIDforRFP"); + WarnUnsupportFeature(msg->trace_activation_present, "TraceActivation"); + WarnUnsupportFeature(msg->ue_radio_cap_present, "UERadioCapability"); + + ue* u = handle_s1apmsg_ue_id(msg->enb_ue_s1ap_id.value.value, msg->mme_ue_s1ap_id.value.value); if (u == nullptr) { return false; } @@ -787,9 +784,9 @@ bool s1ap::handle_initialctxtsetuprequest(const init_context_setup_request_s& ms // Update E-RABs erab_id_list updated_erabs; erab_item_list failed_cfg_erabs; - add_repeated_erab_ids(prot_ies.erab_to_be_setup_list_ctxt_su_req.value, failed_cfg_erabs); + add_repeated_erab_ids(msg->erab_to_be_setup_list_ctxt_su_req.value, failed_cfg_erabs); - for (const auto& item : msg.protocol_ies.erab_to_be_setup_list_ctxt_su_req.value) { + for (const auto& item : msg->erab_to_be_setup_list_ctxt_su_req.value) { const auto& erab = item->erab_to_be_setup_item_ctxt_su_req(); if (contains_erab_id(failed_cfg_erabs, erab.erab_id)) { // E-RAB is duplicate @@ -823,9 +820,9 @@ bool s1ap::handle_initialctxtsetuprequest(const init_context_setup_request_s& ms } /* Ideally the check below would be "if (users[rnti].is_csfb)" */ - if (msg.protocol_ies.cs_fallback_ind_present) { - if (msg.protocol_ies.cs_fallback_ind.value.value == cs_fallback_ind_opts::cs_fallback_required || - msg.protocol_ies.cs_fallback_ind.value.value == cs_fallback_ind_opts::cs_fallback_high_prio) { + if (msg->cs_fallback_ind_present) { + if (msg->cs_fallback_ind.value.value == cs_fallback_ind_opts::cs_fallback_required || + msg->cs_fallback_ind.value.value == cs_fallback_ind_opts::cs_fallback_high_prio) { // Send RRC Release (cs-fallback-triggered) to MME cause_c cause; cause.set_radio_network().value = cause_radio_network_opts::cs_fallback_triggered; @@ -845,8 +842,8 @@ bool s1ap::handle_paging(const asn1::s1ap::paging_s& msg) { WarnUnsupportFeature(msg.ext, "S1AP message extension"); - uint32_t ueid = msg.protocol_ies.ue_id_idx_value.value.to_number(); - rrc->add_paging_id(ueid, msg.protocol_ies.ue_paging_id.value); + uint32_t ueid = msg->ue_id_idx_value.value.to_number(); + rrc->add_paging_id(ueid, msg->ue_paging_id.value); return true; } @@ -854,21 +851,20 @@ bool s1ap::handle_erabsetuprequest(const erab_setup_request_s& msg) { WarnUnsupportFeature(msg.ext, "S1AP message extension"); - ue* u = - handle_s1apmsg_ue_id(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + ue* u = handle_s1apmsg_ue_id(msg->enb_ue_s1ap_id.value.value, msg->mme_ue_s1ap_id.value.value); if (u == nullptr) { return false; } - if (msg.protocol_ies.ueaggregate_maximum_bitrate_present) { - rrc->set_aggregate_max_bitrate(u->ctxt.rnti, msg.protocol_ies.ueaggregate_maximum_bitrate.value); + if (msg->ueaggregate_maximum_bitrate_present) { + rrc->set_aggregate_max_bitrate(u->ctxt.rnti, msg->ueaggregate_maximum_bitrate.value); } erab_id_list updated_erabs; erab_item_list failed_cfg_erabs; - add_repeated_erab_ids(msg.protocol_ies.erab_to_be_setup_list_bearer_su_req.value, failed_cfg_erabs); + add_repeated_erab_ids(msg->erab_to_be_setup_list_bearer_su_req.value, failed_cfg_erabs); - for (const auto& item : msg.protocol_ies.erab_to_be_setup_list_bearer_su_req.value) { + for (const auto& item : msg->erab_to_be_setup_list_bearer_su_req.value) { const auto& erab = item->erab_to_be_setup_item_bearer_su_req(); if (contains_erab_id(failed_cfg_erabs, erab.erab_id)) { // E-RAB is duplicate @@ -914,21 +910,20 @@ bool s1ap::handle_erabmodifyrequest(const erab_modify_request_s& msg) { WarnUnsupportFeature(msg.ext, "S1AP message extension"); - ue* u = - handle_s1apmsg_ue_id(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + ue* u = handle_s1apmsg_ue_id(msg->enb_ue_s1ap_id.value.value, msg->mme_ue_s1ap_id.value.value); if (u == nullptr) { return false; } - if (msg.protocol_ies.ueaggregate_maximum_bitrate_present) { - rrc->set_aggregate_max_bitrate(u->ctxt.rnti, msg.protocol_ies.ueaggregate_maximum_bitrate.value); + if (msg->ueaggregate_maximum_bitrate_present) { + rrc->set_aggregate_max_bitrate(u->ctxt.rnti, msg->ueaggregate_maximum_bitrate.value); } erab_id_list updated_erabs; erab_item_list failed_cfg_erabs; - add_repeated_erab_ids(msg.protocol_ies.erab_to_be_modified_list_bearer_mod_req.value, failed_cfg_erabs); + add_repeated_erab_ids(msg->erab_to_be_modified_list_bearer_mod_req.value, failed_cfg_erabs); - for (const auto& item : msg.protocol_ies.erab_to_be_modified_list_bearer_mod_req.value) { + for (const auto& item : msg->erab_to_be_modified_list_bearer_mod_req.value) { const auto& erab = item->erab_to_be_modified_item_bearer_mod_req(); if (contains_erab_id(failed_cfg_erabs, erab.erab_id)) { // E-RAB is duplicate @@ -969,8 +964,7 @@ bool s1ap::handle_erabreleasecommand(const erab_release_cmd_s& msg) { WarnUnsupportFeature(msg.ext, "S1AP message extension"); - ue* u = - handle_s1apmsg_ue_id(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + ue* u = handle_s1apmsg_ue_id(msg->enb_ue_s1ap_id.value.value, msg->mme_ue_s1ap_id.value.value); if (u == nullptr) { return false; } @@ -984,7 +978,7 @@ bool s1ap::handle_erabreleasecommand(const erab_release_cmd_s& msg) return e.erab_id == erab_id; })); }; - for (const auto& item : msg.protocol_ies.erab_to_be_released_list.value) { + for (const auto& item : msg->erab_to_be_released_list.value) { const auto& erab = item->erab_item(); if (is_repeated_erab_id(erab.erab_id)) { @@ -1003,7 +997,7 @@ bool s1ap::handle_erabreleasecommand(const erab_release_cmd_s& msg) // Notify RRC of E-RAB update. (RRC reconf message is going to be sent. if (not updated_erabs.empty()) { - rrc->notify_ue_erab_updates(u->ctxt.rnti, msg.protocol_ies.nas_pdu.value); + rrc->notify_ue_erab_updates(u->ctxt.rnti, msg->nas_pdu.value); } // Send E-RAB release response back to the MME @@ -1019,13 +1013,12 @@ bool s1ap::handle_erabreleasecommand(const erab_release_cmd_s& msg) bool s1ap::handle_uecontextmodifyrequest(const ue_context_mod_request_s& msg) { WarnUnsupportFeature(msg.ext, "S1AP message extension"); - WarnUnsupportFeature(msg.protocol_ies.add_cs_fallback_ind_present, "AdditionalCSFallbackIndicator"); - WarnUnsupportFeature(msg.protocol_ies.csg_membership_status_present, "CSGMembershipStatus"); - WarnUnsupportFeature(msg.protocol_ies.registered_lai_present, "RegisteredLAI"); - WarnUnsupportFeature(msg.protocol_ies.subscriber_profile_idfor_rfp_present, "SubscriberProfileIDforRFP"); + WarnUnsupportFeature(msg->add_cs_fallback_ind_present, "AdditionalCSFallbackIndicator"); + WarnUnsupportFeature(msg->csg_membership_status_present, "CSGMembershipStatus"); + WarnUnsupportFeature(msg->registered_lai_present, "RegisteredLAI"); + WarnUnsupportFeature(msg->subscriber_profile_idfor_rfp_present, "SubscriberProfileIDforRFP"); - ue* u = - handle_s1apmsg_ue_id(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + ue* u = handle_s1apmsg_ue_id(msg->enb_ue_s1ap_id.value.value, msg->mme_ue_s1ap_id.value.value); if (u == nullptr) { return false; } @@ -1041,9 +1034,9 @@ bool s1ap::handle_uecontextmodifyrequest(const ue_context_mod_request_s& msg) u->send_uectxtmodifyresp(); /* Ideally the check below would be "if (users[rnti].is_csfb)" */ - if (msg.protocol_ies.cs_fallback_ind_present) { - if (msg.protocol_ies.cs_fallback_ind.value.value == cs_fallback_ind_opts::cs_fallback_required || - msg.protocol_ies.cs_fallback_ind.value.value == cs_fallback_ind_opts::cs_fallback_high_prio) { + if (msg->cs_fallback_ind_present) { + if (msg->cs_fallback_ind.value.value == cs_fallback_ind_opts::cs_fallback_required || + msg->cs_fallback_ind.value.value == cs_fallback_ind_opts::cs_fallback_high_prio) { // Send RRC Release (cs-fallback-triggered) to MME cause_c cause; cause.set_radio_network().value = cause_radio_network_opts::cs_fallback_triggered; @@ -1060,8 +1053,8 @@ bool s1ap::handle_uectxtreleasecommand(const ue_context_release_cmd_s& msg) WarnUnsupportFeature(msg.ext, "S1AP message extension"); ue* u = nullptr; - if (msg.protocol_ies.ue_s1ap_ids.value.type().value == ue_s1ap_ids_c::types_opts::ue_s1ap_id_pair) { - const auto& idpair = msg.protocol_ies.ue_s1ap_ids.value.ue_s1ap_id_pair(); + if (msg->ue_s1ap_ids.value.type().value == ue_s1ap_ids_c::types_opts::ue_s1ap_id_pair) { + const auto& idpair = msg->ue_s1ap_ids.value.ue_s1ap_id_pair(); if (idpair.ext) { logger.warning("Not handling S1AP message extension"); @@ -1074,7 +1067,7 @@ bool s1ap::handle_uectxtreleasecommand(const ue_context_release_cmd_s& msg) return false; } } else { - uint32_t mme_ue_id = msg.protocol_ies.ue_s1ap_ids.value.mme_ue_s1ap_id(); + uint32_t mme_ue_id = msg->ue_s1ap_ids.value.mme_ue_s1ap_id(); u = users.find_ue_mmeid(mme_ue_id); if (u == nullptr) { logger.warning("UE for mme_ue_s1ap_id:%d not found - discarding message", mme_ue_id); @@ -1100,7 +1093,7 @@ bool s1ap::handle_s1setupfailure(const asn1::s1ap::s1_setup_fail_s& msg) return false; } - std::string cause = get_cause(msg.protocol_ies.cause.value); + std::string cause = get_cause(msg->cause.value); logger.error("S1 Setup Failure. Cause: %s", cause.c_str()); srsran::console("S1 Setup Failure. Cause: %s\n", cause.c_str()); return true; @@ -1108,8 +1101,7 @@ bool s1ap::handle_s1setupfailure(const asn1::s1ap::s1_setup_fail_s& msg) bool s1ap::handle_handover_preparation_failure(const ho_prep_fail_s& msg) { - ue* u = - handle_s1apmsg_ue_id(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + ue* u = handle_s1apmsg_ue_id(msg->enb_ue_s1ap_id.value.value, msg->mme_ue_s1ap_id.value.value); if (u == nullptr) { return false; } @@ -1127,8 +1119,7 @@ bool s1ap::handle_handover_preparation_failure(const ho_prep_fail_s& msg) bool s1ap::handle_handover_command(const asn1::s1ap::ho_cmd_s& msg) { - ue* u = - handle_s1apmsg_ue_id(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + ue* u = handle_s1apmsg_ue_id(msg->enb_ue_s1ap_id.value.value, msg->mme_ue_s1ap_id.value.value); if (u == nullptr) { return false; } @@ -1150,15 +1141,15 @@ bool s1ap::handle_handover_command(const asn1::s1ap::ho_cmd_s& msg) bool s1ap::handle_handover_request(const asn1::s1ap::ho_request_s& msg) { uint16_t rnti = SRSRAN_INVALID_RNTI; - uint32_t mme_ue_s1ap_id = msg.protocol_ies.mme_ue_s1ap_id.value.value; + uint32_t mme_ue_s1ap_id = msg->mme_ue_s1ap_id.value.value; asn1::s1ap::cause_c cause; cause.set_misc().value = cause_misc_opts::unspecified; - if (msg.ext or msg.protocol_ies.ho_restrict_list_present) { + if (msg.ext or msg->ho_restrict_list_present) { logger.warning("Not handling S1AP Handover Request extensions or Handover Restriction List"); } - if (msg.protocol_ies.handov_type.value.value != handov_type_opts::intralte) { + if (msg->handov_type.value.value != handov_type_opts::intralte) { logger.error("Not handling S1AP non-intra LTE handovers"); cause.set_radio_network().value = cause_radio_network_opts::interrat_redirection; send_ho_failure(mme_ue_s1ap_id, cause); @@ -1166,9 +1157,9 @@ bool s1ap::handle_handover_request(const asn1::s1ap::ho_request_s& msg) } // Confirm the UE does not exist in TeNB - if (users.find_ue_mmeid(msg.protocol_ies.mme_ue_s1ap_id.value.value) != nullptr) { + if (users.find_ue_mmeid(msg->mme_ue_s1ap_id.value.value) != nullptr) { logger.error("The provided MME_UE_S1AP_ID=%" PRIu64 " is already connected to the cell", - msg.protocol_ies.mme_ue_s1ap_id.value.value); + msg->mme_ue_s1ap_id.value.value); cause.set_radio_network().value = cause_radio_network_opts::unknown_mme_ue_s1ap_id; send_ho_failure(mme_ue_s1ap_id, cause); return false; @@ -1176,13 +1167,13 @@ bool s1ap::handle_handover_request(const asn1::s1ap::ho_request_s& msg) // Create user ctxt object and associated MME context std::unique_ptr ue_ptr{new ue{this}}; - ue_ptr->ctxt.mme_ue_s1ap_id = msg.protocol_ies.mme_ue_s1ap_id.value.value; + ue_ptr->ctxt.mme_ue_s1ap_id = msg->mme_ue_s1ap_id.value.value; srsran_assert(users.add_user(std::move(ue_ptr)) != nullptr, "Unexpected failure to create S1AP UE"); // Unpack Transparent Container sourceenb_to_targetenb_transparent_container_s container; - asn1::cbit_ref bref{msg.protocol_ies.source_to_target_transparent_container.value.data(), - msg.protocol_ies.source_to_target_transparent_container.value.size()}; + asn1::cbit_ref bref{msg->source_to_target_transparent_container.value.data(), + msg->source_to_target_transparent_container.value.size()}; if (container.unpack(bref) != asn1::SRSASN_SUCCESS) { logger.warning("Failed to unpack SourceToTargetTransparentContainer"); cause.set_protocol().value = cause_protocol_opts::transfer_syntax_error; @@ -1209,10 +1200,10 @@ void s1ap::send_ho_failure(uint32_t mme_ue_s1ap_id, const asn1::s1ap::cause_c& c s1ap_pdu_c tx_pdu; tx_pdu.set_unsuccessful_outcome().load_info_obj(ASN1_S1AP_ID_HO_RES_ALLOC); - ho_fail_ies_container& container = tx_pdu.unsuccessful_outcome().value.ho_fail().protocol_ies; + ho_fail_s& container = tx_pdu.unsuccessful_outcome().value.ho_fail(); - container.mme_ue_s1ap_id.value = mme_ue_s1ap_id; - container.cause.value = cause; + container->mme_ue_s1ap_id.value = mme_ue_s1ap_id; + container->cause.value = cause; sctp_send_s1ap_pdu(tx_pdu, SRSRAN_INVALID_RNTI, "HandoverFailure"); } @@ -1226,24 +1217,24 @@ bool s1ap::send_ho_req_ack(const asn1::s1ap::ho_request_s& msg, { s1ap_pdu_c tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_HO_RES_ALLOC); - ho_request_ack_ies_container& container = tx_pdu.successful_outcome().value.ho_request_ack().protocol_ies; + ho_request_ack_s& container = tx_pdu.successful_outcome().value.ho_request_ack(); - ue* ue_ptr = users.find_ue_mmeid(msg.protocol_ies.mme_ue_s1ap_id.value.value); + ue* ue_ptr = users.find_ue_mmeid(msg->mme_ue_s1ap_id.value.value); if (ue_ptr == nullptr) { - logger.error("The MME-S1AP-UE-ID=%ld is not valid", msg.protocol_ies.mme_ue_s1ap_id.value.value); + logger.error("The MME-S1AP-UE-ID=%ld is not valid", msg->mme_ue_s1ap_id.value.value); return false; } ue_ptr->ctxt.rnti = rnti; ue_ptr->ctxt.enb_cc_idx = enb_cc_idx; - container.mme_ue_s1ap_id.value = msg.protocol_ies.mme_ue_s1ap_id.value.value; - container.enb_ue_s1ap_id.value = ue_ptr->ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = msg->mme_ue_s1ap_id.value.value; + container->enb_ue_s1ap_id.value = ue_ptr->ctxt.enb_ue_s1ap_id; // Add admitted E-RABs - container.erab_admitted_list.value.resize(admitted_bearers.size()); + container->erab_admitted_list.value.resize(admitted_bearers.size()); for (size_t i = 0; i < admitted_bearers.size(); ++i) { - container.erab_admitted_list.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_ADMITTED_ITEM); - auto& c = container.erab_admitted_list.value[i]->erab_admitted_item(); + container->erab_admitted_list.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_ADMITTED_ITEM); + auto& c = container->erab_admitted_list.value[i]->erab_admitted_item(); c = admitted_bearers[i]; if (!args.gtp_advertise_addr.empty()) { c.transport_layer_address = addr_to_asn1(args.gtp_advertise_addr.c_str()); @@ -1264,12 +1255,12 @@ bool s1ap::send_ho_req_ack(const asn1::s1ap::ho_request_s& msg, // Add failed to Setup E-RABs if (not not_admitted_bearers.empty()) { - container.erab_failed_to_setup_list_ho_req_ack_present = true; - container.erab_failed_to_setup_list_ho_req_ack.value.resize(not_admitted_bearers.size()); + container->erab_failed_to_setup_list_ho_req_ack_present = true; + container->erab_failed_to_setup_list_ho_req_ack.value.resize(not_admitted_bearers.size()); for (size_t i = 0; i < not_admitted_bearers.size(); ++i) { - container.erab_failed_to_setup_list_ho_req_ack.value[i].load_info_obj( + container->erab_failed_to_setup_list_ho_req_ack.value[i].load_info_obj( ASN1_S1AP_ID_ERAB_FAILEDTO_SETUP_ITEM_HO_REQ_ACK); - auto& erab = container.erab_failed_to_setup_list_ho_req_ack.value[i]->erab_failedto_setup_item_ho_req_ack(); + auto& erab = container->erab_failed_to_setup_list_ho_req_ack.value[i]->erab_failedto_setup_item_ho_req_ack(); erab.erab_id = not_admitted_bearers[i].erab_id; erab.cause = not_admitted_bearers[i].cause; } @@ -1286,23 +1277,21 @@ bool s1ap::send_ho_req_ack(const asn1::s1ap::ho_request_s& msg, logger.error("Failed to pack TargeteNBToSourceeNBTransparentContainer"); return false; } - container.target_to_source_transparent_container.value.resize(bref.distance_bytes()); - memcpy(container.target_to_source_transparent_container.value.data(), pdu->msg, bref.distance_bytes()); + container->target_to_source_transparent_container.value.resize(bref.distance_bytes()); + memcpy(container->target_to_source_transparent_container.value.data(), pdu->msg, bref.distance_bytes()); return sctp_send_s1ap_pdu(tx_pdu, rnti, "HandoverRequestAcknowledge"); } bool s1ap::handle_mme_status_transfer(const asn1::s1ap::mme_status_transfer_s& msg) { - ue* u = - handle_s1apmsg_ue_id(msg.protocol_ies.enb_ue_s1ap_id.value.value, msg.protocol_ies.mme_ue_s1ap_id.value.value); + ue* u = handle_s1apmsg_ue_id(msg->enb_ue_s1ap_id.value.value, msg->mme_ue_s1ap_id.value.value); if (u == nullptr) { return false; } - rrc->set_erab_status( - u->ctxt.rnti, - msg.protocol_ies.enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list); + rrc->set_erab_status(u->ctxt.rnti, + msg->enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list); return true; } @@ -1316,14 +1305,14 @@ void s1ap::send_ho_notify(uint16_t rnti, uint64_t target_eci) s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_HO_NOTIF); - ho_notify_ies_container& container = tx_pdu.init_msg().value.ho_notify().protocol_ies; + ho_notify_s& container = tx_pdu.init_msg().value.ho_notify(); - container.mme_ue_s1ap_id.value = user_ptr->ctxt.mme_ue_s1ap_id.value(); - container.enb_ue_s1ap_id.value = user_ptr->ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = user_ptr->ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = user_ptr->ctxt.enb_ue_s1ap_id; - container.eutran_cgi.value = eutran_cgi; - container.eutran_cgi.value.cell_id.from_number(target_eci); - container.tai.value = tai; + container->eutran_cgi.value = eutran_cgi; + container->eutran_cgi.value.cell_id.from_number(target_eci); + container->tai.value = tai; sctp_send_s1ap_pdu(tx_pdu, rnti, "HandoverNotify"); } @@ -1367,24 +1356,24 @@ bool s1ap::send_error_indication(const asn1::s1ap::cause_c& cause, s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_ERROR_IND); - auto& container = tx_pdu.init_msg().value.error_ind().protocol_ies; + auto& container = tx_pdu.init_msg().value.error_ind(); - uint16_t rnti = SRSRAN_INVALID_RNTI; - container.enb_ue_s1ap_id_present = enb_ue_s1ap_id.has_value(); + uint16_t rnti = SRSRAN_INVALID_RNTI; + container->enb_ue_s1ap_id_present = enb_ue_s1ap_id.has_value(); if (enb_ue_s1ap_id.has_value()) { - container.enb_ue_s1ap_id.value = enb_ue_s1ap_id.value(); - ue* user_ptr = users.find_ue_enbid(enb_ue_s1ap_id.value()); - rnti = user_ptr != nullptr ? user_ptr->ctxt.rnti : SRSRAN_INVALID_RNTI; + container->enb_ue_s1ap_id.value = enb_ue_s1ap_id.value(); + ue* user_ptr = users.find_ue_enbid(enb_ue_s1ap_id.value()); + rnti = user_ptr != nullptr ? user_ptr->ctxt.rnti : SRSRAN_INVALID_RNTI; } - container.mme_ue_s1ap_id_present = mme_ue_s1ap_id.has_value(); + container->mme_ue_s1ap_id_present = mme_ue_s1ap_id.has_value(); if (mme_ue_s1ap_id.has_value()) { - container.mme_ue_s1ap_id.value = mme_ue_s1ap_id.value(); + container->mme_ue_s1ap_id.value = mme_ue_s1ap_id.value(); } - container.s_tmsi_present = false; + container->s_tmsi_present = false; - container.cause_present = true; - container.cause.value = cause; + container->cause_present = true; + container->cause.value = cause; return sctp_send_s1ap_pdu(tx_pdu, rnti, "Error Indication"); } @@ -1405,30 +1394,30 @@ bool s1ap::ue::send_initialuemessage(asn1::s1ap::rrc_establishment_cause_e cause s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_INIT_UE_MSG); - init_ue_msg_ies_container& container = tx_pdu.init_msg().value.init_ue_msg().protocol_ies; + init_ue_msg_s& container = tx_pdu.init_msg().value.init_ue_msg(); // S_TMSI if (has_tmsi) { - container.s_tmsi_present = true; - uint32_to_uint8(m_tmsi, container.s_tmsi.value.m_tmsi.data()); - container.s_tmsi.value.mmec[0] = mmec; + container->s_tmsi_present = true; + uint32_to_uint8(m_tmsi, container->s_tmsi.value.m_tmsi.data()); + container->s_tmsi.value.mmec[0] = mmec; } // ENB_UE_S1AP_ID - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; // NAS_PDU - container.nas_pdu.value.resize(pdu->N_bytes); - memcpy(container.nas_pdu.value.data(), pdu->msg, pdu->N_bytes); + container->nas_pdu.value.resize(pdu->N_bytes); + memcpy(container->nas_pdu.value.data(), pdu->msg, pdu->N_bytes); // TAI - container.tai.value = s1ap_ptr->tai; + container->tai.value = s1ap_ptr->tai; // EUTRAN_CGI - container.eutran_cgi.value = s1ap_ptr->eutran_cgi; + container->eutran_cgi.value = s1ap_ptr->eutran_cgi; // RRC Establishment Cause - container.rrc_establishment_cause.value = cause; + container->rrc_establishment_cause.value = cause; return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "InitialUEMessage"); } @@ -1442,19 +1431,19 @@ bool s1ap::ue::send_ulnastransport(srsran::unique_byte_buffer_t pdu) s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_UL_NAS_TRANSPORT); - asn1::s1ap::ul_nas_transport_ies_container& container = tx_pdu.init_msg().value.ul_nas_transport().protocol_ies; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + ul_nas_transport_s& container = tx_pdu.init_msg().value.ul_nas_transport(); + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; // NAS PDU - container.nas_pdu.value.resize(pdu->N_bytes); - memcpy(container.nas_pdu.value.data(), pdu->msg, pdu->N_bytes); + container->nas_pdu.value.resize(pdu->N_bytes); + memcpy(container->nas_pdu.value.data(), pdu->msg, pdu->N_bytes); // EUTRAN CGI - container.eutran_cgi.value = s1ap_ptr->eutran_cgi; + container->eutran_cgi.value = s1ap_ptr->eutran_cgi; // TAI - container.tai.value = s1ap_ptr->tai; + container->tai.value = s1ap_ptr->tai; return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UplinkNASTransport"); } @@ -1485,13 +1474,12 @@ bool s1ap::ue::send_uectxtreleaserequest(const cause_c& cause) s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_UE_CONTEXT_RELEASE_REQUEST); - ue_context_release_request_ies_container& container = - tx_pdu.init_msg().value.ue_context_release_request().protocol_ies; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + ue_context_release_request_s& container = tx_pdu.init_msg().value.ue_context_release_request(); + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; // Cause - container.cause.value = cause; + container->cause.value = cause; release_requested = s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UEContextReleaseRequest"); if (not release_requested) { @@ -1514,9 +1502,9 @@ bool s1ap::ue::send_uectxtreleasecomplete() s1ap_pdu_c tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_UE_CONTEXT_RELEASE); - auto& container = tx_pdu.successful_outcome().value.ue_context_release_complete().protocol_ies; - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + auto& container = tx_pdu.successful_outcome().value.ue_context_release_complete(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); // Stop TS1 Reloc Overall ts1_reloc_overall.stop(); @@ -1552,17 +1540,17 @@ void s1ap::ue::ue_ctxt_setup_complete() if (updated_erabs.empty()) { // It is ICS Failure tx_pdu.set_unsuccessful_outcome().load_info_obj(ASN1_S1AP_ID_INIT_CONTEXT_SETUP); - auto& container = tx_pdu.unsuccessful_outcome().value.init_context_setup_fail().protocol_ies; + auto& container = tx_pdu.unsuccessful_outcome().value.init_context_setup_fail(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); if (not failed_cfg_erabs.empty()) { - container.cause.value = failed_cfg_erabs.front().cause; + container->cause.value = failed_cfg_erabs.front().cause; } else { logger.warning("Procedure %s,rnti=0x%x - no specified cause for failed configuration", s1ap_elem_procs_o::init_msg_c::types_opts{current_state}.to_string(), ctxt.rnti); - container.cause.value.set_misc().value = cause_misc_opts::unspecified; + container->cause.value.set_misc().value = cause_misc_opts::unspecified; } s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UEContextModificationFailure"); return; @@ -1570,23 +1558,23 @@ void s1ap::ue::ue_ctxt_setup_complete() // It is ICS Response tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_INIT_CONTEXT_SETUP); - auto& container = tx_pdu.successful_outcome().value.init_context_setup_resp().protocol_ies; + auto& container = tx_pdu.successful_outcome().value.init_context_setup_resp(); // Fill in the MME and eNB IDs - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; // Add list of E-RABs that were not setup if (not failed_cfg_erabs.empty()) { - container.erab_failed_to_setup_list_ctxt_su_res_present = true; - fill_erab_failed_setup_list(container.erab_failed_to_setup_list_ctxt_su_res.value, failed_cfg_erabs); + container->erab_failed_to_setup_list_ctxt_su_res_present = true; + fill_erab_failed_setup_list(container->erab_failed_to_setup_list_ctxt_su_res.value, failed_cfg_erabs); } // Add setup E-RABs - container.erab_setup_list_ctxt_su_res.value.resize(updated_erabs.size()); + container->erab_setup_list_ctxt_su_res.value.resize(updated_erabs.size()); for (size_t i = 0; i < updated_erabs.size(); ++i) { - container.erab_setup_list_ctxt_su_res.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_SETUP_ITEM_CTXT_SU_RES); - auto& item = container.erab_setup_list_ctxt_su_res.value[i]->erab_setup_item_ctxt_su_res(); + container->erab_setup_list_ctxt_su_res.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_SETUP_ITEM_CTXT_SU_RES); + auto& item = container->erab_setup_list_ctxt_su_res.value[i]->erab_setup_item_ctxt_su_res(); item.erab_id = updated_erabs[i]; get_erab_addr(item.erab_id, item.transport_layer_address, item.gtp_teid); } @@ -1604,21 +1592,21 @@ bool s1ap::ue::send_erab_setup_response(const erab_id_list& erabs_setup, const e erab_setup_resp_s& res = tx_pdu.successful_outcome().value.erab_setup_resp(); // Fill in the MME and eNB IDs - res.protocol_ies.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); - res.protocol_ies.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + res->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + res->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; // Add list of E-RABs that were not setup if (not erabs_failed.empty()) { - res.protocol_ies.erab_failed_to_setup_list_bearer_su_res_present = true; - fill_erab_failed_setup_list(res.protocol_ies.erab_failed_to_setup_list_bearer_su_res.value, erabs_failed); + res->erab_failed_to_setup_list_bearer_su_res_present = true; + fill_erab_failed_setup_list(res->erab_failed_to_setup_list_bearer_su_res.value, erabs_failed); } if (not erabs_setup.empty()) { - res.protocol_ies.erab_setup_list_bearer_su_res_present = true; - res.protocol_ies.erab_setup_list_bearer_su_res.value.resize(erabs_setup.size()); + res->erab_setup_list_bearer_su_res_present = true; + res->erab_setup_list_bearer_su_res.value.resize(erabs_setup.size()); for (size_t i = 0; i < erabs_setup.size(); ++i) { - res.protocol_ies.erab_setup_list_bearer_su_res.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_SETUP_ITEM_BEARER_SU_RES); - auto& item = res.protocol_ies.erab_setup_list_bearer_su_res.value[i]->erab_setup_item_bearer_su_res(); + res->erab_setup_list_bearer_su_res.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_SETUP_ITEM_BEARER_SU_RES); + auto& item = res->erab_setup_list_bearer_su_res.value[i]->erab_setup_item_bearer_su_res(); item.erab_id = erabs_setup[i]; get_erab_addr(item.erab_id, item.transport_layer_address, item.gtp_teid); } @@ -1635,10 +1623,10 @@ bool s1ap::ue::send_uectxtmodifyresp() s1ap_pdu_c tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_UE_CONTEXT_MOD); - auto& container = tx_pdu.successful_outcome().value.ue_context_mod_resp().protocol_ies; + auto& container = tx_pdu.successful_outcome().value.ue_context_mod_resp(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UEContextModificationResponse"); } @@ -1651,11 +1639,11 @@ bool s1ap::ue::send_uectxtmodifyfailure(const cause_c& cause) s1ap_pdu_c tx_pdu; tx_pdu.set_unsuccessful_outcome().load_info_obj(ASN1_S1AP_ID_UE_CONTEXT_MOD); - auto& container = tx_pdu.unsuccessful_outcome().value.ue_context_mod_fail().protocol_ies; + auto& container = tx_pdu.unsuccessful_outcome().value.ue_context_mod_fail(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); - container.cause.value = cause; + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->cause.value = cause; return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UEContextModificationFailure"); } @@ -1672,26 +1660,26 @@ bool s1ap::ue::send_erab_release_response(const erab_id_list& erabs_released, co asn1::s1ap::s1ap_pdu_c tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_ERAB_RELEASE); - auto& container = tx_pdu.successful_outcome().value.erab_release_resp().protocol_ies; - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + auto& container = tx_pdu.successful_outcome().value.erab_release_resp(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); // Fill in which E-RABs were successfully released if (not erabs_released.empty()) { - container.erab_release_list_bearer_rel_comp_present = true; - container.erab_release_list_bearer_rel_comp.value.resize(erabs_released.size()); + container->erab_release_list_bearer_rel_comp_present = true; + container->erab_release_list_bearer_rel_comp.value.resize(erabs_released.size()); for (size_t i = 0; i < erabs_released.size(); ++i) { - container.erab_release_list_bearer_rel_comp.value[i].load_info_obj( + container->erab_release_list_bearer_rel_comp.value[i].load_info_obj( ASN1_S1AP_ID_ERAB_RELEASE_ITEM_BEARER_REL_COMP); - container.erab_release_list_bearer_rel_comp.value[i]->erab_release_item_bearer_rel_comp().erab_id = + container->erab_release_list_bearer_rel_comp.value[i]->erab_release_item_bearer_rel_comp().erab_id = erabs_released[i]; } } // Fill in which E-RABs were *not* successfully released if (not erabs_failed.empty()) { - container.erab_failed_to_release_list_present = true; - fill_erab_failed_setup_list(container.erab_failed_to_release_list.value, erabs_failed); + container->erab_failed_to_release_list_present = true; + fill_erab_failed_setup_list(container->erab_failed_to_release_list.value, erabs_failed); } return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "E-RABReleaseResponse"); @@ -1702,24 +1690,25 @@ bool s1ap::ue::send_erab_modify_response(const erab_id_list& erabs_modified, con asn1::s1ap::s1ap_pdu_c tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_ERAB_MODIFY); - auto& container = tx_pdu.successful_outcome().value.erab_modify_resp().protocol_ies; - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + auto& container = tx_pdu.successful_outcome().value.erab_modify_resp(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); // Fill in which E-RABs were successfully released if (not erabs_modified.empty()) { - container.erab_modify_list_bearer_mod_res_present = true; - container.erab_modify_list_bearer_mod_res.value.resize(erabs_modified.size()); - for (uint32_t i = 0; i < container.erab_modify_list_bearer_mod_res.value.size(); i++) { - container.erab_modify_list_bearer_mod_res.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_MODIFY_ITEM_BEARER_MOD_RES); - container.erab_modify_list_bearer_mod_res.value[i]->erab_modify_item_bearer_mod_res().erab_id = erabs_modified[i]; + container->erab_modify_list_bearer_mod_res_present = true; + container->erab_modify_list_bearer_mod_res.value.resize(erabs_modified.size()); + for (uint32_t i = 0; i < container->erab_modify_list_bearer_mod_res.value.size(); i++) { + container->erab_modify_list_bearer_mod_res.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_MODIFY_ITEM_BEARER_MOD_RES); + container->erab_modify_list_bearer_mod_res.value[i]->erab_modify_item_bearer_mod_res().erab_id = + erabs_modified[i]; } } // Fill in which E-RABs were *not* successfully released if (not erabs_failed.empty()) { - container.erab_failed_to_modify_list_present = true; - fill_erab_failed_setup_list(container.erab_failed_to_modify_list.value, erabs_failed); + container->erab_failed_to_modify_list_present = true; + fill_erab_failed_setup_list(container->erab_failed_to_modify_list.value, erabs_failed); } return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "E-RABModifyResponse"); @@ -1734,16 +1723,16 @@ bool s1ap::ue::send_erab_release_indication(const std::vector& erabs_s asn1::s1ap::s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_ERAB_RELEASE_IND); - erab_release_ind_ies_container& container = tx_pdu.init_msg().value.erab_release_ind().protocol_ies; + erab_release_ind_s& container = tx_pdu.init_msg().value.erab_release_ind(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); // Fill in which E-RABs were successfully released - container.erab_released_list.value.resize(erabs_successfully_released.size()); - for (size_t i = 0; i < container.erab_released_list.value.size(); ++i) { - container.erab_released_list.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_ITEM); - container.erab_released_list.value[i]->erab_item().erab_id = erabs_successfully_released[i]; + container->erab_released_list.value.resize(erabs_successfully_released.size()); + for (size_t i = 0; i < container->erab_released_list.value.size(); ++i) { + container->erab_released_list.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_ITEM); + container->erab_released_list.value[i]->erab_item().erab_id = erabs_successfully_released[i]; } return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "E-RABReleaseIndication"); @@ -1753,13 +1742,13 @@ bool s1ap::ue::send_ue_cap_info_indication(srsran::unique_byte_buffer_t ue_radio { asn1::s1ap::s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_UE_CAP_INFO_IND); - ue_cap_info_ind_ies_container& container = tx_pdu.init_msg().value.ue_cap_info_ind().protocol_ies; + ue_cap_info_ind_s& container = tx_pdu.init_msg().value.ue_cap_info_ind(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); - container.ue_radio_cap.value.resize(ue_radio_cap->N_bytes); - memcpy(container.ue_radio_cap.value.data(), ue_radio_cap->msg, ue_radio_cap->N_bytes); + container->ue_radio_cap.value.resize(ue_radio_cap->N_bytes); + memcpy(container->ue_radio_cap.value.data(), ue_radio_cap->msg, ue_radio_cap->N_bytes); return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "UECapabilityInfoIndication"); } @@ -1773,11 +1762,11 @@ void s1ap::ue::send_ho_cancel(const asn1::s1ap::cause_c& cause) // Send S1AP Handover Cancel s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_HO_CANCEL); - ho_cancel_ies_container& container = tx_pdu.init_msg().value.ho_cancel().protocol_ies; + ho_cancel_s& container = tx_pdu.init_msg().value.ho_cancel(); - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.cause.value = cause; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->cause.value = cause; s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "HandoverCancel"); } @@ -2109,25 +2098,25 @@ bool s1ap::ue::send_ho_required(uint32_t target_eci, /*** Setup S1AP PDU as HandoverRequired ***/ s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_HO_PREP); - ho_required_ies_container& container = tx_pdu.init_msg().value.ho_required().protocol_ies; + ho_required_s& container = tx_pdu.init_msg().value.ho_required(); /*** fill HO Required message ***/ - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); - container.handov_type.value.value = handov_type_opts::intralte; // NOTE: only intra-LTE HO supported - container.cause.value.set_radio_network().value = cause_radio_network_opts::ho_desirable_for_radio_reason; - - container.direct_forwarding_path_availability_present = has_direct_fwd_path; - if (container.direct_forwarding_path_availability_present) { - container.direct_forwarding_path_availability.value.value = + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->handov_type.value.value = handov_type_opts::intralte; // NOTE: only intra-LTE HO supported + container->cause.value.set_radio_network().value = cause_radio_network_opts::ho_desirable_for_radio_reason; + + container->direct_forwarding_path_availability_present = has_direct_fwd_path; + if (container->direct_forwarding_path_availability_present) { + container->direct_forwarding_path_availability.value.value = asn1::s1ap::direct_forwarding_path_availability_opts::direct_path_available; } /*** set the target eNB ***/ - container.csg_id_present = false; // NOTE: CSG/hybrid target cell not supported - container.cell_access_mode_present = false; // only for hybrid cells + container->csg_id_present = false; // NOTE: CSG/hybrid target cell not supported + container->cell_access_mode_present = false; // only for hybrid cells // no GERAN/UTRAN/PS - auto& targetenb = container.target_id.value.set_targetenb_id(); + auto& targetenb = container->target_id.value.set_targetenb_id(); // set PLMN and TAI of target // NOTE: Only HO without TAU supported. uint16_t tmp16; @@ -2140,7 +2129,7 @@ bool s1ap::ue::send_ho_required(uint32_t target_eci, macroenb.from_number(target_eci >> 8U); /*** fill the transparent container ***/ - container.source_to_target_transparent_container_secondary_present = false; + container->source_to_target_transparent_container_secondary_present = false; sourceenb_to_targetenb_transparent_container_s transparent_cntr; transparent_cntr.subscriber_profile_idfor_rfp_present = false; // TODO: CHECK @@ -2186,8 +2175,8 @@ bool s1ap::ue::send_ho_required(uint32_t target_eci, logger.error("Failed to pack transparent container of HO Required message"); return false; } - container.source_to_target_transparent_container.value.resize(bref.distance_bytes()); - memcpy(container.source_to_target_transparent_container.value.data(), buffer->msg, bref.distance_bytes()); + container->source_to_target_transparent_container.value.resize(bref.distance_bytes()); + memcpy(container->source_to_target_transparent_container.value.data(), buffer->msg, bref.distance_bytes()); // Send to HandoverRequired message to MME return s1ap_ptr->sctp_send_s1ap_pdu(tx_pdu, ctxt.rnti, "Handover Required"); @@ -2201,13 +2190,13 @@ bool s1ap::ue::send_enb_status_transfer_proc(std::vector& be s1ap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_ENB_STATUS_TRANSFER); - enb_status_transfer_ies_container& container = tx_pdu.init_msg().value.enb_status_transfer().protocol_ies; + enb_status_transfer_s& container = tx_pdu.init_msg().value.enb_status_transfer(); - container.enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; - container.mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); + container->enb_ue_s1ap_id.value = ctxt.enb_ue_s1ap_id; + container->mme_ue_s1ap_id.value = ctxt.mme_ue_s1ap_id.value(); /* Create StatusTransfer transparent container with all the bearer ctxt to transfer */ - auto& list = container.enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list; + auto& list = container->enb_status_transfer_transparent_container.value.bearers_subject_to_status_transfer_list; list.resize(bearer_status_list.size()); for (uint32_t i = 0; i < list.size(); ++i) { list[i].load_info_obj(ASN1_S1AP_ID_BEARERS_SUBJECT_TO_STATUS_TRANSFER_ITEM); diff --git a/srsenb/test/rrc/erab_setup_test.cc b/srsenb/test/rrc/erab_setup_test.cc index d084a1a0a..7815cf9ea 100644 --- a/srsenb/test/rrc/erab_setup_test.cc +++ b/srsenb/test/rrc/erab_setup_test.cc @@ -89,11 +89,11 @@ int test_erab_setup(srsran::log_sink_spy& spy, bool qci_exists) asn1::cbit_ref bref(byte_buf.msg, byte_buf.N_bytes); TESTASSERT(s1ap_pdu.unpack(bref) == asn1::SRSASN_SUCCESS); - const auto& setupmsg = s1ap_pdu.init_msg().value.erab_setup_request().protocol_ies; - if (setupmsg.ueaggregate_maximum_bitrate_present) { - rrc.set_aggregate_max_bitrate(rnti, setupmsg.ueaggregate_maximum_bitrate.value); + const auto& setupmsg = s1ap_pdu.init_msg().value.erab_setup_request(); + if (setupmsg->ueaggregate_maximum_bitrate_present) { + rrc.set_aggregate_max_bitrate(rnti, setupmsg->ueaggregate_maximum_bitrate.value); } - for (const auto& item : setupmsg.erab_to_be_setup_list_bearer_su_req.value) { + for (const auto& item : setupmsg->erab_to_be_setup_list_bearer_su_req.value) { const auto& erab = item->erab_to_be_setup_item_bearer_su_req(); asn1::s1ap::cause_c cause; int ret = rrc.setup_erab(rnti, diff --git a/srsenb/test/rrc/rrc_mobility_test.cc b/srsenb/test/rrc/rrc_mobility_test.cc index b024c53a4..3b468cc26 100644 --- a/srsenb/test/rrc/rrc_mobility_test.cc +++ b/srsenb/test/rrc/rrc_mobility_test.cc @@ -272,14 +272,14 @@ int test_s1ap_tenb_mobility(test_event test_params) /* TeNB receives S1AP Handover Request */ asn1::s1ap::ho_request_s ho_req; - ho_req.protocol_ies.erab_to_be_setup_list_ho_req.value.resize(1); - auto& erab = ho_req.protocol_ies.erab_to_be_setup_list_ho_req.value[0]->erab_to_be_setup_item_ho_req(); - erab.erab_id = 5; + ho_req->erab_to_be_setup_list_ho_req.value.resize(1); + auto& erab = ho_req->erab_to_be_setup_list_ho_req.value[0]->erab_to_be_setup_item_ho_req(); + erab.erab_id = 5; erab.erab_level_qos_params.qci = 9; if (test_params == test_event::unknown_qci) { erab.erab_level_qos_params.qci = 10; } - ho_req.protocol_ies.ue_security_cap.value.integrity_protection_algorithms.set(14, true); + ho_req->ue_security_cap.value.integrity_protection_algorithms.set(14, true); asn1::s1ap::sourceenb_to_targetenb_transparent_container_s container; container.target_cell_id.cell_id.from_number(0x19C02); if (test_params == test_event::wrong_target_cell) { @@ -331,8 +331,8 @@ int test_s1ap_tenb_mobility(test_event test_params) tester.pdcp.bearers[0x46].count(srb_to_lcid(lte_srb::srb2))); TESTASSERT(tester.pdcp.bearers[0x46][srb_to_lcid(lte_srb::srb1)].enable_encryption); TESTASSERT(tester.pdcp.bearers[0x46][srb_to_lcid(lte_srb::srb1)].enable_integrity); - sec_cfg.set_security_capabilities(ho_req.protocol_ies.ue_security_cap.value); - sec_cfg.set_security_key(ho_req.protocol_ies.security_context.value.next_hop_param); + sec_cfg.set_security_capabilities(ho_req->ue_security_cap.value); + sec_cfg.set_security_key(ho_req->security_context.value.next_hop_param); sec_cfg.regenerate_keys_handover(tester.cfg.cell_list[0].pci, tester.cfg.cell_list[0].dl_earfcn); srsran::as_security_config_t as_sec_cfg = sec_cfg.get_as_sec_cfg(); TESTASSERT(tester.pdcp.bearers[0x46][srb_to_lcid(lte_srb::srb1)].sec_cfg.k_rrc_int == as_sec_cfg.k_rrc_int); @@ -344,8 +344,7 @@ int test_s1ap_tenb_mobility(test_event test_params) // Check if S1AP Handover Request ACK send is called TESTASSERT(tester.s1ap.last_ho_req_ack.rnti == 0x46); TESTASSERT(tester.s1ap.last_ho_req_ack.ho_cmd_pdu != nullptr); - TESTASSERT(tester.s1ap.last_ho_req_ack.admitted_bearers.size() == - ho_req.protocol_ies.erab_to_be_setup_list_ho_req.value.size()); + TESTASSERT(tester.s1ap.last_ho_req_ack.admitted_bearers.size() == ho_req->erab_to_be_setup_list_ho_req.value.size()); ho_cmd_s ho_cmd; asn1::cbit_ref bref{tester.s1ap.last_ho_req_ack.ho_cmd_pdu->msg, tester.s1ap.last_ho_req_ack.ho_cmd_pdu->N_bytes}; TESTASSERT(ho_cmd.unpack(bref) == asn1::SRSASN_SUCCESS); diff --git a/srsenb/test/rrc/test_helpers.cc b/srsenb/test/rrc/test_helpers.cc index 330d63244..3019cb57a 100644 --- a/srsenb/test/rrc/test_helpers.cc +++ b/srsenb/test/rrc/test_helpers.cc @@ -128,8 +128,7 @@ int bring_rrc_to_reconf_state(srsenb::rrc& rrc, srsran::timer_handler& timers, u asn1::cbit_ref bref(byte_buf.msg, byte_buf.N_bytes); TESTASSERT(s1ap_pdu.unpack(bref) == asn1::SRSASN_SUCCESS); rrc.setup_ue_ctxt(rnti, s1ap_pdu.init_msg().value.init_context_setup_request()); - for (auto& item : - s1ap_pdu.init_msg().value.init_context_setup_request().protocol_ies.erab_to_be_setup_list_ctxt_su_req.value) { + for (auto& item : s1ap_pdu.init_msg().value.init_context_setup_request()->erab_to_be_setup_list_ctxt_su_req.value) { const auto& erab = item->erab_to_be_setup_item_ctxt_su_req(); asn1::s1ap::cause_c cause; TESTASSERT(rrc.setup_erab(rnti, diff --git a/srsenb/test/s1ap/s1ap_test.cc b/srsenb/test/s1ap/s1ap_test.cc index 0192f43d8..42fb0bcfc 100644 --- a/srsenb/test/s1ap/s1ap_test.cc +++ b/srsenb/test/s1ap/s1ap_test.cc @@ -192,9 +192,9 @@ void add_rnti(s1ap& s1ap_obj, mme_dummy& mme) TESTASSERT(s1ap_pdu.unpack(cbref) == SRSRAN_SUCCESS); TESTASSERT(s1ap_pdu.type().value == asn1::s1ap::s1ap_pdu_c::types_opts::successful_outcome); TESTASSERT(s1ap_pdu.successful_outcome().proc_code == ASN1_S1AP_ID_INIT_CONTEXT_SETUP); - const auto& resp = s1ap_pdu.successful_outcome().value.init_context_setup_resp().protocol_ies; - TESTASSERT(resp.erab_setup_list_ctxt_su_res.value.size() > 0); - TESTASSERT(not resp.erab_failed_to_setup_list_ctxt_su_res_present); + const auto& resp = s1ap_pdu.successful_outcome().value.init_context_setup_resp(); + TESTASSERT(resp->erab_setup_list_ctxt_su_res.value.size() > 0); + TESTASSERT(not resp->erab_failed_to_setup_list_ctxt_su_res_present); } enum class test_event { success, wrong_erabid_mod, wrong_mme_s1ap_id, repeated_erabid_mod }; @@ -235,10 +235,10 @@ void test_s1ap_erab_setup(test_event event) int flags = 0; asn1::s1ap::s1ap_pdu_c mod_req_pdu; mod_req_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_ERAB_MODIFY); - auto& protocols = mod_req_pdu.init_msg().value.erab_modify_request().protocol_ies; - protocols.enb_ue_s1ap_id.value = 1; - protocols.mme_ue_s1ap_id.value = event == test_event::wrong_mme_s1ap_id ? 2 : 1; - auto& erab_list = protocols.erab_to_be_modified_list_bearer_mod_req.value; + auto& protocols = mod_req_pdu.init_msg().value.erab_modify_request(); + protocols->enb_ue_s1ap_id.value = 1; + protocols->mme_ue_s1ap_id.value = event == test_event::wrong_mme_s1ap_id ? 2 : 1; + auto& erab_list = protocols->erab_to_be_modified_list_bearer_mod_req.value; erab_list.resize(2); erab_list[0].load_info_obj(ASN1_S1AP_ID_ERAB_TO_BE_MODIFIED_ITEM_BEARER_MOD_REQ); auto* erab_ptr = &erab_list[0]->erab_to_be_modified_item_bearer_mod_req(); @@ -273,33 +273,33 @@ void test_s1ap_erab_setup(test_event event) // See TS 36.413, Section 10.6 - Handling of AP ID TESTASSERT(s1ap_pdu.type().value == asn1::s1ap::s1ap_pdu_c::types_opts::init_msg); TESTASSERT(s1ap_pdu.init_msg().proc_code == ASN1_S1AP_ID_ERROR_IND); - auto& protocol_ies = s1ap_pdu.init_msg().value.error_ind().protocol_ies; - TESTASSERT(protocol_ies.mme_ue_s1ap_id_present and protocol_ies.mme_ue_s1ap_id.value.value == 2); - TESTASSERT(protocol_ies.enb_ue_s1ap_id_present and protocol_ies.enb_ue_s1ap_id.value.value == 1); + auto& err_ind = s1ap_pdu.init_msg().value.error_ind(); + TESTASSERT(err_ind->mme_ue_s1ap_id_present and err_ind->mme_ue_s1ap_id.value.value == 2); + TESTASSERT(err_ind->enb_ue_s1ap_id_present and err_ind->enb_ue_s1ap_id.value.value == 1); TESTASSERT(rrc.last_released_rnti == 0x46); return; } TESTASSERT(s1ap_pdu.type().value == asn1::s1ap::s1ap_pdu_c::types_opts::successful_outcome); TESTASSERT(s1ap_pdu.successful_outcome().proc_code == ASN1_S1AP_ID_ERAB_MODIFY); - auto& protocol_ies = s1ap_pdu.successful_outcome().value.erab_modify_resp().protocol_ies; + auto& erab_mod = s1ap_pdu.successful_outcome().value.erab_modify_resp(); if (event == test_event::wrong_erabid_mod) { - TESTASSERT(protocol_ies.erab_modify_list_bearer_mod_res_present); - TESTASSERT(protocol_ies.erab_modify_list_bearer_mod_res.value.size() == 1); - TESTASSERT(protocol_ies.erab_modify_list_bearer_mod_res.value[0]->erab_modify_item_bearer_mod_res().erab_id == 5); - TESTASSERT(protocol_ies.erab_failed_to_modify_list_present); - TESTASSERT(protocol_ies.erab_failed_to_modify_list.value.size() == 1); - auto& erab_item = protocol_ies.erab_failed_to_modify_list.value[0]->erab_item(); + TESTASSERT(erab_mod->erab_modify_list_bearer_mod_res_present); + TESTASSERT(erab_mod->erab_modify_list_bearer_mod_res.value.size() == 1); + TESTASSERT(erab_mod->erab_modify_list_bearer_mod_res.value[0]->erab_modify_item_bearer_mod_res().erab_id == 5); + TESTASSERT(erab_mod->erab_failed_to_modify_list_present); + TESTASSERT(erab_mod->erab_failed_to_modify_list.value.size() == 1); + auto& erab_item = erab_mod->erab_failed_to_modify_list.value[0]->erab_item(); TESTASSERT(erab_item.erab_id == 6); TESTASSERT(erab_item.cause.type().value == asn1::s1ap::cause_c::types_opts::radio_network); TESTASSERT(erab_item.cause.radio_network().value == asn1::s1ap::cause_radio_network_opts::unknown_erab_id); return; } if (event == test_event::repeated_erabid_mod) { - TESTASSERT(not protocol_ies.erab_modify_list_bearer_mod_res_present); - TESTASSERT(protocol_ies.erab_failed_to_modify_list_present); - TESTASSERT(protocol_ies.erab_failed_to_modify_list.value.size() == 1); - auto& erab_item = protocol_ies.erab_failed_to_modify_list.value[0]->erab_item(); + TESTASSERT(not erab_mod->erab_modify_list_bearer_mod_res_present); + TESTASSERT(erab_mod->erab_failed_to_modify_list_present); + TESTASSERT(erab_mod->erab_failed_to_modify_list.value.size() == 1); + auto& erab_item = erab_mod->erab_failed_to_modify_list.value[0]->erab_item(); TESTASSERT(erab_item.erab_id == 5); TESTASSERT(erab_item.cause.type().value == asn1::s1ap::cause_c::types_opts::radio_network); TESTASSERT(erab_item.cause.radio_network().value == @@ -307,10 +307,10 @@ void test_s1ap_erab_setup(test_event event) return; } - TESTASSERT(protocol_ies.erab_modify_list_bearer_mod_res_present); - TESTASSERT(not protocol_ies.erab_failed_to_modify_list_present); - TESTASSERT(protocol_ies.erab_modify_list_bearer_mod_res.value.size() == 2); - auto& erab_item = protocol_ies.erab_modify_list_bearer_mod_res.value[0]->erab_modify_item_bearer_mod_res(); + TESTASSERT(erab_mod->erab_modify_list_bearer_mod_res_present); + TESTASSERT(not erab_mod->erab_failed_to_modify_list_present); + TESTASSERT(erab_mod->erab_modify_list_bearer_mod_res.value.size() == 2); + auto& erab_item = erab_mod->erab_modify_list_bearer_mod_res.value[0]->erab_modify_item_bearer_mod_res(); TESTASSERT(erab_item.erab_id == 5); } diff --git a/srsepc/src/mme/s1ap_ctx_mngmt_proc.cc b/srsepc/src/mme/s1ap_ctx_mngmt_proc.cc index 98faf8925..9c7d58cb6 100644 --- a/srsepc/src/mme/s1ap_ctx_mngmt_proc.cc +++ b/srsepc/src/mme/s1ap_ctx_mngmt_proc.cc @@ -16,7 +16,6 @@ #include "srsran/common/buffer_pool.h" #include "srsran/common/int_helpers.h" #include "srsran/common/liblte_security.h" -#include namespace srsepc { @@ -74,24 +73,23 @@ bool s1ap_ctx_mngmt_proc::send_initial_context_setup_request(nas* nas_ctx, uint1 s1ap_pdu_t tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_INIT_CONTEXT_SETUP); - asn1::s1ap::init_context_setup_request_ies_container& in_ctx_req = - tx_pdu.init_msg().value.init_context_setup_request().protocol_ies; + asn1::s1ap::init_context_setup_request_s& in_ctx_req = tx_pdu.init_msg().value.init_context_setup_request(); // Add MME and eNB S1AP Ids - in_ctx_req.mme_ue_s1ap_id.value = ecm_ctx->mme_ue_s1ap_id; - in_ctx_req.enb_ue_s1ap_id.value = ecm_ctx->enb_ue_s1ap_id; + in_ctx_req->mme_ue_s1ap_id.value = ecm_ctx->mme_ue_s1ap_id; + in_ctx_req->enb_ue_s1ap_id.value = ecm_ctx->enb_ue_s1ap_id; // UE-AMBR - in_ctx_req.ueaggregate_maximum_bitrate.value.ueaggregate_maximum_bit_rate_dl = 1000000000; - in_ctx_req.ueaggregate_maximum_bitrate.value.ueaggregate_maximum_bit_rate_ul = 1000000000; + in_ctx_req->ueaggregate_maximum_bitrate.value.ueaggregate_maximum_bit_rate_dl = 1000000000; + in_ctx_req->ueaggregate_maximum_bitrate.value.ueaggregate_maximum_bit_rate_ul = 1000000000; // Number of E-RABs to be setup - in_ctx_req.erab_to_be_setup_list_ctxt_su_req.value.resize(1); - in_ctx_req.erab_to_be_setup_list_ctxt_su_req.value[0].load_info_obj(ASN1_S1AP_ID_ERAB_TO_BE_SETUP_ITEM_CTXT_SU_REQ); + in_ctx_req->erab_to_be_setup_list_ctxt_su_req.value.resize(1); + in_ctx_req->erab_to_be_setup_list_ctxt_su_req.value[0].load_info_obj(ASN1_S1AP_ID_ERAB_TO_BE_SETUP_ITEM_CTXT_SU_REQ); // Setup eRAB context asn1::s1ap::erab_to_be_setup_item_ctxt_su_req_s& erab_ctx_req = - in_ctx_req.erab_to_be_setup_list_ctxt_su_req.value[0]->erab_to_be_setup_item_ctxt_su_req(); + in_ctx_req->erab_to_be_setup_list_ctxt_su_req.value[0]->erab_to_be_setup_item_ctxt_su_req(); erab_ctx_req.erab_id = esm_ctx->erab_id; // Setup E-RAB QoS parameters @@ -112,21 +110,21 @@ bool s1ap_ctx_mngmt_proc::send_initial_context_setup_request(nas* nas_ctx, uint1 // Set UE security capabilities and k_enb for (int i = 0; i < 3; i++) { if (sec_ctx->ue_network_cap.eea[i + 1] == true) { - in_ctx_req.ue_security_cap.value.encryption_algorithms.set(16 - i, true); // EEA supported + in_ctx_req->ue_security_cap.value.encryption_algorithms.set(16 - i, true); // EEA supported } else { - in_ctx_req.ue_security_cap.value.encryption_algorithms.set(16 - i, false); // EEA not supported + in_ctx_req->ue_security_cap.value.encryption_algorithms.set(16 - i, false); // EEA not supported } if (sec_ctx->ue_network_cap.eia[i + 1] == true) { - in_ctx_req.ue_security_cap.value.integrity_protection_algorithms.set(16 - i, true); // EIA supported + in_ctx_req->ue_security_cap.value.integrity_protection_algorithms.set(16 - i, true); // EIA supported } else { - in_ctx_req.ue_security_cap.value.integrity_protection_algorithms.set(16 - i, false); // EIA not supported + in_ctx_req->ue_security_cap.value.integrity_protection_algorithms.set(16 - i, false); // EIA not supported } } // Get K eNB - // memcpy(in_ctx_req.security_key.value.data(),sec_ctx->k_enb, 32); + // memcpy(in_ctx_req->security_key.value.data(),sec_ctx->k_enb, 32); for (uint8_t i = 0; i < 32; ++i) { - in_ctx_req.security_key.value.data()[31 - i] = sec_ctx->k_enb[i]; + in_ctx_req->security_key.value.data()[31 - i] = sec_ctx->k_enb[i]; } m_logger.info(sec_ctx->k_enb, 32, "Initial Context Setup Request -- Key eNB (k_enb)"); @@ -157,8 +155,8 @@ bool s1ap_ctx_mngmt_proc::send_initial_context_setup_request(nas* nas_ctx, uint1 m_logger.info( "Initial Context -- S1-U TEID 0x%" PRIx64 ". IP %s ", erab_ctx_req.gtp_teid.to_number(), inet_ntoa(addr)); m_logger.info("Initial Context Setup Request -- eNB UE S1AP Id %d, MME UE S1AP Id %" PRIu64 "", - in_ctx_req.enb_ue_s1ap_id.value.value, - in_ctx_req.mme_ue_s1ap_id.value.value); + in_ctx_req->enb_ue_s1ap_id.value.value, + in_ctx_req->mme_ue_s1ap_id.value.value); m_logger.info("Initial Context Setup Request -- E-RAB id %d", erab_ctx_req.erab_id); m_logger.info("Initial Context Setup Request -- S1-U TEID 0x%" PRIu64 ". IP %s ", erab_ctx_req.gtp_teid.to_number(), @@ -173,7 +171,7 @@ bool s1ap_ctx_mngmt_proc::send_initial_context_setup_request(nas* nas_ctx, uint1 bool s1ap_ctx_mngmt_proc::handle_initial_context_setup_response( const asn1::s1ap::init_context_setup_resp_s& in_ctxt_resp) { - uint32_t mme_ue_s1ap_id = in_ctxt_resp.protocol_ies.mme_ue_s1ap_id.value.value; + uint32_t mme_ue_s1ap_id = in_ctxt_resp->mme_ue_s1ap_id.value.value; nas* nas_ctx = m_s1ap->find_nas_ctx_from_mme_ue_s1ap_id(mme_ue_s1ap_id); if (nas_ctx == nullptr) { m_logger.error("Could not find UE's context in active UE's map"); @@ -187,7 +185,7 @@ bool s1ap_ctx_mngmt_proc::handle_initial_context_setup_response( // Setup E-RABs for (const asn1::protocol_ie_single_container_s& ie_container : - in_ctxt_resp.protocol_ies.erab_setup_list_ctxt_su_res.value) { + in_ctxt_resp->erab_setup_list_ctxt_su_res.value) { // Get E-RAB setup context item and E-RAB Id const asn1::s1ap::erab_setup_item_ctxt_su_res_s& erab_setup_item_ctxt = ie_container->erab_setup_item_ctxt_su_res(); uint8_t erab_id = erab_setup_item_ctxt.erab_id; @@ -231,7 +229,7 @@ bool s1ap_ctx_mngmt_proc::handle_initial_context_setup_response( bool s1ap_ctx_mngmt_proc::handle_ue_context_release_request(const asn1::s1ap::ue_context_release_request_s& ue_rel, struct sctp_sndrcvinfo* enb_sri) { - uint32_t mme_ue_s1ap_id = ue_rel.protocol_ies.mme_ue_s1ap_id.value.value; + uint32_t mme_ue_s1ap_id = ue_rel->mme_ue_s1ap_id.value.value; m_logger.info("Received UE Context Release Request. MME-UE S1AP Id: %d", mme_ue_s1ap_id); srsran::console("Received UE Context Release Request. MME-UE S1AP Id %d\n", mme_ue_s1ap_id); @@ -303,14 +301,13 @@ bool s1ap_ctx_mngmt_proc::send_ue_context_release_command(nas* nas_ctx) s1ap_pdu_t tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_UE_CONTEXT_RELEASE); - asn1::s1ap::ue_context_release_cmd_ies_container& ctx_rel_cmd = - tx_pdu.init_msg().value.ue_context_release_cmd().protocol_ies; - ctx_rel_cmd.ue_s1ap_ids.value.set(asn1::s1ap::ue_s1ap_ids_c::types_opts::ue_s1ap_id_pair); - ctx_rel_cmd.ue_s1ap_ids.value.ue_s1ap_id_pair().mme_ue_s1ap_id = nas_ctx->m_ecm_ctx.mme_ue_s1ap_id; - ctx_rel_cmd.ue_s1ap_ids.value.ue_s1ap_id_pair().enb_ue_s1ap_id = nas_ctx->m_ecm_ctx.enb_ue_s1ap_id; + asn1::s1ap::ue_context_release_cmd_s& ctx_rel_cmd = tx_pdu.init_msg().value.ue_context_release_cmd(); + ctx_rel_cmd->ue_s1ap_ids.value.set(asn1::s1ap::ue_s1ap_ids_c::types_opts::ue_s1ap_id_pair); + ctx_rel_cmd->ue_s1ap_ids.value.ue_s1ap_id_pair().mme_ue_s1ap_id = nas_ctx->m_ecm_ctx.mme_ue_s1ap_id; + ctx_rel_cmd->ue_s1ap_ids.value.ue_s1ap_id_pair().enb_ue_s1ap_id = nas_ctx->m_ecm_ctx.enb_ue_s1ap_id; - ctx_rel_cmd.cause.value.set(asn1::s1ap::cause_c::types_opts::nas); - ctx_rel_cmd.cause.value.nas().value = asn1::s1ap::cause_nas_opts::options::normal_release; + ctx_rel_cmd->cause.value.set(asn1::s1ap::cause_c::types_opts::nas); + ctx_rel_cmd->cause.value.nas().value = asn1::s1ap::cause_nas_opts::options::normal_release; // Send Reply to eNB if (!m_s1ap->s1ap_tx_pdu(tx_pdu, &nas_ctx->m_ecm_ctx.enb_sri)) { @@ -323,7 +320,7 @@ bool s1ap_ctx_mngmt_proc::send_ue_context_release_command(nas* nas_ctx) bool s1ap_ctx_mngmt_proc::handle_ue_context_release_complete(const asn1::s1ap::ue_context_release_complete_s& rel_comp) { - uint32_t mme_ue_s1ap_id = rel_comp.protocol_ies.mme_ue_s1ap_id.value.value; + uint32_t mme_ue_s1ap_id = rel_comp->mme_ue_s1ap_id.value.value; m_logger.info("Received UE Context Release Complete. MME-UE S1AP Id: %d", mme_ue_s1ap_id); srsran::console("Received UE Context Release Complete. MME-UE S1AP Id %d\n", mme_ue_s1ap_id); diff --git a/srsepc/src/mme/s1ap_erab_mngmt_proc.cc b/srsepc/src/mme/s1ap_erab_mngmt_proc.cc index 80ebc8632..71229ff17 100644 --- a/srsepc/src/mme/s1ap_erab_mngmt_proc.cc +++ b/srsepc/src/mme/s1ap_erab_mngmt_proc.cc @@ -70,19 +70,20 @@ bool s1ap_erab_mngmt_proc::send_erab_release_command(uint32_t enb_ s1ap_pdu_t tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_ERAB_RELEASE); - asn1::s1ap::erab_release_cmd_ies_container& erab_rel_cmd = tx_pdu.init_msg().value.erab_release_cmd().protocol_ies; + asn1::s1ap::erab_release_cmd_s& erab_rel_cmd = tx_pdu.init_msg().value.erab_release_cmd(); // Add MME and eNB S1AP Ids - erab_rel_cmd.mme_ue_s1ap_id.value = mme_ue_s1ap_id; - erab_rel_cmd.enb_ue_s1ap_id.value = enb_ue_s1ap_id; + erab_rel_cmd->mme_ue_s1ap_id.value = mme_ue_s1ap_id; + erab_rel_cmd->enb_ue_s1ap_id.value = enb_ue_s1ap_id; // Number of E-RABs to be setup - erab_rel_cmd.erab_to_be_released_list.value.resize(erabs_to_release.size()); - for (uint32_t i = 0; i < erab_rel_cmd.erab_to_be_released_list.value.size(); i++) { - erab_rel_cmd.erab_to_be_released_list.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_ITEM); - erab_rel_cmd.erab_to_be_released_list.value[i]->erab_item().erab_id = erabs_to_release[i]; - erab_rel_cmd.erab_to_be_released_list.value[i]->erab_item().cause.set(asn1::s1ap::cause_c::types::misc); - erab_rel_cmd.erab_to_be_released_list.value[i]->erab_item().cause.misc() = asn1::s1ap::cause_misc_opts::unspecified; + erab_rel_cmd->erab_to_be_released_list.value.resize(erabs_to_release.size()); + for (uint32_t i = 0; i < erab_rel_cmd->erab_to_be_released_list.value.size(); i++) { + erab_rel_cmd->erab_to_be_released_list.value[i].load_info_obj(ASN1_S1AP_ID_ERAB_ITEM); + erab_rel_cmd->erab_to_be_released_list.value[i]->erab_item().erab_id = erabs_to_release[i]; + erab_rel_cmd->erab_to_be_released_list.value[i]->erab_item().cause.set(asn1::s1ap::cause_c::types::misc); + erab_rel_cmd->erab_to_be_released_list.value[i]->erab_item().cause.misc() = + asn1::s1ap::cause_misc_opts::unspecified; m_logger.info("Sending release comman to %d", erabs_to_release[i]); } @@ -105,21 +106,20 @@ bool s1ap_erab_mngmt_proc::send_erab_modify_request(uint32_t s1ap_pdu_t tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_ERAB_MODIFY); - asn1::s1ap::erab_modify_request_ies_container& erab_mod_req = - tx_pdu.init_msg().value.erab_modify_request().protocol_ies; + asn1::s1ap::erab_modify_request_s& erab_mod_req = tx_pdu.init_msg().value.erab_modify_request(); // Add MME and eNB S1AP Ids - erab_mod_req.enb_ue_s1ap_id.value = enb_ue_s1ap_id; - erab_mod_req.mme_ue_s1ap_id.value = mme_ue_s1ap_id; + erab_mod_req->enb_ue_s1ap_id.value = enb_ue_s1ap_id; + erab_mod_req->mme_ue_s1ap_id.value = mme_ue_s1ap_id; // Number of E-RABs to be setup - erab_mod_req.erab_to_be_modified_list_bearer_mod_req.value.resize(erabs_to_modify.size()); + erab_mod_req->erab_to_be_modified_list_bearer_mod_req.value.resize(erabs_to_modify.size()); uint32_t i = 0; for (auto erab_it = erabs_to_modify.begin(); erab_it != erabs_to_modify.end(); erab_it++) { - erab_mod_req.erab_to_be_modified_list_bearer_mod_req.value[i].load_info_obj( + erab_mod_req->erab_to_be_modified_list_bearer_mod_req.value[i].load_info_obj( ASN1_S1AP_ID_ERAB_TO_BE_MODIFIED_ITEM_BEARER_MOD_REQ); asn1::s1ap::erab_to_be_modified_item_bearer_mod_req_s& erab_to_mod = - erab_mod_req.erab_to_be_modified_list_bearer_mod_req.value[i]->erab_to_be_modified_item_bearer_mod_req(); + erab_mod_req->erab_to_be_modified_list_bearer_mod_req.value[i]->erab_to_be_modified_item_bearer_mod_req(); erab_to_mod.erab_id = erab_it->first; erab_to_mod.erab_level_qos_params.qci = erab_it->second; erab_to_mod.erab_level_qos_params.alloc_retention_prio.prio_level = 15; // lowest diff --git a/srsepc/src/mme/s1ap_mngmt_proc.cc b/srsepc/src/mme/s1ap_mngmt_proc.cc index 57f7187b1..966dff3d5 100644 --- a/srsepc/src/mme/s1ap_mngmt_proc.cc +++ b/srsepc/src/mme/s1ap_mngmt_proc.cc @@ -117,36 +117,35 @@ bool s1ap_mngmt_proc::handle_s1_setup_request(const asn1::s1ap::s1_setup_request */ bool s1ap_mngmt_proc::unpack_s1_setup_request(const asn1::s1ap::s1_setup_request_s& msg, enb_ctx_t* enb_ctx) { - uint8_t enb_id_bits[32]; uint32_t plmn = 0; uint16_t tac, bplmn; uint32_t tmp32 = 0; - const asn1::s1ap::s1_setup_request_ies_container& s1_req = msg.protocol_ies; + const asn1::s1ap::s1_setup_request_s& s1_req = msg; // eNB Name - enb_ctx->enb_name_present = s1_req.enbname_present; - if (s1_req.enbname_present) { - enb_ctx->enb_name = s1_req.enbname.value.to_string(); + enb_ctx->enb_name_present = s1_req->enbname_present; + if (s1_req->enbname_present) { + enb_ctx->enb_name = s1_req->enbname.value.to_string(); } // eNB Id - enb_ctx->enb_id = s1_req.global_enb_id.value.enb_id.macro_enb_id().to_number(); + enb_ctx->enb_id = s1_req->global_enb_id.value.enb_id.macro_enb_id().to_number(); // PLMN Id - ((uint8_t*)&plmn)[1] = s1_req.global_enb_id.value.plm_nid[0]; - ((uint8_t*)&plmn)[2] = s1_req.global_enb_id.value.plm_nid[1]; - ((uint8_t*)&plmn)[3] = s1_req.global_enb_id.value.plm_nid[2]; + ((uint8_t*)&plmn)[1] = s1_req->global_enb_id.value.plm_nid[0]; + ((uint8_t*)&plmn)[2] = s1_req->global_enb_id.value.plm_nid[1]; + ((uint8_t*)&plmn)[3] = s1_req->global_enb_id.value.plm_nid[2]; enb_ctx->plmn = ntohl(plmn); srsran::s1ap_plmn_to_mccmnc(enb_ctx->plmn, &enb_ctx->mcc, &enb_ctx->mnc); // SupportedTAs - enb_ctx->nof_supported_ta = s1_req.supported_tas.value.size(); + enb_ctx->nof_supported_ta = s1_req->supported_tas.value.size(); for (uint16_t i = 0; i < enb_ctx->nof_supported_ta; i++) { - const asn1::s1ap::supported_tas_item_s& tas = s1_req.supported_tas.value[i]; + const asn1::s1ap::supported_tas_item_s& tas = s1_req->supported_tas.value[i]; // TAC ((uint8_t*)&enb_ctx->tacs[i])[0] = tas.tac[0]; ((uint8_t*)&enb_ctx->tacs[i])[1] = tas.tac[1]; @@ -163,7 +162,7 @@ bool s1ap_mngmt_proc::unpack_s1_setup_request(const asn1::s1ap::s1_setup_request } // Default Paging DRX - enb_ctx->drx.value = s1_req.default_paging_drx.value; + enb_ctx->drx.value = s1_req->default_paging_drx.value; return true; } @@ -173,10 +172,10 @@ bool s1ap_mngmt_proc::send_s1_setup_failure(asn1::s1ap::cause_misc_opts::options s1ap_pdu_t tx_pdu; tx_pdu.set_unsuccessful_outcome().load_info_obj(ASN1_S1AP_ID_S1_SETUP); - asn1::s1ap::s1_setup_fail_ies_container& s1_fail = tx_pdu.unsuccessful_outcome().value.s1_setup_fail().protocol_ies; + asn1::s1ap::s1_setup_fail_s& s1_fail = tx_pdu.unsuccessful_outcome().value.s1_setup_fail(); - s1_fail.cause.value.set(asn1::s1ap::cause_c::types_opts::misc); - s1_fail.cause.value.misc().value = cause; + s1_fail->cause.value.set(asn1::s1ap::cause_c::types_opts::misc); + s1_fail->cause.value.misc().value = cause; m_s1ap->s1ap_tx_pdu(tx_pdu, enb_sri); return true; @@ -189,20 +188,20 @@ bool s1ap_mngmt_proc::send_s1_setup_response(const s1ap_args_t& s1ap_args, struc s1ap_pdu_t tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_S1AP_ID_S1_SETUP); - asn1::s1ap::s1_setup_resp_ies_container& s1_resp = tx_pdu.successful_outcome().value.s1_setup_resp().protocol_ies; + asn1::s1ap::s1_setup_resp_s& s1_resp = tx_pdu.successful_outcome().value.s1_setup_resp(); // MME Name - s1_resp.mm_ename_present = true; - s1_resp.mm_ename.value.from_string(s1ap_args.mme_name); + s1_resp->mm_ename_present = true; + s1_resp->mm_ename.value.from_string(s1ap_args.mme_name); // Served GUMEIs - s1_resp.served_gummeis.value.resize(1); // TODO Only one served GUMMEI supported + s1_resp->served_gummeis.value.resize(1); // TODO Only one served GUMMEI supported uint32_t plmn = 0; srsran::s1ap_mccmnc_to_plmn(s1ap_args.mcc, s1ap_args.mnc, &plmn); plmn = htonl(plmn); - asn1::s1ap::served_gummeis_item_s& serv_gummei = s1_resp.served_gummeis.value[0]; + asn1::s1ap::served_gummeis_item_s& serv_gummei = s1_resp->served_gummeis.value[0]; serv_gummei.served_plmns.resize(1); serv_gummei.served_plmns[0][0] = ((uint8_t*)&plmn)[1]; @@ -215,7 +214,7 @@ bool s1ap_mngmt_proc::send_s1_setup_response(const s1ap_args_t& s1ap_args, struc serv_gummei.served_mmecs.resize(1); // Only one MMEC served serv_gummei.served_mmecs[0].from_number(s1ap_args.mme_code); - s1_resp.relative_mme_capacity.value = 255; + s1_resp->relative_mme_capacity.value = 255; if (!m_s1ap->s1ap_tx_pdu(tx_pdu, enb_sri)) { m_logger.error("Error sending S1 Setup Response."); diff --git a/srsepc/src/mme/s1ap_nas_transport.cc b/srsepc/src/mme/s1ap_nas_transport.cc index 5c61313e7..54888e833 100644 --- a/srsepc/src/mme/s1ap_nas_transport.cc +++ b/srsepc/src/mme/s1ap_nas_transport.cc @@ -86,19 +86,19 @@ bool s1ap_nas_transport::handle_initial_ue_message(const asn1::s1ap::init_ue_msg bool err, mac_valid; uint8_t pd, msg_type, sec_hdr_type; srsran::unique_byte_buffer_t nas_msg = srsran::make_byte_buffer(); - memcpy(nas_msg->msg, init_ue.protocol_ies.nas_pdu.value.data(), init_ue.protocol_ies.nas_pdu.value.size()); - nas_msg->N_bytes = init_ue.protocol_ies.nas_pdu.value.size(); + memcpy(nas_msg->msg, init_ue->nas_pdu.value.data(), init_ue->nas_pdu.value.size()); + nas_msg->N_bytes = init_ue->nas_pdu.value.size(); uint64_t imsi = 0; uint32_t m_tmsi = 0; - uint32_t enb_ue_s1ap_id = init_ue.protocol_ies.enb_ue_s1ap_id.value.value; + uint32_t enb_ue_s1ap_id = init_ue->enb_ue_s1ap_id.value.value; liblte_mme_parse_msg_header((LIBLTE_BYTE_MSG_STRUCT*)nas_msg.get(), &pd, &msg_type); srsran::console("Initial UE message: %s\n", liblte_nas_msg_type_to_string(msg_type)); m_logger.info("Initial UE message: %s", liblte_nas_msg_type_to_string(msg_type)); - if (init_ue.protocol_ies.s_tmsi_present) { - srsran::uint8_to_uint32(init_ue.protocol_ies.s_tmsi.value.m_tmsi.data(), &m_tmsi); + if (init_ue->s_tmsi_present) { + srsran::uint8_to_uint32(init_ue->s_tmsi.value.m_tmsi.data(), &m_tmsi); } switch (msg_type) { @@ -135,8 +135,8 @@ bool s1ap_nas_transport::handle_uplink_nas_transport(const asn1::s1ap::ul_nas_tr struct sctp_sndrcvinfo* enb_sri) { uint8_t pd, msg_type, sec_hdr_type; - uint32_t enb_ue_s1ap_id = ul_xport.protocol_ies.enb_ue_s1ap_id.value.value; - uint32_t mme_ue_s1ap_id = ul_xport.protocol_ies.mme_ue_s1ap_id.value.value; + uint32_t enb_ue_s1ap_id = ul_xport->enb_ue_s1ap_id.value.value; + uint32_t mme_ue_s1ap_id = ul_xport->mme_ue_s1ap_id.value.value; bool mac_valid = false; bool increase_ul_nas_cnt = true; @@ -154,8 +154,8 @@ bool s1ap_nas_transport::handle_uplink_nas_transport(const asn1::s1ap::ul_nas_tr // Parse NAS message header srsran::unique_byte_buffer_t nas_msg = srsran::make_byte_buffer(); - memcpy(nas_msg->msg, ul_xport.protocol_ies.nas_pdu.value.data(), ul_xport.protocol_ies.nas_pdu.value.size()); - nas_msg->N_bytes = ul_xport.protocol_ies.nas_pdu.value.size(); + memcpy(nas_msg->msg, ul_xport->nas_pdu.value.data(), ul_xport->nas_pdu.value.size()); + nas_msg->N_bytes = ul_xport->nas_pdu.value.size(); bool msg_encrypted = false; // Parse the message security header @@ -353,13 +353,13 @@ bool s1ap_nas_transport::send_downlink_nas_transport(uint32_t enb_ tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_DL_NAS_TRANSPORT); // Setup Dw NAS structure - asn1::s1ap::dl_nas_transport_ies_container& dw_nas = tx_pdu.init_msg().value.dl_nas_transport().protocol_ies; - dw_nas.enb_ue_s1ap_id.value = enb_ue_s1ap_id; - dw_nas.mme_ue_s1ap_id.value = mme_ue_s1ap_id; + asn1::s1ap::dl_nas_transport_s& dw_nas = tx_pdu.init_msg().value.dl_nas_transport(); + dw_nas->enb_ue_s1ap_id.value = enb_ue_s1ap_id; + dw_nas->mme_ue_s1ap_id.value = mme_ue_s1ap_id; // Copy NAS PDU to Downlink NAS Trasport message buffer - dw_nas.nas_pdu.value.resize(nas_msg->N_bytes); - memcpy(dw_nas.nas_pdu.value.data(), nas_msg->msg, nas_msg->N_bytes); + dw_nas->nas_pdu.value.resize(nas_msg->N_bytes); + memcpy(dw_nas->nas_pdu.value.data(), nas_msg->msg, nas_msg->N_bytes); // Send Downlink NAS Transport Message m_s1ap->s1ap_tx_pdu(tx_pdu, &enb_sri); diff --git a/srsepc/src/mme/s1ap_paging.cc b/srsepc/src/mme/s1ap_paging.cc index 33857fcd2..4f588d1fb 100644 --- a/srsepc/src/mme/s1ap_paging.cc +++ b/srsepc/src/mme/s1ap_paging.cc @@ -38,7 +38,7 @@ bool s1ap_paging::send_paging(uint64_t imsi, uint16_t erab_to_setup) // Prepare reply PDU s1ap_pdu_t tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_S1AP_ID_PAGING); - asn1::s1ap::paging_ies_container& paging = tx_pdu.init_msg().value.paging().protocol_ies; + asn1::s1ap::paging_s& paging = tx_pdu.init_msg().value.paging(); // Getting UE NAS Context nas* nas_ctx = m_s1ap->find_nas_ctx_from_imsi(imsi); @@ -49,25 +49,25 @@ bool s1ap_paging::send_paging(uint64_t imsi, uint16_t erab_to_setup) // UE Identity Index uint16_t ue_index = imsi % 1024; - paging.ue_id_idx_value.value.from_number(ue_index); + paging->ue_id_idx_value.value.from_number(ue_index); // UE Paging Id - paging.ue_paging_id.value.set_s_tmsi(); - paging.ue_paging_id.value.s_tmsi().mmec.from_number(m_s1ap->m_s1ap_args.mme_code); - paging.ue_paging_id.value.s_tmsi().m_tmsi.from_number(nas_ctx->m_sec_ctx.guti.m_tmsi); + paging->ue_paging_id.value.set_s_tmsi(); + paging->ue_paging_id.value.s_tmsi().mmec.from_number(m_s1ap->m_s1ap_args.mme_code); + paging->ue_paging_id.value.s_tmsi().m_tmsi.from_number(nas_ctx->m_sec_ctx.guti.m_tmsi); // CMDomain - paging.cn_domain.value = asn1::s1ap::cn_domain_opts::ps; + paging->cn_domain.value = asn1::s1ap::cn_domain_opts::ps; // TAI List - paging.tai_list.value.resize(1); - paging.tai_list.value[0].load_info_obj(ASN1_S1AP_ID_TAI_ITEM); + paging->tai_list.value.resize(1); + paging->tai_list.value[0].load_info_obj(ASN1_S1AP_ID_TAI_ITEM); uint32_t plmn = m_s1ap->get_plmn(); - paging.tai_list.value[0]->tai_item().tai.plm_nid.from_number(plmn); + paging->tai_list.value[0]->tai_item().tai.plm_nid.from_number(plmn); uint16_t tac = m_s1ap->m_s1ap_args.tac; - paging.tai_list.value[0]->tai_item().tai.tac.from_number(tac); + paging->tai_list.value[0]->tai_item().tai.tac.from_number(tac); // Start T3413 if (!nas_ctx->start_timer(T_3413)) { diff --git a/srsgnb/src/stack/ngap/ngap.cc b/srsgnb/src/stack/ngap/ngap.cc index 681e68ace..7891f7690 100644 --- a/srsgnb/src/stack/ngap/ngap.cc +++ b/srsgnb/src/stack/ngap/ngap.cc @@ -469,7 +469,7 @@ bool ngap::handle_ng_setup_response(const asn1::ngap::ng_setup_resp_s& msg) amf_connected = true; ng_setup_proc_t::ngsetupresult res; res.success = true; - logger.info("AMF name: %s", ngsetupresponse.protocol_ies.amf_name.value.to_string()); + logger.info("AMF name: %s", ngsetupresponse->amf_name.value.to_string()); ngsetup_proc.trigger(res); return true; @@ -477,7 +477,7 @@ bool ngap::handle_ng_setup_response(const asn1::ngap::ng_setup_resp_s& msg) bool ngap::handle_ng_setup_failure(const asn1::ngap::ng_setup_fail_s& msg) { - std::string cause = get_cause(msg.protocol_ies.cause.value); + std::string cause = get_cause(msg->cause.value); logger.error("NG Setup Failure. Cause: %s", cause.c_str()); srsran::console("NG Setup Failure. Cause: %s\n", cause.c_str()); return true; @@ -488,37 +488,36 @@ bool ngap::handle_dl_nas_transport(const asn1::ngap::dl_nas_transport_s& msg) if (msg.ext) { logger.warning("Not handling NGAP message extension"); } - ue* u = - handle_ngapmsg_ue_id(msg.protocol_ies.ran_ue_ngap_id.value.value, msg.protocol_ies.amf_ue_ngap_id.value.value); + ue* u = handle_ngapmsg_ue_id(msg->ran_ue_ngap_id.value.value, msg->amf_ue_ngap_id.value.value); if (u == nullptr) { logger.warning("Couldn't find user with ran_ue_ngap_id %d and %d", - msg.protocol_ies.ran_ue_ngap_id.value.value, - msg.protocol_ies.amf_ue_ngap_id.value.value); + msg->ran_ue_ngap_id.value.value, + msg->amf_ue_ngap_id.value.value); return false; } - if (msg.protocol_ies.old_amf_present) { + if (msg->old_amf_present) { logger.warning("Not handling OldAMF"); } - if (msg.protocol_ies.ran_paging_prio_present) { + if (msg->ran_paging_prio_present) { logger.warning("Not handling RANPagingPriority"); } - if (msg.protocol_ies.mob_restrict_list_present) { + if (msg->mob_restrict_list_present) { logger.warning("Not handling MobilityRestrictionList"); } - if (msg.protocol_ies.idx_to_rfsp_present) { + if (msg->idx_to_rfsp_present) { logger.warning("Not handling IndexToRFSP"); } - if (msg.protocol_ies.ue_aggregate_maximum_bit_rate_present) { + if (msg->ue_aggregate_maximum_bit_rate_present) { logger.warning("Not handling UEAggregateMaximumBitRate"); } - if (msg.protocol_ies.allowed_nssai_present) { + if (msg->allowed_nssai_present) { logger.warning("Not handling AllowedNSSAI"); } @@ -527,16 +526,15 @@ bool ngap::handle_dl_nas_transport(const asn1::ngap::dl_nas_transport_s& msg) logger.error("Fatal Error: Couldn't allocate buffer in ngap::run_thread()."); return false; } - memcpy(pdu->msg, msg.protocol_ies.nas_pdu.value.data(), msg.protocol_ies.nas_pdu.value.size()); - pdu->N_bytes = msg.protocol_ies.nas_pdu.value.size(); + memcpy(pdu->msg, msg->nas_pdu.value.data(), msg->nas_pdu.value.size()); + pdu->N_bytes = msg->nas_pdu.value.size(); rrc->write_dl_info(u->ctxt.rnti, std::move(pdu)); return true; } bool ngap::handle_initial_ctxt_setup_request(const asn1::ngap::init_context_setup_request_s& msg) { - ue* u = - handle_ngapmsg_ue_id(msg.protocol_ies.ran_ue_ngap_id.value.value, msg.protocol_ies.amf_ue_ngap_id.value.value); + ue* u = handle_ngapmsg_ue_id(msg->ran_ue_ngap_id.value.value, msg->amf_ue_ngap_id.value.value); if (u == nullptr) { logger.warning("Can not find UE"); return false; @@ -549,7 +547,7 @@ bool ngap::handle_initial_ctxt_setup_request(const asn1::ngap::init_context_setu bool ngap::handle_ue_context_release_cmd(const asn1::ngap::ue_context_release_cmd_s& msg) { - const asn1::ngap::ue_ngap_id_pair_s& ue_ngap_id_pair = msg.protocol_ies.ue_ngap_ids.value.ue_ngap_id_pair(); + const asn1::ngap::ue_ngap_id_pair_s& ue_ngap_id_pair = msg->ue_ngap_ids.value.ue_ngap_id_pair(); ue* u = handle_ngapmsg_ue_id(ue_ngap_id_pair.ran_ue_ngap_id, ue_ngap_id_pair.amf_ue_ngap_id); if (u == nullptr) { @@ -562,15 +560,14 @@ bool ngap::handle_ue_context_release_cmd(const asn1::ngap::ue_context_release_cm bool ngap::handle_ue_pdu_session_res_setup_request(const asn1::ngap::pdu_session_res_setup_request_s& msg) { - ue* u = - handle_ngapmsg_ue_id(msg.protocol_ies.ran_ue_ngap_id.value.value, msg.protocol_ies.amf_ue_ngap_id.value.value); + ue* u = handle_ngapmsg_ue_id(msg->ran_ue_ngap_id.value.value, msg->amf_ue_ngap_id.value.value); if (u == nullptr) { logger.warning("Can not find UE"); return false; } - if (msg.protocol_ies.ue_aggregate_maximum_bit_rate_present) { - rrc->set_aggregate_max_bitrate(u->ctxt.rnti, msg.protocol_ies.ue_aggregate_maximum_bit_rate.value); + if (msg->ue_aggregate_maximum_bit_rate_present) { + rrc->set_aggregate_max_bitrate(u->ctxt.rnti, msg->ue_aggregate_maximum_bit_rate.value); } u->handle_pdu_session_res_setup_request(msg); @@ -592,22 +589,22 @@ bool ngap::send_error_indication(const asn1::ngap::cause_c& cause, ngap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_ERROR_IND); - auto& container = tx_pdu.init_msg().value.error_ind().protocol_ies; + auto& container = tx_pdu.init_msg().value.error_ind(); - uint16_t rnti = SRSRAN_INVALID_RNTI; - container.ran_ue_ngap_id_present = ran_ue_ngap_id.has_value(); + uint16_t rnti = SRSRAN_INVALID_RNTI; + container->ran_ue_ngap_id_present = ran_ue_ngap_id.has_value(); if (ran_ue_ngap_id.has_value()) { - container.ran_ue_ngap_id.value = ran_ue_ngap_id.value(); - ue* user_ptr = users.find_ue_gnbid(ran_ue_ngap_id.value()); - rnti = user_ptr != nullptr ? user_ptr->ctxt.rnti : SRSRAN_INVALID_RNTI; + container->ran_ue_ngap_id.value = ran_ue_ngap_id.value(); + ue* user_ptr = users.find_ue_gnbid(ran_ue_ngap_id.value()); + rnti = user_ptr != nullptr ? user_ptr->ctxt.rnti : SRSRAN_INVALID_RNTI; } - container.amf_ue_ngap_id_present = amf_ue_ngap_id.has_value(); + container->amf_ue_ngap_id_present = amf_ue_ngap_id.has_value(); if (amf_ue_ngap_id.has_value()) { - container.amf_ue_ngap_id.value = amf_ue_ngap_id.value(); + container->amf_ue_ngap_id.value = amf_ue_ngap_id.value(); } - container.cause_present = true; - container.cause.value = cause; + container->cause_present = true; + container->cause.value = cause; return sctp_send_ngap_pdu(tx_pdu, rnti, "Error Indication"); } @@ -656,14 +653,14 @@ bool ngap::setup_ng() ngap_pdu_c pdu; pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_NG_SETUP); - ng_setup_request_ies_container& container = pdu.init_msg().value.ng_setup_request().protocol_ies; - global_gnb_id_s& global_gnb_id = container.global_ran_node_id.value.set_global_gnb_id(); - global_gnb_id.plmn_id = tai.plmn_id; + ng_setup_request_s& container = pdu.init_msg().value.ng_setup_request(); + global_gnb_id_s& global_gnb_id = container->global_ran_node_id.value.set_global_gnb_id(); + global_gnb_id.plmn_id = tai.plmn_id; // TODO: when ASN1 is fixed // global_gnb_id.gnb_id.set_gnb_id().from_number(args.gnb_id); - // container.ran_node_name_present = true; - // container.ran_node_name.value.from_string(args.gnb_name); + // container->ran_node_name_present = true; + // container->ran_node_name.value.from_string(args.gnb_name); asn1::bounded_bitstring<22, 32, false, true>& gnb_str = global_gnb_id.gnb_id.set_gnb_id(); gnb_str.resize(32); @@ -672,22 +669,22 @@ bool ngap::setup_ng() bref.pack(args.gnb_id, 8); memcpy(gnb_str.data(), &buffer[0], bref.distance_bytes()); - container.ran_node_name_present = true; + container->ran_node_name_present = true; if (args.gnb_name.length() >= 150) { args.gnb_name.resize(150); } - container.ran_node_name.value.resize(args.gnb_name.size()); - memcpy(&container.ran_node_name.value[0], &args.gnb_name[0], args.gnb_name.size()); + container->ran_node_name.value.resize(args.gnb_name.size()); + memcpy(&container->ran_node_name.value[0], &args.gnb_name[0], args.gnb_name.size()); - container.supported_ta_list.value.resize(1); - container.supported_ta_list.value[0].tac = tai.tac; - container.supported_ta_list.value[0].broadcast_plmn_list.resize(1); - container.supported_ta_list.value[0].broadcast_plmn_list[0].plmn_id = tai.plmn_id; - container.supported_ta_list.value[0].broadcast_plmn_list[0].tai_slice_support_list.resize(1); - container.supported_ta_list.value[0].broadcast_plmn_list[0].tai_slice_support_list[0].s_nssai.sst.from_number(1); + container->supported_ta_list.value.resize(1); + container->supported_ta_list.value[0].tac = tai.tac; + container->supported_ta_list.value[0].broadcast_plmn_list.resize(1); + container->supported_ta_list.value[0].broadcast_plmn_list[0].plmn_id = tai.plmn_id; + container->supported_ta_list.value[0].broadcast_plmn_list[0].tai_slice_support_list.resize(1); + container->supported_ta_list.value[0].broadcast_plmn_list[0].tai_slice_support_list[0].s_nssai.sst.from_number(1); - container.default_paging_drx.value.value = asn1::ngap::paging_drx_opts::v256; // Todo: add to args, config file + container->default_paging_drx.value.value = asn1::ngap::paging_drx_opts::v256; // Todo: add to args, config file return sctp_send_ngap_pdu(pdu, 0, "ngSetupRequest"); } diff --git a/srsgnb/src/stack/ngap/ngap_ue.cc b/srsgnb/src/stack/ngap/ngap_ue.cc index 15d7a42bc..714aa8a78 100644 --- a/srsgnb/src/stack/ngap/ngap_ue.cc +++ b/srsgnb/src/stack/ngap/ngap_ue.cc @@ -57,38 +57,38 @@ bool ngap::ue::send_initial_ue_message(asn1::ngap::rrcestablishment_cause_e caus ngap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_INIT_UE_MSG); - init_ue_msg_ies_container& container = tx_pdu.init_msg().value.init_ue_msg().protocol_ies; + init_ue_msg_s& container = tx_pdu.init_msg().value.init_ue_msg(); // 5G-S-TMSI if (has_tmsi) { - container.five_g_s_tmsi_present = true; - srsran::uint32_to_uint8(s_tmsi, container.five_g_s_tmsi.value.five_g_tmsi.data()); - container.five_g_s_tmsi.value.amf_set_id.from_number(ctxt.amf_set_id); - container.five_g_s_tmsi.value.amf_pointer.from_number(ctxt.amf_pointer); + container->five_g_s_tmsi_present = true; + srsran::uint32_to_uint8(s_tmsi, container->five_g_s_tmsi.value.five_g_tmsi.data()); + container->five_g_s_tmsi.value.amf_set_id.from_number(ctxt.amf_set_id); + container->five_g_s_tmsi.value.amf_pointer.from_number(ctxt.amf_pointer); } // RAN_UE_NGAP_ID - container.ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; + container->ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; // NAS_PDU - container.nas_pdu.value.resize(pdu.size()); - memcpy(container.nas_pdu.value.data(), pdu.data(), pdu.size()); + container->nas_pdu.value.resize(pdu.size()); + memcpy(container->nas_pdu.value.data(), pdu.data(), pdu.size()); // RRC Establishment Cause - container.rrcestablishment_cause.value = cause; + container->rrcestablishment_cause.value = cause; // User Location Info // userLocationInformationNR - container.user_location_info.value.set_user_location_info_nr(); - container.user_location_info.value.user_location_info_nr().nr_cgi.nrcell_id = ngap_ptr->nr_cgi.nrcell_id; - container.user_location_info.value.user_location_info_nr().nr_cgi.plmn_id = ngap_ptr->nr_cgi.plmn_id; - container.user_location_info.value.user_location_info_nr().tai.plmn_id = ngap_ptr->tai.plmn_id; - container.user_location_info.value.user_location_info_nr().tai.tac = ngap_ptr->tai.tac; + container->user_location_info.value.set_user_location_info_nr(); + container->user_location_info.value.user_location_info_nr().nr_cgi.nrcell_id = ngap_ptr->nr_cgi.nrcell_id; + container->user_location_info.value.user_location_info_nr().nr_cgi.plmn_id = ngap_ptr->nr_cgi.plmn_id; + container->user_location_info.value.user_location_info_nr().tai.plmn_id = ngap_ptr->tai.plmn_id; + container->user_location_info.value.user_location_info_nr().tai.tac = ngap_ptr->tai.tac; // UE context request for setup in the NAS registration request - container.ue_context_request_present = true; - container.ue_context_request.value = asn1::ngap::ue_context_request_opts::options::requested; + container->ue_context_request_present = true; + container->ue_context_request.value = asn1::ngap::ue_context_request_opts::options::requested; return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "InitialUEMessage"); } @@ -102,30 +102,30 @@ bool ngap::ue::send_ul_nas_transport(srsran::const_byte_span pdu) ngap_pdu_c tx_pdu; tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_UL_NAS_TRANSPORT); - asn1::ngap::ul_nas_transport_ies_container& container = tx_pdu.init_msg().value.ul_nas_transport().protocol_ies; + ul_nas_transport_s& container = tx_pdu.init_msg().value.ul_nas_transport(); // AMF UE NGAP ID if (ctxt.amf_ue_ngap_id.has_value()) { - container.amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); + container->amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); } else { logger.error("Attempting to send UL NAS Transport without AMF context"); return false; } // RAN UE NGAP ID - container.ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; + container->ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; // NAS PDU - container.nas_pdu.value.resize(pdu.size()); - memcpy(container.nas_pdu.value.data(), pdu.data(), pdu.size()); + container->nas_pdu.value.resize(pdu.size()); + memcpy(container->nas_pdu.value.data(), pdu.data(), pdu.size()); // User Location Info // userLocationInformationNR - container.user_location_info.value.set_user_location_info_nr(); - container.user_location_info.value.user_location_info_nr().nr_cgi.nrcell_id = ngap_ptr->nr_cgi.nrcell_id; - container.user_location_info.value.user_location_info_nr().nr_cgi.plmn_id = ngap_ptr->nr_cgi.plmn_id; - container.user_location_info.value.user_location_info_nr().tai.plmn_id = ngap_ptr->tai.plmn_id; - container.user_location_info.value.user_location_info_nr().tai.tac = ngap_ptr->tai.tac; + container->user_location_info.value.set_user_location_info_nr(); + container->user_location_info.value.user_location_info_nr().nr_cgi.nrcell_id = ngap_ptr->nr_cgi.nrcell_id; + container->user_location_info.value.user_location_info_nr().nr_cgi.plmn_id = ngap_ptr->nr_cgi.plmn_id; + container->user_location_info.value.user_location_info_nr().tai.plmn_id = ngap_ptr->tai.plmn_id; + container->user_location_info.value.user_location_info_nr().tai.tac = ngap_ptr->tai.tac; return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "UplinkNASTransport"); } @@ -147,10 +147,10 @@ bool ngap::ue::send_initial_ctxt_setup_response() init_context_setup_resp_s& container = tx_pdu.successful_outcome().value.init_context_setup_resp(); // AMF UE NGAP ID - container.protocol_ies.amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); + container->amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); // RAN UE NGAP ID - container.protocol_ies.ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; + container->ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "InitialContextSetupResponse"); } @@ -167,16 +167,16 @@ bool ngap::ue::send_initial_ctxt_setup_failure(cause_c cause) init_context_setup_fail_s& container = tx_pdu.unsuccessful_outcome().value.init_context_setup_fail(); // AMF UE NGAP ID - container.protocol_ies.amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); + container->amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); // RAN UE NGAP ID - container.protocol_ies.ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; + container->ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; /* // TODO: PDU Session Resource Setup Response List - Integrate PDU Session and Bearer management into NGAP - container.protocol_ies.pdu_session_res_setup_list_cxt_res_present = true; + container->pdu_session_res_setup_list_cxt_res_present = true; // Case PDU Session Resource Failed to Setup List - container.protocol_ies.pdu_session_res_failed_to_setup_list_cxt_res_present = true; */ + container->pdu_session_res_failed_to_setup_list_cxt_res_present = true; */ return true; } @@ -192,10 +192,10 @@ bool ngap::ue::send_pdu_session_resource_setup_response(uint16_t // TODO: QOS Params ngap_pdu_c tx_pdu; tx_pdu.set_successful_outcome().load_info_obj(ASN1_NGAP_ID_PDU_SESSION_RES_SETUP); - pdu_session_res_setup_resp_s& container = tx_pdu.successful_outcome().value.pdu_session_res_setup_resp(); - container.protocol_ies.amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); - container.protocol_ies.ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; - container.protocol_ies.pdu_session_res_setup_list_su_res_present = true; + pdu_session_res_setup_resp_s& container = tx_pdu.successful_outcome().value.pdu_session_res_setup_resp(); + container->amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); + container->ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; + container->pdu_session_res_setup_list_su_res_present = true; pdu_session_res_setup_item_su_res_s su_res; su_res.pdu_session_res_setup_resp_transfer.resize(512); su_res.pdu_session_id = pdu_session_id; @@ -216,7 +216,7 @@ bool ngap::ue::send_pdu_session_resource_setup_response(uint16_t resp_transfer.pack(bref); su_res.pdu_session_res_setup_resp_transfer.resize(bref.distance_bytes()); - container.protocol_ies.pdu_session_res_setup_list_su_res.value.push_back(su_res); + container->pdu_session_res_setup_list_su_res.value.push_back(su_res); return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "PDUSessionResourceSetupResponse"); } @@ -232,14 +232,14 @@ bool ngap::ue::send_ue_ctxt_release_complete() ue_context_release_complete_s& container = tx_pdu.successful_outcome().value.ue_context_release_complete(); // userLocationInformationNR - container.protocol_ies.user_location_info.value.set_user_location_info_nr(); - container.protocol_ies.user_location_info.value.user_location_info_nr().nr_cgi.nrcell_id = ngap_ptr->nr_cgi.nrcell_id; - container.protocol_ies.user_location_info.value.user_location_info_nr().nr_cgi.plmn_id = ngap_ptr->nr_cgi.plmn_id; - container.protocol_ies.user_location_info.value.user_location_info_nr().tai.plmn_id = ngap_ptr->tai.plmn_id; - container.protocol_ies.user_location_info.value.user_location_info_nr().tai.tac = ngap_ptr->tai.tac; + container->user_location_info.value.set_user_location_info_nr(); + container->user_location_info.value.user_location_info_nr().nr_cgi.nrcell_id = ngap_ptr->nr_cgi.nrcell_id; + container->user_location_info.value.user_location_info_nr().nr_cgi.plmn_id = ngap_ptr->nr_cgi.plmn_id; + container->user_location_info.value.user_location_info_nr().tai.plmn_id = ngap_ptr->tai.plmn_id; + container->user_location_info.value.user_location_info_nr().tai.tac = ngap_ptr->tai.tac; - container.protocol_ies.ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; - container.protocol_ies.amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); + container->ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; + container->amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "UEContextReleaseComplete"); } @@ -261,10 +261,10 @@ bool ngap::ue::send_ue_context_release_request(asn1::ngap::cause_c cause) tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_UE_CONTEXT_RELEASE_REQUEST); ue_context_release_request_s& container = tx_pdu.init_msg().value.ue_context_release_request(); - container.protocol_ies.cause.value = cause; + container->cause.value = cause; // PDU Session Resource List - auto& session_lst = container.protocol_ies.pdu_session_res_list_cxt_rel_req.value; + auto& session_lst = container->pdu_session_res_list_cxt_rel_req.value; for (const auto& pdu_pair : bearer_manager.pdu_sessions()) { const ngap_ue_bearer_manager::pdu_session_t& session = pdu_pair.second; @@ -272,10 +272,10 @@ bool ngap::ue::send_ue_context_release_request(asn1::ngap::cause_c cause) obj.pdu_session_id = session.id; session_lst.push_back(obj); } - container.protocol_ies.pdu_session_res_list_cxt_rel_req_present = session_lst.size() > 0; + container->pdu_session_res_list_cxt_rel_req_present = session_lst.size() > 0; - container.protocol_ies.ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; - container.protocol_ies.amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); + container->ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id; + container->amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value(); // TODO: Implement timeout return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "UEContextReleaseRequest"); diff --git a/srsgnb/src/stack/ngap/ngap_ue_proc.cc b/srsgnb/src/stack/ngap/ngap_ue_proc.cc index b385b048b..43c8adf45 100644 --- a/srsgnb/src/stack/ngap/ngap_ue_proc.cc +++ b/srsgnb/src/stack/ngap/ngap_ue_proc.cc @@ -24,24 +24,24 @@ ngap_ue_initial_context_setup_proc::ngap_ue_initial_context_setup_proc(ngap_inte proc_outcome_t ngap_ue_initial_context_setup_proc::init(const asn1::ngap::init_context_setup_request_s& msg) { - ue_ctxt->amf_pointer = msg.protocol_ies.guami.value.amf_pointer.to_number(); - ue_ctxt->amf_set_id = msg.protocol_ies.guami.value.amf_set_id.to_number(); - ue_ctxt->amf_region_id = msg.protocol_ies.guami.value.amf_region_id.to_number(); + ue_ctxt->amf_pointer = msg->guami.value.amf_pointer.to_number(); + ue_ctxt->amf_set_id = msg->guami.value.amf_set_id.to_number(); + ue_ctxt->amf_region_id = msg->guami.value.amf_region_id.to_number(); - if (msg.protocol_ies.ue_aggregate_maximum_bit_rate_present == true) { - rrc->ue_set_bitrates(ue_ctxt->rnti, msg.protocol_ies.ue_aggregate_maximum_bit_rate.value); + if (msg->ue_aggregate_maximum_bit_rate_present == true) { + rrc->ue_set_bitrates(ue_ctxt->rnti, msg->ue_aggregate_maximum_bit_rate.value); } - rrc->ue_set_security_cfg_capabilities(ue_ctxt->rnti, msg.protocol_ies.ue_security_cap.value); - rrc->ue_set_security_cfg_key(ue_ctxt->rnti, msg.protocol_ies.security_key.value); + rrc->ue_set_security_cfg_capabilities(ue_ctxt->rnti, msg->ue_security_cap.value); + rrc->ue_set_security_cfg_key(ue_ctxt->rnti, msg->security_key.value); - if (msg.protocol_ies.nas_pdu_present) { + if (msg->nas_pdu_present) { srsran::unique_byte_buffer_t pdu = srsran::make_byte_buffer(); if (pdu == nullptr) { logger.error("Fatal Error: Couldn't allocate buffer in %s.", __FUNCTION__); return proc_outcome_t::error; } - memcpy(pdu->msg, msg.protocol_ies.nas_pdu.value.data(), msg.protocol_ies.nas_pdu.value.size()); - pdu->N_bytes = msg.protocol_ies.nas_pdu.value.size(); + memcpy(pdu->msg, msg->nas_pdu.value.data(), msg->nas_pdu.value.size()); + pdu->N_bytes = msg->nas_pdu.value.size(); rrc->start_security_mode_procedure(ue_ctxt->rnti, std::move(pdu)); } else { rrc->start_security_mode_procedure(ue_ctxt->rnti, nullptr); @@ -102,12 +102,12 @@ ngap_ue_pdu_session_res_setup_proc::ngap_ue_pdu_session_res_setup_proc(ngap_inte proc_outcome_t ngap_ue_pdu_session_res_setup_proc::init(const asn1::ngap::pdu_session_res_setup_request_s& msg) { - if (msg.protocol_ies.pdu_session_res_setup_list_su_req.value.size() != 1) { + if (msg->pdu_session_res_setup_list_su_req.value.size() != 1) { logger.error("Not handling zero or multiple su requests"); return proc_outcome_t::error; } - asn1::ngap::pdu_session_res_setup_item_su_req_s su_req = msg.protocol_ies.pdu_session_res_setup_list_su_req.value[0]; + asn1::ngap::pdu_session_res_setup_item_su_req_s su_req = msg->pdu_session_res_setup_list_su_req.value[0]; asn1::cbit_ref pdu_session_bref(su_req.pdu_session_res_setup_request_transfer.data(), su_req.pdu_session_res_setup_request_transfer.size()); @@ -119,25 +119,25 @@ proc_outcome_t ngap_ue_pdu_session_res_setup_proc::init(const asn1::ngap::pdu_se return proc_outcome_t::error; } - if (pdu_ses_res_setup_req_trans.protocol_ies.qos_flow_setup_request_list.value.size() != 1) { + if (pdu_ses_res_setup_req_trans->qos_flow_setup_request_list.value.size() != 1) { logger.error("Expected one item in QoS flow setup request list"); return proc_outcome_t::error; } - if (pdu_ses_res_setup_req_trans.protocol_ies.ul_ngu_up_tnl_info.value.type() != + if (pdu_ses_res_setup_req_trans->ul_ngu_up_tnl_info.value.type() != asn1::ngap::up_transport_layer_info_c::types::gtp_tunnel) { logger.error("Expected GTP Tunnel"); return proc_outcome_t::error; } asn1::ngap::qos_flow_setup_request_item_s qos_flow_setup = - pdu_ses_res_setup_req_trans.protocol_ies.qos_flow_setup_request_list.value[0]; + pdu_ses_res_setup_req_trans->qos_flow_setup_request_list.value[0]; srsran::const_span nas_pdu_dummy; uint32_t teid_out = 0; - teid_out |= pdu_ses_res_setup_req_trans.protocol_ies.ul_ngu_up_tnl_info.value.gtp_tunnel().gtp_teid[0] << 24u; - teid_out |= pdu_ses_res_setup_req_trans.protocol_ies.ul_ngu_up_tnl_info.value.gtp_tunnel().gtp_teid[1] << 16u; - teid_out |= pdu_ses_res_setup_req_trans.protocol_ies.ul_ngu_up_tnl_info.value.gtp_tunnel().gtp_teid[2] << 8u; - teid_out |= pdu_ses_res_setup_req_trans.protocol_ies.ul_ngu_up_tnl_info.value.gtp_tunnel().gtp_teid[3]; + teid_out |= pdu_ses_res_setup_req_trans->ul_ngu_up_tnl_info.value.gtp_tunnel().gtp_teid[0] << 24u; + teid_out |= pdu_ses_res_setup_req_trans->ul_ngu_up_tnl_info.value.gtp_tunnel().gtp_teid[1] << 16u; + teid_out |= pdu_ses_res_setup_req_trans->ul_ngu_up_tnl_info.value.gtp_tunnel().gtp_teid[2] << 8u; + teid_out |= pdu_ses_res_setup_req_trans->ul_ngu_up_tnl_info.value.gtp_tunnel().gtp_teid[3]; // TODO: Check cause asn1::ngap::cause_c cause; @@ -149,7 +149,7 @@ proc_outcome_t ngap_ue_pdu_session_res_setup_proc::init(const asn1::ngap::pdu_se ue_ctxt->rnti, su_req.pdu_session_id, qos_flow_setup.qos_flow_level_qos_params, - pdu_ses_res_setup_req_trans.protocol_ies.ul_ngu_up_tnl_info.value.gtp_tunnel().transport_layer_address, + pdu_ses_res_setup_req_trans->ul_ngu_up_tnl_info.value.gtp_tunnel().transport_layer_address, teid_out, lcid, addr_in, diff --git a/srsgnb/src/stack/ngap/test/ngap_test.cc b/srsgnb/src/stack/ngap/test/ngap_test.cc index 321fc1b3e..8bd6803ac 100644 --- a/srsgnb/src/stack/ngap/test/ngap_test.cc +++ b/srsgnb/src/stack/ngap/test/ngap_test.cc @@ -209,31 +209,31 @@ void run_ng_initial_ue(ngap& ngap_obj, amf_dummy& amf, rrc_nr_dummy& rrc) asn1::ngap::ngap_pdu_c ngap_initial_ctx_req_pdu; ngap_initial_ctx_req_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_INIT_CONTEXT_SETUP); - auto& container = ngap_initial_ctx_req_pdu.init_msg().value.init_context_setup_request().protocol_ies; + auto& container = ngap_initial_ctx_req_pdu.init_msg().value.init_context_setup_request(); - container.amf_ue_ngap_id.value = 0x1; - container.ran_ue_ngap_id.value = 0x1; - container.nas_pdu_present = true; + container->amf_ue_ngap_id.value = 0x1; + container->ran_ue_ngap_id.value = 0x1; + container->nas_pdu_present = true; // Set allowed NSSAI (FIXME) - container.allowed_nssai.value.resize(1); + container->allowed_nssai.value.resize(1); // Set security key uint8_t sec_key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}; for (uint8_t i = 0; i < 32; ++i) { - container.security_key.value.data()[31 - i] = sec_key[i]; + container->security_key.value.data()[31 - i] = sec_key[i]; } // Set security capabilities - container.ue_security_cap.value.nrencryption_algorithms.set(0, true); - container.ue_security_cap.value.nrencryption_algorithms.set(1, true); - container.ue_security_cap.value.nrintegrity_protection_algorithms.set(0, true); - container.ue_security_cap.value.nrintegrity_protection_algorithms.set(1, true); - container.ue_security_cap.value.eutr_aencryption_algorithms.set(0, true); - container.ue_security_cap.value.eutr_aencryption_algorithms.set(1, true); - container.ue_security_cap.value.eutr_aintegrity_protection_algorithms.set(0, true); - container.ue_security_cap.value.eutr_aintegrity_protection_algorithms.set(1, true); + container->ue_security_cap.value.nrencryption_algorithms.set(0, true); + container->ue_security_cap.value.nrencryption_algorithms.set(1, true); + container->ue_security_cap.value.nrintegrity_protection_algorithms.set(0, true); + container->ue_security_cap.value.nrintegrity_protection_algorithms.set(1, true); + container->ue_security_cap.value.eutr_aencryption_algorithms.set(0, true); + container->ue_security_cap.value.eutr_aencryption_algorithms.set(1, true); + container->ue_security_cap.value.eutr_aintegrity_protection_algorithms.set(0, true); + container->ue_security_cap.value.eutr_aintegrity_protection_algorithms.set(1, true); // Set PDU Session Response Setup Item // TODO @@ -254,13 +254,13 @@ void run_ng_initial_ue(ngap& ngap_obj, amf_dummy& amf, rrc_nr_dummy& rrc) // Check RRC security capabilities for (uint8_t i = 0; i < 8; ++i) { - TESTASSERT_EQ(container.ue_security_cap.value.nrencryption_algorithms.get(i), + TESTASSERT_EQ(container->ue_security_cap.value.nrencryption_algorithms.get(i), rrc.sec_caps.nrencryption_algorithms.get(i)); - TESTASSERT_EQ(container.ue_security_cap.value.nrintegrity_protection_algorithms.get(i), + TESTASSERT_EQ(container->ue_security_cap.value.nrintegrity_protection_algorithms.get(i), rrc.sec_caps.nrintegrity_protection_algorithms.get(i)); - TESTASSERT_EQ(container.ue_security_cap.value.eutr_aencryption_algorithms.get(i), + TESTASSERT_EQ(container->ue_security_cap.value.eutr_aencryption_algorithms.get(i), rrc.sec_caps.eutr_aencryption_algorithms.get(i)); - TESTASSERT_EQ(container.ue_security_cap.value.eutr_aintegrity_protection_algorithms.get(i), + TESTASSERT_EQ(container->ue_security_cap.value.eutr_aintegrity_protection_algorithms.get(i), rrc.sec_caps.eutr_aintegrity_protection_algorithms.get(i)); }