Commit 7340b5e0 authored by Frédéric Leroy's avatar Frédéric Leroy

UE/EMM: move _plmn_list to nas_user_t

parent 2d7f557a
Branches unavailable
2024.w06 2024.w05 2024.w04 2024.w03 2024.w02 2024.w01 2023.w51 2023.w50 2023.w49 2023.w48 2023.w47 2023.w45 2023.w43 2023.w42 2023.w41 2023.w40 2023.w39 2023.w38 2023.w37 2023.w36 2023.w34 2023.w33 2023.w32 2023.w31 2023.w30 2023.w29 2023.w28 2023.w27 2023.w26 2023.w25 2023.w24 2023.w23 2023.w22 2023.w21 2023.w20 2023.w19 2023.w18 2023.w18b 2023.w16 2023.w15 2023.w14 2023.w13 2023.w12 2023.w11 2023.w11b 2023.w10 2023.w10b 2023.w09 2023.w08 2023.w08b 2023.w07 2023.w06 2023.w05 2023.w03 2023.w02 2022.42 2022.41 2022.w51 2022.w50 2022.w49 2022.w48 2022.w47 2022.w46 2022.w45 2022.w43 2022.w42 2022.w42b 2022.w41 2022.w40 2022.w39 2022.w38 2022.w37 2022.w37b 2022.w36 2022.w35 2022.w33 2022.w32 2022.w31 2022.w31b 2022.w30 2022.w29 2022.w26 2022.w25 2022.w24 2022.w24b 2022.w23 2022.w22 2022.w21 2022.w20 2022.w19 2022.w18 2022.w17 2022.w15 2022.w15b 2022.w14a 2022.w13 2022.w13b 2022.w13a 2022.w12 2022.w10 2022.w09 2022.w09b 2022.w08 2022.w08b 2022.w07 2022.w07b 2022.w06 2022.w06a 2022.w05 2022.w05b 2022.w03_hotfix 2022.w03_b 2022.w02 2022.w01 2021.wk46 2021.wk14_a 2021.wk13_d 2021.wk13_c 2021.w51_c 2021.w51_a 2021.w50_a 2021.w49_b 2021.w49_a 2021.w48 2021.w47 2021.w46 2021.w46-powder 2021.w45 2021.w45_b 2021.w44 2021.w43 2021.w42 2021.w37 2021.w36 2021.w35 2021.w34 2021.w33 2021.w32 2021.w31 2021.w30 2021.w29 2021.w28 2021.w27 2021.w26 2021.w25 2021.w24 2021.w23 2021.w22 2021.w20 2021.w19 2021.w18_b 2021.w18_a 2021.w17_b 2021.w16 2021.w15 2021.w14 2021.w13_a 2021.w12 2021.w11 2021.w10 2021.w09 2021.w08 2021.w06 2021.w05 2021.w04 2021.w02 2020.w51_2 2020.w51 2020.w50 2020.w49 2020.w48_2 2020.w48 2020.w47 2020.w46_2 2020.w46 2020.w45_2 2020.w45 2020.w44 2020.w42_2 2020.w42 2020.w41 2020.w39 2020.w38 2020.w37 2020.w36 2020.w34 2020.w33 2020.w31 2020.w30 2020.w29 2020.w28 2020.w26 2020.w25 2020.w24 2020.w23 2020.w22 2020.w19 2020.w17 2020.w16 2020.w15 2020.w11 2020.w09 2020.w06 2020.w05 2020.w04 2020.w03 2019.w51 2019.w44 2019.w41 2019.w36 2019.w30 2019.w28 2019.w27 2019.w25 2019.w23 2019.w21 2019.w17 2019.w15 2019.w13 2019.w11 2019.w10 2019.w09 2019.w08 2019.w07 2019.w06 2019.w04 2019.w03 2018.w51 2018.w48 2018.w47 2018.w46 2018.w44 2018.w41 2018.w40 2018.w39 2018.w36 2018.w33 2018.w31 2018.w29 2018.w25 2018.w19 2018.w15 2018.w12 2018.w11 2018.w10 2018.w09 2018.w08 2018.w07 2018.w06 2018.w05 2018.w04 2018.w03 2018.w02 2017.w48 2017.w46 2017.w43 2017.w42 2017.w34 2017.w30 2017.w25 2017.w24 2017.w22 2017.w20 2017.w19 2017.w15 2017.w14 2017.w13 2017.w12 2017.w11 2017.w10 2017.w09 2017.w08 2017.w07 v2.1.0 v2.0.0 v1.2.2 v1.2.1 v1.2.0 v1.1.1 v1.1.0 v1.0.3 v1.0.2 v1.0.1 v1.0.0 v0.6.1 v0.6.1_tdd v0.6 setparam osa-etsi-ws-ue osa-etsi-ws-try2 osa-etsi-ws-try1 osa-etsi-ws-gNB oai_nr_sync nr-ip-over-lte nr-ip-over-lte-v.1.5 nr-ip-over-lte-v.1.4 nr-ip-over-lte-v.1.3 nr-ip-over-lte-v.1.2 nr-ip-over-lte-v.1.1 nr-ip-over-lte-v.1.0 flexran-eol develop-nr-pdcch develop-nr-2020w03 develop-nr-2020w02 develop-nr-2019w51 develop-nr-2019w50 develop-nr-2019w48 develop-nr-2019w47 develop-nr-2019w45 develop-nr-2019w43 develop-nr-2019w42 develop-nr-2019w40 develop-nr-2019w28 develop-nr-2019w23 benetel_phase_rotation benetel_gnb_rel_2.0 benetel_gnb_rel_1.0 benetel_enb_rel_2.0 benetel_enb_rel_1.0
No related merge requests found
This diff is collapsed.
...@@ -63,21 +63,21 @@ typedef int (*IdleMode_callback_t) (emm_data_t *emm_data, int); ...@@ -63,21 +63,21 @@ typedef int (*IdleMode_callback_t) (emm_data_t *emm_data, int);
void IdleMode_initialize(nas_user_t *user, IdleMode_callback_t cb); void IdleMode_initialize(nas_user_t *user, IdleMode_callback_t cb);
int IdleMode_get_nb_plmns(void); int IdleMode_get_nb_plmns(emm_plmn_list_t *emm_plmn_list);
int IdleMode_get_hplmn_index(void); int IdleMode_get_hplmn_index(emm_plmn_list_t *emm_plmn_list);
int IdleMode_get_rplmn_index(void); int IdleMode_get_rplmn_index(emm_plmn_list_t *emm_plmn_list);
int IdleMode_get_splmn_index(void); int IdleMode_get_splmn_index(emm_plmn_list_t *emm_plmn_list);
int IdleMode_update_plmn_list(emm_data_t *emm_data, int i); int IdleMode_update_plmn_list(emm_plmn_list_t *emm_plmn_list, emm_data_t *emm_data, int i);
const char *IdleMode_get_plmn_fullname(const plmn_t *plmn, int index, const char *IdleMode_get_plmn_fullname(emm_plmn_list_t *emm_plmn_list, const plmn_t *plmn, int index,
size_t *len); size_t *len);
const char *IdleMode_get_plmn_shortname(const plmn_t *plmn, int index, const char *IdleMode_get_plmn_shortname(emm_plmn_list_t *emm_plmn_list, const plmn_t *plmn, int index,
size_t *len); size_t *len);
const char *IdleMode_get_plmn_id(const plmn_t *plmn, int index, size_t *len); const char *IdleMode_get_plmn_id(emm_plmn_list_t *emm_plmn_list, const plmn_t *plmn, int index, size_t *len);
int IdleMode_get_plmn_fullname_index(const char *plmn); int IdleMode_get_plmn_fullname_index(emm_plmn_list_t *emm_plmn_list, const char *plmn);
int IdleMode_get_plmn_shortname_index(const char *plmn); int IdleMode_get_plmn_shortname_index(emm_plmn_list_t *emm_plmn_list, const char *plmn);
int IdleMode_get_plmn_id_index(const char *plmn); int IdleMode_get_plmn_id_index(emm_plmn_list_t *emm_plmn_list, const char *plmn);
#endif /* __IDLEMODE_H__*/ #endif /* __IDLEMODE_H__*/
#ifndef _IDLEMODE_DEFS_H
#define _IDLEMODE_DEFS_H
/*
* A list of PLMN identities in priority order is maintained locally
* to perform the PLMN selection procedure.
*
* In automatic mode of operation, this list is used for PLMN selection when
* the UE is switched on, or upon recovery from lack of coverage, or when the
* user requests the UE to initiate PLMN reselection, and registration.
* In manual mode of operation, this list is displayed to the user that may
* select an available PLMN and initiate registration.
*
* The list may contain PLMN identifiers in the following order:
* - The last registered PLMN or each equivalent PLMN present in the list of
* "equivalent PLMNs" (EPLMN_MAX), when UE is switched on or following
* recovery from lack of coverage;
* - The highest priority PLMN in the list of "equivalent HPLMNs" or the
* HPLMN derived from the IMSI (1)
* - Each PLMN/access technology combination in the "User Controlled PLMN
* Selector with Access Technology" (PLMN_MAX)
* - Each PLMN/access technology combination in the "Operator Controlled PLMN
* Selector with Access Technology" (OPLMN_MAX)
* - Other PLMN/access technology combinations with received high quality
* signal in random order (TODO)
* - Other PLMN/access technology combinations in order of decreasing signal
* quality (TODO)
* - The last selected PLMN again (1)
*/
typedef struct {
int n_plmns;
#define EMM_PLMN_LIST_SIZE (EMM_DATA_EPLMN_MAX + EMM_DATA_PLMN_MAX + \
EMM_DATA_OPLMN_MAX + 2)
plmn_t *plmn[EMM_PLMN_LIST_SIZE];
int index; /* Index of the PLMN for which selection is ongoing */
int hplmn; /* Index of the home PLMN or the highest priority
* equivalent home PLMN */
int fplmn; /* Index of the first forbidden PLMN */
int splmn; /* Index of the currently selected PLMN */
int rplmn; /* Index of the currently registered PLMN */
struct plmn_param_t {
char fullname[NET_FORMAT_LONG_SIZE+1]; /* PLMN full identifier */
char shortname[NET_FORMAT_SHORT_SIZE+1]; /* PLMN short identifier */
char num[NET_FORMAT_NUM_SIZE+1]; /* PLMN numeric identifier */
int stat; /* Indication of the PLMN availability */
int tac; /* Location/Tracking Area Code */
int ci; /* Serving cell identifier */
int rat; /* Radio Access Technology supported by the serving cell */
} param[EMM_PLMN_LIST_SIZE];
} emm_plmn_list_t;
#endif
...@@ -63,10 +63,10 @@ static int _emm_main_get_imei(imei_t *imei, const char *imei_str); ...@@ -63,10 +63,10 @@ static int _emm_main_get_imei(imei_t *imei, const char *imei_str);
static int _emm_main_imsi_cmp(imsi_t *imsi1, imsi_t *imsi2); static int _emm_main_imsi_cmp(imsi_t *imsi1, imsi_t *imsi2);
static const char *_emm_main_get_plmn(const plmn_t *plmn, int index, static const char *_emm_main_get_plmn(emm_plmn_list_t *emm_plmn_list, const plmn_t *plmn, int index,
int format, size_t *size); int format, size_t *size);
static int _emm_main_get_plmn_index(const char *plmn, int format); static int _emm_main_get_plmn_index(emm_plmn_list_t *emm_plmn_list, const char *plmn, int format);
/* /*
* USIM application data * USIM application data
...@@ -538,12 +538,14 @@ const msisdn_t *emm_main_get_msisdn(void) ...@@ -538,12 +538,14 @@ const msisdn_t *emm_main_get_msisdn(void)
** Others: user->emm_data-> ** ** Others: user->emm_data-> **
** ** ** **
***************************************************************************/ ***************************************************************************/
int emm_main_set_plmn_selection_mode(emm_data_t *emm_data, int mode, int format, int emm_main_set_plmn_selection_mode(nas_user_t *user, int mode, int format,
const network_plmn_t *plmn, int rat) const network_plmn_t *plmn, int rat)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
int index; int index;
emm_data_t *emm_data = user->emm_data;
emm_plmn_list_t *emm_plmn_list = user->emm_plmn_list;
LOG_TRACE(INFO, "EMM-MAIN - PLMN selection: mode=%d, format=%d, plmn=%s, " LOG_TRACE(INFO, "EMM-MAIN - PLMN selection: mode=%d, format=%d, plmn=%s, "
"rat=%d", mode, format, (const char *)&plmn->id, rat); "rat=%d", mode, format, (const char *)&plmn->id, rat);
...@@ -552,7 +554,7 @@ int emm_main_set_plmn_selection_mode(emm_data_t *emm_data, int mode, int format, ...@@ -552,7 +554,7 @@ int emm_main_set_plmn_selection_mode(emm_data_t *emm_data, int mode, int format,
if (mode != EMM_DATA_PLMN_AUTO) { if (mode != EMM_DATA_PLMN_AUTO) {
/* Get the index of the PLMN in the list of available PLMNs */ /* Get the index of the PLMN in the list of available PLMNs */
index = _emm_main_get_plmn_index((const char *)&plmn->id, format); index = _emm_main_get_plmn_index(emm_plmn_list, (const char *)&plmn->id, format);
if (index < 0) { if (index < 0) {
LOG_TRACE(WARNING, "EMM-MAIN - PLMN %s not available", LOG_TRACE(WARNING, "EMM-MAIN - PLMN %s not available",
...@@ -568,7 +570,7 @@ int emm_main_set_plmn_selection_mode(emm_data_t *emm_data, int mode, int format, ...@@ -568,7 +570,7 @@ int emm_main_set_plmn_selection_mode(emm_data_t *emm_data, int mode, int format,
* register to when switched on; the equivalent PLMNs list shall not be * register to when switched on; the equivalent PLMNs list shall not be
* applied to the user reselection in Automatic Network Selection Mode. * applied to the user reselection in Automatic Network Selection Mode.
*/ */
index = IdleMode_get_hplmn_index(); index = IdleMode_get_hplmn_index(emm_plmn_list);
} }
LOG_FUNC_RETURN (index); LOG_FUNC_RETURN (index);
...@@ -609,11 +611,11 @@ int emm_main_get_plmn_selection_mode(emm_data_t *emm_data) ...@@ -609,11 +611,11 @@ int emm_main_get_plmn_selection_mode(emm_data_t *emm_data)
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
int emm_main_get_plmn_list(emm_data_t *emm_data, const char **plist) int emm_main_get_plmn_list(emm_plmn_list_t *emm_plmn_list, emm_data_t *emm_data, const char **plist)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
int size = IdleMode_update_plmn_list(emm_data, 0); int size = IdleMode_update_plmn_list(emm_plmn_list, emm_data, 0);
*plist = emm_data->plist.buffer; *plist = emm_data->plist.buffer;
LOG_FUNC_RETURN (size); LOG_FUNC_RETURN (size);
...@@ -635,7 +637,7 @@ int emm_main_get_plmn_list(emm_data_t *emm_data, const char **plist) ...@@ -635,7 +637,7 @@ int emm_main_get_plmn_list(emm_data_t *emm_data, const char **plist)
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
const char *emm_main_get_selected_plmn(emm_data_t *emm_data, network_plmn_t *plmn, int format) const char *emm_main_get_selected_plmn(emm_plmn_list_t *emm_plmn_list, emm_data_t *emm_data, network_plmn_t *plmn, int format)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
...@@ -643,10 +645,10 @@ const char *emm_main_get_selected_plmn(emm_data_t *emm_data, network_plmn_t *plm ...@@ -643,10 +645,10 @@ const char *emm_main_get_selected_plmn(emm_data_t *emm_data, network_plmn_t *plm
/* /*
* Get the identifier of the selected PLMN in the list of available PLMNs * Get the identifier of the selected PLMN in the list of available PLMNs
*/ */
int index = IdleMode_get_splmn_index(); int index = IdleMode_get_splmn_index(emm_plmn_list);
if ( !(index < 0) ) { if ( !(index < 0) ) {
const char *name = _emm_main_get_plmn(&emm_data->splmn, index, const char *name = _emm_main_get_plmn(emm_plmn_list, &emm_data->splmn, index,
format, &size); format, &size);
if (size > 0) { if (size > 0) {
...@@ -673,7 +675,7 @@ const char *emm_main_get_selected_plmn(emm_data_t *emm_data, network_plmn_t *plm ...@@ -673,7 +675,7 @@ const char *emm_main_get_selected_plmn(emm_data_t *emm_data, network_plmn_t *plm
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
const char *emm_main_get_registered_plmn(emm_data_t *emm_data, network_plmn_t *plmn, int format) const char *emm_main_get_registered_plmn(emm_plmn_list_t *emm_plmn_list, emm_data_t *emm_data, network_plmn_t *plmn, int format)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
...@@ -682,10 +684,10 @@ const char *emm_main_get_registered_plmn(emm_data_t *emm_data, network_plmn_t *p ...@@ -682,10 +684,10 @@ const char *emm_main_get_registered_plmn(emm_data_t *emm_data, network_plmn_t *p
/* /*
* Get the identifier of the registered PLMN in the list of available PLMNs * Get the identifier of the registered PLMN in the list of available PLMNs
*/ */
int index = IdleMode_get_rplmn_index(); int index = IdleMode_get_rplmn_index(emm_plmn_list);
if ( !(index < 0) ) { if ( !(index < 0) ) {
const char *name = _emm_main_get_plmn(&emm_data->nvdata.rplmn, const char *name = _emm_main_get_plmn(emm_plmn_list, &emm_data->nvdata.rplmn,
index, format, &size); index, format, &size);
if (size > 0) { if (size > 0) {
...@@ -952,24 +954,24 @@ static int _emm_main_imsi_cmp(imsi_t *imsi1, imsi_t *imsi2) ...@@ -952,24 +954,24 @@ static int _emm_main_imsi_cmp(imsi_t *imsi1, imsi_t *imsi2)
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
static const char *_emm_main_get_plmn(const plmn_t *plmn, int index, static const char *_emm_main_get_plmn(emm_plmn_list_t *emm_plmn_list, const plmn_t *plmn, int index,
int format, size_t *size) int format, size_t *size)
{ {
if ( PLMN_IS_VALID(*plmn) ) { if ( PLMN_IS_VALID(*plmn) ) {
switch (format) { switch (format) {
case NET_FORMAT_LONG: case NET_FORMAT_LONG:
/* Get the long alpha-numeric representation of the PLMN */ /* Get the long alpha-numeric representation of the PLMN */
return IdleMode_get_plmn_fullname(plmn, index, size); return IdleMode_get_plmn_fullname(emm_plmn_list, plmn, index, size);
break; break;
case NET_FORMAT_SHORT: case NET_FORMAT_SHORT:
/* Get the short alpha-numeric representation of the PLMN */ /* Get the short alpha-numeric representation of the PLMN */
return IdleMode_get_plmn_shortname(plmn, index, size); return IdleMode_get_plmn_shortname(emm_plmn_list, plmn, index, size);
break; break;
case NET_FORMAT_NUM: case NET_FORMAT_NUM:
/* Get the numeric representation of the PLMN */ /* Get the numeric representation of the PLMN */
return IdleMode_get_plmn_id(plmn, index, size); return IdleMode_get_plmn_id(emm_plmn_list, plmn, index, size);
break; break;
default: default:
...@@ -1002,24 +1004,24 @@ static const char *_emm_main_get_plmn(const plmn_t *plmn, int index, ...@@ -1002,24 +1004,24 @@ static const char *_emm_main_get_plmn(const plmn_t *plmn, int index,
** Others: None ** ** Others: None **
** ** ** **
***************************************************************************/ ***************************************************************************/
static int _emm_main_get_plmn_index(const char *plmn, int format) static int _emm_main_get_plmn_index(emm_plmn_list_t *emm_plmn_list, const char *plmn, int format)
{ {
int index = -1; int index = -1;
switch (format) { switch (format) {
case NET_FORMAT_LONG: case NET_FORMAT_LONG:
/* Get the index of the long alpha-numeric PLMN identifier */ /* Get the index of the long alpha-numeric PLMN identifier */
index = IdleMode_get_plmn_fullname_index(plmn); index = IdleMode_get_plmn_fullname_index(emm_plmn_list, plmn);
break; break;
case NET_FORMAT_SHORT: case NET_FORMAT_SHORT:
/* Get the index of the short alpha-numeric PLMN identifier */ /* Get the index of the short alpha-numeric PLMN identifier */
index = IdleMode_get_plmn_shortname_index(plmn); index = IdleMode_get_plmn_shortname_index(emm_plmn_list, plmn);
break; break;
case NET_FORMAT_NUM: case NET_FORMAT_NUM:
/* Get the index of the numeric PLMN identifier */ /* Get the index of the numeric PLMN identifier */
index = IdleMode_get_plmn_id_index(plmn); index = IdleMode_get_plmn_id_index(emm_plmn_list, plmn);
break; break;
default: default:
......
...@@ -80,18 +80,18 @@ const imsi_t *emm_main_get_imsi(emm_data_t *emm_data); ...@@ -80,18 +80,18 @@ const imsi_t *emm_main_get_imsi(emm_data_t *emm_data);
const msisdn_t *emm_main_get_msisdn(void); const msisdn_t *emm_main_get_msisdn(void);
/* User's getter/setter for network selection */ /* User's getter/setter for network selection */
int emm_main_set_plmn_selection_mode(emm_data_t *emm_data, int mode, int format, int emm_main_set_plmn_selection_mode(nas_user_t *user, int mode, int format,
const network_plmn_t *plmn, int rat); const network_plmn_t *plmn, int rat);
int emm_main_get_plmn_selection_mode(emm_data_t *emm_data); int emm_main_get_plmn_selection_mode(emm_data_t *emm_data);
int emm_main_get_plmn_list(emm_data_t *emm_data, const char **plist); int emm_main_get_plmn_list(emm_plmn_list_t *emm_plmn_list, emm_data_t *emm_data, const char **plist);
const char *emm_main_get_selected_plmn(emm_data_t *emm_data, network_plmn_t *plmn, int format); const char *emm_main_get_selected_plmn(emm_plmn_list_t *emm_plmn_list, emm_data_t *emm_data, network_plmn_t *plmn, int format);
/* User's getter for network registration */ /* User's getter for network registration */
Stat_t emm_main_get_plmn_status(emm_data_t *emm_data); Stat_t emm_main_get_plmn_status(emm_data_t *emm_data);
tac_t emm_main_get_plmn_tac(emm_data_t *emm_data); tac_t emm_main_get_plmn_tac(emm_data_t *emm_data);
ci_t emm_main_get_plmn_ci(emm_data_t *emm_data); ci_t emm_main_get_plmn_ci(emm_data_t *emm_data);
AcT_t emm_main_get_plmn_rat(emm_data_t *emm_data); AcT_t emm_main_get_plmn_rat(emm_data_t *emm_data);
const char *emm_main_get_registered_plmn(emm_data_t *emm_data, network_plmn_t *plmn, int format); const char *emm_main_get_registered_plmn(emm_plmn_list_t *emm_plmn_list, emm_data_t *emm_data, network_plmn_t *plmn, int format);
/* User's getter for network attachment */ /* User's getter for network attachment */
int emm_main_is_attached(emm_data_t *emm_data); int emm_main_is_attached(emm_data_t *emm_data);
......
...@@ -185,6 +185,6 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi, in ...@@ -185,6 +185,6 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi, in
*/ */
int emm_proc_registration_notify(emm_data_t *emm_data, Stat_t status); int emm_proc_registration_notify(emm_data_t *emm_data, Stat_t status);
int emm_proc_location_notify(emm_data_t *emm_data, tac_t tac, ci_t ci, AcT_t rat); int emm_proc_location_notify(emm_data_t *emm_data, tac_t tac, ci_t ci, AcT_t rat);
int emm_proc_network_notify(emm_data_t *emm_data, int index); int emm_proc_network_notify(emm_plmn_list_t *emm_plmn_list, emm_data_t *emm_data, int index);
#endif /* __EMM_PROC_H__*/ #endif /* __EMM_PROC_H__*/
...@@ -386,7 +386,7 @@ int nas_proc_register(nas_user_t *user, int mode, int format, const network_plmn ...@@ -386,7 +386,7 @@ int nas_proc_register(nas_user_t *user, int mode, int format, const network_plmn
/* /*
* Set the PLMN selection mode of operation * Set the PLMN selection mode of operation
*/ */
int index = emm_main_set_plmn_selection_mode(user->emm_data, mode, format, oper, AcT); int index = emm_main_set_plmn_selection_mode(user, mode, format, oper, AcT);
if ( !(index < 0) ) { if ( !(index < 0) ) {
/* /*
...@@ -455,7 +455,7 @@ int nas_proc_get_reg_data(nas_user_t *user, int *mode, int *selected, int format ...@@ -455,7 +455,7 @@ int nas_proc_get_reg_data(nas_user_t *user, int *mode, int *selected, int format
*mode = emm_main_get_plmn_selection_mode(user->emm_data); *mode = emm_main_get_plmn_selection_mode(user->emm_data);
/* Get the currently selected operator */ /* Get the currently selected operator */
const char *oper_name = emm_main_get_selected_plmn(user->emm_data, oper, format); const char *oper_name = emm_main_get_selected_plmn(user->emm_plmn_list, user->emm_data, oper, format);
if (oper_name != NULL) { if (oper_name != NULL) {
/* An operator is currently selected */ /* An operator is currently selected */
...@@ -489,7 +489,7 @@ int nas_proc_get_oper_list(nas_user_t *user, const char **oper_list) ...@@ -489,7 +489,7 @@ int nas_proc_get_oper_list(nas_user_t *user, const char **oper_list)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
int size = emm_main_get_plmn_list(user->emm_data, oper_list); int size = emm_main_get_plmn_list(user->emm_plmn_list, user->emm_data, oper_list);
LOG_FUNC_RETURN (size); LOG_FUNC_RETURN (size);
} }
......
...@@ -50,6 +50,7 @@ Description NAS type definition to manage a user equipment ...@@ -50,6 +50,7 @@ Description NAS type definition to manage a user equipment
#include "esm_pt_defs.h" #include "esm_pt_defs.h"
#include "EMM/emm_fsm_defs.h" #include "EMM/emm_fsm_defs.h"
#include "EMM/emmData.h" #include "EMM/emmData.h"
#include "EMM/IdleMode_defs.h"
typedef struct { typedef struct {
int fd; int fd;
...@@ -59,6 +60,7 @@ typedef struct { ...@@ -59,6 +60,7 @@ typedef struct {
esm_ebr_data_t *esm_ebr_data; // EPS bearer contexts esm_ebr_data_t *esm_ebr_data; // EPS bearer contexts
emm_fsm_state_t emm_fsm_status; // Current EPS Mobility Management status emm_fsm_state_t emm_fsm_status; // Current EPS Mobility Management status
emm_data_t *emm_data; // EPS mobility management data emm_data_t *emm_data; // EPS mobility management data
emm_plmn_list_t *emm_plmn_list; // list of PLMN identities
} nas_user_t; } nas_user_t;
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment