[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-501] Ue Create and Rsp correction in DUAPP...
[o-du/l2.git] / src / cm / du_app_rlc_inf.c
index 5878def..ff556a5 100644 (file)
 #include "common_def.h"
 #include "du_app_rlc_inf.h"
 
+/*******************************************************************
+*
+* @brief Packs and Sends Max Retransmission Reached Info from RLC to DUAPP
+*
+* @details
+*
+*    Function : packRlcDuMaxRetransInd
+*
+*    Functionality:
+*       Packs and Sends Max Retransmission Reached Info from RLC to DUAPP
+*
+*
+* @params[in] Post structure pointer
+*             RlcMaxRetransInfo *maxRetransInfo
+*
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packRlcDuMaxRetransInd(Pst *pst, RlcMaxRetransInfo *maxRetransInfo)
+{
+   Buffer *mBuf = NULLP;
+
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+      {
+         DU_LOG("\nERROR  --> RLC : Memory allocation failed at packRlcDuMaxRetransInd");
+         return RFAILED;
+      }
+      /* pack the address of the structure */
+      CMCHKPK(oduPackPointer,(PTR)maxRetransInfo, mBuf);
+   }
+   else
+   {
+      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for packRlcDuMaxRetransInd");
+      return RFAILED;
+   }
+
+   return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+*
+* @brief Unpacks Max Retransmission Reached Info received from DU APP
+*
+* @details
+*
+*    Function : unpackRlcMaxRetransInd
+*
+*    Functionality:
+*         Unpacks Max Retransmission Reached Info received from DU APP
+*
+* @params[in] Pointer to Handler
+*             Post structure pointer
+*             Message Buffer
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcMaxRetransInd(RlcDuMaxRetransInd func, Pst *pst, Buffer *mBuf)
+{
+    if(pst->selector == ODU_SELECTOR_LWLC)
+    {
+       RlcMaxRetransInfo *maxRetransInfo = NULLP;
+       /* unpack the address of the structure */
+       CMCHKUNPK(oduUnpackPointer, (PTR *)&maxRetransInfo, mBuf);
+       ODU_PUT_MSG_BUF(mBuf);
+       return (*func)(pst, maxRetransInfo);
+    }
+    else
+    {
+       /* Nothing to do for other selectors */
+       DU_LOG("\nERROR  -->  RLC: Only LWLC supported for Max Retransmission Reached Info ");
+       ODU_PUT_MSG_BUF(mBuf);
+    }
+
+    return RFAILED;
+}
+
 /*******************************************************************
  *
  * @brief Packs and Sends UE create Request from DUAPP to RLC
  *
  *
  * @params[in] Post structure pointer
- *             RlcUeCfg pointer              
+ *             RlcUeCreate pointer              
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg)
+uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCreate *ueCfg)
 {
    Buffer *mBuf = NULLP;
  
@@ -82,7 +164,7 @@ uint8_t unpackRlcUeCreateReq(DuRlcUeCreateReq func, Pst *pst, Buffer *mBuf)
 {
    if(pst->selector == ODU_SELECTOR_LWLC)
    {
-      RlcUeCfg *ueCfg;
+      RlcUeCreate *ueCfg;
       /* unpack the address of the structure */
       CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf);
       ODU_PUT_MSG_BUF(mBuf);
@@ -100,11 +182,11 @@ uint8_t unpackRlcUeCreateReq(DuRlcUeCreateReq func, Pst *pst, Buffer *mBuf)
 
 /*******************************************************************
  *
- * @brief Packs and Sends UE Cfg Response from RLC to DUAPP
+ * @brief Packs and Sends UE Create Response from RLC to DUAPP
  *
  * @details
  *
- *    Function : packRlcDuUeCfgRsp
+ *    Function : packRlcDuUeCreateRsp
  *
  *    Functionality:
  *       Packs and Sends UE Cfg Rrsponse from RLC to DUAPP
@@ -116,7 +198,7 @@ uint8_t unpackRlcUeCreateReq(DuRlcUeCreateReq func, Pst *pst, Buffer *mBuf)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t packRlcDuUeCfgRsp(Pst *pst, RlcUeCfgRsp *ueCfg)
+uint8_t packRlcDuUeCreateRsp(Pst *pst, RlcUeCreateRsp *ueCfg)
 {
    Buffer *mBuf = NULLP;
  
@@ -124,7 +206,7 @@ uint8_t packRlcDuUeCfgRsp(Pst *pst, RlcUeCfgRsp *ueCfg)
    {
       if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
       {
-         DU_LOG("\nERROR  --> RLC : Memory allocation failed at packRlcDuUeCfgRsp");
+         DU_LOG("\nERROR  --> RLC : Memory allocation failed at packRlcDuUeCreateRsp");
          return RFAILED;
       }
       /* pack the address of the structure */
@@ -132,7 +214,7 @@ uint8_t packRlcDuUeCfgRsp(Pst *pst, RlcUeCfgRsp *ueCfg)
    }
    else
    {
-      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for packRlcDuUeCfgRsp");
+      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for packRlcDuUeCreateRsp");
       return RFAILED;
    }
 
@@ -141,11 +223,11 @@ uint8_t packRlcDuUeCfgRsp(Pst *pst, RlcUeCfgRsp *ueCfg)
 
 /*******************************************************************
  *
- * @brief Unpacks UE Cfg Response received from DU APP
+ * @brief Unpacks UE Create Response received from DU APP
  *
  * @details
  *
- *    Function : unpackRlcUeCfgRsp
+ *    Function : unpackRlcUeCreateRsp
  *
  *    Functionality:
  *         Unpacks UE Cfg Response received from DU APP
@@ -157,11 +239,11 @@ uint8_t packRlcDuUeCfgRsp(Pst *pst, RlcUeCfgRsp *ueCfg)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t unpackRlcUeCfgRsp(RlcDuUeCfgRsp func, Pst *pst, Buffer *mBuf)
+uint8_t unpackRlcUeCreateRsp(RlcDuUeCreateRsp func, Pst *pst, Buffer *mBuf)
 {
    if(pst->selector == ODU_SELECTOR_LWLC)
    {
-      RlcUeCfgRsp *cfgRsp = NULLP;
+      RlcUeCreateRsp *cfgRsp = NULLP;
       /* unpack the address of the structure */
       CMCHKUNPK(oduUnpackPointer, (PTR *)&cfgRsp, mBuf);
       ODU_PUT_MSG_BUF(mBuf);
@@ -177,6 +259,85 @@ uint8_t unpackRlcUeCfgRsp(RlcDuUeCfgRsp func, Pst *pst, Buffer *mBuf)
    return RFAILED;
 }
 
+/*******************************************************************
+ *
+ * @brief Packs and Sends UE Reconfig Response from RLC to DUAPP
+ *
+ * @details
+ *
+ *    Function : packRlcDuUeReconfigRsp
+ *
+ *    Functionality:
+ *       Packs and Sends UE Reconfig Rrsponse from RLC to DUAPP
+ *
+ *
+ * @params[in] Post structure pointer
+ *             RlcUeRecfgRsp pointer              
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t packRlcDuUeReconfigRsp(Pst *pst, RlcUeReconfigRsp *ueCfg)
+{
+   Buffer *mBuf = NULLP;
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+      {
+         DU_LOG("\nERROR  --> RLC : Memory allocation failed at packRlcDuUeReconfigRsp");
+         return RFAILED;
+      }
+      /* pack the address of the structure */
+      CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
+   }
+   else
+   {
+      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for packRlcDuUeReconfigRsp");
+      return RFAILED;
+   }
+
+    return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+ *
+ * @brief Unpacks UE Reconfig Response received from DU APP
+ *
+ * @details
+ *
+ *    Function : unpackRlcUeReconfigRsp
+ *
+ *    Functionality:
+ *         Unpacks UE Reconfig Response received from DU APP
+ *
+ * @params[in] Pointer to Handler
+ *             Post structure pointer
+ *             Message Buffer
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t unpackRlcUeReconfigRsp(RlcDuUeReconfigRsp func, Pst *pst, Buffer *mBuf)
+{
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      RlcUeReconfigRsp *cfgRsp = NULLP;
+      /* unpack the address of the structure */
+      CMCHKUNPK(oduUnpackPointer, (PTR *)&cfgRsp, mBuf);
+      ODU_PUT_MSG_BUF(mBuf);
+      return (*func)(pst, cfgRsp);
+   }
+   else
+   {
+      /* Nothing to do for other selectors */
+      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for UE Re-Cfg Response ");
+      ODU_PUT_MSG_BUF(mBuf);
+   }
+
+   return RFAILED;
+}
+
 /*******************************************************************
  *
  * @brief Pack and send UL RRC message transfer from RLC to DU APP
@@ -423,7 +584,7 @@ uint8_t unpackRrcDeliveryReportToDu(RlcRrcDeliveryReportToDuFunc func, Pst *pst,
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg)
+uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeRecfg *ueRecfg)
 {
    Buffer *mBuf = NULLP;
  
@@ -435,7 +596,7 @@ uint8_t packDuRlcUeReconfigReq(Pst *pst, RlcUeCfg *ueCfg)
          return RFAILED;
       }
       /* pack the address of the structure */
-      CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
+      CMCHKPK(oduPackPointer,(PTR)ueRecfg, mBuf);
    }
    else
    {
@@ -467,11 +628,11 @@ uint8_t unpackRlcUeReconfigReq(DuRlcUeReconfigReq func, Pst *pst, Buffer *mBuf)
 {
    if(pst->selector == ODU_SELECTOR_LWLC)
    {
-      RlcUeCfg *ueCfg;
+      RlcUeRecfg *ueRecfg;
       /* unpack the address of the structure */
-      CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf);
+      CMCHKUNPK(oduUnpackPointer, (PTR *)&ueRecfg, mBuf);
       ODU_PUT_MSG_BUF(mBuf);
-      return (*func)(pst, ueCfg);
+      return (*func)(pst, ueRecfg);
    }
    else
    {
@@ -650,18 +811,11 @@ uint8_t unpackRlcUlUserDataToDu(RlcUlUserDataToDuFunc func, Pst *pst, Buffer *mB
  * ****************************************************************/
 uint8_t packRlcDlUserDataToRlc(Pst *pst, RlcDlUserDataInfo *dlUserData)
 {
-   Buffer *mBuf = NULLP;
-
    if(pst->selector == ODU_SELECTOR_LWLC)
    {
-      if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
-      {
-         DU_LOG("\nERROR  -->  RLC DL: Memory allocation failed at packRlcDlUserDataToRlc");
-         return RFAILED;
-      }
       /* pack the address of the structure */
-      CMCHKPK(oduPackPointer,(PTR)dlUserData, mBuf);
-      return ODU_POST_TASK(pst,mBuf);
+      CMCHKPK(oduPackPointer,(PTR)dlUserData, dlUserData->dlMsg);
+      return ODU_POST_TASK(pst,dlUserData->dlMsg);
    }
    else
    {
@@ -693,7 +847,6 @@ uint8_t unpackRlcDlUserDataToRlc(DuRlcDlUserDataToRlcFunc func, Pst *pst, Buffer
       RlcDlUserDataInfo *dlUserData;
       /* unpack the address of the structure */
       CMCHKUNPK(oduUnpackPointer, (PTR *)&dlUserData, mBuf);
-      ODU_PUT_MSG_BUF(mBuf);
       return (*func)(pst, dlUserData);
    }
    else
@@ -705,6 +858,410 @@ uint8_t unpackRlcDlUserDataToRlc(DuRlcDlUserDataToRlcFunc func, Pst *pst, Buffer
 
    return RFAILED;
 }
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Delete Request from DUAPP to RLC
+*
+* @details
+*
+*    Function : packDuRlcUeDeleteReq 
+*
+*    Functionality:
+*       Packs and Sends UE Delete Request from DUAPP to RLC
+*
+*
+* @params[in] Post structure pointer
+*             RlcUeDelete pointer
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packDuRlcUeDeleteReq(Pst *pst, RlcUeDelete *ueDelete)
+{
+   Buffer *mBuf = NULLP;
+
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+      {
+         DU_LOG("\nERROR  --> RLC : Memory allocation failed at packDuRlcUeDeleteReq");
+         return RFAILED;
+      }
+      /* pack the address of the structure */
+      CMCHKPK(oduPackPointer,(PTR)ueDelete, mBuf);
+   }
+   else
+   {
+      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for packDuRlcUeDeleteReq");
+      return RFAILED;
+   }
+
+   return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+* @brief Unpacks UE Delete Request received from DU APP
+*
+* @details
+*
+*    Function : unpackRlcUeDeleteReq 
+*
+*    Functionality:
+*         Unpacks UE Delete Request received from DU APP
+*
+* @params[in] Pointer to Handler
+*             Post structure pointer
+*             Message Buffer
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeDeleteReq(DuRlcUeDeleteReq func, Pst *pst, Buffer *mBuf)
+{
+    if(pst->selector == ODU_SELECTOR_LWLC)
+    {
+       RlcUeDelete *ueDelete;
+       /* unpack the address of the structure */
+       CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDelete, mBuf);
+       ODU_PUT_MSG_BUF(mBuf);
+       return (*func)(pst, ueDelete);
+    }
+    else
+    {
+       /* Nothing to do for other selectors */
+       DU_LOG("\nERROR  -->  RLC: Only LWLC supported for UE Delete Request ");
+       ODU_PUT_MSG_BUF(mBuf);
+    }
+    return RFAILED;
+}
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Del Response from RLC to DUAPP
+*
+* @details
+*
+*    Function : packRlcDuUeDeleteRsp
+*
+*    Functionality:
+*       Packs and Sends UE Del Response from RLC to DUAPP
+*
+*
+* @params[in] Post structure pointer
+*             RlcUeDeleteRsp *ueDelRsp
+*
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packRlcDuUeDeleteRsp(Pst *pst, RlcUeDeleteRsp *ueDelRsp)
+{
+   Buffer *mBuf = NULLP;
+
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+      {
+         DU_LOG("\nERROR  --> RLC : Memory allocation failed at packRlcDuUeDeleteRsp");
+         return RFAILED;
+      }
+      /* pack the address of the structure */
+      CMCHKPK(oduPackPointer,(PTR)ueDelRsp, mBuf);
+   }
+   else
+   {
+      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for packRlcDuUeDeleteRsp");
+      return RFAILED;
+   }
+
+   return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+*
+* @brief Unpacks UE Del Response received from DU APP
+*
+* @details
+*
+*    Function : unpackRlcUeDeleteRsp
+*
+*    Functionality:
+*         Unpacks UE Del Response received from DU APP
+*
+* @params[in] Pointer to Handler
+*             Post structure pointer
+*             Message Buffer
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeDeleteRsp(RlcDuUeDeleteRsp func, Pst *pst, Buffer *mBuf)
+{
+    if(pst->selector == ODU_SELECTOR_LWLC)
+    {
+       RlcUeDeleteRsp *ueDeleteRsp = NULLP;
+       /* unpack the address of the structure */
+       CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDeleteRsp, mBuf);
+       ODU_PUT_MSG_BUF(mBuf);
+       return (*func)(pst, ueDeleteRsp);
+    }
+    else
+    {
+       /* Nothing to do for other selectors */
+       DU_LOG("\nERROR  -->  RLC: Only LWLC supported for UE Del Response ");
+       ODU_PUT_MSG_BUF(mBuf);
+    }
+
+    return RFAILED;
+}
+
+/*******************************************************************
+*
+* @brief Packs and Sends Slice PM from RLC to DUAPP
+*
+* @details
+*
+*    Function : packRlcDuSlicePm
+*
+*    Functionality:
+*       Packs and Sends Slice Performance Metrics from RLC to DUAPP
+*
+*
+* @params[in] Post structure pointer
+*             SlicePmList *sliceStats
+*
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packRlcDuSlicePm(Pst *pst, SlicePmList *sliceStats)
+{
+   Buffer *mBuf = NULLP;
+
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+      {
+         DU_LOG("\nERROR  --> RLC : Memory allocation failed at packRlcDuSlicePm");
+         return RFAILED;
+      }
+      /* pack the address of the structure */
+      CMCHKPK(oduPackPointer,(PTR)sliceStats, mBuf);
+   }
+   else
+   {
+      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for packRlcDuSlicePm");
+      return RFAILED;
+   }
+
+   return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+*
+* @brief Unpacks Slice PM received from RLC
+*
+* @details
+*
+*    Function : unpackRlcSlicePm
+*
+*    Functionality:
+*         Unpacks Slice Performance Metrics received from RLC
+*
+* @params[in] Pointer to Handler
+*             Post structure pointer
+*             Message Buffer
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcSlicePm(RlcSlicePmToDuFunc func, Pst *pst, Buffer *mBuf)
+{
+    if(pst->selector == ODU_SELECTOR_LWLC)
+    {
+       SlicePmList *sliceStats = NULLP;
+       /* unpack the address of the structure */
+       CMCHKUNPK(oduUnpackPointer, (PTR *)&sliceStats, mBuf);
+       ODU_PUT_MSG_BUF(mBuf);
+       return (*func)(pst, sliceStats);
+    }
+    else
+    {
+       /* Nothing to do for other selectors */
+       DU_LOG("\nERROR  -->  RLC: Only LWLC supported for Slice Metrics ");
+       ODU_PUT_MSG_BUF(mBuf);
+    }
+
+    return RFAILED;
+}
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Reestablishment Req from DUAPP to RLC
+*
+* @details
+*
+*    Function : packDuRlcUeReestablishReq 
+*
+*    Functionality:
+*       Packs and Sends UE Reestablishment Req from DUAPP to RLC
+*
+*
+* @params[in] Post structure pointer
+*             RlcUeReestablishReq pointer
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packDuRlcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueDelete)
+{
+   Buffer *mBuf = NULLP;
+
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+      {
+         DU_LOG("\nERROR  --> RLC : Memory allocation failed at packDuRlcUeReestablishReq");
+         return RFAILED;
+      }
+      /* pack the address of the structure */
+      CMCHKPK(oduPackPointer,(PTR)ueDelete, mBuf);
+   }
+   else
+   {
+      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for packDuRlcUeReestablishReq");
+      return RFAILED;
+   }
+
+   return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+* @brief Unpacks UE Reestablishment Req received from DU APP
+*
+* @details
+*
+*    Function : unpackRlcUeReestablishReq 
+*
+*    Functionality:
+*         Unpacks UE Reestablishment Req received from DU APP
+*
+* @params[in] Pointer to Handler
+*             Post structure pointer
+*             Message Buffer
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeReestablishReq(DuRlcUeReestablishReq func, Pst *pst, Buffer *mBuf)
+{
+    if(pst->selector == ODU_SELECTOR_LWLC)
+    {
+       RlcUeReestablishReq *ueDelete;
+       /* unpack the address of the structure */
+       CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDelete, mBuf);
+       ODU_PUT_MSG_BUF(mBuf);
+       return (*func)(pst, ueDelete);
+    }
+    else
+    {
+       /* Nothing to do for other selectors */
+       DU_LOG("\nERROR  -->  RLC: Only LWLC supported for UE Reestablishment Req ");
+       ODU_PUT_MSG_BUF(mBuf);
+    }
+    return RFAILED;
+}
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Reestablishment Response from RLC to DUAPP
+*
+* @details
+*
+*    Function : packRlcDuUeReestablishRsp
+*
+*    Functionality:
+*       Packs and Sends UE Reestablishment Response from RLC to DUAPP
+*
+*
+* @params[in] Post structure pointer
+*             RlcUeReestablishRsp *ueReestablish
+*
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packRlcDuUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *ueReestablish)
+{
+   Buffer *mBuf = NULLP;
+
+   if(pst->selector == ODU_SELECTOR_LWLC)
+   {
+      if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+      {
+         DU_LOG("\nERROR  --> RLC : Memory allocation failed at packRlcDuUeReestablishRsp");
+         return RFAILED;
+      }
+      /* pack the address of the structure */
+      CMCHKPK(oduPackPointer,(PTR)ueReestablish, mBuf);
+   }
+   else
+   {
+      DU_LOG("\nERROR  -->  RLC: Only LWLC supported for packRlcDuUeReestablishRsp");
+      return RFAILED;
+   }
+
+   return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+*
+* @brief Unpacks UE Reestablishment Response received from DU APP
+*
+* @details
+*
+*    Function : unpackRlcUeReestablishRsp
+*
+*    Functionality:
+*         Unpacks UE Reestablishment Response received from DU APP
+*
+* @params[in] Pointer to Handler
+*             Post structure pointer
+*             Message Buffer
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeReestablishRsp(RlcDuUeReestablishRsp func, Pst *pst, Buffer *mBuf)
+{
+    if(pst->selector == ODU_SELECTOR_LWLC)
+    {
+       RlcUeReestablishRsp *ueReestablishRsp = NULLP;
+       /* unpack the address of the structure */
+       CMCHKUNPK(oduUnpackPointer, (PTR *)&ueReestablishRsp, mBuf);
+       ODU_PUT_MSG_BUF(mBuf);
+       return (*func)(pst, ueReestablishRsp);
+    }
+    else
+    {
+       /* Nothing to do for other selectors */
+       DU_LOG("\nERROR  -->  RLC: Only LWLC supported for UE Reestablishment Response ");
+       ODU_PUT_MSG_BUF(mBuf);
+    }
+
+    return RFAILED;
+}
 /**********************************************************************
          End of file
 ***********************************************************************/