O-CU-UP
[scp/ocu/5gnr.git] / Include / cuCommon.h
1 /******************************************************************************
2 ###############################################################################
3 #   Copyright (c) [2017-2020] [ICT/CAS]                                        #
4 #   Licensed under the ORAN Software License v1.0 (License)             #
5 ###############################################################################
6 ******************************************************************************/
7 #ifndef _CU_COMMON_H_
8 #define _CU_COMMON_H_
9
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 #include <netinet/in.h>
15 #include "gnbCommon.h"
16
17 #define MAX_CU_NAME_LEN   256
18 #define MAX_CUCP_NAME_LEN 256
19 #define MAX_CUUP_NAME_LEN 256
20
21 #define MAX_OM_MSG_BUF_LEN      64
22
23 /****************************************oam active message code****************************************/
24 #define         OAM_CU_ACTIVE_BASE                                      0x7000
25 #define         OAM_CUUP_NET_ELEMENT_ACTIVE_REQ                 OAM_CU_ACTIVE_BASE + 1
26 #define         OAM_CUCP_NET_ELEMENT_ACTIVE_REQ         OAM_CU_ACTIVE_BASE + 2
27 #define         CUCP_OAM_CELL_ACTIVE_RSP                        OAM_CU_ACTIVE_BASE + 3
28 #define         CUUP_OAM_CELL_ACTIVE_RSP                        OAM_CU_ACTIVE_BASE + 3
29
30 typedef enum
31 {
32     MODULE_OM,
33     MODULE_CUCP_E1, 
34     MODULE_CUUP_E1  ,
35     MODULE_NG,
36     MODULE_Xn,
37     MODULE_F1_C,    
38     MODULE_CUC,
39     MODULE_RRC,
40     MODULE_PDCP_C,
41     MODULE_UPC,
42     MODULE_NG_U,
43     MODULE_NG_GTPU,
44     MODULE_SDAP,
45     MODULE_F1_U,
46     MODULE_F1_GTPU,
47     
48 }CuModule_e;
49
50
51
52 typedef enum CuCpVosTask
53 {
54     CUCP_OMADP_VOS_TASK,  
55     CUC_VOS_TASK,
56     CUCP_NG_C_VOS_TASK,
57     CUCP_F1_C_VOS_TASK,
58     CUCP_E1_VOS_TASK,
59 #ifdef AMF_TEST
60     AMF_VOS_TASK,
61 #endif
62         CP_MAX_VOS_TASK  
63 }CuCpVosTask_e;
64
65 typedef enum CuUpVosTask
66 {
67     UP_OMADP_VOS_TASK,    
68         UP_DL_VOS_TASK,
69         UP_UL_VOS_TASK,
70         UP_GTPU_VOS_TASK,
71         UP_MAX_VOS_TASK  
72 }CuUpVosTask_e;
73
74 typedef enum
75 {
76     CUCP_HOST_TASK,
77     CUUP_HOST_TASK,
78     CUUP_DATA_HOST_TASK
79 }CuHostTask_e;
80
81 typedef enum
82 {
83 #if 0
84     CUC_USER_TASK,
85     CUCP_NG_C_USER_TASK,
86     CUCP_F1_C_USER_TASK,
87     CUCP_E1_USER_TASK,
88 #endif
89     /*注意:请新增任务定义在注释中间*/
90
91
92
93
94     /*注意:请新增任务定义在注释中间*/
95     CUCP_END_USER_TASK = 100
96 }CucpUserTask_e;
97
98 typedef enum
99 {
100     CUUP_BEGIN_USER_TASK=200,
101     CUUP_UPC_USER_TASK,
102     CUUP_E1_USER_TASK,
103     CUUP_NGGTPU_DL_TASK,
104     CUUP_NGU_DL_TASK,
105     CUUP_SDAP_DL_TASK,
106     CUUP_PDCPU_DL_TASK,
107     CUUP_F1U_DL_TASK,
108     CUUP_F1GTPU_DL_TASK,
109
110     CUUP_NGGTPU_UL_TASK,
111     CUUP_NGU_UL_TASK,
112     CUUP_SDAP_UL_TASK,
113     CUUP_PDCPU_UL_TASK,
114     CUUP_F1U_UL_TASK,
115     CUUP_F1GTPU_UL_TASK,
116     /*注意:请新增任务定义在注释中间*/
117     CUUP_GTPU_USER_TASK,
118     CUUP_PDCPU_USER_TASK,   
119     CUUP_SDAP_USER_TASK,   
120         
121         
122     /*注意:请新增任务定义在注释中间*/
123     CUUP_END_USER_TASK=400,
124 }CuupUserTask_e;
125
126
127 typedef struct 
128 {
129     UINT8 cuName[MAX_CU_NAME_LEN];  /* CU Name */
130     UINT32 nodeID;
131     IpAddress_t cuIpAddr;
132     IpAddress_t omIpAddr;
133
134     IpAddress_t amfIpAddr;
135     IpAddress_t umfIpAddr;
136     
137     IpAddress_t cucpF1SctpIpAddr;
138     IpAddress_t cuupF1GtpuIpAddr;
139
140     IpAddress_t duF1SctpIpAddr;
141     IpAddress_t duF1GtpuIpAddr;
142     
143     IpAddress_t cucpE1SctpIpAddr;
144     IpAddress_t cuupE1SctpIpAddr;
145     
146     IpAddress_t cucpNgSctpIpAddr;
147     IpAddress_t cuupNgGtpuIpAddr;      
148
149     IpAddress_t cuXnSctpIpAddr;
150 }CuCommCfg_t;
151
152 typedef struct 
153 {
154     UINT8   NodeBName[MAX_CU_NAME_LEN];
155     UINT32 procId;
156     UserTaskInfo_t  userTaskInfo[MAX_TASK_NUM];
157     CuCommCfg_t commCfg;
158     UINT8  cuStackState;
159     UINT8  omState;
160     
161     UINT8  printDebug;
162     UINT8  printLevel;
163     UINT8  interLogFlag;
164     
165 } CuCtrlBlock_t;
166
167 typedef struct
168 {
169         PlmnId_t        plmnId;
170         NrCellId_t  CellId[MAX_CELL_NUM];
171 }CellIdList_t;
172
173 typedef struct oamCuUpNetElementActReq 
174 {
175         UINT8           actCellNum;
176         CellIdList_t    cellIdList;     
177 } OamCuUpNetElementActReq_t;
178
179 typedef struct oamCuUpCellActRsp 
180 {
181         UINT8           successCellNum;
182         UINT8           failCellNum;
183         NrCellId_t      failCellId[MAX_CELL_NUM];
184 } OamCuUpCellActRsp_t;
185
186 typedef struct oamCuCpNetElementActReq 
187 {
188         UINT8           cuCpNetElementAct[MAX_CELL_NUM];        
189 } OamCuCpNetElementActReq_t;
190
191 typedef struct oamCuCpCellActRsp 
192 {
193         UINT8           cuCpCellActFlag[MAX_CELL_NUM];  
194 } OamCuCpCellActRsp_t;
195
196 typedef enum
197 {
198         SRB0 =0 ,
199         SRB1 = 1,
200         SRB2 = 2,
201         SRB3 = 3,
202         
203 }SRB_e;
204         
205
206
207
208
209 #ifdef __cplusplus
210 }
211 #endif
212             
213 #endif  /* _CU_COMMON_H_*/
214
215
216