rrc_gNB_radio_bearers.h 2.67 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

22 23 24
#ifndef _RRC_GNB_DRBS_H_
#define _RRC_GNB_DRBS_H_

25 26
#include "nr_rrc_defs.h"
#include "NR_SDAP-Config.h"
27
#include "NR_DRB-ToAddMod.h"
28
#include "NR_SRB-ToAddMod.h"
29

30 31
#include "common/platform_constants.h"

32
#define DRB_ACTIVE_NONGBR       (2)   /* DRB is used for Non-GBR Flows */
33 34
#define DRB_ACTIVE              (1)
#define DRB_INACTIVE            (0)
35 36
#define GBR_FLOW                (1)
#define NONGBR_FLOW             (0)
37

38 39
/// @brief Generates an ASN1 DRB-ToAddMod, from the established_drbs in gNB_RRC_UE_t.
/// @param drb_t drb_asn1
40
/// @return Returns the ASN1 DRB-ToAddMod structs.
41
NR_DRB_ToAddMod_t *generateDRB_ASN1(const drb_t *drb_asn1);
42
/// @brief Creates and stores a DRB in the gNB_RRC_UE_t struct, it doesn't create the actual entity,
43 44 45 46 47
/// to create the actual entity use the generateDRB_ASN1.
/// @param ue The gNB_RRC_UE_t struct that holds information for the UEs
/// @param drb_id The Data Radio Bearer Identity to be created for the established DRB.
/// @param pduSession The PDU Session that the DRB is created for.
/// @param enable_sdap If true the SDAP header will be added to the packet, else it will not add or search for SDAP header.
48 49 50 51 52 53 54 55
/// @param do_drb_integrity
/// @param do_drb_ciphering
void generateDRB(gNB_RRC_UE_t *ue,
                 uint8_t drb_id,
                 rrc_pdu_session_param_t *pduSession,
                 bool enable_sdap,
                 int do_drb_integrity,
                 int do_drb_ciphering);
laurent's avatar
tmp  
laurent committed
56
uint8_t next_available_drb(gNB_RRC_UE_t *ue, rrc_pdu_session_param_t *pdusession, bool is_gbr);
57
bool drb_is_active(gNB_RRC_UE_t *ue, uint8_t drb_id);
58

59 60
rrc_pdu_session_param_t *find_pduSession(gNB_RRC_UE_t *ue, int id, bool create);

61
#endif