X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fdu_app%2Fdu_e2ap_msg_hdl.c;h=a1c7d8c2a9bf93fc7fd4904a006b0eefca1cf8b4;hb=760f81397ca10d4983c4b21414edbaa13d181173;hp=ece43c87beba5f7250c8220a59965d33c2b3793d;hpb=a87bebdb591357669a9341b752c6e7819acd43ad;p=o-du%2Fl2.git diff --git a/src/du_app/du_e2ap_msg_hdl.c b/src/du_app/du_e2ap_msg_hdl.c index ece43c87b..a1c7d8c2a 100644 --- a/src/du_app/du_e2ap_msg_hdl.c +++ b/src/du_app/du_e2ap_msg_hdl.c @@ -232,7 +232,7 @@ void FreeE2RemovalFailure(E2AP_PDU_t *e2apMsg) * * ****************************************************************/ -uint8_t BuildAndSendRemovalFailure(uint8_t transId, E2FailureCause failureCause) +uint8_t BuildAndSendRemovalFailure(uint16_t transId, E2FailureCause failureCause) { uint8_t ieIdx = 0, elementCnt = 0; uint8_t ret = RFAILED; @@ -391,7 +391,7 @@ void FreeE2RemovalResponse(E2AP_PDU_t *e2apMsg) * RFAILED - failure * * ****************************************************************/ -uint8_t BuildAndSendRemovalResponse(uint8_t transId) +uint8_t BuildAndSendRemovalResponse(uint16_t transId) { uint8_t ieIdx = 0, elementCnt = 0; uint8_t ret = RFAILED; @@ -482,6 +482,7 @@ uint8_t BuildAndSendRemovalResponse(uint8_t transId) }while(true); FreeE2RemovalResponse(e2apMsg); + removeE2NodeInformation(); return ret; } @@ -537,14 +538,14 @@ void freeAperDecodingOfE2RemovalReq(E2RemovalRequest_t *removalReq) void procE2RemovalRequest(E2AP_PDU_t *e2apMsg) { - uint8_t arrIdx =0, transId =0, count =0; + uint8_t arrIdx =0; + uint16_t transId =0; E2FailureCause failureCause; E2RemovalRequest_t *removalReq=NULLP; DU_LOG("\nINFO --> E2AP : E2 Removal request received"); removalReq = &e2apMsg->choice.initiatingMessage->value.choice.E2RemovalRequest; - count =removalReq->protocolIEs.list.count; for(arrIdx=0; arrIdxprotocolIEs.list.count; arrIdx++) { switch(removalReq->protocolIEs.list.array[arrIdx]->id) @@ -7880,6 +7881,649 @@ void procE2NodeConfigUpdateAck(E2AP_PDU_t *e2apMsg) freeAperDecodingOfE2NodeConfigUpdateAck(e2NodeConfigUpdateAck); } +/******************************************************************* + * + * @brief Deallocate the memory allocated for RemovalRequest msg + * + * @details + * + * Function : FreeRemovalRequest + * + * Functionality: + * - freeing the memory allocated for RemovalRequest + * + * @params[in] E2AP_PDU_t *e2apMsg + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +void FreeRemovalRequest(E2AP_PDU_t *e2apMsg) +{ + uint8_t ieIdx =0; + E2RemovalRequest_t *removalReq = NULLP; + + if(e2apMsg != NULLP) + { + if(e2apMsg->choice.initiatingMessage != NULLP) + { + removalReq = &e2apMsg->choice.initiatingMessage->value.choice.E2RemovalRequest; + if(removalReq->protocolIEs.list.array) + { + for(ieIdx = 0; ieIdx < removalReq->protocolIEs.list.count; ieIdx++) + { + DU_FREE(removalReq->protocolIEs.list.array[ieIdx], sizeof(E2RemovalRequestIEs_t)); + } + DU_FREE(removalReq->protocolIEs.list.array, removalReq->protocolIEs.list.size); + } + DU_FREE(e2apMsg->choice.initiatingMessage, sizeof(InitiatingMessageE2_t)); + } + DU_FREE(e2apMsg, sizeof(E2AP_PDU_t)); + } +} + +/******************************************************************* + * + * @brief Build and send the removal request msg + * + * @details + * + * Function : BuildAndSendRemovalRequest + * + * Functionality: + * - Buld and send the removal request msg to E2 node + * + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ + +uint8_t BuildAndSendRemovalRequest() +{ + uint8_t ieIdx = 0, elementCnt = 0, transId = 0; + uint8_t ret = RFAILED; + E2AP_PDU_t *e2apMsg = NULLP; + E2RemovalRequest_t *removalReq = NULLP; + asn_enc_rval_t encRetVal; /* Encoder return value */ + + DU_LOG("\nINFO --> E2AP : Building Removal Request\n"); + + do + { + DU_ALLOC(e2apMsg, sizeof(E2AP_PDU_t)); + if(e2apMsg == NULLP) + { + DU_LOG("\nERROR --> E2AP : Memory allocation failed in %s at line %d", __func__, __LINE__); + break; + } + + e2apMsg->present = E2AP_PDU_PR_initiatingMessage; + DU_ALLOC(e2apMsg->choice.initiatingMessage, sizeof(InitiatingMessageE2_t)); + if(e2apMsg->choice.initiatingMessage == NULLP) + { + DU_LOG("\nERROR --> E2AP : Memory allocation failed in %s at line %d", __func__, __LINE__); + break; + } + + e2apMsg->choice.initiatingMessage->procedureCode = ProcedureCodeE2_id_E2removal; + e2apMsg->choice.initiatingMessage->criticality = CriticalityE2_reject; + e2apMsg->choice.initiatingMessage->value.present = InitiatingMessageE2__value_PR_E2RemovalRequest; + removalReq = &e2apMsg->choice.initiatingMessage->value.choice.E2RemovalRequest; + + elementCnt = 1; + removalReq->protocolIEs.list.count = elementCnt; + removalReq->protocolIEs.list.size = elementCnt * sizeof(E2RemovalRequestIEs_t *); + + DU_ALLOC(removalReq->protocolIEs.list.array, removalReq->protocolIEs.list.size); + if(!removalReq->protocolIEs.list.array) + { + DU_LOG("\nERROR --> E2AP : Memory allocation failed in %s at line %d", __func__, __LINE__); + break; + } + + for(ieIdx = 0; ieIdx < elementCnt; ieIdx++) + { + DU_ALLOC(removalReq->protocolIEs.list.array[ieIdx], sizeof(E2RemovalRequestIEs_t)); + if(!removalReq->protocolIEs.list.array[ieIdx]) + { + DU_LOG("\nERROR --> E2AP : Memory allocation failed in %s at line %d", __func__, __LINE__); + break; + } + } + + /* In case of failure */ + if(ieIdx < elementCnt) + break; + + ieIdx = 0; + removalReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_IDE2_id_TransactionID; + removalReq->protocolIEs.list.array[ieIdx]->criticality = CriticalityE2_reject; + removalReq->protocolIEs.list.array[ieIdx]->value.present = E2RemovalRequestIEs__value_PR_TransactionID; + transId = assignTransactionId(); + removalReq->protocolIEs.list.array[ieIdx]->value.choice.TransactionID = transId; + + /* Prints the Msg formed */ + xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2apMsg); + + memset(encBuf, 0, ENC_BUF_MAX_LEN); + encBufSize = 0; + encRetVal = aper_encode(&asn_DEF_E2AP_PDU, 0, e2apMsg, PrepFinalEncBuf,\ + encBuf); + if(encRetVal.encoded == ENCODE_FAIL) + { + DU_LOG("\nERROR --> E2AP : Could not encode removal request structure (at %s)\n",\ + encRetVal.failed_type ? encRetVal.failed_type->name : "unknown"); + break; + } + else + { + DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for removal request\n"); +#ifdef DEBUG_ASN_PRINT + for(int i=0; i< encBufSize; i++) + { + printf("%x",encBuf[i]); + } +#endif + } + if(SendE2APMsg(DU_APP_MEM_REGION, DU_POOL, encBuf, encBufSize) != ROK) + { + DU_LOG("\nERROR --> E2AP : Sending removal request failed"); + break; + } + + + ret = ROK; + duCb.e2apDb.e2TransInfo.e2InitTransaction[transId].transactionId = transId; + duCb.e2apDb.e2TransInfo.e2InitTransaction[transId].procedureCode = e2apMsg->choice.initiatingMessage->procedureCode; + break; + }while(true); + + /* Free all memory */ + FreeRemovalRequest(e2apMsg); + + return ret; +} + +/****************************************************************** + * + * @brief Deallocation of memory allocated by aper decoder + * for Removal failure + * + * @details + * + * Function : freeAperDecodingOfE2RemovalFailure + * + * Functionality: Deallocation of memory allocated by aper decoder + * for Removal failure + * + * @params[in] Pointer to removalFailure + * @return void + * + * ****************************************************************/ +void freeAperDecodingOfE2RemovalFailure(E2RemovalFailure_t *removalFailure) +{ + uint8_t arrIdx=0; + + if(removalFailure) + { + if(removalFailure->protocolIEs.list.array) + { + for(arrIdx=0; arrIdxprotocolIEs.list.count; arrIdx++) + { + if(removalFailure->protocolIEs.list.array[arrIdx]) + { + free(removalFailure->protocolIEs.list.array[arrIdx]); + } + } + free(removalFailure->protocolIEs.list.array); + } + } +} + +/****************************************************************** + * + * @brief Processes the E2 removal failure msg + * + * @details + * + * Function : procE2RemovalFailure + * + * Functionality: Processes the E2 removal failure msg + * + * @params[in] + * E2AP_PDU_t *e2apMsg + * + * @return void + * + * ****************************************************************/ +void ProcE2RemovalFailure(E2AP_PDU_t *e2apMsg) +{ + uint8_t ieIdx = 0, transId=0; + CauseE2_t *cause = NULLP; + E2RemovalFailure_t *e2RemovalFailure=NULLP; + + e2RemovalFailure = &e2apMsg->choice.unsuccessfulOutcome->value.choice.E2RemovalFailure; + + if(!e2RemovalFailure->protocolIEs.list.array) + { + DU_LOG("\nERROR --> E2AP : e2RemovalFailure array pointer is null"); + return; + } + + for(ieIdx=0; ieIdx < e2RemovalFailure->protocolIEs.list.count; ieIdx++) + { + if(e2RemovalFailure->protocolIEs.list.array[ieIdx]) + { + switch(e2RemovalFailure->protocolIEs.list.array[ieIdx]->id) + { + case ProtocolIE_IDE2_id_TransactionID: + { + transId = e2RemovalFailure->protocolIEs.list.array[ieIdx]->value.choice.TransactionID; + if((duCb.e2apDb.e2TransInfo.e2InitTransaction[transId].transactionId == transId) &&\ + (duCb.e2apDb.e2TransInfo.e2InitTransaction[transId].procedureCode == e2apMsg->choice.unsuccessfulOutcome->procedureCode)) + { + memset(&duCb.e2apDb.e2TransInfo.e2InitTransaction[transId], 0, sizeof(E2TransInfo)); + } + else + { + DU_LOG("\nERROR --> E2AP : Invalid transaction id [%d]", transId); + } + break; + } + case ProtocolIE_IDE2_id_CauseE2: + { + cause = &e2RemovalFailure->protocolIEs.list.array[ieIdx]->value.choice.CauseE2; + printE2ErrorCause(cause); + break; + } + default: + { + DU_LOG("\nERROR --> E2AP : Received Invalid Ie [%ld]", e2RemovalFailure->protocolIEs.list.array[ieIdx]->id); + break; + } + } + } + } + freeAperDecodingOfE2RemovalFailure(e2RemovalFailure); +} + + /****************************************************************** + * + * @brief Deallocation of memory allocated by aper decoder + * for Removal failure + * + * @details + * + * Function : freeAperDecodingOfE2RemovalResponse + * + * Functionality: Deallocation of memory allocated by aper decoder + * for Removal failure + * + * @params[in] Pointer to removalResponse + * @return void + * + * ****************************************************************/ + void freeAperDecodingOfE2RemovalResponse(E2RemovalResponse_t *removalResponse) + { + uint8_t arrIdx=0; + + if(removalResponse) + { + if(removalResponse->protocolIEs.list.array) + { + for(arrIdx=0; arrIdxprotocolIEs.list.count; arrIdx++) + { + if(removalResponse->protocolIEs.list.array[arrIdx]) + { + free(removalResponse->protocolIEs.list.array[arrIdx]); + } + } + free(removalResponse->protocolIEs.list.array); + } + } + } + +/******************************************************************* + * + * @brief process the E2 Removal Response + * + * @details + * + * Function : ProcE2RemovalResponse + * + * Functionality: Process E2 Removal Response + * + * @params[in] + * E2AP_PDU_t *e2apMsg + * @return void + * + ******************************************************************/ + +void ProcE2RemovalResponse(E2AP_PDU_t *e2apMsg) +{ + uint8_t ieIdx = 0, transId=0; + E2RemovalResponse_t *removalRsp = NULLP; + + removalRsp = &e2apMsg->choice.successfulOutcome->value.choice.E2RemovalResponse; + + if(!removalRsp->protocolIEs.list.array) + { + DU_LOG("\nERROR --> E2AP : removalRsp array pointer is null"); + return; + } + + for(ieIdx=0; ieIdx < removalRsp->protocolIEs.list.count; ieIdx++) + { + if(removalRsp->protocolIEs.list.array[ieIdx]) + { + switch(removalRsp->protocolIEs.list.array[ieIdx]->id) + { + case ProtocolIE_IDE2_id_TransactionID: + { + transId = removalRsp->protocolIEs.list.array[ieIdx]->value.choice.TransactionID; + if((duCb.e2apDb.e2TransInfo.e2InitTransaction[transId].transactionId == transId) &&\ + (duCb.e2apDb.e2TransInfo.e2InitTransaction[transId].procedureCode == e2apMsg->choice.unsuccessfulOutcome->procedureCode)) + { + removeE2NodeInformation(); + memset(&duCb.e2apDb.e2TransInfo.e2InitTransaction[transId], 0, sizeof(E2TransInfo)); + } + else + { + DU_LOG("\nERROR --> E2AP : Invalid transaction id [%d]", transId); + } + break; + } + default: + { + DU_LOG("\nERROR --> E2AP : Received Invalid Ie [%ld]", removalRsp->protocolIEs.list.array[ieIdx]->id); + break; + } + } + } + } + + freeAperDecodingOfE2RemovalResponse(removalRsp); +} + +/******************************************************************* + * + * @brief Deallocate the memory allocated for E2 Connection Update Failure + * + * @details + * + * Function : FreeE2ConnectionUpdateFailure + * + * Functionality: + * - freeing the memory allocated for E2ConnectionUpdateFailure + * + * @params[in] E2AP_PDU_t *e2apMsg + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +void FreeE2ConnectionUpdateFailure(E2AP_PDU_t *e2apMsg) +{ + uint8_t ieIdx =0; + E2connectionUpdateFailure_t *e2ConnectionUpdateFailure=NULLP; + + if(e2apMsg != NULLP) + { + if(e2apMsg->choice.unsuccessfulOutcome != NULLP) + { + e2ConnectionUpdateFailure = &e2apMsg->choice.unsuccessfulOutcome->value.choice.E2connectionUpdateFailure; + if(e2ConnectionUpdateFailure->protocolIEs.list.array) + { + for(ieIdx=0; ieIdx < e2ConnectionUpdateFailure->protocolIEs.list.count; ieIdx++) + { + DU_FREE(e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx], sizeof(E2connectionUpdateFailure_IEs_t)); + } + DU_FREE(e2ConnectionUpdateFailure->protocolIEs.list.array, e2ConnectionUpdateFailure->protocolIEs.list.size); + } + DU_FREE(e2apMsg->choice.unsuccessfulOutcome, sizeof(UnsuccessfulOutcomeE2_t)); + } + DU_FREE(e2apMsg, sizeof(E2AP_PDU_t)); + } +} + +/******************************************************************* + * + * @brief Buld and send the E2 Connection Update Failure msg + * + * @details + * + * Function : BuildAndSendE2ConnectionUpdateFailure + * + * Functionality: + * - Buld and send the E2 Connection Update Failure Message + * @params[in] + * Trans Id + * Failure Cause + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ + +uint8_t BuildAndSendE2ConnectionUpdateFailure(uint16_t transId, E2FailureCause failureCause) +{ + uint8_t ieIdx = 0, elementCnt = 0; + uint8_t ret = RFAILED; + E2AP_PDU_t *e2apMsg = NULLP; + E2connectionUpdateFailure_t *e2ConnectionUpdateFailure=NULLP; + asn_enc_rval_t encRetVal; /* Encoder return value */ + + DU_LOG("\nINFO --> E2AP : Building E2 Connection Update Failure Message\n"); + do + { + DU_ALLOC(e2apMsg, sizeof(E2AP_PDU_t)); + if(e2apMsg == NULLP) + { + DU_LOG("\nERROR --> E2AP : Memory allocation failed in %s at line %d", __func__, __LINE__); + break; + } + e2apMsg->present = E2AP_PDU_PR_unsuccessfulOutcome; + + DU_ALLOC(e2apMsg->choice.unsuccessfulOutcome, sizeof(UnsuccessfulOutcomeE2_t)); + if(e2apMsg->choice.unsuccessfulOutcome == NULLP) + { + DU_LOG("\nERROR --> E2AP : Memory allocation failed in %s at line %d", __func__, __LINE__); + break; + } + + e2apMsg->choice.unsuccessfulOutcome->procedureCode = ProcedureCodeE2_id_E2connectionUpdate; + e2apMsg->choice.unsuccessfulOutcome->criticality = CriticalityE2_reject; + e2apMsg->choice.unsuccessfulOutcome->value.present = UnsuccessfulOutcomeE2__value_PR_E2connectionUpdateFailure; + e2ConnectionUpdateFailure = &e2apMsg->choice.unsuccessfulOutcome->value.choice.E2connectionUpdateFailure; + + elementCnt = 2; + e2ConnectionUpdateFailure->protocolIEs.list.count = elementCnt; + e2ConnectionUpdateFailure->protocolIEs.list.size = elementCnt * sizeof(E2connectionUpdateFailure_IEs_t *); + DU_ALLOC(e2ConnectionUpdateFailure->protocolIEs.list.array, e2ConnectionUpdateFailure->protocolIEs.list.size); + if(!e2ConnectionUpdateFailure->protocolIEs.list.array) + { + DU_LOG("\nERROR --> E2AP : Memory allocation failed in %s at line %d", __func__, __LINE__); + break; + } + + for(ieIdx=0; ieIdx < elementCnt; ieIdx++) + { + DU_ALLOC(e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx], sizeof(E2connectionUpdateFailure_IEs_t)); + if(!e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx]) + { + DU_LOG("\nERROR --> E2AP : Memory allocation failed in %s at line %d", __func__, __LINE__); + break; + } + } + if(ieIdx < elementCnt) + break; + + ieIdx = 0; + e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx]->id = ProtocolIE_IDE2_id_TransactionID; + e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx]->criticality = CriticalityE2_reject; + e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx]->value.present = E2connectionUpdateFailure_IEs__value_PR_TransactionID; + e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx]->value.choice.TransactionID = transId; + + /* Cause */ + ieIdx++; + e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx]->id = ProtocolIE_IDE2_id_CauseE2; + e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx]->criticality = CriticalityE2_ignore; + e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx]->value.present = E2connectionUpdateFailure_IEs__value_PR_CauseE2; + fillE2Cause(&e2ConnectionUpdateFailure->protocolIEs.list.array[ieIdx]->value.choice.CauseE2, failureCause); + + xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2apMsg); + + memset(encBuf, 0, ENC_BUF_MAX_LEN); + encBufSize = 0; + encRetVal = aper_encode(&asn_DEF_E2AP_PDU, 0, e2apMsg, PrepFinalEncBuf, encBuf); + if(encRetVal.encoded == ENCODE_FAIL) + { + DU_LOG("\nERROR --> E2AP : Could not encode E2 connection update failure structure (at %s)\n",\ + encRetVal.failed_type ? encRetVal.failed_type->name : "unknown"); + break; + } + else + { + DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for E2 Connection Update Failure \n"); + for(int i=0; i< encBufSize; i++) + { + DU_LOG("%x",encBuf[i]); + } + } + + /* Sending msg */ + if(SendE2APMsg(DU_APP_MEM_REGION, DU_POOL, encBuf, encBufSize) != ROK) + { + DU_LOG("\nERROR --> E2AP : Failed to send E2 Connection Update Failure"); + break; + } + + ret = ROK; + break; + }while(true); + + FreeE2ConnectionUpdateFailure(e2apMsg); + return ret; +} + +/****************************************************************** + * + * @brief Deallocation of memory allocated by aper decoder for + * E2 Connection Update + * + * @details + * + * Function :freeAperDecodingOfE2ConnectionUpdate + * + * Functionality: Deallocation of memory allocated by aper decoder for + * E2 Connection Update + * + * @params[in] Pointer to connectionUpdate + * @return void + * + * ****************************************************************/ + +void freeAperDecodingOfE2ConnectionUpdate(E2connectionUpdate_t *connectionUpdate) +{ + uint8_t ieIdx =0, arrIdx=0; + E2connectionUpdate_List_t *connectionToBeModifyList = NULLP; + + if(connectionUpdate->protocolIEs.list.array) + { + for(ieIdx = 0; ieIdx < connectionUpdate->protocolIEs.list.count; ieIdx++) + { + if(connectionUpdate->protocolIEs.list.array[ieIdx]) + { + switch(connectionUpdate->protocolIEs.list.array[ieIdx]->id) + { + case ProtocolIE_IDE2_id_TransactionID: + break; + + case ProtocolIE_IDE2_id_E2connectionUpdateModify: + { + connectionToBeModifyList = &connectionUpdate->protocolIEs.list.array[ieIdx]->value.choice.E2connectionUpdate_List; + if(connectionToBeModifyList->list.array) + { + for(arrIdx= 0; arrIdx< connectionToBeModifyList->list.count; arrIdx++) + { + free(connectionToBeModifyList->list.array[arrIdx]); + } + free(connectionToBeModifyList->list.array); + } + break; + } + } + free(connectionUpdate->protocolIEs.list.array[ieIdx]); + } + } + free(connectionUpdate->protocolIEs.list.array); + } +} + +/******************************************************************* + * + * @brief Process e2 connection update received from RIC + * + * @details + * + * Function : procE2ConnectionUpdate + * + * Functionality: Process e2 connection update received from RIC + * + * @param E2AP_PDU_t *e2apMsg + * @return void + * + ******************************************************************/ + +void procE2ConnectionUpdate(E2AP_PDU_t *e2apMsg) +{ + bool invalidTransId = false; + uint8_t arrIdx =0, transId =0, count=0; + E2FailureCause failureCause; + E2connectionUpdate_t *connectionUpdate=NULLP; + + DU_LOG("\nINFO --> E2AP : E2 connection update received"); + connectionUpdate = &e2apMsg->choice.initiatingMessage->value.choice.E2connectionUpdate; + + count = connectionUpdate->protocolIEs.list.count; + for(arrIdx=0; arrIdxprotocolIEs.list.count; arrIdx++) + { + switch(connectionUpdate->protocolIEs.list.array[arrIdx]->id) + { + case ProtocolIE_IDE2_id_TransactionID: + { + transId = connectionUpdate->protocolIEs.list.array[arrIdx]->value.choice.TransactionID; + if(transId>255) + { + invalidTransId = true; + } + break; + } + case ProtocolIE_IDE2_id_E2connectionUpdateModify: + { + /*TODO*/ + break; + } + } + + if(invalidTransId == true) + break; + } + + if(invalidTransId == true) + { + failureCause.causeType = E2_PROTOCOL; + failureCause.cause = E2_ABSTRACT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MESSAGE; + if(BuildAndSendE2ConnectionUpdateFailure(transId, failureCause) != ROK) + { + DU_LOG("\nERROR --> E2AP : Failed to build and send E2 connection update failure"); + } + } + else + { + /*TODO*/ + } + + freeAperDecodingOfE2ConnectionUpdate(connectionUpdate); +} + /******************************************************************* * * @brief Handles received E2AP message and sends back response @@ -7974,6 +8618,11 @@ void E2APMsgHdlr(Buffer *mBuf) procRicSubscriptionModificationRefuse(e2apMsg); break; } + case UnsuccessfulOutcomeE2__value_PR_E2RemovalFailure: + { + ProcE2RemovalFailure(e2apMsg); + break; + } default: { DU_LOG("\nERROR --> E2AP : Invalid type of E2AP_PDU_PR_unsuccessfulOutcome [%d]",\ @@ -8016,6 +8665,11 @@ void E2APMsgHdlr(Buffer *mBuf) procE2NodeConfigUpdateAck(e2apMsg); break; } + case SuccessfulOutcomeE2__value_PR_E2RemovalResponse: + { + ProcE2RemovalResponse(e2apMsg); + break; + } default: { DU_LOG("\nERROR --> E2AP : Invalid type of E2AP_PDU_PR_successfulOutcome [%d]",\ @@ -8064,6 +8718,12 @@ void E2APMsgHdlr(Buffer *mBuf) procE2RemovalRequest(e2apMsg); break; } + case InitiatingMessageE2__value_PR_E2connectionUpdate: + { + DU_LOG("\nINFO --> E2AP : E2 coneection update received"); + procE2ConnectionUpdate(e2apMsg); + break; + } default: { DU_LOG("\nERROR --> E2AP : Invalid type of E2AP_PDU_PR_initiatingMessage [%d]",\