Commit ab412cb3 authored by Bing-Kai Hong's avatar Bing-Kai Hong

Normalization of the file names for CU and DU

parent 0fe608c2
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
# log and exec file # log and exec file
log/ log/
lte_build_oai/ *build_oai/
targets/bin/ targets/bin/
...@@ -530,8 +530,8 @@ message(${F1AP_C_DIR}) ...@@ -530,8 +530,8 @@ message(${F1AP_C_DIR})
message(${F1AP_DIR}) message(${F1AP_DIR})
add_library(F1AP add_library(F1AP
${F1AP_DIR}/DU_F1AP.c ${F1AP_DIR}/f1ap_du.c
${F1AP_DIR}/CU_F1AP.c ${F1AP_DIR}/f1ap_cu.c
${F1AP_DIR}/f1ap_itti_messaging.c ${F1AP_DIR}/f1ap_itti_messaging.c
${F1AP_DIR}/f1ap_encoder.c ${F1AP_DIR}/f1ap_encoder.c
${F1AP_DIR}/f1ap_decoder.c ${F1AP_DIR}/f1ap_decoder.c
......
set(ENABLE_ITTI True)
set(ENABLE_USE_MME False)
set(PDCP_USE_NETLINK True)
set(LINK_ENB_PDCP_TO_IP_DRIVER True)
set(LINK_ENB_PDCP_TO_GTPV1U False)
set(PDCP_USE_NETLINK_QUEUES False)
set(LINUX True)
set(SECU False)
set(NAS_UE False)
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING True )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY True )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME True )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U True)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD True )
set ( DEADLINE_SCHEDULER False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False)
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_UE True)
set ( NAS_MME False )
set ( NAS_UE True )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NO_RRM True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR2 True )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" )
set ( PDCP_USE_NETLINK True )
set ( PDCP_MSG_PRINT False )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( RF_BOARD "False" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RRC_DEFAULT_RAB_IS_AM True)
set ( RRC_MSG_PRINT False )
set ( SECU False )
set ( SMBV False )
set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( XER_PRINT False )
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 False )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST False )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME False )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI True)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE False )
set ( EPC_BUILD True )
set ( EXMIMO_IOT False )
set ( JUMBO_FRAME False )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U True)
set ( LINUX_LIST False )
set ( LINUX False )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD False )
set ( DEADLINE_SCHEDULER False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_EPC True )
set ( NAS_MME True )
set ( NAS_NETLINK False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NO_RRM False )
set ( OAISIM False )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK False )
set ( OPENAIR2 False )
set ( OPENAIR_LTE False )
set ( PACKAGE_NAME "EPC" )
set ( PDCP_MSG_PRINT False )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM False )
set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False )
set ( SECU False )
set ( SMBV False )
set ( TEST_OMG False )
set ( UPDATE_RELEASE_9 True)
set ( UPDATE_RELEASE_10 True)
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( XER_PRINT False )
set ( XFORMS False )
cmake_minimum_required(VERSION 2.8)
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD 1 )
set ( DEADLINE_SCHEDULER False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_UE False)
set ( NAS_MME False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NO_RRM True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET False )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR2 True )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" )
set ( PDCP_USE_NETLINK True )
set ( PDCP_MSG_PRINT False )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False )
set ( SECU False )
set ( SMBV False )
set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( XER_PRINT False )
set ( DEBUG_PHY False )
set ( DEBUG_PHY_PROC False)
set ( DEBUG_DLSCH False)
...@@ -103,6 +103,8 @@ typedef struct f1ap_setup_req_s { ...@@ -103,6 +103,8 @@ typedef struct f1ap_setup_req_s {
uint16_t num_ssi[F1AP_MAX_NB_CELLS]; uint16_t num_ssi[F1AP_MAX_NB_CELLS];
uint8_t sst[F1AP_MAX_NB_CELLS][16]; uint8_t sst[F1AP_MAX_NB_CELLS][16];
uint8_t sd[F1AP_MAX_NB_CELLS][16]; uint8_t sd[F1AP_MAX_NB_CELLS][16];
// tdd_flag = 0 means FDD, 1 means TDD
int tdd_flag;
union { union {
struct { struct {
......
...@@ -195,7 +195,7 @@ void *eNB_app_task(void *args_p) ...@@ -195,7 +195,7 @@ void *eNB_app_task(void *args_p)
break; break;
case F1AP_SETUP_RESP: case F1AP_SETUP_RESP:
AssertFatal(RC.rrc[0]->node_type == ngran_eNB_DU, "Should not have received F1AP_REGISTER_ENB_CNF\n"); AssertFatal(RC.rrc[0]->node_type == ngran_eNB_DU, "Should not have received F1AP_REGISTER_ENB_CNF in CU/eNB\n");
LOG_I(ENB_APP, "[eNB %d] Received %s: associated ngran_eNB_CU %s with %d cells to activate\n", instance, ITTI_MSG_NAME (msg_p), LOG_I(ENB_APP, "[eNB %d] Received %s: associated ngran_eNB_CU %s with %d cells to activate\n", instance, ITTI_MSG_NAME (msg_p),
F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate); F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
......
...@@ -2453,6 +2453,7 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -2453,6 +2453,7 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
if (rrc->carrier[0].sib1->tdd_Config) { if (rrc->carrier[0].sib1->tdd_Config) {
LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for TDD\n",k); LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for TDD\n",k);
F1AP_SETUP_REQ (msg_p).tdd_flag = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator, F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator,
rrc->carrier[0].dl_CarrierFreq); rrc->carrier[0].dl_CarrierFreq);
// For LTE use scs field to carry prefix type and number of antennas // For LTE use scs field to carry prefix type and number of antennas
...@@ -2466,6 +2467,7 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) { ...@@ -2466,6 +2467,7 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
} }
else { else {
LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for FDD\n",k); LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for FDD\n",k);
F1AP_SETUP_REQ (msg_p).tdd_flag = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator, F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator,
rrc->carrier[0].dl_CarrierFreq); rrc->carrier[0].dl_CarrierFreq);
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
#include "conversions.h" #include "conversions.h"
#include "f1ap_common.h" #include "f1ap_common.h"
#include "cu_f1ap_defs.h" #include "f1ap_cu_defs.h"
#include "f1ap_encoder.h" #include "f1ap_encoder.h"
#include "f1ap_decoder.h" #include "f1ap_decoder.h"
#include "cu_f1ap_task.h" #include "f1ap_cu_task.h"
#include "platform_types.h" #include "platform_types.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "intertask_interface.h" #include "intertask_interface.h"
...@@ -148,18 +148,21 @@ void *F1AP_CU_task(void *arg) { ...@@ -148,18 +148,21 @@ void *F1AP_CU_task(void *arg) {
case SCTP_NEW_ASSOCIATION_IND: case SCTP_NEW_ASSOCIATION_IND:
LOG_I(CU_F1AP, "SCTP_NEW_ASSOCIATION_IND\n"); LOG_I(CU_F1AP, "SCTP_NEW_ASSOCIATION_IND\n");
LOG_I(DU_F1AP, "--------------3--------------\n");
CU_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), CU_handle_sctp_association_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&received_msg->ittiMsg.sctp_new_association_ind); &received_msg->ittiMsg.sctp_new_association_ind);
break; break;
case SCTP_NEW_ASSOCIATION_RESP: case SCTP_NEW_ASSOCIATION_RESP:
LOG_I(CU_F1AP, "SCTP_NEW_ASSOCIATION_RESP\n"); LOG_I(CU_F1AP, "SCTP_NEW_ASSOCIATION_RESP\n");
LOG_I(DU_F1AP, "--------------4--------------\n");
CU_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg), CU_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&received_msg->ittiMsg.sctp_new_association_resp); &received_msg->ittiMsg.sctp_new_association_resp);
break; break;
case SCTP_DATA_IND: case SCTP_DATA_IND:
LOG_I(CU_F1AP, "SCTP_DATA_IND\n"); LOG_I(CU_F1AP, "SCTP_DATA_IND\n");
LOG_I(DU_F1AP, "--------------5--------------\n");
CU_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind); CU_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind);
break; break;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include "f1ap_common.h" #include "f1ap_common.h"
#include "f1ap_decoder.h" #include "f1ap_decoder.h"
static int f1ap_eNB_decode_initiating_message(F1AP_F1AP_PDU_t *pdu) static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
{ {
MessageDef *message_p; MessageDef *message_p;
MessagesIds message_id; MessagesIds message_id;
...@@ -76,28 +76,17 @@ static int f1ap_eNB_decode_initiating_message(F1AP_F1AP_PDU_t *pdu) ...@@ -76,28 +76,17 @@ static int f1ap_eNB_decode_initiating_message(F1AP_F1AP_PDU_t *pdu)
return 0; return 0;
} }
static int f1ap_eNB_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu) static int f1ap_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu)
{ {
MessageDef *message_p;
MessagesIds message_id;
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
switch(pdu->choice.successfulOutcome->procedureCode) { switch(pdu->choice.successfulOutcome->procedureCode) {
// case F1AP_ProcedureCode_id_F1Setup: case F1AP_ProcedureCode_id_F1Setup:
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu); LOG_I(F1AP, "get F1AP_ProcedureCode_id_F1Setup\n");
// message_id = F1AP_F1_SETUP_LOG; break;
// message_p = itti_alloc_new_message_sized(TASK_F1AP, message_id, res.result.encoded + sizeof (IttiMsgText));
// message_p->ittiMsg.f1ap_s1_setup_log.size = res.result.encoded;
// memcpy(&message_p->ittiMsg.f1ap_s1_setup_log.text, res.buffer, res.result.encoded);
// itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
// free(res.buffer);
// break;
default: default:
// F1AP_ERROR("Unknown procedure ID (%d) for successfull outcome message\n", LOG_E(F1AP,"Unknown procedure ID (%d) for successfull outcome message\n",
// (int)pdu->choice.successfulOutcome->procedureCode);
printf("Unknown procedure ID (%d) for successfull outcome message\n",
(int)pdu->choice.successfulOutcome->procedureCode); (int)pdu->choice.successfulOutcome->procedureCode);
return -1; return -1;
} }
...@@ -105,28 +94,19 @@ static int f1ap_eNB_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu) ...@@ -105,28 +94,19 @@ static int f1ap_eNB_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu)
return 0; return 0;
} }
static int f1ap_eNB_decode_unsuccessful_outcome(F1AP_F1AP_PDU_t *pdu) static int f1ap_decode_unsuccessful_outcome(F1AP_F1AP_PDU_t *pdu)
{ {
MessageDef *message_p;
MessagesIds message_id;
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
switch(pdu->choice.unsuccessfulOutcome->procedureCode) { switch(pdu->choice.unsuccessfulOutcome->procedureCode) {
// case F1AP_ProcedureCode_id_F1Setup: case F1AP_ProcedureCode_id_F1Setup:
// res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu); LOG_I(F1AP, "get F1AP_ProcedureCode_id_F1Setup\n");
// message_id = F1AP_F1_SETUP_LOG; break;
// message_p = itti_alloc_new_message_sized(TASK_F1AP, message_id, res.result.encoded + sizeof (IttiMsgText));
// message_p->ittiMsg.f1ap_f1_setup_log.size = res.result.encoded;
// memcpy(&message_p->ittiMsg.f1ap_f1_setup_log.text, res.buffer, res.result.encoded);
// itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
// free(res.buffer);
// break;
default: default:
// F1AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n", // F1AP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
// (int)pdu->choice.unsuccessfulOutcome->procedureCode); // (int)pdu->choice.unsuccessfulOutcome->procedureCode);
printf("Unknown procedure ID (%d) for unsuccessfull outcome message\n", LOG_E(F1AP, "Unknown procedure ID (%d) for unsuccessfull outcome message\n",
(int)pdu->choice.unsuccessfulOutcome->procedureCode); (int)pdu->choice.unsuccessfulOutcome->procedureCode);
return -1; return -1;
} }
...@@ -148,27 +128,26 @@ int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t ...@@ -148,27 +128,26 @@ int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
0, 0,
0); 0);
//xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu_p); //xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
//LOG_I(F1AP, "f1ap_decode_pdu.dec_ret.code = %d\n", dec_ret.code);
if (dec_ret.code != RC_OK) { if (dec_ret.code != RC_OK) {
//F1AP_ERROR("Failed to decode pdu\n"); LOG_E(F1AP, "Failed to decode pdu\n");
printf("Failed to decode pdu\n");
return -1; return -1;
} }
switch(pdu->present) { switch(pdu->present) {
case F1AP_F1AP_PDU_PR_initiatingMessage: case F1AP_F1AP_PDU_PR_initiatingMessage:
return f1ap_eNB_decode_initiating_message(pdu); return f1ap_decode_initiating_message(pdu);
case F1AP_F1AP_PDU_PR_successfulOutcome: case F1AP_F1AP_PDU_PR_successfulOutcome:
return f1ap_eNB_decode_successful_outcome(pdu); return f1ap_decode_successful_outcome(pdu);
case F1AP_F1AP_PDU_PR_unsuccessfulOutcome: case F1AP_F1AP_PDU_PR_unsuccessfulOutcome:
return f1ap_eNB_decode_unsuccessful_outcome(pdu); return f1ap_decode_unsuccessful_outcome(pdu);
default: default:
//F1AP_DEBUG("Unknown presence (%d) or not implemented\n", (int)pdu->present); LOG_D(F1AP, "Unknown presence (%d) or not implemented\n", (int)pdu->present);
printf("Unknown presence (%d) or not implemented\n", (int)pdu->present);
break; break;
} }
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
#include "conversions.h" #include "conversions.h"
#include "f1ap_common.h" #include "f1ap_common.h"
#include "du_f1ap_defs.h" #include "f1ap_du_defs.h"
#include "f1ap_encoder.h" #include "f1ap_encoder.h"
#include "f1ap_decoder.h" #include "f1ap_decoder.h"
#include "du_f1ap_task.h" #include "f1ap_du_task.h"
#include "platform_types.h" #include "platform_types.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "intertask_interface.h" #include "intertask_interface.h"
...@@ -130,6 +130,7 @@ void *F1AP_DU_task(void *arg) { ...@@ -130,6 +130,7 @@ void *F1AP_DU_task(void *arg) {
// 2. store the message in f1ap context, that is also stored in RC // 2. store the message in f1ap context, that is also stored in RC
// 2. send a sctp_association req // 2. send a sctp_association req
LOG_I(DU_F1AP, "F1AP_SETUP_REQ\n"); LOG_I(DU_F1AP, "F1AP_SETUP_REQ\n");
LOG_I(DU_F1AP, "--------------0--------------\n");
DU_send_sctp_association_req(ITTI_MESSAGE_GET_INSTANCE(received_msg), DU_send_sctp_association_req(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&F1AP_SETUP_REQ(received_msg)); &F1AP_SETUP_REQ(received_msg));
break; break;
...@@ -138,6 +139,7 @@ void *F1AP_DU_task(void *arg) { ...@@ -138,6 +139,7 @@ void *F1AP_DU_task(void *arg) {
// 1. store the respon // 1. store the respon
// 2. send the f1setup_req // 2. send the f1setup_req
LOG_I(DU_F1AP, "SCTP_NEW_ASSOCIATION_RESP\n"); LOG_I(DU_F1AP, "SCTP_NEW_ASSOCIATION_RESP\n");
LOG_I(DU_F1AP, "--------------1--------------\n");
DU_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg), DU_handle_sctp_association_resp(ITTI_MESSAGE_GET_INSTANCE(received_msg),
&received_msg->ittiMsg.sctp_new_association_resp); &received_msg->ittiMsg.sctp_new_association_resp);
break; break;
...@@ -145,6 +147,7 @@ void *F1AP_DU_task(void *arg) { ...@@ -145,6 +147,7 @@ void *F1AP_DU_task(void *arg) {
case SCTP_DATA_IND: case SCTP_DATA_IND:
// ex: any F1 incoming message for DU ends here // ex: any F1 incoming message for DU ends here
LOG_I(DU_F1AP, "SCTP_DATA_IND\n"); LOG_I(DU_F1AP, "SCTP_DATA_IND\n");
LOG_I(DU_F1AP, "--------------2--------------\n");
DU_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind); DU_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind);
break; break;
...@@ -464,7 +467,7 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t * ...@@ -464,7 +467,7 @@ void DU_send_F1_SETUP_REQUEST(instance_t instance, sctp_new_association_resp_t *
F1AP_GNB_DU_System_Information_t *gNB_DU_System_Information = (F1AP_GNB_DU_System_Information_t *)calloc(1, sizeof(F1AP_GNB_DU_System_Information_t)); F1AP_GNB_DU_System_Information_t *gNB_DU_System_Information = (F1AP_GNB_DU_System_Information_t *)calloc(1, sizeof(F1AP_GNB_DU_System_Information_t));
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018 OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
"1", "1",//f1ap_setup_req->mib,
sizeof("1")); sizeof("1"));
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018 OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018
......
/*
* 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
*/
#include <stdint.h>
#include "queue.h"
#include "tree.h"
#include "sctp_eNB_defs.h"
#ifndef DU_F1AP_DEFS_H_
#define DU_F1AP_DEFS_H_
struct du_f1ap_instance_s;
typedef struct du_f1ap_instance_s {
/* Next f1ap du association.
* Only used for virtual mode.
*/
/* For virtual mode, mod_id as defined in the rest of the L1/L2 stack */
instance_t instance;
// F1_Setup_Req payload
uint32_t gNB_DU_id;
char *gNB_DU_name;
/* Unique eNB_id to identify the eNB within EPC.
* In our case the eNB is a macro eNB so the id will be 20 bits long.
* For Home eNB id, this field should be 28 bits long.
*/
uint32_t eNB_id;
/* Tracking area code */
uint16_t tac;
/* Mobile Country Code
* Mobile Network Code
*/
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
} du_f1ap_instance_t;
#endif /* DU_F1AP_DEFS_H_ */
...@@ -52,13 +52,17 @@ int f1ap_handle_f1_setup_request(uint32_t assoc_id, ...@@ -52,13 +52,17 @@ int f1ap_handle_f1_setup_request(uint32_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu); F1AP_F1AP_PDU_t *pdu);
static
int f1ap_handle_f1_setup_response(uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/* Handlers matrix. Only f1 related procedure present here */ /* Handlers matrix. Only f1 related procedure present here */
f1ap_message_decoded_callback f1ap_messages_callback[][3] = { f1ap_message_decoded_callback f1ap_messages_callback[][3] = {
{ 0, 0, 0 }, /* Reset */ { 0, 0, 0 }, /* Reset */
{ f1ap_handle_f1_setup_request, 0, 0 }, /* F1Setup */ { f1ap_handle_f1_setup_request, f1ap_handle_f1_setup_response, 0 }, /* F1Setup */
{ 0, 0, 0 }, /* ErrorIndication */ { 0, 0, 0 }, /* ErrorIndication */
{ f1ap_handle_f1_setup_request, 0, 0 }, /* gNBDUConfigurationUpdate */ { f1ap_handle_f1_setup_request, 0, 0 }, /* gNBDUConfigurationUpdate */
{ f1ap_handle_f1_setup_request, 0, 0 }, /* gNBCUConfigurationUpdate */ { f1ap_handle_f1_setup_request, 0, 0 }, /* gNBCUConfigurationUpdate */
...@@ -151,3 +155,13 @@ int f1ap_handle_f1_setup_request(uint32_t assoc_id, ...@@ -151,3 +155,13 @@ int f1ap_handle_f1_setup_request(uint32_t assoc_id,
return 0; return 0;
} }
static
int f1ap_handle_f1_setup_response(uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu)
{
printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n");
return 0;
}
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
# include "RRC/LTE/rrc_defs.h" # include "RRC/LTE/rrc_defs.h"
# endif # endif
# include "sctp_eNB_task.h" # include "sctp_eNB_task.h"
# include "cu_f1ap_task.h" # include "f1ap_cu_task.h"
# include "du_f1ap_task.h" # include "f1ap_du_task.h"
# include "enb_app.h" # include "enb_app.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
......
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