From 3a52fbb41a099e37ef072276055cf765828db299 Mon Sep 17 00:00:00 2001 From: Balaji Shankaran Date: Fri, 28 Feb 2020 16:38:16 +0530 Subject: [PATCH] Merging changes from ODU_Dev_Bronze_Rel to master Change-Id: I0b6db50c4e3adefbe3e7019bd23d47422a129eb1 Signed-off-by: Balaji Shankaran --- build/common/du_app.mak | 1 + src/codec_utils/common/odu_common_codec.h | 59 ++++ src/du_app/du_cfg.c | 65 +++- src/du_app/du_cfg.h | 35 ++- src/du_app/du_f1ap_msg_hdl.c | 70 +++-- src/du_app/du_f1ap_msg_hdl.h | 9 +- src/du_app/du_sys_info_hdl.c | 486 ++++++++++++++++++++++++++++++ src/du_app/du_sys_info_hdl.h | 39 +++ 8 files changed, 722 insertions(+), 42 deletions(-) create mode 100644 src/codec_utils/common/odu_common_codec.h create mode 100644 src/du_app/du_sys_info_hdl.c create mode 100644 src/du_app/du_sys_info_hdl.h diff --git a/build/common/du_app.mak b/build/common/du_app.mak index 3abb0640c..7c7bb2e1f 100755 --- a/build/common/du_app.mak +++ b/build/common/du_app.mak @@ -41,6 +41,7 @@ include $(COM_BUILD_DIR)/compile.mak I_OPTS+=-I$(ROOT_DIR)/src/mt I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/common I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/F1AP +I_OPTS+=-I$(ROOT_DIR)/src/codec_utils/SYSINFO #-------------------------------------------------------------# #Linker macros diff --git a/src/codec_utils/common/odu_common_codec.h b/src/codec_utils/common/odu_common_codec.h new file mode 100644 index 000000000..36f5702cb --- /dev/null +++ b/src/codec_utils/common/odu_common_codec.h @@ -0,0 +1,59 @@ +/******************************************************************************* +################################################################################ +# Copyright (c) [2017-2019] [Radisys] # +# # +# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # +# # +# 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. # +################################################################################ +*******************************************************************************/ + +#ifndef __ODU_COMMON_CODEC_H__ +#define __ODU_COMMON_CODEC_H__ + +#include "asn_codecs.h" + +#define ENC_BUF_MAX_LEN 200 +#define ENCODE_FAIL -1 + +char encBuf[ENC_BUF_MAX_LEN]; +int encBufSize; + + +/******************************************************************* + * + * @brief Writes the encoded chunks into a buffer + * + * @details + * + * Function : PrepFinalEncBuf + * + * Functionality:Fills the encoded buffer + * + * @params[in] void *buffer,initial encoded data + * @params[in] size_t size,size of buffer + * @params[in] void *encodedBuf,final buffer + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +static int PrepFinalEncBuf(const void *buffer, size_t size, void *encodedBuf) +{ + memcpy(encodedBuf + encBufSize, buffer, size); + encBufSize += size; + return 0; +} /* PrepFinalEncBuf */ + +#endif + +/********************************************************************** + End of file +**********************************************************************/ diff --git a/src/du_app/du_cfg.c b/src/du_app/du_cfg.c index d6196863d..4fd8612a6 100644 --- a/src/du_app/du_cfg.c +++ b/src/du_app/du_cfg.c @@ -18,8 +18,12 @@ /* This file contains all utility functions */ #include "du_cfg.h" +#include "MIB.h" +#include "PLMN-IdentityInfo.h" +#include "odu_common_codec.h" extern DuCfgParams duCfgParam; +extern char encBuf[ENC_BUF_MAX_LEN]; /* Filling Slot configuration as : @@ -202,6 +206,8 @@ S16 readCfg() { U8 i,j,k; U32 ipv4_du, ipv4_cu; + MibParams mib; + Sib1Params sib1; cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du); cmInetAddr((S8*)CU_IP_V4_ADDR, &ipv4_cu); @@ -232,6 +238,32 @@ S16 readCfg() duCfgParam.duId = DU_ID; strcpy((char*)duCfgParam.duName,DU_NAME); + /* Mib Params */ + mib.sysFrmNum = SYS_FRAME_NUM; + mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs15or60; + mib.ssb_SubcarrierOffset = SSB_SC_OFFSET; + mib.dmrs_TypeA_Position = MIB__dmrs_TypeA_Position_pos2; + mib.controlResourceSetZero = CORESET_ZERO; + mib.searchSpaceZero = SEARCH_SPACE_ZERO; + mib.cellBarred = MIB__cellBarred_barred; + mib.intraFreqReselection = + MIB__intraFreqReselection_notAllowed; + duCfgParam.mibParams = mib; + + /* SIB1 Params */ + sib1.plmn.mcc[0] = PLMN_MCC0; + sib1.plmn.mcc[1] = PLMN_MCC1; + sib1.plmn.mcc[2] = PLMN_MCC2; + sib1.plmn.mnc[0] = PLMN_MNC0; + sib1.plmn.mnc[1] = PLMN_MNC1; + sib1.plmn.mnc[2] = PLMN_MNC2; + sib1.tac = DU_TAC; + sib1.ranac = DU_RANAC; + sib1.cellIdentity = CELL_IDENTITY; + sib1.cellResvdForOpUse =\ + PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved; + duCfgParam.sib1Params = sib1; + for(i=0; iserved_Cell_Information.measurementTimingConfiguration.buf[0] = \ - duCfgParam.srvdCellLst[0].duCellInfo.measTimeCfg; + duCfgParam.srvdCellLst[0].duCellInfo.measTimeCfg; + + /* GNB DU System Information */ + DU_ALLOC(srvCellItem->gNB_DU_System_Information, + sizeof(GNB_DU_System_Information_t)); + if(!srvCellItem->gNB_DU_System_Information) + { + DU_LOG("\nF1AP: Memory allocation failure for GNB_DU_System_Information"); + return RFAILED; + } + /* MIB */ + srvCellItem->gNB_DU_System_Information->mIB_message.size =\ + strlen(duCfgParam.srvdCellLst[0].duSysInfo.mibMsg) + 1; + DU_ALLOC(srvCellItem->gNB_DU_System_Information->mIB_message.buf, + srvCellItem->gNB_DU_System_Information->mIB_message.size); + if(!srvCellItem->gNB_DU_System_Information->mIB_message.buf) + { + DU_LOG("\nF1AP: Memory allocation failure for mIB message"); + return RFAILED; + } + strcpy(srvCellItem->gNB_DU_System_Information->mIB_message.buf, + duCfgParam.srvdCellLst[0].duSysInfo.mibMsg); + + /* SIB1 */ + srvCellItem->gNB_DU_System_Information->sIB1_message.size =\ + encBufSize; + DU_ALLOC(srvCellItem->gNB_DU_System_Information->sIB1_message.buf, + srvCellItem->gNB_DU_System_Information->sIB1_message.size); + if(!srvCellItem->gNB_DU_System_Information->sIB1_message.buf) + { + DU_LOG("\nF1AP: Memory allocation failure for SIB1 message"); + return RFAILED; + } + for(int x=0; xgNB_DU_System_Information->sIB1_message.size; x++) + { + srvCellItem->gNB_DU_System_Information->sIB1_message.buf[x]=\ + duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg[x]; + } + /* Free memory */ + DU_FREE(duCfgParam.srvdCellLst[0].duSysInfo.sib1Msg, encBufSize); + DU_FREE(duCfgParam.srvdCellLst[0].duSysInfo.mibMsg, + strlen(duCfgParam.srvdCellLst[0].duSysInfo.mibMsg)); RETVALUE(ROK); } /******************************************************************* diff --git a/src/du_app/du_f1ap_msg_hdl.h b/src/du_app/du_f1ap_msg_hdl.h index 96cbeb1af..2922d34c4 100644 --- a/src/du_app/du_f1ap_msg_hdl.h +++ b/src/du_app/du_f1ap_msg_hdl.h @@ -41,11 +41,10 @@ #include "ss_msg.x" #include "du_log.h" +#include "odu_common_codec.h" -#define ENCODE_FAIL -1 #define TRANS_ID 1 #define RRC_SIZE 1 -#define ENC_BUF_MAX_LEN 100 #define SUL_BAND_COUNT 0 #define UL_SRBID 1 #define DL_SRBID 0 @@ -54,12 +53,6 @@ #define CRNTI 17017 #define CELL_INDEX 0 - - - -extern char encBuf[ENC_BUF_MAX_LEN]; -int encBufSize; - void F1APMsgHdlr(Buffer *mBuf); S16 BuildAndSendF1SetupReq(); S16 procGNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg); diff --git a/src/du_app/du_sys_info_hdl.c b/src/du_app/du_sys_info_hdl.c new file mode 100644 index 000000000..fa840f16a --- /dev/null +++ b/src/du_app/du_sys_info_hdl.c @@ -0,0 +1,486 @@ +/******************************************************************************* +################################################################################ +# Copyright (c) [2017-2019] [Radisys] # +# # +# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # +# # +# 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. # +################################################################################ +*******************************************************************************/ + +/* This file contains ASN codec for MIB and SIB1 msgs */ + +#include "du_sys_info_hdl.h" +#include "MIB.h" +#include "SIB1.h" +#include "PLMN-IdentityInfo.h" +#include "PLMN-IdentitY.h" +#include "MCC.h" + +extern char encBuf[ENC_BUF_MAX_LEN]; + +extern DuCfgParams duCfgParam; + +/******************************************************************* + * + * @brief Builds MIB message in Served Cell Info + * + * @details + * + * Function : BuildMibMsg + * + * Functionality: Building MIB message in Served Cell Info + * + * @params[in] GNB_DU_System_Information *gnbDuSysInfo + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +S16 BuildMibMsg() +{ + MIB_t *mibMsg; + asn_enc_rval_t encRetVal; /* Encoder return value */ + + DU_ALLOC(mibMsg, sizeof(MIB_t)); + if(!mibMsg) + { + DU_LOG("DU APP: MIB msg memory allocation failure"); + return RFAILED; + } + mibMsg->systemFrameNumber.size = sizeof(uint8_t); + DU_ALLOC(mibMsg->systemFrameNumber.buf, + mibMsg->systemFrameNumber.size); + if(!(mibMsg->systemFrameNumber.buf)) + { + DU_LOG("DU APP: MIB msg memory allocation failure"); + return RFAILED; + } + + *(mibMsg->systemFrameNumber.buf) = + duCfgParam.mibParams.sysFrmNum; + mibMsg->systemFrameNumber.bits_unused = ODU_VALUE_TWO; + + mibMsg->subCarrierSpacingCommon =\ + duCfgParam.mibParams.subCarrierSpacingCommon; + mibMsg->ssb_SubcarrierOffset =\ + duCfgParam.mibParams.ssb_SubcarrierOffset; + mibMsg->dmrs_TypeA_Position =\ + duCfgParam.mibParams.dmrs_TypeA_Position; + mibMsg->pdcch_ConfigSIB1.controlResourceSetZero = \ + duCfgParam.mibParams.controlResourceSetZero; + mibMsg->pdcch_ConfigSIB1.searchSpaceZero = \ + duCfgParam.mibParams.searchSpaceZero; + mibMsg->cellBarred = duCfgParam.mibParams.cellBarred; + mibMsg->intraFreqReselection = + duCfgParam.mibParams.intraFreqReselection; + mibMsg->spare.size = sizeof(uint8_t); + DU_ALLOC(mibMsg->spare.buf,sizeof(uint8_t)); + if(!mibMsg->spare.buf) + { + DU_LOG("DU APP: MIB msg memory allocation failure"); + return RFAILED; + } + *(mibMsg->spare.buf) = SPARE; + mibMsg->spare.bits_unused = ODU_VALUE_SEVEN; + + xer_fprint(stdout, &asn_DEF_MIB, mibMsg); + cmMemset((U8 *)encBuf, 0, ENC_BUF_MAX_LEN); + encBufSize = 0; + encRetVal = aper_encode(&asn_DEF_MIB, 0, + mibMsg, PrepFinalEncBuf, encBuf); + printf("\nencbufSize:%d\n", encBufSize); + if(encRetVal.encoded == -1) + { + DU_LOG("\nDU APP: Could not encode MIB structure(at %s)\n", + encRetVal.failed_type?\ + encRetVal.failed_type->name + :"unknown"); + return RFAILED; + } + + /* Print encoded buffer */ + for(int i=0; i< encBufSize; i++) + { + printf("%x\t",encBuf[i]); + } + printf("\n"); + + /* Free allocated memory */ + DU_FREE(mibMsg->systemFrameNumber.buf, + mibMsg->systemFrameNumber.size); + DU_FREE(mibMsg->spare.buf, mibMsg->spare.size); + DU_FREE(mibMsg, sizeof(MIB_t)); + + return ROK; + +} + +/******************************************************************* + * + * @brief Builds CellIdentity within SIB1 message + * + * @details + * + * Function : BuildCellIdentity + * + * Functionality: Building RAN area code in SIB1 message + * + * @params[in] RAN_AreaCode_t **ranAreaCode + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +S16 BuildCellIdentity(CellIdentity_t *cellIdentity) +{ + cellIdentity->size = ODU_VALUE_FIVE*sizeof(uint8_t); + cellIdentity->bits_unused = ODU_VALUE_FOUR; + + DU_ALLOC(cellIdentity->buf, cellIdentity->size); + if(!cellIdentity->buf) + { + DU_LOG("DU APP: CellIdentity memory allocation failure"); + return RFAILED; + } + *cellIdentity->buf = duCfgParam.sib1Params.cellIdentity; + + return ROK; +} +/******************************************************************* + * + * @brief Builds RANAC within SIB1 message + * + * @details + * + * Function : BuildRanac + * + * Functionality: Building RAN area code in SIB1 message + * + * @params[in] RAN_AreaCode_t **ranAreaCode + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +S16 BuildRanac(RAN_AreaCode_t **ranAreaCode) +{ + RAN_AreaCode_t *ranac; + DU_ALLOC(ranac, sizeof(RAN_AreaCode_t)); + if(!ranac) + { + DU_LOG("DU APP: RANAC memory allocation failure"); + return RFAILED; + } + *ranac = duCfgParam.sib1Params.ranac; + *ranAreaCode = ranac; + return ROK; +} +/******************************************************************* + * + * @brief Builds TAC within SIB1 message + * + * @details + * + * Function : BuildTac + * + * Functionality: Building Tracking area code in SIB1 message + * + * @params[in] TrackingAreaCode_t **tac + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +S16 BuildTac(TrackingAreaCode_t **trackAreaCode) +{ + TrackingAreaCode_t *tac; + + + DU_ALLOC(tac, sizeof(TrackingAreaCode_t)); + if(!tac) + { + DU_LOG("DU APP: TAC memory allocation failure"); + return RFAILED; + } + + tac->size = ODU_VALUE_THREE*sizeof(uint8_t); + DU_ALLOC(tac->buf, tac->size); + if(!tac->buf) + { + DU_LOG("DU APP: TAC memory allocation failure"); + return RFAILED; + } + *(tac->buf) = duCfgParam.sib1Params.tac; + tac->bits_unused = ODU_VALUE_ZERO; + *trackAreaCode = tac; + + return ROK; +} + +/******************************************************************* + * + * @brief Builds PLMN list within SIB1 message + * + * @details + * + * Function : BuildPlmnList + * + * Functionality: Building PLMN list in SIB1 message + * + * @params[in] CellAccessRelatedInfo_t *cellAccessInfo + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +S16 BuildPlmnList(CellAccessRelatedInfo_t *cellAccessInfo) +{ + U8 idx, idx1, idx2; + U8 elementCnt; + TrackingAreaCode_t **tac; + RAN_AreaCode_t **ranac; + CellIdentity_t *cellIdentity; + struct PLMN_IdentityInfo__plmn_IdentityList + *plmnIdInfo; + + DU_ALLOC(cellAccessInfo->plmn_IdentityList.list.array, + cellAccessInfo->plmn_IdentityList.list.size); + if(!cellAccessInfo->plmn_IdentityList.list.array) + { + DU_LOG("DU APP: BuildPlmnList memory allocation failure"); + return RFAILED; + } + elementCnt = cellAccessInfo->plmn_IdentityList.list.count; + for(idx=0; idxplmn_IdentityList.list.array[idx], + sizeof(PLMN_IdentityInfo_t)); + if(!cellAccessInfo->plmn_IdentityList.list.array[idx]) + { + DU_LOG("DU APP: BuildPlmnList memory allocation failure"); + return RFAILED; + } + } + + idx = 0; + /* PLMN list */ + elementCnt = ODU_VALUE_ONE; + + plmnIdInfo = &cellAccessInfo->plmn_IdentityList.list.array[idx]->\ + plmn_IdentityList; + plmnIdInfo->list.count = elementCnt; + plmnIdInfo->list.size = elementCnt * sizeof(PLMN_IdentitY_t); + DU_ALLOC(plmnIdInfo->list.array, plmnIdInfo->list.size); + if(!plmnIdInfo->list.array) + { + DU_LOG("DU APP: BuildPlmnList memory allocation failure"); + return RFAILED; + } + for(idx1=0; idx1list.array[idx1], + sizeof(PLMN_IdentitY_t)); + if(!(plmnIdInfo->list.array[idx1])) + { + DU_LOG("DU APP: BuildPlmnList memory allocation failure"); + return RFAILED; + } + } + idx1 = 0; + DU_ALLOC(plmnIdInfo->list.array[idx1]->mcc, + sizeof(MCC_t)); + if(!plmnIdInfo->list.array[idx1]->mcc) + { + DU_LOG("DU APP: BuildPlmnList memory allocation failure"); + return RFAILED; + } + + elementCnt = ODU_VALUE_THREE; + plmnIdInfo->list.array[idx1]->mcc->list.count = elementCnt; + plmnIdInfo->list.array[idx1]->mcc->list.size =\ + elementCnt * sizeof(MCC_MNC_Digit_t); + DU_ALLOC(plmnIdInfo->list.array[idx1]->mcc->list.array, + plmnIdInfo->list.array[idx1]->mcc->list.size) + if(!(plmnIdInfo->list.array[idx1]->mcc->list.array)) + { + DU_LOG("DU APP: BuildPlmnList memory allocation failure"); + return RFAILED; + } + for(idx2=0; idx2list.array[idx1]->mcc->list.array[idx2], + sizeof(MCC_MNC_Digit_t)); + if(!plmnIdInfo->list.array[idx1]->mcc->list.array[idx2]) + { + DU_LOG("DU APP: BuildPlmnList memory allocation failure"); + return RFAILED; + } + *(plmnIdInfo->list.array[idx1]->mcc->list.array[idx2])=\ + duCfgParam.sib1Params.plmn.mcc[idx2]; + } + idx2 = 0; + plmnIdInfo->list.array[idx1]->mnc.list.count = elementCnt; + plmnIdInfo->list.array[idx1]->mnc.list.size =\ + elementCnt * sizeof(MCC_MNC_Digit_t); + DU_ALLOC(plmnIdInfo->list.array[idx1]->mnc.list.array, + plmnIdInfo->list.array[idx1]->mnc.list.size); + if(!plmnIdInfo->list.array[idx1]->mnc.list.array) + { + DU_LOG("DU APP: BuildPlmnList memory allocation failure"); + return RFAILED; + } + for(idx2=0; idx2list.array[idx1]->mnc.list.array[idx2], + sizeof(MCC_MNC_Digit_t)); + if(!plmnIdInfo->list.array[idx1]->mnc.list.array[idx2]) + { + DU_LOG("DU APP: BuildPlmnList memory allocation failure"); + return RFAILED; + } + *(plmnIdInfo->list.array[idx1]->mnc.list.array[idx2])=\ + duCfgParam.sib1Params.plmn.mnc[idx2]; + } + + /* Tracking Area Code */ + tac = &cellAccessInfo->plmn_IdentityList.list.array[idx]->trackingAreaCode; + BuildTac(tac); + + /* RANAC */ + ranac = &cellAccessInfo->plmn_IdentityList.list.array[idx]->ranac; + BuildRanac(ranac); + + /* CellIdentity */ + cellIdentity =\ + &cellAccessInfo->plmn_IdentityList.list.array[idx]->cellIdentity; + BuildCellIdentity(cellIdentity); + + /* cellReservedForOperatorUse */ + cellAccessInfo->plmn_IdentityList.list.array[idx]->\ + cellReservedForOperatorUse = \ + duCfgParam.sib1Params.cellResvdForOpUse; + + + return ROK; +} + +/******************************************************************* + * + * @brief Builds SIB message in Served Cell Info + * + * @details + * + * Function : BuildSib1Msg + * + * Functionality: Building SIB message in Served Cell Info + * + * @params[in] GNB_DU_System_Information *gnbDuSysInfo + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +S16 BuildSib1Msg() +{ + SIB1_t *sib1Msg; + CellAccessRelatedInfo_t *cellAccessInfo; + U8 elementCnt; + U8 idx, idx1, idx2; + asn_enc_rval_t encRetVal; + TrackingAreaCode_t *tac; + RAN_AreaCode_t *ranac; + CellIdentity_t *cellIdentity; + struct PLMN_IdentityInfo__plmn_IdentityList + *plmnIdInfo; + + DU_ALLOC(sib1Msg, sizeof(SIB1_t)); + if(!sib1Msg) + { + DU_LOG("DU APP: SIB1 msg memory allocation failure"); + return RFAILED; + } + elementCnt = ODU_VALUE_ONE; + + /* PLMN list */ + cellAccessInfo = &sib1Msg->cellAccessRelatedInfo; + cellAccessInfo->plmn_IdentityList.list.count = + elementCnt; + cellAccessInfo->plmn_IdentityList.list.size + = elementCnt * sizeof(PLMN_IdentityInfo_t); + + BuildPlmnList(cellAccessInfo); + + xer_fprint(stdout, &asn_DEF_SIB1, sib1Msg); + + /* Encode the F1SetupRequest type as APER */ + cmMemset((U8 *)encBuf, 0, ENC_BUF_MAX_LEN); + encBufSize = 0; + encRetVal = aper_encode(&asn_DEF_SIB1, 0, sib1Msg, PrepFinalEncBuf,\ + encBuf); + printf("\nencbufSize: %d\n", encBufSize); + if(encRetVal.encoded == -1) + { + DU_LOG("\nDU APP : Could not encode SIB1 structure (at %s)\n",\ + encRetVal.failed_type ? + encRetVal.failed_type->name : + "unknown"); + return RFAILED; + } + for(int i=0; i< encBufSize; i++) + { + printf("%x\t",encBuf[i]); + } + printf("\n"); + + /* Free allocated memeory */ + /* Free PLMN List */ + + for(idx=0; idxplmn_IdentityList.list.count; idx++) + { + plmnIdInfo = &cellAccessInfo->plmn_IdentityList.list.array[idx]->\ + plmn_IdentityList; + for(idx1=0; idx1list.count; idx1++) + { + for(idx2=0; idx2list.array[idx1]->mnc.list.count; idx2++) + { + DU_FREE(plmnIdInfo->list.array[idx1]->mcc->list.array[idx2], + sizeof(MCC_MNC_Digit_t)); + DU_FREE(plmnIdInfo->list.array[idx1]->mnc.list.array[idx2], + sizeof(MCC_MNC_Digit_t)); + } + DU_FREE(plmnIdInfo->list.array[idx1]->mcc->list.array, + plmnIdInfo->list.array[idx1]->mcc->list.size); + DU_FREE(plmnIdInfo->list.array[idx1]->mnc.list.array, + plmnIdInfo->list.array[idx1]->mnc.list.size); + DU_FREE(plmnIdInfo->list.array[idx1]->mcc, + sizeof(MCC_t)); + DU_FREE(plmnIdInfo->list.array[idx1], + sizeof(PLMN_IdentitY_t)); + } + DU_FREE(cellAccessInfo->plmn_IdentityList.list.array[idx], + sizeof(PLMN_IdentityInfo_t)); + cellIdentity =\ + &cellAccessInfo->plmn_IdentityList.list.array[idx]->cellIdentity; + DU_FREE(cellIdentity->buf, cellIdentity->size); + + ranac = cellAccessInfo->plmn_IdentityList.list.array[idx]->ranac; + DU_FREE(ranac, sizeof(RAN_AreaCode_t)); + + tac = cellAccessInfo->plmn_IdentityList.list.array[idx]->trackingAreaCode; + DU_FREE(tac->buf, tac->size); + DU_FREE(tac, sizeof(TrackingAreaCode_t)); + } + DU_FREE(cellAccessInfo->plmn_IdentityList.list.array, + cellAccessInfo->plmn_IdentityList.list.size); + + DU_FREE(sib1Msg, sizeof(SIB1_t)); + return ROK; + +} + +/********************************************************************** + End of file + **********************************************************************/ diff --git a/src/du_app/du_sys_info_hdl.h b/src/du_app/du_sys_info_hdl.h new file mode 100644 index 000000000..8479c5641 --- /dev/null +++ b/src/du_app/du_sys_info_hdl.h @@ -0,0 +1,39 @@ +/******************************************************************************* +################################################################################ +# Copyright (c) [2017-2019] [Radisys] # +# # +# Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 # +# # +# 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. # +################################################################################ +*******************************************************************************/ + +#include "du_mgr.h" +#include "du_cfg.h" +#include "du_log.h" +#include "odu_common_codec.h" + +/* Macros */ +#define ODU_VALUE_ZERO 0 +#define ODU_VALUE_ONE 1 +#define ODU_VALUE_TWO 2 +#define ODU_VALUE_THREE 3 +#define ODU_VALUE_FOUR 4 +#define ODU_VALUE_FIVE 5 +#define ODU_VALUE_SEVEN 7 + +/* Function declarations */ +S16 BuildMibMsg(); +S16 BuildSib1Msg(); + +/********************************************************************** + End of file +**********************************************************************/ -- 2.16.6