Merge branch 'episys/master' into episys-merge

Conflicts:
	common/utils/LOG/log.h
	common/utils/ocp_itti/intertask_interface.cpp
	nfapi/oai_integration/nfapi_vnf.c
	nfapi/open-nFAPI/nfapi/src/nfapi.c
	openair2/LAYER2/MAC/main_ue.c
	openair2/LAYER2/PDCP_v10.1.0/pdcp.c
	openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
	openair2/PHY_INTERFACE/phy_stub_UE.c
	openair2/RRC/LTE/rrc_UE.c
	openair2/RRC/LTE/rrc_eNB.c
	openair3/NAS/UE/ESM/esm_ebr_context.c
	targets/COMMON/openairinterface5g_limits.h
	targets/RT/USER/lte-softmodem.c
	targets/RT/USER/lte-uesoftmodem.c
This commit is contained in:
Raymond Knopp
2021-02-13 22:52:33 +01:00
65 changed files with 3640 additions and 726 deletions
+6 -2
View File
@@ -249,7 +249,9 @@ int usim_api_authenticate_test(usim_data_t *usim_data,
LOG_TRACE(INFO,
"USIM-API - Comparing the XMAC with the MAC included in AUTN Succeeded");
/* Verify that the received sequence number SQN is in the correct range */
rc = _usim_api_check_sqn(*(uint32_t*)(sqn), sqn[USIM_API_SQN_SIZE - 1]);
uint32_t v;
memcpy(&v, sqn, sizeof(v));
rc = _usim_api_check_sqn(v, sqn[USIM_API_SQN_SIZE - 1]);
}
@@ -392,7 +394,9 @@ int usim_api_authenticate(usim_data_t *usim_data, const OctetString* rand_pP, co
LOG_TRACE(INFO,
"USIM-API - Comparing the XMAC with the MAC included in AUTN Succeeded");
/* Verify that the received sequence number SQN is in the correct range */
rc = _usim_api_check_sqn(*(uint32_t*)(sqn), sqn[USIM_API_SQN_SIZE - 1]);
uint32_t v;
memcpy(&v, sqn, sizeof(v));
rc = _usim_api_check_sqn(v, sqn[USIM_API_SQN_SIZE - 1]);
}
+1 -1
View File
@@ -356,7 +356,7 @@ int esm_proc_pdn_connectivity_accept(nas_user_t *user, int pti, esm_proc_pdn_typ
int pid = RETURNerror;
char apn_first_char[4];
LOG_VAR(char, str[128]);
char str[128] __attribute__((unused));
if (isprint(apn->value[0])) {
apn_first_char[0] = '\0';
+78 -30
View File
@@ -24,7 +24,7 @@
# include "intertask_interface.h"
# include "nas_ue_task.h"
# include "common/utils/LOG/log.h"
# include "vendor_ext.h"
# include "user_defs.h"
# include "user_api.h"
# include "nas_parser.h"
@@ -95,41 +95,89 @@ void *nas_ue_task(void *args_p)
itti_mark_task_ready (TASK_NAS_UE);
MSC_START_USE();
LOG_I(NAS, "ue_idx_standalone val:: %u\n", ue_idx_standalone);
/* Initialize UE NAS (EURECOM-NAS) */
for (int i=0; i < users->count; i++)
// Intead of for loop for standalone mode
if (ue_idx_standalone == 0xFFFF)
{
nas_user_t *user = &users->item[i];
user->ueid=i;
for (int i = 0; i < users->count; i++)
{
nas_user_t *user = &users->item[i];
user->ueid = i;
/* Get USIM data application filename */
user->usim_data_store = memory_get_path_from_ueid(USIM_API_NVRAM_DIRNAME, USIM_API_NVRAM_FILENAME, user->ueid);
if ( user->usim_data_store == NULL ) {
LOG_E(NAS, "[UE %d] - Failed to get USIM data application filename", user->ueid);
exit(EXIT_FAILURE);
/* Get USIM data application filename */
user->usim_data_store = memory_get_path_from_ueid(USIM_API_NVRAM_DIRNAME, USIM_API_NVRAM_FILENAME, user->ueid);
if (user->usim_data_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get USIM data application filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get UE's data pathname */
user->user_nvdata_store = memory_get_path_from_ueid(USER_NVRAM_DIRNAME, USER_NVRAM_FILENAME, user->ueid);
if (user->user_nvdata_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get USIM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get EMM data pathname */
user->emm_nvdata_store = memory_get_path_from_ueid(EMM_NVRAM_DIRNAME, EMM_NVRAM_FILENAME, user->ueid);
if (user->emm_nvdata_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get EMM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Initialize user interface (to exchange AT commands with user process) */
nas_user_api_id_initialize(user);
/* allocate needed structures */
user->user_at_commands = calloc_or_fail(sizeof(user_at_commands_t));
user->at_response = calloc_or_fail(sizeof(at_response_t));
user->lowerlayer_data = calloc_or_fail(sizeof(lowerlayer_data_t));
/* Initialize NAS user */
nas_user_initialize(user, &user_api_emm_callback, &user_api_esm_callback, FIRMWARE_VERSION);
}
}
else
{
// use new parameter passed into lte-uesoftmodem which instead of looping
// calls functions on specific UE index.
/* Get UE's data pathname */
user->user_nvdata_store = memory_get_path_from_ueid(USER_NVRAM_DIRNAME, USER_NVRAM_FILENAME, user->ueid);
if ( user->user_nvdata_store == NULL ) {
LOG_E(NAS, "[UE %d] - Failed to get USIM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
nas_user_t *user = &users->item[0];
user->ueid = ue_idx_standalone;
LOG_I(NAS, "[UE %d] Configuring\n", user->ueid);
/* Get EMM data pathname */
user->emm_nvdata_store = memory_get_path_from_ueid(EMM_NVRAM_DIRNAME, EMM_NVRAM_FILENAME, user->ueid);
if ( user->emm_nvdata_store == NULL ) {
LOG_E(NAS, "[UE %d] - Failed to get EMM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Initialize user interface (to exchange AT commands with user process) */
nas_user_api_id_initialize(user);
/* allocate needed structures */
user->user_at_commands = calloc_or_fail(sizeof(user_at_commands_t));
user->at_response = calloc_or_fail(sizeof(at_response_t));
user->lowerlayer_data = calloc_or_fail(sizeof(lowerlayer_data_t));
/* Initialize NAS user */
nas_user_initialize (user, &user_api_emm_callback, &user_api_esm_callback, FIRMWARE_VERSION);
/* Get USIM data application filename */ //
user->usim_data_store = memory_get_path_from_ueid(USIM_API_NVRAM_DIRNAME, USIM_API_NVRAM_FILENAME, user->ueid);
if (user->usim_data_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get USIM data application filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get UE's data pathname */
user->user_nvdata_store = memory_get_path_from_ueid(USER_NVRAM_DIRNAME, USER_NVRAM_FILENAME, user->ueid);
if (user->user_nvdata_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get USIM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get EMM data pathname */
user->emm_nvdata_store = memory_get_path_from_ueid(EMM_NVRAM_DIRNAME, EMM_NVRAM_FILENAME, user->ueid);
if (user->emm_nvdata_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get EMM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Initialize user interface (to exchange AT commands with user process) */
nas_user_api_id_initialize(user);
/* allocate needed structures */
user->user_at_commands = calloc_or_fail(sizeof(user_at_commands_t));
user->at_response = calloc_or_fail(sizeof(at_response_t));
user->lowerlayer_data = calloc_or_fail(sizeof(lowerlayer_data_t));
/* Initialize NAS user */
nas_user_initialize(user, &user_api_emm_callback, &user_api_esm_callback, FIRMWARE_VERSION);
user->ueid = 0;
}
/* Set UE activation state */