mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-16 06:00:28 +00:00
Compare commits
10 Commits
statsMonit
...
f1ap_impro
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f94ffcce1f | ||
|
|
55485883ef | ||
|
|
9a71addcc5 | ||
|
|
dee65cd40a | ||
|
|
4a8534d707 | ||
|
|
e72aa4a927 | ||
|
|
d248de2344 | ||
|
|
5f2b51dbac | ||
|
|
8d9e94f8be | ||
|
|
f113109129 |
@@ -24,6 +24,16 @@
|
||||
cmake_minimum_required (VERSION 3.5)
|
||||
project (OpenAirInterface LANGUAGES C CXX)
|
||||
|
||||
SET(CMAKE_EXPORT_COMPILE_COMMANDS ON )
|
||||
# For YouCompleteMe configuration
|
||||
IF( EXISTS "${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json" )
|
||||
EXECUTE_PROCESS( COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
include("cmake_targets/macros.cmake")
|
||||
|
||||
# System packages that are required
|
||||
|
||||
@@ -255,11 +255,10 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
|
||||
// } nr_mode_info[F1AP_MAX_NB_CELLS];
|
||||
|
||||
|
||||
|
||||
// We copy and store in F1 task data, RRC will free "req" as it frees all itti received messages
|
||||
message_p = itti_alloc_new_message(TASK_CU_F1, 0, F1AP_SETUP_REQ);
|
||||
memcpy(&F1AP_SETUP_REQ(message_p), req, sizeof(f1ap_setup_req_t) );
|
||||
|
||||
|
||||
if (req->num_cells_available > 0) {
|
||||
if (f1ap_req(true, instance)->cell_type == CELL_MACRO_GNB) {
|
||||
itti_send_msg_to_task(TASK_RRC_GNB, GNB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
@@ -513,8 +512,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
cells_to_be_activated_ies->criticality = F1AP_Criticality_reject;
|
||||
cells_to_be_activated_ies->value.present = F1AP_Cells_to_be_Activated_List_ItemIEs__value_PR_Cells_to_be_Activated_List_Item;
|
||||
// 2.1 cells to be Activated list item
|
||||
F1AP_Cells_to_be_Activated_List_Item_t *cells_to_be_activated_list_item=
|
||||
&cells_to_be_activated_ies->value.choice.Cells_to_be_Activated_List_Item;
|
||||
F1AP_Cells_to_be_Activated_List_Item_t *cells_to_be_activated_list_item = &cells_to_be_activated_ies->value.choice.Cells_to_be_Activated_List_Item;
|
||||
// - nRCGI
|
||||
addnRCGI(cells_to_be_activated_list_item->nRCGI, f1ap_gnb_cu_configuration_update->cells_to_activate+i);
|
||||
// optional
|
||||
@@ -539,7 +537,6 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
|
||||
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]);
|
||||
//printf("\n");
|
||||
|
||||
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
|
||||
for (int sIBtype=2; sIBtype<21; sIBtype++) {
|
||||
if (f1ap_gnb_cu_configuration_update->cells_to_activate[i].SI_container[sIBtype]!=NULL) {
|
||||
AssertFatal(sIBtype < 6 || sIBtype == 9, "Illegal SI type %d\n",sIBtype);
|
||||
|
||||
42
openair2/F1AP/test/CMakeLists.txt
Normal file
42
openair2/F1AP/test/CMakeLists.txt
Normal file
@@ -0,0 +1,42 @@
|
||||
cmake_minimum_required (VERSION 3.0)
|
||||
project (f1ap C)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unknown-pragmas -g -std=gnu11 -fsanitize=address -fno-omit-frame-pointer")
|
||||
|
||||
#include_directories(${SOURCE_DIR})
|
||||
include_directories("/home/mir/workspace/openairinterface5g_nettle/cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/" )
|
||||
include_directories("/usr/local/share/asn1c/")
|
||||
|
||||
|
||||
file(GLOB SRC
|
||||
# "/home/mir/workspace/oai_f1ap/cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/*.h"
|
||||
"/home/mir/workspace/oai_f1ap/cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/*.c"
|
||||
)
|
||||
|
||||
|
||||
option(CODE_COVERAGE "Code coverage" ON)
|
||||
if(CODE_COVERAGE)
|
||||
add_compile_options("-fprofile-arcs;-ftest-coverage")
|
||||
add_link_options("-lgcov;-coverage")
|
||||
message(STATUS "Code Coverage ON. Example usage: lcov --capture --directory . --output-file coverage.info && genhtml coverage.info --output-directory out && cd out && firefox index.html")
|
||||
|
||||
message(STATUS "Code Coverage ON. Example usage: lcov --capture --directory . --output-file coverage.info && genhtml coverage.info --output-directory out && cd out && firefox index.html")
|
||||
message(STATUS "To merge different coverages: lcov --add-tracefile coverage1.info -a coverage2.info ...coverageN -o merged.info")
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
add_subdirectory(f1ap_types)
|
||||
|
||||
add_executable(f1ap_test test.c
|
||||
byte_array.c
|
||||
defer.c
|
||||
cp_ir_to_asn.c
|
||||
cp_asn_to_ir.c
|
||||
enc_dec_f1ap.c
|
||||
gen_rnd_data.c
|
||||
$<TARGET_OBJECTS:f1ap_types_obj> ${SRC})
|
||||
|
||||
target_compile_options( f1ap_test PUBLIC "-DASN_DISABLE_OER_SUPPORT -DPDU")
|
||||
|
||||
|
||||
61
openair2/F1AP/test/byte_array.c
Normal file
61
openair2/F1AP/test/byte_array.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
#include "byte_array.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
byte_array_t copy_byte_array(byte_array_t src)
|
||||
{
|
||||
byte_array_t dst;
|
||||
memset(&dst,0,sizeof(byte_array_t));
|
||||
dst.buf = malloc(src.len);
|
||||
memcpy(dst.buf,src.buf,src.len);
|
||||
dst.len = src.len;
|
||||
return dst;
|
||||
}
|
||||
|
||||
void free_byte_array(byte_array_t ba)
|
||||
{
|
||||
free(ba.buf);
|
||||
}
|
||||
|
||||
bool eq_byte_array(const byte_array_t* m0, const byte_array_t* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
if(m0->len != m1->len)
|
||||
return false;
|
||||
|
||||
const int rc = memcmp(m0->buf, m1->buf, m0->len);
|
||||
if(rc != 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
43
openair2/F1AP/test/byte_array.h
Normal file
43
openair2/F1AP/test/byte_array.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* 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 BYTE_ARRAY_H
|
||||
#define BYTE_ARRAY_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
typedef struct {
|
||||
size_t len;
|
||||
uint8_t *buf;
|
||||
} byte_array_t;
|
||||
|
||||
byte_array_t copy_byte_array(byte_array_t src);
|
||||
|
||||
void free_byte_array(byte_array_t ba);
|
||||
|
||||
bool eq_byte_array(const byte_array_t* m0, const byte_array_t* m1);
|
||||
|
||||
#endif
|
||||
4125
openair2/F1AP/test/cp_asn_to_ir.c
Normal file
4125
openair2/F1AP/test/cp_asn_to_ir.c
Normal file
File diff suppressed because it is too large
Load Diff
53
openair2/F1AP/test/cp_asn_to_ir.h
Normal file
53
openair2/F1AP/test/cp_asn_to_ir.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#ifndef COPY_ASN_TO_PDU_MIR_H
|
||||
#define COPY_ASN_TO_PDU_MIR_H
|
||||
|
||||
#include "f1ap_types/f1_setup.h"
|
||||
#include "f1ap_types/f1_setup_response.h"
|
||||
#include "f1ap_types/f1_setup_failure.h"
|
||||
#include "f1ap_types/ue_ctx_setup_request.h"
|
||||
#include "f1ap_types/ue_ctx_setup_response.h"
|
||||
#include "f1ap_types/ue_ctx_mod_request.h"
|
||||
#include "f1ap_types/ue_ctx_mod_resp.h"
|
||||
#include "f1ap_types/gnb_cu_conf_update.h"
|
||||
#include "f1ap_types/gnb_cu_conf_update_ack.h"
|
||||
#include "f1ap_types/init_ul_rrc_msg.h"
|
||||
#include "f1ap_types/ul_rrc_msg.h"
|
||||
#include "f1ap_types/dl_rrc_msg.h"
|
||||
|
||||
|
||||
#include "../../../cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/F1AP_F1AP-PDU.h"
|
||||
|
||||
////////////////
|
||||
// F1AP Messages
|
||||
////////////////
|
||||
|
||||
f1_setup_t cp_f1_setup_ir(F1AP_F1AP_PDU_t const* src);
|
||||
|
||||
f1_setup_response_t cp_f1_setup_response_ir(F1AP_F1AP_PDU_t const* src);
|
||||
|
||||
f1_setup_failure_t cp_f1_setup_failure_ir(F1AP_F1AP_PDU_t const* src);
|
||||
|
||||
ue_ctx_setup_request_t cp_ue_ctx_setup_request_ir(F1AP_F1AP_PDU_t const* src);
|
||||
|
||||
ue_ctx_setup_response_t cp_ue_ctx_setup_response_ir(F1AP_F1AP_PDU_t const* src);
|
||||
|
||||
gnb_cu_conf_update_t cp_gnb_cu_conf_update_ir(F1AP_F1AP_PDU_t const* src);
|
||||
|
||||
gnb_cu_conf_update_ack_t cp_gnb_cu_conf_update_ack_ir(F1AP_F1AP_PDU_t const* src);
|
||||
|
||||
init_ul_rrc_msg_t cp_init_ul_rrc_msg_ir(F1AP_F1AP_PDU_t const* src_pdu);
|
||||
|
||||
ul_rrc_msg_t cp_ul_rrc_msg_ir(F1AP_F1AP_PDU_t const* src_pdu);
|
||||
|
||||
dl_rrc_msg_t cp_dl_rrc_msg_ir(F1AP_F1AP_PDU_t const* src_pdu);
|
||||
|
||||
ue_ctx_mod_req_t cp_ue_ctx_mod_req_ir(F1AP_F1AP_PDU_t const* src_pdu);
|
||||
|
||||
ue_ctx_mod_resp_t cp_ue_ctx_mod_resp_ir(F1AP_F1AP_PDU_t const* src_pdu);
|
||||
|
||||
////////////////
|
||||
////////////////
|
||||
////////////////
|
||||
|
||||
#endif
|
||||
|
||||
4475
openair2/F1AP/test/cp_ir_to_asn.c
Normal file
4475
openair2/F1AP/test/cp_ir_to_asn.c
Normal file
File diff suppressed because it is too large
Load Diff
44
openair2/F1AP/test/cp_ir_to_asn.h
Normal file
44
openair2/F1AP/test/cp_ir_to_asn.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef COPY_FROM_INTERMEDIATE_REPRESENTATION_TO_ASN_MIR_H
|
||||
#define COPY_FROM_INTERMEDIATE_REPRESENTATION_TO_ASN_MIR_H
|
||||
|
||||
#include "f1ap_types/f1_setup.h"
|
||||
#include "f1ap_types/f1_setup_response.h"
|
||||
#include "f1ap_types/f1_setup_failure.h"
|
||||
#include "f1ap_types/gnb_cu_conf_update.h"
|
||||
#include "f1ap_types/gnb_cu_conf_update_ack.h"
|
||||
#include "f1ap_types/ue_ctx_setup_request.h"
|
||||
#include "f1ap_types/ue_ctx_setup_response.h"
|
||||
#include "f1ap_types/init_ul_rrc_msg.h"
|
||||
#include "f1ap_types/dl_rrc_msg.h"
|
||||
#include "f1ap_types/ul_rrc_msg.h"
|
||||
#include "f1ap_types/ue_ctx_mod_request.h"
|
||||
#include "f1ap_types/ue_ctx_mod_resp.h"
|
||||
|
||||
#include "../../../cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/F1AP_F1AP-PDU.h"
|
||||
|
||||
F1AP_F1AP_PDU_t cp_f1_setup_asn(f1_setup_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_f1_setup_response_asn(f1_setup_response_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_f1_setup_failure_asn(f1_setup_failure_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_ue_ctx_setup_request_asn(ue_ctx_setup_request_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_ue_ctx_setup_response_asn(ue_ctx_setup_response_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_gnb_cu_conf_update_asn(gnb_cu_conf_update_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_gnb_cu_conf_update_ack_asn( gnb_cu_conf_update_ack_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_init_ul_rrc_msg_asn(init_ul_rrc_msg_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_ul_rrc_msg_asn(ul_rrc_msg_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_dl_rrc_msg_asn(dl_rrc_msg_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_ue_ctx_mod_req_asn(ue_ctx_mod_req_t const* src);
|
||||
|
||||
F1AP_F1AP_PDU_t cp_ue_ctx_mod_resp_asn(ue_ctx_mod_resp_t const* src);
|
||||
|
||||
#endif
|
||||
|
||||
39
openair2/F1AP/test/defer.c
Normal file
39
openair2/F1AP/test/defer.c
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Mikel Irazabal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "defer.h"
|
||||
|
||||
|
||||
#if defined __clang__ // requires -fblocks (lambdas)
|
||||
void cleanup_deferred (void (^*d) (void))
|
||||
{
|
||||
(*d)();
|
||||
}
|
||||
#elif defined __GNUC__ // nested-function-in-stmt-expressionstatic
|
||||
void cleanup_deferred (void (**d) (void))
|
||||
{
|
||||
(*d)();
|
||||
}
|
||||
#endif
|
||||
|
||||
68
openair2/F1AP/test/defer.h
Normal file
68
openair2/F1AP/test/defer.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
MIT License
|
||||
Copyright (c) 2021 Mikel Irazabal
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef DEFER_H
|
||||
#define DEFER_H
|
||||
|
||||
/*
|
||||
* Defer mechanism taken from http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2542.pdf
|
||||
* It may become part of the C2X standard in <stddefer.h>
|
||||
*/
|
||||
|
||||
#define CONCAT_IMPL( x, y ) x##y
|
||||
#define MACRO_CONCAT( x, y ) CONCAT_IMPL( x, y )
|
||||
#define FUNC_DEFER4 MACRO_CONCAT(DF_, __LINE__ )
|
||||
#define FUNC_DEFER3 MACRO_CONCAT(FUNC_DEFER4, _line_ )
|
||||
#define FUNC_DEFER2 MACRO_CONCAT(FUNC_DEFER3, __COUNTER__ )
|
||||
#define FUNC_DEFER MACRO_CONCAT(FUNC_DEFER2, _counter )
|
||||
#define FUNC_DEFER_IMPL MACRO_CONCAT(FUNC_DEFER3, __impl )
|
||||
|
||||
|
||||
|
||||
#if defined __clang__ // requires -fblocks (lambdas) and -lBlocksRuntime in the linker
|
||||
|
||||
/*
|
||||
#define TOKENPASTE(x, y) x ## y
|
||||
#define TOKENPASTE2(x, y) TOKENPASTE(x, y)
|
||||
#define UNIQUE_DF_FUNC TOKENPASTE2(DF_ , __COUNTER__)
|
||||
#define UNIQUE_FUNC_IMPL TOKENPASTE2( DF_impl_ , __LINE__ )
|
||||
*/
|
||||
|
||||
void cleanup_deferred (void (^*d) (void));
|
||||
|
||||
#define defer(...) \
|
||||
__attribute__((__cleanup__ (cleanup_deferred))) \
|
||||
__attribute__((unused)) void (^FUNC_DEFER) (void) = ^__VA_ARGS__
|
||||
|
||||
|
||||
#elif defined __GNUC__ // nested-function-in-stmt-expression
|
||||
|
||||
void cleanup_deferred (void (**d) (void));
|
||||
|
||||
#define defer(...) \
|
||||
__attribute__((__cleanup__ (cleanup_deferred))) \
|
||||
void (*FUNC_DEFER) (void) = ({ \
|
||||
void foo (void) __VA_ARGS__ \
|
||||
foo ; })
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
43
openair2/F1AP/test/enc_dec_f1ap.c
Normal file
43
openair2/F1AP/test/enc_dec_f1ap.c
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "enc_dec_f1ap.h"
|
||||
|
||||
byte_array_t encode_pdu_f1ap(F1AP_F1AP_PDU_t const* pdu)
|
||||
{
|
||||
assert(pdu != NULL);
|
||||
|
||||
// xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
// fflush(stdout);
|
||||
|
||||
const enum asn_transfer_syntax syntax = ATS_ALIGNED_BASIC_PER;
|
||||
|
||||
asn_encode_to_new_buffer_result_t res = asn_encode_to_new_buffer(NULL, syntax, &asn_DEF_F1AP_F1AP_PDU, pdu);
|
||||
|
||||
if(res.buffer == NULL || res.result.encoded == -1){
|
||||
printf("Failed the encoding in count %d type %s and xml_type = %s\n", res.result.failed_type->tags_count, res.result.failed_type->name, res.result.failed_type->xml_tag);
|
||||
fflush(stdout);
|
||||
assert(res.buffer != NULL && "Failed to encode");
|
||||
assert(res.result.encoded != -1 && "Failed to encode");
|
||||
|
||||
}
|
||||
|
||||
byte_array_t ba = {.len = res.result.encoded, .buf = res.buffer};
|
||||
printf("byte_array len = %ld \n",res.result.encoded);
|
||||
|
||||
return ba;
|
||||
}
|
||||
|
||||
F1AP_F1AP_PDU_t decode_pdu_f1ap(byte_array_t ba)
|
||||
{
|
||||
assert(ba.buf != NULL);
|
||||
assert(ba.len != 0);
|
||||
|
||||
F1AP_F1AP_PDU_t pdu = {0};
|
||||
F1AP_F1AP_PDU_t* pdu_ref = &pdu;
|
||||
asn_dec_rval_t const ret = aper_decode(NULL, &asn_DEF_F1AP_F1AP_PDU, (void **)&pdu_ref, ba.buf, ba.len, 0, 0);
|
||||
assert( ret.code == RC_OK);
|
||||
|
||||
// xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, &pdu);
|
||||
// fflush(stdout);
|
||||
|
||||
return pdu;
|
||||
}
|
||||
|
||||
13
openair2/F1AP/test/enc_dec_f1ap.h
Normal file
13
openair2/F1AP/test/enc_dec_f1ap.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef ENCODE_DECODE_F1AP_MIR_H
|
||||
#define ENCODE_DECODE_F1AP_MIR_H
|
||||
|
||||
#include "../../../cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/F1AP_F1AP-PDU.h"
|
||||
#include "byte_array.h"
|
||||
|
||||
byte_array_t encode_pdu_f1ap(F1AP_F1AP_PDU_t const* pdu);
|
||||
|
||||
F1AP_F1AP_PDU_t decode_pdu_f1ap(byte_array_t ba);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
105
openair2/F1AP/test/f1ap_types/CMakeLists.txt
Normal file
105
openair2/F1AP/test/f1ap_types/CMakeLists.txt
Normal file
@@ -0,0 +1,105 @@
|
||||
set(f1ap_src_types
|
||||
|
||||
activate_cell.c
|
||||
add_pdcp_dup_tnl.c
|
||||
alloc_retention_prio.c
|
||||
|
||||
brdcst_PLMN_id_info.c
|
||||
|
||||
cause_f1ap.c
|
||||
cells_failed_to_activate.c
|
||||
cells_to_be_deact.c
|
||||
cells_to_be_barred.c
|
||||
|
||||
criticallity_diagnostic_f1ap.c
|
||||
criticallity_diagnostic_ie_f1ap.c
|
||||
cp_trans_layer_info.c
|
||||
cu_to_du_rrc_info.c
|
||||
|
||||
ded_si_del_need.c
|
||||
dl_up_tnl_info_tbs.c
|
||||
dl_rrc_msg.c
|
||||
drb_info.c
|
||||
drb_setup_item.c
|
||||
drb_to_be_setup.c
|
||||
drx_cycle.c
|
||||
dyn_5qi_descriptor.c
|
||||
du_to_cu_rrc_information_f1ap.c
|
||||
|
||||
e_utran_qos.c
|
||||
endpoint_ip_addr.c
|
||||
endpoint_ip_addr_port.c
|
||||
eutra_cell.c
|
||||
|
||||
f1_setup.c
|
||||
f1_setup_response.c
|
||||
f1_setup_failure.c
|
||||
fdd_info.c
|
||||
freq_band.c
|
||||
freq_shift.c
|
||||
flows_mapped_to_drb.c
|
||||
|
||||
gbr_qos_info.c
|
||||
gnb_rrc_ver.c
|
||||
gnb_du_srv_cell.c
|
||||
gnb_du_sys_info.c
|
||||
gnb_cu_sys_info.c
|
||||
gnb_cu_conf_update.c
|
||||
gnb_cu_conf_update_ack.c
|
||||
gnb_cu_tnl_assoc_to_add.c
|
||||
gnb_cu_tnl_assoc_to_rem.c
|
||||
gnb_cu_tnl_assoc_stp.c
|
||||
gnb_cu_tnl_assoc_failed_stp.c
|
||||
gnb_cu_tnl_assoc_to_upd.c
|
||||
gbr_qos_flow_info.c
|
||||
|
||||
iab_info_iab_du.c
|
||||
init_ul_rrc_msg.c
|
||||
intented_tdd_dl_ul_conf.c
|
||||
|
||||
neighbour_cell_info.c
|
||||
nr_carrier_lst.c
|
||||
nr_freq_info.c
|
||||
nr_cgi.c
|
||||
nr_prach_conf.c
|
||||
non_dyn_5qi_descriptor.c
|
||||
|
||||
prot_eutra_resources.c
|
||||
plmn.c
|
||||
|
||||
qos_flow_level_qos_parameter.c
|
||||
|
||||
s_nssai.c
|
||||
scell_to_be_setup.c
|
||||
serv_eutra_cell_info.c
|
||||
srv_cell_info.c
|
||||
sib.c
|
||||
srv_plmn.c
|
||||
srb_to_be_setup.c
|
||||
srb_setup_item.c
|
||||
ssb_pos_burst.c
|
||||
sul_info.c
|
||||
|
||||
tdd_info.c
|
||||
tnl_assoc_usage.c
|
||||
tsc_traffic_char.c
|
||||
tsc_assistance_info.c
|
||||
time_to_wait_f1ap.c
|
||||
trans_bw.c
|
||||
|
||||
ue_ctx_mod_request.c
|
||||
ue_ctx_mod_resp.c
|
||||
ue_ctx_setup_request.c
|
||||
ue_ctx_setup_response.c
|
||||
|
||||
|
||||
ul_rrc_msg.c
|
||||
ul_up_tnl_info.c
|
||||
ul_up_tnl_info_lst.c
|
||||
|
||||
)
|
||||
|
||||
add_library(f1ap_types_obj OBJECT ${f1ap_src_types})
|
||||
|
||||
|
||||
|
||||
10
openair2/F1AP/test/f1ap_types/ab_info_iab_donor_cu.h
Normal file
10
openair2/F1AP/test/f1ap_types/ab_info_iab_donor_cu.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef F1AP_AB_INFORMATION_IAB_DONOR_CU_MIR_H
|
||||
#define F1AP_AB_INFORMATION_IAB_DONOR_CU_MIR_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
} ab_info_iab_donor_cu_t;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
93
openair2/F1AP/test/f1ap_types/activate_cell.c
Normal file
93
openair2/F1AP/test/f1ap_types/activate_cell.c
Normal file
@@ -0,0 +1,93 @@
|
||||
#include "activate_cell.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
void free_activate_cell(activate_cell_t* cell)
|
||||
{
|
||||
assert(cell != NULL);
|
||||
|
||||
// mandatory
|
||||
// NR CGI 9.3.1.12
|
||||
|
||||
// optional
|
||||
// NR PCI
|
||||
free(cell->nr_pci);
|
||||
|
||||
if(cell->sys_info != NULL){
|
||||
free_gnb_cu_sys_info(cell->sys_info);
|
||||
free(cell->sys_info);
|
||||
}
|
||||
|
||||
assert(cell->sz_avail_plmn_lst == 0 && "Not implemented");
|
||||
|
||||
// optional
|
||||
// Extended Available PLMN List 9.3.1.76
|
||||
assert(cell->sz_ext_avail_plmn_lst == 0 && "Not implemented");
|
||||
|
||||
// optional AB Info IAB-donor-CU 9.3.1.105
|
||||
assert(cell->ab_info == NULL && "Not implemented");
|
||||
|
||||
// Available SNPN ID List 9.3.1.163
|
||||
assert(cell->sz_av_snpn_id_lst == 0 && "Not implemented");
|
||||
|
||||
}
|
||||
|
||||
bool eq_activate_cell(activate_cell_t const* m0, activate_cell_t const* m1)
|
||||
{
|
||||
assert(m0 != NULL);
|
||||
assert(m1 != NULL);
|
||||
|
||||
// mandatory
|
||||
// NR CGI 9.3.1.12
|
||||
if(eq_nr_cgi(&m0->nr_cgi, &m1->nr_cgi) == false)
|
||||
return false;
|
||||
|
||||
// optional
|
||||
// NR PCI
|
||||
if(m0->nr_pci != m1->nr_pci){
|
||||
if(m0->nr_pci == NULL)
|
||||
return false;
|
||||
if(m1->nr_pci == NULL)
|
||||
return false;
|
||||
if(*m0->nr_pci != *m1->nr_pci)
|
||||
return false;
|
||||
}
|
||||
|
||||
// optional
|
||||
// gNB-CU System Information 9.3.1.42
|
||||
if(eq_gnb_cu_sys_info(m0->sys_info, m1->sys_info) == false)
|
||||
return false;
|
||||
|
||||
// optional
|
||||
// Available PLMN List 9.3.1.65
|
||||
if(m0->sz_avail_plmn_lst != m1->sz_avail_plmn_lst)
|
||||
return false;
|
||||
|
||||
for(size_t i = 0; i < m0->sz_avail_plmn_lst; ++i){
|
||||
assert( 0!= 0 && "Not implemented");
|
||||
}
|
||||
|
||||
// optional
|
||||
// Extended Available PLMN List 9.3.1.76
|
||||
if(m0->sz_ext_avail_plmn_lst != m1->sz_ext_avail_plmn_lst)
|
||||
return false;
|
||||
|
||||
for(size_t i = 0; i < m0->sz_ext_avail_plmn_lst; ++i){
|
||||
assert(0!=0 && "Not implemented");
|
||||
}
|
||||
|
||||
// optional AB Info IAB-donor-CU 9.3.1.105
|
||||
assert(m0->ab_info == NULL && "Not implemented");
|
||||
assert(m1->ab_info == NULL && "Not implemented");
|
||||
|
||||
// Available SNPN ID List 9.3.1.163
|
||||
if(m0->sz_av_snpn_id_lst != m1->sz_av_snpn_id_lst)
|
||||
return false;
|
||||
|
||||
for(size_t i =0; i < m0->sz_av_snpn_id_lst; ++i){
|
||||
assert(0!=0 && "Not implemented");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
54
openair2/F1AP/test/f1ap_types/activate_cell.h
Normal file
54
openair2/F1AP/test/f1ap_types/activate_cell.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef F1AP_ACTIVATE_CELL_MIR_H
|
||||
#define F1AP_ACTIVATE_CELL_MIR_H
|
||||
|
||||
#include "nr_cgi.h"
|
||||
#include "gnb_cu_sys_info.h"
|
||||
#include "avail_plmn.h"
|
||||
#include "ext_avail_plmn.h"
|
||||
#include "ab_info_iab_donor_cu.h"
|
||||
#include "av_snpn_id.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
// 9.2.1.5 ETSI TS 138 473 V16.5.0 (2021-04)
|
||||
// F1 SETUP RESPONSE && GNB CU CONF UPDATE
|
||||
|
||||
typedef struct{
|
||||
|
||||
// mandatory
|
||||
// NR CGI 9.3.1.12
|
||||
nr_cgi_t nr_cgi;
|
||||
|
||||
// optional
|
||||
// NR PCI
|
||||
uint16_t* nr_pci; // (0..1007)
|
||||
|
||||
// optional
|
||||
// gNB-CU System Information 9.3.1.42
|
||||
gnb_cu_sys_info_t* sys_info;
|
||||
|
||||
// optional
|
||||
// Available PLMN List 9.3.1.65
|
||||
size_t sz_avail_plmn_lst; // [0,6]
|
||||
avail_plmn_t* avail_plmn;
|
||||
|
||||
// optional
|
||||
// Extended Available PLMN List 9.3.1.76
|
||||
size_t sz_ext_avail_plmn_lst; // [0,6]
|
||||
ext_avail_plmn_t* ext_avail_plmn;
|
||||
|
||||
// optional AB Info IAB-donor-CU 9.3.1.105
|
||||
ab_info_iab_donor_cu_t* ab_info;
|
||||
|
||||
// Available SNPN ID List 9.3.1.163
|
||||
size_t sz_av_snpn_id_lst; // [0,12]
|
||||
av_snpn_id_t* av_snpn;
|
||||
|
||||
} activate_cell_t;
|
||||
|
||||
void free_activate_cell(activate_cell_t* cell);
|
||||
|
||||
bool eq_activate_cell(activate_cell_t const* m0, activate_cell_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
44
openair2/F1AP/test/f1ap_types/add_pdcp_dup_tnl.c
Normal file
44
openair2/F1AP/test/f1ap_types/add_pdcp_dup_tnl.c
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "add_pdcp_dup_tnl.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_add_pdcp_dup_tnl( add_pdcp_dup_tnl_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Mandatory
|
||||
// Transport Layer Address 9.3.2.3
|
||||
if(src->trans_layer_add.size > 0){
|
||||
free(src->trans_layer_add.buf);
|
||||
}
|
||||
// free_byte_array(src->trans_layer_add); // BIT STRING(SIZE(1..160, ...))
|
||||
|
||||
// Mandatory
|
||||
// GTP-TEID 9.3.2.2
|
||||
// char gtp_teid[4];
|
||||
|
||||
}
|
||||
|
||||
bool eq_add_pdcp_dup_tnl( add_pdcp_dup_tnl_t const* m0, add_pdcp_dup_tnl_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
if(m0->trans_layer_add.size != m1->trans_layer_add.size)
|
||||
return false;
|
||||
|
||||
if(memcmp(m0->trans_layer_add.buf, m1->trans_layer_add.buf, m0->trans_layer_add.size) != 0)
|
||||
return false;
|
||||
|
||||
|
||||
if(memcmp(m0->gtp_teid, m1->gtp_teid, 4) != 0)
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
26
openair2/F1AP/test/f1ap_types/add_pdcp_dup_tnl.h
Normal file
26
openair2/F1AP/test/f1ap_types/add_pdcp_dup_tnl.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef ADD_PDCP_DUPLICATION_TNL_F1AP_H
|
||||
#define ADD_PDCP_DUPLICATION_TNL_F1AP_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "../byte_array.h"
|
||||
#include "../../../../cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/BIT_STRING.h"
|
||||
|
||||
// 9.3.2.1
|
||||
typedef struct{
|
||||
// Mandatory
|
||||
// Transport Layer Address 9.3.2.3
|
||||
BIT_STRING_t trans_layer_add; // BIT STRING(SIZE(1..160, ...))
|
||||
// byte_array_t trans_layer_add; // BIT STRING(SIZE(1..160, ...))
|
||||
|
||||
// Mandatory
|
||||
// GTP-TEID 9.3.2.2
|
||||
char gtp_teid[4];
|
||||
|
||||
} add_pdcp_dup_tnl_t;
|
||||
|
||||
void free_add_pdcp_dup_tnl( add_pdcp_dup_tnl_t* src);
|
||||
|
||||
bool eq_add_pdcp_dup_tnl( add_pdcp_dup_tnl_t const* m0, add_pdcp_dup_tnl_t const* m1);
|
||||
|
||||
#endif
|
||||
34
openair2/F1AP/test/f1ap_types/alloc_retention_prio.c
Normal file
34
openair2/F1AP/test/f1ap_types/alloc_retention_prio.c
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "alloc_retention_prio.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
bool eq_alloc_retention_prio(alloc_retention_prio_t const* m0, alloc_retention_prio_t const* m1)
|
||||
{
|
||||
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// Priority Level
|
||||
assert(m0->prio_level < 16);
|
||||
assert(m1->prio_level < 16);
|
||||
if(m0->prio_level != m1->prio_level)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// Pre-emption Capability
|
||||
if(m0->preempt_capability != m1->preempt_capability)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// Pre-emption Vulnerability
|
||||
if(m0->preempt_vulnerability != m1->preempt_vulnerability)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
44
openair2/F1AP/test/f1ap_types/alloc_retention_prio.h
Normal file
44
openair2/F1AP/test/f1ap_types/alloc_retention_prio.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef ALLOCATION_RETENTION_PRIORITY_MIR_H
|
||||
#define ALLOCATION_RETENTION_PRIORITY_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
typedef enum{
|
||||
|
||||
SHALL_NOT_TRIGGER_PRE_EMPTION_PREEMPT_CAPABILITY,
|
||||
MAY_TRIGGER_PRE_EMPTION_PREEMPT_CAPABILITY,
|
||||
|
||||
END_PREEMPT_CAPABILITY,
|
||||
|
||||
} preempt_capability_e;
|
||||
|
||||
typedef enum{
|
||||
|
||||
NOT_PRE_EMPTABLE_PREEMPT_VULNERABILITY,
|
||||
PRE_EMPTABLE_PREEMPT_VULNERABILITY,
|
||||
|
||||
END_PREEMPT_VULNERABILITY
|
||||
|
||||
} preempt_vulnerability_e;
|
||||
|
||||
|
||||
typedef struct{
|
||||
// Mandatory
|
||||
// Priority Level
|
||||
uint8_t prio_level; // INTEGER (0..15)
|
||||
|
||||
// Mandatory
|
||||
// Pre-emption Capability
|
||||
preempt_capability_e preempt_capability;
|
||||
|
||||
// Mandatory
|
||||
// Pre-emption Vulnerability
|
||||
preempt_vulnerability_e preempt_vulnerability;
|
||||
|
||||
} alloc_retention_prio_t;
|
||||
|
||||
bool eq_alloc_retention_prio(alloc_retention_prio_t const* m0, alloc_retention_prio_t const* m1);
|
||||
|
||||
#endif
|
||||
9
openair2/F1AP/test/f1ap_types/av_snpn_id.h
Normal file
9
openair2/F1AP/test/f1ap_types/av_snpn_id.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef F1AP_AVAILABLE_SNPN_ID_MIR_H
|
||||
#define F1AP_AVAILABLE_SNPN_ID_MIR_H
|
||||
|
||||
// 9.3.1.163
|
||||
typedef struct{
|
||||
|
||||
} av_snpn_id_t;
|
||||
|
||||
#endif
|
||||
11
openair2/F1AP/test/f1ap_types/avail_plmn.h
Normal file
11
openair2/F1AP/test/f1ap_types/avail_plmn.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef F1AP_AVAILABLE_PLMN_MIR_H
|
||||
#define F1AP_AVAILABLE_PLMN_MIR_H
|
||||
|
||||
|
||||
// 9.3.1.65
|
||||
typedef struct{
|
||||
|
||||
} avail_plmn_t;
|
||||
|
||||
#endif
|
||||
|
||||
10
openair2/F1AP/test/f1ap_types/bap_address.h
Normal file
10
openair2/F1AP/test/f1ap_types/bap_address.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef F1AP_BAD_ADDRESS_MIR_H
|
||||
#define F1AP_BAD_ADDRESS_MIR_H
|
||||
|
||||
// 9.3.1.111
|
||||
typedef struct{
|
||||
|
||||
} bap_address_t;
|
||||
|
||||
#endif
|
||||
|
||||
9
openair2/F1AP/test/f1ap_types/bh_info.h
Normal file
9
openair2/F1AP/test/f1ap_types/bh_info.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef BH_INFO_F1AP_MIR_H
|
||||
#define BH_INFO_F1AP_MIR_H
|
||||
|
||||
// BH Information 9.3.1.114
|
||||
typedef struct{
|
||||
|
||||
} bh_info_t;
|
||||
|
||||
#endif
|
||||
25
openair2/F1AP/test/f1ap_types/bh_rlc_chn_failed_tbs_lst.h
Normal file
25
openair2/F1AP/test/f1ap_types/bh_rlc_chn_failed_tbs_lst.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef BH_RLC_CHN_FAILED_TBS_LST_F1AP_MIR_H
|
||||
#define BH_RLC_CHN_FAILED_TBS_LST_F1AP_MIR_H
|
||||
|
||||
#include "cause_f1ap.h"
|
||||
|
||||
#include "../../../../cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/BIT_STRING.h"
|
||||
|
||||
|
||||
|
||||
typedef struct{
|
||||
|
||||
// Mandatory
|
||||
// 9.3.1.113
|
||||
BIT_STRING_t bh_rlc_ch_id;
|
||||
|
||||
// Optional
|
||||
// 9.3.1.2
|
||||
cause_f1ap_t* cause;
|
||||
|
||||
} bh_rlc_chn_failed_tbs_lst_t;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
9
openair2/F1AP/test/f1ap_types/bh_rlc_chn_to_be_mod.h
Normal file
9
openair2/F1AP/test/f1ap_types/bh_rlc_chn_to_be_mod.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef BH_RLC_CHN_TO_BE_MODIFIED_F1AP_H
|
||||
#define BH_RLC_CHN_TO_BE_MODIFIED_F1AP_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
} bh_rlc_chn_to_be_mod_t;
|
||||
|
||||
#endif
|
||||
|
||||
11
openair2/F1AP/test/f1ap_types/bh_rlc_chn_to_be_rel.h
Normal file
11
openair2/F1AP/test/f1ap_types/bh_rlc_chn_to_be_rel.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef BH_RLC_CHN_TO_BE_RELEASED_F1AP_H
|
||||
#define BH_RLC_CHN_TO_BE_RELEASED_F1AP_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
} bh_rlc_chn_to_be_rel_t;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
22
openair2/F1AP/test/f1ap_types/brdcst_PLMN_id_info.c
Normal file
22
openair2/F1AP/test/f1ap_types/brdcst_PLMN_id_info.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "brdcst_PLMN_id_info.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
void free_brdcst_PLMN_id_info_f1ap( brdcst_PLMN_id_info_f1ap_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// no heap memory allocated
|
||||
//
|
||||
(void)src;
|
||||
}
|
||||
|
||||
|
||||
bool eq_brdcst_PLMN_id_info_f1ap( brdcst_PLMN_id_info_f1ap_t const* m0, brdcst_PLMN_id_info_f1ap_t const* m1)
|
||||
{
|
||||
assert(0!= 0 && "Not implemented");
|
||||
return false;
|
||||
}
|
||||
|
||||
15
openair2/F1AP/test/f1ap_types/brdcst_PLMN_id_info.h
Normal file
15
openair2/F1AP/test/f1ap_types/brdcst_PLMN_id_info.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef F1AP_BROADCAST_PLMN_ID_INFO_MIR_H
|
||||
#define F1AP_BROADCAST_PLMN_ID_INFO_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct{
|
||||
|
||||
} brdcst_PLMN_id_info_f1ap_t;
|
||||
|
||||
void free_brdcst_PLMN_id_info_f1ap( brdcst_PLMN_id_info_f1ap_t* src);
|
||||
|
||||
bool eq_brdcst_PLMN_id_info_f1ap( brdcst_PLMN_id_info_f1ap_t const* m0, brdcst_PLMN_id_info_f1ap_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
9
openair2/F1AP/test/f1ap_types/carrier_lst.h
Normal file
9
openair2/F1AP/test/f1ap_types/carrier_lst.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef F1AP_CARRIER_LIST_MIR_H
|
||||
#define F1AP_CARRIER_LIST_MIR_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
} carrier_lst_t;
|
||||
|
||||
#endif
|
||||
|
||||
48
openair2/F1AP/test/f1ap_types/cause_f1ap.c
Normal file
48
openair2/F1AP/test/f1ap_types/cause_f1ap.c
Normal file
@@ -0,0 +1,48 @@
|
||||
#include "cause_f1ap.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
bool eq_cause_f1ap(cause_f1ap_t const* m0, cause_f1ap_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL)
|
||||
return false;
|
||||
|
||||
if(m1 == NULL)
|
||||
return false;
|
||||
|
||||
if(m0->type != m1->type)
|
||||
return false;
|
||||
|
||||
assert(m0->type < END_CAUSE_F1AP);
|
||||
assert(m1->type < END_CAUSE_F1AP);
|
||||
|
||||
if(m0->type == RADIO_NETWORK_CAUSE_F1AP ){
|
||||
|
||||
if(m0->radio != m1->radio)
|
||||
return false;
|
||||
|
||||
} else if(m0->type == TRANSPORT_CAUSE_F1AP){
|
||||
|
||||
if(m0->trans != m1->trans)
|
||||
return false;
|
||||
|
||||
} else if(m0->type == PROTOCOL_CAUSE_F1AP) {
|
||||
|
||||
if(m0->proto != m1->proto)
|
||||
return false;
|
||||
|
||||
} else if(m0->type == MISC_CAUSE_F1AP){
|
||||
|
||||
if(m0->misc != m1->misc)
|
||||
return false;
|
||||
|
||||
} else {
|
||||
assert(0!= 0 && "Unknown type");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
38
openair2/F1AP/test/f1ap_types/cause_f1ap.h
Normal file
38
openair2/F1AP/test/f1ap_types/cause_f1ap.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef CAUSE_F1AP_MIR_H
|
||||
#define CAUSE_F1AP_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "radio_network_cause.h"
|
||||
#include "transport_cause_f1ap.h"
|
||||
#include "protocol_cause_f1ap.h"
|
||||
#include "misc_cause_f1ap.h"
|
||||
|
||||
typedef enum{
|
||||
RADIO_NETWORK_CAUSE_F1AP = 0,
|
||||
TRANSPORT_CAUSE_F1AP = 1,
|
||||
PROTOCOL_CAUSE_F1AP = 2,
|
||||
MISC_CAUSE_F1AP = 3,
|
||||
|
||||
END_CAUSE_F1AP
|
||||
|
||||
} cause_f1ap_e;
|
||||
|
||||
|
||||
typedef struct{
|
||||
cause_f1ap_e type;
|
||||
union{
|
||||
radio_network_cause_f1ap_e radio;
|
||||
transport_cause_f1ap_e trans;
|
||||
protocol_cause_f1ap_e proto;
|
||||
misc_cause_f1ap_e misc;
|
||||
};
|
||||
|
||||
} cause_f1ap_t;
|
||||
|
||||
bool eq_cause_f1ap(cause_f1ap_t const* m0, cause_f1ap_t const* m1);
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
10
openair2/F1AP/test/f1ap_types/cell_dir.h
Normal file
10
openair2/F1AP/test/f1ap_types/cell_dir.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef F1AP_CELL_DIR_MIR_H
|
||||
#define F1AP_CELL_DIR_MIR_H
|
||||
|
||||
typedef struct {
|
||||
|
||||
} cell_dir_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
11
openair2/F1AP/test/f1ap_types/cell_type.h
Normal file
11
openair2/F1AP/test/f1ap_types/cell_type.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef F1AP_CELL_TYPE_MIR_H
|
||||
#define F1AP_CELL_TYPE_MIR_H
|
||||
|
||||
typedef struct {
|
||||
|
||||
} cell_type_t;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
19
openair2/F1AP/test/f1ap_types/cell_ul_conf.h
Normal file
19
openair2/F1AP/test/f1ap_types/cell_ul_conf.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef CELL_UL_CONFIGURATION_MIR_H
|
||||
#define CELL_UL_CONFIGURATION_MIR_H
|
||||
|
||||
// Further details are defined
|
||||
// in TS 38.331 [8]
|
||||
// Cell UL Configured 9.3.1.33
|
||||
|
||||
typedef enum{
|
||||
|
||||
UL_CELL_UL_CONF,
|
||||
SUL_CELL_UL_CONF,
|
||||
UL_SUL_CELL_UL_CONF,
|
||||
|
||||
END_CELL_UL_CONF
|
||||
|
||||
} cell_ul_conf_e;
|
||||
|
||||
#endif
|
||||
|
||||
32
openair2/F1AP/test/f1ap_types/cells_failed_to_activate.c
Normal file
32
openair2/F1AP/test/f1ap_types/cells_failed_to_activate.c
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "cells_failed_to_activate.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_cells_failed_to_activate( cells_failed_to_activate_t* src)
|
||||
{
|
||||
// No memory allocated from this object
|
||||
(void)src;
|
||||
}
|
||||
|
||||
bool eq_cells_failed_to_activate(cells_failed_to_activate_t const* m0, cells_failed_to_activate_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// NR CGI 9.3.1.12
|
||||
if(eq_nr_cgi(&m0->nr_cgi, &m1->nr_cgi) == false)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// Cause 9.3.1.2
|
||||
if(eq_cause_f1ap(&m0->cause, &m1->cause) == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
26
openair2/F1AP/test/f1ap_types/cells_failed_to_activate.h
Normal file
26
openair2/F1AP/test/f1ap_types/cells_failed_to_activate.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef F1AP_CELLS_FAILED_TO_BE_ACTIVATED_LIST_H
|
||||
#define F1AP_CELLS_FAILED_TO_BE_ACTIVATED_LIST_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "cause_f1ap.h"
|
||||
#include "nr_cgi.h"
|
||||
|
||||
typedef struct{
|
||||
|
||||
// Mandatory
|
||||
// NR CGI 9.3.1.12
|
||||
nr_cgi_t nr_cgi;
|
||||
|
||||
// Mandatory
|
||||
// Cause 9.3.1.2
|
||||
cause_f1ap_t cause;
|
||||
|
||||
} cells_failed_to_activate_t;
|
||||
|
||||
void free_cells_failed_to_activate(cells_failed_to_activate_t* src);
|
||||
|
||||
bool eq_cells_failed_to_activate( cells_failed_to_activate_t const* m0, cells_failed_to_activate_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
63
openair2/F1AP/test/f1ap_types/cells_to_be_barred.c
Normal file
63
openair2/F1AP/test/f1ap_types/cells_to_be_barred.c
Normal file
@@ -0,0 +1,63 @@
|
||||
#include "cells_to_be_barred.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_cells_to_be_barred(cells_to_be_barred_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// NR CGI 9.3.1.12
|
||||
// Mandatory
|
||||
free_nr_cgi(&src->nr_cgi);
|
||||
|
||||
// Cell Barred
|
||||
// Mandatory
|
||||
// cell_barred_e cell_barred;
|
||||
|
||||
// IAB Barred
|
||||
// Optional
|
||||
assert(src->iab_barred == NULL && "Not implemented");
|
||||
}
|
||||
|
||||
bool eq_cell_barred(cell_barred_e const* m0, cell_barred_e const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL )
|
||||
return false;
|
||||
|
||||
if(*m0 != *m1)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool eq_cells_to_be_barred(cells_to_be_barred_t const* m0, cells_to_be_barred_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// NR CGI 9.3.1.12
|
||||
// Mandatory
|
||||
if(eq_nr_cgi(&m0->nr_cgi, &m1->nr_cgi) == false)
|
||||
return false;
|
||||
|
||||
// Cell Barred
|
||||
// Mandatory
|
||||
if(eq_cell_barred(&m0->cell_barred, &m1->cell_barred) == false)
|
||||
return false;
|
||||
|
||||
// IAB Barred
|
||||
// Optional
|
||||
if(eq_cell_barred(m0->iab_barred, m1->iab_barred) == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
37
openair2/F1AP/test/f1ap_types/cells_to_be_barred.h
Normal file
37
openair2/F1AP/test/f1ap_types/cells_to_be_barred.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef F1AP_CELLS_TO_BE_BARRED_H
|
||||
#define F1AP_CELLS_TO_BE_BARRED_H
|
||||
|
||||
#include "nr_cgi.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef enum{
|
||||
|
||||
BARRED_CELL_BARRED,
|
||||
NOT_BARRED_CELL_BARRED,
|
||||
END_CELL_BARRED
|
||||
|
||||
} cell_barred_e;
|
||||
|
||||
bool eq_cell_barred(cell_barred_e const* m0, cell_barred_e const* m1);
|
||||
|
||||
typedef struct{
|
||||
// NR CGI 9.3.1.12
|
||||
// Mandatory
|
||||
nr_cgi_t nr_cgi;
|
||||
|
||||
// Cell Barred
|
||||
// Mandatory
|
||||
cell_barred_e cell_barred;
|
||||
|
||||
// IAB Barred
|
||||
// Optional
|
||||
cell_barred_e* iab_barred;
|
||||
|
||||
} cells_to_be_barred_t;
|
||||
|
||||
void free_cells_to_be_barred(cells_to_be_barred_t* src);
|
||||
|
||||
bool eq_cells_to_be_barred(cells_to_be_barred_t const* m0, cells_to_be_barred_t const* m1);
|
||||
|
||||
#endif
|
||||
18
openair2/F1AP/test/f1ap_types/cells_to_be_deact.c
Normal file
18
openair2/F1AP/test/f1ap_types/cells_to_be_deact.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "cells_to_be_deact.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
bool eq_cells_to_be_deact(cells_to_be_deact_t const* m0, cells_to_be_deact_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// NR CGI 9.3.1.12
|
||||
if(eq_nr_cgi(&m0->nr_cgi, &m1->nr_cgi) == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
17
openair2/F1AP/test/f1ap_types/cells_to_be_deact.h
Normal file
17
openair2/F1AP/test/f1ap_types/cells_to_be_deact.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef F1AP_CELLS_TO_BE_DEACTIVATED_H
|
||||
#define F1AP_CELLS_TO_BE_DEACTIVATED_H
|
||||
|
||||
#include "nr_cgi.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
// NR CGI 9.3.1.12
|
||||
nr_cgi_t nr_cgi;
|
||||
|
||||
} cells_to_be_deact_t;
|
||||
|
||||
bool eq_cells_to_be_deact( cells_to_be_deact_t const* m0, cells_to_be_deact_t const* m1);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
66
openair2/F1AP/test/f1ap_types/cp_trans_layer_info.c
Normal file
66
openair2/F1AP/test/f1ap_types/cp_trans_layer_info.c
Normal file
@@ -0,0 +1,66 @@
|
||||
#include "cp_trans_layer_info.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
static
|
||||
bool eq_bit_string(BIT_STRING_t const* m0, BIT_STRING_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
if(m0->bits_unused != m1->bits_unused)
|
||||
return false;
|
||||
|
||||
if(m0->size != m1->size)
|
||||
return false;
|
||||
|
||||
assert(m0->size < 1024 && "Security check. Is it really greater than 1024?");
|
||||
assert(m1->size < 1024 && "Security check. Is it really greater than 1024?");
|
||||
|
||||
if(memcmp(m0->buf, m1->buf, m0->size) != 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void free_cp_trans_layer_info(cp_trans_layer_info_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
if(src->type == IP_ADDRESS_CP_TRANS_LAYER_INFO ){
|
||||
free_endpoint_ip_addr(&src->ep_ip_addr);
|
||||
} else if(src->type == IP_ADDRESS_PORT_CP_TRANS_LAYER_INFO){
|
||||
free_endpoint_ip_addr_port(&src->ep_ip_addr_port);
|
||||
} else {
|
||||
assert(0!=0 && "Unknown type");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool eq_cp_trans_layer_info(cp_trans_layer_info_t const* m0, cp_trans_layer_info_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
if(m0->type != m1->type)
|
||||
return false;
|
||||
|
||||
if(m0->type == IP_ADDRESS_CP_TRANS_LAYER_INFO){
|
||||
if(eq_bit_string(&m0->ep_ip_addr.trans_layer_add, &m1->ep_ip_addr.trans_layer_add) == false)
|
||||
return false;
|
||||
} else if(m0->type == IP_ADDRESS_PORT_CP_TRANS_LAYER_INFO){
|
||||
if(eq_endpoint_ip_addr_port(&m0->ep_ip_addr_port, &m1->ep_ip_addr_port) == false)
|
||||
return false;
|
||||
} else{
|
||||
assert(0!=0 && "Unknown type" );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
31
openair2/F1AP/test/f1ap_types/cp_trans_layer_info.h
Normal file
31
openair2/F1AP/test/f1ap_types/cp_trans_layer_info.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef F1AP_CP_TRANSPORT_LAYER_INFORMATION_H
|
||||
#define F1AP_CP_TRANSPORT_LAYER_INFORMATION_H
|
||||
|
||||
#include "endpoint_ip_addr.h"
|
||||
#include "endpoint_ip_addr_port.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
// 9.3.2.4
|
||||
typedef enum{
|
||||
IP_ADDRESS_CP_TRANS_LAYER_INFO,
|
||||
IP_ADDRESS_PORT_CP_TRANS_LAYER_INFO,
|
||||
END_CP_TRANS_LAYER_INFO
|
||||
} cp_trans_layer_info_e ;
|
||||
|
||||
typedef struct{
|
||||
cp_trans_layer_info_e type;
|
||||
// 9.3.2.4
|
||||
union{
|
||||
endpoint_ip_addr_t ep_ip_addr;
|
||||
endpoint_ip_addr_port_t ep_ip_addr_port;
|
||||
};
|
||||
|
||||
} cp_trans_layer_info_t ;
|
||||
|
||||
void free_cp_trans_layer_info(cp_trans_layer_info_t* src);
|
||||
|
||||
bool eq_cp_trans_layer_info(cp_trans_layer_info_t const* m0, cp_trans_layer_info_t const* m1);
|
||||
|
||||
#endif
|
||||
39
openair2/F1AP/test/f1ap_types/criticality_diagnostic_f1ap.h
Normal file
39
openair2/F1AP/test/f1ap_types/criticality_diagnostic_f1ap.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef CRITICALLITY_DIAGNOSTIC_F1AP_MIR_H
|
||||
#define CRITICALLITY_DIAGNOSTIC_F1AP_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "triggering_message_f1ap.h"
|
||||
#include "criticallity_diagnostic_ie_f1ap.h"
|
||||
|
||||
// 9.3.1.3
|
||||
typedef struct {
|
||||
|
||||
//optional
|
||||
//Procedure Code
|
||||
uint8_t* proc_code;
|
||||
|
||||
//optional
|
||||
//Triggering Message
|
||||
trig_msg_e* trig_msg;
|
||||
|
||||
//optional
|
||||
//Procedure Criticality
|
||||
proc_crit_e* proc_crit;
|
||||
|
||||
//optional
|
||||
//Transaction ID
|
||||
uint8_t* trans_id;
|
||||
|
||||
size_t sz_crit_diagn_ie; // max. 256
|
||||
crit_diagn_ie_t* crit_diagn_ie;
|
||||
|
||||
} criticallity_diagnostic_f1ap_t;
|
||||
|
||||
void free_criticallity_diagnose(criticallity_diagnostic_f1ap_t* c);
|
||||
|
||||
bool eq_criticallity_diagnose(criticallity_diagnostic_f1ap_t const* m0, criticallity_diagnostic_f1ap_t const* m1);
|
||||
|
||||
#endif
|
||||
93
openair2/F1AP/test/f1ap_types/criticallity_diagnostic_f1ap.c
Normal file
93
openair2/F1AP/test/f1ap_types/criticallity_diagnostic_f1ap.c
Normal file
@@ -0,0 +1,93 @@
|
||||
#include "criticallity_diagnostic_f1ap.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
void free_criticallity_diagnose(criticallity_diagnostic_f1ap_t* c)
|
||||
{
|
||||
assert(c != NULL);
|
||||
|
||||
if(c->proc_code != NULL)
|
||||
free(c->proc_code);
|
||||
|
||||
if(c->trig_msg != NULL)
|
||||
free(c->trig_msg);
|
||||
|
||||
if(c->proc_crit != NULL)
|
||||
free(c->proc_crit);
|
||||
|
||||
if(c->trans_id != NULL)
|
||||
free(c->trans_id);
|
||||
|
||||
assert(c->sz_crit_diagn_ie < 257);
|
||||
if(c->sz_crit_diagn_ie > 0)
|
||||
free(c->crit_diagn_ie);
|
||||
}
|
||||
|
||||
bool eq_criticallity_diagnose(criticallity_diagnostic_f1ap_t const* m0, criticallity_diagnostic_f1ap_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL)
|
||||
return false;
|
||||
|
||||
if(m1 == NULL)
|
||||
return false;
|
||||
|
||||
|
||||
//optional
|
||||
//Procedure Code
|
||||
if(m0->proc_code != m1->proc_code){
|
||||
if(m0->proc_code == NULL)
|
||||
return false;
|
||||
if(m1->proc_code == NULL)
|
||||
return false;
|
||||
if(*m0->proc_code != *m1->proc_code)
|
||||
return false;
|
||||
}
|
||||
|
||||
//optional
|
||||
//Triggering Message
|
||||
if(m0->trig_msg!= m1->trig_msg){
|
||||
if(m0->trig_msg == NULL)
|
||||
return false;
|
||||
if(m1-> trig_msg == NULL)
|
||||
return false;
|
||||
if(*m0->trig_msg != *m1-> trig_msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
//optional
|
||||
//Procedure Criticality
|
||||
if(m0->proc_crit!= m1->proc_crit){
|
||||
if(m0->proc_crit == NULL)
|
||||
return false;
|
||||
if(m1->proc_crit == NULL)
|
||||
return false;
|
||||
if(*m0->proc_crit != *m1->proc_crit)
|
||||
return false;
|
||||
}
|
||||
|
||||
//optional
|
||||
//Transaction ID
|
||||
if(m0->trans_id!= m1->trans_id){
|
||||
if(m0->trans_id == NULL)
|
||||
return false;
|
||||
if(m1->trans_id == NULL)
|
||||
return false;
|
||||
if(*m0->trans_id != *m1->trans_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(m0->sz_crit_diagn_ie != m1->sz_crit_diagn_ie)
|
||||
return false;
|
||||
|
||||
for(size_t i = 0; i < m0->sz_crit_diagn_ie; ++i){
|
||||
if(eq_crit_diagn_ie(&m0-> crit_diagn_ie[i], &m1->crit_diagn_ie[i]) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
39
openair2/F1AP/test/f1ap_types/criticallity_diagnostic_f1ap.h
Normal file
39
openair2/F1AP/test/f1ap_types/criticallity_diagnostic_f1ap.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef CRITICALLITY_DIAGNOSTIC_F1AP_MIR_H
|
||||
#define CRITICALLITY_DIAGNOSTIC_F1AP_MIR_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "criticallity_diagnostic_ie_f1ap.h"
|
||||
#include "triggering_message_f1ap.h"
|
||||
#include "procedure_criticallity_f1ap.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
//optional
|
||||
//Procedure Code
|
||||
uint8_t* proc_code;
|
||||
|
||||
//optional
|
||||
//Triggering Message
|
||||
trig_msg_e* trig_msg;
|
||||
|
||||
//optional
|
||||
//Procedure Criticality
|
||||
proc_crit_e* proc_crit;
|
||||
|
||||
//optional
|
||||
//Transaction ID
|
||||
uint8_t* trans_id;
|
||||
|
||||
// Optional
|
||||
size_t sz_crit_diagn_ie; // max. 256
|
||||
crit_diagn_ie_t* crit_diagn_ie;
|
||||
|
||||
} criticallity_diagnostic_f1ap_t;
|
||||
|
||||
void free_criticallity_diagnose(criticallity_diagnostic_f1ap_t* c);
|
||||
|
||||
bool eq_criticallity_diagnose(criticallity_diagnostic_f1ap_t const* m0, criticallity_diagnostic_f1ap_t const* m1);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,29 @@
|
||||
#include "criticallity_diagnostic_ie_f1ap.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
bool eq_crit_diagn_ie(crit_diagn_ie_t const* m0, crit_diagn_ie_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL)
|
||||
return false;
|
||||
|
||||
if(m1 == NULL)
|
||||
return false;
|
||||
|
||||
|
||||
|
||||
if(m0->proc_crit != m1->proc_crit)
|
||||
return false;
|
||||
|
||||
if(m0->id != m1->id)
|
||||
return false;
|
||||
|
||||
if(m0->type_of_error != m1->type_of_error)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#ifndef CRITICALLITY_DIAGNOSTIC_IE_F1AP_MIR_H
|
||||
#define CRITICALLITY_DIAGNOSTIC_IE_F1AP_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "procedure_criticallity_f1ap.h"
|
||||
|
||||
typedef enum{
|
||||
|
||||
NOT_UNDERSTOOD_CRITICALLITY_DIAGNOSTIC_IE_F1AP = 0,
|
||||
MISSING_CRITICALLITY_DIAGNOSTIC_IE_F1AP = 1,
|
||||
|
||||
END_CRITICALLITY_DIAGNOSTIC_IE_F1AP = 2,
|
||||
|
||||
} type_error_e ;
|
||||
|
||||
typedef struct{
|
||||
|
||||
// mandatory
|
||||
proc_crit_e proc_crit;
|
||||
|
||||
//mandatory
|
||||
uint16_t id;
|
||||
|
||||
// mandatory
|
||||
type_error_e type_of_error;
|
||||
|
||||
} crit_diagn_ie_t;
|
||||
|
||||
bool eq_crit_diagn_ie(crit_diagn_ie_t const* m0, crit_diagn_ie_t const* m1);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
122
openair2/F1AP/test/f1ap_types/cu_to_du_rrc_info.c
Normal file
122
openair2/F1AP/test/f1ap_types/cu_to_du_rrc_info.c
Normal file
@@ -0,0 +1,122 @@
|
||||
#include "cu_to_du_rrc_info.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static
|
||||
void free_byte_array_if_not_null(byte_array_t* ba)
|
||||
{
|
||||
if(ba == NULL)
|
||||
return;
|
||||
|
||||
free_byte_array(*ba);
|
||||
free(ba);
|
||||
}
|
||||
|
||||
|
||||
void free_cu_to_du_rrc_info(cu_to_du_rrc_info_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Optional
|
||||
// CG-ConfigInfo
|
||||
free_byte_array_if_not_null(src->cg_config_info);
|
||||
|
||||
// Optional
|
||||
// UE-CapabilityRAT-ContainerList
|
||||
free_byte_array_if_not_null(src->ue_capability_rat_con_lst);
|
||||
|
||||
// Optional
|
||||
// MeasConfig
|
||||
free_byte_array_if_not_null(src->meas_config);
|
||||
|
||||
// Optional
|
||||
// Handover Preparation Information
|
||||
free_byte_array_if_not_null(src->handover_prep_info);
|
||||
|
||||
// Optional
|
||||
// CellGroupConfig
|
||||
free_byte_array_if_not_null(src->cell_group_config);
|
||||
|
||||
// Optional
|
||||
// Measurement Timing Configuration
|
||||
free_byte_array_if_not_null(src->meas_timing_conf);
|
||||
|
||||
// Optional
|
||||
// UEAssistanceInformation
|
||||
free_byte_array_if_not_null(src-> ue_assistance_info);
|
||||
|
||||
// Optional
|
||||
// CG-Config
|
||||
free_byte_array_if_not_null(src->cg_config);
|
||||
|
||||
// Optional
|
||||
// UEAssistanceInformationEUTRA
|
||||
free_byte_array_if_not_null(src->UE_assistance_info_eutra);
|
||||
|
||||
}
|
||||
|
||||
bool eq_cu_to_du_rrc_info(cu_to_du_rrc_info_t const* m0, cu_to_du_rrc_info_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL)
|
||||
return false;
|
||||
|
||||
if(m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// CG-ConfigInfo
|
||||
if(eq_byte_array(m0->cg_config_info, m1->cg_config_info) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// UE-CapabilityRAT-ContainerList
|
||||
if(eq_byte_array(m0->ue_capability_rat_con_lst, m1->ue_capability_rat_con_lst) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// MeasConfig
|
||||
if(eq_byte_array(m0->meas_config, m1->meas_config) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Handover Preparation Information
|
||||
if(eq_byte_array(m0->handover_prep_info, m1->handover_prep_info) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// CellGroupConfig
|
||||
if(eq_byte_array(m0->cell_group_config, m1->cell_group_config) == false)
|
||||
return false;
|
||||
|
||||
|
||||
// Optional
|
||||
// Measurement Timing Configuration
|
||||
if(eq_byte_array(m0->meas_timing_conf, m1->meas_timing_conf) == false)
|
||||
return false;
|
||||
|
||||
|
||||
// Optional
|
||||
// UEAssistanceInformation
|
||||
if(eq_byte_array(m0->ue_assistance_info, m1->ue_assistance_info) == false)
|
||||
return false;
|
||||
|
||||
|
||||
// Optional
|
||||
// CG-Config
|
||||
if(eq_byte_array(m0->cg_config, m1->cg_config) == false)
|
||||
return false;
|
||||
|
||||
|
||||
// Optional
|
||||
// UEAssistanceInformationEUTRA
|
||||
if(eq_byte_array(m0->UE_assistance_info_eutra, m1->UE_assistance_info_eutra) == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
52
openair2/F1AP/test/f1ap_types/cu_to_du_rrc_info.h
Normal file
52
openair2/F1AP/test/f1ap_types/cu_to_du_rrc_info.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#ifndef CU_TO_DU_RRC_INFORMATION_MIR_H
|
||||
#define CU_TO_DU_RRC_INFORMATION_MIR_H
|
||||
|
||||
#include "../byte_array.h"
|
||||
|
||||
// 9.3.1.25
|
||||
typedef struct{
|
||||
|
||||
// Optional
|
||||
// CG-ConfigInfo
|
||||
byte_array_t* cg_config_info;
|
||||
|
||||
// Optional
|
||||
// UE-CapabilityRAT-ContainerList
|
||||
byte_array_t* ue_capability_rat_con_lst;
|
||||
|
||||
// Optional
|
||||
// MeasConfig
|
||||
byte_array_t* meas_config;
|
||||
|
||||
// Optional
|
||||
// Handover Preparation Information
|
||||
byte_array_t* handover_prep_info;
|
||||
|
||||
// Optional
|
||||
// CellGroupConfig
|
||||
byte_array_t* cell_group_config;
|
||||
|
||||
// Optional
|
||||
// Measurement Timing Configuration
|
||||
byte_array_t* meas_timing_conf;
|
||||
|
||||
// Optional
|
||||
// UEAssistanceInformation
|
||||
byte_array_t* ue_assistance_info;
|
||||
|
||||
// Optional
|
||||
// CG-Config
|
||||
byte_array_t* cg_config;
|
||||
|
||||
// Optional
|
||||
// UEAssistanceInformationEUTRA
|
||||
byte_array_t* UE_assistance_info_eutra;
|
||||
|
||||
} cu_to_du_rrc_info_t ;
|
||||
|
||||
void free_cu_to_du_rrc_info(cu_to_du_rrc_info_t* src);
|
||||
|
||||
bool eq_cu_to_du_rrc_info(cu_to_du_rrc_info_t const* m0, cu_to_du_rrc_info_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
8
openair2/F1AP/test/f1ap_types/ded_si_del_need.c
Normal file
8
openair2/F1AP/test/f1ap_types/ded_si_del_need.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include "ded_si_del_need.h"
|
||||
|
||||
void free_ded_si_del_need(ded_si_del_need_t* src)
|
||||
{
|
||||
// No memory allocated in the heap
|
||||
(void)src;
|
||||
}
|
||||
|
||||
23
openair2/F1AP/test/f1ap_types/ded_si_del_need.h
Normal file
23
openair2/F1AP/test/f1ap_types/ded_si_del_need.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef F1AP_DEDICATED_SI_DELIVERY_NEEDED_UE_LIST_H
|
||||
#define F1AP_DEDICATED_SI_DELIVERY_NEEDED_UE_LIST_H
|
||||
|
||||
#include "nr_cgi.h"
|
||||
|
||||
typedef struct{
|
||||
|
||||
// Mnadatory
|
||||
// 9.3.1.4
|
||||
// gNB-CU UE F1AP ID
|
||||
uint32_t gnb_cu_ue_id; // [0, 2^32 -1]
|
||||
|
||||
// Mandatory
|
||||
// 9.3.1.12
|
||||
// NR CGI
|
||||
nr_cgi_t nr_cgi;
|
||||
|
||||
} ded_si_del_need_t;
|
||||
|
||||
void free_ded_si_del_need(ded_si_del_need_t* src);
|
||||
|
||||
#endif
|
||||
|
||||
176
openair2/F1AP/test/f1ap_types/dl_rrc_msg.c
Normal file
176
openair2/F1AP/test/f1ap_types/dl_rrc_msg.c
Normal file
@@ -0,0 +1,176 @@
|
||||
#include "dl_rrc_msg.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
void free_dl_rrc_msg(dl_rrc_msg_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Message Type
|
||||
// Mandatory
|
||||
// 9.3.1.1
|
||||
|
||||
// gNB-CU UE F1AP ID
|
||||
// Mandatory
|
||||
// 9.3.1.4 [0-2^32-1]
|
||||
// uint32_t gnb_cu_ue;
|
||||
|
||||
// gNB-DU UE F1AP ID
|
||||
// Mandatory
|
||||
// 9.3.1.5 [0-2^32-1]
|
||||
// uint32_t gnb_du_ue;
|
||||
|
||||
// old gNB-DU UE F1AP ID
|
||||
// Optional
|
||||
// 9.3.1.5 [0-2^32-1]
|
||||
assert(src->old_gnb_du_ue == NULL && "Not implemented");
|
||||
|
||||
// SRB ID
|
||||
// Mandatory
|
||||
// 9.3.1.7
|
||||
//uint8_t srb_id; // [0-3]
|
||||
|
||||
// Execute Duplication
|
||||
// Optional
|
||||
assert(src->exe_dup == NULL && "Not implemented");
|
||||
|
||||
// RRC-Container
|
||||
// Mandatory
|
||||
// 9.3.1.6
|
||||
// Includes the DL-DCCH-
|
||||
// Message IE as defined
|
||||
// in subclause 6.2 of TS
|
||||
// 38.331 [8]
|
||||
free_byte_array(src->rrc_cntnr);
|
||||
|
||||
// RAT-Frequency Priority Information
|
||||
// Optional
|
||||
// 9.3.1.34
|
||||
assert(src->rat_freq == NULL && "Not implemented");
|
||||
|
||||
// RRC Delivery Status Request
|
||||
// Optional
|
||||
assert(src->rrc_delivery_status_req== NULL && "Not implemented");
|
||||
|
||||
// UE Context not retrievable
|
||||
// Optional
|
||||
assert(src->ue_ctx_not_retriable== NULL && "Not implemented");
|
||||
|
||||
// Redirected RRC message
|
||||
// Optional
|
||||
// 9.3.1.6
|
||||
assert(src->redirected_rrc_msg== NULL && "Not implemented");
|
||||
|
||||
//PLMN Assistance Info for Network Sharing
|
||||
// Optional
|
||||
// 9.3.1.14
|
||||
assert(src->plmn_assis_info_netwrk_shr== NULL && "Not implemented"); // [size(3)]
|
||||
|
||||
// New gNB-CU UE F1AP ID
|
||||
// Optional
|
||||
// 9.3.1.4
|
||||
assert(src->new_gnb_cu_ue== NULL && "Not implemented");
|
||||
|
||||
// Additional RRM Policy Index
|
||||
// Optional
|
||||
// 9.3.1.90
|
||||
assert(src->add_rrm_pol_idx== NULL && "Not implemented"); // bit string of 4
|
||||
|
||||
}
|
||||
|
||||
bool eq_dl_rrc_msg(dl_rrc_msg_t const* m0, dl_rrc_msg_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Message Type
|
||||
// Mandatory
|
||||
// 9.3.1.1
|
||||
|
||||
// gNB-CU UE F1AP ID
|
||||
// Mandatory
|
||||
// 9.3.1.4 [0-2^32-1]
|
||||
if(m0->gnb_cu_ue != m1->gnb_cu_ue)
|
||||
return false;
|
||||
|
||||
// gNB-DU UE F1AP ID
|
||||
// Mandatory
|
||||
// 9.3.1.5 [0-2^32-1]
|
||||
if(m0->gnb_du_ue != m1->gnb_du_ue)
|
||||
return false;
|
||||
|
||||
// old gNB-DU UE F1AP ID
|
||||
// Optional
|
||||
// 9.3.1.5 [0-2^32-1]
|
||||
assert(m0->old_gnb_du_ue == NULL && "Not implemented");
|
||||
assert(m1->old_gnb_du_ue == NULL && "Not implemented");
|
||||
|
||||
// SRB ID
|
||||
// Mandatory
|
||||
// 9.3.1.7
|
||||
assert(m0->srb_id < 4);
|
||||
assert(m1->srb_id < 4);
|
||||
if(m0->srb_id != m1->srb_id)
|
||||
return false;
|
||||
|
||||
// Execute Duplication
|
||||
// Optional
|
||||
assert(m0->exe_dup == NULL && "Not implemented" );
|
||||
assert(m1->exe_dup == NULL && "Not implemented" );
|
||||
|
||||
// RRC-Container
|
||||
// Mandatory
|
||||
// 9.3.1.6
|
||||
// Includes the DL-DCCH-
|
||||
// Message IE as defined
|
||||
// in subclause 6.2 of TS
|
||||
// 38.331 [8]
|
||||
if(eq_byte_array(&m0->rrc_cntnr, &m1->rrc_cntnr) == false)
|
||||
return false;
|
||||
|
||||
// RAT-Frequency Priority Information
|
||||
// Optional
|
||||
// 9.3.1.34
|
||||
assert(m0-> rat_freq== NULL && "Not implemented" );
|
||||
assert(m1-> rat_freq== NULL && "Not implemented" );
|
||||
|
||||
// RRC Delivery Status Request
|
||||
// Optional
|
||||
assert(m0-> rrc_delivery_status_req== NULL && "Not implemented" );
|
||||
assert(m1-> rrc_delivery_status_req== NULL && "Not implemented" );
|
||||
|
||||
// UE Context not retrievable
|
||||
// Optional
|
||||
assert(m0-> ue_ctx_not_retriable== NULL && "Not implemented" );
|
||||
assert(m1-> ue_ctx_not_retriable== NULL && "Not implemented" );
|
||||
|
||||
// Redirected RRC message
|
||||
// Optional
|
||||
// 9.3.1.6
|
||||
assert(m0-> redirected_rrc_msg== NULL && "Not implemented" );
|
||||
assert(m1-> redirected_rrc_msg== NULL && "Not implemented" );
|
||||
|
||||
//PLMN Assistance Info for Network Sharing
|
||||
// Optional
|
||||
// 9.3.1.14
|
||||
assert(m0-> plmn_assis_info_netwrk_shr== NULL && "Not implemented" );
|
||||
assert(m1-> plmn_assis_info_netwrk_shr== NULL && "Not implemented" );
|
||||
|
||||
// New gNB-CU UE F1AP ID
|
||||
// Optional
|
||||
// 9.3.1.4
|
||||
assert(m0-> new_gnb_cu_ue== NULL && "Not implemented" );
|
||||
assert(m1-> new_gnb_cu_ue== NULL && "Not implemented" );
|
||||
|
||||
// Additional RRM Policy Index
|
||||
// Optional
|
||||
// 9.3.1.90
|
||||
assert(m0-> add_rrm_pol_idx== NULL && "Not implemented" );
|
||||
assert(m1-> add_rrm_pol_idx== NULL && "Not implemented" );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
116
openair2/F1AP/test/f1ap_types/dl_rrc_msg.h
Normal file
116
openair2/F1AP/test/f1ap_types/dl_rrc_msg.h
Normal file
@@ -0,0 +1,116 @@
|
||||
#ifndef DL_RRC_MSG_F1AP_H
|
||||
#define DL_RRC_MSG_F1AP_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../byte_array.h"
|
||||
#include "rat_freq_prio_info.h"
|
||||
|
||||
typedef enum{
|
||||
|
||||
TRUE_EXECUTE_DUP_DL_RRC_MSG,
|
||||
|
||||
END_EXECUTE_DUP_DL_RRC_MSG,
|
||||
|
||||
} execute_dup_e;
|
||||
|
||||
typedef enum{
|
||||
|
||||
TRUE_RRC_DELIVERY_STATUS_REQ,
|
||||
|
||||
END_RRC_DELIVERY_STATUS_REQ,
|
||||
|
||||
} rrc_delivery_status_req_e;
|
||||
|
||||
typedef enum{
|
||||
|
||||
TRUE_UE_CTX_NOT_RETRIABLE,
|
||||
|
||||
END_UE_CTX_NOT_RETRIABLE,
|
||||
|
||||
} ue_ctx_not_retriable_e ;
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct{
|
||||
|
||||
// Message Type
|
||||
// Mandatory
|
||||
// 9.3.1.1
|
||||
|
||||
// gNB-CU UE F1AP ID
|
||||
// Mandatory
|
||||
// 9.3.1.4 [0-2^32-1]
|
||||
uint32_t gnb_cu_ue;
|
||||
|
||||
// gNB-DU UE F1AP ID
|
||||
// Mandatory
|
||||
// 9.3.1.5 [0-2^32-1]
|
||||
uint32_t gnb_du_ue;
|
||||
|
||||
// old gNB-DU UE F1AP ID
|
||||
// Optional
|
||||
// 9.3.1.5 [0-2^32-1]
|
||||
uint32_t* old_gnb_du_ue;
|
||||
|
||||
// SRB ID
|
||||
// Mandatory
|
||||
// 9.3.1.7
|
||||
uint8_t srb_id; // [0-3]
|
||||
|
||||
// Execute Duplication
|
||||
// Optional
|
||||
execute_dup_e* exe_dup;
|
||||
|
||||
// RRC-Container
|
||||
// Mandatory
|
||||
// 9.3.1.6
|
||||
// Includes the DL-DCCH-
|
||||
// Message IE as defined
|
||||
// in subclause 6.2 of TS
|
||||
// 38.331 [8]
|
||||
byte_array_t rrc_cntnr;
|
||||
|
||||
// RAT-Frequency Priority Information
|
||||
// Optional
|
||||
// 9.3.1.34
|
||||
rat_freq_prio_info_t* rat_freq;
|
||||
|
||||
// RRC Delivery Status Request
|
||||
// Optional
|
||||
rrc_delivery_status_req_e* rrc_delivery_status_req;
|
||||
|
||||
// UE Context not retrievable
|
||||
// Optional
|
||||
ue_ctx_not_retriable_e* ue_ctx_not_retriable;
|
||||
|
||||
// Redirected RRC message
|
||||
// Optional
|
||||
// 9.3.1.6
|
||||
byte_array_t* redirected_rrc_msg;
|
||||
|
||||
//PLMN Assistance Info for Network Sharing
|
||||
// Optional
|
||||
// 9.3.1.14
|
||||
byte_array_t* plmn_assis_info_netwrk_shr; // [size(3)]
|
||||
|
||||
// New gNB-CU UE F1AP ID
|
||||
// Optional
|
||||
// 9.3.1.4
|
||||
uint32_t* new_gnb_cu_ue;
|
||||
|
||||
// Additional RRM Policy Index
|
||||
// Optional
|
||||
// 9.3.1.90
|
||||
uint32_t* add_rrm_pol_idx; // bit string of 4
|
||||
|
||||
} dl_rrc_msg_t;
|
||||
|
||||
void free_dl_rrc_msg(dl_rrc_msg_t* src);
|
||||
|
||||
bool eq_dl_rrc_msg(dl_rrc_msg_t const* m0, dl_rrc_msg_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
58
openair2/F1AP/test/f1ap_types/dl_up_tnl_info_tbs.c
Normal file
58
openair2/F1AP/test/f1ap_types/dl_up_tnl_info_tbs.c
Normal file
@@ -0,0 +1,58 @@
|
||||
#include "dl_up_tnl_info_tbs.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
static
|
||||
bool eq_bit_string(BIT_STRING_t const* m0, BIT_STRING_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
if(m0->bits_unused != m1->bits_unused)
|
||||
return false;
|
||||
|
||||
if(m0->size != m1->size)
|
||||
return false;
|
||||
|
||||
assert(m0->size < 1024 && "Security check. Is it really greater than 1024?");
|
||||
assert(m1->size < 1024 && "Security check. Is it really greater than 1024?");
|
||||
|
||||
if(memcmp(m0->buf, m1->buf, m0->size) != 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void free_dl_up_trans_layer_info( dl_up_trans_layer_info_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
assert(src->trans_layer_addr.buf != NULL);
|
||||
|
||||
if(src->trans_layer_addr.buf != NULL)
|
||||
free(src->trans_layer_addr.buf );
|
||||
}
|
||||
|
||||
bool eq_dl_up_trans_layer_info( dl_up_trans_layer_info_t const* m0, dl_up_trans_layer_info_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// 9.3.2.1 // [1, 160]
|
||||
assert(m0->trans_layer_addr.size > 0 && m0->trans_layer_addr.size < 161);
|
||||
assert(m1->trans_layer_addr.size > 0 && m1->trans_layer_addr.size < 161);
|
||||
if(eq_bit_string( &m0->trans_layer_addr, &m1->trans_layer_addr) == false)
|
||||
return false;
|
||||
|
||||
if(memcmp(m0->gtp_teid, m1->gtp_teid, 4) != 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
18
openair2/F1AP/test/f1ap_types/dl_up_tnl_info_tbs.h
Normal file
18
openair2/F1AP/test/f1ap_types/dl_up_tnl_info_tbs.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef DL_UP_TRANS_LAYER_INFO_F1AP_MIR_H
|
||||
#define DL_UP_TRANS_LAYER_INFO_F1AP_MIR_H
|
||||
|
||||
#include "../../../../cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/BIT_STRING.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct{
|
||||
// 9.3.2.1
|
||||
BIT_STRING_t trans_layer_addr; // [1, 160]
|
||||
char gtp_teid[4];
|
||||
} dl_up_trans_layer_info_t;
|
||||
|
||||
void free_dl_up_trans_layer_info( dl_up_trans_layer_info_t* src);
|
||||
|
||||
bool eq_dl_up_trans_layer_info( dl_up_trans_layer_info_t const* m0, dl_up_trans_layer_info_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
18
openair2/F1AP/test/f1ap_types/drb_failed_setup_item.h
Normal file
18
openair2/F1AP/test/f1ap_types/drb_failed_setup_item.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef DRB_FAILED_SETUP_ITEM_F1AP_MIR_H
|
||||
#define DRB_FAILED_SETUP_ITEM_F1AP_MIR_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "cause_f1ap.h"
|
||||
|
||||
typedef struct{
|
||||
// Mandatory
|
||||
// 9.3.1.8
|
||||
uint8_t drb_id;// [1,32]
|
||||
|
||||
// Optional
|
||||
// 9.3.1.2
|
||||
cause_f1ap_t* cause;
|
||||
|
||||
} drb_failed_setup_item_t;
|
||||
|
||||
#endif
|
||||
75
openair2/F1AP/test/f1ap_types/drb_info.c
Normal file
75
openair2/F1AP/test/f1ap_types/drb_info.c
Normal file
@@ -0,0 +1,75 @@
|
||||
#include "drb_info.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_drb_info(drb_info_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Mandatory
|
||||
// DRB QoS 9.3.1.45
|
||||
free_qos_flow_level_qos_parameter(&src->drb_qos);
|
||||
|
||||
// Mandatory
|
||||
// S-NSSAI 9.3.1.38
|
||||
free_s_nssai(&src->nssai);
|
||||
|
||||
// Optional
|
||||
// Notification Control 9.3.1.56
|
||||
if(src->notification_ctrl != NULL)
|
||||
free(src->notification_ctrl);
|
||||
|
||||
// Flows Mapped to DRB
|
||||
assert(src->sz_flows_mapped_to_drb < 65);
|
||||
for(size_t i = 0; i < src->sz_flows_mapped_to_drb; ++i){
|
||||
free_flows_mapped_to_drb(&src->flows_mapped_to_drb[i]);
|
||||
}
|
||||
if(src->flows_mapped_to_drb != NULL){
|
||||
free(src->flows_mapped_to_drb);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool eq_drb_info(drb_info_t const* m0, drb_info_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// DRB QoS 9.3.1.45
|
||||
if(eq_qos_flow_level_qos_parameter(&m0->drb_qos, &m1->drb_qos) == false)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// S-NSSAI 9.3.1.38
|
||||
if(eq_s_nssai(&m0->nssai, &m1->nssai) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Notification Control 9.3.1.56
|
||||
if(m0->notification_ctrl != m1->notification_ctrl){
|
||||
if(m0->notification_ctrl == NULL || m1->notification_ctrl == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->notification_ctrl != *m1->notification_ctrl)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Flows Mapped to DRB
|
||||
assert(m0->sz_flows_mapped_to_drb < 65);
|
||||
assert(m1->sz_flows_mapped_to_drb < 65);
|
||||
if(m0->sz_flows_mapped_to_drb != m1->sz_flows_mapped_to_drb)
|
||||
return false;
|
||||
|
||||
for(size_t i = 0; i < m0->sz_flows_mapped_to_drb; ++i){
|
||||
if(eq_flows_mapped_to_drb(&m0->flows_mapped_to_drb[i], &m1->flows_mapped_to_drb[i]) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
44
openair2/F1AP/test/f1ap_types/drb_info.h
Normal file
44
openair2/F1AP/test/f1ap_types/drb_info.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#ifndef DATA_RADIO_BEARER_INFORMATION_MIR_H
|
||||
#define DATA_RADIO_BEARER_INFORMATION_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "flows_mapped_to_drb.h"
|
||||
#include "qos_flow_level_qos_parameter.h"
|
||||
#include "s_nssai.h"
|
||||
|
||||
typedef enum{
|
||||
|
||||
ACTIVE_NOTIFICATION_CTRL,
|
||||
NOT_ACTIVE_NOTIFICATION_CTRL,
|
||||
|
||||
END_NOTIFICATION_CTRL
|
||||
|
||||
} notification_ctrl_e;
|
||||
|
||||
typedef struct{
|
||||
// Mandatory
|
||||
// DRB QoS 9.3.1.45
|
||||
qos_flow_level_qos_parameter_t drb_qos;
|
||||
|
||||
// Mandatory
|
||||
// S-NSSAI 9.3.1.38
|
||||
s_nssai_t nssai;
|
||||
|
||||
// Optional
|
||||
// Notification Control 9.3.1.56
|
||||
notification_ctrl_e* notification_ctrl;
|
||||
|
||||
// Flows Mapped to DRB
|
||||
size_t sz_flows_mapped_to_drb; // [0,64]
|
||||
flows_mapped_to_drb_t* flows_mapped_to_drb;
|
||||
|
||||
|
||||
} drb_info_t;
|
||||
|
||||
void free_drb_info(drb_info_t* src);
|
||||
|
||||
bool eq_drb_info(drb_info_t const* m0, drb_info_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
9
openair2/F1AP/test/f1ap_types/drb_mod.h
Normal file
9
openair2/F1AP/test/f1ap_types/drb_mod.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef DRB_MODIFIED_F1AP_H
|
||||
#define DRB_MODIFIED_F1AP_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
} drb_mod_t;
|
||||
|
||||
#endif
|
||||
|
||||
91
openair2/F1AP/test/f1ap_types/drb_setup_item.c
Normal file
91
openair2/F1AP/test/f1ap_types/drb_setup_item.c
Normal file
@@ -0,0 +1,91 @@
|
||||
#include "drb_setup_item.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_drb_setup_item_f1ap(drb_setup_item_f1ap_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Mandatory
|
||||
// DRB ID 9.3.1.8
|
||||
// uint8_t drb_id; // [1,32]
|
||||
|
||||
// Optional
|
||||
// LCID 9.3.1.35
|
||||
if(src->lc_id != NULL)
|
||||
free(src->lc_id);
|
||||
|
||||
// DL UP TNL Information to be setup
|
||||
for(size_t i = 0; i < src->sz_dl_up_tnl_info_tbs; ++i)
|
||||
free_dl_up_trans_layer_info(&src->dl_up_tnl_info_tbs[i]);
|
||||
|
||||
if(src->dl_up_tnl_info_tbs != NULL)
|
||||
free(src->dl_up_tnl_info_tbs);
|
||||
|
||||
// Additional PDCP Duplication TNL List [0,1] 9.3.2.1
|
||||
assert(src->add_pdcp_dup_tnl_lst == NULL && "Not implemented");
|
||||
|
||||
// Optional
|
||||
// Current QoS Parameters Set Index 9.3.1.123 [1,8]
|
||||
if(src->cur_qos_par_set_idx != NULL)
|
||||
free(src->cur_qos_par_set_idx);
|
||||
}
|
||||
|
||||
|
||||
bool eq_drb_setup_item_f1ap(drb_setup_item_f1ap_t const* m0, drb_setup_item_f1ap_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// DRB ID 9.3.1.8 // [1,32]
|
||||
assert(m0->drb_id > 0 && m0->drb_id < 33);
|
||||
assert(m1->drb_id > 0 && m1->drb_id < 33);
|
||||
if(m0->drb_id != m1->drb_id)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// LCID 9.3.1.35 // [1, 32]
|
||||
if((m0->lc_id != NULL && m1->lc_id == NULL) || (m0->lc_id != NULL && m1->lc_id == NULL)){
|
||||
return false;
|
||||
} else if(m0->lc_id != NULL && m1->lc_id != NULL){
|
||||
assert(*m0->lc_id > 0 && *m0->lc_id < 33);
|
||||
assert(*m1->lc_id > 0 && *m1->lc_id < 33);
|
||||
|
||||
if(*m0->lc_id != *m1->lc_id)
|
||||
return false;
|
||||
} // else m0->lc_id == NULL && m1->lc_id == NULL
|
||||
|
||||
// DL UP TNL Information to be setup // [1, 2]
|
||||
assert(m0->sz_dl_up_tnl_info_tbs == 1 || m0->sz_dl_up_tnl_info_tbs == 2);
|
||||
assert(m1->sz_dl_up_tnl_info_tbs == 1 || m1->sz_dl_up_tnl_info_tbs == 2);
|
||||
if(m0->sz_dl_up_tnl_info_tbs != m1->sz_dl_up_tnl_info_tbs)
|
||||
return false;
|
||||
|
||||
for(size_t i = 0; i < m0->sz_dl_up_tnl_info_tbs; ++i){
|
||||
if(eq_dl_up_trans_layer_info(&m0->dl_up_tnl_info_tbs[i], &m1->dl_up_tnl_info_tbs[i]) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Additional PDCP Duplication TNL List [0,1] 9.3.2.1
|
||||
assert(m0->add_pdcp_dup_tnl_lst == NULL && "Not implemented" );
|
||||
assert(m1->add_pdcp_dup_tnl_lst == NULL && "Not implemented" );
|
||||
|
||||
// Optional
|
||||
// Current QoS Parameters Set Index 9.3.1.123 [1,8]
|
||||
if((m0->cur_qos_par_set_idx != NULL && m1->cur_qos_par_set_idx == NULL) && (m0->cur_qos_par_set_idx == NULL && m1->cur_qos_par_set_idx != NULL)){
|
||||
return false;
|
||||
} else if(m0->cur_qos_par_set_idx != NULL && m1->cur_qos_par_set_idx != NULL){
|
||||
assert(*m0->cur_qos_par_set_idx > 0 && *m0->cur_qos_par_set_idx < 9);
|
||||
assert(*m1->cur_qos_par_set_idx > 0 && *m1->cur_qos_par_set_idx < 9);
|
||||
if(*m0->cur_qos_par_set_idx != *m1->cur_qos_par_set_idx)
|
||||
return false;
|
||||
} // else m0->cur_qos_par_set_idx == NULL && m1->cur_qos_par_set_idx == NULL
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
39
openair2/F1AP/test/f1ap_types/drb_setup_item.h
Normal file
39
openair2/F1AP/test/f1ap_types/drb_setup_item.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef DRB_SETUP_ITEM_F1AP_MIR_H
|
||||
#define DRB_SETUP_ITEM_F1AP_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "dl_up_tnl_info_tbs.h"
|
||||
#include "up_trans_layer_info.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
// Mandatory
|
||||
// DRB ID 9.3.1.8
|
||||
uint8_t drb_id; // [1,32]
|
||||
|
||||
// Optional
|
||||
// LCID 9.3.1.35
|
||||
uint8_t* lc_id; // [1, 32]
|
||||
|
||||
// DL UP TNL Information to be setup
|
||||
size_t sz_dl_up_tnl_info_tbs; // [1, 2]
|
||||
dl_up_trans_layer_info_t* dl_up_tnl_info_tbs;
|
||||
|
||||
// Additional PDCP Duplication TNL List [0,1] 9.3.2.1
|
||||
up_trans_layer_info_t* add_pdcp_dup_tnl_lst;
|
||||
|
||||
// Optional
|
||||
// Current QoS Parameters Set Index 9.3.1.123 [1,8]
|
||||
uint8_t* cur_qos_par_set_idx;
|
||||
|
||||
} drb_setup_item_f1ap_t;
|
||||
|
||||
void free_drb_setup_item_f1ap( drb_setup_item_f1ap_t* src);
|
||||
|
||||
bool eq_drb_setup_item_f1ap(drb_setup_item_f1ap_t const* m0, drb_setup_item_f1ap_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
10
openair2/F1AP/test/f1ap_types/drb_to_be_mod.h
Normal file
10
openair2/F1AP/test/f1ap_types/drb_to_be_mod.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef DRB_TO_BE_MODIFIED_F1AP_H
|
||||
#define DRB_TO_BE_MODIFIED_F1AP_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
|
||||
|
||||
} drb_to_be_mod_t;
|
||||
|
||||
#endif
|
||||
11
openair2/F1AP/test/f1ap_types/drb_to_be_rel.h
Normal file
11
openair2/F1AP/test/f1ap_types/drb_to_be_rel.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef DRB_TO_BE_RELEASED_F1AP_H
|
||||
#define DRB_TO_BE_RELEASED_F1AP_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
|
||||
|
||||
} drb_to_be_rel_t;
|
||||
|
||||
#endif
|
||||
|
||||
211
openair2/F1AP/test/f1ap_types/drb_to_be_setup.c
Normal file
211
openair2/F1AP/test/f1ap_types/drb_to_be_setup.c
Normal file
@@ -0,0 +1,211 @@
|
||||
#include "drb_to_be_setup.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_drb_to_be_setup(drb_to_be_setup_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Mandatory
|
||||
// DRB ID 9.3.1.8
|
||||
assert(src->drb_id < 33); // INTEGER [0,32]
|
||||
|
||||
assert(src->qos_info < END_QOS_INFORMATION);
|
||||
|
||||
if(src->qos_info == E_UTRAN_QOS_INFORMATION){
|
||||
free_e_utran_qos(&src->e_utran_qos);
|
||||
} else if (src->qos_info == DRB_INFO_QOS_INFORMATION) {
|
||||
free_drb_info(&src->drb_info);
|
||||
} else {
|
||||
assert(0!=0 && "Unknown type");
|
||||
}
|
||||
|
||||
// UL UP TNL Information to be setup List
|
||||
assert(src->sz_ul_up_tnl_info_lst > 0 && src->sz_ul_up_tnl_info_lst < 3); // [1, 2]
|
||||
for(size_t i = 0; i < src->sz_ul_up_tnl_info_lst; ++i){
|
||||
free_ul_up_tnl_info_lst(&src->ul_up_tnl_info[i]);
|
||||
}
|
||||
if(src->ul_up_tnl_info != NULL)
|
||||
free(src->ul_up_tnl_info);
|
||||
|
||||
// Mandatory
|
||||
// RLC Mode 9.3.1.27
|
||||
// rlc_mode_f1ap_e rlc_mode;
|
||||
|
||||
// Optional
|
||||
// UL Configuration 9.3.1.31
|
||||
if(src->ul_conf != NULL)
|
||||
free(src->ul_conf);
|
||||
|
||||
// Optional
|
||||
// Duplication Activation 9.3.1.36
|
||||
if(src->dup_act != NULL)
|
||||
free(src->dup_act);
|
||||
// duplication_act_f1ap_e* dup_act;
|
||||
|
||||
// Optional
|
||||
// DC Based Duplication Configured
|
||||
if(src->dc_dup_act_conf != NULL )
|
||||
free(src-> dc_dup_act_conf);
|
||||
// bool* dc_dup_act_conf;
|
||||
|
||||
// Optional
|
||||
// DC Based Duplication Activation 9.3.1.36
|
||||
if(src->dc_dup_act != NULL)
|
||||
free(src->dc_dup_act);
|
||||
// duplication_act_f1ap_e* dc_dup_act;
|
||||
|
||||
// Mandatory
|
||||
// DL PDCP SN length
|
||||
// pdcp_sn_len_e dl_pdcp_sn_len;
|
||||
|
||||
// Optional
|
||||
// UL PDCP SN length
|
||||
if(src->ul_pdcp_sn_len != NULL)
|
||||
free(src->ul_pdcp_sn_len);
|
||||
// pdcp_sn_len_e* ul_pdcp_sn_len;
|
||||
|
||||
// Additional PDCP Duplication TNL List
|
||||
for(size_t i = 0; src->sz_add_pdcp_dup_tnl ; ++i){
|
||||
free_add_pdcp_dup_tnl(&src->add_pdcp_dup_tnl[i]);
|
||||
}
|
||||
if(src->add_pdcp_dup_tnl != NULL){
|
||||
free(src->add_pdcp_dup_tnl);
|
||||
}
|
||||
|
||||
// Optional
|
||||
// RLC Duplication Information 9.3.1.146
|
||||
assert(src->sz_rlc_dup_info == 0 && "Not implemented ");
|
||||
assert(src-> rlc_dup_info == NULL && "Not implemented");
|
||||
|
||||
}
|
||||
|
||||
bool eq_drb_to_be_setup(drb_to_be_setup_t const* m0, drb_to_be_setup_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// DRB ID 9.3.1.8
|
||||
assert(m0->drb_id < 33); // INTEGER [0,32]
|
||||
assert(m1->drb_id < 33); // INTEGER [0,32]
|
||||
if(m0->drb_id != m1->drb_id)
|
||||
return false;
|
||||
|
||||
assert(m0->qos_info < END_QOS_INFORMATION);
|
||||
assert(m1->qos_info < END_QOS_INFORMATION);
|
||||
if(m0->qos_info != m1->qos_info)
|
||||
return false;
|
||||
|
||||
if(m0->qos_info == E_UTRAN_QOS_INFORMATION){
|
||||
if(eq_e_utran_qos(&m0->e_utran_qos, &m1->e_utran_qos) == false)
|
||||
return false;
|
||||
} else if (m0->qos_info == DRB_INFO_QOS_INFORMATION) {
|
||||
|
||||
if(eq_drb_info(&m0->drb_info, &m1->drb_info) == false)
|
||||
return false;
|
||||
|
||||
} else {
|
||||
assert(0!=0 && "Unknown type");
|
||||
}
|
||||
|
||||
// UL UP TNL Information to be setup List
|
||||
if(m0->sz_ul_up_tnl_info_lst != m1->sz_ul_up_tnl_info_lst)
|
||||
return false;
|
||||
|
||||
for(size_t i = 0; i < m0->sz_ul_up_tnl_info_lst; ++i){
|
||||
if(eq_ul_up_tnl_info_lst(&m0->ul_up_tnl_info[i], &m1->ul_up_tnl_info[i] ) == false){
|
||||
assert(0!=0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Mandatory
|
||||
// RLC Mode 9.3.1.27
|
||||
if(m0->rlc_mode != m1->rlc_mode)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// UL Configuration 9.3.1.31
|
||||
if(m0->ul_conf != m1->ul_conf){
|
||||
if(m0->ul_conf == NULL || m1->ul_conf == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->ul_conf != *m1->ul_conf)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// Duplication Activation 9.3.1.36
|
||||
// duplication_act_f1ap_e* dup_act;
|
||||
if(m0->dup_act != m1->dup_act ){
|
||||
if(m0->dup_act == NULL || m1->dup_act == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->dup_act != *m1->dup_act )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// DC Based Duplication Configured
|
||||
// bool* dc_dup_act_conf;
|
||||
if(m0->dc_dup_act_conf != m1->dc_dup_act_conf ){
|
||||
if(m0->dc_dup_act_conf == NULL || m1->dc_dup_act_conf == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->dc_dup_act_conf != *m1->dc_dup_act_conf )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// DC Based Duplication Activation 9.3.1.36
|
||||
// duplication_act_f1ap_e* dc_dup_act;
|
||||
if(m0->dc_dup_act != m1->dc_dup_act ){
|
||||
if(m0->dc_dup_act == NULL || m1->dc_dup_act == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->dc_dup_act != *m1->dc_dup_act )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Mandatory
|
||||
// DL PDCP SN length
|
||||
// pdcp_sn_len_e dl_pdcp_sn_len;
|
||||
if(m0->dl_pdcp_sn_len != m1->dl_pdcp_sn_len)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// UL PDCP SN length
|
||||
// pdcp_sn_len_e* ul_pdcp_sn_len;
|
||||
if(m0->ul_pdcp_sn_len != m1->ul_pdcp_sn_len ){
|
||||
if(m0->ul_pdcp_sn_len == NULL || m1->ul_pdcp_sn_len == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->ul_pdcp_sn_len != *m1->ul_pdcp_sn_len )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Additional PDCP Duplication TNL List
|
||||
if(m0->sz_add_pdcp_dup_tnl != m1->sz_add_pdcp_dup_tnl)
|
||||
return false;
|
||||
|
||||
for(size_t i = 0; i < m0->sz_add_pdcp_dup_tnl; ++i){
|
||||
if(eq_add_pdcp_dup_tnl(&m0->add_pdcp_dup_tnl[i], &m1->add_pdcp_dup_tnl[i]) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// RLC Duplication Information 9.3.1.146
|
||||
assert(m0->sz_rlc_dup_info == 0 && "Not implemented ");
|
||||
assert(m0->rlc_dup_info == NULL && "Not implemented");
|
||||
|
||||
assert(m1->sz_rlc_dup_info == 0 && "Not implemented ");
|
||||
assert(m1->rlc_dup_info == NULL && "Not implemented");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
88
openair2/F1AP/test/f1ap_types/drb_to_be_setup.h
Normal file
88
openair2/F1AP/test/f1ap_types/drb_to_be_setup.h
Normal file
@@ -0,0 +1,88 @@
|
||||
#ifndef DRB_TO_BE_SETUP_MIR_H
|
||||
#define DRB_TO_BE_SETUP_MIR_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "add_pdcp_dup_tnl.h"
|
||||
#include "duplication_act_f1ap.h"
|
||||
#include "e_utran_qos.h"
|
||||
#include "drb_info.h"
|
||||
#include "ul_up_tnl_info_lst.h"
|
||||
#include "ul_conf_f1ap.h"
|
||||
#include "rlc_mode_f1ap.h"
|
||||
#include "rlc_dup_info.h"
|
||||
#include "pdcp_sn_len.h"
|
||||
|
||||
|
||||
typedef enum{
|
||||
|
||||
E_UTRAN_QOS_INFORMATION = 0,
|
||||
DRB_INFO_QOS_INFORMATION,
|
||||
|
||||
END_QOS_INFORMATION
|
||||
|
||||
} qos_information_e;
|
||||
|
||||
typedef struct{
|
||||
|
||||
// Mandatory
|
||||
// DRB ID 9.3.1.8
|
||||
uint8_t drb_id; // INTEGER [0,32]
|
||||
|
||||
qos_information_e qos_info;
|
||||
|
||||
// Mandatory
|
||||
union{
|
||||
e_utran_qos_t e_utran_qos;
|
||||
drb_info_t drb_info;
|
||||
};
|
||||
|
||||
// UL UP TNL Information to be setup List
|
||||
size_t sz_ul_up_tnl_info_lst; // [1, 2]
|
||||
ul_up_tnl_info_lst_t* ul_up_tnl_info;
|
||||
|
||||
// Mandatory
|
||||
// RLC Mode 9.3.1.27
|
||||
rlc_mode_f1ap_e rlc_mode;
|
||||
|
||||
// Optional
|
||||
// UL Configuration 9.3.1.31
|
||||
ul_conf_f1ap_e* ul_conf;
|
||||
|
||||
// Optional
|
||||
// Duplication Activation 9.3.1.36
|
||||
duplication_act_f1ap_e* dup_act;
|
||||
|
||||
// Optional
|
||||
// DC Based Duplication Configured
|
||||
bool* dc_dup_act_conf;
|
||||
|
||||
// Optional
|
||||
// DC Based Duplication Activation 9.3.1.36
|
||||
duplication_act_f1ap_e* dc_dup_act;
|
||||
|
||||
// Mandatory
|
||||
// DL PDCP SN length
|
||||
pdcp_sn_len_e dl_pdcp_sn_len;
|
||||
|
||||
// Optional
|
||||
// UL PDCP SN length
|
||||
pdcp_sn_len_e* ul_pdcp_sn_len;
|
||||
|
||||
// Additional PDCP Duplication TNL List
|
||||
size_t sz_add_pdcp_dup_tnl; // [0,2]
|
||||
add_pdcp_dup_tnl_t* add_pdcp_dup_tnl;
|
||||
|
||||
// Optional
|
||||
// RLC Duplication Information 9.3.1.146
|
||||
size_t sz_rlc_dup_info; // [0,3]
|
||||
rlc_dup_info_t* rlc_dup_info;
|
||||
|
||||
} drb_to_be_setup_t;
|
||||
|
||||
void free_drb_to_be_setup(drb_to_be_setup_t* src);
|
||||
|
||||
bool eq_drb_to_be_setup(drb_to_be_setup_t const* m0, drb_to_be_setup_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
61
openair2/F1AP/test/f1ap_types/drx_cycle.c
Normal file
61
openair2/F1AP/test/f1ap_types/drx_cycle.c
Normal file
@@ -0,0 +1,61 @@
|
||||
#include "drx_cycle.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_drx_cycle(drx_cycle_t * src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Mandatory
|
||||
// Long DRX Cycle Length
|
||||
//long_drx_cycle_len_e long_drx_cycle_len;
|
||||
|
||||
// Optional
|
||||
// Short DRX Cycle Length
|
||||
if(src->short_drx_cycle_len != NULL)
|
||||
free(src->short_drx_cycle_len);
|
||||
|
||||
// Optional
|
||||
// Short DRX Cycle Timer INTEGER (1..16)
|
||||
if(src-> short_drx_cycle_timer != NULL)
|
||||
free(src->short_drx_cycle_timer );
|
||||
}
|
||||
|
||||
bool eq_drx_cycle(drx_cycle_t const* m0, drx_cycle_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// Long DRX Cycle Length
|
||||
if(m0->long_drx_cycle_len != m1->long_drx_cycle_len)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Short DRX Cycle Length
|
||||
if(m0->short_drx_cycle_len != m1->short_drx_cycle_len){
|
||||
if(m0->short_drx_cycle_len == NULL || m1->short_drx_cycle_len == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->short_drx_cycle_len != *m1->short_drx_cycle_len)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// Short DRX Cycle Timer INTEGER (1..16)
|
||||
if(m0->short_drx_cycle_timer != m1->short_drx_cycle_timer){
|
||||
if(m0->short_drx_cycle_timer == NULL || m1->short_drx_cycle_timer == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->short_drx_cycle_timer != *m1->short_drx_cycle_timer)
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
31
openair2/F1AP/test/f1ap_types/drx_cycle.h
Normal file
31
openair2/F1AP/test/f1ap_types/drx_cycle.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef DRX_CYCLE_F1AP_MIR_H
|
||||
#define DRX_CYCLE_F1AP_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "long_drx_cycle_len.h"
|
||||
#include "short_drx_cycle_len.h"
|
||||
|
||||
// 9.3.1.24
|
||||
typedef struct{
|
||||
// Mandatory
|
||||
// Long DRX Cycle Length
|
||||
long_drx_cycle_len_e long_drx_cycle_len;
|
||||
|
||||
// Optional
|
||||
// Short DRX Cycle Length
|
||||
short_drx_cycle_len_e* short_drx_cycle_len;
|
||||
|
||||
// Optional
|
||||
// Short DRX Cycle Timer INTEGER (1..16)
|
||||
uint8_t* short_drx_cycle_timer;
|
||||
|
||||
} drx_cycle_t;
|
||||
|
||||
void free_drx_cycle(drx_cycle_t * src);
|
||||
|
||||
bool eq_drx_cycle(drx_cycle_t const* m0, drx_cycle_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
196
openair2/F1AP/test/f1ap_types/du_to_cu_rrc_information_f1ap.c
Normal file
196
openair2/F1AP/test/f1ap_types/du_to_cu_rrc_information_f1ap.c
Normal file
@@ -0,0 +1,196 @@
|
||||
#include "du_to_cu_rrc_information_f1ap.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
static
|
||||
void free_ba_if_not_null(byte_array_t* ba)
|
||||
{
|
||||
if(ba != NULL){
|
||||
free_byte_array(*ba);
|
||||
free(ba);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void free_du_to_cu_rrc_information_f1ap(du_to_cu_rrc_information_f1ap_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Mandatory
|
||||
// CellGroupConfig
|
||||
free_byte_array(src->cell_group_config);
|
||||
|
||||
// Optional
|
||||
// MeasGapConfig
|
||||
free_ba_if_not_null(src->meas_gap_info);
|
||||
|
||||
// Optional
|
||||
// Requested P-MaxFR1
|
||||
free_ba_if_not_null(src->req_p_max_fr1);
|
||||
|
||||
// Optional
|
||||
// DRX Long Cycle Start Offset
|
||||
if(src->drx_lng_cyc_str_off != NULL) // [0..10239]
|
||||
free(src->drx_lng_cyc_str_off);
|
||||
|
||||
// Optional
|
||||
// Selected BandCombinationIndex
|
||||
free_ba_if_not_null(src->bnd_comb_idx);
|
||||
|
||||
// Optional
|
||||
// Selected FeatureSetEntryIndex
|
||||
free_ba_if_not_null(src->sel_feature_set_entry_idx);
|
||||
|
||||
// Optional
|
||||
// Ph-InfoSCG
|
||||
free_ba_if_not_null(src->ph_info_scg);
|
||||
|
||||
// Optional
|
||||
// Requested BandCombinationIndex
|
||||
free_ba_if_not_null(src->req_bnd_cmb_idx);
|
||||
|
||||
// Optional
|
||||
// Requested FeatureSetEntryIndex
|
||||
free_ba_if_not_null(src->req_feat_set_entry_idx);
|
||||
|
||||
// Optional
|
||||
// DRX Config
|
||||
free_ba_if_not_null(src->drx_cnfg);
|
||||
|
||||
// Optional
|
||||
// PDCCH BlindDetectionSCG
|
||||
free_ba_if_not_null(src->pdcch_blind_det_scg);
|
||||
|
||||
// Optional
|
||||
// Requested PDCCH BlindDetectionSCG
|
||||
free_ba_if_not_null(src->req_pdcch_blnd_det_scg);
|
||||
|
||||
// Optional
|
||||
// Ph-InfoMCG
|
||||
free_ba_if_not_null(src->ph_info_mcg);
|
||||
|
||||
// Optional
|
||||
// MeasGapSharingConfig
|
||||
free_ba_if_not_null(src->meas_gap_shr_conf);
|
||||
|
||||
// Optional
|
||||
// SL-PHY-MAC-RLC-Config
|
||||
free_ba_if_not_null(src->sl_phy_mac_rlc_conf);
|
||||
|
||||
// Optional
|
||||
// SL-ConfigDedicatedEUTRA-Info
|
||||
free_ba_if_not_null(src->sl_conf_dedica_eutra_info);
|
||||
|
||||
// Optional
|
||||
// Requested P-MaxFR2
|
||||
free_ba_if_not_null(src->req_p_max_fr2);
|
||||
|
||||
}
|
||||
|
||||
bool eq_du_to_cu_rrc_information_f1ap(du_to_cu_rrc_information_f1ap_t const* m0, du_to_cu_rrc_information_f1ap_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// CellGroupConfig
|
||||
if(eq_byte_array(&m0->cell_group_config, &m1->cell_group_config) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// MeasGapConfig
|
||||
if(eq_byte_array(m0->meas_gap_info, m1->meas_gap_info ) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Requested P-MaxFR1
|
||||
if(eq_byte_array(m0->req_p_max_fr1, m1->req_p_max_fr1) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// DRX Long Cycle Start Offset // [0..10239]
|
||||
if( (m0->drx_lng_cyc_str_off == NULL && m1->drx_lng_cyc_str_off != NULL) || (m0->drx_lng_cyc_str_off != NULL && m1->drx_lng_cyc_str_off == NULL) ) {
|
||||
return false;
|
||||
} else if(m0->drx_lng_cyc_str_off != NULL && m1->drx_lng_cyc_str_off != NULL) {
|
||||
assert(*m0->drx_lng_cyc_str_off < 10240);
|
||||
assert(*m1->drx_lng_cyc_str_off < 10240);
|
||||
|
||||
if(*m0->drx_lng_cyc_str_off != *m1->drx_lng_cyc_str_off)
|
||||
return false;
|
||||
|
||||
} // else m0 == NULL && m1 == NULL
|
||||
|
||||
// Optional
|
||||
// Selected BandCombinationIndex
|
||||
if(eq_byte_array(m0-> bnd_comb_idx , m1-> bnd_comb_idx ) == false )
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Selected FeatureSetEntryIndex
|
||||
if(eq_byte_array(m0->sel_feature_set_entry_idx, m1->sel_feature_set_entry_idx) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Ph-InfoSCG
|
||||
if(eq_byte_array(m0->ph_info_scg , m1->ph_info_scg ) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Requested BandCombinationIndex
|
||||
if(eq_byte_array(m0->req_bnd_cmb_idx, m1->req_bnd_cmb_idx) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Requested FeatureSetEntryIndex
|
||||
if(eq_byte_array(m0-> req_feat_set_entry_idx , m1-> req_feat_set_entry_idx ) == false )
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// DRX Config
|
||||
if(eq_byte_array(m0-> drx_cnfg , m1-> drx_cnfg ) == false )
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// PDCCH BlindDetectionSCG
|
||||
if(eq_byte_array(m0->pdcch_blind_det_scg , m1->pdcch_blind_det_scg ) == false )
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Requested PDCCH BlindDetectionSCG
|
||||
if(eq_byte_array(m0-> req_pdcch_blnd_det_scg , m1-> req_pdcch_blnd_det_scg ) == false )
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Ph-InfoMCG
|
||||
if(eq_byte_array(m0->ph_info_mcg , m1->ph_info_mcg ) == false )
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// MeasGapSharingConfig
|
||||
if(eq_byte_array(m0->meas_gap_shr_conf , m1->meas_gap_shr_conf ) == false )
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// SL-PHY-MAC-RLC-Config
|
||||
if(eq_byte_array(m0-> sl_phy_mac_rlc_conf , m1-> sl_phy_mac_rlc_conf ) == false )
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// SL-ConfigDedicatedEUTRA-Info
|
||||
if(eq_byte_array(m0->sl_conf_dedica_eutra_info , m1->sl_conf_dedica_eutra_info ) == false )
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Requested P-MaxFR2
|
||||
if(eq_byte_array(m0->req_p_max_fr2 , m1->req_p_max_fr2) == false )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
#ifndef DU_TO_CU_RRC_INFORMATION_F1AP_MIR_H
|
||||
#define DU_TO_CU_RRC_INFORMATION_F1AP_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "../byte_array.h"
|
||||
|
||||
typedef struct{
|
||||
|
||||
// Mandatory
|
||||
// CellGroupConfig
|
||||
byte_array_t cell_group_config;
|
||||
|
||||
// Optional
|
||||
// MeasGapConfig
|
||||
byte_array_t* meas_gap_info;
|
||||
|
||||
// Optional
|
||||
// Requested P-MaxFR1
|
||||
byte_array_t* req_p_max_fr1;
|
||||
|
||||
// Optional
|
||||
// DRX Long Cycle Start Offset
|
||||
uint32_t* drx_lng_cyc_str_off; // [0..10239]
|
||||
|
||||
// Optional
|
||||
// Selected BandCombinationIndex
|
||||
byte_array_t* bnd_comb_idx;
|
||||
|
||||
// Optional
|
||||
// Selected FeatureSetEntryIndex
|
||||
byte_array_t* sel_feature_set_entry_idx;
|
||||
|
||||
// Optional
|
||||
// Ph-InfoSCG
|
||||
byte_array_t* ph_info_scg;
|
||||
|
||||
// Optional
|
||||
// Requested BandCombinationIndex
|
||||
byte_array_t* req_bnd_cmb_idx;
|
||||
|
||||
// Optional
|
||||
// Requested FeatureSetEntryIndex
|
||||
byte_array_t* req_feat_set_entry_idx;
|
||||
|
||||
// Optional
|
||||
// DRX Config
|
||||
byte_array_t* drx_cnfg;
|
||||
|
||||
// Optional
|
||||
// PDCCH BlindDetectionSCG
|
||||
byte_array_t* pdcch_blind_det_scg;
|
||||
|
||||
// Optional
|
||||
// Requested PDCCH BlindDetectionSCG
|
||||
byte_array_t* req_pdcch_blnd_det_scg;
|
||||
|
||||
// Optional
|
||||
// Ph-InfoMCG
|
||||
byte_array_t* ph_info_mcg;
|
||||
|
||||
// Optional
|
||||
// MeasGapSharingConfig
|
||||
byte_array_t* meas_gap_shr_conf;
|
||||
|
||||
// Optional
|
||||
// SL-PHY-MAC-RLC-Config
|
||||
byte_array_t* sl_phy_mac_rlc_conf;
|
||||
|
||||
// Optional
|
||||
// SL-ConfigDedicatedEUTRA-Info
|
||||
byte_array_t* sl_conf_dedica_eutra_info;
|
||||
|
||||
// Optional
|
||||
// Requested P-MaxFR2
|
||||
byte_array_t* req_p_max_fr2;
|
||||
|
||||
} du_to_cu_rrc_information_f1ap_t;
|
||||
|
||||
void free_du_to_cu_rrc_information_f1ap(du_to_cu_rrc_information_f1ap_t* src);
|
||||
|
||||
bool eq_du_to_cu_rrc_information_f1ap(du_to_cu_rrc_information_f1ap_t const* m0, du_to_cu_rrc_information_f1ap_t const* m1);
|
||||
|
||||
#endif
|
||||
14
openair2/F1AP/test/f1ap_types/duplication_act_f1ap.h
Normal file
14
openair2/F1AP/test/f1ap_types/duplication_act_f1ap.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef DUPLICATION_ACTIVATION_F1AP_MIR_H
|
||||
#define DUPLICATION_ACTIVATION_F1AP_MIR_H
|
||||
|
||||
// 9.3.1.36
|
||||
typedef enum{
|
||||
|
||||
ACTIVE_DUPLICATION_ACT_F1AP,
|
||||
INACTIVE_DUPLICATION_ACT_F1AP,
|
||||
END_DUPLICATION_ACT_F1AP
|
||||
|
||||
} duplication_act_f1ap_e;
|
||||
|
||||
#endif
|
||||
|
||||
174
openair2/F1AP/test/f1ap_types/dyn_5qi_descriptor.c
Normal file
174
openair2/F1AP/test/f1ap_types/dyn_5qi_descriptor.c
Normal file
@@ -0,0 +1,174 @@
|
||||
#include "dyn_5qi_descriptor.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_dyn_5qi_descriptor(dyn_5qi_descriptor_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
//Mandatory
|
||||
//QoS Priority Level
|
||||
assert(src->qos_prio_level > 0 && src->qos_prio_level < 128);
|
||||
|
||||
// Mandatory
|
||||
//Packet Delay Budget 9.3.1.51
|
||||
assert(src->pkt_delay_budget < 1024);// INTEGER (0..1023, ...)
|
||||
|
||||
// Mandatory
|
||||
// Packet Error Rate 9.3.1.52
|
||||
//pkt_error_rate_t pkt_error_rate;
|
||||
|
||||
// Optional
|
||||
// 5QI
|
||||
if(src->five_qi != NULL)
|
||||
free(src->five_qi);
|
||||
|
||||
// C-ifGBRflow
|
||||
// Delay Critical
|
||||
if(src->delay_critical != NULL){
|
||||
assert(*src->delay_critical < END_DELAY_CRITICAL);
|
||||
free(src->delay_critical );
|
||||
}
|
||||
// C-ifGBRflow
|
||||
// Averaging Window 9.3.1.53
|
||||
if(src->av_window != NULL){
|
||||
assert(*src->av_window < 4096); // INTEGER (0..4095, ...)
|
||||
free(src->av_window); //
|
||||
}
|
||||
// Optional
|
||||
// Maximum Data Burst Volume 9.3.1.54
|
||||
if(src->max_data_burst_vol != NULL ){
|
||||
assert(*src->max_data_burst_vol < 2000000);
|
||||
free(src->max_data_burst_vol);
|
||||
}
|
||||
// Optional
|
||||
// Extended Packet Delay Budget 9.3.1.145
|
||||
if(src->ext_pkt_delay_budget){
|
||||
free(src->ext_pkt_delay_budget);
|
||||
}
|
||||
|
||||
// Optional
|
||||
// CN Packet Delay Budget Downlink
|
||||
if(src->cn_pkt_dalay_budget_downlink != NULL){
|
||||
free(src->cn_pkt_dalay_budget_downlink);
|
||||
}
|
||||
|
||||
// Optional
|
||||
// CN Packet Delay Budget Uplink
|
||||
if(src->cn_pkt_dalay_budget_uplink != NULL){
|
||||
free(src->cn_pkt_dalay_budget_uplink);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool eq_dyn_5qi_descriptor(dyn_5qi_descriptor_t const* m0, dyn_5qi_descriptor_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
//Mandatory
|
||||
//QoS Priority Level
|
||||
assert(m0->qos_prio_level > 0 && m0->qos_prio_level < 128);
|
||||
assert(m1->qos_prio_level > 0 && m1->qos_prio_level < 128);
|
||||
if(m0->qos_prio_level != m1->qos_prio_level)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
//Packet Delay Budget 9.3.1.51
|
||||
assert(m0->pkt_delay_budget < 1024);// INTEGER (0..1023, ...)
|
||||
assert(m1->pkt_delay_budget < 1024);// INTEGER (0..1023, ...)
|
||||
if(m0->pkt_delay_budget != m1->pkt_delay_budget)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// Packet Error Rate 9.3.1.52
|
||||
assert(m0->pkt_error_rate.exponent < 10 );
|
||||
assert(m1->pkt_error_rate.exponent < 10 );
|
||||
if(m0->pkt_error_rate.exponent != m1->pkt_error_rate.exponent)
|
||||
return false;
|
||||
|
||||
assert(m0->pkt_error_rate.scalar < 10 );
|
||||
assert(m1->pkt_error_rate.scalar < 10 );
|
||||
if(m0->pkt_error_rate.scalar != m1->pkt_error_rate.scalar)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// 5QI
|
||||
if(m0->five_qi != m1->five_qi){
|
||||
if(m0->five_qi == NULL || m1->five_qi == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->five_qi != *m1->five_qi)
|
||||
return false;
|
||||
}
|
||||
|
||||
// C-ifGBRflow
|
||||
// Delay Critical
|
||||
if(m0->delay_critical != m1->delay_critical ){
|
||||
if(m0->delay_critical == NULL || m1->delay_critical == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->delay_critical != *m1->delay_critical )
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// C-ifGBRflow
|
||||
// Averaging Window 9.3.1.53
|
||||
if(m0->av_window != m1->av_window ){
|
||||
if(m0->av_window == NULL || m1->av_window == NULL)
|
||||
return false;
|
||||
|
||||
assert(*m0->av_window < 4096); // INTEGER (0..4095, ...)
|
||||
|
||||
if(*m0->av_window != *m1->av_window )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// Maximum Data Burst Volume 9.3.1.54
|
||||
if(m0->max_data_burst_vol != m1->max_data_burst_vol ){
|
||||
if(m0->max_data_burst_vol == NULL || m1->max_data_burst_vol == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->max_data_burst_vol != *m1->max_data_burst_vol )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// Extended Packet Delay Budget 9.3.1.145
|
||||
if(m0->ext_pkt_delay_budget != m1->ext_pkt_delay_budget ){
|
||||
if(m0->ext_pkt_delay_budget == NULL || m1->ext_pkt_delay_budget == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->ext_pkt_delay_budget != *m1->ext_pkt_delay_budget )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// CN Packet Delay Budget Downlink
|
||||
if(m0->cn_pkt_dalay_budget_downlink != m1->cn_pkt_dalay_budget_downlink ){
|
||||
if(m0->cn_pkt_dalay_budget_downlink == NULL || m1->cn_pkt_dalay_budget_downlink == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->cn_pkt_dalay_budget_downlink != *m1->cn_pkt_dalay_budget_downlink )
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// CN Packet Delay Budget Uplink
|
||||
if(m0->cn_pkt_dalay_budget_uplink != m1->cn_pkt_dalay_budget_uplink ){
|
||||
if(m0->cn_pkt_dalay_budget_uplink == NULL || m1->cn_pkt_dalay_budget_uplink == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->cn_pkt_dalay_budget_uplink != *m1->cn_pkt_dalay_budget_uplink )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
68
openair2/F1AP/test/f1ap_types/dyn_5qi_descriptor.h
Normal file
68
openair2/F1AP/test/f1ap_types/dyn_5qi_descriptor.h
Normal file
@@ -0,0 +1,68 @@
|
||||
#ifndef DYNAMIC_5QI_DESCRIPTOR_MIR_H
|
||||
#define DYNAMIC_5QI_DESCRIPTOR_MIR_H
|
||||
|
||||
#include "pkt_error_rate.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
typedef enum{
|
||||
|
||||
DELAY_CRITICAL,
|
||||
NON_DELAY_CRITICAL,
|
||||
|
||||
END_DELAY_CRITICAL,
|
||||
|
||||
} delay_critical_e;
|
||||
|
||||
// Dynamic 5QI Descriptor 9.3.1.47
|
||||
typedef struct{
|
||||
|
||||
//Mandatory
|
||||
//QoS Priority Level
|
||||
uint8_t qos_prio_level; // INTEGER (1..127)
|
||||
|
||||
// Mandatory
|
||||
//Packet Delay Budget 9.3.1.51
|
||||
uint16_t pkt_delay_budget; // INTEGER (0..1023, ...)
|
||||
|
||||
// Mandatory
|
||||
// Packet Error Rate 9.3.1.52
|
||||
pkt_error_rate_t pkt_error_rate;
|
||||
|
||||
// Optional
|
||||
// 5QI
|
||||
uint8_t* five_qi;
|
||||
|
||||
// C-ifGBRflow
|
||||
// Delay Critical
|
||||
delay_critical_e* delay_critical;
|
||||
|
||||
// C-ifGBRflow
|
||||
// Averaging Window 9.3.1.53
|
||||
uint16_t* av_window; // INTEGER (0..4095, ...)
|
||||
|
||||
// Optional
|
||||
// Maximum Data Burst Volume 9.3.1.54
|
||||
uint64_t* max_data_burst_vol; //INTEGER (0..4095, ..., 4096..2000000)
|
||||
|
||||
// Optional
|
||||
// Extended Packet Delay Budget 9.3.1.145
|
||||
uint16_t* ext_pkt_delay_budget; //INTEGER (0..65535, …)
|
||||
|
||||
// Optional
|
||||
// CN Packet Delay Budget Downlink
|
||||
uint16_t* cn_pkt_dalay_budget_downlink;
|
||||
|
||||
// Optional
|
||||
// CN Packet Delay Budget Uplink
|
||||
uint16_t* cn_pkt_dalay_budget_uplink;
|
||||
|
||||
} dyn_5qi_descriptor_t;
|
||||
|
||||
void free_dyn_5qi_descriptor(dyn_5qi_descriptor_t* src);
|
||||
|
||||
bool eq_dyn_5qi_descriptor(dyn_5qi_descriptor_t const* m0, dyn_5qi_descriptor_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
50
openair2/F1AP/test/f1ap_types/e_utran_qos.c
Normal file
50
openair2/F1AP/test/f1ap_types/e_utran_qos.c
Normal file
@@ -0,0 +1,50 @@
|
||||
#include "e_utran_qos.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_e_utran_qos( e_utran_qos_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Mandatory
|
||||
// QCI
|
||||
//uint8_t qci;
|
||||
|
||||
// Mandatory
|
||||
// Allocation and Retention Priority
|
||||
//alloc_retention_prio_t alloc;
|
||||
|
||||
// Optional
|
||||
// GBR QoS Information 9.3.1.21
|
||||
if(src->gbr_qos_info != NULL){
|
||||
free(src->gbr_qos_info);
|
||||
}
|
||||
}
|
||||
|
||||
bool eq_e_utran_qos(e_utran_qos_t const* m0, e_utran_qos_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// QCI
|
||||
if(m0-> qci != m1->qci)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// Allocation and Retention Priority
|
||||
if(eq_alloc_retention_prio(&m0->alloc, &m1->alloc) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// GBR QoS Information 9.3.1.21
|
||||
if(eq_gbr_qos_info( m1->gbr_qos_info, m0->gbr_qos_info ) == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
30
openair2/F1AP/test/f1ap_types/e_utran_qos.h
Normal file
30
openair2/F1AP/test/f1ap_types/e_utran_qos.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef E_UTRAN_QOS_MIR_H
|
||||
#define E_UTRAN_QOS_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "alloc_retention_prio.h"
|
||||
#include "gbr_qos_info.h"
|
||||
|
||||
typedef struct{
|
||||
// Mandatory
|
||||
// QCI
|
||||
uint8_t qci;
|
||||
|
||||
// Mandatory
|
||||
// Allocation and Retention Priority
|
||||
alloc_retention_prio_t alloc;
|
||||
|
||||
// Optional
|
||||
// GBR QoS Information 9.3.1.21
|
||||
gbr_qos_info_t* gbr_qos_info;
|
||||
|
||||
} e_utran_qos_t;
|
||||
|
||||
void free_e_utran_qos( e_utran_qos_t* src);
|
||||
|
||||
bool eq_e_utran_qos( e_utran_qos_t const* m0, e_utran_qos_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
36
openair2/F1AP/test/f1ap_types/endpoint_ip_addr.c
Normal file
36
openair2/F1AP/test/f1ap_types/endpoint_ip_addr.c
Normal file
@@ -0,0 +1,36 @@
|
||||
#include "endpoint_ip_addr.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
static
|
||||
bool eq_bit_string(BIT_STRING_t m0, BIT_STRING_t m1 )
|
||||
{
|
||||
if(m0.bits_unused != m1.bits_unused)
|
||||
return false;
|
||||
|
||||
if(m0.size != m1.size)
|
||||
return false;
|
||||
|
||||
if(memcmp(m0.buf, m1.buf, m0.size) != 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
void free_bit_string(BIT_STRING_t src)
|
||||
{
|
||||
if(src.size > 0){
|
||||
assert(src.buf != NULL);
|
||||
free(src.buf);
|
||||
}
|
||||
}
|
||||
|
||||
void free_endpoint_ip_addr(endpoint_ip_addr_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
free_bit_string(src->trans_layer_add);
|
||||
}
|
||||
|
||||
15
openair2/F1AP/test/f1ap_types/endpoint_ip_addr.h
Normal file
15
openair2/F1AP/test/f1ap_types/endpoint_ip_addr.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef F1AP_ENDPOINT_IP_ADDRESS_H
|
||||
#define F1AP_ENDPOINT_IP_ADDRESS_H
|
||||
|
||||
|
||||
#include "../../../../cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/BIT_STRING.h"
|
||||
|
||||
// 9.3.2.3
|
||||
typedef struct{
|
||||
BIT_STRING_t trans_layer_add;// [1,160]
|
||||
} endpoint_ip_addr_t ;
|
||||
|
||||
void free_endpoint_ip_addr(endpoint_ip_addr_t* src);
|
||||
|
||||
#endif
|
||||
|
||||
56
openair2/F1AP/test/f1ap_types/endpoint_ip_addr_port.c
Normal file
56
openair2/F1AP/test/f1ap_types/endpoint_ip_addr_port.c
Normal file
@@ -0,0 +1,56 @@
|
||||
#include "endpoint_ip_addr_port.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
static
|
||||
bool eq_bit_string(BIT_STRING_t m0, BIT_STRING_t m1 )
|
||||
{
|
||||
if(m0.bits_unused != m1.bits_unused)
|
||||
return false;
|
||||
|
||||
if(m0.size != m1.size)
|
||||
return false;
|
||||
|
||||
if(memcmp(m0.buf, m1.buf, m0.size) != 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
void free_bit_string(BIT_STRING_t src)
|
||||
{
|
||||
if(src.size > 0){
|
||||
assert(src.buf != NULL);
|
||||
free(src.buf);
|
||||
}
|
||||
}
|
||||
|
||||
void free_endpoint_ip_addr_port(endpoint_ip_addr_port_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
free_endpoint_ip_addr(&src->endpoint_ip_addr);
|
||||
|
||||
free_bit_string(src->port);
|
||||
}
|
||||
|
||||
bool eq_endpoint_ip_addr_port(endpoint_ip_addr_port_t const* m0, endpoint_ip_addr_port_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
if(eq_bit_string(m0->endpoint_ip_addr.trans_layer_add, m1->endpoint_ip_addr.trans_layer_add ) == false)
|
||||
return false;
|
||||
|
||||
if(eq_bit_string(m0->port, m1->port) == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
18
openair2/F1AP/test/f1ap_types/endpoint_ip_addr_port.h
Normal file
18
openair2/F1AP/test/f1ap_types/endpoint_ip_addr_port.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef F1AP_ENDPOINT_IP_ADDRESS_PORT_H
|
||||
#define F1AP_ENDPOINT_IP_ADDRESS_PORT_H
|
||||
|
||||
#include "endpoint_ip_addr.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct{
|
||||
endpoint_ip_addr_t endpoint_ip_addr;
|
||||
BIT_STRING_t port; // [16]
|
||||
} endpoint_ip_addr_port_t;
|
||||
|
||||
void free_endpoint_ip_addr_port(endpoint_ip_addr_port_t* src);
|
||||
|
||||
bool eq_endpoint_ip_addr_port(endpoint_ip_addr_port_t const* m0, endpoint_ip_addr_port_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
79
openair2/F1AP/test/f1ap_types/eutra_cell.c
Normal file
79
openair2/F1AP/test/f1ap_types/eutra_cell.c
Normal file
@@ -0,0 +1,79 @@
|
||||
#include "eutra_cell.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
static
|
||||
bool eq_bit_string_28(BIT_STRING_t m0, BIT_STRING_t m1 )
|
||||
{
|
||||
// 28 bits
|
||||
assert(m0.bits_unused == 4);
|
||||
assert(m1.bits_unused == 4);
|
||||
|
||||
assert(m0.size == 4);
|
||||
assert(m1.size == 4);
|
||||
|
||||
if(m0.bits_unused != m1.bits_unused)
|
||||
return false;
|
||||
|
||||
if(m0.size != m1.size)
|
||||
return false;
|
||||
|
||||
if(memcmp(m0.buf, m1.buf, m0.size -1) != 0)
|
||||
return false;
|
||||
|
||||
// Check last 4 bits
|
||||
uint8_t a = m0.buf[3];
|
||||
uint8_t b = m1.buf[3];
|
||||
|
||||
a &= 0xF0;
|
||||
b &= 0xF0;
|
||||
|
||||
if(a != b)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static
|
||||
void free_bit_string(BIT_STRING_t src)
|
||||
{
|
||||
if(src.size > 0){
|
||||
assert(src.buf != NULL);
|
||||
free(src.buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void free_eutra_cell(eutra_cell_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Mandatory
|
||||
free_bit_string(src->eutra_cell_id); // [28]
|
||||
|
||||
// Served E-UTRA CellInformation 9.3.1.64
|
||||
// Mandatory
|
||||
free_serv_eutra_cell_info(&src->serv_eutra_cell_info);
|
||||
|
||||
}
|
||||
|
||||
bool eq_eutra_cell(eutra_cell_t const* m0, eutra_cell_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory // [28]
|
||||
if(eq_bit_string_28(m0->eutra_cell_id, m1->eutra_cell_id) == false )
|
||||
return false;
|
||||
|
||||
if(eq_serv_eutra_cell_info(&m0->serv_eutra_cell_info, &m1->serv_eutra_cell_info) == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
24
openair2/F1AP/test/f1ap_types/eutra_cell.h
Normal file
24
openair2/F1AP/test/f1ap_types/eutra_cell.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef F1AP_EUTRA_CELL_H
|
||||
#define F1AP_EUTRA_CELL_H
|
||||
|
||||
#include "../../../../cmake_targets/ran_build/build/CMakeFiles/F1AP_R16.3.1/BIT_STRING.h"
|
||||
#include "serv_eutra_cell_info.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
// Mandatory
|
||||
BIT_STRING_t eutra_cell_id; // [28]
|
||||
|
||||
// Served E-UTRA CellInformation 9.3.1.64
|
||||
// Mandatory
|
||||
serv_eutra_cell_info_t serv_eutra_cell_info;
|
||||
|
||||
} eutra_cell_t;
|
||||
|
||||
void free_eutra_cell(eutra_cell_t* src);
|
||||
|
||||
bool eq_eutra_cell(eutra_cell_t const* m0, eutra_cell_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
11
openair2/F1AP/test/f1ap_types/ext_avail_plmn.h
Normal file
11
openair2/F1AP/test/f1ap_types/ext_avail_plmn.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef F1AP_EXTERNAL_AVAILABLE_PLMN_MIR_H
|
||||
#define F1AP_EXTERNAL_AVAILABLE_PLMN_MIR_H
|
||||
|
||||
|
||||
// 9.3.1.76
|
||||
typedef struct{
|
||||
|
||||
} ext_avail_plmn_t;
|
||||
|
||||
#endif
|
||||
|
||||
9
openair2/F1AP/test/f1ap_types/ext_gnb_cu_name.h
Normal file
9
openair2/F1AP/test/f1ap_types/ext_gnb_cu_name.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef F1AP_EXTERNAL_GNU_CU_NAME_MIR_H
|
||||
#define F1AP_EXTERNAL_GNU_CU_NAME_MIR_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
} ext_gnb_cu_name_t;
|
||||
|
||||
#endif
|
||||
|
||||
9
openair2/F1AP/test/f1ap_types/ext_gnb_du_name.h
Normal file
9
openair2/F1AP/test/f1ap_types/ext_gnb_du_name.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef F1AP_EXTERNAL_GNU_DU_NAME_MIR_H
|
||||
#define F1AP_EXTERNAL_GNU_DU_NAME_MIR_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
} ext_gnb_du_name_t;
|
||||
|
||||
#endif
|
||||
|
||||
9
openair2/F1AP/test/f1ap_types/extended_srv_plmn.h
Normal file
9
openair2/F1AP/test/f1ap_types/extended_srv_plmn.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef EXTENDED_SERVED_PLMN_MIR_H
|
||||
#define EXTENDED_SERVED_PLMN_MIR_H
|
||||
|
||||
typedef struct{
|
||||
|
||||
} extended_srv_plmn_t;
|
||||
|
||||
#endif
|
||||
|
||||
15
openair2/F1AP/test/f1ap_types/f1_c_trans_path.h
Normal file
15
openair2/F1AP/test/f1ap_types/f1_c_trans_path.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef F1_C_TRANSFER_PATH_F1AP_H
|
||||
#define F1_C_TRANSFER_PATH_F1AP_H
|
||||
|
||||
typedef enum{
|
||||
|
||||
LTE_F1_C_PATH_NSA,
|
||||
NR_F1_C_PATH_NSA,
|
||||
BOTH_F1_C_PATH_NSA,
|
||||
|
||||
END_F1_C_PATH_NSA
|
||||
|
||||
} f1_c_path_nsa_e;
|
||||
|
||||
#endif
|
||||
|
||||
69
openair2/F1AP/test/f1ap_types/f1_setup.c
Normal file
69
openair2/F1AP/test/f1ap_types/f1_setup.c
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "f1_setup.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
void free_f1_setup(f1_setup_t* setup)
|
||||
{
|
||||
assert(setup != NULL);
|
||||
if(setup->gnb_du_name != NULL){
|
||||
free_byte_array(*setup->gnb_du_name);
|
||||
free(setup->gnb_du_name);
|
||||
}
|
||||
if(setup->sz_srv_cell > 0){
|
||||
for(size_t i = 0; i < setup->sz_srv_cell; ++i){
|
||||
free_gnb_du_srv_cell_f1ap(&setup->srv_cell[i]);
|
||||
}
|
||||
|
||||
free(setup->srv_cell);
|
||||
}
|
||||
|
||||
free_gnb_rrc_ver_f1ap(&setup->ver);
|
||||
}
|
||||
|
||||
bool eq_f1_setup(f1_setup_t const* m0, f1_setup_t const* m1)
|
||||
{
|
||||
assert(m0 != NULL);
|
||||
assert(m1 != NULL);
|
||||
|
||||
// 1 Transaction ID
|
||||
if(m0->trans_id != m1->trans_id)
|
||||
return false;
|
||||
|
||||
// 2 gNB-DU ID
|
||||
if(m0->gnb_du_id != m1->gnb_du_id)
|
||||
return false;
|
||||
|
||||
// 3 gNB-DU Name
|
||||
if(eq_byte_array(m0->gnb_du_name, m1->gnb_du_name) == false )
|
||||
return false;
|
||||
|
||||
// 4 gNB-DU Served Cells List
|
||||
if(m0->sz_srv_cell != m1->sz_srv_cell)
|
||||
return false;
|
||||
|
||||
for(size_t i = 0; i < m0->sz_srv_cell; ++i){
|
||||
if(eq_gnb_du_srv_cell_f1ap(&m0->srv_cell[i], &m1->srv_cell[i]) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
// 5 gNB-DU RRC version
|
||||
if(eq_gnb_rrc_ver_f1ap(&m0->ver, &m1->ver) == false)
|
||||
return false;
|
||||
|
||||
// 6 Transport Layer Address Info
|
||||
assert(m0->tlai == NULL && "Not implemented");
|
||||
assert(m1->tlai == NULL && "Not implemented");
|
||||
|
||||
// 7 BAP Address
|
||||
assert(m0->bad_add == NULL && "Not implemented" );
|
||||
assert(m1->bad_add == NULL && "Not implemented" );
|
||||
|
||||
// 8 Extended gNB-DU Name
|
||||
assert(m0->egdn == NULL && "Not implemented");
|
||||
assert(m1->egdn == NULL && "Not implemented");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
51
openair2/F1AP/test/f1ap_types/f1_setup.h
Normal file
51
openair2/F1AP/test/f1ap_types/f1_setup.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef F1_SETUP_F1AP_MIR_H
|
||||
#define F1_SETUP_F1AP_MIR_H
|
||||
|
||||
#include "../byte_array.h"
|
||||
|
||||
#include "gnb_du_srv_cell.h"
|
||||
#include "trans_layer_add_info.h"
|
||||
#include "bap_address.h"
|
||||
#include "ext_gnb_du_name.h"
|
||||
#include "trans_layer_add_info.h"
|
||||
#include "gnb_rrc_ver.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// 0 Message Type
|
||||
|
||||
// 1 Transaction ID
|
||||
uint8_t trans_id; // 9.3.1.23
|
||||
|
||||
// 2 gNB-DU ID
|
||||
uint64_t gnb_du_id; // 9.3.1.9
|
||||
|
||||
// 3 gNB-DU Name
|
||||
byte_array_t* gnb_du_name;
|
||||
|
||||
// 4 gNB-DU Served Cells List
|
||||
size_t sz_srv_cell;
|
||||
gnb_du_srv_cell_f1ap_t* srv_cell;
|
||||
|
||||
// 5 gNB-DU RRC version
|
||||
gnb_rrc_ver_f1ap_t ver; // 9.3.1.70
|
||||
|
||||
// 6 Transport Layer Address Info
|
||||
trans_layer_add_info_t* tlai; // 9.3.2.5
|
||||
|
||||
// 7 BAP Address
|
||||
bap_address_t* bad_add; // 9.3.1.111
|
||||
|
||||
// 8 Extended gNB-DU Name
|
||||
ext_gnb_du_name_t* egdn; // 9.3.1.205
|
||||
|
||||
} f1_setup_t;
|
||||
|
||||
void free_f1_setup(f1_setup_t* setup);
|
||||
|
||||
bool eq_f1_setup(f1_setup_t const* m0, f1_setup_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
64
openair2/F1AP/test/f1ap_types/f1_setup_failure.c
Normal file
64
openair2/F1AP/test/f1ap_types/f1_setup_failure.c
Normal file
@@ -0,0 +1,64 @@
|
||||
#include "f1_setup_failure.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void free_f1_setup_failure( f1_setup_failure_t* sf)
|
||||
{
|
||||
assert(sf != NULL);
|
||||
|
||||
// Mandatory
|
||||
// Transaction ID
|
||||
// uint8_t trans_id;
|
||||
|
||||
// Mandatory
|
||||
// Cause
|
||||
// cause_f1ap_t cause;
|
||||
|
||||
// Optional
|
||||
//Time to wait
|
||||
if(sf->time_to_wait != NULL){
|
||||
free(sf->time_to_wait);
|
||||
}
|
||||
|
||||
if(sf->diagnose != NULL){
|
||||
free_criticallity_diagnose(sf->diagnose);
|
||||
free(sf->diagnose);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool eq_f1_setup_failure(f1_setup_failure_t const* m0, f1_setup_failure_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL)
|
||||
return false;
|
||||
|
||||
if(m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// Transaction ID
|
||||
if(m0->trans_id != m1->trans_id)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// Cause
|
||||
if(eq_cause_f1ap(&m0->cause, &m1->cause) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
//Time to wait
|
||||
if(eq_time_to_wait_f1ap(m0->time_to_wait, m1->time_to_wait) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// Criticallity Diagnose
|
||||
if(eq_criticallity_diagnose(m0->diagnose, m1->diagnose) == false)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
39
openair2/F1AP/test/f1ap_types/f1_setup_failure.h
Normal file
39
openair2/F1AP/test/f1ap_types/f1_setup_failure.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef F1_SETUP_FAILURE_MIR_H
|
||||
#define F1_SETUP_FAILURE_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "cause_f1ap.h"
|
||||
#include "time_to_wait_f1ap.h"
|
||||
#include "criticallity_diagnostic_f1ap.h"
|
||||
|
||||
typedef struct{
|
||||
|
||||
// Mandatory
|
||||
//Message Type
|
||||
|
||||
// Mandatory
|
||||
//Transaction ID
|
||||
uint8_t trans_id;
|
||||
|
||||
//Mandatory
|
||||
//Cause
|
||||
cause_f1ap_t cause;
|
||||
|
||||
// Optional
|
||||
//Time to wait
|
||||
time_to_wait_f1ap_e* time_to_wait;
|
||||
|
||||
//Optional
|
||||
//Criticality Diagnostics
|
||||
criticallity_diagnostic_f1ap_t* diagnose;
|
||||
|
||||
} f1_setup_failure_t ;
|
||||
|
||||
void free_f1_setup_failure(f1_setup_failure_t* sf);
|
||||
|
||||
bool eq_f1_setup_failure(f1_setup_failure_t const* m0, f1_setup_failure_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
84
openair2/F1AP/test/f1ap_types/f1_setup_response.c
Normal file
84
openair2/F1AP/test/f1ap_types/f1_setup_response.c
Normal file
@@ -0,0 +1,84 @@
|
||||
#include "f1_setup_response.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_f1_setup_response(f1_setup_response_t* sr)
|
||||
{
|
||||
assert(sr != NULL);
|
||||
|
||||
if(sr->gnb_cu_name != NULL){
|
||||
free_byte_array(*sr->gnb_cu_name);
|
||||
free(sr->gnb_cu_name);
|
||||
}
|
||||
|
||||
// 3 Cells to activated list. Optional
|
||||
for(size_t i =0; i < sr->sz_act_cell; ++i){
|
||||
free_activate_cell(&sr->act_cell[i]);
|
||||
}
|
||||
|
||||
free(sr->act_cell);
|
||||
|
||||
// 4 gNB-CU RRC version
|
||||
free_gnb_rrc_ver_f1ap(&sr->ver);
|
||||
|
||||
// 5 Transport Layer Address Info
|
||||
assert(sr->tlai == NULL && "Not implemented" );
|
||||
|
||||
// 6 Uplink BH Non-UP Traffic Mapping
|
||||
assert(sr->ubh_nup_traff == NULL && "Not implemented");
|
||||
|
||||
// 7 BAP Address
|
||||
assert(sr->bad_add == NULL && "Not implemented");
|
||||
|
||||
// 8 Extended gNB-CU Name
|
||||
assert(sr->egcn == NULL && "Not implemented");
|
||||
}
|
||||
|
||||
bool eq_f1_setup_response(f1_setup_response_t const* m0, f1_setup_response_t const* m1)
|
||||
{
|
||||
assert(m0 != NULL);
|
||||
assert(m1 != NULL);
|
||||
|
||||
// 1 Transaction ID
|
||||
if(m0->trans_id != m1->trans_id )
|
||||
return false;
|
||||
|
||||
// 2 gNB-CU Name
|
||||
if(eq_byte_array(m0->gnb_cu_name, m1->gnb_cu_name) == false)
|
||||
return false;
|
||||
|
||||
|
||||
// 3 Cells to activated list. Optional
|
||||
if(m0->sz_act_cell != m1->sz_act_cell)
|
||||
return false;
|
||||
|
||||
for(size_t i =0; i < m0->sz_act_cell; ++i){
|
||||
if(eq_activate_cell(&m0->act_cell[i], &m1->act_cell[i] ) == false )
|
||||
return false;
|
||||
}
|
||||
|
||||
// 4 gNB-CU RRC version
|
||||
if(eq_gnb_rrc_ver_f1ap(&m0->ver, &m1->ver) == false )
|
||||
return false;
|
||||
|
||||
// 5 Transport Layer Address Info
|
||||
assert(m0->tlai == NULL && "Not implemented" );
|
||||
assert(m1->tlai == NULL && "Not implemented" );
|
||||
|
||||
// 6 Uplink BH Non-UP Traffic Mapping
|
||||
assert(m0->ubh_nup_traff == NULL && "Not implemented" );
|
||||
assert(m1->ubh_nup_traff == NULL && "Not implemented" );
|
||||
|
||||
// 7 BAP Address
|
||||
assert(m0->bad_add == NULL && "Not implemented" );
|
||||
assert(m1->bad_add == NULL && "Not implemented" );
|
||||
|
||||
// 8 Extended gNB-CU Name
|
||||
assert(m0->egcn == NULL && "Not implemented" );
|
||||
assert(m1->egcn == NULL && "Not implemented" );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
53
openair2/F1AP/test/f1ap_types/f1_setup_response.h
Normal file
53
openair2/F1AP/test/f1ap_types/f1_setup_response.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#ifndef F1AP_SETUP_RESPONSE_MIR_H
|
||||
#define F1AP_SETUP_RESPONSE_MIR_H
|
||||
|
||||
#include "activate_cell.h"
|
||||
#include "gnb_rrc_ver.h"
|
||||
#include "trans_layer_add_info.h"
|
||||
#include "ubh_nup_traff.h"
|
||||
#include "bap_address.h"
|
||||
#include "ext_gnb_cu_name.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../byte_array.h"
|
||||
|
||||
typedef struct{
|
||||
|
||||
// 0 Message Type
|
||||
|
||||
// 1 Transaction ID
|
||||
uint8_t trans_id;
|
||||
|
||||
// 2 gNB-CU Name
|
||||
byte_array_t* gnb_cu_name;
|
||||
|
||||
// 3 Cells to activated list. Optional
|
||||
size_t sz_act_cell;
|
||||
activate_cell_t* act_cell;
|
||||
|
||||
// 4 gNB-CU RRC version
|
||||
gnb_rrc_ver_f1ap_t ver;
|
||||
|
||||
// 5 Transport Layer Address Info
|
||||
trans_layer_add_info_t* tlai;
|
||||
|
||||
// 6 Uplink BH Non-UP Traffic Mapping
|
||||
ubh_nup_traff_t* ubh_nup_traff;
|
||||
|
||||
// 7 BAP Address
|
||||
bap_address_t* bad_add;
|
||||
|
||||
// 8 Extended gNB-CU Name
|
||||
ext_gnb_cu_name_t* egcn;
|
||||
|
||||
} f1_setup_response_t;
|
||||
|
||||
void free_f1_setup_response(f1_setup_response_t* );
|
||||
|
||||
bool eq_f1_setup_response(f1_setup_response_t const* m0, f1_setup_response_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
64
openair2/F1AP/test/f1ap_types/fdd_info.c
Normal file
64
openair2/F1AP/test/f1ap_types/fdd_info.c
Normal file
@@ -0,0 +1,64 @@
|
||||
#include "fdd_info.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void free_fdd_info_f1ap(fdd_info_f1ap_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
free_nr_freq_info_f1ap(&src->ul_frq_info);
|
||||
|
||||
free_nr_freq_info_f1ap(&src->dl_frq_info);
|
||||
|
||||
free_trans_bw_f1ap(&src->ul_bw);
|
||||
|
||||
free_trans_bw_f1ap(&src->dl_bw);
|
||||
|
||||
for(size_t i = 0; i < src->sz_ul_nr_carrier_lst; ++i){
|
||||
free_nr_carrier_lst_f1ap(&src->ul_nr_carrier_lst[i]);
|
||||
}
|
||||
free(src->ul_nr_carrier_lst);
|
||||
|
||||
for(size_t i = 0; i < src->sz_dl_nr_carrier_lst; ++i){
|
||||
free_nr_carrier_lst_f1ap(&src->dl_nr_carrier_lst[i]);
|
||||
}
|
||||
free(src->dl_nr_carrier_lst);
|
||||
}
|
||||
|
||||
bool eq_fdd_info_f1ap(fdd_info_f1ap_t const* m0, fdd_info_f1ap_t const* m1)
|
||||
{
|
||||
assert(m0 != NULL);
|
||||
assert(m1 != NULL);
|
||||
|
||||
if(eq_nr_freq_info_f1ap(&m0->ul_frq_info, &m1->ul_frq_info) == false)
|
||||
return false;
|
||||
|
||||
if(eq_nr_freq_info_f1ap(&m0->dl_frq_info, &m1->dl_frq_info) == false)
|
||||
return false;
|
||||
|
||||
if(eq_trans_bw_f1ap(&m0->ul_bw, &m1->ul_bw) == false )
|
||||
return false;
|
||||
|
||||
if(eq_trans_bw_f1ap(&m0->dl_bw, &m1->dl_bw) == false )
|
||||
return false;
|
||||
|
||||
if(m0-> sz_ul_nr_carrier_lst != m1->sz_ul_nr_carrier_lst)
|
||||
return false;
|
||||
|
||||
for(size_t i =0; i < m0-> sz_ul_nr_carrier_lst; ++i){
|
||||
if(eq_nr_carrier_lst_f1ap(&m0->ul_nr_carrier_lst[i], &m1->ul_nr_carrier_lst[i] ) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(m0-> sz_dl_nr_carrier_lst != m1->sz_dl_nr_carrier_lst)
|
||||
return false;
|
||||
|
||||
for(size_t i =0; i < m0-> sz_ul_nr_carrier_lst; ++i){
|
||||
if(eq_nr_carrier_lst_f1ap(&m0->dl_nr_carrier_lst[i], &m1->dl_nr_carrier_lst[i] ) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
33
openair2/F1AP/test/f1ap_types/fdd_info.h
Normal file
33
openair2/F1AP/test/f1ap_types/fdd_info.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef F1AP_FDD_INFO_MIR_H
|
||||
#define F1AP_FDD_INFO_MIR_H
|
||||
|
||||
#include "nr_freq_info.h"
|
||||
#include "nr_carrier_lst.h"
|
||||
#include "trans_bw.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct{
|
||||
|
||||
nr_freq_info_f1ap_t ul_frq_info;
|
||||
nr_freq_info_f1ap_t dl_frq_info;
|
||||
|
||||
trans_bw_f1ap_t ul_bw;
|
||||
trans_bw_f1ap_t dl_bw;
|
||||
|
||||
|
||||
size_t sz_ul_nr_carrier_lst; // max. 5
|
||||
nr_carrier_lst_f1ap_t* ul_nr_carrier_lst;
|
||||
|
||||
size_t sz_dl_nr_carrier_lst;
|
||||
nr_carrier_lst_f1ap_t* dl_nr_carrier_lst;
|
||||
|
||||
} fdd_info_f1ap_t ;
|
||||
|
||||
void free_fdd_info_f1ap(fdd_info_f1ap_t* src);
|
||||
|
||||
bool eq_fdd_info_f1ap(fdd_info_f1ap_t const* m0, fdd_info_f1ap_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
76
openair2/F1AP/test/f1ap_types/flows_mapped_to_drb.c
Normal file
76
openair2/F1AP/test/f1ap_types/flows_mapped_to_drb.c
Normal file
@@ -0,0 +1,76 @@
|
||||
#include "flows_mapped_to_drb.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_flows_mapped_to_drb(flows_mapped_to_drb_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
// Mandatory
|
||||
// QoS Flow Identifier 9.3.1.63
|
||||
assert(src->qfi < 64); // INTEGER (0 ..63)
|
||||
|
||||
// Mandatory
|
||||
// QoS Flow Level QoS Parameters 9.3.1.45
|
||||
free_qos_flow_level_qos_parameter(&src->qos_flow_level);
|
||||
|
||||
// Optional
|
||||
// QoS Flow Mapping Indication 9.3.1.72
|
||||
if(src->qos_flow_mapping_ind != NULL){
|
||||
assert(*src->qos_flow_mapping_ind < END_QOS_FLOW_MAPPING_IND );
|
||||
free(src->qos_flow_mapping_ind);
|
||||
}
|
||||
|
||||
// Optional
|
||||
// TSC Traffic Characteristics 9.3.1.141
|
||||
if(src-> tsc_traffic_char != NULL){
|
||||
free_tsc_traffic_char(src->tsc_traffic_char );
|
||||
free(src->tsc_traffic_char );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool eq_flows_mapped_to_drb(flows_mapped_to_drb_t const* m0, flows_mapped_to_drb_t const* m1)
|
||||
{
|
||||
if(m0 == m1)
|
||||
return true;
|
||||
|
||||
if(m0 == NULL || m1 == NULL)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// QoS Flow Identifier 9.3.1.63
|
||||
assert(m0->qfi < 64); // INTEGER (0 ..63)
|
||||
assert(m1->qfi < 64); // INTEGER (0 ..63)
|
||||
if(m0->qfi != m1->qfi)
|
||||
return false;
|
||||
|
||||
// Mandatory
|
||||
// QoS Flow Level QoS Parameters 9.3.1.45
|
||||
if(eq_qos_flow_level_qos_parameter(&m0->qos_flow_level, &m1->qos_flow_level) == false)
|
||||
return false;
|
||||
|
||||
// Optional
|
||||
// QoS Flow Mapping Indication 9.3.1.72
|
||||
if(m0->qos_flow_mapping_ind != m1->qos_flow_mapping_ind){
|
||||
if(m0->qos_flow_mapping_ind == NULL || m1->qos_flow_mapping_ind == NULL)
|
||||
return false;
|
||||
|
||||
if(*m0->qos_flow_mapping_ind != *m1->qos_flow_mapping_ind)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Optional
|
||||
// TSC Traffic Characteristics 9.3.1.141
|
||||
if(m0->tsc_traffic_char != m1->tsc_traffic_char ){
|
||||
if(m0->tsc_traffic_char == NULL || m1->tsc_traffic_char == NULL)
|
||||
return false;
|
||||
|
||||
if(eq_tsc_traffic_char(m0->tsc_traffic_char, m1->tsc_traffic_char) == false)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
42
openair2/F1AP/test/f1ap_types/flows_mapped_to_drb.h
Normal file
42
openair2/F1AP/test/f1ap_types/flows_mapped_to_drb.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef FLOWS_MAPPED_TO_DRB_F1AP_MIR_H
|
||||
#define FLOWS_MAPPED_TO_DRB_F1AP_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "qos_flow_level_qos_parameter.h"
|
||||
#include "tsc_traffic_char.h"
|
||||
|
||||
typedef enum{
|
||||
|
||||
UL_QOS_FLOW_MAPPING_IND ,
|
||||
DL_QOS_FLOW_MAPPING_IND ,
|
||||
|
||||
END_QOS_FLOW_MAPPING_IND
|
||||
|
||||
} qos_flow_mapping_ind_e;
|
||||
|
||||
typedef struct{
|
||||
// Mandatory
|
||||
// QoS Flow Identifier 9.3.1.63
|
||||
uint8_t qfi; // INTEGER (0 ..63)
|
||||
|
||||
// Mandatory
|
||||
// QoS Flow Level QoS Parameters 9.3.1.45
|
||||
qos_flow_level_qos_parameter_t qos_flow_level;
|
||||
|
||||
// Optional
|
||||
// QoS Flow Mapping Indication 9.3.1.72
|
||||
qos_flow_mapping_ind_e* qos_flow_mapping_ind;
|
||||
|
||||
// Optional
|
||||
// TSC Traffic Characteristics 9.3.1.141
|
||||
tsc_traffic_char_t* tsc_traffic_char;
|
||||
|
||||
} flows_mapped_to_drb_t;
|
||||
|
||||
void free_flows_mapped_to_drb(flows_mapped_to_drb_t* src);
|
||||
|
||||
bool eq_flows_mapped_to_drb(flows_mapped_to_drb_t const* m0, flows_mapped_to_drb_t const* m1);
|
||||
|
||||
#endif
|
||||
30
openair2/F1AP/test/f1ap_types/freq_band.c
Normal file
30
openair2/F1AP/test/f1ap_types/freq_band.c
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "freq_band.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
void free_freq_band(freq_band_f1ap_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
|
||||
free(src->sul_band);
|
||||
}
|
||||
|
||||
bool eq_freq_band_f1ap(freq_band_f1ap_t const* m0, freq_band_f1ap_t const* m1)
|
||||
{
|
||||
assert(m0 != NULL);
|
||||
assert(m1 != NULL);
|
||||
|
||||
if(m0-> frq_band != m1->frq_band)
|
||||
return false;
|
||||
|
||||
if(m0->sz_sul_band != m1->sz_sul_band)
|
||||
return false;
|
||||
|
||||
for(size_t i = 0; i < m0->sz_sul_band; ++i){
|
||||
if(m0->sul_band[i] != m1->sul_band[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
22
openair2/F1AP/test/f1ap_types/freq_band.h
Normal file
22
openair2/F1AP/test/f1ap_types/freq_band.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef F1AP_FREQUENCY_BAND_MIR_H
|
||||
#define F1AP_FREQUENCY_BAND_MIR_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct{
|
||||
|
||||
uint16_t frq_band;
|
||||
|
||||
size_t sz_sul_band;
|
||||
uint16_t* sul_band;
|
||||
|
||||
} freq_band_f1ap_t ;
|
||||
|
||||
void free_freq_band(freq_band_f1ap_t* src);
|
||||
|
||||
bool eq_freq_band_f1ap(freq_band_f1ap_t const* m0, freq_band_f1ap_t const* m1);
|
||||
|
||||
#endif
|
||||
|
||||
14
openair2/F1AP/test/f1ap_types/freq_shift.c
Normal file
14
openair2/F1AP/test/f1ap_types/freq_shift.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include "freq_shift.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void free_frq_shift( freq_shift_t* src)
|
||||
{
|
||||
assert(src != NULL);
|
||||
assert(0!=0 && "not implemented");
|
||||
|
||||
(void)src;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user