Committing in PDCP code
[o-du/l2.git] / src / 5gnrpdcp / pj_udx_dl.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 Functions
22     
23         Type:    C file
24   
25         Desc:    Source code for PDCP Upper Interface Module
26                  This file contains following functions
27       
28         --PjDlUdxBndReq
29         --PjDlUdxUbndReq
30         --PjDlUdxCfgReq
31         --PjDlUdxUeIdChgReq
32         --PjDlUdxReEstReq
33         --PjDlUdxSecCfgReq
34         --PjDlUdxSduStaReq
35      
36
37      File:     pj_udx_dl.c
38
39 **********************************************************************/
40 static const char* RLOG_MODULE_NAME="PDCP";
41 static int RLOG_MODULE_ID=1024;
42 static int RLOG_FILE_ID=225;
43 /** @file pj_udx_dl.c
44 @brief PDCP Upper Interface Module 
45 */
46
47 \f
48 /* header (.h) include files */
49 #include "envopt.h"        /* environment options */
50 #include "envdep.h"        /* environment dependent */
51 #include "envind.h"        /* environment independent */
52
53 #include "gen.h"           /* general */
54 #include "ssi.h"           /* system services */
55 #include "cm5.h"           /* common timer defines */
56 #include "cm_tkns.h"       /* common tokens defines */
57 #include "cm_mblk.h"       /* common memory allocation library defines */
58 #include "cm_llist.h"      /* common link list  defines  */
59 #include "cm_hash.h"       /* common hash list  defines */
60 #include "cm_lte.h"        /* common LTE defines */
61 #include "lpj.h"           /* LPJ define */
62 #include "cpj.h"           /* RRC layer */
63 #include "pju.h"           /* PDCP service user */
64 #include "pj_env.h"        /* RLC environment options */
65 #include "pj.h"            /* RLC defines */
66 #include "pj_dl.h"
67 #include "pj_udx.h"
68
69 /* extern (.x) include files */
70 #include "gen.x"           /* general */
71 #include "ssi.x"           /* system services */
72
73 #include "cm5.x"           /* common timer library */
74 #include "cm_tkns.x"       /* common tokens */
75 #include "cm_mblk.x"       /* common memory allocation */
76 #include "cm_llist.x"      /* common link list */
77 #include "cm_hash.x"       /* common hash list */
78 #include "cm_lte.x"        /* common LTE includes */
79 #include "cm_lib.x"        /* common memory allocation library */
80 #include "lpj.x"           /* LM(PDCP) */
81 #include "cpj.x"           /* RRC layer */
82 #include "pju.x"           /* PDCP service user */
83 #include "pj_err.h"
84 #include "pj.x"
85 #include "pj_udx.h"          /* LIB */
86 #include "pj_udx.x"          /* LIB */
87 #include "pj_dl.x"
88 #include "pj_udx.x"
89
90 /* kw004.201 Assigned build issue in LTE RLC pj_uim.c */
91 #include "pj_lib.x"
92
93
94 /*****************************************************************************
95  *                          UDX INTERFACE
96  ****************************************************************************/
97 /**
98  *
99  * @brief 
100  *
101  *        Handler for binding the PDCP upper layer service user with 
102  *        the PDCP layer.
103  *
104  * @b Description:
105  *
106  *        1. This function is used by PDCP user to request for binding to 
107  *        PDCP. @n
108  *        2. This function is called by the UDX interface to bind 
109  *        PDCP's SAP (identified by spId) with the service user's
110  *        SAP (identified by suId). @n
111  *
112  *  @param[in] pst   Post structure  
113  *  @param[in] suId  Service user SAP ID 
114  *  @param[in] spId  Service provider ID
115  *
116  *  @return  S16
117  *      -# ROK 
118  *
119  */
120 #ifdef ANSI
121 PUBLIC S16 PjDlUdxBndReq 
122 (
123 Pst  *pst,   
124 SuId suId,  
125 SpId spId   
126 )
127 #else
128 PUBLIC S16 PjDlUdxBndReq (pst, suId, spId)
129 Pst *pst;    
130 SuId suId;   
131 SpId spId;   
132 #endif
133 {
134    PjUdxDlSapCb      *udxSap;            /* pointer to session SAP */
135    S16             ret;                /* return value */
136    PjCb            *tPjCb;
137
138    TRC3(PjDlUdxBndReq)
139
140    ret = ROK;
141
142    tPjCb = PJ_GET_PJCB(pst->dstInst);
143
144    RLOG2(L_DEBUG, "PjDlUdxBndReq(pst, spId(%d), suId(%d))", spId, suId);
145
146    udxSap = (tPjCb->u.dlCb->udxDlSap + spId);
147
148    /* Verify UDX SAP State */
149    switch(udxSap->state)
150    {
151       /* SAP is configured but not bound */
152       case PJ_SAP_CFG:
153       case PJ_SAP_UBND:
154       {
155          /* copy bind configuration parameters in SSAP sap */
156          udxSap->suId = suId;
157          udxSap->pst.dstProcId = pst->srcProcId;
158          udxSap->pst.dstEnt = pst->srcEnt;
159          udxSap->pst.dstInst = pst->srcInst;
160
161          /* Update the State */
162          udxSap->state = PJ_SAP_BND;
163
164          RLOG1(L_DEBUG, "PjDlUdxBndReq: state (%d)", udxSap->state);
165          break;
166       }
167
168       /* SAP is already bound */
169       case PJ_SAP_BND:
170       {
171          /* 
172           * Sap is already bound check source, destination Entity and 
173           * Proc Id
174           */
175          if (udxSap->pst.dstProcId != pst->srcProcId 
176                || udxSap->pst.dstEnt != pst->srcEnt
177                || udxSap->pst.dstInst != pst->srcInst
178                || udxSap->suId != suId)
179          {
180
181             RLOG1(L_DEBUG, "PjDlUdxBndReq: SAP already bound -- state(%d)", 
182                          udxSap->state);
183             ret = RFAILED;
184          }
185          break;
186       }
187
188      default:
189       {
190          RLOG0(L_ERROR, "Invalid UDX DL SAP State in Bind Req");
191          ret = RFAILED;
192          break;
193       }
194    }
195
196    if (ret == ROK)
197    {
198       PjDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_OK);
199    }
200    else
201    {
202       PjDlUdxBndCfm(&(udxSap->pst), udxSap->suId, CM_BND_NOK);
203    }
204
205    RETVALUE(ROK);
206 } /* PjDlUdxBndReq */
207
208 \f
209 /**
210  *
211  * @brief 
212  *
213  *        Handler for unbinding the RLC upper layer service user UDX with 
214  *        the RLC layer.
215  *
216  * @b Description:
217  *
218  *        1. This function is used by RLC user to request for unbinding  
219  *        with RLC. @n
220  *        2. This function is called by the UDX interface to 
221  *        unbind with RLC. @n
222  *
223  *  @param[in] pst     Post structure  
224  *  @param[in] spId    Service provider SAP ID 
225  *  @param[in] reason  Reason for Unbinding 
226  *
227  *  @return  S16
228  *      -# ROK 
229  *
230  */
231 #ifdef ANSI
232 PUBLIC S16 PjDlUdxUbndReq
233 (
234 Pst      *pst,            
235 SpId     spId,           
236 Reason   reason           
237 )
238 #else
239 PUBLIC S16 PjDlUdxUbndReq(pst, spId, reason)
240 Pst      *pst;       
241 SpId     spId;      
242 Reason   reason;      
243 #endif
244 {
245    PjUdxDlSapCb  *udxSap;            /* UDX SAP control block */
246    PjCb   *tPjCb;
247
248    TRC3(PjDlUdxUbndReq)
249
250    tPjCb = PJ_GET_PJCB(pst->dstInst);
251    RLOG2(L_DEBUG, "PjDlUdxUbndReq(pst, spId(%d), reason(%d))", spId, reason);
252
253    UNUSED(pst);
254    UNUSED(reason);
255
256    /* disable upper sap (UDX) */
257    udxSap = &(tPjCb->u.dlCb->udxDlSap[0]);
258
259    udxSap->state = PJ_SAP_CFG;
260
261    RETVALUE(ROK);
262 } /* PjDlUdxUbndReq */
263
264
265 /**
266  *
267  * @brief 
268  *
269  *        Handler for Sending the PDCP Status Report.
270  *
271  * @b Description:
272  *
273  *        This function is used by PDCP-DL to send PDCP Status Report. 
274  *
275  *  @param[in] pst   -  Post structure  
276  *  @param[in] spId  -  Serive Provider ID 
277  *  @param[in] staRep   -  PDCP Status Report. 
278  *
279  *  @return  S16
280  *      -# ROK 
281  *
282  */
283 #ifdef ANSI
284 PUBLIC S16 PjDlUdxUlStaRep
285 (
286 Pst             *pst,
287 SpId            spId,
288 UdxUlStaRepInfo   *staRep
289 )
290 #else
291 PUBLIC S16 PjDlUdxUlStaRep(pst, spId, staRep)
292 Pst            *pst;
293 SpId           spId;
294 UdxUlStaRepInfo  *staRep;
295 #endif
296 {
297    PjCb                 *tPjCb;
298    PjDlUeCb             *ueCb;
299    PjDlRbCb             *tRbCb;
300    PjUdxDlSapCb         *udxSap;       /* UDX SAP Control Block */
301    S16                  ret;           /* Return Value */
302    
303    TRC3(PjDlUdxUlStaRep);
304
305    ret = ROK;
306
307    tPjCb = PJ_GET_PJCB(pst->dstInst);
308 #ifndef ALIGN_64BIT
309    RLOG1(L_DEBUG, "PjDlUdxUlStaRep(pst, spId(%d))", spId);
310 #else
311    RLOG1(L_DEBUG, "PjDlUdxUlStaRep(pst, spId(%d))", spId);
312 #endif
313
314    /* Get the udxSap */
315    udxSap = (tPjCb->u.dlCb->udxDlSap + spId);
316
317    /* Validate SAP ID under ERRORCLS */
318    PJ_VALDATE_SAP(tPjCb,spId, udxSap, ret);
319    if (ret != ROK)
320    {
321       /* pj002.201 Freeing from proper region */
322       PJ_FREE_BUF(staRep->sta);
323       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staRep, sizeof(UdxUlStaRepInfo));
324       RETVALUE(RFAILED);
325    }
326
327    /* Fetch Ue Cb */
328    ret = pjDbmFetchDlUeCb(tPjCb, staRep->pdcpId.ueId, staRep->pdcpId.cellId, &ueCb);
329
330    /* Ue Cb is not present */
331    if( ROK != ret || NULLP == ueCb)
332    {
333       RLOG_ARG1(L_ERROR, DBG_CELLID, staRep->pdcpId.cellId,"UeId[%u] not found",
334             staRep->pdcpId.ueId);
335       PJ_FREE_BUF(staRep->sta);
336       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staRep, sizeof(UdxUlStaRepInfo));
337       RETVALUE(ret);
338    }
339
340    /* Fetch Rb Cb */
341    PJ_DBM_FETCH_DL_RBCB(staRep->pdcpId.rbId, staRep->pdcpId.rbType, ueCb, tRbCb);
342
343    /* Rb Cb is not present or Rb Cb is not configured for PDCP */
344    if( NULLP == tRbCb )
345    {
346       RLOG_ARG2(L_WARNING, DBG_UEID,staRep->pdcpId.ueId, "CellId[%u]:RbId[%d] not found",
347             staRep->pdcpId.cellId, staRep->pdcpId.rbId);
348       PJ_FREE_BUF(staRep->sta);
349       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staRep, sizeof(UdxUlStaRepInfo));
350       RETVALUE(RFAILED);
351    }
352    
353    /* This will go to the RLC as a datReq. So we will get a confirm for it
354        * we have to make sure that the count does not clash with the existing
355        * counts. So pick a value that is least expected to clash. */
356    if (tRbCb->state != PJ_STATE_NORMAL)
357    {
358       if (tRbCb->dlCb.staRep != NULL)
359       {
360         PJ_FREE_BUF(tRbCb->dlCb.staRep); 
361       }
362       tRbCb->dlCb.staRep = staRep->sta;
363    }
364    else
365    {
366       pjDlmSendDatReq(tPjCb,tRbCb,0xffffffff, staRep->sta);
367    }
368    
369    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staRep, sizeof(UdxUlStaRepInfo));
370
371    RETVALUE(ROK);
372 } /* PjDlUdxUlStaRep */
373
374 /**
375  *
376  * @brief 
377  *
378  *        Handler for Handling the PDCP Status Report.
379  *
380  * @b Description:
381  *
382  *        This function is used by PDCP-DL to handle the PDCP Status Report
383  *        from peer PDCP entity. 
384  *
385  *  @param[in] pst   -  Post structure  
386  *  @param[in] spId  -  Serive Provider ID 
387  *  @param[in] staRep   -  PDCP Status Report. 
388  *
389  *  @return  S16
390  *      -# ROK 
391  *
392  */
393 #ifdef ANSI
394 PUBLIC S16 PjDlUdxDlStaRep
395 (
396 Pst             *pst,
397 SpId            spId,
398 UdxDlStaRepInfo   *staRep
399 )
400 #else
401 PUBLIC S16 PjDlUdxDlStaRep(pst, spId, staRep)
402 Pst            *pst;
403 SpId           spId;
404 UdxDlStaRepInfo  *staRep;
405 #endif
406 {
407    PjCb                 *tPjCb;
408    PjDlUeCb             *ueCb;
409    PjDlRbCb             *tRbCb;
410    PjUdxDlSapCb         *udxSap;       /* UDX SAP Control Block */
411    S16                  ret;           /* Return Value */
412    
413    TRC3(PjDlUdxDlStaRep);
414
415    ret = ROK;
416    
417    tPjCb = PJ_GET_PJCB(pst->dstInst);
418 #ifndef ALIGN_64BIT
419    RLOG1(L_DEBUG, "PjDlUdxDlStaRep(pst, spId(%d))", spId);
420 #else
421    RLOG1(L_DEBUG, "PjDlUdxDlStaRep(pst, spId(%d))", spId);
422 #endif
423
424    /* Get the udxSap */
425    udxSap = (tPjCb->u.dlCb->udxDlSap + spId);
426
427    /* Validate SAP ID under ERRORCLS */
428    PJ_VALDATE_SAP(tPjCb,spId, udxSap, ret);
429    if (ret != ROK)
430    {
431       /* pj002.201 Freeing from proper region */
432       PJ_FREE_BUF(staRep->staPdu);
433       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staRep, sizeof(UdxDlStaRepInfo));
434       RETVALUE(RFAILED);
435    }
436
437    /* Fetch Ue Cb */
438    ret = pjDbmFetchDlUeCb(tPjCb, staRep->pdcpId.ueId, staRep->pdcpId.cellId, &ueCb);
439
440    /* Ue Cb is not present */
441    if( ROK != ret || NULLP == ueCb)
442    {
443       RLOG_ARG1(L_ERROR, DBG_CELLID, staRep->pdcpId.cellId,"UeId[%u] not found",
444             staRep->pdcpId.ueId);
445       PJ_FREE_BUF(staRep->staPdu);
446       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staRep, sizeof(UdxDlStaRepInfo));
447       RETVALUE(ret);
448    }
449
450    /* Fetch Rb Cb */
451    PJ_DBM_FETCH_DL_RBCB(staRep->pdcpId.rbId, staRep->pdcpId.rbType, ueCb, tRbCb);
452
453    /* Rb Cb is not present or Rb Cb is not configured for PDCP */
454    if( NULLP == tRbCb )
455    {
456       RLOG_ARG2(L_WARNING, DBG_UEID,staRep->pdcpId.ueId, "CellId[%u]:RbId[%d] not found",
457             staRep->pdcpId.cellId, staRep->pdcpId.rbId);
458       PJ_FREE_BUF(staRep->staPdu);
459       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staRep, sizeof(UdxDlStaRepInfo));
460       RETVALUE(RFAILED);
461    }
462    
463    ret = pjDlmHndlStaRep(tPjCb, tRbCb, staRep->fmc, staRep->staPdu);
464
465    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staRep, sizeof(UdxDlStaRepInfo));
466
467    RETVALUE(ret);
468 } /* PjUdxDlStaRep */    
469
470
471 \f
472 /**
473  *
474  * @brief 
475  *
476  *        Handler for configuring Downlink PDCP entities.
477  *
478  * @b Description:
479  *
480  *        This function is used by RRC to configure(add/delete/modify/
481  *        reestalish/delete all RB in a UE) one or more PDCP entities. 
482  *
483  *        - UDX_CFG_ADD          => pjCfgAddRb
484  *        - UDX_CFG_MODIFY       => pjCfgReCfgRb
485  *        - UDX_CFG_DELETE       => pjCfgDelRb
486  *        - UDX_CFG_REESTABLISH  => pjCfgReEstRb
487  *        - UDX_CFG_DELETE_UE    => pjCfgDelUe
488  *
489  *  @param[in] pst   -  Post structure  
490  *  @param[in] spId  -  Service Provider ID 
491  *  @param[in] cfg   -  Configuration information for one or more PDCP entities. 
492  *
493  *  @return  S16
494  *      -# ROK 
495  *
496  */
497 #ifdef ANSI
498 PUBLIC S16 PjDlUdxCfgReq
499 (
500 Pst             *pst,
501 SpId            spId,
502 UdxCfgReqInfo   *cfg
503 )
504 #else
505 PUBLIC S16 PjDlUdxCfgReq(pst, spId, cfg)
506 Pst            *pst;
507 SpId           spId;
508 UdxCfgReqInfo  *cfg;
509 #endif
510 {
511
512    UdxCfgCfmInfo        *cfgCfm;       /* Configuraiton Confirm */
513    U8                   idx;           /* Index */
514    PjUdxDlSapCb         *udxSap;       /* UDX SAP Control Block */
515    Bool                 reEstPres;     /* ReEstablishment present */
516    Bool                 startTmr;      /* Add present */
517    S16                  ret;           /* Return Value */
518    PjDlUeCb            *ueCb;         /* UE Control Block for storing the
519                                     cfg structure in case of ReEstablishment */
520    U8                   cfmType;
521    PjCb                *tPjCb;
522
523    TRC3(PjDlUdxCfgReq);
524
525    reEstPres = FALSE;
526    cfmType   = 0;
527    ret       = ROK;
528    cfgCfm    = NULLP;
529    idx       = 0;
530    ueCb      = NULLP;
531    startTmr  = 0;
532
533    tPjCb = PJ_GET_PJCB(pst->dstInst);
534 #ifndef ALIGN_64BIT
535    RLOG2(L_DEBUG, "PjDlUdxCfgReq(pst, spId(%d), TransId(%ld))", 
536          spId, cfg->transId);
537 #else
538    RLOG2(L_DEBUG, "PjDlUdxCfgReq(pst, spId(%d), TransId(%d))", 
539          spId, cfg->transId);
540 #endif
541
542    /* Get the udxsap */
543    udxSap = (tPjCb->u.dlCb->udxDlSap + spId);
544
545    /* Validate SAP ID under ERRORCLS */
546    PJ_VALDATE_SAP(tPjCb,spId, udxSap, ret);
547    if (ret != ROK)
548    {
549       /* pj002.201 Freeing from proper region */
550       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, cfg, sizeof(UdxCfgReqInfo));
551       RETVALUE(RFAILED);
552    }
553
554    ret = ROK;
555    PJ_ALLOC_BUF_SHRABL(udxSap->pst, cfgCfm, 
556       sizeof (UdxCfgCfmInfo), ret);
557    /* Allocate memory and memset to 0 for cfmInfo */
558     if(ret != ROK)
559    {
560       RLOG0(L_FATAL, "Memory Allocation failed.");
561       /* pj002.201 Freeing from proper region */
562       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, cfg, sizeof(UdxCfgReqInfo));
563       RETVALUE(RFAILED);
564    }
565
566    /* Fetch UeCb */
567    pjDbmFetchDlUeCb(tPjCb, cfg->ueId, cfg->cellId, &ueCb);
568   /* KW_FIX : UDX_MAX_CFG , UDX_MAX_CFM have the same value , hence checking for only one */
569    /* For every entity configuration process by cfgType */
570    for (idx = 0; idx < cfg->numEnt && idx < UDX_MAX_CFG; idx++)
571    {
572       UdxCfmEnt         *entCfgCfm;
573       UdxCfgEnt         *entCfg;
574
575       entCfg  = (UdxCfgEnt *)&(cfg->cfgEnt[idx]);
576       entCfgCfm   = (UdxCfmEnt *)&(cfgCfm->cfmEnt[idx]);
577
578       if (NULL != ueCb)
579       {
580          /* Fill the detault values here */
581          PJ_CFG_FILL_CFG_CFM(entCfgCfm, entCfg->rbId, entCfg->rbType, UDX_CFG_CFM_OK,\
582                UDX_CFG_REAS_NONE);
583       }
584       else
585       {
586          RLOG_ARG1(L_WARNING, DBG_CELLID,cfg->cellId,"UeId[%u] not found",
587                cfg->ueId);
588          PJ_CFG_FILL_CFG_CFM(entCfgCfm, entCfg->rbId, entCfg->rbType, CPJ_CFG_CFM_NOK,\
589             CPJ_CFG_REAS_UE_UNKWN);
590
591          RLOG_ARG1(L_WARNING,DBG_UEID,cfg->ueId, 
592            "Dl RB Config Req- UE CB is not found for cellid (%d)",cfg->cellId);
593          if (entCfg->cfgType !=  UDX_CFG_ADD)
594          {
595             /* all other requests require ueCb mandatorily */
596             continue;
597          }
598       }
599
600       switch (entCfg->cfgType)
601       {
602          case UDX_CFG_ADD:
603             {
604                if (entCfg->m.addCfg.rlcInfo.dir & PJ_DIR_DL)
605                {
606                   U8 isHo;
607
608                   isHo = cfg->isHo;
609                   /* Add a new RB entity configuration */
610                   if (pjCfgAddDlRb(tPjCb,cfg->ueId, cfg->cellId, isHo,
611                                      entCfg, &ueCb,entCfgCfm) != ROK)
612                   {
613                      RLOG_ARG3(L_ERROR,DBG_UEID,cfg->ueId, "Dl Cfg RB Add Req"
614                            " for cellId(%d), rbId(%d) Failed: reason (%d)",
615                        cfg->cellId, cfg->cfgEnt[idx].rbId, entCfgCfm->reason);
616                   }
617                   /* Only In case of DRB only we need to set this flag */
618 #ifdef PJ_CMP_ASYNC
619                   else if(PJ_DRB == entCfg->rbType)
620                   {
621                      if(entCfg->m.addCfg.hdrCompCfg.hdrCompUsed)
622                      {
623                         cfmType  |=  PJ_CFG_ASYNC_CFM;
624                         startTmr =  TRUE;
625                      }
626                   }
627 #endif /* PJ_CMP_ASYNC */
628                }
629                break;
630             }
631
632          case UDX_CFG_MODIFY:
633             {
634                /* Re-configure the existing RB entity configuration */
635                if ((entCfg->m.modCfg.bitFlag & 0x02) ||
636                   (entCfg->m.modCfg.hdrCompCfg.hdrCompUsed) ||
637                   (entCfg->m.modCfg.hoInfo.isHoPres & CPJ_HO_DL))
638                {
639                   if (pjCfgReCfgDlRb(tPjCb,ueCb, entCfg, entCfgCfm) != ROK)
640                   {
641                      RLOG_ARG3(L_ERROR,DBG_UEID,cfg->ueId,"Dl RB Modify Req"
642                             "for cellId(%d),rbId(%d) not done as RbCb not found: reason(%d)",
643                         cfg->cellId,cfg->cfgEnt[idx].rbId, entCfgCfm->reason);
644                   }
645 #ifdef PJ_CMP_ASYNC
646                   else if(PJ_DRB == entCfg->rbType)
647                   {
648                      if(entCfg->m.modCfg.hdrCompCfg.hdrCompUsed)
649                      {
650                         cfmType  |=  PJ_CFG_ASYNC_CFM;
651                         startTmr =  TRUE;
652                      }
653                   }
654 #endif /* PJ_CMP_ASYNC */
655              }
656                break;
657             }
658
659          case UDX_CFG_DELETE:
660             {
661                /* Delete the existing RB entity configuration */
662                if (pjCfgDelDlRb(tPjCb, ueCb, entCfg, entCfgCfm) != ROK)
663                {
664                   RLOG_ARG3(L_WARNING,DBG_UEID,cfg->ueId, "Dl RB Delete Req for"
665                         "for cellId(%d), rbId(%d) not done as RbCb not found: reason (%d)",
666                     cfg->cellId, cfg->cfgEnt[idx].rbId, entCfgCfm->reason);
667                }
668                break;
669             }
670
671          case UDX_CFG_REESTABLISH:
672             {
673                if (pjCfgReEstDlRb(tPjCb, ueCb, entCfg, entCfgCfm) != ROK)
674                {
675                    RLOG_ARG3(L_ERROR,DBG_UEID,cfg->ueId, "Dl RB Re-establih Req"
676                          "for cellId(%d), rbId(%d) Failed: reason (%d)",
677                       cfg->cellId, cfg->cfgEnt[idx].rbId, entCfgCfm->reason);
678                }
679                else
680                {
681                   cfmType  |=  PJ_CFG_REEST_ASYNC_CFM;
682                   reEstPres= TRUE;
683                }
684
685                break;
686             }
687
688          case UDX_CFG_DELETE_UE:
689             {
690                /* Delete all RB entity configuration under UE */
691                if (pjCfgDelDlUe(tPjCb, ueCb,entCfg, entCfgCfm) != ROK)
692                {
693
694                   RLOG_ARG3(L_ERROR,DBG_UEID,cfg->ueId, "Dl UE Delete Req for"
695                      "cellId(%d), rbId(%d) Failed: reason (%d)",
696                       cfg->cellId, cfg->cfgEnt[idx].rbId, entCfgCfm->reason);
697                }
698 #if (defined(PJ_SEC_ASYNC) || defined(PJ_CMP_ASYNC))
699                else
700                {
701                   /* Wait for any messages in the Demand q to be processed */
702                   cfmType  |=  PJ_CFG_UEDEL_ASYNC_CFM;
703                   startTmr =  TRUE;
704                }
705 #endif /* (defined(PJ_SEC_ASYNC) || defined(PJ_CMP_ASYNC)) */
706                break;
707             }
708
709          default:
710             {
711                PJ_CFG_FILL_CFG_CFM(entCfgCfm, entCfg->rbId, entCfg->rbType, UDX_CFG_CFM_NOK,\
712                      UDX_CFG_REAS_INVALID_CFG);
713
714                RLOG_ARG3(L_ERROR,DBG_UEID,cfg->ueId, "Dl Cfg Req with Invalid"
715                       "config type,cellId(%d),cfgType(%d),rbId(%d) ",
716                      cfg->cellId, entCfg->cfgType, cfg->cfgEnt[idx].rbId);
717             }
718       }
719    }
720
721    /* Assign number of entity configuraitons and suId */
722    cfgCfm->transId = cfg->transId;
723    cfgCfm->ueId = cfg->ueId;
724    cfgCfm->cellId = cfg->cellId;
725    cfgCfm->numEnt = cfg->numEnt;
726
727    if (cfmType != 0)
728    {
729       if (ueCb != NULLP)
730       {
731          if(TRUE == reEstPres )
732          {
733 #ifdef PJ_ASYNC_CFM
734             pjUtlDlSaveCfmInfo(tPjCb, ueCb, cfmType, startTmr, ENTPJ, (PTR)cfgCfm, (PTR)cfg);
735 #endif
736             pjUtlDlUpdUpSecKeys(tPjCb, ueCb); 
737 #ifdef PJ_ASYNC_CFM
738             PJ_PST_FREE(udxSap->pst.region, udxSap->pst.pool, cfgCfm, sizeof(UdxCfgCfmInfo));
739 #else
740             PjDlUdxCfgCfm(&(udxSap->pst), udxSap->suId, cfgCfm);
741 #endif
742           
743          }
744          else
745          {
746             pjUtlDlSaveCfmInfo(tPjCb, ueCb, cfmType, startTmr, ENTPJ, (PTR)cfgCfm, (PTR)cfg);
747             PJ_PST_FREE(udxSap->pst.region, udxSap->pst.pool, cfgCfm, sizeof(UdxCfgCfmInfo));
748          }
749          /* Free the cfg */
750          PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, cfg, sizeof(UdxCfgReqInfo));
751       }
752       else
753       {
754          PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, cfg, sizeof(UdxCfgReqInfo));
755          PjDlUdxCfgCfm(&(udxSap->pst), udxSap->suId, cfgCfm);
756       }
757    }
758    else
759    {
760       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, cfg, sizeof(UdxCfgReqInfo));
761       PjDlUdxCfgCfm(&(udxSap->pst), udxSap->suId, cfgCfm);
762    }
763
764    RETVALUE(ret);
765 } /* PjDlUdxCfgReq */
766
767 /**
768  *@details This primitive is used by RRC to change the UeId for the existing UE
769            context.
770
771  * @param pst     -  Point to the pst structure
772  * @param spId    -  The ID of the service provider SAP in the PDCP layer 
773  * @param transId -  Transaction ID. This field uniquily identifies
774  *                   transaction between RRC and PDCP.
775  * @param ueInfo    -  Old UE Id Info for which the change request has come 
776  * @param newUeInfo -  New UE Id Info for existing UE context 
777  * @return ROK
778 **/
779 #ifdef ANSI
780 PUBLIC S16 PjDlUdxUeIdChgReq
781 (
782 Pst        *pst, 
783 SpId       spId, 
784 U32        transId, 
785 UdxUeInfo  *ueInfo,
786 UdxUeInfo  *newUeInfo
787 )
788 #else
789 PUBLIC S16 PjDlUdxUeIdChgReq(pst,spId,transId,ueInfo,newUeInfo)
790 Pst        *pst;
791 SpId       spId;
792 U32        transId;
793 UdxUeInfo  *ueInfo;
794 UdxUeInfo  *newUeInfo;
795 #endif
796 {
797    S16         ret;           /* Return Value */
798    CmStatus    status;        /* Status of the request */
799    PjUdxDlSapCb  *udxSap;       /* UDX SAP Control Block */
800    UdxUeInfo   *tUeInfo;      /* Temporary UE info */
801    PjCb         *tPjCb;
802
803    TRC3(PjDlUdxUeIdChgReq)
804
805    tPjCb = PJ_GET_PJCB(pst->dstInst);
806
807 #ifndef ALIGN_64BIT
808    RLOG2(L_DEBUG, "PjDlUdxUeIdChgReq(pst, spId(%d), transId(%ld))", spId, transId);
809 #else
810    RLOG2(L_DEBUG, "PjDlUdxUeIdChgReq(pst, spId(%d), transId(%d))", spId, transId);
811 #endif
812
813    ret = ROK;
814    tUeInfo = NULLP;
815    udxSap = &(tPjCb->u.dlCb->udxDlSap[0]);
816    status.reason = UDX_CFG_REAS_NONE;
817    status.status = UDX_CFG_CFM_OK;
818    
819    /* Validate SAP ID under ERRORCLS */
820    PJ_VALDATE_SAP(tPjCb,spId, udxSap, ret);
821    if (ret != ROK)
822    {
823       /* kw002.201 Freeing from proper region */
824       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, ueInfo, sizeof(UdxUeInfo));
825       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, newUeInfo, sizeof(UdxUeInfo));
826       RETVALUE(RFAILED);
827    }
828
829    if (pjCfgDlUeIdChng(tPjCb, ueInfo,
830                    newUeInfo, &status) != ROK)
831    {
832       RLOG_ARG4(L_ERROR,DBG_UEID,ueInfo->ueId,"Dl UeId Change Req old-ueId(%d),"
833             "new-ueId(%d), cellId(%d) Failed: reason (%d)",
834              ueInfo->ueId, newUeInfo->ueId, newUeInfo->cellId, status.reason);
835    }
836
837    /* Allocate memory for UdxUeInfo */
838    /* Memory leak fix ccpu00135359 */
839    PJ_ALLOC_BUF_SHRABL(udxSap->pst, tUeInfo,
840         sizeof (UdxUeInfo), ret);
841    if( ret != ROK)
842    {
843       /* Free memory for UdxUeInfo */
844       /* kw002.201 Freeing from proper region */
845       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, ueInfo, sizeof(UdxUeInfo));
846       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, newUeInfo, sizeof(UdxUeInfo));
847
848       RLOG0(L_FATAL, "Memory Allocation failed.");
849       RETVALUE(RFAILED);
850    }
851
852    tUeInfo->ueId = ueInfo->ueId;
853    tUeInfo->cellId = ueInfo->cellId;
854
855    /* Free memory for CkwUeInfo */
856    /* kw002.201 Freeing from proper region */
857    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, ueInfo, sizeof(UdxUeInfo));
858    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, newUeInfo, sizeof(UdxUeInfo));
859
860    PjDlUdxUeIdChgCfm(&(udxSap->pst), udxSap->suId, transId, tUeInfo, status);
861
862    RETVALUE(ROK);
863 } /* PjDlUdxUeIdChgReq */
864
865
866 /**
867  *@details  
868  * 1. RRC uses this primitive to configure PDCP security parameters.
869  * Integrity protection and/or Ciphering are configured by RRC based on the
870  * selSecAct flag.  @n
871  * 2. Integirty Protection/Ciphering are configured per UE and applicable
872  * to all pdcp entities in that UE. Both Integrity protection and ciphering are
873  * re-configured during re-establishment.  @n
874  *
875  * @param pst     -  Point to the pst structure
876  * @param spId    -  The ID of the service provider SAP in the PDCP layer 
877  * @param secCfg  -  Security Configuration Info per UE.
878  *
879  * @return 
880  *       -# ROK
881  *       -# RFAILED
882  */
883 #ifdef ANSI
884 PUBLIC S16 PjDlUdxSecCfgReq
885 (
886 Pst              *pst,
887 SpId             spId,
888 UdxSecCfgReqInfo *secCfg
889 )
890 #else
891 PUBLIC S16 PjDlUdxSecCfgReq(pst,spId,secCfg)
892 Pst              *pst;
893 SpId             spId;
894 UdxSecCfgReqInfo *secCfg;
895 #endif
896 {
897    S16               ret;           /* Return Value */
898    UdxSecCfgCfmInfo  *cfgCfm;       /* Security Cfg Confirm structure */
899    PjUdxDlSapCb        *udxSap;       /* UDX SAP Control Block */
900 #ifdef PJ_SEC_ASYNC
901    PjDlUeCb            *ueCb;         /* UE Control Block */
902 #endif
903    PjCb   *tPjCb;
904
905    TRC2(PjDlUdxSecCfgReq)
906    tPjCb = PJ_GET_PJCB(pst->dstInst);
907
908 #ifndef ALIGN_64BIT 
909    RLOG2(L_DEBUG, "PjDlUdxSecCfgReq(pst, spId(%d), TransId(%ld))", spId,
910                secCfg->transId);
911 #else
912    RLOG2(L_DEBUG, "PjDlUdxSecCfgReq(pst, spId(%d), TransId(%d))", spId,
913                secCfg->transId);
914 #endif
915
916    ret = ROK;
917    cfgCfm = NULLP;
918    udxSap = NULLP;
919
920    udxSap = &(tPjCb->u.dlCb->udxDlSap[0]);
921
922 #ifdef PJ_SEC_ASYNC
923    ueCb   = NULLP;
924 #endif
925    PJ_ALLOC_BUF_SHRABL(udxSap->pst, cfgCfm, 
926       sizeof (UdxSecCfgCfmInfo), ret);
927     if(ret != ROK)
928    {
929       /* Free memory for CfgReqInfo */
930       /* kw002.201 Freeing from proper region */  
931       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, secCfg, sizeof(UdxSecCfgReqInfo));
932
933       RLOG0(L_FATAL, "Memory Allocation failed.");
934       RETVALUE(RFAILED);
935    }
936
937    if ( pjCfgPrcSecDlCfg(tPjCb,secCfg,
938                             cfgCfm) != ROK )
939    {
940       RLOG_ARG2(L_ERROR,DBG_UEID,secCfg->ueId, " Dl Sec Cfg Req for cellId(%d)"
941             " Failed: reason (%d)", secCfg->cellId, cfgCfm->reason);
942    }
943
944 #ifdef PJ_SEC_ASYNC
945    ret = pjDbmFetchDlUeCb(tPjCb,secCfg->ueId, secCfg->cellId, &ueCb);
946    if ( ueCb != NULLP )
947    {
948       pjUtlDlSaveCfmInfo(tPjCb, ueCb, PJ_SEC_ASYNC_CFM, TRUE,  ENTPJ, (PTR)cfgCfm, NULLP);
949       PJ_FREE(tPjCb, cfgCfm, sizeof(UdxSecCfgCfmInfo));
950    }
951    else
952    {
953       RLOG_ARG1(L_ERROR, DBG_CELLID, secCfg->cellId,"UeId[%u] not found",
954             secCfg->ueId);
955       PjDlUdxSecCfgCfm(&(udxSap->pst), udxSap->suId, cfgCfm);
956    }
957 #else
958    PjDlUdxSecCfgCfm(&(udxSap->pst), udxSap->suId, cfgCfm);
959 #endif 
960
961   /* Configuration information needs to be freed from proper region */
962    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, secCfg, sizeof(UdxSecCfgReqInfo));
963
964    RETVALUE(ret); 
965 }
966
967
968
969 /**
970  * @details
971  * 1. RRC uses this primitive to re-establish the PDCP entity. @n
972  * 2. This primitive is initiation of re-establishment procedure. @n
973  * 3. This prmitive and corresponding confirmation shall be followed by
974  *    PjDlUdxCfgReq procedure for entire re-establishment procedure to complete.
975  *
976  * @param[in] pst    - Pointer to post structure.
977  * @param[in] spId   - Service provider ID. This is the reference number used by
978  * PDCP to identify its SAP.
979  * @param[in] reEstReq - PDCP re-establishment request structure. 
980  *
981  */
982 #ifdef ANSI
983 PUBLIC S16 PjDlUdxReEstReq 
984 (
985 Pst             *pst, 
986 SpId            spId, 
987 UdxReEstReqInfo *reEstReq
988 )
989 #else 
990 PUBLIC S16 PjDlUdxReEstReq(pst,spId,reEstReq)
991 Pst             *pst;
992 SpId            spId;
993 UdxReEstReqInfo *reEstReq;
994 #endif
995 {
996    S16               ret;           /* Return Value */
997    UdxReEstCfmInfo   *reEstCfm;     /* Re-Establish Confirm */
998    PjUdxDlSapCb        *udxSap;       /* UDX SAP Control Block */
999    PjCb   *tPjCb;
1000
1001    TRC2(PjDlUdxReEstReq);
1002
1003    tPjCb = PJ_GET_PJCB(pst->dstInst);
1004    RLOG1(L_DEBUG, "PjDlUdxReEstReq(pst, spId(%d))", spId);
1005
1006    ret = ROK;
1007    udxSap = &(tPjCb->u.dlCb->udxDlSap[0]);
1008
1009    /* Validate SAP ID under ERRORCLS */
1010    PJ_VALDATE_SAP(tPjCb,spId, udxSap, ret);
1011    if (ret != ROK)
1012    {
1013       /* pj002.201 Freeing from proper region */  
1014       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, reEstReq, sizeof(UdxReEstReqInfo));
1015       RETVALUE(RFAILED);
1016    }
1017    PJ_ALLOC_BUF_SHRABL(udxSap->pst , reEstCfm, 
1018       sizeof (UdxReEstCfmInfo), ret);
1019    if(ret != ROK)
1020    {
1021       /* Free memory for CfgReqInfo */
1022       /* kw002.201 Freeing from proper region */  
1023       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, reEstReq, sizeof(UdxReEstReqInfo));
1024
1025       RLOG0(L_FATAL, "Memory Allocation failed.");
1026       RETVALUE(RFAILED);
1027    }
1028
1029    if ( pjCfgDlReEstReq(tPjCb,(UdxReEstReqInfo *)reEstReq,
1030                               (UdxReEstCfmInfo *)reEstCfm) != ROK )
1031    {
1032       RLOG_ARG2(L_ERROR,DBG_UEID,reEstReq->pdcpId.ueId, "Dl Re-Est Req Cfg for"
1033             " cellId(%d)  Failed: reason (%u)",
1034          reEstReq->pdcpId.cellId, reEstCfm->status);
1035
1036        PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, reEstReq, sizeof(UdxReEstReqInfo));
1037        PjDlUdxReEstCfm(&(udxSap->pst), udxSap->suId, reEstCfm); 
1038        RETVALUE (ROK);
1039    }
1040
1041    /* kw002.201 Freeing from proper region */  
1042    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, reEstReq, sizeof(UdxReEstReqInfo));
1043
1044 #ifdef PJ_ASYNC_CFM   
1045    /* If Async is enabled then we need to wait for confirmation */
1046    RETVALUE(ROK);
1047 #endif
1048    PjDlUdxReEstCfm(&(udxSap->pst), udxSap->suId, reEstCfm); 
1049    RETVALUE(ROK); 
1050 }
1051
1052
1053 /**
1054  * @details
1055  * 1. RRC uses this primitive to request count value for all DRBs in a UE. @n
1056  * 2. PDCP sends the UL and DL count values in the confirmation of this request. 
1057  *
1058  * @param[in] pst    - Pointer to post structure.
1059  * @param[in] spId   - Service provider ID. This is the reference number used
1060  * by PDCP to identify its SAP.
1061  * @param[in] countReq - PDCP Count Request Information. 
1062  *
1063  * @return ROK
1064  */
1065 #ifdef ANSI
1066 PUBLIC S16 PjDlUdxCountReq 
1067 (
1068 Pst             *pst, 
1069 SpId            spId, 
1070 UdxCountReqInfo *countReq
1071 )
1072 #else
1073 PUBLIC S16 PjDlUdxCountReq(pst,spId,countReq)
1074 Pst             *pst;
1075 SpId            spId;
1076 UdxCountReqInfo *countReq;
1077 #endif
1078 {
1079
1080    S16               ret;           /* Return Value */
1081    UdxCountCfmInfo   *countCfm;     /* Count Confirm structure */
1082    PjUdxDlSapCb        *udxSap;       /* UDX SAP Control Block */
1083    PjCb   *tPjCb;
1084
1085    TRC2(PjDlUdxCountReq);
1086
1087    tPjCb = PJ_GET_PJCB(pst->dstInst);
1088    RLOG1(L_DEBUG, "PjDlUdxCountReq(pst, spId(%d))", spId);
1089
1090    ret = ROK;
1091    countCfm = NULLP;
1092    udxSap = &(tPjCb->u.dlCb->udxDlSap[0]);
1093    PJ_ALLOC_BUF_SHRABL(udxSap->pst, countCfm, 
1094       sizeof (UdxCountCfmInfo), ret);
1095    if( ret != ROK)
1096    {
1097       /* Free memory for CfgReqInfo */
1098       /* kw002.201 Freeing from proper region */
1099       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, countReq, sizeof(UdxCountReqInfo));
1100
1101       RLOG0(L_FATAL, "Memory Allocation failed.");
1102       RETVALUE(RFAILED);
1103    }
1104    if ( pjCfgPrcDlCount(tPjCb, countReq, 
1105                              countCfm) != ROK )
1106    {
1107       RLOG_ARG2(L_ERROR,DBG_UEID,countReq->ueId, "Dl Count Req for cellId(%d)"
1108             " Failed: reason (%d)",
1109           countReq->cellId, countCfm->reason);
1110
1111    }
1112
1113    /* Freeing from proper region */
1114    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, countReq, sizeof(UdxCountReqInfo));
1115
1116    PjDlUdxCountCfm(&(udxSap->pst), udxSap->suId,countCfm);
1117
1118    RETVALUE(ROK);
1119
1120 }
1121
1122 /**
1123  * 
1124  * @details
1125  * 1. RRC uses this primitive to request the status of the SDUs for DRBs in an UE. @n
1126  * 2. Its used as a reestablishment request during handover.  @n
1127  * 3. This primitive is used to forward the handover control Information to the target
1128  * eNodeB.
1129  *
1130  * @param[in] pst    - Pointer to post structure.
1131  * @param[in] spId   - Service provider ID. This is the reference number used
1132  * by PDCP to identify its SAP.
1133  * @param[in] sduStaReq - PDCP SDU Status Request Information. 
1134  *
1135  * @return ROK
1136  */
1137 #ifdef ANSI
1138 PUBLIC S16 PjDlUdxSduStaReq 
1139 (
1140 Pst              *pst, 
1141 SpId             spId, 
1142 UdxSduStaReqInfo *staReq
1143 )
1144 #else
1145 PUBLIC S16 PjDlUdxSduStaReq(pst,spId,staReq)
1146 Pst              *pst;
1147 SpId             spId;
1148 UdxSduStaReqInfo *staReq;
1149 #endif
1150 {
1151
1152    S16               ret;          /* Return Value */
1153    PjUdxDlSapCb     *udxSap;       /* UDX SAP Control Block */
1154    PjCb             *tPjCb;
1155
1156    TRC2(PjDlUdxSduStaReq);
1157
1158    ret = ROK;
1159    udxSap = NULLP;
1160
1161    tPjCb = PJ_GET_PJCB(pst->dstInst);
1162    udxSap = &(tPjCb->u.dlCb->udxDlSap[0]);
1163
1164     RLOG1(L_DEBUG, "PjDlUdxSduStaReq(pst, spId(%d))", spId);
1165
1166
1167    /* Validate SAP ID under ERRORCLS */
1168    PJ_VALDATE_SAP(tPjCb,spId, udxSap, ret);
1169    if (ret != ROK)
1170    {
1171       /* kw002.201 Freeing from proper region */
1172       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staReq, sizeof(UdxSduStaReqInfo));
1173       RETVALUE(RFAILED);
1174    }
1175
1176    if (pjCfgPrcDlSduSta(tPjCb,(UdxSduStaReqInfo *) staReq) != ROK )
1177    {
1178       RLOG_ARG1(L_ERROR,DBG_UEID,staReq->ueId, 
1179             "Dl Sdu Sta Req for cellId(%d) Failed",staReq->cellId);
1180       ret = RFAILED;
1181
1182    }
1183    /* kw002.201 Freeing from proper region */
1184    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, staReq, sizeof(UdxSduStaReqInfo));
1185
1186    RETVALUE(ret);
1187 }
1188
1189 /**
1190  *
1191  * @brief 
1192  *
1193  *        Handler for Sending the Feed back Packet Info to DL-RLC.
1194  *
1195  * @b Description:
1196  *
1197  *        This function is used by PDCP-DL to send Feedback Packet Info to DL-RLC. 
1198  *
1199  *  @param[in] pst   -  Post structure  
1200  *  @param[in] spId  -  Serive Provider ID 
1201  *  @param[in] fdbkPktInfo   -  Feedback Packet Info. 
1202  *
1203  *  @return  S16
1204  *      -# ROK 
1205  *
1206  */
1207 #ifdef ANSI
1208 PUBLIC S16 PjDlUdxUlFdbkPktInfo
1209 (
1210 Pst             *pst,
1211 SpId            spId,
1212 UdxUlFdbkPktInfo   *fdbkPktInfo
1213 )
1214 #else
1215 PUBLIC S16 PjDlUdxUlFdbkPktInfo(pst, spId, fdbkPktInfo)
1216 Pst            *pst;
1217 SpId           spId;
1218 UdxUlFdbkPktInfo  *fdbkPktInfo;
1219 #endif
1220 {
1221    PjCb                 *tPjCb;
1222    PjDlUeCb             *ueCb;
1223    PjDlRbCb             *tRbCb;
1224    PjUdxDlSapCb         *udxSap;       /* UDX SAP Control Block */
1225    S16                  ret;           /* Return Value */
1226    U32                  count;
1227    Data                 hdr = 0;
1228    Buffer               *rohcFdbPdu = NULLP;
1229
1230    TRC3(PjDlUdxUlFdbkPktInfo);
1231
1232    ret = ROK;
1233    tPjCb = PJ_GET_PJCB(pst->dstInst);
1234 #ifndef ALIGN_64BIT
1235    RLOG1(L_DEBUG, "PjDlUdxUlFdbkPktInfo(pst, spId(%d))", spId);
1236 #else
1237    RLOG1(L_DEBUG, "PjDlUdxUlFdbkPktInfo(pst, spId(%d))", spId);
1238 #endif
1239
1240    /* Get the udxSap */
1241    udxSap = (tPjCb->u.dlCb->udxDlSap + spId);
1242
1243    /* Validate SAP ID under ERRORCLS */
1244    PJ_VALDATE_SAP(tPjCb,spId, udxSap, ret);
1245    if (ret != ROK)
1246    {
1247       /* pj002.201 Freeing from proper region */
1248       PJ_FREE_BUF(fdbkPktInfo->fbPkt);
1249       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, fdbkPktInfo, sizeof(UdxDlFdbkPktInfo));
1250       RETVALUE(RFAILED);
1251    }
1252
1253    /* Fetch Ue Cb */
1254    ret = pjDbmFetchDlUeCb(tPjCb, fdbkPktInfo->pdcpId.ueId, fdbkPktInfo->pdcpId.cellId, &ueCb);
1255
1256    /* Ue Cb is not present */
1257    if( ROK != ret || NULLP == ueCb)
1258    {
1259       RLOG_ARG1(L_ERROR, DBG_CELLID, fdbkPktInfo->pdcpId.cellId,"UeId[%u] not found",
1260             fdbkPktInfo->pdcpId.ueId);
1261       PJ_FREE_BUF(fdbkPktInfo->fbPkt);
1262       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, fdbkPktInfo, sizeof(UdxDlFdbkPktInfo));
1263       RETVALUE(ret);
1264    }
1265
1266    /* Fetch Rb Cb */
1267    PJ_DBM_FETCH_DL_RBCB(fdbkPktInfo->pdcpId.rbId, fdbkPktInfo->pdcpId.rbType, ueCb, tRbCb);
1268
1269    /* Rb Cb is not present or Rb Cb is not configured for PDCP */
1270    if( NULLP == tRbCb )
1271    {
1272       RLOG_ARG2(L_WARNING, DBG_UEID,fdbkPktInfo->pdcpId.ueId, "CellId[%u]:RbId[%d] not found",
1273             fdbkPktInfo->pdcpId.cellId, fdbkPktInfo->pdcpId.rbId);
1274       PJ_FREE_BUF(fdbkPktInfo->fbPkt);
1275       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, fdbkPktInfo, sizeof(UdxDlFdbkPktInfo));
1276       RETVALUE(RFAILED);
1277    }
1278    
1279    hdr |= PJ_ROHC_FEEDBACK_HDR;
1280    rohcFdbPdu = fdbkPktInfo->fbPkt;
1281
1282    ret = SAddPreMsg((Data) hdr, rohcFdbPdu);
1283    if ( ret != ROK )                                      
1284    {                                                       
1285        RLOG0(L_ERROR, "SAddPreMsg failed for ROHC Feedbck pdu");
1286        PJ_FREE_BUF(rohcFdbPdu);
1287        RETVALUE(RFAILED);                                    
1288    }                                                       
1289    
1290    if(tRbCb->mode == PJ_DRB_UM)
1291    {
1292        count = tRbCb->dlCb.nxtToSub - 1; 
1293    }
1294    else
1295    {
1296        count = tRbCb->dlCb.cfmExp - 1;
1297    }
1298    
1299    pjDlmSendDatReq(tPjCb, tRbCb, count, rohcFdbPdu);
1300    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, fdbkPktInfo, sizeof(UdxDlFdbkPktInfo));
1301
1302    RETVALUE(ROK);
1303 } /* PjUlUdxUlFdbkPktInfo*/
1304
1305 /**
1306  *
1307  * @brief 
1308  *
1309  *        Handler for Sending the Feed back Packet Info to Compression entity.
1310  *
1311  * @b Description:
1312  *
1313  *        This function is used by PDCP-DL to send Feedback Packet Info to Compression entity. 
1314  *
1315  *  @param[in] pst   -  Post structure  
1316  *  @param[in] spId  -  Serive Provider ID 
1317  *  @param[in] fdbkPktInfo   -  Feedback Packet Info. 
1318  *
1319  *  @return  S16
1320  *      -# ROK 
1321  *
1322  */
1323 #ifdef ANSI
1324 PUBLIC S16 PjDlUdxDlFdbkPktInfo
1325 (
1326 Pst             *pst,
1327 SpId            spId,
1328 UdxDlFdbkPktInfo   *fdbkPktInfo
1329 )
1330 #else
1331 PUBLIC S16 PjDlUdxDlFdbkPktInfo(pst, spId, fdbkPktInfo)
1332 Pst            *pst;
1333 SpId           spId;
1334 UdxDlFdbkPktInfo  *fdbkPktInfo;
1335 #endif
1336 {
1337    PjCb                 *tPjCb;
1338    PjDlUeCb             *ueCb;
1339    PjDlRbCb             *tRbCb;
1340    PjUdxDlSapCb         *udxSap;       /* UDX SAP Control Block */
1341    S16                  ret;           /* Return Value */
1342
1343 #ifdef PJ_CMP_ASYNC
1344    PjLibTrans libTrans; /* Transaction Id for compression */
1345 #endif /* PJ_SEC_ASYNC */
1346
1347    TRC3(PjDlUdxDlFdbkPktInfo);
1348
1349    ret = ROK;
1350    tPjCb = PJ_GET_PJCB(pst->dstInst);
1351 #ifndef ALIGN_64BIT
1352    RLOG1(L_DEBUG, "PjDlUdxDlFdbkPktInfo(pst, spId(%d))", spId);
1353 #else
1354    RLOG1(L_DEBUG, "PjDlUdxDlFdbkPktInfo(pst, spId(%d))", spId);
1355 #endif
1356
1357    /* Get the udxSap */
1358    udxSap = (tPjCb->u.dlCb->udxDlSap + spId);
1359
1360    /* Validate SAP ID under ERRORCLS */
1361    PJ_VALDATE_SAP(tPjCb,spId, udxSap, ret);
1362    if (ret != ROK)
1363    {
1364       /* pj002.201 Freeing from proper region */
1365       PJ_FREE_BUF(fdbkPktInfo->fbPkt);
1366       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, fdbkPktInfo, sizeof(UdxDlFdbkPktInfo));
1367       RETVALUE(RFAILED);
1368    }
1369
1370    /* Fetch Ue Cb */
1371    ret = pjDbmFetchDlUeCb(tPjCb, fdbkPktInfo->pdcpId.ueId, fdbkPktInfo->pdcpId.cellId, &ueCb);
1372
1373    /* Ue Cb is not present */
1374    if( ROK != ret || NULLP == ueCb)
1375    {
1376       RLOG_ARG1(L_ERROR, DBG_CELLID, fdbkPktInfo->pdcpId.cellId,"UeId[%u] not found",
1377             fdbkPktInfo->pdcpId.ueId);
1378       PJ_FREE_BUF(fdbkPktInfo->fbPkt);
1379       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, fdbkPktInfo, sizeof(UdxDlFdbkPktInfo));
1380       RETVALUE(ret);
1381    }
1382
1383    /* Fetch Rb Cb */
1384    PJ_DBM_FETCH_DL_RBCB(fdbkPktInfo->pdcpId.rbId, fdbkPktInfo->pdcpId.rbType, ueCb, tRbCb);
1385
1386    /* Rb Cb is not present or Rb Cb is not configured for PDCP */
1387    if( NULLP == tRbCb )
1388    {
1389       RLOG_ARG2(L_WARNING, DBG_UEID,fdbkPktInfo->pdcpId.ueId, "CellId[%u]:RbId[%d] not found",
1390             fdbkPktInfo->pdcpId.cellId, fdbkPktInfo->pdcpId.rbId);
1391       PJ_FREE_BUF(fdbkPktInfo->fbPkt);
1392       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, fdbkPktInfo, sizeof(UdxDlFdbkPktInfo));
1393       RETVALUE(RFAILED);
1394    }
1395
1396 #ifdef PJ_CMP_ASYNC
1397    /* Assign transId and cxtId */
1398    libTrans.count  = tRbCb->dlCb.nxtToSub;
1399    /* pj005.201 ccpu00114955 corrected the RB ID calculation */
1400    libTrans.rbId   = tRbCb->rbId - 1;
1401    libTrans.rbType = tRbCb->rbType;
1402    libTrans.ueCb   = (PTR)tRbCb->ueCb;
1403
1404    PjLibObdCmpFbReq(&(tPjCb->pjGenCfg.obdPst.cmpPst), tRbCb->cmpCxtId, libTrans,
1405          fdbkPktInfo->fbPkt);
1406 #else
1407    pjLibCmpFbReq(tRbCb->cmpCxtId, fdbkPktInfo->fbPkt);
1408 #endif
1409
1410    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, fdbkPktInfo, sizeof(UdxDlFdbkPktInfo));
1411
1412    RETVALUE(ROK);
1413 } /* PjDlUdxDlFdbkPktInfo*/
1414
1415
1416 #ifdef LTE_L2_MEAS
1417 /**
1418 */
1419 #ifdef ANSI
1420 PUBLIC S16 PjDlUdxL2MeasReq 
1421 (
1422 Pst            *pst, 
1423 PjL2MeasReqEvt *measReqEvt 
1424 )
1425 #else
1426 PUBLIC S16 PjDlUdxL2MeasReq (pst, measReqEvt)
1427 Pst            *pst; 
1428 PjL2MeasReqEvt *measReqEvt;
1429 #endif
1430 {
1431    U16            cntr;
1432    U8             measType;
1433
1434    PjCb     *tPjCb=NULLP;
1435    TRC3(PjDlUdxL2MeasReq);
1436
1437    tPjCb =  PJ_GET_PJCB(pst->dstInst);
1438    /* Initialize measCfmEvt */
1439
1440
1441    measType = measReqEvt->measReq.measType;
1442
1443    RLOG1(L_DEBUG, "L2_MEAS START Measurement type is %u",
1444              measType);
1445
1446   for(cntr = 0; cntr < LPJ_MAX_QCI; cntr++)
1447   {
1448      tPjCb->u.dlCb->pjL2Cb.measOn[cntr] |= measType;
1449   }
1450 #ifdef SS_LOCKLESS_MEMORY
1451       PJ_FREE_SHRABL_BUF(tPjCb,measReqEvt, sizeof(PjL2MeasReqEvt));
1452 #else
1453       PJ_FREE(tPjCb,measReqEvt, sizeof(PjL2MeasReqEvt));
1454 #endif
1455       /*stoping Task*/
1456
1457   RETVALUE(ROK);
1458 } /* KwDlUdxMeasReq */
1459
1460 /**
1461 @brief 
1462 This function processes L2 Measurement stop request received from the layer manager.
1463 After receving this request, RLC stops L2 Measurement
1464  *  @param[in] pst      post structure
1465  *  @param[in] measType meas Type 
1466  *  @return S16
1467  *      -# Success : ROK
1468  *      -# Failure : RFAILED
1469 */
1470
1471 #ifdef ANSI
1472 PUBLIC S16 PjDlUdxL2MeasStopReq
1473 (
1474 Pst   *pst,
1475 U8    measType
1476 )
1477 #else
1478 PUBLIC S16 PjDlUdxL2MeasStopReq (pst, measType)
1479 Pst   *pst;
1480 U8    measType;
1481 #endif
1482 {
1483    S16 ret = ROK;
1484    PjL2MeasEvtCb   *measEvtCb = NULLP;
1485    PjL2MeasCb      *measCb    = NULLP;
1486    U16             cntr;
1487    U8              status = ROK;
1488    PjL2MeasCfmEvt  measCfmEvt;  
1489    PjCb     *tPjCb=NULLP;
1490    TRC3(PjDlUdxMeasStopReq);
1491    tPjCb =  PJ_GET_PJCB(pst->dstInst);
1492    RLOG0(L_DEBUG, "L2_MEAS Received stopReq\n");
1493    cmMemset((U8*)&measCfmEvt, 0, sizeof(PjL2MeasCfmEvt)); 
1494    for(cntr = 0; cntr < LPJ_MAX_L2MEAS; cntr++)
1495    {
1496       measEvtCb = &(tPjCb->u.dlCb->pjL2Cb.pjL2EvtCb[cntr]);
1497       if(measEvtCb->measCb.measType & measType)
1498       {
1499          measCb = &measEvtCb->measCb;
1500          pjUtlResetDlL2MeasCntr(tPjCb, measCb, measType);
1501
1502       }
1503    }
1504    status = LCM_PRIM_OK; 
1505    PjMiLpjL2MeasStopCfm(&tPjCb->pjGenCfg.lmPst, measType,status); 
1506    RETVALUE(ret);
1507 }
1508 /**
1509 @brief 
1510 This function processes L2 Measurement Send request received from the layer manager.
1511 After receving this request, RLC sends L2 Measurement
1512  *  @param[in] pst      post structure
1513  *  @param[in] measType meas Type 
1514  *  @return S16
1515  *      -# Success : ROK
1516  *      -# Failure : RFAILED
1517 */
1518
1519 #ifdef ANSI
1520 PUBLIC S16 PjDlUdxL2MeasSendReq
1521 (
1522 Pst            *pst,
1523 U8             measType
1524 )
1525 #else
1526 PUBLIC S16 PjDlUdxL2MeasSendReq (pst, measType)
1527 Pst            *pst;
1528 U8             measType;
1529 #endif
1530 {
1531    S16 ret = ROK;
1532    PjL2MeasEvtCb *measEvtCb = NULLP;
1533    U16            cntr;
1534    PjCb     *tPjCb=NULLP;
1535    TRC3(PjDlUdxMeasSendReq);
1536
1537    tPjCb =  PJ_GET_PJCB(pst->dstInst);
1538    RLOG1(L_DEBUG, "L2_MEAS: Sending Meas for meastype %u",
1539              measType);
1540
1541    for(cntr = 0; cntr < LPJ_MAX_L2MEAS; cntr++)
1542    {
1543       measEvtCb = &(tPjCb->u.dlCb->pjL2Cb.pjL2EvtCb[cntr]);
1544       if(measEvtCb->measCb.measType & measType)
1545       {
1546          pjUtlSndDlL2MeasCfm(tPjCb, measEvtCb);
1547
1548       }
1549    }
1550
1551    RETVALUE(ret);
1552 }
1553 #endif /* LTE_L2_MEAS */
1554 /**
1555 @brief 
1556 This function processes Data Resume request received from the Application.
1557  *  @param[in] pst      post structure
1558  *  @param[in] measType meas Type 
1559  *  @return S16
1560  *      -# Success : ROK
1561  *      -# Failure : RFAILED
1562 */
1563
1564 #ifdef ANSI
1565 PUBLIC S16 PjDlUdxDatResumeReq
1566 (
1567 Pst               *pst,
1568 UdxDatResumeInfo  *datResumeInfo
1569 )
1570 #else
1571 PUBLIC S16 PjDlUdxDatResumeReq (pst, *datResumeInfo)
1572 Pst               *pst;
1573 UdxDatResumeInfo  *datResumeInfo;
1574 #endif
1575 {
1576    U8 rbCnt;
1577    PjDlUeCb *ueCb;
1578    PjDlRbCb *pjRbCb;
1579    PjCb     *tPjCb;
1580    S16       ret;
1581    UdxDatResumeCfmInfo  *cfmInfo;
1582    PjUdxDlSapCb   *udxSap;
1583
1584    tPjCb =  PJ_GET_PJCB(pst->dstInst);
1585
1586    ret = ROK;
1587    /* Perform processing for filling up cfm structures */
1588    /* Memory leak fix ccpu00135359 */
1589    udxSap = &(tPjCb->u.dlCb->udxDlSap[0]);
1590    PJ_ALLOC_BUF_SHRABL(udxSap->pst, cfmInfo,
1591         sizeof (UdxDatResumeCfmInfo), ret);
1592    if(ret != ROK)
1593    {
1594       RLOG0(L_FATAL, "Memory Allocation failed.");
1595       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, datResumeInfo, sizeof(UdxDatResumeInfo));         
1596       RETVALUE(RFAILED);
1597    }
1598
1599    cfmInfo->ueId = datResumeInfo->ueId;
1600    cfmInfo->cellId = datResumeInfo->cellId;
1601    cfmInfo->transId = datResumeInfo->transId;
1602    cfmInfo->status = CPJ_CFG_CFM_OK; 
1603    cfmInfo->reason = CPJ_CFG_REAS_NONE;
1604    
1605    ret = pjDbmFetchDlUeCb(tPjCb, datResumeInfo->ueId, 
1606                     datResumeInfo->cellId, &ueCb);
1607
1608    /* Ue Cb is not present */
1609    if( ROK != ret || NULLP == ueCb)
1610    {
1611       RLOG_ARG1(L_ERROR, DBG_CELLID, datResumeInfo->cellId,"UeId[%u] not found",
1612             datResumeInfo->ueId);
1613       cfmInfo->status = CPJ_CFG_CFM_NOK; 
1614       cfmInfo->reason = CPJ_CFG_REAS_UE_UNKWN;
1615       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, datResumeInfo, sizeof(UdxDatResumeInfo));         
1616       /* Send Failure SduStaCfm */
1617       PjDlUdxDatResumeCfm(&tPjCb->u.dlCb->udxDlSap[0].pst, 
1618                         tPjCb->u.dlCb->udxDlSap[0].suId, cfmInfo);
1619       RETVALUE(ret);
1620    }
1621
1622    for(rbCnt = 0; rbCnt < PJ_MAX_DRB_PER_UE; rbCnt ++)
1623    {
1624       /* Check of rbCb available */
1625       if( (pjRbCb = ueCb->drbCb[rbCnt]) == NULLP)
1626       {
1627          continue;
1628       }
1629   
1630       pjDlmRbDataResume(tPjCb,pjRbCb);
1631       pjRbCb->state = PJ_STATE_NORMAL;
1632    }
1633
1634    ueCb->libInfo.state = PJ_STATE_NORMAL;
1635    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, datResumeInfo, sizeof(UdxDatResumeInfo));         
1636    
1637    PjDlUdxDatResumeCfm(&tPjCb->u.dlCb->udxDlSap[0].pst, 
1638                      tPjCb->u.dlCb->udxDlSap[0].suId, cfmInfo);
1639    RETVALUE(ROK);
1640 }
1641
1642
1643
1644 /**
1645 @brief 
1646 This function processes Start Data Forwarding request received from UL 
1647  *  @param[in] pst      post structure
1648  *  @param[in] measType meas Type 
1649  *  @return S16
1650  *      -# Success : ROK
1651  *      -# Failure : RFAILED
1652 */
1653
1654 #ifdef ANSI
1655 PUBLIC S16 PjDlUdxDatForwardReq
1656 (
1657 Pst                 *pst,
1658 UdxDatForwardInfo   *datFwdInfo
1659 )
1660 #else
1661 PUBLIC S16 PjDlUdxDatForwardReq (pst, *datFwdInfo)
1662 Pst                 *pst;
1663 UdxDatForwardInfo   *datFwdInfo;
1664 #endif
1665 {
1666    S16 ret;
1667    U8 rbCnt;
1668    PjDlUeCb *ueCb =NULLP;
1669    PjDlRbCb *pjRbCb = NULLP;
1670    PjCb     *tPjCb;
1671    UdxDatFwdCfmInfo  *cfmInfo = NULLP;
1672    PjUdxDlSapCb      *udxSap;
1673
1674    tPjCb =  PJ_GET_PJCB(pst->dstInst);
1675
1676    ret = ROK;
1677    udxSap = &(tPjCb->u.dlCb->udxDlSap[0]);
1678    /* Allocate MEM and fill the DatFwd Cfm Struct */
1679    PJ_ALLOC_BUF_SHRABL(udxSap->pst, cfmInfo, 
1680       sizeof (UdxDatFwdCfmInfo), ret);
1681    if( ret != ROK)
1682    {
1683       cfmInfo = NULLP;
1684 #if (ERRCLASS & ERRCLS_DEBUG)
1685       RLOG0(L_FATAL, "Memory Allocation failed.");
1686       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, datFwdInfo, sizeof(UdxDatForwardInfo));         
1687       RETVALUE(RFAILED);
1688 #endif
1689    }
1690
1691    cfmInfo->ueId = datFwdInfo->ueId;
1692    cfmInfo->cellId = datFwdInfo->cellId;
1693    cfmInfo->status = CPJ_CFG_CFM_OK;
1694
1695    ret = pjDbmFetchDlUeCb(tPjCb,datFwdInfo->ueId, 
1696          datFwdInfo->cellId, &ueCb);
1697
1698    /* Ue Cb is not present */
1699    if( ROK != ret || NULLP == ueCb)
1700    {
1701       RLOG_ARG1(L_ERROR, DBG_CELLID, datFwdInfo->cellId,"UeId[%u] not found",
1702             datFwdInfo->ueId);
1703       cfmInfo->status = CPJ_CFG_CFM_NOK;
1704       cfmInfo->reason = CPJ_CFG_REAS_UE_UNKWN;
1705       /* Send Cfm to UL so that it can fwd the UL Pkts */
1706       PjDlUdxDatFwdCfm(&tPjCb->u.dlCb->udxDlSap[0].pst,
1707                        tPjCb->u.dlCb->udxDlSap[0].suId, cfmInfo);
1708       PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, datFwdInfo, sizeof(UdxDatForwardInfo));         
1709       RETVALUE(ret);
1710    }
1711
1712    for(rbCnt = 0; rbCnt < PJ_MAX_DRB_PER_UE; rbCnt ++)
1713    {
1714       /* Check of rbCb available */
1715       if( (pjRbCb = ueCb->drbCb[rbCnt]) == NULLP)
1716       {
1717          continue;
1718       }
1719
1720       if(pjRbCb->mode == PJ_DRB_AM)
1721       {
1722          pjDlmStartDataFrwdPerRb(tPjCb,pjRbCb);
1723       }
1724    }
1725    /* Send Data Fwd Cfm to the UL PDCP Module
1726     * The UL PDCP Module will forward UL Pkts
1727     * after receiving this cfm Info */
1728    PjDlUdxDatFwdCfm(&tPjCb->u.dlCb->udxDlSap[0].pst,
1729          tPjCb->u.dlCb->udxDlSap[0].suId, cfmInfo);
1730
1731    PJ_FREE_SHRABL_BUF_PST(pst->region, pst->pool, datFwdInfo, sizeof(UdxDatForwardInfo));         
1732    RETVALUE(ROK);
1733
1734 }
1735
1736
1737
1738 /********************************************************************30**
1739          End of file
1740 **********************************************************************/