Introduce platform type plmn_id_t for consistency across the stack

* F1AP, NGAP can now use the same struct type
* this improves maintainability
This commit is contained in:
Guido Casati
2025-04-15 15:28:34 +02:00
parent c1f225abc1
commit ac3f9f3e32
16 changed files with 75 additions and 76 deletions
+9 -15
View File
@@ -93,12 +93,6 @@ typedef struct f1ap_net_config_t {
uint16_t DUport;
} f1ap_net_config_t;
typedef struct f1ap_plmn_t {
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
} f1ap_plmn_t;
typedef struct f1ap_cp_tnl_s {
in_addr_t tl_address; // currently only IPv4 supported
uint16_t port;
@@ -130,7 +124,7 @@ typedef struct f1ap_tdd_info_t {
typedef struct f1ap_served_cell_info_t {
// NR CGI
f1ap_plmn_t plmn;
plmn_id_t plmn;
uint64_t nr_cellid; // NR Global Cell Id
// NR Physical Cell Ids
@@ -193,7 +187,7 @@ typedef struct f1ap_sib_msg_t {
} f1ap_sib_msg_t;
typedef struct served_cells_to_activate_s {
f1ap_plmn_t plmn;
plmn_id_t plmn;
// NR Global Cell Id
uint64_t nr_cellid;
/// NRPCI [int 0..1007]
@@ -240,7 +234,7 @@ typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s {
uint16_t num_cells_failed_to_be_activated;
struct {
// NR CGI
f1ap_plmn_t plmn;
plmn_id_t plmn;
uint64_t nr_cellid;
uint16_t cause;
} cells_failed_to_be_activated[F1AP_MAX_NB_CELLS];
@@ -257,7 +251,7 @@ typedef struct f1ap_gnb_cu_configuration_update_acknowledge_s {
struct {
uint32_t gNB_CU_ue_id;
// NR CGI
f1ap_plmn_t ue_plmn;
plmn_id_t ue_plmn;
uint64_t ue_nr_cellid;
} dedicatedSIDeliveryNeededUEs[F1AP_MAX_NO_UE_ID];
} f1ap_gnb_cu_configuration_update_acknowledge_t;
@@ -284,7 +278,7 @@ typedef struct f1ap_gnb_du_configuration_update_s {
/// int cells_to_modify
uint16_t num_cells_to_modify;
struct {
f1ap_plmn_t old_plmn;
plmn_id_t old_plmn;
uint64_t old_nr_cellid; // NR Global Cell Id
f1ap_served_cell_info_t info;
f1ap_gnb_du_system_info_t *sys_info;
@@ -294,7 +288,7 @@ typedef struct f1ap_gnb_du_configuration_update_s {
uint16_t num_cells_to_delete;
struct {
// NR CGI
f1ap_plmn_t plmn;
plmn_id_t plmn;
uint64_t nr_cellid; // NR Global Cell Id
} cell_to_delete[F1AP_MAX_NB_CELLS];
/// gNB-DU unique ID, at least within a gNB-CU (0 .. 2^36 - 1)
@@ -334,7 +328,7 @@ typedef struct f1ap_dl_rrc_message_s {
typedef struct f1ap_initial_ul_rrc_message_s {
uint32_t gNB_DU_ue_id;
f1ap_plmn_t plmn;
plmn_id_t plmn;
/// nr cell id
uint64_t nr_cellid;
/// crnti
@@ -476,7 +470,7 @@ typedef struct f1ap_ue_context_setup_s {
uint32_t gNB_CU_ue_id;
uint32_t gNB_DU_ue_id;
// SpCell Info
f1ap_plmn_t plmn;
plmn_id_t plmn;
uint64_t nr_cellid;
uint8_t servCellIndex;
uint8_t *cellULConfigured;
@@ -550,7 +544,7 @@ typedef struct f1ap_paging_ind_s {
uint16_t ueidentityindexvalue;
uint64_t fiveg_s_tmsi;
uint8_t fiveg_s_tmsi_length;
f1ap_plmn_t plmn;
plmn_id_t plmn;
uint64_t nr_cellid;
uint8_t paging_drx;
} f1ap_paging_ind_t;
+1 -3
View File
@@ -435,9 +435,7 @@ typedef enum ngap_paging_ind_present_s {
} ngap_paging_ind_present_t;
typedef struct {
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
plmn_id_t plmn;
uint16_t num_nssai;
nssai_t s_nssai[8];
} ngap_plmn_t;