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 *******************************************************************************/
21 #ifndef __CUMODULECOMMONH__
22 #define __CUMODULECOMMONH__
28 #include "gnbCommon.h"
29 #include "cuModuleEnum.h"
31 #define MAX_LENGTH_RAN_NAME 150
33 #define CU_MAX_PLMN_NUM 6
34 #define CU_MAX_UES_PER_CELL 32
35 #define CU_MAX_DU_NUM 2
37 #define CU_MAX_AMF_NUM 2
38 #define CU_MAX_UPF_NUM 2
39 #define CU_MAX_CUUP_NUM 4
41 #define CU_MAX_CUCP_NUM 2
44 #define CU_SEC_SNOW3G_ALGO_BITMASK 0x01
45 #define CU_SEC_AES_ALGO_BITMASK 0x02
46 #define CU_SEC_ZUC_ALGO_BITMASK 0x03
48 #define CU_MAX_AS_SEC_ALGOS 4
50 #define CU_MAX_SNSSAI_NUM 3
52 typedef enum cuSecAlgo_
61 #define CU_INVALID_AP_ID 0xFFFFFFFF;
63 #define CU_SET_CU_UE_F1AP_ID(_cuUeF1apId,_cellIdx,_ueIdx) CU_SET_TRANS_ID(_cuUeF1apId,_cellIdx,_ueIdx,0)
66 typedef UINT32 gNBId_t;
74 /* Ran name, a string */
75 typedef struct RanName
77 char nodeName[MAX_LENGTH_RAN_NAME];
80 /* Tracking Area Code */
86 typedef struct cuepsTac_s
92 #define S_NSSAI_SD_PRESENT (1 << 0)
97 UINT32 sd:24;/*optional*/
103 SNssai_t sNssai[CU_MAX_SNSSAI_NUM];
107 typedef struct Timestamp
112 typedef struct cuNrCgi
125 typedef UINT64 MaskedImeiSv_t;
127 /* UE Identity Index value */
128 typedef struct UeIdIdxValue
130 UINT16 ueIdIdxValue:10;
134 typedef UINT32 GtpTeid_t;
136 typedef struct recomRanGnbId
142 typedef struct transLayerAddr
144 UINT8 transLayerAddress[20];
145 UINT8 bitStringSize; /* bit string size in bytes */
148 typedef struct secuResult
150 IPResult_e integrityProtectionResult;
151 CPResult_e confidentialityProtectionResult;
154 typedef struct gtpTunnel
156 TransLayerAddr_t transLayerAddr;
160 typedef struct upTransLayerInfo
162 GtpTunnel_t gtpTunnel;
163 } UpTransLayerInfo_t;
167 IPIndication_e IPIndication;
168 CPIndication_e CPIndication;
169 MaxIpDataRate_e maxIPdataRate;
172 #define PRIORITY_LEVEL_QOS_PRESENT (1 << 0)
173 #define NON_DYNAMIC_AVERAGING_WINDOW_PRESENT (1 << 1)
174 #define NON_DYNAMIC_MAX_DATA_BURST_VOLUME (1 << 2)
175 typedef struct nonDynamic5QIDescr
179 INT64 priorityLevelQos; /* OPTIONAL */
180 INT64 averagingWindow; /* OPTIONAL */
181 INT64 maxDataBurstVolume; /* OPTIONAL */
182 } NonDynamic5QIDescr_t;
190 #define FIVEQI_PRESENT (1 << 0)
191 #define DELAY_CRITICAL_PRESENT (1 << 1)
192 #define DYNAMIC_AVERAGING_WINDOW_PRESENT (1 << 2)
193 #define DYNAMIC_MAX_DATA_BURST_VOLUME (1 << 3)
194 typedef struct dynamic5QIDescr
197 INT64 priorityLevelQos;
198 INT64 packetDelayBudget;
199 PackErrorRate_t packetErrorRate;
200 INT64 fiveQI; /* OPTIONAL */
201 Dynamic5QIDelayCritical_e delayCritical; /* OPTIONAL */
202 INT64 averagingWindow; /* OPTIONAL */
203 INT64 maxDataBurstVolume; /* OPTIONAL */
206 typedef struct QosCharact
208 QosCharacterPR_e present;
210 NonDynamic5QIDescr_t nonDynamic5QI;
211 Dynamic5QIDescr_t dynamic5QI;
217 PriorityLevel_e priorityLevel;
218 PreEmptionCapability_e pre_emptionCapability;
219 PreEmptionVulnerability_e pre_emptionVulnerability;
220 }AllocAndRetenPriority_t;
224 SecuResult_t securityResult;
225 SecuInd_t securityIndication;
226 }UserPlaneSecurInfo_t;