Add NGAP DOWNLINK NON UE ASSOCIATED NRPPA TRANSPORT message decoding

Reference: 3GPP 38.413 v16.0.0

Mandatory fields:
Routing ID (supported)
NRPPa-PDU (supported)
This commit is contained in:
Rakesh Mundlamuri
2026-02-27 17:51:27 +05:30
parent d4c0431cc7
commit 040b25bf00
4 changed files with 53 additions and 0 deletions
+4
View File
@@ -94,3 +94,7 @@ MESSAGE_DEF(NGAP_DOWNLINKUEASSOCIATEDNRPPA,
MESSAGE_PRIORITY_MED, MESSAGE_PRIORITY_MED,
ngap_downlink_ue_associated_nrppa_t, ngap_downlink_ue_associated_nrppa_t,
ngap_downlink_ue_associated_nrppa) ngap_downlink_ue_associated_nrppa)
MESSAGE_DEF(NGAP_DOWNLINKNONUEASSOCIATEDNRPPA,
MESSAGE_PRIORITY_MED,
ngap_downlink_non_ue_associated_nrppa_t,
ngap_downlink_non_ue_associated_nrppa)
+9
View File
@@ -80,6 +80,7 @@
#define NGAP_DL_RAN_STATUS_TRANSFER(mSGpTR) (mSGpTR)->ittiMsg.ngap_dl_ran_status_transfer #define NGAP_DL_RAN_STATUS_TRANSFER(mSGpTR) (mSGpTR)->ittiMsg.ngap_dl_ran_status_transfer
#define NGAP_DOWNLINKUEASSOCIATEDNRPPA(mSGpTR) (mSGpTR)->ittiMsg.ngap_downlink_ue_associated_nrppa #define NGAP_DOWNLINKUEASSOCIATEDNRPPA(mSGpTR) (mSGpTR)->ittiMsg.ngap_downlink_ue_associated_nrppa
#define NGAP_DOWNLINKNONUEASSOCIATEDNRPPA(mSGpTR) (mSGpTR)->ittiMsg.ngap_downlink_non_ue_associated_nrppa
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
/* Length of the transport layer address string /* Length of the transport layer address string
@@ -1040,4 +1041,12 @@ typedef struct {
byte_array_t nrppa_pdu; byte_array_t nrppa_pdu;
} ngap_downlink_ue_associated_nrppa_t; } ngap_downlink_ue_associated_nrppa_t;
// Downlink NON UE Associated NRPPA Transport message (9.2.9.3 3GPP 38.413 v16.0.0)
typedef struct {
// Routing ID (Mandatory)
byte_array_t routing_id;
// NRPPa pdu (Mandatory)
byte_array_t nrppa_pdu;
} ngap_downlink_non_ue_associated_nrppa_t;
#endif /* NGAP_MESSAGES_TYPES_H_ */ #endif /* NGAP_MESSAGES_TYPES_H_ */
@@ -275,3 +275,40 @@ int ngap_gNB_handle_downlink_ue_associated_nrppa_transport(sctp_assoc_t assoc_id
return 0; return 0;
} }
// handle DOWNLINK NON UE ASSOCIATED NRPPA TRANSPORT (9.2.9.3 of TS 38.413 Version 16.0.0)
int ngap_gNB_handle_downlink_non_ue_associated_nrppa_transport(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu)
{
DevAssert(pdu != NULL);
ngap_gNB_amf_data_t *amf_desc_p = NULL;
if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) {
NGAP_ERROR("[SCTP %d] Received NRPPa downlink message for non existing AMF context\n", assoc_id);
return -1;
}
ngap_gNB_instance_t *ngap_gNB_instance = NULL;
ngap_gNB_instance = amf_desc_p->ngap_gNB_instance;
MessageDef *msg = itti_alloc_new_message(TASK_NGAP, 0, NGAP_DOWNLINKNONUEASSOCIATEDNRPPA);
ngap_downlink_non_ue_associated_nrppa_t *dl_non_ue_assoc_nrppa = &NGAP_DOWNLINKNONUEASSOCIATEDNRPPA(msg);
// Prepare the NGAP message to forward to NRPPA
NGAP_DownlinkNonUEAssociatedNRPPaTransport_t *container;
NGAP_DownlinkNonUEAssociatedNRPPaTransportIEs_t *ie;
// IE: 9.3.1.1 Message Type
container = &pdu->choice.initiatingMessage->value.choice.DownlinkNonUEAssociatedNRPPaTransport;
// IE: 9.3.3.13 Routing ID
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_DownlinkNonUEAssociatedNRPPaTransportIEs_t, ie, container, NGAP_ProtocolIE_ID_id_RoutingID, true);
dl_non_ue_assoc_nrppa->routing_id = create_byte_array(ie->value.choice.RoutingID.size, ie->value.choice.RoutingID.buf);
// IE: 9.3.3.14 NRPPa-PDU
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_DownlinkNonUEAssociatedNRPPaTransportIEs_t, ie, container, NGAP_ProtocolIE_ID_id_NRPPa_PDU, true);
dl_non_ue_assoc_nrppa->nrppa_pdu = create_byte_array(ie->value.choice.NRPPa_PDU.size, ie->value.choice.NRPPa_PDU.buf);
itti_send_msg_to_task(TASK_NRPPA, ngap_gNB_instance->instance, msg);
return 0;
}
@@ -31,4 +31,7 @@ int ngap_gNB_uplink_non_ue_associated_nrppa_transport(instance_t instance, const
// DOWNLINK UE ASSOCIATED NRPPA TRANSPORT (9.2.9.1 of TS 38.413 Version 16.0.0) // DOWNLINK UE ASSOCIATED NRPPA TRANSPORT (9.2.9.1 of TS 38.413 Version 16.0.0)
int ngap_gNB_handle_downlink_ue_associated_nrppa_transport(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu); int ngap_gNB_handle_downlink_ue_associated_nrppa_transport(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu);
// DOWNLINK UE ASSOCIATED NRPPA TRANSPORT (9.2.9.3 of TS 38.413 Version 16.0.0)
int ngap_gNB_handle_downlink_non_ue_associated_nrppa_transport(sctp_assoc_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu);
#endif /* NGAP_GNB_NRPPA_PROCEDURES_H_ */ #endif /* NGAP_GNB_NRPPA_PROCEDURES_H_ */