a14f9e02237f4f95c6a272d4c19876bc7171daee
[o-du/l2.git] / src / cu_stub / cu_f1ap_msg_hdl.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 /* This file contains all F1AP message handler related functionality */
20 #define ENCODE_FAIL -1
21 #define TRANS_ID 1
22 #define RRC_SIZE 1
23 #define SUL_BAND_COUNT 0
24 #define UL_SRBID        1
25 #define DL_SRBID        0
26 #define DU_ID           1
27 #define CU_ID           1
28 #define CRNTI           17017
29 #define CELL_INDEX      0
30 #define SRB0 0
31 #define SRB1 1
32 #define SRB2 2
33 #define DRB1 1
34 #define DRB2 2
35 #define DRB3 3
36 #define QCI  9
37 #define MAX_DRB_SET_UE_CONTEXT_SETUP_REQ 2  /*Number of DRBs to be added using UE CONTEXT SETUP procedure*/
38 #define MAX_DRB_SET_UE_CONTEXT_MOD_REQ 1     /*Number of DRBs to be added/setup via UE CONTEXT MODIFICATION procedure*/
39 #define MAX_DRB_MODIFIED_UE_MOD_REQ 1        /*Currently CU trigger Modification of 2DRBs*/
40 #define DRB_ID_TO_ADD_MOD MAX_DRB_SET_UE_CONTEXT_SETUP_REQ+1 /*The DRB ID: which will be added using Modification Procedure*/
41
42 /*Total num of DRBs added using UE COntext Setup and Modification procedures*/
43 #define MAX_NUM_DRB_ADDED_PER_UE (MAX_DRB_SET_UE_CONTEXT_SETUP_REQ + MAX_DRB_SET_UE_CONTEXT_MOD_REQ)
44
45 #define CU_UE_F1AP_ID 0
46 #define DU_UE_F1AP_ID 1
47 #define SP_CELL_ID     2
48 #define SERV_CELL_IDX 3
49 #define CU_TO_DU_RRC_INF 4
50
51 #define RRC_SETUP 1
52 #define REGISTRATION_ACCEPT 2
53 #define UE_CONTEXT_SETUP_REQ 3
54 #define UE_CONTEXT_SETUP_RSP 4
55 #define SECURITY_MODE_COMPLETE 5
56 #define RRC_RECONFIG 6
57 #define UE_CONTEXT_MOD_REQ 7
58 #define NUM_QOS_EXT 1
59
60 typedef struct f1apDb
61 {
62    uint8_t dlRrcMsgCount;
63    OCTET_STRING_t duToCuContainer;
64 }F1apMsgDb;
65   
66 void F1APMsgHdlr(uint32_t *destDuId, Buffer *mBuf);
67 uint8_t BuildAndSendUeContextModificationReq(uint32_t duId, void *ueCb);
68 uint8_t BuildAndSendUeContextReleaseCommand(uint32_t duId, uint8_t cuUeF1apId, uint8_t duUeF1apId);
69 uint8_t BuildAndSendF1ResetReq();
70 /**********************************************************************
71          End of file
72 **********************************************************************/