Commit 8baf3e7e authored by Xenofon Foukas's avatar Xenofon Foukas

Changed naming convention for flexran related calls

parent 0cee514c
...@@ -621,7 +621,7 @@ add_boolean_option(MESSAGE_CHART_GENERATOR False "For generating sequenc ...@@ -621,7 +621,7 @@ add_boolean_option(MESSAGE_CHART_GENERATOR False "For generating sequenc
add_boolean_option(MESSAGE_CHART_GENERATOR_RLC_MAC False "trace RLC-MAC exchanges in sequence diagrams") add_boolean_option(MESSAGE_CHART_GENERATOR_RLC_MAC False "trace RLC-MAC exchanges in sequence diagrams")
add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchanges in sequence diagrams") add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchanges in sequence diagrams")
add_boolean_option(ENB_AGENT_SB_IF True "enable eNB agent to inteface with a SDN contrller") add_boolean_option(FLEXRAN_AGENT_SB_IF True "enable FlexRAN agent to inteface with a SDN contrller")
######################## ########################
# Include order # Include order
...@@ -838,7 +838,7 @@ include_directories("${OPENAIR_DIR}") ...@@ -838,7 +838,7 @@ include_directories("${OPENAIR_DIR}")
# Utilities Library # Utilities Library
################ ################
if (ENB_AGENT_SB_IF) if (FLEXRAN_AGENT_SB_IF)
# set the version of protobuf messages, V3 not supported yet # set the version of protobuf messages, V3 not supported yet
add_list1_option(FLPT_VERSION V2 "FLPT MSG protobuf grammar version" V2 V3) add_list1_option(FLPT_VERSION V2 "FLPT MSG protobuf grammar version" V2 V3)
...@@ -899,18 +899,18 @@ if (ENB_AGENT_SB_IF) ...@@ -899,18 +899,18 @@ if (ENB_AGENT_SB_IF)
set(ASYNC_IF_LIB ASYNC_IF) set(ASYNC_IF_LIB ASYNC_IF)
include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF) include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF)
add_library(ENB_AGENT add_library(FLEXRAN_AGENT
${OPENAIR2_DIR}/ENB_APP/enb_agent_handler.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_handler.c
${OPENAIR2_DIR}/ENB_APP/enb_agent_common.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_common.c
${OPENAIR2_DIR}/ENB_APP/enb_agent_common_internal.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_common_internal.c
${OPENAIR2_DIR}/ENB_APP/enb_agent_mac.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_mac.c
${OPENAIR2_DIR}/ENB_APP/enb_agent.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent.c
${OPENAIR2_DIR}/ENB_APP/enb_agent_task_manager.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_task_manager.c
${OPENAIR2_DIR}/ENB_APP/enb_agent_net_comm.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_net_comm.c
${OPENAIR2_DIR}/ENB_APP/enb_agent_async.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_async.c
${OPENAIR2_DIR}/ENB_APP/enb_agent_mac_internal.c ${OPENAIR2_DIR}/ENB_APP/flexran_agent_mac_internal.c
) )
set(ENB_AGENT_LIB ENB_AGENT) set(FLEXRAN_AGENT_LIB FLEXRAN_AGENT)
#include_directories(${OPENAIR2_DIR}/ENB_APP) #include_directories(${OPENAIR2_DIR}/ENB_APP)
set(PROTOBUF_LIB "protobuf-c") set(PROTOBUF_LIB "protobuf-c")
...@@ -1184,9 +1184,9 @@ set (MAC_SRC ...@@ -1184,9 +1184,9 @@ set (MAC_SRC
${MAC_DIR}/eNB_scheduler_RA.c ${MAC_DIR}/eNB_scheduler_RA.c
${MAC_DIR}/pre_processor.c ${MAC_DIR}/pre_processor.c
${MAC_DIR}/config.c ${MAC_DIR}/config.c
${MAC_DIR}/eNB_agent_scheduler_dlsch_ue.c ${MAC_DIR}/flexran_agent_scheduler_dlsch_ue.c
${MAC_DIR}/eNB_agent_scheduler_dataplane.c ${MAC_DIR}/flexran_agent_scheduler_dataplane.c
${MAC_DIR}/eNB_agent_scheduler_dlsch_ue_remote.c ${MAC_DIR}/flexran_agent_scheduler_dlsch_ue_remote.c
) )
set (ENB_APP_SRC set (ENB_APP_SRC
...@@ -1201,8 +1201,8 @@ add_library(L2 ...@@ -1201,8 +1201,8 @@ add_library(L2
# ${OPENAIR2_DIR}/RRC/L2_INTERFACE/openair_rrc_L2_interface.c) # ${OPENAIR2_DIR}/RRC/L2_INTERFACE/openair_rrc_L2_interface.c)
#Test for adding a shared library #Test for adding a shared library
add_library(default_sched SHARED ${MAC_DIR}/eNB_agent_scheduler_dlsch_ue.c) add_library(default_sched SHARED ${MAC_DIR}/flexran_agent_scheduler_dlsch_ue.c)
add_library(remote_sched SHARED ${MAC_DIR}/eNB_agent_scheduler_dlsch_ue_remote.c) add_library(remote_sched SHARED ${MAC_DIR}/flexran_agent_scheduler_dlsch_ue_remote.c)
# L3 Libs # L3 Libs
########################## ##########################
...@@ -1757,7 +1757,7 @@ add_executable(lte-softmodem ...@@ -1757,7 +1757,7 @@ add_executable(lte-softmodem
target_link_libraries (lte-softmodem -ldl target_link_libraries (lte-softmodem -ldl
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ENB_AGENT_LIB} LFDS7 RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
...@@ -1791,7 +1791,7 @@ add_executable(lte-softmodem-nos1 ...@@ -1791,7 +1791,7 @@ add_executable(lte-softmodem-nos1
) )
target_link_libraries (lte-softmodem-nos1 target_link_libraries (lte-softmodem-nos1
-Wl,--start-group -Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ENB_AGENT_LIB} LFDS7 RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
...@@ -1936,7 +1936,7 @@ add_executable(oaisim_nos1 ...@@ -1936,7 +1936,7 @@ add_executable(oaisim_nos1
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim_nos1 target_link_libraries (oaisim_nos1
-Wl,--start-group -Wl,--start-group
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ENB_AGENT_LIB} LFDS7 RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
......
...@@ -63,9 +63,9 @@ ...@@ -63,9 +63,9 @@
//Agent-related headers //Agent-related headers
#include "ENB_APP/enb_agent_extern.h" #include "ENB_APP/flexran_agent_extern.h"
#include "ENB_APP/enb_agent_mac.h" #include "ENB_APP/flexran_agent_mac.h"
#include "LAYER2/MAC/enb_agent_mac_proto.h" #include "LAYER2/MAC/flexran_agent_mac_proto.h"
//#define DIAG_PHY //#define DIAG_PHY
...@@ -1372,7 +1372,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -1372,7 +1372,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
#ifndef DISABLE_SF_TRIGGER #ifndef DISABLE_SF_TRIGGER
//Send subframe trigger to the controller //Send subframe trigger to the controller
if (mac_agent_registered[eNB->Mod_id]) { if (mac_agent_registered[eNB->Mod_id]) {
agent_mac_xface[eNB->Mod_id]->enb_agent_send_sf_trigger(eNB->Mod_id); agent_mac_xface[eNB->Mod_id]->flexran_agent_send_sf_trigger(eNB->Mod_id);
} }
#endif #endif
......
...@@ -56,7 +56,7 @@ TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200) ...@@ -56,7 +56,7 @@ TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200)
/// eNB APP task /// eNB APP task
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200) TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200)
/// eNB Agent task /// eNB Agent task
TASK_DEF(TASK_ENB_AGENT, TASK_PRIORITY_MED, 200) TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200)
// UE tasks and sub-tasks: // UE tasks and sub-tasks:
//// Layer 2 and Layer 1 sub-tasks //// Layer 2 and Layer 1 sub-tasks
......
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
# include "gtpv1u_eNB_task.h" # include "gtpv1u_eNB_task.h"
# endif # endif
#if defined(ENB_AGENT_SB_IF) #if defined(FLEXRAN_AGENT_SB_IF)
# include "enb_agent.h" # include "flexran_agent.h"
#endif #endif
extern unsigned char NB_eNB_INST; extern unsigned char NB_eNB_INST;
...@@ -314,11 +314,11 @@ void *eNB_app_task(void *args_p) ...@@ -314,11 +314,11 @@ void *eNB_app_task(void *args_p)
configure_rrc(enb_id, enb_properties_p); configure_rrc(enb_id, enb_properties_p);
} }
#if defined (ENB_AGENT_SB_IF) #if defined (FLEXRAN_AGENT_SB_IF)
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++) {
printf("\n start enb agent %d\n", enb_id); printf("\n start enb agent %d\n", enb_id);
enb_agent_start(enb_id, enb_properties_p); flexran_agent_start(enb_id, enb_properties_p);
} }
#endif #endif
......
...@@ -191,10 +191,10 @@ ...@@ -191,10 +191,10 @@
#define ENB_CONFIG_STRING_ENB_PORT_FOR_S1U "ENB_PORT_FOR_S1U" #define ENB_CONFIG_STRING_ENB_PORT_FOR_S1U "ENB_PORT_FOR_S1U"
#define ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG "NETWORK_CONTROLLER" #define ENB_CONFIG_STRING_NETWORK_CONTROLLER_CONFIG "NETWORK_CONTROLLER"
#define ENB_CONFIG_STRING_ENB_AGENT_INTERFACE_NAME "ENB_AGENT_INTERFACE_NAME" #define ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME "FLEXRAN_AGENT_INTERFACE_NAME"
#define ENB_CONFIG_STRING_ENB_AGENT_IPV4_ADDRESS "ENB_AGENT_IPV4_ADDRESS" #define ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS "FLEXRAN_AGENT_IPV4_ADDRESS"
#define ENB_CONFIG_STRING_ENB_AGENT_PORT "ENB_AGENT_PORT" #define ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT "FLEXRAN_AGENT_PORT"
#define ENB_CONFIG_STRING_ENB_AGENT_CACHE "ENB_AGENT_CACHE" #define ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE "FLEXRAN_AGENT_CACHE"
#define ENB_CONFIG_STRING_RRH_GW_CONFIG "rrh_gw_config" #define ENB_CONFIG_STRING_RRH_GW_CONFIG "rrh_gw_config"
#define ENB_CONFIG_STRING_RRH_GW_LOCAL_IF_NAME "local_if_name" #define ENB_CONFIG_STRING_RRH_GW_LOCAL_IF_NAME "local_if_name"
...@@ -341,12 +341,12 @@ void enb_config_display(void) ...@@ -341,12 +341,12 @@ void enb_config_display(void)
} }
} }
#if defined(ENB_AGENT_SB_IF) #if defined(FLEXRAN_AGENT_SB_IF)
printf( "\nENB AGENT CONFIG : \n\n"); printf( "\nFLEXRAN AGENT CONFIG : \n\n");
printf( "\tInterface name: \t%s:\n",enb_properties.properties[i]->enb_agent_interface_name); printf( "\tInterface name: \t%s:\n",enb_properties.properties[i]->flexran_agent_interface_name);
printf( "\tInterface IP Address: \t%s:\n",enb_properties.properties[i]->enb_agent_ipv4_address); printf( "\tInterface IP Address: \t%s:\n",enb_properties.properties[i]->flexran_agent_ipv4_address);
printf( "\tInterface PORT: \t%d:\n\n",enb_properties.properties[i]->enb_agent_port); printf( "\tInterface PORT: \t%d:\n\n",enb_properties.properties[i]->flexran_agent_port);
printf( "\tCache directory: \t%s:\n",enb_properties.properties[i]->enb_agent_cache); printf( "\tCache directory: \t%s:\n",enb_properties.properties[i]->flexran_agent_cache);
#endif #endif
...@@ -674,10 +674,10 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -674,10 +674,10 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
char *address = NULL; char *address = NULL;
char *cidr = NULL; char *cidr = NULL;
char *astring = NULL; char *astring = NULL;
char* enb_agent_interface_name = NULL; char* flexran_agent_interface_name = NULL;
char* enb_agent_ipv4_address = NULL; char* flexran_agent_ipv4_address = NULL;
libconfig_int enb_agent_port = 0; libconfig_int flexran_agent_port = 0;
char* enb_agent_cache = NULL; char* flexran_agent_cache = NULL;
libconfig_int otg_ue_id = 0; libconfig_int otg_ue_id = 0;
char* otg_app_type = NULL; char* otg_app_type = NULL;
char* otg_bg_traffic = NULL; char* otg_bg_traffic = NULL;
...@@ -2481,26 +2481,26 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) ...@@ -2481,26 +2481,26 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
if (subsetting != NULL) { if (subsetting != NULL) {
if ( ( if ( (
config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_AGENT_INTERFACE_NAME, config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_INTERFACE_NAME,
(const char **)&enb_agent_interface_name) (const char **)&flexran_agent_interface_name)
&& config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_AGENT_IPV4_ADDRESS, && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_IPV4_ADDRESS,
(const char **)&enb_agent_ipv4_address) (const char **)&flexran_agent_ipv4_address)
&& config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_ENB_AGENT_PORT, && config_setting_lookup_int(subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_PORT,
&enb_agent_port) &flexran_agent_port)
&& config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_AGENT_CACHE, && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_FLEXRAN_AGENT_CACHE,
(const char **)&enb_agent_cache) (const char **)&flexran_agent_cache)
) )
) { ) {
enb_properties.properties[enb_properties_index]->enb_agent_interface_name = strdup(enb_agent_interface_name); enb_properties.properties[enb_properties_index]->flexran_agent_interface_name = strdup(flexran_agent_interface_name);
cidr = enb_agent_ipv4_address; cidr = flexran_agent_ipv4_address;
address = strtok(cidr, "/"); address = strtok(cidr, "/");
enb_properties.properties[enb_properties_index]->enb_agent_ipv4_address = strdup(address); enb_properties.properties[enb_properties_index]->flexran_agent_ipv4_address = strdup(address);
/* if (address) { /* if (address) {
IPV4_STR_ADDR_TO_INT_NWBO (address, enb_properties.properties[enb_properties_index]->enb_agent_ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB Agent !\n" ); IPV4_STR_ADDR_TO_INT_NWBO (address, enb_properties.properties[enb_properties_index]->flexran_agent_ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB Agent !\n" );
}*/ }*/
enb_properties.properties[enb_properties_index]->enb_agent_port = enb_agent_port; enb_properties.properties[enb_properties_index]->flexran_agent_port = flexran_agent_port;
enb_properties.properties[enb_properties_index]->enb_agent_cache = strdup(enb_agent_cache); enb_properties.properties[enb_properties_index]->flexran_agent_cache = strdup(flexran_agent_cache);
} }
} }
......
...@@ -228,10 +228,10 @@ typedef struct Enb_properties_s { ...@@ -228,10 +228,10 @@ typedef struct Enb_properties_s {
char *enb_interface_name_for_S1_MME; char *enb_interface_name_for_S1_MME;
in_addr_t enb_ipv4_address_for_S1_MME; in_addr_t enb_ipv4_address_for_S1_MME;
char *enb_agent_interface_name; char *flexran_agent_interface_name;
in_addr_t enb_agent_ipv4_address; in_addr_t flexran_agent_ipv4_address;
tcp_udp_port_t enb_agent_port; tcp_udp_port_t flexran_agent_port;
char *enb_agent_cache; char *flexran_agent_cache;
/* Nb of RRH to connect to */ /* Nb of RRH to connect to */
uint8_t nb_rrh_gw; uint8_t nb_rrh_gw;
......
...@@ -28,28 +28,28 @@ ...@@ -28,28 +28,28 @@
*******************************************************************************/ *******************************************************************************/
/*! \file enb_agent.h /*! \file flexran_agent.h
* \brief top level enb agent * \brief top level flexran agent
* \author Navid Nikaein and Xenofon Foukas * \author Navid Nikaein and Xenofon Foukas
* \date 2016 * \date 2016
* \version 0.1 * \version 0.1
*/ */
#ifndef ENB_AGENT_H_ #ifndef FLEXRAN_AGENT_H_
#define ENB_AGENT_H_ #define FLEXRAN_AGENT_H_
#include "enb_config.h" // for enb properties #include "enb_config.h" // for enb properties
#include "enb_agent_common.h" #include "flexran_agent_common.h"
/* Initiation and termination of the eNodeB agent */ /* Initiation and termination of the eNodeB agent */
int enb_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properties); int flexran_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properties);
int enb_agent_stop(mid_t mod_id); int flexran_agent_stop(mid_t mod_id);
/* /*
* enb agent task mainly wakes up the tx thread for periodic and oneshot messages to the controller * enb agent task mainly wakes up the tx thread for periodic and oneshot messages to the controller
* and can interact with other itti tasks * and can interact with other itti tasks
*/ */
void *enb_agent_task(void *args); void *flexran_agent_task(void *args);
#endif #endif
...@@ -27,22 +27,22 @@ ...@@ -27,22 +27,22 @@
*******************************************************************************/ *******************************************************************************/
/*! \file enb_agent_async.c /*! \file flexran_agent_async.c
* \brief channel implementation for async interface * \brief channel implementation for async interface
* \author Xenofon Foukas * \author Xenofon Foukas
* \date 2016 * \date 2016
* \version 0.1 * \version 0.1
*/ */
#include "enb_agent_async.h" #include "flexran_agent_async.h"
#include "enb_agent_defs.h" #include "flexran_agent_defs.h"
#include "log.h" #include "log.h"
enb_agent_async_channel_t * enb_agent_async_channel_info(mid_t mod_id, char *dst_ip, uint16_t dst_port) { flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, char *dst_ip, uint16_t dst_port) {
enb_agent_async_channel_t *channel; flexran_agent_async_channel_t *channel;
channel = (enb_agent_async_channel_t *) malloc(sizeof(enb_agent_channel_t)); channel = (flexran_agent_async_channel_t *) malloc(sizeof(flexran_agent_channel_t));
if (channel == NULL) if (channel == NULL)
goto error; goto error;
...@@ -52,7 +52,7 @@ enb_agent_async_channel_t * enb_agent_async_channel_info(mid_t mod_id, char *dst ...@@ -52,7 +52,7 @@ enb_agent_async_channel_t * enb_agent_async_channel_info(mid_t mod_id, char *dst
channel->link = new_link_client(dst_ip, dst_port); channel->link = new_link_client(dst_ip, dst_port);
if (channel->link == NULL) goto error; if (channel->link == NULL) goto error;
LOG_I(ENB_AGENT,"starting enb agent client for module id %d on ipv4 %s, port %d\n", LOG_I(FLEXRAN_AGENT,"starting enb agent client for module id %d on ipv4 %s, port %d\n",
channel->enb_id, channel->enb_id,
dst_ip, dst_ip,
dst_port); dst_port);
...@@ -75,27 +75,27 @@ enb_agent_async_channel_t * enb_agent_async_channel_info(mid_t mod_id, char *dst ...@@ -75,27 +75,27 @@ enb_agent_async_channel_t * enb_agent_async_channel_info(mid_t mod_id, char *dst
return channel; return channel;
error: error:
LOG_I(ENB_AGENT,"there was an error\n"); LOG_I(FLEXRAN_AGENT,"there was an error\n");
return 1; return 1;
} }
int enb_agent_async_msg_send(void *data, int size, int priority, void *channel_info) { int flexran_agent_async_msg_send(void *data, int size, int priority, void *channel_info) {
enb_agent_async_channel_t *channel; flexran_agent_async_channel_t *channel;
channel = (enb_agent_channel_t *)channel_info; channel = (flexran_agent_channel_t *)channel_info;
return message_put(channel->send_queue, data, size, priority); return message_put(channel->send_queue, data, size, priority);
} }
int enb_agent_async_msg_recv(void **data, int *size, int *priority, void *channel_info) { int flexran_agent_async_msg_recv(void **data, int *size, int *priority, void *channel_info) {
enb_agent_async_channel_t *channel; flexran_agent_async_channel_t *channel;
channel = (enb_agent_async_channel_t *)channel_info; channel = (flexran_agent_async_channel_t *)channel_info;
return message_get(channel->receive_queue, data, size, priority); return message_get(channel->receive_queue, data, size, priority);
} }
void enb_agent_async_release(enb_agent_channel_t *channel) { void flexran_agent_async_release(flexran_agent_channel_t *channel) {
enb_agent_async_channel_t *channel_info; flexran_agent_async_channel_t *channel_info;
channel_info = (enb_agent_async_channel_t *) channel->channel_info; channel_info = (flexran_agent_async_channel_t *) channel->channel_info;
destroy_link_manager(channel_info->manager); destroy_link_manager(channel_info->manager);
......
...@@ -27,17 +27,17 @@ ...@@ -27,17 +27,17 @@
*******************************************************************************/ *******************************************************************************/
/*! \file enb_agent_async.h /*! \file flexran_agent_async.h
* \brief channel implementation for async interface * \brief channel implementation for async interface
* \author Xenofon Foukas * \author Xenofon Foukas
* \date 2016 * \date 2016
* \version 0.1 * \version 0.1
*/ */
#ifndef ENB_AGENT_ASYNC_H_ #ifndef FLEXRAN_AGENT_ASYNC_H_
#define ENB_AGENT_ASYNC_H_ #define FLEXRAN_AGENT_ASYNC_H_
#include "enb_agent_net_comm.h" #include "flexran_agent_net_comm.h"
typedef struct { typedef struct {
mid_t enb_id; mid_t enb_id;
...@@ -45,19 +45,19 @@ typedef struct { ...@@ -45,19 +45,19 @@ typedef struct {
message_queue_t *send_queue; message_queue_t *send_queue;
message_queue_t *receive_queue; message_queue_t *receive_queue;
link_manager_t *manager; link_manager_t *manager;
} enb_agent_async_channel_t; } flexran_agent_async_channel_t;
/* Create a new channel for a given destination ip and destination port */ /* Create a new channel for a given destination ip and destination port */
enb_agent_async_channel_t * enb_agent_async_channel_info(mid_t mod_id, char *dst_ip, uint16_t dst_port); flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, char *dst_ip, uint16_t dst_port);
/* Send a message to the given channel */ /* Send a message to the given channel */
int enb_agent_async_msg_send(void *data, int size, int priority, void *channel_info); int flexran_agent_async_msg_send(void *data, int size, int priority, void *channel_info);
/* Receive a message from a given channel */ /* Receive a message from a given channel */
int enb_agent_async_msg_recv(void **data, int *size, int *priority, void *channel_info); int flexran_agent_async_msg_recv(void **data, int *size, int *priority, void *channel_info);
/* Release a channel */ /* Release a channel */
void enb_agent_async_release(enb_agent_channel_t *channel); void flexran_agent_async_release(flexran_agent_channel_t *channel);
#endif /*ENB_AGENT_ASYNC_H_*/ #endif /*FLEXRAN_AGENT_ASYNC_H_*/
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
*******************************************************************************/ *******************************************************************************/
/*! \file enb_agent_common_internal.c /*! \file flexran_agent_common_internal.c
* \brief internal functions for common message primitves and utilities * \brief internal functions for common message primitves and utilities
* \author Xenofon Foukas * \author Xenofon Foukas
* \date 2016 * \date 2016
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "enb_agent_common_internal.h" #include "flexran_agent_common_internal.h"
#include "enb_agent_mac_internal.h" #include "flexran_agent_mac_internal.h"
int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy_length) { int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy_length) {
......
...@@ -27,19 +27,19 @@ ...@@ -27,19 +27,19 @@
*******************************************************************************/ *******************************************************************************/
/*! \file enb_agent_common_internal.h /*! \file flexran_agent_common_internal.h
* \brief internal agent functions for common message primitves and utilities * \brief internal agent functions for common message primitves and utilities
* \author Xenofon Foukas * \author Xenofon Foukas
* \date 2016 * \date 2016
* \version 0.1 * \version 0.1
*/ */
#ifndef ENB_AGENT_COMMON_INTERNAL_H_ #ifndef FLEXRAN_AGENT_COMMON_INTERNAL_H_
#define ENB_AGENT_COMMON_INTERNAL_H_ #define FLEXRAN_AGENT_COMMON_INTERNAL_H_
#include <yaml.h> #include <yaml.h>
#include "enb_agent_defs.h" #include "flexran_agent_defs.h"
int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy_length); int apply_reconfiguration_policy(mid_t mod_id, const char *policy, size_t policy_length);
......
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
*******************************************************************************/ *******************************************************************************/
/*! \file enb_agent_defs.h /*! \file flexran_agent_defs.h
* \brief enb agent common definitions * \brief FlexRAN agent common definitions
* \author Navid Nikaein and Xenofon Foukas * \author Navid Nikaein and Xenofon Foukas
* \date 2016 * \date 2016
* \version 0.1 * \version 0.1
*/ */
#ifndef ENB_AGENT_DEFS_H_ #ifndef FLEXRAN_AGENT_DEFS_H_
#define ENB_AGENT_DEFS_H_ #define FLEXRAN_AGENT_DEFS_H_
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -45,54 +45,54 @@ ...@@ -45,54 +45,54 @@
#define NUM_MAX_ENB 2 #define NUM_MAX_ENB 2
#define NUM_MAX_UE 2048 #define NUM_MAX_UE 2048
#define DEFAULT_ENB_AGENT_IPv4_ADDRESS "127.0.0.1" #define DEFAULT_FLEXRAN_AGENT_IPv4_ADDRESS "127.0.0.1"
#define DEFAULT_ENB_AGENT_PORT 2210 #define DEFAULT_FLEXRAN_AGENT_PORT 2210
#define DEFAULT_ENB_AGENT_CACHE "/mnt/oai_agent_cache" #define DEFAULT_FLEXRAN_AGENT_CACHE "/mnt/oai_agent_cache"
typedef enum { typedef enum {
ENB_AGENT_DEFAULT=0, FLEXRAN_AGENT_DEFAULT=0,
ENB_AGENT_PHY=1, FLEXRAN_AGENT_PHY=1,
ENB_AGENT_MAC=2, FLEXRAN_AGENT_MAC=2,
ENB_AGENT_RLC=3, FLEXRAN_AGENT_RLC=3,
ENB_AGENT_PDCP=4, FLEXRAN_AGENT_PDCP=4,
ENB_AGENT_RRC=5, FLEXRAN_AGENT_RRC=5,
ENB_AGENT_S1AP=6, FLEXRAN_AGENT_S1AP=6,
ENB_AGENT_GTP=7, FLEXRAN_AGENT_GTP=7,
ENB_AGENT_X2AP=8, FLEXRAN_AGENT_X2AP=8,
ENB_AGENT_MAX=9, FLEXRAN_AGENT_MAX=9,
} agent_id_t; } agent_id_t;
typedef enum { typedef enum {
/* no action */ /* no action */
ENB_AGENT_ACTION_NONE = 0x0, FLEXRAN_AGENT_ACTION_NONE = 0x0,
/* send action */ /* send action */
ENB_AGENT_ACTION_SEND = 0x1, FLEXRAN_AGENT_ACTION_SEND = 0x1,
/* apply action */ /* apply action */
ENB_AGENT_ACTION_APPLY = 0x2, FLEXRAN_AGENT_ACTION_APPLY = 0x2,