From 2eacb82da5333913116298997758f044db844a78 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 13 Mar 2026 16:38:48 +0100 Subject: [PATCH 1/2] Correct list of XNAP ASN.1 files generated by asn1c Notably, remove asn_codecs_prim_xer.h from the list of files, triggering problems when re-running ninja, because the "canonical OAI asn1c" (https://github.com/mouse07410/asn1c, commit ID 940dd5fa9f3917913fd487b13dfddfacd0ded06e) does not generate it: ninja explain: output openair2/XNAP/MESSAGES/asn_codecs_prim_xer.h doesn't exist In this version, a couple of files are not generated, so remove them from the list. Also, leave the files in the order as shown by ls. --- .../XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake | 114 ++++++------------ 1 file changed, 40 insertions(+), 74 deletions(-) diff --git a/openair2/XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake b/openair2/XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake index 4a46649449..c1018505cb 100644 --- a/openair2/XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake +++ b/openair2/XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake @@ -1,7 +1,10 @@ set(XNAP_GRAMMAR ASN1/xnap_R16.2.0.asn) set(xnap_source + ANY_aper.c ANY.c + ANY_uper.c + ANY_xer.c aper_decoder.c aper_encoder.c aper_opentype.c @@ -22,68 +25,78 @@ set(xnap_source BIT_STRING_uper.c BIT_STRING_xer.c constraints.c - constr_CHOICE.c constr_CHOICE_aper.c - constr_CHOICE_rfill.c + constr_CHOICE.c constr_CHOICE_print.c + constr_CHOICE_rfill.c constr_CHOICE_uper.c constr_CHOICE_xer.c - constr_SEQUENCE.c constr_SEQUENCE_aper.c - constr_SEQUENCE_OF.c + constr_SEQUENCE.c constr_SEQUENCE_OF_aper.c + constr_SEQUENCE_OF.c constr_SEQUENCE_OF_uper.c constr_SEQUENCE_OF_xer.c constr_SEQUENCE_print.c constr_SEQUENCE_rfill.c constr_SEQUENCE_uper.c constr_SEQUENCE_xer.c - constr_SET_OF.c constr_SET_OF_aper.c + constr_SET_OF.c constr_SET_OF_print.c constr_SET_OF_rfill.c constr_SET_OF_uper.c constr_SET_OF_xer.c constr_TYPE.c - INTEGER.c + ENUMERATED_aper.c + ENUMERATED.c + ENUMERATED_uper.c + GraphicString.c INTEGER_aper.c + INTEGER.c INTEGER_print.c INTEGER_rfill.c INTEGER_uper.c - INTEGER_xer.c - Makefile.am.libasncodec - NativeEnumerated.c + INTEGER_xer.c NativeEnumerated_aper.c + NativeEnumerated.c NativeEnumerated_uper.c NativeEnumerated_xer.c - NativeInteger.c NativeInteger_aper.c - NativeInteger_print.c + NativeInteger.c + NativeInteger_print.c NativeInteger_rfill.c NativeInteger_uper.c NativeInteger_xer.c - NULL.c NULL_aper.c + NULL.c NULL_print.c NULL_rfill.c NULL_uper.c NULL_xer.c + ObjectDescriptor.c OBJECT_IDENTIFIER.c OBJECT_IDENTIFIER_print.c OBJECT_IDENTIFIER_rfill.c OBJECT_IDENTIFIER_xer.c + OCTET_STRING_aper.c OCTET_STRING.c - OCTET_STRING_aper.c OCTET_STRING_print.c OCTET_STRING_rfill.c OCTET_STRING_uper.c OCTET_STRING_xer.c - OPEN_TYPE.c OPEN_TYPE_aper.c + OPEN_TYPE.c OPEN_TYPE_uper.c OPEN_TYPE_xer.c - per_opentype.c + per_decoder.c per_encoder.c + per_opentype.c + per_support.c + uper_decoder.c + uper_encoder.c + uper_opentype.c + uper_support.c VisibleString.c xer_decoder.c xer_encoder.c @@ -283,6 +296,7 @@ set(xnap_source XNAP_ExtendedPacketDelayBudget.c XNAP_ExtendedRATRestrictionInformation.c XNAP_ExtendedSliceSupportList.c + XNAP_EXTERNAL.c XNAP_ExtTLA-Item.c XNAP_ExtTLAs.c XNAP_FailureIndication.c @@ -873,9 +887,6 @@ set(xnap_source XNAP_XnUAddressIndication.c XNAP_XnUAddressInfoperPDUSession-Item.c XNAP_XnUAddressInfoperPDUSession-List.c - uper_encoder.c - uper_opentype.c - uper_support.c ) set(xnap_headers @@ -888,7 +899,7 @@ set(xnap_headers asn_bit_data.h asn_codecs.h asn_codecs_prim.h - asn_codecs_prim_xer.h + asn_config.h asn_internal.h asn_ioc.h asn_random_fill.h @@ -898,72 +909,30 @@ set(xnap_headers ber_tlv_length.h ber_tlv_tag.h BIT_STRING.h - BIT_STRING_print.h - BIT_STRING_rfill.h - BIT_STRING_uper.h - BIT_STRING_xer.h constraints.h constr_CHOICE.h - constr_CHOICE_aper.h - constr_CHOICE_print.h - constr_CHOICE_rfill.h - constr_CHOICE_uper.h - constr_CHOICE_xer.h constr_SEQUENCE.h - constr_SEQUENCE_aper.h constr_SEQUENCE_OF.h - constr_SEQUENCE_OF_aper.h - constr_SEQUENCE_OF_uper.h - constr_SEQUENCE_OF_xer.h - constr_SEQUENCE_print.h - constr_SEQUENCE_rfill.h - constr_SEQUENCE_uper.h - constr_SEQUENCE_xer.h constr_SET_OF.h - constr_SET_OF_aper.h - constr_SET_OF_print.h - constr_SET_OF_rfill.h - constr_SET_OF_uper.h - constr_SET_OF_xer.h constr_TYPE.h + ENUMERATED.h + GraphicString.h INTEGER.h - INTEGER_aper.h - INTEGER_print.h - INTEGER_rfill.h - INTEGER_uper.h - INTEGER_xer.h NativeEnumerated.h - NativeEnumerated_aper.h - NativeEnumerated_uper.h - NativeEnumerated_xer.h NativeInteger.h - NativeInteger_aper.h - NativeInteger_print.h - NativeInteger_rfill.h - NativeInteger_xer.h - NativeInteger_uper.h NULL.h - NULL_aper.h - NULL_print.h - NULL_rfill.h - NULL_uper.h - NULL_xer.h + ObjectDescriptor.h OBJECT_IDENTIFIER.h - OBJECT_IDENTIFIER_print.h - OBJECT_IDENTIFIER_rfill.h - OBJECT_IDENTIFIER_xer.h OCTET_STRING.h - OCTET_STRING_aper.h - OCTET_STRING_print.h - OCTET_STRING_rfill.h - OCTET_STRING_uper.h - OCTET_STRING_xer.h OPEN_TYPE.h - OPEN_TYPE_aper.h - OPEN_TYPE_uper.h - OPEN_TYPE_xer.h + per_decoder.h per_encoder.h per_opentype.h + per_support.h + uper_decoder.h + uper_encoder.h + uper_opentype.h + uper_support.h VisibleString.h xer_decoder.h xer_encoder.h @@ -1164,6 +1133,7 @@ set(xnap_headers XNAP_ExtendedPacketDelayBudget.h XNAP_ExtendedRATRestrictionInformation.h XNAP_ExtendedSliceSupportList.h + XNAP_EXTERNAL.h XNAP_ExtTLA-Item.h XNAP_ExtTLAs.h XNAP_FailureIndication.h @@ -1754,8 +1724,4 @@ set(xnap_headers XNAP_XnUAddressIndication.h XNAP_XnUAddressInfoperPDUSession-Item.h XNAP_XnUAddressInfoperPDUSession-List.h - uper_encoder.h - uper_opentype.h - uper_support.h ) - From 19d1fe16ff7b614e431431a5af2b63f1534756cf Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 13 Mar 2026 17:17:49 +0100 Subject: [PATCH 2/2] Move xnap lib back to openair2/XNAP/ Remove the ITTI header, because it would trigger compilation errors (we don't link in LTE/NR RRC headers), but we don't actually need it. --- CMakeLists.txt | 11 ----------- openair2/XNAP/CMakeLists.txt | 3 +++ openair2/XNAP/xnap_common.h | 1 - 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1cb3e09736..b8a1b3a082 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -517,17 +517,6 @@ add_library(x2ap target_link_libraries(x2ap PUBLIC asn1_x2ap) target_link_libraries(x2ap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) -#XNAP -############## -set(XNAP_DIR ${OPENAIR2_DIR}/XNAP) -add_library(xnap - ${XNAP_DIR}/xnap_common.c - ) -target_include_directories(xnap PUBLIC XNAP_DIR) -target_link_libraries(xnap PUBLIC asn1_xnap) -target_link_libraries(xnap PRIVATE nr_rrc xnap_lib) -target_include_directories(xnap PRIVATE ${XNAP_DIR}/lib) - # F1AP ############## set(F1AP_DIR ${OPENAIR2_DIR}/F1AP) diff --git a/openair2/XNAP/CMakeLists.txt b/openair2/XNAP/CMakeLists.txt index 10576f8403..a7ae0be5e4 100644 --- a/openair2/XNAP/CMakeLists.txt +++ b/openair2/XNAP/CMakeLists.txt @@ -1,6 +1,9 @@ add_subdirectory(lib) add_subdirectory(MESSAGES) +add_library(xnap xnap_common.c) +target_link_libraries(xnap PUBLIC asn1_xnap xnap_lib) + if(ENABLE_TESTS) add_subdirectory(tests) endif() diff --git a/openair2/XNAP/xnap_common.h b/openair2/XNAP/xnap_common.h index 78de8b17a1..15d7385215 100644 --- a/openair2/XNAP/xnap_common.h +++ b/openair2/XNAP/xnap_common.h @@ -25,7 +25,6 @@ #define XNAP_COMMON_H_ #include "XNAP_XnAP-PDU.h" -#include "intertask_interface.h" #include "common/openairinterface5g_limits.h" #include "oai_asn1.h" #include "XNAP_ProtocolIE-Field.h"