Release A code commit
[o-du/l2.git] / src / du_app / du_common.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18
19 #ifndef __DU_COMMON_H__
20 #define __DU_COMMON_H__
21
22 #include "envdep.h"
23 #include "lcl.h"
24
25 #define DU_PROC  0
26 #define DU_INST 0
27 #define DU_POOL  1
28
29 #define SCTP_INST 0
30
31 /* Events */
32 #define EVTCFG 0
33
34 /* Selector */
35 #define DU_SELECTOR_LC   0
36 #define DU_SELECTOR_TC   1
37 #define DU_SELECTOR_LWLC 2
38
39
40 /* Macro definitions for F1 procedures */
41 #define CU_DU_NAME_LEN_MAX 30      /* Max length of CU/DU name string */
42 #define MAX_F1_CONNECTIONS 65536    /* Max num of F1 connections */
43 #define MAXCELLINGNBDU     2      /* Max num of cells served by gNB-DU */
44 #define MAXNUMOFBPLMN      1        /* Max num of broadcast PLMN ids */
45 #define MAXNRARFCN         3279165  /* Maximum values of NRAFCN */
46 #define MAXNRCELLBANDS     2       /* Maximum number of frequency bands */
47 #define MAXNUMOFSLICEITEMS 1024     /* Maximum number of signalled slice support items */
48 #define MAXBPLMNNRMINUS1   1       /* Maximum number of PLMN Ids broadcast in an NR cell minus 1 */
49 #define MAXNUMOFSIBTYPES   32       /* Maximum number of SIB types */
50 #define MAX_UEID           512      /* Maximum number of UE Ids */
51 #define MAXNUMOFTNLASSOCS  32       /* Max num of TNL Assoc between CU and DU */
52 #define MAXCELLINENB       256      /* Max num of cells served by eNB */
53 #define MAXNUMOFUEID       65536    /* Max num of UEs served by DU */
54 #define MAXNUMOFUACPLMN    12       /* Maximum number of PLMN ids*/
55 #define MAXNUMOFUACPERPLMN 64       /* Maximum number of signalled categories per PLMN */
56
57 #define MAX_IPV6_LEN       16       /* Max lenght of IPV6 Address */
58
59
60
61 typedef enum
62 {
63    GNBDU,
64    GNBCU 
65 }F1Entity;
66
67 typedef enum
68 {
69    UNSPECIFIED,
70    RL_FAILURE_RLC,
71    INVALID_CU_UE_F1AP_ID,
72    INVALID_DU_UE_F1AP_ID,
73    INTERACTION_WITH_OTHER_PROC,
74    INVALID_QCI_VALUE,
75    RADIO_RELATED_REASON,
76    INSUFFICIENT_RADIO_RESOURCE,
77    PROCEDURE_CANCELLED,
78    NORMAL_RELEASE,
79    UNAVAILABLE_CELL,
80    RL_FAILURE_OTHERS,
81    UE_ACCESS_REJECTED,
82    SLICE_RESOURCE_UNAVAILABLE,
83    AMF_ABNORMAL_RELEASE,
84    INVALID_PLMN
85 }RadioNwCause;
86
87 typedef enum
88 {
89    TRANS_CAUSE_UNSPECIFIED,
90    TRANSPORT_RESOURCE_UNAVAIL
91 }TransLayerCause;
92
93 typedef enum
94 {
95    TRANSFER_SYNTAX_ERR,
96    ABSTRACT_SYNTAX_ERR_REJECT,
97    ABSTRACT_SYNTAX_ERR_NOTIFY,
98    INCOMPATIBLE_MESSAGE,
99    SEMANTIC_ERROR,
100    ABSTRACT_SYNTAX_ERR_MSG_CONSTRUCT,
101    PROTOCOL_CAUSE_UNSPECIFIED
102 }ProtocolCause;
103
104 typedef enum
105 {
106    CONTROL_PROC_OVERLOAD,
107    INSUFF_USER_PLANE_RESOURCE,
108    HARDWARE_FAILURE,
109    O_AND_M_INTERVENTION,
110    MISC_CAUSE_UNSPECIFIED
111 }MiscCause;
112
113 typedef enum
114 {
115   ALL
116 }F1ResetAll;
117
118 typedef enum 
119 {
120   IN_SERVICE,
121   OUT_OF_SERVICE
122 }SrvState;
123
124 typedef enum
125 {
126    INITIATING_MSG,
127    SUCCESSFUL_OUTCOME,
128    UNSUCCESSFUL_OUTCOME
129 }F1TriggMsgVal;
130
131 typedef enum
132 {
133    CRIT_REJECT,
134    CRIT_IGNORE,
135    CRIT_NOTIFY
136 }F1ProcCritVal;
137
138 typedef enum
139 {
140    NOT_UNDERSTOOD,
141    MISSING_IE
142 }F1ErrorType;
143
144 typedef enum
145 {
146    SCS_15,
147    SCS_30,
148    SCS_60,
149    SCS_120
150 }F1NrScs;
151
152 typedef enum
153 {
154    NRB_11,
155    NRB_18,
156    NRB_24,
157    NRB_25,
158    NRB_31,
159    NRB_32,
160    NRB_38,
161    NRB_51,
162    NRB_52,
163    NRB_65,
164    NRB_66,
165    NRB_78,
166    NRB_79,
167    NRB_93,
168    NRB_106,
169    NRB_107,
170    NRB_121,
171    NRB_132,
172    NRB_133,
173    NRB_135,
174    NRB_160,
175    NRB_162,
176    NRB_189,
177    NRB_216,
178    NRB_217,
179    NRB_245,
180    NRB_264,
181    NRB_270,
182    NRB_273
183 }F1Nrb;
184
185 typedef enum
186 {
187    VERY_SMALL,
188    SMALL,
189    MEDIUM,
190    LARGE
191 }F1CellType;
192
193 typedef enum
194 {
195    DL_ONLY,
196    UL_ONLY,
197    UL_DL
198 }F1CellDir;
199
200 typedef enum
201 {
202    UE_USAGE,
203    NON_UE_USAGE,
204    BOTH
205 }F1AssocUsage;
206
207 typedef enum
208 {
209    BARRED,
210    NOT_BARRED
211 }CellBarred;
212
213 typedef enum
214 {
215    OFFER,
216    EXECUTION
217 }F1ReqType;
218
219 typedef enum
220 {
221    IGNORE_YES,
222    IGNORE_NO
223 }F1IgnoreReq;
224
225 typedef enum
226 {
227    OVERLOADED,
228    NOT_OVERLOADED
229 }F1GnbDuOvrloadInfo;
230
231 typedef enum
232 {
233    REJECT_RRC_CONN_NON_EMERG_MODT,
234    REJECT_RRC_CONN_SIGNALLING,
235    PERMIT_EMERG_SESSION_AND_MOBILE_TERM_SERVICE,
236    PERMIT_HIGH_PRIOR_SESSION_AND_MOBILE_TERM_SERVICE
237 }F1UacStandardAction;
238
239 typedef struct f1RrcVersion
240 {
241    U8    rrcVer;     /* Latest RRC Version */
242    U32   extRrcVer;  /* Latest RRC version extended */
243 }F1RrcVersion;
244
245 typedef struct f1FailCause
246 {
247    union
248    {
249       RadioNwCause      radioNwCause;     /* Radio Network Layer Cause */
250       TransLayerCause   transLayerCause;  /* Transport Layer Cause */
251       ProtocolCause     protCause;        /* Protocol Cause */
252       MiscCause         miscCause;        /* Miscellaneous Cause */
253    }cause;
254 }F1FailCause;
255
256 typedef struct f1ProcCode
257 {
258    Bool   pres;
259    U8     value;
260 }F1ProcCode;
261
262 typedef struct f1TriggMsg
263 {
264    Bool   pres;
265    F1TriggMsgVal   value;
266 }F1TriggMsg;
267
268 typedef struct f1ProcCrit
269 {
270    Bool   pres;
271    F1ProcCritVal   value;
272 }F1ProcCrit;
273
274 typedef struct f1CritDignosIE
275 {
276    F1ProcCritVal   ieCritVal;
277    U16             ieId;
278    F1ErrorType       type;
279 }F1CritDignosIE;
280
281 typedef struct f1CritDiagnostic
282 {
283    Bool         pres;
284    F1ProcCode   procCode;      /* Procedure Code */
285    F1TriggMsg   triggeringMsg; /* Triggering Message */
286    F1ProcCrit   procCrit;      /* Criticality of Triggering msg/proc */
287    U32          transId;
288    F1CritDignosIE diagnosIE;
289 }F1CritDiagnostic;
290
291 typedef struct f1FailureIE
292 {
293    U32                transId;        /* Uniquely identify transaction */
294    F1FailCause        cause;          /* Failure cause */
295    U8                 timeToWait;     /* Seconds to be waited before retry */
296    F1CritDiagnostic   critDiagnostic; /* Critical diagnostics */
297 }F1FailureIE;
298
299 typedef struct f1LogicalConnUeAssoc
300 {
301    U32   gnbCuUeF1apId;
302    U32   gnbDuUeF1apId;
303 }F1LogicalConnUeAssoc;
304
305 typedef struct f1ResetType
306 {
307    union
308    {
309       F1ResetAll             resetAll; /* Reset All */
310       F1LogicalConnUeAssoc   ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* In case of Partial Reset : UE associated logical F1 conn list*/
311    }type;
312 }F1ResetType;
313
314 typedef struct f1PLMN
315 {
316   U8 mcc[3];
317   U8 mnc[3];
318 }F1Plmn;
319
320 typedef struct nrEcgi
321 {
322   F1Plmn  plmn;
323   U32     cellId;
324 }NrEcgi;
325
326 typedef struct f1SibType
327 {
328    U8   sibType;
329    U8   sibMsg;
330    U8   value;
331 }F1SibType;
332
333 typedef struct f1TxBw
334 {
335    F1NrScs   nrScs; /* NR subcarrier spacing */
336    F1Nrb     nrb;   /* Transmission bandwidth expressed in units of RBs */
337 }F1TxBw;
338
339 typedef struct f1SulInfo
340 {
341    Bool     pres;   
342    U32      sulArfcn; /* SUL ARFCN */
343    F1TxBw   sulTxBw;  /* SUL transmission bandwidth */ 
344 }F1SulInfo;
345
346 typedef struct f1FreqBand
347 {
348   U16   nrFreqBand;
349   U16   sulBand[MAXNRCELLBANDS];
350 }F1FreqBand;
351
352 typedef struct f1NrFreqInfo
353 {
354    U32        nrArfcn;
355    F1SulInfo  sulInfo;
356    F1FreqBand freqBand[MAXNRCELLBANDS];
357 }F1NrFreqInfo;
358
359 typedef struct f1NrFddInfo
360 {
361    F1NrFreqInfo   ulNrFreqInfo;  /* UL NR Frequency Info */
362    F1NrFreqInfo   dlNrFreqInfo;  /* DL NR Frequency Info */
363    F1TxBw         ulTxBw;        /* UL Transmission bandwidth */
364    F1TxBw         dlTxBw;        /* DL Transmission bandwidth */
365 }F1NrFddInfo;
366
367 typedef struct f1NrTddInfo
368 {
369    F1NrFreqInfo   nrFreqInfo;   /* NR Frequency Info */
370    F1TxBw       nrTxBw;       /* NR Transmission Bandwidth */
371 }F1NrTddInfo;
372
373 typedef struct f1NrModeInfo
374 {
375    union
376    {
377       F1NrFddInfo  fdd;
378       F1NrTddInfo  tdd;
379    }mode;
380 }F1NrModeInfo;
381
382 typedef struct f1EutraFddInfo
383 {
384    U16   ulOffset;   /* UL offset to Point A */
385    U16   dlOffset;   /* DL offset to Point A */
386 }F1EutraFDDInfo;
387
388 typedef struct f1EutraTddInfo
389 {
390    U16   tddOffset;  /* Offset to Point A */
391 }F1EutraTDDInfo;
392
393 typedef struct f1EutraModeInfo
394 {
395    union
396    {
397       F1EutraFDDInfo  fdd;
398       F1EutraTDDInfo  tdd;
399    }mode;
400 }F1EutraModeInfo;
401
402 typedef struct f1Tac
403 {
404    Bool    pres;
405    U16     tac;
406 }F1Tac;
407
408 typedef struct f1Snsaai
409 {
410    U8   sst;
411    U32  sd;
412 }F1Snsaai;
413
414 typedef struct epIpAddr
415 {
416    char transportAddr[20]; /* Transport Layer Address */
417 }EpIpAddr;
418
419 typedef struct epIpAddrPort
420 {
421     EpIpAddr epIpAddr;
422     char   port[2];
423 }EpIpAddrPort;
424
425 typedef struct f1TaiSliceSuppLst
426 {
427    Bool       pres;
428    F1Snsaai   snssai[MAXNUMOFSLICEITEMS];   
429 }F1TaiSliceSuppLst;
430
431 typedef struct f1SrvdPlmn
432 {
433    F1Plmn              plmn;
434    F1TaiSliceSuppLst   taiSliceSuppLst;
435 }F1SrvdPlmn;
436
437 typedef struct f1BrdcstPlmnInfo
438 {
439    F1Plmn   plmn[MAXNUMOFBPLMN];     /* PLMN id list */
440    F1Plmn  extPlmn[MAXNUMOFBPLMN];   /* Extended PLMN id list */
441    F1Tac    tac;                     /* 5GS-TAC */
442    U32      nrCellId;                /* NR Cell id */
443    U8       ranac;                   /* RAN Area code */
444
445 }F1BrdcstPlmnInfo;
446
447 typedef struct f1CellInfo
448 {
449    NrEcgi   nrCgi;                   /* Cell global Identity */
450    U32      nrPci;                   /* Physical Cell Identity */
451    F1Plmn   plmn[MAXNUMOFBPLMN];     /* Available PLMN list */
452    F1Plmn   extPlmn[MAXNUMOFBPLMN];  /* Extended available PLMN list */
453 }F1CellInfo;
454
455 typedef struct f1DuCellInfo
456 {
457    F1CellInfo         cellInfo;     /* cell info */
458    F1Tac              tac;          /* tracking area code */
459    F1Tac              epsTac;       /* Configured EPS TAC */
460    F1NrModeInfo       f1Mode;       /* NR mode info : FDD/TDD */
461    U8                 measTimeCfg;  /* Measurement timing configuration */
462    F1CellDir          cellDir;      /* Cell Direction */
463    F1CellType         cellType;     /* Cell Type */
464    F1BrdcstPlmnInfo   brdcstPlmnInfo[MAXBPLMNNRMINUS1]; /* Broadcast PLMN Identity Info List */
465 }F1DuCellInfo;
466
467 typedef struct f1DuSysInfo
468 {
469    U8   mibMsg;   /* MIB message */
470    U8   sib1Msg;  /* SIB1 message */
471 }F1DuSysInfo;
472
473 typedef struct f1CuSysInfo
474 {
475    F1SibType   sibTypeToUpd[MAXNUMOFSIBTYPES];   /* SIB types to be updated */
476 }F1CuSysInfo;
477
478 typedef struct f1DuSrvdCellInfo
479 {
480    F1DuCellInfo   duCellInfo;   /* gNB-DU served cell info */
481    F1DuSysInfo    duSysInfo;    /* gNB-DU System Information */
482 }F1DuSrvdCellInfo;
483
484 typedef struct f1DuSrvdCellToDel
485 {
486    NrEcgi             oldNrCgi;     /* Old NR CGI */
487    F1DuSrvdCellInfo   srvdCellInfo; /* Info of served cell to be deleted */ 
488 }F1DuSrvdCellToDel;
489
490 typedef struct f1CuActCellInfo
491 {
492    F1CellInfo    cuCellInfo;   /* gNB-CU available cell info */
493    F1CuSysInfo   cuSysInfo;    /* gNB-CU System Information */
494 }F1CuActCellInfo;
495
496 typedef struct f1ActCellFail
497 {
498    NrEcgi        nrCgi;
499    F1FailCause   cause;
500 }F1ActCellFail;
501
502 typedef struct srvStatus
503 {
504   SrvState  state;
505   Bool      switchOffOngoing;
506 }SrvStatus;
507
508 typedef struct f1CellStatus
509 {
510    NrEcgi      nrEcgi;
511    SrvStatus   status;   /* Service status */
512 }F1CellStatus;
513
514 typedef struct f1DedSIDelUE
515 {
516    U32      gnbCuUeF1apId;
517    NrEcgi   nrEcgi;
518 }F1DedSIDelUE;
519
520 typedef struct tnlAssocInfo
521 {
522    Bool           pres;
523    EpIpAddr       epIpAddr;      /* Endpoint-IP Address */
524    EpIpAddrPort   epIpAddrport;  /* Endpoint-IP Address and Port */
525 }F1TnlAssocAddr;
526
527 typedef struct f1TnlAssocUsage
528 {
529     Bool           pres;
530     F1AssocUsage   usage;
531 }F1TnlAssocUsage;
532
533 typedef struct f1TnlAssoc
534 {
535    F1TnlAssocAddr   assocInfo;    /* TNL Assoc Transport Layer Info */
536    F1TnlAssocUsage  assocUsage;   /* TNL Assoc usage */
537 }F1TnlAssoc;
538
539 typedef struct f1TnlAssocToRmv
540 {
541    F1TnlAssocAddr   assocInfoCu;   /* TNL Assoc Transport Layer Info of CU */
542    F1TnlAssocAddr   assocInfoDu;   /* TNL Assoc Transport Layer Info of DU */
543 }F1TnlAssocToRmv;
544
545 typedef struct f1TnlAssocSetupFail
546 {
547    F1TnlAssocAddr   assocInfo;
548    F1FailCause      cause;
549 }F1TnlAssocSetupFail;
550
551
552 typedef struct f1CellBarred
553 {
554    NrEcgi       nrcgi;
555    CellBarred   cellBarred;
556 }F1CellBarred;
557
558 typedef struct f1EutraCell
559 {
560    U32                eutraCellId; /* EUTRA cell id */
561    F1EutraModeInfo    mode;        /* EUTRA mode info : FDD/TDD */
562    U8                 rsrcInd;     /* Protected EUTRA resource Indication */
563 }F1EutraCell;
564
565 typedef struct f1ProtectEUTRARsrc
566 {
567    U32           specShareGrpId;               /* Spectrum sharing group id */
568    F1EutraCell   eutraCellList[MAXCELLINENB];  /* EUTRA cells list */
569 }F1ProtectEUTRARsrc;
570
571 typedef struct f1UacOperatorDefined
572 {
573    U8   accessCategory;
574    U8   accessId; 
575 }F1UacOperatorDefined;
576
577 typedef struct f1UacCategoryType
578 {
579    union
580    {
581       F1UacStandardAction    action;      /* UAC standardized action */
582       F1UacOperatorDefined   operatorDef; /* UAC operator defined */
583    }type;
584 }F1UacCategoryType;
585
586 typedef struct f1UacType
587 {
588    U8                  uacReducInd;     /* Value 0 means no access rate reduction. Value 100 means full access rate reduction */
589    F1UacCategoryType   uacCategoryType; /* UAC Category type */
590 }F1UacType;
591
592 /* Unified Access Class Assistance Information */
593 typedef struct f1UacAssistInfo
594 {
595    F1Plmn      plmn[MAXNUMOFUACPLMN];        /* UAC PLMN list */
596    F1UacType   uacType[MAXNUMOFUACPERPLMN];  /* UAC Type list */
597 }F1UacAssistInfo;
598
599 /* F1 setup related structures */
600
601 typedef struct f1SetupReq
602 {
603   U32                transId;                       /* Uniquely identify transaction */
604   U32                duId;                          /* DU ID */ 
605   char               duName[CU_DU_NAME_LEN_MAX];    /* DU name */
606   F1DuSrvdCellInfo   srvdCellLst[MAXCELLINGNBDU];   /* Serving cell list */
607   F1RrcVersion       rrcVersion;                    /* RRC version */
608 }F1SetupReq;
609
610 typedef struct f1setupRsp
611 {
612   U32               transId;                      /* Uniquely identify transaction */
613   U32               cuId;                         /* CU ID */
614   char              cuName[CU_DU_NAME_LEN_MAX];   /* CU Name */
615   F1CuActCellInfo   actCellInfo;                  /* cells to be activated */
616   F1RrcVersion      rrcVersion;                   /* RRC version */
617 }F1SetupRsp;
618
619 typedef struct f1SetupFail
620 {
621    F1FailureIE   setupFail;
622 }F1SetupFail;
623
624 /* At reception of the RESET message the gNB-DU shall release all allocated resources on F1 
625  * and radio resources related to the UE association(s) indicated explicitly or implicitly in 
626  * the RESET message and remove the indicated UE contexts including F1AP ID. */
627 typedef struct f1Reset
628 {
629   U32              transId;   /* Uniquely identify transaction */
630   F1FailCause      cause;     /* Failure cause */
631   F1ResetType      resetType; /* type of reset */
632 }F1Reset;
633
634 /* After the gNB-CU has released all assigned F1 resources and the UE F1AP IDs for all indicated
635  * UE associations which can be used for new UE-associated logical F1-connections over the F1 interface,
636  *  the gNB-CU shall respond with the RESET ACKNOWLEDGE message. */
637 typedef struct f1ResetAck
638 {
639   U32                    transId;         /* Uniquely identify transaction */
640   F1LogicalConnUeAssoc   ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* UE associated logical F1-connection list */
641   F1CritDiagnostic       critDiagnostic;  /* Critical diagnostics */
642 }F1ResetAck;
643
644 typedef struct f1ErrorInd
645 {
646   U32                transId;         /* Uniquely identify transaction */
647   F1Entity           errorOrigin;     /* Specifies if error is originated at DU or CU */
648   F1FailCause        cause;           /* Failure cause */
649 /* If failure is due to Ue related message. */
650   U32                gnbCuUeF1apId;   /* gNB-CU UE F1AP Id */
651   U32                gnbDuUeF1apId;   /* gNB-DU UE F1AP Id */
652   F1CritDiagnostic   critDiagnostic;  /* Critical diagnostics */
653 }F1ErrorInd;
654
655 typedef struct f1GnbDuCfgUpd
656 {
657   U32                 transId;                             /* Uniquely identify transaction */
658   F1DuSrvdCellInfo    srvdCellLstAdd[MAXCELLINGNBDU];      /* Served cell list to be added */
659   F1DuSrvdCellToDel   srvdCellLstMod[MAXCELLINGNBDU];      /* Served cell list to be modified */
660   NrEcgi              srvdCellLstDel[MAXCELLINGNBDU];      /* Served cell list to be deleted */
661   F1CellStatus        cellStatus[MAXCELLINGNBDU];          /* Cell status */
662   F1DedSIDelUE        ueLst[MAX_UEID];                     /* Ue list that requires dedicated SI delivery */
663   U32                 gnbDuId;
664   F1TnlAssocToRmv     gnbDuTnlAssocRmv[MAXNUMOFTNLASSOCS];  /* TNL Assoc list to remove */ 
665 }F1GnbDuCfgUpd;
666
667 typedef struct f1GnbDuCfgUpdAck
668 {
669    U32                transId;                      /* Uniquely identify transaction */
670    F1CuActCellInfo    cellLstAct[MAXCELLINGNBDU];    /* List of cells to be activated */   
671    F1CritDiagnostic   critDiagnostic;               /* Critical diagnostics */
672    NrEcgi             cellLstDeact[MAXCELLINGNBDU]; /* List of cells to be deactivated */
673 }F1GnbDuCfgUpdAck;
674
675 typedef struct f1GnbDuCfgUpdFail
676 {
677    F1FailureIE   gnbDuCfgUpdFail;
678 }F1GnbDuCfgUpdFail;
679
680 /* Sent by the gNB-CU to transfer updated information associated to an F1-C interface instance */
681 typedef struct f1GnbCuCfgUpd
682 {
683     U32                 transId;                            /* Uniquely identifies transaction */
684     F1CuActCellInfo     cellLstAct[MAXCELLINGNBDU];         /* List of cells to be activated */
685     NrEcgi              cellLstDeact[MAXCELLINGNBDU];       /* List of cells to be deactivated */
686     F1TnlAssoc          assocLstAdd[MAXNUMOFTNLASSOCS];     /* List of TNL assocs to be added */
687     F1TnlAssoc          assocLstUpd[MAXNUMOFTNLASSOCS];     /* List of TNL assocs to be updated */
688     F1TnlAssocToRmv     assocLstRmv[MAXNUMOFTNLASSOCS];     /* List of TNL assocs to be removed */
689     F1CellBarred        cellToBarList[MAXCELLINGNBDU];      /* List of Cells to be barred */
690     F1ProtectEUTRARsrc  protectEutraRsrcList[MAXCELLINENB]; /* List of Protected EUTRA resources */
691 }F1GnbCuCfgUpd;
692
693 /* Sent by a gNB-DU to a gNB-CU to acknowledge update of information
694  * associated to an F1-C interface instance */
695 typedef struct f1GnbCuCfgUpdAck
696 {
697     U32                   transId;                              /* Uniquely identify transaction */
698     F1ActCellFail         actCellFailList[MAXCELLINGNBDU];      /* Cells failed to be activated list */
699     F1CritDiagnostic      critDiagnostic;                       /* Critical diagnostics */
700     F1TnlAssocAddr        assocSetupList[MAXNUMOFTNLASSOCS];     /* TNL Assoc Setup list */
701     F1TnlAssocSetupFail   assocSetupFailList[MAXNUMOFTNLASSOCS]; /* TNL Assoc Setup fail list */
702     F1DedSIDelUE          dedSiDelUelist[MAXNUMOFUEID];          /* Dedicated SI delivery needed UE list */
703 }F1GnbCuCfgUpdAck;
704
705 typedef struct f1GnbCuCfgUpdFail
706 {
707     F1FailureIE   gnbCuCfgUpdFail;
708 }F1GnbCuCfgUpdFail;
709
710 /* This procedure enables coordination of radio resource allocation between a gNB-CU and
711  * a gNB-DU. Coordination request is sent by CU to DU */
712 typedef struct f1GnbDuRsrcCoordReq
713 {
714    U32           transId;              /* Uniquely identifies transaction */
715    F1ReqType     reqType;              /* Request type */
716    U8            cellResCoordReqCont;  /* Container for X2AP E-UTRA - NR cell resource coordination request */
717    F1IgnoreReq   ignoreReq;            /* Ignore coordination request */
718 }F1GnbDuRsrcCoordReq;
719
720 /* This message is sent by a gNB-DU to a gNB-CU, to express the desired resource allocation
721  * for data traffic, as a response to the GNB-DU RESOURCE COORDINATION REQUEST. */
722 typedef struct f1GnbDuRsrcCoordRsp
723 {
724     U32   transId;               /* Uniquely identifies transaction */
725     U8    cellResCoordRspCont;   /* Container for X2AP E-UTRA - NR cell resource coordination response */
726 }F1GnbDuRsrcCoordRsp;
727
728 /* This message is sent by the gNB-DU to indicate to the gNB-CU its status of overload */
729 typedef struct f1GnbDuStatusInd
730 {
731    U32                  transId;      /* Uniquely identifies transaction */
732    F1GnbDuOvrloadInfo   ovrloadInfo;  /* gNB-DU overloaded information */
733 }F1GnbDuStatusInd;
734
735 /* This message is sent by either the gNB-DU or the gNB-CU to intiate the removal
736  * of the interface instance and the related resources */
737 typedef struct f1RmvReq
738 {
739    U32   transId; /* Uniquely identifies transaction */
740 }F1RmvReq;
741
742 /* This message acknowledges the initiation of removal of the interface
743  * instance and the related resources */
744 typedef struct f1RmvRsp
745 {
746    U32                transId;     /* Uniquely identifies transaction */
747    F1CritDiagnostic   critDiagnos; /* Crititcality diagnostics */
748 }F1RmvRsp;
749
750 /* This message indicates that removing the interface instance and the related
751  * resources cannot be accepted */
752 typedef struct f1RmvFail
753 {
754    U32                transId;         /* Uniquely identifies transaction */
755    F1FailCause        cause;          /* Failure cause */
756    F1CritDiagnostic   critDiagnostic; /* Criticality diagnostics */
757 }F1RmvFail;
758
759 /* This message is sent by the gNB-CU to indicate to the gNB-DU a need to reduce
760  * the rate at which UEs access the network. */
761 typedef struct f1NwkAccessRateRed
762 {
763    U32               transId;        /* Uniquely identifies transaction */
764    F1UacAssistInfo   uacAssistInfo;  /* UAC Assistance Information */
765 }F1NwkAccessRateRed;
766
767 typedef struct f1Ipaddr
768 {
769  Bool ipV4Pres;
770  U32  ipV4Addr; 
771  Bool ipV6Pres;
772  U8   ipV6Addr[MAX_IPV6_LEN];
773 }F1IpAddr;
774
775 typedef struct f1SctpParams
776 {
777    F1IpAddr  duIpAddr;
778    U16       duPort;
779    F1IpAddr  cuIpAddr;
780    U16       cuPort;
781 }F1SctpParams;
782
783 typedef struct duCfgParams
784 {
785    F1SctpParams       sctpParams;                    /* SCTP Params */
786    U32                maxUe;
787    U32                duId;
788    U8                 duName[CU_DU_NAME_LEN_MAX]; 
789    F1DuSrvdCellInfo   srvdCellLst[MAXCELLINGNBDU];   /* Serving cell list */
790    F1RrcVersion       rrcVersion;                    /* RRC version */
791    ClCellCfg          clCellCfg;                     /* CL cell configuration */
792
793 }DuCfgParams;
794
795 #endif /* __DU_COMMON_H__ */
796
797 /**********************************************************************
798          End of file
799 **********************************************************************/