U8, U16, U32 data type changes
[o-du/l2.git] / src / du_app / du_sctp.c
index 9df6cc9..e435cfe 100644 (file)
@@ -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));
@@ -401,7 +401,7 @@ uint8_t duFillSctpPst(Pst *pst, Event event)
       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);
@@ -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;