Cleanup dead NGAP code

The goal of this commit is to keep the NGAP library tidy and
remove all handlers that are not currently implemented and other
dead code.
This commit is contained in:
Guido Casati
2025-10-20 09:10:25 +02:00
committed by Guido Casati
parent f4c4e02d78
commit 711c632001
7 changed files with 4 additions and 90 deletions

View File

@@ -420,7 +420,6 @@ add_library(ngap
${NGAP_DIR}/ngap_gNB_pdu_session_management.c
${NGAP_DIR}/ngap_gNB_nnsf.c
${NGAP_DIR}/ngap_gNB_overload.c
${NGAP_DIR}/ngap_gNB_trace.c
${NGAP_DIR}/ngap_gNB_ue_context.c
${NGAP_DIR}/ngap_gNB_NRPPa_transport_procedures.c
)

View File

@@ -31,9 +31,6 @@
#define NGAP_UE_CTXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.ngap_ue_ctxt_modification_fail
#define NGAP_PDUSESSION_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_setup_resp
#define NGAP_PDUSESSION_MODIFY_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_modify_resp
#define NGAP_PATH_SWITCH_REQ(mSGpTR) (mSGpTR)->ittiMsg.ngap_path_switch_req
#define NGAP_PATH_SWITCH_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.ngap_path_switch_req_ack
#define NGAP_PDUSESSION_MODIFICATION_IND(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_modification_ind
#define NGAP_DOWNLINK_NAS(mSGpTR) (mSGpTR)->ittiMsg.ngap_downlink_nas
#define NGAP_INITIAL_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.ngap_initial_context_setup_req

View File

@@ -30,7 +30,6 @@
#include "ngap_gNB_nas_procedures.h"
#include "ngap_gNB_paging.h"
#include "ngap_gNB_NRPPa_transport_procedures.h"
#include "ngap_gNB_trace.h"
#include "ngap_gNB_ue_context.h"
#include "ngap_messages_types.h"
#include "oai_asn1.h"
@@ -1370,24 +1369,6 @@ static int ngap_gNB_handle_pdusession_release_command(sctp_assoc_t assoc_id, uin
return 0;
}
static int ngap_gNB_handle_ng_path_switch_request_ack(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
// TODO
return 0;
}
static int ngap_gNB_handle_ng_path_switch_request_failure(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
// TODO
return 0;
}
static int ngap_gNB_handle_ng_ENDC_pdusession_modification_confirm(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
LOG_W(NGAP, "Implementation of NGAP Pdusession Modification confirm handler is pending...\n");
return 0;
}
static int ngap_gNB_handle_dl_ran_status_transfer(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
DevAssert(pdu != NULL);
@@ -1489,7 +1470,7 @@ const ngap_message_decoded_callback ngap_messages_callback[][3] = {
{0, 0, 0}, /* AMFConfigurationUpdate */
{0, 0, 0}, /* AMFStatusIndication */
{0, 0, 0}, /* CellTrafficTrace */
{ngap_gNB_handle_deactivate_trace, 0, 0}, /* DeactivateTrace */
{0, 0, 0}, /* DeactivateTrace */
{ngap_gNB_handle_nas_downlink, 0, 0}, /* DownlinkNASTransport */
{ngap_gNB_handle_downlink_non_ue_associated_nrppa_transport, 0, 0}, /* DownlinkNonUEAssociatedNRPPaTransport */
{0, 0, 0}, /* DownlinkRANConfigurationTransfer */
@@ -1511,9 +1492,9 @@ const ngap_message_decoded_callback ngap_messages_callback[][3] = {
{0, 0, 0}, /* OverloadStart */
{0, 0, 0}, /* OverloadStop */
{ngap_gNB_handle_paging, 0, 0}, /* Paging */
{0, ngap_gNB_handle_ng_path_switch_request_ack, ngap_gNB_handle_ng_path_switch_request_failure}, /* PathSwitchRequest */
{0, 0, 0}, /* PathSwitchRequest */
{ngap_gNB_handle_pdusession_modify_request, 0, 0}, /* PDUSessionResourceModify */
{0, ngap_gNB_handle_ng_ENDC_pdusession_modification_confirm, 0}, /* PDUSessionResourceModifyIndication */
{0, 0, 0}, /* PDUSessionResourceModifyIndication */
{ngap_gNB_handle_pdusession_release_command, 0, 0}, /* PDUSessionResourceRelease */
{ngap_gNB_handle_pdusession_setup_request, 0, 0}, /* PDUSessionResourceSetup */
{0, 0, 0}, /* PDUSessionResourceNotify */
@@ -1525,7 +1506,7 @@ const ngap_message_decoded_callback ngap_messages_callback[][3] = {
{0, 0, 0}, /* RerouteNASRequest */
{0, 0, 0}, /* RRCInactiveTransitionReport */
{0, 0, 0}, /* TraceFailureIndication */
{ngap_gNB_handle_trace_start, 0, 0}, /* TraceStart */
{0, 0, 0}, /* TraceStart */
{0, 0, 0}, /* UEContextModification */
{ngap_gNB_handle_ue_context_release_command, 0, 0}, /* UEContextRelease */
{0, 0, 0}, /* UEContextReleaseRequest */

View File

@@ -13,12 +13,6 @@
#include "ngap_gNB_defs.h"
#include "ngap_gNB_management_procedures.h"
int ngap_gNB_handle_overload_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
//TODO
return 0;
}
int ngap_gNB_handle_overload_stop(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
/* We received Overload stop message, meaning that the AMF is no more

View File

@@ -14,20 +14,9 @@
#include <stdint.h>
#include "NGAP_NGAP-PDU.h"
/**
* \brief Handle an overload start message
**/
// int ngap_gNB_handle_overload_start(gNB_amf_desc_t *gNB_desc_p,
// sctp_queue_item_t *packet_p,
// struct ngap_message_s *message_p);
int ngap_gNB_handle_overload_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu);
/**
* \brief Handle an overload stop message
**/
// int ngap_gNB_handle_overload_stop(gNB_amf_desc_t *gNB_desc_p,
// sctp_queue_item_t *packet_p,
// struct ngap_message_s *message_p);
int ngap_gNB_handle_overload_stop(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu);
#endif /* NGAP_GNB_OVERLOAD_H_ */

View File

@@ -1,25 +0,0 @@
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
/*!
* \brief ngap trace procedures for gNB
*/
#include "ngap_gNB_trace.h"
#include <stdint.h>
int ngap_gNB_handle_trace_start(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
//TODO
return 0;
}
int ngap_gNB_handle_deactivate_trace(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *message_p)
{
// NGAP_DeactivateTraceIEs_t *deactivate_trace_p;
//
// deactivate_trace_p = &message_p->msg.deactivateTraceIEs;
return 0;
}

View File

@@ -1,21 +0,0 @@
/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
/*!
* \brief ngap trace procedures for gNB
*/
#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);
#endif /* NGAP_GNB_TRACE_H_ */