1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
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 #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 *******************************************************************************/
19 #ifndef __DU_COMMON_H__
20 #define __DU_COMMON_H__
31 #define DU_SELECTOR_LC 0
32 #define DU_SELECTOR_TC 1
33 #define DU_SELECTOR_LWLC 2
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 */
53 #define MAX_IPV4_LEN 16 /* Max lenght of IPV4 Address */
54 #define MAX_IPV6_LEN 40 /* Max lenght of IPV6 Address */
73 INVALID_CU_UE_F1AP_ID,
74 INVALID_DU_UE_F1AP_ID,
75 INTERACTION_WITH_OTHER_PROC,
78 INSUFFICIENT_RADIO_RESOURCE,
84 SLICE_RESOURCE_UNAVAILABLE,
91 TRANS_CAUSE_UNSPECIFIED,
92 TRANSPORT_RESOURCE_UNAVAIL
98 ABSTRACT_SYNTAX_ERR_REJECT,
99 ABSTRACT_SYNTAX_ERR_NOTIFY,
100 INCOMPATIBLE_MESSAGE,
102 ABSTRACT_SYNTAX_ERR_MSG_CONSTRUCT,
103 PROTOCOL_CAUSE_UNSPECIFIED
108 CONTROL_PROC_OVERLOAD,
109 INSUFF_USER_PLANE_RESOURCE,
111 O_AND_M_INTERVENTION,
112 MISC_CAUSE_UNSPECIFIED
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;
241 typedef struct f1RrcVersion
243 U8 rrcVer; /* Latest RRC Version */
244 U32 extRrcVer; /* Latest RRC version extended */
247 typedef struct f1FailCause
251 RadioNwCause radioNwCause; /* Radio Network Layer Cause */
252 TransLayerCause transLayerCause; /* Transport Layer Cause */
253 ProtocolCause protCause; /* Protocol Cause */
254 MiscCause miscCause; /* Miscellaneous Cause */
258 typedef struct f1ProcCode
264 typedef struct f1TriggMsg
270 typedef struct f1ProcCrit
276 typedef struct f1CritDignosIE
278 F1ProcCritVal ieCritVal;
283 typedef struct f1CritDiagnostic
286 F1ProcCode procCode; /* Procedure Code */
287 F1TriggMsg triggeringMsg; /* Triggering Message */
288 F1ProcCrit procCrit; /* Criticality of Triggering msg/proc */
290 F1CritDignosIE diagnosIE;
293 typedef struct f1FailureIE
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 */
301 typedef struct f1LogicalConnUeAssoc
305 }F1LogicalConnUeAssoc;
307 typedef struct f1ResetType
311 F1ResetAll resetAll; /* Reset All */
312 F1LogicalConnUeAssoc ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* In case of Partial Reset : UE associated logical F1 conn list*/
316 typedef struct f1PLMN
324 //>>>>>>> 0fec7aba84be690775c36e49eb31082dc2180f38
327 typedef struct nrEcgi
333 typedef struct f1SibType
340 typedef struct f1TxBw
342 F1NrScs nrScs; /* NR subcarrier spacing */
343 F1Nrb nrb; /* Transmission bandwidth expressed in units of RBs */
346 typedef struct f1SulInfo
349 U32 sulArfcn; /* SUL ARFCN */
350 F1TxBw sulTxBw; /* SUL transmission bandwidth */
353 typedef struct f1FreqBand
356 U16 sulBand[MAXNRCELLBANDS];
359 typedef struct f1NrFreqInfo
363 F1FreqBand freqBand[MAXNRCELLBANDS];
366 typedef struct f1NrFddInfo
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 */
374 typedef struct f1NrTddInfo
376 F1NrFreqInfo nrFreqInfo; /* NR Frequency Info */
377 F1TxBw nrTxBw; /* NR Transmission Bandwidth */
380 typedef struct f1NrModeInfo
389 typedef struct f1EutraFddInfo
391 U16 ulOffset; /* UL offset to Point A */
392 U16 dlOffset; /* DL offset to Point A */
395 typedef struct f1EutraTddInfo
397 U16 tddOffset; /* Offset to Point A */
400 typedef struct f1EutraModeInfo
415 typedef struct f1Snsaai
421 typedef struct epIpAddr
423 char transportAddr[20]; /* Transport Layer Address */
426 typedef struct epIpAddrPort
432 typedef struct f1TaiSliceSuppLst
435 F1Snsaai snssai[MAXNUMOFSLICEITEMS];
438 typedef struct f1SrvdPlmn
441 F1TaiSliceSuppLst taiSliceSuppLst;
444 typedef struct f1BrdcstPlmnInfo
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 */
454 typedef struct f1CellInfo
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 */
462 typedef struct f1DuCellInfo
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 */
474 typedef struct f1DuSysInfo
476 U8 mibMsg; /* MIB message */
477 U8 sib1Msg; /* SIB1 message */
480 typedef struct f1CuSysInfo
482 F1SibType sibTypeToUpd[MAXNUMOFSIBTYPES]; /* SIB types to be updated */
485 typedef struct f1DuSrvdCellInfo
487 F1DuCellInfo duCellInfo; /* gNB-DU served cell info */
488 F1DuSysInfo duSysInfo; /* gNB-DU System Information */
491 typedef struct f1DuSrvdCellToDel
493 NrEcgi oldNrCgi; /* Old NR CGI */
494 F1DuSrvdCellInfo srvdCellInfo; /* Info of served cell to be deleted */
497 typedef struct f1CuActCellInfo
499 F1CellInfo cuCellInfo; /* gNB-CU available cell info */
500 F1CuSysInfo cuSysInfo; /* gNB-CU System Information */
503 typedef struct f1ActCellFail
509 typedef struct srvStatus
512 Bool switchOffOngoing;
515 typedef struct f1CellStatus
518 SrvStatus status; /* Service status */
521 typedef struct f1DedSIDelUE
527 typedef struct tnlAssocInfo
530 EpIpAddr epIpAddr; /* Endpoint-IP Address */
531 EpIpAddrPort epIpAddrport; /* Endpoint-IP Address and Port */
534 typedef struct f1TnlAssocUsage
540 typedef struct f1TnlAssoc
542 F1TnlAssocAddr assocInfo; /* TNL Assoc Transport Layer Info */
543 F1TnlAssocUsage assocUsage; /* TNL Assoc usage */
546 typedef struct f1TnlAssocToRmv
548 F1TnlAssocAddr assocInfoCu; /* TNL Assoc Transport Layer Info of CU */
549 F1TnlAssocAddr assocInfoDu; /* TNL Assoc Transport Layer Info of DU */
552 typedef struct f1TnlAssocSetupFail
554 F1TnlAssocAddr assocInfo;
556 }F1TnlAssocSetupFail;
559 typedef struct f1CellBarred
562 CellBarred cellBarred;
565 typedef struct f1EutraCell
567 U32 eutraCellId; /* EUTRA cell id */
568 F1EutraModeInfo mode; /* EUTRA mode info : FDD/TDD */
569 U8 rsrcInd; /* Protected EUTRA resource Indication */
572 typedef struct f1ProtectEUTRARsrc
574 U32 specShareGrpId; /* Spectrum sharing group id */
575 F1EutraCell eutraCellList[MAXCELLINENB]; /* EUTRA cells list */
578 typedef struct f1UacOperatorDefined
582 }F1UacOperatorDefined;
584 typedef struct f1UacCategoryType
588 F1UacStandardAction action; /* UAC standardized action */
589 F1UacOperatorDefined operatorDef; /* UAC operator defined */
593 typedef struct f1UacType
595 U8 uacReducInd; /* Value 0 means no access rate reduction. Value 100 means full access rate reduction */
596 F1UacCategoryType uacCategoryType; /* UAC Category type */
599 /* Unified Access Class Assistance Information */
600 typedef struct f1UacAssistInfo
602 F1Plmn plmn[MAXNUMOFUACPLMN]; /* UAC PLMN list */
603 F1UacType uacType[MAXNUMOFUACPERPLMN]; /* UAC Type list */
606 /* F1 setup related structures */
608 typedef struct f1SetupReq
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 */
617 typedef struct f1setupRsp
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 */
626 typedef struct f1SetupFail
628 F1FailureIE setupFail;
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
636 U32 transId; /* Uniquely identify transaction */
637 F1FailCause cause; /* Failure cause */
638 F1ResetType resetType; /* type of reset */
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
646 U32 transId; /* Uniquely identify transaction */
647 F1LogicalConnUeAssoc ueAssocLogicalConn[MAX_F1_CONNECTIONS]; /* UE associated logical F1-connection list */
648 F1CritDiagnostic critDiagnostic; /* Critical diagnostics */
651 typedef struct f1ErrorInd
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 */
662 typedef struct f1GnbDuCfgUpd
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 */
671 F1TnlAssocToRmv gnbDuTnlAssocRmv[MAXNUMOFTNLASSOCS]; /* TNL Assoc list to remove */
674 typedef struct f1GnbDuCfgUpdAck
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 */
682 typedef struct f1GnbDuCfgUpdFail
684 F1FailureIE gnbDuCfgUpdFail;
687 /* Sent by the gNB-CU to transfer updated information associated to an F1-C interface instance */
688 typedef struct f1GnbCuCfgUpd
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 */
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
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 */
712 typedef struct f1GnbCuCfgUpdFail
714 F1FailureIE gnbCuCfgUpdFail;
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
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;
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
731 U32 transId; /* Uniquely identifies transaction */
732 U8 cellResCoordRspCont; /* Container for X2AP E-UTRA - NR cell resource coordination response */
733 }F1GnbDuRsrcCoordRsp;
735 /* This message is sent by the gNB-DU to indicate to the gNB-CU its status of overload */
736 typedef struct f1GnbDuStatusInd
738 U32 transId; /* Uniquely identifies transaction */
739 F1GnbDuOvrloadInfo ovrloadInfo; /* gNB-DU overloaded information */
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
746 U32 transId; /* Uniquely identifies transaction */
749 /* This message acknowledges the initiation of removal of the interface
750 * instance and the related resources */
751 typedef struct f1RmvRsp
753 U32 transId; /* Uniquely identifies transaction */
754 F1CritDiagnostic critDiagnos; /* Crititcality diagnostics */
757 /* This message indicates that removing the interface instance and the related
758 * resources cannot be accepted */
759 typedef struct f1RmvFail
761 U32 transId; /* Uniquely identifies transaction */
762 F1FailCause cause; /* Failure cause */
763 F1CritDiagnostic critDiagnostic; /* Criticality diagnostics */
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
770 U32 transId; /* Uniquely identifies transaction */
771 F1UacAssistInfo uacAssistInfo; /* UAC Assistance Information */
774 typedef struct f1Ipaddr
777 char ipV4Addr[MAX_IPV4_LEN];
779 char ipV6Addr[MAX_IPV6_LEN];
782 typedef struct f1SctpParams
790 typedef struct duCfgParams
792 F1SctpParams sctpParams; /* SCTP Params */
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 */
801 extern DuCfgParams ducfgparam;
803 typedef struct cuCfgParams
806 char cuName[CU_DU_NAME_LEN_MAX];
810 #endif /* __DU_COMMON_H__ */
812 /**********************************************************************
814 **********************************************************************/