Motivation: The previous architecture had several issues: - Duplicate DRB generation logic in generateDRB() and generateDRB_ASN1() - Embedded SDAP/PDCP configs in drb_t created tight coupling - No clear separation between RRC internal state and ASN.1 encoding - Maintenance burden due to duplicated configuration logic New Architecture: - drb_t now only stores DRB-specific data (ID, PDU session ID, PDCP config) - SDAP configuration moved to PDU session level (following PDCP design pattern) - ASN.1 encoding helpers (nr_rrc_build_*_config_ie()) handle conversion - Single source of truth for DRB creation in RRC via nr_rrc_add_drb() Key changes: - Store nr_sdap_configuration_t per PDU session - Simplified drb_t structure: removed embedded SDAP/PDCP configs, added pdusession_id - New helper: nr_rrc_build_sdap_config_ie() - Updated createDRBlist() to use new helper functions and proper DRB ID lookup - Refactored trigger_bearer_setup() to use nr_rrc_add_drb() and fill_e1_drb_to_setup() - Removed generateDRB() and generateDRB_ASN1() functions - Updated set_bearer_context_pdcp_config() to return config by value - Added SDAP configuration header file for type definitions This eliminates code duplication, improves maintainability, and creates a cleaner separation between RRC state management and ASN.1 encoding.
34 lines
1.3 KiB
C
34 lines
1.3 KiB
C
/*
|
|
* 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
|
|
*/
|
|
|
|
#ifndef _NR_SDAP_CONFIGURATION_H_
|
|
#define _NR_SDAP_CONFIGURATION_H_
|
|
|
|
#include "stdbool.h"
|
|
|
|
typedef struct {
|
|
// SDAP Headers
|
|
bool header_dl_absent;
|
|
bool header_ul_absent;
|
|
} nr_sdap_configuration_t;
|
|
|
|
#endif /* _NR_SDAP_CONFIGURATION_H_ */
|