Change-Id: I7bf0493baed9e596a0cd31c2d9eff3f7ed3987fc
Signed-off-by: sphoorthi <sphoorthi.dayanand@radisys.com>
if(sctpSend(mBuf) != ROK)
{
if(sctpSend(mBuf) != ROK)
{
- DU_LOG("\nE2AP : SCTP Send for E2 failed");
+ DU_LOG("\nERROR --> E2AP : SCTP Send for E2 failed");
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
}
else
{
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
}
else
{
- DU_LOG("\nE2AP : ODU_ADD_POST_MSG_MULT failed");
+ DU_LOG("\nERROR --> E2AP : ODU_ADD_POST_MSG_MULT failed");
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
- DU_LOG("\nE2AP : Failed to allocate memory");
+ DU_LOG("\nERROR --> E2AP : Failed to allocate memory");
- DU_LOG("\nE2AP : Building E2 Setup Response\n");
+ DU_LOG("\nINFO --> E2AP : Building E2 Setup Response\n");
RIC_ALLOC(e2apMsg, sizeof(E2AP_PDU_t));
if(e2apMsg == NULLP)
{
RIC_ALLOC(e2apMsg, sizeof(E2AP_PDU_t));
if(e2apMsg == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2AP-PDU failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2AP-PDU failed");
return RFAILED;
}
e2apMsg->present = E2AP_PDU_PR_successfulOutcome;
RIC_ALLOC(e2apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcomeE2_t));
if(e2apMsg->choice.successfulOutcome == NULLP)
{
return RFAILED;
}
e2apMsg->present = E2AP_PDU_PR_successfulOutcome;
RIC_ALLOC(e2apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcomeE2_t));
if(e2apMsg->choice.successfulOutcome == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2AP-PDU failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2AP-PDU failed");
RIC_FREE(e2apMsg, sizeof(E2AP_PDU_t));
return RFAILED;
}
RIC_FREE(e2apMsg, sizeof(E2AP_PDU_t));
return RFAILED;
}
e2SetupRsp->protocolIEs.list.size);
if(e2SetupRsp->protocolIEs.list.array == NULLP)
{
e2SetupRsp->protocolIEs.list.size);
if(e2SetupRsp->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2ResponseIEs failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2ResponseIEs failed");
RIC_FREE(e2apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcomeE2_t));
RIC_FREE(e2apMsg, sizeof(E2AP_PDU_t));
return RFAILED;
RIC_FREE(e2apMsg->choice.successfulOutcome, sizeof(SuccessfulOutcomeE2_t));
RIC_FREE(e2apMsg, sizeof(E2AP_PDU_t));
return RFAILED;
/* Check encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
/* Check encode results */
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nE2AP : Could not encode E2SetupResponse structure (at %s)\n",\
+ DU_LOG("\nERROR --> E2AP : Could not encode E2SetupResponse structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\nE2AP : Created APER encoded buffer for E2SetupResponse\n");
+ DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for E2SetupResponse\n");
for(int i=0; i< encBufSize; i++)
{
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
}
}
if(SendE2APMsg(RIC_APP_MEM_REG, RIC_POOL) != ROK)
{
}
}
if(SendE2APMsg(RIC_APP_MEM_REG, RIC_POOL) != ROK)
{
- DU_LOG("\nE2AP : Sending E2 Setup Response failed");
+ DU_LOG("\nERROR --> E2AP : Sending E2 Setup Response failed");
subsDetails->ricAction_ToBeSetup_List.list.size);
if(subsDetails->ricAction_ToBeSetup_List.list.array == NULLP)
{
subsDetails->ricAction_ToBeSetup_List.list.size);
if(subsDetails->ricAction_ToBeSetup_List.list.array == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for RICactionToBeSetup Items failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for RICactionToBeSetup Items failed");
return RFAILED;
}
RIC_ALLOC(subsDetails->ricAction_ToBeSetup_List.list.array[0],\
return RFAILED;
}
RIC_ALLOC(subsDetails->ricAction_ToBeSetup_List.list.array[0],\
asn_enc_rval_t encRetVal; /* Encoder return value */
ricSubsStatus = TRUE;
asn_enc_rval_t encRetVal; /* Encoder return value */
ricSubsStatus = TRUE;
- DU_LOG("\nE2AP : Building RIC Subscription Request\n");
+ DU_LOG("\nINFO --> E2AP : Building RIC Subscription Request\n");
RIC_ALLOC(e2apRicMsg, sizeof(E2AP_PDU_t));
if(e2apRicMsg == NULLP)
{
RIC_ALLOC(e2apRicMsg, sizeof(E2AP_PDU_t));
if(e2apRicMsg == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2AP-PDU failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2AP-PDU failed");
RIC_ALLOC(e2apRicMsg->choice.initiatingMessage, sizeof(InitiatingMessageE2_t));
if(e2apRicMsg->choice.initiatingMessage == NULLP)
{
RIC_ALLOC(e2apRicMsg->choice.initiatingMessage, sizeof(InitiatingMessageE2_t));
if(e2apRicMsg->choice.initiatingMessage == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for E2AP-PDU failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for E2AP-PDU failed");
RIC_FREE(e2apRicMsg, sizeof(E2AP_PDU_t));
return RFAILED;
}
RIC_FREE(e2apRicMsg, sizeof(E2AP_PDU_t));
return RFAILED;
}
ricSubscriptionReq->protocolIEs.list.size);
if(ricSubscriptionReq->protocolIEs.list.array == NULLP)
{
ricSubscriptionReq->protocolIEs.list.size);
if(ricSubscriptionReq->protocolIEs.list.array == NULLP)
{
- DU_LOG("\nE2AP : Memory allocation for RICSubscriptionRequestIEs failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation for RICSubscriptionRequestIEs failed");
RIC_FREE(e2apRicMsg->choice.initiatingMessage, sizeof(InitiatingMessageE2_t));
RIC_FREE(e2apRicMsg, (Size)sizeof(E2AP_PDU_t));
return RFAILED;
RIC_FREE(e2apRicMsg->choice.initiatingMessage, sizeof(InitiatingMessageE2_t));
RIC_FREE(e2apRicMsg, (Size)sizeof(E2AP_PDU_t));
return RFAILED;
encBuf);
if(encRetVal.encoded == ENCODE_FAIL)
{
encBuf);
if(encRetVal.encoded == ENCODE_FAIL)
{
- DU_LOG("\nE2AP : Could not encode RicSubscriptionRequest structure (at %s)\n",\
+ DU_LOG("\nERROR --> E2AP : Could not encode RicSubscriptionRequest structure (at %s)\n",\
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
encRetVal.failed_type ? encRetVal.failed_type->name : "unknown");
return RFAILED;
}
else
{
- DU_LOG("\nE2AP : Created APER encoded buffer for RicSubscriptionRequest\n");
+ DU_LOG("\nDEBUG --> E2AP : Created APER encoded buffer for RicSubscriptionRequest\n");
for(int i=0; i< encBufSize; i++)
{
for(int i=0; i< encBufSize; i++)
{
- printf("%x",encBuf[i]);
+ DU_LOG("%x",encBuf[i]);
/* Sending msg */
if(SendE2APMsg(RIC_APP_MEM_REG, RIC_POOL) != ROK)
{
/* Sending msg */
if(SendE2APMsg(RIC_APP_MEM_REG, RIC_POOL) != ROK)
{
- DU_LOG("\nE2AP : Sending RIC subscription Request failed");
+ DU_LOG("\nERROR --> E2AP : Sending RIC subscription Request failed");
asn_dec_rval_t rval; /* Decoder return value */
E2AP_PDU_t e2apasnmsg ;
asn_dec_rval_t rval; /* Decoder return value */
E2AP_PDU_t e2apasnmsg ;
- DU_LOG("\nE2AP : Received E2AP message buffer");
+ DU_LOG("\nINFO --> E2AP : Received E2AP message buffer");
ODU_PRINT_MSG(mBuf, 0,0);
/* Copy mBuf into char array to decode it */
ODU_PRINT_MSG(mBuf, 0,0);
/* Copy mBuf into char array to decode it */
- DU_LOG("\nE2AP : Memory allocation failed");
+ DU_LOG("\nERROR --> E2AP : Memory allocation failed");
return;
}
if(ODU_COPY_MSG_TO_FIX_BUF(mBuf, 0, recvBufLen, (Data *)recvBuf, ©Cnt) != ROK)
{
return;
}
if(ODU_COPY_MSG_TO_FIX_BUF(mBuf, 0, recvBufLen, (Data *)recvBuf, ©Cnt) != ROK)
{
- DU_LOG("\nE2AP : Failed while copying %d", copyCnt);
+ DU_LOG("\nERROR --> E2AP : Failed while copying %d", copyCnt);
- printf("\nE2AP : Received flat buffer to be decoded : ");
+ DU_LOG("\nDEBUG --> E2AP : Received flat buffer to be decoded : ");
for(i=0; i< recvBufLen; i++)
{
for(i=0; i< recvBufLen; i++)
{
- printf("%x",recvBuf[i]);
+ DU_LOG("%x",recvBuf[i]);
}
/* Decoding flat buffer into E2AP messsage */
}
/* Decoding flat buffer into E2AP messsage */
if(rval.code == RC_FAIL || rval.code == RC_WMORE)
{
if(rval.code == RC_FAIL || rval.code == RC_WMORE)
{
- DU_LOG("\nE2AP : ASN decode failed");
+ DU_LOG("\nERROR --> E2AP : ASN decode failed");
xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2apMsg);
switch(e2apMsg->present)
xer_fprint(stdout, &asn_DEF_E2AP_PDU, e2apMsg);
switch(e2apMsg->present)
{
case InitiatingMessageE2__value_PR_E2setupRequest:
{
{
case InitiatingMessageE2__value_PR_E2setupRequest:
{
- DU_LOG("\nE2AP : E2 setup request received");
+ DU_LOG("\nINFO --> E2AP : E2 setup request received");
BuildAndSendE2SetupRsp();
break;
}
case InitiatingMessageE2__value_PR_RICindication:
{
BuildAndSendE2SetupRsp();
break;
}
case InitiatingMessageE2__value_PR_RICindication:
{
- DU_LOG("\nE2AP : RIC Indication Acknowledged");
+ DU_LOG("\nINFO --> E2AP : RIC Indication Acknowledged");
- DU_LOG("\nE2AP : Invalid type of intiating message [%d]",e2apMsg->choice.initiatingMessage->value.present);
+ DU_LOG("\nERROR --> E2AP : Invalid type of intiating message [%d]",e2apMsg->choice.initiatingMessage->value.present);
return;
}
}/* End of switch(initiatingMessage) */
return;
}
}/* End of switch(initiatingMessage) */
{
case SuccessfulOutcomeE2__value_PR_RICsubscriptionResponse:
{
{
case SuccessfulOutcomeE2__value_PR_RICsubscriptionResponse:
{
- DU_LOG("\nE2AP : RICsubscriptionResponse Msg Acknowledged");
+ DU_LOG("\nINFO --> E2AP : RICsubscriptionResponse Msg Acknowledged");
- DU_LOG("\nE2AP : Invalid type of successfulOutcome message [%d]",e2apMsg->choice.successfulOutcome->value.present);
+ DU_LOG("\nERROR --> E2AP : Invalid type of successfulOutcome message [%d]",e2apMsg->choice.successfulOutcome->value.present);
- DU_LOG("\nE2AP : Invalid type message type ");
+ DU_LOG("\nERROR --> E2AP : Invalid type message type ");
- DU_LOG("\nStarting RIC_STUB");
+ DU_LOG("\nINFO --> RIC : Starting RIC_STUB");
/* Read RIC configurations */
readRicCfg();
/* Read RIC configurations */
readRicCfg();
{
uint32_t ipv4_du, ipv4_ric;
{
uint32_t ipv4_du, ipv4_ric;
- DU_LOG("\nReading RIC configurations");
+ DU_LOG("\nINFO --> RIC : Reading RIC configurations");
cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
if((ret = cmInetSocket(socket_type, &ricParams.lstnSockFd, IPPROTO_SCTP) != ROK))
{
if((ret = cmInetSocket(socket_type, &ricParams.lstnSockFd, IPPROTO_SCTP) != ROK))
{
- DU_LOG("\nSCTP : Socket[%d] coudnt open for listening", ricParams.lstnSockFd.fd);
+ DU_LOG("\nERROR --> SCTP : Socket[%d] coudnt open for listening", ricParams.lstnSockFd.fd);
}
else if((ret = cmInetSctpBindx(&ricParams.lstnSockFd, &ricParams.localAddrLst, ricParams.srcPort)) != ROK)
{
}
else if((ret = cmInetSctpBindx(&ricParams.lstnSockFd, &ricParams.localAddrLst, ricParams.srcPort)) != ROK)
{
- DU_LOG("\nSCTP: Binding failed at RIC");
+ DU_LOG("\nERROR --> SCTP: Binding failed at RIC");
}
else if((ret = sctpAccept(&ricParams.lstnSockFd, &ricParams.peerAddr, &ricParams.sockFd)) != ROK)
{
}
else if((ret = sctpAccept(&ricParams.lstnSockFd, &ricParams.peerAddr, &ricParams.sockFd)) != ROK)
{
- DU_LOG("\nSCTP: Unable to accept the connection at RIC");
+ DU_LOG("\nERROR --> SCTP: Unable to accept the connection at RIC");
}
else if(sctpSockPoll() != ROK)
{
}
else if(sctpSockPoll() != ROK)
{
- DU_LOG("\nSCTP: Polling failed to start at RIC");
+ DU_LOG("\nERROR --> SCTP: Polling failed to start at RIC");
ret = cmInetListen(lstnSock_Fd, 1);
if (ret != ROK)
{
ret = cmInetListen(lstnSock_Fd, 1);
if (ret != ROK)
{
- DU_LOG("\nSCTP : Listening on socket failed");
+ DU_LOG("\nERROR --> SCTP : Listening on socket failed");
cmInetClose(lstnSock_Fd);
return RFAILED;
}
cmInetClose(lstnSock_Fd);
return RFAILED;
}
- DU_LOG("\nSCTP : Connecting");
+ DU_LOG("\nINFO --> SCTP : Connecting");
- DU_LOG("\nSCTP : Failed to accept connection");
+ DU_LOG("\nERROR --> SCTP : Failed to accept connection");
- DU_LOG("\nSCTP : Connection established");
+ DU_LOG("\nINFO --> SCTP : Connection established");
switch(ntfy->header.nType)
{
case CM_INET_SCTP_ASSOC_CHANGE :
switch(ntfy->header.nType)
{
case CM_INET_SCTP_ASSOC_CHANGE :
- DU_LOG("\nSCTP : Assoc change notification received");
+ DU_LOG("\nINFO --> SCTP : Assoc change notification received");
switch(ntfy->u.assocChange.state)
{
case CM_INET_SCTP_COMM_UP:
switch(ntfy->u.assocChange.state)
{
case CM_INET_SCTP_COMM_UP:
- DU_LOG("Event : COMMUNICATION UP");
+ DU_LOG("\nINFO --> Event : COMMUNICATION UP");
connUp = TRUE;
break;
case CM_INET_SCTP_COMM_LOST:
connUp = TRUE;
break;
case CM_INET_SCTP_COMM_LOST:
- DU_LOG("Event : COMMUNICATION LOST");
+ DU_LOG("\nINFO --> Event : COMMUNICATION LOST");
connUp = FALSE;
break;
case CM_INET_SCTP_RESTART:
connUp = FALSE;
break;
case CM_INET_SCTP_RESTART:
- DU_LOG("Event : SCTP RESTART");
+ DU_LOG("\nINFO --> Event : SCTP RESTART");
connUp = FALSE;
break;
case CM_INET_SCTP_SHUTDOWN_COMP: /* association gracefully shutdown */
connUp = FALSE;
break;
case CM_INET_SCTP_SHUTDOWN_COMP: /* association gracefully shutdown */
- DU_LOG("Event : SHUTDOWN COMPLETE");
+ DU_LOG("\nINFO --> Event : SHUTDOWN COMPLETE");
connUp = FALSE;
break;
case CM_INET_SCTP_CANT_STR_ASSOC:
connUp = FALSE;
break;
case CM_INET_SCTP_CANT_STR_ASSOC:
- DU_LOG("Event : CANT START ASSOC");
+ DU_LOG("\nINFO --> Event : CANT START ASSOC");
connUp = FALSE;
break;
default:
connUp = FALSE;
break;
default:
- DU_LOG("\nInvalid event");
+ DU_LOG("\nERROR --> Invalid event");
break;
}
break;
case CM_INET_SCTP_PEER_ADDR_CHANGE :
break;
}
break;
case CM_INET_SCTP_PEER_ADDR_CHANGE :
- DU_LOG("\nSCTP : Peer Address Change notificarion received");
+ DU_LOG("\nINFO --> SCTP : Peer Address Change notificarion received");
/* Need to add handler */
break;
case CM_INET_SCTP_REMOTE_ERROR :
/* Need to add handler */
break;
case CM_INET_SCTP_REMOTE_ERROR :
- DU_LOG("\nSCTP : Remote Error notification received");
+ DU_LOG("\nINFO --> SCTP : Remote Error notification received");
break;
case CM_INET_SCTP_SEND_FAILED :
break;
case CM_INET_SCTP_SEND_FAILED :
- DU_LOG("\nSCTP : Send Failed notification received\n");
+ DU_LOG("\nINFO --> SCTP : Send Failed notification received\n");
break;
case CM_INET_SCTP_SHUTDOWN_EVENT : /* peer socket gracefully closed */
break;
case CM_INET_SCTP_SHUTDOWN_EVENT : /* peer socket gracefully closed */
- DU_LOG("\nSCTP : Shutdown Event notification received\n");
+ DU_LOG("\nINFO --> SCTP : Shutdown Event notification received\n");
connUp = FALSE;
exit(0);
break;
case CM_INET_SCTP_ADAPTATION_INDICATION :
connUp = FALSE;
exit(0);
break;
case CM_INET_SCTP_ADAPTATION_INDICATION :
- DU_LOG("\nSCTP : Adaptation Indication received\n");
+ DU_LOG("\nINFO --> SCTP : Adaptation Indication received\n");
break;
case CM_INET_SCTP_PARTIAL_DELIVERY_EVENT:
break;
case CM_INET_SCTP_PARTIAL_DELIVERY_EVENT:
- DU_LOG("\nSCTP : Partial Delivery Event received\n");
+ DU_LOG("\nINFO --> SCTP : Partial Delivery Event received\n");
- DU_LOG("\nSCTP : Invalid notification type\n");
+ DU_LOG("\nERROR --> SCTP : Invalid notification type\n");
CM_INET_FD_ZERO(&e2PollParams.readFd);
CM_INET_FD_ZERO(&e2PollParams.readFd);
- DU_LOG("\nSCTP : Polling started at RIC\n");
+ DU_LOG("\nINFO --> SCTP : Polling started at RIC\n");
while(1)
{
if((ret = processPolling(&e2PollParams, &ricParams.sockFd, timeoutPtr, &memInfo)) != ROK)
{
while(1)
{
if((ret = processPolling(&e2PollParams, &ricParams.sockFd, timeoutPtr, &memInfo)) != ROK)
{
- DU_LOG("\nSCTP : Failed to RecvMsg for E2 at RIC \n");
+ DU_LOG("\nERROR --> SCTP : Failed to RecvMsg for E2 at RIC \n");
ret = sctpNtfyHdlr(&pollParams->ntfy);
if(ret != ROK)
{
ret = sctpNtfyHdlr(&pollParams->ntfy);
if(ret != ROK)
{
- DU_LOG("\nSCTP : Failed to process sctp notify msg\n");
+ DU_LOG("\nERROR --> SCTP : Failed to process sctp notify msg\n");
}
}
else if(connUp & (pollParams->port == ricParams.destPort))
}
}
else if(connUp & (pollParams->port == ricParams.destPort))
if(ret != ROK && ret != RWOULDBLOCK)
{
if(ret != ROK && ret != RWOULDBLOCK)
{
- DU_LOG("\nSCTP : Send message failed");
+ DU_LOG("\nERROR --> SCTP : Send message failed");