U8, U16, U32 data type changes
[o-du/l2.git] / src / cm / cm_inet.c
index 1785db4..ae9e047 100644 (file)
@@ -152,6 +152,7 @@ extern "C" {
 #ifdef NTL_LIB
 #include "ntl_lib.h"
 #endif 
+#include "du_log.h"
 
 \f  
 /* local defines */
@@ -246,7 +247,7 @@ extern "C" {
 #if (!(defined(WIN32)) && !(defined(CMINETFLATBUF)))
 /* Added another function parameter */
 PRIVATE S16 buildRecvBuf ARGS((CmInetMemInfo *info, MsgLen len, 
-                               CmInetIovec rxArr[], Buffer *dBuf[], U16 maxSize,
+                               CmInetIovec rxArr[], Buffer *dBuf[], uint16_t maxSize,
                                struct msghdr *msg, Bool isStrmMsg));
 PRIVATE S16 buildRecvMsg ARGS((CmInetMemInfo *info, CmInetIovec rxArr[], 
                                S16 numBduf, MsgLen msgLen, Buffer *dBufs[], 
@@ -256,7 +257,7 @@ PRIVATE S16 buildRecvMsg ARGS((CmInetMemInfo *info, CmInetIovec rxArr[],
  */
 PRIVATE S16 buildSendIovec ARGS((Buffer *mBuf, MsgLen msgLen, 
                                  CmInetIovec txArr[], S16 numDBuf, 
-                                 S16 *numIovElems, U32 *strtEndDBufNum,
+                                 S16 *numIovElems, uint32_t *strtEndDBufNum,
                                  MsgLen *ioLen)); 
 #endif /* (defined(WIN32)) && !(defined(CMINETFLATBUF)) */
 
@@ -266,29 +267,29 @@ PRIVATE S16 buildSendIovec ARGS((Buffer *mBuf, MsgLen msgLen,
 #ifdef IPV6_SUPPORTED
 #ifdef IPV6_OPTS_SUPPORTED
 PRIVATE S16 cmInet6BuildSendHBHOpts    ARGS((CmInetIpv6HBHHdrArr *hbhOptsArr, 
-                                            U8 *cmsgBuf, U32 *curMsgIdx, 
-                                            U8 hdrId));
+                                            uint8_t *cmsgBuf, uint32_t *curMsgIdx, 
+                                            uint8_t hdrId));
 PRIVATE S16 cmInet6BuildSendRouteOpts  ARGS((CmInetIpv6RtHdr *rtOptsArr, 
-                                            U8 *cmsgBuf, U32 *curMsgIdx));
+                                            uint8_t *cmsgBuf, uint32_t *curMsgIdx));
 
-PRIVATE S16 cmInet6BuildRecvRtHdr      ARGS((U8 *cmsgData, U32 rtDataLen, 
+PRIVATE S16 cmInet6BuildRecvRtHdr      ARGS((uint8_t *cmsgData, uint32_t rtDataLen, 
                                             CmInetIpv6RtHdr0 *rtHdr0, 
                                             CmInetIpv6RtHdr *rtOptsArr,
                                             CmInetMemInfo *info));
-PRIVATE S16 cmInet6BuildRecvHopOptsArr ARGS((U8 *cmsgData, U32 hbhDataLen, 
+PRIVATE S16 cmInet6BuildRecvHopOptsArr ARGS((uint8_t *cmsgData, uint32_t hbhDataLen, 
                                             CmInetIpv6HBHHdrArr *hbhOptsArr, 
-                                            U8 hdrId, CmInetMemInfo *info));
-PRIVATE S16 cmInet6GetHopLimitValue    ARGS((U8 *cmsgData, U32 hopLimitDataLen,
+                                            uint8_t hdrId, CmInetMemInfo *info));
+PRIVATE S16 cmInet6GetHopLimitValue    ARGS((uint8_t *cmsgData, uint32_t hopLimitDataLen,
                                             CmInetIpv6HdrParm *ipv6HdrParam));
 
 #ifdef SS_LINUX
-PRIVATE S16 cmInetBuildSendHoplimit        ARGS((U32 hoplimit, U8 *cmsgBuf, 
-                                            U32 *curMsgIdx));
+PRIVATE S16 cmInetBuildSendHoplimit        ARGS((uint32_t hoplimit, uint8_t *cmsgBuf, 
+                                            uint32_t *curMsgIdx));
 #endif /* SS_LINUX */
 #ifdef LOCAL_INTF
 PRIVATE S16 cmInet6BuildSendPktinfo         ARGS((CmInetIpAddr6 *srcAddr,
-                                            U8 *cmsgBuf, U32 *curMsgIdx,
-                                            U8 protType));
+                                            uint8_t *cmsgBuf, uint32_t *curMsgIdx,
+                                            uint8_t protType));
 #endif /* LOCAL_INTF */
 #endif /* IPV6_OPTS_SUPPORTED */
 #endif /* IPV6_SUPPORTED */
@@ -320,24 +321,23 @@ Txt   prntBuf[CMINET_PRNT_BUF_SIZE];
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPoll
+S16 cmInetPoll
 (
 CmInetPollFd  *pollFdArr,               /* poll FD Array */
-U32               numFds,               /* Number of Fds to be monitored */
+uint32_t               numFds,               /* Number of Fds to be monitored */
 S16              *numRdyFds,            /* number of ready descriptors */
-U32              timeout                /* timeout value for Poll */
+uint32_t              timeout                /* timeout value for Poll */
 )
 #else
-PUBLIC S16 cmInetPoll(pollFdArr,numFds,numRdyFds,timeout)
+S16 cmInetPoll(pollFdArr,numFds,numRdyFds,timeout)
 CmInetPollFd  *pollFdArr;               /* poll FD Array */
-U32               numFds;               /* Number of Fds to be monitored */
+uint32_t               numFds;               /* Number of Fds to be monitored */
 S16              *numRdyFds;            /* number of ready descriptors */
-U32               timeout;              /* timeout value for Poll */
+uint32_t               timeout;              /* timeout value for Poll */
 #endif
 {
    S32  ret;
 
-   TRC2(cmInetPoll); 
    ret = 0;
    *numRdyFds = 0;
 
@@ -352,7 +352,7 @@ U32               timeout;              /* timeout value for Poll */
 #endif
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */      
-      RETVALUE(RFAILED);
+      return RFAILED;
    } 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -364,21 +364,21 @@ U32               timeout;              /* timeout value for Poll */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPoll() : Invalid Parameter (pollFdArr is NULL)");
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */      
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
    ret = poll(pollFdArr,numFds,timeout);
    if (ret == 0)
    { 
-      RETVALUE(RTIMEOUT);
+      return (RTIMEOUT);
    }
    if (ret == INET_ERR)
    {
       switch(INET_ERR_CODE)
       {
          case ERR_EINTR:
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
 
          default:
 #ifdef CMINETDBG
@@ -387,14 +387,14 @@ U32               timeout;              /* timeout value for Poll */
                     error(%d)\n", __FILE__, __LINE__, INET_ERR_CODE);
             SPrint(prntBuf);
 #endif /* CMINETDBG */
-            RETVALUE(RFAILED);
+            return RFAILED;
 
       } /* end of switch */
    }
    
    *numRdyFds = (S16)ret;
   
-   RETVALUE(ROK);
+   return ROK;
 
 }
 
@@ -414,23 +414,22 @@ U32               timeout;              /* timeout value for Poll */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPollSetFd
+S16 cmInetPollSetFd
 (
 CmInetFd         *sockFd,               /* socket file descriptor */
 CmInetPollFd  *pollFdArr,               /* poll FD Array */
 S16               idx,                  /* poll Fd Array Index */
-U16               eventMask             /* Event Mask to be set */
+uint16_t               eventMask             /* Event Mask to be set */
 )
 #else
-PUBLIC S16 cmInetPollSetFd(sockFd,pollFdArr,idx,eventMask)
+S16 cmInetPollSetFd(sockFd,pollFdArr,idx,eventMask)
 CmInetFd         *sockFd;               /* socket file descriptor */
 CmInetPollFd  *pollFdArr;               /* poll FD Array */
 S16              idx;                   /* poll Fd Array Index */
-U16              eventMask;             /* Event Mask to be set */
+uint16_t              eventMask;             /* Event Mask to be set */
 #endif
 {
    
-   TRC2(cmInetPollSetFd); 
 
    if ((idx) >= CM_INET_POLL_MAXFDSUPP || (idx) < 0)
    {
@@ -440,7 +439,7 @@ U16              eventMask;             /* Event Mask to be set */
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -452,7 +451,7 @@ U16              eventMask;             /* Event Mask to be set */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollSetFd() : Invalid Parameter (pollFdArr is NULL)");
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */      
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -490,7 +489,7 @@ U16              eventMask;             /* Event Mask to be set */
 #endif /*ALIGN_64BIT */
 #endif /* CMINETDBG */
 
-   RETVALUE(ROK);
+   return ROK;
 
 }
 
@@ -511,22 +510,21 @@ U16              eventMask;             /* Event Mask to be set */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPollFdIsSet
+S16 cmInetPollFdIsSet
 (
 CmInetPollFd  *pollFdArr,            /* poll FD Array */
 S16               idx,               /* poll Fd Array Index */
-U16               eventMask          /* Event Mask to be set */
+uint16_t               eventMask          /* Event Mask to be set */
 )
 #else
-PUBLIC S16 cmInetPollFdIsSet(pollFdArr,idx,eventMask)
+S16 cmInetPollFdIsSet(pollFdArr,idx,eventMask)
 CmInetPollFd  *pollFdArr;            /* poll FD Array */
 S16               idx;               /* poll Fd Array Index */
-U16               eventMask;         /* Event Mask to be set */
+uint16_t               eventMask;         /* Event Mask to be set */
 #endif
 {
    S16  ret;
 
-   TRC2(cmInetPollFdIsSet); 
 
    if((idx < 0) || (idx > CM_INET_POLL_MAXFDSUPP))
    {
@@ -534,7 +532,7 @@ U16               eventMask;         /* Event Mask to be set */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollFdIsSet() : Invalid Index (%d) \n",idx);
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -546,13 +544,13 @@ U16               eventMask;         /* Event Mask to be set */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollFdIsSet() : Invalid Parameter (pollFdArr is NULL)");
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */      
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
    ret = (pollFdArr[idx].revents & eventMask);
 
-   RETVALUE(ret);
+   return (ret);
 }
 
 /*
@@ -571,21 +569,20 @@ U16               eventMask;         /* Event Mask to be set */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPollClearFdREvent
+S16 cmInetPollClearFdREvent
 (
 CmInetPollFd  *pollFdArr,            /* poll FD Array */
 S16               idx,               /* poll Fd Array Index */
-U16               eventMask          /* Event Mask to be set */
+uint16_t               eventMask          /* Event Mask to be set */
 )
 #else
-PUBLIC S16 cmInetPollClearFdREvent(sockFd,pollFdArr,eventMask)
+S16 cmInetPollClearFdREvent(sockFd,pollFdArr,eventMask)
 CmInetPollFd  *pollFdArr;            /* poll FD Array */
 S16               idx;               /* poll Fd Array Index */
-U16               eventMask;         /* Event Mask to be set */
+uint16_t               eventMask;         /* Event Mask to be set */
 #endif
 {
 
-   TRC2(cmInetPollClearFdREvent); 
 
 
    if((idx < 0) || (idx > CM_INET_POLL_MAXFDSUPP))
@@ -595,7 +592,7 @@ U16               eventMask;         /* Event Mask to be set */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollClearFdREvent() : Invalid Index (%d) \n",idx);
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -607,7 +604,7 @@ U16               eventMask;         /* Event Mask to be set */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollClearFdREvent() : Invalid Parameter (pollFdArr is NULL)");
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */      
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -642,7 +639,7 @@ U16               eventMask;         /* Event Mask to be set */
 #endif /*ALIGN_64BIT */
 #endif /* CMINETDBG */
 
-   RETVALUE(ROK);
+   return ROK;
 
 }
 
@@ -663,21 +660,20 @@ U16               eventMask;         /* Event Mask to be set */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPollClearFdEvent
+S16 cmInetPollClearFdEvent
 (
 CmInetPollFd  *pollFdArr,            /* poll FD Array */
 S16               idx,               /* poll Fd Array Index */
-U16               eventMask          /* Event Mask to be set */
+uint16_t               eventMask          /* Event Mask to be set */
 )
 #else
-PUBLIC S16 cmInetPollClearFdEvent(sockFd,pollFdArr,eventMask)
+S16 cmInetPollClearFdEvent(sockFd,pollFdArr,eventMask)
 CmInetPollFd   *pollFdArr;            /* poll FD Array */
 S16             idx;                  /* poll Fd Array Index */
-U16             eventMask;            /* Event Mask to be set */
+uint16_t             eventMask;            /* Event Mask to be set */
 #endif
 {
 
-   TRC2(cmInetPollClearFdEvent); 
 
 
    if((idx < 0) || (idx > CM_INET_POLL_MAXFDSUPP))
@@ -687,7 +683,7 @@ U16             eventMask;            /* Event Mask to be set */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollClearFdEvent() : Invalid Index (%d) \n",idx);
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
@@ -699,7 +695,7 @@ U16             eventMask;            /* Event Mask to be set */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollClearFdEvent() : Invalid Parameter (pollFdArr is NULL)");
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */      
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -734,7 +730,7 @@ U16             eventMask;            /* Event Mask to be set */
 #endif /*ALIGN_64BIT */
 #endif /* CMINETDBG */
 
-   RETVALUE(ROK);
+   return ROK;
 
 }
 
@@ -762,21 +758,20 @@ U16             eventMask;            /* Event Mask to be set */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPollDelFd
+S16 cmInetPollDelFd
 (
 CmInetPollFd  *pollFdArr,             /* poll FD Array */
 S16               delIdx,             /* poll Fd Array Index for which fd has to be deleted*/
 S16               lastIdx             /* Last index of poll Fd Array */
 )
 #else
-PUBLIC S16 cmInetPollDelFd(pollFdArr, delIdx, lastIdx)
+S16 cmInetPollDelFd(pollFdArr, delIdx, lastIdx)
 CmInetPollFd  *pollFdArr;            /* poll FD Array */
 S16               delIdx;            /* poll Fd Array Index for which fd has to be deleted*/
 S16               lastIdx;           /* Last index of poll Fd Array */
 #endif
 {
 
-   TRC2(cmInetPollDelFd); 
 
    if(lastIdx < delIdx || lastIdx < 0 || delIdx < 0)
    {
@@ -785,7 +780,7 @@ S16               lastIdx;           /* Last index of poll Fd Array */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollDelFd() : Invalid Index \n Current Index (%d) Delete Index (%d) \n",lastIdx,delIdx);
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 
@@ -797,7 +792,7 @@ S16               lastIdx;           /* Last index of poll Fd Array */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollDelFd() : Invalid Parameter (pollFdArr is NULL)");
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */      
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -823,7 +818,7 @@ S16               lastIdx;           /* Last index of poll Fd Array */
    pollFdArr[lastIdx].events = 0;
    pollFdArr[lastIdx].revents = 0;
    
-   RETVALUE(ROK);
+   return ROK;
 
 }
 
@@ -845,18 +840,17 @@ S16               lastIdx;           /* Last index of poll Fd Array */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPollInitFdArr
+S16 cmInetPollInitFdArr
 (
 CmInetPollFd  *pollFdArr             /* poll FD Array */
 )
 #else
-PUBLIC S16 cmInetPollInitFdArr(pollFdArr)
+S16 cmInetPollInitFdArr(pollFdArr)
 CmInetPollFd  *pollFdArr;            /* poll FD Array */
 #endif
 {
    S16 idx;
 
-   TRC2(cmInetPollInitFdArr); 
 /* Sets each element of pollFdArr to initial value
    fd = -1
    events = 0
@@ -871,7 +865,7 @@ CmInetPollFd  *pollFdArr;            /* poll FD Array */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetPollInitFdArr() : Invalid Parameter (pollFdArr is NULL)");
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINETXXX, 0, prntBuf);
 #endif /* CMINETDBG */      
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -881,7 +875,7 @@ CmInetPollFd  *pollFdArr;            /* poll FD Array */
       pollFdArr[idx].events = 0;
       pollFdArr[idx].revents = 0;
    }
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #if (!(defined(WIN32)) && !(defined(CMINETFLATBUF)))
@@ -908,7 +902,7 @@ CmInetMemInfo  *info,           /* buffer allocation info */
 MsgLen          len,            /* message length */
 CmInetIovec     rxArr[],        /* gather array */
 Buffer         *dBuf[],         /* allocated dBufs */
-U16             maxSize,        /* size of rxArr/dBuf array */       
+uint16_t             maxSize,        /* size of rxArr/dBuf array */       
 struct msghdr  *msg,            /* message header for recvmsg() */           
 Bool           isStrmMsg        /* Is a TCP message */
 )
@@ -918,14 +912,14 @@ PRIVATE S16 buildRecvBuf(info, len, rxArr, dBuf, maxSize, msg, isStrmMsg)
    MsgLen           len;           /* message length */        
    CmInetIovec      rxArr[];       /* gather array */         
    Buffer          *dBuf[];        /* allocated dBufs */
-   U16              maxSize;       /* size of rxArr/dBuf array */       
+   uint16_t              maxSize;       /* size of rxArr/dBuf array */       
    struct msghdr   *msg;           /* message header for recvmsg() */        
    Bool            isStrmMsg;      /* Is a TCP message */
 #endif
 {
    S16     ret;                 /* temporary return value */
-   U16     numBuf;              /* number of dBufs */
-   U16     i;                   /* dBuf index counter */
+   uint16_t     numBuf;              /* number of dBufs */
+   uint16_t     i;                   /* dBuf index counter */
    Data   *dPtr;                /* data pointer */
    /* cm_inet_c_001.main_47: 102069 Changed from S32 to MsgLen for bufLen*/
    MsgLen  bufLen;              /* entire receive buffer length, if S16 
@@ -955,13 +949,13 @@ PRIVATE S16 buildRecvBuf(info, len, rxArr, dBuf, maxSize, msg, isStrmMsg)
 
 #ifdef T2K_MEM_LEAK_DBG
    char * file = __FILE__;
-   U32  line   = __LINE__;
+   uint32_t  line   = __LINE__;
    ret = SGetDBuf(info->region, info->pool, &dBuf[numBuf]); 
 #else
    ret = SGetDBuf(info->region, info->pool, &dBuf[numBuf]); 
 #endif
    if (ret != ROK)
-      RETVALUE(ret);
+      return (ret);
 
    /* Get the data part */
    ret = SGetDataRx(dBuf[numBuf], 0, &dPtr, &dLen);
@@ -985,7 +979,7 @@ PRIVATE S16 buildRecvBuf(info, len, rxArr, dBuf, maxSize, msg, isStrmMsg)
 
 #ifdef SS_LINUX
   rxArr[numBuf].iov_base = (Void*)dPtr;  
-  rxArr[numBuf].iov_len = (U32)dLen;    
+  rxArr[numBuf].iov_len = (uint32_t)dLen;    
 #else
   rxArr[numBuf].iov_base = (S8*)dPtr;
   rxArr[numBuf].iov_len = dLen;
@@ -1016,7 +1010,7 @@ PRIVATE S16 buildRecvBuf(info, len, rxArr, dBuf, maxSize, msg, isStrmMsg)
       }
 #ifdef SS_LINUX
       rxArr[numBuf].iov_base = (Void*)dPtr;  
-      rxArr[numBuf].iov_len = (U32)dLen;    
+      rxArr[numBuf].iov_len = (uint32_t)dLen;    
 #else
       rxArr[numBuf].iov_base = (S8*)dPtr;
       rxArr[numBuf].iov_len = dLen;
@@ -1036,7 +1030,7 @@ PRIVATE S16 buildRecvBuf(info, len, rxArr, dBuf, maxSize, msg, isStrmMsg)
    msg->msg_iov           = rxArr;
    msg->msg_iovlen        = numBuf;
 
-   RETVALUE(ret);
+   return (ret);
 
 cleanup:
    /* cleanup */
@@ -1045,7 +1039,7 @@ cleanup:
 
    msg->msg_iovlen = 0;
 
-   RETVALUE(ret);
+   return (ret);
 } /* end of buildRecvBuf */
 
 /*
@@ -1132,7 +1126,7 @@ cleanup:
    {
 #ifdef T2K_MEM_LEAK_DBG
    char * file = __FILE__;
-   U32  line   = __LINE__;
+   uint32_t  line   = __LINE__;
    SPutDBuf(info->region, info->pool, dBufs[i]);
 #else
    SPutDBuf(info->region, info->pool, dBufs[i]);
@@ -1140,7 +1134,7 @@ cleanup:
     i++;
    }
 
-   RETVALUE(ret);
+   return (ret);
 } /* end of buildRecvMsg */
 
 \f
@@ -1171,7 +1165,7 @@ MsgLen         msgLen,          /* Length of mBuf */
 CmInetIovec    txArr[],         /* transmit scatter vector array */ 
 S16            numDBufs,        /* Maximum number of dBufs to use */
 S16            *numIovElems,    /* Number of iov elements in array */
-U32            *strtEndDBufNum, /* dBuf number to start and end */
+uint32_t            *strtEndDBufNum, /* dBuf number to start and end */
 MsgLen         *ioLen           /* cm_inet_c_001.main_50 - Len of dbuf packed into IO-vector */ 
 )
 #else
@@ -1182,7 +1176,7 @@ MsgLen         msgLen;          /* Length of mBuf */
 CmInetIovec    txArr[];         /* transmit scatter vector array */ 
 S16            numDBufs;        /* Maximum number of dBufs to use */
 S16            *numIovElems;    /* Number of iov elements in array */
-U32            *strtEndDBufNum; /* dBuf number to start and end */
+uint32_t            *strtEndDBufNum; /* dBuf number to start and end */
 MsgLen         *ioLen;          /* cm_inet_c_001.main_50 - Len of dbuf packed into IO-vector */ 
 #endif
 {
@@ -1192,7 +1186,7 @@ MsgLen         *ioLen;          /* cm_inet_c_001.main_50 - Len of dbuf packed in
    Buffer      *dBuf;
    Data        *dPtr;
    MsgLen      allocLen;
-   U32         dBufsToSkip;
+   uint32_t         dBufsToSkip;
 
    /* Initialisations */
    (*numIovElems) = 0;
@@ -1206,7 +1200,7 @@ MsgLen         *ioLen;          /* cm_inet_c_001.main_50 - Len of dbuf packed in
    ret = SInitNxtDBuf(mBuf);
    if (ret != ROK)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    iovIdx = 0;
@@ -1221,7 +1215,7 @@ MsgLen         *ioLen;          /* cm_inet_c_001.main_50 - Len of dbuf packed in
       {
          ret = SGetNxtDBuf(mBuf, &dBuf);
          if (ret != ROK)
-            RETVALUE(RFAILED);
+            return RFAILED;
          dBufsToSkip --;
       }
    }
@@ -1272,7 +1266,7 @@ MsgLen         *ioLen;          /* cm_inet_c_001.main_50 - Len of dbuf packed in
    /* cm_inet_c_001.main_50 - Assign the value of dbufs packed in IO-vector */
    *ioLen = allocLen;
 
-   RETVALUE(ret);
+   return (ret);
 
 } /* end of buildSendIovec */
 #endif /* (defined(WIN32)) && !(defined(CMINETFLATBUF)) */
@@ -1301,59 +1295,58 @@ MsgLen         *ioLen;          /* cm_inet_c_001.main_50 - Len of dbuf packed in
 #ifdef ANSI
 #ifdef CM_INET2  
 #ifdef IPV6_SUPPORTED
-PUBLIC S16 cmInetSocket
+S16 cmInetSocket
 (
-U8        type,                 /* socket type */
+uint8_t        type,                 /* socket type */
 CmInetFd *sockFd,               /* socket file descriptor */
-U8       protocol,              /* protocol value */
-U8       domain                 /* domain */
+uint8_t       protocol,              /* protocol value */
+uint8_t       domain                 /* domain */
 )
 #else
-PUBLIC S16 cmInetSocket
+S16 cmInetSocket
 (
-U8        type,                 /* socket type */
+uint8_t        type,                 /* socket type */
 CmInetFd *sockFd,               /* socket file descriptor */
-U8       protocol               /* protocol value */
+uint8_t       protocol               /* protocol value */
 )
 #endif /* IPV6_SUPPORTED */
 #else   /* CM_INET2 */ 
-PUBLIC S16 cmInetSocket
+S16 cmInetSocket
 (
-U8        type,                 /* socket type */
+uint8_t        type,                 /* socket type */
 CmInetFd *sockFd                /* socket file descriptor */
 )
 #endif /* CM_INET2 */ 
 #else
 #ifdef CM_INET2  
 #ifdef IPV6_SUPPORTED
-PUBLIC S16 cmInetSocket(type, sockFd, protocol, domain)
-U8        type;                 /* socket type */
+S16 cmInetSocket(type, sockFd, protocol, domain)
+uint8_t        type;                 /* socket type */
 CmInetFd *sockFd;               /* socket file descriptor */
-U8        protocol;             /* protocol value */
-U8        domain;               /* domain */
+uint8_t        protocol;             /* protocol value */
+uint8_t        domain;               /* domain */
 #else
-PUBLIC S16 cmInetSocket(type, sockFd, protocol)
-U8        type;                 /* socket type */
+S16 cmInetSocket(type, sockFd, protocol)
+uint8_t        type;                 /* socket type */
 CmInetFd *sockFd;               /* socket file descriptor */
-U8        protocol;             /* protocol value */
+uint8_t        protocol;             /* protocol value */
 #endif /* IPV6_SUPPORTED */
 #else /* CM_INET2 */ 
-PUBLIC S16 cmInetSocket(type, sockFd)
-U8        type;                 /* socket type */
+S16 cmInetSocket(type, sockFd)
+uint8_t        type;                 /* socket type */
 CmInetFd *sockFd;               /* socket file descriptor */
 #endif /* CM_INET2 */ 
 #endif /* ANSI */
 {
    S32 ret;                     /* temporary return value */
 
-   U32 optVal;
+   uint32_t optVal;
 
 #if (defined(WIN32) && defined(WIN2K))
    S32 bytesReturned;
    Bool bNewBehavior;
 #endif /* WIN2K && WIN32 */
 
-   TRC2(cmInetSocket);
 
 #if (defined(WIN32) && defined(WIN2K))
    bytesReturned = 0;
@@ -1387,7 +1380,7 @@ CmInetFd *sockFd;               /* socket file descriptor */
 #endif /* CMINETDBG */
       /* Set sockFd->fd to invalid socket */
       sockFd->fd = CM_INET_INV_SOCKFD;
-      RETVALUE(RFAILED);   
+      return RFAILED;   
    }
 
    /* set socket type */
@@ -1409,7 +1402,7 @@ CmInetFd *sockFd;               /* socket file descriptor */
    if (ret != ROK) 
    {
       ret = cmInetClose(sockFd);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #ifdef SS_LINUX
@@ -1419,7 +1412,7 @@ CmInetFd *sockFd;               /* socket file descriptor */
    if (ret != ROK) 
    {
       ret = cmInetClose(sockFd);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* CMINET_BSDCOMPAT */
 #endif /* SS_LINUX */
@@ -1447,7 +1440,7 @@ CmInetFd *sockFd;               /* socket file descriptor */
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */      
             ret = cmInetClose(sockFd);
-            RETVALUE(RFAILED);
+            return RFAILED;
          }
       }
 #endif /* WIN2K && WIN32 */   
@@ -1466,12 +1459,12 @@ CmInetFd *sockFd;               /* socket file descriptor */
       if (ret != ROK)
       {
          ret = cmInetClose(sockFd);
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
    }
 #endif  /* CM_LKSCTP_NONBLOCK ends */
 #endif
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetSocket */
 
 \f
@@ -1492,13 +1485,13 @@ CmInetFd *sockFd;               /* socket file descriptor */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetBind
+S16 cmInetBind
 (
 CmInetFd   *sockFd,             /* socket file descriptor */ 
 CmInetAddr *myAddr              /* locale Internet address/port */
 )
 #else
-PUBLIC S16 cmInetBind(sockFd, myAddr)
+S16 cmInetBind(sockFd, myAddr)
 CmInetFd   *sockFd;             /* socket file descriptor */ 
 CmInetAddr *myAddr;             /* locale Internet address/port */
 #endif
@@ -1508,29 +1501,28 @@ CmInetAddr *myAddr;             /* locale Internet address/port */
 #ifdef IPV6_SUPPORTED 
    struct sockaddr_in6 srcAddr6; /* local IPV6 address/port */
 #ifdef CMINETDBG
-   U16    port;
+   uint16_t    port;
 #endif /* CMINETDBG */
 #endif /* IPV6_SUPPORTED */
-   U32    sizeOfAddr;            /* sizeof address passed to the bind call */
+   uint32_t    sizeOfAddr;            /* sizeof address passed to the bind call */
    CmInetSockAddr *sockAddrPtr; 
 
-   TRC2(cmInetBind);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
        (myAddr == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
 #ifdef IPV6_SUPPORTED 
    if (myAddr->type == CM_INET_IPV6ADDR_TYPE)
    {
-      cmMemset((U8*)&srcAddr6, 0, sizeof(srcAddr6));
+      memset(&srcAddr6, 0, sizeof(srcAddr6));
       srcAddr6.sin6_family      = AF_INET6;
-      srcAddr6.sin6_port        = CM_INET_HTON_U16(myAddr->u.ipv6Addr.port);
+      srcAddr6.sin6_port        = CM_INET_HTON_UINT16(myAddr->u.ipv6Addr.port);
       CM_INET_COPY_IPV6ADDR(&srcAddr6.sin6_addr, 
                             &myAddr->u.ipv6Addr.ipv6NetAddr);
       sizeOfAddr               = sizeof(struct sockaddr_in6);
@@ -1538,18 +1530,18 @@ CmInetAddr *myAddr;             /* locale Internet address/port */
    }
    else 
    {
-      cmMemset((U8*)&srcAddr, 0, sizeof(srcAddr));
+      memset(&srcAddr, 0, sizeof(srcAddr));
       srcAddr.sin_family      = AF_INET;
-      srcAddr.sin_port        = CM_INET_HTON_U16(myAddr->u.ipv4Addr.port);
-      srcAddr.sin_addr.s_addr = CM_INET_HTON_U32(myAddr->u.ipv4Addr.address);
+      srcAddr.sin_port        = CM_INET_HTON_UINT16(myAddr->u.ipv4Addr.port);
+      srcAddr.sin_addr.s_addr = CM_INET_HTON_UINT32(myAddr->u.ipv4Addr.address);
       sizeOfAddr               = sizeof(struct sockaddr_in);
       sockAddrPtr              = (CmInetSockAddr *)&srcAddr;
    }
 #else 
-   cmMemset((U8*)&srcAddr, 0, sizeof(srcAddr));
+   memset(&srcAddr, 0, sizeof(srcAddr));
    srcAddr.sin_family      = AF_INET;
-   srcAddr.sin_port        = CM_INET_HTON_U16(myAddr->port);
-   srcAddr.sin_addr.s_addr = CM_INET_HTON_U32(myAddr->address);
+   srcAddr.sin_port        = CM_INET_HTON_UINT16(myAddr->port);
+   srcAddr.sin_addr.s_addr = CM_INET_HTON_UINT32(myAddr->address);
    sizeOfAddr              = sizeof(struct sockaddr_in);
    sockAddrPtr             = (CmInetSockAddr *)&srcAddr;
 #endif /* IPV6_SUPPORTED */
@@ -1593,10 +1585,10 @@ CmInetAddr *myAddr;             /* locale Internet address/port */
 #endif /*ALIGN_64BIT*/
 #endif /* IPV6_SUPPORTED */
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK)
+   return ROK
 } /* end of cmInetBind */
 
 /*cm_inet_c_001.main_38 Updated for TUCL 2.1 Release (Kernel SCTP Support) */
@@ -1618,23 +1610,23 @@ CmInetAddr *myAddr;             /* locale Internet address/port */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetSctpBindx
+S16 cmInetSctpBindx
 (
 CmInetFd          *sockFd,       /* socket file descriptor */ 
 CmInetNetAddrLst  *addrLst,      /* local Internet address list */
-U16                port          /* port number */
+uint16_t                port          /* port number */
 )
 #else
-PUBLIC S16 cmInetSctpBindx(sockFd, addrLst, port)
+S16 cmInetSctpBindx(sockFd, addrLst, port)
 CmInetFd          *sockFd;       /* socket file descriptor */ 
 CmInetNetAddrLst  *addrLst;      /* locale Internet address list */
-U16                port;         /* port number */
+uint16_t                port;         /* port number */
 #endif
 {
    S32    ret;                     /* temporary return value */
    S32    idx;
    S32    idx4 = 0;
-   U32    ipv4_array_size = 0;
+   uint32_t    ipv4_array_size = 0;
    struct sockaddr_in  addrs[CM_INET_NUM_NET_ADDR];
 #ifndef IPV6_SUPPORTED
    Data   address_array[(CM_INET_NUM_NET_ADDR * sizeof(struct sockaddr_in))];
@@ -1645,26 +1637,26 @@ U16                port;         /* port number */
 #ifdef SUN_KSCTP
    Data   *tempAddrPtr = NULLP;
 #endif 
-   U32    addresses_array_size = 0;
+   uint32_t    addresses_array_size = 0;
 #ifdef IPV6_SUPPORTED 
 #ifdef SUN_KSCTP
    S8     *addrString = NULLP;
-   U32    addrLen = 0;
+   uint32_t    addrLen = 0;
    S8     ipv4Format[23] = "::ffff:";
 #endif /* SUN_KSCTP */
    S32    idx6 = 0;
-   U32    ipv6_array_size = 0;
+   uint32_t    ipv6_array_size = 0;
    struct sockaddr_in6 addrs6[CM_INET_NUM_NET_ADDR];
 #endif /* IPV6_SUPPORTED */
    struct sockaddr *sockAddrPtr = NULLP;
-   U32    sockAddrLen = 0;
+   uint32_t    sockAddrLen = 0;
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
        (addrLst == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if(addrLst->count > CM_INET_NUM_NET_ADDR)
@@ -1685,13 +1677,13 @@ U16                port;         /* port number */
       CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET005, 0, prntBuf);   
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
-   cmMemset((U8*)&addrs, 0, (sizeof(struct sockaddr_in) * CM_INET_NUM_NET_ADDR));
+   memset(&addrs, 0, (sizeof(struct sockaddr_in) * CM_INET_NUM_NET_ADDR));
 #ifdef IPV6_SUPPORTED 
-   cmMemset((U8*)&addrs6, 0, (sizeof(struct sockaddr_in6) * CM_INET_NUM_NET_ADDR));
+   memset(&addrs6, 0, (sizeof(struct sockaddr_in6) * CM_INET_NUM_NET_ADDR));
 #endif /* IPV6_SUPPORTED */
 
    for (idx = 0; idx < addrLst->count; idx++)
@@ -1717,11 +1709,11 @@ U16                port;         /* port number */
             CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET057, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-            RETVALUE(RFAILED);
+            return RFAILED;
          }
 
          addrs6[idx6].sin6_family      = AF_INET6;
-         addrs6[idx6].sin6_port        = CM_INET_HTON_U16(port);
+         addrs6[idx6].sin6_port        = CM_INET_HTON_UINT16(port);
          CM_INET_COPY_IPV6ADDR((addrs6[idx6].sin6_addr.s6_addr), &(addrLst->addrs[idx].u.ipv6NetAddr));
          idx6++;
       }
@@ -1747,15 +1739,15 @@ U16                port;         /* port number */
             CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET058, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-            RETVALUE(RFAILED);
+            return RFAILED;
          }
 
          addrs6[idx6].sin6_family      = AF_INET6;
-         addrs6[idx6].sin6_port        = CM_INET_HTON_U16(port);
-         addrLst->addrs[idx].u.ipv4NetAddr = CM_INET_HTON_U32(addrLst->addrs[idx].u.ipv4NetAddr);
+         addrs6[idx6].sin6_port        = CM_INET_HTON_UINT16(port);
+         addrLst->addrs[idx].u.ipv4NetAddr = CM_INET_HTON_UINT32(addrLst->addrs[idx].u.ipv4NetAddr);
          cmInetNtoa(addrLst->addrs[idx].u.ipv4NetAddr, &addrString);
-         addrLen = cmStrlen((U8*)addrString);
-         cmMemcpy((U8*)(ipv4Format+7), (U8*)addrString, addrLen);
+         addrLen = cmStrlen((uint8_t*)addrString);
+         memcpy((ipv4Format+7), addrString, addrLen);
          ipv4Format[7+addrLen] = '\0';
          cmInetPton6((CmInetIpAddr6*)(addrs6[idx6].sin6_addr.s6_addr), ipv4Format);
          idx6++;
@@ -1763,8 +1755,8 @@ U16                port;         /* port number */
          ipv4_array_size += sizeof(struct sockaddr_in);
          addresses_array_size += sizeof(struct sockaddr_in);
          addrs[idx4].sin_family      = AF_INET;
-         addrs[idx4].sin_port        = CM_INET_HTON_U16(port);
-         addrs[idx4].sin_addr.s_addr = CM_INET_HTON_U32(addrLst->addrs[idx].u.ipv4NetAddr);
+         addrs[idx4].sin_port        = CM_INET_HTON_UINT16(port);
+         addrs[idx4].sin_addr.s_addr = CM_INET_HTON_UINT32(addrLst->addrs[idx].u.ipv4NetAddr);
          idx4++;
 #endif /* SUN_KSCTP */
       }
@@ -1772,8 +1764,8 @@ U16                port;         /* port number */
       ipv4_array_size += sizeof(struct sockaddr_in);
       addresses_array_size += sizeof(struct sockaddr_in);
       addrs[idx4].sin_family      = AF_INET;
-      addrs[idx4].sin_port        = CM_INET_HTON_U16(port);
-      addrs[idx4].sin_addr.s_addr = CM_INET_HTON_U32(addrLst->addrs[idx].u.ipv4NetAddr);
+      addrs[idx4].sin_port        = CM_INET_HTON_UINT16(port);
+      addrs[idx4].sin_addr.s_addr = CM_INET_HTON_UINT32(addrLst->addrs[idx].u.ipv4NetAddr);
       idx4++;
 #endif /* IPV6_SUPPORTED */
    }
@@ -1783,7 +1775,7 @@ U16                port;         /* port number */
    {
        sockAddrPtr = (struct sockaddr*)address_array;
       sockAddrLen = sizeof(struct sockaddr_in);
-      cmMemcpy((U8*)address_array, (U8*)addrs, ipv4_array_size); 
+      memcpy(address_array, addrs, ipv4_array_size); 
    }
 #ifdef IPV6_SUPPORTED
    else
@@ -1794,7 +1786,7 @@ U16                port;         /* port number */
 
    if(ipv6_array_size > 0)
    {
-      cmMemcpy((U8*)(address_array + ipv4_array_size), (U8*)addrs6, ipv6_array_size); 
+      memcpy((address_array + ipv4_array_size), addrs6, ipv6_array_size); 
    }
 #endif /* IPV6_SUPPORTED */
 
@@ -1818,7 +1810,7 @@ U16                port;         /* port number */
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET006, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if (addrLst->count > 1)
@@ -1849,7 +1841,7 @@ U16                port;         /* port number */
          CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET059, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 
       ret = sctp_bindx(sockFd->fd, (Void*)tempAddrPtr, addrLst->count - 1, SCTP_BINDX_ADD_ADDR); 
@@ -1857,6 +1849,8 @@ U16                port;         /* port number */
 #else
    /* linux */
    ret = sctp_bindx(sockFd->fd, (struct sockaddr*)address_array, addrLst->count, SCTP_BINDX_ADD_ADDR); 
+       UNUSED(sockAddrPtr);
+       UNUSED(sockAddrLen);
 #endif
    if (ret == INET_ERR)
    {
@@ -1874,10 +1868,10 @@ U16                port;         /* port number */
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET007, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK)
+   return ROK
 }
 
 /*
@@ -1895,30 +1889,34 @@ U16                port;         /* port number */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetSctpConnectx
+S16 cmInetSctpConnectx
 (
 CmInetFd          *sockFd,       /* socket file descriptor */ 
 CmInetNetAddr     *primAddr,     /* primary destination Internet address */
 CmInetNetAddrLst  *addrLst,      /* destination Internet address list */
-U16                port          /* port number */
+uint16_t                port          /* port number */
 )
 #else
-PUBLIC S16 cmInetSctpConnectx(sockFd, primAddr, addrLst, port)
+S16 cmInetSctpConnectx(sockFd, primAddr, addrLst, port)
 CmInetFd          *sockFd;       /* socket file descriptor */ 
 CmInetNetAddr     *primAddr;     /* primary destination Internet address */
 CmInetNetAddrLst  *addrLst;      /* destination Internet address list */
-U16                port;         /* port number */
+uint16_t                port;         /* port number */
 #endif
 {
    S32   ret;   
-   U32   cnt;
+   uint32_t   cnt;
    /* cm_inet_c_001.main_46: Removed SS_LINUX flag */
    S32   idx;
 
-   U32    addresses_array_size = 0;
-   U32    idx4 = 0;
+/* cm_inet_c_001.main_64: New variable used as an argument for sctp_connectx */
+#ifdef SCTP_CONNECTX_NEW
+   uint32_t    assocId = 0;
+#endif   
+   uint32_t    addresses_array_size = 0;
+   uint32_t    idx4 = 0;
    struct sockaddr_in  addrs[CM_INET_NUM_NET_ADDR];
-   U32    ipv4_array_size = 0;
+   uint32_t    ipv4_array_size = 0;
 
 #ifndef IPV6_SUPPORTED
    Data   address_array[(CM_INET_NUM_NET_ADDR * sizeof(struct sockaddr_in))];
@@ -1929,16 +1927,16 @@ U16                port;         /* port number */
 #ifdef IPV6_SUPPORTED
 #ifdef SUN_KSCTP
    S8     *addrString = NULLP;
-   U32    addrLen = 0;
+   uint32_t    addrLen = 0;
    S8     ipv4Format[23] = "::ffff:";
    CmInetIpAddr ipv4NetAddr;
 #endif /* SUN_KSCTP */
-   U32    idx6 = 0;
+   uint32_t    idx6 = 0;
    struct sockaddr_in6  addrs6[CM_INET_NUM_NET_ADDR];
-   U32    ipv6_array_size = 0;
+   uint32_t    ipv6_array_size = 0;
 #endif /* IPV6_SUPPORTED */
 #ifndef SS_LINUX
-   U32    sockAddrLen = 0;
+   uint32_t    sockAddrLen = 0;
 #endif /* sockAddrLen */
 
 #ifndef SS_LINUX
@@ -1949,12 +1947,12 @@ U16                port;         /* port number */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
          (primAddr == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
     /* cm_inet_c_001.main_58 : Added check for addrLst to fix klockwork issue */
    if (addrLst == NULLP)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* cm_inet_c_001.main_46: Included check for no of address aginst max */
    if( addrLst->count > CM_INET_NUM_NET_ADDR )
@@ -1975,14 +1973,14 @@ U16                port;         /* port number */
       CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET060, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
 
-   cmMemset((U8*)&addrs, 0, (sizeof(struct sockaddr_in) * CM_INET_NUM_NET_ADDR));
+   memset(&addrs, 0, (sizeof(struct sockaddr_in) * CM_INET_NUM_NET_ADDR));
 #ifdef IPV6_SUPPORTED
-   cmMemset((U8*)&addrs6, 0, (sizeof(struct sockaddr_in6) * CM_INET_NUM_NET_ADDR));
+   memset(&addrs6, 0, (sizeof(struct sockaddr_in6) * CM_INET_NUM_NET_ADDR));
 #endif /* IPV6_SUPPORTED */
 
    cnt = 0;
@@ -2006,11 +2004,11 @@ U16                port;         /* port number */
          CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET008, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 
       addrs6[idx6].sin6_family      = AF_INET6;
-      addrs6[idx6].sin6_port        = CM_INET_HTON_U16(port);
+      addrs6[idx6].sin6_port        = CM_INET_HTON_UINT16(port);
       CM_INET_COPY_IPV6ADDR(&(addrs6[idx6].sin6_addr.s6_addr), &(primAddr->u.ipv6NetAddr));
       addresses_array_size += sizeof(struct sockaddr_in6);
       ipv6_array_size += sizeof(struct sockaddr_in6);
@@ -2035,14 +2033,14 @@ U16                port;         /* port number */
          CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET061, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
       addrs6[idx6].sin6_family      = AF_INET6;
-      addrs6[idx6].sin6_port        = CM_INET_HTON_U16(port);
-      ipv4NetAddr = CM_INET_HTON_U32(primAddr->u.ipv4NetAddr);
+      addrs6[idx6].sin6_port        = CM_INET_HTON_UINT16(port);
+      ipv4NetAddr = CM_INET_HTON_UINT32(primAddr->u.ipv4NetAddr);
       cmInetNtoa(ipv4NetAddr, &addrString);
-      addrLen = cmStrlen((U8*)addrString);
-      cmMemcpy((U8*)(ipv4Format+7), (U8*)addrString, addrLen);
+      addrLen = cmStrlen((uint8_t*)addrString);
+      memcpy((ipv4Format+7), addrString, addrLen);
       ipv4Format[7+addrLen] = '\0';
       cmInetPton6((CmInetIpAddr6*)&(addrs6[idx6].sin6_addr), ipv4Format);
       addresses_array_size += sizeof(struct sockaddr_in6);
@@ -2050,8 +2048,8 @@ U16                port;         /* port number */
       idx6++;
 #else
       addrs[idx4].sin_family      = AF_INET;
-      addrs[idx4].sin_port        = CM_INET_HTON_U16(port);
-      addrs[idx4].sin_addr.s_addr = CM_INET_HTON_U32(primAddr->u.ipv4NetAddr);
+      addrs[idx4].sin_port        = CM_INET_HTON_UINT16(port);
+      addrs[idx4].sin_addr.s_addr = CM_INET_HTON_UINT32(primAddr->u.ipv4NetAddr);
       addresses_array_size += sizeof(struct sockaddr_in);
       ipv4_array_size += sizeof(struct sockaddr_in);
       idx4++;
@@ -2059,8 +2057,8 @@ U16                port;         /* port number */
    }
 #else 
    addrs[idx4].sin_family      = AF_INET;
-   addrs[idx4].sin_port        = CM_INET_HTON_U16(port);
-   addrs[idx4].sin_addr.s_addr = CM_INET_HTON_U32(primAddr->u.ipv4NetAddr);
+   addrs[idx4].sin_port        = CM_INET_HTON_UINT16(port);
+   addrs[idx4].sin_addr.s_addr = CM_INET_HTON_UINT32(primAddr->u.ipv4NetAddr);
    addresses_array_size += sizeof(struct sockaddr_in);
    ipv4_array_size += sizeof(struct sockaddr_in);
    idx4++;
@@ -2112,11 +2110,11 @@ U16                port;         /* port number */
                CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET009, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-               RETVALUE(RFAILED);
+               return RFAILED;
             }
 
             addrs6[idx6].sin6_family      = AF_INET6;
-            addrs6[idx6].sin6_port        = CM_INET_HTON_U16(port);
+            addrs6[idx6].sin6_port        = CM_INET_HTON_UINT16(port);
             CM_INET_COPY_IPV6ADDR(&(addrs6[idx6].sin6_addr.s6_addr),
                                   &(addrLst->addrs[idx].u.ipv6NetAddr));
             addresses_array_size += sizeof(struct sockaddr_in6);
@@ -2142,14 +2140,14 @@ U16                port;         /* port number */
                CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET062, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-               RETVALUE(RFAILED);
+               return RFAILED;
             }
             addrs6[idx6].sin6_family      = AF_INET6;
-            addrs6[idx6].sin6_port        = CM_INET_HTON_U16(port);
-            ipv4NetAddr = CM_INET_HTON_U32(addrLst->addrs[idx].u.ipv4NetAddr);
+            addrs6[idx6].sin6_port        = CM_INET_HTON_UINT16(port);
+            ipv4NetAddr = CM_INET_HTON_UINT32(addrLst->addrs[idx].u.ipv4NetAddr);
             cmInetNtoa(ipv4NetAddr, &addrString);
-            addrLen = cmStrlen((U8*)addrString);
-            cmMemcpy((U8*)(ipv4Format+7), (U8*)addrString, addrLen);
+            addrLen = cmStrlen((uint8_t*)addrString);
+            memcpy((ipv4Format+7), addrString, addrLen);
             ipv4Format[7+addrLen] = '\0';
             cmInetPton6((CmInetIpAddr6*)(addrs6[idx6].sin6_addr.s6_addr), ipv4Format);
             addresses_array_size += sizeof(struct sockaddr_in6);
@@ -2157,8 +2155,8 @@ U16                port;         /* port number */
             idx6++;
 #else
             addrs[idx4].sin_family      = AF_INET;
-            addrs[idx4].sin_port        = CM_INET_HTON_U16(port);
-            addrs[idx4].sin_addr.s_addr = CM_INET_HTON_U32(addrLst->addrs[idx].u.ipv4NetAddr);
+            addrs[idx4].sin_port        = CM_INET_HTON_UINT16(port);
+            addrs[idx4].sin_addr.s_addr = CM_INET_HTON_UINT32(addrLst->addrs[idx].u.ipv4NetAddr);
             addresses_array_size += sizeof(struct sockaddr_in);
             ipv4_array_size += sizeof(struct sockaddr_in);
             idx4++;
@@ -2166,8 +2164,8 @@ U16                port;         /* port number */
          }
 #else 
          addrs[idx4].sin_family      = AF_INET;
-         addrs[idx4].sin_port        = CM_INET_HTON_U16(port);
-         addrs[idx4].sin_addr.s_addr = CM_INET_HTON_U32(addrLst->addrs[idx].u.ipv4NetAddr);
+         addrs[idx4].sin_port        = CM_INET_HTON_UINT16(port);
+         addrs[idx4].sin_addr.s_addr = CM_INET_HTON_UINT32(addrLst->addrs[idx].u.ipv4NetAddr);
          addresses_array_size += sizeof(struct sockaddr_in);
          ipv4_array_size += sizeof(struct sockaddr_in);
          idx4++;
@@ -2183,25 +2181,31 @@ U16                port;         /* port number */
    if((ipv4_array_size > 0) && (ipv4_array_size <= (CM_INET_NUM_NET_ADDR * \
                sizeof(struct sockaddr_in))))
    {
-      cmMemcpy((U8*)address_array, (U8*)&addrs[0], ipv4_array_size); 
+      memcpy(address_array, &addrs[0], ipv4_array_size); 
    }
    else
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
+
 #ifdef IPV6_SUPPORTED
    if((ipv6_array_size > 0) && (ipv6_array_size <= (CM_INET_NUM_NET_ADDR * \
                sizeof(struct sockaddr_in))))
    {
-      cmMemcpy((U8*)(address_array + ipv4_array_size), (U8*)addrs6, ipv6_array_size); 
+      memcpy((address_array + ipv4_array_size), addrs6, ipv6_array_size); 
    }
    else
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* IPV6_SUPPORTED */
 
+/* cm_inet_c_001.main_64: Support for new definition of sctp_connectx */
+#ifndef SCTP_CONNECTX_NEW   
    ret = sctp_connectx(sockFd->fd, (struct sockaddr*)address_array, cnt);
+#else
+   ret = sctp_connectx(sockFd->fd, (struct sockaddr*)address_array, cnt, (sctp_assoc_t *)&assocId);
+#endif
 
 #else
    /* solaris */
@@ -2284,10 +2288,8 @@ U16                port;         /* port number */
             " sockFd->fd(%ld)\n", INET_ERR_CODE, port, sockFd->fd);
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET010, 0, prntBuf);
 #else
-      /* cm_inet_c_001.main_62:Warning fix */
-      snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "CmInetSctpConnectx() Failed : error(%d), port(0x%1x),"
-            " sockFd->fd(%d)\n", INET_ERR_CODE, port, sockFd->fd);
-      CMINETLOGERROR(ERRCLS_DEBUG, ECMINET010, 0, prntBuf);
+      DU_LOG("\nCmInetSctpConnectx() Failed : error(%d), port(0x%1x),\
+                  sockFd->fd(%d)\n", INET_ERR_CODE, port, sockFd->fd);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
 
@@ -2295,7 +2297,7 @@ U16                port;         /* port number */
       {
          /* non-blocking: connection is in progress */
          case ERR_INPROGRESS:
-            RETVALUE(RINPROGRESS);
+            return (RINPROGRESS);
             break;   
 
          /* 
@@ -2303,37 +2305,37 @@ U16                port;         /* port number */
           * blocking    : connection is already established
           */
          case ERR_ISCONN:
-            RETVALUE(RISCONN);
+            return (RISCONN);
             break;               
 
          /* resource temporarily unavailable */
          case ERR_WOULDBLOCK:
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
             break;
 
          /* non-blocking: connection is in progress */
          case ERR_ALREADY:
-            RETVALUE(RINPROGRESS);
+            return (RINPROGRESS);
             break;
 
          case ERR_INVAL:
-            RETVALUE(RINPROGRESS);
+            return (RINPROGRESS);
             break;
 
          /*  Check for connection refused and timeout errors */
          case ERR_CONNREFUSED:
          case ERR_TIMEDOUT:
-            RETVALUE(RCLOSED);
+            return (RCLOSED);
             break;
 
          /* it is a real error */ 
          default:
-            RETVALUE(RFAILED);
+            return RFAILED;
             break;
       }
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -2351,16 +2353,16 @@ U16                port;         /* port number */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetSctpPeelOff
+S16 cmInetSctpPeelOff
 (
 CmInetFd          *sockFd,       /* socket file descriptor */ 
-U32                assocId,      /* association id */
+uint32_t                assocId,      /* association id */
 CmInetFdType      *assocFd       /* association fd */
 )
 #else
-PUBLIC S16 cmInetSctpPeelOff(sockFd, assocId, assocFd)
+S16 cmInetSctpPeelOff(sockFd, assocId, assocFd)
 CmInetFd          *sockFd;       /* socket file descriptor */ 
-U32                assocId;      /* association id */
+uint32_t                assocId;      /* association id */
 CmInetFdType      *assocFd;      /* association fd */
 #endif
 {
@@ -2370,7 +2372,7 @@ CmInetFdType      *assocFd;      /* association fd */
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) || (assocFd == NULLP)) 
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -2394,12 +2396,12 @@ CmInetFdType      *assocFd;      /* association fd */
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    *assocFd = ret;
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -2417,34 +2419,34 @@ CmInetFdType      *assocFd;      /* association fd */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetSctpSendMsg
+S16 cmInetSctpSendMsg
 (
 CmInetFd        *sockFd,       /* socket file descriptor */ 
 CmInetNetAddr   *dstAddr,      /* destination Internet address/port */
-U16              port,         /* destination port no. */
+uint16_t              port,         /* destination port no. */
 CmInetMemInfo   *info,         /* buffer allocation info */
 Buffer          *mBuf,         /* buffer structure to send */
 MsgLen          *len,          /* number of actually sent octets */
-U16              strmId,       /* sctp stream identifier */
+uint16_t              strmId,       /* sctp stream identifier */
 Bool             unorderFlg,   /* flag to enable the unordered delivery */
-U16              ttl,          /* time to live */
-U32              ppId,         /* opaque value passed along with the message */
-U32              context       /* value to be passed back, if error occurs */
+uint16_t              ttl,          /* time to live */
+uint32_t              ppId,         /* opaque value passed along with the message */
+uint32_t              context       /* value to be passed back, if error occurs */
 )
 #else
-PUBLIC S16 cmInetSctpSendMsg(sockFd, dstAddr, port, info, mBuf, len, strmId, 
+S16 cmInetSctpSendMsg(sockFd, dstAddr, port, info, mBuf, len, strmId, 
                              unorderFlg, ttl, ppId, context)
 CmInetFd        *sockFd;       /* socket file descriptor */ 
 CmInetNetAddr   *dstAddr;      /* destination Internet address/port */
-U16              port;         /* destination port no. */
+uint16_t              port;         /* destination port no. */
 CmInetMemInfo   *info;         /* buffer allocation info */
 Buffer          *mBuf;         /* buffer structure to send */
 MsgLen          *len;          /* number of actually sent octets */
-U16              strmId;       /* sctp stream identifier */
+uint16_t              strmId;       /* sctp stream identifier */
 Bool             unorderFlg;   /* flag to enable the unordered delivery */
-U16              ttl;          /* time to live */
-U32              ppId;         /* opaque value passed along with the message */
-U32              context;      /* value to be passed back, if error occurs */
+uint16_t              ttl;          /* time to live */
+uint32_t              ppId;         /* opaque value passed along with the message */
+uint32_t              context;      /* value to be passed back, if error occurs */
 #endif
 {
    S32     ret;   
@@ -2452,7 +2454,7 @@ U32              context;      /* value to be passed back, if error occurs */
    MsgLen  msgLen = 0;              /* message length */    
    MsgLen  bufLen = 0;              /* send buffer length */     
    Data   *sendBuf = NULLP;             /* plain send buffer */
-   U32     flags;
+   uint32_t     flags;
    CmInetSockAddr *sockAddrPtr = NULLP;
    /* cm_inet_c_001.main_58 : Fix for klockwork issue */
    MsgLen          sockAddrLen = 0; 
@@ -2460,7 +2462,7 @@ U32              context;      /* value to be passed back, if error occurs */
 #ifdef IPV6_SUPPORTED
 #ifdef SUN_KSCTP
    S8     *addrString = NULLP;
-   U32    addrLen = 0;
+   uint32_t    addrLen = 0;
    S8     ipv4Format[23] = "::ffff:";
    CmInetIpAddr ipv4NetAddr;
 #endif /* SUN_KSCTP */
@@ -2472,38 +2474,38 @@ U32              context;      /* value to be passed back, if error occurs */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd)
        || (info == NULLP) || (mBuf == NULLP) || (len == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
 
-   cmMemset((U8*)&addr, 0, sizeof(struct sockaddr_in));
+   memset(&addr, 0, sizeof(struct sockaddr_in));
 #ifdef IPV6_SUPPORTED
-   cmMemset((U8*)&addr6, 0, sizeof(struct sockaddr_in6));
+   memset(&addr6, 0, sizeof(struct sockaddr_in6));
 #endif /* IPV6_SUPPORTED */
 
    /* copy message to a flat buffer */
    ret = SFndLenMsg(mBuf, &bufLen);
    if (ret != ROK)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* max message length is limited to control the memory usage */
    /* casting bufLen to avoid warnings */
-   if ((bufLen > 0) && ((U32)bufLen > CM_INET_MAX_MSG_LEN))
+   if ((bufLen > 0) && ((uint32_t)bufLen > CM_INET_MAX_MSG_LEN))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    ret = SGetSBuf(info->region, info->pool, &sendBuf, bufLen);                  
    if (ret != ROK)
    {
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
    ret = SCpyMsgFix(mBuf, 0, bufLen, sendBuf, &msgLen);
    if ((ret != ROK) || (msgLen != bufLen)) 
    {
       SPutSBuf(info->region, info->pool, sendBuf, bufLen);       
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if ( dstAddr != NULLP)
@@ -2528,11 +2530,11 @@ U32              context;      /* value to be passed back, if error occurs */
             CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET012, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-            RETVALUE(RFAILED);
+            return RFAILED;
          }
 
          addr6.sin6_family      = AF_INET6;
-         addr6.sin6_port        = CM_INET_HTON_U16(port);
+         addr6.sin6_port        = CM_INET_HTON_UINT16(port);
          CM_INET_COPY_IPV6ADDR(&addr6.sin6_addr.s6_addr, &dstAddr->u.ipv6NetAddr); 
          sockAddrLen = sizeof(struct sockaddr_in6);
          sockAddrPtr = (CmInetSockAddr*)&addr6;
@@ -2557,30 +2559,30 @@ U32              context;      /* value to be passed back, if error occurs */
             CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET064, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-            RETVALUE(RFAILED);
+            return RFAILED;
          }
          addr6.sin6_family      = AF_INET6;
-         addr6.sin6_port        = CM_INET_HTON_U16(port);
-         ipv4NetAddr = CM_INET_HTON_U32(dstAddr->u.ipv4NetAddr);
+         addr6.sin6_port        = CM_INET_HTON_UINT16(port);
+         ipv4NetAddr = CM_INET_HTON_UINT32(dstAddr->u.ipv4NetAddr);
          cmInetNtoa(ipv4NetAddr, &addrString);
-         addrLen = cmStrlen((U8*)addrString);
-         cmMemcpy((U8*)(ipv4Format+7), (U8*)addrString, addrLen);
+         addrLen = cmStrlen((uint8_t*)addrString);
+         memcpy((ipv4Format+7), addrString, addrLen);
          ipv4Format[7+addrLen] = '\0';
          cmInetPton6((CmInetIpAddr6*)(addr6.sin6_addr.s6_addr), ipv4Format);
          sockAddrLen = sizeof(struct sockaddr_in6);
          sockAddrPtr = (CmInetSockAddr*)&addr6;
 #else
          addr.sin_family      = AF_INET;
-         addr.sin_port        = CM_INET_HTON_U16(port);
-         addr.sin_addr.s_addr = CM_INET_HTON_U32(dstAddr->u.ipv4NetAddr);
+         addr.sin_port        = CM_INET_HTON_UINT16(port);
+         addr.sin_addr.s_addr = CM_INET_HTON_UINT32(dstAddr->u.ipv4NetAddr);
          sockAddrLen = sizeof(struct sockaddr_in);
          sockAddrPtr = (CmInetSockAddr*)&addr;
 #endif /* SUN_KSCTP */
       }
 #else 
       addr.sin_family      = AF_INET;
-      addr.sin_port        = CM_INET_HTON_U16(port);
-      addr.sin_addr.s_addr = CM_INET_HTON_U32(dstAddr->u.ipv4NetAddr);
+      addr.sin_port        = CM_INET_HTON_UINT16(port);
+      addr.sin_addr.s_addr = CM_INET_HTON_UINT32(dstAddr->u.ipv4NetAddr);
       /* cm_inet_c_001.main_58 : Fix for Klockwork issue */
       sockAddrLen = (MsgLen)sizeof(struct sockaddr_in);
       sockAddrPtr = (CmInetSockAddr*)&addr;
@@ -2616,7 +2618,7 @@ U32              context;      /* value to be passed back, if error occurs */
 #endif
    }
    /*cm_inet_c_001.main_54: converting ppid to network*/
-   ppId = CM_INET_HTON_U32(ppId);
+   ppId = CM_INET_HTON_UINT32(ppId);
    ret = sctp_sendmsg(sockFd->fd, (Void*)sendBuf, bufLen, 
          (struct sockaddr*)sockAddrPtr, (size_t)sockAddrLen, 
          ppId, flags, strmId, ttl, context);
@@ -2642,11 +2644,11 @@ U32              context;      /* value to be passed back, if error occurs */
 #endif /* CMINETDBG */
 
       if ((INET_ERR_CODE == ERR_AGAIN) || (INET_ERR_CODE == ERR_WOULDBLOCK))
-         RETVALUE(RWOULDBLOCK);
+         return (RWOULDBLOCK);
       else if (INET_ERR_CODE == ERR_PIPE)
-         RETVALUE(RCLOSED);
+         return (RCLOSED);
       else 
-         RETVALUE(RFAILED);
+         return RFAILED;
    }
 
    /* cm_inet_c_001.main_58 : Fix for klockwork issue */
@@ -2655,7 +2657,7 @@ U32              context;      /* value to be passed back, if error occurs */
    /* cleanup */
    SPutSBuf(info->region, info->pool, sendBuf, bufLen);       
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -2673,29 +2675,29 @@ U32              context;      /* value to be passed back, if error occurs */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetSctpRecvMsg
+S16 cmInetSctpRecvMsg
 (
 CmInetFd               *sockFd,       /* socket file descriptor */ 
 CmInetNetAddr          *srcAddr,      /* source Internet address/port */
-U16                    *port,         /* source port no. */
+uint16_t                    *port,         /* source port no. */
 CmInetMemInfo          *meminfo,      /* buffer allocation info */
 Buffer                 **mBuf,         /* buffer structure received */
 MsgLen                 *len,          /* number of octets received */
 CmInetSctpSndRcvInfo   *sinfo,        /* sctp send-receive info */ 
-U32                    *flag,         /* flags */
+uint32_t                    *flag,         /* flags */
 CmInetSctpNotification *ntfy        /* notification parameters */
 )
 #else
-PUBLIC S16 cmInetSctpRecvMsg(sockFd, srcAddr, port, meminfo, mBuf, len, 
+S16 cmInetSctpRecvMsg(sockFd, srcAddr, port, meminfo, mBuf, len, 
                              sinfo, flag, ntfy)
 CmInetFd               *sockFd;       /* socket file descriptor */ 
 CmInetNetAddr          *srcAddr;      /* source Internet address/port */
-U16                    *port;         /* source port no. */
+uint16_t                    *port;         /* source port no. */
 CmInetMemInfo          *meminfo;      /* buffer allocation info */
 Buffer                 **mBuf;        /* buffer structure received */
 MsgLen                 *len;          /* number of octets received */
 CmInetSctpSndRcvInfo   *sinfo;        /* sctp send-receive info */ 
-U32                    *flag;         /* flags */
+uint32_t                    *flag;         /* flags */
 CmInetSctpNotification *ntfy;         /* notification parameters */
 #endif
 {
@@ -2722,14 +2724,14 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
        (srcAddr == NULLP) || (port == NULLP) || (meminfo == NULLP) || 
        (mBuf == NULLP) || (len == NULLP) || (sinfo == NULLP) || (flag == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
 
    *mBuf = NULLP;
    *len  = 0;
-   cmMemset((U8*)ntfy, 0, sizeof(CmInetSctpNotification));
+   memset(ntfy, 0, sizeof(CmInetSctpNotification));
 
    buflen = CM_INET_MAX_MSG_LEN;
 
@@ -2743,13 +2745,13 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "SGetSBuf failed to allocate memory\n");
       CMINETLOGERROR(ERRCLS_ADD_RES, ECMINET065, 0, prntBuf);
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    addrlen = sizeof(struct sockaddr_storage);
    msgFlags = 0;
-   cmMemset((U8*)&addr, 0, sizeof(struct sockaddr_storage));
-   cmMemset((U8*)&info, 0, sizeof(struct sctp_sndrcvinfo));
+   memset(&addr, 0, sizeof(struct sockaddr_storage));
+   memset(&info, 0, sizeof(struct sctp_sndrcvinfo));
 
    ret = sctp_recvmsg(sockFd->fd, (Void *)recvbuf, (size_t)buflen, 
                       (struct sockaddr*)&addr, &addrlen, &info, 
@@ -2766,14 +2768,12 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
             " sockFd->fd(%ld)\n", INET_ERR_CODE, sockFd->fd);
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET014, 0, prntBuf);
 #else
-      /* cm_inet_c_001.main_62:Warning fix */
-      snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "cmInetSctpRecvMsg() Failed : error(%d),"
-            " sockFd->fd(%d)\n",  INET_ERR_CODE, sockFd->fd);
-      CMINETLOGERROR(ERRCLS_DEBUG, ECMINET014, 0, prntBuf);
+      DU_LOG("\ncmInetSctpRecvMsg() Failed : error(%d), sockFd->fd(%d)", \
+         INET_ERR_CODE, sockFd->fd);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* save the length of the received message */
@@ -2783,15 +2783,15 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
 #ifdef IPV6_SUPPORTED 
    if (addr.ss_family == AF_INET6)
    {
-       U8 ipv4Format[12] = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xff};
+       uint8_t ipv4Format[12] = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xff};
        pAddr6 = (struct sockaddr_in6*)&addr;
-       *port = CM_INET_NTOH_U16(pAddr6->sin6_port);
+       *port = CM_INET_NTOH_UINT16(pAddr6->sin6_port);
 
       if((cmMemcmp(ipv4Format, pAddr6->sin6_addr.s6_addr, 12)) == 0)
       {
          srcAddr->type          = CM_INET_IPV4ADDR_TYPE;
-         cmMemcpy((U8*)&srcAddr->u.ipv4NetAddr, (U8*)((pAddr6->sin6_addr.s6_addr) + 12), sizeof(U32));
-         srcAddr->u.ipv4NetAddr = CM_INET_HTON_U32(srcAddr->u.ipv4NetAddr);
+         memcpy(&srcAddr->u.ipv4NetAddr, ((pAddr6->sin6_addr.s6_addr) + 12), sizeof(uint32_t));
+         srcAddr->u.ipv4NetAddr = CM_INET_HTON_uint32_t(srcAddr->u.ipv4NetAddr);
       }
 
       else
@@ -2803,15 +2803,15 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
    else 
    {
       pAddr = (struct sockaddr_in*)&addr;
-      *port = CM_INET_NTOH_U16(pAddr->sin_port);
+      *port = CM_INET_NTOH_UINT16(pAddr->sin_port);
       srcAddr->type          = CM_INET_IPV4ADDR_TYPE;
-      srcAddr->u.ipv4NetAddr = CM_INET_NTOH_U32(pAddr->sin_addr.s_addr);
+      srcAddr->u.ipv4NetAddr = CM_INET_NTOH_UINT32(pAddr->sin_addr.s_addr);
    }
 #else 
    pAddr = (struct sockaddr_in*)&addr;
-   *port = CM_INET_NTOH_U16(pAddr->sin_port);
+   *port = CM_INET_NTOH_UINT16(pAddr->sin_port);
    srcAddr->type          = CM_INET_IPV4ADDR_TYPE;
-   srcAddr->u.ipv4NetAddr = CM_INET_NTOH_U32(pAddr->sin_addr.s_addr);
+   srcAddr->u.ipv4NetAddr = CM_INET_NTOH_UINT32(pAddr->sin_addr.s_addr);
 #endif /* IPV6_SUPPORTED */
 
    /* fill sndrcv info */
@@ -2819,7 +2819,7 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
    sinfo->ssn        = info.sinfo_ssn;
    sinfo->flags      = info.sinfo_flags;
    /*cm_inet_c_001.main_54: converting ppid to host*/
-   sinfo->ppid       = CM_INET_NTOH_U32(info.sinfo_ppid);
+   sinfo->ppid       = CM_INET_NTOH_UINT32(info.sinfo_ppid);
    sinfo->context    = info.sinfo_context;
    sinfo->timetolive = info.sinfo_timetolive;
    sinfo->tsn        = info.sinfo_tsn;
@@ -2913,12 +2913,12 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
             {
                pAddr = (struct sockaddr_in*)&(sctpNtfy->sn_paddr_change.spc_aaddr);
                ntfy->u.paddrChange.addr.type = CM_INET_IPV4ADDR_TYPE;
-               ntfy->u.paddrChange.addr.u.ipv4NetAddr = CM_INET_NTOH_U32(pAddr->sin_addr.s_addr);
+               ntfy->u.paddrChange.addr.u.ipv4NetAddr = CM_INET_NTOH_UINT32(pAddr->sin_addr.s_addr);
             }
 #else 
             pAddr = (struct sockaddr_in*)&(sctpNtfy->sn_paddr_change.spc_aaddr);
             ntfy->u.paddrChange.addr.type = CM_INET_IPV4ADDR_TYPE;
-            ntfy->u.paddrChange.addr.u.ipv4NetAddr = CM_INET_NTOH_U32(pAddr->sin_addr.s_addr);
+            ntfy->u.paddrChange.addr.u.ipv4NetAddr = CM_INET_NTOH_UINT32(pAddr->sin_addr.s_addr);
 #endif /* IPV6_SUPPORTED */
 
             ntfy->u.paddrChange.error   = sctpNtfy->sn_paddr_change.spc_error;
@@ -2940,7 +2940,7 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
                ntfy->u.remoteErr.data = NULLP;
                break;
             }
-            cmMemcpy(ntfy->u.remoteErr.data,\
+            memcpy(ntfy->u.remoteErr.data,\
                   sctpNtfy->sn_remote_error.sre_data, datlen);
 #endif
             break;
@@ -2960,7 +2960,7 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
                ntfy->u.sndFailed.data = NULLP;
                break;
             }
-            cmMemcpy(ntfy->u.sndFailed.data,\
+            memcpy(ntfy->u.sndFailed.data,\
                   sctpNtfy->sn_send_failed.ssf_data, datlen );
 #endif
             ntfy->u.sndFailed.info.stream     = sctpNtfy->sn_send_failed.ssf_info.sinfo_stream;
@@ -3012,7 +3012,7 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
       if (ret != ROK)
       {
          SPutSBuf(meminfo->region, meminfo->pool, recvbuf, buflen);
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 
       ret = SAddPstMsgMult(recvbuf, *len, *mBuf);
@@ -3020,14 +3020,14 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
       {
          SPutMsg(*mBuf);
          SPutSBuf(meminfo->region, meminfo->pool, recvbuf, buflen);
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
    }
 
    /* cleanup */
    SPutSBuf(meminfo->region, meminfo->pool, recvbuf, buflen);       
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -3045,23 +3045,23 @@ CmInetSctpNotification *ntfy;         /* notification parameters */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetSctpGetPAddrs
+S16 cmInetSctpGetPAddrs
 (
 CmInetFd             *sockFd,       /* socket file descriptor */ 
-U32                   assocId,      /* association id */
+uint32_t                   assocId,      /* association id */
 CmInetNetAddrLst     *addrlst       /* peer address list */
 )
 #else
-PUBLIC S16 cmInetSctpGetPAddrs(sockFd, assocId, addrlst)
+S16 cmInetSctpGetPAddrs(sockFd, assocId, addrlst)
 CmInetFd             *sockFd;       /* socket file descriptor */ 
-U32                   assocId;      /* association id */
+uint32_t                   assocId;      /* association id */
 CmInetNetAddrLst     *addrlst;      /* peer address list */
 #endif
 {
    /* cm_inet_c_001.main_58 : Fix for Klockwork issue */
    S32   cnt;
    S32   idx;
-   U8    *byteAddress;   
+   uint8_t    *byteAddress;   
    struct sockaddr    *peerAddrList;
    struct sockaddr_in *pAddr;
 #ifdef IPV6_SUPPORTED
@@ -3092,10 +3092,10 @@ CmInetNetAddrLst     *addrlst;      /* peer address list */
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
 
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 
-   byteAddress = (U8*)peerAddrList;
+   byteAddress = (uint8_t*)peerAddrList;
    for (idx = 0; idx < cnt; idx++)
    {
 #ifdef IPV6_SUPPORTED 
@@ -3118,7 +3118,7 @@ CmInetNetAddrLst     *addrlst;      /* peer address list */
 #endif /* CMINETDBG */
 
             sctp_freepaddrs(peerAddrList);
-            RETVALUE(RFAILED);
+            return RFAILED;
          }
 
          pAddr6 = (struct sockaddr_in6*)byteAddress;
@@ -3131,23 +3131,23 @@ CmInetNetAddrLst     *addrlst;      /* peer address list */
       {
          pAddr = (struct sockaddr_in*)byteAddress;
          addrlst->addrs[idx].type          = CM_INET_IPV4ADDR_TYPE;
-         addrlst->addrs[idx].u.ipv4NetAddr = CM_INET_NTOH_U32(pAddr->sin_addr.s_addr);
+         addrlst->addrs[idx].u.ipv4NetAddr = CM_INET_NTOH_UINT32(pAddr->sin_addr.s_addr);
          byteAddress += sizeof(struct sockaddr_in);
       }
 #else 
       pAddr = (struct sockaddr_in*)byteAddress;
       addrlst->addrs[idx].type          = CM_INET_IPV4ADDR_TYPE;
-      addrlst->addrs[idx].u.ipv4NetAddr = CM_INET_NTOH_U32(pAddr->sin_addr.s_addr);
+      addrlst->addrs[idx].u.ipv4NetAddr = CM_INET_NTOH_UINT32(pAddr->sin_addr.s_addr);
       byteAddress += sizeof(struct sockaddr_in);
 #endif /* IPV6_SUPPORTED */
    }
 
    /* cm_inet_c_001.main_58 : Fix for klockwork issue */
-   addrlst->count = (U8)cnt;   
+   addrlst->count = (uint8_t)cnt;   
 
    sctp_freepaddrs(peerAddrList);
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /*
@@ -3165,18 +3165,18 @@ CmInetNetAddrLst     *addrlst;      /* peer address list */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetGetOpt
+S16 cmInetGetOpt
 (
 CmInetFd *sockFd,               /* socket file descriptor */ 
-U32       level,                /* option level */
-U32       type,                 /* option type */
+uint32_t       level,                /* option level */
+uint32_t       type,                 /* option type */
 Ptr       value                 /* option value */ 
 ) 
 #else
-PUBLIC S16 cmInetGetOpt(sockFd, level, type, value)
+S16 cmInetGetOpt(sockFd, level, type, value)
 CmInetFd *sockFd;               /* socket file descriptor */ 
-U32       level;                /* option level */
-U32       type;                 /* option type */
+uint32_t       level;                /* option level */
+uint32_t       type;                 /* option type */
 Ptr       value;                /* option value */
 #endif
 {
@@ -3202,13 +3202,12 @@ Ptr       value;                /* option value */
    /*cm_inet_c_001.main_58  : fix for klockwork issue */
    S32                     ret;
 
-   TRC2(cmInetGetOpt);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -3216,7 +3215,7 @@ Ptr       value;                /* option value */
    {
       case CM_INET_OPT_SCTP_GET_ASSOC_STA:
          pSctpStatus = (CmInetSctpStatus*)value;
-         cmMemset((U8*)&status, 0, sizeof(struct sctp_status));
+         memset(&status, 0, sizeof(struct sctp_status));
          len = sizeof(status);
          status.sstat_assoc_id = pSctpStatus->assocId;
 
@@ -3323,7 +3322,7 @@ Ptr       value;                /* option value */
 
             default:
                {
-                  RETVALUE(RFAILED);
+                  return RFAILED;
                }
                break;
          }
@@ -3332,7 +3331,7 @@ Ptr       value;                /* option value */
          if (status.sstat_primary.spinfo_address.ss_family == AF_INET6)
          {
             pAddr6 = (struct sockaddr_in6*)&(status.sstat_primary.spinfo_address);
-            pSctpStatus->primary.port = CM_INET_NTOH_U16(pAddr6->sin6_port);
+            pSctpStatus->primary.port = CM_INET_NTOH_UINT16(pAddr6->sin6_port);
 
             pSctpStatus->primary.addr.type = CM_INET_IPV6ADDR_TYPE;
             CM_INET_COPY_IPV6ADDR(&pSctpStatus->primary.addr.u.ipv6NetAddr, 
@@ -3341,31 +3340,33 @@ Ptr       value;                /* option value */
          else 
          {
             pAddr = (struct sockaddr_in*)&(status.sstat_primary.spinfo_address);
-            pSctpStatus->primary.port = CM_INET_NTOH_U16(pAddr->sin_port);
+            pSctpStatus->primary.port = CM_INET_NTOH_UINT16(pAddr->sin_port);
             pSctpStatus->primary.addr.type          = CM_INET_IPV4ADDR_TYPE;
-            pSctpStatus->primary.addr.u.ipv4NetAddr = CM_INET_NTOH_U32(pAddr->sin_addr.s_addr);
+            pSctpStatus->primary.addr.u.ipv4NetAddr = CM_INET_NTOH_UINT32(pAddr->sin_addr.s_addr);
          }
 #else 
          pAddr = (struct sockaddr_in*)&(status.sstat_primary.spinfo_address);
-         pSctpStatus->primary.port = CM_INET_NTOH_U16(pAddr->sin_port);
+         pSctpStatus->primary.port = CM_INET_NTOH_UINT16(pAddr->sin_port);
          pSctpStatus->primary.addr.type          = CM_INET_IPV4ADDR_TYPE;
-         pSctpStatus->primary.addr.u.ipv4NetAddr = CM_INET_NTOH_U32(pAddr->sin_addr.s_addr);
+         pSctpStatus->primary.addr.u.ipv4NetAddr = CM_INET_NTOH_UINT32(pAddr->sin_addr.s_addr);
 #endif /* IPV6_SUPPORTED */
 
          pSctpStatus->primary.assocId = status.sstat_primary.spinfo_assoc_id;
          if (status.sstat_primary.spinfo_state == SCTP_ACTIVE)
              pSctpStatus->primary.isActive = TRUE;
          else
+                       {
              pSctpStatus->primary.isActive = FALSE;
              pSctpStatus->primary.cwnd = status.sstat_primary.spinfo_cwnd;
              pSctpStatus->primary.srtt = status.sstat_primary.spinfo_srtt;
              pSctpStatus->primary.rto  = status.sstat_primary.spinfo_rto;
              pSctpStatus->primary.mtu  = status.sstat_primary.spinfo_mtu;
-         break;
+         }
+                       break;
 
       case CM_INET_OPT_SCTP_GET_PADDR_INFO:
          pPeerAddrInfo = (CmInetSctpPeerAddrInfo*)value;
-         cmMemset((U8*)&addrInfo, 0, sizeof(struct sctp_paddrinfo));
+         memset(&addrInfo, 0, sizeof(struct sctp_paddrinfo));
          len = sizeof(addrInfo);
          addrInfo.spinfo_assoc_id = pPeerAddrInfo->assocId;
 
@@ -3388,26 +3389,26 @@ Ptr       value;                /* option value */
                CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET017, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-               RETVALUE(RFAILED);
+               return RFAILED;
             }
 
             pAddr6 = (struct sockaddr_in6*)&(addrInfo.spinfo_address);
             pAddr6->sin6_family      = AF_INET6;
-            pAddr6->sin6_port        = CM_INET_HTON_U16(pPeerAddrInfo->port);
+            pAddr6->sin6_port        = CM_INET_HTON_UINT16(pPeerAddrInfo->port);
             CM_INET_COPY_IPV6ADDR(&pAddr6->sin6_addr.s6_addr, &pPeerAddrInfo->addr.u.ipv6NetAddr); 
          }
          else 
          {
             pAddr = (struct sockaddr_in*)&(addrInfo.spinfo_address);
             pAddr->sin_family      = AF_INET;
-            pAddr->sin_port        = CM_INET_HTON_U16(pPeerAddrInfo->port);
-            pAddr->sin_addr.s_addr = CM_INET_HTON_U32(pPeerAddrInfo->addr.u.ipv4NetAddr);
+            pAddr->sin_port        = CM_INET_HTON_UINT16(pPeerAddrInfo->port);
+            pAddr->sin_addr.s_addr = CM_INET_HTON_UINT32(pPeerAddrInfo->addr.u.ipv4NetAddr);
          }
 #else 
          pAddr = (struct sockaddr_in*)&(addrInfo.spinfo_address);
          pAddr->sin_family      = AF_INET;
-         pAddr->sin_port        = CM_INET_HTON_U16(pPeerAddrInfo->port);
-         pAddr->sin_addr.s_addr = CM_INET_HTON_U32(pPeerAddrInfo->addr.u.ipv4NetAddr); 
+         pAddr->sin_port        = CM_INET_HTON_UINT16(pPeerAddrInfo->port);
+         pAddr->sin_addr.s_addr = CM_INET_HTON_UINT32(pPeerAddrInfo->addr.u.ipv4NetAddr); 
 #endif /* IPV6_SUPPORTED */
 
          /* Not validating the address, whether Addr is a valid address or not */
@@ -3428,7 +3429,7 @@ Ptr       value;                /* option value */
 
          pPeerAddrParams = (CmInetSctpPeerAddrParams *)value;
 
-         cmMemset((U8*)&addrParams, 0, sizeof(struct sctp_paddrparams));
+         memset(&addrParams, 0, sizeof(struct sctp_paddrparams));
 
          addrParams.spp_assoc_id = pPeerAddrParams->assocId;
 
@@ -3453,26 +3454,26 @@ Ptr       value;                /* option value */
                   CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET066, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-                  RETVALUE(RFAILED);
+                  return RFAILED;
                }
 
                pAddr6 = (struct sockaddr_in6*)&(addrParams.spp_address);
                pAddr6->sin6_family      = AF_INET6;
-               pAddr6->sin6_port        = CM_INET_HTON_U16(pPeerAddrParams->s.port);
+               pAddr6->sin6_port        = CM_INET_HTON_UINT16(pPeerAddrParams->s.port);
                CM_INET_COPY_IPV6ADDR(&pAddr6->sin6_addr.s6_addr, &pPeerAddrParams->s.addr.u.ipv6NetAddr); 
             }
             else 
             {
                pAddr = (struct sockaddr_in*)&(addrParams.spp_address);
                pAddr->sin_family      = AF_INET;
-               pAddr->sin_port        = CM_INET_HTON_U16(pPeerAddrParams->s.port);
-               pAddr->sin_addr.s_addr = CM_INET_HTON_U32(pPeerAddrParams->s.addr.u.ipv4NetAddr);
+               pAddr->sin_port        = CM_INET_HTON_UINT16(pPeerAddrParams->s.port);
+               pAddr->sin_addr.s_addr = CM_INET_HTON_UINT32(pPeerAddrParams->s.addr.u.ipv4NetAddr);
             }
 #else 
             pAddr = (struct sockaddr_in*)&(addrParams.spp_address);
             pAddr->sin_family      = AF_INET;
-            pAddr->sin_port        = CM_INET_HTON_U16(pPeerAddrParams->s.port);
-            pAddr->sin_addr.s_addr = CM_INET_HTON_U32(pPeerAddrParams->s.addr.u.ipv4NetAddr);
+            pAddr->sin_port        = CM_INET_HTON_UINT16(pPeerAddrParams->s.port);
+            pAddr->sin_addr.s_addr = CM_INET_HTON_UINT32(pPeerAddrParams->s.addr.u.ipv4NetAddr);
 #endif /* IPV6_SUPPORTED */
          }
          else
@@ -3521,7 +3522,7 @@ Ptr       value;                /* option value */
 
          pAssocParams = (CmInetSctpAssocParams *)value;
 
-         cmMemset((U8*)&assocParams, 0, sizeof(struct sctp_assocparams));
+         memset(&assocParams, 0, sizeof(struct sctp_assocparams));
 
          assocParams.sasoc_assoc_id = pAssocParams->assocId;
 
@@ -3542,7 +3543,7 @@ Ptr       value;                /* option value */
 
          pRtoInfo = (CmInetSctpRtoInfo *)value;
 
-         cmMemset((U8*)&rtoInfo, 0, sizeof(struct sctp_rtoinfo));
+         memset(&rtoInfo, 0, sizeof(struct sctp_rtoinfo));
 
          len = sizeof(rtoInfo);
 
@@ -3559,7 +3560,7 @@ Ptr       value;                /* option value */
 
          pInitMsg = (CmInetSctpInitMsg *)value;
 
-         cmMemset((U8*)&initMsg, 0, sizeof(struct sctp_initmsg));
+         memset(&initMsg, 0, sizeof(struct sctp_initmsg));
 
          len = sizeof(initMsg);
 
@@ -3573,7 +3574,7 @@ Ptr       value;                /* option value */
          break;
 
       default:
-         RETVALUE(RFAILED);
+         return RFAILED;
    }
 
    if (ret == INET_ERR)
@@ -3592,10 +3593,10 @@ Ptr       value;                /* option value */
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET067, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }          
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /* cm_inet_c_001.main_54: Added new function cmInetShutDownSctp()*/
@@ -3614,12 +3615,12 @@ Ptr       value;                /* option value */
  *
  */
 #ifdef ANSI
-PUBLIC S16 cmInetShutDownSctp
+S16 cmInetShutDownSctp
 (
  CmInetFd          *sockFd       /* socket file descriptor */ 
  )
 #else
-PUBLIC S16 cmInetShutDownSctp(sockFd)
+S16 cmInetShutDownSctp(sockFd)
    CmInetFd          *sockFd;       /* socket file descriptor */ 
 #endif
 {
@@ -3627,9 +3628,8 @@ PUBLIC S16 cmInetShutDownSctp(sockFd)
    S32                    ret;
    struct sctp_sndrcvinfo sndRcvInfo;
 
-   TRC2(cmInetShutDownSctp);
 
-   cmMemset((U8*)&sndRcvInfo, 0, sizeof(sndRcvInfo));
+   memset(&sndRcvInfo, 0, sizeof(sndRcvInfo));
 
 #ifdef SUN_KSCTP
    sndRcvInfo.sinfo_flags = MSG_EOF;
@@ -3657,10 +3657,10 @@ PUBLIC S16 cmInetShutDownSctp(sockFd)
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 /* cm_inet_c_001.main_61: Added new function cmInetAbortSctpAssoc()*/
@@ -3679,13 +3679,13 @@ PUBLIC S16 cmInetShutDownSctp(sockFd)
  *
  */
 #ifdef ANSI
-PUBLIC S16 cmInetAbortSctpAssoc
+S16 cmInetAbortSctpAssoc
 (
  CmInetFd          *sockFd,       /* socket file descriptor */
  UConnId           assocId          /* Association ID */
  )
 #else
-PUBLIC S16 cmInetAbortSctpAssoc(sockFd, assocId)
+S16 cmInetAbortSctpAssoc(sockFd, assocId)
    CmInetFd          *sockFd;       /* socket file descriptor */
    UConnId           assocId;          /* Association ID */
 #endif
@@ -3693,9 +3693,8 @@ PUBLIC S16 cmInetAbortSctpAssoc(sockFd, assocId)
    S32                    ret;
    struct sctp_sndrcvinfo sndRcvInfo;
 
-   TRC2(cmInetAbortSctpAssoc);
 
-   cmMemset((U8*)&sndRcvInfo, 0, sizeof(sndRcvInfo));
+   memset(&sndRcvInfo, 0, sizeof(sndRcvInfo));
 
 #ifdef SUN_KSCTP
    sndRcvInfo.sinfo_flags = MSG_ABORT;
@@ -3725,10 +3724,10 @@ PUBLIC S16 cmInetAbortSctpAssoc(sockFd, assocId)
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 #endif
@@ -3754,13 +3753,13 @@ PUBLIC S16 cmInetAbortSctpAssoc(sockFd, assocId)
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetConnect
+S16 cmInetConnect
 (
 CmInetFd   *sockFd,             /* socket file descriptor */
 CmInetAddr *servAddr            /* foreign Internet address/port */  
 )
 #else
-PUBLIC S16 cmInetConnect(sockFd, servAddr)
+S16 cmInetConnect(sockFd, servAddr)
    CmInetFd   *sockFd;             /* socket file descriptor */
    CmInetAddr *servAddr;           /* foreign Internet address/port */  
 #endif
@@ -3770,29 +3769,28 @@ PUBLIC S16 cmInetConnect(sockFd, servAddr)
 #ifdef IPV6_SUPPORTED 
    struct sockaddr_in6 dstAddr6; /* foreign Internet IPV6 address/port */
 #ifdef CMINETDBG
-   U16            port;
+   uint16_t            port;
 #endif /* CMINETDBG */
 #endif /* IPV6_SUPPORTED */
    S32    sizeOfAddr;
    CmInetSockAddr *sockAddrPtr;  
 
-   TRC2(cmInetConnect);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
          (servAddr == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
 #ifdef IPV6_SUPPORTED 
    if (servAddr->type == CM_INET_IPV6ADDR_TYPE)
    {
-      cmMemset((U8*)&dstAddr6, 0, sizeof(dstAddr6));
+      memset(&dstAddr6, 0, sizeof(dstAddr6));
       dstAddr6.sin6_family     = AF_INET6;
-      dstAddr6.sin6_port       = CM_INET_HTON_U16(servAddr->u.ipv6Addr.port);
+      dstAddr6.sin6_port       = CM_INET_HTON_UINT16(servAddr->u.ipv6Addr.port);
       CM_INET_COPY_IPV6ADDR(&dstAddr6.sin6_addr, 
                             &servAddr->u.ipv6Addr.ipv6NetAddr);
       sizeOfAddr              = sizeof(struct sockaddr_in6);
@@ -3800,18 +3798,18 @@ PUBLIC S16 cmInetConnect(sockFd, servAddr)
    }
    else
    {
-      cmMemset((U8*)&dstAddr, 0, sizeof(dstAddr));
+      memset(&dstAddr, 0, sizeof(dstAddr));
       dstAddr.sin_family      = AF_INET;
-      dstAddr.sin_port        = CM_INET_HTON_U16(servAddr->u.ipv4Addr.port);
-      dstAddr.sin_addr.s_addr = CM_INET_HTON_U32(servAddr->u.ipv4Addr.address);
+      dstAddr.sin_port        = CM_INET_HTON_UINT16(servAddr->u.ipv4Addr.port);
+      dstAddr.sin_addr.s_addr = CM_INET_HTON_UINT32(servAddr->u.ipv4Addr.address);
       sizeOfAddr              = sizeof(struct sockaddr_in);
       sockAddrPtr             = (CmInetSockAddr *)&dstAddr;
    }
 #else
-   cmMemset((U8*)&dstAddr, 0, sizeof(dstAddr));
+   memset(&dstAddr, 0, sizeof(dstAddr));
    dstAddr.sin_family      = AF_INET;
-   dstAddr.sin_port        = CM_INET_HTON_U16(servAddr->port);
-   dstAddr.sin_addr.s_addr = CM_INET_HTON_U32(servAddr->address);
+   dstAddr.sin_port        = CM_INET_HTON_UINT16(servAddr->port);
+   dstAddr.sin_addr.s_addr = CM_INET_HTON_UINT32(servAddr->address);
    sizeOfAddr              = sizeof(struct sockaddr_in);
    sockAddrPtr             = (CmInetSockAddr *)&dstAddr;
 #endif /* IPV6_SUPPORTED */
@@ -3823,7 +3821,7 @@ PUBLIC S16 cmInetConnect(sockFd, servAddr)
       {
          /* non-blocking: connection is in progress */
          case ERR_INPROGRESS:
-            RETVALUE(RINPROGRESS);
+            return (RINPROGRESS);
             break;   
 
             /* 
@@ -3831,27 +3829,27 @@ PUBLIC S16 cmInetConnect(sockFd, servAddr)
              * blocking    : connection is already established
              */
          case ERR_ISCONN:
-            RETVALUE(RISCONN);
+            return (RISCONN);
             break;               
 
             /* resource temporarily unavailable */
          case ERR_WOULDBLOCK:
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
             break;
 
             /* non-blocking: connection is in progress */
          case ERR_ALREADY:
-            RETVALUE(RINPROGRESS);
+            return (RINPROGRESS);
             break;
 
          case ERR_INVAL:
-            RETVALUE(RINPROGRESS);
+            return (RINPROGRESS);
             break;
 
             /*  Check for connection refused and timeout errors */
          case ERR_CONNREFUSED:
          case ERR_TIMEDOUT:
-            RETVALUE(RCLOSED);
+            return (RCLOSED);
             break;
 
             /* it is a real error */ 
@@ -3892,12 +3890,12 @@ PUBLIC S16 cmInetConnect(sockFd, servAddr)
 #endif /*ALIGN_64BIT*/
 #endif /* IPV6_SUPPORTED */
 #endif /* CMINETDBG */
-            RETVALUE(RFAILED);
+            return RFAILED;
             break;
       }
    }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetConnect */
 
 \f
@@ -3918,27 +3916,26 @@ PUBLIC S16 cmInetConnect(sockFd, servAddr)
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetListen
+S16 cmInetListen
 (
 CmInetFd *sockFd,               /* socket file descriptor */ 
 S16       backLog               /* max. number of outstandig connections 0..5 */
 )
 #else
-PUBLIC S16 cmInetListen(sockFd, backLog)
+S16 cmInetListen(sockFd, backLog)
 CmInetFd *sockFd;               /* socket file descriptor */ 
 S16       backLog;              /* max. number of outstandig connections 0..5 */
 #endif
 {
    S32 ret;                     /* temporary return value */
 
-   TRC2(cmInetListen);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
          (backLog < MIN_BACK_LOG) || (backLog > MAX_BACK_LOG))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -3959,10 +3956,10 @@ S16       backLog;              /* max. number of outstandig connections 0..5 */
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET021, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetListen */
 
 \f
@@ -3986,14 +3983,14 @@ S16       backLog;              /* max. number of outstandig connections 0..5 */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetAccept
+S16 cmInetAccept
 (
 CmInetFd   *sockFd,     /* socket file descriptor */ 
 CmInetAddr *fromAddr,   /* calling Internet address/port */
 CmInetFd   *newSockFd   /* socket file descriptor for new connection*/
 )
 #else
-PUBLIC S16 cmInetAccept(sockFd, fromAddr, newSockFd)
+S16 cmInetAccept(sockFd, fromAddr, newSockFd)
 CmInetFd   *sockFd;     /* socket file descriptor */ 
 CmInetAddr *fromAddr;   /* calling Internet address/port */
 CmInetFd   *newSockFd;  /* socket file descriptor for new connection*/
@@ -4009,16 +4006,15 @@ CmInetFd   *newSockFd;  /* socket file descriptor for new connection*/
    CmInetSockAddr sockAddr;  
 #endif /* IPV6_SUPPORTED */
 
-   U32 optVal;
+   uint32_t optVal;
 
    /* added */
-   TRC2(cmInetAccept)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -4041,7 +4037,7 @@ CmInetFd   *newSockFd;  /* socket file descriptor for new connection*/
       if (INET_ERR_CODE == ERR_WOULDBLOCK)
       {
          /* no connection present to accept */ 
-         RETVALUE(ROKDNA);
+         return (ROKDNA);
       }
       else
       {
@@ -4059,7 +4055,7 @@ CmInetFd   *newSockFd;  /* socket file descriptor for new connection*/
          CMINETLOGERROR(ERRCLS_DEBUG, ECMINET022, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
    }     
 
@@ -4084,7 +4080,7 @@ CmInetFd   *newSockFd;  /* socket file descriptor for new connection*/
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET071, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-         RETVALUE(RFAILED);
+         return RFAILED;
    }
 #endif /* IPV6_SUPPORTED */      
 
@@ -4097,33 +4093,33 @@ CmInetFd   *newSockFd;  /* socket file descriptor for new connection*/
    if ( ret != ROK) 
    {
       ret = cmInetClose(newSockFd);
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #ifdef IPV6_SUPPORTED
-   cmMemset((U8*)fromAddr, 0, sizeof(fromAddr));
+   memset(fromAddr, 0, sizeof(fromAddr));
    if (addrLen == sizeof(struct sockaddr_in))
    {
       peerAddr = (struct sockaddr_in *)&sockAddr;
       fromAddr->type = CM_INET_IPV4ADDR_TYPE;
-      fromAddr->u.ipv4Addr.port    = CM_INET_NTOH_U16(peerAddr->sin_port);
+      fromAddr->u.ipv4Addr.port    = CM_INET_NTOH_UINT16(peerAddr->sin_port);
       fromAddr->u.ipv4Addr.address = 
-                              CM_INET_NTOH_U32(peerAddr->sin_addr.s_addr);
+                              CM_INET_NTOH_UINT32(peerAddr->sin_addr.s_addr);
    }
    else if (addrLen == sizeof(struct sockaddr_in6))
    {
       peerAddr6 = (struct sockaddr_in6 *)&sockAddr;
       fromAddr->type = CM_INET_IPV6ADDR_TYPE;
-      fromAddr->u.ipv6Addr.port    = CM_INET_NTOH_U16(peerAddr6->sin6_port);
+      fromAddr->u.ipv6Addr.port    = CM_INET_NTOH_UINT16(peerAddr6->sin6_port);
       CM_INET_COPY_IPV6ADDR(&fromAddr->u.ipv6Addr.ipv6NetAddr, 
                             &peerAddr6->sin6_addr);
    }
 #else
    peerAddr = (struct sockaddr_in *)&sockAddr;
-   fromAddr->port    = CM_INET_NTOH_U16(peerAddr->sin_port);
-   fromAddr->address = CM_INET_NTOH_U32(peerAddr->sin_addr.s_addr);
+   fromAddr->port    = CM_INET_NTOH_UINT16(peerAddr->sin_port);
+   fromAddr->address = CM_INET_NTOH_UINT32(peerAddr->sin_addr.s_addr);
 #endif /* IPV6_SUPPORTED */
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetAccept */ 
 
 \f
@@ -4146,21 +4142,20 @@ CmInetFd   *newSockFd;  /* socket file descriptor for new connection*/
 #ifdef ANSI
 PRIVATE S16 cmInet4FillTos
 (
-U8  tos,        /* tos value to be filled in ipheader */
-U8  *cmsgBuf,   /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx  /* idx in cmsgBuf where HBH/Dest ext hdr ends */
+uint8_t  tos,        /* tos value to be filled in ipheader */
+uint8_t  *cmsgBuf,   /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx  /* idx in cmsgBuf where HBH/Dest ext hdr ends */
 )
 #else
 PRIVATE S16 cmInet4FillTos(tos, cmsgBuf, curMsgIdx, protType)
-U8   tos;       /* tos value to be filled in ipheader */
-U8  *cmsgBuf;   /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
+uint8_t   tos;       /* tos value to be filled in ipheader */
+uint8_t  *cmsgBuf;   /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
 #endif /* ANSI */
 {
    struct cmsghdr *tempHdr;
-   U8     len;
+   uint8_t     len;
 
-   TRC2(cmInet4FillTos)
 
       len = 0;
 
@@ -4174,7 +4169,7 @@ U32 *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
    /* fill up level & type of cmsghdr structure */
    tempHdr->cmsg_level = IPPROTO_IPV6;
    tempHdr->cmsg_type = IP_TOS;
-   (*(U8*)CMSG_DATA(tempHdr)) = tos;
+   (*(uint8_t*)CMSG_DATA(tempHdr)) = tos;
    len = CMSG_SPACE(sizeof tos); 
 
 
@@ -4182,7 +4177,7 @@ U32 *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
    tempHdr->cmsg_len = len;  
    *curMsgIdx += len;
 
-   RETVALUE(ROK);
+   return ROK;
 
 }/* end of cmInet4FillTos */ 
 /*
@@ -4216,7 +4211,7 @@ U32 *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetSendDscpMsg
+S16 cmInetSendDscpMsg
 (
 CmInetFd       *sockFd,         /* socket file descriptor */
 CmInetAddr     *dstAddr,        /* destination Internet address/port */
@@ -4229,7 +4224,7 @@ S16             flags           /* additional control flags, unused */
 )
 #else
 /* added for IPv6 ext hdr */
-PUBLIC S16 cmInetSendDscpMsg(sockFd, dstAddr, info, mBuf, len, ipHdrParams, flags)
+S16 cmInetSendDscpMsg(sockFd, dstAddr, info, mBuf, len, ipHdrParams, flags)
 CmInetFd       *sockFd;         /* socket file descriptor */
 CmInetAddr     *dstAddr;        /* destination Internet address/port */
 CmInetMemInfo  *info;           /* buffer allocation info */
@@ -4252,20 +4247,20 @@ S16             flags;          /* additional control flags, unused */
    S16      numDBufs;           /* number of dBufs in message */
    struct   msghdr msg;         /* sendmsg() message header */
    MsgLen   msgLen;             /* message length */ 
-   U32      strtEndDBufNum;     /* starting/ending DBuf number */ 
+   uint32_t      strtEndDBufNum;     /* starting/ending DBuf number */ 
    MsgLen   unSentLen;          /* sent len */
 #ifdef IPV6_SUPPORTED 
-   U32    curMsgIdx;            /* indx in cmsgData where to write an ext hdr */
+   uint32_t    curMsgIdx;            /* indx in cmsgData where to write an ext hdr */
    /* added for IPv6 ext hdr */
 #if (defined(SS_LINUX) || defined(_XPG4_2))
    /* alloc from stack for IPv6 ancill data */
-   U8     cmsgData[CM_INET_IPV6_ANCIL_DATA];
+   uint8_t     cmsgData[CM_INET_IPV6_ANCIL_DATA];
 #endif /* SS_LINUX || _XPG4_2 */
 #else
-   U32    curMsgIdx;            /* indx in cmsgData where to write an ext hdr */
+   uint32_t    curMsgIdx;            /* indx in cmsgData where to write an ext hdr */
 #if (defined(SS_LINUX) || defined(_XPG4_2))
    /* alloc from stack for IPv4 ancill data */ 
-    U8     cmsgData[CM_INET_IPV4_ANCIL_DATA];
+    uint8_t     cmsgData[CM_INET_IPV4_ANCIL_DATA];
 #endif /* SS_LINUX || _XPG4_2 */
 #endif /* IPV6_SUPPORTED */   
 #endif /* WIN32 | CMINETFLATBUF */  
@@ -4276,7 +4271,7 @@ S16             flags;          /* additional control flags, unused */
 #endif /* IPV8_SUPPORTED */
    CmInetSockAddr *sockAddrPtr;
    /* cm_inet_c_001.main_58 : Fix for klockwork issue */
-   U32            sizeOfAddr;    
+   uint32_t            sizeOfAddr;    
 
    /* cm_inet_c_001.main_50 - Added for partial send handling */
    /* cm_inet_c_001.main_59: Protected under if not defined WIN32*/
@@ -4284,7 +4279,6 @@ S16             flags;          /* additional control flags, unused */
    MsgLen         ioLen; 
 #endif
 
-   TRC2(cmInetSendDscpMsg)
 
       UNUSED(flags);
 
@@ -4293,14 +4287,14 @@ S16             flags;          /* additional control flags, unused */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
          (info == NULLP) || (len == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
    /* added for IPv6 ext hdr */
 #if !(defined(WIN32) || defined(CMINETFLATBUF))
 #if (defined(SS_LINUX) || defined(_XPG4_2))
-/*   cmMemset((U8*)cmsgData, 0, sizeof(cmsgData));    */
+/*   memset(cmsgData, 0, sizeof(cmsgData));    */
 #endif /* SS_LINUX || _XPG4_2 */
    curMsgIdx   = 0;
 #endif /* WIN32 | CMINETFLATBUF */
@@ -4315,9 +4309,9 @@ S16             flags;          /* additional control flags, unused */
 #ifdef IPV6_SUPPORTED
       if (dstAddr->type == CM_INET_IPV6ADDR_TYPE)
       {
-         cmMemset((U8*)&remAddr6, 0, sizeof(remAddr6));
+         memset(&remAddr6, 0, sizeof(remAddr6));
          remAddr6.sin6_family = AF_INET6;
-         remAddr6.sin6_port   = CM_INET_HTON_U16(dstAddr->u.ipv6Addr.port);
+         remAddr6.sin6_port   = CM_INET_HTON_UINT16(dstAddr->u.ipv6Addr.port);
          CM_INET_COPY_IPV6ADDR(&remAddr6.sin6_addr, 
                &dstAddr->u.ipv6Addr.ipv6NetAddr); 
          sizeOfAddr = sizeof(remAddr6);
@@ -4325,19 +4319,19 @@ S16             flags;          /* additional control flags, unused */
       }
       else
       {
-         cmMemset((U8*)&remAddr, 0, sizeof(remAddr));
+         memset(&remAddr, 0, sizeof(remAddr));
          remAddr.sin_family = AF_INET;
-         remAddr.sin_port   = CM_INET_HTON_U16(dstAddr->u.ipv4Addr.port);
+         remAddr.sin_port   = CM_INET_HTON_UINT16(dstAddr->u.ipv4Addr.port);
          remAddr.sin_addr.s_addr = 
-            CM_INET_HTON_U32(dstAddr->u.ipv4Addr.address);
+            CM_INET_HTON_UINT32(dstAddr->u.ipv4Addr.address);
          sizeOfAddr = sizeof(remAddr);
          sockAddrPtr = (CmInetSockAddr *)&remAddr;
       }
 #else
-/*      cmMemset((U8*)&remAddr, 0, sizeof(remAddr)); */
+/*      memset(&remAddr, 0, sizeof(remAddr)); */
       remAddr.sin_family      = AF_INET;
-      remAddr.sin_port        = CM_INET_HTON_U16(dstAddr->port);
-      remAddr.sin_addr.s_addr = CM_INET_HTON_U32(dstAddr->address);
+      remAddr.sin_port        = CM_INET_HTON_UINT16(dstAddr->port);
+      remAddr.sin_addr.s_addr = CM_INET_HTON_UINT32(dstAddr->address);
       sizeOfAddr = sizeof(remAddr);
       sockAddrPtr = (CmInetSockAddr *)&remAddr;
 #endif /* IPV6_SUPPORTED */
@@ -4348,25 +4342,25 @@ S16             flags;          /* additional control flags, unused */
    ret = SFndLenMsg(mBuf, &bufLen);
    if (ret != ROK)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* max message length is limited to control the memory usage */
    /* casting bufLen to avoid warnings */
-   if ((bufLen > 0) && ((U32)bufLen > CM_INET_MAX_MSG_LEN))
+   if ((bufLen > 0) && ((uint32_t)bufLen > CM_INET_MAX_MSG_LEN))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    ret = SGetSBuf(info->region, info->pool, &sendBuf, bufLen);                  
    if (ret != ROK)
    {
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
    ret = SCpyMsgFix(mBuf, 0, bufLen, sendBuf, &msgLen);
    if ((ret != ROK) || (msgLen != bufLen)) 
    {
       /* cleanup */
       SPutSBuf(info->region, info->pool, sendBuf, bufLen);       
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if (dstAddr == NULLP)
@@ -4403,14 +4397,14 @@ S16             flags;          /* additional control flags, unused */
       if(INET_ERR_CODE == ERR_AGAIN)
       {
          *len = 0;
-         RETVALUE(RWOULDBLOCK);
+         return (RWOULDBLOCK);
       }
 
       /* Check for ERR_WOULDBLOCK */
       if(INET_ERR_CODE == ERR_WOULDBLOCK)
       {
          *len = 0;
-         RETVALUE(RWOULDBLOCK);
+         return (RWOULDBLOCK);
       }
 
 #ifdef CMINETDBG
@@ -4432,7 +4426,7 @@ S16             flags;          /* additional control flags, unused */
       /* check if network is reacheble*/
       if ((INET_ERR_CODE == ERR_NETUNREACH))
       {
-         RETVALUE(RNETFAILED);
+         return (RNETFAILED);
       }
 
 
@@ -4442,10 +4436,10 @@ S16             flags;          /* additional control flags, unused */
             (INET_ERR_CODE == ERR_CONNRESET))
       {
          *len = 0;
-         RETVALUE(RCLOSED);
+         return (RCLOSED);
       }
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    *len = ret;
@@ -4456,7 +4450,7 @@ S16             flags;          /* additional control flags, unused */
    {   
       /* cleanup */
       SPutSBuf(info->region, info->pool, sendBuf, bufLen);      
-      RETVALUE(RWOULDBLOCK);
+      return (RWOULDBLOCK);
    }
 
    /* cleanup */
@@ -4466,11 +4460,11 @@ S16             flags;          /* additional control flags, unused */
    ret = SFndLenMsg(mBuf, &msgLen);
    if (ret != ROK)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* added */
-/*   cmMemset((U8*)&msg, 0, sizeof(msg)); */
+/*   memset(&msg, 0, sizeof(msg)); */
    msg.msg_flags = 0;
 
    if (dstAddr != NULLP)
@@ -4512,7 +4506,7 @@ S16             flags;          /* additional control flags, unused */
             (ipHdrParams->u.hdrParmIpv4.tos.val != 0))
       {
          cmInet4FillTos(ipHdrParams->u.hdrParmIpv4.tos.val, 
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx);
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx);
          msg.msg_control = cmsgData;     /* pointer to Ancillary Data */
          msg.msg_controllen = curMsgIdx; /* total length of ancillary Data */
       } 
@@ -4523,8 +4517,8 @@ S16             flags;          /* additional control flags, unused */
 #ifdef SS_LINUX
       if(ipHdrParams->u.ipv6HdrParm.ttl.pres == TRUE)
       {
-         cmInetBuildSendHoplimit((U32)ipHdrParams->u.ipv6HdrParm.ttl.val,
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx);  
+         cmInetBuildSendHoplimit((uint32_t)ipHdrParams->u.ipv6HdrParm.ttl.val,
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx);  
       }
 #endif /* SS_LINUX */
 
@@ -4534,7 +4528,7 @@ S16             flags;          /* additional control flags, unused */
       {  
          cmInet6BuildSendPktinfo(
                &ipHdrParams->u.ipv6HdrParm.srcAddr6.u.ipv6NetAddr, 
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx,
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx,
                sockFd->protType);
       }
 #endif /* LOCAL_INTF */
@@ -4546,7 +4540,7 @@ S16             flags;          /* additional control flags, unused */
          /* build HBH ext header in cmsgData starting at indx 0 */
          cmInet6BuildSendHBHOpts(
                &ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.hbhOptsArr, 
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx, 0);                           
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx, 0);                           
 
       /* now copy the elements from the Destination Option array one by
        * one to the Flat Buffer cmsgData. Start filling at indx curMsgIdx 
@@ -4555,14 +4549,14 @@ S16             flags;          /* additional control flags, unused */
          /* build Dest opt hdr starting at (cmsgData + curMsgIdx) */
          cmInet6BuildSendDestOpts(
                &(ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.destOptsArr),
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx, 1);
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx, 1);
 
       /* copy Route header to to the Flat Buffer cmsgData */
       if (ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.rtOptsPrsnt == TRUE)
          /* curMsgIdx will be the indx where Dest opt ends in cmsgData */
          cmInet6BuildSendRouteOpts(
                &ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.rtOptsArr,
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx);
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx);
 
       /* msghrd struc's msg_control will point cmsgData and msg_controllen
        * will be the curMsgIdx */ 
@@ -4591,7 +4585,7 @@ S16             flags;          /* additional control flags, unused */
                /* Compress the message into a single dBuf */
                ret = SCompressMsg(mBuf);
                if (ret != ROK)
-                  RETVALUE(RFAILED);
+                  return RFAILED;
 
                strtEndDBufNum = 0;
                /* Rebuild the send vector */
@@ -4600,13 +4594,13 @@ S16             flags;          /* additional control flags, unused */
                ret = buildSendIovec(mBuf, unSentLen, txArr, numDBufs, &i,
                      &strtEndDBufNum, &ioLen);
                if (ret != ROK)
-                  RETVALUE(RFAILED);
+                  return RFAILED;
 
                retVal = ROK;
             }
          }
          else
-            RETVALUE(RFAILED);
+            return RFAILED;
       }
       msg.msg_iov           = txArr;
       msg.msg_iovlen        = i;
@@ -4631,7 +4625,7 @@ S16             flags;          /* additional control flags, unused */
          {
             /* cm_inet_c_001.main_50 - Return without making length 0, if in case the partial 
                message was sent earlier */
-            RETVALUE(RWOULDBLOCK);
+            return (RWOULDBLOCK);
          }
 #ifdef CMINETDBG
 #ifndef ALIGN_64BIT
@@ -4652,7 +4646,7 @@ S16             flags;          /* additional control flags, unused */
          /* check if network is reacheble or not */
          if ((INET_ERR_CODE == ERR_NETUNREACH))      
          {
-            RETVALUE(RNETFAILED);
+            return (RNETFAILED);
          }
 
          /*  Check if connection was closed by the peer */
@@ -4661,9 +4655,9 @@ S16             flags;          /* additional control flags, unused */
                (INET_ERR_CODE == ERR_CONNABORTED))
          {
             *len = 0;
-            RETVALUE(RCLOSED);
+            return (RCLOSED);
          }
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 
       /* cm_inet_c_001.main_50 - Update the length only in successful cases */
@@ -4673,14 +4667,14 @@ S16             flags;          /* additional control flags, unused */
        * to be sent, then return WOULDBLOCK
        */
       if (ret < ioLen)
-         RETVALUE(RWOULDBLOCK);
+         return (RWOULDBLOCK);
 
       unSentLen -= ret;
 
    } while (*len < msgLen);
 #endif /* WIN32 | CMINETFLATBUF */
 
-   RETVALUE(ROK);
+   return ROK;
 
 } /* end of cmInetSendDscpMsg */
 
@@ -4715,7 +4709,7 @@ S16             flags;          /* additional control flags, unused */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetSendMsg
+S16 cmInetSendMsg
 (
 CmInetFd       *sockFd,         /* socket file descriptor */
 CmInetAddr     *dstAddr,        /* destination Internet address/port */
@@ -4731,7 +4725,7 @@ S16             flags           /* additional control flags, unused */
 #else
 /* added for IPv6 ext hdr */
 #ifdef IPV6_OPTS_SUPPORTED
-PUBLIC S16 cmInetSendMsg(sockFd, dstAddr, info, mBuf, len, ipHdrParams, flags)
+S16 cmInetSendMsg(sockFd, dstAddr, info, mBuf, len, ipHdrParams, flags)
 CmInetFd       *sockFd;         /* socket file descriptor */
 CmInetAddr     *dstAddr;        /* destination Internet address/port */
 CmInetMemInfo  *info;           /* buffer allocation info */
@@ -4740,7 +4734,7 @@ MsgLen         *len;            /* number of actually sent octets */
 CmInetIpHdrParm *ipHdrParams;   /* IPv6 extensions headers */
 S16             flags;          /* additional control flags, unused */
 #else
-PUBLIC S16 cmInetSendMsg(sockFd, dstAddr, info, mBuf, len, flags)
+S16 cmInetSendMsg(sockFd, dstAddr, info, mBuf, len, flags)
 CmInetFd       *sockFd;         /* socket file descriptor */
 CmInetAddr     *dstAddr;        /* destination Internet address/port */
 CmInetMemInfo  *info;           /* buffer allocation info */
@@ -4763,21 +4757,21 @@ S16             flags;          /* additional control flags, unused */
    S16      numDBufs;           /* number of dBufs in message */
    struct   msghdr msg;         /* sendmsg() message header */
    MsgLen   msgLen;             /* message length */ 
-   U32      strtEndDBufNum;     /* starting/ending DBuf number */ 
+   uint32_t      strtEndDBufNum;     /* starting/ending DBuf number */ 
    MsgLen   unSentLen;          /* sent len */
 #ifdef IPV6_SUPPORTED 
    /* added for IPv6 ext hdr */
 #ifdef IPV6_OPTS_SUPPORTED
-   U32    curMsgIdx;            /* indx in cmsgData where to write an ext hdr */
+   uint32_t    curMsgIdx;            /* indx in cmsgData where to write an ext hdr */
 #if (defined(SS_LINUX) || defined(_XPG4_2))
    /* alloc from stack for IPv6 ancill data */
-   U8     cmsgData[CM_INET_IPV6_ANCIL_DATA];
+   uint8_t     cmsgData[CM_INET_IPV6_ANCIL_DATA];
 #endif /* SS_LINUX || _XPG4_2 */
 #endif /* IPV6_OPTS_SUPPORTED */
 #else
 #if (defined(SS_LINUX) || defined(_XPG4_2))
    /* alloc from stack for IPv4 ancill data */ 
-   /* U8     cmsgData[CM_INET_IPV4_ANCIL_DATA];*/
+   /* uint8_t     cmsgData[CM_INET_IPV4_ANCIL_DATA];*/
 #endif /* SS_LINUX || _XPG4_2 */
 #endif /* IPV6_SUPPORTED */   
 #endif /* WIN32 | CMINETFLATBUF */  
@@ -4788,7 +4782,7 @@ S16             flags;          /* additional control flags, unused */
 #endif /* IPV8_SUPPORTED */
    CmInetSockAddr *sockAddrPtr;
    /* cm_inet_c_001.main_58 : Fix for klockwork issue */
-   U32            sizeOfAddr;    
+   uint32_t            sizeOfAddr;    
 
    /* cm_inet_c_001.main_50 - Added for partial send handling */
    /* cm_inet_c_001.main_59: Protected under if not defined WIN32*/
@@ -4796,7 +4790,6 @@ S16             flags;          /* additional control flags, unused */
    MsgLen         ioLen; 
 #endif
 
-   TRC2(cmInetSendMsg)
 
       UNUSED(flags);
 
@@ -4805,14 +4798,14 @@ S16             flags;          /* additional control flags, unused */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
          (info == NULLP) || (len == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
    /* added for IPv6 ext hdr */
 #if !(defined(WIN32) || defined(CMINETFLATBUF))
 #if (defined(SS_LINUX) || defined(_XPG4_2))
-/*   cmMemset((U8*)cmsgData, 0, sizeof(cmsgData));    */
+/*   memset(cmsgData, 0, sizeof(cmsgData));    */
 #endif /* SS_LINUX || _XPG4_2 */
 #ifdef IPV6_OPTS_SUPPORTED
    curMsgIdx   = 0;
@@ -4829,9 +4822,9 @@ S16             flags;          /* additional control flags, unused */
 #ifdef IPV6_SUPPORTED
       if (dstAddr->type == CM_INET_IPV6ADDR_TYPE)
       {
-         cmMemset((U8*)&remAddr6, 0, sizeof(remAddr6));
+         memset(&remAddr6, 0, sizeof(remAddr6));
          remAddr6.sin6_family = AF_INET6;
-         remAddr6.sin6_port   = CM_INET_HTON_U16(dstAddr->u.ipv6Addr.port);
+         remAddr6.sin6_port   = CM_INET_HTON_UINT16(dstAddr->u.ipv6Addr.port);
          CM_INET_COPY_IPV6ADDR(&remAddr6.sin6_addr, 
                &dstAddr->u.ipv6Addr.ipv6NetAddr); 
          sizeOfAddr = sizeof(remAddr6);
@@ -4839,19 +4832,19 @@ S16             flags;          /* additional control flags, unused */
       }
       else
       {
-         cmMemset((U8*)&remAddr, 0, sizeof(remAddr));
+         memset(&remAddr, 0, sizeof(remAddr));
          remAddr.sin_family = AF_INET;
-         remAddr.sin_port   = CM_INET_HTON_U16(dstAddr->u.ipv4Addr.port);
+         remAddr.sin_port   = CM_INET_HTON_UINT16(dstAddr->u.ipv4Addr.port);
          remAddr.sin_addr.s_addr = 
-            CM_INET_HTON_U32(dstAddr->u.ipv4Addr.address);
+            CM_INET_HTON_UINT32(dstAddr->u.ipv4Addr.address);
          sizeOfAddr = sizeof(remAddr);
          sockAddrPtr = (CmInetSockAddr *)&remAddr;
       }
 #else
-/*      cmMemset((U8*)&remAddr, 0, sizeof(remAddr)); */
+/*      memset(&remAddr, 0, sizeof(remAddr)); */
       remAddr.sin_family      = AF_INET;
-      remAddr.sin_port        = CM_INET_HTON_U16(dstAddr->port);
-      remAddr.sin_addr.s_addr = CM_INET_HTON_U32(dstAddr->address);
+      remAddr.sin_port        = CM_INET_HTON_UINT16(dstAddr->port);
+      remAddr.sin_addr.s_addr = CM_INET_HTON_UINT32(dstAddr->address);
       sizeOfAddr = sizeof(remAddr);
       sockAddrPtr = (CmInetSockAddr *)&remAddr;
 #endif /* IPV6_SUPPORTED */
@@ -4862,25 +4855,25 @@ S16             flags;          /* additional control flags, unused */
    ret = SFndLenMsg(mBuf, &bufLen);
    if (ret != ROK)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    /* max message length is limited to control the memory usage */
    /* casting bufLen to avoid warnings */
-   if ((bufLen > 0) && ((U32)bufLen > CM_INET_MAX_MSG_LEN))
+   if ((bufLen > 0) && ((uint32_t)bufLen > CM_INET_MAX_MSG_LEN))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    ret = SGetSBuf(info->region, info->pool, &sendBuf, bufLen);                  
    if (ret != ROK)
    {
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
    ret = SCpyMsgFix(mBuf, 0, bufLen, sendBuf, &msgLen);
    if ((ret != ROK) || (msgLen != bufLen)) 
    {
       /* cleanup */
       SPutSBuf(info->region, info->pool, sendBuf, bufLen);       
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    if (dstAddr == NULLP)
@@ -4917,14 +4910,14 @@ S16             flags;          /* additional control flags, unused */
       if(INET_ERR_CODE == ERR_AGAIN)
       {
          *len = 0;
-         RETVALUE(RWOULDBLOCK);
+         return (RWOULDBLOCK);
       }
 
       /* Check for ERR_WOULDBLOCK */
       if(INET_ERR_CODE == ERR_WOULDBLOCK)
       {
          *len = 0;
-         RETVALUE(RWOULDBLOCK);
+         return (RWOULDBLOCK);
       }
 
 #ifdef CMINETDBG
@@ -4946,7 +4939,7 @@ S16             flags;          /* additional control flags, unused */
       /* check if network is reacheble*/
       if ((INET_ERR_CODE == ERR_NETUNREACH))
       {
-         RETVALUE(RNETFAILED);
+         return (RNETFAILED);
       }
 
 
@@ -4956,10 +4949,10 @@ S16             flags;          /* additional control flags, unused */
             (INET_ERR_CODE == ERR_CONNRESET))
       {
          *len = 0;
-         RETVALUE(RCLOSED);
+         return (RCLOSED);
       }
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    *len = ret;
@@ -4970,7 +4963,7 @@ S16             flags;          /* additional control flags, unused */
    {   
       /* cleanup */
       SPutSBuf(info->region, info->pool, sendBuf, bufLen);      
-      RETVALUE(RWOULDBLOCK);
+      return (RWOULDBLOCK);
    }
 
    /* cleanup */
@@ -4980,11 +4973,11 @@ S16             flags;          /* additional control flags, unused */
    ret = SFndLenMsg(mBuf, &msgLen);
    if (ret != ROK)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
    /* added */
-/*   cmMemset((U8*)&msg, 0, sizeof(msg)); */
+/*   memset(&msg, 0, sizeof(msg)); */
    msg.msg_flags = 0;
 
    if (dstAddr != NULLP)
@@ -5029,8 +5022,8 @@ S16             flags;          /* additional control flags, unused */
 #ifdef SS_LINUX
       if(ipHdrParams->u.ipv6HdrParm.ttl.pres == TRUE)
       {
-         cmInetBuildSendHoplimit((U32)ipHdrParams->u.ipv6HdrParm.ttl.val,
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx);  
+         cmInetBuildSendHoplimit((uint32_t)ipHdrParams->u.ipv6HdrParm.ttl.val,
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx);  
       }
 #endif /* SS_LINUX */
 
@@ -5040,7 +5033,7 @@ S16             flags;          /* additional control flags, unused */
       {  
          cmInet6BuildSendPktinfo(
                &ipHdrParams->u.ipv6HdrParm.srcAddr6.u.ipv6NetAddr, 
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx,
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx,
                sockFd->protType);
       }
 #endif /* LOCAL_INTF */
@@ -5052,7 +5045,7 @@ S16             flags;          /* additional control flags, unused */
          /* build HBH ext header in cmsgData starting at indx 0 */
          cmInet6BuildSendHBHOpts(
                &ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.hbhOptsArr, 
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx, 0);                           
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx, 0);                           
 
       /* now copy the elements from the Destination Option array one by
        * one to the Flat Buffer cmsgData. Start filling at indx curMsgIdx 
@@ -5061,14 +5054,14 @@ S16             flags;          /* additional control flags, unused */
          /* build Dest opt hdr starting at (cmsgData + curMsgIdx) */
          cmInet6BuildSendDestOpts(
                &(ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.destOptsArr),
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx, 1);
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx, 1);
 
       /* copy Route header to to the Flat Buffer cmsgData */
       if (ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.rtOptsPrsnt == TRUE)
          /* curMsgIdx will be the indx where Dest opt ends in cmsgData */
          cmInet6BuildSendRouteOpts(
                &ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.rtOptsArr,
-               (U8 *)(cmsgData + curMsgIdx), &curMsgIdx);
+               (uint8_t *)(cmsgData + curMsgIdx), &curMsgIdx);
 
       /* msghrd struc's msg_control will point cmsgData and msg_controllen
        * will be the curMsgIdx */ 
@@ -5097,7 +5090,7 @@ S16             flags;          /* additional control flags, unused */
                /* Compress the message into a single dBuf */
                ret = SCompressMsg(mBuf);
                if (ret != ROK)
-                  RETVALUE(RFAILED);
+                  return RFAILED;
 
                strtEndDBufNum = 0;
                /* Rebuild the send vector */
@@ -5106,13 +5099,13 @@ S16             flags;          /* additional control flags, unused */
                ret = buildSendIovec(mBuf, unSentLen, txArr, numDBufs, &i,
                      &strtEndDBufNum, &ioLen);
                if (ret != ROK)
-                  RETVALUE(RFAILED);
+                  return RFAILED;
 
                retVal = ROK;
             }
          }
          else
-            RETVALUE(RFAILED);
+            return RFAILED;
       }
       msg.msg_iov           = txArr;
       msg.msg_iovlen        = i;
@@ -5137,7 +5130,7 @@ S16             flags;          /* additional control flags, unused */
          {
             /* cm_inet_c_001.main_50 - Return without making length 0, if in case the partial 
                message was sent earlier */
-            RETVALUE(RWOULDBLOCK);
+            return (RWOULDBLOCK);
          }
 #ifdef CMINETDBG
 #ifndef ALIGN_64BIT
@@ -5158,7 +5151,7 @@ S16             flags;          /* additional control flags, unused */
          /* check if network is reacheble or not */
          if ((INET_ERR_CODE == ERR_NETUNREACH))      
          {
-            RETVALUE(RNETFAILED);
+            return (RNETFAILED);
          }
 
          /*  Check if connection was closed by the peer */
@@ -5167,9 +5160,9 @@ S16             flags;          /* additional control flags, unused */
                (INET_ERR_CODE == ERR_CONNABORTED))
          {
             *len = 0;
-            RETVALUE(RCLOSED);
+            return (RCLOSED);
          }
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 
       /* cm_inet_c_001.main_50 - Update the length only in successful cases */
@@ -5179,14 +5172,14 @@ S16             flags;          /* additional control flags, unused */
        * to be sent, then return WOULDBLOCK
        */
       if (ret < ioLen)
-         RETVALUE(RWOULDBLOCK);
+         return (RWOULDBLOCK);
 
       unSentLen -= ret;
 
    } while (*len < msgLen);
 #endif /* WIN32 | CMINETFLATBUF */
 
-   RETVALUE(ROK);
+   return ROK;
 
 } /* end of cmInetSendMsg */
 
@@ -5214,24 +5207,23 @@ S16             flags;          /* additional control flags, unused */
 PRIVATE S16 cmInet6BuildSendPktinfo
 (
 CmInetIpAddr6 *srcAddr, /* src ip addr to set on outgoing packet */
-U8  *cmsgBuf,   /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx, /* idx in cmsgBuf where HBH/Dest ext hdr ends */
-U8   protType   /* whether IPv4/IPv6 socket */
+uint8_t  *cmsgBuf,   /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx, /* idx in cmsgBuf where HBH/Dest ext hdr ends */
+uint8_t   protType   /* whether IPv4/IPv6 socket */
 )
 #else
 PRIVATE S16 cmInet6BuildSendPktinfo(srcAddr, cmsgBuf, curMsgIdx, protType)
 CmInetIpAddr6 *srcAddr; /* src ip addr to set on outgoing packet */
-U8  *cmsgBuf;   /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
-U8   protType;  /* whether IPv4/IPv6 socket */
+uint8_t  *cmsgBuf;   /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
+uint8_t   protType;  /* whether IPv4/IPv6 socket */
 #endif /* ANSI */
 {
    struct cmsghdr *tempHdr;
    struct in6_pktinfo *ipv6Pktinfo;
    struct in6_addr lpBkAddr;
-   U8     len;
+   uint8_t     len;
 
-   TRC2(cmInet6BuildSendPktinfo)
 
       len = 0;
 
@@ -5281,7 +5273,7 @@ U8   protType;  /* whether IPv4/IPv6 socket */
    if(protType == AF_INET6)
    {  
       /* store ipv6 src addr */ 
-      cmMemcpy((U8 *)&(ipv6Pktinfo->ipi6_addr), (U8 *)srcAddr, 16);
+      memcpy(&(ipv6Pktinfo->ipi6_addr), srcAddr, 16);
       len += 16;
 
       /* store interface index */
@@ -5306,7 +5298,7 @@ U8   protType;  /* whether IPv4/IPv6 socket */
    tempHdr->cmsg_len = len;  
    *curMsgIdx += len;
 
-   RETVALUE(ROK);
+   return ROK;
 
 }/* end of cmInet6BuildSendPktinfo */ 
 #endif /* LOCAL_INTF */
@@ -5331,21 +5323,20 @@ U8   protType;  /* whether IPv4/IPv6 socket */
 #ifdef ANSI
 PRIVATE S16 cmInetBuildSendHoplimit
 (
-U32   hoplimit,  /* the hoplimit value to be set on outgoing packet */
-U8  *cmsgBuf,   /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx  /* idx in cmsgBuf where HBH/Dest ext hdr ends */
+uint32_t   hoplimit,  /* the hoplimit value to be set on outgoing packet */
+uint8_t  *cmsgBuf,   /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx  /* idx in cmsgBuf where HBH/Dest ext hdr ends */
 )
 #else
 PRIVATE S16 cmInetBuildSendHoplimit(hoplimit, cmsgBuf, curMsgIdx)
-U32  hoplimit;  /* the hoplimit value to be sent on outgoing packet */
-U8  *cmsgBuf;   /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
+uint32_t  hoplimit;  /* the hoplimit value to be sent on outgoing packet */
+uint8_t  *cmsgBuf;   /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
 #endif /* ANSI */
 {
    struct cmsghdr *tempHdr; 
-   U8    len;
+   uint8_t    len;
 
-   TRC2(cmInetBuildSendHoplimit)
 
       len = 0;
 
@@ -5371,7 +5362,7 @@ U32 *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
    tempHdr->cmsg_len = len;
    *curMsgIdx += len;
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetBuildSendHoplimit  */
 #endif /* SS_LINUX */
 
@@ -5403,23 +5394,22 @@ U32 *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
 PRIVATE S16 cmInet6BuildSendHBHOpts
 (
 CmInetIpv6HBHHdrArr *hbhOptsArr,/* IPv6 extensions headers HBH/Dest opts */
-U8 *cmsgBuf,                    /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx,                 /* idx in cmsgBuf where HBH/Dest ext hdr ends */
-U8 hdrId                        /* 0: HBH hdr, 1:Dest Hdr */
+uint8_t *cmsgBuf,                    /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx,                 /* idx in cmsgBuf where HBH/Dest ext hdr ends */
+uint8_t hdrId                        /* 0: HBH hdr, 1:Dest Hdr */
 )
 #else
 PRIVATE S16 cmInet6BuildSendHBHOpts(hbhOptsArr, cmsgBuf, curMsgIdx, hdrId)
 CmInetIpv6HBHHdrArr *hbhOptsArr;/* IPv6 extensions headers HBH/Dest opts */
-U8 *cmsgBuf;                    /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx;                 /* idx in cmsgBuf where HBH/Dest ext hdr ends */
-U8 hdrId;                       /* 0: HBH hdr, 1:Dest Hdr */
+uint8_t *cmsgBuf;                    /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx;                 /* idx in cmsgBuf where HBH/Dest ext hdr ends */
+uint8_t hdrId;                       /* 0: HBH hdr, 1:Dest Hdr */
 #endif
 {
    struct cmsghdr *tempHdr; 
-   U8    len;
-   U8    optsIdx;
+   uint8_t    len;
+   uint8_t    optsIdx;
 
-   TRC2(cmInet6BuildSendHBHOpts)
 
       len = 0;
    optsIdx = 0;
@@ -5470,8 +5460,8 @@ U8 hdrId;                       /* 0: HBH hdr, 1:Dest Hdr */
       len += sizeof(hbhOptsArr->hbhOpts[optsIdx].length);         
 
       /* copy all value bytes of current HBH/dest option to the flat buffer */
-      cmMemcpy((U8 *)(cmsgBuf + len),
-            (U8 *)(hbhOptsArr->hbhOpts[optsIdx].value), 
+      memcpy((cmsgBuf + len),
+            (hbhOptsArr->hbhOpts[optsIdx].value), 
             hbhOptsArr->hbhOpts[optsIdx].length);
       len += hbhOptsArr->hbhOpts[optsIdx].length; 
    }
@@ -5500,7 +5490,7 @@ U8 hdrId;                       /* 0: HBH hdr, 1:Dest Hdr */
    tempHdr->cmsg_len = len;
    *curMsgIdx += len;
 
-   RETVALUE(ROK);    
+   return ROK;    
 } /* end of cmInet6BuildSendHBHOpts */
 
 \f
@@ -5526,22 +5516,21 @@ U8 hdrId;                       /* 0: HBH hdr, 1:Dest Hdr */
 PRIVATE S16 cmInet6BuildSendRouteOpts
 (
 CmInetIpv6RtHdr *rtOptsArr,  /* IPv6 destination options array */
-U8 *cmsgBuf,                 /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx               /* idx in cmsgBuf where to start building RT hdr */
+uint8_t *cmsgBuf,                 /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx               /* idx in cmsgBuf where to start building RT hdr */
 )
 #else
 PRIVATE S16 cmInet6BuildSendRouteOpts(rtOptsArr, cmsgBuf, curMsgIdx)
 CmInetIpv6RtHdr *rtOptsArr;  /* IPv6 destination options array */
-U8 *cmsgBuf;                 /* flat buffer where to build ext hdrs */
-U32 *curMsgIdx;              /* idx in cmsgBuf where to start building RT hd */
+uint8_t *cmsgBuf;                 /* flat buffer where to build ext hdrs */
+uint32_t *curMsgIdx;              /* idx in cmsgBuf where to start building RT hd */
 #endif /* ANSI */
 {
    struct cmsghdr *tempHdr;
    CmInetIpv6RtHdr0 *tempRtHdr;
-   U8    len; 
-   U8    addrIdx;
+   uint8_t    len; 
+   uint8_t    addrIdx;
 
-   TRC2(cmInet6BuildSendRouteOpts);
 
    len = 0;
    addrIdx = 0;
@@ -5590,13 +5579,13 @@ U32 *curMsgIdx;              /* idx in cmsgBuf where to start building RT hd */
    /* fill up all IPV6 addresses from rtOptsArr in the flat buffer */
    for (addrIdx = 0; addrIdx < rtOptsArr->numAddrs; addrIdx++)
    {   
-      cmMemcpy((U8 *)(cmsgBuf + len),
-            (U8 *)(rtOptsArr->ipv6Addrs[addrIdx]), 16);
+      memcpy((cmsgBuf + len),
+            (rtOptsArr->ipv6Addrs[addrIdx]), 16);
       len += 16;
    }
 
    *curMsgIdx += len;  
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInet6BuildSendRouteOpts */
 
 \f
@@ -5621,30 +5610,29 @@ U32 *curMsgIdx;              /* idx in cmsgBuf where to start building RT hd */
 #ifdef ANSI
 PRIVATE S16 cmInet6BuildRecvHopOptsArr
 (
-U8 *cmsgData,                    /* flat buffer where to build ext hdrs */
-U32 hbhDataLen,                  /* byte len of cmsghdr + hbh ancil data */
+uint8_t *cmsgData,                    /* flat buffer where to build ext hdrs */
+uint32_t hbhDataLen,                  /* byte len of cmsghdr + hbh ancil data */
 CmInetIpv6HBHHdrArr *hbhOptsArr, /* IPv6 extensions headers */
-U8 hdrId,                        /* 0: HBH, 1: DEST */
+uint8_t hdrId,                        /* 0: HBH, 1: DEST */
 CmInetMemInfo   *info            /* Memory information */
 )
 #else
 PRIVATE S16 cmInet6BuildRecvHopOptsArr(cmsgData, hbhDataLen, hbhOptsArr, hdrId, 
                                       info)
-U8 *cmsgData;                    /* flat buffer where to build ext hdrs  */
-U32 hbhDataLen;                  /* byte len of cmsghdr + hbh ancil data */
+uint8_t *cmsgData;                    /* flat buffer where to build ext hdrs  */
+uint32_t hbhDataLen;                  /* byte len of cmsghdr + hbh ancil data */
 CmInetIpv6HBHHdrArr *hbhOptsArr; /* IPv6 extensions headers */
-U8 hdrId;                        /* 0: HBH, 1: DEST */
+uint8_t hdrId;                        /* 0: HBH, 1: DEST */
 CmInetMemInfo   *info;           /* Memory information */
 #endif /* ANSI */
 {
-   U32 curDataIdx;       /* to keep track where we are in the hbh Data */
-   U8  optsIdx;          /* how many hbh opts present in data */
-   U8  numOpts;          /* number of hbh opts present in data */
-   U8  tempLen;
-   U8  tempType;
+   uint32_t curDataIdx;       /* to keep track where we are in the hbh Data */
+   uint8_t  optsIdx;          /* how many hbh opts present in data */
+   uint8_t  numOpts;          /* number of hbh opts present in data */
+   uint8_t  tempLen;
+   uint8_t  tempType;
    S16 ret;
 
-   TRC2(cmInet6BuildRecvHopOptsArr)
 
       /* get length of actual hbh ancillary data */
       hbhDataLen -= sizeof(struct cmsghdr); 
@@ -5666,7 +5654,7 @@ CmInetMemInfo   *info;           /* Memory information */
       numOpts += 1;
 
       /* get type */ 
-      tempType = *(U8 *)(cmsgData + curDataIdx);
+      tempType = *(uint8_t *)(cmsgData + curDataIdx);
       curDataIdx += 1;               
 
       /* take care of pad1 option */
@@ -5678,7 +5666,7 @@ CmInetMemInfo   *info;           /* Memory information */
       }
 
       /* get length */
-      tempLen = *(U8 *)(cmsgData + curDataIdx);
+      tempLen = *(uint8_t *)(cmsgData + curDataIdx);
 
       /* 1 is to skip length. tempLen to skip the value field */
       curDataIdx += (1 + tempLen);
@@ -5702,7 +5690,7 @@ CmInetMemInfo   *info;           /* Memory information */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "SGetSBuf failure 1 in cmInet6BuildRecvHopOptsArr\n");
       CMINETLOGERROR(ERRCLS_ADD_RES, ECMINET028, 0, prntBuf);
 #endif /* CMINETDBG */     
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }   
 
    curDataIdx = 0;                
@@ -5801,11 +5789,11 @@ CmInetMemInfo   *info;           /* Memory information */
                   (Data *)hbhOptsArr->hbhOpts, numOpts * sizeof(CmInetIpv6HBHHdr));
             hbhOptsArr->numHBHOpts = 0;
             hbhOptsArr->hbhOpts = NULLP;
-            RETVALUE(ROUTRES);
+            return (ROUTRES);
          }
          /* copy the value bytes */
-         cmMemcpy((U8 *)hbhOptsArr->hbhOpts[optsIdx].value, 
-               (U8 *)(cmsgData + curDataIdx),
+         memcpy(hbhOptsArr->hbhOpts[optsIdx].value, 
+               (cmsgData + curDataIdx),
                hbhOptsArr->hbhOpts[optsIdx].length);
          curDataIdx += hbhOptsArr->hbhOpts[optsIdx].length;      
       }  
@@ -5813,7 +5801,7 @@ CmInetMemInfo   *info;           /* Memory information */
       /* get next option */
       optsIdx++; 
    }
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInet6BuildRecvHopOptsArr() */
 
 \f
@@ -5836,26 +5824,25 @@ CmInetMemInfo   *info;           /* Memory information */
 #ifdef ANSI
 PRIVATE S16 cmInet6BuildRecvRtHdr
 (
-U8 *cmsgData,              /* flat buffer where to build Route hdr */ 
-U32 rtDataLen,             /* byte len of cmsghdr struc+rtHdr ancil data */
+uint8_t *cmsgData,              /* flat buffer where to build Route hdr */ 
+uint32_t rtDataLen,             /* byte len of cmsghdr struc+rtHdr ancil data */
 CmInetIpv6RtHdr0 *rtHdr0,  /* rtHeader0 struct that precedes IPV6 addrss */
 CmInetIpv6RtHdr *rtOptsArr,/* IPv6 extensions headers */
 CmInetMemInfo   *info      /* Memory information */
 )
 #else
 PRIVATE S16 cmInet6BuildRecvRtHdr(cmsgData, rtDataLen, rtHdr0, rtOptsArr, info)
-U8 *cmsgData;              /* flat buffer where to build Route hdr */
-U32 rtDataLen;             /* byte len of cmsghdr struc+rtHdr ancil data */
+uint8_t *cmsgData;              /* flat buffer where to build Route hdr */
+uint32_t rtDataLen;             /* byte len of cmsghdr struc+rtHdr ancil data */
 CmInetIpv6RtHdr0 *rtHdr0;  /* rtHeader0 struct that precedes IPV6 addrss */
 CmInetIpv6RtHdr *rtOptsArr;/* IPv6 extensions headers */
 CmInetMemInfo   *info;     /* Memory information */
 #endif /* ANSI */
 {
-   U32 curDataIdx;         /* to keep track where we are in hbh Data */
-   U8 i;                   /* loop counter */
+   uint32_t curDataIdx;         /* to keep track where we are in hbh Data */
+   uint8_t i;                   /* loop counter */
    S16 ret;                /* temporary return value */
 
-   TRC2(cmInet6BuildRecvRtHdr)
    
    /* byte len of actual rtHdr ancil data */
    rtDataLen -= sizeof(struct cmsghdr);
@@ -5880,8 +5867,8 @@ CmInetMemInfo   *info;     /* Memory information */
    curDataIdx += 1;
 
    /* copy 1 reserve byte + 3 strict/loose bytes */  
-   cmMemcpy((U8 *)(&rtOptsArr->slMap),
-         (U8 *)(cmsgData + curDataIdx), 4);
+   memcpy((&rtOptsArr->slMap),
+         (cmsgData + curDataIdx), 4);
    curDataIdx += 4;
 
    /* also save reserv byte + 3 sl bytes to rtHdro struc */
@@ -5901,18 +5888,18 @@ CmInetMemInfo   *info;     /* Memory information */
       snprintf(prntBuf, CMINET_PRNT_BUF_SIZE, "SGetSBuf failure 1 in cmInet6BuildRecvRtHdr\n");
       CMINETLOGERROR(ERRCLS_ADD_RES, ECMINET032, 0, prntBuf);
 #endif /* CMINETDBG */     
-      RETVALUE(ROUTRES);
+      return (ROUTRES);
    }
 
    /* copy all the ipv6 addresses */
    for(i=0; i < rtOptsArr->numAddrs; i++)
    {
-      cmMemcpy((U8 *)(rtOptsArr->ipv6Addrs[i]),
-            (U8 *)(cmsgData + curDataIdx), 16);
+      memcpy((rtOptsArr->ipv6Addrs[i]),
+            (cmsgData + curDataIdx), 16);
       curDataIdx += 16;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInet6BuildRecvRtHdr() */
 
 \f
@@ -5935,19 +5922,19 @@ CmInetMemInfo   *info;     /* Memory information */
 #ifdef ANSI
 PRIVATE S16 cmInet6GetHopLimitValue
 (
-U8 *cmsgData,        /* flat buffer where to build ext hdrs */
-U32 hopLimitDataLen, /* byte len of cmsghdr + hbh ancil data */
+uint8_t *cmsgData,        /* flat buffer where to build ext hdrs */
+uint32_t hopLimitDataLen, /* byte len of cmsghdr + hbh ancil data */
 CmInetIpv6HdrParm *ipv6HdrParam /* ipv6 header parameters */ 
 )
 #else
 PRIVATE S16 cmInet6GetHopLimitValue(cmsgData, hopLimitDataLen, ipv6HdrParam)
-U8 *cmsgData;         /* flat buffer where to build ext hdrs */
-U32 hopLimitDataLen;  /* byte len of cmsghdr + hbh ancil data */
+uint8_t *cmsgData;         /* flat buffer where to build ext hdrs */
+uint32_t hopLimitDataLen;  /* byte len of cmsghdr + hbh ancil data */
 CmInetIpv6HdrParm *ipv6HdrParam; /* ipv6 header parameters */
 #endif /* ANSI */
 {
-   U16 curDataIdx;       /* to keep track where we are in the ancillary Data */
-   U32 *hopLimitValue;   /* ttl/hoplimit value */
+   uint16_t curDataIdx;       /* to keep track where we are in the ancillary Data */
+   uint32_t *hopLimitValue;   /* ttl/hoplimit value */
 
    hopLimitValue = NULL;
    curDataIdx = 0;                
@@ -5962,10 +5949,10 @@ CmInetIpv6HdrParm *ipv6HdrParam; /* ipv6 header parameters */
    ipv6HdrParam->ttl.pres = TRUE;
 
    /* the first byte will be the HopLimit value */
-   hopLimitValue = (U32 *)(cmsgData);
-   ipv6HdrParam->ttl.val = (U8)(*hopLimitValue);
+   hopLimitValue = (uint32_t *)(cmsgData);
+   ipv6HdrParam->ttl.val = (uint8_t)(*hopLimitValue);
 
-   RETVALUE(ROK);
+   return ROK;
 }
 #endif /* IPV6_OPTS_SUPPORTED */
 
@@ -5999,7 +5986,7 @@ CmInetIpv6HdrParm *ipv6HdrParam; /* ipv6 header parameters */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetRecvMsg
+S16 cmInetRecvMsg
 (
 CmInetFd        *sockFd,        /* socket file descriptor */ 
 CmInetAddr      *fromAddr,      /* sender Internet address/port */ 
@@ -6019,7 +6006,7 @@ S32              flags          /* additional control flags */
 /*  added for IPv6 */
 #ifdef IPV6_OPTS_SUPPORTED
 #ifdef LOCAL_INTF
-PUBLIC S16 cmInetRecvMsg(sockFd, fromAddr, info, mPtr, len,
+S16 cmInetRecvMsg(sockFd, fromAddr, info, mPtr, len,
       ipHdrParams, localIf, flags)
 CmInetFd        *sockFd;        /* socket file descriptor */ 
 CmInetAddr      *fromAddr;      /* sender Internet address/port */ 
@@ -6030,7 +6017,7 @@ CmInetIpHdrParm *ipHdrParams;   /* IPv6 extensions headers */
 CmInetLocalInf  *localIf;       /* local interface on which pkt was recvd */
 S32              flags;         /* additional control flags */
 #else
-PUBLIC S16 cmInetRecvMsg(sockFd, fromAddr, info, mPtr, len, ipHdrParams, flags)
+S16 cmInetRecvMsg(sockFd, fromAddr, info, mPtr, len, ipHdrParams, flags)
 CmInetFd        *sockFd;        /* socket file descriptor */ 
 CmInetAddr      *fromAddr;      /* sender Internet address/port */ 
 CmInetMemInfo   *info;          /* buffer allocation info */
@@ -6041,7 +6028,7 @@ S32              flags;         /* additional control flags */
 #endif /* LOCAL_INTF */
 #else
 #ifdef LOCAL_INTF
-PUBLIC S16 cmInetRecvMsg(sockFd, fromAddr, info, mPtr, len, localIf, flags)
+S16 cmInetRecvMsg(sockFd, fromAddr, info, mPtr, len, localIf, flags)
 CmInetFd        *sockFd;        /* socket file descriptor */ 
 CmInetAddr      *fromAddr;      /* sender Internet address/port */ 
 CmInetMemInfo   *info;          /* buffer allocation info */
@@ -6050,7 +6037,7 @@ MsgLen          *len;           /* number of octets to read */
 CmInetLocalInf  *localIf;       /* local interface on which pkt was recvd */
 S32              flags;         /* additional control flags */
 #else
-PUBLIC S16 cmInetRecvMsg(sockFd, fromAddr, info, mPtr, len, flags)
+S16 cmInetRecvMsg(sockFd, fromAddr, info, mPtr, len, flags)
 CmInetFd        *sockFd;        /* socket file descriptor */ 
 CmInetAddr      *fromAddr;      /* sender Internet address/port */ 
 CmInetMemInfo   *info;          /* buffer allocation info */
@@ -6063,14 +6050,14 @@ S32              flags;         /* additional control flags */
 {
 #if (defined(WIN32) || defined(CMINETFLATBUF))
    S32           ret;            /* temporary return value */
-   U32           pendLen;        /* pending data length */
+   uint32_t           pendLen;        /* pending data length */
    S32           recvLen;        /* number of received octets by recvmsg() */
    MsgLen        bufLen;         /* entire number of received octets */
    MsgLen        curLen;         /* current number of octets in buffer */ 
    Data         *recvBuf;        /* receive buffer */
    Data         *bufPtr;         /* current buffer position */   
    Buffer       *mBuf;           /* received message */ 
-   U32           remAddrLen;     /* length of remote address */
+   uint32_t           remAddrLen;     /* length of remote address */
    struct sockaddr_in  *remAddr;    /* remote Internet address */       
 #ifdef IPV6_SUPPORTED 
    struct sockaddr_in6  *remAddr6;  /* remote Internet address */       
@@ -6081,8 +6068,8 @@ S32              flags;         /* additional control flags */
 #else
    S32           ret;            /* temporary return value */
   /* cm_inet_c_001.main_58: Fix for g++ compilation warning */
-   U16           i;              /* index */
-   U32           pendLen;        /* pending data length */
+   uint16_t           i;              /* index */
+   uint32_t           pendLen;        /* pending data length */
    S32           numBuf;         /* number of allocated dBufs */
    S32           recvLen;        /* number of received octets by recvmsg() */
    MsgLen        bufLen;         /* entire number of received octets */
@@ -6110,13 +6097,13 @@ S32              flags;         /* additional control flags */
 #endif /* LOCAL_INTF */   
 
 #if (defined(SS_LINUX) || defined(_XPG4_2))
-   U8                   ancillData[CM_INET_IPV6_ANCIL_DATA];
+   uint8_t                   ancillData[CM_INET_IPV6_ANCIL_DATA];
    /* from stack for IPv6 ancill data */
 #endif
 #else
    CmInetSockAddr       remSockAddr;     /* to get packet's src IP address */
 #if (defined(SS_LINUX) || defined(_XPG4_2))
-   U8                   ancillData[CM_INET_IPV4_ANCIL_DATA];
+   uint8_t                   ancillData[CM_INET_IPV4_ANCIL_DATA];
    /* from stack for IPv4 ancill data */
 #endif
 #endif /* IPV6_SUPPORTED */
@@ -6137,14 +6124,13 @@ S32              flags;         /* additional control flags */
 
    /* cm_inet_c_001.main_55:Removed unused variables errValue and optLen */
 
-   TRC2(cmInetRecvMsg)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
       /* error check on parameters */
       if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
             (info == NULLP) || (mPtr == NULLP) || (len == NULLP))
       {
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -6168,13 +6154,13 @@ S32              flags;         /* additional control flags */
 #endif /* IPV6_SUPPORTED */  
 
 #if (defined(SS_LINUX) || defined(_XPG4_2))
-   cmMemset((U8*)ancillData, 0, sizeof(ancillData));
+   memset(ancillData, 0, sizeof(ancillData));
 #endif /* SS_LINUX || _XPG4_2 */
 
 #endif /* (WIN32 | CMINETFLATBUF) */
 
    /* clear the structure */   
-   cmMemset((U8*)&remSockAddr, 0, sizeof(remSockAddr));
+   memset(&remSockAddr, 0, sizeof(remSockAddr));
 
    /* get number of pending data */
    /* removed 3rd arg memInfo. MemInfo is no longer
@@ -6190,7 +6176,7 @@ S32              flags;         /* additional control flags */
       if (ret != ROK)
       {
          /* ret may be RFAILED or ROUTRES */
-         RETVALUE(ret);
+         return (ret);
       }
    }
    else 
@@ -6213,7 +6199,7 @@ S32              flags;         /* additional control flags */
          /* cm_inet_c_001.main_50: 
           * cm_inet_c_001.main_56: Removed comment for cm_inet_c_001.main_50 as
           * the current patch changes its functionality */
-         U8  readBuf[1]; /* declaration of variable for Peek */
+         uint8_t  readBuf[1]; /* declaration of variable for Peek */
 
          /* 
           * cm_inet_c_001.main_56:
@@ -6226,7 +6212,7 @@ S32              flags;         /* additional control flags */
          ret = cmInetPeekNew(sockFd, NULLP, info, 0, 1, readBuf);
          if (ret == RCLOSED)
          {
-            RETVALUE(ret);
+            return (ret);
          }
          /* cm_inet_c_001.main_56:
           * Returning ROKDNA even cmInetPeekNew returns ROK. Because currently
@@ -6235,7 +6221,7 @@ S32              flags;         /* additional control flags */
           * cmInetGetNumRead at this point because of latency between the ioctl
           * call and recvfrom call issues on some machines ioctl call may 
           * return ZERO even their a data to read.  */
-         RETVALUE(ROKDNA);
+         return (ROKDNA);
       }
    } 
    /* cm_inet_c_001.main_52:  Support for partial reception */
@@ -6247,7 +6233,7 @@ S32              flags;         /* additional control flags */
    }
 
    /* check if there are enough pending data to read */
-   if ((*len == CM_INET_READ_ANY) || ((U32)*len <= pendLen))
+   if ((*len == CM_INET_READ_ANY) || ((uint32_t)*len <= pendLen))
    {
       if (*len == CM_INET_READ_ANY)
       {
@@ -6302,7 +6288,7 @@ S32              flags;         /* additional control flags */
       ret = SGetSBuf(info->region, info->pool, &recvBuf, bufLen);
       if (ret != ROK)
       {
-         RETVALUE(ROUTRES);
+         return (ROUTRES);
       }          
       curLen = bufLen;
       bufPtr = recvBuf;
@@ -6354,7 +6340,7 @@ S32              flags;         /* additional control flags */
                   (INET_ERR_CODE == ERR_WOULDBLOCK))
             {
                *len = 0;
-               RETVALUE(ROKDNA);
+               return (ROKDNA);
             }
 
 
@@ -6365,7 +6351,7 @@ S32              flags;         /* additional control flags */
                   (INET_ERR_CODE == ERR_CONNRESET))
             {
                *len = 0;
-               RETVALUE(RCLOSED);
+               return (RCLOSED);
             }
 
 #ifdef CMINETDBG
@@ -6383,7 +6369,7 @@ S32              flags;         /* additional control flags */
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
 
-            RETVALUE(RFAILED);
+            return RFAILED;
          } 
          curLen -= recvLen;
          bufPtr += recvLen;
@@ -6419,7 +6405,7 @@ S32              flags;         /* additional control flags */
 #endif
          {
             SPutSBuf(info->region, info->pool, recvBuf, bufLen);
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
          }
 
       /* cm_inet_c_001.main_48 : If Received 
@@ -6451,7 +6437,7 @@ S32              flags;         /* additional control flags */
 #endif /*ALIGN_64BIT*/
 #endif
             SPutSBuf(info->region, info->pool, recvBuf, bufLen);
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
          }
 
       /* cm_inet_c_001.main_48 : copy data to a message structure */
@@ -6460,7 +6446,7 @@ S32              flags;         /* additional control flags */
       {
          /* cleanup */
          SPutSBuf(info->region, info->pool, recvBuf, bufLen);       
-         RETVALUE(ret);
+         return (ret);
       }
 
 #ifdef CM_INET2  
@@ -6489,7 +6475,7 @@ S32              flags;         /* additional control flags */
       {
          SPutSBuf(info->region, info->pool, recvBuf, bufLen);    
          SPutMsg(mBuf); 
-         RETVALUE(ret);
+         return (ret);
       }
       *mPtr = mBuf;
 
@@ -6502,7 +6488,7 @@ S32              flags;         /* additional control flags */
          {
             remAddr6 = (struct sockaddr_in6 *)&remSockAddr;
             fromAddr->type = CM_INET_IPV6ADDR_TYPE;
-            fromAddr->u.ipv6Addr.port = CM_INET_NTOH_U16(remAddr6->sin6_port);
+            fromAddr->u.ipv6Addr.port = CM_INET_NTOH_UINT16(remAddr6->sin6_port);
             CM_INET_COPY_IPV6ADDR(&fromAddr->u.ipv6Addr.ipv6NetAddr, 
                   &remAddr6->sin6_addr);
          }
@@ -6510,13 +6496,13 @@ S32              flags;         /* additional control flags */
          {
             remAddr = (struct sockaddr_in *)&remSockAddr;
             fromAddr->type = CM_INET_IPV4ADDR_TYPE;
-            fromAddr->u.ipv4Addr.port = CM_INET_NTOH_U16(remAddr->sin_port);
-            fromAddr->u.ipv4Addr.address = CM_INET_NTOH_U32(remAddr->sin_addr.s_addr);
+            fromAddr->u.ipv4Addr.port = CM_INET_NTOH_UINT16(remAddr->sin_port);
+            fromAddr->u.ipv4Addr.address = CM_INET_NTOH_UINT32(remAddr->sin_addr.s_addr);
          }
 #else
          remAddr = (struct sockaddr_in *)&remSockAddr;
-         fromAddr->port    = CM_INET_NTOH_U16(remAddr->sin_port);
-         fromAddr->address = CM_INET_NTOH_U32(remAddr->sin_addr.s_addr);
+         fromAddr->port    = CM_INET_NTOH_UINT16(remAddr->sin_port);
+         fromAddr->address = CM_INET_NTOH_UINT32(remAddr->sin_addr.s_addr);
 #endif /* IPV6_SUPPORTED */
       }   
 
@@ -6541,7 +6527,7 @@ S32              flags;         /* additional control flags */
                numDBufs*sizeof(Buffer*));
          if (ret != ROK)
          {
-            RETVALUE(ROUTRES);
+            return (ROUTRES);
          }                     
 
          /* Allocate dBufs for gather read */ 
@@ -6561,12 +6547,12 @@ S32              flags;         /* additional control flags */
                 * of TCP ignore this error condition. The user will call 
                 * cmInetRecvMsg again */
                /* cm_inet_c_001.main_62:Warning fix */
-               if (sockFd->type != (U8)CM_INET_STREAM)/* G++ */
+               if (sockFd->type != (uint8_t)CM_INET_STREAM)/* G++ */
                {
 
 #ifdef T2K_MEM_LEAK_DBG
                       char * file = __FILE__;
-                      U32  line   = __LINE__;
+                      uint32_t  line   = __LINE__;
 #endif
 
                   /* cleanup  the dBuf array */
@@ -6579,14 +6565,14 @@ S32              flags;         /* additional control flags */
                   /* allocate flat receive buffer */
                   ret = SGetSBuf(info->region, info->pool, &recvBuf, bufLen);
                   if (ret != ROK)
-                     RETVALUE(ROUTRES);
+                     return (ROUTRES);
 
                   allocFlatBuf = TRUE;
 
                   /* update the message structure */
 #ifdef SS_LINUX
                   rxArr[0].iov_base = (Void*)recvBuf;  
-                  rxArr[0].iov_len = (U32)bufLen;    
+                  rxArr[0].iov_len = (uint32_t)bufLen;    
 #else
                   rxArr[0].iov_base = (S8*)recvBuf;
                   rxArr[0].iov_len = bufLen;
@@ -6599,7 +6585,7 @@ S32              flags;         /* additional control flags */
             {
                SPutSBuf(info->region, info->pool, (Data*)dBufs, 
                      numDBufs*sizeof(Buffer*)); 
-               RETVALUE(ret);
+               return (ret);
             }
          }
 
@@ -6649,7 +6635,7 @@ S32              flags;         /* additional control flags */
                { 
                 #ifdef T2K_MEM_LEAK_DBG
                    char * file = __FILE__;
-                   U32  line   = __LINE__;
+                   uint32_t  line   = __LINE__;
                 #endif
 
                   SPutDBuf(info->region, info->pool, dBufs[i]);   
@@ -6671,9 +6657,9 @@ S32              flags;         /* additional control flags */
                 * against unexpected WOULDBLOCKS observed in solaris
                 */
                if (*mPtr != NULLP)
-                  RETVALUE(ROK);
+                  return ROK;
 
-               RETVALUE(ROKDNA);
+               return (ROKDNA);
             }
 
             /* cm_inet_c_001.main_50 - Free the buffer only when valid, it might be that
@@ -6703,9 +6689,9 @@ S32              flags;         /* additional control flags */
             if (INET_ERR_CODE == ERR_CONNABORTED)
             {
                *len = 0;
-               RETVALUE(RCLOSED);
+               return (RCLOSED);
             }
-            RETVALUE(RFAILED)
+            return RFAILED
          } 
 
          bufLen -= recvLen;
@@ -6749,11 +6735,11 @@ S32              flags;         /* additional control flags */
                      {
                         /* build up HBH opt array from recvd ancillary data */
                         ret = cmInet6BuildRecvHopOptsArr(
-                              (U8 *)CMSG_DATA(cmsgptr), cmsgptr->cmsg_len, 
+                              (uint8_t *)CMSG_DATA(cmsgptr), cmsgptr->cmsg_len, 
                               &ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.hbhOptsArr,
                               0, info);
                         if (ret != ROK)
-                           RETVALUE(ret);
+                           return (ret);
                         ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.hbhHdrPrsnt = 
                            TRUE; 
                      }
@@ -6766,11 +6752,11 @@ S32              flags;         /* additional control flags */
                      {
                         /* build up Dest opt array from recvd ancillary data */
                         ret = cmInet6BuildRecvDstOptsArr(
-                              (U8 *)CMSG_DATA(cmsgptr), cmsgptr->cmsg_len, 
+                              (uint8_t *)CMSG_DATA(cmsgptr), cmsgptr->cmsg_len, 
                               &ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.destOptsArr,
                               1, info); 
                         if (ret != ROK)
-                           RETVALUE(ret);
+                           return (ret);
                         ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.destOptsPrsnt = 
                            TRUE;
                      }
@@ -6778,21 +6764,21 @@ S32              flags;         /* additional control flags */
                      {
                         /* build up Route Hdr from recvd ancillary data */
                         ret = cmInet6BuildRecvRtHdr(
-                              (U8 *)CMSG_DATA(cmsgptr), cmsgptr->cmsg_len, &rtHdr0,
+                              (uint8_t *)CMSG_DATA(cmsgptr), cmsgptr->cmsg_len, &rtHdr0,
                               &ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.rtOptsArr, 
                               info);
                         if (ret != ROK)
-                           RETVALUE(ret);
+                           return (ret);
                         ipHdrParams->u.ipv6HdrParm.ipv6ExtHdr.rtOptsPrsnt = 
                            TRUE; 
                      }
                      else if(cmsgptr->cmsg_type == IPV6_HOPLIMIT)
                      {
                         /* get the received hoplimit */
-                        ret = cmInet6GetHopLimitValue((U8 *)CMSG_DATA(cmsgptr),
+                        ret = cmInet6GetHopLimitValue((uint8_t *)CMSG_DATA(cmsgptr),
                               cmsgptr->cmsg_len, &ipHdrParams->u.ipv6HdrParm);
                         if (ret != ROK)
-                           RETVALUE(ret);
+                           return (ret);
                      }
                   }
                }  /* for */            
@@ -6810,8 +6796,8 @@ S32              flags;         /* additional control flags */
                   localIf->intfPrsnt = TRUE;
                   localIf->localIf = pkt6Info->ipi6_ifindex;
                   localIf->localIfAddr.type =  CM_INET_IPV6ADDR_TYPE;
-                  cmMemcpy((U8 *)&localIf->localIfAddr.u.ipv6NetAddr,
-                        (U8 *)(int *)&pkt6Info->ipi6_addr, 16);
+                  memcpy(&localIf->localIfAddr.u.ipv6NetAddr,
+                        &pkt6Info->ipi6_addr, 16);
                }
             }   
 #endif /* LOCAL_INTF */
@@ -6852,7 +6838,7 @@ S32              flags;         /* additional control flags */
                remAddr6 = (struct sockaddr_in6 *)&remSockAddr;
                fromAddr->type = CM_INET_IPV6ADDR_TYPE;
                fromAddr->u.ipv6Addr.port = 
-                  CM_INET_NTOH_U16(remAddr6->sin6_port);
+                  CM_INET_NTOH_UINT16(remAddr6->sin6_port);
                CM_INET_COPY_IPV6ADDR(&fromAddr->u.ipv6Addr.ipv6NetAddr, 
                      &remAddr6->sin6_addr);
             }
@@ -6860,14 +6846,14 @@ S32              flags;         /* additional control flags */
             {
                remAddr = (struct sockaddr_in *)&remSockAddr;
                fromAddr->type = CM_INET_IPV4ADDR_TYPE;
-               fromAddr->u.ipv4Addr.port = CM_INET_NTOH_U16(remAddr->sin_port);
+               fromAddr->u.ipv4Addr.port = CM_INET_NTOH_UINT16(remAddr->sin_port);
                fromAddr->u.ipv4Addr.address = 
-                  CM_INET_NTOH_U32(remAddr->sin_addr.s_addr);
+                  CM_INET_NTOH_UINT32(remAddr->sin_addr.s_addr);
             }
 #else
             remAddr = (struct sockaddr_in *)&remSockAddr;
-            fromAddr->port    = CM_INET_NTOH_U16(remAddr->sin_port);
-            fromAddr->address = CM_INET_NTOH_U32(remAddr->sin_addr.s_addr);
+            fromAddr->port    = CM_INET_NTOH_UINT16(remAddr->sin_port);
+            fromAddr->address = CM_INET_NTOH_UINT32(remAddr->sin_addr.s_addr);
 #endif /* IPV6_SUPPORTED */
          }
 
@@ -6883,7 +6869,7 @@ S32              flags;         /* additional control flags */
             {
                /* cleanup */
                SPutSBuf(info->region, info->pool, recvBuf, bufLen);       
-               RETVALUE(ret);
+               return (ret);
             }
 
             /* cm_inet_c_001.main_48 : A 0 len UDP packet could be received */
@@ -6894,7 +6880,7 @@ S32              flags;         /* additional control flags */
                {
                   SPutSBuf(info->region, info->pool, recvBuf, bufLen);    
                   SPutMsg(tempMsg); 
-                  RETVALUE(ret);
+                  return (ret);
                }
             }
 
@@ -6921,7 +6907,7 @@ S32              flags;         /* additional control flags */
                   SPutMsg(*mPtr);
                SPutSBuf(info->region, info->pool, (Data*)dBufs, 
                      numDBufs*sizeof(Buffer*)); 
-               RETVALUE(ret);
+               return (ret);
             }
          }
 
@@ -6941,7 +6927,7 @@ S32              flags;         /* additional control flags */
                SPutMsg(tempMsg);
                SPutSBuf(info->region, info->pool, (Data*)dBufs, 
                      numDBufs*sizeof(Buffer*)); 
-               RETVALUE(RFAILED);
+               return RFAILED;
             }
             SPutMsg(tempMsg);
          }
@@ -6987,7 +6973,7 @@ S32              flags;         /* additional control flags */
             {
                SPutMsg(*mPtr);
             }
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
 
          }
 
@@ -7025,7 +7011,7 @@ S32              flags;         /* additional control flags */
             CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET069, 0, prntBuf);
 #endif
 #endif
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
 
          }
 
@@ -7034,10 +7020,10 @@ S32              flags;         /* additional control flags */
    else
    {
       /* not enough data pending yet */
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetRecvMsg */
 
 
@@ -7078,7 +7064,7 @@ S32              flags;         /* additional control flags */
  */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPeekNew
+S16 cmInetPeekNew
 (
  CmInetFd        *sockFd,        /* socket file descriptor */ 
  CmInetAddr      *fromAddr,      /* sender Internet address/port */ 
@@ -7088,7 +7074,7 @@ PUBLIC S16 cmInetPeekNew
  Data            *data           /* read data */
  )
 #else
-PUBLIC S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
+S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
    CmInetFd        *sockFd;        /* socket file descriptor */ 
    CmInetAddr      *fromAddr;      /* sender Internet address/port */ 
    CmInetMemInfo   *info;          /* buffer allocation info */
@@ -7108,7 +7094,6 @@ PUBLIC S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
    CmInetSockAddr  remSockAddr;     /* to get packet's source IP address */
 #endif /* IPV6_SUPPORTED */
 
-   TRC2(cmInetPeeknew);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
@@ -7116,7 +7101,7 @@ PUBLIC S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
          (info == NULLP) || (data == NULLP) ||
          (dataPos < 0) || (dataLen < 0))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -7166,7 +7151,7 @@ PUBLIC S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
             (INET_ERR_CODE == ERR_WOULDBLOCK))
       {
          recvLen = 0;
-         RETVALUE(ROKDNA);
+         return (ROKDNA);
       }
       /* cm_inet_c_001.main_61: added host unreachable check */
       if ((INET_ERR_CODE == ERR_CONNABORTED) ||
@@ -7175,7 +7160,7 @@ PUBLIC S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
             (INET_ERR_CODE == ERR_CONNREFUSED))
       {
          recvLen = 0;
-         RETVALUE(RCLOSED);
+         return (RCLOSED);
       }
 #ifdef CMINETDBG
 #ifndef ALIGN_64BIT
@@ -7192,17 +7177,17 @@ PUBLIC S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
 #endif
 #endif /* CMINETDBG */
 
-      RETVALUE(RFAILED);
+      return RFAILED;
    } 
    else if (recvLen == 0)
    {
-      RETVALUE(RCLOSED);
+      return (RCLOSED);
    }
 
    /* cm_inet_c_001.main_57 - Fix for validation */
    if (recvLen < (S32)dataLen)  /* maybe happen */
    {
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    } 
 
    /* setup return destination Internet address */
@@ -7210,13 +7195,13 @@ PUBLIC S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
    if ((fromAddr != NULLP) && (remAddrLen > 0))
    {
 #ifdef IPV6_SUPPORTED
-      cmMemset((U8*)fromAddr, 0, sizeof(fromAddr));
+      memset(fromAddr, 0, sizeof(fromAddr));
       if (remAddrLen == sizeof(struct sockaddr_in6))
       {
          remAddr6 = (struct sockaddr_in6 *)&remSockAddr;
          fromAddr->type = CM_INET_IPV6ADDR_TYPE;
          fromAddr->u.ipv6Addr.port = 
-            CM_INET_NTOH_U16(remAddr6->sin6_port);
+            CM_INET_NTOH_UINT16(remAddr6->sin6_port);
          CM_INET_COPY_IPV6ADDR(&fromAddr->u.ipv6Addr.ipv6NetAddr, 
                &remAddr6->sin6_addr);
       }
@@ -7224,18 +7209,18 @@ PUBLIC S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
       {
          remAddr = (struct sockaddr_in *)&remSockAddr;
          fromAddr->type = CM_INET_IPV4ADDR_TYPE;
-         fromAddr->u.ipv4Addr.port = CM_INET_NTOH_U16(remAddr->sin_port);
+         fromAddr->u.ipv4Addr.port = CM_INET_NTOH_UINT16(remAddr->sin_port);
          fromAddr->u.ipv4Addr.address = 
-            CM_INET_NTOH_U32(remAddr->sin_addr.s_addr);
+            CM_INET_NTOH_UINT32(remAddr->sin_addr.s_addr);
       } 
 #else
       remAddr = (struct sockaddr_in *)&remSockAddr;
-      fromAddr->port    = CM_INET_NTOH_U16(remAddr->sin_port);
-      fromAddr->address = CM_INET_NTOH_U32(remAddr->sin_addr.s_addr);
+      fromAddr->port    = CM_INET_NTOH_UINT16(remAddr->sin_port);
+      fromAddr->address = CM_INET_NTOH_UINT32(remAddr->sin_addr.s_addr);
 #endif /* IPV6_SUPPORTED */
    }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetPeeknew */
 
 \f
@@ -7260,7 +7245,7 @@ PUBLIC S16 cmInetPeekNew(sockFd, fromAddr, info, dataPos, dataLen, data)
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPeek
+S16 cmInetPeek
 (
 CmInetFd        *sockFd,        /* socket file descriptor */ 
 CmInetAddr      *fromAddr,      /* sender Internet address/port */ 
@@ -7270,7 +7255,7 @@ MsgLen           dataLen,       /* length of read data */
 Data            *data           /* read data */
 )
 #else
-PUBLIC S16 cmInetPeek(sockFd, fromAddr, info, dataPos, dataLen, data)
+S16 cmInetPeek(sockFd, fromAddr, info, dataPos, dataLen, data)
 CmInetFd        *sockFd;        /* socket file descriptor */ 
 CmInetAddr      *fromAddr;      /* sender Internet address/port */ 
 CmInetMemInfo   *info;          /* buffer allocation info */
@@ -7286,11 +7271,11 @@ Data            *data;          /* read data */
    MsgLen       i;                 /* index */
    MsgLen       j;                 /* index */
    S32          ret;               /* temporary return value */
-   U32          timeout;           /* timeout for cmInetSelect() */ 
-   U32         *timeoutPtr;        /* pointer to timeout */
+   uint32_t          timeout;           /* timeout for cmInetSelect() */ 
+   uint32_t         *timeoutPtr;        /* pointer to timeout */
    S16          numFdS;            /* number of ready descriptors */
    /* cm_inet_c_001.main_45 - fixing the UMR issue in 64bit linux */
-   U32          pendLen = 0;           /* pending data length */
+   uint32_t          pendLen = 0;           /* pending data length */
    S32          recvLen;           /* number of received octets */
    S32          remAddrLen;        /* length of remote address length */
    CmInetFdSet  readFdS;           /* socket file descriptor set */
@@ -7302,7 +7287,6 @@ Data            *data;          /* read data */
    CmInetSockAddr  remSockAddr;     /* to get packet's source IP address */
 #endif /* IPV6_SUPPORTED */
 
-   TRC2(cmInetPeek);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
@@ -7310,7 +7294,7 @@ Data            *data;          /* read data */
          (info == NULLP) || (data == NULLP) ||
          (dataPos < 0) || (dataLen < 0))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -7343,9 +7327,9 @@ Data            *data;          /* read data */
           * errors just return RFAILED.
           */
          if (ret == RCLOSED)
-            RETVALUE(RCLOSED);
+            return (RCLOSED);
 
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 
       /* check if connection got closed */
@@ -7359,7 +7343,7 @@ Data            *data;          /* read data */
           * considered as connection closed. So return ROKDNA instead of 
           * RCLOSED even for TCP sockets
           */
-         RETVALUE(ROKDNA);
+         return (ROKDNA);
       }
       /* added check for TCP/UDP socket. Pending data len in the socket 
          recv buffer is determined by ioctl call in cmInetGetNumRead. 
@@ -7401,7 +7385,7 @@ Data            *data;          /* read data */
          ret = SGetSBuf(info->region, info->pool, &recvBuf, bufLen);                  
          if (ret != ROK)
          {
-            RETVALUE(ROUTRES);
+            return (ROUTRES);
          }          
 
          /* added different recvfrom calls with 
@@ -7446,7 +7430,7 @@ Data            *data;          /* read data */
                   (INET_ERR_CODE == ERR_WOULDBLOCK))
             {
                recvLen = 0;
-               RETVALUE(ROKDNA);
+               return (ROKDNA);
             }
 
             /* moved up the cleanup */
@@ -7470,16 +7454,16 @@ Data            *data;          /* read data */
                   (INET_ERR_CODE == ERR_CONNRESET))
             {
                recvLen = 0;
-               RETVALUE(RCLOSED);
+               return (RCLOSED);
             }
-            RETVALUE(RFAILED);
+            return RFAILED;
          } 
 
          if (recvLen < (S32)bufLen)  /* maybe happen */
          {
             /* cleanup */
             SPutSBuf(info->region, info->pool, recvBuf, bufLen);                            
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
          } 
 
          /* copy data */
@@ -7491,13 +7475,13 @@ Data            *data;          /* read data */
          if ((fromAddr != NULLP) && (remAddrLen > 0))
          {
 #ifdef IPV6_SUPPORTED
-            cmMemset((U8*)fromAddr, 0, sizeof(fromAddr));
+            memset(fromAddr, 0, sizeof(fromAddr));
             if (remAddrLen == sizeof(struct sockaddr_in6))
             {
                remAddr6 = (struct sockaddr_in6 *)&remSockAddr;
                fromAddr->type = CM_INET_IPV6ADDR_TYPE;
                fromAddr->u.ipv6Addr.port = 
-                  CM_INET_NTOH_U16(remAddr6->sin6_port);
+                  CM_INET_NTOH_UINT16(remAddr6->sin6_port);
                CM_INET_COPY_IPV6ADDR(&fromAddr->u.ipv6Addr.ipv6NetAddr, 
                      &remAddr6->sin6_addr);
             }
@@ -7505,14 +7489,14 @@ Data            *data;          /* read data */
             {
                remAddr = (struct sockaddr_in *)&remSockAddr;
                fromAddr->type = CM_INET_IPV4ADDR_TYPE;
-               fromAddr->u.ipv4Addr.port = CM_INET_NTOH_U16(remAddr->sin_port);
+               fromAddr->u.ipv4Addr.port = CM_INET_NTOH_UINT16(remAddr->sin_port);
                fromAddr->u.ipv4Addr.address = 
-                  CM_INET_NTOH_U32(remAddr->sin_addr.s_addr);
+                  CM_INET_NTOH_UINT32(remAddr->sin_addr.s_addr);
             } 
 #else
             remAddr = (struct sockaddr_in *)&remSockAddr;
-            fromAddr->port    = CM_INET_NTOH_U16(remAddr->sin_port);
-            fromAddr->address = CM_INET_NTOH_U32(remAddr->sin_addr.s_addr);
+            fromAddr->port    = CM_INET_NTOH_UINT16(remAddr->sin_port);
+            fromAddr->address = CM_INET_NTOH_UINT32(remAddr->sin_addr.s_addr);
 #endif /* IPV6_SUPPORTED */
          }   
 
@@ -7522,16 +7506,16 @@ Data            *data;          /* read data */
       else
       {
          /* not enough data pending yet */
-         RETVALUE(ROKDNA);
+         return (ROKDNA);
       }
    }
    else
    {
       /* no data pending */ 
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    }   
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetPeek */
 
 \f
@@ -7551,24 +7535,23 @@ Data            *data;          /* read data */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetClose
+S16 cmInetClose
 (
 CmInetFd *sockFd                /* socket file descriptor */
 )
 #else
-PUBLIC S16 cmInetClose(sockFd)
+S16 cmInetClose(sockFd)
 CmInetFd *sockFd;               /* socket file descriptor */
 #endif
 {
    S32 ret;                     /* temporary return value */
 
-   TRC2(cmInetClose);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -7593,10 +7576,10 @@ CmInetFd *sockFd;               /* socket file descriptor */
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET037, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetClose */
 
 \f
@@ -7625,26 +7608,25 @@ CmInetFd *sockFd;               /* socket file descriptor */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetShutdown
+S16 cmInetShutdown
 (
 CmInetFd *sockFd,               /* socket file descriptor */
 S32       howTo                 /* operation flag */
 )
 #else
-PUBLIC S16 cmInetShutdown(sockFd, howTo)
+S16 cmInetShutdown(sockFd, howTo)
 CmInetFd *sockFd;               /* socket file descriptor */
 S32       howTo;                /* operation flag */
 #endif
 {
    S32 ret;                     /* temporary return value */
 
-   TRC2(cmInetShutdown);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -7654,7 +7636,7 @@ S32       howTo;                /* operation flag */
       if (INET_ERR_CODE == ERR_NOTCONN)
       {
          /* socket is not connected */ 
-         RETVALUE(ROK)
+         return ROK
       }
       else
       {
@@ -7673,11 +7655,11 @@ S32       howTo;                /* operation flag */
          CMINETLOGERROR(ERRCLS_DEBUG, ECMINET038, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
    }   
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetShutdown */
 
 \f
@@ -7703,18 +7685,18 @@ S32       howTo;                /* operation flag */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetSelect
+S16 cmInetSelect
 (
 CmInetFdSet *readFdS,           /* read socket descriptor file set */  
 CmInetFdSet *writeFdS,          /* write socket descriptor file set */
-U32         *mSecTimeout,       /* timeout in msecs */
+uint32_t         *mSecTimeout,       /* timeout in msecs */
 S16         *numFdS             /* number of ready descriptors */
 )
 #else
-PUBLIC S16 cmInetSelect(readFdS, writeFdS, mSecTimeout, numFdS)
+S16 cmInetSelect(readFdS, writeFdS, mSecTimeout, numFdS)
 CmInetFdSet *readFdS;           /* read socket descriptor file set */  
 CmInetFdSet *writeFdS;          /* write socket descriptor file set */
-U32         *mSecTimeout;       /* timeout in msecs */
+uint32_t         *mSecTimeout;       /* timeout in msecs */
 S16         *numFdS;            /* number of ready descriptors */
 #endif
 {
@@ -7727,7 +7709,7 @@ S16         *numFdS;            /* number of ready descriptors */
    /* error check on parameters */
    if (numFdS == NULLP)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -7756,13 +7738,13 @@ S16         *numFdS;            /* number of ready descriptors */
    /* cm_inet_c_001.main_53 -  Return ROKDNA in case select was interrupted */
    if ((ret == INET_ERR) && (INET_ERR_CODE == ERR_EINTR))
    {
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
    }
 
    /* timeout occured */
    if (ret == 0)
    { 
-      RETVALUE(RTIMEOUT);
+      return (RTIMEOUT);
    }
 
    if (ret == INET_ERR)
@@ -7774,7 +7756,7 @@ S16         *numFdS;            /* number of ready descriptors */
       switch(errCode = INET_ERR_CODE)
       {
          case ERR_INVAL:
-            RETVALUE(ROK);
+            return ROK;
 
          default:
 #ifdef CMINETDBG
@@ -7784,7 +7766,7 @@ S16         *numFdS;            /* number of ready descriptors */
                   INET_ERR_CODE);
             CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET039, 0, prntBuf);
 #endif /* CMINETDBG */
-            RETVALUE(RFAILED);
+            return RFAILED;
 
       } /* end of switch */
    }
@@ -7793,7 +7775,7 @@ S16         *numFdS;            /* number of ready descriptors */
    /* cm_inet_c_001.main_54: Fix for Klockworks issue */
    *numFdS = (S16)ret;   
 
-   RETVALUE(ROK)
+   return ROK
 } /* end of  cmInetSelect */
 
 \f
@@ -7955,24 +7937,24 @@ S16         *numFdS;            /* number of ready descriptors */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetSetOpt
+S16 cmInetSetOpt
 (
 CmInetFd *sockFd,               /* socket file descriptor */ 
-U32       level,                /* option level */
-U32       type,                 /* option type */
+uint32_t       level,                /* option level */
+uint32_t       type,                 /* option type */
 Ptr       value                 /* option value */ 
 ) 
 #else
-PUBLIC S16 cmInetSetOpt(sockFd, level, type, value)
+S16 cmInetSetOpt(sockFd, level, type, value)
 CmInetFd *sockFd;               /* socket file descriptor */ 
-U32       level;                /* option level */
-U32       type;                 /* option type */
+uint32_t       level;                /* option level */
+uint32_t       type;                 /* option type */
 Ptr       value;                /* option value */
 #endif
 {
    S32  ret = ROK;              /* temporary return value */
-   U32  disable = 0;            /* disable option */
-   U32  enable = 1;             /* enable option */
+   uint32_t  disable = 0;            /* disable option */
+   uint32_t  enable = 1;             /* enable option */
 
    /* added for IPv4 options */
 #ifdef IPV4_OPTS_SUPPORTED
@@ -7987,8 +7969,8 @@ Ptr       value;                /* option value */
 
 #if (defined(SUNOS)|| defined(WIN32) || defined(SS_PS) || defined(SS_VW_MCAST)\
       || defined(HPOS))
-   U8   lpEnable = 1;           /* multicast loop enable */
-   U8   lpDisable = 0;          /* multicast loop disable */
+   uint8_t   lpEnable = 1;           /* multicast loop enable */
+   uint8_t   lpDisable = 0;          /* multicast loop disable */
 #endif /* SUNOS || WIN32 || SS_PS || SS_VW_MCAST || HPOS */
 
 #ifdef WIN32
@@ -8003,8 +7985,8 @@ Ptr       value;                /* option value */
 #endif /* SUNOS || WIN32  || SS_PS || SS_VW_MCAST || HPOS */
 
 #ifdef IPV6_SUPPORTED
-   U32    loopEna = 1;     /* IPv6 multicast loop enable */
-   U32    loopDis = 0;     /* IPv6 multicast loop disable */
+   uint32_t    loopEna = 1;     /* IPv6 multicast loop enable */
+   uint32_t    loopDis = 0;     /* IPv6 multicast loop disable */
    struct ipv6_mreq     *stMreq6Ptr;
    /* cm_inet_c_001.main_44 : some operating system doesnt have icmp6_filter. so 
       this flag is gaurded under ICMPV6_FILTER_SUPPORTED. so if user want this 
@@ -8047,35 +8029,34 @@ Ptr       value;                /* option value */
    CmInetSctpAssocParams      *pSctpAssocParams;
 #endif
 
-   U32    *optVal;
+   uint32_t    *optVal;
 
-   TRC2(cmInetSetOpt);
 
    /* cm_inet_c_001.main_58 : Added NULL check for value field */ 
    if(value == NULLP)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
    switch (type)
    {
       case CM_INET_OPT_BLOCK:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          switch(*optVal)
          {
             case CM_INET_OPT_ENABLE:
 
 #ifdef WIN32
                /* cm_inet_c_001.main_59: Fix for compilation warning */
-               ret = ioctlsocket(sockFd->fd, FIONBIO, (U32 *)&disable);
+               ret = ioctlsocket(sockFd->fd, FIONBIO, (uint32_t *)&disable);
 #else
 #ifdef SS_PS
                ret = ioctl(sockFd->fd, FIONBIO, (char*)&disable);
@@ -8094,7 +8075,7 @@ Ptr       value;                /* option value */
             case CM_INET_OPT_DISABLE:
 #ifdef WIN32
               /* cm_inet_c_001.main_59: Fix for compilation warning */
-              ret = ioctlsocket(sockFd->fd, FIONBIO, (U32 *)&enable); 
+              ret = ioctlsocket(sockFd->fd, FIONBIO, (uint32_t *)&enable); 
 #else
 #ifdef SS_PS
                ret = ioctl(sockFd->fd, FIONBIO, (char*)&enable);
@@ -8111,13 +8092,13 @@ Ptr       value;                /* option value */
 
             default:
                /* wrong value */
-               RETVALUE(RFAILED);
+               return RFAILED;
                break;
          }
          break;
 
       case CM_INET_OPT_REUSEADDR:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {
 #ifdef WIN32
@@ -8149,7 +8130,7 @@ Ptr       value;                /* option value */
          break;
 
       case CM_INET_OPT_BROADCAST:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {
 #ifdef WIN32
@@ -8173,7 +8154,7 @@ Ptr       value;                /* option value */
          break; 
 
       case CM_INET_OPT_KEEPALIVE:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {
 #ifdef WIN32
@@ -8197,19 +8178,19 @@ Ptr       value;                /* option value */
          break;
 
       case CM_INET_OPT_RX_BUF_SIZE:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          ret = setsockopt(sockFd->fd, level, SO_RCVBUF, 
                (char*)optVal, sizeof(*optVal));
          break;
 
       case CM_INET_OPT_TX_BUF_SIZE:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          ret = setsockopt(sockFd->fd, level, SO_SNDBUF, 
                (char*)optVal, sizeof(*optVal));
          break;
 
       case CM_INET_OPT_TCP_NODELAY:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {
 #ifdef WIN32
@@ -8244,11 +8225,11 @@ Ptr       value;                /* option value */
 
          /* Copy the addresses to stMreq structure */
 #ifdef SS_PS
-         stMreq.imr_mcastaddr.s_addr = CM_INET_HTON_U32(mCast->mCastAddr);
+         stMreq.imr_mcastaddr.s_addr = CM_INET_HTON_UINT32(mCast->mCastAddr);
 #else
-         stMreq.imr_multiaddr.s_addr = CM_INET_HTON_U32(mCast->mCastAddr);
+         stMreq.imr_multiaddr.s_addr = CM_INET_HTON_UINT32(mCast->mCastAddr);
 #endif
-         stMreq.imr_interface.s_addr = CM_INET_HTON_U32(mCast->localAddr);
+         stMreq.imr_interface.s_addr = CM_INET_HTON_UINT32(mCast->localAddr);
 
          ret = setsockopt(sockFd->fd, level, IP_ADD_MEMBERSHIP,
                (char*)&stMreq, sizeof(stMreq));
@@ -8259,11 +8240,11 @@ Ptr       value;                /* option value */
 
          /* Copy the addresses to stMreq structure */
 #ifdef SS_PS
-         stMreq.imr_mcastaddr.s_addr = CM_INET_HTON_U32(mCast->mCastAddr);
+         stMreq.imr_mcastaddr.s_addr = CM_INET_HTON_UINT32(mCast->mCastAddr);
 #else
-         stMreq.imr_multiaddr.s_addr = CM_INET_HTON_U32(mCast->mCastAddr);
+         stMreq.imr_multiaddr.s_addr = CM_INET_HTON_UINT32(mCast->mCastAddr);
 #endif
-         stMreq.imr_interface.s_addr = CM_INET_HTON_U32(mCast->localAddr);
+         stMreq.imr_interface.s_addr = CM_INET_HTON_UINT32(mCast->localAddr);
 
          ret = setsockopt(sockFd->fd, level, IP_DROP_MEMBERSHIP,
                (char*)&stMreq, sizeof(stMreq));
@@ -8276,7 +8257,7 @@ Ptr       value;                /* option value */
             support CM_INET_OPT_BSD_COMPAT */
 #ifndef CMINET_BSDCOMPAT
       case CM_INET_OPT_BSD_COMPAT:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {
             ret = setsockopt(sockFd->fd, level, SO_BSDCOMPAT,
@@ -8297,11 +8278,11 @@ Ptr       value;                /* option value */
 #if (defined(SUNOS)|| defined(WIN32) || defined(SS_PS) || defined(SS_VW) \
       || defined(HPOS))
       case CM_INET_OPT_HDR_INCLD:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {
 #ifdef WIN32 
-            RETVALUE(RNA);    
+            return (RNA);    
 #else
             ret = setsockopt(sockFd->fd, level, IP_HDRINCL,
                   (char*)&enable, sizeof(enable));
@@ -8310,7 +8291,7 @@ Ptr       value;                /* option value */
          else if (*optVal == CM_INET_OPT_DISABLE)
          {
 #ifdef WIN32
-            RETVALUE(RNA);    
+            return (RNA);    
 #else
             ret = setsockopt(sockFd->fd, level, IP_HDRINCL,
                   (char*)&disable, sizeof(disable));
@@ -8326,20 +8307,20 @@ Ptr       value;                /* option value */
             This socket option is MUST be set (when this server is opened)
             if the RSVP server wants to intercept raw RSVP packets. */
       case CM_INET_OPT_IP_ROUTER_ALERT:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {   
             ret = setsockopt(sockFd->fd, level, IP_ROUTER_ALERT,
                   (char*)&enable, sizeof(enable));
             if (ret != ROK)
-               RETVALUE(RFAILED);
+               return RFAILED;
          }
          else if (*optVal == CM_INET_OPT_DISABLE)
          {   
             ret = setsockopt(sockFd->fd, level, IP_ROUTER_ALERT,
                   (char*)&disable, sizeof(disable));
             if (ret != ROK)
-               RETVALUE(RFAILED);
+               return RFAILED;
          }   
          break;         
 #endif /* SS_LINUX */
@@ -8347,7 +8328,7 @@ Ptr       value;                /* option value */
          /* set Router Alert socket option */
       case CM_INET_OPT_IP_OPTIONS:
 #if (defined (SS_VW) || defined(SS_LINUX))
-         RETVALUE(RNA);
+         return (RNA);
 #else  
          tempTknStr64=(TknStr64 *)value;
          if (tempTknStr64->pres == TRUE)
@@ -8368,7 +8349,7 @@ Ptr       value;                /* option value */
                      (char *)tempTknStr64->val, tempTknStr64->len);
          }
          else
-            RETVALUE(RFAILED); /* Trying to set IPv4 Hdr option
+            return RFAILED; /* Trying to set IPv4 Hdr option
                                 * without giving option values*/
 #endif /* SS_VW || SS_LINUX */
          break;
@@ -8378,7 +8359,7 @@ Ptr       value;                /* option value */
 #if (defined(SS_LINUX) && (!defined(SS_VW) && !defined(WIN32)))
 #ifdef LOCAL_INTF
       case CM_INET_OPT_IPV4_PKTINFO:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {   
             /* set IP_PKTINFO option when IP_ROUTER_ALERT is set in linux */
@@ -8386,7 +8367,7 @@ Ptr       value;                /* option value */
                   (char*)&enable, sizeof(enable));
 
             if (ret != ROK)
-               RETVALUE(RFAILED);
+               return RFAILED;
          }
          else if (*optVal == CM_INET_OPT_DISABLE)
          {   
@@ -8395,7 +8376,7 @@ Ptr       value;                /* option value */
                   (char*)&disable, sizeof(disable));
 
             if (ret != ROK)
-               RETVALUE(RFAILED);
+               return RFAILED;
          }   
          break;   
 #endif /* LOCAL_INTF */            
@@ -8404,7 +8385,7 @@ Ptr       value;                /* option value */
 #endif /* SUNOS || WIN32 || SS_PS || SS_VW || HPOS */
 
       case CM_INET_OPT_DONTFRAGMENT:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {
 #ifdef WIN32
@@ -8424,13 +8405,13 @@ Ptr       value;                /* option value */
          /* also add these 2 options for VxWorks */         
 #if (defined(SUNOS)|| defined(WIN32) || defined(HPOS) || defined(SS_VW))
       case CM_INET_OPT_TOS:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          ret = setsockopt(sockFd->fd, level, IP_TOS,
                (char*)optVal, sizeof(*optVal));
          break;
 
       case CM_INET_OPT_TTL:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          ret = setsockopt(sockFd->fd, level, IP_TTL,
                (char*)optVal, sizeof(*optVal));
          break;
@@ -8440,7 +8421,7 @@ Ptr       value;                /* option value */
 #if (defined(SUNOS)|| defined(WIN32) || defined(SS_PS) || defined(SS_VW_MCAST) \
       || defined(HPOS))
       case CM_INET_OPT_MCAST_LOOP:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {
 #ifdef SS_VW            
@@ -8464,28 +8445,28 @@ Ptr       value;                /* option value */
          break;
 
       case CM_INET_OPT_MCAST_IF:
-         optVal = (U32*)value;
-         *optVal = CM_INET_HTON_U32((U32)*optVal); 
+         optVal = (uint32_t*)value;
+         *optVal = CM_INET_HTON_UINT32((uint32_t)*optVal); 
          ret = setsockopt(sockFd->fd, level, IP_MULTICAST_IF,
                (char *)optVal, sizeof(struct in_addr));
          break;
 
       case CM_INET_OPT_MCAST_TTL:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          /* remove CONSTANT in setsockopt for VW */
 #ifdef SS_VW      
          ret = setsockopt(sockFd->fd, level, IP_MULTICAST_TTL,
-               (char *)optVal, sizeof(U8));
+               (char *)optVal, sizeof(uint8_t));
 #else
          ret = setsockopt(sockFd->fd, level, IP_MULTICAST_TTL,
-               (CONSTANT char *)optVal, sizeof(U8));
+               (CONSTANT char *)optVal, sizeof(uint8_t));
 #endif /* SS_VW */         
          break;
 #endif /* SUNOS || WIN32 || SS_PS || SS_VW_MCAST || HPOS */
 
 #ifdef IPV6_SUPPORTED
       case CM_INET_OPT_IPV6_TTL:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          ret = setsockopt(sockFd->fd, level, IPV6_UNICAST_HOPS,
                (char*)optVal, sizeof(*optVal));
          break;
@@ -8503,7 +8484,7 @@ Ptr       value;                /* option value */
          break;
 
       case CM_INET_OPT_MCAST6_LOOP:  
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if (*optVal == CM_INET_OPT_ENABLE)
          {
             ret = setsockopt(sockFd->fd, level, IPV6_MULTICAST_LOOP,
@@ -8518,13 +8499,13 @@ Ptr       value;                /* option value */
 
       case CM_INET_OPT_MCAST6_IF:
          ret = setsockopt(sockFd->fd, level, IPV6_MULTICAST_IF,
-               (U32 *)value, sizeof(U32));
+               (uint32_t *)value, sizeof(uint32_t));
          break;
 
       case CM_INET_OPT_MCAST6_HOPS:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          ret = setsockopt(sockFd->fd, level, IPV6_MULTICAST_HOPS,
-               (char *)optVal, sizeof(U32));
+               (char *)optVal, sizeof(uint32_t));
          break;
 
          /* cm_inet_c_001.main_44 : some operating system doesnt have icmp6_filter. so 
@@ -8543,13 +8524,13 @@ Ptr       value;                /* option value */
          /* added new options */
 #ifdef IPV6_OPTS_SUPPORTED
       case CM_INET_OPT_RECVIPV6_HOPLIM:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
 #ifdef SS_LINUX         
          ret = setsockopt(sockFd->fd, level, IPV6_HOPLIMIT,
-               (char *)optVal, sizeof(U32)); 
+               (char *)optVal, sizeof(uint32_t)); 
 #else
          ret = setsockopt(sockFd->fd, level, IPV6_HOPLIMIT,
-               (char *)optVal, sizeof(U32)); 
+               (char *)optVal, sizeof(uint32_t)); 
          /* enable the reception of IPv6 HopLimit value as ancillary data */
          ret = setsockopt(sockFd->fd, level, IPV6_RECVHOPLIMIT,
                (char*)&enable, sizeof(enable)); 
@@ -8558,35 +8539,35 @@ Ptr       value;                /* option value */
          break;
 
       case CM_INET_OPT_RECVIPV6_HBHOPTS:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
 #ifdef SS_LINUX
          ret = setsockopt(sockFd->fd, level, IPV6_HOPOPTS,
-               (char *)optVal, sizeof(U32));
+               (char *)optVal, sizeof(uint32_t));
 #else
          ret = setsockopt(sockFd->fd, level, IPV6_RECVHOPOPTS,
-               (char *)optVal, sizeof(U32)); 
+               (char *)optVal, sizeof(uint32_t)); 
 #endif /* SS_LINUX */          
          break;
 
       case CM_INET_OPT_RECVIPV6_DSTOPTS:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
 #ifdef SS_LINUX         
          ret = setsockopt(sockFd->fd, level, IPV6_DSTOPTS,
-               (char *)optVal, sizeof(U32));
+               (char *)optVal, sizeof(uint32_t));
 #else         
          ret = setsockopt(sockFd->fd, level, IPV6_RECVDSTOPTS,
-               (char *)optVal, sizeof(U32));
+               (char *)optVal, sizeof(uint32_t));
 #endif /* SS_LINUX */
          break;
 
       case CM_INET_OPT_RECVIPV6_RTHDR:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
 #ifdef SS_LINUX         
          ret = setsockopt(sockFd->fd, level, IPV6_RTHDR,
-               (char *)optVal, sizeof(U32));
+               (char *)optVal, sizeof(uint32_t));
 #else
          ret = setsockopt(sockFd->fd, level, IPV6_RECVRTHDR,
-               (char *)optVal, sizeof(U32));
+               (char *)optVal, sizeof(uint32_t));
 #endif /* SS_LINUX */         
          break;      
 
@@ -8598,7 +8579,7 @@ Ptr       value;                /* option value */
           * type, then it will fail here due to above reason */
 #ifdef SS_LINUX
       case CM_INET_OPT_IP_ROUTER_ALERT6:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          if(*optVal == CM_INET_OPT_ENABLE)
             ret = setsockopt(sockFd->fd, IPPROTO_IPV6, IPV6_ROUTER_ALERT,
                   (char *)&enable, sizeof(enable));          
@@ -8612,10 +8593,10 @@ Ptr       value;                /* option value */
 
 #ifdef LOCAL_INTF         
       case CM_INET_OPT_IPV6_PKTINFO:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
 #ifdef SS_LINUX         
          ret = setsockopt(sockFd->fd, level, IPV6_PKTINFO,
-               (char *)optVal, sizeof(U32));
+               (char *)optVal, sizeof(uint32_t));
 #else         
          ret = setsockopt(sockFd->fd, level, IPV6_RECVPKTINFO,
                (char *)&enable, sizeof(enable));
@@ -8630,7 +8611,7 @@ Ptr       value;                /* option value */
       case CM_INET_OPT_LINGER:
          pSockLinger = (CmInetSockLinger *)value;
 
-         cmMemset((U8*)&lngr, 0, sizeof(struct linger));
+         memset(&lngr, 0, sizeof(struct linger));
 
          if (pSockLinger->enable == TRUE)
             lngr.l_onoff = 1;
@@ -8644,7 +8625,7 @@ Ptr       value;                /* option value */
       case CM_INET_OPT_SCTP_EVENTS:
          pSctpEvent = (CmInetSctpSockEvent *)value;
 
-         cmMemset((U8*)&event, 0, sizeof(struct sctp_event_subscribe));
+         memset(&event, 0, sizeof(struct sctp_event_subscribe));
 
          if (pSctpEvent->dataIoEvent == TRUE)
             event.sctp_data_io_event = 1;
@@ -8680,7 +8661,7 @@ Ptr       value;                /* option value */
       case CM_INET_OPT_SCTP_PRIM_ADDR:
          pSctpPrimAddr = (CmInetSctpPrimAddr *)value;
 
-         cmMemset((U8*)&setPrim, 0, sizeof(struct sctp_setprim));
+         memset(&setPrim, 0, sizeof(struct sctp_setprim));
 
 #ifdef IPV6_SUPPORTED 
          if (pSctpPrimAddr->addr.type == CM_INET_IPV6ADDR_TYPE)
@@ -8701,26 +8682,26 @@ Ptr       value;                /* option value */
                CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET040, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-               RETVALUE(RFAILED);
+               return RFAILED;
             }
 
             pAddr6 = (struct sockaddr_in6*)&(setPrim.ssp_addr);
             pAddr6->sin6_family      = AF_INET6;
-            pAddr6->sin6_port        = CM_INET_HTON_U16(pSctpPrimAddr->port);
+            pAddr6->sin6_port        = CM_INET_HTON_UINT16(pSctpPrimAddr->port);
             CM_INET_COPY_IPV6ADDR(&pAddr6->sin6_addr.s6_addr, &pSctpPrimAddr->addr.u.ipv6NetAddr); 
          }
          else 
          {
             pAddr = (struct sockaddr_in*)&(setPrim.ssp_addr);
             pAddr->sin_family      = AF_INET;
-            pAddr->sin_port        = CM_INET_HTON_U16(pSctpPrimAddr->port);
-            pAddr->sin_addr.s_addr = CM_INET_HTON_U32(pSctpPrimAddr->addr.u.ipv4NetAddr);
+            pAddr->sin_port        = CM_INET_HTON_UINT16(pSctpPrimAddr->port);
+            pAddr->sin_addr.s_addr = CM_INET_HTON_UINT32(pSctpPrimAddr->addr.u.ipv4NetAddr);
          }
 #else 
          pAddr = (struct sockaddr_in*)&(setPrim.ssp_addr);
          pAddr->sin_family      = AF_INET;
-         pAddr->sin_port        = CM_INET_HTON_U16(pSctpPrimAddr->port);
-         pAddr->sin_addr.s_addr = CM_INET_HTON_U32(pSctpPrimAddr->addr.u.ipv4NetAddr);
+         pAddr->sin_port        = CM_INET_HTON_UINT16(pSctpPrimAddr->port);
+         pAddr->sin_addr.s_addr = CM_INET_HTON_UINT32(pSctpPrimAddr->addr.u.ipv4NetAddr);
 #endif /* IPV6_SUPPORTED */
 
          setPrim.ssp_assoc_id   = pSctpPrimAddr->assocId;
@@ -8731,7 +8712,7 @@ Ptr       value;                /* option value */
       case CM_INET_OPT_SCTP_PEERADDR_PARAMS:
          pSctpPAddrParams = (CmInetSctpPeerAddrParams *)value;
 
-         cmMemset((U8*)&addrParams, 0, sizeof(struct sctp_paddrparams));
+         memset(&addrParams, 0, sizeof(struct sctp_paddrparams));
 
 
          if (pSctpPAddrParams->s.addrPres == TRUE)
@@ -8756,26 +8737,26 @@ Ptr       value;                /* option value */
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
 
-                  RETVALUE(RFAILED);
+                  return RFAILED;
                }
 
                pAddr6 = (struct sockaddr_in6*)&(addrParams.spp_address);
                pAddr6->sin6_family      = AF_INET6;
-               pAddr6->sin6_port        = CM_INET_HTON_U16(pSctpPAddrParams->s.port);
+               pAddr6->sin6_port        = CM_INET_HTON_UINT16(pSctpPAddrParams->s.port);
                CM_INET_COPY_IPV6ADDR(&pAddr6->sin6_addr.s6_addr, &pSctpPAddrParams->s.addr.u.ipv6NetAddr); 
             }
             else 
             {
                pAddr = (struct sockaddr_in*)&(addrParams.spp_address);
                pAddr->sin_family      = AF_INET;
-               pAddr->sin_port        = CM_INET_HTON_U16(pSctpPAddrParams->s.port);
-               pAddr->sin_addr.s_addr = CM_INET_HTON_U32(pSctpPAddrParams->s.addr.u.ipv4NetAddr);
+               pAddr->sin_port        = CM_INET_HTON_UINT16(pSctpPAddrParams->s.port);
+               pAddr->sin_addr.s_addr = CM_INET_HTON_UINT32(pSctpPAddrParams->s.addr.u.ipv4NetAddr);
             }
 #else 
             pAddr = (struct sockaddr_in*)&(addrParams.spp_address);
             pAddr->sin_family      = AF_INET;
-            pAddr->sin_port        = CM_INET_HTON_U16(pSctpPAddrParams->s.port);
-            pAddr->sin_addr.s_addr = CM_INET_HTON_U32(pSctpPAddrParams->s.addr.u.ipv4NetAddr);
+            pAddr->sin_port        = CM_INET_HTON_UINT16(pSctpPAddrParams->s.port);
+            pAddr->sin_addr.s_addr = CM_INET_HTON_UINT32(pSctpPAddrParams->s.addr.u.ipv4NetAddr);
 #endif /* IPV6_SUPPORTED */
          }
          else
@@ -8794,7 +8775,7 @@ Ptr       value;                /* option value */
 
          addrParams.spp_assoc_id   = pSctpPAddrParams->assocId;
          /*cm_inet_c_001.main_58  : fix for klockwork issue */
-         addrParams.spp_pathmaxrxt = (U16)pSctpPAddrParams->pathMaxRxt;
+         addrParams.spp_pathmaxrxt = (uint16_t)pSctpPAddrParams->pathMaxRxt;
 #ifdef SUN_KSCTP
          if (pSctpPAddrParams->hbEnblFlag == CM_INET_OPT_ENABLE)
             addrParams.spp_hbinterval = pSctpPAddrParams->hbInterval;
@@ -8834,7 +8815,7 @@ Ptr       value;                /* option value */
       case CM_INET_OPT_SCTP_ASSOC_PARAMS:
          pSctpAssocParams = (CmInetSctpAssocParams *)value;
 
-         cmMemset((U8*)&assocParams, 0, sizeof(struct sctp_assocparams));
+         memset(&assocParams, 0, sizeof(struct sctp_assocparams));
 
          assocParams.sasoc_cookie_life              = pSctpAssocParams->cookieLife;
          assocParams.sasoc_asocmaxrxt               = pSctpAssocParams->assocMaxReTx;
@@ -8849,7 +8830,7 @@ Ptr       value;                /* option value */
       case CM_INET_OPT_SCTP_RTO_INFO:
          pSctpRtoInfo = (CmInetSctpRtoInfo *)value;
 
-         cmMemset((U8*)&rtoinfo, 0, sizeof(struct sctp_rtoinfo));
+         memset(&rtoinfo, 0, sizeof(struct sctp_rtoinfo));
 
          rtoinfo.srto_assoc_id = pSctpRtoInfo->assocId;
          rtoinfo.srto_initial  = pSctpRtoInfo->rtoInitial;
@@ -8862,7 +8843,7 @@ Ptr       value;                /* option value */
       case CM_INET_OPT_SCTP_INIT_MSG:
          pSctpInitMsg = (CmInetSctpInitMsg *)value;
 
-         cmMemset((U8*)&initmsg, 0, sizeof(struct sctp_initmsg));
+         memset(&initmsg, 0, sizeof(struct sctp_initmsg));
 
          initmsg.sinit_max_attempts   = pSctpInitMsg->maxInitReTx;
          initmsg.sinit_max_init_timeo = pSctpInitMsg->maxInitTimeout;
@@ -8880,7 +8861,7 @@ Ptr       value;                /* option value */
 #ifdef SS_LINUX
 #ifdef CM_ICMP_FILTER_SUPPORT
       case CM_INET_OPT_ICMP_FILTER:
-         optVal = (U32*)value;
+         optVal = (uint32_t*)value;
          ret = setsockopt(sockFd->fd, level, ICMP_FILTER,
                optVal, sizeof(icmpFilter));
          break;
@@ -8889,7 +8870,7 @@ Ptr       value;                /* option value */
 
       default:  
          /* wrong socket option type */
-         RETVALUE(RFAILED);
+         return RFAILED;
          break;
    }
 
@@ -8909,9 +8890,9 @@ Ptr       value;                /* option value */
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET042, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }          
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetSetOpt */
 
 
@@ -8932,16 +8913,16 @@ Ptr       value;                /* option value */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetGetNumRead
+S16 cmInetGetNumRead
 (
 CmInetFd *sockFd,               /* socket file descriptor */
-U32      *dataLen               /* number of pending octets */
+uint32_t      *dataLen               /* number of pending octets */
 /* removed 3rd argument memInfo */
 )
 #else
-PUBLIC S16 cmInetGetNumRead(sockFd, dataLen)
+S16 cmInetGetNumRead(sockFd, dataLen)
 CmInetFd *sockFd;               /* socket file descriptor */
-U32      *dataLen;              /* number of pending octets */
+uint32_t      *dataLen;              /* number of pending octets */
 /* removed 3rd argument memInfo */
 #endif
 {
@@ -8949,14 +8930,13 @@ U32      *dataLen;              /* number of pending octets */
 
    /* removed local variables added for recvfrom call */
 
-   TRC2(cmInetGetNumRead);   
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
          (dataLen == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
@@ -8964,7 +8944,7 @@ U32      *dataLen;              /* number of pending octets */
       pending data in the socket recv buffer */
 #ifdef WIN32
    /* cm_inet_c_001.main_59: Fix for compilation warning */
-   ret = ioctlsocket(sockFd->fd, FIONREAD, (U32 *)dataLen);  
+   ret = ioctlsocket(sockFd->fd, FIONREAD, (uint32_t *)dataLen);  
 #else 
 #ifdef SS_PS
    ret = ioctl(sockFd->fd, FIOREAD, (char*)dataLen);
@@ -9004,7 +8984,7 @@ U32      *dataLen;              /* number of pending octets */
           * select says is ready to read. This should not be considered as 
           * connection closed.
           */
-         RETVALUE(RCLOSED);
+         return (RCLOSED);
       }
 
       /* removed error check ERR_WOULDBLOCK */ 
@@ -9013,13 +8993,13 @@ U32      *dataLen;              /* number of pending octets */
             (INET_ERR_CODE == ERR_CONNRESET))
       {
          *dataLen = 0;
-         RETVALUE(ROKDNA);
+         return (ROKDNA);
       }
 
 #ifdef SS_LINUX
       /* cm_inet_c_001.main_45: Change 2048 to CM_INET_MAX_UDPRAW_MSGSIZE */
       *dataLen = CM_INET_MAX_UDPRAW_MSGSIZE;
-      RETVALUE(ROK);
+      return ROK;
 #endif /* SS_LINUX */
 
       /* removed error debug printing added for recvfrom call. */
@@ -9038,10 +9018,10 @@ U32      *dataLen;              /* number of pending octets */
       CMINETLOGERROR(ERRCLS_DEBUG, ECMINET043, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetGetNumRead */
 
 \f
@@ -9063,19 +9043,19 @@ U32      *dataLen;              /* number of pending octets */
 */
  
 #ifdef ANSI
-PUBLIC S16 cmInetGetHostByName
+S16 cmInetGetHostByName
 (
 S8              *hostName,         /* host name */  
 CmInetIpAddrTbl *addrTbl           /* Address Table of IPV4 Addresses */
 )
 #else
-PUBLIC S16 cmInetGetHostByName (hostName, addrTbl)
+S16 cmInetGetHostByName (hostName, addrTbl)
 S8              *hostName;         /* host name */  
 CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
 #endif
 {
 #ifndef SS_VW
-   U8            numAddrs;       /* Number of Addresses */
+   uint8_t            numAddrs;       /* Number of Addresses */
 #endif /* SS_VW */
 
 #if (defined(WIN32) || defined(SS_LINUX) || defined(HPOS))
@@ -9088,13 +9068,12 @@ CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
 #endif /* SS_VW */
 #endif /* WIN32 || SS_LINUX || HPOS  */
 
-   TRC2(cmInetGetHostByName)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
       /* error check on parameters */
       if ((hostName == NULLP) || (addrTbl == NULLP))
       {
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -9116,7 +9095,7 @@ CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
             " hostName(%p)\n", INET_ERR_CODE, hostName);
       CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET044, 0, prntBuf);
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    if (hostid->h_addrtype != AF_INET)
    {
@@ -9128,7 +9107,7 @@ CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
             INET_ERR_CODE, hostName, hostid->h_addrtype);
       CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET045, 0, prntBuf);
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    else
    {
@@ -9136,7 +9115,7 @@ CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
             (hostid->h_addr_list[numAddrs] != NULLP))
       {
          addrTbl->netAddr[addrTbl->count++] = 
-            CM_INET_NTOH_U32 (*((U32 *) hostid->h_addr_list[numAddrs]));
+            CM_INET_NTOH_UINT32 (*((uint32_t *) hostid->h_addr_list[numAddrs]));
          numAddrs += 1;
       }
    }
@@ -9156,7 +9135,7 @@ CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
                " hostName(%p)\n", INET_ERR_CODE, hostName);
          CMINETLOGERROR(ERRCLS_DEBUG, ECMINET046, 0, prntBuf);
 #endif /* CMINETDBG */
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
       CM_COPY_VWIPADDR(vwIpAddr, &(addrTbl->netAddr[addrTbl->count]));
       addrTbl->count++;
@@ -9175,7 +9154,7 @@ CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
             INET_ERR_CODE, hostName, hostid.h_addrtype);
       CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET047, 0, prntBuf);
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    else
    {
@@ -9183,7 +9162,7 @@ CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
             (hostid.h_addr_list[numAddrs] != NULLP))
       {
          addrTbl->netAddr[addrTbl->count++] = 
-            CM_INET_NTOH_U32 (*((U32 *) hostid.h_addr_list[numAddrs]));
+            CM_INET_NTOH_UINT32 (*((uint32_t *) hostid.h_addr_list[numAddrs]));
          numAddrs += 1;
       }
    }
@@ -9191,7 +9170,7 @@ CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
 
 #endif /* WIN32  || SS_LINUX || HPOS */
 
-   RETVALUE(ROK);
+   return ROK;
 
 } /* end of cmInetGetHostByName */
 
@@ -9222,13 +9201,13 @@ CmInetIpAddrTbl *addrTbl;          /* Address Table of IPV4 Addresses */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetGetIpNodeByName
+S16 cmInetGetIpNodeByName
 (
 S8              *hostName,         /* host name */  
 CmInetIpAddrArr *addrArr           /* Array of addressed filled in */
 )
 #else
-PUBLIC S16 cmInetGetIpNodeByName(hostName, addrArr)
+S16 cmInetGetIpNodeByName(hostName, addrArr)
 S8              *hostName;         /* host name */  
 CmInetIpAddrArr *addrArr;          /* Array of addressed filled in */
 #endif
@@ -9239,21 +9218,20 @@ CmInetIpAddrArr *addrArr;          /* Array of addressed filled in */
 #else   
 #ifdef SUNOS
 #ifndef SS_LINUX
-   U8     numAddrs=0;              /* Number of addresses */
+   uint8_t     numAddrs=0;              /* Number of addresses */
    int    err=0;                   /* error code */
    struct hostent *hostid;       /* host information */
 #endif /* SS_LINUX */
 #endif /* SUNOS */
 #endif /* IPV6_SUPPORTED */
 
-   TRC2(cmInetGetIpNodeByName)
 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((hostName == NULLP) || (addrArr == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -9277,7 +9255,7 @@ CmInetIpAddrArr *addrArr;          /* Array of addressed filled in */
             err, hostName, addrArr->type);
       CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET048, 0, prntBuf);
 #endif /* CMINETDBG */
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
 #ifdef IPV6_SUPPORTED
@@ -9305,7 +9283,7 @@ CmInetIpAddrArr *addrArr;          /* Array of addressed filled in */
                err, hostName, addrArr->type, hostid->h_addrtype);
          CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET049, 0, prntBuf);
 #endif /* CMINETDBG */
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
    }
    else
@@ -9318,7 +9296,7 @@ CmInetIpAddrArr *addrArr;          /* Array of addressed filled in */
          {
             addrArr->u.ipv4AddrArr.count ++;
             addrArr->u.ipv4AddrArr.netAddr[numAddrs] =
-               CM_INET_NTOH_U32 (*((U32 *) hostid->h_addr_list[numAddrs]));
+               CM_INET_NTOH_UINT32 (*((uint32_t *) hostid->h_addr_list[numAddrs]));
             numAddrs += 1;
          }
       }
@@ -9332,16 +9310,16 @@ CmInetIpAddrArr *addrArr;          /* Array of addressed filled in */
                err, hostName, hostid->h_addrtype, addrArr->type);
          CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET050, 0, prntBuf);
 #endif /* CMINETDBG */
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
    }
 #endif /* SS_LINUX */
 #endif /* SUNOS */
 
-   RETVALUE(ROK);
+   return ROK;
 #else
    ret = cmInetGetHostByName(hostName, &addrArr->u.ipv4AddrArr); 
-   RETVALUE(ret);
+   return (ret);
 #endif /* IPV6_SUPPORTED */
 
 } /* end of cmInetGetIpNodeByName */
@@ -9352,7 +9330,7 @@ CmInetIpAddrArr *addrArr;          /* Array of addressed filled in */
 *      Fun:   cmInetAddr
 *
 *      Desc:  Converts an ASCII string containig an internet address
-*             ("xxx.xxx.xxx.xxx") into a CmInetIpAddr (U32) format.
+*             ("xxx.xxx.xxx.xxx") into a CmInetIpAddr (uint32_t) format.
 *             This function is a wrapper for the inet_addr() call.
 *
 *      Ret:   ROK     - successful
@@ -9365,34 +9343,33 @@ CmInetIpAddrArr *addrArr;          /* Array of addressed filled in */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetAddr(
+S16 cmInetAddr(
 S8           *asciiAddr,        /* ascii address representation */
 CmInetIpAddr *address           /* 4 byte interent address */
 )
 #else
-PUBLIC S16 cmInetAddr(asciiAddr, address)
+S16 cmInetAddr(asciiAddr, address)
 S8           *asciiAddr;        /* ascii address representation */
 CmInetIpAddr *address;          /* 4 byte interent address */
 #endif
 {
-   TRC2(cmInetAddr); 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if (asciiAddr == NULLP)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
    *address = inet_addr(asciiAddr);
-   if (*address == (U32)ERR_INADDRNONE)
+   if (*address == (uint32_t)ERR_INADDRNONE)
    {
       /* asciiAddr does not contain a valid internet address */ 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 \f
@@ -9416,25 +9393,24 @@ CmInetIpAddr *address;          /* 4 byte interent address */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetNtoa(
+S16 cmInetNtoa(
 CmInetIpAddr   address,         /* 4 byte interent address */
 S8           **asciiAddr        /* ascii address representation */
 )
 #else
-PUBLIC S16 cmInetNtoa(address, asciiAddr)
+S16 cmInetNtoa(address, asciiAddr)
 CmInetIpAddr   address;         /* 4 byte interent address */
 S8           **asciiAddr;       /* ascii address representation */
 #endif
 {
    struct in_addr inetAddr;     /* internet address structure */
 
-   TRC2(cmInetNtoa); 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if (asciiAddr == NULLP)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -9443,10 +9419,10 @@ S8           **asciiAddr;       /* ascii address representation */
    *asciiAddr = inet_ntoa(inetAddr);
    if (*asciiAddr == NULL)
    { 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 /*
 *
@@ -9467,29 +9443,28 @@ S8           **asciiAddr;       /* ascii address representation */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetNtop(
-U8             type,              /* ip address type */
+S16 cmInetNtop(
+uint8_t             type,              /* ip address type */
 Void           *address,         /* 4/16 byte interent address */
 S8             *asciiAddr,      /* ascii adress representation */
-U32            len
+uint32_t            len
 )
 #else
-PUBLIC S16 cmInetNtop(type,address, asciiAddr,len)
-U8             type;              /* ip address type */  
+S16 cmInetNtop(type,address, asciiAddr,len)
+uint8_t             type;              /* ip address type */  
 Void           *address;         /* 4/16 byte interent address */
 S8             *asciiAddr;      /* ascii adress representation */
-U32            len;
+uint32_t            len;
 #endif
 {
                              
    S32  domain = 0;
-   TRC2(cmInetNtop);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if (asciiAddr == NULLP || address == NULLP || len == 0 )
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
    
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
@@ -9504,10 +9479,10 @@ U32            len;
    }
    if(inet_ntop(domain,address,asciiAddr,len) == NULL)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 
@@ -9534,35 +9509,34 @@ U32            len;
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetPton(
+S16 cmInetPton(
 CmInetIpAddr  *address,         /* 4 byte interent address */
 S8           *asciiAddr         /* ascii address representation */
 )
 #else
-PUBLIC S16 cmInetPton(address, asciiAddr)
+S16 cmInetPton(address, asciiAddr)
 CmInetIpAddr  *address;         /* 4 byte interent address */
 S8            *asciiAddr;       /* ascii address representation */
 #endif
 {
    S16    ret;
 
-   TRC2(cmInetPton); 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((asciiAddr == NULLP) || (address == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
    ret = inet_pton(AF_INET, asciiAddr, (void *)address);
    if (ret != 1)
    { 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetPton */
 #endif /* SUNOS */
 #endif /* IPV6_SUPPORTED */
@@ -9585,12 +9559,12 @@ S8            *asciiAddr;       /* ascii address representation */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetPton6(
+S16 cmInetPton6(
 CmInetIpAddr6  *address6,       /* 16 byte interent address */
 S8             *asciiAddr       /* ascii address representation */
 )
 #else 
-PUBLIC S16 cmInetPton6(address6, asciiAddr)
+S16 cmInetPton6(address6, asciiAddr)
 CmInetIpAddr6 *address6;        /* 16 byte interent address */
 S8            *asciiAddr;       /* ascii address representation */
 #endif
@@ -9599,15 +9573,14 @@ S8            *asciiAddr;       /* ascii address representation */
 
 #ifdef WIN32
    struct sockaddr_storage ss;
-   U32    sslen = sizeof(ss);
+   uint32_t    sslen = sizeof(ss);
 #endif /* WIN32 */
-   TRC2(cmInetPton); 
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((asciiAddr == NULLP) || (address6 == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -9615,16 +9588,16 @@ S8            *asciiAddr;       /* ascii address representation */
    ret = inet_pton(AF_INET6, asciiAddr, (void *)address6);
    if (ret != 1)
    { 
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #else
    /* cm_inet_c_001.main_44 : In windows inet_pton is not implemented. so we are using the below function
     * to convert the ipv6 address string to appropriate form */
    WSAStringToAddressA((LPTSTR)asciiAddr, AF_INET6, NULL, (struct sockaddr*)&ss, &sslen);
-   cmMemcpy((U8*)address6, (U8*)&(((struct sockaddr_in6 *)&ss)->sin6_addr), sizeof(CmInetIpAddr6));
+   memcpy(address6, &(((struct sockaddr_in6 *)&ss)->sin6_addr), sizeof(CmInetIpAddr6));
 #endif /* WIN32 */
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetPton6 */
 #endif /* IPV6_SUPPORTED */
 #endif /* SS_PS */
@@ -9646,11 +9619,11 @@ S8            *asciiAddr;       /* ascii address representation */
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetGetMemSize(
+S16 cmInetGetMemSize(
 S32 *size                       /* max used memory size */
 )
 #else
-PUBLIC S16 cmInetGetMemSize(size)
+S16 cmInetGetMemSize(size)
 S32 *size;                      /* max used memory size */
 #endif
 {
@@ -9662,7 +9635,7 @@ S32 *size;                      /* max used memory size */
    *size = CM_INET_MAX_MSG_LEN;
 #endif 
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 
@@ -9682,15 +9655,15 @@ S32 *size;                      /* max used memory size */
 */
  
 #ifdef ANSI
-PUBLIC S16 cmInetInit(
+S16 cmInetInit(
 Void
 )
 #else
-PUBLIC S16 cmInetInit(Void)
+S16 cmInetInit(Void)
 #endif
 {
 #ifdef WIN32
-   U16     version;
+   uint16_t     version;
    S32     err;
    WSADATA data;
 
@@ -9698,11 +9671,11 @@ PUBLIC S16 cmInetInit(Void)
    err = WSAStartup(version, &data);
    if (err != 0)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
-   RETVALUE(ROK);
+   return ROK;
 }
 
 \f
@@ -9724,11 +9697,11 @@ PUBLIC S16 cmInetInit(Void)
 */
  
 #ifdef ANSI
-PUBLIC S16 cmInetDeInit(
+S16 cmInetDeInit(
 Void
 )
 #else
-PUBLIC S16 cmInetDeInit(Void)
+S16 cmInetDeInit(Void)
 #endif
 {
 #ifdef WIN32
@@ -9737,11 +9710,11 @@ PUBLIC S16 cmInetDeInit(Void)
    err = WSACleanup();
    if (err != 0)
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif
 
-   RETVALUE(ROK);
+   return ROK;
 }/* end of cmInetDeInit() */
 
 \f
@@ -9765,13 +9738,13 @@ PUBLIC S16 cmInetDeInit(Void)
 */
 \f
 #ifdef ANSI
-PUBLIC S16 cmInetGetSockName
+S16 cmInetGetSockName
 (
 CmInetFd *sockFd,               /* socket file descriptor */ 
 CmInetAddr *locAddr
 ) 
 #else
-PUBLIC S16 cmInetGetSockName(sockFd, locAddr)
+S16 cmInetGetSockName(sockFd, locAddr)
 CmInetFd *sockFd;               /* socket file descriptor */ 
 CmInetAddr *locAddr;
 #endif
@@ -9786,24 +9759,23 @@ CmInetAddr *locAddr;
 #ifdef UNIX
    socklen_t size;
 #else
-   U32  size;
+   uint32_t  size;
 #endif /* SS_LINUX */
    S32  errCode;
    /*cm_inet_c_001.main_58  : fix for klockwork issue */
    S32  ret;
 
-   TRC2(cmInetGetSockName);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd) ||
          (locAddr == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
-   cmMemset((U8*)&lclSockAddr, 0, sizeof(lclSockAddr));
+   memset(&lclSockAddr, 0, sizeof(lclSockAddr));
    size = sizeof(lclSockAddr);
 
 #ifdef UNIX
@@ -9821,11 +9793,11 @@ CmInetAddr *locAddr;
             sockAddr = (struct sockaddr_in *)&lclSockAddr;
 #ifdef IPV6_SUPPORTED
             locAddr->type = CM_INET_IPV4ADDR_TYPE;
-            locAddr->u.ipv4Addr.port = CM_INET_NTOH_U16(sockAddr->sin_port);
+            locAddr->u.ipv4Addr.port = CM_INET_NTOH_UINT16(sockAddr->sin_port);
 #else
-            locAddr->port = CM_INET_NTOH_U16(sockAddr->sin_port);
+            locAddr->port = CM_INET_NTOH_UINT16(sockAddr->sin_port);
 #endif /* IPV6_SUPPORTED */
-            RETVALUE(ROK);
+            return ROK;
 
          default:
 #ifdef CMINETDBG
@@ -9842,19 +9814,19 @@ CmInetAddr *locAddr;
             CMINETLOGERROR(ERRCLS_INT_PAR, ECMINET051, 0, prntBuf);
 #endif /* ALIGN_64BIT */
 #endif /* CMINETDBG */
-            RETVALUE(RFAILED);
+            return RFAILED;
       }/* end of switch */
 
    }/* end if */
 
    /* Fill the returned address in to locAddr */
 #ifdef IPV6_SUPPORTED
-   cmMemset((U8*)locAddr, 0, sizeof(CmInetAddr));
+   memset(locAddr, 0, sizeof(CmInetAddr));
    if (size == sizeof(struct sockaddr_in6))
    {
       sockAddr6 = (struct sockaddr_in6 *)&lclSockAddr;
       locAddr->type = CM_INET_IPV6ADDR_TYPE;
-      locAddr->u.ipv6Addr.port = CM_INET_NTOH_U16(sockAddr6->sin6_port);
+      locAddr->u.ipv6Addr.port = CM_INET_NTOH_UINT16(sockAddr6->sin6_port);
       CM_INET_COPY_IPV6ADDR(&locAddr->u.ipv6Addr.ipv6NetAddr, 
             &sockAddr6->sin6_addr);
    }
@@ -9862,16 +9834,16 @@ CmInetAddr *locAddr;
    {
       sockAddr = (struct sockaddr_in *)&lclSockAddr;
       locAddr->type = CM_INET_IPV4ADDR_TYPE;
-      locAddr->u.ipv4Addr.port = CM_INET_NTOH_U16(sockAddr->sin_port);
+      locAddr->u.ipv4Addr.port = CM_INET_NTOH_UINT16(sockAddr->sin_port);
       locAddr->u.ipv4Addr.address = 
-         CM_INET_NTOH_U32(sockAddr->sin_addr.s_addr);
+         CM_INET_NTOH_UINT32(sockAddr->sin_addr.s_addr);
    }
 #else
    sockAddr = (struct sockaddr_in *)&lclSockAddr;
-   locAddr->port    = CM_INET_NTOH_U16(sockAddr->sin_port);
-   locAddr->address = CM_INET_NTOH_U32(sockAddr->sin_addr.s_addr);
+   locAddr->port    = CM_INET_NTOH_UINT16(sockAddr->sin_port);
+   locAddr->address = CM_INET_NTOH_UINT32(sockAddr->sin_addr.s_addr);
 #endif /* IPV6_SUPPORTED */
-   RETVALUE(ROK);
+   return ROK;
 }/* end of cmInetGetSockName() */
 
 /*  New functions to peek into the file descriptor 
@@ -9897,29 +9869,29 @@ CmInetAddr *locAddr;
 */
 \f
 #ifdef ANSI
-PUBLIC S16 cmInetFdSetInfoInit
+S16 cmInetFdSetInfoInit
 (
 CmInetFdSetInfo *fdSetInfo
 ) 
 #else
-PUBLIC S16 cmInetFdSetInfoInit(fdSetInfo)
+S16 cmInetFdSetInfoInit(fdSetInfo)
 CmInetFdSetInfo *fdSetInfo;
 #endif
 {
 #if (defined(SUNOS) || defined(SS_LINUX) || defined(SS_VW) || defined(HPOS))
-   U16   arIdx;
-   U8    curByte;
-   U8    bitPos;
+   uint16_t   arIdx;
+   uint8_t    curByte;
+   uint8_t    bitPos;
    CmInetFdSet *fdSet;
 #endif /* SUNOS || SS_LINUX || SS_VW */
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if (fdSetInfo == NULLP)
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
    if (fdSetInfo->initDone == TRUE)
-      RETVALUE(ROK);
+      return ROK;
 
 #ifdef WIN32
    fdSetInfo->numFds = 0;
@@ -9928,7 +9900,7 @@ CmInetFdSetInfo *fdSetInfo;
 #if (defined(SUNOS) || defined(SS_LINUX) || defined(SS_VW)|| defined(HPOS))
    /* Check if we are on a big endian machine */
    arIdx = 0x01;
-   if (*(U8 *)&arIdx)
+   if (*(uint8_t *)&arIdx)
       fdSetInfo->bigEndian = FALSE;
    else
       fdSetInfo->bigEndian = TRUE;
@@ -9943,7 +9915,7 @@ CmInetFdSetInfo *fdSetInfo;
    for (arIdx = 1; arIdx < 256; arIdx++)
    {
       /* cm_inet_c_001.main_54: Fix for Klockworks issue */
-      curByte = (U8)arIdx;
+      curByte = (uint8_t)arIdx;
       bitPos = 0;
 
       while(bitPos < 8)
@@ -9966,7 +9938,7 @@ CmInetFdSetInfo *fdSetInfo;
 #endif /* SUNOS  || SS_LINUX || SS_VW || HPOS */   
 
    fdSetInfo->initDone = TRUE;
-   RETVALUE(ROK);
+   return ROK;
 }/* end of cmInetFdSetInfoInit() */
 
 \f
@@ -9992,14 +9964,14 @@ CmInetFdSetInfo *fdSetInfo;
 */
 \f
 #ifdef ANSI
-PUBLIC S16 cmInetGetFd
+S16 cmInetGetFd
 (
 CmInetFdSetInfo *fdSetInfo,
 CmInetFdSet     *fdSet,
 CmInetFdType    *sockFd
 ) 
 #else
-PUBLIC S16 cmInetGetFd(fdSetInfo, fdSet, sockFd)
+S16 cmInetGetFd(fdSetInfo, fdSet, sockFd)
 CmInetFdSetInfo *fdSetInfo;
 CmInetFdSet     *fdSet;
 CmInetFdType    *sockFd;
@@ -10007,35 +9979,35 @@ CmInetFdType    *sockFd;
 {
   /*cm_inet_c_001.main_58 : Fix for klockwork issue */
 #if (!defined (WIN32))
-   U32 sizOfFdSetArElem;  
-   U8 bytesScanned;
+   uint32_t sizOfFdSetArElem;  
+   uint8_t bytesScanned;
    Bool found;
-   U32 curIdx;
-   U8 *tempByte;
-   U8 bitPos;
+   uint32_t curIdx;
+   uint8_t *tempByte;
+   uint8_t bitPos;
 #endif /* !defined (WIN32) */
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    if ((fdSetInfo == NULLP) || (fdSet == NULLP) || (sockFd == NULLP))
-      RETVALUE(RFAILED);
+      return RFAILED;
 
    if (fdSetInfo->initDone != TRUE)
-      RETVALUE(RNA);
+      return (RNA);
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
 #ifdef WIN32
 #if (ERRCLASS & ERRCLS_DEBUG)
    if (fdSetInfo->numFds > FD_SETSIZE)
-      RETVALUE(RFAILED);
+      return RFAILED;
 #endif /* ERRCLASS & ERRCLS_DEBUG */
    /* cm_inet_c_001.main_32 :  Corrected check for number of fd set in
       a fdset for WIN32*/
    if (fdSetInfo->numFds >= fdSet->fd_count)
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
 
    *sockFd = fdSet->fd_array[fdSetInfo->numFds];
    fdSetInfo->numFds += 1;
-   RETVALUE(ROK);
+   return ROK;
 #endif /* WIN32 */
 
    /* cm_inet_c_001.main_59: Protected under if not defined WIN32 */
@@ -10061,9 +10033,9 @@ CmInetFdType    *sockFd;
          {
             /* Walk through the bytes in this element */
 #if (defined(SS_LINUX)  &&  !defined(_GNU_SOURCE))
-            tempByte = (U8 *)&fdSet->__fds_bits[curIdx];
+            tempByte = (uint8_t *)&fdSet->__fds_bits[curIdx];
 #else
-            tempByte = (U8 *)&fdSet->fds_bits[curIdx];
+            tempByte = (uint8_t *)&fdSet->fds_bits[curIdx];
 #endif /* SS_LINUX */
 
             /* Set the starting byte offset */
@@ -10077,13 +10049,13 @@ CmInetFdType    *sockFd;
                {
                   bitPos = fdSetInfo->ar[*tempByte];
                   /* cm_inet_c_001.main_54: Fix for Klockworks issue */
-                  fdSetInfo->arIdx = (U16)curIdx;
+                  fdSetInfo->arIdx = (uint16_t)curIdx;
                   /* Calculate fd depending on where we are */
                   *sockFd = ((bytesScanned << 3) + bitPos);
                   *sockFd += (curIdx  * (sizOfFdSetArElem << 3));
                   /* Clear the file descriptor */
                   *tempByte &= ~(1 << bitPos);
-                  RETVALUE(ROK);
+                  return ROK;
                }
                if (fdSetInfo->bigEndian)
                   tempByte -= 1;
@@ -10095,9 +10067,9 @@ CmInetFdType    *sockFd;
    }
 
    if (!found)
-      RETVALUE(ROKDNA);
+      return (ROKDNA);
 
-   RETVALUE(ROK);
+   return ROK;
 #endif /* SUNOS || SS_LINUX || SS_VW || HPOS */
 } /* end of cmInetGetFd */
 
@@ -10129,36 +10101,35 @@ CmInetFdType    *sockFd;
 */
 
 #ifdef ANSI
-PUBLIC S16 cmInetConvertStrToIpAddr
+S16 cmInetConvertStrToIpAddr
 (
-U16                len,                /* Length of IP address */
-U8                 *val,               /* Domain Name String */
+uint16_t                len,                /* Length of IP address */
+uint8_t                 *val,               /* Domain Name String */
 CmInetNetAddr      *address            /* IP Address */
 )
 #else
-PUBLIC S16 cmInetConvertStrToIpAddr(len, val, address)
-U16                len;                /* Length of IP address */
-U8                 *val;               /* Domain Name String */
+S16 cmInetConvertStrToIpAddr(len, val, address)
+uint16_t                len;                /* Length of IP address */
+uint8_t                 *val;               /* Domain Name String */
 CmInetNetAddr      *address;           /* IP Address */
 #endif
 {
-   U8              idx;                /* Index for string*/
-   U8              ipv4[CM_INET_IPV4ADDR_SIZE]; /* IPV4 Address bytes */
+   uint8_t              idx;                /* Index for string*/
+   uint8_t              ipv4[CM_INET_IPV4ADDR_SIZE]; /* IPV4 Address bytes */
 #ifdef IPV6_SUPPORTED
-   U16             *ipv6;                 /* IPV6 Address bytes */
-   U16             ipv6Reg[8];           /* regular IPV6 Address bytes */
-   U16             ipv6Cmp[8];           /* compressed IPV6 Address bytes */
-   U8              numBlk;               /* number of blocks in IPV6 addr */
+   uint16_t             *ipv6;                 /* IPV6 Address bytes */
+   uint16_t             ipv6Reg[8];           /* regular IPV6 Address bytes */
+   uint16_t             ipv6Cmp[8];           /* compressed IPV6 Address bytes */
+   uint8_t              numBlk;               /* number of blocks in IPV6 addr */
    Bool            compressed;           /* IPV6 in compressed format */
-   U8              ipv6Idx;              /* counter for IPV6 */
-   U8              blkBeginIdx;          /* IPV6, char index for the 
+   uint8_t              ipv6Idx;              /* counter for IPV6 */
+   uint8_t              blkBeginIdx;          /* IPV6, char index for the 
                                             beginning of the block */
-   U8              i;                    /* counter for IPV6 */
+   uint8_t              i;                    /* counter for IPV6 */
    S16             retVal;               /* return value */
    Bool            embedIPV4 = FALSE;    /* IPV4 embedded in IPV6 ? */
 #endif /* IPV6_SUPPORTED*/
 
-   TRC2(cmInetConvertStrToIpAddr)
 
       idx = 0;
 #ifdef IPV6_SUPPORTED
@@ -10167,11 +10138,11 @@ CmInetNetAddr      *address;           /* IP Address */
    compressed = FALSE;
    embedIPV4 = FALSE;
    ipv6 = ipv6Reg; /* assign pointer to IPV6 regular, uncompressed */
-   cmMemset((U8 *)ipv6Reg, 0, CM_INET_IPV6ADDR_SIZE);
-   cmMemset((U8 *)ipv6Cmp, 0, CM_INET_IPV6ADDR_SIZE);
+   memset(ipv6Reg, 0, CM_INET_IPV6ADDR_SIZE);
+   memset(ipv6Cmp, 0, CM_INET_IPV6ADDR_SIZE);
 #endif /* IPV6_SUPPORTED*/
 
-   cmMemset((U8 *)ipv4, 0, CM_INET_IPV4ADDR_SIZE);
+   memset(ipv4, 0, CM_INET_IPV4ADDR_SIZE);
 
    /* Check for IP Address */
    while ((val[idx] != '.') && (val[idx] != ':') && 
@@ -10183,7 +10154,7 @@ CmInetNetAddr      *address;           /* IP Address */
             ((val[idx] < 'A') || (val[idx] > 'F')))
       {
          /* Not a digit */
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
 
@@ -10202,7 +10173,7 @@ CmInetNetAddr      *address;           /* IP Address */
    if ((val[idx] != '.') && (val[idx] != ':'))
    {
       /* Not a digit */
-      RETVALUE(RFAILED);
+      return RFAILED;
    } /* if, couldn't determine IPV4 or IPV6 */
 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
 
@@ -10210,7 +10181,7 @@ CmInetNetAddr      *address;           /* IP Address */
    if (val[idx] == '.')
    {
       idx++;
-      cmInetAsciiToIpv4(3, &(ipv4[1]), (U16)(len - idx), &(val[idx]));
+      cmInetAsciiToIpv4(3, &(ipv4[1]), (uint16_t)(len - idx), &(val[idx]));
 
       address->type = CM_INET_IPV4ADDR_TYPE;
       CM_INET_GET_IPV4_ADDR_FRM_STRING(address->u.ipv4NetAddr, ipv4);
@@ -10229,7 +10200,7 @@ CmInetNetAddr      *address;           /* IP Address */
             if (compressed == TRUE)
             {
                /* can't have 2 :: */
-               RETVALUE(RFAILED);
+               return RFAILED;
             } /* if, 2 :: */
 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
 
@@ -10254,14 +10225,14 @@ CmInetNetAddr      *address;           /* IP Address */
             {
                /* convert number to IPV4 */
                ipv6[ipv6Idx] = 0; /* clear out whatever we did */
-               cmMemset((U8 *)ipv4, 0, CM_INET_IPV4ADDR_SIZE);
+               memset(ipv4, 0, CM_INET_IPV4ADDR_SIZE);
                retVal = cmInetAsciiToIpv4(4, ipv4, len - blkBeginIdx, 
                      &(val[blkBeginIdx]));
                /* stop the loop, embedded IPV4 is the last part of
                   an IPV6 address */
                if (retVal != ROK)
                {
-                  RETVALUE(retVal);
+                  return (retVal);
                }
                embedIPV4 = TRUE;
                break;
@@ -10273,7 +10244,7 @@ CmInetNetAddr      *address;           /* IP Address */
                   ((val[idx] < 'A') || (val[idx] > 'F')))
             {
                /* Not a digit */
-               RETVALUE(RFAILED);
+               return RFAILED;
             }
 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
 
@@ -10300,10 +10271,10 @@ CmInetNetAddr      *address;           /* IP Address */
             numBlk = 7; /* copy from the last block */
          } /* else, no embedded IPV4 */
 
-         /* type cast U8 over -1 becasue we want to copy the last block,
+         /* type cast uint8_t over -1 becasue we want to copy the last block,
             ipv6Cmp[0]
             */
-         for (i = ipv6Idx; i != (U8) (-1); i --)
+         for (i = ipv6Idx; i != (uint8_t) (-1); i --)
          {
             ipv6Reg[numBlk] = ipv6Cmp[i];
             numBlk--;
@@ -10320,12 +10291,12 @@ CmInetNetAddr      *address;           /* IP Address */
 
       /* convert IPV6 to cmInetIpv6 */
       address->type = CM_INET_IPV6ADDR_TYPE;
-      cmMemcpy((U8 *)address->u.ipv6NetAddr,
-            (CONSTANT U8 *) ipv6Reg,  CM_INET_IPV6ADDR_SIZE);
+      memcpy(address->u.ipv6NetAddr,
+             ipv6Reg,  CM_INET_IPV6ADDR_SIZE);
    } /* else, IPV6 */
 #endif /* IPV6_SUPPORTED */
 
-   RETVALUE(ROK);
+   return ROK;
 } /* cmInetConvertStrToIpAddr */
 
 \f
@@ -10352,25 +10323,24 @@ CmInetNetAddr      *address;           /* IP Address */
 *
 */
 #ifdef ANSI 
-PUBLIC S16  cmInetAsciiToIpv4
+S16  cmInetAsciiToIpv4
 (
-U8                 numBytes,           /* number of Byte to convert */
-U8                 *ipv4Addr,          /* IPV4 Address */
-U16                len,                /* Length of IP address */
-U8                 *val                /* Domain Name String */
+uint8_t                 numBytes,           /* number of Byte to convert */
+uint8_t                 *ipv4Addr,          /* IPV4 Address */
+uint16_t                len,                /* Length of IP address */
+uint8_t                 *val                /* Domain Name String */
 )
 #else
-PUBLIC S16 cmInetAsciiToIpv4(numBytes, ipv4Addr, len, val)
-U8                 numBytes;           /* number of Byte to convert */
-U8                 *ipv4Addr;          /* IPV4 Address */
-U16                len;                /* Length of IP address */
-U8                 *val;               /* Domain Name String */
+S16 cmInetAsciiToIpv4(numBytes, ipv4Addr, len, val)
+uint8_t                 numBytes;           /* number of Byte to convert */
+uint8_t                 *ipv4Addr;          /* IPV4 Address */
+uint16_t                len;                /* Length of IP address */
+uint8_t                 *val;               /* Domain Name String */
 #endif
 {
-   U8              byteCount;          /* Byte Count */
-   U8              idx;                /* Index for string*/
+   uint8_t              byteCount;          /* Byte Count */
+   uint8_t              idx;                /* Index for string*/
 
-   TRC2(cmInetAsciiToIpv4)
 
       idx = 0;
    for (byteCount = 0; byteCount < numBytes; byteCount++)
@@ -10381,7 +10351,7 @@ U8                 *val;               /* Domain Name String */
          if (val[idx] < '0' || val[idx] > '9')
          {
             /* Not a digit */
-            RETVALUE(RFAILED);
+            return RFAILED;
          }
 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
 
@@ -10394,7 +10364,7 @@ U8                 *val;               /* Domain Name String */
       idx++;
    }
 
-   RETVALUE(ROK);
+   return ROK;
 } /* cmInetAsciiToIpv4 */
 
 /* cm_inet_c_001.main_34:Added wrapper function for getaddrinfo and freeaddrinfo */
@@ -10416,7 +10386,7 @@ U8                 *val;               /* Domain Name String */
 */
 
 #ifdef ANSI
-PUBLIC S32 cmInetGetAddrInfo
+S32 cmInetGetAddrInfo
 (
 CONSTANT S8              *node,          /* Network addr which has to be resolved */
 CONSTANT S8              *service,       /* Sets the port number in network addr */
@@ -10424,7 +10394,7 @@ CONSTANT CmInetAddrInfo  *hints,         /* Specifies preferred socket type or p
 CmInetAddrInfo           **res           /* Link list of addrInfo structure */
 )
 #else
-PUBLIC S32 cmInetGetAddrInfo(node,service,hints,res)
+S32 cmInetGetAddrInfo(node,service,hints,res)
 CONSTANT S8              *node;          /* Network addr which has to be resolved */
 CONSTANT S8              *service;       /* Sets the port number in network addr */
 CONSTANT CmInetAddrInfo  *hints;         /* Specifies preferred socket type or protocol */
@@ -10432,14 +10402,13 @@ CmInetAddrInfo           **res;          /* Link list of addrInfo structure */
 #endif
 {
    S32 ret;
-   TRC2(cmInetGetAddrInfo);
    ret = ROK;
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if ((node == NULLP) || (hints == NULLP))
    {
-      RETVALUE(RFAILED);
+      return RFAILED;
    }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -10462,7 +10431,7 @@ CmInetAddrInfo           **res;          /* Link list of addrInfo structure */
 #endif /* ALIGN_64BIT */
 #endif /* CMINETDBG */
    }
-   RETVALUE(ret); 
+   return (ret); 
 } /* end of cmInetGetAddrInfo */
 
 \f
@@ -10481,21 +10450,20 @@ CmInetAddrInfo           **res;          /* Link list of addrInfo structure */
 */
 
 #ifdef ANSI
-PUBLIC Void cmInetFreeAddrInfo
+Void cmInetFreeAddrInfo
 (
 CmInetAddrInfo           *res           /* Link list of addrInfo structure */
 )
 #else
-PUBLIC Void cmInetFreeAddrInfo(res)
+Void cmInetFreeAddrInfo(res)
 CmInetAddrInfo           *res;          /* Link list of addrInfo structure */
 #endif
 {
-   TRC2(cmInetFreeAddrInfo);
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
    /* error check on parameters */
    if (res == NULLP) 
-      RETVOID;   
+      return;   
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
    freeaddrinfo(res); 
@@ -10526,14 +10494,14 @@ CmInetAddrInfo           *res;          /* Link list of addrInfo structure */
 *
 */
 #ifdef ANSI
-PUBLIC S16 cmInetFlushRecvBuf
+S16 cmInetFlushRecvBuf
 (
 CmInetFd        *sockFd,        /* socket file descriptor */ 
 MsgLen          *len,           /* number of octects to be flushed */
 S32              flags          /* additional control flags */
 )
 #else
-PUBLIC S16 cmInetFlushRecvBuf(sockFd, len, flags)
+S16 cmInetFlushRecvBuf(sockFd, len, flags)
 CmInetFd        *sockFd;        /* socket file descriptor */ 
 MsgLen          *len;           /* number of octects to be flushed */
 S32              flags;         /* additional control flags */
@@ -10544,10 +10512,10 @@ S32              flags;         /* additional control flags */
 
 #if (defined(WIN32) || defined(CMINETFLATBUF))
    S32           ret;            /* temporary return value */
-   U32           pendLen;        /* pending data length */
+   uint32_t           pendLen;        /* pending data length */
    S32           recvLen;        /* number of received octets by recvmsg() */
    MsgLen        curLen;         /* current number of octets in buffer */ 
-   U32           remAddrLen;     /* length of remote address */
+   uint32_t           remAddrLen;     /* length of remote address */
    struct sockaddr_in  *remAddr;    /* remote Internet address */       
 #ifdef IPV6_SUPPORTED 
    struct sockaddr_in6 remSockAddr; /* to get packet's source IP address */
@@ -10557,38 +10525,37 @@ S32              flags;         /* additional control flags */
 #else
    S32           ret;            /* temporary return value */
    MsgLen        curLen;         /* current number of octets in buffer */ 
-   U32           pendLen;        /* pending data length */
+   uint32_t           pendLen;        /* pending data length */
    S32           recvLen;        /* number of received octets by recvmsg() */
    struct msghdr msg;            /* message header */ 
    CmInetIovec  rxArr[CM_INET_MAX_DBUF]; /* dynamic gather array */
-   U32           remAddrLen;     /* length of remote address */
+   uint32_t           remAddrLen;     /* length of remote address */
 #ifdef IPV6_SUPPORTED 
    struct sockaddr_in6 remSockAddr;/* to get packet's source IP address */
 
 #if (defined(SS_LINUX) || defined(_XPG4_2))
-   U8                   ancillData[CM_INET_IPV6_ANCIL_DATA];
+   uint8_t                   ancillData[CM_INET_IPV6_ANCIL_DATA];
    /* from stack for IPv6 ancill data */
 #endif
 #else
    CmInetSockAddr       remSockAddr;     /* to get packet's src IP address */
 #if (defined(SS_LINUX) || defined(_XPG4_2))
-   U8                   ancillData[CM_INET_IPV4_ANCIL_DATA];
+   uint8_t                   ancillData[CM_INET_IPV4_ANCIL_DATA];
    /* from stack for IPv4 ancill data */
 #endif
 #endif /* IPV6_SUPPORTED */
 #endif /* WIN32 | CMINETFLATBUF */
 
    /* used by getsockopt */
-   U32          errValue;                /* error value */
-   U32          optLen;                  /* option length */
+   uint32_t          errValue;                /* error value */
+   uint32_t          optLen;                  /* option length */
 
-   TRC2(cmInetFlushRcvBuf)
 
 #if (ERRCLASS & ERRCLS_INT_PAR)
       /* error check on parameters */
       if ((sockFd == NULLP) || CM_INET_INV_SOCK_FD(sockFd))
       {
-         RETVALUE(RFAILED);
+         return RFAILED;
       }
 #endif /* ERRCLASS & ERRCLS_INT_PAR */
 
@@ -10598,14 +10565,14 @@ S32              flags;         /* additional control flags */
 #endif /* (WIN32 | CMINETFLATBUF) */
 
    /* clear the structure */   
-   cmMemset((U8*)&remSockAddr, 0, sizeof(remSockAddr));
+   memset(&remSockAddr, 0, sizeof(remSockAddr));
 
    /* get number of pending data */
    ret = cmInetGetNumRead(sockFd, &pendLen);
    if (ret != ROK)
    {
       /* ret may be RFAILED or ROUTRES */
-      RETVALUE(ret);
+      return (ret);
    }
 
    /* check if connection got closed */
@@ -10621,7 +10588,7 @@ S32              flags;         /* additional control flags */
           * considered as connection closed. So return ROKDNA instead of 
           * RCLOSED
           */
-         RETVALUE(ROKDNA);
+         return (ROKDNA);
       }
       else
          /* clear error if there is any, because if there is internal error
@@ -10659,11 +10626,11 @@ S32              flags;         /* additional control flags */
             CMINETLOGERROR(ERRCLS_DEBUG, ECMINET054, 0, prntBuf);
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
-            RETVALUE(RFAILED);
+            return RFAILED;
          }
          else
          {
-            U8 tempBuf;
+            uint8_t tempBuf;
             /* added separate recvfrom calls different OS */
 #if( defined(SS_VW) || defined(HPOS) || defined(SS_PS))
             recvLen = recvfrom(sockFd->fd, (S8 *)&tempBuf, pendLen, 0, 
@@ -10679,7 +10646,7 @@ S32              flags;         /* additional control flags */
 #endif /* defined(SUNOS) || defined(SS_LINUX) */
 #endif /* defined(SS_VW) || defined(HPOS) || defined(SS_PS) */
 
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
          }      
       }
    }/* if (pendLen == 0)*/
@@ -10708,7 +10675,7 @@ S32              flags;         /* additional control flags */
     */
    while (curLen > 0)
    {
-      cmMemset((U8*)recvTempBuf, 0, CM_INET_MAX_BYTES_READ);
+      memset(recvTempBuf, 0, CM_INET_MAX_BYTES_READ);
       /* added separate recvfrom calls different OS */
 
 #if( defined(SS_VW) || defined(HPOS) || defined(SS_PS))
@@ -10733,7 +10700,7 @@ S32              flags;         /* additional control flags */
                (INET_ERR_CODE == ERR_WOULDBLOCK))
          {
             *len = 0; 
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
          }
 
 
@@ -10744,7 +10711,7 @@ S32              flags;         /* additional control flags */
                (INET_ERR_CODE == ERR_CONNRESET))
          {
             *len = 0;
-            RETVALUE(RCLOSED);
+            return (RCLOSED);
          }
 
 #ifdef CMINETDBG
@@ -10762,7 +10729,7 @@ S32              flags;         /* additional control flags */
 #endif /*ALIGN_64BIT*/
 #endif /* CMINETDBG */
 
-         RETVALUE(RFAILED);
+         return RFAILED;
       } 
 
       if(recvLen < curLen)
@@ -10783,11 +10750,11 @@ S32              flags;         /* additional control flags */
     */
    while (curLen > 0)
    {
-      cmMemset((U8*)recvTempBuf, 0, CM_INET_MAX_BYTES_READ);
+      memset(recvTempBuf, 0, CM_INET_MAX_BYTES_READ);
       /* update the message structure */
 #ifdef SS_LINUX
       rxArr[0].iov_base = (Void*)recvTempBuf;  
-      rxArr[0].iov_len = (U32)curLen;    
+      rxArr[0].iov_len = (uint32_t)curLen;    
 #else
       rxArr[0].iov_base = (S8*)recvTempBuf;
       rxArr[0].iov_len = curLen; 
@@ -10818,7 +10785,7 @@ S32              flags;         /* additional control flags */
                (INET_ERR_CODE == ERR_WOULDBLOCK))
          {
             *len = 0;  
-            RETVALUE(ROKDNA);
+            return (ROKDNA);
          }
 
 #ifdef CMINETDBG
@@ -10841,9 +10808,9 @@ S32              flags;         /* additional control flags */
          if (INET_ERR_CODE == ERR_CONNABORTED)
          {
             *len = 0;
-            RETVALUE(RCLOSED);
+            return (RCLOSED);
          }
-         RETVALUE(RFAILED)
+         return RFAILED
       }/* if ((recvLen == INET_ERR) || (recvLen > CM_INET_MAX_MSG_LEN))*/ 
 
       if(recvLen < curLen)
@@ -10859,7 +10826,7 @@ S32              flags;         /* additional control flags */
 #endif /* WIN32 | CMINETFLATBUF  */
 
 
-   RETVALUE(ROK);
+   return ROK;
 } /* end of cmInetFlushRecvBuf */
 
 #endif /* CM_INET_FLUSH_RECV_BUF*/