U8, U16, U32 data type changes
[o-du/l2.git] / src / cm / ckw.c
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");            #
6 #   you may not use this file except in compliance with the License.           #
7 #   You may obtain a copy of the License at                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
11 #   Unless required by applicable law or agreed to in writing, software        #
12 #   distributed under the License is distributed on an "AS IS" BASIS,          #
13 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
14 #   See the License for the specific language governing permissions and        #
15 #   limitations under the License.                                             #
16 ################################################################################
17 *******************************************************************************/
18
19 /********************************************************************20**
20   
21         Name:    CKW RRC Control Interface
22     
23         Type:    C file
24   
25         Desc:    This file Contains the packing and unpacking functions for
26                  CKW Interface
27  
28         File:    ckw.c
29
30 *********************************************************************21*/
31
32 #include "common_def.h"
33 #include "ckw.h"
34 #include "ckw.x"
35
36 /* extern (.x) include files */
37
38 \f
39 #ifdef __cplusplus
40 EXTERN "C" {
41 #endif  /*for extern "C"*/
42
43 #ifdef LCCKW
44 /*
45 *
46 *    Fun:    cmPkCkwBndReq
47 *
48 *    Desc:    pack the primitive CkwBndReq
49 *
50 *    Ret:    ROK  -ok
51 *
52 *    Notes:    None
53 *
54 *    File:     ckw.c
55 *
56 */
57 #ifdef ANSI
58 S16 cmPkCkwBndReq
59 (
60 Pst *pst,
61 SuId suId,
62 SpId spId
63 )
64 #else
65 S16 cmPkCkwBndReq(pst, suId, spId)
66 Pst *pst;
67 SuId suId;
68 SpId spId;
69 #endif
70 {
71     S16 ret1;
72     Buffer *mBuf;
73     mBuf = NULLP;
74
75     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
76     {
77 #if (ERRCLASS & ERRCLS_ADD_RES)
78        if(ret1 != ROK)
79        {
80           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
81                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
82                (ErrVal)ECKW001, (ErrVal)0, "SGetMsg() failed");
83        }
84 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
85        return (ret1);
86     }
87     CMCHKPKLOG(SPkS16, spId, mBuf, ECKW002, pst);
88     CMCHKPKLOG(SPkS16, suId, mBuf, ECKW003, pst);
89     pst->event = (Event) CKW_EVT_BND_REQ;
90
91     return (SPstTsk(pst,mBuf));
92 } /*end of function cmPkCkwBndReq*/
93 \f
94 /*
95 *
96 *    Fun:    cmPkCkwUbndReq
97 *
98 *    Desc:    pack the primitive CkwUbndReq
99 *
100 *    Ret:    ROK  -ok
101 *
102 *    Notes:    None
103 *
104 *    File:     ckw.c
105 *
106 */
107 #ifdef ANSI
108 S16 cmPkCkwUbndReq
109 (
110 Pst *pst,
111 SpId spId,
112 Reason reason
113 )
114 #else
115 S16 cmPkCkwUbndReq(pst, spId, reason)
116 Pst *pst;
117 SpId spId;
118 Reason reason;
119 #endif
120 {
121     S16 ret1;
122     Buffer *mBuf;
123     mBuf = NULLP;
124
125     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
126     {
127 #if (ERRCLASS & ERRCLS_ADD_RES)
128        if(ret1 != ROK)
129        {
130           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
131                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
132                (ErrVal)ECKW004, (ErrVal)0, "SGetMsg() failed");
133        }
134 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
135        return (ret1);
136     }
137     CMCHKPKLOG(SPkS16, reason, mBuf, ECKW005, pst);
138     CMCHKPKLOG(SPkS16, spId, mBuf, ECKW006, pst);
139     pst->event = (Event) CKW_EVT_UBND_REQ;
140
141     return (SPstTsk(pst,mBuf));
142 } /*end of function cmPkCkwUbndReq*/
143 \f
144 /*
145 *
146 *    Fun:    cmPkCkwBndCfm
147 *
148 *    Desc:    pack the primitive CkwBndCfm
149 *
150 *    Ret:    ROK  -ok
151 *
152 *    Notes:    None
153 *
154 *    File:     ckw.c
155 *
156 */
157 #ifdef ANSI
158 S16 cmPkCkwBndCfm
159 (
160 Pst *pst,
161 SuId suId,
162 uint8_t status
163 )
164 #else
165 S16 cmPkCkwBndCfm(pst, suId, status)
166 Pst *pst;
167 SuId suId;
168 uint8_t status;
169 #endif
170 {
171     S16 ret1;
172     Buffer *mBuf;
173     mBuf = NULLP;
174
175     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
176     {
177 #if (ERRCLASS & ERRCLS_ADD_RES)
178        if(ret1 != ROK)
179        {
180           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
181                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
182                (ErrVal)ECKW007, (ErrVal)0, "SGetMsg() failed");
183        }
184
185 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
186        return (ret1);
187     }
188     CMCHKPKLOG(oduUnpackUInt8, status, mBuf, ECKW008, pst);
189     CMCHKPKLOG(SPkS16, suId, mBuf, ECKW009, pst);
190     pst->event = (Event) CKW_EVT_BND_CFM;
191
192     return (SPstTsk(pst,mBuf));
193 } /*end of function cmPkCkwBndCfm*/
194
195 \f
196 /*
197 *
198 *    Fun:    cmPkRlcTmInfo
199 *
200 *    Desc:    pack the structure RlcTmInfo
201 *
202 *    Ret:    ROK  -ok
203 *
204 *    Notes:    None
205 *
206 *    File:     ckw.c
207 *
208 */
209 #ifdef ANSI
210 S16 cmPkRlcTmInfo
211 (
212 RlcTmInfo      *param,
213 Buffer         *mBuf
214 )
215 #else
216 S16 cmPkRlcTmInfo(param, mBuf)
217 RlcTmInfo      *param;
218 Buffer         *mBuf;
219 #endif
220 {
221
222     CMCHKPK(oduUnpackUInt32, param->dl.buffSize, mBuf);
223
224     return ROK;
225 } /* cmPkRlcTmInfo */
226
227 \f
228 /*
229 *
230 *    Fun:    cmPkRlcUmInfo
231 *
232 *    Desc:    pack the structure RlcUmInfo
233 *
234 *    Ret:    ROK  -ok
235 *
236 *    Notes:    None
237 *
238 *    File:     ckw.c
239 *
240 */
241 #ifdef ANSI
242 S16 cmPkRlcUmInfo
243 (
244 RlcEntCfgInfo  *param,
245 Buffer         *mBuf
246 )
247 #else
248 S16 cmPkRlcUmInfo(param, mBuf)
249 RlcEntCfgInfo  *param;
250 Buffer         *mBuf;
251 #endif
252 {
253
254     switch(param->dir)
255     {
256        case CKW_CFG_DIR_DL:
257           {
258              CMCHKPK(oduUnpackUInt8, param->m.umInfo.dl.snLen, mBuf);
259              break;
260           }
261        case CKW_CFG_DIR_UL:
262           {
263              CMCHKPK(oduUnpackUInt8, param->m.umInfo.ul.reOrdTmr, mBuf);
264              CMCHKPK(oduUnpackUInt8, param->m.umInfo.ul.snLen, mBuf);
265              break;
266           }
267        /* Patch ckw_c_001.main_3 */
268        case CKW_CFG_DIR_BOTH:
269           {
270              CMCHKPK(oduUnpackUInt8, param->m.umInfo.dl.snLen, mBuf);
271              CMCHKPK(oduUnpackUInt8, param->m.umInfo.ul.reOrdTmr, mBuf);
272              CMCHKPK(oduUnpackUInt8, param->m.umInfo.ul.snLen, mBuf);
273              break;
274           }
275     }
276
277     return ROK;
278 } /* cmPkRlcUmInfo */
279
280 \f
281 /*
282 *
283 *    Fun:    cmPkRlcAmInfo
284 *
285 *    Desc:    pack the structure RlcAmInfo
286 *
287 *    Ret:    ROK  -ok
288 *
289 *    Notes:    None
290 *
291 *    File:     ckw.c
292 *
293 */
294 #ifdef ANSI
295 S16 cmPkRlcAmInfo
296 (
297 RlcAmInfo      *param,
298 Buffer         *mBuf
299 )
300 #else
301 S16 cmPkRlcAmInfo(param, mBuf)
302 RlcAmInfo      *param;
303 Buffer         *mBuf;
304 #endif
305 {
306
307     /* UP LINK */
308     CMCHKPK(oduUnpackUInt8, param->ul.reOrdTmr, mBuf);
309     CMCHKPK(oduUnpackUInt16, param->ul.staProhTmr, mBuf);
310     CMCHKPK(oduUnpackUInt8, param->ul.snLen, mBuf);
311
312     /* DOWN LINK */
313     CMCHKPK(oduUnpackUInt8, param->dl.maxRetx, mBuf);
314     CMCHKPK(SPkS32, param->dl.pollByte, mBuf);
315     CMCHKPK(SPkS16, param->dl.pollPdu, mBuf);
316     CMCHKPK(oduUnpackUInt16, param->dl.pollRetxTmr, mBuf);
317     CMCHKPK(oduUnpackUInt8, param->dl.snLen, mBuf);
318
319     return ROK;
320 } /* cmPkRlcAmInfo */
321
322 \f
323 /*
324 *
325 *    Fun:    cmPkCkwLInfo
326 *
327 *    Desc:    pack the structure CkwLChInfo
328 *
329 *    Ret:    ROK  -ok
330 *
331 *    Notes:    None
332 *
333 *    File:     ckw.c
334 *
335 */
336 #ifdef ANSI
337 S16 cmPkCkwLChInfo
338 (
339 CkwLChInfo     *param,
340 Buffer         *mBuf
341 )
342 #else
343 S16 cmPkCkwLChInfo(param, mBuf)
344 CkwLChInfo     *param;
345 Buffer         *mBuf;
346 #endif
347 {
348
349     CMCHKPK(oduUnpackUInt8, param->type, mBuf);
350     CMCHKPK(oduUnpackUInt8, param->lChId, mBuf);
351
352     return ROK;
353 } /* cmPkCkwLChInfo */
354
355 \f
356 /*
357 *
358 *    Fun:    cmPkRlcEntCfgInfo
359 *
360 *    Desc:    pack the structure RlcEntCfgInfo
361 *
362 *    Ret:    ROK  -ok
363 *
364 *    Notes:    None
365 *
366 *    File:     ckw.c
367 *
368 */
369 #ifdef ANSI
370 S16 cmPkRlcEntCfgInfo
371 (
372 RlcEntCfgInfo  *param,
373 Buffer         *mBuf
374 )
375 #else
376 S16 cmPkRlcEntCfgInfo(param, mBuf)
377 RlcEntCfgInfo  *param;
378 Buffer         *mBuf;
379 #endif
380 {
381
382     switch(param->entMode)
383     {
384        case CM_LTE_MODE_TM:
385           {
386              CMCHKPK(cmPkRlcTmInfo, &(param->m.tmInfo), mBuf);
387              break;
388           }
389        case CM_LTE_MODE_UM:
390           {
391              CMCHKPK(cmPkRlcUmInfo, param, mBuf);
392              break;
393           }
394        case CM_LTE_MODE_AM:
395           {
396              CMCHKPK(cmPkRlcAmInfo, &(param->m.amInfo), mBuf);
397              break;
398           }
399     }
400
401     /* Logical Channel Information */
402     switch(param->entMode)
403     {
404        case CM_LTE_MODE_TM:
405           {
406              CMCHKPK(cmPkCkwLChInfo, &(param->lCh[0]), mBuf);
407              break;
408           }
409        /* ccpu00128195: Packing lCh[0] and lCh[1] for UM bearer as well */
410        case CM_LTE_MODE_UM:
411        case CM_LTE_MODE_AM:
412           {
413              CMCHKPK(cmPkCkwLChInfo, &(param->lCh[1]), mBuf);
414              CMCHKPK(cmPkCkwLChInfo, &(param->lCh[0]), mBuf);
415              break;
416           }
417     }
418
419 #ifdef TENB_MULT_CELL_SUPPRT
420     CMCHKPK(SPkS16, param->rguSapId, mBuf);
421 #endif
422     CMCHKPK(SPkS16, param->discardTmr, mBuf);
423     CMCHKPK(oduUnpackUInt8, param->dir, mBuf);
424     CMCHKPK(cmPkLteRlcMode, param->entMode, mBuf);
425     CMCHKPK(oduUnpackUInt8, param->qci, mBuf);
426     CMCHKPK(oduUnpackUInt8, param->rbType, mBuf);
427     CMCHKPK(oduUnpackUInt8, param->rbId, mBuf);
428     CMCHKPK(oduUnpackUInt8, param->cfgType, mBuf);
429
430     return ROK;
431 } /* cmPkRlcEntCfgInfo */
432
433 \f
434 /*
435 *
436 *    Fun:    cmPkRlcCfgInfo
437 *
438 *    Desc:    pack the structure RlcCfgInfo
439 *
440 *    Ret:    ROK  -ok
441 *
442 *    Notes:    None
443 *
444 *    File:     ckw.c
445 *
446 */
447 #ifdef ANSI
448 S16 cmPkRlcCfgInfo
449 (
450 RlcCfgInfo     *param,
451 Pst            *pst,
452 Buffer         *mBuf
453 )
454 #else
455 S16 cmPkRlcCfgInfo(param, pst, mBuf)
456 RlcCfgInfo     *param;
457 Pst            *pst;
458 Buffer         *mBuf;
459 #endif
460 {
461    S16 idx;
462
463
464     for (idx = param->numEnt-1; idx >= 0; idx--)
465     {
466        CMCHKPK(cmPkRlcEntCfgInfo, &(param->entCfg[idx]), mBuf);
467     }
468
469     CMCHKPK(oduUnpackUInt8, param->numEnt, mBuf);
470     CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
471     CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
472     CMCHKPKLOG(oduUnpackUInt32, param->transId, mBuf, ECKW010, pst);
473
474     return ROK;
475 } /* cmPkRlcCfgInfo */
476
477 \f
478 /*
479 *
480 *    Fun:    cmPkRlcEntCfgCfmInfo
481 *
482 *    Desc:    pack the structure RlcEntCfgInfo
483 *
484 *    Ret:    ROK  -ok
485 *
486 *    Notes:    None
487 *
488 *    File:     ckw.c
489 *
490 */
491 #ifdef ANSI
492 S16 cmPkRlcEntCfgCfmInfo
493 (
494 RlcEntCfgCfmInfo  *param,
495 Buffer            *mBuf
496 )
497 #else
498 S16 cmPkRlcEntCfgCfmInfo(param, mBuf)
499 RlcEntCfgCfmInfo  *param;
500 Buffer            *mBuf;
501 #endif
502 {
503
504     CMCHKPK(cmPkCmStatus, &(param->status), mBuf);
505     CMCHKPK(oduUnpackUInt8, param->rbType, mBuf);
506     CMCHKPK(oduUnpackUInt8, param->rbId, mBuf);
507
508     return ROK;
509 } /* cmPkRlcEntCfgCfmInfo */
510
511 \f
512 /*
513 *
514 *    Fun:    cmPkRlcCfgCfmInfo
515 *
516 *    Desc:    pack the structure RlcCfgCfmInfo
517 *
518 *    Ret:    ROK  -ok
519 *
520 *    Notes:    None
521 *
522 *    File:     ckw.c
523 *
524 */
525 #ifdef ANSI
526 S16 cmPkRlcCfgCfmInfo
527 (
528 RlcCfgCfmInfo  *param,
529 Pst            *pst,
530 Buffer         *mBuf
531 )
532 #else
533 S16 cmPkRlcCfgCfmInfo(param, pst, mBuf)
534 RlcCfgCfmInfo  *param;
535 Pst            *pst;
536 Buffer         *mBuf;
537 #endif
538 {
539     S16         idx;
540
541
542     for (idx = param->numEnt-1; idx >= 0; idx--)
543     {
544        CMCHKPK(cmPkRlcEntCfgCfmInfo, &(param->entCfgCfm[(uint8_t)idx]), mBuf);
545     }
546
547     CMCHKPK(oduUnpackUInt8, param->numEnt, mBuf);
548     CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
549     CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
550     CMCHKPKLOG(oduUnpackUInt32, param->transId, mBuf, ECKW014, pst);
551
552     return ROK;
553 } /* cmPkRlcCfgCfmInfo */
554
555 \f
556 /*
557 *
558 *    Fun:    cmPkRlcCfgCfm
559 *
560 *    Desc:    pack the primitive RlcUiRlcCfgCfm
561 *
562 *    Ret:    ROK  -ok
563 *
564 *    Notes:    None
565 *
566 *    File:     ckw.c
567 *
568 */
569 #ifdef ANSI
570 S16 cmPkRlcCfgCfm
571 (
572 Pst               *pst,
573 SuId              suId,
574 RlcCfgCfmInfo     *cfgCfmInfo
575 )
576 #else
577 S16 cmPkRlcCfgCfm(pst, suId, cfgCfmInfo)
578 Pst               *pst;
579 SuId              suId;
580 RlcCfgCfmInfo     *cfgCfmInfo;
581 #endif
582 {
583     S16 ret1;
584     Buffer *mBuf;
585     mBuf = NULLP;
586
587     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
588     {
589 #if (ERRCLASS & ERRCLS_ADD_RES)
590        if(ret1 != ROK)
591        {
592           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
593                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
594                (ErrVal)ECKW015, (ErrVal)0, "SGetMsg() failed");
595        }
596 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
597        return (ret1);
598     }
599
600     switch(pst->selector)
601     {
602 #ifdef LCCKW
603        case ODU_SELECTOR_LC:
604           {
605              ret1 = cmPkRlcCfgCfmInfo( (cfgCfmInfo), pst, mBuf);
606 #if (ERRCLASS & ERRCLS_ADD_RES)
607              if(ret1 != ROK)
608              {
609                 SPutMsg(mBuf);
610                 SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
611                       __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
612                       (ErrVal)ECKW016, (ErrVal)ret1, "Packing failure");
613                 return ( ret1 );
614              }
615 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
616              if (SPutSBuf(pst->region, pst->pool, (Data *)cfgCfmInfo,
617                       sizeof(RlcCfgCfmInfo)) != ROK)
618              {
619                 SPutMsg(mBuf);
620                 return RFAILED;
621              }
622
623              break;
624           }
625 #endif /* LCCKW */
626     }
627
628     CMCHKPKLOG(SPkS16, suId, mBuf, ECKW017, pst);
629     pst->event = (Event) CKW_EVT_CFG_CFM;
630
631     return (SPstTsk(pst,mBuf));
632 } /* cmPkRlcCfgCfm */
633
634 /*
635 *
636 *    Fun:    cmPkCkwUeInfo
637 *
638 *    Desc:   pack the primitive KwUiCkwUeInfo
639 *
640 *    Ret:    ROK  -ok
641 *
642 *    Notes:  None
643 *
644 *    File:   ckw.c
645 *
646 */
647 #ifdef ANSI
648 S16 cmPkCkwUeInfo
649 (
650 CkwUeInfo *param,
651 Buffer    *mBuf
652 )
653 #else
654 S16 cmPkCkwUeInfo(param, mBuf)
655 CkwUeInfo *param;
656 Buffer    *mBuf;
657 #endif
658 {
659
660    CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
661    CMCHKPK(cmPkLteRnti, param->ueId, mBuf);
662
663    return ROK;
664 }
665
666 /*
667 *
668 *    Fun:    cmPkCkwUeIdChgReq
669 *
670 *    Desc:   pack the primitive RlcUiCkwUeIdChgReq
671 *
672 *    Ret:    ROK  -ok
673 *
674 *    Notes:  None
675 *
676 *    File:   ckw.c
677 *
678 */
679 #ifdef ANSI
680 S16 cmPkCkwUeIdChgReq
681 (
682 Pst               *pst,
683 SpId              spId,
684 uint32_t               transId,
685 CkwUeInfo         *ueInfo,
686 CkwUeInfo         *newUeInfo
687 )
688 #else
689 S16 cmPkCkwUeIdChgReq(pst, spId, transId, ueInfo, newUeInfo)
690 Pst               *pst;
691 SpId              spId;
692 uint32_t               transId;
693 CkwUeInfo         *ueInfo;
694 CkwUeInfo         *newUeInfo;
695 #endif
696 {
697     S16    ret1;
698     Buffer *mBuf = NULLP;
699
700
701     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
702     {
703 #if (ERRCLASS & ERRCLS_ADD_RES)
704        if(ret1 != ROK)
705        {
706           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
707                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
708                (ErrVal)ECKW018, (ErrVal)0, "SGetMsg() failed");
709        }
710 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
711
712        return (ret1);
713     }
714
715     CMCHKPK(cmPkCkwUeInfo, newUeInfo, mBuf);
716     if (SPutSBuf(pst->region, pst->pool, (Data *)newUeInfo,
717              sizeof(CkwUeInfo)) != ROK)
718     {
719        SPutMsg(mBuf);
720        return RFAILED;
721     }
722     CMCHKPK(cmPkCkwUeInfo, ueInfo, mBuf);
723     if (SPutSBuf(pst->region, pst->pool, (Data *)ueInfo,
724              sizeof(CkwUeInfo)) != ROK)
725     {
726        SPutMsg(mBuf);
727        return RFAILED;
728     }
729     CMCHKPKLOG(oduUnpackUInt32, transId, mBuf, ECKW019, pst);
730     CMCHKPKLOG(SPkS16, spId, mBuf, ECKW020, pst);
731     pst->event = (Event) CKW_EVT_UEIDCHG_REQ;
732
733     return (SPstTsk(pst, mBuf));
734
735 } /* cmPkCkwUeIdChgReq */
736
737 /*
738 *
739 *    Fun:    cmPkCkwUeIdChgCfm
740 *
741 *    Desc:   pack the primitive RlcUiCkwUeIdChgCfm
742 *
743 *    Ret:    ROK  -ok
744 *
745 *    Notes:  None
746 *
747 *    File:   ckw.c
748 *
749 */
750 #ifdef ANSI
751 S16 cmPkCkwUeIdChgCfm
752 (
753 Pst               *pst,
754 SuId              suId,
755 uint32_t               transId,
756 CkwUeInfo         *ueInfo,
757 CmStatus          status
758 )
759 #else
760 S16 cmPkCkwUeIdChgCfm(pst, suId, transId, ueInfo, status)
761 Pst               *pst;
762 SuId              suId;
763 uint32_t               transId;
764 CkwUeInfo         *ueInfo;
765 CmStatus          status;
766 #endif
767 {
768     S16    ret1;
769     Buffer *mBuf = NULLP;
770
771
772     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
773     {
774 #if (ERRCLASS & ERRCLS_ADD_RES)
775        if(ret1 != ROK)
776        {
777           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
778                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
779                (ErrVal)ECKW021, (ErrVal)0, "SGetMsg() failed");
780        }
781 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
782
783        return (ret1);
784     }
785     
786     CMCHKPK(cmPkCmStatus, &status, mBuf); 
787     CMCHKPK(cmPkCkwUeInfo, ueInfo, mBuf);
788     if (SPutSBuf(pst->region, pst->pool, (Data *)ueInfo,
789              sizeof(CkwUeInfo)) != ROK)
790     {
791        SPutMsg(mBuf);
792        return RFAILED;
793     }
794     CMCHKPKLOG(oduUnpackUInt32, transId, mBuf, ECKW022, pst);
795     CMCHKPKLOG(SPkS16, suId, mBuf, ECKW023, pst);
796     pst->event = (Event) CKW_EVT_UEIDCHG_CFM;
797
798     return (SPstTsk(pst, mBuf));
799
800 } /* cmPkCkwUeIdChgCfm */
801
802
803 /******************************************************************************
804  *                            UNPACK FUNCTIONS
805  *****************************************************************************/
806 \f
807 /*
808 *
809 *    Fun:    cmUnpkCkwBndReq
810 *
811 *    Desc:    unpack the primitive CkwBndReq
812 *
813 *    Ret:    ROK  -ok
814 *
815 *    Notes:    None
816 *
817 *    File:     ckw.c
818 *
819 */
820 #ifdef ANSI
821 S16 cmUnpkCkwBndReq
822 (
823 CkwBndReq      func,
824 Pst            *pst,
825 Buffer         *mBuf
826 )
827 #else
828 S16 cmUnpkCkwBndReq(func, pst, mBuf)
829 CkwBndReq      func;
830 Pst            *pst;
831 Buffer         *mBuf;
832 #endif
833 {
834     SuId       suId = 0;
835     SpId       spId = 0;
836     
837
838     CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, ECKW024, pst);
839     CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, ECKW025, pst);
840     SPutMsg(mBuf);
841
842     return ((*func)(pst, suId, spId));
843 } /*end of function cmUnpkCkwBndReq*/
844 \f
845 /*
846 *
847 *    Fun:    cmUnpkCkwUbndReq
848 *
849 *    Desc:    unpack the primitive CkwUbndReq
850 *
851 *    Ret:    ROK  -ok
852 *
853 *    Notes:    None
854 *
855 *    File:     ckw.c
856 *
857 */
858 #ifdef ANSI
859 S16 cmUnpkCkwUbndReq
860 (
861 CkwUbndReq     func,
862 Pst            *pst,
863 Buffer         *mBuf
864 )
865 #else
866 S16 cmUnpkCkwUbndReq(func, pst, mBuf)
867 CkwUbndReq     func;
868 Pst            *pst;
869 Buffer         *mBuf;
870 #endif
871 {
872     SpId       spId = 0;
873     Reason     reason = 0;
874     
875
876     CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, ECKW026, pst);
877     CMCHKUNPKLOG(SUnpkS16, &reason, mBuf, ECKW027, pst);
878     SPutMsg(mBuf);
879     return ((*func)(pst, spId, reason));
880 } /*end of function cmUnpkCkwUbndReq*/
881 \f
882 /*
883 *
884 *    Fun:    cmUnpkCkwBndCfm
885 *
886 *    Desc:    unpack the primitive CkwBndCfm
887 *
888 *    Ret:    ROK  -ok
889 *
890 *    Notes:    None
891 *
892 *    File:     ckw.c
893 *
894 */
895 #ifdef ANSI
896 S16 cmUnpkCkwBndCfm
897 (
898 CkwBndCfm      func,
899 Pst            *pst,
900 Buffer         *mBuf
901 )
902 #else
903 S16 cmUnpkCkwBndCfm(func, pst, mBuf)
904 CkwBndCfm      func;
905 Pst            *pst;
906 Buffer         *mBuf;
907 #endif
908 {
909     SuId       suId = 0;
910     uint8_t         status = 0;
911     
912
913     CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, ECKW028, pst);
914     CMCHKUNPKLOG(oduPackUInt8, &status, mBuf, ECKW029, pst);
915     SPutMsg(mBuf);
916
917     return ((*func)(pst, suId, status));
918 } /*end of function cmUnpkCkwBndCfm*/
919
920 \f
921 /*
922 *
923 *    Fun:    cmUnpkRlcTmInfo
924 *
925 *    Desc:    pack the structure RlcTmInfo
926 *
927 *    Ret:    ROK  -ok
928 *
929 *    Notes:    None
930 *
931 *    File:     ckw.c
932 *
933 */
934 #ifdef ANSI
935 S16 cmUnpkRlcTmInfo
936 (
937 RlcTmInfo      *param,
938 Buffer         *mBuf
939 )
940 #else
941 S16 cmUnpkRlcTmInfo(param, mBuf)
942 RlcTmInfo      *param;
943 Buffer         *mBuf;
944 #endif
945 {
946
947     CMCHKUNPK(oduPackUInt32, &(param->dl.buffSize), mBuf);
948
949     return ROK;
950 } /* cmUnpkRlcTmInfo */
951
952 \f
953 /*
954 *
955 *    Fun:    cmUnpkRlcUmInfo
956 *
957 *    Desc:    pack the structure RlcUmInfo
958 *
959 *    Ret:    ROK  -ok
960 *
961 *    Notes:    None
962 *
963 *    File:     ckw.c
964 *
965 */
966 #ifdef ANSI
967 S16 cmUnpkRlcUmInfo
968 (
969 RlcEntCfgInfo  *param,
970 Buffer         *mBuf
971 )
972 #else
973 S16 cmUnpkRlcUmInfo(param, mBuf)
974 RlcEntCfgInfo  *param;
975 Buffer         *mBuf;
976 #endif
977 {
978
979     switch(param->dir)
980     {
981        case CKW_CFG_DIR_DL:
982           {
983              CMCHKUNPK(oduPackUInt8, &(param->m.umInfo.dl.snLen), mBuf);
984              break;
985           }
986        case CKW_CFG_DIR_UL:
987           {
988              CMCHKUNPK(oduPackUInt8, &(param->m.umInfo.ul.snLen), mBuf);
989              CMCHKUNPK(oduPackUInt8, &(param->m.umInfo.ul.reOrdTmr), mBuf);
990              break;
991           }
992        /* Patch ckw_c_001.main_3 */
993        case CKW_CFG_DIR_BOTH:
994           {
995              CMCHKUNPK(oduPackUInt8, &(param->m.umInfo.ul.snLen), mBuf);
996              CMCHKUNPK(oduPackUInt8, &(param->m.umInfo.ul.reOrdTmr), mBuf);
997              CMCHKUNPK(oduPackUInt8, &(param->m.umInfo.dl.snLen), mBuf);
998              break;
999           }
1000     }
1001
1002     return ROK;
1003 } /* cmUnpkRlcUmInfo */
1004
1005 \f
1006 /*
1007 *
1008 *    Fun:    cmUnpkRlcAmInfo
1009 *
1010 *    Desc:    pack the structure RlcAmInfo
1011 *
1012 *    Ret:    ROK  -ok
1013 *
1014 *    Notes:    None
1015 *
1016 *    File:     ckw.c
1017 *
1018 */
1019 #ifdef ANSI
1020 S16 cmUnpkRlcAmInfo
1021 (
1022 RlcAmInfo      *param,
1023 Buffer         *mBuf
1024 )
1025 #else
1026 S16 cmUnpkRlcAmInfo(param, mBuf)
1027 RlcAmInfo      *param;
1028 Buffer         *mBuf;
1029 #endif
1030 {
1031
1032     /* DOWN LINK */
1033     CMCHKUNPK(oduPackUInt8, &(param->dl.snLen), mBuf);
1034     CMCHKUNPK(oduPackUInt16, &(param->dl.pollRetxTmr), mBuf);
1035     CMCHKUNPK(SUnpkS16, &(param->dl.pollPdu), mBuf);
1036     CMCHKUNPK(SUnpkS32, &(param->dl.pollByte), mBuf);
1037     CMCHKUNPK(oduPackUInt8, &(param->dl.maxRetx), mBuf);
1038
1039     /* UP LINK */
1040     CMCHKUNPK(oduPackUInt8, &(param->ul.snLen), mBuf);
1041     CMCHKUNPK(oduPackUInt16, &(param->ul.staProhTmr), mBuf);
1042     CMCHKUNPK(oduPackUInt8, &(param->ul.reOrdTmr), mBuf);
1043
1044     return ROK;
1045 } /* cmUnpkRlcAmInfo */
1046
1047 \f
1048 /*
1049 *
1050 *    Fun:    cmUnpkCkwLChInfo
1051 *
1052 *    Desc:    pack the structure CkwLChInfo
1053 *
1054 *    Ret:    ROK  -ok
1055 *
1056 *    Notes:    None
1057 *
1058 *    File:     ckw.c
1059 *
1060 */
1061 #ifdef ANSI
1062 S16 cmUnpkCkwLChInfo
1063 (
1064 CkwLChInfo     *param,
1065 Buffer         *mBuf
1066 )
1067 #else
1068 S16 cmUnpkCkwLChInfo(param, mBuf)
1069 CkwLChInfo     *param;
1070 Buffer         *mBuf;
1071 #endif
1072 {
1073
1074     CMCHKUNPK(oduPackUInt8, &(param->lChId), mBuf);
1075     CMCHKUNPK(oduPackUInt8, &(param->type), mBuf);
1076
1077     return ROK;
1078 } /* cmUnpkCkwLChInfo */
1079
1080 \f
1081 /*
1082 *
1083 *    Fun:    cmUnpkRlcEntCfgCfmInfo
1084 *
1085 *    Desc:    unpack the structure RlcEntCfgInfo
1086 *
1087 *    Ret:    ROK  -ok
1088 *
1089 *    Notes:    None
1090 *
1091 *    File:     ckw.c
1092 *
1093 */
1094 #ifdef ANSI
1095 S16 cmUnpkRlcEntCfgCfmInfo
1096 (
1097 RlcEntCfgCfmInfo  *param,
1098 Buffer            *mBuf
1099 )
1100 #else
1101 S16 cmUnpkRlcEntCfgCfmInfo(param, mBuf)
1102 RlcEntCfgCfmInfo  *param;
1103 Buffer            *mBuf;
1104 #endif
1105 {
1106
1107     CMCHKUNPK(oduPackUInt8, &(param->rbId), mBuf);
1108     CMCHKUNPK(oduPackUInt8, &(param->rbType), mBuf);
1109     CMCHKUNPK(cmUnpkCmStatus, &(param->status), mBuf);
1110
1111     return ROK;
1112 } /* cmUnpkRlcEntCfgCfmInfo */
1113
1114 \f
1115 /*
1116 *
1117 *    Fun:    cmUnpkRlcCfgCfmInfo
1118 *
1119 *    Desc:    pack the structure RlcCfgCfmInfo
1120 *
1121 *    Ret:    ROK  -ok
1122 *
1123 *    Notes:    None
1124 *
1125 *    File:     ckw.c
1126 *
1127 */
1128 #ifdef ANSI
1129 S16 cmUnpkRlcCfgCfmInfo
1130 (
1131 RlcCfgCfmInfo  *param,
1132 Pst            *pst,
1133 Buffer         *mBuf
1134 )
1135 #else
1136 S16 cmUnpkRlcCfgCfmInfo(param, pst, mBuf)
1137 RlcCfgCfmInfo  *param;
1138 Pst            *pst;
1139 Buffer         *mBuf;
1140 #endif
1141 {
1142     uint8_t         idx;
1143
1144
1145     CMCHKUNPKLOG(oduPackUInt32, &(param->transId), mBuf, ECKW030, pst);
1146     CMCHKUNPK(cmUnpkLteRnti, &(param->ueId), mBuf);
1147     CMCHKUNPK(cmUnpkLteCellId, &(param->cellId), mBuf);
1148     CMCHKUNPK(oduPackUInt8, &(param->numEnt), mBuf);
1149
1150     for (idx = 0; idx < param->numEnt; idx++)
1151     {
1152        CMCHKUNPK(cmUnpkRlcEntCfgCfmInfo, &(param->entCfgCfm[idx]), mBuf);
1153     }
1154
1155     return ROK;
1156 } /* cmUnpkRlcCfgCfmInfo */
1157
1158 \f
1159 /*
1160 *
1161 *    Fun:    cmUnpkRlcEntCfgInfo
1162 *
1163 *    Desc:    pack the structure RlcEntCfgCfmInfo
1164 *
1165 *    Ret:    ROK  -ok
1166 *
1167 *    Notes:    None
1168 *
1169 *    File:     ckw.c
1170 *
1171 */
1172 #ifdef ANSI
1173 S16 cmUnpkRlcEntCfgInfo
1174 (
1175 RlcEntCfgInfo  *param,
1176 Buffer         *mBuf
1177 )
1178 #else
1179 S16 cmUnpkRlcEntCfgInfo(param, mBuf)
1180 RlcEntCfgInfo  *param;
1181 Buffer         *mBuf;
1182 #endif
1183 {
1184
1185     CMCHKUNPK(oduPackUInt8, &(param->cfgType), mBuf);
1186     CMCHKUNPK(oduPackUInt8, &(param->rbId), mBuf);
1187     CMCHKUNPK(oduPackUInt8, &(param->rbType), mBuf);
1188     CMCHKUNPK(oduPackUInt8, &(param->qci), mBuf);
1189     CMCHKUNPK(cmUnpkLteRlcMode, &(param->entMode), mBuf);
1190     CMCHKUNPK(oduPackUInt8, &(param->dir), mBuf);
1191     CMCHKUNPK(SUnpkS16, &(param->discardTmr), mBuf);
1192 #ifdef TENB_MULT_CELL_SUPPRT
1193     CMCHKUNPK(SUnpkS16, &(param->rguSapId), mBuf);
1194 #endif
1195
1196     /* Logical Channel Information */
1197     switch(param->entMode)
1198     {
1199        case CM_LTE_MODE_TM:
1200           {
1201              CMCHKUNPK(cmUnpkCkwLChInfo, &(param->lCh[0]), mBuf);
1202              break;
1203           }
1204        /* ccpu00128195: Unpacking lCh[0] and lCh[1] for UM bearer as well */
1205        case CM_LTE_MODE_UM:
1206        case CM_LTE_MODE_AM:
1207           {
1208              CMCHKUNPK(cmUnpkCkwLChInfo, &(param->lCh[0]), mBuf);
1209              CMCHKUNPK(cmUnpkCkwLChInfo, &(param->lCh[1]), mBuf);
1210              break;
1211           }
1212     }
1213
1214     /* TM/UM/AM Info */
1215     switch(param->entMode)
1216     {
1217        case CM_LTE_MODE_TM:
1218           {
1219              CMCHKUNPK(cmUnpkRlcTmInfo, &(param->m.tmInfo), mBuf);
1220              break;
1221           }
1222        case CM_LTE_MODE_UM:
1223           {
1224              CMCHKUNPK(cmUnpkRlcUmInfo, param, mBuf);
1225              break;
1226           }
1227        case CM_LTE_MODE_AM:
1228           {
1229              CMCHKUNPK(cmUnpkRlcAmInfo, &(param->m.amInfo), mBuf);
1230              break;
1231           }
1232     }
1233
1234     return ROK;
1235 } /* cmUnpkRlcEntCfgInfo */
1236
1237 \f
1238 /*
1239 *
1240 *    Fun:    cmUnpkRlcCfgInfo
1241 *
1242 *    Desc:    unpack the structure RlcCfgInfo
1243 *
1244 *    Ret:    ROK  -ok
1245 *
1246 *    Notes:    None
1247 *
1248 *    File:     ckw.c
1249 *
1250 */
1251 #ifdef ANSI
1252 S16 cmUnpkRlcCfgInfo
1253 (
1254 RlcCfgInfo     *param,
1255 Pst            *pst,
1256 Buffer         *mBuf
1257 )
1258 #else
1259 S16 cmUnpkRlcCfgInfo(param, pst, mBuf)
1260 RlcCfgInfo     *param;
1261 Pst            *pst;
1262 Buffer         *mBuf;
1263 #endif
1264 {
1265     uint8_t         idx;
1266
1267
1268     CMCHKUNPKLOG(oduPackUInt32, &(param->transId), mBuf, ECKW031, pst);
1269     CMCHKUNPK(cmUnpkLteRnti, &(param->ueId), mBuf);
1270     CMCHKUNPK(cmUnpkLteCellId, &(param->cellId), mBuf);
1271     CMCHKUNPK(oduPackUInt8, &(param->numEnt), mBuf);
1272
1273     for (idx = 0; idx < param->numEnt; idx++)
1274     {
1275        CMCHKUNPKLOG(cmUnpkRlcEntCfgInfo,&(param->entCfg[idx]), mBuf, ECKW032, pst);
1276     }
1277
1278     return ROK;
1279 } /* cmUnpkRlcCfgInfo */
1280
1281 \f
1282 /*
1283 *
1284 *    Fun:    cmUnpkRlcCfgCfm
1285 *
1286 *    Desc:    unpack the primitive RlcUiRlcCfgCfm
1287 *
1288 *    Ret:    ROK  -ok
1289 *
1290 *    Notes:    None
1291 *
1292 *    File:     ckw.c
1293 *
1294 */
1295 #ifdef ANSI
1296 S16 cmUnpkRlcCfgCfm
1297 (
1298 RlcCfgCfm         func,
1299 Pst               *pst,
1300 Buffer            *mBuf
1301 )
1302 #else
1303 S16 cmUnpkRlcCfgCfm(func, pst, mBuf)
1304 RlcCfgCfm         func;
1305 Pst               *pst;
1306 Buffer            *mBuf;
1307 #endif
1308 {
1309     S16 ret1;
1310     SuId             suId = 0;
1311     RlcCfgCfmInfo    *cfgCfmInfo = NULLP;
1312     
1313
1314     if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&cfgCfmInfo,\
1315                 sizeof(RlcCfgCfmInfo))) != ROK)
1316     {
1317 #if (ERRCLASS & ERRCLS_ADD_RES)
1318        if(ret1 != ROK)
1319        {
1320           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1321                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1322                (ErrVal)ECKW035, (ErrVal)0, "SGetMsg() failed");
1323        }
1324 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1325        return (ret1);
1326     }
1327
1328     memset(cfgCfmInfo, 0, sizeof(RlcCfgCfmInfo));
1329
1330     CMCHKUNPK(SUnpkS16, &suId, mBuf);
1331
1332     switch(pst->selector)
1333     {
1334 #ifdef LCCKW
1335        case ODU_SELECTOR_LC:
1336        {
1337           ret1 = cmUnpkRlcCfgCfmInfo( (cfgCfmInfo), pst, mBuf);
1338 #if(ERRCLASS & ERRCLS_DEBUG)
1339           if(ret1 != ROK)
1340           {
1341              SPutMsg(mBuf);
1342              SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1343                    __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1344                   (ErrVal)ECKW036, (ErrVal)ret1, "Unpacking failure");
1345              return ( ret1 );
1346           }
1347 #endif /* ERRCLASS & ERRCLS_DEBUG */
1348           break;
1349        }
1350 #endif /* LCCKW */
1351     }
1352     SPutMsg(mBuf);
1353
1354     return ((*func)(pst, suId, cfgCfmInfo));
1355 } /* cmUnpkRlcCfgCfm */
1356
1357 /*
1358 *
1359 *    Fun:    cmUnpkCkwUeInfo
1360 *
1361 *    Desc:   Unpack the primitive KwUiCkwUeInfo
1362 *
1363 *    Ret:    ROK  -ok
1364 *
1365 *    Notes:  None
1366 *
1367 *    File:   ckw.c
1368 *
1369 */
1370 #ifdef ANSI
1371 S16 cmUnpkCkwUeInfo
1372 (
1373 CkwUeInfo *param,
1374 Buffer    *mBuf
1375 )
1376 #else
1377 S16 cmUnpkCkwUeInfo(param, mBuf)
1378 CkwUeInfo *param;
1379 Buffer    *mBuf;
1380 #endif
1381 {
1382
1383    CMCHKUNPK(cmUnpkLteRnti, &(param->ueId), mBuf);
1384    CMCHKUNPK(cmUnpkLteCellId, &(param->cellId), mBuf);
1385
1386    return ROK;
1387 }
1388
1389 /*
1390 *
1391 *    Fun:    cmUnpkCkwUeIdChgReq
1392 *
1393 *    Desc:    unpack the primitive RlcUiCkwUeIdChgReq
1394 *
1395 *    Ret:    ROK  -ok
1396 *
1397 *    Notes:    None
1398 *
1399 *    File:     ckw.c
1400 *
1401 */
1402 #ifdef ANSI
1403 S16 cmUnpkCkwUeIdChgReq
1404 (
1405 CkwUeIdChgReq     func,
1406 Pst               *pst,
1407 Buffer            *mBuf
1408 )
1409 #else
1410 S16 cmUnpkCkwUeIdChgReq(func, pst, mBuf)
1411 CkwUeIdChgReq     func;
1412 Pst               *pst;
1413 Buffer            *mBuf;
1414 #endif
1415 {
1416     S16       ret1;
1417     SpId      spId = 0;
1418     uint32_t       transId = 0;
1419     CkwUeInfo *ueInfo = NULLP;
1420     CkwUeInfo *newUeInfo = NULLP;
1421     
1422
1423
1424     CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1425     CMCHKUNPKLOG(oduPackUInt32, &transId, mBuf, ECKW037, pst);
1426
1427     if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&ueInfo,\
1428                 sizeof(CkwUeInfo))) != ROK)
1429     {
1430 #if (ERRCLASS & ERRCLS_ADD_RES)
1431       /*MBUF_FIXX*/
1432           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1433                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1434                (ErrVal)ECKW038, (ErrVal)0, "SGetMsg() failed");
1435       
1436 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1437        return (ret1);
1438     }
1439
1440     memset(ueInfo, 0, sizeof(CkwUeInfo));
1441
1442     ret1 = cmUnpkCkwUeInfo((ueInfo), mBuf);
1443 #if(ERRCLASS & ERRCLS_DEBUG)
1444     if(ret1 != ROK)
1445     {
1446        SPutMsg(mBuf);
1447        SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1448              __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1449              (ErrVal)ECKW039, (ErrVal)ret1, "Unpacking failure");
1450        return ( ret1 );
1451     }
1452 #endif /* ERRCLASS & ERRCLS_DEBUG */
1453
1454     if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&newUeInfo,\
1455                 sizeof(CkwUeInfo))) != ROK)
1456     {
1457 #if (ERRCLASS & ERRCLS_ADD_RES)
1458        /*MBUF_FIXX*/
1459           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1460                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1461                (ErrVal)ECKW040, (ErrVal)0, "SGetMsg() failed");
1462        
1463 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1464        return (ret1);
1465     }
1466
1467     memset(newUeInfo, 0, sizeof(CkwUeInfo));
1468
1469     ret1 = cmUnpkCkwUeInfo((newUeInfo), mBuf);
1470 #if(ERRCLASS & ERRCLS_DEBUG)
1471     if(ret1 != ROK)
1472     {
1473        SPutMsg(mBuf);
1474        SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1475              __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1476              (ErrVal)ECKW041, (ErrVal)ret1, "Unpacking failure");
1477        return ( ret1 );
1478     }
1479 #endif /* ERRCLASS & ERRCLS_DEBUG */
1480
1481     SPutMsg(mBuf);
1482
1483     return ((*func)(pst, spId, transId, ueInfo, newUeInfo));
1484
1485 } /* cmUnpkCkwUeIdChgReq */
1486
1487 /*
1488 *
1489 *    Fun:     cmUnpkCkwUeIdChgCfm
1490 *
1491 *    Desc:    unpack the primitive RlcUiCkwUeIdChgCfm
1492 *
1493 *    Ret:     ROK  -ok
1494 *
1495 *    Notes:   None
1496 *
1497 *    File:    ckw.c
1498 *
1499 */
1500 #ifdef ANSI
1501 S16 cmUnpkCkwUeIdChgCfm
1502 (
1503 CkwUeIdChgCfm     func,
1504 Pst               *pst,
1505 Buffer            *mBuf
1506 )
1507 #else
1508 S16 cmUnpkCkwUeIdChgCfm(func, pst, mBuf)
1509 CkwUeIdChgCfm     func;
1510 Pst               *pst;
1511 Buffer            *mBuf;
1512 #endif
1513 {
1514     S16       ret1;
1515     SuId      suId = 0;
1516     uint32_t       transId = 0;
1517     CkwUeInfo *ueInfo = NULLP;
1518     CmStatus  status;
1519     
1520
1521     memset(&status, 0, sizeof(CmStatus));
1522
1523     CMCHKUNPK(SUnpkS16, &suId, mBuf);
1524     CMCHKUNPKLOG(oduPackUInt32, &transId, mBuf, ECKW042, pst);
1525
1526     if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&ueInfo,\
1527                 sizeof(CkwUeInfo))) != ROK)
1528     {
1529 #if (ERRCLASS & ERRCLS_ADD_RES)
1530        if(ret1 != ROK)
1531        {
1532           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1533                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1534                (ErrVal)ECKW043, (ErrVal)0, "SGetMsg() failed");
1535        }
1536 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1537        return (ret1);
1538     }
1539
1540     memset(ueInfo, 0, sizeof(CkwUeInfo));
1541
1542     ret1 = cmUnpkCkwUeInfo((ueInfo), mBuf);
1543 #if(ERRCLASS & ERRCLS_DEBUG)
1544     if(ret1 != ROK)
1545     {
1546        SPutMsg(mBuf);
1547        SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1548              __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1549              (ErrVal)ECKW044, (ErrVal)ret1, "Unpacking failure");
1550        return ( ret1 );
1551     }
1552 #endif /* ERRCLASS & ERRCLS_DEBUG */
1553
1554     CMCHKUNPK(cmUnpkCmStatus, &status, mBuf);
1555
1556     SPutMsg(mBuf);
1557
1558     return ((*func)(pst, suId, transId, ueInfo, status));
1559
1560 } /* cmUnpkCkwUeIdChgCfm */
1561
1562 #endif /* LCCKW */
1563 #ifdef __cplusplus
1564 }
1565 #endif /* __cplusplus */
1566
1567 \f  
1568 /**********************************************************************
1569          End of file
1570 **********************************************************************/