X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_egtp.c;h=b895aa2961f2a7fa7387a20cd0a641d68451c3a6;hb=62605166db94fd7d52f32de84dea8c7006e0f4c5;hp=3b7799622176e77f1b37e12e665decb66f4e8537;hpb=7ebfb1f80967fe83bf169c2915cedf2c9fb5cbf7;p=o-du%2Fl2.git diff --git a/src/du_app/du_egtp.c b/src/du_app/du_egtp.c index 3b7799622..b895aa296 100644 --- a/src/du_app/du_egtp.c +++ b/src/du_app/du_egtp.c @@ -63,6 +63,102 @@ uint8_t egtpActvInit(Ent entity, Inst inst, Region region, Reason reason) return ROK; } +/************************************************************************** +* @brief Function prints the src dest and msg reached to egtp. +* +* @details +* +* Function : callFlowEgtpActvTsk +* +* Functionality: +* Function prints the src dest and msg reached to egtp. +* +* @param[in] Pst *pst, Post structure of the primitive. +* +* @return void +* +***************************************************************************/ + +void callFlowEgtpActvTsk(Pst *pst) +{ + + char sourceTask[50]; + char destTask[50]="ENTEGTP"; + char message[100]; + + switch(pst->srcEnt) + { + case ENTDUAPP: + { + strcpy(sourceTask,"ENTDUAPP"); + switch(pst->event) + { + case EVTCFGREQ: + { + strcpy(message,"EVTCFGREQ"); + break; + } + case EVTSRVOPENREQ: + { + strcpy(message,"EVTSRVOPENREQ"); + break; + } + case EVTTNLMGMTREQ: + { + strcpy(message,"EVTTNLMGMTREQ"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } + case ENTEGTP: + { + strcpy(sourceTask,"ENTEGTP"); + switch(pst->event) + { + case EVTSTARTPOLL: + { + strcpy(message,"EVTSTARTPOLL"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } + case ENTRLC: + { + strcpy(sourceTask,"ENTRLC"); + switch(pst->event) + { + case EVTDATIND: + { + strcpy(message,"EVTDATIND"); + break; + } + default: + { + strcpy(message,"Invalid Event"); + break; + } + } + break; + } + default: + { + strcpy(sourceTask,"Invalid Source Entity Id"); + } + } + DU_LOG("\nCall Flow: %s -> %s : %s\n", sourceTask, destTask, message); +} /************************************************************************** * @brief Task Activation callback function. @@ -86,6 +182,10 @@ uint8_t egtpActvInit(Ent entity, Inst inst, Region region, Reason reason) uint8_t egtpActvTsk(Pst *pst, Buffer *mBuf) { uint8_t ret = ROK; + +#ifdef CALL_FLOW_DEBUG_LOG + callFlowEgtpActvTsk(pst); +#endif switch(pst->srcEnt) { @@ -377,6 +477,10 @@ uint8_t egtpTnlMgmtReq(Pst *pst, EgtpTnlEvt tnlEvt) { uint8_t ret = ROK; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTDUAPP -> ENTEGTP : TNL_MGMT\n"); +#endif + DU_LOG("\nDEBUG --> EGTP : Received tunnel management request"); switch(tnlEvt.action) { @@ -566,6 +670,10 @@ uint8_t egtpHdlDatInd(EgtpMsg egtpMsg) uint32_t msgLen; EgtpMsgHdr *msgHdr; +#ifdef CALL_FLOW_DEBUG_LOG + DU_LOG("\nCall Flow: ENTDUAPP -> ENTEGTP : DATA_INDICATION\n"); +#endif + DU_LOG("\nDEBUG --> EGTP : Received Data Indication"); cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(egtpMsg.msgHdr.teId), sizeof(uint32_t), 0, (PTR *)&teidCb);