cu link failure fix
[o-du/l2.git] / src / 5gnrrlc / kw_udx.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:    UDX RRC Control Interface
22     
23         Type:    C file
24   
25         Desc:    This file Contains the packing and unpacking functions for
26                  UDX Interface
27  
28         File:    kw_udx.c
29   
30 *********************************************************************21*/
31
32 #include "envopt.h"        /* environment options */
33 #include "envdep.h"        /* environment dependent */
34 #include "envind.h"        /* environment independent */
35
36 #include "gen.h"           /* general */
37 #include "ssi.h"           /* system services */
38 #include "cm5.h"           /* common timer defines */
39 #include "cm_tkns.h"       /* common tokens defines */
40 #include "cm_mblk.h"       /* common memory allocation library defines */
41 #include "cm_llist.h"      /* common link list  defines  */
42 #include "cm_hash.h"       /* common hash list  defines */
43 #include "cm_lte.h"        /* common LTE defines */
44 #include "lkw.h"
45 #include "kw_udx.h"           /* UDX defines */
46
47 /* extern (.x) include files */
48 #include "gen.x"           /* general */
49 #include "ssi.x"           /* system services */
50
51 #include "cm5.x"           /* common timer library */
52 #include "cm_tkns.x"       /* common tokens */
53 #include "cm_mblk.x"       /* common memory allocation */
54 #include "cm_llist.x"      /* common link list */
55 #include "cm_hash.x"       /* common hash list */
56 #include "cm_lte.x"        /* common LTE includes */
57 #include "cm_lib.x"        /* common memory allocation library */
58 #include "kw.h"
59 #include "lkw.x"
60 #include "kw_udx.x"
61 #include <stdlib.h>
62 \f
63
64 #ifdef LCUDX
65
66 /*
67 *
68 *    Fun:    cmPkUdxBndReq
69 *
70 *    Desc:    pack the primitive UdxBndReq
71 *
72 *    Ret:    ROK  -ok
73 *
74 *    Notes:    None
75 *
76 *    File:     ckw.c
77 *
78 */
79 #ifdef ANSI
80 PRIVATE S16 cmUnpkUdxStruct
81 (
82 Buffer *srcMBuf,
83 U32  offset,
84 U8     *dstBuf,
85 U32    size
86 )
87 #else
88 PRIVATE S16 cmUnpkUdxStruct(dstMBuf,srcBuf,size)
89 Buffer *srcMBuf;
90 U32  offset;
91 U8     *dstBuf;
92 MsgLen    size;
93 #endif
94 {
95     MsgLen tmpLen;
96
97     TRC3(cmUnpkUdxStruct)
98     RETVALUE(SCpyMsgFix(srcMBuf,offset,size,dstBuf,&tmpLen));
99
100 } /*end of function cmPkUdxBndReq*/
101
102 /*
103 *
104 *    Fun:    cmPkUdxBndReq
105 *
106 *    Desc:    pack the primitive UdxBndReq
107 *
108 *    Ret:    ROK  -ok
109 *
110 *    Notes:    None
111 *
112 *    File:     ckw.c
113 *
114 */
115 #ifdef ANSI
116 PRIVATE S16 cmPkUdxStruct
117 (
118 U8     *srcBuf,
119 MsgLen    size,
120 Buffer *dstMBuf
121 )
122 #else
123 PRIVATE S16 cmPkUdxStruct(dstMBuf,srcBuf,size)
124 U8     *srcBuf;
125 MsgLen    size;
126 Buffer *dstMBuf;
127 #endif
128 {
129
130     TRC3(cmPkUdxStruct)
131     RETVALUE(SAddPstMsgMult(srcBuf,size,dstMBuf));
132
133 } /*end of function cmPkUdxBndReq*/
134 /*
135 *
136 *    Fun:    cmPkUdxBndReq
137 *
138 *    Desc:    pack the primitive UdxBndReq
139 *
140 *    Ret:    ROK  -ok
141 *
142 *    Notes:    None
143 *
144 *    File:     ckw.c
145 *
146 */
147 #ifdef ANSI
148 PUBLIC S16 cmPkUdxBndReq
149 (
150 Pst *pst,
151 SuId suId,
152 SpId spId
153 )
154 #else
155 PUBLIC S16 cmPkUdxBndReq(pst, suId, spId)
156 Pst *pst;
157 SuId suId;
158 SpId spId;
159 #endif
160 {
161     S16 ret1;
162     Buffer *mBuf;
163     mBuf = NULLP;
164     TRC3(cmPkUdxBndReq)
165
166     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
167     {
168 #if (ERRCLASS & ERRCLS_ADD_RES)
169        if(ret1 != ROK)
170        {
171           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
172                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
173                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
174        }
175 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
176        RETVALUE(ret1);
177     }
178     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
179     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
180     pst->event = (Event) UDX_EVT_BND_REQ;
181
182     RETVALUE(SPstTsk(pst,mBuf));
183 } /*end of function cmPkUdxBndReq*/
184 \f
185 /*
186 *
187 *    Fun:    cmPkUdxUbndReq
188 *
189 *    Desc:    pack the primitive UdxUbndReq
190 *
191 *    Ret:    ROK  -ok
192 *
193 *    Notes:    None
194 *
195 *    File:     ckw.c
196 *
197 */
198 #ifdef ANSI
199 PUBLIC S16 cmPkUdxUbndReq
200 (
201 Pst *pst,
202 SpId spId,
203 Reason reason
204 )
205 #else
206 PUBLIC S16 cmPkUdxUbndReq(pst, spId, reason)
207 Pst *pst;
208 SpId spId;
209 Reason reason;
210 #endif
211 {
212     S16 ret1;
213     Buffer *mBuf;
214     mBuf = NULLP;
215     TRC3(cmPkUdxUbndReq)
216
217     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
218     {
219 #if (ERRCLASS & ERRCLS_ADD_RES)
220        if(ret1 != ROK)
221        {
222           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
223                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
224                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
225        }
226 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
227        RETVALUE(ret1);
228     }
229     CMCHKPKLOG(SPkS16, reason, mBuf, EUDXXXX, pst);
230     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
231     pst->event = (Event) UDX_EVT_UBND_REQ;
232
233     RETVALUE(SPstTsk(pst,mBuf));
234 } /*end of function cmPkUdxUbndReq*/
235 \f
236 /*
237 *
238 *    Fun:    cmPkUdxBndCfm
239 *
240 *    Desc:    pack the primitive UdxBndCfm
241 *
242 *    Ret:    ROK  -ok
243 *
244 *    Notes:    None
245 *
246 *    File:     ckw.c
247 *
248 */
249 #ifdef ANSI
250 PUBLIC S16 cmPkUdxBndCfm
251 (
252 Pst *pst,
253 SuId suId,
254 U8 status
255 )
256 #else
257 PUBLIC S16 cmPkUdxBndCfm(pst, suId, status)
258 Pst *pst;
259 SuId suId;
260 U8 status;
261 #endif
262 {
263     S16 ret1;
264     Buffer *mBuf;
265     mBuf = NULLP;
266     TRC3(cmPkUdxBndCfm)
267
268     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
269     {
270 #if (ERRCLASS & ERRCLS_ADD_RES)
271        if(ret1 != ROK)
272        {
273           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
274                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
275                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
276        }
277
278 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
279        RETVALUE(ret1);
280     }
281     CMCHKPKLOG(SPkU8, status, mBuf, EUDXXXX, pst);
282     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
283     pst->event = (Event) UDX_EVT_BND_CFM;
284
285     RETVALUE(SPstTsk(pst,mBuf));
286 } /*end of function cmPkUdxBndCfm*/
287
288 \f
289 /*
290 *
291 *    Fun:    cmPkUdxCfgReq
292 *
293 *    Desc:    pack the primitive KwUiUdxCfgReq
294 *
295 *    Ret:    ROK  -ok
296 *
297 *    Notes:    None
298 *
299 *    File:     ckw.c
300 *
301 */
302 #ifdef ANSI
303 PUBLIC S16 cmPkUdxCfgReq
304 (
305 Pst               *pst,
306 SpId              spId,
307 CkwCfgInfo        *cfgInfo
308 )
309 #else
310 PUBLIC S16 cmPkUdxCfgReq(pst, spId, cfgInfo)
311 Pst               *pst;
312 SpId              spId;
313 CkwCfgInfo        *cfgInfo;
314 #endif
315 {
316     S16 ret1;
317     Buffer *mBuf;
318     mBuf = NULLP;
319     TRC3(cmPkUdxCfgReq)
320
321     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
322     {
323 #if (ERRCLASS & ERRCLS_ADD_RES)
324        if(ret1 != ROK)
325        {
326           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
327                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
328                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
329        }
330 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
331        RETVALUE(ret1);
332     }
333
334     switch(pst->selector)
335     {
336 #ifdef LCUDX
337        case UDX_SEL_LC:
338           {
339              cmPkUdxStruct((U8 *)cfgInfo, sizeof(CkwCfgInfo),mBuf);
340              /* Need Not free CfgInfo here as it is stored 
341                 in UL */
342              break;
343           }
344         case UDX_SEL_LWLC:
345           {
346              CMCHKPKLOG(cmPkPtr,(PTR)cfgInfo,mBuf,EUDXXXX,pst);
347              break;
348           }
349 #endif /* LCUDX */
350     }
351
352     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
353     pst->event = (Event) UDX_EVT_CFG_REQ;
354
355     RETVALUE(SPstTsk(pst,mBuf));
356 } /* cmPkUdxCfgReq */
357
358 \f
359 /*
360 *
361 *    Fun:    cmPkUdxCfgCfm
362 *
363 *    Desc:    pack the primitive KwUiUdxCfgCfm
364 *
365 *    Ret:    ROK  -ok
366 *
367 *    Notes:    None
368 *
369 *    File:     ckw.c
370 *
371 */
372 #ifdef ANSI
373 PUBLIC S16 cmPkUdxCfgCfm
374 (
375 Pst               *pst,
376 SuId              suId,
377 CkwCfgCfmInfo     *cfgCfmInfo
378 )
379 #else
380 PUBLIC S16 cmPkUdxCfgCfm(pst, suId, cfgCfmInfo)
381 Pst               *pst;
382 SuId              suId;
383 CkwCfgCfmInfo     *cfgCfmInfo;
384 #endif
385 {
386     S16 ret1;
387     Buffer *mBuf;
388     mBuf = NULLP;
389     TRC3(cmPkUdxCfgCfm)
390
391     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
392     {
393 #if (ERRCLASS & ERRCLS_ADD_RES)
394        if(ret1 != ROK)
395        {
396           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
397                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
398                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
399        }
400 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
401        RETVALUE(ret1);
402     }
403
404     switch(pst->selector)
405     {
406 #ifdef LCUDX
407        case UDX_SEL_LC:
408           {
409              cmPkUdxStruct((U8 *)cfgCfmInfo, sizeof(CkwCfgCfmInfo),mBuf);
410              /* Need to free the cfgCfmInfo here as it is allocated 
411                                         buffer call SPutStaticBuffer */
412              SPutStaticBuffer(pst->region,pst->pool,(Data *) cfgCfmInfo,
413                           sizeof(CkwCfgCfmInfo),0);
414              break;
415           }
416         case UDX_SEL_LWLC:
417           {
418              CMCHKPKLOG(cmPkPtr,(PTR)cfgCfmInfo,mBuf,EUDXXXX,pst);
419              break;
420           }
421 #endif /* LCUDX */
422     }
423
424     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
425     pst->event = (Event) UDX_EVT_CFG_CFM;
426
427     RETVALUE(SPstTsk(pst,mBuf));
428 } /* cmPkUdxCfgCfm */
429
430
431 /*
432 *
433 *    Fun:    cmPkUdxUeIdChgReq
434 *
435 *    Desc:   pack the primitive KwUiUdxUeIdChgReq
436 *
437 *    Ret:    ROK  -ok
438 *
439 *    Notes:  None
440 *
441 *    File:   ckw.c
442 *
443 */
444 #ifdef ANSI
445 PUBLIC S16 cmPkUdxUeIdChgReq
446 (
447 Pst               *pst,
448 SpId              spId,
449 U32               transId,
450 CkwUeInfo         *ueInfo,
451 CkwUeInfo         *newUeInfo
452 )
453 #else
454 PUBLIC S16 cmPkUdxUeIdChgReq(pst, spId, transId, ueInfo, newUeInfo)
455 Pst               *pst;
456 SpId              spId;
457 U32               transId;
458 CkwUeInfo         *ueInfo;
459 CkwUeInfo         *newUeInfo;
460 #endif
461 {
462     S16    ret1;
463     Buffer *mBuf = NULLP;
464
465     TRC3(cmPkUdxUeIdChgReq)
466
467     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
468     {
469 #if (ERRCLASS & ERRCLS_ADD_RES)
470        if(ret1 != ROK)
471        {
472           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
473                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
474                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
475        }
476 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
477
478        RETVALUE(ret1);
479     }
480
481     switch(pst->selector)
482     {
483 #ifdef LCUDX
484        case UDX_SEL_LC:
485        {
486             cmPkUdxStruct((U8 *)newUeInfo, sizeof(CkwUeInfo),mBuf);
487             cmPkUdxStruct((U8 *)ueInfo, sizeof(CkwUeInfo),mBuf);
488             /* No need to free ueInfo here as it is stored */
489             break;
490        }
491        case UDX_SEL_LWLC:
492           {
493              CMCHKPKLOG(cmPkPtr,(PTR)newUeInfo,mBuf,EUDXXXX,pst);
494              CMCHKPKLOG(cmPkPtr,(PTR)ueInfo,mBuf,EUDXXXX,pst);
495              break;
496           }
497        default:
498        {
499           printf("cmPkUdxUeIdChgReq()- selector =%d not supported \n", pst->selector);
500           exit(1);
501        }
502 #endif
503     }
504     CMCHKPKLOG(SPkU32, transId, mBuf, EUDXXXX, pst);
505     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
506     pst->event = (Event) UDX_EVT_UEIDCHG_REQ;
507
508     RETVALUE(SPstTsk(pst, mBuf));
509
510 } /* cmPkUdxUeIdChgReq */
511
512 /*
513 *
514 *    Fun:    cmPkUdxUeIdChgCfm
515 *
516 *    Desc:   pack the primitive KwUiUdxUeIdChgCfm
517 *
518 *    Ret:    ROK  -ok
519 *
520 *    Notes:  None
521 *
522 *    File:   ckw.c
523 *
524 */
525 #ifdef ANSI
526 PUBLIC S16 cmPkUdxUeIdChgCfm
527 (
528 Pst               *pst,
529 SuId              suId,
530 U32               transId,
531 CmStatus          status
532 )
533 #else
534 PUBLIC S16 cmPkUdxUeIdChgCfm(pst, suId, transId, status)
535 Pst               *pst;
536 SuId              suId;
537 U32               transId;
538 CmStatus          status;
539 #endif
540 {
541     S16    ret1;
542     Buffer *mBuf = NULLP;
543     TRC3(cmPkUdxUeIdChgCfm)
544
545     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
546     {
547 #if (ERRCLASS & ERRCLS_ADD_RES)
548        if(ret1 != ROK)
549        {
550           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
551                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
552                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
553        }
554 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
555
556        RETVALUE(ret1);
557     }
558     
559     CMCHKPK(cmPkCmStatus, &status, mBuf); 
560     CMCHKPKLOG(SPkU32, transId, mBuf, EUDXXXX, pst);
561     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
562     pst->event = (Event) UDX_EVT_UEIDCHG_CFM;
563
564     RETVALUE(SPstTsk(pst, mBuf));
565
566 } /* cmPkUdxUeIdChgCfm */
567
568 /*
569 *
570 *    Fun:    cmPkUdxStaUpdCfm
571 *
572 *    Desc:   pack the primitive KwUiUdxUeIdChgCfm
573 *
574 *    Ret:    ROK  -ok
575 *
576 *    Notes:  None
577 *
578 *    File:   ckw.c
579 *
580 */
581 #ifdef ANSI
582 PUBLIC S16 cmPkUdxStaUpdCfm
583 (
584 Pst               *pst,
585 SuId              suId,
586 CmLteRlcId        *rlcId,
587 KwUdxBufLst       *pStaPdu
588 )
589 #else
590 PUBLIC S16 cmPkUdxStaUpdCfm(pst, suId, rlcId,pStaPdu)
591 Pst               *pst;
592 SuId              suId;
593 CmLteRlcId        *rlcId;
594 KwUdxBufLst       *pStaPdu;
595 #endif
596 {
597     S16    ret1;
598     Buffer *mBuf = NULLP;
599
600     TRC3(cmPkUdxStaUpdCfm)
601
602     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
603     {
604 #if (ERRCLASS & ERRCLS_ADD_RES)
605        if(ret1 != ROK)
606        {
607           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
608                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
609                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
610        }
611 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
612
613        RETVALUE(ret1);
614     }
615     
616     switch (pst->selector)
617     {
618        case UDX_SEL_LC:
619        {
620          cmPkUdxStruct((U8 *)pStaPdu, sizeof(KwUdxBufLst),mBuf);
621          cmPkUdxStruct((U8 *)rlcId, sizeof(CmLteRlcId),mBuf);
622          break;
623        }
624        case UDX_SEL_LWLC:
625        {
626          CMCHKPK(cmPkPtr,(PTR) pStaPdu, mBuf);
627          CMCHKPK(cmPkPtr,(PTR) rlcId, mBuf); 
628          break;
629        }
630     }
631     CMCHKPKLOG(SPkS16, suId, mBuf, EUDXXXX, pst);
632     pst->event = (Event) UDX_EVT_STA_UPD_CFM;
633
634     RETVALUE(SPstTsk(pst, mBuf));
635
636 } /* cmPkUdxStaUpdCfm */
637
638 /*
639 *
640 *    Fun:    cmPkUdxStaProhTmrStart
641 *
642 *    Desc:   pack the primitive
643 *
644 *    Ret:    ROK  -ok
645 *
646 *    Notes:  None
647 *
648 *    File:   Kw_udx.c
649 *
650 */
651 #ifdef ANSI
652 PUBLIC S16 cmPkUdxStaProhTmrStart
653 (
654 Pst               *pst,
655 SpId              spId,
656 CmLteRlcId        *rlcId
657 )
658 #else
659 PUBLIC S16 cmPkUdxStaProhTmrStart(pst, suId, rlcId)
660 Pst               *pst;
661 SpId              spId;
662 CmLteRlcId        *rlcId;
663 #endif
664 {
665     S16    ret1;
666     Buffer *mBuf = NULLP;
667
668     TRC3(cmPkUdxStaProhTmrStart)
669
670     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
671     {
672 #if (ERRCLASS & ERRCLS_ADD_RES)
673        if(ret1 != ROK)
674        {
675           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
676                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
677                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
678        }
679 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
680
681        RETVALUE(ret1);
682     }
683     
684     switch (pst->selector)
685     {
686        case UDX_SEL_LC:
687        {
688          cmPkUdxStruct((U8 *)rlcId, sizeof(CmLteRlcId),mBuf);
689          break;
690        }
691        case UDX_SEL_LWLC:
692        {
693          CMCHKPK(cmPkPtr,(PTR) rlcId, mBuf); 
694          break;
695        }
696     }
697     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
698     pst->event = (Event) UDX_EVT_STA_PHBT_TMR_START;
699
700     RETVALUE(SPstTsk(pst, mBuf));
701
702 } /* cmPkUdxStaProhTmrStart */
703
704 /*
705 *
706 *    Fun:    cmPkUdxStaUpdReq
707 *
708 *    Desc:   pack the primitive KwUiUdxUeIdChgCfm
709 *
710 *    Ret:    ROK  -ok
711 *
712 *    Notes:  None
713 *
714 *    File:   ckw.c
715 *
716 */
717 #ifdef ANSI
718 PUBLIC S16 cmPkUdxStaUpdReq
719 (
720 Pst               *pst,
721 SpId              spId,
722 CmLteRlcId        *rlcId,
723 KwUdxStaPdu      *pStaPdu
724 )
725 #else
726 PUBLIC S16 cmPkUdxStaUpdReq(pst, suId, rlcId,pStaPdu)
727 Pst               *pst;
728 SpId              spId;
729 CmLteRlcId        *rlcId;
730 KwUdxStaPdu       *pStaPdu;
731 #endif
732 {
733     S16    ret1;
734     Buffer *mBuf = NULLP;
735
736     TRC3(cmPkUdxStaUpdReq)
737
738     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
739     {
740 #if (ERRCLASS & ERRCLS_ADD_RES)
741        if(ret1 != ROK)
742        {
743           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
744                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
745                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
746        }
747 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
748
749        RETVALUE(ret1);
750     }
751     
752     switch (pst->selector)
753     {
754        case UDX_SEL_LC:
755        {
756          cmPkUdxStruct((U8 *)pStaPdu, sizeof(KwUdxStaPdu),mBuf);
757          cmPkUdxStruct((U8 *)rlcId, sizeof(CmLteRlcId),mBuf);
758          SPutStaticBuffer(pst->region,pst->pool,(Data *) pStaPdu,
759                           sizeof(KwUdxStaPdu),0);
760
761          break;
762        }
763        case UDX_SEL_LWLC:
764        {
765          CMCHKPK(cmPkPtr,(PTR) pStaPdu, mBuf);
766          CMCHKPK(cmPkPtr,(PTR) rlcId, mBuf); 
767          break;
768        }
769     }
770     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
771     pst->event = (Event) UDX_EVT_STA_UPD_REQ;
772
773     RETVALUE(SPstTsk(pst, mBuf));
774
775 } /* cmPkUdxStaUpdReq */
776
777 /*
778 *
779 *    Fun:    cmPkUdxStaPduReq
780 *
781 *    Desc:   pack the primitive KwUiUdxUeIdChgCfm
782 *
783 *    Ret:    ROK  -ok
784 *
785 *    Notes:  None
786 *
787 *    File:   ckw.c
788 *
789 */
790 #ifdef ANSI
791 PUBLIC S16 cmPkUdxStaPduReq
792 (
793 Pst               *pst,
794 SpId              spId,
795 CmLteRlcId        *rlcId,
796 KwUdxDlStaPdu     *pStaPdu
797 )
798 #else
799 PUBLIC S16 cmPkUdxStaPduReq(pst, suId, rlcId,pStaPdu)
800 Pst               *pst;
801 SpId              spId;
802 CmLteRlcId        *rlcId;
803 KwUdxDlStaPdu     *pStaPdu;
804 #endif
805 {
806     S16    ret1;
807     Buffer *mBuf = NULLP;
808
809     TRC3(cmPkUdxStaUpdReq)
810
811     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
812     {
813 #if (ERRCLASS & ERRCLS_ADD_RES)
814        if(ret1 != ROK)
815        {
816           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
817                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
818                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
819        }
820 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
821
822        RETVALUE(ret1);
823     }
824     
825     switch (pst->selector)
826     {
827        case UDX_SEL_LC:
828        {
829          cmPkUdxStruct((U8 *)pStaPdu, sizeof(KwUdxDlStaPdu),mBuf);
830          cmPkUdxStruct((U8 *)rlcId, sizeof(CmLteRlcId),mBuf);
831          /* Free status Pdu here for LC */
832          SPutStaticBuffer(pst->region,pst->pool,(Data *) pStaPdu,
833                           sizeof(KwUdxDlStaPdu),0);
834          break;
835        }
836        case UDX_SEL_LWLC:
837        {
838          CMCHKPK(cmPkPtr,(PTR) pStaPdu, mBuf);
839          CMCHKPK(cmPkPtr,(PTR) rlcId, mBuf); 
840          break;
841        }
842     }
843     CMCHKPKLOG(SPkS16, spId, mBuf, EUDXXXX, pst);
844     pst->event = (Event) UDX_EVT_STA_PDU_REQ;
845
846     RETVALUE(SPstTsk(pst, mBuf));
847
848 } /* cmPkUdxStaUpdReq */
849
850 #ifdef LTE_L2_MEAS
851 /*
852 *
853 *    Fun:    cmPkUdxL2MeasReq
854 *
855 *    Ret:    ROK  -ok
856 *
857 *    Notes:  None
858 *
859 *
860 */
861 #ifdef ANSI
862 PUBLIC S16 cmPkUdxL2MeasReq
863 (
864 Pst               *pst,
865 KwL2MeasReqEvt    *measReqEvt 
866 )
867 #else
868 PUBLIC S16 cmPkUdxL2MeasReq(pst, measReqEvt)
869 Pst               *pst;
870 KwL2MeasReqEvt    *measReqEvt; 
871 #endif
872 {
873     S16    ret1;
874     Buffer *mBuf = NULLP;
875
876     TRC3(cmPkUdxL2MeasReq)
877
878     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
879     {
880 #if (ERRCLASS & ERRCLS_ADD_RES)
881        if(ret1 != ROK)
882        {
883           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
884                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
885                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
886        }
887 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
888
889        RETVALUE(ret1);
890     }
891     
892     switch (pst->selector)
893     {
894        case UDX_SEL_LC:
895        {
896          cmPkUdxStruct((U8 *)measReqEvt, sizeof(KwL2MeasReqEvt),mBuf);
897          break;
898        }
899        case UDX_SEL_LWLC:
900        {
901          CMCHKPK(cmPkPtr,(PTR) measReqEvt, mBuf);
902          break;
903        }
904     }
905     pst->event = (Event) UDX_EVT_L2MEAS_REQ;
906
907     RETVALUE(SPstTsk(pst, mBuf));
908
909 } /* cmPkUdxStaUpdReq */
910
911 /*
912 *
913 *    Fun:    cmPkUdxL2MeasReq
914 *
915 *    Ret:    ROK  -ok
916 *
917 *    Notes:  None
918 *
919 *
920 */
921 #ifdef ANSI
922 PUBLIC S16 cmPkUdxL2MeasSendReq
923 (
924 Pst              *pst,
925 U8               measType
926 )
927 #else
928 PUBLIC S16 cmPkUdxL2MeasSendReq(pst, measReqEvt)
929 Pst               *pst;
930 U8                measType
931 #endif
932 {
933     S16    ret1;
934     Buffer *mBuf = NULLP;
935
936     TRC3(cmPkUdxL2MeasSendReq)
937
938     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
939     {
940 #if (ERRCLASS & ERRCLS_ADD_RES)
941        if(ret1 != ROK)
942        {
943           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
944                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
945                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
946        }
947 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
948
949        RETVALUE(ret1);
950     }
951     
952     switch (pst->selector)
953     {
954        case UDX_SEL_LC:
955        case UDX_SEL_LWLC:
956        {
957           CMCHKPKLOG(SPkU8, measType, mBuf, EUDXXXX, pst);
958           break;
959        }
960     }
961     pst->event = (Event) UDX_EVT_L2MEAS_SEND_REQ;
962
963     RETVALUE(SPstTsk(pst, mBuf));
964
965
966
967 /*
968 *
969 *    Fun:    cmPkUdxL2MeasStopReq
970 *
971 *    Ret:    ROK  -ok
972 *
973 *    Notes:  None
974 *
975 *
976 */
977 #ifdef ANSI
978 PUBLIC S16 cmPkUdxL2MeasStopReq
979 (
980 Pst              *pst,
981 U8               measType
982 )
983 #else
984 PUBLIC S16 cmPkUdxL2MeasStopReq(pst, measType)
985 Pst               *pst;
986 U8                measType
987 #endif
988 {
989     S16    ret1;
990     Buffer *mBuf = NULLP;
991
992     TRC3(cmPkUdxL2MeasStopReq)
993
994     if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK)
995     {
996 #if (ERRCLASS & ERRCLS_ADD_RES)
997        if(ret1 != ROK)
998        {
999           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1000                 __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1001                (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
1002        }
1003 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1004
1005        RETVALUE(ret1);
1006     }
1007     
1008     switch (pst->selector)
1009     {
1010        case UDX_SEL_LC:
1011        case UDX_SEL_LWLC:
1012        {
1013           CMCHKPKLOG(SPkU8, measType, mBuf, EUDXXXX, pst);
1014           break;
1015        }
1016     }
1017     pst->event = (Event) UDX_EVT_L2MEAS_STOP_REQ;
1018
1019     RETVALUE(SPstTsk(pst, mBuf));
1020
1021
1022 #endif
1023 /******************************************************************************
1024  *                            UNPACK FUNCTIONS
1025  *****************************************************************************/
1026 \f
1027 /*
1028 *
1029 *    Fun:    cmUnpkUdxBndReq
1030 *
1031 *    Desc:    unpack the primitive UdxBndReq
1032 *
1033 *    Ret:    ROK  -ok
1034 *
1035 *    Notes:    None
1036 *
1037 *    File:     ckw.c
1038 *
1039 */
1040 #ifdef ANSI
1041 PUBLIC S16 cmUnpkUdxBndReq
1042 (
1043 UdxBndReq      func,
1044 Pst            *pst,
1045 Buffer         *mBuf
1046 )
1047 #else
1048 PUBLIC S16 cmUnpkUdxBndReq(func, pst, mBuf)
1049 UdxBndReq      func;
1050 Pst            *pst;
1051 Buffer         *mBuf;
1052 #endif
1053 {
1054     SuId       suId = 0;
1055     SpId       spId = 0;
1056     
1057     TRC3(cmUnpkUdxBndReq)
1058
1059     CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EUDXXXX, pst);
1060     CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EUDXXXX, pst);
1061     SPutMsg(mBuf);
1062
1063     RETVALUE((*func)(pst, suId, spId));
1064 } /*end of function cmUnpkUdxBndReq*/
1065 \f
1066 /*
1067 *
1068 *    Fun:    cmUnpkUdxUbndReq
1069 *
1070 *    Desc:    unpack the primitive UdxUbndReq
1071 *
1072 *    Ret:    ROK  -ok
1073 *
1074 *    Notes:    None
1075 *
1076 *    File:     ckw.c
1077 *
1078 */
1079 #ifdef ANSI
1080 PUBLIC S16 cmUnpkUdxUbndReq
1081 (
1082 UdxUbndReq     func,
1083 Pst            *pst,
1084 Buffer         *mBuf
1085 )
1086 #else
1087 PUBLIC S16 cmUnpkUdxUbndReq(func, pst, mBuf)
1088 UdxUbndReq     func;
1089 Pst            *pst;
1090 Buffer         *mBuf;
1091 #endif
1092 {
1093     SpId       spId = 0;
1094     Reason     reason = 0;
1095     
1096     TRC3(cmUnpkUdxUbndReq)
1097
1098     CMCHKUNPKLOG(SUnpkS16, &spId, mBuf, EUDXXXX, pst);
1099     CMCHKUNPKLOG(SUnpkS16, &reason, mBuf, EUDXXXX, pst);
1100     SPutMsg(mBuf);
1101     RETVALUE((*func)(pst, spId, reason));
1102 } /*end of function cmUnpkUdxUbndReq*/
1103 \f
1104 /*
1105 *
1106 *    Fun:    cmUnpkUdxBndCfm
1107 *
1108 *    Desc:    unpack the primitive UdxBndCfm
1109 *
1110 *    Ret:    ROK  -ok
1111 *
1112 *    Notes:    None
1113 *
1114 *    File:     ckw.c
1115 *
1116 */
1117 #ifdef ANSI
1118 PUBLIC S16 cmUnpkUdxBndCfm
1119 (
1120 UdxBndCfm      func,
1121 Pst            *pst,
1122 Buffer         *mBuf
1123 )
1124 #else
1125 PUBLIC S16 cmUnpkUdxBndCfm(func, pst, mBuf)
1126 UdxBndCfm      func;
1127 Pst            *pst;
1128 Buffer         *mBuf;
1129 #endif
1130 {
1131     SuId       suId = 0;
1132     U8         status = 0;
1133     
1134     TRC3(cmUnpkUdxBndCfm)
1135
1136     CMCHKUNPKLOG(SUnpkS16, &suId, mBuf, EUDXXXX, pst);
1137     CMCHKUNPKLOG(SUnpkU8, &status, mBuf, EUDXXXX, pst);
1138     SPutMsg(mBuf);
1139
1140     RETVALUE((*func)(pst, suId, status));
1141 } /*end of function cmUnpkUdxBndCfm*/
1142
1143 \f
1144 /*
1145 *
1146 *    Fun:    cmUnpkUdxCfgReq
1147 *
1148 *    Desc:    unpack the primitive KwUiUdxCfgReq
1149 *
1150 *    Ret:    ROK  -ok
1151 *
1152 *    Notes:    None
1153 *
1154 *    File:     ckw.c
1155 *
1156 */
1157 #ifdef ANSI
1158 PUBLIC S16 cmUnpkUdxCfgReq
1159 (
1160 UdxCfgReq         func,
1161 Pst               *pst,
1162 Buffer            *mBuf
1163 )
1164 #else
1165 PUBLIC S16 cmUnpkUdxCfgReq(func, pst, mBuf)
1166 UdxCfgReq         func;
1167 Pst               *pst;
1168 Buffer            *mBuf;
1169 #endif
1170 {
1171 #if(ERRCLASS & ERRCLS_DEBUG)
1172     S16           ret1;
1173 #endif /* ERRCLASS & ERRCLS_DEBUG */
1174     SpId          spId = 0;
1175     CkwCfgInfo     tmpCfgInfo;
1176     CkwCfgInfo    *cfgInfo; /*stack Variable because it is not freed */
1177     
1178     TRC3(cmUnpkUdxCfgReq)
1179
1180     CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1181     switch(pst->selector)
1182     {
1183 #ifdef LCUDX
1184        case UDX_SEL_LC:
1185        {
1186 #if(ERRCLASS & ERRCLS_DEBUG)
1187           ret1 = cmUnpkUdxStruct(mBuf,0,(U8 *)&tmpCfgInfo,sizeof(CkwCfgInfo));
1188           if(ret1 != ROK)
1189           {
1190              SPutMsg(mBuf);
1191              SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1192                    __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1193                   (ErrVal)EUDXXXX, (ErrVal)ret1, "Unpacking failure");
1194              RETVALUE( ret1 );
1195           }
1196 #else
1197          cmUnpkUdxStruct(mBuf,0,(U8 *)&tmpCfgInfo,sizeof(CkwCfgInfo));
1198 #endif /* ERRCLASS & ERRCLS_DEBUG */
1199           cfgInfo = &tmpCfgInfo;
1200           break;
1201        }
1202        case UDX_SEL_LWLC:
1203        {
1204           CMCHKUNPK(cmUnpkPtr,(PTR *) &cfgInfo, mBuf);
1205           break;
1206        }
1207 #endif /* LCUDX */
1208     }
1209     SPutMsg(mBuf);
1210
1211     RETVALUE((*func)(pst, spId, cfgInfo));
1212 } /* cmUnpkUdxCfgReq */
1213
1214 \f
1215 /*
1216 *
1217 *    Fun:    cmUnpkUdxCfgCfm
1218 *
1219 *    Desc:    unpack the primitive KwUiUdxCfgCfm
1220 *
1221 *    Ret:    ROK  -ok
1222 *
1223 *    Notes:    None
1224 *
1225 *    File:     ckw.c
1226 *
1227 */
1228 #ifdef ANSI
1229 PUBLIC S16 cmUnpkUdxCfgCfm
1230 (
1231 UdxCfgCfm         func,
1232 Pst               *pst,
1233 Buffer            *mBuf
1234 )
1235 #else
1236 PUBLIC S16 cmUnpkUdxCfgCfm(func, pst, mBuf)
1237 UdxCfgCfm         func;
1238 Pst               *pst;
1239 Buffer            *mBuf;
1240 #endif
1241 {
1242     S16 ret1;
1243     SuId             suId = 0;
1244     CkwCfgCfmInfo    *cfgCfmInfo = NULLP;
1245     
1246     TRC3(cmUnpkUdxCfgCfm)
1247
1248     CMCHKUNPK(SUnpkS16, &suId, mBuf);
1249
1250     switch(pst->selector)
1251     {
1252 #ifdef LCUDX
1253        case UDX_SEL_LC:
1254        {
1255            if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&cfgCfmInfo,\
1256                        sizeof(CkwCfgCfmInfo),0)) != ROK)
1257            {
1258 #if (ERRCLASS & ERRCLS_ADD_RES)
1259               if(ret1 != ROK)
1260               {
1261                  SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1262                        __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1263                       (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
1264               }
1265 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1266               RETVALUE(ret1);
1267            }
1268
1269           ret1 = cmUnpkUdxStruct(mBuf,0,(U8 *)cfgCfmInfo, sizeof(CkwCfgCfmInfo));
1270 #if(ERRCLASS & ERRCLS_DEBUG)
1271           if(ret1 != ROK)
1272           {
1273              SPutMsg(mBuf);
1274              SLogError(pst->dstEnt, pst->dstInst, pst->dstProcId,
1275                    __FILE__, __LINE__, (ErrCls)ERRCLS_DEBUG,
1276                   (ErrVal)EUDXXXX, (ErrVal)ret1, "Unpacking failure");
1277              RETVALUE( ret1 );
1278           }
1279 #endif /* ERRCLASS & ERRCLS_DEBUG */
1280           break;
1281        }
1282        case UDX_SEL_LWLC:
1283        {
1284           CMCHKUNPK(cmUnpkPtr,(PTR *) &cfgCfmInfo, mBuf);
1285           break;
1286        }
1287 #endif /* LCUDX */
1288     }
1289     SPutMsg(mBuf);
1290
1291     RETVALUE((*func)(pst, suId, cfgCfmInfo));
1292 } /* cmUnpkUdxCfgCfm */
1293
1294 /*
1295 *
1296 *    Fun:    cmUnpkUdxUeIdChgReq
1297 *
1298 *    Desc:    unpack the primitive KwUiUdxUeIdChgReq
1299 *
1300 *    Ret:    ROK  -ok
1301 *
1302 *    Notes:    None
1303 *
1304 *    File:     ckw.c
1305 *
1306 */
1307 #ifdef ANSI
1308 PUBLIC S16 cmUnpkUdxUeIdChgReq
1309 (
1310 UdxUeIdChgReq     func,
1311 Pst               *pst,
1312 Buffer            *mBuf
1313 )
1314 #else
1315 PUBLIC S16 cmUnpkUdxUeIdChgReq(func, pst, mBuf)
1316 UdxUeIdChgReq     func;
1317 Pst               *pst;
1318 Buffer            *mBuf;
1319 #endif
1320 {
1321     SpId      spId = 0;
1322     U32       transId = 0;
1323     CkwUeInfo tmpUeInfo;
1324     CkwUeInfo tmpNewUeInfo;
1325     CkwUeInfo *ueInfo;
1326     CkwUeInfo *newUeInfo;
1327     
1328     TRC3(cmUnpkUdxUeIdChgReq)
1329
1330
1331     CMCHKUNPK(SUnpkS16, &(spId), mBuf);
1332     CMCHKUNPKLOG(SUnpkU32, &transId, mBuf, EUDXXXX, pst);
1333
1334     switch(pst->selector)
1335     {
1336 #ifdef LCUDX
1337        case UDX_SEL_LC:
1338        {
1339           cmUnpkUdxStruct(mBuf,0,(U8 *)&tmpNewUeInfo, sizeof(CkwUeInfo));
1340           cmUnpkUdxStruct(mBuf,sizeof(CkwUeInfo),(U8 *)&tmpUeInfo, sizeof(CkwUeInfo));
1341
1342           ueInfo =  &tmpUeInfo;
1343           newUeInfo =  &tmpNewUeInfo;
1344           break;
1345        }
1346        case UDX_SEL_LWLC:
1347        {
1348           CMCHKUNPK(cmUnpkPtr,(PTR *) &ueInfo, mBuf);
1349           CMCHKUNPK(cmUnpkPtr,(PTR *) &newUeInfo, mBuf);
1350           break;
1351        }
1352        default:
1353        {
1354           printf("cmUnpkUdxUeIdChgReq()- selector =%d not supported \n", pst->selector);
1355           exit(1);
1356        }
1357
1358 #endif /* LCUDX */
1359     }
1360     SPutMsg(mBuf);
1361
1362     RETVALUE((*func)(pst, spId, transId, ueInfo, newUeInfo));
1363
1364 } /* cmUnpkUdxUeIdChgReq */
1365
1366 /*
1367 *
1368 *    Fun:     cmUnpkUdxUeIdChgCfm
1369 *
1370 *    Desc:    unpack the primitive KwUiUdxUeIdChgCfm
1371 *
1372 *    Ret:     ROK  -ok
1373 *
1374 *    Notes:   None
1375 *
1376 *    File:    ckw.c
1377 *
1378 */
1379 #ifdef ANSI
1380 PUBLIC S16 cmUnpkUdxUeIdChgCfm
1381 (
1382 UdxUeIdChgCfm     func,
1383 Pst               *pst,
1384 Buffer            *mBuf
1385 )
1386 #else
1387 PUBLIC S16 cmUnpkUdxUeIdChgCfm(func, pst, mBuf)
1388 UdxUeIdChgCfm     func;
1389 Pst               *pst;
1390 Buffer            *mBuf;
1391 #endif
1392 {
1393     SuId      suId = 0;
1394     U32       transId = 0;
1395     CmStatus  status;
1396     
1397     TRC3(cmUnpkUdxUeIdChgCfm)
1398
1399     cmMemset((U8 *)&status, (U8)0, (PTR)sizeof(CmStatus));
1400
1401     CMCHKUNPK(SUnpkS16, &suId, mBuf);
1402     CMCHKUNPKLOG(SUnpkU32, &transId, mBuf, EUDXXXX, pst);
1403
1404     CMCHKUNPK(cmUnpkCmStatus, &status, mBuf);
1405
1406     SPutMsg(mBuf);
1407
1408     RETVALUE((*func)(pst, suId, transId, status));
1409
1410 } /* cmUnpkUdxUeIdChgCfm */
1411
1412 /*
1413 *
1414 *    Fun:     cmUnpkUdxStaUpdCfm
1415 *
1416 *    Desc:    unpack the primitive KwUiUdxUeIdChgCfm
1417 *
1418 *    Ret:     ROK  -ok
1419 *
1420 *    Notes:   None
1421 *
1422 *    File:    ckw.c
1423 *
1424 */
1425 #ifdef ANSI
1426 PUBLIC S16 cmUnpkUdxStaUpdCfm
1427 (
1428 UdxStaUpdCfm     func,
1429 Pst               *pst,
1430 Buffer            *mBuf
1431 )
1432 #else
1433 PUBLIC S16 cmUnpkUdxStaUpdCfm(func, pst, mBuf)
1434 UdxStaUpdCfm     func;
1435 Pst               *pst;
1436 Buffer            *mBuf;
1437 #endif
1438 {
1439     SuId      suId = 0;
1440     CmLteRlcId *rlcId = NULLP;  /* KW_FIX */
1441     KwUdxBufLst *pBufLst = NULLP; /* KW_FIX*/
1442     
1443     TRC3(cmUnpkUdxStaUpdCfm)
1444
1445     CMCHKUNPK(SUnpkS16, &suId, mBuf);
1446     switch (pst->selector)
1447     {
1448        case UDX_SEL_LC:
1449        {
1450           break;
1451        }
1452        case UDX_SEL_LWLC:
1453        {
1454           CMCHKUNPK(cmUnpkPtr, (PTR *)&rlcId,mBuf);
1455           CMCHKUNPK(cmUnpkPtr, (PTR *)&pBufLst,mBuf);
1456           break;
1457        }
1458     } 
1459
1460     SPutMsg(mBuf);
1461
1462     RETVALUE((*func)(pst, suId, rlcId, pBufLst));
1463
1464 } /* cmUnpkUdxUeIdChgCfm */
1465
1466 /*
1467 *
1468 *    Fun:     cmUnpkUdxStaUpdReq
1469 *
1470 *    Desc:    unpack the primitive KwUiUdxUeIdChgCfm
1471 *
1472 *    Ret:     ROK  -ok
1473 *
1474 *    Notes:   None
1475 *
1476 *    File:    ckw.c
1477 *
1478 */
1479 #ifdef ANSI
1480 PUBLIC S16 cmUnpkUdxStaUpdReq
1481 (
1482 UdxStaUpdReq     func,
1483 Pst               *pst,
1484 Buffer            *mBuf
1485 )
1486 #else
1487 PUBLIC S16 cmUnpkUdxStaUpdReq(func, pst, mBuf)
1488 UdxStaUpdReq     func;
1489 Pst               *pst;
1490 Buffer            *mBuf;
1491 #endif
1492 {
1493     SpId      spId = 0;
1494     CmLteRlcId *rlcId = NULLP; /* KW_FIX */ 
1495     KwUdxStaPdu *pStaPdu = NULLP; /* KW_FIX */
1496     S16 ret1;
1497     CmLteRlcId tmpRlcId;
1498     
1499     TRC3(cmUnpkUdxStaUpdCfm)
1500
1501     CMCHKUNPK(SUnpkS16, &spId, mBuf);
1502     switch (pst->selector)
1503     {
1504        case UDX_SEL_LC:
1505        {
1506            if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&pStaPdu,
1507                        sizeof(KwUdxStaPdu),0)) != ROK)
1508            {
1509 #if (ERRCLASS & ERRCLS_ADD_RES)
1510               if(ret1 != ROK)
1511               {
1512                  SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1513                        __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1514                       (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
1515               }
1516 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1517               RETVALUE(ret1);
1518            }
1519           ret1 = cmUnpkUdxStruct(mBuf,0,(U8 *)pStaPdu, sizeof(KwUdxStaPdu));
1520           ret1 = cmUnpkUdxStruct(mBuf,sizeof(KwUdxStaPdu),(U8 *)&tmpRlcId,sizeof(CmLteRlcId));
1521           rlcId = &tmpRlcId; 
1522           break;
1523        }
1524        case UDX_SEL_LWLC:
1525        {
1526           CMCHKUNPK(cmUnpkPtr, (PTR *)&rlcId,mBuf);
1527           CMCHKUNPK(cmUnpkPtr, (PTR *)&pStaPdu,mBuf);
1528           break;
1529        }
1530     } 
1531
1532     SPutMsg(mBuf);
1533
1534     RETVALUE((*func)(pst, spId, rlcId, pStaPdu));
1535
1536 } /* cmUnpkUdxUeIdChgCfm */
1537
1538 /*
1539 *
1540 *    Fun:     cmUnpkUdxStaPduReq
1541 *
1542 *    Desc:    unpack the primitive KwUiUdxUeIdChgCfm
1543 *
1544 *    Ret:     ROK  -ok
1545 *
1546 *    Notes:   None
1547 *
1548 *    File:    ckw.c
1549 *
1550 */
1551 #ifdef ANSI
1552 PUBLIC S16 cmUnpkUdxStaPduReq
1553 (
1554 UdxStaPduReq     func,
1555 Pst               *pst,
1556 Buffer            *mBuf
1557 )
1558 #else
1559 PUBLIC S16 cmUnpkUdxStaPduReq(func, pst, mBuf)
1560 UdxStaPduReq     func;
1561 Pst               *pst;
1562 Buffer            *mBuf;
1563 #endif
1564 {
1565     S16       ret1;
1566     SpId      spId = 0;
1567     CmLteRlcId tmpRlcId;
1568     CmLteRlcId *rlcId = NULLP;  /* KW_FIX */
1569     KwUdxDlStaPdu *pStaPdu = NULLP; /* KW_FIX */
1570     
1571     TRC3(cmUnpkUdxStaUpdCfm)
1572
1573     CMCHKUNPK(SUnpkS16, &spId, mBuf);
1574     switch (pst->selector)
1575     {
1576        case UDX_SEL_LC:
1577        {
1578            if((ret1 = SGetStaticBuffer(pst->region, pst->pool, (Data **)&pStaPdu,
1579                        sizeof(KwUdxDlStaPdu),0)) != ROK)
1580            {
1581 #if (ERRCLASS & ERRCLS_ADD_RES)
1582               if(ret1 != ROK)
1583               {
1584                  SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
1585                        __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
1586                       (ErrVal)EUDXXXX, (ErrVal)0, "SGetMsg() failed");
1587               }
1588 #endif /*  ERRCLASS & ERRCLS_ADD_RES  */
1589               RETVALUE(ret1);
1590            }
1591           ret1 = cmUnpkUdxStruct(mBuf,0, (U8 *)pStaPdu, sizeof(KwUdxDlStaPdu));
1592           ret1 = cmUnpkUdxStruct(mBuf,sizeof(KwUdxDlStaPdu),(U8 *)&tmpRlcId,sizeof(CmLteRlcId));
1593           rlcId = &tmpRlcId; 
1594            break;
1595        }
1596        case UDX_SEL_LWLC:
1597        {
1598           CMCHKUNPK(cmUnpkPtr, (PTR *)&rlcId,mBuf);
1599           CMCHKUNPK(cmUnpkPtr, (PTR *)&pStaPdu,mBuf);
1600           break;
1601        }
1602     } 
1603
1604     SPutMsg(mBuf);
1605     RETVALUE((*func)(pst, spId, rlcId, pStaPdu));
1606
1607 } /* cmUnpkUdxUeIdChgCfm */
1608
1609 /*
1610 *
1611 *    Fun:     cmUnpkUdxStaProhTmrStart
1612 *
1613 *    Desc:    unpack the Status prohibit timer start Msg
1614 *
1615 *    Ret:     ROK  -ok
1616 *
1617 *    Notes:   None
1618 *
1619 *    File:    kw_udx.c
1620 *
1621 */
1622 #ifdef ANSI
1623 PUBLIC S16 cmUnpkUdxStaProhTmrStart
1624 (
1625 UdxStaProhTmrStart     func,
1626 Pst               *pst,
1627 Buffer            *mBuf
1628 )
1629 #else
1630 PUBLIC S16 cmUnpkUdxStaProhTmrStart(func, pst, mBuf)
1631 UdxStaProhTmrStart     func;
1632 Pst               *pst;
1633 Buffer            *mBuf;
1634 #endif
1635 {
1636     SpId      spId = 0;
1637     CmLteRlcId tmpRlcId;
1638     CmLteRlcId *rlcId = NULLP; /* KW_FIX */
1639     
1640     TRC3(cmUnpkUdxStaProhTmrStart)
1641
1642     CMCHKUNPK(SUnpkS16, &spId, mBuf);
1643     switch (pst->selector)
1644     {
1645        case UDX_SEL_LC:
1646        {
1647           cmUnpkUdxStruct(mBuf,0,(U8 *)&tmpRlcId,sizeof(CmLteRlcId));
1648           rlcId = &tmpRlcId;
1649           break;
1650        }
1651        case UDX_SEL_LWLC:
1652        {
1653           CMCHKUNPK(cmUnpkPtr, (PTR *)&rlcId,mBuf);
1654           break;
1655        }
1656     } 
1657
1658     SPutMsg(mBuf);
1659
1660     RETVALUE((*func)(pst, spId, rlcId));
1661
1662 } /* cmUnpkUdxStaProhTmrStart */
1663
1664 #ifdef LTE_L2_MEAS
1665 /*
1666
1667  
1668 *    Fun:    cmUnpkUdxL2MeasReq
1669 *
1670 *    Ret:    ROK  -ok
1671 *
1672 *    Notes:  None
1673 *
1674 *
1675 */
1676 #ifdef ANSI
1677 PUBLIC S16 cmUnpkUdxL2MeasReq
1678 (
1679 UdxL2MeasReq     func,
1680 Pst              *pst,
1681 Buffer           *mBuf
1682 )
1683 #else
1684 PUBLIC S16 cmUnpkUdxL2MeasReq(func, pst, mBuf)
1685 UdxL2MeasReq     func;
1686 Pst              *pst;
1687 Buffer           *mBuf;
1688 #endif
1689 {
1690     KwL2MeasReqEvt    tmpMeasReqEvt;
1691     KwL2MeasReqEvt    *measReqEvt = NULLP;  /* KW_FIX */
1692
1693     TRC3(cmUnpkUdxL2MeasReq)
1694
1695     switch (pst->selector)
1696     {
1697        case UDX_SEL_LC:
1698        {
1699           cmUnpkUdxStruct(mBuf,0,(U8 *)&tmpMeasReqEvt,sizeof(KwL2MeasReqEvt));
1700           measReqEvt = &tmpMeasReqEvt;
1701           break;
1702        }
1703        case UDX_SEL_LWLC:
1704        {
1705          CMCHKUNPK(cmUnpkPtr, (PTR *)&measReqEvt,mBuf);
1706          break;
1707        }
1708     }
1709
1710     SPutMsg(mBuf);
1711
1712     RETVALUE((*func)(pst, measReqEvt));
1713 } /* cmUnpkUdxL2MeasReq */
1714
1715 /*
1716 *
1717 *    Fun:    cmUnpkUdxL2MeasSendReq
1718 *
1719 *    Ret:    ROK  -ok
1720 *
1721 *    Notes:  None
1722 *
1723 *
1724 */
1725 #ifdef ANSI
1726 PUBLIC S16 cmUnpkUdxL2MeasSendReq
1727 (
1728 UdxL2MeasSendReq   func,
1729 Pst                *pst,
1730 Buffer             *mBuf
1731 )
1732 #else
1733 PUBLIC S16 cmUnpkUdxL2MeasSendReq(func, pst, mBuf)
1734 UdxL2MeasSendReq   func;
1735 Pst                *pst;
1736 Buffer             *mBuf;
1737 #endif
1738 {
1739     U8     measType = 0;  /* KW_FIX */
1740
1741     TRC3(cmUnpkUdxL2MeasSendReq)
1742
1743     switch (pst->selector)
1744     {
1745        case UDX_SEL_LC:
1746        case UDX_SEL_LWLC:
1747        {
1748           CMCHKUNPK(SUnpkU8, &measType, mBuf);
1749          break;
1750        }
1751     }
1752
1753     SPutMsg(mBuf);
1754
1755     RETVALUE((*func)(pst, measType));
1756 } /* cmUnpkUdxL2MeasReq */
1757
1758 /*
1759 *
1760 *    Fun:    cmUnpkUdxL2MeasStopReq
1761 *
1762 *    Ret:    ROK  -ok
1763 *
1764 *    Notes:  None
1765 *
1766 *
1767 */
1768 #ifdef ANSI
1769 PUBLIC S16 cmUnpkUdxL2MeasStopReq
1770 (
1771 UdxL2MeasStopReq   func,
1772 Pst                *pst,
1773 Buffer             *mBuf
1774 )
1775 #else
1776 PUBLIC S16 cmUnpkUdxL2MeasStopReq(func, pst, mBuf)
1777 UdxL2MeasSendReq     func;
1778 Pst                  *pst;
1779 Buffer               *mBuf;
1780 #endif
1781 {
1782     U8     measType = 0; /* KW_FIX */
1783
1784     TRC3(cmUnpkUdxL2MeasStopReq)
1785
1786     switch (pst->selector)
1787     {
1788        case UDX_SEL_LC:
1789        case UDX_SEL_LWLC:
1790        {
1791           CMCHKUNPK(SUnpkU8, &measType, mBuf);
1792          break;
1793        }
1794     }
1795
1796     SPutMsg(mBuf);
1797
1798     RETVALUE((*func)(pst, measType));
1799 } /* cmUnpkUdxL2MeasStopReq */
1800 #endif
1801 #endif /* LCUDX */
1802
1803 \f  
1804 /********************************************************************30**
1805          End of file
1806 **********************************************************************/