Commit ffe34e84 authored by Vaibhav Shrivastava's avatar Vaibhav Shrivastava

UDP and MSC Changes for SS

parent 1fc26f34
...@@ -989,6 +989,7 @@ include_directories("${OPENAIR3_DIR}/S1AP") ...@@ -989,6 +989,7 @@ include_directories("${OPENAIR3_DIR}/S1AP")
include_directories("${OPENAIR2_DIR}/X2AP") include_directories("${OPENAIR2_DIR}/X2AP")
include_directories("${OPENAIR2_DIR}/M2AP") include_directories("${OPENAIR2_DIR}/M2AP")
include_directories("${OPENAIR2_DIR}/F1AP") include_directories("${OPENAIR2_DIR}/F1AP")
include_directories("${OPENAIR3_DIR}/UDP")
include_directories("${OPENAIR3_DIR}/ocp-gtpu") include_directories("${OPENAIR3_DIR}/ocp-gtpu")
include_directories("${OPENAIR3_DIR}/M3AP") include_directories("${OPENAIR3_DIR}/M3AP")
include_directories("${OPENAIR3_DIR}/MME_APP") include_directories("${OPENAIR3_DIR}/MME_APP")
...@@ -1168,6 +1169,11 @@ add_library(HASHTABLE ...@@ -1168,6 +1169,11 @@ add_library(HASHTABLE
) )
include_directories(${OPENAIR_DIR}/common/utils/hashtable) include_directories(${OPENAIR_DIR}/common/utils/hashtable)
add_library(msc MODULE ${OPENAIR_DIR}/common/utils/msc/msc.c )
target_link_libraries (msc LFDS)
include_directories(${OPENAIR_DIR}/common/utils/msc)
add_library(UTIL add_library(UTIL
${OPENAIR2_DIR}/UTIL/LISTS/list.c ${OPENAIR2_DIR}/UTIL/LISTS/list.c
${OPENAIR2_DIR}/UTIL/LISTS/list2.c ${OPENAIR2_DIR}/UTIL/LISTS/list2.c
...@@ -2089,6 +2095,9 @@ set(SCTP_SRC ...@@ -2089,6 +2095,9 @@ set(SCTP_SRC
add_library(SCTP_CLIENT ${SCTP_SRC}) add_library(SCTP_CLIENT ${SCTP_SRC})
add_dependencies(SCTP_CLIENT rrc_flag) add_dependencies(SCTP_CLIENT rrc_flag)
add_library(UDP ${OPENAIR3_DIR}/UDP/udp_eNB_task.c)
add_dependencies(UDP rrc_flag)
set(NAS_SRC ${OPENAIR3_DIR}/NAS/) set(NAS_SRC ${OPENAIR3_DIR}/NAS/)
set(libnas_api_OBJS set(libnas_api_OBJS
${NAS_SRC}COMMON/API/NETWORK/as_message.c ${NAS_SRC}COMMON/API/NETWORK/as_message.c
...@@ -2639,9 +2648,9 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag oai_iqplayer) ...@@ -2639,9 +2648,9 @@ add_dependencies(lte-softmodem rrc_flag s1ap_flag x2_flag oai_iqplayer)
target_link_libraries (lte-softmodem target_link_libraries (lte-softmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U F1AP_LIB F1AP SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT SS_SERVER MME_APP SCHED_LIB SCHED_RU_LIB RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U F1AP_LIB F1AP SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT SS_SERVER MME_APP UDP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7 PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB LFDS7
${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB}
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
...@@ -2737,9 +2746,9 @@ endif() ...@@ -2737,9 +2746,9 @@ endif()
target_link_libraries (lte-uesoftmodem target_link_libraries (lte-uesoftmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB
SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB ${NFAPI_STATIC_LIB} NFAPI_USER_LIB MISC_NFAPI_LTE_LIB PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB ${NFAPI_STATIC_LIB} NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
-Wl,--end-group z dl) -Wl,--end-group z dl)
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
...@@ -2778,8 +2787,8 @@ add_executable(nr-softmodem ...@@ -2778,8 +2787,8 @@ add_executable(nr-softmodem
target_link_libraries (nr-softmodem target_link_libraries (nr-softmodem
-Wl,--start-group -Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA
ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NGAP_LIB NGAP_GNB S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${FSPT_MSG_LIB} X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${FSPT_MSG_LIB}
-Wl,--end-group z dl) -Wl,--end-group z dl)
...@@ -2817,10 +2826,10 @@ add_executable(nr-uesoftmodem ...@@ -2817,10 +2826,10 @@ add_executable(nr-uesoftmodem
target_link_libraries (nr-uesoftmodem target_link_libraries (nr-uesoftmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB NGAP_LIB NGAP_GNB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB ${NFAPI_STATIC_LIB} PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB ${NFAPI_STATIC_LIB}
NFAPI_USER_LIB MISC_NFAPI_NR_LIB S1AP_LIB S1AP_ENB NFAPI_USER_LIB MISC_NFAPI_NR_LIB S1AP_LIB S1AP_ENB
${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
NFAPI_USER_LIB S1AP_LIB S1AP_ENB NFAPI_USER_LIB S1AP_LIB S1AP_ENB
${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} ${RAL_LIB} ${NAS_UE_LIB} ITTI ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB}
-Wl,--end-group z dl) -Wl,--end-group z dl)
...@@ -3062,7 +3071,7 @@ if (${T_TRACER}) ...@@ -3062,7 +3071,7 @@ if (${T_TRACER})
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR NGAP_GNB L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON MAC_NR MAC_UE_NR NGAP_GNB
CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB CN_UTILS GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
ldpc_orig ldpc_optim ldpc_optim8seg ldpc dfts) ldpc_orig ldpc_optim ldpc_optim8seg ldpc dfts)
if (TARGET ${i}) if (TARGET ${i})
add_dependencies(${i} generate_T) add_dependencies(${i} generate_T)
......
...@@ -37,6 +37,7 @@ set_openair_env ...@@ -37,6 +37,7 @@ set_openair_env
gen_nvram_path=$OPENAIR_DIR/targets/bin gen_nvram_path=$OPENAIR_DIR/targets/bin
conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
MSC_GEN=0
XFORMS="True" XFORMS="True"
SKIP_SHARED_LIB_FLAG="False" SKIP_SHARED_LIB_FLAG="False"
PRINT_STATS="False" PRINT_STATS="False"
......
This diff is collapsed.
/*
* 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
*/
#ifndef MSC_H_
#define MSC_H_
#include <stdarg.h>
#include <stdint.h>
typedef enum {
MIN_MSC_ENV = 0,
MSC_E_UTRAN = MIN_MSC_ENV,
MSC_E_UTRAN_LIPA,
MSC_MME_GW,
MSC_MME,
MSC_SP_GW,
MAX_MSC_ENV
} msc_env_t;
typedef enum {
MIN_MSC_PROTOS = 0,
MSC_IP_UE = MIN_MSC_PROTOS,
MSC_NAS_UE,
MSC_RRC_UE,
MSC_PDCP_UE,
MSC_RLC_UE,
MSC_MAC_UE,
MSC_PHY_UE,
MSC_PHY_ENB,
MSC_MAC_ENB,
MSC_RLC_ENB,
MSC_PDCP_ENB,
MSC_RRC_ENB,
MSC_IP_ENB,
MSC_S1AP_ENB,
MSC_GTPU_ENB,
MSC_GTPU_SGW,
MSC_S1AP_MME,
MSC_MMEAPP_MME,
MSC_NAS_MME,
MSC_NAS_EMM_MME,
MSC_NAS_ESM_MME,
MSC_SP_GWAPP_MME,
MSC_S11_MME,
MSC_S6A_MME,
MSC_HSS,
MSC_F1AP_CU,
MSC_F1AP_DU,
MSC_X2AP_SRC_ENB,
MSC_X2AP_TARGET_ENB,
MAX_MSC_PROTOS,
} msc_proto_t;
// Access stratum
#define MSC_AS_TIME_FMT "%05u:%02u"
#define MSC_AS_TIME_ARGS(CTXT_Pp) \
(CTXT_Pp)->frame, \
(CTXT_Pp)->subframe
typedef int(*msc_init_t)(const msc_env_t, const int );
typedef void(*msc_start_use_t)(void );
typedef void(*msc_end_t)(void);
typedef void(*msc_log_event_t)(const msc_proto_t,char *, ...);
typedef void(*msc_log_message_t)(const char *const, const msc_proto_t, const msc_proto_t,
const uint8_t *const, const unsigned int, char *, ...);
typedef struct msc_interface {
int msc_loaded;
msc_init_t msc_init;
msc_start_use_t msc_start_use;
msc_end_t msc_end;
msc_log_event_t msc_log_event;
msc_log_message_t msc_log_message;
} msc_interface_t;
#ifdef MSC_LIBRARY
int msc_init(const msc_env_t envP, const int max_threadsP);
void msc_start_use(void);
void msc_flush_messages(void);
void msc_end(void);
void msc_log_declare_proto(const msc_proto_t protoP);
void msc_log_event(const msc_proto_t protoP,char *format, ...);
void msc_log_message(
const char *const message_operationP,
const msc_proto_t receiverP,
const msc_proto_t senderP,
const uint8_t *const bytesP,
const unsigned int num_bytes,
char *format, ...);
#else
#define MESSAGE_CHART_GENERATOR msc_interface.msc_loaded
msc_interface_t msc_interface;
#define MSC_INIT(arg1,arg2) if(msc_interface.msc_loaded) msc_interface.msc_init(arg1,arg2)
#define MSC_START_USE if(msc_interface.msc_loaded) msc_interface.msc_start_use
#define MSC_END if(msc_interface.msc_loaded) msc_interface.msc_end
#define MSC_LOG_EVENT(mScPaRaMs, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_event(mScPaRaMs, fORMAT, ##aRGS)
#define MSC_LOG_RX_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("<-",rECEIVER, sENDER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS)
#define MSC_LOG_RX_DISCARDED_MESSAGE(rECEIVER, sENDER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("x-",rECEIVER, sENDER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS)
#define MSC_LOG_TX_MESSAGE(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("->",sENDER, rECEIVER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS)
#define MSC_LOG_TX_MESSAGE_FAILED(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("-x",sENDER, rECEIVER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS)
#endif
#endif
...@@ -344,6 +344,7 @@ void *rrc_enb_process_msg(void *); ...@@ -344,6 +344,7 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)\ TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)\
TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)\
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_UE_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RRC_UE_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "rrc_eNB_UE_context.h" #include "rrc_eNB_UE_context.h"
#include "pdcp.h" #include "pdcp.h"
#include "msc.h"
#include "common/ran_context.h" #include "common/ran_context.h"
#include "intertask_interface.h" #include "intertask_interface.h"
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "rrc_eNB_UE_context.h" #include "rrc_eNB_UE_context.h"
#include "pdcp.h" #include "pdcp.h"
#include "msc.h"
#include "common/ran_context.h" #include "common/ran_context.h"
#include "intertask_interface.h" #include "intertask_interface.h"
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "rrc_eNB_UE_context.h" #include "rrc_eNB_UE_context.h"
#include "pdcp.h" #include "pdcp.h"
#include "msc.h"
#include "intertask_interface.h" #include "intertask_interface.h"
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#include "rlc.h" #include "rlc.h"
#include "rrc_eNB_UE_context.h" #include "rrc_eNB_UE_context.h"
#include "platform_types.h" #include "platform_types.h"
#include "msc.h"
#include "LTE_SL-CommConfig-r12.h" #include "LTE_SL-CommConfig-r12.h"
#include "LTE_PeriodicBSR-Timer-r12.h" #include "LTE_PeriodicBSR-Timer-r12.h"
#include "LTE_RetxBSR-Timer-r12.h" #include "LTE_RetxBSR-Timer-r12.h"
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
# include "RRC/LTE/MESSAGES/asn1_msg.h" # include "RRC/LTE/MESSAGES/asn1_msg.h"
# include "rrc_eNB_GTPV1U.h" # include "rrc_eNB_GTPV1U.h"
# include "rrc_eNB_UE_context.h" # include "rrc_eNB_UE_context.h"
# include "msc.h"
#include "asn1_conversions.h" #include "asn1_conversions.h"
#include "intertask_interface.h" #include "intertask_interface.h"
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
# include "RRC/LTE/MESSAGES/asn1_msg.h" # include "RRC/LTE/MESSAGES/asn1_msg.h"
# include "rrc_eNB_M2AP.h" # include "rrc_eNB_M2AP.h"
//# include "rrc_eNB_UE_context.h" //# include "rrc_eNB_UE_context.h"
# include "msc.h"
# include "asn1_conversions.h" # include "asn1_conversions.h"
# include "intertask_interface.h" # include "intertask_interface.h"
# include "common/ran_context.h" # include "common/ran_context.h"
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "pdcp_primitives.h" #include "pdcp_primitives.h"
#include "UTIL/OSA/osa_defs.h" #include "UTIL/OSA/osa_defs.h"
#include "msc.h"
#include "LTE_UERadioAccessCapabilityInformation.h" #include "LTE_UERadioAccessCapabilityInformation.h"
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "rrc_eNB_UE_context.h" #include "rrc_eNB_UE_context.h"
#include "msc.h"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void void
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
#include "rlc.h" #include "rlc.h"
#include "rrc_eNB_UE_context.h" #include "rrc_eNB_UE_context.h"
#include "platform_types.h" #include "platform_types.h"
#include "msc.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "T.h" #include "T.h"
......
...@@ -53,9 +53,10 @@ ...@@ -53,9 +53,10 @@
#include "ss_eNB_sys_task.h" #include "ss_eNB_sys_task.h"
#include "ss_eNB_context.h" #include "ss_eNB_context.h"
//#include "udp_eNB_task.h" #include "udp_eNB_task.h"
#include "ss_eNB_proxy_iface.h" #include "ss_eNB_proxy_iface.h"
//#include "common/utils/LOG/ss-log.h" #include "common/utils/LOG/ss-log.h"
#include "msc.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
extern uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn); extern uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn);
...@@ -171,7 +172,6 @@ int cell_config_done_indication() ...@@ -171,7 +172,6 @@ int cell_config_done_indication()
return 0; return 0;
} }
#if 0
/* /*
* Function : sys_send_udp_msg * Function : sys_send_udp_msg
* Description: Sends the UDP_INIT message to UDP_TASK to create the listening socket * Description: Sends the UDP_INIT message to UDP_TASK to create the listening socket
...@@ -231,7 +231,6 @@ static int sys_send_init_udp(const udpSockReq_t *req) ...@@ -231,7 +231,6 @@ static int sys_send_init_udp(const udpSockReq_t *req)
UDP_INIT(message_p).port); UDP_INIT(message_p).port);
return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p); return itti_send_msg_to_task(TASK_UDP, INSTANCE_DEFAULT, message_p);
} }
#endif
static void ss_task_sys_handle_timing_info(ss_set_timinfo_t *tinfo) static void ss_task_sys_handle_timing_info(ss_set_timinfo_t *tinfo)
{ {
...@@ -994,11 +993,7 @@ static int sys_handle_radiobearer_list(struct RadioBearer_Type_RadioBearerList_D ...@@ -994,11 +993,7 @@ static int sys_handle_radiobearer_list(struct RadioBearer_Type_RadioBearerList_D
*/ */
int sys_handle_pdcp_count_req(struct Pdcp_CountReq_Type *PdcpCount) int sys_handle_pdcp_count_req(struct Pdcp_CountReq_Type *PdcpCount)
{ {
int status = false;
int returnState = RC.ss.State; int returnState = RC.ss.State;
enum SystemConfirm_Type_Sel cnfType = SystemConfirm_Type_PdcpCount;
enum ConfirmationResult_Type_Sel resType = ConfirmationResult_Type_Success;
bool resVal = TRUE;
int send_res = -1; int send_res = -1;
switch (PdcpCount->d) switch (PdcpCount->d)
...@@ -1091,26 +1086,23 @@ int sys_handle_pdcp_count_req(struct Pdcp_CountReq_Type *PdcpCount) ...@@ -1091,26 +1086,23 @@ int sys_handle_pdcp_count_req(struct Pdcp_CountReq_Type *PdcpCount)
*/ */
static void sys_send_proxy(void *msg, int msgLen) static void sys_send_proxy(void *msg, int msgLen)
{ {
#if 0
LOG_SYS(SS_SYS_DUMMY_EVT, "In sys_send_proxy\n"); LOG_SYS(SS_SYS_DUMMY_EVT, "In sys_send_proxy\n");
uint32_t peerIpAddr; uint32_t peerIpAddr;
uint16_t peerPort = proxy_send_port; uint16_t peerPort = proxy_send_port;
IPV4_STR_ADDR_TO_INT_NWBO(local_address, peerIpAddr, " BAD IP Address"); IPV4_STR_ADDR_TO_INT_NWBO(local_address, peerIpAddr, " BAD IP Address");
LOG_SYS(SS_SYS_DUMMY_EVT, "******************* Sending CELL CONFIG length\n Buffer is :%d ", msgLen); LOG_SYS(SS_SYS_DUMMY_EVT, "******************* Sending CELL CONFIG length\n Buffer is :%d ", msgLen);
int8_t *temp = msg; int8_t *temp = msg;
for(int i =0 ; i <msgLen;i++) for(int i =0 ; i <msgLen;i++)
{ {
LOG_SYS(SS_SYS_DUMMY_EVT, "%x ", temp[i]);
LOG_SYS(SS_SYS_DUMMY_EVT, "%x ", temp[i]); }
}
LOG_SYS(SS_SYS_DUMMY_EVT, "\nCell Config End of Buffer\n "); LOG_SYS(SS_SYS_DUMMY_EVT, "\nCell Config End of Buffer\n ");
/** Send to proxy */ /** Send to proxy */
sys_send_udp_msg((uint8_t *)msg, msgLen, 0, peerIpAddr, peerPort); sys_send_udp_msg((uint8_t *)msg, msgLen, 0, peerIpAddr, peerPort);
#endif
return; return;
} }
...@@ -1130,10 +1122,10 @@ static void sys_cell_attn_update(uint8_t cellId, uint8_t attnVal) ...@@ -1130,10 +1122,10 @@ static void sys_cell_attn_update(uint8_t cellId, uint8_t attnVal)
attnConf->header.msg_id = SS_ATTN_LIST; attnConf->header.msg_id = SS_ATTN_LIST;
attnConf->header.cell_id = SS_context.cellId; attnConf->header.cell_id = SS_context.cellId;
attnConf->attnVal = attnVal; attnConf->attnVal = attnVal;
//IPV4_STR_ADDR_TO_INT_NWBO(local_address, peerIpAddr, " BAD IP Address"); IPV4_STR_ADDR_TO_INT_NWBO(local_address, peerIpAddr, " BAD IP Address");
/** Send to proxy */ /** Send to proxy */
//sys_send_udp_msg((uint8_t *)attnConf, sizeof(attenuationConfigReq_t), 0, peerIpAddr, peerPort); sys_send_udp_msg((uint8_t *)attnConf, sizeof(attenuationConfigReq_t), 0, peerIpAddr, peerPort);
LOG_SYS(SS_SYS_DUMMY_EVT, "Out sys_cell_attn_update\n"); LOG_SYS(SS_SYS_DUMMY_EVT, "Out sys_cell_attn_update\n");
return; return;
} }
...@@ -1258,7 +1250,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s ...@@ -1258,7 +1250,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
LOG_SYS(SS_SYS_DUMMY_EVT, "[SYS] Invalid Pging request received\n"); LOG_SYS(SS_SYS_DUMMY_EVT, "[SYS] Invalid Pging request received\n");
} }
send_sys_cnf(resType, resVal, cnfType, NULL); send_sys_cnf(resType, resVal, cnfType, NULL);
LOG_SYS(SS_SYS_DUMMY_EVT, "[SYS] Exit sys_handle_paging_req Paging_IND processing\n", cellId); LOG_SYS(SS_SYS_DUMMY_EVT, "[SYS] Exit sys_handle_paging_req Paging_IND processing for Cell_id %d \n", cellId);
} }
/* /*
* Function : sys_handle_enquire_timing * Function : sys_handle_enquire_timing
...@@ -1890,7 +1882,7 @@ void *ss_eNB_sys_task(void *arg) ...@@ -1890,7 +1882,7 @@ void *ss_eNB_sys_task(void *arg)
udpSockReq_t req; udpSockReq_t req;
req.address = local_address; req.address = local_address;
req.port = proxy_recv_port; req.port = proxy_recv_port;
//sys_send_init_udp(&req); sys_send_init_udp(&req);
sleep(5); sleep(5);
// Set the state to NOT_CONFIGURED for Cell Config processing mode // Set the state to NOT_CONFIGURED for Cell Config processing mode
......
This diff is collapsed.
/*
* 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 udp_eNB_task.h
* \brief
* \author Sebastien ROUX, Lionel Gauthier
* \company Eurecom
* \email: lionel.gauthier@eurecom.fr
*/
#include <pthread.h>
#include <stdint.h>
#ifndef UDP_ENB_TASK_H_
#define UDP_ENB_TASK_H_
#include "enb_config.h"
/** \brief UDP recv callback prototype. Will be called every time a payload is
* received on socket.
* \param port Port on which data had been received
* \param address Sender Ipv4 address
* \param buffer Pointer to data (should be freed by user)
* \param length Length of message received
* \param arg_p User provided argument (transparent for wrappers)
* @returns Execution result
*/
typedef int (*udp_recv_callback)(uint16_t port,
uint32_t address,
uint8_t *buffer,
uint32_t length,
void *arg_p);
typedef struct {
int sd; /* Socket descriptor to use */
pthread_t listener_thread; /* Thread affected to recv */
char *local_address; /* Local ipv4 address to use */
uint16_t local_port; /* Local port to use */
task_id_t task_id; /* Task who has requested the new endpoint */
} udp_data_t;
/** \brief Create new datagram connection-less socket and create new thread
* for data in downstream.
* \param ip_addr Local IPv4 address to use
* \param port Local port to use
* \param udp_data_p
* \param recv_callback Pointer to data (should be freed by user)
* \param arg_p Optionnal argument to pass to recv_callback
* @returns < 0 on failure or socket descriptor on success
*/
int udp_create_connection(char *ip_addr, uint16_t port,
udp_data_t *udp_data_p,
udp_recv_callback recv_callback,
void *arg_p);
/** \brief Send buffer to remote peer.
* \param sd socket descriptor to use
* \param port remote port
* \param address remote address
* \param buffer Data buffer to send
* \param length Buffer length
* @returns < 0 on failure or socket descriptor on success
*/
int udp_send_to(int sd, uint16_t port, uint32_t address,
const uint8_t *buffer, uint32_t length);
/** \brief UDP ITTI task on eNB.
* \param args_p
* @returns always NULL
*/
void *udp_eNB_task(void *args_p);
/** \brief init UDP layer.
* \param enb_config_p configuration of eNB
* @returns always 0
*/
int udp_enb_init(void);
#endif /* UDP_ENB_TASK_H_ */
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "sctp_eNB_task.h" #include "sctp_eNB_task.h"
#include "x2ap_eNB.h" #include "x2ap_eNB.h"
#include "s1ap_eNB.h" #include "s1ap_eNB.h"
#include "udp_eNB_task.h"
#include "gtpv1u_eNB_task.h" #include "gtpv1u_eNB_task.h"
#if ENABLE_RAL #if ENABLE_RAL
#include "lteRALue.h" #include "lteRALue.h"
...@@ -85,6 +86,10 @@ int create_tasks(uint32_t enb_nb) { ...@@ -85,6 +86,10 @@ int create_tasks(uint32_t enb_nb) {
if (EPC_MODE_ENABLED && !NODE_IS_DU(type) && ! ( split73==SPLIT73_DU ) ) { if (EPC_MODE_ENABLED && !NODE_IS_DU(type) && ! ( split73==SPLIT73_DU ) ) {
rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL); rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for S1AP failed\n"); AssertFatal(rc >= 0, "Create task for S1AP failed\n");
if (!(get_softmodem_params()->emulate_rf)){
rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for UDP failed\n");
}
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL); rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "sctp_eNB_task.h" #include "sctp_eNB_task.h"
#include "x2ap_eNB.h" #include "x2ap_eNB.h"
#include "s1ap_eNB.h" #include "s1ap_eNB.h"
#include "udp_eNB_task.h"
#include "gtpv1u_eNB_task.h" #include "gtpv1u_eNB_task.h"
#include "m2ap_eNB.h" #include "m2ap_eNB.h"
#include "m2ap_MCE.h" #include "m2ap_MCE.h"
...@@ -77,6 +78,8 @@ int create_tasks_mbms(uint32_t enb_nb) { ...@@ -77,6 +78,8 @@ int create_tasks_mbms(uint32_t enb_nb) {
if(!EPC_MODE_ENABLED){ if(!EPC_MODE_ENABLED){
// rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL); // rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
// AssertFatal(rc >= 0, "Create task for SCTP failed\n"); // AssertFatal(rc >= 0, "Create task for SCTP failed\n");
rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for UDP failed\n");
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL); rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
} }
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all #undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h" #include "assertions.h"
#include "msc.h"
#include "PHY/types.h" #include "PHY/types.h"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "../../ARCH/COMMON/common_lib.h" #include "../../ARCH/COMMON/common_lib.h"
//#undef MALLOC //#undef MALLOC
#include "assertions.h" #include "assertions.h"
#include "msc.h"
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h" #include "PHY/defs_UE.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