Commit bcf42ca2 authored by Javier Morgade's avatar Javier Morgade

Implemented M2AP managing procedures at eNB (ENB_APP)

	-M2 register against MCE (Multicast Control Entity)
	-Basic M2AP control procedures developed (eNB<-M2AP->MCE)

	ACKNOWLEDGEMENT:
 	1. This commit was developed at Vicomtech (https://www.vicomtech.org) under UE project CDN-X-ALL: "CDN edge-cloud computing for efficient cache and reliable streaming aCROSS Aggregated unicast-multicast LinkS"
 	2. Project funded by Fed4FIRE+ OC5 (https://www.fed4fire.eu)
Signed-off-by: default avatarJavier Morgade <javier.morgade@ieee.org>
parent f76cc824
......@@ -46,6 +46,8 @@
# include "x2ap_eNB.h"
# include "x2ap_messages_types.h"
# include "m2ap_eNB.h"
# include "m2ap_messages_types.h"
# define X2AP_ENB_REGISTER_RETRY_DELAY 10
#include "openair1/PHY/INIT/phy_init.h"
......@@ -58,8 +60,88 @@ extern RAN_CONTEXT_t RC;
#include "targets/RT/USER/lte-softmodem.h"
/*************************** ENB M2AP **************************/
//static uint32_t eNB_app_register_MBMS_STA(ngran_node_t node_type,uint32_t enb_id_start, uint32_t enb_id_end) {
// uint32_t enb_id;
// //MessageDef *msg_p;
// uint32_t register_enb_pending = 0;
//
// for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
// {
//
// //msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
// //RCconfig_S1(msg_p, enb_id);
//
// if (enb_id == 0) RCconfig_gtpu();
//
// //LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
//
// //LOG_I(ENB_APP,"[eNB %d] eNB_app_register via S1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
// //itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
//
// register_enb_pending++;
// }
// }
//
// return register_enb_pending;
//}
//*****end M2AP ****/
static uint32_t eNB_app_register_m2(uint32_t enb_id_start, uint32_t enb_id_end) {
uint32_t enb_id;
MessageDef *msg_p;
uint32_t register_enb_m2_pending = 0;
// msg_p = itti_alloc_new_message (TASK_ENB_APP,MESSAGE_TEST );
// itti_send_msg_to_task (TASK_M2AP_MCE, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
LOG_D(ENB_APP,"Register ...\n");
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
{
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_REGISTER_ENB_REQ);
RCconfig_M2(msg_p, enb_id);
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
register_enb_m2_pending++;
}
}
return register_enb_m2_pending;
}
/*************************** M2AP ENB handle **********************************/
static uint32_t eNB_app_handle_m2ap_mbms_scheduling_information(instance_t instance){
//uint32_t mce_id=0;
MessageDef *msg_p;
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_MBMS_SCHEDULING_INFORMATION_RESP);
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
return 0;
}
static uint32_t eNB_app_handle_m2ap_mbms_session_start_req(instance_t instance){
//uint32_t mce_id=0;
MessageDef *msg_p;
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_MBMS_SESSION_START_RESP);
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
return 0;
}
static uint32_t eNB_app_handle_m2ap_mbms_session_stop_req(instance_t instance){
//uint32_t mce_id=0;
MessageDef *msg_p;
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_MBMS_SESSION_STOP_RESP);
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
return 0;
}
static uint32_t eNB_app_handle_m2ap_mbms_session_update_req(instance_t instance){
//uint32_t mce_id=0;
MessageDef *msg_p;
msg_p = itti_alloc_new_message (TASK_ENB_APP, M2AP_MBMS_SESSION_UPDATE_RESP);
itti_send_msg_to_task (TASK_M2AP_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), msg_p);
return 0;
}
//// end M2AP ENB handle **********************************/
/*------------------------------------------------------------------------------*/
static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, uint32_t enb_id_end) {
......@@ -129,6 +211,9 @@ void *eNB_app_task(void *args_p) {
uint32_t x2_register_enb_pending = 0;
uint32_t x2_registered_enb = 0;
long x2_enb_register_retry_timer_id;
uint32_t m2_register_enb_pending = 0;
uint32_t m2_registered_enb = 0;
long m2_enb_register_retry_timer_id;
MessageDef *msg_p = NULL;
instance_t instance;
int result;
......@@ -147,6 +232,22 @@ void *eNB_app_task(void *args_p) {
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
}
/* Try to register each eNB with MCE each other */
if (is_m2ap_eNB_enabled() /*&& !NODE_IS_DU(RC.rrc[0]->node_type)*/) {
//eNB_app_register_MBMS_STA(RC.rrc[0]->node_type, enb_id_start, enb_id_end);
//m2_register_enb_pending = eNB_app_register_m2 (enb_id_start, enb_id_end);
if (timer_setup (5, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
NULL, &m2_enb_register_retry_timer_id) < 0) {
//LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
//sleep(ENB_REGISTER_RETRY_DELAY);
/* Restart the registration process */
//registered_enb = 0;
//register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);
}
}
do {
// Wait for a message
itti_receive_msg (TASK_ENB_APP, &msg_p);
......@@ -275,6 +376,12 @@ void *eNB_app_task(void *args_p) {
}
} /* if (EPC_MODE_ENABLED) */
if(TIMER_HAS_EXPIRED (msg_p).timer_id == m2_enb_register_retry_timer_id) {
LOG_I(ENB_APP, " Received %s: timer_id %ld M2 register\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
m2_register_enb_pending = eNB_app_register_m2 (enb_id_start, enb_id_end);
}
break;
case X2AP_DEREGISTERED_ENB_IND:
......@@ -319,6 +426,123 @@ void *eNB_app_task(void *args_p) {
break;
case M2AP_DEREGISTERED_ENB_IND:
LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
M2AP_DEREGISTERED_ENB_IND(msg_p).nb_m2);
/* TODO handle recovering of registration */
break;
case M2AP_REGISTER_ENB_CNF:
LOG_W(ENB_APP, "[eNB %d] Received %s: associated eNB %d\n", instance, ITTI_MSG_NAME (msg_p),
M2AP_REGISTER_ENB_CNF(msg_p).nb_m2);
DevAssert(m2_register_enb_pending > 0);
m2_register_enb_pending--;
/* Check if at least eNB is registered with one target eNB */
if (M2AP_REGISTER_ENB_CNF(msg_p).nb_m2 > 0) {
m2_registered_enb++;
}
/* Check if all register eNB requests have been processed */
if (m2_register_enb_pending == 0) {
if (m2_registered_enb == enb_nb) {
/* If all eNB are registered, start RRC HO task */
} else {
uint32_t m2_not_associated = enb_nb - m2_registered_enb;
LOG_W(ENB_APP, " %d eNB %s not associated with the target\n",
m2_not_associated, m2_not_associated > 1 ? "are" : "is");
// timer to retry
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
//if (timer_setup (X2AP_ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP,
// INSTANCE_DEFAULT, TIMER_ONE_SHOT, NULL,
// &x2_enb_register_retry_timer_id) < 0) {
// LOG_E(ENB_APP, " Can not start eNB X2AP register: retry timer, use \"sleep\" instead!\n");
// sleep(X2AP_ENB_REGISTER_RETRY_DELAY);
// /* Restart the registration process */
// x2_registered_enb = 0;
// x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
//}
}
}
break;
case M2AP_SETUP_RESP:
LOG_I(ENB_APP,"M2AP_SETUP_RESP RESPONSE received\n");
// AssertFatal(NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received F1AP_REGISTER_ENB_CNF in CU/eNB\n");
// LOG_I(ENB_APP, "Received %s: associated ngran_eNB_CU %s with %d cells to activate\n", ITTI_MSG_NAME (msg_p),
// F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
//
// handle_f1ap_setup_resp(&F1AP_SETUP_RESP(msg_p));
// DevAssert(register_enb_pending > 0);
// register_enb_pending--;
// /* Check if at least eNB is registered with one MME */
// if (F1AP_SETUP_RESP(msg_p).num_cells_to_activate > 0) {
// registered_enb++;
// }
// /* Check if all register eNB requests have been processed */
// if (register_enb_pending == 0) {
// if (registered_enb == enb_nb) {
// /* If all eNB cells are registered, start L2L1 task */
// MessageDef *msg_init_p;
// msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
// itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
// } else {
// LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
// enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
// /* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
// if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
// NULL, &enb_register_retry_timer_id) < 0) {
// LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
// sleep(ENB_REGISTER_RETRY_DELAY);
// /* Restart the registration process */
// registered_enb = 0;
// register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);//, enb_properties_p);
// }
// }
// }
break;
case M2AP_MBMS_SCHEDULING_INFORMATION:
LOG_I(ENB_APP,"M2AP_SCHEDULING_INFORMATION received\n");
eNB_app_handle_m2ap_mbms_scheduling_information(ITTI_MESSAGE_GET_INSTANCE(msg_p));
break;
case M2AP_MBMS_SESSION_START_REQ:
LOG_I(ENB_APP,"M2AP_MBMS_SESSION_START_REQ received\n");
eNB_app_handle_m2ap_mbms_session_start_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
break;
case M2AP_MBMS_SESSION_STOP_REQ:
LOG_I(ENB_APP,"M2AP_MBMS_SESSION_STOP_REQ received\n");
eNB_app_handle_m2ap_mbms_session_stop_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
break;
case M2AP_RESET:
LOG_I(ENB_APP,"M2AP_RESET received\n");
break;
case M2AP_ENB_CONFIGURATION_UPDATE_ACK:
LOG_I(ENB_APP,"M2AP_ENB_CONFIGURATION_UPDATE_ACK received\n");
break;
case M2AP_ENB_CONFIGURATION_UPDATE_FAILURE:
LOG_I(ENB_APP,"M2AP_ENB_CONFIGURATION_UPDATE_FAILURE received\n");
break;
case M2AP_ERROR_INDICATION:
LOG_I(ENB_APP,"M2AP_MBMS_SESSION_UPDATE_REQ\n");
eNB_app_handle_m2ap_mbms_session_update_req(ITTI_MESSAGE_GET_INSTANCE(msg_p));
break;
case M2AP_MBMS_SERVICE_COUNTING_REQ:
LOG_I(ENB_APP,"M2AP_MBMS_SERVICE_COUNTING_REQ\n");
break;
case M2AP_MCE_CONFIGURATION_UPDATE:
LOG_I(ENB_APP,"M2AP_MCE_CONFIGURATION_UPDATE\n");
break;
default:
LOG_E(ENB_APP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
break;
......
......@@ -435,6 +435,14 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
else
RRC_CONFIGURATION_REQ (msg_p).enable_x2 = 0;
/* m2 enabled */
if (ENBParamList.paramarray[i][ENB_ENABLE_ENB_M2].strptr != NULL &&
*(ENBParamList.paramarray[i][ENB_ENABLE_ENB_M2].strptr) != NULL &&
!strcmp(*(ENBParamList.paramarray[i][ENB_ENABLE_ENB_M2].strptr), "yes"))
RRC_CONFIGURATION_REQ (msg_p).eMBMS_M2_configured = 1;
else
RRC_CONFIGURATION_REQ (msg_p).eMBMS_M2_configured = 0;
// Parse optional physical parameters
config_getlist( &CCsParamList,NULL,0,enbpath);
LOG_I(RRC,"num component carriers %d \n",CCsParamList.numelt);
......@@ -2144,6 +2152,266 @@ int RCconfig_gtpu(void ) {
return 0;
}
int RCconfig_M2(MessageDef *msg_p, uint32_t i) {
int I, J, j, k, l;
int enb_id;
char *address = NULL;
char *cidr = NULL;
ccparams_lte_t ccparams_lte;
memset((void *)&ccparams_lte,0,sizeof(ccparams_lte_t));
paramdef_t ENBSParams[] = ENBSPARAMS_DESC;
paramdef_t ENBParams[] = ENBPARAMS_DESC;
paramlist_def_t ENBParamList = {ENB_CONFIG_STRING_ENB_LIST,NULL,0};
/* get global parameters, defined outside any section in the config file */
config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL);
checkedparam_t config_check_CCparams[] = CCPARAMS_CHECK;
paramdef_t CCsParams[] = CCPARAMS_DESC(ccparams_lte);
paramlist_def_t CCsParamList = {ENB_CONFIG_STRING_COMPONENT_CARRIERS, NULL, 0};
// ccparams_MCE_t MCEconfig;
// memset((void *)&MCEconfig,0,sizeof(ccparams_MCE_t));
// paramdef_t MCEParams[] = MCEPARAMS_DESC((&MCEconfig));
// checkedparam_t config_check_MCEparams[] = MCEPARAMS_CHECK;
/* map parameter checking array instances to parameter definition array instances */
for (I = 0; I < (sizeof(CCsParams) / sizeof(paramdef_t)); I++) {
CCsParams[I].chkPptr = &(config_check_CCparams[I]);
}
AssertFatal(i < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt,
"Failed to parse config file %s, %uth attribute %s \n",
RC.config_file_name, i, ENB_CONFIG_STRING_ACTIVE_ENBS);
if (ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt > 0) {
// Output a list of all eNBs.
config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL);
if (ENBParamList.numelt > 0) {
for (k = 0; k < ENBParamList.numelt; k++) {
if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) {
// Calculate a default eNB ID
if (EPC_MODE_ENABLED) {
uint32_t hash;
hash = s1ap_generate_eNB_id ();
enb_id = k + (hash & 0xFFFF8);
} else {
enb_id = k;
}
} else {
enb_id = *(ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr);
}
// search if in active list
for (j = 0; j < ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt; j++) {
if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[j], *(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr)) == 0) {
paramdef_t PLMNParams[] = PLMNPARAMS_DESC;
paramlist_def_t PLMNParamList = {ENB_CONFIG_STRING_PLMN_LIST, NULL, 0};
/* map parameter checking array instances to parameter definition array instances */
checkedparam_t config_check_PLMNParams [] = PLMNPARAMS_CHECK;
for (int I = 0; I < sizeof(PLMNParams) / sizeof(paramdef_t); ++I)
PLMNParams[I].chkPptr = &(config_check_PLMNParams[I]);
paramdef_t M2Params[] = M2PARAMS_DESC;
paramlist_def_t M2ParamList = {ENB_CONFIG_STRING_TARGET_MCE_M2_IP_ADDRESS,NULL,0};
paramdef_t SCTPParams[] = SCTPPARAMS_DESC;
paramdef_t NETParams[] = NETPARAMS_DESC;
paramdef_t MBMSConfigParams[] = MBMS_CONFIG_PARAMS_DESC;
paramdef_t MBMSParams[] = MBMSPARAMS_DESC;
paramlist_def_t MBMSConfigParamList = {ENB_CONFIG_STRING_MBMS_CONFIGURATION_DATA_LIST,NULL,0};
paramlist_def_t MBMSParamList = {ENB_CONFIG_STRING_MBMS_SERVICE_AREA_LIST,NULL,0};
/* TODO: fix the size - if set lower we have a crash (MAX_OPTNAME_SIZE was 64 when this code was written) */
/* this is most probably a problem with the config module */
char aprefix[MAX_OPTNAME_SIZE*80 + 8];
sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k);
/* Some default/random parameters */
M2AP_REGISTER_ENB_REQ (msg_p).eNB_id = enb_id;
if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_MACRO_ENB") == 0) {
M2AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_MACRO_ENB;
} else if (strcmp(*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr), "CELL_HOME_ENB") == 0) {
M2AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr));
}
M2AP_REGISTER_ENB_REQ (msg_p).eNB_name = strdup(*(ENBParamList.paramarray[k][ENB_ENB_NAME_IDX].strptr));
M2AP_REGISTER_ENB_REQ (msg_p).tac = *ENBParamList.paramarray[k][ENB_TRACKING_AREA_CODE_IDX].uptr;
config_getlist(&PLMNParamList, PLMNParams, sizeof(PLMNParams)/sizeof(paramdef_t), aprefix);
// char aprefix2[MAX_OPTNAME_SIZE*80 + 8];
// sprintf(aprefix2,"%s.[%i].%s.[0]",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_MBMS_CONFIGURATION_DATA_LIST);
// config_getlist(&MBMSParamList, MBMSParams, sizeof(MBMSParams)/sizeof(paramdef_t), aprefix2);
// if (MBMSParamList.numelt < 1 || MBMSParamList.numelt > 8)
// AssertFatal(0, "The number of MBMS Areas must be in [1,8], but is %d\n",
// MBMSParamList.numelt);
// M2AP_REGISTER_ENB_REQ (msg_p).num_mbms_service_area_list = MBMSParamList.numelt;
// for(J=0; J<MBMSParamList.numelt;J++){
// M2AP_REGISTER_ENB_REQ (msg_p).mbms_service_area_list[J] = *MBMSParamList.paramarray[J][ENB_MBMS_SERVICE_AREA_IDX].uptr;
// }
//
char aprefix2[MAX_OPTNAME_SIZE*80 + 8];
sprintf(aprefix2,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k);
config_getlist(&MBMSConfigParamList, MBMSConfigParams, sizeof(MBMSConfigParams)/sizeof(paramdef_t), aprefix2);
if (MBMSConfigParamList.numelt < 1 || MBMSConfigParamList.numelt > 8)
AssertFatal(0, "The number of MBMS Config Data must be in [1,8], but is %d\n",
MBMSConfigParamList.numelt);
M2AP_REGISTER_ENB_REQ (msg_p).num_mbms_configuration_data_list = MBMSConfigParamList.numelt;
for(int I=0; I < MBMSConfigParamList.numelt; I++){
sprintf(aprefix2,"%s.[%i].%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_MBMS_CONFIGURATION_DATA_LIST,I);
config_getlist(&MBMSParamList, MBMSParams, sizeof(MBMSParams)/sizeof(paramdef_t), aprefix2);
if (MBMSParamList.numelt < 1 || MBMSParamList.numelt > 8)
AssertFatal(0, "The number of MBMS Areas must be in [1,8], but is %d\n",
MBMSParamList.numelt);
M2AP_REGISTER_ENB_REQ (msg_p).mbms_configuration_data_list[I].num_mbms_service_area_list = MBMSParamList.numelt;
for(J=0; J<MBMSParamList.numelt;J++){
M2AP_REGISTER_ENB_REQ (msg_p).mbms_configuration_data_list[I].mbms_service_area_list[J] = *MBMSParamList.paramarray[J][ENB_MBMS_SERVICE_AREA_IDX].uptr;
}
}
if (PLMNParamList.numelt < 1 || PLMNParamList.numelt > 6)
AssertFatal(0, "The number of PLMN IDs must be in [1,6], but is %d\n",
PLMNParamList.numelt);
if (PLMNParamList.numelt > 1)
LOG_W(M2AP, "M2AP currently handles only one PLMN, ignoring the others!\n");
M2AP_REGISTER_ENB_REQ (msg_p).mcc = *PLMNParamList.paramarray[0][ENB_MOBILE_COUNTRY_CODE_IDX].uptr;
M2AP_REGISTER_ENB_REQ (msg_p).mnc = *PLMNParamList.paramarray[0][ENB_MOBILE_NETWORK_CODE_IDX].uptr;
M2AP_REGISTER_ENB_REQ (msg_p).mnc_digit_length = *PLMNParamList.paramarray[0][ENB_MNC_DIGIT_LENGTH].u8ptr;
AssertFatal(M2AP_REGISTER_ENB_REQ(msg_p).mnc_digit_length == 3
|| M2AP_REGISTER_ENB_REQ(msg_p).mnc < 100,
"MNC %d cannot be encoded in two digits as requested (change mnc_digit_length to 3)\n",
M2AP_REGISTER_ENB_REQ(msg_p).mnc);
/* CC params */
config_getlist(&CCsParamList, NULL, 0, aprefix);
M2AP_REGISTER_ENB_REQ (msg_p).num_cc = CCsParamList.numelt;
if (CCsParamList.numelt > 0) {
//char ccspath[MAX_OPTNAME_SIZE*2 + 16];
for (J = 0; J < CCsParamList.numelt ; J++) {
sprintf(aprefix, "%s.[%i].%s.[%i]", ENB_CONFIG_STRING_ENB_LIST, k, ENB_CONFIG_STRING_COMPONENT_CARRIERS, J);
config_get(CCsParams, sizeof(CCsParams)/sizeof(paramdef_t), aprefix);
M2AP_REGISTER_ENB_REQ (msg_p).eutra_band[J] = ccparams_lte.eutra_band;
M2AP_REGISTER_ENB_REQ (msg_p).downlink_frequency[J] = (uint32_t) ccparams_lte.downlink_frequency;
M2AP_REGISTER_ENB_REQ (msg_p).uplink_frequency_offset[J] = (unsigned int) ccparams_lte.uplink_frequency_offset;
M2AP_REGISTER_ENB_REQ (msg_p).Nid_cell[J]= ccparams_lte.Nid_cell;
if (ccparams_lte.Nid_cell>503) {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n",
RC.config_file_name, k, ccparams_lte.Nid_cell);
}
M2AP_REGISTER_ENB_REQ (msg_p).N_RB_DL[J]= ccparams_lte.N_RB_DL;
if ((ccparams_lte.N_RB_DL!=6) && (ccparams_lte.N_RB_DL!=15) && (ccparams_lte.N_RB_DL!=25) && (ccparams_lte.N_RB_DL!=50) && (ccparams_lte.N_RB_DL!=75) && (ccparams_lte.N_RB_DL!=100)) {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n",
RC.config_file_name, k, ccparams_lte.N_RB_DL);
}
if (strcmp(ccparams_lte.frame_type, "FDD") == 0) {
M2AP_REGISTER_ENB_REQ (msg_p).frame_type[J] = FDD;
} else if (strcmp(ccparams_lte.frame_type, "TDD") == 0) {
M2AP_REGISTER_ENB_REQ (msg_p).frame_type[J] = TDD;
} else {
AssertFatal (0,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n",
RC.config_file_name, k, ccparams_lte.frame_type);
}
M2AP_REGISTER_ENB_REQ (msg_p).fdd_earfcn_DL[J] = to_earfcn_DL(ccparams_lte.eutra_band, ccparams_lte.downlink_frequency, ccparams_lte.N_RB_DL);
M2AP_REGISTER_ENB_REQ (msg_p).fdd_earfcn_UL[J] = to_earfcn_UL(ccparams_lte.eutra_band, ccparams_lte.downlink_frequency + ccparams_lte.uplink_frequency_offset, ccparams_lte.N_RB_DL);
}
}
sprintf(aprefix,"%s.[%i]",ENB_CONFIG_STRING_ENB_LIST,k);
config_getlist( &M2ParamList,M2Params,sizeof(M2Params)/sizeof(paramdef_t),aprefix);
AssertFatal(M2ParamList.numelt <= M2AP_MAX_NB_ENB_IP_ADDRESS,
"value of M2ParamList.numelt %d must be lower than M2AP_MAX_NB_ENB_IP_ADDRESS %d value: reconsider to increase M2AP_MAX_NB_ENB_IP_ADDRESS\n",
M2ParamList.numelt,M2AP_MAX_NB_ENB_IP_ADDRESS);
M2AP_REGISTER_ENB_REQ (msg_p).nb_m2 = 0;
for (l = 0; l < M2ParamList.numelt; l++) {
M2AP_REGISTER_ENB_REQ (msg_p).nb_m2 += 1;
strcpy(M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv4_address,*(M2ParamList.paramarray[l][ENB_M2_IPV4_ADDRESS_IDX].strptr));
strcpy(M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv6_address,*(M2ParamList.paramarray[l][ENB_M2_IPV6_ADDRESS_IDX].strptr));
if (strcmp(*(M2ParamList.paramarray[l][ENB_M2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) {
M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv4 = 1;
M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv6 = 0;
} else if (strcmp(*(M2ParamList.paramarray[l][ENB_M2_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) {
M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv4 = 0;
M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv6 = 1;
} else if (strcmp(*(M2ParamList.paramarray[l][ENB_M2_IP_ADDRESS_PREFERENCE_IDX].strptr), "no") == 0) {
M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv4 = 1;
M2AP_REGISTER_ENB_REQ (msg_p).target_mce_m2_ip_address[l].ipv6 = 1;
}
}
// timers
//{
// int t_reloc_prep = 0;
// int tx2_reloc_overall = 0;
// paramdef_t p[] = {
// { "t_reloc_prep", "t_reloc_prep", 0, iptr:&t_reloc_prep, defintval:0, TYPE_INT, 0 },
// { "tx2_reloc_overall", "tx2_reloc_overall", 0, iptr:&tx2_reloc_overall, defintval:0, TYPE_INT, 0 }
// };
// config_get(p, sizeof(p)/sizeof(paramdef_t), aprefix);
// if (t_reloc_prep <= 0 || t_reloc_prep > 10000 ||
// tx2_reloc_overall <= 0 || tx2_reloc_overall > 20000) {
// LOG_E(M2AP, "timers in configuration file have wrong values. We must have [0 < t_reloc_prep <= 10000] and [0 < tx2_reloc_overall <= 20000]\n");
// exit(1);
// }
// M2AP_REGISTER_ENB_REQ (msg_p).t_reloc_prep = t_reloc_prep;
// M2AP_REGISTER_ENB_REQ (msg_p).tx2_reloc_overall = tx2_reloc_overall;
//}
// SCTP SETTING
M2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
M2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
if (EPC_MODE_ENABLED) {
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix);
M2AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
M2AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr);
}
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG);
// NETWORK_INTERFACES
config_get( NETParams,sizeof(NETParams)/sizeof(paramdef_t),aprefix);
M2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_M2C = (uint32_t)*(NETParams[ENB_PORT_FOR_M2C_IDX].uptr);
if ((NETParams[ENB_IPV4_ADDR_FOR_M2C_IDX].strptr == NULL) || (M2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_M2C == 0)) {
LOG_E(RRC,"Add eNB IPv4 address and/or port for M2C in the CONF file!\n");
exit(1);
}
cidr = *(NETParams[ENB_IPV4_ADDR_FOR_M2C_IDX].strptr);
address = strtok(cidr, "/");
M2AP_REGISTER_ENB_REQ (msg_p).enb_m2_ip_address.ipv6 = 0;
M2AP_REGISTER_ENB_REQ (msg_p).enb_m2_ip_address.ipv4 = 1;
strcpy(M2AP_REGISTER_ENB_REQ (msg_p).enb_m2_ip_address.ipv4_address, address);
}
}
}
}
}
return 0;
}
//-----------------------------------------------------------------------------
/*
* Configure the s1ap_register_enb_req in itti message for future
......
......@@ -117,6 +117,7 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i);
void read_config_and_init(void);
int RCconfig_X2(MessageDef *msg_p, uint32_t i);
int RCconfig_M2(MessageDef *msg_p, uint32_t i);
void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int cell_idx,int cc_idx,char *config_fname);
void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, int cell_idx,int cc_idx,char *config_fname,char *brparamspath);
......
......@@ -213,6 +213,8 @@ typedef enum {
#define ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD "rrc_inactivity_threshold"
#define ENB_CONFIG_STRING_MEASUREMENT_REPORTS "enable_measurement_reports"
#define ENB_CONFIG_STRING_X2 "enable_x2"
#define ENB_CONFIG_STRING_ENB_M2 "enable_enb_m2"
#define ENB_CONFIG_STRING_MCE_M2 "enable_mce_m2"
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
/* cell configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
......@@ -236,6 +238,8 @@ typedef enum {
{ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_MEASUREMENT_REPORTS, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_X2, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_ENB_M2, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MCE_M2, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
}
#define ENB_ENB_ID_IDX 0
#define ENB_CELL_TYPE_IDX 1
......@@ -255,6 +259,8 @@ typedef enum {
#define ENB_RRC_INACTIVITY_THRES_IDX 15
#define ENB_ENABLE_MEASUREMENT_REPORTS 16
#define ENB_ENABLE_X2 17
#define ENB_ENABLE_ENB_M2 18
#define ENB_ENABLE_MCE_M2 19
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
#define ENBPARAMS_CHECK { \
......@@ -274,6 +280,10 @@ typedef enum {
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
......@@ -308,6 +318,32 @@ typedef enum {
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
#define ENB_CONFIG_STRING_MBMS_CONFIGURATION_DATA_LIST "mbms_configuration_data_list"
#define ENB_CONFIG_STRING_MBMS_SYNC_AREA "mbms_sync_area"
#define ENB_MBMS_SYNC_AREA_IDX 0
#define MBMS_CONFIG_PARAMS_DESC { \
/* optname helpstr paramflags XXXptr def val type numelt */ \
{ENB_CONFIG_STRING_MBMS_SYNC_AREA , NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
}
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
#define ENB_CONFIG_STRING_MBMS_SERVICE_AREA_LIST "mbms_service_area_list"
#define ENB_CONFIG_STRING_MBMS_SERVICE_AREA "mbms_service_area"
#define ENB_MBMS_SERVICE_AREA_IDX 0
#define MBMSPARAMS_DESC { \
/* optname helpstr paramflags XXXptr def val type numelt */ \
{ENB_CONFIG_STRING_MBMS_SERVICE_AREA, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
}
/* component carries configuration parameters name */
#define ENB_CONFIG_STRING_NB_ANT_PORTS "nb_antenna_ports"
......@@ -922,6 +958,39 @@ typedef struct srb1_params_s {
#define ENB_X2_IPV4_ADDRESS_IDX 0
#define ENB_X2_IPV6_ADDRESS_IDX 1
#define ENB_X2_IP_ADDRESS_PREFERENCE_IDX 2
/*---------------------------------------------------------------------------------------------------------------------------------------*/
/* M2 configuration parameters section name */
#define ENB_CONFIG_STRING_TARGET_MCE_M2_IP_ADDRESS "target_mce_m2_ip_address"
/* M2 configuration parameters names */
#define ENB_CONFIG_STRING_TARGET_MCE_M2_IPV4_ADDRESS "ipv4"
#define ENB_CONFIG_STRING_TARGET_MCE_M2_IPV6_ADDRESS "ipv6"
#define ENB_CONFIG_STRING_TARGET_MCE_M2_IP_ADDRESS_PREFERENCE "preference"
/*---------------------------------------------------------------------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------------------------------------------------------*/
/* M2 configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-------------------------------------------------------------------------------------------------------------------------------------*/
#define M2PARAMS_DESC { \
{ENB_CONFIG_STRING_TARGET_MCE_M2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_TARGET_MCE_M2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_TARGET_MCE_M2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
}
#define ENB_M2_IPV4_ADDRESS_IDX 0
#define ENB_M2_IPV6_ADDRESS_IDX 1
#define ENB_M2_IP_ADDRESS_PREFERENCE_IDX 2
/*---------------------------------------------------------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------------------------------------------------------*/
/* SCTP configuration parameters section name */
#define ENB_CONFIG_STRING_SCTP_CONFIG "SCTP"
......@@ -955,6 +1024,10 @@ typedef struct srb1_params_s {
#define ENB_PORT_FOR_S1U_IDX 4
#define ENB_IPV4_ADDR_FOR_X2C_IDX 5
#define ENB_PORT_FOR_X2C_IDX 6
#define ENB_IPV4_ADDR_FOR_M2C_IDX 7
#define ENB_PORT_FOR_M2C_IDX 8
#define MCE_IPV4_ADDR_FOR_M2C_IDX 9
#define MCE_PORT_FOR_M2C_IDX 10
/* S1 interface configuration parameters names */
#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME"
......@@ -967,6 +1040,13 @@ typedef struct srb1_params_s {
#define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C "ENB_IPV4_ADDRESS_FOR_X2C"
#define ENB_CONFIG_STRING_ENB_PORT_FOR_X2C "ENB_PORT_FOR_X2C"
/* M2 interface configuration parameters names */
#define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_M2C "ENB_IPV4_ADDRESS_FOR_M2C"
#define ENB_CONFIG_STRING_ENB_PORT_FOR_M2C "ENB_PORT_FOR_M2C"
#define ENB_CONFIG_STRING_MCE_IPV4_ADDR_FOR_M2C "MCE_IPV4_ADDRESS_FOR_M2C"
#define ENB_CONFIG_STRING_MCE_PORT_FOR_M2C "MCE_PORT_FOR_M2C"
/*--------------------------------------------------------------------------------------------------------------------------------------------------*/
/* S1/X2 interface configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
......@@ -979,6 +1059,10 @@ typedef struct srb1_params_s {
{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_M2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_ENB_PORT_FOR_M2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_MCE_IPV4_ADDR_FOR_M2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_MCE_PORT_FOR_M2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \
}
......@@ -1157,4 +1241,6 @@ typedef struct srb1_params_s {
#include "enb_paramdef_emtc.h"
#include "enb_paramdef_sidelink.h"
#include "enb_paramdef_mce.h"
#include "enb_paramdef_mme.h"
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file openair2/ENB_APP/enb_paramdef_mce.h
* \brief definition of configuration parameters for MCE modules
* \author Javier MORGADE
* \date 2019
* \version 0.1
* \company VICOMTECH Spain
* \email: javier.morgade@ieee.org
* \note
* \warning
*/
#include "common/config/config_paramdesc.h"
#include "RRC_paramsvalues.h"
/* mce configuration parameters names */
#define MCE_CONFIG_STRING_MCE_ID "MCE_ID"
#define MCE_CONFIG_STRING_MCE_NAME "MCE_name"
#define MCE_CONFIG_STRING_MCE_M2 "enable_mce_m2"
#define MCE_CONFIG_STRING_MCE_M3 "enable_mce_m3"
#define MCE_PARAMS_DESC {\
{MCE_CONFIG_STRING_MCE_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MCE_NAME, NULL, 0, strptr:NULL, defstrval:"OAIMCE", TYPE_STRING, 0}, \
{MCE_CONFIG_STRING_MCE_M2, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
{MCE_CONFIG_STRING_MCE_M3, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
}
#define MCE_MCE_ID_IDX 0
#define MCE_MCE_NAME_IDX 1
#define MCE_ENABLE_MCE_M2_IDX 2
#define MCE_ENABLE_MCE_M3_IDX 3
#define MCE_PARAMS_CHECK { \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
}
#define MCE_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES"
#define MCE2_INTERFACE_NAME_FOR_M2_ENB_IDX 0
#define MCE2_IPV4_ADDR_FOR_M2C_IDX 1
#define MCE2_PORT_FOR_M2C_IDX 2
#define MCE2_INTERFACE_NAME_FOR_M3_MME_IDX 3
#define MCE2_IPV4_ADDR_FOR_M3C_IDX 4
#define MCE2_PORT_FOR_M3C_IDX 5
/* interface configuration parameters names */
/* M2 interface configuration parameters names */
#define MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M2_ENB "ENB_INTERFACE_NAME_FOR_M2_ENB"
#define MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M2C "MCE_IPV4_ADDRESS_FOR_M2C"
#define MCE_CONFIG_STRING_MCE_PORT_FOR_M2C "MCE_PORT_FOR_M2C"
/* M3 interface configuration parameters names */
#define MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M3_MME "MCE_INTERFACE_NAME_FOR_M3_MME"
#define MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M3C "MCE_IPV4_ADDRESS_FOR_M3C"
#define MCE_CONFIG_STRING_MCE_PORT_FOR_M3C "MCE_PORT_FOR_M3C"
#define MCE_NETPARAMS_DESC { \
{MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M2_ENB, NULL, 0, strptr:&mce_interface_name_for_m2_enb, defstrval:"lo", TYPE_STRING, 0}, \
{MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M2C, NULL, 0, strptr:&mce_ipv4_address_for_m2c, defstrval:NULL, TYPE_STRING, 0}, \
{MCE_CONFIG_STRING_MCE_PORT_FOR_M2C, NULL, 0, uptr:&mce_port_for_m2c, defintval:36443L, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M3_MME, NULL, 0, strptr:&mce_interface_name_for_m3_mme, defstrval:NULL, TYPE_STRING, 0}, \
{MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M3C, NULL, 0, strptr:&mce_ipv4_address_for_m3c, defstrval:NULL, TYPE_STRING, 0}, \
{MCE_CONFIG_STRING_MCE_PORT_FOR_M3C, NULL, 0, uptr:&mce_port_for_m3c, defintval:36444L, TYPE_UINT, 0}, \
}
/*-------------------------------------------------------------------------------------------------------------------------------------*/
/* M3 configuration parameters */
/* M3 configuration parameters section name */
#define MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS "target_mme_m3_ip_address"
/* M3 configuration parameters names */
#define MCE_CONFIG_STRING_TARGET_MME_M3_IPV4_ADDRESS "ipv4"
#define MCE_CONFIG_STRING_TARGET_MME_M3_IPV6_ADDRESS "ipv6"
#define MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS_PREFERENCE "preference"
/* optname helpstr paramflags XXXptr defXXXval type numelt */
#define M3PARAMS_DESC { \
{MCE_CONFIG_STRING_TARGET_MME_M3_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{MCE_CONFIG_STRING_TARGET_MME_M3_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
}
#define MCE2_M3_IPV4_ADDRESS_IDX 0
#define MCE2_M3_IPV6_ADDRESS_IDX 1
#define MCE2_M3_IP_ADDRESS_PREFERENCE_IDX 2
/*-----------------------------------------------------------------------------------------------------------------------------------*/
/* MCCH related BCCH Configuration per MBSFN area configuration parameters */
/* MCCH configuration parameters section */
#define MCE_CONFIG_STRING_MCCH_CONFIG_PER_MBSFN_AREA "mcch_config_per_mbsfn_area"
/* M3 configuration parameters names */
#define MCE_CONFIG_STRING_MCCH_MBSFN_AREA "mbsfn_area"
#define MCE_CONFIG_STRING_MCCH_PDCCH_LENGTH "pdcch_length"
#define MCE_CONFIG_STRING_MCCH_REPETITION_PERIOD "repetition_period"
#define MCE_CONFIG_STRING_MCCH_OFFSET "offset"
#define MCE_CONFIG_STRING_MCCH_MODIFICATION_PERIOD "modification_period"
#define MCE_CONFIG_STRING_MCCH_SF_ALLOCATION_INFO "subframe_allocation_info"
#define MCE_CONFIG_STRING_MCCH_MCS "mcs"
/* optname helpstr paramflags XXXptr defXXXval type numelt */
#define MCCH_PARAMS_DESC { \
{MCE_CONFIG_STRING_MCCH_MBSFN_AREA, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MCCH_PDCCH_LENGTH, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MCCH_REPETITION_PERIOD, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MCCH_OFFSET, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MCCH_MODIFICATION_PERIOD,NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MCCH_SF_ALLOCATION_INFO, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MCCH_MCS, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
}
#define MCCH_MBSFN_AREA_IDX 0
#define MCCH_PDCCH_LENGTH_IDX 1
#define MCCH_REPETITION_PERIOD_IDX 2
#define MCCH_OFFSET_IDX 3
#define MCCH_MODIFICATION_PERIOD_IDX 4
#define MCCH_SF_ALLOCATION_INFO_IDX 5
#define MCCH_MCS_IDX 6
/*-------------------------------------------------------------------------------------------------------------------------------------*/
/* M3 configuration parameters section name */
#define MCE_CONFIG_STRING_PLMN "plnm"
/* M3 configuration parameters names */
#define MCE_CONFIG_STRING_MCC "mcc"
#define MCE_CONFIG_STRING_MNC "mnc"
#define MCE_CONFIG_STRING_MNC_LENGTH "mnc_length"
/* optname helpstr paramflags XXXptr defXXXval type numelt */
#define MCE_PLMN_PARAMS_DESC { \
{MCE_CONFIG_STRING_MCC, NULL, 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MNC, NULL, 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MNC_LENGTH, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
}
#define MCE_CONFIG_STRING_MCC_IDX 0
#define MCE_CONFIG_STRING_MNC_IDX 1
#define MCE_CONFIG_STRING_MNC_LENGTH_IDX 2
/*-------------------------------------------------------------------------------------------------------------------------------------*/
#define MCE_CONFIG_STRING_MBMS_SCHEDULING_INFO "mbms_sched_info"
#define MCE_CONFIG_STRING_MCCH_UPDATE_TIME "mcch_update_time"
#define MCE_MBMS_SCHEDULING_INFO_PARAMS_DESC { \
{MCE_CONFIG_STRING_MCCH_UPDATE_TIME, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
}
#define MCE_CONFIG_STRING_MCCH_UPDATE_TIME_IDX 0
///*-------------------------------------------------------------------------------------------------------------------------------------*/
#define MCE_CONFIG_STRING_MBMS_AREA_CONFIGURATION_LIST "mbms_area_config_list"
#define MCE_CONFIG_STRING_COMMON_SF_ALLOCATION_PERIOD "common_sf_allocation_period"
#define MCE_CONFIG_STRING_MBMS_AREA_ID "mbms_area_id"
#define MCE_MBMS_AREA_CONFIGURATION_LIST_PARAMS_DESC { \
{MCE_CONFIG_STRING_COMMON_SF_ALLOCATION_PERIOD, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MBMS_AREA_ID, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
}
#define MCE_CONFIG_STRING_COMMON_SF_ALLOCATION_PERIOD_IDX 0
#define MCE_CONFIG_STRING_MBMS_AREA_ID_IDX 1
//
///*-------------------------------------------------------------------------------------------------------------------------------------*/
#define MCE_CONFIG_STRING_PMCH_CONFIGURATION_LIST "pmch_config_list"
#define MCE_CONFIG_STRING_ALLOCATED_SF_END "allocated_sf_end"
#define MCE_CONFIG_STRING_DATA_MCS "data_mcs"
#define MCE_CONFIG_STRING_MCH_SCHEDULING_PERIOD "mch_scheduling_period"
#define MCE_MBMS_PMCH_CONFIGURATION_LIST_PARAMS_DESC { \
{MCE_CONFIG_STRING_ALLOCATED_SF_END, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_DATA_MCS, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MCH_SCHEDULING_PERIOD, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
}
#define MCE_CONFIG_STRING_ALLOCATED_SF_END_IDX 0
#define MCE_CONFIG_STRING_DATA_MCS_IDX 1
#define MCE_CONFIG_STRING_MCH_SCHEDULING_PERIOD_IDX 2
/*-------------------------------------------------------------------------------------------------------------------------------------*/
#define MCE_CONFIG_STRING_MBMS_SESSION_LIST "mbms_session_list"
#define MCE_CONFIG_STRING_MBMS_SERVICE_ID "service_id"
#define MCE_CONFIG_STRING_MBMS_LCID_ID "lcid_id"
#define MCE_CONFIG_STRING_MBMS_LCID "lcid"
#define MCE_MBMS_MBMS_SESSION_LIST_DESC { \
{MCE_CONFIG_STRING_MBMS_SERVICE_ID, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT32, 0}, \
{MCE_CONFIG_STRING_MBMS_LCID_ID, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_MBMS_LCID, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
}
#define MCE_CONFIG_STRING_MBMS_SERVICE_ID_IDX 0
#define MCE_CONFIG_STRING_MBMS_LCID_ID_IDX 1
#define MCE_CONFIG_STRING_MBMS_LCID_IDX 2
/*-------------------------------------------------------------------------------------------------------------------------------------*/
#define MCE_CONFIG_STRING_MBMS_SF_CONFIGURATION_LIST "mbms_sf_config_list"
#define MCE_CONFIG_STRING_RADIOFRAME_ALLOCATION_PERIOD "radioframe_allocation_period"
#define MCE_CONFIG_STRING_RADIOFRAME_ALLOOCATION_OFFSET "radioframe_alloocation_offset"
#define MCE_CONFIG_STRING_NUM_FRAME "num_frame"
#define MCE_CONFIG_STRING_SUBFRAME_ALLOCATION "subframe_allocation"
#define MCE_MBMS_MBMS_SF_CONFIGURATION_LIST_PARAMS_DESC { \
{MCE_CONFIG_STRING_RADIOFRAME_ALLOCATION_PERIOD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_RADIOFRAME_ALLOOCATION_OFFSET, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
{MCE_CONFIG_STRING_NUM_FRAME, NULL, 0, strptr:NULL, defstrval:"oneFrame", TYPE_STRING, 0}, \
{MCE_CONFIG_STRING_SUBFRAME_ALLOCATION, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
}
#define MCE_CONFIG_STRING_RADIOFRAME_ALLOCATION_PERIOD_IDX 0
#define MCE_CONFIG_STRING_RADIOFRAME_ALLOOCATION_OFFSET_IDX 1
#define MCE_CONFIG_STRING_NUM_FRAME_IDX 2
#define MCE_CONFIG_STRING_SUBFRAME_ALLOCATION_IDX 3
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file openair2/ENB_APP/enb_paramdef_mme.h
* \brief definition of configuration parameters for MME modules
* \author Javier MORGADE
* \date 2019
* \version 0.1
* \company VICOMTECH Spain
* \email: javier.morgade@ieee.org
* \note
* \warning
*/
#include "common/config/config_paramdesc.h"
#include "RRC_paramsvalues.h"
/* mme configuration parameters names */
#define MME_CONFIG_STRING_MME_ID "MME_ID"
#define MME_CONFIG_STRING_MME_NAME "MME_name"
#define MME_CONFIG_STRING_MME_M3 "enable_mme_m3"
#define MMEPARAMS_DESC {\
{MME_CONFIG_STRING_MME_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
{MME_CONFIG_STRING_MME_NAME, NULL, 0, strptr:NULL, defstrval:"OAIMME", TYPE_STRING, 0}, \
{MME_CONFIG_STRING_MME_M3, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
}
#define MME_MME_ID_IDX 0
#define MME_MME_NAME_IDX 1
#define MME_ENABLE_MME_M3_IDX 2
#define MMEPARAMS_CHECK { \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
}
#define MME_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES"
#define MME_INTERFACE_NAME_FOR_M3_MME_IDX 0
#define MME_IPV4_ADDRESS_FOR_M3C_IDX 1
#define MME_PORT_FOR_M3C_IDX 2
/* interface configuration parameters names */
/* M3 interface configuration parameters names */
#define MME_CONFIG_STRING_MME_INTERFACE_NAME_FOR_M3_MCE "MME_INTERFACE_NAME_FOR_M3_MCE"
#define MME_CONFIG_STRING_MME_IPV4_ADDRESS_FOR_M3C "MME_IPV4_ADDRESS_FOR_M3C"
#define MME_CONFIG_STRING_MME_PORT_FOR_M3C "MME_PORT_FOR_M3C"
#define MME_NETPARAMS_DESC { \
{MME_CONFIG_STRING_MME_INTERFACE_NAME_FOR_M3_MCE, NULL, 0, strptr:&mme_interface_name_for_m3_mce, defstrval:"lo", TYPE_STRING, 0}, \
{MME_CONFIG_STRING_MME_IPV4_ADDRESS_FOR_M3C, NULL, 0, strptr:&mme_ipv4_address_for_m3c, defstrval:"127.0.0.18/24", TYPE_STRING, 0}, \
{MME_CONFIG_STRING_MME_PORT_FOR_M3C, NULL, 0, uptr:&mme_port_for_m3c, defintval:36444L, TYPE_UINT, 0}, \
}
......@@ -2607,6 +2607,8 @@ size_t flexran_get_capabilities(mid_t mod_id, Protocol__FlexBsCapability **caps)
(*caps)[6] = PROTOCOL__FLEX_BS_CAPABILITY__SDAP;
(*caps)[7] = PROTOCOL__FLEX_BS_CAPABILITY__RRC;
break;
case ngran_eNB_MBMS_STA:
break;
}
return n_caps;
}
......@@ -2643,6 +2645,8 @@ uint16_t flexran_get_capabilities_mask(mid_t mod_id)
| (1 << PROTOCOL__FLEX_BS_CAPABILITY__SDAP)
| (1 << PROTOCOL__FLEX_BS_CAPABILITY__RRC);
break;
case ngran_eNB_MBMS_STA:
break;
}
return mask;
}
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