Merge "Fixes in current code for Multi-UE support [Issue-ID: ODUHIGH-354]"
[o-du/l2.git] / src / cu_stub / cu_f1ap_msg_hdl.c
index 28d793c..07e176c 100644 (file)
@@ -72,6 +72,7 @@
 #include "SRS-Resource.h"
 #include "SRS-ResourceSet.h"
 #include "SRS-Config.h"
+#include "PUCCH-Config.h"
 #include "BWP-UplinkDedicated.h"
 #include "PUSCH-ServingCellConfig.h"
 #include "UplinkConfig.h"
 #define PDSCH_MAPPING_TYPE_B 1
 
 /* MACRO Define for PUSCH Configuration */
-#define PUSCH_K2  3
+#define PUSCH_K2_CFG1  3
+#define PUSCH_K2_CFG2  4
 
 #define PUSCH_MSG3_DELTA_PREAMBLE 0
 #define PUSCH_P0_NOMINAL_WITH_GRANT -70
 #define SCRAMBLING_ID  NR_PCI
 #define DMRS_ADDITIONAL_POS  0          /* DMRS Additional poistion */
 #define RES_ALLOC_TYPE       1          /* Resource allocation type */
-
+#define FIVE_QI_VALUE 9  /*spec 23.501, Table 5.7.4-1*/
 /*******************************************************************
-*
-* @brief Sends F1 msg over SCTP
-*
-* @details
-*
-*    Function : SendF1APMsg
-*
-*    Functionality: Sends F1 msg over SCTP
-*
-* @params[in] Region region
-*             Pool pool
-* @return ROK     - success
-*         RFAILED - failure
-*
-* ****************************************************************/
+ *
+ * @brief Sends F1 msg over SCTP
+ *
+ * @details
+ *
+ *    Function : SendF1APMsg
+ *
+ *    Functionality: Sends F1 msg over SCTP
+ *
+ * @params[in] Region region
+ *             Pool pool
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
 S16 SendF1APMsg(Region region, Pool pool)
 {
    Buffer *mBuf = NULLP;
@@ -196,26 +198,26 @@ S16 SendF1APMsg(Region region, Pool pool)
    {
       if(ODU_ADD_POST_MSG_MULT((Data *)encBuf, encBufSize, mBuf) == ROK)
       {
-        ODU_PRINT_MSG(mBuf, 0,0);
+         ODU_PRINT_MSG(mBuf, 0,0);
 
-        if(sctpSend(mBuf) != ROK)
-        {
-           DU_LOG("\nF1AP : SCTP Send failed");
-           ODU_PUT_MSG_BUF(mBuf);
-           return RFAILED;
-        }
+         if(sctpSend(mBuf) != ROK)
+         {
+            DU_LOG("\nERROR  -->  F1AP : SCTP Send failed");
+            ODU_PUT_MSG_BUF(mBuf);
+            return RFAILED;
+         }
       }
       else
       {
-        DU_LOG("\nF1AP : ODU_ADD_POST_MSG_MULT failed");
-        ODU_PUT_MSG_BUF(mBuf);
-        return RFAILED;
+         DU_LOG("\nERROR  -->  F1AP : ODU_ADD_POST_MSG_MULT failed");
+         ODU_PUT_MSG_BUF(mBuf);
+         return RFAILED;
       }
       ODU_PUT_MSG_BUF(mBuf);
    }
    else
    {
-      DU_LOG("\nF1AP : Failed to allocate memory");
+      DU_LOG("\nERROR  -->  F1AP : Failed to allocate memory");
       return RFAILED;
    }
 
@@ -275,13 +277,13 @@ S16 BuildAndSendF1SetupRsp()
    Cells_to_be_Activated_List_t *cellToActivate;
    RRC_Version_t      *rrcVer;
    asn_enc_rval_t     encRetVal; 
-   DU_LOG("\nF1AP : Building F1 Setup Response\n");
+   DU_LOG("\nINFO  -->  F1AP : Building F1 Setup Response\n");
 
    /* Allocate the memory for F1SetupRequest_t */
    CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t)); 
    if(f1apMsg == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
       return RFAILED;
    }
    f1apMsg->present =  F1AP_PDU_PR_successfulOutcome;
@@ -289,7 +291,7 @@ S16 BuildAndSendF1SetupRsp()
    CU_ALLOC(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
    if(f1apMsg->choice.successfulOutcome == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;  
    }
@@ -297,7 +299,7 @@ S16 BuildAndSendF1SetupRsp()
    f1apMsg->choice.successfulOutcome->procedureCode = ProcedureCode_id_F1Setup;
    f1apMsg->choice.successfulOutcome->criticality = Criticality_reject;
    f1apMsg->choice.successfulOutcome->value.present = \
-                                                     SuccessfulOutcome__value_PR_F1SetupResponse;
+                                                      SuccessfulOutcome__value_PR_F1SetupResponse;
    f1SetupRsp = &f1apMsg->choice.successfulOutcome->value.choice.F1SetupResponse;
 
    elementCnt = 4;
@@ -305,10 +307,10 @@ S16 BuildAndSendF1SetupRsp()
    f1SetupRsp->protocolIEs.list.size = elementCnt*sizeof(F1SetupResponseIEs_t *);
 
    CU_ALLOC(f1SetupRsp->protocolIEs.list.array, \
-        elementCnt * sizeof(F1SetupResponseIEs_t *));
+         elementCnt * sizeof(F1SetupResponseIEs_t *));
    if(f1SetupRsp->protocolIEs.list.array == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation for F1ResponseIEs failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1ResponseIEs failed");
       CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
@@ -317,15 +319,15 @@ S16 BuildAndSendF1SetupRsp()
    for(idx=0; idx<elementCnt; idx++)
    {
       CU_ALLOC(f1SetupRsp->protocolIEs.list.array[idx], \
-           sizeof(F1SetupResponseIEs_t)); 
+            sizeof(F1SetupResponseIEs_t)); 
       if(f1SetupRsp->protocolIEs.list.array[idx] == NULLP)
       {  
-        CU_FREE(f1SetupRsp->protocolIEs.list.array,\
-              elementCnt * sizeof(F1SetupResponseIEs_t *));
-        CU_FREE(f1apMsg->choice.successfulOutcome, \
-              sizeof(SuccessfulOutcome_t));
-        CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
-        return RFAILED;
+         CU_FREE(f1SetupRsp->protocolIEs.list.array,\
+               elementCnt * sizeof(F1SetupResponseIEs_t *));
+         CU_FREE(f1apMsg->choice.successfulOutcome, \
+               sizeof(SuccessfulOutcome_t));
+         CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
+         return RFAILED;
       }    
    }
 
@@ -334,16 +336,16 @@ S16 BuildAndSendF1SetupRsp()
    f1SetupRsp->protocolIEs.list.array[idx]->id = ProtocolIE_ID_id_TransactionID;
    f1SetupRsp->protocolIEs.list.array[idx]->criticality = Criticality_reject;
    f1SetupRsp->protocolIEs.list.array[idx]->value.present = \
-                                                           F1SetupResponseIEs__value_PR_TransactionID;
+                                                            F1SetupResponseIEs__value_PR_TransactionID;
    f1SetupRsp->protocolIEs.list.array[idx]->value.choice.TransactionID =\
-                                                                       TRANS_ID;
+                                                                        TRANS_ID;
 
    /*CU Name*/
    idx++;
    f1SetupRsp->protocolIEs.list.array[idx]->id = ProtocolIE_ID_id_gNB_CU_Name;
    f1SetupRsp->protocolIEs.list.array[idx]->criticality = Criticality_ignore;
    f1SetupRsp->protocolIEs.list.array[idx]->value.present = \
-                                                           F1SetupResponseIEs__value_PR_GNB_CU_Name;
+                                                            F1SetupResponseIEs__value_PR_GNB_CU_Name;
    cuName = &f1SetupRsp->protocolIEs.list.array[idx]->value.choice.GNB_CU_Name;
    cuName->size = sizeof(cuCfgParams.cuName);
 
@@ -352,13 +354,13 @@ S16 BuildAndSendF1SetupRsp()
    {
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
       {
-        CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx],\
-              sizeof(F1SetupResponseIEs_t));
+         CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx],\
+               sizeof(F1SetupResponseIEs_t));
       }
       CU_FREE(f1SetupRsp->protocolIEs.list.array,\
-           elementCnt * sizeof(F1SetupResponseIEs_t *));
+            elementCnt * sizeof(F1SetupResponseIEs_t *));
       CU_FREE(f1apMsg->choice.successfulOutcome,\
-           sizeof(SuccessfulOutcome_t));
+            sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
    }
@@ -367,28 +369,28 @@ S16 BuildAndSendF1SetupRsp()
    /*Cells to be activated list*/
    idx++;
    f1SetupRsp->protocolIEs.list.array[idx]->id = \
-                                                ProtocolIE_ID_id_Cells_to_be_Activated_List ;
+                                                 ProtocolIE_ID_id_Cells_to_be_Activated_List ;
    f1SetupRsp->protocolIEs.list.array[idx]->criticality = Criticality_reject;
    f1SetupRsp->protocolIEs.list.array[idx]->value.present = \
-                                                           F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List;
+                                                            F1SetupResponseIEs__value_PR_Cells_to_be_Activated_List;
    cellToActivate = &f1SetupRsp->protocolIEs.list.array[idx]->value.choice.\
-                   Cells_to_be_Activated_List;
+                    Cells_to_be_Activated_List;
    cellCnt=1;
    cellToActivate->list.count = cellCnt;
    cellToActivate->list.size = \
-                              cellCnt*sizeof(struct Cells_to_be_Activated_List_ItemIEs  *);
+                               cellCnt*sizeof(struct Cells_to_be_Activated_List_ItemIEs  *);
    CU_ALLOC(cellToActivate->list.array,\
-        sizeof(struct Cells_to_be_Activated_List_ItemIEs  *));
+         sizeof(struct Cells_to_be_Activated_List_ItemIEs  *));
    if(cellToActivate->list.array == NULLP)
    {
       CU_FREE(cuName->buf, sizeof(cuName->size));
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
       {
-        CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx],\
-              sizeof(F1SetupResponseIEs_t));
+         CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx],\
+               sizeof(F1SetupResponseIEs_t));
       }
       CU_FREE(f1SetupRsp->protocolIEs.list.array,\
-           elementCnt * sizeof(F1SetupResponseIEs_t *));
+            elementCnt * sizeof(F1SetupResponseIEs_t *));
       CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
@@ -398,88 +400,88 @@ S16 BuildAndSendF1SetupRsp()
       CU_ALLOC(cellToActivate->list.array[ieIdx],sizeof(struct Cells_to_be_Activated_List_ItemIEs ));
       if(cellToActivate->list.array[ieIdx] == NULLP)
       {
-        CU_FREE(cellToActivate->list.array,\
-              sizeof(struct Cells_to_be_Activated_List_ItemIEs  *));
-        CU_FREE(cuName->buf, sizeof(cuName->size));
-        for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
-        {
-           CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
-                 sizeof(F1SetupResponseIEs_t));
-        }
-        CU_FREE(f1SetupRsp->protocolIEs.list.array, \
-              elementCnt * sizeof(F1SetupResponseIEs_t *));
-        CU_FREE(f1apMsg->choice.successfulOutcome, \
-              sizeof(SuccessfulOutcome_t));
-        CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
-        return RFAILED;
+         CU_FREE(cellToActivate->list.array,\
+               sizeof(struct Cells_to_be_Activated_List_ItemIEs  *));
+         CU_FREE(cuName->buf, sizeof(cuName->size));
+         for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
+         {
+            CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
+                  sizeof(F1SetupResponseIEs_t));
+         }
+         CU_FREE(f1SetupRsp->protocolIEs.list.array, \
+               elementCnt * sizeof(F1SetupResponseIEs_t *));
+         CU_FREE(f1apMsg->choice.successfulOutcome, \
+               sizeof(SuccessfulOutcome_t));
+         CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
+         return RFAILED;
       }
    }
    cellToActivate->list.array[0]->id = \
-                                      ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
+                                       ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
    cellToActivate->list.array[0]->criticality = Criticality_ignore;
    cellToActivate->list.array[0]->value.present = \
-                                                 Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item;
+                                                  Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item;
    cellToActivate->list.array[0]->value.choice.Cells_to_be_Activated_List_Item.\
       nRCGI.pLMN_Identity.size = 3*sizeof(uint8_t);
    CU_ALLOC(cellToActivate->list.array[0]->\
-        value.choice.Cells_to_be_Activated_List_Item.nRCGI.pLMN_Identity.buf,\
-        3*sizeof(uint8_t));
+         value.choice.Cells_to_be_Activated_List_Item.nRCGI.pLMN_Identity.buf,\
+         3*sizeof(uint8_t));
    if(cellToActivate->list.array[0]->value.choice.\
-        Cells_to_be_Activated_List_Item.nRCGI.pLMN_Identity.buf == NULLP)
+         Cells_to_be_Activated_List_Item.nRCGI.pLMN_Identity.buf == NULLP)
    {
 
       for(ieIdx=0; ieIdx<cellCnt; ieIdx++)
       {
-        CU_FREE(cellToActivate->list.array[ieIdx],\
-              sizeof(struct Cells_to_be_Activated_List_ItemIEs ));
+         CU_FREE(cellToActivate->list.array[ieIdx],\
+               sizeof(struct Cells_to_be_Activated_List_ItemIEs ));
       }
 
       CU_FREE(cellToActivate->list.array,\
-           sizeof(struct Cells_to_be_Activated_List_ItemIEs  *));
+            sizeof(struct Cells_to_be_Activated_List_ItemIEs  *));
       CU_FREE(cuName->buf, sizeof(cuName->size));
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
       {
-        CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
-              sizeof(F1SetupResponseIEs_t));
+         CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
+               sizeof(F1SetupResponseIEs_t));
       }
       CU_FREE(f1SetupRsp->protocolIEs.list.array, \
-           elementCnt * sizeof(F1SetupResponseIEs_t *));
+            elementCnt * sizeof(F1SetupResponseIEs_t *));
       CU_FREE(f1apMsg->choice.successfulOutcome, \
-           sizeof(SuccessfulOutcome_t));
+            sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
    }
    buildPlmnId(cuCfgParams.plmn , cellToActivate->list.array[0]->value.choice.\
-        Cells_to_be_Activated_List_Item.nRCGI.pLMN_Identity.buf);
+         Cells_to_be_Activated_List_Item.nRCGI.pLMN_Identity.buf);
    cellToActivate->list.array[0]->value.choice.Cells_to_be_Activated_List_Item.\
       nRCGI.nRCellIdentity.size = 5;
    CU_ALLOC(cellToActivate->list.array[0]->value.choice.\
-        Cells_to_be_Activated_List_Item.nRCGI.nRCellIdentity.buf,\
-        5*sizeof(uint8_t));
+         Cells_to_be_Activated_List_Item.nRCGI.nRCellIdentity.buf,\
+         5*sizeof(uint8_t));
    if(cellToActivate->list.array[0]->value.choice.\
-        Cells_to_be_Activated_List_Item.nRCGI.nRCellIdentity.buf == NULLP)
+         Cells_to_be_Activated_List_Item.nRCGI.nRCellIdentity.buf == NULLP)
    {
       CU_FREE(cellToActivate->list.array[0]->\
-           value.choice.Cells_to_be_Activated_List_Item.nRCGI.pLMN_Identity.buf,\
-           3*sizeof(uint8_t));
+            value.choice.Cells_to_be_Activated_List_Item.nRCGI.pLMN_Identity.buf,\
+            3*sizeof(uint8_t));
       for(ieIdx=0; ieIdx<cellCnt; ieIdx++)
       {
-        CU_FREE(cellToActivate->list.array[ieIdx],\
-              sizeof(struct Cells_to_be_Activated_List_ItemIEs ));
+         CU_FREE(cellToActivate->list.array[ieIdx],\
+               sizeof(struct Cells_to_be_Activated_List_ItemIEs ));
       }
 
       CU_FREE(cellToActivate->list.array,\
-           sizeof(struct Cells_to_be_Activated_List_ItemIEs  *));
+            sizeof(struct Cells_to_be_Activated_List_ItemIEs  *));
       CU_FREE(cuName->buf, sizeof(cuName->size));
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
       {
-        CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
-              sizeof(F1SetupResponseIEs_t));
+         CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
+               sizeof(F1SetupResponseIEs_t));
       }
       CU_FREE(f1SetupRsp->protocolIEs.list.array, \
-           elementCnt * sizeof(F1SetupResponseIEs_t *));
+            elementCnt * sizeof(F1SetupResponseIEs_t *));
       CU_FREE(f1apMsg->choice.successfulOutcome, \
-           sizeof(SuccessfulOutcome_t));
+            sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
    }
@@ -487,10 +489,10 @@ S16 BuildAndSendF1SetupRsp()
    /* RRC Version */
    idx++;
    f1SetupRsp->protocolIEs.list.array[idx]->id = \
-                                                ProtocolIE_ID_id_GNB_CU_RRC_Version;
+                                                 ProtocolIE_ID_id_GNB_CU_RRC_Version;
    f1SetupRsp->protocolIEs.list.array[idx]->criticality = Criticality_reject;
    f1SetupRsp->protocolIEs.list.array[idx]->value.present = \
-                                                           F1SetupResponseIEs__value_PR_RRC_Version;
+                                                            F1SetupResponseIEs__value_PR_RRC_Version;
    rrcVer = &f1SetupRsp->protocolIEs.list.array[idx]->value.choice.RRC_Version;
    rrcVer->latest_RRC_Version.size = RRC_SIZE; 
 
@@ -500,11 +502,11 @@ S16 BuildAndSendF1SetupRsp()
       CU_FREE(cuName->buf, sizeof(cuName->size));
       for(ieIdx=0; ieIdx<elementCnt; idx++)
       {
-        CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
-              sizeof(F1SetupResponseIEs_t));
+         CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
+               sizeof(F1SetupResponseIEs_t));
       } 
       CU_FREE(f1SetupRsp->protocolIEs.list.array,\
-           elementCnt * sizeof(F1SetupResponseIEs_t *));
+            elementCnt * sizeof(F1SetupResponseIEs_t *));
       CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
@@ -520,11 +522,11 @@ S16 BuildAndSendF1SetupRsp()
       CU_FREE(cuName->buf, sizeof(cuName->size));
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
       {
-        CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
-              sizeof(F1SetupResponseIEs_t));
+         CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
+               sizeof(F1SetupResponseIEs_t));
       } 
       CU_FREE(f1SetupRsp->protocolIEs.list.array,\
-           elementCnt * sizeof(F1SetupResponseIEs_t *));
+            elementCnt * sizeof(F1SetupResponseIEs_t *));
       CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
@@ -532,73 +534,73 @@ S16 BuildAndSendF1SetupRsp()
    rrcVer->iE_Extensions->list.count = 1;
    rrcVer->iE_Extensions->list.size = sizeof(struct RRC_Version_ExtIEs *);
    CU_ALLOC(rrcVer->iE_Extensions->list.array,\
-        sizeof(struct RRC_Version_ExtIEs *));
+         sizeof(struct RRC_Version_ExtIEs *));
    if(rrcVer->iE_Extensions->list.array == NULLP)
    {
       CU_FREE(rrcVer->iE_Extensions,\
-           sizeof(ProtocolExtensionContainer_4624P81_t));
+            sizeof(ProtocolExtensionContainer_4624P81_t));
       CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(uint8_t));
       CU_FREE(cuName->buf, sizeof(cuName->size));
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
       {
-        CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
-              sizeof(F1SetupResponseIEs_t));
+         CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
+               sizeof(F1SetupResponseIEs_t));
       } 
       CU_FREE(f1SetupRsp->protocolIEs.list.array,\
-           elementCnt * sizeof(F1SetupResponseIEs_t *));
+            elementCnt * sizeof(F1SetupResponseIEs_t *));
       CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
    }
    CU_ALLOC(rrcVer->iE_Extensions->list.array[0],\
-        sizeof(struct RRC_Version_ExtIEs));
+         sizeof(struct RRC_Version_ExtIEs));
    if(rrcVer->iE_Extensions->list.array[0] == NULLP)
    {
       CU_FREE(rrcVer->iE_Extensions->list.array,\
-           sizeof(struct RRC_Version_ExtIEs *));
+            sizeof(struct RRC_Version_ExtIEs *));
       CU_FREE(rrcVer->iE_Extensions,\
-           sizeof(ProtocolExtensionContainer_4624P81_t));
+            sizeof(ProtocolExtensionContainer_4624P81_t));
       CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(uint8_t));
       CU_FREE(cuName->buf, sizeof(cuName->size));
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
       {
-        CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
-              sizeof(F1SetupResponseIEs_t));
+         CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
+               sizeof(F1SetupResponseIEs_t));
       } 
       CU_FREE(f1SetupRsp->protocolIEs.list.array,\
-           elementCnt * sizeof(F1SetupResponseIEs_t *));
+            elementCnt * sizeof(F1SetupResponseIEs_t *));
       CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
    }
    rrcVer->iE_Extensions->list.array[0]->id = \
-                                             ProtocolIE_ID_id_latest_RRC_Version_Enhanced;
+                                              ProtocolIE_ID_id_latest_RRC_Version_Enhanced;
    rrcVer->iE_Extensions->list.array[0]->criticality = Criticality_reject;
    rrcVer->iE_Extensions->list.array[0]->extensionValue.present = \
-                                                                 RRC_Version_ExtIEs__extensionValue_PR_Latest_RRC_Version_Enhanced;
+                                                                  RRC_Version_ExtIEs__extensionValue_PR_Latest_RRC_Version_Enhanced;
    rrcVer->iE_Extensions->list.array[0]->extensionValue.choice.\
       Latest_RRC_Version_Enhanced.size = 3*sizeof(uint8_t);
    CU_ALLOC(rrcVer->iE_Extensions->list.\
-        array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf,\
-        3*sizeof(uint8_t));
+         array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf,\
+         3*sizeof(uint8_t));
    if(rrcVer->iE_Extensions->list.\
-        array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf == NULLP)
+         array[0]->extensionValue.choice.Latest_RRC_Version_Enhanced.buf == NULLP)
    {
       CU_FREE(rrcVer->iE_Extensions->list.array[0],\
-           sizeof(struct RRC_Version_ExtIEs));
+            sizeof(struct RRC_Version_ExtIEs));
       CU_FREE(rrcVer->iE_Extensions->list.array,\
-           sizeof(struct RRC_Version_ExtIEs *));
+            sizeof(struct RRC_Version_ExtIEs *));
       CU_FREE(rrcVer->iE_Extensions,\
-           sizeof(ProtocolExtensionContainer_4624P81_t));
+            sizeof(ProtocolExtensionContainer_4624P81_t));
       CU_FREE(rrcVer->latest_RRC_Version.buf, sizeof(uint8_t));
       CU_FREE(cuName->buf, sizeof(cuName->size));
       for(ieIdx=0; ieIdx<elementCnt; ieIdx++)
       {
-        CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
-              sizeof(F1SetupResponseIEs_t));
+         CU_FREE(f1SetupRsp->protocolIEs.list.array[ieIdx], \
+               sizeof(F1SetupResponseIEs_t));
       } 
       CU_FREE(f1SetupRsp->protocolIEs.list.array,\
-           elementCnt * sizeof(F1SetupResponseIEs_t *));
+            elementCnt * sizeof(F1SetupResponseIEs_t *));
       CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
@@ -631,23 +633,23 @@ S16 BuildAndSendF1SetupRsp()
    /* Check encode results */
    if(encRetVal.encoded == ENCODE_FAIL)
    {
-      DU_LOG("\nF1AP : Could not encode F1SetupResponse structure (at %s)\n",\
-           encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
+      DU_LOG("\nERROR  -->  F1AP : Could not encode F1SetupResponse structure (at %s)\n",\
+            encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
       return RFAILED;   
    } 
    else 
    {
-      DU_LOG("\nF1AP : Created APER encoded buffer for F1SetupResponse\n");
+      DU_LOG("\nDEBUG  -->  F1AP : Created APER encoded buffer for F1SetupResponse\n");
       for(int i=0; i< encBufSize; i++)
       {
-        printf("%x",encBuf[i]);
+         DU_LOG("%x",encBuf[i]);
       } 
    }
 
    /* Sending msg */
    if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
    {
-      DU_LOG("\nF1AP : Sending F1 Setup Response failed");      
+      DU_LOG("\nERROR  -->  F1AP : Sending F1 Setup Response failed");      
       return RFAILED;
    }
 
@@ -665,8 +667,7 @@ S16 BuildAndSendF1SetupRsp()
  *    Functionality: Constructs the DU Update Acknowledge message and sends
  *                   it to the DU through SCTP.
  *
- * @params[in] void **buf,Buffer to which encoded pattern is written into
- * @params[in] int *size,size of buffer
+ * @params[in] 
  *
  * @return ROK     - success
  *         RFAILED - failure
@@ -681,13 +682,13 @@ S16 BuildAndSendDUUpdateAck()
    GNBDUConfigurationUpdateAcknowledge_t *gNBDuCfgAck;
    asn_enc_rval_t enRetVal; /* Encoder return value */
 
-   DU_LOG("\nF1AP : Building GNB-DU Config Update Ack\n");
+   DU_LOG("\nINFO  -->  F1AP : Building GNB-DU Config Update Ack\n");
 
    /* Allocate the memory for F1SetupRequest_t */
    CU_ALLOC(f1apMsg, (Size)sizeof(F1AP_PDU_t));
    if(f1apMsg == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
       return RFAILED;
    }
 
@@ -696,7 +697,7 @@ S16 BuildAndSendDUUpdateAck()
    CU_ALLOC(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
    if(f1apMsg->choice.successfulOutcome == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
    }
@@ -714,7 +715,7 @@ S16 BuildAndSendDUUpdateAck()
    CU_ALLOC(gNBDuCfgAck->protocolIEs.list.array, elementCnt * sizeof(GNBDUConfigurationUpdateAcknowledgeIEs_t *));
    if(gNBDuCfgAck->protocolIEs.list.array == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation for DuUpdateAcknowledgeIEs failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for DuUpdateAcknowledgeIEs failed");
       CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       CU_FREE(f1apMsg,(Size)sizeof(F1AP_PDU_t));
       return RFAILED;
@@ -725,10 +726,10 @@ S16 BuildAndSendDUUpdateAck()
       CU_ALLOC(gNBDuCfgAck->protocolIEs.list.array[idx], sizeof(GNBDUConfigurationUpdateAcknowledgeIEs_t));
       if(gNBDuCfgAck->protocolIEs.list.array[idx] == NULLP)
       {
-        CU_FREE(gNBDuCfgAck->protocolIEs.list.array, elementCnt * sizeof(GNBDUConfigurationUpdateAcknowledgeIEs_t *));
-        CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
-        CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
-        return RFAILED;
+         CU_FREE(gNBDuCfgAck->protocolIEs.list.array, elementCnt * sizeof(GNBDUConfigurationUpdateAcknowledgeIEs_t *));
+         CU_FREE(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
+         CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
+         return RFAILED;
       }
    }
 
@@ -736,7 +737,8 @@ S16 BuildAndSendDUUpdateAck()
    idx = 0;
    gNBDuCfgAck->protocolIEs.list.array[idx]->id = ProtocolIE_ID_id_TransactionID ;
    gNBDuCfgAck->protocolIEs.list.array[idx]->criticality = Criticality_reject;
-   gNBDuCfgAck->protocolIEs.list.array[idx]->value.present = GNBDUConfigurationUpdateAcknowledgeIEs__value_PR_TransactionID;
+   gNBDuCfgAck->protocolIEs.list.array[idx]->value.present =\
+   GNBDUConfigurationUpdateAcknowledgeIEs__value_PR_TransactionID;
    gNBDuCfgAck->protocolIEs.list.array[idx]->value.choice.TransactionID = TRANS_ID;
 
    xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
@@ -758,22 +760,23 @@ S16 BuildAndSendDUUpdateAck()
    /* Checking encode results */
    if(enRetVal.encoded == ENCODE_FAIL) 
    {
-      DU_LOG("\nF1AP : Could not encode DUConfigUpdateAcknowledge structure (at %s)",enRetVal.failed_type ? enRetVal.failed_type->name : "unknown");
+      DU_LOG("\nERROR  -->  F1AP : Could not encode DUConfigUpdateAcknowledge structure (at %s)",\
+      enRetVal.failed_type ? enRetVal.failed_type->name : "unknown");
       return RFAILED; 
    } 
    else 
    {
-      DU_LOG("\nF1AP : Created APER encoded buffer for DuConfigUpdateAcknowledge\n");  
+      DU_LOG("\nDEBUG  -->  F1AP : Created APER encoded buffer for DuConfigUpdateAcknowledge\n");  
       for(int i=0; i< encBufSize; i++)
       {
-        printf("%x",encBuf[i]);
+         DU_LOG("%x",encBuf[i]);
       } 
    }
 
    /* Sending msg */
    if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
    {
-      DU_LOG("\nF1AP : Sending GNB-DU Config Update Ack failed");
+      DU_LOG("\nERROR  -->  F1AP : Sending GNB-DU Config Update Ack failed");
       return RFAILED;
    }
 
@@ -844,20 +847,20 @@ uint8_t BuildAndSendF1ResetReq()
    Reset_t          *f1ResetMsg = NULLP;
    F1AP_PDU_t       *f1apMsg = NULLP;
    asn_enc_rval_t   encRetVal;
-   DU_LOG("\nF1AP : Building F1 Reset request \n");
+   DU_LOG("\nINFO  -->  F1AP : Building F1 Reset request \n");
    do
    {
       CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for the BuildAndSendF1ResetReq's F1AP-PDU failed"); 
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for the BuildAndSendF1ResetReq's F1AP-PDU failed"); 
         break;
       }
       f1apMsg->present = F1AP_PDU_PR_initiatingMessage;
       CU_ALLOC(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
       if(f1apMsg->choice.initiatingMessage == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for BuildAndSendF1ResetReq failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for BuildAndSendF1ResetReq failed");
         break;
       }
       f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_Reset;
@@ -874,7 +877,7 @@ uint8_t BuildAndSendF1ResetReq()
       CU_ALLOC(f1ResetMsg->protocolIEs.list.array,f1ResetMsg->protocolIEs.list.size);
       if(f1ResetMsg->protocolIEs.list.array == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation failed for BuildAndSendF1ResetReq");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed for BuildAndSendF1ResetReq");
         break;
       }
       for(idx=0; idx<elementCnt; idx++)
@@ -882,7 +885,7 @@ uint8_t BuildAndSendF1ResetReq()
         CU_ALLOC(f1ResetMsg->protocolIEs.list.array[idx],sizeof(ResetIEs_t));
         if(f1ResetMsg->protocolIEs.list.array[idx] == NULLP)
         {
-           DU_LOG("\nF1AP : Memory allocation failed for BuildAndSendF1ResetReq msg array");
+           DU_LOG("\nERROR  -->  F1AP : Memory allocation failed for BuildAndSendF1ResetReq msg array");
            break;
         }
       }
@@ -921,22 +924,22 @@ uint8_t BuildAndSendF1ResetReq()
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG("\nF1AP : Could not encode F1Reset structure (at %s)\n",\
+        DU_LOG("\nERROR  -->  F1AP : Could not encode F1Reset structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\nF1AP : Created APER encoded buffer for F1Reset\n");
+        DU_LOG("\nDEBUG  -->  F1AP : Created APER encoded buffer for F1Reset\n");
         for(idx=0; idx< encBufSize; idx++)
         {
-           printf("%x",encBuf[idx]);
+           DU_LOG("%x",encBuf[idx]);
         }
       }
 
       if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
       {
-        DU_LOG("\nF1AP : Sending F1 Reset request failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending F1 Reset request failed");
         break;
       }
 
@@ -1018,18 +1021,18 @@ uint8_t fillSrbCfg(uint8_t srbId, SRB_ToAddModList_t *bearerCfg)
  *
  * ****************************************************************/
 
-uint8_t fillMasterCellGroup(OCTET_STRING_t *masterCellGroup)
+uint8_t fillMasterCellGroup(uint8_t ueId, OCTET_STRING_t *masterCellGroup)
 {
    uint8_t ret = ROK;
    masterCellGroup->buf = NULLP;
-   if(f1apMsgDb.duToCuContainer.buf)
+   if(ueCb[ueId-1].f1apMsgDb.duToCuContainer.buf)
    {
-      masterCellGroup->size = f1apMsgDb.duToCuContainer.size;
+      masterCellGroup->size = ueCb[ueId-1].f1apMsgDb.duToCuContainer.size;
       CU_ALLOC(masterCellGroup->buf, masterCellGroup->size);
       if(masterCellGroup->buf != NULLP)
       {
-        memcpy(masterCellGroup->buf, f1apMsgDb.duToCuContainer.buf,\
-              masterCellGroup->size);
+         memcpy(masterCellGroup->buf, ueCb[ueId-1].f1apMsgDb.duToCuContainer.buf,\
+               masterCellGroup->size);
       }
       else
       {
@@ -1060,7 +1063,7 @@ uint8_t fillMasterCellGroup(OCTET_STRING_t *masterCellGroup)
  *
  * ****************************************************************/
 
-uint8_t fillRRCSetupIE(RRCSetup_IEs_t *rrcSetupIE)
+uint8_t fillRRCSetupIE(uint8_t ueId, RRCSetup_IEs_t *rrcSetupIE)
 {
    uint8_t ret = ROK;
    if(rrcSetupIE)
@@ -1072,7 +1075,7 @@ uint8_t fillRRCSetupIE(RRCSetup_IEs_t *rrcSetupIE)
       }                
       if(ret == ROK)
       {
-        ret = fillMasterCellGroup(&rrcSetupIE->masterCellGroup);
+         ret = fillMasterCellGroup(ueId, &rrcSetupIE->masterCellGroup);
       }
       else
       {
@@ -1100,7 +1103,7 @@ uint8_t fillRRCSetupIE(RRCSetup_IEs_t *rrcSetupIE)
  *
  * ****************************************************************/
 
-uint8_t fillDlCcchRrcMsg(RRCContainer_t *rrcContainer)
+uint8_t fillDlCcchRrcMsg(uint8_t ueId, RRCContainer_t *rrcContainer)
 {
    uint8_t ret = ROK;
    uint16_t idx2;
@@ -1114,71 +1117,71 @@ uint8_t fillDlCcchRrcMsg(RRCContainer_t *rrcContainer)
       CU_ALLOC(dl_CCCH_Msg.message.choice.c1 , sizeof(DL_CCCH_MessageType_t));
       if(dl_CCCH_Msg.message.choice.c1 != NULLP)
       {
-        dl_CCCH_Msg.message.choice.c1->present = DL_CCCH_MessageType__c1_PR_rrcSetup;
-        CU_ALLOC(dl_CCCH_Msg.message.choice.c1->choice.rrcSetup, sizeof(RRCSetup_t));
-        if(dl_CCCH_Msg.message.choice.c1->choice.rrcSetup != NULLP)
-        {
-           dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->rrc_TransactionIdentifier = 0;
-           dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->criticalExtensions.\
-              present = RRCSetup__criticalExtensions_PR_rrcSetup;
-           /* Fill RRC Setup IE */
-           CU_ALLOC(dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->\
-                 criticalExtensions.choice.rrcSetup, sizeof(RRCSetup_IEs_t));
-           if(dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->\
-                 criticalExtensions.choice.rrcSetup != NULLP)
-           {
-              ret = fillRRCSetupIE(dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->\
-                    criticalExtensions.choice.rrcSetup);
+         dl_CCCH_Msg.message.choice.c1->present = DL_CCCH_MessageType__c1_PR_rrcSetup;
+         CU_ALLOC(dl_CCCH_Msg.message.choice.c1->choice.rrcSetup, sizeof(RRCSetup_t));
+         if(dl_CCCH_Msg.message.choice.c1->choice.rrcSetup != NULLP)
+         {
+            dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->rrc_TransactionIdentifier = 0;
+            dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->criticalExtensions.\
+               present = RRCSetup__criticalExtensions_PR_rrcSetup;
+            /* Fill RRC Setup IE */
+            CU_ALLOC(dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->\
+                  criticalExtensions.choice.rrcSetup, sizeof(RRCSetup_IEs_t));
+            if(dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->\
+                  criticalExtensions.choice.rrcSetup != NULLP)
+            {
+               ret = fillRRCSetupIE(ueId, dl_CCCH_Msg.message.choice.c1->choice.rrcSetup->\
+                     criticalExtensions.choice.rrcSetup);
 
-              if(ret == ROK)
-              {
-                 /* encode DL-CCCH message into RRC Container */
-                 xer_fprint(stdout, &asn_DEF_DL_CCCH_MessageType, &dl_CCCH_Msg);
-                 memset(encBuf, 0, ENC_BUF_MAX_LEN);
-                 encBufSize = 0;
-                 encRetVal = aper_encode(&asn_DEF_DL_CCCH_MessageType, 0, &dl_CCCH_Msg, PrepFinalEncBuf, encBuf);
-                 /* Encode results */
-                 if(encRetVal.encoded == ENCODE_FAIL)
-                 {
-                    DU_LOG( "\n F1AP : Could not encode RRCContainer for DL-CCCH Msg(at %s)\n",\
-                          encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
-                    return RFAILED;
-                 }
-                 else
-                 {
-                    DU_LOG("\n F1AP : Created APER encoded buffer for RRCContainer for DL-CCCH Msg\n");
-                    for(int i = 0; i< encBufSize; i++)
-                    {
-                       printf("%x",encBuf[i]);
-                    }
-                    rrcContainer->size = encBufSize;
-                    CU_ALLOC(rrcContainer->buf, rrcContainer->size);
-                    if(rrcContainer->buf != NULLP)
-                    {
-                       memset(rrcContainer->buf, 0, encBufSize);
-                       for(idx2 = 0; idx2 < encBufSize; idx2++)
-                       {
-                          rrcContainer->buf[idx2] =    encBuf[idx2];
-                       }
-                    }
-                 }
-              }
-              else
-              {
-                 ret = RFAILED;
-              }
-           }
-           else
-           {
-              DU_LOG("\nF1AP: Memory Alloc failed for RRC Setup Msg at fillDlCcchRrcMsg()");
-              ret = RFAILED;
-           }
-        }
-        else
-        {
-           DU_LOG("\nF1AP: Memory Alloc failed for RRC Msg at fillDlCcchRrcMsg()");
-           ret = RFAILED;
-        }
+               if(ret == ROK)
+               {
+                  /* encode DL-CCCH message into RRC Container */
+                  xer_fprint(stdout, &asn_DEF_DL_CCCH_MessageType, &dl_CCCH_Msg);
+                  memset(encBuf, 0, ENC_BUF_MAX_LEN);
+                  encBufSize = 0;
+                  encRetVal = aper_encode(&asn_DEF_DL_CCCH_MessageType, 0, &dl_CCCH_Msg, PrepFinalEncBuf, encBuf);
+                  /* Encode results */
+                  if(encRetVal.encoded == ENCODE_FAIL)
+                  {
+                     DU_LOG( "\nERROR  -->  F1AP : Could not encode RRCContainer for DL-CCCH Msg(at %s)\n",\
+                           encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
+                     return RFAILED;
+                  }
+                  else
+                  {
+                     DU_LOG("\nDEBUG  -->  F1AP : Created APER encoded buffer for RRCContainer for DL-CCCH Msg\n");
+                     for(int i = 0; i< encBufSize; i++)
+                     {
+                        DU_LOG("%x",encBuf[i]);
+                     }
+                     rrcContainer->size = encBufSize;
+                     CU_ALLOC(rrcContainer->buf, rrcContainer->size);
+                     if(rrcContainer->buf != NULLP)
+                     {
+                        memset(rrcContainer->buf, 0, encBufSize);
+                        for(idx2 = 0; idx2 < encBufSize; idx2++)
+                        {
+                           rrcContainer->buf[idx2] =   encBuf[idx2];
+                        }
+                     }
+                  }
+               }
+               else
+               {
+                  ret = RFAILED;
+               }
+            }
+            else
+            {
+               DU_LOG("\nERROR  -->  F1AP: Memory Alloc failed for RRC Setup Msg at fillDlCcchRrcMsg()");
+               ret = RFAILED;
+            }
+         }
+         else
+         {
+            DU_LOG("\nERROR  -->  F1AP: Memory Alloc failed for RRC Msg at fillDlCcchRrcMsg()");
+            ret = RFAILED;
+         }
       }
       else
       {
@@ -1188,7 +1191,7 @@ uint8_t fillDlCcchRrcMsg(RRCContainer_t *rrcContainer)
    }
    else
    {
-      DU_LOG("\nF1AP: RRC Container is NULLP at fillDlCcchRrcMsg()");
+      DU_LOG("\nERROR  -->  F1AP: RRC Container is NULLP at fillDlCcchRrcMsg()");
       ret = RFAILED;
    }
 }
@@ -1267,14 +1270,14 @@ uint8_t fillCnAssoc(struct DRB_ToAddMod__cnAssociation *cnAssoc)
         }
         else
         {
-           DU_LOG("\nF1AP: Memory alloc failed at mappedQoS_FlowsToAdd in fillCnAssoc()");
+           DU_LOG("\nERROR  -->  F1AP: Memory alloc failed at mappedQoS_FlowsToAdd in fillCnAssoc()");
            CU_FREE(cnAssoc->choice.sdap_Config, sizeof(SDAP_Config_t));
            ret = RFAILED;
         }
       }
       else
       {
-        DU_LOG("\nF1AP: Mem alloc failed at fillCnAssoc()");
+        DU_LOG("\nERROR  -->  F1AP: Mem alloc failed at fillCnAssoc()");
         ret = RFAILED;
       }
    }
@@ -1380,7 +1383,7 @@ uint8_t fillRrcReconfigIE(RRCReconfiguration_IEs_t *rrcReconfigMsg)
            ret = fillDrbCfg(DRB1, rrcReconfigMsg->radioBearerConfig->drb_ToAddModList);
            if(ret == RFAILED)
            {
-              DU_LOG("\n F1AP: Failed to fill DrbCfg at fillRrcReconfigIE()");
+              DU_LOG("\nERROR  -->  F1AP : Failed to fill DrbCfg at fillRrcReconfigIE()");
               CU_FREE(rrcReconfigMsg->radioBearerConfig->srb_ToAddModList, sizeof(SRB_ToAddModList_t));
               CU_FREE(rrcReconfigMsg->radioBearerConfig->drb_ToAddModList, sizeof(DRB_ToAddModList_t));
            }
@@ -1388,7 +1391,7 @@ uint8_t fillRrcReconfigIE(RRCReconfiguration_IEs_t *rrcReconfigMsg)
       }
       else
       {
-        DU_LOG("\n F1AP: memory Alloc failed at fillRrcReconfigIE()");
+        DU_LOG("\nERROR  -->  F1AP : memory Alloc failed at fillRrcReconfigIE()");
         CU_FREE(rrcReconfigMsg->radioBearerConfig->srb_ToAddModList, sizeof(SRB_ToAddModList_t));
       }
    }
@@ -1454,16 +1457,16 @@ uint8_t fillDlDcchRrcMsg(RRCContainer_t *rrcContainer)
                  /* Encode results */
                  if(encRetVal.encoded == ENCODE_FAIL)
                  {
-                    DU_LOG( "\n F1AP : Could not encode RRCContainer for DL-DCCH Msg (at %s)\n",\
+                    DU_LOG( "\nERROR  -->  F1AP : Could not encode RRCContainer for DL-DCCH Msg (at %s)\n",\
                           encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
                     return RFAILED;
                  }
                  else
                  {
-                    DU_LOG("\n F1AP : Created APER encoded buffer for RRCContainer for DL-DCCH Msg\n");
+                    DU_LOG("\nDEBUG  -->  F1AP : Created APER encoded buffer for RRCContainer for DL-DCCH Msg\n");
                     for(int i = 0; i< encBufSize; i++)
                     {
-                       printf("%x",encBuf[i]);
+                       DU_LOG("%x",encBuf[i]);
                     }
                     rrcContainer->size = encBufSize;
                     CU_ALLOC(rrcContainer->buf, rrcContainer->size);
@@ -1479,30 +1482,30 @@ uint8_t fillDlDcchRrcMsg(RRCContainer_t *rrcContainer)
               }
               else
               {
-                 DU_LOG("\nF1AP: Failed to fill RrcReconfig IE at fillDlDcchRrcMsg()");
+                 DU_LOG("\nERROR  -->  F1AP: Failed to fill RrcReconfig IE at fillDlDcchRrcMsg()");
               }
            }
            else
            {
-              DU_LOG("\nF1AP: Memory Alloc failed for RRC Reconfig at fillDlDcchRrcMsg()");
+              DU_LOG("\nERROR  -->  F1AP: Memory Alloc failed for RRC Reconfig at fillDlDcchRrcMsg()");
               ret = RFAILED;
            }
         }
         else
         {
-           DU_LOG("\nF1AP: Memory Alloc failed for RRC Msg at fillDlDcchRrcMsg()");
+           DU_LOG("\nERROR  -->  F1AP: Memory Alloc failed for RRC Msg at fillDlDcchRrcMsg()");
            ret = RFAILED;
         }
       }
       else
       {
-        DU_LOG("\nF1AP: Memory Alloc failed for DL Dcch Msg choice at fillDlDcchRrcMsg()");
+        DU_LOG("\nERROR  -->  F1AP: Memory Alloc failed for DL Dcch Msg choice at fillDlDcchRrcMsg()");
         ret = RFAILED;
       }
    }
    else
    {
-      DU_LOG("\nF1AP: RRC Container is NULLP at fillDlDcchRrcMsg()");
+      DU_LOG("\nERROR  -->  F1AP: RRC Container is NULLP at fillDlDcchRrcMsg()");
       ret = RFAILED;
    }
    return ret;
@@ -1526,16 +1529,16 @@ uint8_t fillDlDcchRrcMsg(RRCContainer_t *rrcContainer)
  *
  * ****************************************************************/
 
-uint8_t        BuildDLRRCContainer(uint8_t rrcMsgType, RRCContainer_t *rrcContainer)
+uint8_t        BuildDLRRCContainer(uint8_t ueId, uint8_t rrcMsgType, RRCContainer_t *rrcContainer)
 {
    uint8_t ret, bufLen;
 
    ret =ROK;
    if(rrcMsgType == RRC_SETUP)
    { 
-      ret = fillDlCcchRrcMsg(rrcContainer);
+      ret = fillDlCcchRrcMsg(ueId, rrcContainer);
       if(ret == RFAILED)
-        DU_LOG("\n F1AP: Failed to fill DL-CCCH Msg at RRC SETUP");
+        DU_LOG("\nERROR  -->  F1AP: Failed to fill DL-CCCH Msg at RRC SETUP");
    }
    else if(rrcMsgType == REGISTRATION_ACCEPT)
    {
@@ -1597,7 +1600,7 @@ uint8_t   BuildDLRRCContainer(uint8_t rrcMsgType, RRCContainer_t *rrcContainer)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t srbId, uint8_t rrcMsgType)
+uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t ueId, uint8_t srbId, uint8_t rrcMsgType)
 {
    uint8_t   elementCnt = 0;
    uint8_t  ieId;
@@ -1606,12 +1609,12 @@ uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t srbId, uint8_t rrcMsgType)
    DLRRCMessageTransfer_t  *dlRRCMsg = NULLP;
    asn_enc_rval_t   encRetVal;        /* Encoder return value */
 
-   DU_LOG("\n F1AP : Building DL RRC Message Transfer Message\n");
+   DU_LOG("\nINFO  -->  F1AP : Building DL RRC Message Transfer Message\n");
 
    CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
    if(f1apMsg == NULLP)
    {
-      DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
       return RFAILED;
    }
 
@@ -1620,7 +1623,7 @@ uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t srbId, uint8_t rrcMsgType)
         sizeof(InitiatingMessage_t));
    if(f1apMsg->choice.initiatingMessage == NULLP)
    {
-      DU_LOG(" F1AP : Memory allocation for  F1AP-PDU failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for  F1AP-PDU failed");
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
    }
@@ -1638,7 +1641,7 @@ uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t srbId, uint8_t rrcMsgType)
    CU_ALLOC(dlRRCMsg->protocolIEs.list.array, dlRRCMsg->protocolIEs.list.size);
    if(dlRRCMsg->protocolIEs.list.array == NULLP)
    {
-      DU_LOG(" F1AP : Memory allocation for DL RRC MessageTransferIEs failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for DL RRC MessageTransferIEs failed");
       CU_FREE(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
       CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
       return RFAILED;
@@ -1668,8 +1671,8 @@ uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t srbId, uint8_t rrcMsgType)
    dlRRCMsg->protocolIEs.list.array[idx]->id  = ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
    dlRRCMsg->protocolIEs.list.array[idx]->criticality  =   Criticality_reject;
    dlRRCMsg->protocolIEs.list.array[idx]->value.present = \
-                                                         DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
-   dlRRCMsg->protocolIEs.list.array[idx]->value.choice.GNB_CU_UE_F1AP_ID = CU_ID;
+                                                          DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
+   dlRRCMsg->protocolIEs.list.array[idx]->value.choice.GNB_CU_UE_F1AP_ID = ueId;
 
    /* GNB DU UE F1AP ID */
    idx++;
@@ -1677,8 +1680,8 @@ uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t srbId, uint8_t rrcMsgType)
                                                ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
    dlRRCMsg->protocolIEs.list.array[idx]->criticality  =   Criticality_reject;
    dlRRCMsg->protocolIEs.list.array[idx]->value.present = \
-                                                         DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
-   dlRRCMsg->protocolIEs.list.array[idx]->value.choice.GNB_DU_UE_F1AP_ID = DU_ID;
+                                                          DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
+   dlRRCMsg->protocolIEs.list.array[idx]->value.choice.GNB_DU_UE_F1AP_ID = ueId;
 
    /* SRBID */
    idx++;
@@ -1693,8 +1696,8 @@ uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t srbId, uint8_t rrcMsgType)
    dlRRCMsg->protocolIEs.list.array[idx]->id  = ProtocolIE_ID_id_RRCContainer;
    dlRRCMsg->protocolIEs.list.array[idx]->criticality   = Criticality_reject;
    dlRRCMsg->protocolIEs.list.array[idx]->value.present = \
-                                                         DLRRCMessageTransferIEs__value_PR_RRCContainer;
-   BuildDLRRCContainer(rrcMsgType, &dlRRCMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer);
+                                                          DLRRCMessageTransferIEs__value_PR_RRCContainer;
+   BuildDLRRCContainer(ueId, rrcMsgType, &dlRRCMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer);
 
    xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
 
@@ -1706,23 +1709,23 @@ uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t srbId, uint8_t rrcMsgType)
    /* Encode results */
    if(encRetVal.encoded == ENCODE_FAIL)
    {
-      DU_LOG( "\n F1AP : Could not encode DL RRC Message Transfer structure (at %s)\n",\
+      DU_LOG( "\nERROR  -->  F1AP : Could not encode DL RRC Message Transfer structure (at %s)\n",\
            encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
       return RFAILED;
    }
    else
    {
-      DU_LOG("\n F1AP : Created APER encoded buffer for DL RRC Message transfer\n");
+      DU_LOG("\nDEBUG  -->  F1AP : Created APER encoded buffer for DL RRC Message transfer\n");
       for(int i=0; i< encBufSize; i++)
       {
-        printf("%x",encBuf[i]);
+        DU_LOG("%x",encBuf[i]);
       }
    }
 
    /* Sending  msg  */
    if(SendF1APMsg(CU_APP_MEM_REG,CU_POOL)  !=  ROK)
    {
-      DU_LOG("\n F1AP : Sending  DL RRC Message Transfer Failed");
+      DU_LOG("\nERROR  -->  F1AP : Sending  DL RRC Message Transfer Failed");
       return RFAILED;
    }
 
@@ -1747,10 +1750,10 @@ uint8_t BuildAndSendDLRRCMessageTransfer(uint8_t srbId, uint8_t rrcMsgType)
  *
  * ****************************************************************/
 
-uint8_t setDlRRCMsgType()
+uint8_t setDlRRCMsgType(uint8_t ueId)
 {
    uint8_t rrcMsgType = 0;
-   switch(f1apMsgDb.dlRrcMsgCount)
+   switch(ueCb[ueId -1].f1apMsgDb.dlRrcMsgCount)
    {
       case RRC_SETUP:
         rrcMsgType = RRC_SETUP;
@@ -1767,6 +1770,9 @@ uint8_t setDlRRCMsgType()
       case RRC_RECONFIG:
         rrcMsgType = RRC_RECONFIG;
         break;
+      case UE_CONTEXT_MOD_REQ:
+        rrcMsgType = UE_CONTEXT_MOD_REQ;
+        break;
       default:
         break;
    }
@@ -1792,10 +1798,10 @@ uint8_t setDlRRCMsgType()
 
 uint8_t procInitULRRCMsg(F1AP_PDU_t *f1apMsg)
 {
-   uint8_t idx, rrcMsgType;
+   uint8_t idx, rrcMsgType, gnbDuUeF1apId;
    uint8_t ret =ROK;
    InitialULRRCMessageTransfer_t *initULRRCMsg = NULLP;
-   DU_LOG("\n filling the required values in DB in procInitULRRCMsg");
+   DU_LOG("\nINFO -->  F1AP : filling the required values in DB in procInitULRRCMsg");
 
    initULRRCMsg = &f1apMsg->choice.initiatingMessage->value.choice.InitialULRRCMessageTransfer;
 
@@ -1803,49 +1809,51 @@ uint8_t procInitULRRCMsg(F1AP_PDU_t *f1apMsg)
    {
       switch(initULRRCMsg->protocolIEs.list.array[idx]->id)
       {
-        case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
-           break;
-        case ProtocolIE_ID_id_NRCGI:
-           break;
-        case ProtocolIE_ID_id_C_RNTI:
-           break;
-        case ProtocolIE_ID_id_RRCContainer:
-           break;
-        case ProtocolIE_ID_id_DUtoCURRCContainer:
-           {
-              if((initULRRCMsg->protocolIEs.list.array[idx]->value.choice\
-                       .DUtoCURRCContainer.size > 0) && (initULRRCMsg->protocolIEs\
-                          .list.array[idx]->value.choice.DUtoCURRCContainer.buf != NULLP))
-              {
-                 DU_LOG("\n Received Du to Cu RRC Container ");
-                 f1apMsgDb.duToCuContainer.size = initULRRCMsg->protocolIEs\
-                                                  .list.array[idx]->value.choice.DUtoCURRCContainer.size;
-                 CU_ALLOC(f1apMsgDb.duToCuContainer.buf, \
-                       f1apMsgDb.duToCuContainer.size);
-                 if(f1apMsgDb.duToCuContainer.buf != NULLP)
-                 { 
-                    memcpy(f1apMsgDb.duToCuContainer.buf, initULRRCMsg->protocolIEs\
-                          .list.array[idx]->value.choice.DUtoCURRCContainer.buf, f1apMsgDb\
-                          .duToCuContainer.size);
-                 }
-              }
-              else
-              {
-                 DU_LOG("\n Failed to receive Du to Cu RRC Container ");
-                 ret = RFAILED;
-              }
-              break;
-           }
-        default:
-           DU_LOG("\n Invalid Event %ld", initULRRCMsg->protocolIEs.list.array[idx]->id);
-           break;
+         case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
+            gnbDuUeF1apId = initULRRCMsg->protocolIEs.list.array[idx]->value.choice.GNB_DU_UE_F1AP_ID;
+            break;
+         case ProtocolIE_ID_id_NRCGI:
+            break;
+         case ProtocolIE_ID_id_C_RNTI:
+            break;
+         case ProtocolIE_ID_id_RRCContainer:
+            break;
+         case ProtocolIE_ID_id_DUtoCURRCContainer:
+            {
+               if((initULRRCMsg->protocolIEs.list.array[idx]->value.choice\
+                        .DUtoCURRCContainer.size > 0) && (initULRRCMsg->protocolIEs\
+                           .list.array[idx]->value.choice.DUtoCURRCContainer.buf != NULLP))
+               {
+                  DU_LOG("\nINFO  -->  Received Du to Cu RRC Container ");
+                  ueCb[gnbDuUeF1apId-1].ueId = gnbDuUeF1apId;
+                  ueCb[gnbDuUeF1apId-1].f1apMsgDb.duToCuContainer.size = initULRRCMsg->protocolIEs\
+                         .list.array[idx]->value.choice.DUtoCURRCContainer.size;
+                  CU_ALLOC(ueCb[gnbDuUeF1apId-1].f1apMsgDb.duToCuContainer.buf, \
+                        ueCb[gnbDuUeF1apId-1].f1apMsgDb.duToCuContainer.size);
+                  if(ueCb[gnbDuUeF1apId-1].f1apMsgDb.duToCuContainer.buf != NULLP)
+                  { 
+                     memcpy(ueCb[gnbDuUeF1apId-1].f1apMsgDb.duToCuContainer.buf, initULRRCMsg->protocolIEs\
+                           .list.array[idx]->value.choice.DUtoCURRCContainer.buf, ueCb[gnbDuUeF1apId-1].f1apMsgDb\
+                           .duToCuContainer.size);
+                  }
+               }
+               else
+               {
+                  DU_LOG("\nERROR  -->  Failed to receive Du to Cu RRC Container ");
+                  ret = RFAILED;
+               }
+               break;
+            }
+         default:
+            DU_LOG("\nERROR  -->  Invalid Event %ld", initULRRCMsg->protocolIEs.list.array[idx]->id);
+            break;
       }
    }
    if(ret == ROK)
    {
-      f1apMsgDb.dlRrcMsgCount++;
-      rrcMsgType = setDlRRCMsgType();
-      ret = BuildAndSendDLRRCMessageTransfer(SRB0, rrcMsgType);
+      ueCb[gnbDuUeF1apId-1].f1apMsgDb.dlRrcMsgCount++;
+      rrcMsgType = setDlRRCMsgType(gnbDuUeF1apId);
+      ret = BuildAndSendDLRRCMessageTransfer(gnbDuUeF1apId, SRB0, rrcMsgType);
    }
    return ret;
 }
@@ -2027,7 +2035,7 @@ uint8_t BuildQOSInfo(QoSFlowLevelQoSParameters_t *drbQos)
       return RFAILED;
    }
    /*FiveQI*/
-   drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->fiveQI = 0;
+   drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->fiveQI = FIVE_QI_VALUE;
    /*AveragingWindow*/
    CU_ALLOC(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow,\
         sizeof(AveragingWindow_t));
@@ -2048,11 +2056,10 @@ uint8_t BuildQOSInfo(QoSFlowLevelQoSParameters_t *drbQos)
    *(drbQos->qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume) = 0;
 
    /*nRGRAN Allocation Retention Priority*/
-   drbQos->nGRANallocationRetentionPriority.priorityLevel = PriorityLevel_highest;
+   drbQos->nGRANallocationRetentionPriority.priorityLevel = PriorityLevel_lowest;
    drbQos->nGRANallocationRetentionPriority.pre_emptionCapability = Pre_emptionCapability_may_trigger_pre_emption;
    drbQos->nGRANallocationRetentionPriority.pre_emptionVulnerability = Pre_emptionVulnerability_not_pre_emptable;
 
-   /* TO DO: GBR_QoSFlowInformation */
    return ROK;
 }/*End of BuildQOSInfo*/
 
@@ -2204,14 +2211,15 @@ uint8_t BuildULTnlInfo(ULUPTNLInformation_ToBeSetup_List_t *ulInfo)
    {
       return RFAILED;
    }
+   /* NOTE: Below IP address must be changed if running on different IP configuration */
    ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\
-      transportLayerAddress.buf[0] = 4;
+      transportLayerAddress.buf[0] = 192;
    ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\
-      transportLayerAddress.buf[1] = 4;
+      transportLayerAddress.buf[1] = 168;
    ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\
-      transportLayerAddress.buf[2] = 4;
+      transportLayerAddress.buf[2] = 130;
    ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\
-      transportLayerAddress.buf[3] = 5;
+      transportLayerAddress.buf[3] = 82;
    ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\
       transportLayerAddress.bits_unused = 0;
    /*GTP TEID*/
@@ -2226,13 +2234,13 @@ uint8_t BuildULTnlInfo(ULUPTNLInformation_ToBeSetup_List_t *ulInfo)
       return RFAILED;
    }
    ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\
-      gTP_TEID.buf[0] = 11;
+     gTP_TEID.buf[0] = 0;
    ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\
       gTP_TEID.buf[1] = 0;
    ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\
       gTP_TEID.buf[2] = 0;
    ulInfo->list.array[idx]->uLUPTNLInformation.choice.gTPTunnel->\
-      gTP_TEID.buf[3] = 2;
+      gTP_TEID.buf[3] = cuCfgParams.egtpParams.currTunnelId++;
 
    return ROK;
 }/*End of BuildULTnlInfo*/
@@ -2705,7 +2713,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
                        }
                        break;
                     default:
-                       printf("\nF1AP: Invalid event type %ld", ueSetReq->protocolIEs.list.array[idx]->id);
+                       DU_LOG("\nERROR  -->  F1AP: Invalid event type %ld", ueSetReq->protocolIEs.list.array[idx]->id);
                  }
               }
               break;
@@ -2764,7 +2772,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
    CU_ALLOC(controlRSetList->list.array, controlRSetList->list.size);
    if(!controlRSetList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
 
@@ -2774,7 +2782,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
       CU_ALLOC(controlRSetList->list.array[idx], sizeof(struct ControlResourceSet));
       if(!controlRSetList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
         return RFAILED;
       }
    }
@@ -2796,7 +2804,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
         controlRSet->frequencyDomainResources.size);
    if(!controlRSet->frequencyDomainResources.buf)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
 
@@ -2824,7 +2832,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
         sizeof(struct ControlResourceSet__tci_StatesPDCCH_ToAddList));
    if(!controlRset->tci_StatesPDCCH_ToAddList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
 
@@ -2835,7 +2843,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
         controlRset->tci_StatesPDCCH_ToAddList->list.size)
       if(!controlRset->tci_StatesPDCCH_ToAddList->list.array)
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
         return RFAILED;
       }
 
@@ -2844,7 +2852,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
       CU_ALLOC(controlRset->tci_StatesPDCCH_ToAddList->list.array[tciStateIdx], sizeof(TCI_StateId_t));
       if(!controlRset->tci_StatesPDCCH_ToAddList->list.array[tciStateIdx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
         return RFAILED;
       }
    }
@@ -2856,7 +2864,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
    CU_ALLOC(controlRset->tci_PresentInDCI, sizeof(long));
    if(!controlRset->tci_PresentInDCI)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
    /* TODO */
@@ -2867,7 +2875,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
    CU_ALLOC(controlRSet->pdcch_DMRS_ScramblingID, sizeof(long));
    if(!controlRSet->pdcch_DMRS_ScramblingID)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildControlRSetToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildControlRSetToAddModList");
       return RFAILED;
    }
    *(controlRSet->pdcch_DMRS_ScramblingID) = SCRAMBLING_ID;
@@ -2910,7 +2918,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
    CU_ALLOC(searchSpcList->list.array, searchSpcList->list.size);
    if(!searchSpcList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -2920,7 +2928,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
       CU_ALLOC(searchSpcList->list.array[idx], sizeof(struct SearchSpace));
       if(!searchSpcList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
         return RFAILED;
       }
    }
@@ -2934,7 +2942,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
    CU_ALLOC(searchSpc->controlResourceSetId, sizeof(ControlResourceSetId_t));
    if(!searchSpc->controlResourceSetId)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
    *(searchSpc->controlResourceSetId) = PDCCH_CTRL_RSRC_SET_ONE_ID;
@@ -2944,7 +2952,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
         sizeof(struct SearchSpace__monitoringSlotPeriodicityAndOffset));
    if(!searchSpc->monitoringSlotPeriodicityAndOffset)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
    searchSpc->monitoringSlotPeriodicityAndOffset->present = \
@@ -2955,7 +2963,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
    CU_ALLOC(searchSpc->monitoringSymbolsWithinSlot, sizeof(BIT_STRING_t));
    if(!searchSpc->monitoringSymbolsWithinSlot)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -2973,7 +2981,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
         searchSpc->monitoringSymbolsWithinSlot->size);
    if(!searchSpc->monitoringSymbolsWithinSlot->buf)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -2987,7 +2995,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
    CU_ALLOC(searchSpc->nrofCandidates, sizeof(struct SearchSpace__nrofCandidates));
    if(!searchSpc->nrofCandidates)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -3006,7 +3014,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
    CU_ALLOC(searchSpc->searchSpaceType, sizeof(struct SearchSpace__searchSpaceType));
    if(!searchSpc->searchSpaceType)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }
 
@@ -3017,7 +3025,7 @@ void FreeUeContextSetupReq(F1AP_PDU_t  *f1apMsg)
         sizeof(struct SearchSpace__searchSpaceType__ue_Specific));
    if(!searchSpc->searchSpaceType->choice.ue_Specific)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildSearchSpcToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSearchSpcToAddModList");
       return RFAILED;
    }  
    searchSpc->searchSpaceType->choice.ue_Specific->dci_Formats = \
@@ -3049,7 +3057,7 @@ uint8_t BuildBWPDlDedPdcchCfg(struct PDCCH_Config *pdcchCfg)
         sizeof(struct PDCCH_Config__controlResourceSetToAddModList));
    if(!pdcchCfg->controlResourceSetToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
       return RFAILED;
    }
 
@@ -3065,7 +3073,7 @@ uint8_t BuildBWPDlDedPdcchCfg(struct PDCCH_Config *pdcchCfg)
         sizeof(struct PDCCH_Config__searchSpacesToAddModList));
    if(!pdcchCfg->searchSpacesToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdcchCfg");
       return RFAILED;
    }
 
@@ -3109,7 +3117,7 @@ uint8_t BuildBWPDlDedPdcchCfg(struct PDCCH_Config *pdcchCfg)
    CU_ALLOC(dmrsDlCfg->choice.setup, sizeof(struct DMRS_DownlinkConfig));
    if(!dmrsDlCfg->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
 
@@ -3118,7 +3126,7 @@ uint8_t BuildBWPDlDedPdcchCfg(struct PDCCH_Config *pdcchCfg)
    CU_ALLOC(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition, sizeof(long));
    if(!dmrsDlCfg->choice.setup->dmrs_AdditionalPosition)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSDLPdschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSDLPdschMapTypeA");
       return RFAILED;
    }
    *(dmrsDlCfg->choice.setup->dmrs_AdditionalPosition) = DMRS_ADDITIONAL_POS;
@@ -3187,11 +3195,11 @@ uint8_t BuildTCIStatesToAddModList(struct PDSCH_Config__tci_StatesToAddModList *
         sizeof(struct PDSCH_TimeDomainResourceAllocationList));
    if(!timeDomAllocList->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
       return RFAILED;
    }
 
-   elementCnt = 1;
+   elementCnt = 2;
    timeDomAllocList->choice.setup->list.count = elementCnt;
    timeDomAllocList->choice.setup->list.size = \
                                               elementCnt * sizeof(struct PDSCH_TimeDomainResourceAllocation *);
@@ -3201,7 +3209,7 @@ uint8_t BuildTCIStatesToAddModList(struct PDSCH_Config__tci_StatesToAddModList *
         timeDomAllocList->choice.setup->list.size);
    if(!timeDomAllocList->choice.setup->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
       return RFAILED;
    }
 
@@ -3212,17 +3220,34 @@ uint8_t BuildTCIStatesToAddModList(struct PDSCH_Config__tci_StatesToAddModList *
            sizeof(struct PDSCH_TimeDomainResourceAllocation));
       if(!timeDomAllocList->choice.setup->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
         return RFAILED;
       }
    }
 
    idx = 0;
    timeDomAlloc = timeDomAllocList->choice.setup->list.array[idx];
+   CU_ALLOC(timeDomAlloc->k0, sizeof(long));
+   if(!timeDomAlloc->k0)
+   {
+       DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+       return RFAILED;
+   }
+   *(timeDomAlloc->k0) = 0;
+   timeDomAlloc->mappingType = PDSCH_MAPPING_TYPE_A;
+   timeDomAlloc->startSymbolAndLength = 66;
 
-   timeDomAlloc->k0 = NULLP;
+   idx++;
+   timeDomAlloc = timeDomAllocList->choice.setup->list.array[idx];
+   CU_ALLOC(timeDomAlloc->k0, sizeof(long));
+   if(!timeDomAlloc->k0)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschTimeDomAllocList");
+      return RFAILED;
+   }
+   *(timeDomAlloc->k0) = 1;
    timeDomAlloc->mappingType = PDSCH_MAPPING_TYPE_A;
-   timeDomAlloc->startSymbolAndLength = 53;
+   timeDomAlloc->startSymbolAndLength = 66;
 
    return ROK;
 }
@@ -3256,7 +3281,7 @@ uint8_t BuildTCIStatesToAddModList(struct PDSCH_Config__tci_StatesToAddModList *
         sizeof(struct PDSCH_Config__prb_BundlingType__staticBundling));
    if(!prbBndlType->choice.staticBundling)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschPrbBundlingType");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschPrbBundlingType");
       return RFAILED;
    }
    prbBndlType->choice.staticBundling->bundleSize = NULLP;
@@ -3289,7 +3314,7 @@ uint8_t BuildBWPDlDedPdschCfg(struct PDSCH_Config *pdschCfg)
         sizeof(struct PDSCH_Config__dmrs_DownlinkForPDSCH_MappingTypeA));
    if(!pdschCfg->dmrs_DownlinkForPDSCH_MappingTypeA)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
 
@@ -3306,7 +3331,7 @@ uint8_t BuildBWPDlDedPdschCfg(struct PDSCH_Config *pdschCfg)
    CU_ALLOC(pdschCfg->tci_StatesToAddModList, sizeof(struct PDSCH_Config__tci_StatesToAddModList));
    if(!pdschCfg->tci_StatesToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
    if(BuildTCIStatesToAddModList(pdschCfg->tci_StatesToAddModList) != ROK)
@@ -3322,7 +3347,7 @@ uint8_t BuildBWPDlDedPdschCfg(struct PDSCH_Config *pdschCfg)
         sizeof(struct PDSCH_Config__pdsch_TimeDomainAllocationList));
    if(!pdschCfg->pdsch_TimeDomainAllocationList)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
    if(BuildPdschTimeDomAllocList(pdschCfg->pdsch_TimeDomainAllocationList) != ROK)
@@ -3341,7 +3366,7 @@ uint8_t BuildBWPDlDedPdschCfg(struct PDSCH_Config *pdschCfg)
    CU_ALLOC(pdschCfg->maxNrofCodeWordsScheduledByDCI, sizeof(long));
    if(!pdschCfg->maxNrofCodeWordsScheduledByDCI)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPDlDedPdschCfg");
       return RFAILED;
    }
    *(pdschCfg->maxNrofCodeWordsScheduledByDCI) = PDSCH_MAX_CODEWORD_SCH_BY_DCI;
@@ -3383,7 +3408,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    CU_ALLOC(dlBwp->pdcch_Config, sizeof(struct BWP_DownlinkDedicated__pdcch_Config));
    if(!dlBwp->pdcch_Config)
    {
-      DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failure in BuildInitialDlBWP");
       return RFAILED;
    }
    dlBwp->pdcch_Config->present = BWP_DownlinkDedicated__pdcch_Config_PR_setup; 
@@ -3392,7 +3417,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    CU_ALLOC(dlBwp->pdcch_Config->choice.setup, sizeof(struct PDCCH_Config));
    if(!dlBwp->pdcch_Config->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failure in BuildInitialDlBWP");
       return RFAILED;
    }
    if(BuildBWPDlDedPdcchCfg(dlBwp->pdcch_Config->choice.setup) != ROK)
@@ -3404,7 +3429,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    CU_ALLOC(dlBwp->pdsch_Config, sizeof(struct BWP_DownlinkDedicated__pdsch_Config));
    if(!dlBwp->pdsch_Config)
    {
-      DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failure in BuildInitialDlBWP");
       return RFAILED;
    }
    dlBwp->pdsch_Config->present = BWP_DownlinkDedicated__pdsch_Config_PR_setup;
@@ -3413,7 +3438,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    CU_ALLOC(dlBwp->pdsch_Config->choice.setup, sizeof(struct PDSCH_Config));
    if(!dlBwp->pdsch_Config->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory Allocation failure in BuildInitialDlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failure in BuildInitialDlBWP");
       return RFAILED;
    }
 
@@ -3453,7 +3478,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    CU_ALLOC(dmrsUlCfg->choice.setup, sizeof(DMRS_UplinkConfig_t));
    if(!dmrsUlCfg->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
       return RFAILED;
    }
 
@@ -3462,7 +3487,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    CU_ALLOC(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition, sizeof(long));
    if(!dmrsUlCfg->choice.setup->dmrs_AdditionalPosition)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
       return RFAILED;
    }
    *(dmrsUlCfg->choice.setup->dmrs_AdditionalPosition) = DMRS_ADDITIONAL_POS; 
@@ -3474,7 +3499,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
         sizeof(struct DMRS_UplinkConfig__transformPrecodingDisabled));
    if(!dmrsUlCfg->choice.setup->transformPrecodingDisabled)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
       return RFAILED;
    }
 
@@ -3483,7 +3508,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
         sizeof(long));
    if(!dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDMRSULPuschMapTypeA");
       return RFAILED;
    }
    *(dmrsUlCfg->choice.setup->transformPrecodingDisabled->scramblingID0) = SCRAMBLING_ID;
@@ -3525,11 +3550,11 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
         sizeof(struct PUSCH_TimeDomainResourceAllocationList));
    if(!timeDomAllocList->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
       return RFAILED;
    }
 
-   elementCnt = 1;
+   elementCnt = 2;
    timeDomAllocList->choice.setup->list.count = elementCnt;
    timeDomAllocList->choice.setup->list.size = \
                                               elementCnt * sizeof(PUSCH_TimeDomainResourceAllocation_t *);
@@ -3538,7 +3563,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
         timeDomAllocList->choice.setup->list.size);
    if(!timeDomAllocList->choice.setup->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
       return RFAILED;
    }
 
@@ -3549,7 +3574,7 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
            sizeof(PUSCH_TimeDomainResourceAllocation_t));
       if(!timeDomAllocList->choice.setup->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
         return RFAILED;
       }
    }
@@ -3559,12 +3584,25 @@ uint8_t BuildInitialDlBWP(BWP_DownlinkDedicated_t *dlBwp)
    CU_ALLOC(timeDomAlloc->k2, sizeof(long));
    if(!timeDomAlloc->k2)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
       return RFAILED;
    }
-   *(timeDomAlloc->k2) = PUSCH_K2;
+   *(timeDomAlloc->k2) = PUSCH_K2_CFG1;
+   timeDomAlloc->mappingType = PUSCH_MAPPING_TYPE_A;
+   timeDomAlloc->startSymbolAndLength = 66; 
+
+   idx++;
+   timeDomAlloc = timeDomAllocList->choice.setup->list.array[idx];
+   CU_ALLOC(timeDomAlloc->k2, sizeof(long));
+   if(!timeDomAlloc->k2)
+   {
+       DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+       return RFAILED;
+   }
+   *(timeDomAlloc->k2) = PUSCH_K2_CFG2;
    timeDomAlloc->mappingType = PUSCH_MAPPING_TYPE_A;
-   timeDomAlloc->startSymbolAndLength = 27; 
+   timeDomAlloc->startSymbolAndLength = 66;
+
    return ROK;
 }
 
@@ -3591,7 +3629,7 @@ uint8_t BuildBWPUlDedPuschCfg(PUSCH_Config_t *puschCfg)
    CU_ALLOC(puschCfg->dataScramblingIdentityPUSCH, sizeof(long));
    if(!puschCfg->dataScramblingIdentityPUSCH)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
       return RFAILED;
    }
    *(puschCfg->dataScramblingIdentityPUSCH) = SCRAMBLING_ID;
@@ -3602,7 +3640,7 @@ uint8_t BuildBWPUlDedPuschCfg(PUSCH_Config_t *puschCfg)
         sizeof(struct PUSCH_Config__dmrs_UplinkForPUSCH_MappingTypeA));
    if(!puschCfg->dmrs_UplinkForPUSCH_MappingTypeA)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
       return RFAILED;
    }
 
@@ -3622,7 +3660,7 @@ uint8_t BuildBWPUlDedPuschCfg(PUSCH_Config_t *puschCfg)
         sizeof(struct PUSCH_Config__pusch_TimeDomainAllocationList));
    if(!puschCfg->pusch_TimeDomainAllocationList)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
       return RFAILED;
    }
 
@@ -3638,7 +3676,7 @@ uint8_t BuildBWPUlDedPuschCfg(PUSCH_Config_t *puschCfg)
    CU_ALLOC(puschCfg->transformPrecoder, sizeof(long));
    if(!puschCfg->transformPrecoder)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedPuschCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPuschCfg");
       return RFAILED;
    }
    *(puschCfg->transformPrecoder) = PUSCH_TRANSFORM_PRECODER;
@@ -3652,6 +3690,61 @@ uint8_t BuildBWPUlDedPuschCfg(PUSCH_Config_t *puschCfg)
    return ROK;
 }
 
+/*******************************************************************
+ *
+ * @brief Builds BWP UL dedicated PUCCH Config
+ *
+ * @details
+ *
+ *    Function : BuildBWPUlDedPucchCfg
+ *
+ *    Functionality:
+ *      Builds BWP UL dedicated PUCCH Config
+ *
+ * @params[in] : PUCCH_Config_t *pucchCfg
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildBWPUlDedPucchCfg(PUCCH_Config_t *pucchCfg)
+{
+   uint8_t arrIdx, elementCnt;
+
+   CU_ALLOC(pucchCfg->dl_DataToUL_ACK, sizeof(struct PUCCH_Config__dl_DataToUL_ACK));
+   if(pucchCfg->dl_DataToUL_ACK == NULLP)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+      return RFAILED;
+   }
+
+   elementCnt = 2;
+   pucchCfg->dl_DataToUL_ACK->list.count = elementCnt;
+   pucchCfg->dl_DataToUL_ACK->list.size = elementCnt * sizeof(long *);
+   CU_ALLOC(pucchCfg->dl_DataToUL_ACK->list.array, pucchCfg->dl_DataToUL_ACK->list.size);
+   if(pucchCfg->dl_DataToUL_ACK->list.array == NULLP)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+      return RFAILED;
+   }
+
+   for(arrIdx = 0; arrIdx <  pucchCfg->dl_DataToUL_ACK->list.count; arrIdx++)
+   {
+      CU_ALLOC(pucchCfg->dl_DataToUL_ACK->list.array[arrIdx], sizeof(long));
+      if(pucchCfg->dl_DataToUL_ACK->list.array[arrIdx] == NULLP)
+      {
+          DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+          return RFAILED;
+      }
+   }
+
+   arrIdx = 0;
+   *(pucchCfg->dl_DataToUL_ACK->list.array[arrIdx++]) = 1;
+   *(pucchCfg->dl_DataToUL_ACK->list.array[arrIdx]) = 2;
+
+   return ROK;
+}
+
 /*******************************************************************
  *
  * @brief Fills SRS resource to add/modify list 
@@ -3679,7 +3772,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
    CU_ALLOC(resourceList->list.array, resourceList->list.size);
    if(!resourceList->list.array)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+      DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildSrsRsrcAddModList");
       return RFAILED;
    }
 
@@ -3688,7 +3781,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
       CU_ALLOC(resourceList->list.array[rsrcIdx], sizeof(SRS_Resource_t));
       if(!resourceList->list.array[rsrcIdx])
       {
-        DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+        DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildSrsRsrcAddModList");
         return RFAILED;
       }
    }
@@ -3703,7 +3796,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
         sizeof(struct SRS_Resource__transmissionComb__n2));
    if(!resourceList->list.array[rsrcIdx]->transmissionComb.choice.n2)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+      DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildSrsRsrcAddModList");
       return RFAILED;
    }
    resourceList->list.array[rsrcIdx]->transmissionComb.choice.n2->combOffset_n2\
@@ -3734,7 +3827,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
         sizeof(struct SRS_Resource__resourceType__aperiodic));
    if(!resourceList->list.array[rsrcIdx]->resourceType.choice.aperiodic)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcAddModList");
+      DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildSrsRsrcAddModList");
       return RFAILED;
    }
    resourceList->list.array[rsrcIdx]->sequenceId = SRS_SEQ_ID;
@@ -3774,7 +3867,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
    CU_ALLOC(rsrcSetList->list.array, rsrcSetList->list.size);
    if(!rsrcSetList->list.array)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+      DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
       return RFAILED;
    }
 
@@ -3783,7 +3876,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
       CU_ALLOC(rsrcSetList->list.array[rSetIdx], sizeof(SRS_ResourceSet_t));
       if(!rsrcSetList->list.array[rSetIdx])
       {
-        DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+        DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
         return RFAILED;
       }
    }
@@ -3797,7 +3890,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
         sizeof(struct SRS_ResourceSet__srs_ResourceIdList));
    if(!rsrcSetList->list.array[rSetIdx]->srs_ResourceIdList)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildSrsRsrcSetAddModList");
       return RFAILED;
    }
 
@@ -3809,7 +3902,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
    CU_ALLOC(rsrcIdList->list.array, rsrcIdList->list.size);
    if(!rsrcIdList->list.array)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+      DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
       return RFAILED;
    }
 
@@ -3818,7 +3911,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
       CU_ALLOC(rsrcIdList->list.array[rsrcIdx], sizeof(SRS_ResourceId_t));
       if(!rsrcIdList->list.array[rsrcIdx])
       {
-        DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+        DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
         return RFAILED;
       }
    }
@@ -3835,7 +3928,7 @@ uint8_t BuildSrsRsrcAddModList(struct SRS_Config__srs_ResourceToAddModList *reso
         sizeof(struct SRS_ResourceSet__resourceType__aperiodic));
    if(!rsrcSetList->list.array[rSetIdx]->resourceType.choice.aperiodic)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
+      DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildSrsRsrcSetAddModList");
       return RFAILED;
    }
    rsrcSetList->list.array[rSetIdx]->resourceType.choice.aperiodic->aperiodicSRS_ResourceTrigger \
@@ -3878,7 +3971,7 @@ uint8_t BuildBWPUlDedSrsCfg(SRS_Config_t *srsCfg)
         sizeof(struct SRS_Config__srs_ResourceSetToAddModList));
    if(!srsCfg->srs_ResourceSetToAddModList)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
+      DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
       return RFAILED;
    }
    if(BuildSrsRsrcSetAddModList(srsCfg->srs_ResourceSetToAddModList) != ROK)
@@ -3894,7 +3987,7 @@ uint8_t BuildBWPUlDedSrsCfg(SRS_Config_t *srsCfg)
         sizeof(struct SRS_Config__srs_ResourceToAddModList));
    if(!srsCfg->srs_ResourceToAddModList)
    {
-      DU_LOG("\nF1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
+      DU_LOG("\nERROR  -->  F1AP: Memory allocation failed in BuildBWPUlDedSrsCfg");
       return RFAILED;
    }
 
@@ -3926,13 +4019,34 @@ uint8_t BuildBWPUlDedSrsCfg(SRS_Config_t *srsCfg)
 uint8_t BuildInitialUlBWP(BWP_UplinkDedicated_t *ulBwp)
 {
    ulBwp->pucch_Config = NULLP;
+   ulBwp->pucch_Config = NULLP;
+   CU_ALLOC(ulBwp->pucch_Config, sizeof(struct BWP_UplinkDedicated__pucch_Config));
+   if(!ulBwp->pucch_Config)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
+      return RFAILED;
+   }
+
+   ulBwp->pucch_Config->present = BWP_UplinkDedicated__pucch_Config_PR_setup;
+   ulBwp->pucch_Config->choice.setup = NULLP;
+   CU_ALLOC(ulBwp->pucch_Config->choice.setup, sizeof(PUCCH_Config_t));
+   if(!ulBwp->pucch_Config->choice.setup)
+   {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
+      return RFAILED;
+   }
+
+   if(BuildBWPUlDedPucchCfg(ulBwp->pucch_Config->choice.setup) != ROK)
+   {
+      return RFAILED;
+   }
 
    /* Fill BWP UL dedicated PUSCH config */
    ulBwp->pusch_Config = NULLP;
    CU_ALLOC(ulBwp->pusch_Config, sizeof(struct BWP_UplinkDedicated__pusch_Config));
    if(!ulBwp->pusch_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
       return RFAILED;
    }
 
@@ -3941,7 +4055,7 @@ uint8_t BuildInitialUlBWP(BWP_UplinkDedicated_t *ulBwp)
    CU_ALLOC(ulBwp->pusch_Config->choice.setup, sizeof(PUSCH_Config_t));
    if(!ulBwp->pusch_Config->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
       return RFAILED;
    }
 
@@ -3957,7 +4071,7 @@ uint8_t BuildInitialUlBWP(BWP_UplinkDedicated_t *ulBwp)
    CU_ALLOC(ulBwp->srs_Config, sizeof(struct BWP_UplinkDedicated__srs_Config));
    if(!ulBwp->srs_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
       return RFAILED;
    }
 
@@ -3966,7 +4080,7 @@ uint8_t BuildInitialUlBWP(BWP_UplinkDedicated_t *ulBwp)
    CU_ALLOC(ulBwp->srs_Config->choice.setup, sizeof(SRS_Config_t));
    if(!ulBwp->srs_Config->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildInitialUlBWP");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildInitialUlBWP");
       return RFAILED;
    }
 
@@ -4003,7 +4117,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
    CU_ALLOC(puschCfg->choice.setup, sizeof(struct PUSCH_ServingCellConfig));
    if(!puschCfg->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
       return RFAILED;
    }
 
@@ -4014,7 +4128,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
    CU_ALLOC(puschCfg->choice.setup->ext1, sizeof(struct PUSCH_ServingCellConfig__ext1));
    if(!puschCfg->choice.setup->ext1)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
       return RFAILED;
    }
 
@@ -4022,7 +4136,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
    CU_ALLOC(puschCfg->choice.setup->ext1->maxMIMO_Layers, sizeof(long));
    if(!puschCfg->choice.setup->ext1->maxMIMO_Layers)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
       return RFAILED;
    }
    *(puschCfg->choice.setup->ext1->maxMIMO_Layers) = PUSCH_MAX_MIMO_LAYERS;
@@ -4031,7 +4145,7 @@ uint8_t BuildPuschSrvCellCfg(struct UplinkConfig__pusch_ServingCellConfig *pusch
    CU_ALLOC(puschCfg->choice.setup->ext1->processingType2Enabled,sizeof(BOOLEAN_t));
    if(!puschCfg->choice.setup->ext1->processingType2Enabled)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPuschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPuschSrvCellCfg");
       return RFAILED;
    }
    *(puschCfg->choice.setup->ext1->processingType2Enabled) = PUSCH_PROCESS_TYPE2_ENABLED;
@@ -4059,7 +4173,7 @@ uint8_t BuildUlCfg(UplinkConfig_t *ulCfg)
    CU_ALLOC(ulCfg->initialUplinkBWP, sizeof(BWP_UplinkDedicated_t));
    if(!ulCfg->initialUplinkBWP)
    {
-      DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failed in BuildUlCfg");
       return RFAILED;
    }
 
@@ -4074,7 +4188,7 @@ uint8_t BuildUlCfg(UplinkConfig_t *ulCfg)
    CU_ALLOC(ulCfg->firstActiveUplinkBWP_Id, sizeof(BWP_Id_t));
    if(!ulCfg->firstActiveUplinkBWP_Id)
    {
-      DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failed in BuildUlCfg");
       return RFAILED;
    }
    *(ulCfg->firstActiveUplinkBWP_Id) = ACTIVE_UL_BWP_ID;
@@ -4084,7 +4198,7 @@ uint8_t BuildUlCfg(UplinkConfig_t *ulCfg)
         sizeof(struct UplinkConfig__pusch_ServingCellConfig));
    if(!ulCfg->pusch_ServingCellConfig)
    {
-      DU_LOG("\nF1AP : Memory Allocation failed in BuildUlCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory Allocation failed in BuildUlCfg");
       return RFAILED;
    }
 
@@ -4120,7 +4234,7 @@ uint8_t BuildPdschSrvCellCfg(struct ServingCellConfig__pdsch_ServingCellConfig *
    CU_ALLOC(pdschCfg->choice.setup, sizeof( struct PDSCH_ServingCellConfig));
    if(!pdschCfg->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschSrvCellCfg");
       return RFAILED;
    }
 
@@ -4130,7 +4244,7 @@ uint8_t BuildPdschSrvCellCfg(struct ServingCellConfig__pdsch_ServingCellConfig *
    CU_ALLOC(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH, sizeof(long));
    if(!pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildPdschSrvCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildPdschSrvCellCfg");
       return RFAILED;
    }
    *(pdschCfg->choice.setup->nrofHARQ_ProcessesForPDSCH)= PDSCH_NUM_HARQ_PROC;
@@ -4184,13 +4298,13 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    CU_ALLOC(srvCellCfg->initialDownlinkBWP, sizeof(BWP_DownlinkDedicated_t));
    if(!srvCellCfg->initialDownlinkBWP)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
 
    if(BuildInitialDlBWP(srvCellCfg->initialDownlinkBWP) != ROK)
    {
-      DU_LOG("\nF1AP : BuildInitialDlBWP failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildInitialDlBWP failed");
       return RFAILED;
    }
    srvCellCfg->downlinkBWP_ToReleaseList = NULLP;
@@ -4200,7 +4314,7 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    CU_ALLOC(srvCellCfg->firstActiveDownlinkBWP_Id, sizeof(long));
    if(!srvCellCfg->firstActiveDownlinkBWP_Id)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
    *(srvCellCfg->firstActiveDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
@@ -4211,7 +4325,7 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    CU_ALLOC(srvCellCfg->defaultDownlinkBWP_Id, sizeof(long));
    if(!srvCellCfg->defaultDownlinkBWP_Id)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
    *(srvCellCfg->defaultDownlinkBWP_Id) = ACTIVE_DL_BWP_ID;
@@ -4220,13 +4334,13 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    CU_ALLOC(srvCellCfg->uplinkConfig, sizeof(UplinkConfig_t));
    if(!srvCellCfg->uplinkConfig)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
 
    if(BuildUlCfg(srvCellCfg->uplinkConfig) != ROK)
    {
-      DU_LOG("\nF1AP : BuildUlCfg failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildUlCfg failed");
       return RFAILED;
    }
    srvCellCfg->supplementaryUplink = NULLP;
@@ -4236,13 +4350,13 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    CU_ALLOC(srvCellCfg->pdsch_ServingCellConfig, sizeof(struct ServingCellConfig__pdsch_ServingCellConfig));
    if(!srvCellCfg->pdsch_ServingCellConfig)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
       return RFAILED;
    }
 
    if(BuildPdschSrvCellCfg(srvCellCfg->pdsch_ServingCellConfig) != ROK)
    {
-      DU_LOG("\nF1AP : BuildPdschSrvCellCfg failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildPdschSrvCellCfg failed");
       return RFAILED;
    }
 
@@ -4251,7 +4365,7 @@ uint8_t BuildSpCellCfgDed(ServingCellConfig_t *srvCellCfg)
    CU_ALLOC(srvCellCfg->csi_MeasConfig, sizeof(struct  ServingCellConfig__csi_MeasConfig))
       if(!srvCellCfg->csi_MeasConfig)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfgDed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfgDed");
         return RFAILED;
       }
 
@@ -4294,7 +4408,7 @@ uint8_t BuildSpCellCfg(SpCellConfig_t *spCellCfg)
    CU_ALLOC(spCellCfg->servCellIndex, sizeof(long));
    if(!spCellCfg->servCellIndex)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
       return RFAILED;
    }
    *(spCellCfg->servCellIndex) = SERV_CELL_IDX;
@@ -4305,7 +4419,7 @@ uint8_t BuildSpCellCfg(SpCellConfig_t *spCellCfg)
    CU_ALLOC(spCellCfg->rlmInSyncOutOfSyncThreshold, sizeof(long));
    if(!spCellCfg->rlmInSyncOutOfSyncThreshold)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
       return RFAILED;
    }
    *(spCellCfg->rlmInSyncOutOfSyncThreshold) = RLM_SYNC_OUT_SYNC_THRESHOLD;
@@ -4314,12 +4428,12 @@ uint8_t BuildSpCellCfg(SpCellConfig_t *spCellCfg)
    CU_ALLOC(spCellCfg->spCellConfigDedicated, sizeof(ServingCellConfig_t));
    if(!spCellCfg->spCellConfigDedicated)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSpCellCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSpCellCfg");
       return RFAILED;
    }
    if(BuildSpCellCfgDed(spCellCfg->spCellConfigDedicated) != ROK)
    {
-      DU_LOG("\nF1AP : BuildSpCellCfgDed failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildSpCellCfgDed failed");
       return RFAILED;
    }
    return ROK;
@@ -4349,7 +4463,7 @@ uint8_t BuildPhyCellGrpCfg(PhysicalCellGroupConfig_t *phyCellGrpCfg)
    CU_ALLOC(phyCellGrpCfg->p_NR_FR1, sizeof(long));
    if(!phyCellGrpCfg->p_NR_FR1)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildPhyCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildPhyCellGrpCfg");
       return RFAILED;
    }
    *(phyCellGrpCfg->p_NR_FR1)             = P_NR_FR1;
@@ -4391,7 +4505,7 @@ uint8_t BuildTagConfig(struct TAG_Config *tagConfig)
    CU_ALLOC(tagConfig->tag_ToAddModList, sizeof(struct TAG_Config__tag_ToAddModList));
    if(!tagConfig->tag_ToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildTagConfig");
       return RFAILED;
    }
 
@@ -4404,7 +4518,7 @@ uint8_t BuildTagConfig(struct TAG_Config *tagConfig)
    CU_ALLOC(tagList->list.array, tagList->list.size);
    if(!tagList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildTagConfig");
       return RFAILED;
    }
 
@@ -4414,7 +4528,7 @@ uint8_t BuildTagConfig(struct TAG_Config *tagConfig)
       CU_ALLOC(tagList->list.array[idx], sizeof(struct TAG));
       if(!tagList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildTagConfig");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildTagConfig");
         return RFAILED;
       }
    }
@@ -4450,7 +4564,7 @@ uint8_t BuildPhrConfig(struct MAC_CellGroupConfig__phr_Config *phrConfig)
    CU_ALLOC(phrConfig->choice.setup, sizeof(struct PHR_Config));
    if(!phrConfig->choice.setup)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildPhrConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildPhrConfig");
       return RFAILED;
    }
 
@@ -4516,7 +4630,7 @@ uint8_t BuildSchedulingReqConfig(struct SchedulingRequestConfig *schedulingReque
         sizeof(struct SchedulingRequestConfig__schedulingRequestToAddModList));
    if(!schedulingRequestConfig->schedulingRequestToAddModList)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSchedulingReqConfig");
       return RFAILED;
    }
 
@@ -4529,7 +4643,7 @@ uint8_t BuildSchedulingReqConfig(struct SchedulingRequestConfig *schedulingReque
    CU_ALLOC(schReqList->list.array, schReqList->list.size);
    if(!schReqList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSchedulingReqConfig");
       return RFAILED;
    }
 
@@ -4539,7 +4653,7 @@ uint8_t BuildSchedulingReqConfig(struct SchedulingRequestConfig *schedulingReque
       CU_ALLOC(schReqList->list.array[idx], sizeof(struct SchedulingRequestToAddMod));
       if(!schReqList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSchedulingReqConfig");
         return RFAILED;
       }
    }
@@ -4551,7 +4665,7 @@ uint8_t BuildSchedulingReqConfig(struct SchedulingRequestConfig *schedulingReque
    CU_ALLOC(schReqList->list.array[idx]->sr_ProhibitTimer, sizeof(long));
    if(!schReqList->list.array[idx]->sr_ProhibitTimer)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildSchedulingReqConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildSchedulingReqConfig");
       return RFAILED;
    }
    *(schReqList->list.array[idx]->sr_ProhibitTimer) = SR_PROHIBIT_TMR;
@@ -4583,13 +4697,13 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg)
    CU_ALLOC(macCellGrpCfg->schedulingRequestConfig, sizeof(struct SchedulingRequestConfig));
    if(!macCellGrpCfg->schedulingRequestConfig)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
       return RFAILED;
    }
 
    if(BuildSchedulingReqConfig(macCellGrpCfg->schedulingRequestConfig) != ROK)
    {
-      DU_LOG("\nF1AP : BuildSchedulingReqConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildSchedulingReqConfig failed");
       return RFAILED;
    }
 
@@ -4597,13 +4711,13 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg)
    CU_ALLOC(macCellGrpCfg->bsr_Config, sizeof(struct BSR_Config));
    if(!macCellGrpCfg->bsr_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
       return RFAILED;
    }
 
    if(BuildBsrConfig(macCellGrpCfg->bsr_Config) != ROK)
    {
-      DU_LOG("\nF1AP : BuildBsrConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildBsrConfig failed");
       return RFAILED;
    }
 
@@ -4611,13 +4725,13 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg)
    CU_ALLOC(macCellGrpCfg->tag_Config, sizeof(struct TAG_Config));
    if(!macCellGrpCfg->tag_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
       return RFAILED;
    }
 
    if(BuildTagConfig(macCellGrpCfg->tag_Config) != ROK)
    {
-      DU_LOG("\nF1AP : BuildTagConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildTagConfig failed");
       return RFAILED;
    }
 
@@ -4625,13 +4739,13 @@ uint8_t BuildMacCellGrpCfg(MAC_CellGroupConfig_t *macCellGrpCfg)
    CU_ALLOC(macCellGrpCfg->phr_Config, sizeof(struct MAC_CellGroupConfig__phr_Config));
    if(!macCellGrpCfg->phr_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacCellGrpCfg");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacCellGrpCfg");
       return RFAILED;
    }
 
    if(BuildPhrConfig(macCellGrpCfg->phr_Config) != ROK)
    {
-      DU_LOG("\nF1AP : BuildPhrConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildPhrConfig failed");
       return RFAILED;
    }
 
@@ -5117,7 +5231,7 @@ uint8_t BuildRlcConfig(struct RLC_Config *rlcConfig)
    CU_ALLOC(rlcConfig->choice.am, sizeof(struct RLC_Config__am));
    if(!rlcConfig->choice.am)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcConfig");
       return RFAILED;
    }
 
@@ -5126,7 +5240,7 @@ uint8_t BuildRlcConfig(struct RLC_Config *rlcConfig)
    CU_ALLOC(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t));
    if(!rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcConfig");
       return RFAILED;
    }
    *(rlcConfig->choice.am->ul_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
@@ -5140,7 +5254,7 @@ uint8_t BuildRlcConfig(struct RLC_Config *rlcConfig)
    CU_ALLOC(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength, sizeof(SN_FieldLengthAM_t)); 
    if(!rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcConfig");
       return RFAILED;
    }
    *(rlcConfig->choice.am->dl_AM_RLC.sn_FieldLength) = SN_FIELD_LEN;
@@ -5173,7 +5287,7 @@ uint8_t BuildMacLCConfig(struct LogicalChannelConfig *macLcConfig)
    CU_ALLOC(macLcConfig->ul_SpecificParameters, sizeof(struct LogicalChannelConfig__ul_SpecificParameters));
    if(!macLcConfig->ul_SpecificParameters)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacLCConfig");
       return RFAILED;
    }
 
@@ -5189,7 +5303,7 @@ uint8_t BuildMacLCConfig(struct LogicalChannelConfig *macLcConfig)
    CU_ALLOC(macLcConfig->ul_SpecificParameters->logicalChannelGroup,   sizeof(long));
    if(!macLcConfig->ul_SpecificParameters->logicalChannelGroup)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacLCConfig");
       return RFAILED;
    }
    *(macLcConfig->ul_SpecificParameters->logicalChannelGroup) = LC_GRP;
@@ -5198,7 +5312,7 @@ uint8_t BuildMacLCConfig(struct LogicalChannelConfig *macLcConfig)
    CU_ALLOC(macLcConfig->ul_SpecificParameters->schedulingRequestID,   sizeof(SchedulingRequestId_t));
    if(!macLcConfig->ul_SpecificParameters->schedulingRequestID)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildMacLCConfig");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildMacLCConfig");
       return RFAILED;
    }
    *(macLcConfig->ul_SpecificParameters->schedulingRequestID) = SCH_REQ_ID;
@@ -5237,7 +5351,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    CU_ALLOC(rlcBearerList->list.array, rlcBearerList->list.size);
    if(!rlcBearerList->list.array)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
       return RFAILED;
    }
 
@@ -5247,7 +5361,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
       CU_ALLOC(rlcBearerList->list.array[idx], sizeof(struct RLC_BearerConfig));
       if(!rlcBearerList->list.array[idx])
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
         return RFAILED;
       }
    }
@@ -5258,7 +5372,7 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    CU_ALLOC(rlcBearerList->list.array[idx]->servedRadioBearer, sizeof(struct RLC_BearerConfig__servedRadioBearer));
    if(!rlcBearerList->list.array[idx]->servedRadioBearer)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
       return RFAILED;
    }
 
@@ -5270,13 +5384,13 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    CU_ALLOC(rlcBearerList->list.array[idx]->rlc_Config, sizeof(struct RLC_Config));
    if(!rlcBearerList->list.array[idx]->rlc_Config)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
       return RFAILED;
    }
 
    if(BuildRlcConfig(rlcBearerList->list.array[idx]->rlc_Config) != ROK)
    {
-      DU_LOG("\nF1AP : BuildRlcConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildRlcConfig failed");
       return RFAILED;
    }
 
@@ -5284,13 +5398,13 @@ uint8_t BuildRlcBearerToAddModList(struct CellGroupConfigRrc__rlc_BearerToAddMod
    CU_ALLOC(rlcBearerList->list.array[idx]->mac_LogicalChannelConfig, sizeof(struct LogicalChannelConfig));
    if(!rlcBearerList->list.array[idx]->mac_LogicalChannelConfig)
    {
-      DU_LOG("\nF1AP : Memory allocation failure in BuildRlcBearerToAddModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildRlcBearerToAddModList");
       return RFAILED;
    }
 
    if(BuildMacLCConfig(rlcBearerList->list.array[idx]->mac_LogicalChannelConfig) != ROK)
    {
-      DU_LOG("\nF1AP : BuildMacLCConfig failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildMacLCConfig failed");
       return RFAILED;
    }
 
@@ -5527,12 +5641,12 @@ uint8_t fillCellGrpCfg(CellGroupConfig_t *cellGrp)
       CU_ALLOC(cellGrpCfg.rlc_BearerToAddModList, sizeof(struct CellGroupConfigRrc__rlc_BearerToAddModList));
       if(!cellGrpCfg.rlc_BearerToAddModList)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in CellGrpConfig");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in CellGrpConfig");
         break;
       }
       if(BuildRlcBearerToAddModList(cellGrpCfg.rlc_BearerToAddModList) != ROK)
       {
-        DU_LOG("\nF1AP : fillCellGrpCfg failed");
+        DU_LOG("\nERROR  -->  F1AP : fillCellGrpCfg failed");
         break;
       }
 
@@ -5541,12 +5655,12 @@ uint8_t fillCellGrpCfg(CellGroupConfig_t *cellGrp)
       CU_ALLOC(cellGrpCfg.mac_CellGroupConfig, sizeof(MAC_CellGroupConfig_t));
       if(!cellGrpCfg.mac_CellGroupConfig)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in fillCellGrpCfg");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in fillCellGrpCfg");
         break;
       }
       if(BuildMacCellGrpCfg(cellGrpCfg.mac_CellGroupConfig) != ROK)
       {
-        DU_LOG("\nF1AP : BuildMacCellGrpCfg failed");
+        DU_LOG("\nERROR  -->  F1AP : BuildMacCellGrpCfg failed");
         break;
       }
 
@@ -5555,12 +5669,12 @@ uint8_t fillCellGrpCfg(CellGroupConfig_t *cellGrp)
       CU_ALLOC(cellGrpCfg.physicalCellGroupConfig, sizeof(PhysicalCellGroupConfig_t));
       if(!cellGrpCfg.physicalCellGroupConfig)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
         break;
       }
       if(BuildPhyCellGrpCfg(cellGrpCfg.physicalCellGroupConfig) != ROK)
       {
-        DU_LOG("\nF1AP : BuildPhyCellGrpCfg failed");
+        DU_LOG("\nERROR  -->  F1AP : BuildPhyCellGrpCfg failed");
         break;
       }
 
@@ -5568,12 +5682,12 @@ uint8_t fillCellGrpCfg(CellGroupConfig_t *cellGrp)
       CU_ALLOC(cellGrpCfg.spCellConfig, sizeof(SpCellConfig_t));
       if(!cellGrpCfg.spCellConfig)
       {
-        DU_LOG("\nF1AP : Memory allocation failure in BuildDuToCuRrcContainer");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failure in BuildDuToCuRrcContainer");
         break;
       }
       if(BuildSpCellCfg(cellGrpCfg.spCellConfig) != ROK)
       {
-        DU_LOG("\nF1AP : BuildSpCellCfg failed");
+        DU_LOG("\nERROR  -->  F1AP : BuildSpCellCfg failed");
         break;
       }
 
@@ -5589,16 +5703,16 @@ uint8_t fillCellGrpCfg(CellGroupConfig_t *cellGrp)
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG( "\n F1AP : Could not encode DuToCuRrcContainer (at %s)\n",\
+        DU_LOG( "\nERROR  -->  F1AP : Could not encode DuToCuRrcContainer (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\n F1AP : Created APER encoded buffer for DuToCuRrcContainer\n");
+        DU_LOG("\nDEBUG  -->  F1AP : Created APER encodedbuffer for DuToCuRrcContainer\n");
         for(int i=0; i< encBufSize; i++)
         {
-           printf("%x",encBuf[i]);
+           DU_LOG("%x",encBuf[i]);
         }
       }
 
@@ -5606,7 +5720,7 @@ uint8_t fillCellGrpCfg(CellGroupConfig_t *cellGrp)
       CU_ALLOC(cellGrp->buf, cellGrp->size);
       if(!cellGrp->buf)
       {
-        DU_LOG("\nF1AP : Memory allocation failed in BuildDuToCuRrcContainer");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDuToCuRrcContainer");
         break;
       }
       memcpy(cellGrp->buf, encBuf, cellGrp->size);
@@ -5741,7 +5855,7 @@ uint8_t fillFeatureSets(FeatureSets_t *featureSets)
    CU_ALLOC(featureSets->featureSetsDownlinkPerCC, sizeof(struct FeatureSets__featureSetsDownlinkPerCC));
    if(!featureSets->featureSetsDownlinkPerCC)
    {
-      DU_LOG("\nMemory allocation failed in fillFeatureSets");
+      DU_LOG("\nERROR  --> F1AP : Memory allocation failed in fillFeatureSets");
       return RFAILED;
    }
 
@@ -5751,7 +5865,7 @@ uint8_t fillFeatureSets(FeatureSets_t *featureSets)
    CU_ALLOC(featureSets->featureSetsDownlinkPerCC->list.array, featureSets->featureSetsDownlinkPerCC->list.size);
    if(!featureSets->featureSetsDownlinkPerCC->list.array)
    {
-      DU_LOG("\nMemory allocation failed in fillFeatureSets");
+      DU_LOG("\nERROR  --> F1AP : Memory allocation failed in fillFeatureSets");
       return RFAILED;
    }
 
@@ -5760,7 +5874,7 @@ uint8_t fillFeatureSets(FeatureSets_t *featureSets)
       CU_ALLOC(featureSets->featureSetsDownlinkPerCC->list.array[idx], sizeof(struct FeatureSetDownlinkPerCC));
       if(!featureSets->featureSetsDownlinkPerCC->list.array[idx])
       {
-        DU_LOG("\nMemory allocation failed in fillFeatureSets");
+        DU_LOG("\nERROR  --> F1AP : Memory allocation failed in fillFeatureSets");
         return RFAILED;
       }
    }
@@ -5775,7 +5889,7 @@ uint8_t fillFeatureSets(FeatureSets_t *featureSets)
    CU_ALLOC(featureSets->featureSetsDownlinkPerCC->list.array[idx]->supportedModulationOrderDL, sizeof(ModulationOrder_t));
    if(!featureSets->featureSetsDownlinkPerCC->list.array[idx]->supportedModulationOrderDL)
    {
-      DU_LOG("\nMemory allocation failed in fillFeatureSets");
+      DU_LOG("\nERROR  --> F1AP : Memory allocation failed in fillFeatureSets");
       return RFAILED;
    }
    *(featureSets->featureSetsDownlinkPerCC->list.array[idx]->supportedModulationOrderDL) = ModulationOrder_qam64;
@@ -5784,7 +5898,7 @@ uint8_t fillFeatureSets(FeatureSets_t *featureSets)
    CU_ALLOC(featureSets->featureSetsUplinkPerCC, sizeof(struct FeatureSets__featureSetsUplinkPerCC));
    if(!featureSets->featureSetsUplinkPerCC)
    {
-      DU_LOG("\nMemory allocation failed in fillFeatureSets");
+      DU_LOG("\nERROR  --> F1AP : Memory allocation failed in fillFeatureSets");
       return RFAILED;
    }
 
@@ -5794,7 +5908,7 @@ uint8_t fillFeatureSets(FeatureSets_t *featureSets)
    CU_ALLOC(featureSets->featureSetsUplinkPerCC->list.array, featureSets->featureSetsUplinkPerCC->list.size);
    if(!featureSets->featureSetsUplinkPerCC->list.array)
    {
-      DU_LOG("\nMemory allocation failed in fillFeatureSets");
+      DU_LOG("\nERROR  --> F1AP : Memory allocation failed in fillFeatureSets");
       return RFAILED;
    }
 
@@ -5803,7 +5917,7 @@ uint8_t fillFeatureSets(FeatureSets_t *featureSets)
       CU_ALLOC(featureSets->featureSetsUplinkPerCC->list.array[idx], sizeof(struct FeatureSetUplinkPerCC));
       if(!featureSets->featureSetsUplinkPerCC->list.array[idx])
       {
-         DU_LOG("\nMemory allocation failed in fillFeatureSets");
+         DU_LOG("\nERROR  --> F1AP : Memory allocation failed in fillFeatureSets");
          return RFAILED;
       }
    }
@@ -5819,7 +5933,7 @@ uint8_t fillFeatureSets(FeatureSets_t *featureSets)
    CU_ALLOC(featureSets->featureSetsUplinkPerCC->list.array[idx]->supportedModulationOrderUL, sizeof(ModulationOrder_t));
    if(!featureSets->featureSetsUplinkPerCC->list.array[idx]->supportedModulationOrderUL)
    {
-      DU_LOG("\nMemory allocation failed in fillFeatureSets");
+      DU_LOG("\nERROR  --> F1AP : Memory allocation failed in fillFeatureSets");
       return RFAILED;
    }
    *(featureSets->featureSetsUplinkPerCC->list.array[idx]->supportedModulationOrderUL) = ModulationOrder_qam16;
@@ -5889,7 +6003,7 @@ uint8_t fillUeCapRatCont(OCTET_STRING_t *ueCapRatContBuf)
       CU_ALLOC(ueNrCap.rf_Parameters.supportedBandListNR.list.array, ueNrCap.rf_Parameters.supportedBandListNR.list.size);
       if(!ueNrCap.rf_Parameters.supportedBandListNR.list.array)
       {
-         DU_LOG("\nMemory allocation failed in fillUeCapRatCont");
+         DU_LOG("\nERROR  --> F1AP : Memory allocation failed in fillUeCapRatCont");
          ret = RFAILED;
          break;
       }
@@ -5921,14 +6035,14 @@ uint8_t fillUeCapRatCont(OCTET_STRING_t *ueCapRatContBuf)
       CU_ALLOC(ueNrCap.featureSets, sizeof(struct FeatureSets));
       if(!ueNrCap.featureSets)
       {
-         DU_LOG("\nMemory allocation failed in fillUeCapRatCont");
+         DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in fillUeCapRatCont");
         ret = RFAILED;
         break;
       }
 
       if(fillFeatureSets(ueNrCap.featureSets) != ROK)
       {
-         DU_LOG("\nfillDLFeatureSets() failed ");
+         DU_LOG("\nERROR  -->  fillDLFeatureSets() failed ");
          ret = RFAILED;
          break;
       }
@@ -5946,16 +6060,16 @@ uint8_t fillUeCapRatCont(OCTET_STRING_t *ueCapRatContBuf)
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-         DU_LOG( "\n F1AP : Could not encode UE Capability RAT Container (at %s)\n",\
+         DU_LOG( "\nERROR  -->  F1AP : Could not encode UE Capability RAT Container (at %s)\n",\
             encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
          break;
       }
       else
       {
-         DU_LOG("\n F1AP : Created APER encoded buffer for UE Capability RAT Container\n");
+         DU_LOG("\nDEBUG  -->  F1AP : Created APER encodedbuffer for UE Capability RAT Container\n");
          for(int i=0; i< encBufSize; i++)
          {
-            printf("%x",encBuf[i]);
+            DU_LOG("%x",encBuf[i]);
          }
       }
 
@@ -5963,7 +6077,7 @@ uint8_t fillUeCapRatCont(OCTET_STRING_t *ueCapRatContBuf)
       CU_ALLOC(ueCapRatContBuf->buf, ueCapRatContBuf->size);
       if(!ueCapRatContBuf->buf)
       {
-         DU_LOG("\nF1AP : Memory allocation failed in fillUeCapabilityContainer");
+         DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in fillUeCapabilityContainer");
          break;
       }
       memcpy(ueCapRatContBuf->buf, encBuf, ueCapRatContBuf->size);
@@ -6006,7 +6120,7 @@ uint8_t fillUeCapRatContList(UE_CapabilityRAT_ContainerList_t *ueCapablityListBu
        CU_ALLOC(ueCapablityList.list.array, ueCapablityList.list.size);
        if(!ueCapablityList.list.array)
        {
-          DU_LOG("\nMemory allocation failed in fillUeCapRatContList");
+          DU_LOG("\nERROR  -->  Memory allocation failed in fillUeCapRatContList");
          ret = RFAILED;
          break;
        }
@@ -6016,7 +6130,7 @@ uint8_t fillUeCapRatContList(UE_CapabilityRAT_ContainerList_t *ueCapablityListBu
           CU_ALLOC(ueCapablityList.list.array[idx], sizeof(UE_CapabilityRAT_Container_t));
           if(ueCapablityList.list.array[idx] == NULLP)
           {
-            DU_LOG("\nMemory allocation failed in fillUeCapRatContList");
+            DU_LOG("\nERROR  -->  Memory allocation failed in fillUeCapRatContList");
              ret = RFAILED;
             break;
           }
@@ -6035,16 +6149,16 @@ uint8_t fillUeCapRatContList(UE_CapabilityRAT_ContainerList_t *ueCapablityListBu
        /* Encode results */
        if(encRetVal.encoded == ENCODE_FAIL)
        {
-          DU_LOG( "\n F1AP : Could not encode UE Capability RAT Container (at %s)\n",\
+          DU_LOG( "\nERROR  -->  F1AP : Could not encode UE Capability RAT Container (at %s)\n",\
              encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
           break;
        }
        else
        {
-          DU_LOG("\n F1AP : Created APER encoded buffer for UE Capability RAT Container\n");
+          DU_LOG("\nDEBUG  -->  F1AP : Created APER encodedbuffer for UE Capability RAT Container\n");
           for(int i=0; i< encBufSize; i++)
           {
-             printf("%x",encBuf[i]);
+             DU_LOG("%x",encBuf[i]);
           }
        }
     
@@ -6052,7 +6166,7 @@ uint8_t fillUeCapRatContList(UE_CapabilityRAT_ContainerList_t *ueCapablityListBu
        CU_ALLOC(ueCapablityListBuf->buf, ueCapablityListBuf->size);
        if(!ueCapablityListBuf->buf)
        {
-          DU_LOG("\nF1AP : Memory allocation failed in fillUeCapabilityContainer");
+          DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in fillUeCapabilityContainer");
           break;
        }
        memcpy(ueCapablityListBuf->buf, encBuf, ueCapablityListBuf->size);
@@ -6089,7 +6203,7 @@ uint8_t fillCuToDuContainer(CUtoDURRCInformation_t *rrcMsg)
    CU_ALLOC(rrcMsg->uE_CapabilityRAT_ContainerList, sizeof(UE_CapabilityRAT_ContainerList_t));
    if(!rrcMsg->uE_CapabilityRAT_ContainerList)
    {
-      DU_LOG(" F1AP : Memory allocation for CUtoDURRCInformation_ExtIEs failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for CUtoDURRCInformation_ExtIEs failed");
       return RFAILED;
    }
    ret = fillUeCapRatContList(rrcMsg->uE_CapabilityRAT_ContainerList);
@@ -6106,7 +6220,7 @@ uint8_t fillCuToDuContainer(CUtoDURRCInformation_t *rrcMsg)
 
       if(rrcMsg->iE_Extensions->list.array == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for CUtoDURRCInformation_ExtIEs failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for CUtoDURRCInformation_ExtIEs failed");
         ret = RFAILED;
       }
 
@@ -6175,7 +6289,7 @@ void FreeCuToDuInfo(CUtoDURRCInformation_t *rrcMsg)
                     }
                     break;
                  default:
-                    DU_LOG("\nF1AP:Invalid Event type %ld at FreeCuToDuInfo()", \
+                    DU_LOG("\nERROR  -->  F1AP : Invalid Event type %ld at FreeCuToDuInfo()", \
                           rrcMsg->iE_Extensions->list.array[idx]->id);
                     break;
               }
@@ -6227,12 +6341,12 @@ uint8_t BuildAndSendUeContextSetupReq(uint8_t cuUeF1apId, uint8_t duUeF1apId, \
    uint8_t ret1;
    while(true)
    {
-      DU_LOG("\n F1AP : Building UE Context Setup Request\n");
+      DU_LOG("\nINFO  -->  F1AP : Building UE Context Setup Request\n");
 
       CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
 
@@ -6240,7 +6354,7 @@ uint8_t BuildAndSendUeContextSetupReq(uint8_t cuUeF1apId, uint8_t duUeF1apId, \
       CU_ALLOC(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
       if(f1apMsg->choice.initiatingMessage == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for  F1AP-PDU failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for     F1AP-PDU failed");
         break;
       }
 
@@ -6262,7 +6376,7 @@ uint8_t BuildAndSendUeContextSetupReq(uint8_t cuUeF1apId, uint8_t duUeF1apId, \
 
       if(ueSetReq->protocolIEs.list.array == NULLP)
       {
-        DU_LOG(" F1AP : Memory allocation for UE Context SetupRequest failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for UE Context SetupRequest failed");
         break;
       }
 
@@ -6388,7 +6502,7 @@ uint8_t BuildAndSendUeContextSetupReq(uint8_t cuUeF1apId, uint8_t duUeF1apId, \
            ueSetReq->protocolIEs.list.array[idx]->value.choice.RRCContainer.size);
       if(!ueSetReq->protocolIEs.list.array[idx]->value.choice.RRCContainer.buf)
       {
-        DU_LOG(" F1AP : Memory allocation for BuildAndSendUeContextSetupReq failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for BuildAndSendUeContextSetupReq failed");
         break;
       }
       memset(ueSetReq->protocolIEs.list.array[idx]->value.choice.RRCContainer.buf, 0, bufLen);
@@ -6418,7 +6532,7 @@ uint8_t BuildAndSendUeContextSetupReq(uint8_t cuUeF1apId, uint8_t duUeF1apId, \
            ueSetReq->protocolIEs.list.array[idx]->value.choice.BitRate.size);
       if(!ueSetReq->protocolIEs.list.array[idx]->value.choice.BitRate.buf)
       {
-        DU_LOG(" F1AP : Failed to allocate memory for Bit Rate in BuildAndSendUeContextSetupReq()");
+        DU_LOG("\nERROR  -->  F1AP : Failed to allocate memory for Bit Rate in BuildAndSendUeContextSetupReq()");
         break;
       }
       memset(ueSetReq->protocolIEs.list.array[idx]->value.choice.BitRate.buf, 0, bufLen);
@@ -6434,23 +6548,23 @@ uint8_t BuildAndSendUeContextSetupReq(uint8_t cuUeF1apId, uint8_t duUeF1apId, \
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG( "\n F1AP : Could not encode UE Context Setup Request structure (at %s)\n",\
+        DU_LOG( "\nERROR  -->  F1AP : Could not encode UE Context Setup Request structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\n F1AP : Created APER encoded buffer for UE Context Setup Request\n");
+        DU_LOG("\nDEBUG  -->  F1AP : Created APER encodedbuffer for UE Context Setup Request\n");
         for(int i=0; i< encBufSize; i++)
         {
-           printf("%x",encBuf[i]);
+           DU_LOG("%x",encBuf[i]);
         }
       }
 
       /* Sending  msg  */
       if(SendF1APMsg(CU_APP_MEM_REG,CU_POOL)   !=      ROK)
       {
-        DU_LOG("\n F1AP : Sending UE Context Setup Request Failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending UE Context Setup Request Failed");
         break;
       }
       ret = ROK;
@@ -6461,6 +6575,27 @@ uint8_t BuildAndSendUeContextSetupReq(uint8_t cuUeF1apId, uint8_t duUeF1apId, \
    return ret;
 }/* End of BuildAndSendUeContextSetupReq*/
 
+
+uint8_t procUeContextSetupResponse(F1AP_PDU_t *f1apMsg)
+{
+   uint8_t idx, duUeF1apId;
+   UEContextSetupResponse_t *ueCtxtSetupRsp;
+   ueCtxtSetupRsp = &f1apMsg->choice.successfulOutcome->value.choice.UEContextSetupResponse;
+   
+   for(idx=0; idx < ueCtxtSetupRsp->protocolIEs.list.count; idx++)
+   {
+      switch(ueCtxtSetupRsp->protocolIEs.list.array[idx]->id)
+      {
+          case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
+             {
+                duUeF1apId = ueCtxtSetupRsp->protocolIEs.list.array[idx]->value.choice.GNB_DU_UE_F1AP_ID;
+                break;
+             }
+      }
+   }
+   ueCb[duUeF1apId-1].f1apMsgDb.dlRrcMsgCount++; /* keeping DL RRC Msg Count */
+}
+
 /****************************************************************
  * @brief Function to process Ul Rrc Msg received from DU 
  *
@@ -6511,7 +6646,7 @@ uint8_t procUlRrcMsg(F1AP_PDU_t *f1apMsg)
               CU_ALLOC(rrcContainer, rrcContLen)
                  if(!rrcContainer)
                  {
-                    DU_LOG("\nCU_STUB: Failed to allocated memory in procUlRrcMsg");
+                    DU_LOG("\nERROR  -->  F1AP : Failed to allocated memory in procUlRrcMsg");
                     return RFAILED;
                  }
               memcpy(rrcContainer, ulRrcMsg->protocolIEs.list.array[idx]->value.choice.RRCContainer.buf,\
@@ -6520,35 +6655,40 @@ uint8_t procUlRrcMsg(F1AP_PDU_t *f1apMsg)
            }
 
         default:
-           DU_LOG("\n Invalid Event %ld", ulRrcMsg->protocolIEs.list.array[idx]->id);
+           DU_LOG("\nERROR  -->  F1AP : Invalid Event %ld", ulRrcMsg->protocolIEs.list.array[idx]->id);
            break;
       }
    }
    if(srbId == 1)
    {
-      f1apMsgDb.dlRrcMsgCount++;
-      rrcMsgType = setDlRRCMsgType();
+      ueCb[duUeF1apId-1].f1apMsgDb.dlRrcMsgCount++;
+      rrcMsgType = setDlRRCMsgType(duUeF1apId);
       if(rrcMsgType == REGISTRATION_ACCEPT)
       {
-        DU_LOG("\nF1AP: Sending DL RRC MSG for RRC Registration Accept"); 
-        ret = BuildAndSendDLRRCMessageTransfer(srbId, rrcMsgType);
+         DU_LOG("\nINFO  -->  F1AP: Sending DL RRC MSG for RRC Registration Accept"); 
+         ret = BuildAndSendDLRRCMessageTransfer(duUeF1apId, srbId, rrcMsgType);
       }
       if(rrcMsgType == UE_CONTEXT_SETUP_REQ)
       {
-        DU_LOG("\nF1AP: Sending Ue Context Setup Req"); 
+        DU_LOG("\nINFO  -->  F1AP: Sending Ue Context Setup Req"); 
         ret = BuildAndSendUeContextSetupReq(cuUeF1apId, duUeF1apId,\
               rrcContLen, rrcContainer);
       }
       if(rrcMsgType == SECURITY_MODE_COMPLETE)
       {
-        /* To trigger the DL RRC Msg for RRC Reconfig */
-        f1apMsgDb.dlRrcMsgCount++;
-        rrcMsgType = setDlRRCMsgType();
-        if(rrcMsgType == RRC_RECONFIG)
-        {
-           DU_LOG("\nF1AP: Sending DL RRC MSG for RRC Reconfig");
-           BuildAndSendDLRRCMessageTransfer(srbId, rrcMsgType);
-        }
+         /* To trigger the DL RRC Msg for RRC Reconfig */
+         ueCb[duUeF1apId-1].f1apMsgDb.dlRrcMsgCount++;
+         rrcMsgType = setDlRRCMsgType(duUeF1apId);
+         if(rrcMsgType == RRC_RECONFIG)
+         {
+            DU_LOG("\nINFO  -->  F1AP: Sending DL RRC MSG for RRC Reconfig");
+            BuildAndSendDLRRCMessageTransfer(duUeF1apId, srbId, rrcMsgType);
+         }
+      }
+      if(rrcMsgType == UE_CONTEXT_MOD_REQ)
+      {
+         DU_LOG("\nINFO  -->  F1AP: Sending UE Context Modification Request");
+         BuildAndSendUeContextModificationReq(duUeF1apId);
       }
    }
    return ret;
@@ -6621,14 +6761,14 @@ uint8_t BuildAndSendF1ResetAck()
    F1AP_PDU_t             *f1apMsg = NULL;
    ResetAcknowledge_t     *f1ResetAck = NULLP;
    asn_enc_rval_t         encRetVal;
-   DU_LOG("\nF1AP : Building F1 Reset Acknowledgment \n");
+   DU_LOG("\nINFO  -->  F1AP : Building F1 Reset Acknowledgment \n");
 
    do{
       /* Allocate the memory for F1ResetRequest_t */
       CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
 
@@ -6637,7 +6777,7 @@ uint8_t BuildAndSendF1ResetAck()
       CU_ALLOC(f1apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcome_t));
       if(f1apMsg->choice.successfulOutcome == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed");
         break;
       }
 
@@ -6654,7 +6794,7 @@ uint8_t BuildAndSendF1ResetAck()
       CU_ALLOC(f1ResetAck->protocolIEs.list.array, f1ResetAck->protocolIEs.list.size ); 
       if(f1ResetAck->protocolIEs.list.array == NULLP) 
       {
-        DU_LOG("\nF1AP : Memory allocation for F1ResetAckIEs failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1ResetAckIEs failed");
         break;
       }
 
@@ -6683,22 +6823,22 @@ uint8_t BuildAndSendF1ResetAck()
       /* Check encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG("\nF1AP : Could not encode F1ResetAck structure (at %s)\n",\
+        DU_LOG("\nERROR  -->  F1AP : Could not encode F1ResetAck structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\nF1AP : Created APER encoded buffer for F1ResetAck \n");
+        DU_LOG("\nDEBUG  -->  F1AP : Created APER encodedbuffer for F1ResetAck \n");
         for(int i=0; i< encBufSize; i++)
         {
-           printf("%x",encBuf[i]);
+           DU_LOG("%x",encBuf[i]);
         }
       }
       /* Sending msg */
       if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
       {
-        DU_LOG("\nF1AP : Sending F1 Reset Response failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending F1 Reset Response failed");
         break;
       }
 
@@ -6769,7 +6909,7 @@ uint8_t BuildUlTnlInfoforDrb2(ULUPTNLInformation_ToBeSetup_List_t *ulInfo)
    CU_ALLOC(ulInfo->list.array,ulInfo->list.size);
    if(ulInfo->list.array == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
       return RFAILED;
    }
    for(arrIdx=0; arrIdx<ulCnt; arrIdx++)
@@ -6777,7 +6917,7 @@ uint8_t BuildUlTnlInfoforDrb2(ULUPTNLInformation_ToBeSetup_List_t *ulInfo)
       CU_ALLOC(ulInfo->list.array[arrIdx],sizeof(ULUPTNLInformation_ToBeSetup_Item_t));
       if(ulInfo->list.array[arrIdx] == NULLP)
       {
-         DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+         DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
         return RFAILED;
       }
    }
@@ -6791,7 +6931,7 @@ uint8_t BuildUlTnlInfoforDrb2(ULUPTNLInformation_ToBeSetup_List_t *ulInfo)
         sizeof(GTPTunnel_t));
    if(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
       return RFAILED;
    }
    ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
@@ -6802,7 +6942,7 @@ uint8_t BuildUlTnlInfoforDrb2(ULUPTNLInformation_ToBeSetup_List_t *ulInfo)
    if(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
         transportLayerAddress.buf == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
       return RFAILED;
    }
    
@@ -6826,17 +6966,17 @@ uint8_t BuildUlTnlInfoforDrb2(ULUPTNLInformation_ToBeSetup_List_t *ulInfo)
    if(ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->gTP_TEID.buf\
         == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildUlTnlInfoforDrb2");
       return RFAILED;
    }
    ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
-      gTP_TEID.buf[0] = 11;
+      gTP_TEID.buf[0] = 0;
    ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
       gTP_TEID.buf[1] = 0;
    ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
       gTP_TEID.buf[2] = 0;
    ulInfo->list.array[arrIdx]->uLUPTNLInformation.choice.gTPTunnel->\
-      gTP_TEID.buf[3] = 1;
+      gTP_TEID.buf[3] = cuCfgParams.egtpParams.currTunnelId++;
 
    return ROK;
 }/*End of BuildULTnlInfo*/
@@ -6961,7 +7101,7 @@ uint8_t FillDrb2Item(DRBs_ToBeSetupMod_Item_t *drbItem)
         CU_ALLOC(drbItem->qoSInformation.choice.eUTRANQoS, sizeof(EUTRANQoS_t));
         if(drbItem->qoSInformation.choice.eUTRANQoS)
         {  
-           DU_LOG("\nF1AP : Memory allocation failed in FillDrb2Item");
+           DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in FillDrb2Item");
            return RFAILED;
         }
         drbItem->qoSInformation.choice.eUTRANQoS->qCI = QCI;
@@ -6981,7 +7121,7 @@ uint8_t FillDrb2Item(DRBs_ToBeSetupMod_Item_t *drbItem)
         CU_ALLOC(drbItem->qoSInformation.choice.choice_extension,sizeof(QoSInformation_ExtIEs_t));
         if(drbItem->qoSInformation.choice.choice_extension == NULLP)
         {
-           DU_LOG("\nF1AP : Memory allocation failed in FillDrb2Item"); 
+           DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in FillDrb2Item"); 
            return RFAILED;
         }
 
@@ -6991,7 +7131,7 @@ uint8_t FillDrb2Item(DRBs_ToBeSetupMod_Item_t *drbItem)
         ret =  BuildQOSInfo(&drbItem->qoSInformation.choice.choice_extension->value.choice.DRB_Information.dRB_QoS);
         if(ret != ROK)
         {
-           DU_LOG("\nF1AP : BuildQOSInfo failed");
+           DU_LOG("\nERROR  -->  F1AP : BuildQOSInfo failed");
            return RFAILED;
         }
         
@@ -7000,7 +7140,7 @@ uint8_t FillDrb2Item(DRBs_ToBeSetupMod_Item_t *drbItem)
               choice_extension->value.choice.DRB_Information.sNSSAI);
         if(ret != ROK)
         {
-           DU_LOG("\nF1AP : BuildSNSSAI failed");
+           DU_LOG("\nERROR  -->  F1AP : BuildSNSSAI failed");
            return RFAILED;
         }
         
@@ -7009,7 +7149,7 @@ uint8_t FillDrb2Item(DRBs_ToBeSetupMod_Item_t *drbItem)
               choice_extension->value.choice.DRB_Information.flows_Mapped_To_DRB_List);
         if(ret != ROK)
         {
-           DU_LOG("\nF1AP : BuildFlowsMap failed");
+           DU_LOG("\nERROR  -->  F1AP : BuildFlowsMap failed");
            return RFAILED;
         }
       }
@@ -7019,7 +7159,7 @@ uint8_t FillDrb2Item(DRBs_ToBeSetupMod_Item_t *drbItem)
    ret = BuildUlTnlInfoforDrb2(&drbItem->uLUPTNLInformation_ToBeSetup_List);
    if(ret != ROK)
    {
-      DU_LOG("\nF1AP : BuildUlTnlInfoforDrb2 failed");
+      DU_LOG("\nERROR  -->  F1AP : BuildUlTnlInfoforDrb2 failed");
       return RFAILED;
    }
 
@@ -7030,7 +7170,7 @@ uint8_t FillDrb2Item(DRBs_ToBeSetupMod_Item_t *drbItem)
    CU_ALLOC(drbItem->uLConfiguration,sizeof(ULConfiguration_t));
    if(drbItem->uLConfiguration == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in FillDrb2Item");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in FillDrb2Item");
       return RFAILED;
    }
    drbItem->uLConfiguration->uLUEConfiguration = ULUEConfiguration_no_data;
@@ -7061,7 +7201,7 @@ uint8_t FillDrbItemList(struct DRBs_ToBeSetupMod_ItemIEs *drbItemIe)
 
    if(FillDrb2Item(&(drbItemIe->value.choice.DRBs_ToBeSetupMod_Item)) != ROK)
    {
-      DU_LOG("\nF1AP : FillDrb2Item failed"); 
+      DU_LOG("\nERROR  -->  F1AP : FillDrb2Item failed"); 
       return RFAILED;
    }
    return ROK;
@@ -7095,7 +7235,7 @@ void FreeDrbToBeSetupModList(DRBs_ToBeSetupMod_List_t *drbSet)
         {
            if(arrIdx == 0)
            {
-              drbItemIe =drbSet->list.array[arrIdx];
+              drbItemIe = (DRBs_ToBeSetupMod_ItemIEs_t *)drbSet->list.array[arrIdx];
               FreeDrb2Item(&(drbItemIe->value.choice.DRBs_ToBeSetupMod_Item));
            }
            CU_FREE(drbSet->list.array[arrIdx], sizeof(DRBs_ToBeSetupMod_ItemIEs_t));
@@ -7136,7 +7276,7 @@ uint8_t BuildDrbToBeSetupModList(DRBs_ToBeSetupMod_List_t *drbSet)
    CU_ALLOC(drbSet->list.array, drbSet->list.size);
    if(drbSet->list.array == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation failed in BuildDrbToBeSetupModList");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDrbToBeSetupModList");
       return  RFAILED;
    }
    for(arrIdx=0; arrIdx<drbCnt; arrIdx++)
@@ -7144,16 +7284,16 @@ uint8_t BuildDrbToBeSetupModList(DRBs_ToBeSetupMod_List_t *drbSet)
       CU_ALLOC(drbSet->list.array[arrIdx], sizeof(DRBs_ToBeSetupMod_ItemIEs_t));
       if(drbSet->list.array[arrIdx] == NULLP)
       {
-         DU_LOG("\nF1AP : Memory allocation failed in BuildDrbToBeSetupModList");
+         DU_LOG("\nERROR  -->  F1AP : Memory allocation failed in BuildDrbToBeSetupModList");
         return  RFAILED;
       }
    }
 
    arrIdx=0;
-   ret = FillDrbItemList(drbSet->list.array[arrIdx]);
+   ret = FillDrbItemList((DRBs_ToBeSetupMod_ItemIEs_t *)drbSet->list.array[arrIdx]);
    if(ret != ROK)
    {
-      DU_LOG("\nF1AP : FillDrbItemList failed");
+      DU_LOG("\nERROR  -->  F1AP : FillDrbItemList failed");
    }
 
    return ret;
@@ -7176,10 +7316,8 @@ uint8_t BuildDrbToBeSetupModList(DRBs_ToBeSetupMod_List_t *drbSet)
 * ****************************************************************/
 void FreeUeContextModicationRequest(F1AP_PDU_t *f1apMsg)
 {
-   uint8_t arrIdx =0 , ieId=0, drbIe=0, arrIdx1;
+   uint8_t arrIdx =0 , ieId=0
    UEContextModificationRequest_t *UeContextModifyReq = NULLP;
-   DRBs_ToBeSetupMod_List_t *drbSet;
-   DRBs_ToBeSetupMod_ItemIEs_t *drbItemIe = NULLP;
 
    if(f1apMsg)
    {
@@ -7232,7 +7370,7 @@ void FreeUeContextModicationRequest(F1AP_PDU_t *f1apMsg)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t BuildAndSendUeContextModificationReq()
+uint8_t BuildAndSendUeContextModificationReq(uint8_t ueId)
 {
    uint8_t    ieIdx = 0;
    uint8_t    elementCnt = 0;
@@ -7241,14 +7379,14 @@ uint8_t BuildAndSendUeContextModificationReq()
    UEContextModificationRequest_t *ueContextModifyReq = NULLP;
 
    asn_enc_rval_t         encRetVal;
-   DU_LOG("\nF1AP : Building Ue context modification request\n");
+   DU_LOG("\nINFO  -->  F1AP : Building Ue context modification request\n");
 
    while(1)
    {
       CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
       if(f1apMsg == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed Ue context modification");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed Ue context modification");
         break;
       }
 
@@ -7257,7 +7395,7 @@ uint8_t BuildAndSendUeContextModificationReq()
       CU_ALLOC(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
       if(f1apMsg->choice.initiatingMessage == NULLP)
       {
-        DU_LOG("\nF1AP : Memory allocation for F1AP-PDU failed Ue context modification");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for F1AP-PDU failed Ue context modification");
         break;
       }
       f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_UEContextModification;
@@ -7274,7 +7412,7 @@ uint8_t BuildAndSendUeContextModificationReq()
       CU_ALLOC(ueContextModifyReq->protocolIEs.list.array, ueContextModifyReq->protocolIEs.list.size);
       if(ueContextModifyReq->protocolIEs.list.array == NULLP)
       { 
-        DU_LOG("\nF1AP : Memory allocation for UE context modifcation Request failed");
+        DU_LOG("\nERROR  -->  F1AP : Memory allocation for UE context modifcation Request failed");
         break;
       }
 
@@ -7283,7 +7421,7 @@ uint8_t BuildAndSendUeContextModificationReq()
         CU_ALLOC(ueContextModifyReq->protocolIEs.list.array[ieIdx], sizeof(UEContextModificationRequest_t));
         if(ueContextModifyReq->protocolIEs.list.array[ieIdx] == NULLP)
         {
-           DU_LOG("\nF1AP : Memory allocation for UE context modifcation Request failed");
+           DU_LOG("\nERROR  -->  F1AP : Memory allocation for UE context modifcation Request failed");
            break;
         }
       }
@@ -7293,16 +7431,16 @@ uint8_t BuildAndSendUeContextModificationReq()
       ueContextModifyReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
       ueContextModifyReq->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
       ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.present = \
-      UEContextModificationRequestIEs__value_PR_GNB_CU_UE_F1AP_ID;
-      ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID =CU_ID;
+                                                                         UEContextModificationRequestIEs__value_PR_GNB_CU_UE_F1AP_ID;
+      ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID = ueId;
 
       ieIdx++;
       ueContextModifyReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
       ueContextModifyReq->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
       ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.present=\
-      UEContextModificationRequestIEs__value_PR_GNB_DU_UE_F1AP_ID;
-      ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID =DU_ID;
-     
+                                                                       UEContextModificationRequestIEs__value_PR_GNB_DU_UE_F1AP_ID;
+      ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID = ueId;
+
       ieIdx++;
       ueContextModifyReq->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_DRBs_ToBeSetupMod_List;
       ueContextModifyReq->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
@@ -7325,22 +7463,22 @@ uint8_t BuildAndSendUeContextModificationReq()
       /* Encode results */
       if(encRetVal.encoded == ENCODE_FAIL)
       {
-        DU_LOG("\nF1AP : Could not encode ueContextModifyReq structure (at %s)\n",\
+        DU_LOG("\nERROR  -->  F1AP : Could not encode ueContextModifyReq structure (at %s)\n",\
               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
         break;
       }
       else
       {
-        DU_LOG("\nF1AP : Created APER encoded buffer for ueContextModifyReq\n");
+        DU_LOG("\nDEBUG  -->  F1AP : Created APER encodedbuffer for ueContextModifyReq\n");
         for(ieIdx=0; ieIdx< encBufSize; ieIdx++)
         {
-           printf("%x",encBuf[ieIdx]);
+           DU_LOG("%x",encBuf[ieIdx]);
         }
       }
 
       if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
       {
-        DU_LOG("\nF1AP : Sending Ue context modification request  failed");
+        DU_LOG("\nERROR  -->  F1AP : Sending Ue context modification request  failed");
         break;
       }
 
@@ -7349,6 +7487,314 @@ uint8_t BuildAndSendUeContextModificationReq()
 
    }
    FreeUeContextModicationRequest(f1apMsg);
+   return ret;
+}
+/*****************************************************************i
+*
+* @brief Free memory allocated for UE Context Release Command  
+*
+* @details
+*
+*    Function : FreeUeContextReleaseCommand
+*
+*    Functionality:
+*         - Free memory allocated for UE Context Release Command 
+*
+* @params[in] F1AP_PDU_t *f1apMsg
+* @return void
+*
+* *************************************************************/
+void FreeUeContextReleaseCommand(F1AP_PDU_t *f1apMsg)
+{
+   uint8_t ieIdx;
+   UEContextReleaseCommand_t *ueReleaseCommand = NULLP;
+
+   if(f1apMsg)
+   {
+      if(f1apMsg->choice.initiatingMessage)
+      {
+         ueReleaseCommand =&f1apMsg->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
+         if(ueReleaseCommand->protocolIEs.list.array)
+         {
+            for(ieIdx=0 ; ieIdx<ueReleaseCommand->protocolIEs.list.count; ieIdx++)
+            {
+               CU_FREE(ueReleaseCommand->protocolIEs.list.array[ieIdx], sizeof(UEContextReleaseCommand_t));
+            }
+            CU_FREE(ueReleaseCommand->protocolIEs.list.array, ueReleaseCommand->protocolIEs.list.size);
+         }
+         CU_FREE(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
+      }
+      CU_FREE(f1apMsg, sizeof(F1AP_PDU_t));
+   }
+}
+/*******************************************************************
+ *
+ * @brief Builds the Ue Context Release Command 
+ *
+ * @details
+*
+*    Function : BuildAndSendUeContextReleaseCommand
+*
+*    Functionality: Constructs the Ue Context Release Command 
+*
+* @params[in]
+*
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+uint8_t BuildAndSendUeContextReleaseCommand(uint8_t cuUeF1apId, uint8_t duUeF1apId)
+{
+   bool       memAllocFailed = false;
+   uint8_t    ieIdx = 0,elementCnt = 0, ret = RFAILED, bufLen=0;
+   F1AP_PDU_t *f1apMsg = NULLP;
+   UEContextReleaseCommand_t *ueContextReleaseCommand = NULLP;
+
+   asn_enc_rval_t         encRetVal;
+   DU_LOG("\nINFO  -->  F1AP : Building Ue context release command\n");
+
+   while(true)
+   {
+      CU_ALLOC(f1apMsg, sizeof(F1AP_PDU_t));
+      if(f1apMsg == NULLP)
+      {
+         DU_LOG("\nERROR  -->  F1AP : BuildAndSendUeContextReleaseCommand(): Memory allocation for F1AP-PDU");
+         break;
+      }
+
+      f1apMsg->present =  F1AP_PDU_PR_initiatingMessage;
+
+      CU_ALLOC(f1apMsg->choice.initiatingMessage, sizeof(InitiatingMessage_t));
+      if(f1apMsg->choice.initiatingMessage == NULLP)
+      {
+         DU_LOG("\nERROR  -->  F1AP : BuildAndSendUeContextReleaseCommand(): Memory allocation for F1AP-PDU failed ");
+         break;
+      }
+      f1apMsg->choice.initiatingMessage->procedureCode = ProcedureCode_id_UEContextRelease;
+      f1apMsg->choice.initiatingMessage->criticality = Criticality_reject;
+      f1apMsg->choice.initiatingMessage->value.present = InitiatingMessage__value_PR_UEContextReleaseCommand;
+
+      ueContextReleaseCommand =&f1apMsg->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
+
+      elementCnt = 4;
+      ueContextReleaseCommand->protocolIEs.list.count = elementCnt;
+      ueContextReleaseCommand->protocolIEs.list.size = elementCnt*sizeof(UEContextReleaseCommand_t*);
+
+      /* Initialize the UE context modification members */
+      CU_ALLOC(ueContextReleaseCommand->protocolIEs.list.array, ueContextReleaseCommand->protocolIEs.list.size);
+      if(ueContextReleaseCommand->protocolIEs.list.array == NULLP)
+      {
+         DU_LOG("\nERROR  -->  F1AP : BuildAndSendUeContextReleaseCommand():Memory allocation failed");
+         break;
+      }
+
+      for(ieIdx=0 ; ieIdx<elementCnt; ieIdx++)
+      {
+         CU_ALLOC(ueContextReleaseCommand->protocolIEs.list.array[ieIdx], sizeof(UEContextReleaseCommand_t));
+         if(ueContextReleaseCommand->protocolIEs.list.array[ieIdx] == NULLP)
+         {
+            DU_LOG("\nERROR  -->  F1AP : BuildAndSendUeContextReleaseCommand(): Memory allocation failed ");
+            memAllocFailed = true;  
+            break;
+         }
+      }
+      
+      if(memAllocFailed == true)
+      {
+         break;
+      }
+      ieIdx=0;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.present = \
+      UEContextReleaseCommandIEs__value_PR_GNB_CU_UE_F1AP_ID;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID =cuUeF1apId;
+
+      ieIdx++;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->criticality = Criticality_reject;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.present=\
+      UEContextReleaseCommandIEs__value_PR_GNB_DU_UE_F1AP_ID;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID =duUeF1apId;
+
+      ieIdx++;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_Cause;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->criticality = Criticality_ignore;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.present=\
+      UEContextReleaseCommandIEs__value_PR_Cause;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.Cause.present = Cause_PR_radioNetwork;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.Cause.choice.radioNetwork=\
+      CauseRadioNetwork_normal_release;
+     
+      /* RRC Container for RRC release */
+      ieIdx++;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->id = ProtocolIE_ID_id_RRCContainer;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->criticality = Criticality_ignore;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.present = \
+      UEContextReleaseCommandIEs__value_PR_RRCContainer;
+      char secModeBuf[7]={ 0x00, 0x05, 0x13, 0x00, 0x00, 0x00, 0x00};
+      bufLen =7;
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size = bufLen;
+      CU_ALLOC(ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf,
+      ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.size);
+      if(!ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf)
+      {
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation for BuildAndSendUeContextSetupReq failed");
+      break;
+      }
+      memset(ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf, 0, bufLen);
+      memcpy(ueContextReleaseCommand->protocolIEs.list.array[ieIdx]->value.choice.RRCContainer.buf, secModeBuf, bufLen);
+      
+      xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
+
+      /* Encode the UE Context Release Command type as APER */
+      memset(encBuf, 0, ENC_BUF_MAX_LEN);
+      encBufSize = 0;
+      encRetVal = aper_encode(&asn_DEF_F1AP_PDU, 0, f1apMsg, PrepFinalEncBuf,\
+            encBuf);
+
+      /* Encode results */
+      if(encRetVal.encoded == ENCODE_FAIL)
+      {
+         DU_LOG("\nERROR  -->  F1AP : Could not encode Release Command structure (at %s)\n",\
+               encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
+         break;
+      }
+      else
+      {
+         DU_LOG("\nDEBUG  -->  F1AP : Created APER encoded buffer for Ue Context Release Command\n");
+         for(ieIdx=0; ieIdx< encBufSize; ieIdx++)
+         {
+            DU_LOG("%x",encBuf[ieIdx]);
+         }
+      }
+
+      if(SendF1APMsg(CU_APP_MEM_REG, CU_POOL) != ROK)
+      {
+         DU_LOG("\nERROR  -->  F1AP : Sending Ue context Release Command failed");
+         break;
+      }
+
+      ret = ROK;
+      break;
+
+   }
+   FreeUeContextReleaseCommand(f1apMsg);
+   return ret;
+}
+/*******************************************************************
+*
+* @brief process Ue context release request 
+*
+* @details
+*
+*    Function : procUeContextReleaseReq 
+*
+*    Functionality:
+*         - process Ue context release request 
+*
+* @params[in] F1AP_PDU_t *f1apMsg
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+uint8_t procUeContextReleaseReq(F1AP_PDU_t *f1apMsg) 
+{
+   uint8_t ieIdx=0, duUeF1apId=0,cuUeF1apId=0;
+
+   UEContextReleaseRequest_t *ueReleaseReq = NULLP;
+   ueReleaseReq = &f1apMsg->choice.initiatingMessage->value.choice.UEContextReleaseRequest;
+   
+   for(ieIdx=0; ieIdx < ueReleaseReq->protocolIEs.list.count; ieIdx++)
+   {
+      switch(ueReleaseReq->protocolIEs.list.array[ieIdx]->id)
+      {
+         case ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID:
+            {
+               cuUeF1apId = ueReleaseReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_CU_UE_F1AP_ID;
+               break;
+            }
+         case ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID:
+            {
+               duUeF1apId = ueReleaseReq->protocolIEs.list.array[ieIdx]->value.choice.GNB_DU_UE_F1AP_ID;
+               break;
+            }
+         default:
+              break;
+      }
+   }
+   if(BuildAndSendUeContextReleaseCommand(cuUeF1apId, duUeF1apId) != ROK)
+   {
+      DU_LOG("\nERROR  -->  F1AP : procUeContextReleaseReq(): Failed to build Ue Context Release Command ");
+      return RFAILED;
+   }
+   return ROK;
+}
+/*******************************************************************
+*
+* @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;
 }
 /*******************************************************************
@@ -7378,7 +7824,7 @@ void F1APMsgHdlr(Buffer *mBuf)
    asn_dec_rval_t rval; /* Decoder return value */
    F1AP_PDU_t f1apasnmsg ;
 
-   DU_LOG("\nF1AP : Received F1AP message buffer");
+   DU_LOG("\nINFO  -->  F1AP : Received F1AP message buffer");
    ODU_PRINT_MSG(mBuf, 0,0);
 
    /* Copy mBuf into char array to decode it */
@@ -7387,19 +7833,19 @@ void F1APMsgHdlr(Buffer *mBuf)
 
    if(recvBuf == NULLP)
    {
-      DU_LOG("\nF1AP : Memory allocation failed");
+      DU_LOG("\nERROR  -->  F1AP : Memory allocation failed");
       return;
    }
    if(ODU_COPY_MSG_TO_FIX_BUF(mBuf, 0, recvBufLen, (Data *)recvBuf, &copyCnt) != ROK)
    {
-      DU_LOG("\nF1AP : Failed while copying %d", copyCnt);
+      DU_LOG("\nERROR  -->  F1AP : Failed while copying %d", copyCnt);
       return;
    }
 
-   printf("\nF1AP : Received flat buffer to be decoded : ");
+   DU_LOG("\nDEBUG  -->  F1AP : Received flat buffer to be decoded : ");
    for(i=0; i< recvBufLen; i++)
    {
-      printf("%x",recvBuf[i]);
+      DU_LOG("%x",recvBuf[i]);
    }
 
    /* Decoding flat buffer into F1AP messsage */
@@ -7411,96 +7857,111 @@ void F1APMsgHdlr(Buffer *mBuf)
 
    if(rval.code == RC_FAIL || rval.code == RC_WMORE)
    {
-      DU_LOG("\nF1AP : ASN decode failed");
+      DU_LOG("\nERROR  -->  F1AP : ASN decode failed");
       return;
    }
-   printf("\n");
+   DU_LOG("\n");
    xer_fprint(stdout, &asn_DEF_F1AP_PDU, f1apMsg);
 
    switch(f1apMsg->present)
    {
       case F1AP_PDU_PR_initiatingMessage:
-        {
-           switch(f1apMsg->choice.initiatingMessage->value.present)
-           {
-              case InitiatingMessage__value_PR_Reset:
-                 {
-                    DU_LOG("\nF1AP : F1 reset request received ");
-                    BuildAndSendF1ResetAck();
-                    break;
-                 }
-
-              case InitiatingMessage__value_PR_F1SetupRequest:
-                 {
-                    DU_LOG("\nF1AP : F1 setup request received");
-                    BuildAndSendF1SetupRsp();
-                    break;
-                 }
-
-              case InitiatingMessage__value_PR_GNBDUConfigurationUpdate:
-                 {
-                    DU_LOG("\nF1AP : GNB-DU config update received");
-                    BuildAndSendDUUpdateAck();
-                    DU_LOG("\nF1AP : Sending F1 reset request");
-                    BuildAndSendF1ResetReq();
-                    break;
-                 }
-              case InitiatingMessage__value_PR_InitialULRRCMessageTransfer:
-                 {
-                    DU_LOG("\nF1AP : Received InitialULRRCMessageTransfer");
-                    procInitULRRCMsg(f1apMsg);
-                    break;
-                 }
-              case InitiatingMessage__value_PR_ULRRCMessageTransfer:
-                 {
-                    DU_LOG("\nF1AP : Received ULRRCMessageTransfer");
-                    procUlRrcMsg(f1apMsg);
-                    break;
-                 }
-
-              case InitiatingMessage__value_PR_RRCDeliveryReport:
-                 {
-                    DU_LOG("\nF1AP : Received RRC delivery report");
-                    break;
-                 }
-              default:
-                 {
-                    DU_LOG("\nF1AP : Invalid type of intiating message [%d]",f1apMsg->choice.initiatingMessage->value.present);
-                    return;
-                 }
-           }/* End of switch(initiatingMessage) */
-           break;
-        }
+         {
+            switch(f1apMsg->choice.initiatingMessage->value.present)
+            {
+               case InitiatingMessage__value_PR_Reset:
+                  {
+                     DU_LOG("\nINFO  -->  F1AP : F1 reset request received ");
+                     BuildAndSendF1ResetAck();
+                     break;
+                  }
+
+               case InitiatingMessage__value_PR_F1SetupRequest:
+                  {
+                     DU_LOG("\nINFO  -->  F1AP : F1 setup request received");
+                     BuildAndSendF1SetupRsp();
+                     break;
+                  }
+
+               case InitiatingMessage__value_PR_GNBDUConfigurationUpdate:
+                  {
+                     DU_LOG("\nINFO  -->  F1AP : GNB-DU config update received");
+                     procGnbDuUpdate(f1apMsg);
+                     break;
+                  }
+               case InitiatingMessage__value_PR_InitialULRRCMessageTransfer:
+                  {
+                     DU_LOG("\nINFO  -->  F1AP : Received InitialULRRCMessageTransfer");
+                     procInitULRRCMsg(f1apMsg);
+                     break;
+                  }
+               case InitiatingMessage__value_PR_ULRRCMessageTransfer:
+                  {
+                     DU_LOG("\nINFO  -->  F1AP : Received ULRRCMessageTransfer");
+                     procUlRrcMsg(f1apMsg);
+                     break;
+                  }
+
+               case InitiatingMessage__value_PR_RRCDeliveryReport:
+                  {
+                     DU_LOG("\nINFO  -->  F1AP : Received RRC delivery report");
+                     break;
+                  }
+               case InitiatingMessage__value_PR_UEContextReleaseRequest:
+                  {
+                     DU_LOG("\nINFO  -->  F1AP : Received UE Context Release Request");
+                     procUeContextReleaseReq(f1apMsg);
+                     break;
+                  }
+               default:
+                  {
+                     DU_LOG("\nERROR  -->  F1AP : Invalid type of intiating message [%d]",\
+                           f1apMsg->choice.initiatingMessage->value.present);
+                     return;
+                  }
+            }/* End of switch(initiatingMessage) */
+            break;
+         }
 
       case F1AP_PDU_PR_successfulOutcome:
-        {
-           switch(f1apMsg->choice.successfulOutcome->value.present)
-           {
-              case SuccessfulOutcome__value_PR_ResetAcknowledge:
-                 {
-                    DU_LOG("\nF1Reset Acknowledgement is received successfully ");
-                    break;
-                 }
-              case SuccessfulOutcome__value_PR_UEContextSetupResponse:
-                 {
-                    DU_LOG("\nF1AP : UE ContextSetupResponse received");
-                    f1apMsgDb.dlRrcMsgCount++; /* keeping DL RRC Msg Count */
-                    break;
-                 }
-              default:
-                 {
-                    DU_LOG("\nF1AP : Invalid type of successful outcome message [%d]",\
-                          f1apMsg->choice.successfulOutcome->value.present);
-                    return;
-                 }
-           }/* End of switch(successfulOutcome) */
-           break;
-        } 
+         {
+            switch(f1apMsg->choice.successfulOutcome->value.present)
+            {
+               case SuccessfulOutcome__value_PR_ResetAcknowledge:
+                  {
+                     DU_LOG("\nINFO  -->  F1Reset Acknowledgement is received successfully ");
+                     break;
+                  }
+               case SuccessfulOutcome__value_PR_UEContextSetupResponse:
+                  {
+                     DU_LOG("\nINFO  -->  F1AP : UE ContextSetupResponse received");
+                     procUeContextSetupResponse(f1apMsg);
+                     break;
+                  }
+               case SuccessfulOutcome__value_PR_UEContextModificationResponse:
+                  {
+                     DU_LOG("\nINFO  -->  F1AP : UE Context Modification Response received");
+                     break;
+                  }
+               case SuccessfulOutcome__value_PR_UEContextReleaseComplete:
+                  {
+                      DU_LOG("\nINFO  -->  F1AP : UE Context release complete received");
+                      break;
+                  }
+               default:
+                  {
+                     DU_LOG("\nERROR  -->  F1AP : Invalid type of successful outcome message [%d]",\
+                           f1apMsg->choice.successfulOutcome->value.present);
+                     return;
+                  }
+            }/* End of switch(successfulOutcome) */
+            break;
+         } 
       default:
-        {
-           DU_LOG("\nF1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present);
-           return;
-        }
+         {
+            DU_LOG("\nERROR  -->  F1AP : Invalid type of f1apMsg->present [%d]",f1apMsg->present);
+            return;
+         }
    }/* End of switch(f1apMsg->present) */
 
 } /* End of F1APMsgHdlr */