1 /******************************************************************************
3 * Copyright (c) 2020 ICT/CAS.
5 * Licensed under the O-RAN Software License, Version 1.0 (the "Software 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 * https://www.o-ran.org/software
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.
17 *******************************************************************************/
20 #ifndef CU_UP_COMMON_H
21 #define CU_UP_COMMON_H
23 #include "vos_types.h"
24 #include "gnbServiceType.h"
25 #include "cuModuleCommon.h"
26 #include "cuModuleInterface.h"
29 #define CUUP_MAX_SESSION_NUM 256
32 #define SECURITY_PERFORMED 0
33 #define SECURITY_NOT_PERFORMED 1
34 #define CUUP_DL_HEAD_LEN 4 // SDAP MAX HEAD 1 + PDCP MAX HEAD +3
35 #define CUUP_UL_HEAD_LEN 0
36 #define AS_KEY_LEN 4 //4 bytes
39 * @brief calc function run time
41 #define CUUP_CALC_ELAPSED_TIME(func) \
43 struct timeval start, end; \
45 gettimeofday(&start,0); \
47 gettimeofday(&end,0); \
48 diff = ( end.tv_sec*1000000L + end.tv_usec ) \
49 - ( start.tv_sec*1000000L + start.tv_usec ); \
50 vos_info_print("func %s spend time = %ld us\n",#func ,diff);\
53 /* brief UE E1AP ID */
54 typedef UINT32 CuupUeE1apId;
56 /* brief Session ID */
57 typedef UINT8 CuupSessionId; /* INTEGER (0 ..255) 38463 */
59 /* brief Data Radio Bearer ID */
60 typedef UINT8 CuupDrbId;
63 typedef UINT8 CuupQFI;
67 PDU_SESSION_ADD, /* SESSION TO SETUP */
68 PDU_SESSION_MOD, /* SESSION TO MODIFY */
69 PDU_SESSION_DEL, /* SESSION TO DELETE */
70 DRB_DEL, /* DRB TO DELETE */
84 INT8 cfgResult; //will be removed
86 TransLayerAddr_t nggtpuAddr;
87 E1apCause_e failureCause;
100 SecuResult_t secuResult;
102 UINT8 drbSetupSuccessNum;
103 UINT8 drbSetupSuccessArray[MAX_DRB_NUM];
104 UINT8 drbSetupFailNum;
105 DrbFailedCause_t drbSetupFailedArray[MAX_DRB_NUM];
106 UINT8 drbModifySuccessNum;
107 UINT8 drbModifySuccessArray[MAX_DRB_NUM];
108 UINT8 drbModifyFailNum;
109 DrbFailedCause_t drbModifyFailedArray[MAX_DRB_NUM];
110 E1apCause_e pduSessionCause;
117 TransLayerAddr_t gtpuAddr;
122 UpcCfgType_e cfgType;
124 UINT8 drbSetupSuccessNum;
125 Cuf1uSetupInfo_t drbSetupSuccessArray[MAX_DRB_NUM];
126 UINT8 drbSetupFailNum;
127 DrbFailedCause_t drbSetupFailedArray[MAX_DRB_NUM];
128 UINT8 drbModifySuccessNum;
129 UINT8 drbModifySuccessArray[MAX_DRB_NUM];
130 UINT8 drbModifyFailNum;
131 DrbFailedCause_t drbModifyFailedArray[MAX_DRB_NUM];
132 E1apCause_e pduSessionCause;
139 CUUP_DETECT_DL_DATA /* in suspend, ngu recv dl data */
142 typedef struct bearerCxtInactive_s
147 E1apDrbActivityList_t drbActivityList;
148 E1apPduSessionActivityList_t pduSessionActivityList;
149 E1apUeActivity_t ueActivity;
151 }BearerCxtInactive_t;
152 extern INT32 ifmUpcBearerCxtInactiveNotification(BearerCxtInactive_t *bearerCxtInactive);
153 extern INT32 ifmUpcDlDataNotification(UINT64 ueE1apId, UINT8 PPI);
154 #endif /* CU_UP_COMMON_H */