[Epic-ID: ODUHIGH-406] [Task-ID: ODUHIGH-439] Building Paging RRC PDU
[o-du/l2.git] / src / du_app / du_egtp.c
index fc9df1b..f5fe776 100644 (file)
 #include "du_app_mac_inf.h"
 #include "du_cfg.h"
 #include "du_egtp.h"
+#include "du_app_rlc_inf.h"
+#include "du_mgr.h"
 #include "du_utils.h"
 
-/* Global variable declaration */
-EgtpGlobalCb egtpCb;
 
 /**************************************************************************
  * @brief Task Initiation callback function. 
@@ -287,7 +287,7 @@ uint8_t egtpCfgReq(Pst *pst, EgtpConfig egtpCfg)
    memcpy(&egtpCb.egtpCfg, &egtpCfg, sizeof(EgtpConfig));
 
    egtpCb.recvTptSrvr.addr.address = CM_INET_NTOH_UINT32(egtpCb.egtpCfg.localIp.ipV4Addr);
-   egtpCb.recvTptSrvr.addr.port = EGTP_DFLT_PORT;
+   egtpCb.recvTptSrvr.addr.port = EGTP_RECVR_PORT;
 
    egtpCb.dstCb.dstIp = CM_INET_NTOH_UINT32(egtpCb.egtpCfg.destIp.ipV4Addr);
    egtpCb.dstCb.dstPort = egtpCb.egtpCfg.destPort;
@@ -874,11 +874,12 @@ uint8_t egtpSendMsg(Buffer *mBuf)
    uint16_t       txLen;
    CmInetMemInfo  info;
    CmInetAddr     dstAddr;
+   static uint64_t numDataSent = 0;
 
    info.region = DU_APP_MEM_REGION;
    info.pool = DU_POOL;
 
-   dstAddr.port = EGTP_DFLT_PORT;
+   dstAddr.port = EGTP_RECVR_PORT;
    dstAddr.address = egtpCb.dstCb.dstIp;
 
    ret = cmInetSendMsg(&(egtpCb.dstCb.sendTptSrvr.sockFd), &dstAddr, &info, \
@@ -888,8 +889,11 @@ uint8_t egtpSendMsg(Buffer *mBuf)
       DU_LOG("\nERROR  -->  EGTP : Failed sending the message");
       return RFAILED;
    }
-
-   DU_LOG("\nDEBUG   -->  EGTP : Message Sent");
+   else
+   {
+      DU_LOG("\nDEBUG -->  EGTP : Sent UL Message [%ld]", numDataSent+1);
+      numDataSent++;
+   }
 
    return ROK;
 }
@@ -936,6 +940,7 @@ uint8_t egtpRecvMsg()
          //ODU_PRINT_MSG(recvBuf, 0 ,0);
          egtpHdlRecvData(recvBuf);
          gDlDataRcvdCnt++;
+         
       }
    }