+/*******************************************************************
+*
+* @brief processing of Gnb-DU config update
+*
+* @details
+*
+* Function : procGnbDuUpdate
+*
+* Functionality:
+* - processing of Gnb-DU config update
+*
+* @params[in] F1AP_PDU_t *f1apMsg
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+uint8_t procGnbDuUpdate(F1AP_PDU_t *f1apMsg)
+{
+ bool cellToBeDelete = false;
+ uint8_t ieIdx = 0, ueIdx = 0;
+ GNBDUConfigurationUpdate_t *duCfgUpdate = NULLP;
+
+ duCfgUpdate = &f1apMsg->choice.initiatingMessage->value.choice.GNBDUConfigurationUpdate;
+
+ for(ieIdx=0; ieIdx < duCfgUpdate->protocolIEs.list.count; ieIdx++)
+ {
+ switch(duCfgUpdate->protocolIEs.list.array[ieIdx]->id)
+ {
+ case ProtocolIE_ID_id_TransactionID:
+ break;
+ case ProtocolIE_ID_id_Served_Cells_To_Modify_List:
+ break;
+ case ProtocolIE_ID_id_Served_Cells_To_Delete_List:
+ {
+ cellToBeDelete = true;
+ break;
+ }
+ case ProtocolIE_ID_id_gNB_DU_ID:
+ break;
+ }
+ }
+ if(BuildAndSendDUUpdateAck() != ROK)
+ {
+ DU_LOG("ERROR --> F1AP : Failed to build and send DUUpdateAck");
+ return RFAILED;
+ }
+
+ if(cellToBeDelete == false)
+ {
+ DU_LOG("\nINFO --> F1AP : Sending F1 reset request");
+ if(BuildAndSendF1ResetReq() != ROK)
+ {
+ DU_LOG("ERROR --> F1AP : Failed to build and send F1 reset request");
+ return RFAILED;
+ }
+ }
+ else
+ {
+ for(ueIdx = 0; ueIdx < MAX_NUM_UE; ueIdx++)
+ {
+ CU_FREE(ueCb[ueIdx].f1apMsgDb.duToCuContainer.buf, ueCb[ueIdx].f1apMsgDb.duToCuContainer.size);
+ memset(&ueCb[ueIdx], 0, sizeof(UeCb));
+ }
+ }
+
+ return ROK;
+}