Committing in PDCP code
[o-du/l2.git] / src / 5gnrpdcp / pj_udx_ptdl.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:    LTE-PDCP Layer - Upper Interface
22     
23         Type:    C file
24   
25         Desc:    C source code for the upper interface of LTE-PDCP
26  
27         File:    pj_udx_ptdl.c
28   
29 *********************************************************************21*/
30
31 /** @file pj_udx_ptdl.c
32 @brief PDCP Upper Interface
33 */
34
35 \f
36 /* header (.h) include files */
37 #include "envopt.h"        /* environment options */
38 #include "envdep.h"        /* environment dependent */
39 #include "envind.h"        /* environment independent */
40
41 #include "gen.h"           /* general */
42 #include "ssi.h"           /* system services */
43 #include "cm5.h"           /* common timer defines */
44 #include "cm_tkns.h"       /* common tokens defines */
45 #include "cm_mblk.h"       /* common memory allocation library defines */
46 #include "cm_llist.h"      /* common link list  defines  */
47 #include "cm_hash.h"       /* common hash list  defines */
48 #include "cm_lte.h"        /* common LTE defines */
49 #include "cpj.h"           /* UDX defines */
50 #include "pju.h"           /* PJU defines */
51 #include "lpj.h"
52
53 #include "pj_err.h"
54 #include "pj_env.h"        /* RLC environment options */
55 #include "pj_udx.h"
56
57 /* extern (.x) include files */
58 #include "gen.x"           /* general */
59 #include "ssi.x"           /* system services */
60
61 #include "cm5.x"           /* common timer library */
62 #include "cm_tkns.x"       /* common tokens */
63 #include "cm_mblk.x"       /* common memory allocation */
64 #include "cm_llist.x"      /* common link list */
65 #include "cm_hash.x"       /* common hash list */
66 #include "cm_lte.x"        /* common LTE includes */
67 #include "cm_lib.x"        /* common memory allocation library */
68 #include "cpj.x"           /* UDX defines */
69 #include "pju.x"           /* PJU defines */
70 #include "lpj.x"           /* LPJ defines */
71 #include "pj.h"
72 #include "pj.x"
73 #include "pj_udx.x"
74
75
76 #if !(defined(LCPJULUDX)  && defined(PJ))
77 #define PTPJUDX
78 #endif
79
80
81 #ifdef __cplusplus
82 EXTERN "C" {
83 #endif /* __cplusplus */
84
85 \f  
86 /*********************************************************************
87  *             Forward Declartion for UDX Porting Functions
88  ********************************************************************/
89 #ifdef PTPJUDX
90
91 EXTERN S16 PtDlUdxBndCfm ARGS((Pst * pst, SuId suId, U8 status));
92
93 EXTERN S16 PtDlUdxCfgCfm ARGS((Pst * pst, SuId suId, UdxCfgCfmInfo * cfgCfm));
94
95 EXTERN S16 PtDlUdxReEstCfm ARGS((Pst * pst, SuId suId, UdxReEstCfmInfo * reEstCfm));
96
97 EXTERN S16 PtDlUdxSecCfgCfm ARGS((Pst * pst, SuId suId, UdxSecCfgCfmInfo * secCfgCfm));
98
99 EXTERN S16 PtDlUdxUeIdChgCfm ARGS((Pst * pst, SuId suId, U32 transId, UdxUeInfo  * ueInfo, CmStatus status));
100
101 EXTERN S16 PtDlUdxCountCfm ARGS((Pst * pst, SuId suId, UdxCountCfmInfo * countCfm));
102
103 EXTERN S16 PtDlUdxSduStaCfm ARGS((Pst * pst, SuId suId, UdxSduStaCfmInfo * staCfm));
104
105 EXTERN S16 PtDlUdxDatResumeCfm ARGS((Pst * pst, SuId suId, UdxDatResumeCfmInfo * datResume));
106
107 EXTERN S16 PtDlUdxDatForwardCfm ARGS((Pst * pst, SuId suId, UdxDatFwdCfmInfo * datFwdCfm));
108 #endif /* PTPJUDX */
109
110 \f  
111 /*********************************************************************
112  *             Forward Declartion for PJU Porting Functions
113  ********************************************************************/
114
115 \f  
116 /*********************************************************************
117  *                         Primitives for UDX interface 
118  ********************************************************************/
119 PRIVATE CONSTANT UdxBndCfm PjDlUdxBndCfmMt[] =
120 {
121 #ifdef LCPJULUDX
122    cmPkPjUdxBndCfm,
123 #else
124    PtDlUdxBndCfm,
125 #endif
126 #ifdef LWLCPJULUDX
127    cmPkPjUdxBndCfm,
128 #else
129    PtDlUdxBndCfm,
130 #endif
131 #ifdef PJ
132    PjUlUdxBndCfm,
133 #else
134    PtDlUdxBndCfm,
135 #endif
136 };
137
138
139 PRIVATE CONSTANT UdxCfgCfm PjDlUdxCfgCfmMt[] =
140 {
141 #ifdef LCPJULUDX
142    cmPkPjUdxCfgCfm,
143 #else
144    PtDlUdxCfgCfm,
145 #endif
146 #ifdef LWLCPJULUDX
147    cmPkPjUdxCfgCfm,
148 #else
149    PtDlUdxCfgCfm,
150 #endif
151 #ifdef PJ
152    PjUlUdxCfgCfm,
153 #else
154    PtDlUdxCfgCfm,
155 #endif
156 };
157
158
159 PRIVATE CONSTANT UdxReEstCfm PjDlUdxReEstCfmMt[] =
160 {
161 #ifdef LCPJULUDX
162    cmPkPjUdxReEstCfm,
163 #else
164    PtDlUdxReEstCfm,
165 #endif
166 #ifdef LWLCPJULUDX
167    cmPkPjUdxReEstCfm,
168 #else
169    PtDlUdxReEstCfm,
170 #endif
171 #ifdef PJ
172    PjUlUdxReEstCfm,
173 #else
174    PtDlUdxReEstCfm,
175 #endif
176 };
177
178
179 PRIVATE CONSTANT UdxSecCfgCfm PjDlUdxSecCfgCfmMt[] =
180 {
181 #ifdef LCPJULUDX
182    cmPkPjUdxSecCfgCfm,
183 #else
184    PtDlUdxSecCfgCfm,
185 #endif
186 #ifdef LWLCPJULUDX
187    cmPkPjUdxSecCfgCfm,
188 #else
189    PtDlUdxSecCfgCfm,
190 #endif
191 #ifdef PJ
192    PjUlUdxSecCfgCfm,
193 #else
194    PtDlUdxSecCfgCfm,
195 #endif
196 };
197
198
199 PRIVATE CONSTANT UdxUeIdChgCfm PjDlUdxUeIdChgCfmMt[] =
200 {
201 #ifdef LCPJULUDX
202    cmPkPjUdxUeIdChgCfm,
203 #else
204    PtDlUdxUeIdChgCfm,
205 #endif
206 #ifdef LWLCPJULUDX
207    cmPkPjUdxUeIdChgCfm,
208 #else
209    PtDlUdxUeIdChgCfm,
210 #endif
211 #ifdef PJ
212    PjUlUdxUeIdChgCfm,
213 #else
214    PtDlUdxUeIdChgCfm,
215 #endif
216 };
217
218
219 PRIVATE CONSTANT UdxCountCfm PjDlUdxCountCfmMt[] =
220 {
221 #ifdef LCPJULUDX
222    cmPkPjUdxCountCfm,
223 #else
224    PtDlUdxCountCfm,
225 #endif
226 #ifdef LWLCPJULUDX
227    cmPkPjUdxCountCfm,
228 #else
229    PtDlUdxCountCfm,
230 #endif
231 #ifdef PJ
232    PjUlUdxCountCfm,
233 #else
234    PtDlUdxCountCfm,
235 #endif
236 };
237
238
239 PRIVATE CONSTANT UdxSduStaCfm PjDlUdxSduStaCfmMt[] =
240 {
241 #ifdef LCPJULUDX
242    cmPkPjUdxSduStaCfm,
243 #else
244    PtDlUdxSduStaCfm,
245 #endif
246 #ifdef LWLCPJULUDX
247    cmPkPjUdxSduStaCfm,
248 #else
249    PtDlUdxSduStaCfm,
250 #endif
251 #ifdef PJ
252    PjUlUdxSduStaCfm,
253 #else
254    PtDlUdxSduStaCfm,
255 #endif
256 };
257
258 PRIVATE CONSTANT UdxDatResumeCfm PjDlUdxDatResumeCfmMt[] =
259 {
260 #ifdef LCPJULUDX
261    cmPkPjUdxDatResumeCfm,
262 #else
263    PtDlUdxDatResumeCfm,
264 #endif
265 #ifdef LWLCPJULUDX
266    cmPkPjUdxDatResumeCfm,
267 #else
268    PtDlUdxDatResumeCfm,
269 #endif
270 #ifdef PJ
271    PjUlUdxDatResumeCfm,
272 #else
273    PtDlUdxDatResumeCfm,
274 #endif
275 };
276
277 PRIVATE CONSTANT UdxDatForwardCfm PjDlUdxDatFwdCfmMt[] =
278 {
279 #ifdef LCPJULUDX
280    cmPkPjUdxDatForwardCfm,
281 #else
282    PtDlUdxDatForwardCfm,
283 #endif
284 #ifdef LWLCPJULUDX
285    cmPkPjUdxDatForwardCfm,
286 #else
287    PtDlUdxDatForwardCfm,
288 #endif
289 #ifdef PJ
290    PjUlUdxDatForwardCfm,
291 #else
292    PtDlUdxDatForwardCfm,
293 #endif
294 };
295
296 \f  
297 /****************************************************************************
298  *                         UDX Interface Mt functions
299  ***************************************************************************/\f
300 #ifdef PJ
301 #ifdef ANSI
302 PUBLIC S16 PjDlUdxBndCfm
303 (
304 Pst * pst,
305 SuId suId,
306 U8 status
307 )
308 #else
309 PUBLIC S16 PjDlUdxBndCfm(pst, suId, status)
310 Pst * pst;
311 SuId suId;
312 U8 status;
313 #endif
314 {
315
316    TRC3(PjDlUdxBndCfm)
317
318    (*PjDlUdxBndCfmMt[pst->selector])(pst, suId, status);
319
320    RETVALUE(ROK);
321 }
322
323 #ifdef ANSI
324 PUBLIC S16 PjDlUdxCfgCfm
325 (
326 Pst * pst,
327 SuId suId,
328 UdxCfgCfmInfo * cfgCfm
329 )
330 #else
331 PUBLIC S16 PjDlUdxCfgCfm(pst, suId, cfgCfm)
332 Pst * pst;
333 SuId suId;
334 UdxCfgCfmInfo * cfgCfm;
335 #endif
336 {
337
338    TRC3(PjDlUdxCfgCfm)
339
340    (*PjDlUdxCfgCfmMt[pst->selector])(pst, suId, cfgCfm);
341
342    RETVALUE(ROK);
343 }
344
345 #ifdef ANSI
346 PUBLIC S16 PjDlUdxReEstCfm
347 (
348 Pst * pst,
349 SuId suId,
350 UdxReEstCfmInfo * reEstCfm
351 )
352 #else
353 PUBLIC S16 PjDlUdxReEstCfm(pst, suId, reEstCfm)
354 Pst * pst;
355 SuId suId;
356 UdxReEstCfmInfo * reEstCfm;
357 #endif
358 {
359
360    TRC3(PjDlUdxReEstCfm)
361
362    (*PjDlUdxReEstCfmMt[pst->selector])(pst, suId, reEstCfm);
363
364    RETVALUE(ROK);
365 }
366
367 #ifdef ANSI
368 PUBLIC S16 PjDlUdxSecCfgCfm
369 (
370 Pst * pst,
371 SuId suId,
372 UdxSecCfgCfmInfo * secCfgCfm
373 )
374 #else
375 PUBLIC S16 PjDlUdxSecCfgCfm(pst, suId, secCfgCfm)
376 Pst * pst;
377 SuId suId;
378 UdxSecCfgCfmInfo * secCfgCfm;
379 #endif
380 {
381
382    TRC3(PjDlUdxSecCfgCfm)
383
384    (*PjDlUdxSecCfgCfmMt[pst->selector])(pst, suId, secCfgCfm);
385
386    RETVALUE(ROK);
387 }
388
389 #ifdef ANSI
390 PUBLIC S16 PjDlUdxUeIdChgCfm
391 (
392 Pst * pst,
393 SuId suId,
394 U32 transId,
395 UdxUeInfo  * ueInfo,
396 CmStatus status
397 )
398 #else
399 PUBLIC S16 PjDlUdxUeIdChgCfm(pst, suId, transId, ueInfo, status)
400 Pst * pst;
401 SuId suId;
402 U32 transId;
403 UdxUeInfo  * ueInfo;
404 CmStatus status;
405 #endif
406 {
407
408    TRC3(PjDlUdxUeIdChgCfm)
409
410    (*PjDlUdxUeIdChgCfmMt[pst->selector])(pst, suId, transId, ueInfo, status);
411
412    RETVALUE(ROK);
413 }
414
415 #ifdef ANSI
416 PUBLIC S16 PjDlUdxCountCfm
417 (
418 Pst * pst,
419 SuId suId,
420 UdxCountCfmInfo * countCfm
421 )
422 #else
423 PUBLIC S16 PjDlUdxCountCfm(pst, suId, countCfm)
424 Pst * pst;
425 SuId suId;
426 UdxCountCfmInfo * countCfm;
427 #endif
428 {
429
430    TRC3(PjDlUdxCountCfm)
431
432    (*PjDlUdxCountCfmMt[pst->selector])(pst, suId, countCfm);
433
434    RETVALUE(ROK);
435 }
436
437 #ifdef ANSI
438 PUBLIC S16 PjDlUdxSduStaCfm
439 (
440 Pst * pst,
441 SuId suId,
442 UdxSduStaCfmInfo * staCfm
443 )
444 #else
445 PUBLIC S16 PjDlUdxSduStaCfm(pst, suId, staCfm)
446 Pst * pst;
447 SuId suId;
448 UdxSduStaCfmInfo * staCfm;
449 #endif
450 {
451
452    TRC3(PjDlUdxSduStaCfm)
453
454    (*PjDlUdxSduStaCfmMt[pst->selector])(pst, suId, staCfm);
455
456    RETVALUE(ROK);
457 }
458
459 #ifdef ANSI
460 PUBLIC S16 PjDlUdxDatResumeCfm
461 (
462 Pst * pst,
463 SuId suId,
464 UdxDatResumeCfmInfo * staCfm
465 )
466 #else
467 PUBLIC S16 PjDlUdxDatResumeCfm(pst, suId, staCfm)
468 Pst * pst;
469 SuId suId;
470 UdxDatResumeCfmInfo * staCfm;
471 #endif
472 {
473
474    TRC3(PjDlUdxDatResumeCfm)
475
476    (*PjDlUdxDatResumeCfmMt[pst->selector])(pst, suId, staCfm);
477
478    RETVALUE(ROK);
479 }
480
481 #ifdef ANSI
482 PUBLIC S16 PjDlUdxDatFwdCfm
483 (
484 Pst * pst,
485 SuId  suId,
486 UdxDatFwdCfmInfo  * datFwdCfm
487 )
488 #else
489 PUBLIC S16 PjDlUdxDatFwdCfm(pst, suId, datFwdCfm)
490 Pst * pst;
491 SuId  suId;
492 UdxDatFwdCfmInfo  * datFwdCfm;
493 #endif
494 {
495
496    TRC3(PjDlUdxDatFwdCfm)
497
498    (*PjDlUdxDatFwdCfmMt[pst->selector])(pst, suId, datFwdCfm);
499
500    RETVALUE(ROK);
501 }
502 #endif
503 \f  
504 /*************************************************************************
505  *                         UDX Porting Functions
506  ************************************************************************/
507 #ifdef PTPJUDX
508
509 #ifdef ANSI
510 PUBLIC S16 PtDlUdxBndCfm
511 (
512 Pst * pst,
513 SuId suId,
514 U8 status
515 )
516 #else
517 PUBLIC S16 PtDlUdxBndCfm(pst, suId, status)
518 Pst * pst;
519 SuId suId;
520 U8 status;
521 #endif
522 {
523
524    TRC3(PtDlUdxBndCfm)
525
526    UNUSED(pst);
527    UNUSED(suId);
528    UNUSED(status);
529
530    RETVALUE(ROK);
531
532 }
533
534
535 #ifdef ANSI
536 PUBLIC S16 PtDlUdxCfgCfm
537 (
538 Pst * pst,
539 SuId suId,
540 UdxCfgCfmInfo * cfgCfm
541 )
542 #else
543 PUBLIC S16 PtDlUdxCfgCfm(pst, suId, cfgCfm)
544 Pst * pst;
545 SuId suId;
546 UdxCfgCfmInfo * cfgCfm;
547 #endif
548 {
549
550    TRC3(PtDlUdxCfgCfm)
551
552    UNUSED(pst);
553    UNUSED(suId);
554    UNUSED(cfgCfm);
555
556    RETVALUE(ROK);
557
558 }
559
560
561 #ifdef ANSI
562 PUBLIC S16 PtDlUdxReEstCfm
563 (
564 Pst * pst,
565 SuId suId,
566 UdxReEstCfmInfo * reEstCfm
567 )
568 #else
569 PUBLIC S16 PtDlUdxReEstCfm(pst, suId, reEstCfm)
570 Pst * pst;
571 SuId suId;
572 UdxReEstCfmInfo *reEstCfm;
573 #endif
574 {
575
576    TRC3(PtDlUdxReEstCfm)
577
578    UNUSED(pst);
579    UNUSED(suId);
580    UNUSED(reEstCfm);
581
582    RETVALUE(ROK);
583
584 }
585
586
587 #ifdef ANSI
588 PUBLIC S16 PtDlUdxSecCfgCfm
589 (
590 Pst * pst,
591 SuId suId,
592 UdxSecCfgCfmInfo * secCfgCfm
593 )
594 #else
595 PUBLIC S16 PtDlUdxSecCfgCfm(pst, suId, secCfgCfm)
596 Pst * pst;
597 SuId suId;
598 UdxSecCfgCfmInfo * secCfgCfm;
599 #endif
600 {
601
602    TRC3(PtDlUdxSecCfgCfm)
603
604    UNUSED(pst);
605    UNUSED(suId);
606    UNUSED(secCfgCfm);
607
608    RETVALUE(ROK);
609
610 }
611
612
613 #ifdef ANSI
614 PUBLIC S16 PtDlUdxUeIdChgCfm
615 (
616 Pst * pst,
617 SuId suId,
618 U32 transId,
619 UdxUeInfo  * ueInfo,
620 CmStatus status
621 )
622 #else
623 PUBLIC S16 PtDlUdxUeIdChgCfm(pst, suId, transId, ueInfo, status)
624 Pst * pst;
625 SuId suId;
626 U32 transId;
627 UdxUeInfo  * ueInfo;
628 CmStatus status;
629 #endif
630 {
631
632    TRC3(PtDlUdxUeIdChgCfm)
633
634    UNUSED(pst);
635    UNUSED(suId);
636    UNUSED(transId);
637    UNUSED(ueInfo);
638    UNUSED(status);
639
640    RETVALUE(ROK);
641
642 }
643
644
645 #ifdef ANSI
646 PUBLIC S16 PtDlUdxCountCfm
647 (
648 Pst * pst,
649 SuId suId,
650 UdxCountCfmInfo * countCfm
651 )
652 #else
653 PUBLIC S16 PtDlUdxCountCfm(pst, suId, countCfm)
654 Pst * pst;
655 SuId suId;
656 UdxCountCfmInfo * countCfm;
657 #endif
658 {
659
660    TRC3(PtDlUdxCountCfm)
661
662    UNUSED(pst);
663    UNUSED(suId);
664    UNUSED(countCfm);
665
666    RETVALUE(ROK);
667
668 }
669
670
671 #ifdef ANSI
672 PUBLIC S16 PtDlUdxSduStaCfm
673 (
674 Pst * pst,
675 SuId suId,
676 UdxSduStaCfmInfo * staCfm
677 )
678 #else
679 PUBLIC S16 PtDlUdxSduStaCfm(pst, suId, staCfm)
680 Pst * pst;
681 SuId suId;
682 UdxSduStaCfmInfo * staCfm;
683 #endif
684 {
685
686    TRC3(PtDlUdxSduStaCfm)
687
688    UNUSED(pst);
689    UNUSED(suId);
690    UNUSED(staCfm);
691
692    RETVALUE(ROK);
693
694 }
695
696 #ifdef ANSI
697 PUBLIC S16 PtDlUdxDatResumeCfm
698 (
699 Pst * pst,
700 SuId suId,
701 UdxDatResumeCfmInfo * staCfm
702 )
703 #else
704 PUBLIC S16 PtDlUdxDatResumeCfm(pst, suId, staCfm)
705 Pst * pst;
706 SuId suId;
707 UdxDatResumeCfmInfo * staCfm;
708 #endif
709 {
710
711    TRC3(PtDlUdxDatResumeCfm)
712
713    UNUSED(pst);
714    UNUSED(suId);
715    UNUSED(staCfm);
716
717    RETVALUE(ROK);
718
719 }
720
721 #ifdef ANSI
722 PUBLIC S16 PtDlUdxDatForwardCfm
723 (
724  Pst               *pst,
725  SuId              suId,
726  UdxDatFwdCfmInfo  *datFwdCfm
727  )
728 #else
729 PUBLIC S16 PtDlUdxDatForwardCfm(pst, suId, datFwdCfm)
730    Pst               *pst;
731    SuId              suId;
732    UdxDatFwdCfmInfo  *datFwdCfm;
733 #endif
734 {
735
736    TRC3(PtDlUdxDatForwardCfm)
737
738    UNUSED(pst);
739    UNUSED(suId);
740    UNUSED(datFwdCfm); 
741
742    RETVALUE(ROK);
743 }
744 #endif /*--ifdef PTPJUDX--*/
745
746
747 #ifdef __cplusplus
748 }
749 #endif /* __cplusplus */
750 /********************************************************************30**
751          End of file
752 **********************************************************************/