***************************************************************************/
uint8_t egtpActvInit(Ent entity, Inst inst, Region region, Reason reason)
{
***************************************************************************/
uint8_t egtpActvInit(Ent entity, Inst inst, Region region, Reason reason)
{
memset (&egtpCb, 0, sizeof(EgtpGlobalCb));
protType = CM_INET_PROTO_UDP;
memset (&egtpCb, 0, sizeof(EgtpGlobalCb));
protType = CM_INET_PROTO_UDP;
sockType = CM_INET_DGRAM;
ret = egtpSrvOpenPrc(sockType, &(egtpCb.recvTptSrvr));
/* Opening and Binding receiver socket */
if(ret != ROK)
{
sockType = CM_INET_DGRAM;
ret = egtpSrvOpenPrc(sockType, &(egtpCb.recvTptSrvr));
/* Opening and Binding receiver socket */
if(ret != ROK)
{
return ret;
}
/* Opening and Binding sender socket */
ret = egtpSrvOpenPrc(sockType, &(egtpCb.dstCb.sendTptSrvr));
if(ret != ROK)
{
return ret;
}
/* Opening and Binding sender socket */
ret = egtpSrvOpenPrc(sockType, &(egtpCb.dstCb.sendTptSrvr));
if(ret != ROK)
{
- DU_LOG("\nEGTP : Receiver socket[%d] and Sender socket[%d] open", egtpCb.recvTptSrvr.sockFd.fd, egtpCb.dstCb.sendTptSrvr.sockFd.fd);
+ DU_LOG("\nDEBUG --> EGTP : Receiver socket[%d] and Sender socket[%d] open", egtpCb.recvTptSrvr.sockFd.fd,\
+ egtpCb.dstCb.sendTptSrvr.sockFd.fd);
/* Start Socket polling */
memset(&egtpPst, 0, sizeof(egtpPst));
/* Start Socket polling */
memset(&egtpPst, 0, sizeof(egtpPst));
EgtpTeIdCb *teidCb; /* Tunnel endpoint control block */
EgtpMsgHdr preDefHdr; /* pre-define header for this tunnel */
EgtpTeIdCb *teidCb; /* Tunnel endpoint control block */
EgtpMsgHdr preDefHdr; /* pre-define header for this tunnel */
- DU_LOG("\nEGTP : Tunnel addition : LocalTeid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
+ DU_LOG("\nINFO --> EGTP : Tunnel addition : LocalTeid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
ret = cmHashListInsert(&(egtpCb.dstCb.teIdLst), (PTR)teidCb, (uint8_t *)&(teidCb->teId), sizeof(uint32_t));
if(ret != ROK)
{
ret = cmHashListInsert(&(egtpCb.dstCb.teIdLst), (PTR)teidCb, (uint8_t *)&(teidCb->teId), sizeof(uint32_t));
if(ret != ROK)
{
DU_FREE(teidCb, sizeof(EgtpTeIdCb));
return LCM_REASON_HASHING_FAILED;
}
DU_FREE(teidCb, sizeof(EgtpTeIdCb));
return LCM_REASON_HASHING_FAILED;
}
- printf("\nTunnel modification : LocalTeid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
+ DU_LOG("\nINFO --> Tunnel modification : LocalTeid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(tnlEvt.teId), sizeof(uint32_t), 0, (PTR *)&teidCb);
if(teidCb == NULLP)
{
cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(tnlEvt.teId), sizeof(uint32_t), 0, (PTR *)&teidCb);
if(teidCb == NULLP)
{
- DU_LOG("\nEGTP : Tunnel deletion : Local Teid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
+ DU_LOG("\nINFO --> EGTP : Tunnel deletion : Local Teid[%d] Remote Teid[%d]", tnlEvt.lclTeid, tnlEvt.remTeid);
cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(tnlEvt.lclTeid), sizeof(uint32_t), 0, (PTR *)&teidCb);
if(teidCb == NULLP)
{
cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(tnlEvt.lclTeid), sizeof(uint32_t), 0, (PTR *)&teidCb);
if(teidCb == NULLP)
{
cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(egtpMsg.msgHdr.teId), sizeof(uint32_t), 0, (PTR *)&teidCb);
if(teidCb == NULLP)
{
cmHashListFind(&(egtpCb.dstCb.teIdLst), (uint8_t *)&(egtpMsg.msgHdr.teId), sizeof(uint32_t), 0, (PTR *)&teidCb);
if(teidCb == NULLP)
{
ODU_PRINT_MSG(egtpMsg.msg, 0, 0);
ODU_ADD_PRE_MSG_MULT(&teidCb->preEncodedHdr.hdr[hdrLen], (EGTP_MAX_HDR_LEN - hdrLen), egtpMsg.msg);
ODU_PRINT_MSG(egtpMsg.msg, 0, 0);
ODU_ADD_PRE_MSG_MULT(&teidCb->preEncodedHdr.hdr[hdrLen], (EGTP_MAX_HDR_LEN - hdrLen), egtpMsg.msg);
mBuf, (int16_t *)&txLen, CM_INET_NO_FLAG);
if(ret != ROK && ret != RWOULDBLOCK)
{
mBuf, (int16_t *)&txLen, CM_INET_NO_FLAG);
if(ret != ROK && ret != RWOULDBLOCK)
{
&recvBuf, (int16_t *)&bufLen, CM_INET_NO_FLAG);
if(ret == ROK && recvBuf != NULLP)
{
&recvBuf, (int16_t *)&bufLen, CM_INET_NO_FLAG);
if(ret == ROK && recvBuf != NULLP)
{
ODU_PRINT_MSG(recvBuf, 0 ,0);
egtpHdlRecvData(recvBuf);
}
ODU_PRINT_MSG(recvBuf, 0 ,0);
egtpHdlRecvData(recvBuf);
}
/* Decode message type */
ODU_REM_PRE_MSG((Data*)&(egtpMsg->msgHdr.msgType), mBuf);
/* Decode message type */
ODU_REM_PRE_MSG((Data*)&(egtpMsg->msgHdr.msgType), mBuf);
/****************************************************************************
* Message length param is 2 bytes. So decode next 2 bytes from msg hdr and
/****************************************************************************
* Message length param is 2 bytes. So decode next 2 bytes from msg hdr and
ODU_REM_PRE_MSG(&tmpByte[1], mBuf);
ODU_REM_PRE_MSG(&tmpByte[2], mBuf);
msgLen = (tmpByte[1] << 8) | tmpByte[2];
ODU_REM_PRE_MSG(&tmpByte[1], mBuf);
ODU_REM_PRE_MSG(&tmpByte[2], mBuf);
msgLen = (tmpByte[1] << 8) | tmpByte[2];
ODU_REM_PRE_MSG(&tmpByte[3], mBuf);
ODU_REM_PRE_MSG(&tmpByte[4], mBuf);
egtpMsg->msgHdr.teId = (tmpByte[1] << 24) | (tmpByte[2] << 16) | (tmpByte[3] << 8) | tmpByte[4];
ODU_REM_PRE_MSG(&tmpByte[3], mBuf);
ODU_REM_PRE_MSG(&tmpByte[4], mBuf);
egtpMsg->msgHdr.teId = (tmpByte[1] << 24) | (tmpByte[2] << 16) | (tmpByte[3] << 8) | tmpByte[4];
ODU_PRINT_MSG(mBuf, 0, 0);
/* Forward the data to duApp/RLC */
ODU_PRINT_MSG(mBuf, 0, 0);
/* Forward the data to duApp/RLC */