Commit e5a64b45 authored by frtabu's avatar frtabu

fix compilation warning

parent f2628811
......@@ -250,7 +250,7 @@ add_boolean_option(UE_DEBUG_TRACE False "Activate UE debug trace")
add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace")
add_boolean_option(DISABLE_LOG_X False "Deactivate all LOG_* macros")
add_boolean_option(USRP_REC_PLAY False "Enable USRP record playback mode")
add_boolean_option(UE_NAS_USE_TUN False "Enable UE NAS TUN device instead of ue_ip.ko")
#add_boolean_option(UE_NAS_USE_TUN False "Enable UE NAS TUN device instead of ue_ip.ko")
add_boolean_option(BASIC_SIMULATOR False "Has to be True when building the basic simulator, False otherwise")
add_boolean_option(DEBUG_CONSOLE False "makes debugging easier, disables stdout/stderr buffering")
......
......@@ -936,7 +936,7 @@ fi
echo "set (LINUX True )" >> $cmake_file
echo "set (PDCP_USE_NETLINK True )" >> $cmake_file
echo "set (BASIC_SIMULATOR \"True\" )" >> $cmake_file
echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
# echo "set (UE_NAS_USE_TUN \"True\" )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)' >> $cmake_file
echo_info "Build UE"
......
......@@ -44,9 +44,8 @@ Description Defines EPS Mobility Management messages
#include "TLVDecoder.h"
#include "TLVEncoder.h"
#if ((defined(NAS_BUILT_IN_EPC) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(NAS_BUILT_IN_UE) && defined(NAS_UE)))
# include "nas_itti_messaging.h"
#endif
#include "nas_itti_messaging.h"
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
......@@ -89,8 +88,6 @@ int emm_msg_decode(EMM_msg *msg, uint8_t *buffer, uint32_t len)
int header_result;
int decode_result;
#if ((defined(NAS_BUILT_IN_EPC) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(NAS_BUILT_IN_UE) && defined(NAS_UE)))
uint8_t *buffer_log = buffer;
uint32_t len_log = len;
int down_link;
......@@ -100,7 +97,7 @@ int emm_msg_decode(EMM_msg *msg, uint8_t *buffer, uint32_t len)
# else
down_link = 1;
# endif
#endif
/* First decode the EMM message header */
header_result = _emm_msg_decode_header(&msg->header, buffer, len);
......@@ -291,7 +288,7 @@ int emm_msg_encode(EMM_msg *msg, uint8_t *buffer, uint32_t len)
int header_result;
int encode_result;
#if ((defined(NAS_BUILT_IN_EPC) && defined(NAS_MME)) || (defined(ENABLE_NAS_UE_LOGGING) && defined(NAS_BUILT_IN_UE) && defined(NAS_UE)))
uint8_t *buffer_log = buffer;
int down_link;
......@@ -300,7 +297,7 @@ int emm_msg_encode(EMM_msg *msg, uint8_t *buffer, uint32_t len)
# else
down_link = 0;
# endif
#endif
/* First encode the EMM message header */
header_result = _emm_msg_encode_header(&msg->header, buffer, len);
......
......@@ -48,21 +48,17 @@ Description Defines functions used to handle EPS bearer contexts.
#include "emm_sap.h"
#include "system.h"
#if defined(ENABLE_ITTI)
# include "assertions.h"
#endif
#include "assertions.h"
#include "pdcp.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef PDCP_USE_NETLINK
#ifdef UESIM_EXPANSION
#include "openairinterface5g_limits.h"
extern uint16_t inst_pdcp_list[NUMBER_OF_UE_MAX];
#endif
#endif
extern uint8_t nfapi_mode;
/****************************************************************************/
......@@ -282,10 +278,10 @@ int esm_ebr_context_create(
// this is for L2 FAPI simulator.
// change for multiple UE's like 256UEs.
// if it's made too many tables , OS may crush so we use one table.
#ifdef PDCP_USE_NETLINK
if(PDCP_USE_NETLINK) {
#ifdef UESIM_EXPANSION
uint16_t inst_nic = (pdn->ip_addr[3] & 0x000000FF) - 2;
res = sprintf(command_line,
uint16_t inst_nic = (pdn->ip_addr[3] & 0x000000FF) - 2;
res = sprintf(command_line,
"ifconfig oip%d %s netmask %s broadcast %s up && "
"ip rule add from %s/24 table %d && "
"ip rule add to %s/24 table %d && "
......@@ -295,9 +291,9 @@ int esm_ebr_context_create(
ipv4_addr, 201,
inst_nic + 1, 201);
inst_pdcp_list[inst_nic] = ueid;
inst_pdcp_list[inst_nic] = ueid;
#else
res = sprintf(command_line,
res = sprintf(command_line,
"ifconfig oip%d %s netmask %s broadcast %s up && "
"ip rule add from %s/32 table %d && "
"ip rule add to %s/32 table %d && "
......@@ -307,7 +303,7 @@ int esm_ebr_context_create(
ipv4_addr, ueid + 201,
ueid + 1, ueid + 201);
#endif
#endif
} // PDCP_USE_NETLINK
} else {
res = sprintf(command_line,
"ifconfig oip%d %s netmask %s broadcast %s up && "
......
......@@ -27,8 +27,9 @@
# define TASK_ORIGIN TASK_NAS_UE
#if (defined(ENABLE_NAS_UE_LOGGING) && defined(NAS_BUILT_IN_UE) )
static const uint8_t emm_message_ids[] = {
__attribute__ ((unused)) static const uint8_t emm_message_ids[] = {
ATTACH_REQUEST,
ATTACH_ACCEPT,
ATTACH_COMPLETE,
......@@ -60,7 +61,7 @@ static const uint8_t emm_message_ids[] = {
CS_SERVICE_NOTIFICATION,
};
static const uint8_t esm_message_ids[] = {
__attribute__ ((unused)) static const uint8_t esm_message_ids[] = {
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT,
ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT,
......
......@@ -110,11 +110,9 @@ pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
uint8_t nfapi_mode = 0;
#ifdef PDCP_USE_NETLINK
#ifdef UESIM_EXPANSION
uint16_t inst_pdcp_list[NUMBER_OF_UE_MAX];
#endif
#endif
uint16_t sf_ahead=2;
int tddflag;
char *emul_iface;
......@@ -685,11 +683,10 @@ int main( int argc, char **argv ) {
#endif
int CC_id;
uint8_t abstraction_flag=0;
#ifdef PDCP_USE_NETLINK
#ifdef UESIM_EXPANSION
memset(inst_pdcp_list, 0, sizeof(inst_pdcp_list));
#endif
#ifdef UESIM_EXPANSION
memset(inst_pdcp_list, 0, sizeof(inst_pdcp_list));
#endif
// Default value for the number of UEs. It will hold,
// if not changed from the command line option --num-ues
NB_UE_INST=1;
......
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