1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
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 #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 *******************************************************************************/
19 /********************************************************************20**
21 Name: LTE PDCP Interface
25 Desc: This file contains the Data structures for LTE PDCP Interface.
29 *********************************************************************21*/
35 #endif /*for extern "C"*/
39 * @brief PJU Interface File
42 /*************************************************************************
44 ************************************************************************/
45 typedef U32 PjuSduId; /*!< SDU ID */
46 typedef U32 PjuSduLen; /*!< Length of SDU in bytes */
49 * @brief Data Confirmation Status parameters.
52 typedef struct pjuDatCfmSta
54 PjuSduId sduId; /*!< SDU ID for AM */
55 U8 status; /*!< Status, Value can be
57 -# PJU_DAT_CFM_SUCCESS,
58 -# PJU_RLC_TRANS_FAIL,
59 -# PJU_DISCARD_TMR_EXP */
63 * @brief Data Confirmation parameters
66 typedef struct pjuDatCfmInfo
68 U16 numSdus; /*!< Number of SDUs for which cfm is sent */
69 PjuDatCfmSta cfmSta[PJU_MAX_SDU_CFM]; /*!< Data Confirm Status */
73 * @brief Status Indication parameters
75 typedef struct pjuStaIndInfo
77 U8 cause; /*!< Error cause */
81 * @brief Data Forward Information
83 typedef struct pjuDatFwdInfo
85 PjuSduId sduId; /*!< SDU ID */
86 U16 sn; /*!< SN associated with the SDU */
87 Buffer *sdu; /*!< Forwarded SDU sent / received during
92 * @brief Data Forward Request parameters for PDCP
93 entity mapped to RLC AM
96 typedef struct pjuDatFwdReqInfo
98 U8 dir; /*!< Data forwarded for
100 U16 numSdus; /*!< Number of SDUs in DatFwdReq */
101 PjuDatFwdInfo *datFwdInfo; /*!< Data Forward Information */
102 Bool isLastDatFwdInd; /*!< Last Data Foward Indication */
106 * @brief Data Forward Indication parameters for PDCP
107 entity mapped to RLC AM
109 typedef PjuDatFwdReqInfo PjuDatFwdIndInfo;
110 typedef struct pjuDatReqInfo
116 typedef struct pjuDatIndInfo
121 /*************************************************************************
123 ************************************************************************/
125 /******************************************************************************
126 * Prototypes for the selector matrices *
127 ******************************************************************************/
130 typedef S16 (*PjuBndReq) ARGS((
136 typedef S16 (*PjuBndCfm) ARGS((
142 typedef S16 (*PjuUbndReq) ARGS((
148 typedef S16 (*PjuDatReq) ARGS((
156 #ifdef FLAT_BUFFER_OPT
157 typedef S16 (*PjuDatReqFB) ARGS((
167 typedef S16 (*PjuDatCfm) ARGS((
174 typedef S16 (*PjuDatInd) ARGS((
181 typedef S16 (*PjuStaInd) ARGS((
189 typedef S16 (*PjuDatFwdReq) ARGS((
196 typedef S16 (*PjuDatFwdInd) ARGS((
203 /* pju_x_001.main_2 */
204 /*************************************************************************
205 * Start of Extern Interface Declarations
206 ************************************************************************/
208 * @brief Bind request primitive
210 * The function binds the PDCP service user entity to the PDCP product.
211 * The PDCP service user must bind each PJU SAP individually before sending
212 * any other request. PDCP acknowledges the receipt of the bind request by
213 * sending a @ref PjUiPjuBndCfm primitive.
215 * @param[in] pst - Pointer to the pst structure.
216 * @param[in] suId - Service user ID. This is the reference number used by the
217 * PDCP service user to identify its SAP. This reference number is
218 * provided by PDCP in any further primitives sent by PDCP to the service user.
219 * @param[in] spId - Service provider ID. This is the reference number
220 * used by the PDCP service user (Relay) to identify its SAP. This reference number
221 * is provided by PDCP in any further primitives sent by the PDCP
222 * to the service user.
226 EXTERN S16 PjUiPjuBndReq ARGS(( Pst* , SuId , SpId));
229 * @brief Bind confirm primitive
231 * PDCP invokes the bind confirm primitive to acknowledge the receipt
232 * of the @ref PjUiPjuBndReq primitive from the service user. The status
233 * field indicates whether the bind request succeeded or failed. The bind
234 * request may fail due to invalid parameters in the bind request from the
235 * service user (for example, an invalid spId).
237 * @param[in] pst - Pointer to the pst structure.
238 * @param[in] suId - Service user ID. This is the reference number used
239 * by the PDCP service user (Relay or RRC layer) to identify its SAP.
240 * @param[in] status - Status field indicates whether the bind request
241 * succeeded or failed.
242 * -# TRUE, if successful bind.
243 * -# FALSE, otherwise.
247 EXTERN S16 PjUiPjuBndCfm ARGS(( Pst*, SuId, U8));
250 * @brief Unbind request primitive
252 * The PDCP service user initiates this primitive for performing an unbind
253 * operation. This function brings the link between PDCP and its service user
254 * down if it is already up, and releases all the resources associated for
257 * @param[in] pst - Pointer to pst structure.
258 * @param[in] spId - Service provider ID. This is the reference number
259 * used by the PDCP service user (Relay) to identify its SAP. This reference number
260 * is provided by the PDCP in any further primitives sent by the PDCP
261 * to the service user.
262 * @param[in] reason - Unbind reason. Not used in the current implementation.
266 EXTERN S16 PjUiPjuUbndReq ARGS(( Pst*, SpId, Reason));
269 * @brief Data request primitive
271 * This primitive is used by the PDCP service user to request the PDCP
274 * @param[in] pst - Pointer to pst structure.
275 * @param[in] spId - Service provider ID. This is the reference number
276 * used by the PDCP service user (Relay) to identify its SAP. This reference number
277 * is provided by the PDCP in any further primitives sent by the PDCP
278 * to the service user.
279 * @param[in] pdcpId - Pointer to CmLtePdcpId structure, PDCP ID is used to
280 * uniquely identify a PDCP entity.
281 * @param[in] sduId - SDU ID.
282 * @param[in] mBuf - Pointer to data buffer.
286 EXTERN S16 PjUiPjuDatReq ARGS(( Pst*, SpId, CmLtePdcpId *, PjuSduId, Buffer*));
287 #ifdef FLAT_BUFFER_OPT
288 EXTERN S16 PjUiPjuDatReqFB ARGS(( Pst*, SpId, CmLtePdcpId *, PjuSduId, FlatBuffer*));
292 * @brief Data confirm primitive
294 * This primitive is sent to the PDCP user to acknowledge the status of the SDU delivered
295 * to the lower layer. Its applicable only for PDCP entities mapped with RLC AM.
297 * @param[in] pst - Pointer to pst structure.
298 * @param[in] suId - Service user ID. This is the reference number used by the PDCP
299 user to identify its SAP.
300 * @param[in] pdcpId - Pointer to CmLtePdcpId structure, PDCP ID is used to
301 uniquely identify a PDCP entity.
302 * @param[in] datCfm - Pointer to data confirm structure.
306 EXTERN S16 PjUiPjuDatCfm ARGS((Pst*, SuId, CmLtePdcpId *, PjuDatCfmInfo *));
309 * @brief Data indication primitive
311 * This primitive is used to send the data received from the lower layer
312 * to the service user.
314 * @param[in] pst - Pointer to pst structure.
315 * @param[in] suId - Service user ID. This is the reference number used
316 * by the PDCP user to identify its SAP.
317 * @param[in] pdcpId - Pointer to CmLtePdcpId structure, PDCP ID is used
318 * to uniquely identify a PDCP entity.
319 * @param[in] mBuf - Pointer to data buffer.
323 EXTERN S16 PjUiPjuDatInd ARGS((Pst*, SuId, CmLtePdcpId *, Buffer*));
326 * @brief Status indication primitive
328 * This primitive is used by the PDCP to indicate to the PDCP service user about
329 * the arrival of invalid PDUs (integrity protection or ciphering failed).
331 * @param[in] pst - Pointer to pst structure.
332 * @param[in] suId - Service user ID. This is the reference number used
333 * by the PDCP user to identify its SAP.
334 * @param[in] pdcpId - Pointer to CmLtePdcpId structure, PDCP ID is used to
335 * uniquely identify a PDCP entity.
336 * @param[in] staInd - Pointer to status indication structure.
337 * @param[in] mBuf - PDU for which integrity protection failed.
341 EXTERN S16 PjUiPjuStaInd ARGS((Pst*, SuId, CmLtePdcpId *, PjuStaIndInfo *, Buffer *));
345 * @brief Data Forward Request primitive
347 * This primitive is used by PDCP user to forward the SDUs along with its SN
348 * as part of handover (SDUs forwarded from PDCP on source eNB through X2-U
349 * interface to the PDCP on target eNB).
351 * @param[in] pst - Pointer to pst structure.
352 * @param[in] spId - Service provider ID. This is the reference number
353 * used by PDCP service user (Relay) to identify its SAP. This reference number
354 * is provided by PDCP in any further primitives sent by PDCP
355 * to the service user.
356 * @param[in] pdcpId - Pointer to CmLtePdcpId structure, PDCP ID is used to
357 * uniquely identify a PDCP entity.
358 * @param[in] datFwdReq - Pointer to data forward information structure.
362 EXTERN S16 PjUiPjuDatFwdReq ARGS((Pst*, SpId, CmLtePdcpId *, PjuDatFwdReqInfo *));
366 * @brief Data Forward Indication primitive
368 * This primitive is used by PDCP to forward the SDUs along with its SN
369 * as part of handover (SDUs forwarded from PDCP on source eNB through X2-U
370 * interface to the PDCP on target eNB).
372 * @param[in] pst - Pointer to pst structure.
373 * @param[in] suId - Service user ID. This is the reference number used
374 * by the PDCP user to identify its SAP.
375 * @param[in] pdcpId - Pointer to CmLtePdcpId structure, PDCP ID is used to
376 * uniquely identify a PDCP entity.
377 * @param[in] datFwdInd - Pointer to data forward information structure.
381 EXTERN S16 PjUiPjuDatFwdInd ARGS((Pst*, SuId, CmLtePdcpId *, PjuDatFwdIndInfo *));
384 /*************************************************************************
385 * End of Extern Interface Declarations
386 ************************************************************************/
389 EXTERN S16 DmUiPjuBndReq ARGS((
395 EXTERN S16 DmUiPjuUbndReq ARGS((
402 EXTERN S16 DmUiPjuBndCfm ARGS((
408 EXTERN S16 DmUiPjuDatReq ARGS((
416 EXTERN S16 DmUiPjuDatInd ARGS((
423 EXTERN S16 DmUiPjuDatCfm ARGS((
430 EXTERN S16 DmUiPjuStaInd ARGS((
437 EXTERN S16 DmUiPjuDatFwdReq ARGS((
444 EXTERN S16 DmUiPjuDatFwdInd ARGS((
452 /******************************************************************************
453 * Prototypes for LTE-PDCP layer *
454 ******************************************************************************/
456 #ifdef PX /* for LTE PDCP to PX (Relay) */
458 EXTERN S16 PxLiPjuBndReq ARGS((
464 EXTERN S16 PxLiPjuUbndReq ARGS((
470 EXTERN S16 PxLiPjuDatReq ARGS((
478 EXTERN S16 PxLiPjuBndCfm ARGS((
484 EXTERN S16 PxLiPjuDatInd ARGS((
491 EXTERN S16 PxLiPjuDatCfm ARGS((
498 EXTERN S16 PxLiPjuStaInd ARGS((
506 EXTERN S16 PxLiPjuDatFwdReq ARGS((
514 EXTERN S16 PxLiPjuDatFwdInd ARGS((
523 #ifdef NH /* for LTE RLC to NH */
525 EXTERN S16 NhLiPjuBndReq ARGS((
531 EXTERN S16 NhLiPjuUbndReq ARGS((
537 EXTERN S16 NhLiPjuDatReq ARGS((
545 EXTERN S16 NhLiPjuBndCfm ARGS((
551 EXTERN S16 NhLiPjuDatInd ARGS((
558 EXTERN S16 NhLiPjuDatCfm ARGS((
565 EXTERN S16 NhLiPjuStaInd ARGS((
573 EXTERN S16 NhLiPjuDatFwdReq ARGS((
581 EXTERN S16 NhLiPjuDatFwdInd ARGS((
590 /******************************************************************************
591 * pack/unpack functions *
592 ******************************************************************************/
596 EXTERN S16 cmPkPjuBndReq ARGS((
601 EXTERN S16 cmUnpkPjuBndReq ARGS((
606 EXTERN S16 cmPkPjuBndCfm ARGS((
611 EXTERN S16 cmUnpkPjuBndCfm ARGS((
616 EXTERN S16 cmPkPjuUbndReq ARGS((
621 EXTERN S16 cmUnpkPjuUbndReq ARGS((
627 EXTERN S16 cmPkFpPjuDatReq ARGS((
630 CmLtePdcpId * pdcpId,
635 EXTERN S16 cmPkPjuDatReq ARGS((
638 CmLtePdcpId * pdcpId,
642 #ifdef FLAT_BUFFER_OPT
643 EXTERN S16 cmPkPjuDatReqFB ARGS((
646 CmLtePdcpId * pdcpId,
653 EXTERN S16 cmUnpkFpPjuDatReq ARGS((
659 EXTERN S16 cmUnpkPjuDatReq ARGS((
664 EXTERN S16 cmPkPjuDatCfm ARGS((
667 CmLtePdcpId * pdcpId,
668 PjuDatCfmInfo * datCfm
670 EXTERN S16 cmUnpkPjuDatCfm ARGS((
675 EXTERN S16 cmPkPjuDatInd ARGS((
678 CmLtePdcpId * pdcpId,
681 EXTERN S16 cmUnpkPjuDatInd ARGS((
688 EXTERN S16 cmPkFpPjuDatInd ARGS((
691 CmLtePdcpId * pdcpId,
695 EXTERN S16 cmUnpkFpPjuDatInd ARGS((
702 EXTERN S16 cmPkPjuStaInd ARGS((
705 CmLtePdcpId * pdcpId,
706 PjuStaIndInfo * staInd,
709 EXTERN S16 cmUnpkPjuStaInd ARGS((
714 EXTERN S16 cmPkPjuDatFwdReq ARGS((
717 CmLtePdcpId * pdcpId,
718 PjuDatFwdReqInfo * datFwdReq
720 EXTERN S16 cmUnpkPjuDatFwdReq ARGS((
725 EXTERN S16 cmPkPjuDatFwdInd ARGS((
728 CmLtePdcpId * pdcpId,
729 PjuDatFwdIndInfo * datFwdInd
731 EXTERN S16 cmUnpkPjuDatFwdInd ARGS((
736 EXTERN S16 cmPkPjuDatCfmInfoSta ARGS((
740 EXTERN S16 cmUnpkPjuDatCfmInfoSta ARGS((
744 EXTERN S16 cmPkPjuDatCfmInfo ARGS((
745 PjuDatCfmInfo *param,
748 EXTERN S16 cmUnpkPjuDatCfmInfo ARGS((
749 PjuDatCfmInfo *param,
752 EXTERN S16 cmPkPjuStaIndInfo ARGS((
753 PjuStaIndInfo *param,
756 EXTERN S16 cmUnpkPjuStaIndInfo ARGS((
757 PjuStaIndInfo *param,
760 EXTERN S16 cmPkPjuDatFwdReqInfo ARGS((
761 PjuDatFwdReqInfo *param,
764 EXTERN S16 cmUnpkPjuDatFwdReqInfo ARGS((
766 PjuDatFwdReqInfo *param,
769 EXTERN S16 cmPkPjuDatFwdInfo ARGS((
770 PjuDatFwdInfo *param,
773 EXTERN S16 cmUnpkPjuDatFwdInfo ARGS((
774 PjuDatFwdInfo *param,
782 #endif /* __cplusplus */
783 #endif /* __PJU_X__ */
784 /********************************************************************30**
787 **********************************************************************/