Committing in PDCP code
[o-du/l2.git] / src / 5gnrpdcp / pj_dl.x
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 file 
22     
23         Type:    C include file
24   
25         Desc:    This file contains all the data structures and 
26                  prototypes for LTE PDCP.
27  
28         File:    pj_dl.x
29   
30 *********************************************************************21*/
31 /** @file pj_dl.x
32 @brief PDCP Product Structures, prototypes
33 */
34
35 #ifdef TENB_STATS
36 #include "pj_tenb_stats.x"   
37 #endif
38
39
40 #ifndef __PJ_DL_X__
41 #define __PJ_DL_X__
42
43 \f
44 /*
45  *     The structures and variables declared in this file
46  *     correspond to structures and variables used by
47  *     the following TRILLIUM software:
48  *
49  *     part no.             description
50  *     --------     ----------------------------------------------
51  *     1000371      LTE-RLC
52  *
53 */
54
55
56 #ifdef __cplusplus
57 extern "C" {
58 #endif /* __cplusplus */
59
60 typedef struct pjDlUeCb PjDlUeCb;
61 typedef struct pjDlRbCb PjDlRbCb;               /* PDCP RB control block */
62
63
64
65 /** @addtogroup dldata */
66 /*@{*/
67
68 /**
69  *  @brief
70  *  PDCP SDU Status Information for a DRB mapped to RLC AM.
71  */
72
73 typedef struct pjDlHoCfmInfo
74 {
75    U8         rbId;                     /*!< RB ID */
76    Bool       pres;                     /*!< Is handover info present for this RB */
77    U8         dir;                      /*!< Direction of the RB */
78    U8         res1;
79    U32        count;                    /*!< Count of the next SN to be assigned */
80 }PjDlHoCfmInfo;
81
82 /**
83  *  @brief
84  *  Handover information maintainned during processing of SduStaReq
85  */
86 typedef struct pjDlHoInfo
87 {
88    U32           transId;                   /*!< Transaction ID */
89    PjDlHoCfmInfo   *hoCfmInfo;                /*!< SDU Status Confirm */
90 }PjDlHoInfo;
91
92 /** @struct PjTxEnt
93 PDCP Tx Entry - SDU received from Relay */
94 typedef struct pjTxEnt
95 {
96    CmLList     lstEnt;                      /*!< List entry for SDU */
97    CmLList     datCfmEnt;                   /*!< List entry for SDU */
98    CmLList     sduSubmitEnt;                /*!< List entry for SDU */
99    CmLList     reEstPktEnt;                /*!< List entry for SDU */
100    U8          state;                       /*!< SDU state */
101    U8          res;                         /*!< reserved */
102    PjSn        sn;                          /*!< PDCP SN associated with this SDU */
103    U32         count;                       /*!< COUNT associated with this SDU */  
104    Data        *ciphDBuf;                   /*Pointer to flat buffer created for ciphering */
105    Buffer      *pdu;                        /*!< Pdu Buffer */
106    Buffer      *sdu;                        /*!< Sdu Buffer */
107 #ifdef FLAT_BUFFER_OPT
108    FlatBuffer  fb;
109 #endif
110    U32         sduId;                       /*!< SDU ID */
111    PjDlRbCb      *rbCb;
112    MsgLen         bufLen;
113 #ifdef LTE_L2_MEAS
114    EpcTime     epcTime;                     /*!< Arrival Time of the SDU for dl delay */
115 #endif
116 }PjTxEnt;
117
118 /** @struct PjDlCb 
119 PDCP downlink control block */
120 typedef struct pjDlCb
121 {
122    S16         discTmrInt;                  /*!< Discard timer Interval */
123    U32         txNext;                       /*!<indicates the COUNT value of the next PDCP SDU to be transmitted */
124    Bool        cfmReqd;                     /*!< Flag to indicate if
125                                                  confirmation is required for the
126                                                  SDUs delivered to the peer PDCP */
127    U8          res[3];                      /*!< reserved */
128    PjBuf       txBuf;                       /*!< Transmission buffer */
129    U32         count;                       /*!< DL COUNT associated with the
130                                                  recent SDU */
131    PjSn        sn;                          /*<Sn for PDCP SDU */
132    U32         nxtToSub;                    /*!< COUNT of the next PDU to be
133                                                  submitted to RLC */
134    U32         cfmExp;                      /*!< COUNT of the next PDU for which
135                                                  confirmation is expected */
136    CmTimer     discTmr;                     /*!< Discard timer */
137 #if (defined(PJ_SEC_ASYNC) || defined (PJ_CMP_ASYNC))
138    CmTimer     obdTmr;                      /*!< Offboard timer */
139    U32         obdCount;                    /*!< OBD Count */
140 #endif /* (defined(PJ_SEC_ASYNC) || defined (PJ_CMP_ASYNC)) */
141    CmLListCp   dlPktQ;                   /*!< Queues the message during
142                                              Re-establishment/Handover */ 
143    Buffer     *staRep;
144 }PjDlCb;
145 /*@}*/
146
147
148 /** @struct PjRbCb 
149 PDCP RB control block */
150 struct pjDlRbCb
151 {
152    CmLteRbId   rbId;                        /*!< RB Id for PDCP Cb */
153    U8          rbType;                      /*!< RB Type : 0 - PJ_SRB, 1 - PJ_DRB */
154    CmLteRlcMode mode;                       /*!< Mapped RLC entity's mode */
155    U8          dir;                         /*!< Direction for UL/DL/biderctional */
156    U8          snLen;                       /*!< Sequence number length */
157    U8          state;                       /*!< RB state - Used only for DRBs*/
158    PjSn        firstSn;                     /*!< SN of the first message sent
159                                                  for Integrity Protection */
160    PjRohc      rohc;                        /*!< ROHC Information */ 
161    PjCmpCxt    cmpCxt;                      /*!< Context for ROHC */
162    PTR         cmpCxtId;                    /*!< Context Id for ROHC */ 
163    Bool        firstDlMsg;                  /*!< Flag for firstDlMsg 
164                                                  Set to FALSE at start */
165    Bool        dropOnlyOne;              /*!< Indicates whether too many packets 
166                                                  are waiting on this RB */
167    U32         pktAdmitCnt;              /*!< Indicates how many packets 
168                                                  can be admitted */
169    U32         pktCnt;                   /*!< counts number of packets 
170                                                  admitted */
171 /* pj005.201 added support for L2 Measurement */
172 #ifdef LTE_L2_MEAS
173    U8          qci;                         /*!< QCI value associated with rb */
174    PjL2MeasRbCb rbL2Cb;                     /*!< L2 Meas Cb for RB */
175 #endif /* LTE_L2_MEAS */
176 /** @defgroup dldata DL Module Info 
177 */
178    PjDlCb      dlCb;                        /*!< Downlink PDCP RbCb */
179    PjDlUeCb    *ueCb;                       /*!< Pointer to the UE in which RB is present */
180    U32         maxTxSn;                     /*!< Sequence number length */
181    PjUeKey     key;                       /*!< Hash list key for UeCb */
182    CmLListCp   dlPktLst;                    /*!< List of DL packets */
183    U32         rbOverloadCnt;              /*!< Count to track consecutive PDB breach report on an RB*/ 
184 };
185
186 /** @brief SDU Confirmation Structure from RLC */
187 typedef struct pjDatCfm
188 {
189    CmLteRlcId        rlcId;                 /*!< RLC identifier */
190    U32               numSdu;                /*!< Number of SDUs */
191    U32               sduId[PJ_MAX_DAT_CFM]; /*!< SDU Id Array */
192 }PjDatCfm;
193
194
195 /** @struct PjUeCb
196 UE control block */
197 struct pjDlUeCb
198 {
199    CmHashListEnt ueHlEnt;                   /*!< Hash list entry for UeCb */
200    Inst          inst;
201    PjUeKey       key;                       /*!< Hash list key for UeCb */ 
202    U8            numSrbs;
203    U8            numDrbs;
204    PjDlRbCb     *srbCb[PJ_MAX_SRB_PER_UE]; /*!< SRB RbCbs within a UE */ 
205    PjDlRbCb     *drbCb[PJ_MAX_DRB_PER_UE]; /*!< DRB RbCbs within a UE */ 
206    PjSec         secInfo;                   /*!< Security Info */
207    PjDlHoInfo      *hoInfo;                   /*!< SDU Status Confirm */
208    PjLibInfo     libInfo;                   /*!< Hook Info - to wait for
209                                                  Init Cfm */
210    U32            waitForReEstTrig;
211
212 /* pj005.201 added support for L2 Measurement */
213 #ifdef LTE_L2_MEAS
214    U16           numActRb[LPJ_MAX_QCI]; /* number of RBs Active */
215 #endif /* LTE_L2_MEAS */
216 #ifdef TENB_STATS
217    TSL2UeStatsCb   *tenbStats; /*!< UE Stats Holder */
218 #endif
219 };
220
221 typedef struct pjDlPkt
222 {
223    CmLList lnk;
224    U8      type;
225    U32     sduId;
226    PjSn    sn;
227    Buffer  *pdu;
228 #ifdef FLAT_BUFFER_OPT
229    FlatBuffer  fb;
230 #endif
231 } PjDlPkt;
232
233 /* CFG Module */
234 EXTERN S16 pjCfgAddDlRb ARGS ((PjCb *gCb,CmLteRnti  ueId,CmLteCellId  cellId,
235             U8 isHo, UdxCfgEnt  *entCfg, PjDlUeCb **ueCb,UdxCfmEnt  *entCfm ));
236
237 EXTERN S16 pjCfgReCfgDlRb ARGS ((PjCb *gCb,PjDlUeCb *ueCb,
238                           UdxCfgEnt *entCfg, UdxCfmEnt *entCfm));
239
240 EXTERN S16 pjCfgDelDlRb ARGS ((PjCb *gCb,PjDlUeCb *ueCb,
241                         UdxCfgEnt *entCfg,UdxCfmEnt *entCfm));
242
243 EXTERN S16 pjCfgReEstDlRb ARGS ((
244 PjCb             *gCb,
245 PjDlUeCb         *ueCb,
246 UdxCfgEnt         *entCfg,
247 UdxCfmEnt         *entCfm
248 ));
249
250 EXTERN S16 pjCfgDelDlUe ARGS ((
251 PjCb             *gCb,
252 PjDlUeCb         *ueCb,
253 UdxCfgEnt         *entCfg,
254 UdxCfmEnt         *entCfm
255 ));
256
257 EXTERN S16 pjCfgPrcSecDlCfg ARGS ((
258 PjCb             *gCb,
259 UdxSecCfgReqInfo *secCfg,
260 UdxSecCfgCfmInfo *cfgCfm
261 ));
262
263 EXTERN S16 pjCfgDlUeIdChng ARGS((
264 PjCb      *gCb,
265 UdxUeInfo *ueInfo,
266 UdxUeInfo *newUeInfo,
267 CmStatus  *status
268 ));
269
270 EXTERN S16 pjCfgPrcDlCount ARGS ((
271 PjCb                  *gCb,
272 UdxCountReqInfo       *countReq,
273 UdxCountCfmInfo       *countCfm
274 ));
275
276 EXTERN S16  pjCfgDelPjDlRbCb ARGS ((
277 PjCb                  *gCb,
278 PjDlUeCb               *ueCb,
279 PjDlRbCb                 *rbCb
280 ));
281
282
283 EXTERN  S16 pjCfgDlReEstReq ARGS ((
284 PjCb                  *gCb,
285 UdxReEstReqInfo *reEstReq,
286 UdxReEstCfmInfo   *reEstCfm
287 ));
288 /* DB Module */
289 EXTERN S16 pjDbmInsTxEnt  ARGS ((
290 PjCb        *gCb,
291 PjBuf       *buf,             
292 PjTxEnt     *txEnt       
293 ));
294 EXTERN S16 pjDbmDlBufInit ARGS ((  
295 PjCb        *gCb,
296 PjBuf       *buf,            /* !< Rx/Tx Buffer */
297 U8          numBins          /* !< number of Bins */
298 ));
299
300 EXTERN PjTxEnt* pjDbmGetTxEnt ARGS ((
301 PjCb        *gCb,
302 PjBuf       *buf,        
303 U32          count      
304 ));
305 EXTERN PjTxEnt* pjDbmGetTxEntSn ARGS ((
306 PjCb        *gCb,
307 PjBuf       *buf,      
308 U16          sn          
309 ));
310 EXTERN S16 pjDbmDelTxEnt  ARGS ((
311 PjCb        *gCb,
312 PjBuf       *buf,    
313 U32         count     
314 ));
315 EXTERN S16 pjDbmTxDelAll ARGS((
316 PjCb        *gCb,
317 PjBuf *buf       
318 ));
319 EXTERN S16 pjDbmTxDeInit ARGS ((
320 PjCb        *gCb,
321 PjBuf *buf       
322 ));
323
324 EXTERN S16 pjDbmFetchDlUeCb ARGS ((
325 PjCb        *gCb,
326 CmLteRnti         ueId,       /* UE Identifier */
327 CmLteCellId       cellId,     /* Cell Identifier */
328 PjDlUeCb            **ueCb       /* UE Control Block */
329 ));
330
331 EXTERN S16 pjDbmCreateDlUeCb ARGS ((
332 PjCb        *gCb,
333 CmLteRnti         ueId,       /* UE Identifier */
334 CmLteCellId       cellId,     /* Cell Identifier */
335 PjDlUeCb            **ueCb       /* UE Control Block */
336 ));
337 EXTERN  PjDlRbCb* pjDbmCreateDlRbCb ARGS ((
338 PjCb        *gCb,
339 U8      rbId,
340 U8      rbType,
341 PjDlUeCb  *ueCb,
342 U8      rb
343 ));
344 EXTERN  S16 pjDbmDelDlRbCb ARGS ((
345 PjCb        *gCb,
346 U8      rbId,
347 U8      rbType,
348 PjDlRbCb   **rbCb,
349 U8      rb,
350 PjDlUeCb  *ueCb
351 ));
352
353 EXTERN S16 pjDbmDelDlUeCb  ARGS((
354 PjCb        *gCb,
355 PjDlUeCb      *ueCb,       /* UE Identifier */
356 Bool        abortFlag    /* Abort Flag */
357 ));
358
359 EXTERN S16 pjDbmFetchDlRbCb ARGS((
360 PjCb           *gCb,
361 CmLteRlcId     rlcId,      /* RLC Identifier */
362 PjDlRbCb       **rbCb       /* RB Cb */
363 ));
364
365 EXTERN S16 PjDbmDelAllDlUe ARGS((PjCb *gCb));
366 EXTERN S16 pjDbmDelAllDlRb ARGS((
367 PjCb        *gCb,
368 PjDlRbCb         **rbCbLst,              /* RB Cb list */
369 U8             numRbCb                 /* Number of rbCbs */
370 ));
371
372 EXTERN S16 pjDbmDlInit  ARGS (( PjCb *gCb));
373 EXTERN S16 pjDbmDlDeInit  ARGS (( PjCb *gCb));
374 EXTERN S16 pjDbmDlShutdown ARGS((PjCb *gCb));
375
376 EXTERN S16 pjDlUtlCmpReset ARGS(( 
377 PjCb        *gCb,
378 PjDlRbCb      *pjRbCb                 /* Context to be reset for compression */
379 ));
380
381 /* UTL Module */
382 EXTERN S16 pjUtlDlCmpInit ARGS((
383 PjCb        *gCb,
384 PjDlRbCb   *pjRbCb                  /* PDCP RbCb */
385 ));
386 EXTERN S16 pjUtlDlIntInit ARGS((
387 PjCb        *gCb,
388 PjDlUeCb   *ueCb                   /* UE CB Ptr */
389 ));
390 EXTERN S16 pjUtlDlCpInit ARGS((
391 PjCb        *gCb,
392 PjDlUeCb   *ueCb                    /* UE CB Ptr */
393 ));
394 EXTERN S16 pjUtlDlUpInit ARGS((
395 PjCb        *gCb,
396 PjDlUeCb   *ueCb                    /* UE CB Ptr */
397 ));
398 EXTERN S16 pjUtlDlCmpReset ARGS((
399 PjCb        *gCb,
400 PjDlRbCb      *pjRbCb                 /* Context to be reset for compression */
401 ));
402 EXTERN S16 pjUtlCmpReq ARGS((
403 PjCb        *gCb,
404 PjDlRbCb   *pjRbCb,                 /* PDCP RbCb */
405 Buffer   *mBuf,                   /* SDU to be compressed */
406 Buffer   **opSdu,                 /* Compressed SDU */
407 U32      count                    /* COUNT - transaction Id */
408 ));
409 EXTERN S16 pjUtlIntProtReq ARGS((
410 PjCb        *gCb,
411 PjDlRbCb   *pjRbCb,                 /* PDCP RbCb */
412 PjSecInp secInp ,                 /* Input parameters for integrity */ 
413 Buffer   **mBuf                   /* SDU to be compressed */
414 ));
415 EXTERN S16 pjUtlCipherReq ARGS((
416 PjCb        *gCb,
417 PjDlRbCb   *pjRbCb,               /* PDCP RbCb */
418 U32      count,                   /* COUNT associated with SDU/PDU */ 
419 Buffer   *mBuf,                   /* Data to be ciphered */
420 Buffer   **opSdu                  /* ciphered SDU */
421 ));
422
423 #ifdef FLAT_BUFFER_OPT
424 EXTERN S16 pjUtlCipherReqFB ARGS((
425 PjCb       *gCb,
426 PjDlRbCb   *pjRbCb,                 /* PDCP RbCb */
427 U32        count,                   /* COUNT associated with SDU/PDU */ 
428 FlatBuffer *mBuf,                   /* Data to be deciphered */
429 Buffer   **opSdu                    /* Deciphered SDU */ 
430 ));
431 #endif
432
433 EXTERN S16 pjUtlDlCmpClose ARGS((
434 PTR      cmpCxtId                 /* ROHC Context to be closed */
435 ));
436 EXTERN S16 pjUtlDlIntClose ARGS((
437 PjCb     *gCb,
438 Void     *intCxtId            /* Handle to be closed */
439 ));
440
441 EXTERN S16 pjUtlDlCipherClose ARGS((
442 PjCb     *gCb,
443 Void     *cpCxtId                  /* Context Id for Ciphering to be closed */
444 ));
445 EXTERN S16 pjUtlDlReEstSrb1 ARGS((
446 PjCb        *gCb,
447 PjDlRbCb      *pjRbCb                    /* PDCP Control Block Pointer */
448 ));
449 EXTERN S16 pjUtlDlReEstStart ARGS((
450 PjCb        *gCb,
451 PjDlUeCb         *ueCb,          /* UE Control Block Pointer */
452 UdxCfgReqInfo  *cfgReq         /* CfgReq for Reestablishment */
453 ));
454 EXTERN S16 pjUtlDlReEstHOStart ARGS((
455 PjCb        *gCb,
456 PjDlUeCb      *ueCb,           /* Number of RBs undergoing reestablishment*/ 
457 U32         transId,          /* Transaction id of Sdu Status cfm */
458 U32       waitForHoTrig
459 ));
460 EXTERN S16 pjUtlDlReEstReconfig ARGS((
461 PjCb        *gCb,
462 PjDlUeCb       *ueCb           /* UE Control Block */ 
463 ));
464 EXTERN S16 pjUtlDlReEstDl ARGS((
465 PjCb        *gCb,
466 PjDlUeCb       *ueCb           /* UE Control Block */ 
467 ));
468 EXTERN S16 pjUtlDlSndReEstCfgCfm ARGS((
469 PjCb        *gCb,
470 PjDlUeCb       *ueCb           /* UE Control Block */ 
471 ));
472 EXTERN S16 pjUtlDlSndSduStaCfm ARGS((
473 PjCb        *gCb,
474 PjDlUeCb       *ueCb           /* UE Control Block */ 
475 ));
476 EXTERN S16 pjUtlDlShutdown ARGS((
477 PjCb        *gCb
478 ));
479 EXTERN Void pjUtlDlFreeRb ARGS((
480 PjCb        *gCb,
481 PjDlRbCb *pjRbCb
482 ));
483 /* kw005.201 added function to send data forward indication mesage */
484 EXTERN S16 pjUtlDlSndDatFwdInd ARGS((
485 PjCb        *gCb,
486 PjDlRbCb           *pjRbCb,
487 PjuDatFwdIndInfo *datFwdInd
488 ));
489
490 EXTERN S16 pjUtlDlHdlObdInitCfm ARGS((
491 PjCb        *gCb,
492 PjDlUeCb    *ueCb,           /* Pointer to UeCb */ 
493 U16         txIdx,           /* Transaction Index for UeCb */
494 U8          cfmType,         /* Confirm type */
495 U8          maskVal          /* mask value */
496 ));
497 EXTERN S16 pjUtlDlHdlInitObdTmrExp ARGS((
498 PjCb      *gCb,
499 PjDlUeCb *ueCb
500 ));
501
502 EXTERN S16 pjCfgPrcDlSduSta ARGS((
503 PjCb        *gCb,
504 UdxSduStaReqInfo *staReq   
505 ));
506
507 EXTERN S16 pjUtlDlSaveCfmInfo  ARGS((
508 PjCb        *gCb,
509 PjDlUeCb      *ueCb,           /* Pointer to UeCb */ 
510 U8          cfmType,         /* Confirm type */
511 Bool        startTmr,        /* Whether to start timer */
512 U8          entity,          /* Confirm type */
513 PTR         cfmPtr,          /* Pointer to the structure for confirm */
514 PTR         cfgPtr           /* Pointer to the structure for request */
515 ));
516
517 /* DL Module */
518 EXTERN S16 pjDlmProcessSdus ARGS ((
519 PjCb        *gCb,
520 PjDlRbCb *pjRbCb, 
521 Buffer *sdu,
522 U32    sduId,
523 U32    count
524 ));
525
526 EXTERN S16 pjDlmProcDrb ARGS ((
527 PjCb        *gCb,
528 PjDlRbCb  *pjRbCb,
529 PjTxEnt *txEnt
530 ));
531
532 #ifdef FLAT_BUFFER_OPT
533 EXTERN S16 pjDlmProcDrbFB ARGS ((
534 PjCb        *gCb,
535 PjDlRbCb  *pjRbCb,
536 PjTxEnt *txEnt
537 ));
538 #endif
539
540 EXTERN S16 pjDlmProcSrb ARGS ((
541 PjCb        *gCb,
542 PjDlRbCb  *pjRbCb,
543 PjTxEnt *txEnt
544 ));
545 EXTERN Void pjDlmReEstSrb ARGS ((
546 PjCb        *gCb,
547 PjDlRbCb *pjRbCb
548 ));
549
550 EXTERN S16 pjDlmReEstDrbUm ARGS ((
551 PjCb        *gCb,
552 PjDlRbCb *pjRbCb
553 ));
554
555 EXTERN S16 pjDlmReEstDrbAm ARGS ((
556 PjCb        *gCb,
557 PjDlRbCb *pjRbCb
558 ));
559 EXTERN S16 pjDlmProcessCfm ARGS ((
560 PjCb        *gCb,
561 PjDlRbCb        *pjRbCb,
562 PjDatCfm      *pjDatCfm,
563 U8            cfmType
564 ));
565 EXTERN S16 pjDlmHndlStaRep ARGS ((
566 PjCb        *gCb,
567 PjDlRbCb   *pjRbCb,
568 PjSn     fms,
569 Buffer   *staPdu
570 ));
571 EXTERN S16 pjDlmReEstHoDrbAm ARGS ((
572 PjCb        *gCb,
573 PjDlRbCb *pjRbCb
574 ));
575 EXTERN S16 pjDlmHdlDatFwdReq ARGS ((
576 PjCb        *gCb,
577 PjDlRbCb  *pjRbCb,
578 PjuDatFwdReqInfo *datFwdReq
579 ));
580 EXTERN S16 pjDlmDeliverPdu ARGS ((
581 PjCb        *gCb,
582 PjDlRbCb     *pjRbCb,
583 PjTxEnt    *txEnt
584 ));
585 EXTERN S16 pjDlmObdTmrExp ARGS ((
586 PjCb        *gCb,
587 PjDlRbCb     *pjRbCb
588 ));
589 EXTERN  S16 pjDlmHdlIntProt ARGS ((
590 PjCb        *gCb,
591 PjDlRbCb  *pjRbCb,
592 PjTxEnt *txEnt
593 ));
594 EXTERN S16 pjDlmHdlCmp ARGS (( 
595 PjCb        *gCb,
596 PjDlRbCb  *pjRbCb,
597 PjTxEnt *txEnt
598 ));
599
600 #ifdef FLAT_BUFFER_OPT
601 EXTERN S16 pjDlmHdlCmpFB ARGS (( 
602 PjCb        *gCb,
603 PjDlRbCb  *pjRbCb,
604 PjTxEnt *txEnt
605 ));
606 #endif
607
608 EXTERN S16 pjDlmHdlCiph ARGS ((
609 PjCb        *gCb,
610 PjDlRbCb  *pjRbCb,
611 PjTxEnt *txEnt
612 ));
613
614 #ifdef FLAT_BUFFER_OPT
615 EXTERN S16 pjDlmHdlCiphFB ARGS ((
616 PjCb        *gCb,
617 PjDlRbCb  *pjRbCb,
618 PjTxEnt *txEnt
619 ));
620 #endif
621
622 EXTERN S16 pjDlmDiscTmrExp ARGS ((
623 PjCb        *gCb,
624 PjDlRbCb  *pjRbCb
625 ));
626
627 EXTERN S16 pjDlmSendDatReq ARGS(( PjCb *gCb, PjDlRbCb *pjRbCb, U32 sduId, 
628                                 Buffer *mBuf));
629 EXTERN S16 pjDlmSendDiscSdu ARGS(( PjCb *gCb, PjDlRbCb  *pjRbCb, U32 sduId));
630
631 EXTERN Void pjLimDatCfm ARGS((
632 PjCb          *gCb,
633 PjDlRbCb      *pjRbCb,
634 PjDatCfm    *datCfm 
635 ));
636 EXTERN S16 pjUtlReEstDl ARGS (( 
637 PjCb        *gCb,
638 PjDlUeCb       *ueCb           /* UE Control Block */
639 ));
640
641 EXTERN Void pjLimStaInd  ARGS((
642 PjCb        *gCb,
643 PjDlRbCb    *pjRbCb,
644 PjDatCfm    *staInd
645 ));
646
647 EXTERN S16 pjDbmFetchPjDlRbCb ARGS((
648 PjDlUeCb           *ueCb,
649 U8      rbId,
650 U8      rbType,
651 PjDlRbCb      **pjRbCb
652 ));
653
654 EXTERN Void pjDlmProcessDlPktQ ARGS((
655 PjCb       *gCb,
656 PjDlRbCb   *pjRbCb           /* !< PDCP Control Block */
657 ));
658
659 EXTERN Void pjDlmEnqueueDlPkt ARGS((
660 PjCb               *gCb, 
661 PjDlRbCb           *pjRbCb,          /* !< PDCP Control Block */
662 U8                 datType,
663 PjuDatFwdReqInfo   *datFwd,          /* !< SN value of PDU */
664 PjuSduId           sduId,
665 Buffer             *pdu              /* !< PDU message buffer */
666 ));
667
668 #ifdef FLAT_BUFFER_OPT
669 EXTERN Void pjDlmEnqueueDlPktFB ARGS((
670 PjCb               *gCb, 
671 PjDlRbCb           *pjRbCb,          /* !< PDCP Control Block */
672 U8                 datType,
673 PjuDatFwdReqInfo   *datFwd,          /* !< SN value of PDU */
674 PjuSduId           sduId,
675 FlatBuffer         *pdu             /* !< Flat Buffer PDU */ 
676 ));
677
678 EXTERN Void pjDlmRbDataResumeFB ARGS((
679 PjCb   *gCb,
680 PjDlRbCb *pjRbCb
681 ));
682
683 EXTERN Void pjDlmProcessDlPktQFB ARGS((
684 PjCb       *gCb,
685 PjDlRbCb   *pjRbCb           /* !< PDCP Control Block */
686 ));
687
688 EXTERN S16 pjDlmStartDataFrwdPerRbFB ARGS((
689 PjCb       *gCb,
690 PjDlRbCb   *pjRbCb
691 ));
692
693 #endif
694
695 EXTERN S16 pjDlmStartDataFrwdPerRb ARGS((
696 PjCb       *gCb,
697 PjDlRbCb   *pjRbCb
698 ));
699
700 EXTERN S16 pjDlmHndlDatFwdReq ARGS((
701 PjCb               *gCb,
702 PjDlRbCb           *pjRbCb,
703 PjuDatFwdReqInfo   *datFwdReq
704 ));
705
706 EXTERN S16 pjUtlDlUpdUpSecKeys ARGS((
707 PjCb       *gCb,
708 PjDlUeCb   *ueCb           /* UE Control Block */ 
709 ));
710
711 EXTERN S16 pjUtlDlUpdCpSecKeys ARGS((
712 PjCb       *gCb,
713 PjDlUeCb   *ueCb           /* UE Control Block */ 
714 ));
715
716 EXTERN S16 pjUtlDlReEstHO ARGS((
717 PjCb              *gCb,
718 PjDlUeCb          *ueCb           /* Number of RBs undergoing reestablishment*/ 
719 ));
720
721 EXTERN Void pjUtlEmptyDlPktList ARGS((
722 PjCb *gCb, 
723 PjDlRbCb *pjRbCb));
724
725 EXTERN Void pjDlmRbDataResume ARGS((
726 PjCb   *gCb,
727 PjDlRbCb *pjRbCb
728 ));
729
730 EXTERN PUBLIC S16 pjDlmHdlNullCiph ARGS((
731 PjCb       *gCb,
732 PjDlRbCb     *pjRbCb,
733 PjTxEnt    *txEnt
734 ));
735
736 #ifdef FLAT_BUFFER_OPT
737 EXTERN PUBLIC S16 pjDlmProcessSdusFB ARGS((
738 PjCb   *gCb,
739 PjDlRbCb *pjRbCb,                   
740 FlatBuffer *sdu,                      
741 U32    sduId,                      
742 U32        count
743 ));
744
745 EXTERN PUBLIC S16 pjUtlConvFbToBuf ARGS((
746 PjCb       *gCb,
747 FlatBuffer *fb,
748 Buffer     **mBuf
749 ));
750
751 EXTERN PUBLIC S16 pjUtlCopyFbToBuf ARGS((
752 PjCb       *gCb,
753 FlatBuffer *fb,
754 Buffer     **mBuf
755 ));
756 #endif
757
758 #ifdef LTE_L2_MEAS
759 S16 pjUtlL2MeasDlInit(PjCb *gCb);
760
761 EXTERN Void pjUtlResetDlL2MeasCntr ARGS((
762 PjCb         *gCb,
763 PjL2MeasCb   *measCb,
764 U8           measType
765 ));
766
767 EXTERN Void pjUtlPlcMeasDatInDlL2Sts ARGS((
768 PjL2Cntr       *measData, 
769 PjL2MeasRbCb   *rbL2Cb,
770 U8             measType
771 ));
772 S16 pjUtlSndDlL2MeasCfm  ARGS ((PjCb *gCb, PjL2MeasEvtCb *measEvtCb));
773
774 #endif
775
776
777 void DumpPDCPDlDebugInformation(void);
778 void dumpPDCPDlRbInformation(PjDlRbCb* dlRbCb, U16 ueId);
779 void ResetPDCPStats(void);
780 void PrintPDCPStats(void);
781 EXTERN Void pjDeInitCiphQ(Void);
782 #ifdef __cplusplus
783 }
784 #endif /* __cplusplus */
785
786 #endif /* __PJX__ */
787
788 \f  
789 /********************************************************************30**
790   
791          End of file
792 **********************************************************************/