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