Commit 4957f446 authored by Guido Casati's avatar Guido Casati

Refactor includes in NGAP files

* used open source IWYU tool
parent e8f9d577
......@@ -28,14 +28,6 @@
*/
#include <stdint.h>
#include "ngap_common.h"
#include "NGAP_NGAP-PDU.h"
int asn1_xer_print = 0;
void ngap_handle_criticality(NGAP_Criticality_t criticality)
{
}
......@@ -36,55 +36,10 @@
#ifndef NGAP_COMMON_H_
#define NGAP_COMMON_H_
#include <netinet/sctp.h>
#include "common/utils/LOG/log.h"
#include "oai_asn1.h"
#include "NGAP_ProtocolIE-Field.h"
#include "NGAP_NGAP-PDU.h"
#include "NGAP_InitiatingMessage.h"
#include "NGAP_SuccessfulOutcome.h"
#include "NGAP_UnsuccessfulOutcome.h"
#include "NGAP_ProtocolIE-Field.h"
#include "NGAP_ProtocolIE-FieldPair.h"
#include "NGAP_ProtocolIE-ContainerPair.h"
#include "NGAP_ProtocolExtensionField.h"
#include "NGAP_ProtocolExtensionContainer.h"
#include "NGAP_asn_constant.h"
#include "NGAP_SupportedTAItem.h"
#include "NGAP_ServedGUAMIItem.h"
#include "NGAP_BroadcastPLMNItem.h"
#include "NGAP_SliceSupportItem.h"
#include "NGAP_PLMNSupportItem.h"
#include "NGAP_PDUSessionResourceSetupResponseTransfer.h"
#include "NGAP_PDUSessionResourceSetupUnsuccessfulTransfer.h"
#include "NGAP_PDUSessionResourceSetupItemCxtRes.h"
#include "NGAP_PDUSessionResourceFailedToSetupItemCxtRes.h"
#include "NGAP_PDUSessionResourceSetupItemSUReq.h"
#include "NGAP_PDUSessionResourceSetupItemSURes.h"
#include "NGAP_PDUSessionResourceFailedToSetupItemSURes.h"
#include "NGAP_AssociatedQosFlowItem.h"
#include "NGAP_PDUSessionResourceSetupRequestTransfer.h"
#include "NGAP_PDUSessionResourceSetupItemCxtReq.h"
#include "NGAP_QosFlowSetupRequestItem.h"
#include "NGAP_AllowedNSSAI-Item.h"
#include "NGAP_PDUSessionResourceModifyItemModRes.h"
#include "NGAP_PDUSessionResourceFailedToModifyItemModRes.h"
#include "NGAP_PDUSessionResourceModifyUnsuccessfulTransfer.h"
#include "NGAP_PDUSessionResourceReleasedItemRelRes.h"
#include "NGAP_PDUSessionResourceToReleaseItemRelCmd.h"
#include "NGAP_PDUSessionResourceModifyItemModReq.h"
#include "NGAP_PDUSessionResourceModifyRequestTransfer.h"
#include "NGAP_QosFlowAddOrModifyRequestItem.h"
#include "NGAP_PDUSessionResourceModifyResponseTransfer.h"
#include "NGAP_QosFlowAddOrModifyResponseList.h"
#include "NGAP_QosFlowAddOrModifyResponseItem.h"
#include "NGAP_TAIListForPagingItem.h"
#include "NGAP_GNB-ID.h"
#include "NGAP_GlobalGNB-ID.h"
#include "NGAP_GTPTunnel.h"
#include "NGAP_UE-NGAP-ID-pair.h"
#include "NGAP_UserLocationInformationNR.h"
#include "ngap_msg_includes.h"
/* Checking version of ASN1C compiler */
#if (ASN1C_ENVIRONMENT_VERSION < ASN1C_MINIMUM_VERSION)
......@@ -129,11 +84,6 @@ extern int asn1_xer_print;
**/
typedef int (*ngap_message_decoded_callback)(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu);
/** \brief Handle criticality
\param criticality Criticality of the IE
@returns void
**/
void ngap_handle_criticality(NGAP_Criticality_t criticality);
/** @}*/
#endif /* NGAP_COMMON_H_ */
......@@ -28,38 +28,41 @@
* @ingroup _ngap
*/
#include <pthread.h>
#include <openair3/NGAP/ngap_gNB.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "openair3/SECU/kdf.h"
#include "tree.h"
#include "queue.h"
#include <string.h>
#include <unistd.h>
#include "BIT_STRING.h"
#include "ngap_msg_includes.h"
#include "OCTET_STRING.h"
#include "PHY/defs_common.h"
#include "T.h"
#include "asn_internal.h"
#include "assertions.h"
#include "common/utils/T/T.h"
#include "conversions.h"
#include "ds/byte_array.h"
#include "intertask_interface.h"
#include "ngap_gNB_default_values.h"
#include "ngap_common.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB.h"
#include "ngap_gNB_context_management_procedures.h"
#include "ngap_gNB_default_values.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB_encoder.h"
#include "ngap_gNB_handlers.h"
#include "ngap_gNB_nnsf.h"
#include "ngap_gNB_nas_procedures.h"
#include "ngap_gNB_management_procedures.h"
#include "ngap_gNB_context_management_procedures.h"
#include "ngap_gNB_itti_messaging.h"
#include "ngap_gNB_management_procedures.h"
#include "ngap_gNB_nas_procedures.h"
#include "ngap_messages_types.h"
#include "oai_asn1.h"
#include "openair3/SECU/kdf.h"
#include "queue.h"
#include "s1ap_messages_types.h"
#include "sctp_messages_types.h"
#include "tree.h"
#include "ngap_gNB_ue_context.h" // test, to be removed
#include "assertions.h"
#include "conversions.h"
#if defined(TEST_S1C_AMF)
#include "oaisim_amf_test_s1c.h"
#endif
......
......@@ -28,7 +28,6 @@
* @ingroup _ngap
*/
#include <stdio.h>
#include <stdint.h>
/** @defgroup _ngap_impl_ NGAP Layer Reference Implementation
......
......@@ -27,30 +27,24 @@
* \version 1.0
* @ingroup _ngap
*/
#include "ngap_gNB_context_management_procedures.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "INTEGER.h"
#include "T.h"
#include "assertions.h"
#include "conversions.h"
#include "common/utils/T/T.h"
#include "intertask_interface.h"
#include "ngap_msg_includes.h"
#include "ngap_common.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB_itti_messaging.h"
#include "ngap_gNB_encoder.h"
#include "ngap_gNB_nnsf.h"
#include "ngap_gNB_ue_context.h"
#include "ngap_gNB_nas_procedures.h"
#include "ngap_gNB_itti_messaging.h"
#include "ngap_gNB_management_procedures.h"
#include "ngap_gNB_context_management_procedures.h"
#include "NGAP_PDUSessionResourceItemCxtRelReq.h"
#include "NGAP_PDUSessionResourceItemCxtRelCpl.h"
#include "ngap_gNB_ue_context.h"
#include "oai_asn1.h"
int ngap_ue_context_release_complete(instance_t instance,
ngap_ue_release_complete_t *ue_release_complete_p)
......
......@@ -28,6 +28,9 @@
* @ingroup _ngap
*/
#include "assertions.h"
#include "ngap_messages_types.h"
#ifndef NGAP_GNB_CONTEXT_MANAGEMENT_PROCEDURES_H_
#define NGAP_GNB_CONTEXT_MANAGEMENT_PROCEDURES_H_
......
......@@ -26,16 +26,17 @@
* \date 2020
* \version 0.1
*/
#include "ngap_gNB_decoder.h"
#include <stdio.h>
#include <stdlib.h>
#include "ngap_msg_includes.h"
#include "T.h"
#include "aper_decoder.h"
#include "asn_application.h"
#include "asn_codecs.h"
#include "assertions.h"
#include "intertask_interface.h"
#include "common/utils/T/T.h"
#include "ngap_common.h"
#include "ngap_gNB_decoder.h"
static int ngap_gNB_decode_initiating_message(NGAP_NGAP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
......
......@@ -27,6 +27,7 @@
*/
#include <stdint.h>
#include "NGAP_NGAP-PDU.h"
#ifndef NGAP_GNB_DECODER_H_
#define NGAP_GNB_DECODER_H_
......
......@@ -27,16 +27,19 @@
* \version 0.1
*/
#include <stdio.h>
#include <string.h>
#include "ngap_gNB_encoder.h"
#include <stdint.h>
#include <stdio.h>
#include "ngap_msg_includes.h"
#include "T.h"
#include "asn_application.h"
#include "asn_codecs.h"
#include "assertions.h"
#include "conversions.h"
#include "intertask_interface.h"
#include "common/utils/T/T.h"
#include "constr_TYPE.h"
#include "ngap_common.h"
#include "ngap_gNB_encoder.h"
#include "utils.h"
#include "xer_encoder.h"
static inline int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
{
......
......@@ -30,6 +30,9 @@
#ifndef NGAP_GNB_ENCODER_H_
#define NGAP_GNB_ENCODER_H_
#include <stdint.h>
#include "NGAP_NGAP-PDU.h"
int ngap_gNB_encode_pdu(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len)
__attribute__ ((warn_unused_result));
......
......@@ -27,26 +27,31 @@
* \version 0.1
*/
#include "ngap_gNB_handlers.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "INTEGER.h"
#include "ngap_msg_includes.h"
#include "OCTET_STRING.h"
#include "PHY/defs_common.h"
#include "T.h"
#include "assertions.h"
#include "common/utils/T/T.h"
#include "constr_TYPE.h"
#include "conversions.h"
#include "intertask_interface.h"
#include "ngap_common.h"
// #include "ngap_gNB.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB_handlers.h"
#include "ngap_gNB_decoder.h"
#include "ngap_gNB_ue_context.h"
#include "ngap_gNB_trace.h"
#include "ngap_gNB_nas_procedures.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB_management_procedures.h"
#include "ngap_gNB_default_values.h"
#include "assertions.h"
#include "conversions.h"
#include "NGAP_NonDynamic5QIDescriptor.h"
#include "ngap_gNB_nas_procedures.h"
#include "ngap_gNB_trace.h"
#include "ngap_gNB_ue_context.h"
#include "ngap_messages_types.h"
#include "oai_asn1.h"
#include "queue.h"
static void allocCopy(ngap_pdu_t *out, OCTET_STRING_t in)
{
......
......@@ -30,6 +30,9 @@
#ifndef NGAP_GNB_HANDLERS_H_
#define NGAP_GNB_HANDLERS_H_
#include <stdint.h>
#include "ngap_gNB_defs.h"
void ngap_handle_ng_setup_message(ngap_gNB_amf_data_t *amf_desc_p, int sctp_shutdown);
int ngap_gNB_handle_message(sctp_assoc_t assoc_id, int32_t stream, const uint8_t *const data, const uint32_t data_length);
......
......@@ -26,10 +26,12 @@
* \date 2020
* \version 0.1
*/
#include "intertask_interface.h"
#include "ngap_gNB_itti_messaging.h"
#include <stdlib.h>
#include <string.h>
#include "intertask_interface.h"
#include "ngap_messages_types.h"
#include "sctp_messages_types.h"
void ngap_gNB_itti_send_sctp_data_req(instance_t instance,
sctp_assoc_t assoc_id,
......
......@@ -30,6 +30,10 @@
#ifndef NGAP_GNB_ITTI_MESSAGING_H_
#define NGAP_GNB_ITTI_MESSAGING_H_
#include <assertions.h>
#include <netinet/sctp.h>
#include <stdint.h>
void ngap_gNB_itti_send_sctp_data_req(instance_t instance,
sctp_assoc_t assoc_id,
uint8_t *buffer,
......
......@@ -28,18 +28,16 @@
* @ingroup _ngap
*/
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "intertask_interface.h"
#include <string.h>
#include "assertions.h"
#include "conversions.h"
#include "ngap_common.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB.h"
#include "queue.h"
#include "tree.h"
ngap_gNB_internal_data_t ngap_gNB_internal_data;
......
......@@ -28,26 +28,36 @@
* @ingroup _ngap
*/
#include "ngap_gNB_nas_procedures.h"
#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "BIT_STRING.h"
#include "INTEGER.h"
#include "ngap_msg_includes.h"
#include "OCTET_STRING.h"
#include "PHY/defs_common.h"
#include "T.h"
#include "aper_encoder.h"
#include "asn_application.h"
#include "asn_codecs.h"
#include "assertions.h"
#include "common/utils/T/T.h"
#include "constr_TYPE.h"
#include "conversions.h"
#include "intertask_interface.h"
#include "ngap_common.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB_itti_messaging.h"
#include "ngap_gNB_encoder.h"
#include "ngap_gNB_itti_messaging.h"
#include "ngap_gNB_management_procedures.h"
#include "ngap_gNB_nnsf.h"
#include "ngap_gNB_ue_context.h"
#include "ngap_gNB_nas_procedures.h"
#include "ngap_gNB_management_procedures.h"
#include "oai_asn1.h"
#include "s1ap_messages_types.h"
#include "xer_encoder.h"
static void allocCopy(OCTET_STRING_t *out, ngap_pdu_t in)
{
......
......@@ -31,6 +31,11 @@
#ifndef NGAP_GNB_NAS_PROCEDURES_H_
#define NGAP_GNB_NAS_PROCEDURES_H_
#include <stdint.h>
#include "assertions.h"
#include "ngap_messages_types.h"
#include "ngap_msg_includes.h"
int ngap_gNB_handle_nas_downlink(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu);
int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_p);
......
......@@ -27,15 +27,11 @@
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
*/
#include "ngap_gNB_nnsf.h"
#include <stdio.h>
#include <stdlib.h>
#include "intertask_interface.h"
#include "ngap_common.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB_nnsf.h"
#include "queue.h"
#include "tree.h"
struct ngap_gNB_amf_data_s *
ngap_gNB_nnsf_select_amf(ngap_gNB_instance_t *instance_p,
......
......@@ -30,6 +30,10 @@
#ifndef NGAP_GNB_NNSF_H_
#define NGAP_GNB_NNSF_H_
#include <stdint.h>
#include "ngap_gNB_defs.h"
#include "ngap_messages_types.h"
struct ngap_gNB_amf_data_s *
ngap_gNB_nnsf_select_amf(ngap_gNB_instance_t *instance_p,
ngap_rrc_establishment_cause_t cause);
......
......@@ -27,24 +27,13 @@
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
*/
#include <stdio.h>
#include <stdlib.h>
#include "ngap_gNB_overload.h"
#include <stdint.h>
#include "intertask_interface.h"
#include "ngap_common.h"
#include <stdio.h>
#include "assertions.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB.h"
#include "ngap_gNB_ue_context.h"
#include "ngap_gNB_encoder.h"
#include "ngap_gNB_overload.h"
#include "ngap_gNB_management_procedures.h"
#include "assertions.h"
int ngap_gNB_handle_overload_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
//TODO
......
......@@ -30,6 +30,11 @@
#ifndef NGAP_GNB_OVERLOAD_H_
#define NGAP_GNB_OVERLOAD_H_
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <stdint.h>
#include "NGAP_NGAP-PDU.h"
/**
* \brief Handle an overload start message
**/
......
......@@ -27,23 +27,8 @@
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
*/
#include <stdint.h>
#include "assertions.h"
#include "intertask_interface.h"
#include "ngap_gNB_default_values.h"
#include "ngap_common.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB.h"
#include "ngap_gNB_ue_context.h"
#include "ngap_gNB_encoder.h"
#include "ngap_gNB_trace.h"
#include "ngap_gNB_itti_messaging.h"
#include "ngap_gNB_management_procedures.h"
#include <stdint.h>
int ngap_gNB_handle_trace_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
......
......@@ -30,6 +30,11 @@
#ifndef NGAP_GNB_TRACE_H_
#define NGAP_GNB_TRACE_H_
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <stdint.h>
#include "NGAP_NGAP-PDU.h"
int ngap_gNB_handle_trace_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu);
int ngap_gNB_handle_deactivate_trace(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu);
......
......@@ -27,18 +27,14 @@
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ngap_gNB_ue_context.h"
#include <stdint.h>
#include "tree.h"
#include "intertask_interface.h"
#include <stdio.h>
#include "PHY/defs_common.h"
#include "T.h"
#include "common/utils/T/T.h"
#include "ngap_common.h"
#include "ngap_gNB_defs.h"
#include "ngap_gNB_ue_context.h"
#include "tree.h"
/* Tree of UE ordered by gNB_ue_ngap_id's
* NO INSTANCE, the 32 bits id is large enough to handle all UEs, regardless the cell, gNB, ...
......
......@@ -26,11 +26,10 @@
* \version 0.1
* \email: yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com (yoshio.inoue%40fujitsu.com%2cmasayuki.harada%40fujitsu.com)
*/
#include "tree.h"
#include "queue.h"
#include <stdint.h>
#include "ngap_gNB_defs.h"
#include "tree.h"
#ifndef NGAP_GNB_UE_CONTEXT_H_
#define NGAP_GNB_UE_CONTEXT_H_
......
/*
* 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
*/
/*! \file ngap_msg_includes.h
* \brief NGAP ASN.1 message includes
* \author Guido Casati
* \date 2024
* \email: hello@guidocasati.com
* \version 1.0
* @ingroup _ngap
*
* This header file contains the includes for the NGAP ASN.1 messages,
* generated from the ASN.1 specifications.
*/
#ifndef NGAP_MSG_INCLUDES_H
#define NGAP_MSG_INCLUDES_H
#include "NGAP_AllowedNSSAI-Item.h"
#include "NGAP_AssociatedQosFlowItem.h"
#include "NGAP_BroadcastPLMNItem.h"
#include "NGAP_GlobalGNB-ID.h"
#include "NGAP_GTPTunnel.h"
#include "NGAP_InitiatingMessage.h"
#include "NGAP_NGAP-PDU.h"
#include "NGAP_PDUSessionResourceFailedToModifyItemModRes.h"
#include "NGAP_PDUSessionResourceFailedToSetupItemCxtRes.h"
#include "NGAP_PDUSessionResourceFailedToSetupItemSURes.h"
#include "NGAP_PDUSessionResourceItemCxtRelCpl.h"
#include "NGAP_PDUSessionResourceItemCxtRelReq.h"
#include "NGAP_PDUSessionResourceModifyItemModReq.h"
#include "NGAP_PDUSessionResourceModifyItemModRes.h"
#include "NGAP_PDUSessionResourceModifyResponseTransfer.h"
#include "NGAP_PDUSessionResourceModifyUnsuccessfulTransfer.h"
#include "NGAP_PDUSessionResourceReleasedItemRelRes.h"
#include "NGAP_PDUSessionResourceSetupItemCxtReq.h"
#include "NGAP_PDUSessionResourceSetupItemCxtRes.h"
#include "NGAP_PDUSessionResourceSetupItemSUReq.h"
#include "NGAP_PDUSessionResourceSetupItemSURes.h"
#include "NGAP_PDUSessionResourceSetupResponseTransfer.h"
#include "NGAP_PDUSessionResourceSetupUnsuccessfulTransfer.h"
#include "NGAP_PDUSessionResourceToReleaseItemRelCmd.h"
#include "NGAP_PLMNSupportItem.h"
#include "NGAP_ProtocolIE-Field.h"
#include "NGAP_QosFlowAddOrModifyResponseItem.h"
#include "NGAP_QosFlowAddOrModifyResponseList.h"
#include "NGAP_ServedGUAMIItem.h"
#include "NGAP_SliceSupportItem.h"
#include "NGAP_SuccessfulOutcome.h"
#include "NGAP_SupportedTAItem.h"
#include "NGAP_TAIListForPagingItem.h"
#include "NGAP_UE-NGAP-ID-pair.h"
#include "NGAP_UnsuccessfulOutcome.h"
#include "NGAP_UserLocationInformationNR.h"
#include "NGAP_asn_constant.h"
#endif // NGAP_MSG_INCLUDES_H
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment