X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_sctp.c;h=e435cfe25742fcf91970cbe22ad3701b5b9bea44;hb=def50dc175cebc67238db5f1acd5ff322a2279bd;hp=dbc74ba4e00fbe7cea000ef6eb64098df65dc1d3;hpb=4d45b914f9e94203603d3b9fdbcb1aad361301dd;p=o-du%2Fl2.git diff --git a/src/du_app/du_sctp.c b/src/du_app/du_sctp.c index dbc74ba4e..e435cfe25 100644 --- a/src/du_app/du_sctp.c +++ b/src/du_app/du_sctp.c @@ -149,8 +149,8 @@ uint8_t duCheckReqStatus(CmStatus *cfm) uint8_t duSctpCfgReq(SctpParams sctpCfg) { - uint8_t ret = ROK; - CmStatus cfm; + uint8_t ret = ROK; + CmStatus cfm; /* Fill F1 Params */ f1Params.destIpAddr.ipV4Pres = sctpCfg.cuIpAddr.ipV4Pres; @@ -159,7 +159,7 @@ uint8_t duSctpCfgReq(SctpParams sctpCfg) f1Params.itfState = DU_SCTP_DOWN; f1Params.srcPort = sctpCfg.duPort[F1_INTERFACE]; f1Params.recvMsgSet = ROK; - memset ((uint8_t *)&f1Params.sockFd, -1, sizeof(CmInetFd)); + memset (&f1Params.sockFd, -1, sizeof(CmInetFd)); fillDestNetAddr(&f1Params.destIpNetAddr, &f1Params.destIpAddr); fillAddrLst(&f1Params.destAddrLst, &f1Params.destIpAddr); @@ -170,7 +170,7 @@ uint8_t duSctpCfgReq(SctpParams sctpCfg) ricParams.itfState = DU_SCTP_DOWN; ricParams.srcPort = sctpCfg.duPort[E2_INTERFACE]; ricParams.recvMsgSet = ROK; - memset ((uint8_t *)&ricParams.sockFd, -1, sizeof(CmInetFd)); + memset (&ricParams.sockFd, -1, sizeof(CmInetFd)); fillDestNetAddr(&ricParams.destIpNetAddr, &ricParams.destIpAddr); fillAddrLst(&ricParams.destAddrLst, &ricParams.destIpAddr); @@ -212,7 +212,7 @@ uint8_t fillAddrLst(CmInetNetAddrLst *addrLstPtr, F1IpAddr *ipAddr) { addrLstPtr->count++; addrLstPtr->addrs[(addrLstPtr->count - 1)].type = CM_INET_IPV4ADDR_TYPE; - addrLstPtr->addrs[(addrLstPtr->count - 1)].u.ipv4NetAddr = CM_INET_NTOH_U32(ipAddr->ipV4Addr); + addrLstPtr->addrs[(addrLstPtr->count - 1)].u.ipv4NetAddr = CM_INET_NTOH_UINT32(ipAddr->ipV4Addr); return ROK; } @@ -239,7 +239,7 @@ uint8_t fillDestNetAddr(CmInetNetAddr *destAddrPtr, F1IpAddr *dstIpPtr) { /* Filling destination address */ destAddrPtr->type = CM_INET_IPV4ADDR_TYPE; - destAddrPtr->u.ipv4NetAddr = CM_INET_NTOH_U32(dstIpPtr->ipV4Addr); + destAddrPtr->u.ipv4NetAddr = CM_INET_NTOH_UINT32(dstIpPtr->ipV4Addr); return ROK; } @@ -332,8 +332,8 @@ uint8_t establishReq(DuSctpDestCb *paramPtr) uint8_t duSctpAssocReq(uint8_t itfType) { - uint8_t ret = ROK; - CmStatus cfm; + uint8_t ret = ROK; + CmStatus cfm; DuSctpDestCb *paramPtr = NULLP; DU_ALLOC(paramPtr, sizeof(DuSctpDestCb)); @@ -396,12 +396,12 @@ uint8_t duSctpAssocReq(uint8_t itfType) uint8_t duFillSctpPst(Pst *pst, Event event) { Buffer *mBuf; - if(ODU_GET_MSG(DFLT_REGION, DU_POOL, &mBuf) != ROK) + if(ODU_GET_MSG_BUF(DFLT_REGION, DU_POOL, &mBuf) != ROK) { printf("\nDU_APP : Failed to allocate memory"); return RFAILED; } - memset((uint8_t *)pst, 0, sizeof(Pst)); + memset(pst, 0, sizeof(Pst)); pst->srcEnt = (Ent)ENTDUAPP; pst->srcInst = (Inst)DU_INST; pst->srcProcId = DU_PROC; @@ -479,7 +479,7 @@ void sendToDuApp(Buffer *mBuf, Event event) ODU_PRINT_MSG(mBuf, 0, 0); - memset((uint8_t *)&(pst), 0, sizeof(Pst)); + memset(&(pst), 0, sizeof(Pst)); pst.srcEnt = (Ent)ENTSCTP; pst.srcInst = (Inst)SCTP_INST; pst.srcProcId = DU_PROC; @@ -577,7 +577,7 @@ uint8_t sctpNtfyHdlr(CmInetSctpNotification *ntfy, uint8_t *itfState) /* Pack notification and send to APP */ DU_LOG("\nSCTP : Forwarding received message to duApp"); - memset((uint8_t *)&(pst), 0, sizeof(Pst)); + memset(&(pst), 0, sizeof(Pst)); pst.srcEnt = (Ent)ENTSCTP; pst.srcInst = (Inst)SCTP_INST; pst.srcProcId = DU_PROC; @@ -624,7 +624,7 @@ uint8_t processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32 { uint8_t ret = ROK; CM_INET_FD_SET(sockFd, &pollParams->readFd); - ret = cmInetSelect(&pollParams->readFd, NULLP, timeoutPtr, &pollParams->numFd); + ret = cmInetSelect(&pollParams->readFd, NULLP, timeoutPtr, (int16_t *)&pollParams->numFd); if(CM_INET_FD_ISSET(sockFd, &pollParams->readFd)) { CM_INET_FD_CLR(sockFd, &pollParams->readFd); @@ -672,7 +672,7 @@ uint8_t processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32 else { - ODU_PUT_MSG(pollParams->mBuf); + ODU_PUT_MSG_BUF(pollParams->mBuf); } } } @@ -696,9 +696,9 @@ uint8_t processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32 * ****************************************************************/ uint8_t sctpSockPoll() { - uint8_t ret = ROK; - uint32_t timeout; - uint32_t *timeout_Ptr; + uint8_t ret = ROK; + uint32_t timeout; + uint32_t *timeout_Ptr; CmInetMemInfo memInfo; sctpSockPollParams f1PollParams, e2PollParams;