1 /******************************************************************************
2 ###############################################################################
3 # Copyright (c) [2017-2020] [ICT/CAS] #
4 # Licensed under the ORAN Software License v1.0 (License) #
5 ###############################################################################
6 ******************************************************************************/
11 #include "vos_linklist.h"
12 #include "pdcpCommon.h"
14 #include "cuupCommon.h"
15 #include "cuModuleCommon.h"
16 #include "plat_syslog.h"
18 #define PROFILE0X0001_PRENSENT 0x0001
19 #define PROFILE0X0002_PRENSENT 0x0002
20 #define PROFILE0X0003_PRENSENT 0x0004
21 #define PROFILE0X0004_PRENSENT 0x0008
22 #define PROFILE0X0006_PRENSENT 0x0010
23 #define PROFILE0X0101_PRENSENT 0x0020
24 #define PROFILE0X0102_PRENSENT 0x0040
25 #define PROFILE0X0103_PRENSENT 0x0080
26 #define PROFILE0X0104_PRENSENT 0x0100
28 #define pdcpuLog(iLog_Level, content, arg...) \
29 VOS_SysLog(gPdcpuModuleId, iLog_Level, __FILE__, __LINE__, __func__, content, ##arg);
31 #define pdcpuNullCheck(p) \
35 pdcpuLog(LOG_ERR,"[PDCPU] NULL pointer\n");\
40 #define pdcpuNullCheckRp(p) \
44 pdcpuLog(LOG_ERR,"[PDCPU] NULL pointer\n");\
50 #define pdcpuCheckUeIdx(n) if(n<0 || n>MAX_UE_NUM) {pdcpuLog(LOG_ERR,#n" is wrong\r\n");return VOS_ERROR;}
51 #define pdcpuCheckDrbId(n) if(n<1 || n>MAX_DRB_ID) {pdcpuLog(LOG_ERR,#n":%d is wrong\r\n");return VOS_ERROR;}
52 #define pdcpuCheckPduSessionId(n) if(n<0 || n>255) {pdcpuLog(LOG_ERR,#n" is wrong\r\n");return VOS_ERROR;}
54 #define pdcpuGetEntity(ueIdx, drbId, p)\
56 if((NULL==gPdcpuUeInfo[ueIdx])\
57 ||(NULL==gPdcpuUeInfo[ueIdx]->pdcpDrbEntity[drbId]))\
62 p = gPdcpuUeInfo[ueIdx]->pdcpDrbEntity[drbId];\
66 #define pdcpuMsgbFree(p)\
78 UINT8 integrityEnableFlag;
79 UINT8 cipherEnableFlag;
80 UINT64 maxIPDataRate; /* Maximum Integrity Protected Data Rate */
81 }PdcpuSecEnableInfo_t;
92 PDCP_DISCARD_TIMER = 1,
100 UINT32 f1uSn; /* Not used in receiving buffer */
103 struct timeval startTime;
104 }PdcpuDataBuffNode_t;
110 RohcParaPR_e rohcType;
113 ROHCConfig_t rohcConfig;
114 UplinkOnlyRohc_t uplinkOnlyRohc;
116 }HeaderCompression_t;
125 PdcpRlcMode_e rlcMode;
128 PdcpSnSize_e pdcpSnSizeUl;
129 PdcpSnSize_e pdcpSnSizeDl;
130 HeaderCompression_t headerCompress;
132 UINT8 tDiscardActive; /* TRUE/FALSE */
133 UINT8 tDiscardRun; /* TRUE/FALSE */
134 UINT16 tDiscard; /* ms */
135 ModuleMsg_t *pDiscardMsg;
137 UINT8 tReorderActive; /* TRUE/FALSE */
138 UINT8 tReorderRun; /* TRUE/FALSE */
139 UINT16 tReorder; /* ms */
140 ModuleMsg_t *pReorderMsg;
143 MoreThanOneRLCContext moreThanOneRLCContext;
144 UINT8 integrityProtection; /* TRUR: used, FALSE: not used */
145 UINT8 outOfOrderDelivery;
146 UINT8 ciperingEnabled; /* TRUR: used, FALSE: not used */
147 PdcpStateVar_t stateVar;
149 plist pTxPduList; /* transmitting buffer */
150 ULONG txListLock; /* txListLock */
152 plist pRxSduList; /* receiving buffer */
153 ULONG rxListLock; /* rxListLock */
160 UINT32 kUpEnc[4]; /* 128 bit */
161 UINT32 kUpInt[4]; /* 128 bit */
162 UINT32 nh[8]; /* Next Hop parameter 256 bit */
163 UINT8 ncc; /* maximum: 3bit */
164 UINT8 encAlgorithm; /* Encryption Algorithm */
165 UINT8 intAlgorithm; /* Integrity Algorithm */
166 UINT8 encActiveFlag; /* define whether the encryption function has been activated */
167 UINT8 intActiveFlag; /* define whether the integrity protection function has been activated */
168 UINT8 nhInd; /* 1: nh existed 0: not existed */
174 CuupBearerStatus_e ueStatus;
175 PdcpuSecInfo_t *secInfo;
176 PdcpuSecEnableInfo_t *secEnableInfo[CUUP_MAX_SESSION_NUM];
177 PdcpDrbEntity_t *pdcpDrbEntity[MAX_DRB_NUM];
187 #endif /* PDCP_U_H */