[ Jira id - ODUHIGH-593 ] Pack and unpack function nomenclature correction
[o-du/l2.git] / src / cm / lkw.c
index d18e724..44959d5 100755 (executable)
@@ -18,7 +18,7 @@
 \f
 /********************************************************************20**
   
-        Name:     LTE-RLC Layer 
+        Name:     NR RLC Layer 
     
         Type:     C source file
   
@@ -58,47 +58,47 @@ Txt ptNmb[LKW_PART_NUM_STR_LEN];         /* Part number */
 \f  
 /* forward references */
 
-PRIVATE S16 cmPkRlcMngmt ARGS ((RlcMngmt *param ,Event eventType, 
+static S16 cmPkRlcMngmt ARGS ((RlcMngmt *param ,Event eventType, 
                                Buffer *mBuf));
-PRIVATE S16 cmPkRlcCfg ARGS ((RlcMngmt *param ,Elmnt elmnt, Buffer *mBuf));
-PRIVATE S16 cmPkRlcCntrl ARGS ((RlcMngmt *cntrl, Elmnt elmnt, Buffer *mBuf));
-PRIVATE S16 cmPkRlcUsta ARGS ((RlcMngmt *usta, Elmnt elmnt, Buffer *mBuf));
-PRIVATE S16 cmPkRlcSsta ARGS ((RlcMngmt *ssta, Elmnt etmnt, Event eventType,
+static S16 cmPkRlcCfg ARGS ((RlcMngmt *param ,Elmnt elmnt, Buffer *mBuf));
+static S16 cmPkRlcCntrl ARGS ((RlcMngmt *cntrl, Elmnt elmnt, Buffer *mBuf));
+static S16 cmPkRlcUsta ARGS ((RlcMngmt *usta, Elmnt elmnt, Buffer *mBuf));
+static S16 cmPkRlcSsta ARGS ((RlcMngmt *ssta, Elmnt etmnt, Event eventType,
                               Buffer *mBuf));
-PRIVATE S16 cmPkRlcSts ARGS ((RlcMngmt *sts, Elmnt elmnt, Buffer *mBuf));
-PRIVATE S16 cmPkGenSts ARGS ((RlcGenSts *gen, Buffer *mBuf));
-PRIVATE S16 cmPkCkwSapSts ARGS ((RlcCkwCntSts *rcSap, Buffer *mBuf));
-PRIVATE S16 cmPkKwuSapSts ARGS ((RlcKwuSapSts *ruSap, Buffer *mBuf));
+static S16 cmPkRlcSts ARGS ((RlcMngmt *sts, Elmnt elmnt, Buffer *mBuf));
+static S16 cmPkGenSts ARGS ((RlcGenSts *gen, Buffer *mBuf));
+static S16 cmPkCkwSapSts ARGS ((RlcCkwCntSts *rcSap, Buffer *mBuf));
+static S16 cmPkKwuSapSts ARGS ((RlcKwuSapSts *ruSap, Buffer *mBuf));
 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
  * in general statstics.
  * */
-PRIVATE S16 cmPkRlcTrc ARGS ((RlcMngmt *trc, Buffer *mBuf));
+static S16 cmPkRlcTrc ARGS ((RlcMngmt *trc, Buffer *mBuf));
 
-PRIVATE S16 cmUnpkRlcMngmt ARGS ((RlcMngmt *param, Event eventType,
+static S16 cmUnpkRlcMngmt ARGS ((RlcMngmt *param, Event eventType,
                                  Buffer * mBuf));
-PRIVATE S16 cmUnpkRlcCfg ARGS ((RlcMngmt *cfg, Elmnt elmnt, Buffer *mBuf));
-PRIVATE S16 cmUnpkRlcCntrl ARGS ((RlcMngmt *param, Elmnt elmnt, Buffer *mBuf));
-PRIVATE S16 cmUnpkRlcUsta ARGS ((RlcMngmt *usta, Elmnt elmnt, Buffer *mBuf));
-PRIVATE S16 cmUnpkRlcSsta ARGS ((RlcMngmt *ssta, Elmnt elmnt, Event eventType,
+static S16 cmUnpkRlcCfg ARGS ((RlcMngmt *cfg, Elmnt elmnt, Buffer *mBuf));
+static S16 cmUnpkRlcCntrl ARGS ((RlcMngmt *param, Elmnt elmnt, Buffer *mBuf));
+static S16 cmUnpkRlcUsta ARGS ((RlcMngmt *usta, Elmnt elmnt, Buffer *mBuf));
+static S16 cmUnpkRlcSsta ARGS ((RlcMngmt *ssta, Elmnt elmnt, Event eventType,
                                 Buffer *mBuf));
-PRIVATE S16 cmUnpkRlcSts ARGS ((RlcMngmt *sts, Elmnt elmnt, Buffer *mBuf));
-PRIVATE S16 cmUnpkGenSts ARGS ((RlcGenSts *gen, Buffer *mBuf));
-PRIVATE S16 cmUnpkCkwSapSts ARGS ((RlcCkwCntSts *rcSap, Buffer *mBuf));
-PRIVATE S16 cmUnpkKwuSapSts ARGS ((RlcKwuSapSts *ruSap, Buffer *mBuf));
+static S16 cmUnpkRlcSts ARGS ((RlcMngmt *sts, Elmnt elmnt, Buffer *mBuf));
+static S16 cmUnpkGenSts ARGS ((RlcGenSts *gen, Buffer *mBuf));
+static S16 cmUnpkCkwSapSts ARGS ((RlcCkwCntSts *rcSap, Buffer *mBuf));
+static S16 cmUnpkKwuSapSts ARGS ((RlcKwuSapSts *ruSap, Buffer *mBuf));
 /* lkw_c_001.main_2 removed support of RGU sap statistics as it is reflecting
  * in general statstics.
  * */
-PRIVATE S16 cmUnpkRlcTrc ARGS ((RlcMngmt *trc, Buffer *mBuf));
+static S16 cmUnpkRlcTrc ARGS ((RlcMngmt *trc, Buffer *mBuf));
 
 
-PRIVATE S16 cmPkCkwSapSta ARGS ((RlcCkwCntSapSta *rcSap, Buffer *mBuf));
-PRIVATE S16 cmUnpkCkwSapSta ARGS ((RlcCkwCntSapSta *rcSap, Buffer *mBuf));
+static S16 cmPkCkwSapSta ARGS ((RlcCkwCntSapSta *rcSap, Buffer *mBuf));
+static S16 cmUnpkCkwSapSta ARGS ((RlcCkwCntSapSta *rcSap, Buffer *mBuf));
 
-PRIVATE S16 cmPkKwuSapSta ARGS ((RlcKwuSapSta *rlSap, Buffer *mBuf));
-PRIVATE S16 cmUnpkKwuSapSta ARGS ((RlcKwuSapSta *rlSap, Buffer *mBuf));
+static S16 cmPkKwuSapSta ARGS ((RlcKwuSapSta *rlSap, Buffer *mBuf));
+static S16 cmUnpkKwuSapSta ARGS ((RlcKwuSapSta *rlSap, Buffer *mBuf));
 
-PRIVATE S16 cmPkRguSapSta ARGS ((RlcRguSapSta *mkSap, Buffer *mBuf));
-PRIVATE S16 cmUnpkRguSapSta ARGS ((RlcRguSapSta *mkSap, Buffer *mBuf));
+static S16 cmPkRguSapSta ARGS ((RlcRguSapSta *mkSap, Buffer *mBuf));
+static S16 cmUnpkRguSapSta ARGS ((RlcRguSapSta *mkSap, Buffer *mBuf));
 
 /**
  * @brief
@@ -111,22 +111,15 @@ PRIVATE S16 cmUnpkRguSapSta ARGS ((RlcRguSapSta *mkSap, Buffer *mBuf));
  *      -# Failure : RFAILED 
  */
 
-#ifdef ANSI
 S16 packRlcConfigReq
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *cfg                 /* RLC LM structure */
 )
-#else
-S16 packRlcConfigReq(pst, cfg)
-Pst *pst;                    /* post structure */
-RlcMngmt *cfg;                /* RLC LM structure */
-#endif
 {
    Buffer *mBuf;             /* message buffer */
    S16 ret1;                 /* return value */
 
-   TRC3(packRlcConfigReq)
 
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
    if (ret1 != ROK)
@@ -175,26 +168,18 @@ RlcMngmt *cfg;                /* RLC LM structure */
  *      -# Failure : RFAILED
  */
  
-#ifdef ANSI
 uint8_t unpackRlcConfigReq
 (
 RlcConfigReq func,              /* primitive to call */
 Pst *pst,                    /* post structure */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-uint8_t unpackRlcConfigReq(func, pst, mBuf)
-RlcConfigReq func;              /* primitive to call */
-Pst *pst;                    /* post structure */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
    S16 ret1;                 /* Return value */
    RlcMngmt cfg;              /* RLC LM structure */
 
-   TRC3(unpackRlcConfigReq)
 
-   cmMemset((U8 *) &cfg, (U8) 0, (S16) sizeof(RlcMngmt));
+   memset(&cfg,  0, sizeof(RlcMngmt));
    ret1 = cmUnpkRlcMngmt(&cfg, LKW_EVT_CFG_REQ, mBuf);
 
     if(ret1 != ROK)
@@ -229,22 +214,15 @@ Buffer *mBuf;                /* message buffer */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
 S16 cmPkLkwCntrlReq
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *cntrl               /* RLC LM structure */  
 )
-#else
-S16 cmPkLkwCntrlReq(pst,cntrl)
-Pst *pst;                    /* post structure */
-RlcMngmt *cntrl;              /* RLC LM structure */
-#endif
 {
    Buffer *mBuf;             /* message buffer */
    S16 ret1;                 /* return value */
 
-   TRC3(cmPkLkwCntrlReq)
 
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
    if (ret1 != ROK)
@@ -293,24 +271,16 @@ RlcMngmt *cntrl;              /* RLC LM structure */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
 S16 cmUnpkLkwCntrlReq
 (
 LkwCntrlReq func,            /* primitive to call */
 Pst *pst,                    /* post structure */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-S16 cmUnpkLkwCntrlReq(func, pst, mBuf)
-LkwCntrlReq func;            /* primitive to call */
-Pst *pst;                    /* post structure */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
    S16 ret1;                 /* return value */
    RlcMngmt cfm;              /* Confirmation */
 
-   TRC3(cmUnpkLkwCntrlReq)
 
    ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_CNTRL_REQ, mBuf);
 
@@ -342,22 +312,15 @@ Buffer *mBuf;                /* message buffer */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
 uint8_t cmPkLkwCntrlCfm
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *cfm                 /* RLC LM structure */
 )
-#else
-uint8_t cmPkLkwCntrlCfm(pst, cfm)
-Pst *pst;                    /* post structure */
-RlcMngmt *cfm;                /* RLC LM structure */
-#endif
 {
    Buffer *mBuf;             /* message buffer */
    S16 ret1;                 /* return value */
 
-   TRC3(cmPkLkwCntrlCfm)
 
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
    if (ret1 != ROK)
@@ -407,24 +370,16 @@ RlcMngmt *cfm;                /* RLC LM structure */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
 S16 cmUnpkLkwCntrlCfm
 (
 LkwCntrlCfm func,            /* primitive to call */
 Pst *pst,                    /* post structure */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-S16 cmUnpkLkwCntrlCfm(func, pst, mBuf)
-LkwCntrlCfm func;            /* primitive to call */
-Pst *pst;                    /* post structure */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
    RlcMngmt cfm;              /* RLC LM structure */
    S16 ret1;                 /* return value */
 
-   TRC3(cmUnpkLkwCntrlCfm)
 
    ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_CNTRL_CFM, mBuf);
 
@@ -458,24 +413,16 @@ Buffer *mBuf;                /* message buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
 S16 cmUnpkLkwStsCfm
 (
 LkwStsCfm func,              /* primitive to call */
 Pst *pst,                    /* post structure */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-S16 cmUnpkLkwStsCfm(func, pst, mBuf)
-LkwStsCfm func;              /* primitive to call */
-Pst *pst;                    /* post structure */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
    RlcMngmt cfm;              /* RLC LM structure */
    S16 ret1;                 /* return value */
 
-   TRC3(cmUnpkLkwStsCfm)
 
    ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_STS_CFM, mBuf);
 
@@ -510,22 +457,15 @@ Buffer *mBuf;                /* message buffer */
  */
 
 
-#ifdef ANSI
 uint8_t packRlcConfigCfm
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *cfm                 /* RLC LM structure */
 )
-#else
-uint8_t packRlcConfigCfm(pst,cfm)
-Pst *pst;                    /* post structure */
-RlcMngmt *cfm;                /* RLC LM structure */
-#endif
 {
    Buffer *mBuf;             /* message buffer */
    S16 ret1;                 /* return value */
 
-   TRC3(packRlcConfigCfm)
 
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
    if (ret1 != ROK)
@@ -574,24 +514,16 @@ RlcMngmt *cfm;                /* RLC LM structure */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
 uint8_t unpackRlcConfigCfm
 (
 RlcConfigCfm func,              /* primitive to call */
 Pst *pst,                    /* post structure */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-uint8_t unpackRlcConfigCfm(func, pst, mBuf)
-RlcConfigCfm func;              /* primitive to call */
-Pst *pst;                    /* post structure */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
    S16 ret1;                 /* return value */
    RlcMngmt cfm;              /* RLC LM structure */
 
-   TRC3(unpackRlcConfigCfm)
 
    ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_CFG_CFM, mBuf);
 
@@ -626,22 +558,15 @@ Buffer *mBuf;                /* message buffer */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
 S16 cmPkLkwStaInd
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *usta                /* RLC LM structure */
 )
-#else
-S16 cmPkLkwStaInd(pst,usta)
-Pst *pst;                    /* post structure */
-RlcMngmt *usta;               /* RLC LM structure */
-#endif
 {
    Buffer *mBuf;             /* message buffer */
    S16 ret1;                 /* return value */
 
-   TRC3(cmPkLkwStaInd)
 
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
    if (ret1 != ROK)
@@ -691,24 +616,16 @@ RlcMngmt *usta;               /* RLC LM structure */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
 S16 cmUnpkLkwStaInd
 (
 LkwStaInd func,             /* primitive pointer */
 Pst *pst,                   /* post structure */
 Buffer *mBuf                /* message buffer */
 )
-#else
-S16 cmUnpkLkwStaInd(func, pst, mBuf)
-LkwStaInd func;             /* primitive pointer */
-Pst *pst;                   /* post structure */
-Buffer *mBuf;               /* message buffer */
-#endif
 {
    RlcMngmt usta;            /* RLC LM structure */
    S16 ret1;                /* return value */
 
-   TRC3(cmUnpkLkwStaInd)
    
    ret1 = cmUnpkRlcMngmt(&usta, LKW_EVT_STA_IND, mBuf);
 
@@ -741,22 +658,15 @@ Buffer *mBuf;               /* message buffer */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
 S16 cmPkLkwStaReq
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *sta                 /* status */
 )
-#else
-S16 cmPkLkwStaReq(pst,sta)
-Pst *pst;                    /* post structure */
-RlcMngmt *sta;                /* status */
-#endif
 {
    Buffer *mBuf;             /* message buffer */
    S16 ret1;                 /* return value */
 
-   TRC3(cmPkLkwStaReq)
 
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
    if (ret1 != ROK)
@@ -804,24 +714,16 @@ RlcMngmt *sta;                /* status */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
 S16 cmUnpkLkwStaCfm
 (
 LkwStaReq func,              /* primitive pointer */
 Pst *pst,                    /* post structure */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-S16 cmUnpkLkwStaCfm(func, pst, mBuf)
-LkwStaReq func;              /* primitive pointer */
-Pst *pst;                    /* post structure */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
    RlcMngmt cfm;              /* RLC LM structure */
    S16 ret1;                 /* return value */
 
-   TRC3(cmUnpkLkwStaReq)
 
    ret1 = cmUnpkRlcMngmt(&cfm, LKW_EVT_STA_CFM, mBuf);
 
@@ -855,25 +757,17 @@ Buffer *mBuf;                /* message buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
 S16 cmUnpkLkwStsReq
 (
 LkwStsReq func,              /* primitive pointer */
 Pst *pst,                    /* post structure */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-S16 cmUnpkLkwStsReq(func, pst, mBuf)
-LkwStsReq func;              /* primitive pointer */
-Pst *pst;                    /* post structure */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
    RlcMngmt sts;              /* RLC LM structure */
    S16 ret1;                 /* return value */
    Action action;            /* Action */
 
-   TRC3(cmUnpkLkwStsReq)
 
    CMCHKUNPK(SUnpkS16, &action, mBuf);
 
@@ -909,24 +803,16 @@ Buffer *mBuf;                /* message buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
 S16 cmUnpkLkwStaReq
 (
 LkwStaReq func,              /* primitive pointer */
 Pst *pst,                    /* post structure */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-S16 cmUnpkLkwStaReq(func, pst, mBuf)
-LkwStaReq func;              /* primitive pointer */
-Pst *pst;                    /* post structure */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
    RlcMngmt sta;              /* RLC LM structure */
    S16 ret1;                 /* return value */
 
-   TRC3(cmUnpkLkwStaReq)
 
    ret1 = cmUnpkRlcMngmt(&sta, LKW_EVT_STA_REQ, mBuf);
 
@@ -961,24 +847,16 @@ Buffer *mBuf;                /* message buffer */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
 S16 cmUnpkLkwTrcInd
 (
 LkwTrcInd func,              /* primitive to call */
 Pst *pst,                    /* post structure */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-S16 cmUnpkLkwTrcInd(func, pst, mBuf)
-LkwTrcInd func;              /* primitive to call */
-Pst *pst;                    /* post structure */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
    S16 ret1;                 /* return value */
    RlcMngmt trc;              /* RLC LM structure */
 
-   TRC3(cmUnpkLkwTrcInd)
 
    ret1 = cmUnpkRlcMngmt(&trc, LKW_EVT_TRC_IND, mBuf);
 
@@ -1013,19 +891,12 @@ Buffer *mBuf;                /* message buffer */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
-PRIVATE S16 cmPkCkwSapSta 
+static S16 cmPkCkwSapSta 
 ( 
 RlcCkwCntSapSta *rcSap,         /* SAP statistics */      
 Buffer *mBuf                 /* Message buffer */
 )
-#else
-PRIVATE S16 cmPkCkwSapSta(rcSap, mBuf)
-RlcCkwCntSapSta *rcSap;         /* SAP statistics */
-Buffer *mBuf;                /* Message buffer */
-#endif
 {
-   TRC3(cmPkCkwSapSta)
 
    CMCHKPK(cmPkState, rcSap->state, mBuf);
    CMCHKPK(SPkS16, rcSap->spId, mBuf);   
@@ -1044,19 +915,12 @@ Buffer *mBuf;                /* Message buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkCkwSapSta 
+static S16 cmUnpkCkwSapSta 
 (
 RlcCkwCntSapSta *rcSap,         /* SAP statistics */ 
 Buffer *mBuf                 /* Message buffer */
 )
-#else
-PRIVATE S16 cmUnpkCkwSapSta(rcSap, mBuf)
-RlcCkwCntSapSta *rcSap;         /* SAP statistics */ 
-Buffer *mBuf;                /* Message buffer */
-#endif
 {
-   TRC3(cmUnpkCkwSapSta)
 
    CMCHKUNPK(SUnpkS16, &rcSap->spId, mBuf);
    CMCHKUNPK(cmUnpkState, &rcSap->state, mBuf);
@@ -1074,19 +938,12 @@ Buffer *mBuf;                /* Message buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkKwuSapSta
+static S16 cmPkKwuSapSta
 (
 RlcKwuSapSta *rlSap,           /* SAP statistics */       
 Buffer *mBuf                 /* Message buffer */
 )
-#else
-PRIVATE S16 cmPkKwuSapSta(rlSap, mBuf)
-RlcKwuSapSta *rlSap;           /* SAP statistics */
-Buffer *mBuf;                /* Message buffer */
-#endif
 {
-   TRC3(cmPkKwuSapSta)
 
    CMCHKPK(cmPkState, rlSap->state, mBuf);
    CMCHKPK(SPkS16, rlSap->spId, mBuf);
@@ -1105,19 +962,12 @@ Buffer *mBuf;                /* Message buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkKwuSapSta
+static S16 cmUnpkKwuSapSta
 (
 RlcKwuSapSta *rlSap,           /* SAP statistics */                   
 Buffer *mBuf                 /* Message buffer */
 )
-#else
-PRIVATE S16 cmUnpkKwuSapSta(rlSap, mBuf)
-RlcKwuSapSta *rlSap;           /* SAP statistics */
-Buffer *mBuf;                /* Message buffer */
-#endif
 {
-   TRC3(cmUnpkKwuSapSta)
 
    CMCHKUNPK(SUnpkS16, &rlSap->spId, mBuf);
    CMCHKUNPK(cmUnpkState, &rlSap->state, mBuf);
@@ -1136,19 +986,12 @@ Buffer *mBuf;                /* Message buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkRguSapSta
+static S16 cmPkRguSapSta
 (
 RlcRguSapSta *mkSap,           /* SAP statistics */             
 Buffer *mBuf                 /* Message buffer */
 )
-#else
-PRIVATE S16 cmPkRguSapSta(mkSap, mBuf)
-RlcRguSapSta *mkSap;           /* SAP statistics */
-Buffer *mBuf;                /* Message buffer */
-#endif
 {
-   TRC3(cmPkRguSapSta)
 
    CMCHKPK(cmPkState, mkSap->state, mBuf);
    CMCHKPK(cmPkSuId, mkSap->suId, mBuf);
@@ -1167,19 +1010,12 @@ Buffer *mBuf;                /* Message buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkRguSapSta
+static S16 cmUnpkRguSapSta
 (
 RlcRguSapSta *mkSap,           /* SAP statistics */              
 Buffer *mBuf                 /* Message buffer */
 )
-#else
-PRIVATE S16 cmUnpkRguSapSta(mkSap, mBuf)
-RlcRguSapSta *mkSap;           /* SAP statistics */
-Buffer *mBuf;                /* Message buffer */
-#endif
 {
-   TRC3(cmUnpkRguSapSta)
 
    CMCHKUNPK(cmUnpkSuId, &mkSap->suId, mBuf);
    CMCHKUNPK(cmUnpkState, &mkSap->state, mBuf);
@@ -1198,22 +1034,15 @@ Buffer *mBuf;                /* Message buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
 S16 cmPkLkwStaCfm
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *cfm                 /* solicited status confirm */
 )
-#else
-S16 cmPkLkwStaCfm(pst, cfm)
-Pst *pst;                    /* post structure */
-RlcMngmt *cfm;                /* solicited status confirm */
-#endif
 {
    Buffer *mBuf;             /* message buffer */
    S16 ret1;                 /* return value */
 
-   TRC3(cmPkLkwStaCfm);
 
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
    if (ret1 != ROK)
@@ -1260,24 +1089,16 @@ RlcMngmt *cfm;                /* solicited status confirm */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
 S16 cmPkLkwTrcInd
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *trc,                /* trace */
 Buffer *trcBuf                 /* trace buffer */
 )
-#else
-S16 cmPkLkwTrcInd(pst, trc, trcBuf)
-Pst *pst;                     /* post structure */
-RlcMngmt *trc;                 /* trace */
-Buffer *trcBuf;               /* trace buffer */
-#endif
 {
    S16      ret1 = ROK;       /* return value */
    Buffer   *mBuf = NULLP;    /* Buffer to trace */
 
-   TRC3(cmPkLkwTrcInd);
 
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
    if (ret1 != ROK)
@@ -1346,25 +1167,17 @@ Buffer *trcBuf;               /* trace buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
 S16 cmPkLkwStsReq
 (
 Pst *pst,                    /* post structure */
 Action action,               /* action */
 RlcMngmt *sts                 /* statistics request */
 )
-#else
-S16 cmPkLkwStsReq(pst, action, sts)
-Pst *pst;                    /* post structure */
-Action action;               /* action */
-RlcMngmt *sts;                /* statistics request */
-#endif
 {
 
    Buffer *mBuf;             /* message buffer */
    S16 ret1;                 /* return value */
 
-   TRC3(cmPkLkwStsReq)
 
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
    if (ret1 != ROK)
@@ -1413,24 +1226,16 @@ RlcMngmt *sts;                /* statistics request */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
 S16 cmPkLkwStsCfm
 (
 Pst *pst,                    /* post structure */
 Action action,               /* action */
 RlcMngmt *cfm                 /* statistics confirmation */
 )
-#else
-S16 cmPkLkwStsCfm(pst, action, cfm)
-Pst *pst;                    /* post structure */
-Action action;               /* action */
-RlcMngmt *cfm;                /* statistics confirmation */
-#endif
 {
    Buffer *mBuf;             /* message buffer */
    S16 ret1;                 /* return value */
 
-   TRC3(cmPkLkwStsCfm);
    /* lkw_c_001.main_2 removed warning */
    UNUSED(action);
    ret1 = SGetMsg(pst->region, pst->pool, &mBuf);
@@ -1479,23 +1284,15 @@ RlcMngmt *cfm;                /* statistics confirmation */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
-PRIVATE S16 cmPkRlcMngmt
+static S16 cmPkRlcMngmt
 (
 RlcMngmt *param,              /* Managment */             
 Event eventType,             /* Event type */
 Buffer *mBuf                 /* Message Buffer */
 )
-#else
-PRIVATE S16 cmPkRlcMngmt(param ,eventType, mBuf)
-RlcMngmt *param;              /* Managment */
-Event eventType;             /* Event type */
-Buffer *mBuf;                /* Message Buffer */
-#endif
 {
     S16 ret1;                /* return value */
 
-    TRC3(cmPkRlcMngmt)
 
     switch( eventType )
     {
@@ -1569,32 +1366,24 @@ Buffer *mBuf;                /* Message Buffer */
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkRlcCfg
+static S16 cmPkRlcCfg
 (
 RlcMngmt *cfg,
 Elmnt elmnt,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmPkRlcCfg(cfg, elmnt, mBuf)
-RlcMngmt *cfg;
-Elmnt elmnt;
-Buffer *mBuf;
-#endif
 {
-    TRC3(cmPkRlcCfg)
 
     switch( elmnt )
     {
       case STGEN:
       {
-         CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.gen.maxRguSaps, mBuf);
-         CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.gen.rlcMode, mBuf);
-         CMCHKPK(oduUnpackUInt32, cfg->t.cfg.s.gen.timeRes, mBuf);
-         CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
-         CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
-         CMCHKPK(oduUnpackUInt32, cfg->t.cfg.s.gen.maxUe, mBuf);
+         CMCHKPK(oduPackUInt16, cfg->t.cfg.s.gen.maxRguSaps, mBuf);
+         CMCHKPK(oduPackUInt8, cfg->t.cfg.s.gen.rlcMode, mBuf);
+         CMCHKPK(oduPackUInt32, cfg->t.cfg.s.gen.timeRes, mBuf);
+         CMCHKPK(oduPackUInt16, cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
+         CMCHKPK(oduPackUInt16, cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
+         CMCHKPK(oduPackUInt32, cfg->t.cfg.s.gen.maxUe, mBuf);
          CMCHKPK(cmPkPst, &cfg->t.cfg.s.gen.lmPst,mBuf);
 
          break;
@@ -1604,16 +1393,16 @@ Buffer *mBuf;
       case STUDXSAP:
       case STRGUSAP:
       {
-         CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.route,mBuf);
-         CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.priority,mBuf);
-         CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
+         CMCHKPK(oduPackUInt8, cfg->t.cfg.s.sap.route,mBuf);
+         CMCHKPK(oduPackUInt8, cfg->t.cfg.s.sap.priority,mBuf);
+         CMCHKPK(oduPackUInt16, cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
          CMCHKPK(SPkS16, cfg->t.cfg.s.sap.sapId, mBuf);
-         CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.inst, mBuf);
-         CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.ent, mBuf);
-         CMCHKPK(oduUnpackUInt16, cfg->t.cfg.s.sap.procId, mBuf);
-         CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.mem.pool, mBuf);
-         CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.mem.region, mBuf);
-         CMCHKPK(oduUnpackUInt8, cfg->t.cfg.s.sap.selector, mBuf);
+         CMCHKPK(oduPackUInt8, cfg->t.cfg.s.sap.inst, mBuf);
+         CMCHKPK(oduPackUInt8, cfg->t.cfg.s.sap.ent, mBuf);
+         CMCHKPK(oduPackUInt16, cfg->t.cfg.s.sap.procId, mBuf);
+         CMCHKPK(oduPackUInt8, cfg->t.cfg.s.sap.mem.pool, mBuf);
+         CMCHKPK(oduPackUInt8, cfg->t.cfg.s.sap.mem.region, mBuf);
+         CMCHKPK(oduPackUInt8, cfg->t.cfg.s.sap.selector, mBuf);
          break;
       }
        default:
@@ -1634,23 +1423,15 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkRlcCntrl
+static S16 cmPkRlcCntrl
 (
 RlcMngmt *cntrl,
 Elmnt elmnt,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmPkRlcCntrl(cntrl, elmnt, mBuf)
-RlcMngmt *cntrl;
-Elmnt elmnt;
-Buffer *mBuf;
-#endif
 {
-    U8 subAction;            /* sub action */     
+    uint8_t subAction;            /* sub action */     
 
-    TRC3(cmPkRlcCntrl)
 
     switch( elmnt )
     {
@@ -1663,7 +1444,7 @@ Buffer *mBuf;
                   break;
                case SADBG:
                   {
-                      CMCHKPK(oduUnpackUInt32, cntrl->t.cntrl.s.dbgCntrl.dbgMask,
+                      CMCHKPK(oduPackUInt32, cntrl->t.cntrl.s.dbgCntrl.dbgMask,
                                                            mBuf);
                   }
                   break;
@@ -1671,14 +1452,14 @@ Buffer *mBuf;
                   {
                      CMCHKPK(SPkS16, cntrl->t.cntrl.s.trcCntrl.trcLen, 
                                                            mBuf);
-                     CMCHKPK(oduUnpackUInt8, cntrl->t.cntrl.s.trcCntrl.trcMask,
+                     CMCHKPK(oduPackUInt8, cntrl->t.cntrl.s.trcCntrl.trcMask,
                                                            mBuf);
                   }
                   break;
 #ifdef SS_DIAG
                case SALOG:
                   {
-                      CMCHKPK(oduUnpackUInt32, cntrl->t.cntrl.s.logMask,  mBuf);
+                      CMCHKPK(oduPackUInt32, cntrl->t.cntrl.s.logMask,  mBuf);
                   }
                   break;
 #endif
@@ -1696,8 +1477,8 @@ Buffer *mBuf;
          break;
    }
 
-   CMCHKPK(oduUnpackUInt8, cntrl->t.cntrl.action, mBuf);
-   CMCHKPK(oduUnpackUInt8, cntrl->t.cntrl.subAction, mBuf);
+   CMCHKPK(oduPackUInt8, cntrl->t.cntrl.action, mBuf);
+   CMCHKPK(oduPackUInt8, cntrl->t.cntrl.subAction, mBuf);
    CMCHKPK(cmPkDateTime, &cntrl->t.cntrl.dt, mBuf);
 
    return ROK;
@@ -1714,29 +1495,21 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkRlcUsta
+static S16 cmPkRlcUsta
 (
 RlcMngmt *usta,
 Elmnt elmnt,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmPkRlcUsta(usta, elmnt, mBuf)
-RlcMngmt *usta;
-Elmnt elmnt;
-Buffer *mBuf;
-#endif
 {
-   TRC3(cmPkRlcUsta)
 
    /* lkw_c_001.main_2 removed warning */
    UNUSED(elmnt);
    /* lkw_c_001.main_2 added support for L2 Measurement */
 #ifdef LTE_L2_MEAS
-   CMCHKPK(oduUnpackUInt8, usta->t.usta.qci, mBuf);
+   CMCHKPK(oduPackUInt8, usta->t.usta.qci, mBuf);
 #endif
-   CMCHKPK(oduUnpackUInt32, usta->t.usta.ueId, mBuf);
+   CMCHKPK(oduPackUInt32, usta->t.usta.ueId, mBuf);
    CMCHKPK(SPkS16, usta->t.usta.suId, mBuf);
    CMCHKPK(cmPkCmAlarm, &usta->t.usta.alarm,mBuf);
    CMCHKPK(cmPkDateTime, &usta->t.usta.dt, mBuf);
@@ -1756,24 +1529,15 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkRlcSsta
+static S16 cmPkRlcSsta
 (
 RlcMngmt *ssta,
 Elmnt elmnt,
 Event eventType,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmPkRlcSsta(ssta, elmnt, eventType, mBuf)
-RlcMngmt *ssta;
-Elmnt elmnt;
-Event eventType;
-Buffer *mBuf;
-#endif
 {
    S16 ret1;
-   TRC3(cmPkRlcSsta)
 
    ret1 = RFAILED;
    switch(elmnt)
@@ -1821,21 +1585,14 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkRlcTrc
+static S16 cmPkRlcTrc
 (
 RlcMngmt *trc,                /* trace */                 
 Buffer *mBuf                 /* data buffer */
 )
-#else
-PRIVATE S16 cmPkRlcTrc(trc, mBuf)
-RlcMngmt *trc;                /* trace */
-Buffer *mBuf;                /* data buffer */
-#endif
 {
-   TRC3(cmPkRlcTrc)
 
-   CMCHKPK(oduUnpackUInt16, trc->t.trc.event, mBuf); 
+   CMCHKPK(oduPackUInt16, trc->t.trc.event, mBuf); 
    CMCHKPK(cmPkDateTime, &trc->t.trc.dt, mBuf);
 
    return ROK;
@@ -1853,22 +1610,14 @@ Buffer *mBuf;                /* data buffer */
  *      -# Failure : RFAILED
  */
 
-#ifdef ANSI
-PRIVATE S16 cmPkRlcSts
+static S16 cmPkRlcSts
 (
 RlcMngmt *sts,
 Elmnt elmnt,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmPkRlcSts(sts, elmnt, mBuf)
-RlcMngmt *sts;
-Elmnt elmnt;
-Buffer *mBuf;
-#endif
 {
    S16 ret1;
-   TRC3(cmPkRlcSts)
 
    ret1 = RFAILED;
    switch(elmnt)
@@ -1912,31 +1661,24 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkGenSts
+static S16 cmPkGenSts
 (
 RlcGenSts *gen,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmPkGenSts(gen, mBuf)
-RlcGenSts *gen;
-Buffer *mBuf;
-#endif
 {
-   TRC3(cmPkGenSts)
-
-   CMCHKPK(oduUnpackUInt32, gen->numSduDisc, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->numOfRb, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->protTimeOut, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->errorPdusRecv, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->unexpPdusRecv, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->bytesSent, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->bytesRecv, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->pdusRetx, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->pdusSent, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->pdusRecv, mBuf);
-   CMCHKPK(oduUnpackUInt32, gen->numUe, mBuf);
+
+   CMCHKPK(oduPackUInt32, gen->numSduDisc, mBuf);
+   CMCHKPK(oduPackUInt32, gen->numOfRb, mBuf);
+   CMCHKPK(oduPackUInt32, gen->protTimeOut, mBuf);
+   CMCHKPK(oduPackUInt32, gen->errorPdusRecv, mBuf);
+   CMCHKPK(oduPackUInt32, gen->unexpPdusRecv, mBuf);
+   CMCHKPK(oduPackUInt32, gen->bytesSent, mBuf);
+   CMCHKPK(oduPackUInt32, gen->bytesRecv, mBuf);
+   CMCHKPK(oduPackUInt32, gen->pdusRetx, mBuf);
+   CMCHKPK(oduPackUInt32, gen->pdusSent, mBuf);
+   CMCHKPK(oduPackUInt32, gen->pdusRecv, mBuf);
+   CMCHKPK(oduPackUInt32, gen->numUe, mBuf);
 
    return ROK;
 
@@ -1952,21 +1694,14 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkCkwSapSts
+static S16 cmPkCkwSapSts
 (
 RlcCkwCntSts *rcSap,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmPkCkwSapSts(rcSap, mBuf)
-RlcCkwCntSts *rcSap;
-Buffer *mBuf;
-#endif
 {
-   TRC3(cmPkCkwSapSts)
 
-   CMCHKPK(oduUnpackUInt32, rcSap->statMsgs, mBuf);
+   CMCHKPK(oduPackUInt32, rcSap->statMsgs, mBuf);
 
    return ROK;
 } /* end of cmPkCkwSapSts */
@@ -1981,22 +1716,15 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmPkKwuSapSts
+static S16 cmPkKwuSapSts
 (
 RlcKwuSapSts *ruSap,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmPkKwuSapSts(ruSap, mBuf)
-RlcKwuSapSts *ruSap;
-Buffer *mBuf;
-#endif
 {
-   TRC3(cmPkCkwSapSts)
 
-   CMCHKPK(oduUnpackUInt32, ruSap->sduTx, mBuf);
-   CMCHKPK(oduUnpackUInt32, ruSap->sduRx, mBuf);
+   CMCHKPK(oduPackUInt32, ruSap->sduTx, mBuf);
+   CMCHKPK(oduPackUInt32, ruSap->sduRx, mBuf);
    /* lkw_c_001.main_2 changed from suId to spId */
    CMCHKPK(cmPkSuId, ruSap->spId, mBuf);
 
@@ -2018,24 +1746,16 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkRlcMngmt
+static S16 cmUnpkRlcMngmt
 (
 RlcMngmt *param,
 Event eventType,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkRlcMngmt(param ,eventType, mBuf)
-RlcMngmt *param;
-Event eventType;
-Buffer *mBuf;
-#endif
 {
     S16 ret1;
-    TRC3(cmUnpkRlcMngmt)
 
-   cmMemset((U8 *) param, (U8) 0, (S16) sizeof(RlcMngmt));
+   memset(param, 0, sizeof(RlcMngmt));
 
    CMCHKUNPK(cmUnpkHeader, &param->hdr, mBuf);
    CMCHKUNPK(cmUnpkCmStatus, &param->cfm, mBuf);
@@ -2112,33 +1832,25 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkRlcCfg
+static S16 cmUnpkRlcCfg
 (
 RlcMngmt *cfg,
 Elmnt elmnt,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkRlcCfg(cfg ,elmnt, mBuf)
-RlcMngmt *cfg;
-Elmnt elmnt;
-Buffer *mBuf;
-#endif
 {
-   TRC3(cmUnpkRlcCfg)
 
    switch(elmnt)
    {
       case STGEN:
       {
          CMCHKUNPK(cmUnpkPst, &cfg->t.cfg.s.gen.lmPst,mBuf);
-         CMCHKUNPK(oduPackUInt32, &cfg->t.cfg.s.gen.maxUe, mBuf);
-         CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
-         CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
-         CMCHKUNPK(oduPackUInt32, &cfg->t.cfg.s.gen.timeRes, mBuf);
-         CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.gen.rlcMode, mBuf);
-         CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.gen.maxRguSaps, mBuf);
+         CMCHKUNPK(oduUnpackUInt32, &cfg->t.cfg.s.gen.maxUe, mBuf);
+         CMCHKUNPK(oduUnpackUInt16, &cfg->t.cfg.s.gen.maxKwuSaps, mBuf);
+         CMCHKUNPK(oduUnpackUInt16, &cfg->t.cfg.s.gen.maxUdxSaps, mBuf);
+         CMCHKUNPK(oduUnpackUInt32, &cfg->t.cfg.s.gen.timeRes, mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &cfg->t.cfg.s.gen.rlcMode, mBuf);
+         CMCHKUNPK(oduUnpackUInt16, &cfg->t.cfg.s.gen.maxRguSaps, mBuf);
       }
       break;
 
@@ -2147,16 +1859,16 @@ Buffer *mBuf;
       case STRGUSAP:
       case STUDXSAP:
       {
-         CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.selector, mBuf);
-         CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.mem.region, mBuf);
-         CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.mem.pool, mBuf);
-         CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.sap.procId, mBuf);
-         CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.ent, mBuf);
-         CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.inst, mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &cfg->t.cfg.s.sap.selector, mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &cfg->t.cfg.s.sap.mem.region, mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &cfg->t.cfg.s.sap.mem.pool, mBuf);
+         CMCHKUNPK(oduUnpackUInt16, &cfg->t.cfg.s.sap.procId, mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &cfg->t.cfg.s.sap.ent, mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &cfg->t.cfg.s.sap.inst, mBuf);
          CMCHKUNPK(SUnpkS16, &cfg->t.cfg.s.sap.sapId, mBuf);
-         CMCHKUNPK(oduPackUInt16, &cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
-         CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.priority,mBuf);
-         CMCHKUNPK(oduPackUInt8, &cfg->t.cfg.s.sap.route,mBuf);
+         CMCHKUNPK(oduUnpackUInt16, &cfg->t.cfg.s.sap.bndTmrIntvl, mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &cfg->t.cfg.s.sap.priority,mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &cfg->t.cfg.s.sap.route,mBuf);
       }
       break;
       default:
@@ -2177,32 +1889,24 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkRlcCntrl
+static S16 cmUnpkRlcCntrl
 (
 RlcMngmt *cfm,
 Elmnt elmnt,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkRlcCntrl(cfm, elmnt, mBuf)
-RlcMngmt *cfm;
-Elmnt elmnt;
-Buffer *mBuf;
-#endif
 {
-   U8 subAction;
+   uint8_t subAction;
    RlcDbgCntrl *dbgCntrl;
    RlcTrcCntrl *trcCntrl;
 
-   TRC3(cmUnpkRlcCntrl);
    
    /* lkw_c_001.main_2 removed warning */
    UNUSED(elmnt);
 
    CMCHKUNPK(cmUnpkDateTime, &cfm->t.cntrl.dt, mBuf);
-   CMCHKUNPK(oduPackUInt8, &cfm->t.cntrl.subAction, mBuf);
-   CMCHKUNPK(oduPackUInt8, &cfm->t.cntrl.action, mBuf);
+   CMCHKUNPK(oduUnpackUInt8, &cfm->t.cntrl.subAction, mBuf);
+   CMCHKUNPK(oduUnpackUInt8, &cfm->t.cntrl.action, mBuf);
 
    subAction = cfm->t.cntrl.subAction;
 
@@ -2217,20 +1921,20 @@ Buffer *mBuf;
                case SADBG:
                   {
                      dbgCntrl = &cfm->t.cntrl.s.dbgCntrl;
-                     CMCHKUNPK(oduPackUInt32, &dbgCntrl->dbgMask, mBuf);
+                     CMCHKUNPK(oduUnpackUInt32, &dbgCntrl->dbgMask, mBuf);
                   }
                   break;
                case SATRC:
                   {
                     trcCntrl = &cfm->t.cntrl.s.trcCntrl; 
-                    CMCHKUNPK(oduPackUInt8, &trcCntrl->trcMask, mBuf);
+                    CMCHKUNPK(oduUnpackUInt8, &trcCntrl->trcMask, mBuf);
                     CMCHKUNPK(SUnpkS16,&trcCntrl->trcLen, mBuf);
                   }
                   break;
 #ifdef SS_DIAG
                case SALOG:
                   {
-                      CMCHKUNPK(oduPackUInt32, &cfm->t.cntrl.s.logMask, mBuf);
+                      CMCHKUNPK(oduUnpackUInt32, &cfm->t.cntrl.s.logMask, mBuf);
                   }
                   break;
 #endif
@@ -2264,21 +1968,13 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkRlcUsta
+static S16 cmUnpkRlcUsta
 (
 RlcMngmt *usta,
 Elmnt elmnt,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkRlcUsta(usta ,elmnt, mBuf)
-RlcMngmt *usta;
-Elmnt elmnt;
-Buffer *mBuf;
-#endif
 {
-   TRC3(cmUnpkRlcUsta);
 
    /* lkw_c_001.main_2 removed warning */
    UNUSED(elmnt);
@@ -2286,10 +1982,10 @@ Buffer *mBuf;
    CMCHKUNPK(cmUnpkDateTime, &usta->t.usta.dt, mBuf);
    CMCHKUNPK(cmUnpkCmAlarm, &usta->t.usta.alarm,mBuf);
    CMCHKUNPK(SUnpkS16, &usta->t.usta.suId, mBuf);
-   CMCHKUNPK(oduPackUInt32, &usta->t.usta.ueId, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &usta->t.usta.ueId, mBuf);
    /* lkw_c_001.main_2 added support for L2 Measurement */
 #ifdef LTE_L2_MEAS
-   CMCHKUNPK(oduPackUInt8, &usta->t.usta.qci, mBuf);
+   CMCHKUNPK(oduUnpackUInt8, &usta->t.usta.qci, mBuf);
 #endif
    return ROK;
 }
@@ -2305,24 +2001,15 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkRlcSsta
+static S16 cmUnpkRlcSsta
 (
 RlcMngmt *ssta,
 Elmnt elmnt,
 Event eventType,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkRlcSsta(ssta ,elmnt, eventType, mBuf)
-RlcMngmt *ssta;
-Elmnt elmnt;
-Event eventType;
-Buffer *mBuf;
-#endif
 {
    S16 ret1;           /* return value */
-   TRC3(cmUnpkRlcSsta);
 
    CMCHKUNPK(cmUnpkDateTime, &ssta->t.ssta.dt, mBuf);
    switch(elmnt)
@@ -2331,7 +2018,7 @@ Buffer *mBuf;
          ret1 = ROK;
          if(eventType == LKW_EVT_STA_CFM)
          {
-            cmMemset((U8 *) ptNmb, (U8) 0, LKW_PART_NUM_STR_LEN);
+            memset( ptNmb, 0, LKW_PART_NUM_STR_LEN);
             ssta->t.ssta.s.sysId.ptNmb = ptNmb;
             CMCHKUNPK(cmUnpkSystemId, &ssta->t.ssta.s.sysId,mBuf);
          }
@@ -2370,22 +2057,15 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkRlcTrc
+static S16 cmUnpkRlcTrc
 (
 RlcMngmt *trc,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkRlcTrc(trc, mBuf)
-RlcMngmt *trc;
-Buffer *mBuf;
-#endif
 {
-   TRC3(cmUnpkRlcTrc);
 
    CMCHKUNPK(cmUnpkDateTime, &trc->t.trc.dt, mBuf);
-   CMCHKUNPK(oduPackUInt16, &trc->t.trc.event, mBuf);
+   CMCHKUNPK(oduUnpackUInt16, &trc->t.trc.event, mBuf);
 
    return ROK;
 } /* end of cmUnpkRlcTrc */
@@ -2402,22 +2082,14 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkRlcSts
+static S16 cmUnpkRlcSts
 (
 RlcMngmt *sts,
 Elmnt elmnt,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkRlcSts(sts ,elmnt, mBuf)
-RlcMngmt *sts;
-Elmnt elmnt;
-Buffer *mBuf;
-#endif
 {
    S16 ret1;           /* return value */
-   TRC3(cmUnpkRlcSts);
 
    CMCHKUNPK(cmUnpkDateTime, &sts->t.sts.dt, mBuf);
 
@@ -2459,31 +2131,24 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkGenSts
+static S16 cmUnpkGenSts
 (
 RlcGenSts *gen,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkGenSts(gen, mBuf)
-RlcGenSts *gen;
-Buffer *mBuf;
-#endif
 {
-   TRC3(cmUnpkGenSts);
-
-   CMCHKUNPK(oduPackUInt32, &gen->numUe, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->pdusRecv, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->pdusSent, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->pdusRetx, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->bytesRecv, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->bytesSent, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->unexpPdusRecv, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->errorPdusRecv, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->protTimeOut, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->numOfRb, mBuf);
-   CMCHKUNPK(oduPackUInt32, &gen->numSduDisc, mBuf);
+
+   CMCHKUNPK(oduUnpackUInt32, &gen->numUe, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->pdusRecv, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->pdusSent, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->pdusRetx, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->bytesRecv, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->bytesSent, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->unexpPdusRecv, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->errorPdusRecv, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->protTimeOut, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->numOfRb, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &gen->numSduDisc, mBuf);
 
    return ROK;
 } /* end of cmUnpkGenSts */
@@ -2498,22 +2163,15 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkCkwSapSts
+static S16 cmUnpkCkwSapSts
 (
 RlcCkwCntSts *rcSap,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkCkwSapSts(rcSap ,mBuf)
-RlcCkwCntSts *rcSap;
-Buffer *mBuf;
-#endif
 {
 
-   TRC3(cmUnpkCkwSapSts);
 
-   CMCHKUNPK(oduPackUInt32, &rcSap->statMsgs, mBuf); 
+   CMCHKUNPK(oduUnpackUInt32, &rcSap->statMsgs, mBuf); 
 
    return ROK;
 
@@ -2529,24 +2187,17 @@ Buffer *mBuf;
  *      -# Success : ROK
  *      -# Failure : RFAILED
  */
-#ifdef ANSI
-PRIVATE S16 cmUnpkKwuSapSts
+static S16 cmUnpkKwuSapSts
 (
 RlcKwuSapSts *ruSap,
 Buffer *mBuf
 )
-#else
-PRIVATE S16 cmUnpkKwuSapSts(ruSap, mBuf)
-RlcKwuSapSts *ruSap;
-Buffer *mBuf;
-#endif
 {
-   TRC3(cmUnpkKwuSapSts)
 
    /* lkw_c_001.main_2 changed from suId to spId */
    CMCHKUNPK(cmUnpkSuId, &ruSap->spId, mBuf);
-   CMCHKUNPK(oduPackUInt32, &ruSap->sduRx, mBuf);
-   CMCHKUNPK(oduPackUInt32, &ruSap->sduTx, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &ruSap->sduRx, mBuf);
+   CMCHKUNPK(oduUnpackUInt32, &ruSap->sduTx, mBuf);
 
    return ROK;
 
@@ -2554,20 +2205,13 @@ Buffer *mBuf;
 
 /* lkw_c_001.main_2 added support for L2 Measurement */
 #ifdef LTE_L2_MEAS
-#ifdef ANSI
 S16 cmPkLkwL2MeasReq
 (
 Pst * pst,
 RlcL2MeasReqEvt *measReqEvt
 )
-#else
-S16 cmPkLkwL2MeasReq(pst, measReqEvt)
-Pst * pst;
-RlcL2MeasReqEvt *measReqEvt;
-#endif
 {
    Buffer *mBuf = NULLP;
-   TRC3(cmPkLkwL2MeasReq)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
@@ -2575,7 +2219,7 @@ RlcL2MeasReqEvt *measReqEvt;
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
             (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
 #endif
-      SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
+      SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
       return RFAILED;
    }       
    if (cmPkRlcL2MeasReqInfo(&measReqEvt->measReq, mBuf) != ROK) {
@@ -2584,27 +2228,27 @@ RlcL2MeasReqEvt *measReqEvt;
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
             (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
 #endif
-      SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
+      SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
       SPutMsg(mBuf);
       return RFAILED;
    }
-   if (oduUnpackUInt16(measReqEvt->measPeriod, mBuf) != ROK) {
+   if (oduPackUInt16(measReqEvt->measPeriod, mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
             (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
 #endif
-      SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
+      SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
       SPutMsg(mBuf);
       return RFAILED;
    }
-   if (oduUnpackUInt32(measReqEvt->transId, mBuf) != ROK) {
+   if (oduPackUInt32(measReqEvt->transId, mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
             (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
 #endif
-      SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
+      SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
       SPutMsg(mBuf);
       return RFAILED;
    }
@@ -2613,22 +2257,15 @@ RlcL2MeasReqEvt *measReqEvt;
    return (SPstTsk(pst,mBuf));
 }
 
-#ifdef ANSI
 S16 cmPkRlcL2MeasReqInfo
 (
 RlcL2MeasReqInfo *param,
 Buffer *mBuf
 )
-#else
-S16 cmPkRlcL2MeasReqInfo(param, mBuf)
-RlcL2MeasReqInfo *param;
-Buffer *mBuf;
-#endif
 {
-   U8 idx;
-   U16 idx1;
+   uint8_t idx;
+   uint16_t idx1;
 
-   TRC3(cmPkRlcL2MeasReqInfo)
 
    if((param->measType & LKW_L2MEAS_DL_IP) ||
          (param->measType & LKW_L2MEAS_UL_IP))
@@ -2640,42 +2277,35 @@ Buffer *mBuf;
          CMCHKPK(cmPkLteRnti,   param->val.ipThMeas.ueInfoLst[idx1].ueId, mBuf);
          for(idx = 0; idx < param->val.ipThMeas.ueInfoLst[idx1].numQci; idx++)
          {
-            CMCHKPK(oduUnpackUInt8, param->val.ipThMeas.ueInfoLst[idx1].qci[idx], mBuf);
+            CMCHKPK(oduPackUInt8, param->val.ipThMeas.ueInfoLst[idx1].qci[idx], mBuf);
          }
-         CMCHKPK(oduUnpackUInt8, param->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
+         CMCHKPK(oduPackUInt8, param->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
       }
-      CMCHKPK(oduUnpackUInt16, param->val.ipThMeas.numUes, mBuf);
-      CMCHKPK(oduUnpackUInt8, param->measType, mBuf);
+      CMCHKPK(oduPackUInt16, param->val.ipThMeas.numUes, mBuf);
+      CMCHKPK(oduPackUInt8, param->measType, mBuf);
       return ROK;
    }
    else
    {
       for(idx = 0; idx < param->val.nonIpThMeas.numQci; idx++)
       {
-         CMCHKPK(oduUnpackUInt8, param->val.nonIpThMeas.qci[idx], mBuf);
+         CMCHKPK(oduPackUInt8, param->val.nonIpThMeas.qci[idx], mBuf);
       }
-      CMCHKPK(oduUnpackUInt8, param->val.nonIpThMeas.numQci, mBuf);
-      CMCHKPK(oduUnpackUInt16, param->val.nonIpThMeas.numSamples, mBuf);
+      CMCHKPK(oduPackUInt8, param->val.nonIpThMeas.numQci, mBuf);
+      CMCHKPK(oduPackUInt16, param->val.nonIpThMeas.numSamples, mBuf);
    }
-   CMCHKPK(oduUnpackUInt8, param->measType, mBuf);
+   CMCHKPK(oduPackUInt8, param->measType, mBuf);
    return ROK;
 }
 
-#ifdef ANSI
 S16 cmPkLkwL2MeasStopReq
 (
 Pst *pst,
-U8  measType
+uint8_t  measType
 )
-#else
-S16 cmPkLkwL2MeasStopReq(pst, measType)
-Pst *pst;
-U8 measType;
-#endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC3(cmPkLkwL2MeasStopReq)
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -2684,26 +2314,19 @@ U8 measType;
 #endif
       return RFAILED;
    }
-   CMCHKPK(oduUnpackUInt8, measType, mBuf);
+   CMCHKPK(oduPackUInt8, measType, mBuf);
    pst->event = (Event) LKW_EVT_L2MEAS_STOP_REQ;
    return (SPstTsk(pst,mBuf));
 }
 
-#ifdef ANSI
 S16 cmPkLkwL2MeasSendReq
 (
 Pst *pst,
-U8  measType
+uint8_t  measType
 )
-#else
-S16 cmPkLkwL2MeasSendReq(pst, measType)
-Pst *pst;
-U8 measType;
-#endif
 {
    Buffer *mBuf = NULLP;
 
-   TRC3(cmPkLkwL2MeasSendReq)
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -2712,30 +2335,22 @@ U8 measType;
 #endif
       return RFAILED;
    }
-   CMCHKPK(oduUnpackUInt8, measType, mBuf);
+   CMCHKPK(oduPackUInt8, measType, mBuf);
    pst->event = (Event) LKW_EVT_L2MEAS_SEND_REQ;
    return (SPstTsk(pst,mBuf));
 }
 #ifdef TENB_SPLIT_ARCH
-#ifdef ANSI
 S16 cmUnpkLkwL2MeasReq
 (
 LkwL2MeasReq func,
 Pst *pst,
 Buffer *mBuf
 )
-#else
-S16 cmUnpkLkwL2MeasReq(func, pst, mBuf)
-LkwL2MeasReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
 {
    RlcL2MeasReqEvt measReqEvt;
    
-   TRC3(cmUnpkLkwL2MeasReq)
 
-   if (oduPackUInt32(&measReqEvt.transId, mBuf) != ROK) {
+   if (oduUnpackUInt32(&measReqEvt.transId, mBuf) != ROK) {
       SPutMsg(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -2744,7 +2359,7 @@ Buffer *mBuf;
 #endif
       return RFAILED;
    }
-   if (oduPackUInt16(&measReqEvt.measPeriod, mBuf) != ROK) {
+   if (oduUnpackUInt16(&measReqEvt.measPeriod, mBuf) != ROK) {
       SPutMsg(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -2755,7 +2370,7 @@ Buffer *mBuf;
    }
    if (cmUnpkRlcL2MeasReqInfo(&measReqEvt.measReq, mBuf) != ROK) 
    {
-      /*SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));*/
+      /*SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));*/
       SPutMsg(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -2768,27 +2383,19 @@ Buffer *mBuf;
    return ((*func)(pst, &measReqEvt));
 }
 #else
-#ifdef ANSI
 S16 cmUnpkLkwL2MeasReq
 (
 LkwL2MeasReq func,
 Pst *pst,
 Buffer *mBuf
 )
-#else
-S16 cmUnpkLkwL2MeasReq(func, pst, mBuf)
-LkwL2MeasReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
 {
    S16   ret;
    RlcL2MeasReqEvt *measReqEvt;
 
-   TRC3(cmUnpkLkwL2MeasReq)
 
 
-   if((ret = SGetSBuf(pst->region, pst->pool, (Data **)&measReqEvt,\
+   if((ret = SGetSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data **)&measReqEvt,\
                sizeof(RlcL2MeasReqEvt))) != ROK)
    {
 #if (ERRCLASS & ERRCLS_ADD_RES)
@@ -2799,7 +2406,7 @@ Buffer *mBuf;
       return (ret);
    }
 
-   if (oduPackUInt32(&measReqEvt->transId, mBuf) != ROK) {
+   if (oduUnpackUInt32(&measReqEvt->transId, mBuf) != ROK) {
       SPutMsg(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -2808,7 +2415,7 @@ Buffer *mBuf;
 #endif
       return RFAILED;
    }
-   if (oduPackUInt16(&measReqEvt->measPeriod, mBuf) != ROK) {
+   if (oduUnpackUInt16(&measReqEvt->measPeriod, mBuf) != ROK) {
       SPutMsg(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -2819,7 +2426,7 @@ Buffer *mBuf;
    }
    if (cmUnpkRlcL2MeasReqInfo(&measReqEvt->measReq, mBuf) != ROK) 
    {
-      SPutSBuf(pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
+      SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measReqEvt, sizeof(RlcL2MeasReqEvt));
       SPutMsg(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -2833,35 +2440,28 @@ Buffer *mBuf;
 }
 #endif
 
-#ifdef ANSI
 S16 cmUnpkRlcL2MeasReqInfo
 (
 RlcL2MeasReqInfo *param,
 Buffer *mBuf
 )
-#else
-S16 cmUnpkRlcL2MeasReqInfo(param, mBuf)
-RlcL2MeasReqInfo *param;
-Buffer *mBuf;
-#endif
 {
-   U8 idx;
-   U16 idx1; 
+   uint8_t idx;
+   uint16_t idx1; 
 
-   TRC3(cmUnpkRlcL2MeasReqInfo)
 
-   CMCHKUNPK(oduPackUInt8, &param->measType, mBuf);
+   CMCHKUNPK(oduUnpackUInt8, &param->measType, mBuf);
 
    if((param->measType & LKW_L2MEAS_DL_IP) ||
          (param->measType & LKW_L2MEAS_UL_IP))
    {
-      CMCHKUNPK(oduPackUInt16, &param->val.ipThMeas.numUes, mBuf);
+      CMCHKUNPK(oduUnpackUInt16, &param->val.ipThMeas.numUes, mBuf);
       for(idx1 = 0;idx1 < param->val.ipThMeas.numUes;idx1++)
       {
-         CMCHKUNPK(oduPackUInt8, &param->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &param->val.ipThMeas.ueInfoLst[idx1].numQci, mBuf);
          for(idx = param->val.ipThMeas.ueInfoLst[idx1].numQci; idx > 0; idx--)
          {
-            CMCHKUNPK(oduPackUInt8, &param->val.ipThMeas.ueInfoLst[idx1].\
+            CMCHKUNPK(oduUnpackUInt8, &param->val.ipThMeas.ueInfoLst[idx1].\
                   qci[idx - 1], mBuf);
          }
          CMCHKUNPK(cmUnpkLteRnti, &param->val.ipThMeas.ueInfoLst[idx1].\
@@ -2873,78 +2473,55 @@ Buffer *mBuf;
    }
    else
    {
-      CMCHKUNPK(oduPackUInt16, &param->val.nonIpThMeas.numSamples, mBuf);
-      CMCHKUNPK(oduPackUInt8, &param->val.nonIpThMeas.numQci, mBuf);
+      CMCHKUNPK(oduUnpackUInt16, &param->val.nonIpThMeas.numSamples, mBuf);
+      CMCHKUNPK(oduUnpackUInt8, &param->val.nonIpThMeas.numQci, mBuf);
       for(idx = param->val.nonIpThMeas.numQci; idx > 0; idx--)
       {
-         CMCHKUNPK(oduPackUInt8, &param->val.nonIpThMeas.qci[idx - 1], mBuf);
+         CMCHKUNPK(oduUnpackUInt8, &param->val.nonIpThMeas.qci[idx - 1], mBuf);
       }
    }
    return ROK;
 }
 
-#ifdef ANSI
 S16 cmUnpkLkwL2MeasStopReq
 (
 LkwL2MeasStopReq func,
 Pst *pst,
 Buffer *mBuf
 )
-#else
-S16 cmUnpkLkwL2MeasStopReq(func, pst, mBuf)
-LkwL2MeasStopReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
 {
-   U8 measType;
-   TRC3(cmUnpkLkwL2MeasReq)
+   uint8_t measType;
 
-   CMCHKUNPK(oduPackUInt8, &measType, mBuf);
+   CMCHKUNPK(oduUnpackUInt8, &measType, mBuf);
    SPutMsg(mBuf);
    return ((*func)(pst, measType));
 }
 
-#ifdef ANSI
 S16 cmUnpkLkwL2MeasSendReq
 (
 LkwL2MeasSendReq func,
 Pst *pst,
 Buffer *mBuf
 )
-#else
-S16 cmUnpkLkwL2MeasSendReq(func, pst, mBuf)
-LkwL2MeasSendReq func;
-Pst *pst;
-Buffer *mBuf;
-#endif
 {
-   U8    measType;
+   uint8_t    measType;
 
-   TRC3(cmUnpkLkwL2MeasSendReq)
 
-   CMCHKUNPK(oduPackUInt8, &measType, mBuf); 
+   CMCHKUNPK(oduUnpackUInt8, &measType, mBuf); 
    SPutMsg(mBuf);
    return ((*func)(pst, measType));
 }
 
-#ifdef ANSI
 S16 cmPkLkwL2MeasCfm
 (
 Pst * pst,
 RlcL2MeasCfmEvt *measCfmEvt
 )
-#else
-S16 cmPkLkwL2MeasCfm(pst, measCfmEvt)
-Pst * pst;
-RlcL2MeasCfmEvt *measCfmEvt;
-#endif
 {
    Buffer *mBuf = NULLP;
-   U8 idx;
-   U8 idx1;
+   uint8_t idx;
+   uint8_t idx1;
 
-   TRC3(cmPkLkwL2MeasCfm)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
@@ -2952,7 +2529,7 @@ RlcL2MeasCfmEvt *measCfmEvt;
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
             (ErrVal)ERRLKW, (ErrVal)0, "Packing failed");
 #endif
-      SPutSBuf(pst->region, pst->pool, (Data *)measCfmEvt, sizeof(RlcL2MeasCfmEvt));
+      SPutSBufNewForDebug(__FILE__,__FUNCTION__,__LINE__,pst->region, pst->pool, (Data *)measCfmEvt, sizeof(RlcL2MeasCfmEvt));
       return RFAILED;
    }
 
@@ -2975,7 +2552,7 @@ RlcL2MeasCfmEvt *measCfmEvt;
          }
       }
 
-      if (oduUnpackUInt16(measCfmEvt->val.nonIpThMeas.numCfm, mBuf) != ROK) {
+      if (oduPackUInt16(measCfmEvt->val.nonIpThMeas.numCfm, mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
@@ -3004,7 +2581,7 @@ RlcL2MeasCfmEvt *measCfmEvt;
             }
          }
 
-         if (oduUnpackUInt16(measCfmEvt->val.ipThMeas.ueInfoLst[idx1].numCfm, mBuf) != ROK) {
+         if (oduPackUInt16(measCfmEvt->val.ipThMeas.ueInfoLst[idx1].numCfm, mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
             SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
                   __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
@@ -3017,12 +2594,12 @@ RlcL2MeasCfmEvt *measCfmEvt;
          CMCHKPK(cmPkLteCellId, measCfmEvt->val.ipThMeas.ueInfoLst[idx1].cellId, mBuf);
          CMCHKPK(cmPkLteRnti,   measCfmEvt->val.ipThMeas.ueInfoLst[idx1].ueId, mBuf);
       }
-      oduUnpackUInt16(measCfmEvt->val.ipThMeas.numUes, mBuf);
+      oduPackUInt16(measCfmEvt->val.ipThMeas.numUes, mBuf);
    }
 
-   CMCHKPK(oduUnpackUInt8, measCfmEvt->measType, mBuf);
+   CMCHKPK(oduPackUInt8, measCfmEvt->measType, mBuf);
    CMCHKPK(cmPkCmStatus, &measCfmEvt->status, mBuf);
-   if (oduUnpackUInt32(measCfmEvt->transId, mBuf) != ROK) {
+   if (oduPackUInt32(measCfmEvt->transId, mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
@@ -3035,64 +2612,46 @@ RlcL2MeasCfmEvt *measCfmEvt;
    return (SPstTsk(pst,mBuf));
 }
 
-#ifdef ANSI
 S16 cmPkRlcL2MeasCfmInfo
 (
 RlcL2MeasCfmInfo *param,
 Buffer *mBuf,
-U8 measType
+uint8_t measType
 )
-#else
-S16 cmPkRlcL2MeasCfmInfo(param, mBuf, measType)
-RlcL2MeasCfmInfo *param;
-Buffer *mBuf;
-U8 measType;
-#endif
 {
-   TRC3(cmPkRlcL2MeasCfmInfo)
 
    if((measType & LKW_L2MEAS_DL_IP) ||
          (measType & LKW_L2MEAS_UL_IP))
    {
       CMCHKPK(SPkF32, param->val.ipThrput.ulIpThPut, mBuf);
       CMCHKPK(SPkF32, param->val.ipThrput.dlIpThPut, mBuf);
-      CMCHKPK(oduUnpackUInt8, param->qci, mBuf);
+      CMCHKPK(oduPackUInt8, param->qci, mBuf);
       return ROK;
    }
    else  
    {
-      CMCHKPK(oduUnpackUInt32, param->val.nonIpThrput.dlDiscRate, mBuf);
-      CMCHKPK(oduUnpackUInt32, param->val.nonIpThrput.uuLoss, mBuf);
-      CMCHKPK(oduUnpackUInt32, param->val.nonIpThrput.numActUe, mBuf);
-      CMCHKPK(oduUnpackUInt32, param->val.nonIpThrput.dlSduDelay, mBuf);
-      CMCHKPK(oduUnpackUInt8,  param->qci, mBuf);
+      CMCHKPK(oduPackUInt32, param->val.nonIpThrput.dlDiscRate, mBuf);
+      CMCHKPK(oduPackUInt32, param->val.nonIpThrput.uuLoss, mBuf);
+      CMCHKPK(oduPackUInt32, param->val.nonIpThrput.numActUe, mBuf);
+      CMCHKPK(oduPackUInt32, param->val.nonIpThrput.dlSduDelay, mBuf);
+      CMCHKPK(oduPackUInt8,  param->qci, mBuf);
    } 
    return ROK;
 }
 
-#ifdef ANSI
 S16 cmUnpkLkwL2MeasCfm
 (
 LkwL2MeasCfm func,
 Pst *pst,
 Buffer *mBuf
 )
-#else
-S16 cmUnpkLkwL2MeasCfm(func, pst, mBuf)
-LkwL2MeasCfm func;
-Pst *pst;
-Buffer *mBuf;
-#endif
 {
-   U8 idx;
-   U16 idx1;
+   uint8_t idx;
+   uint16_t idx1;
    RlcL2MeasCfmEvt measCfmEvt;
 
-   TRC3(cmUnpkLkwL2MeasCfm)
-
-   cmMemset((U8 *)&measCfmEvt, 0 , sizeof(RlcL2MeasCfmEvt));
-
-   if (oduPackUInt32(&measCfmEvt.transId, mBuf) != ROK) {
+   memset(&measCfmEvt, 0 , sizeof(RlcL2MeasCfmEvt));
+   if (oduUnpackUInt32(&measCfmEvt.transId, mBuf) != ROK) {
       SPutMsg(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -3102,18 +2661,18 @@ Buffer *mBuf;
       return RFAILED;
    }
    CMCHKUNPK(cmUnpkCmStatus, &measCfmEvt.status, mBuf);
-   CMCHKUNPK(oduPackUInt8, &measCfmEvt.measType, mBuf);  
+   CMCHKUNPK(oduUnpackUInt8, &measCfmEvt.measType, mBuf);  
 
    if(measCfmEvt.measType & LKW_L2MEAS_DL_IP || measCfmEvt.measType & LKW_L2MEAS_UL_IP)
    { 
-      CMCHKUNPK(oduPackUInt16, &measCfmEvt.val.ipThMeas.numUes, mBuf);
+      CMCHKUNPK(oduUnpackUInt16, &measCfmEvt.val.ipThMeas.numUes, mBuf);
       for(idx1 = 0;idx1<measCfmEvt.val.ipThMeas.numUes;idx1++)
       {
          CMCHKUNPK(cmUnpkLteRnti, &measCfmEvt.val.ipThMeas.\
                ueInfoLst[idx1].ueId, mBuf);
          CMCHKUNPK(cmUnpkLteCellId, &measCfmEvt.val.ipThMeas.\
                ueInfoLst[idx1].cellId, mBuf);
-         if (oduPackUInt16(&measCfmEvt.val.ipThMeas.ueInfoLst[idx1].\
+         if (oduUnpackUInt16(&measCfmEvt.val.ipThMeas.ueInfoLst[idx1].\
                   numCfm, mBuf) != ROK) {
             SPutMsg(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
@@ -3140,7 +2699,7 @@ Buffer *mBuf;
    }
    else
    {
-      if (oduPackUInt16(&measCfmEvt.val.nonIpThMeas.numCfm, mBuf) != ROK) {
+      if (oduUnpackUInt16(&measCfmEvt.val.nonIpThMeas.numCfm, mBuf) != ROK) {
          SPutMsg(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -3167,58 +2726,42 @@ Buffer *mBuf;
    return ((*func)(pst, &measCfmEvt));
 }
 
-#ifdef ANSI
 S16 cmUnpkRlcL2MeasCfmInfo
 (
 RlcL2MeasCfmInfo *param,
 Buffer *mBuf,
-U8 measType
+uint8_t measType
 )
-#else
-S16 cmUnpkRlcL2MeasCfmInfo(param, mBuf, measType)
-RlcL2MeasCfmInfo *param;
-Buffer *mBuf;
-U8 measType;
-#endif
 {
-   TRC3(cmUnpkRlcL2MeasCfmInfo)
 
    if((measType & LKW_L2MEAS_DL_IP) ||
          (measType & LKW_L2MEAS_UL_IP))
    {
-      CMCHKUNPK(oduPackUInt8,  &param->qci, mBuf);
+      CMCHKUNPK(oduUnpackUInt8,  &param->qci, mBuf);
       CMCHKUNPK(SUnpkF32, &param->val.ipThrput.dlIpThPut, mBuf);
       CMCHKUNPK(SUnpkF32, &param->val.ipThrput.ulIpThPut, mBuf);
    }
    else
 
    {
-      CMCHKUNPK(oduPackUInt8,  &param->qci, mBuf);
-      CMCHKUNPK(oduPackUInt32, &param->val.nonIpThrput.dlSduDelay, mBuf);
-      CMCHKUNPK(oduPackUInt32, &param->val.nonIpThrput.numActUe, mBuf);
-      CMCHKUNPK(oduPackUInt32, &param->val.nonIpThrput.uuLoss, mBuf);
-      CMCHKUNPK(oduPackUInt32, &param->val.nonIpThrput.dlDiscRate, mBuf);
+      CMCHKUNPK(oduUnpackUInt8,  &param->qci, mBuf);
+      CMCHKUNPK(oduUnpackUInt32, &param->val.nonIpThrput.dlSduDelay, mBuf);
+      CMCHKUNPK(oduUnpackUInt32, &param->val.nonIpThrput.numActUe, mBuf);
+      CMCHKUNPK(oduUnpackUInt32, &param->val.nonIpThrput.uuLoss, mBuf);
+      CMCHKUNPK(oduUnpackUInt32, &param->val.nonIpThrput.dlDiscRate, mBuf);
    }
    return ROK;
 }
 
 
-#ifdef ANSI
 S16 cmPkLkwL2MeasStopCfm
 (
 Pst * pst,
-U8 measType,
-U8 status
+uint8_t measType,
+uint8_t status
 )
-#else
-S16 cmPkLkwL2MeasStopCfm(pst, measType,status)
-Pst * pst;
-U8  measType;
-U8  status
-#endif
 {
    Buffer *mBuf = NULLP;
-   TRC3(cmPkLkwL2MeasStopCfm)
 
    if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
@@ -3228,31 +2771,24 @@ U8  status
 #endif
       return RFAILED;
    }
-   CMCHKPK(oduUnpackUInt8, status, mBuf);
-   CMCHKPK(oduUnpackUInt8, measType, mBuf);
+   CMCHKPK(oduPackUInt8, status, mBuf);
+   CMCHKPK(oduPackUInt8, measType, mBuf);
    pst->event = (Event) LKW_EVT_L2MEAS_STOP_CFM;
    return (SPstTsk(pst,mBuf));
 }
 
-#ifdef ANSI
+
 S16 cmUnpkLkwL2MeasStopCfm
 (
 LkwL2MeasStopCfm func,
 Pst *pst,
 Buffer *mBuf
 )
-#else
-S16 cmUnpkLkwL2MeasStopCfm(func, pst, mBuf)
-LkwL2MeasStopCfm func;
-Pst *pst;
-Buffer *mBuf;
-#endif
 {
-   U8 measType;
-   U8 status;
-   TRC3(cmUnpkLkwL2MeasCfm)
-   CMCHKUNPK(oduPackUInt8,  &measType, mBuf);
-   CMCHKUNPK(oduPackUInt8,  &status, mBuf);
+   uint8_t measType;
+   uint8_t status;
+   CMCHKUNPK(oduUnpackUInt8,  &measType, mBuf);
+   CMCHKUNPK(oduUnpackUInt8,  &status, mBuf);
    SPutMsg(mBuf);
    return ((*func)(pst, measType,status));
 }