Commit d16cbcc9 authored by winckel's avatar winckel

Reorganized eNB app code to have less global variables.

Added PHY configuration message sent to all eNB.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4999 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent e2586fc4
......@@ -60,63 +60,56 @@ extern char *g_conf_config_file_name;
# endif
/*------------------------------------------------------------------------------*/
# if defined(ENABLE_USE_MME)
static uint32_t enb_nb = 1; /* Default number of eNB */
# endif
static Enb_properties_t *enb_properties[MAX_ENB];
static int enb_nb_properties;
/*------------------------------------------------------------------------------*/
static void configure_phy(uint32_t enb_id)
{
MessageDef *msg_p;
msg_p = itti_alloc_new_message (TASK_ENB_APP, PHY_CONFIGURATION_REQ);
PHY_CONFIGURATION_REQ (msg_p).frame_type = enb_properties[enb_id]->frame_type;
PHY_CONFIGURATION_REQ (msg_p).prefix_type = enb_properties[enb_id]->prefix_type;
PHY_CONFIGURATION_REQ (msg_p).downlink_frequency = enb_properties[enb_id]->downlink_frequency;
PHY_CONFIGURATION_REQ (msg_p).uplink_frequency_offset = enb_properties[enb_id]->uplink_frequency_offset;
extern Enb_properties_t *g_enb_properties[];
extern int g_num_enb_properties;
itti_send_msg_to_task (TASK_PHY_ENB, enb_id, msg_p);
}
/*------------------------------------------------------------------------------*/
static void configure_rrc(void)
static void configure_rrc(uint32_t enb_id)
{
uint32_t eNB_id_start = 0;
uint32_t eNB_id_end = 1;
uint32_t eNB_id;
MessageDef *msg_p;
# if defined(OAI_EMU)
eNB_id_start = oai_emulation.info.first_enb_local;
eNB_id_end = oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local;
# endif
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
for (eNB_id = eNB_id_start; (eNB_id < eNB_id_end) ; eNB_id++)
{
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
RRC_CONFIGURATION_REQ (msg_p).cell_identity = g_enb_properties[eNB_id]->eNB_id;
RRC_CONFIGURATION_REQ (msg_p).tac = g_enb_properties[eNB_id]->tac;
RRC_CONFIGURATION_REQ (msg_p).mcc = g_enb_properties[eNB_id]->mcc;
RRC_CONFIGURATION_REQ (msg_p).mnc = g_enb_properties[eNB_id]->mnc;
RRC_CONFIGURATION_REQ (msg_p).cell_identity = enb_properties[enb_id]->eNB_id;
RRC_CONFIGURATION_REQ (msg_p).tac = enb_properties[enb_id]->tac;
RRC_CONFIGURATION_REQ (msg_p).mcc = enb_properties[enb_id]->mcc;
RRC_CONFIGURATION_REQ (msg_p).mnc = enb_properties[enb_id]->mnc;
itti_send_msg_to_task (TASK_RRC_ENB, eNB_id, msg_p);
}
itti_send_msg_to_task (TASK_RRC_ENB, enb_id, msg_p);
}
/*------------------------------------------------------------------------------*/
# if defined(ENABLE_USE_MME)
static uint32_t eNB_app_register()
static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)
{
uint32_t eNB_id_start = 0;
uint32_t eNB_id_end = 1;
uint32_t eNB_id;
uint32_t enb_id;
uint32_t mme_id;
MessageDef *msg_p;
uint32_t register_enb_pending = 0;
# if defined(OAI_EMU)
eNB_id_start = oai_emulation.info.first_enb_local;
eNB_id_end = oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local;
DevCheck(eNB_id_end <= NUMBER_OF_eNB_MAX, eNB_id_end, NUMBER_OF_eNB_MAX, 0);
# endif
//DevCheck(eNB_id_end <= (sizeof(g_enb_properties) / sizeof(g_enb_properties[0])), eNB_id_end, (sizeof(g_enb_properties) / sizeof(g_enb_properties[0])), 0);
DevCheck((eNB_id_end - eNB_id_start) == g_num_enb_properties, eNB_id_end - eNB_id_start, g_num_enb_properties, 0);
for (eNB_id = eNB_id_start; (eNB_id < eNB_id_end) ; eNB_id++)
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++)
{
# if defined(OAI_EMU)
if (oai_emulation.info.cli_start_enb[eNB_id] == 1)
if (oai_emulation.info.cli_start_enb[enb_id] == 1)
# endif
{
s1ap_register_enb_req_t *s1ap_register_eNB;
......@@ -124,7 +117,7 @@ static uint32_t eNB_app_register()
/* Overwrite default eNB ID */
hash = s1ap_generate_eNB_id ();
g_enb_properties[eNB_id]->eNB_id = eNB_id + (hash & 0xFFFF8);
enb_properties[enb_id]->eNB_id = enb_id + (hash & 0xFFFF8);
/* note: there is an implicit relationship between the data structure and the message name */
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
......@@ -132,30 +125,30 @@ static uint32_t eNB_app_register()
s1ap_register_eNB = &S1AP_REGISTER_ENB_REQ(msg_p);
/* Some default/random parameters */
s1ap_register_eNB->eNB_id = g_enb_properties[eNB_id]->eNB_id;
s1ap_register_eNB->cell_type = g_enb_properties[eNB_id]->cell_type;
s1ap_register_eNB->eNB_name = g_enb_properties[eNB_id]->eNB_name;
s1ap_register_eNB->tac = g_enb_properties[eNB_id]->tac;
s1ap_register_eNB->mcc = g_enb_properties[eNB_id]->mcc;
s1ap_register_eNB->mnc = g_enb_properties[eNB_id]->mnc;
s1ap_register_eNB->default_drx = g_enb_properties[eNB_id]->default_drx;
s1ap_register_eNB->eNB_id = enb_properties[enb_id]->eNB_id;
s1ap_register_eNB->cell_type = enb_properties[enb_id]->cell_type;
s1ap_register_eNB->eNB_name = enb_properties[enb_id]->eNB_name;
s1ap_register_eNB->tac = enb_properties[enb_id]->tac;
s1ap_register_eNB->mcc = enb_properties[enb_id]->mcc;
s1ap_register_eNB->mnc = enb_properties[enb_id]->mnc;
s1ap_register_eNB->default_drx = enb_properties[enb_id]->default_drx;
s1ap_register_eNB->nb_mme = g_enb_properties[eNB_id]->nb_mme;
DevCheck(s1ap_register_eNB->nb_mme <= S1AP_MAX_NB_MME_IP_ADDRESS, eNB_id, s1ap_register_eNB->nb_mme, S1AP_MAX_NB_MME_IP_ADDRESS);
s1ap_register_eNB->nb_mme = enb_properties[enb_id]->nb_mme;
AssertFatal (s1ap_register_eNB->nb_mme <= S1AP_MAX_NB_MME_IP_ADDRESS, "Too many MME for eNB %d (%d/%d)!", enb_id, s1ap_register_eNB->nb_mme, S1AP_MAX_NB_MME_IP_ADDRESS);
for (mme_id = 0; mme_id < s1ap_register_eNB->nb_mme; mme_id++)
{
s1ap_register_eNB->mme_ip_address[mme_id].ipv4 = g_enb_properties[eNB_id]->mme_ip_address[mme_id].ipv4;
s1ap_register_eNB->mme_ip_address[mme_id].ipv6 = g_enb_properties[eNB_id]->mme_ip_address[mme_id].ipv6;
s1ap_register_eNB->mme_ip_address[mme_id].ipv4 = enb_properties[enb_id]->mme_ip_address[mme_id].ipv4;
s1ap_register_eNB->mme_ip_address[mme_id].ipv6 = enb_properties[enb_id]->mme_ip_address[mme_id].ipv6;
strncpy (s1ap_register_eNB->mme_ip_address[mme_id].ipv4_address,
g_enb_properties[eNB_id]->mme_ip_address[mme_id].ipv4_address,
enb_properties[enb_id]->mme_ip_address[mme_id].ipv4_address,
sizeof(s1ap_register_eNB->mme_ip_address[0].ipv4_address));
strncpy (s1ap_register_eNB->mme_ip_address[mme_id].ipv6_address,
g_enb_properties[eNB_id]->mme_ip_address[mme_id].ipv6_address,
enb_properties[enb_id]->mme_ip_address[mme_id].ipv6_address,
sizeof(s1ap_register_eNB->mme_ip_address[0].ipv6_address));
}
itti_send_msg_to_task (TASK_S1AP, eNB_id, msg_p);
itti_send_msg_to_task (TASK_S1AP, enb_id, msg_p);
register_enb_pending++;
}
......@@ -170,11 +163,15 @@ static uint32_t eNB_app_register()
void *eNB_app_task(void *args_p)
{
#if defined(ENABLE_ITTI)
uint32_t enb_nb = 1; /* Default number of eNB is 1 */
uint32_t enb_id_start = 0;
uint32_t enb_id_end = enb_id_start + enb_nb;
# if defined(ENABLE_USE_MME)
static uint32_t register_enb_pending;
static uint32_t registered_enb;
static long enb_register_retry_timer_id;
uint32_t register_enb_pending;
uint32_t registered_enb;
long enb_register_retry_timer_id;
# endif
uint32_t enb_id;
MessageDef *msg_p;
const char *msg_name;
instance_t instance;
......@@ -184,17 +181,32 @@ void *eNB_app_task(void *args_p)
# if defined(ENABLE_USE_MME)
# if defined(OAI_EMU)
enb_nb = oai_emulation.info.nb_enb_local;
enb_nb = oai_emulation.info.nb_enb_local;
enb_id_start = oai_emulation.info.first_enb_local;
enb_id_end = oai_emulation.info.first_enb_local + enb_nb;
AssertFatal (enb_id_end <= NUMBER_OF_eNB_MAX,
"Last eNB index is greater or equal to maximum eNB index (%d/%d)!",
enb_id_end, NUMBER_OF_eNB_MAX);
# endif
# endif
enb_config_init(g_conf_config_file_name);
configure_rrc();
enb_nb_properties = enb_config_init(g_conf_config_file_name, enb_properties);
AssertFatal (enb_nb <= enb_nb_properties,
"Number of eNB is greater than eNB defined in configuration file %s (%d/%d)!",
g_conf_config_file_name, enb_nb, enb_nb_properties);
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++)
{
configure_phy(enb_id);
configure_rrc(enb_id);
}
# if defined(ENABLE_USE_MME)
/* Try to register each eNB */
registered_enb = 0;
register_enb_pending = eNB_app_register ();
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);
# else
/* Start L2L1 task */
msg_p = itti_alloc_new_message(TASK_ENB_APP, INITIALIZE_MESSAGE);
......@@ -245,7 +257,7 @@ void *eNB_app_task(void *args_p)
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
# if defined(OAI_EMU)
/* If also inform all NAS UE tasks */
/* Also inform all NAS UE tasks */
for (instance = NB_eNB_INST + oai_emulation.info.first_ue_local;
instance < (NB_eNB_INST + oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local); instance ++)
{
......@@ -270,7 +282,7 @@ void *eNB_app_task(void *args_p)
sleep(ENB_REGISTER_RETRY_DELAY);
/* Restart the registration process */
registered_enb = 0;
register_enb_pending = eNB_app_register ();
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);
}
}
}
......@@ -290,7 +302,7 @@ void *eNB_app_task(void *args_p)
{
/* Restart the registration process */
registered_enb = 0;
register_enb_pending = eNB_app_register ();
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);
}
break;
# endif
......
......@@ -48,19 +48,20 @@
#include "LAYER2/MAC/extern.h"
// Hard to find a defined value for max enb...
#define MAX_ENB 16
Enb_properties_t *g_enb_properties[MAX_ENB];
int g_num_enb_properties = 0;
int enb_config_init(char* lib_config_file_name_pP) {
int enb_config_init(char* lib_config_file_name_pP, Enb_properties_t **enb_properties) {
config_t cfg;
config_setting_t *setting;
config_setting_t *setting_mme_addresses;
config_setting_t *setting_mme_address;
config_setting_t *setting_enb;
int num_enbs, num_mme_address, i, j, parse_error = 0, enb_properties_index;
int num_enb_properties = 0;
int enb_properties_index = 0;
int num_enbs;
int num_mme_address;
int i;
int j;
int parse_error = 0;
long int enb_id;
const char* cell_type;
long int tac;
......@@ -78,9 +79,8 @@ int enb_config_init(char* lib_config_file_name_pP) {
char* preference;
const char* active_enb[MAX_ENB];
memset((char*)g_enb_properties, 0 , MAX_ENB * sizeof(Enb_properties_t*));
memset((char*)active_enb, 0 , MAX_ENB * sizeof(char*));
memset((char*)enb_properties, 0 , MAX_ENB * sizeof(Enb_properties_t*));
memset((char*)active_enb, 0 , MAX_ENB * sizeof(char*));
config_init(&cfg);
......@@ -102,7 +102,6 @@ int enb_config_init(char* lib_config_file_name_pP) {
}
// Get list of active eNBs, (only these will be configured)
g_num_enb_properties = 0;
setting = config_lookup(&cfg, ENB_CONFIG_STRING_ACTIVE_ENBS);
if(setting != NULL)
{
......@@ -114,7 +113,7 @@ int enb_config_init(char* lib_config_file_name_pP) {
"Failed to parse config file %s, %uth attribute %s \n",
lib_config_file_name_pP, i, ENB_CONFIG_STRING_ACTIVE_ENBS);
active_enb[i] = strdup(active_enb[i]);
g_num_enb_properties += 1;
num_enb_properties += 1;
}
}
......@@ -142,33 +141,33 @@ int enb_config_init(char* lib_config_file_name_pP) {
lib_config_file_name_pP, i);
}
// search if in active list
for (j=0; j < g_num_enb_properties; j++) {
for (j=0; j < num_enb_properties; j++) {
if (strcmp(active_enb[j], enb_name) == 0) {
g_enb_properties[enb_properties_index] = calloc(1, sizeof(Enb_properties_t));
enb_properties[enb_properties_index] = calloc(1, sizeof(Enb_properties_t));
g_enb_properties[enb_properties_index]->eNB_id = enb_id;
enb_properties[enb_properties_index]->eNB_id = enb_id;
if (strcmp(cell_type, "CELL_MACRO_ENB") == 0) {
g_enb_properties[enb_properties_index]->cell_type = CELL_MACRO_ENB;
enb_properties[enb_properties_index]->cell_type = CELL_MACRO_ENB;
} else if (strcmp(cell_type, "CELL_HOME_ENB") == 0) {
g_enb_properties[enb_properties_index]->cell_type = CELL_HOME_ENB;
enb_properties[enb_properties_index]->cell_type = CELL_HOME_ENB;
} else {
AssertError (0, parse_error ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
lib_config_file_name_pP, i, cell_type);
}
g_enb_properties[enb_properties_index]->eNB_name = strdup(enb_name);
g_enb_properties[enb_properties_index]->tac = (uint16_t)tac;
g_enb_properties[enb_properties_index]->mcc = (uint16_t)mcc;
g_enb_properties[enb_properties_index]->mnc = (uint16_t)mnc;
enb_properties[enb_properties_index]->eNB_name = strdup(enb_name);
enb_properties[enb_properties_index]->tac = (uint16_t)tac;
enb_properties[enb_properties_index]->mcc = (uint16_t)mcc;
enb_properties[enb_properties_index]->mnc = (uint16_t)mnc;
if (strcmp(default_drx, "PAGING_DRX_32") == 0) {
g_enb_properties[enb_properties_index]->default_drx = PAGING_DRX_32;
enb_properties[enb_properties_index]->default_drx = PAGING_DRX_32;
} else if (strcmp(default_drx, "PAGING_DRX_64") == 0) {
g_enb_properties[enb_properties_index]->default_drx = PAGING_DRX_64;
enb_properties[enb_properties_index]->default_drx = PAGING_DRX_64;
} else if (strcmp(default_drx, "PAGING_DRX_128") == 0) {
g_enb_properties[enb_properties_index]->default_drx = PAGING_DRX_128;
enb_properties[enb_properties_index]->default_drx = PAGING_DRX_128;
} else if (strcmp(default_drx, "PAGING_DRX_256") == 0) {
g_enb_properties[enb_properties_index]->default_drx = PAGING_DRX_256;
enb_properties[enb_properties_index]->default_drx = PAGING_DRX_256;
} else {
AssertError (0, parse_error ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for default_drx choice: PAGING_DRX_32..PAGING_DRX_256 !\n",
......@@ -178,47 +177,47 @@ int enb_config_init(char* lib_config_file_name_pP) {
// Parse optional physical parameters
if(config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_FRAME_TYPE, &frame_type)) {
if (strcmp(frame_type, "FDD") == 0) {
g_enb_properties[enb_properties_index]->frame_type = FDD;
enb_properties[enb_properties_index]->frame_type = FDD;
} else if (strcmp(frame_type, "TDD") == 0) {
g_enb_properties[enb_properties_index]->frame_type = TDD;
enb_properties[enb_properties_index]->frame_type = TDD;
} else {
AssertError (0, parse_error ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n",
lib_config_file_name_pP, i, frame_type);
}
} else {
g_enb_properties[enb_properties_index]->frame_type = FDD; // Default frame type
enb_properties[enb_properties_index]->frame_type = FDD; // Default frame type
}
if(config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_PREFIX_TYPE, &prefix_type)) {
if (strcmp(prefix_type, "NORMAL") == 0) {
g_enb_properties[enb_properties_index]->prefix_type = NORMAL;
enb_properties[enb_properties_index]->prefix_type = NORMAL;
} else if (strcmp(prefix_type, "EXTENDED") == 0) {
g_enb_properties[enb_properties_index]->prefix_type = EXTENDED;
enb_properties[enb_properties_index]->prefix_type = EXTENDED;
} else {
AssertError (0, parse_error ++,
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
lib_config_file_name_pP, i, prefix_type);
}
} else {
g_enb_properties[enb_properties_index]->prefix_type = NORMAL; // Default prefix type
enb_properties[enb_properties_index]->prefix_type = NORMAL; // Default prefix type
}
if(config_setting_lookup_int64(setting_enb, ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, &downlink_frequency)) {
g_enb_properties[enb_properties_index]->downlink_frequency = downlink_frequency;
enb_properties[enb_properties_index]->downlink_frequency = downlink_frequency;
} else {
g_enb_properties[enb_properties_index]->downlink_frequency = 2680000000UL; // Default downlink frequency
enb_properties[enb_properties_index]->downlink_frequency = 2680000000UL; // Default downlink frequency
}
if(config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, &uplink_frequency_offset)) {
g_enb_properties[enb_properties_index]->uplink_frequency_offset = uplink_frequency_offset;
enb_properties[enb_properties_index]->uplink_frequency_offset = uplink_frequency_offset;
} else {
g_enb_properties[enb_properties_index]->uplink_frequency_offset = -120000000; // Default uplink frequency offset
enb_properties[enb_properties_index]->uplink_frequency_offset = -120000000; // Default uplink frequency offset
}
setting_mme_addresses = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_MME_IP_ADDRESS);
num_mme_address = config_setting_length(setting_mme_addresses);
g_enb_properties[enb_properties_index]->nb_mme = 0;
enb_properties[enb_properties_index]->nb_mme = 0;
for (j = 0; j < num_mme_address; j++) {
setting_mme_address = config_setting_get_elem(setting_mme_addresses, j);
if( !(
......@@ -232,24 +231,24 @@ int enb_config_init(char* lib_config_file_name_pP) {
"Failed to parse eNB configuration file %s, %u th enb %u th mme address !\n",
lib_config_file_name_pP, i, j);
}
g_enb_properties[enb_properties_index]->nb_mme += 1;
enb_properties[enb_properties_index]->nb_mme += 1;
g_enb_properties[enb_properties_index]->mme_ip_address[j].ipv4_address = strdup(ipv4);
g_enb_properties[enb_properties_index]->mme_ip_address[j].ipv6_address = strdup(ipv6);
enb_properties[enb_properties_index]->mme_ip_address[j].ipv4_address = strdup(ipv4);
enb_properties[enb_properties_index]->mme_ip_address[j].ipv6_address = strdup(ipv6);
if (strcmp(active, "yes") == 0) {
g_enb_properties[enb_properties_index]->mme_ip_address[j].active = 1;
enb_properties[enb_properties_index]->mme_ip_address[j].active = 1;
#if defined(ENABLE_USE_MME)
EPC_MODE_ENABLED = 1;
#endif
} // else { (calloc)
if (strcmp(preference, "ipv4") == 0) {
g_enb_properties[enb_properties_index]->mme_ip_address[j].ipv4 = 1;
enb_properties[enb_properties_index]->mme_ip_address[j].ipv4 = 1;
} else if (strcmp(preference, "ipv6") == 0) {
g_enb_properties[enb_properties_index]->mme_ip_address[j].ipv6 = 1;
enb_properties[enb_properties_index]->mme_ip_address[j].ipv6 = 1;
} else if (strcmp(preference, "no") == 0) {
g_enb_properties[enb_properties_index]->mme_ip_address[j].ipv4 = 1;
g_enb_properties[enb_properties_index]->mme_ip_address[j].ipv6 = 1;
enb_properties[enb_properties_index]->mme_ip_address[j].ipv4 = 1;
enb_properties[enb_properties_index]->mme_ip_address[j].ipv6 = 1;
}
}
enb_properties_index += 1;
......@@ -258,12 +257,12 @@ int enb_config_init(char* lib_config_file_name_pP) {
}
}
}
AssertError (enb_properties_index == g_num_enb_properties, parse_error ++,
AssertError (enb_properties_index == num_enb_properties, parse_error ++,
"Failed to parse eNB configuration file %s, mismatch between %u active eNBs and %u corresponding defined eNBs !\n",
lib_config_file_name_pP, g_num_enb_properties, enb_properties_index);
lib_config_file_name_pP, num_enb_properties, enb_properties_index);
AssertFatal (parse_error == 0,
"Failed to parse eNB configuration file %s, found %d error%s !\n",
lib_config_file_name_pP, parse_error, parse_error > 1 ? "s" : "");
return 0;
return num_enb_properties;
}
......@@ -35,6 +35,9 @@
#include "PHY/impl_defs_lte.h"
#include "s1ap_messages_types.h"
// Hard to find a defined value for max enb...
#define MAX_ENB 16
#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
struct in_addr inp;\
if ( inet_aton(AdDr_StR, &inp ) < 0 ) {\
......@@ -43,35 +46,37 @@
NwBo = inp.s_addr;\
}\
} while (0);
#define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs"
#define ENB_CONFIG_STRING_ENB_LIST "eNBs"
#define ENB_CONFIG_STRING_ENB_ID "eNB_ID"
#define ENB_CONFIG_STRING_CELL_TYPE "cell_type"
#define ENB_CONFIG_STRING_ENB_NAME "eNB_name"
#define ENB_CONFIG_STRING_TRACKING_AREA_CODE "tracking_area_code"
#define ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE "mobile_country_code"
#define ENB_CONFIG_STRING_MOBILE_NETWORK_CODE "mobile_network_code"
#define ENB_CONFIG_STRING_DEFAULT_PAGING_DRX "default_paging_drx"
#define ENB_CONFIG_STRING_FRAME_TYPE "frame_type"
#define ENB_CONFIG_STRING_PREFIX_TYPE "prefix_type"
#define ENB_CONFIG_STRING_DOWNLINK_FREQUENCY "downlink_frequency"
#define ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET "uplink_frequency_offset"
#define ENB_CONFIG_STRING_MME_IP_ADDRESS "mme_ip_address"
#define ENB_CONFIG_STRING_MME_IPV4_ADDRESS "ipv4"
#define ENB_CONFIG_STRING_MME_IPV6_ADDRESS "ipv6"
#define ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE "active"
#define ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE "preference"
#define ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES"
#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME"
#define ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME "ENB_IPV4_ADDRESS_FOR_S1_MME"
#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U "ENB_INTERFACE_NAME_FOR_S1U"
#define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U "ENB_IPV4_ADDRESS_FOR_S1U"
#define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs"
#define ENB_CONFIG_STRING_ENB_LIST "eNBs"
#define ENB_CONFIG_STRING_ENB_ID "eNB_ID"
#define ENB_CONFIG_STRING_CELL_TYPE "cell_type"
#define ENB_CONFIG_STRING_ENB_NAME "eNB_name"
#define ENB_CONFIG_STRING_TRACKING_AREA_CODE "tracking_area_code"
#define ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE "mobile_country_code"
#define ENB_CONFIG_STRING_MOBILE_NETWORK_CODE "mobile_network_code"
#define ENB_CONFIG_STRING_DEFAULT_PAGING_DRX "default_paging_drx"
#define ENB_CONFIG_STRING_FRAME_TYPE "frame_type"
#define ENB_CONFIG_STRING_PREFIX_TYPE "prefix_type"
#define ENB_CONFIG_STRING_DOWNLINK_FREQUENCY "downlink_frequency"
#define ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET "uplink_frequency_offset"
#define ENB_CONFIG_STRING_MME_IP_ADDRESS "mme_ip_address"
#define ENB_CONFIG_STRING_MME_IPV4_ADDRESS "ipv4"
#define ENB_CONFIG_STRING_MME_IPV6_ADDRESS "ipv6"
#define ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE "active"
#define ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE "preference"
#define ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG "NETWORK_INTERFACES"
#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME"
#define ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME "ENB_IPV4_ADDRESS_FOR_S1_MME"
#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U "ENB_INTERFACE_NAME_FOR_S1U"
#define ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U "ENB_IPV4_ADDRESS_FOR_S1U"
typedef struct mme_ip_address_s {
unsigned ipv4:1;
unsigned ipv6:1;
......@@ -119,15 +124,14 @@ typedef struct Enb_properties_s {
/* List of MME to connect to */
mme_ip_address_t mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS];
char *enb_interface_name_for_S1U;
uint32_t enb_ipv4_address_for_S1U;
char *enb_interface_name_for_S1U;
uint32_t enb_ipv4_address_for_S1U;
char *enb_interface_name_for_S1_MME;
uint32_t enb_ipv4_address_for_S1_MME;
char *enb_interface_name_for_S1_MME;
uint32_t enb_ipv4_address_for_S1_MME;
} Enb_properties_t;
int enb_config_init(char* lib_config_file_name_pP);
int enb_config_init(char* lib_config_file_name_pP, Enb_properties_t **enb_properties);
#endif /* ENB_CONFIG_H_ */
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