Commit 9c462934 authored by heshanyun's avatar heshanyun

fix compile issue about build ngap asn file

parent 1aac2287
...@@ -451,7 +451,7 @@ set(NGAP_ASN_DIR ${NGAP_DIR}/MESSAGES/ASN1/ASN1_files) ...@@ -451,7 +451,7 @@ set(NGAP_ASN_DIR ${NGAP_DIR}/MESSAGES/ASN1/ASN1_files)
set(NGAP_C_DIR ${asn1_generated_dir}/NGAP_${NGAP_RELEASE}) set(NGAP_C_DIR ${asn1_generated_dir}/NGAP_${NGAP_RELEASE})
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make # Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" "NGAP_" -fno-include-deps execute_process(COMMAND ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "${NGAP_C_DIR}" "${NGAP_ASN_DIR}/${NGAP_ASN_FILES}" "NGAP_" -fno-include-deps -findirect-choice
RESULT_VARIABLE ret) RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0) if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${ret}: error") message(FATAL_ERROR "${ret}: error")
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -79,6 +79,11 @@ ...@@ -79,6 +79,11 @@
#include "NGAP_PDUSessionResourceModifyRequestTransfer.h" #include "NGAP_PDUSessionResourceModifyRequestTransfer.h"
#include "NGAP_QosFlowAddOrModifyRequestItem.h" #include "NGAP_QosFlowAddOrModifyRequestItem.h"
#include "NGAP_TAIListForPagingItem.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"
/* Checking version of ASN1C compiler */ /* Checking version of ASN1C compiler */
#if (ASN1C_ENVIRONMENT_VERSION < ASN1C_MINIMUM_VERSION) #if (ASN1C_ENVIRONMENT_VERSION < ASN1C_MINIMUM_VERSION)
......
...@@ -469,28 +469,30 @@ static int ngap_gNB_generate_ng_setup_request( ...@@ -469,28 +469,30 @@ static int ngap_gNB_generate_ng_setup_request(
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage.procedureCode = NGAP_ProcedureCode_id_NGSetup; pdu.choice.initiatingMessage = CALLOC(1, sizeof(struct NGAP_InitiatingMessage));
pdu.choice.initiatingMessage.criticality = NGAP_Criticality_reject; pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_NGSetup;
pdu.choice.initiatingMessage.value.present = NGAP_InitiatingMessage__value_PR_NGSetupRequest; pdu.choice.initiatingMessage->criticality = NGAP_Criticality_reject;
out = &pdu.choice.initiatingMessage.value.choice.NGSetupRequest; pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_NGSetupRequest;
out = &pdu.choice.initiatingMessage->value.choice.NGSetupRequest;
/* mandatory */ /* mandatory */
ie = (NGAP_NGSetupRequestIEs_t *)calloc(1, sizeof(NGAP_NGSetupRequestIEs_t)); ie = (NGAP_NGSetupRequestIEs_t *)calloc(1, sizeof(NGAP_NGSetupRequestIEs_t));
ie->id = NGAP_ProtocolIE_ID_id_GlobalRANNodeID; ie->id = NGAP_ProtocolIE_ID_id_GlobalRANNodeID;
ie->criticality = NGAP_Criticality_reject; ie->criticality = NGAP_Criticality_reject;
ie->value.present = NGAP_NGSetupRequestIEs__value_PR_GlobalRANNodeID; ie->value.present = NGAP_NGSetupRequestIEs__value_PR_GlobalRANNodeID;
ie->value.choice.GlobalRANNodeID.present = NGAP_GlobalRANNodeID_PR_globalGNB_ID; ie->value.choice.GlobalRANNodeID.present = NGAP_GlobalRANNodeID_PR_globalGNB_ID;
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID = CALLOC(1, sizeof(struct NGAP_GlobalGNB_ID));
MCC_MNC_TO_PLMNID(instance_p->mcc[ngap_amf_data_p->broadcast_plmn_index[0]], MCC_MNC_TO_PLMNID(instance_p->mcc[ngap_amf_data_p->broadcast_plmn_index[0]],
instance_p->mnc[ngap_amf_data_p->broadcast_plmn_index[0]], instance_p->mnc[ngap_amf_data_p->broadcast_plmn_index[0]],
instance_p->mnc_digit_length[ngap_amf_data_p->broadcast_plmn_index[0]], instance_p->mnc_digit_length[ngap_amf_data_p->broadcast_plmn_index[0]],
&ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.pLMNIdentity); &(ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID->pLMNIdentity));
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.present = NGAP_GNB_ID_PR_gNB_ID; ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID->gNB_ID.present = NGAP_GNB_ID_PR_gNB_ID;
MACRO_GNB_ID_TO_BIT_STRING(instance_p->gNB_id, MACRO_GNB_ID_TO_BIT_STRING(instance_p->gNB_id,
&ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID); &ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID->gNB_ID.choice.gNB_ID);
NGAP_INFO("%u -> %02x%02x%02x%02x\n", instance_p->gNB_id, NGAP_INFO("%u -> %02x%02x%02x%02x\n", instance_p->gNB_id,
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID.buf[0], ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID->gNB_ID.choice.gNB_ID.buf[0],
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID.buf[1], ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID->gNB_ID.choice.gNB_ID.buf[1],
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID.buf[2], ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID->gNB_ID.choice.gNB_ID.buf[2],
ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID.gNB_ID.choice.gNB_ID.buf[3]); ie->value.choice.GlobalRANNodeID.choice.globalGNB_ID->gNB_ID.choice.gNB_ID.buf[3]);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* optional */ /* optional */
......
...@@ -84,10 +84,11 @@ int ngap_ue_context_release_complete(instance_t instance, ...@@ -84,10 +84,11 @@ int ngap_ue_context_release_complete(instance_t instance,
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome;
pdu.choice.successfulOutcome.procedureCode = NGAP_ProcedureCode_id_UEContextRelease; pdu.choice.successfulOutcome = CALLOC(1, sizeof(struct NGAP_SuccessfulOutcome));
pdu.choice.successfulOutcome.criticality = NGAP_Criticality_reject; pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_UEContextRelease;
pdu.choice.successfulOutcome.value.present = NGAP_SuccessfulOutcome__value_PR_UEContextReleaseComplete; pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject;
out = &pdu.choice.successfulOutcome.value.choice.UEContextReleaseComplete; pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_UEContextReleaseComplete;
out = &pdu.choice.successfulOutcome->value.choice.UEContextReleaseComplete;
/* mandatory */ /* mandatory */
ie = (NGAP_UEContextReleaseComplete_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseComplete_IEs_t)); ie = (NGAP_UEContextReleaseComplete_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseComplete_IEs_t));
...@@ -178,10 +179,11 @@ int ngap_ue_context_release_req(instance_t instance, ...@@ -178,10 +179,11 @@ int ngap_ue_context_release_req(instance_t instance,
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage.procedureCode = NGAP_ProcedureCode_id_UEContextReleaseRequest; pdu.choice.initiatingMessage = CALLOC(1, sizeof(struct NGAP_InitiatingMessage));
pdu.choice.initiatingMessage.criticality = NGAP_Criticality_ignore; pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_UEContextReleaseRequest;
pdu.choice.initiatingMessage.value.present = NGAP_InitiatingMessage__value_PR_UEContextReleaseRequest; pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore;
out = &pdu.choice.initiatingMessage.value.choice.UEContextReleaseRequest; pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_UEContextReleaseRequest;
out = &pdu.choice.initiatingMessage->value.choice.UEContextReleaseRequest;
/* mandatory */ /* mandatory */
ie = (NGAP_UEContextReleaseRequest_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseRequest_IEs_t)); ie = (NGAP_UEContextReleaseRequest_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseRequest_IEs_t));
......
...@@ -40,7 +40,7 @@ static int ngap_gNB_decode_initiating_message(NGAP_NGAP_PDU_t *pdu) { ...@@ -40,7 +40,7 @@ static int ngap_gNB_decode_initiating_message(NGAP_NGAP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
switch(pdu->choice.initiatingMessage.procedureCode) { switch(pdu->choice.initiatingMessage->procedureCode) {
case NGAP_ProcedureCode_id_DownlinkNASTransport: case NGAP_ProcedureCode_id_DownlinkNASTransport:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu);
free(res.buffer); free(res.buffer);
...@@ -88,9 +88,9 @@ static int ngap_gNB_decode_initiating_message(NGAP_NGAP_PDU_t *pdu) { ...@@ -88,9 +88,9 @@ static int ngap_gNB_decode_initiating_message(NGAP_NGAP_PDU_t *pdu) {
default: default:
NGAP_ERROR("Unknown procedure ID (%d) for initiating message\n", NGAP_ERROR("Unknown procedure ID (%d) for initiating message\n",
(int)pdu->choice.initiatingMessage.procedureCode); (int)pdu->choice.initiatingMessage->procedureCode);
AssertFatal( 0, "Unknown procedure ID (%d) for initiating message\n", AssertFatal( 0, "Unknown procedure ID (%d) for initiating message\n",
(int)pdu->choice.initiatingMessage.procedureCode); (int)pdu->choice.initiatingMessage->procedureCode);
return -1; return -1;
} }
...@@ -101,7 +101,7 @@ static int ngap_gNB_decode_successful_outcome(NGAP_NGAP_PDU_t *pdu) { ...@@ -101,7 +101,7 @@ static int ngap_gNB_decode_successful_outcome(NGAP_NGAP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
switch(pdu->choice.successfulOutcome.procedureCode) { switch(pdu->choice.successfulOutcome->procedureCode) {
case NGAP_ProcedureCode_id_NGSetup: case NGAP_ProcedureCode_id_NGSetup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu);
free(res.buffer); free(res.buffer);
...@@ -120,7 +120,7 @@ static int ngap_gNB_decode_successful_outcome(NGAP_NGAP_PDU_t *pdu) { ...@@ -120,7 +120,7 @@ static int ngap_gNB_decode_successful_outcome(NGAP_NGAP_PDU_t *pdu) {
default: default:
NGAP_ERROR("Unknown procedure ID (%d) for successfull outcome message\n", NGAP_ERROR("Unknown procedure ID (%d) for successfull outcome message\n",
(int)pdu->choice.successfulOutcome.procedureCode); (int)pdu->choice.successfulOutcome->procedureCode);
return -1; return -1;
} }
...@@ -131,7 +131,7 @@ static int ngap_gNB_decode_unsuccessful_outcome(NGAP_NGAP_PDU_t *pdu) { ...@@ -131,7 +131,7 @@ static int ngap_gNB_decode_unsuccessful_outcome(NGAP_NGAP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
switch(pdu->choice.unsuccessfulOutcome.procedureCode) { switch(pdu->choice.unsuccessfulOutcome->procedureCode) {
case NGAP_ProcedureCode_id_NGSetup: case NGAP_ProcedureCode_id_NGSetup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu);
free(res.buffer); free(res.buffer);
...@@ -143,7 +143,7 @@ static int ngap_gNB_decode_unsuccessful_outcome(NGAP_NGAP_PDU_t *pdu) { ...@@ -143,7 +143,7 @@ static int ngap_gNB_decode_unsuccessful_outcome(NGAP_NGAP_PDU_t *pdu) {
default: default:
NGAP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n", NGAP_ERROR("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
(int)pdu->choice.unsuccessfulOutcome.procedureCode); (int)pdu->choice.unsuccessfulOutcome->procedureCode);
return -1; return -1;
} }
......
...@@ -82,7 +82,7 @@ int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu, ...@@ -82,7 +82,7 @@ int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu,
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
switch(pdu->choice.initiatingMessage.procedureCode) { switch(pdu->choice.initiatingMessage->procedureCode) {
case NGAP_ProcedureCode_id_NGSetup: case NGAP_ProcedureCode_id_NGSetup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu);
free(res.buffer); free(res.buffer);
...@@ -125,7 +125,7 @@ int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu, ...@@ -125,7 +125,7 @@ int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu,
default: default:
NGAP_DEBUG("Unknown procedure ID (%d) for initiating message\n", NGAP_DEBUG("Unknown procedure ID (%d) for initiating message\n",
(int)pdu->choice.initiatingMessage.procedureCode); (int)pdu->choice.initiatingMessage->procedureCode);
return -1; return -1;
} }
...@@ -146,7 +146,7 @@ int ngap_gNB_encode_successfull_outcome(NGAP_NGAP_PDU_t *pdu, ...@@ -146,7 +146,7 @@ int ngap_gNB_encode_successfull_outcome(NGAP_NGAP_PDU_t *pdu,
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
switch(pdu->choice.successfulOutcome.procedureCode) { switch(pdu->choice.successfulOutcome->procedureCode) {
case NGAP_ProcedureCode_id_InitialContextSetup: case NGAP_ProcedureCode_id_InitialContextSetup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu);
free(res.buffer); free(res.buffer);
...@@ -177,7 +177,7 @@ int ngap_gNB_encode_successfull_outcome(NGAP_NGAP_PDU_t *pdu, ...@@ -177,7 +177,7 @@ int ngap_gNB_encode_successfull_outcome(NGAP_NGAP_PDU_t *pdu,
default: default:
NGAP_WARN("Unknown procedure ID (%d) for successfull outcome message\n", NGAP_WARN("Unknown procedure ID (%d) for successfull outcome message\n",
(int)pdu->choice.successfulOutcome.procedureCode); (int)pdu->choice.successfulOutcome->procedureCode);
return -1; return -1;
} }
...@@ -198,7 +198,7 @@ int ngap_gNB_encode_unsuccessfull_outcome(NGAP_NGAP_PDU_t *pdu, ...@@ -198,7 +198,7 @@ int ngap_gNB_encode_unsuccessfull_outcome(NGAP_NGAP_PDU_t *pdu,
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
switch(pdu->choice.unsuccessfulOutcome.procedureCode) { switch(pdu->choice.unsuccessfulOutcome->procedureCode) {
case NGAP_ProcedureCode_id_InitialContextSetup: case NGAP_ProcedureCode_id_InitialContextSetup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu);
free(res.buffer); free(res.buffer);
...@@ -206,7 +206,7 @@ int ngap_gNB_encode_unsuccessfull_outcome(NGAP_NGAP_PDU_t *pdu, ...@@ -206,7 +206,7 @@ int ngap_gNB_encode_unsuccessfull_outcome(NGAP_NGAP_PDU_t *pdu,
default: default:
NGAP_DEBUG("Unknown procedure ID (%d) for unsuccessfull outcome message\n", NGAP_DEBUG("Unknown procedure ID (%d) for unsuccessfull outcome message\n",
(int)pdu->choice.unsuccessfulOutcome.procedureCode); (int)pdu->choice.unsuccessfulOutcome->procedureCode);
return -1; return -1;
} }
......
...@@ -229,11 +229,11 @@ int ngap_gNB_handle_message(uint32_t assoc_id, int32_t stream, ...@@ -229,11 +229,11 @@ int ngap_gNB_handle_message(uint32_t assoc_id, int32_t stream,
} }
/* Checking procedure Code and direction of message */ /* Checking procedure Code and direction of message */
if (pdu.choice.initiatingMessage.procedureCode >= sizeof(ngap_messages_callback) / (3 * sizeof( if (pdu.choice.initiatingMessage->procedureCode >= sizeof(ngap_messages_callback) / (3 * sizeof(
ngap_message_decoded_callback)) ngap_message_decoded_callback))
|| (pdu.present > NGAP_NGAP_PDU_PR_unsuccessfulOutcome)) { || (pdu.present > NGAP_NGAP_PDU_PR_unsuccessfulOutcome)) {
NGAP_ERROR("[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n", NGAP_ERROR("[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n",
assoc_id, pdu.choice.initiatingMessage.procedureCode, pdu.present); assoc_id, pdu.choice.initiatingMessage->procedureCode, pdu.present);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu);
return -1; return -1;
} }
...@@ -241,16 +241,16 @@ int ngap_gNB_handle_message(uint32_t assoc_id, int32_t stream, ...@@ -241,16 +241,16 @@ int ngap_gNB_handle_message(uint32_t assoc_id, int32_t stream,
/* No handler present. /* No handler present.
* This can mean not implemented or no procedure for gNB (wrong direction). * This can mean not implemented or no procedure for gNB (wrong direction).
*/ */
if (ngap_messages_callback[pdu.choice.initiatingMessage.procedureCode][pdu.present - 1] == NULL) { if (ngap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1] == NULL) {
NGAP_ERROR("[SCTP %d] No handler for procedureCode %ld in %s\n", NGAP_ERROR("[SCTP %d] No handler for procedureCode %ld in %s\n",
assoc_id, pdu.choice.initiatingMessage.procedureCode, assoc_id, pdu.choice.initiatingMessage->procedureCode,
ngap_direction2String(pdu.present - 1)); ngap_direction2String(pdu.present - 1));
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu);
return -1; return -1;
} }
/* Calling the right handler */ /* Calling the right handler */
ret = (*ngap_messages_callback[pdu.choice.initiatingMessage.procedureCode][pdu.present - 1]) ret = (*ngap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1])
(assoc_id, stream, &pdu); (assoc_id, stream, &pdu);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu);
return ret; return ret;
...@@ -264,7 +264,7 @@ int ngap_gNB_handle_ng_setup_failure(uint32_t assoc_id, ...@@ -264,7 +264,7 @@ int ngap_gNB_handle_ng_setup_failure(uint32_t assoc_id,
NGAP_NGSetupFailureIEs_t *ie; NGAP_NGSetupFailureIEs_t *ie;
ngap_gNB_amf_data_t *amf_desc_p; ngap_gNB_amf_data_t *amf_desc_p;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
container = &pdu->choice.unsuccessfulOutcome.value.choice.NGSetupFailure; container = &pdu->choice.unsuccessfulOutcome->value.choice.NGSetupFailure;
/* S1 Setup Failure == Non UE-related procedure -> stream 0 */ /* S1 Setup Failure == Non UE-related procedure -> stream 0 */
if (stream != 0) { if (stream != 0) {
...@@ -302,7 +302,7 @@ int ngap_gNB_handle_ng_setup_response(uint32_t assoc_id, ...@@ -302,7 +302,7 @@ int ngap_gNB_handle_ng_setup_response(uint32_t assoc_id,
ngap_gNB_amf_data_t *amf_desc_p; ngap_gNB_amf_data_t *amf_desc_p;
int i; int i;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
container = &pdu->choice.successfulOutcome.value.choice.NGSetupResponse; container = &pdu->choice.successfulOutcome->value.choice.NGSetupResponse;
/* NG Setup Response == Non UE-related procedure -> stream 0 */ /* NG Setup Response == Non UE-related procedure -> stream 0 */
if (stream != 0) { if (stream != 0) {
...@@ -462,7 +462,7 @@ int ngap_gNB_handle_error_indication(uint32_t assoc_id, ...@@ -462,7 +462,7 @@ int ngap_gNB_handle_error_indication(uint32_t assoc_id,
uint64_t amf_ue_ngap_id; uint64_t amf_ue_ngap_id;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
container = &pdu->choice.initiatingMessage.value.choice.ErrorIndication; container = &pdu->choice.initiatingMessage->value.choice.ErrorIndication;
/* NG Setup Failure == Non UE-related procedure -> stream 0 */ /* NG Setup Failure == Non UE-related procedure -> stream 0 */
if (stream != 0) { if (stream != 0) {
...@@ -845,7 +845,7 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, ...@@ -845,7 +845,7 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id,
NGAP_RAN_UE_NGAP_ID_t ran_ue_ngap_id; NGAP_RAN_UE_NGAP_ID_t ran_ue_ngap_id;
uint64_t amf_ue_ngap_id; uint64_t amf_ue_ngap_id;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
container = &pdu->choice.initiatingMessage.value.choice.InitialContextSetupRequest; container = &pdu->choice.initiatingMessage->value.choice.InitialContextSetupRequest;
if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) { if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) {
NGAP_ERROR("[SCTP %d] Received initial context setup request for non " NGAP_ERROR("[SCTP %d] Received initial context setup request for non "
...@@ -977,7 +977,7 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, ...@@ -977,7 +977,7 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id,
case NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLInformation: case NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLInformation:
{ {
NGAP_GTPTunnel_t *gTPTunnel_p; NGAP_GTPTunnel_t *gTPTunnel_p;
gTPTunnel_p = &pdusessionTransfer_ies->value.choice.UPTransportLayerInformation.choice.gTPTunnel; gTPTunnel_p = pdusessionTransfer_ies->value.choice.UPTransportLayerInformation.choice.gTPTunnel;
/* Set the transport layer address */ /* Set the transport layer address */
memcpy(NGAP_INITIAL_CONTEXT_SETUP_REQ(message_p).pdusession_param[i].upf_addr.buffer, memcpy(NGAP_INITIAL_CONTEXT_SETUP_REQ(message_p).pdusession_param[i].upf_addr.buffer,
...@@ -1164,7 +1164,7 @@ int ngap_gNB_handle_ue_context_release_command(uint32_t assoc_id, ...@@ -1164,7 +1164,7 @@ int ngap_gNB_handle_ue_context_release_command(uint32_t assoc_id,
NGAP_UEContextReleaseCommand_t *container; NGAP_UEContextReleaseCommand_t *container;
NGAP_UEContextReleaseCommand_IEs_t *ie; NGAP_UEContextReleaseCommand_IEs_t *ie;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
container = &pdu->choice.initiatingMessage.value.choice.UEContextReleaseCommand; container = &pdu->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) { if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) {
NGAP_ERROR("[SCTP %d] Received UE context release command for non " NGAP_ERROR("[SCTP %d] Received UE context release command for non "
...@@ -1178,8 +1178,8 @@ int ngap_gNB_handle_ue_context_release_command(uint32_t assoc_id, ...@@ -1178,8 +1178,8 @@ int ngap_gNB_handle_ue_context_release_command(uint32_t assoc_id,
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
switch (ie->value.choice.UE_NGAP_IDs.present) { switch (ie->value.choice.UE_NGAP_IDs.present) {
case NGAP_UE_NGAP_IDs_PR_uE_NGAP_ID_pair: case NGAP_UE_NGAP_IDs_PR_uE_NGAP_ID_pair:
gnb_ue_ngap_id = ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair.rAN_UE_NGAP_ID; gnb_ue_ngap_id = ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->rAN_UE_NGAP_ID;
asn_INTEGER2ulong(&(ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair.aMF_UE_NGAP_ID), &amf_ue_ngap_id); asn_INTEGER2ulong(&(ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->aMF_UE_NGAP_ID), &amf_ue_ngap_id);
MSC_LOG_RX_MESSAGE( MSC_LOG_RX_MESSAGE(
MSC_NGAP_GNB, MSC_NGAP_GNB,
MSC_NGAP_AMF, MSC_NGAP_AMF,
...@@ -1252,7 +1252,7 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id, ...@@ -1252,7 +1252,7 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id,
NGAP_PDUSessionResourceSetupRequest_t *container; NGAP_PDUSessionResourceSetupRequest_t *container;
NGAP_PDUSessionResourceSetupRequestIEs_t *ie; NGAP_PDUSessionResourceSetupRequestIEs_t *ie;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
container = &pdu->choice.initiatingMessage.value.choice.PDUSessionResourceSetupRequest; container = &pdu->choice.initiatingMessage->value.choice.PDUSessionResourceSetupRequest;
if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) { if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) {
NGAP_ERROR("[SCTP %d] Received pdu session resource setup request for non " NGAP_ERROR("[SCTP %d] Received pdu session resource setup request for non "
...@@ -1361,7 +1361,7 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id, ...@@ -1361,7 +1361,7 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id,
case NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLInformation: case NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLInformation:
{ {
NGAP_GTPTunnel_t *gTPTunnel_p; NGAP_GTPTunnel_t *gTPTunnel_p;
gTPTunnel_p = &pdusessionTransfer_ies->value.choice.UPTransportLayerInformation.choice.gTPTunnel; gTPTunnel_p = pdusessionTransfer_ies->value.choice.UPTransportLayerInformation.choice.gTPTunnel;
/* The transport layer address for the IP packets */ /* The transport layer address for the IP packets */
OCTET_STRING_TO_INT32(&gTPTunnel_p->gTP_TEID, NGAP_PDUSESSION_SETUP_REQ(message_p).pdusession_setup_params[i].gtp_teid); OCTET_STRING_TO_INT32(&gTPTunnel_p->gTP_TEID, NGAP_PDUSESSION_SETUP_REQ(message_p).pdusession_setup_params[i].gtp_teid);
NGAP_PDUSESSION_SETUP_REQ(message_p).pdusession_setup_params[i].upf_addr.length = NGAP_PDUSESSION_SETUP_REQ(message_p).pdusession_setup_params[i].upf_addr.length =
...@@ -1449,7 +1449,7 @@ int ngap_gNB_handle_paging(uint32_t assoc_id, ...@@ -1449,7 +1449,7 @@ int ngap_gNB_handle_paging(uint32_t assoc_id,
NGAP_Paging_t *container; NGAP_Paging_t *container;
NGAP_PagingIEs_t *ie; NGAP_PagingIEs_t *ie;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
container = &pdu->choice.initiatingMessage.value.choice.Paging; container = &pdu->choice.initiatingMessage->value.choice.Paging;
// received Paging Message from AMF // received Paging Message from AMF
NGAP_DEBUG("[SCTP %d] Received Paging Message From AMF\n",assoc_id); NGAP_DEBUG("[SCTP %d] Received Paging Message From AMF\n",assoc_id);
...@@ -1481,9 +1481,9 @@ int ngap_gNB_handle_paging(uint32_t assoc_id, ...@@ -1481,9 +1481,9 @@ int ngap_gNB_handle_paging(uint32_t assoc_id,
NGAP_ProtocolIE_ID_id_UEPagingIdentity, true); NGAP_ProtocolIE_ID_id_UEPagingIdentity, true);
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
OCTET_STRING_TO_INT16(&ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI.aMFSetID, NGAP_PAGING_IND(message_p).ue_paging_identity.s_tmsi.amf_set_id); OCTET_STRING_TO_INT16(&ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI->aMFSetID, NGAP_PAGING_IND(message_p).ue_paging_identity.s_tmsi.amf_set_id);
OCTET_STRING_TO_INT8(&ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI.aMFPointer, NGAP_PAGING_IND(message_p).ue_paging_identity.s_tmsi.amf_pointer); OCTET_STRING_TO_INT8(&ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI->aMFPointer, NGAP_PAGING_IND(message_p).ue_paging_identity.s_tmsi.amf_pointer);
OCTET_STRING_TO_INT32(&ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI.fiveG_TMSI, NGAP_PAGING_IND(message_p).ue_paging_identity.s_tmsi.m_tmsi); OCTET_STRING_TO_INT32(&ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI->fiveG_TMSI, NGAP_PAGING_IND(message_p).ue_paging_identity.s_tmsi.m_tmsi);
NGAP_DEBUG("[SCTP %d] Received Paging Identity amf_set_id %d, amf_pointer %d, m_tmsi %d\n", NGAP_DEBUG("[SCTP %d] Received Paging Identity amf_set_id %d, amf_pointer %d, m_tmsi %d\n",
assoc_id, assoc_id,
...@@ -1560,7 +1560,7 @@ int ngap_gNB_handle_pdusession_modify_request(uint32_t assoc_id, ...@@ -1560,7 +1560,7 @@ int ngap_gNB_handle_pdusession_modify_request(uint32_t assoc_id,
NGAP_RAN_UE_NGAP_ID_t gnb_ue_ngap_id; NGAP_RAN_UE_NGAP_ID_t gnb_ue_ngap_id;
uint64_t amf_ue_ngap_id; uint64_t amf_ue_ngap_id;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
container = &pdu->choice.initiatingMessage.value.choice.PDUSessionResourceModifyRequest; container = &pdu->choice.initiatingMessage->value.choice.PDUSessionResourceModifyRequest;
if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) { if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) {
NGAP_ERROR("[SCTP %d] Received PDUSession Resource modify request for non " NGAP_ERROR("[SCTP %d] Received PDUSession Resource modify request for non "
...@@ -1763,7 +1763,7 @@ int ngap_gNB_handle_pdusession_release_command(uint32_t assoc_id, ...@@ -1763,7 +1763,7 @@ int ngap_gNB_handle_pdusession_release_command(uint32_t assoc_id,
NGAP_RAN_UE_NGAP_ID_t gnb_ue_ngap_id; NGAP_RAN_UE_NGAP_ID_t gnb_ue_ngap_id;
uint64_t amf_ue_ngap_id; uint64_t amf_ue_ngap_id;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
container = &pdu->choice.initiatingMessage.value.choice.PDUSessionResourceReleaseCommand; container = &pdu->choice.initiatingMessage->value.choice.PDUSessionResourceReleaseCommand;
if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) { if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) {
NGAP_ERROR("[SCTP %d] Received E-RAB release command for non existing AMF context\n", assoc_id); NGAP_ERROR("[SCTP %d] Received E-RAB release command for non existing AMF context\n", assoc_id);
...@@ -1870,7 +1870,7 @@ int ngap_gNB_handle_ng_path_switch_request_ack(uint32_t assoc_id, ...@@ -1870,7 +1870,7 @@ int ngap_gNB_handle_ng_path_switch_request_ack(uint32_t assoc_id,
NGAP_PDUSESSIONItemIEs_t *e_RABItemIEs; NGAP_PDUSESSIONItemIEs_t *e_RABItemIEs;
NGAP_PDUSESSIONItem_t *e_RABItem; NGAP_PDUSESSIONItem_t *e_RABItem;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
pathSwitchRequestAcknowledge = &pdu->choice.successfulOutcome.value.choice.PathSwitchRequestAcknowledge; pathSwitchRequestAcknowledge = &pdu->choice.successfulOutcome->value.choice.PathSwitchRequestAcknowledge;
/* Path Switch request == UE-related procedure -> stream !=0 */ /* Path Switch request == UE-related procedure -> stream !=0 */
if (stream == 0) { if (stream == 0) {
...@@ -2030,7 +2030,7 @@ int ngap_gNB_handle_ng_path_switch_request_failure(uint32_t assoc_ ...@@ -2030,7 +2030,7 @@ int ngap_gNB_handle_ng_path_switch_request_failure(uint32_t assoc_
NGAP_PathSwitchRequestFailure_t *pathSwitchRequestFailure; NGAP_PathSwitchRequestFailure_t *pathSwitchRequestFailure;
NGAP_PathSwitchRequestFailureIEs_t *ie; NGAP_PathSwitchRequestFailureIEs_t *ie;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
pathSwitchRequestFailure = &pdu->choice.unsuccessfulOutcome.value.choice.PathSwitchRequestFailure; pathSwitchRequestFailure = &pdu->choice.unsuccessfulOutcome->value.choice.PathSwitchRequestFailure;
if (stream != 0) { if (stream != 0) {
NGAP_ERROR("[SCTP %d] Received s1 path switch request failure on stream != 0 (%d)\n", NGAP_ERROR("[SCTP %d] Received s1 path switch request failure on stream != 0 (%d)\n",
......
...@@ -68,10 +68,10 @@ int ngap_gNB_handle_nas_first_req( ...@@ -68,10 +68,10 @@ int ngap_gNB_handle_nas_first_req(
DevAssert(instance_p != NULL); DevAssert(instance_p != NULL);
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage.procedureCode = NGAP_ProcedureCode_id_InitialUEMessage; pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_InitialUEMessage;
pdu.choice.initiatingMessage.criticality = NGAP_Criticality_ignore; pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore;
pdu.choice.initiatingMessage.value.present = NGAP_InitiatingMessage__value_PR_InitialUEMessage; pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_InitialUEMessage;
out = &pdu.choice.initiatingMessage.value.choice.InitialUEMessage; out = &pdu.choice.initiatingMessage->value.choice.InitialUEMessage;
/* Select the AMF corresponding to the provided GUAMI. */ /* Select the AMF corresponding to the provided GUAMI. */
if (ngap_nas_first_req_p->ue_identity.presenceMask & NGAP_UE_IDENTITIES_guami) { if (ngap_nas_first_req_p->ue_identity.presenceMask & NGAP_UE_IDENTITIES_guami) {
...@@ -218,7 +218,7 @@ int ngap_gNB_handle_nas_first_req( ...@@ -218,7 +218,7 @@ int ngap_gNB_handle_nas_first_req(
ie->value.choice.UserLocationInformation.present = NGAP_UserLocationInformation_PR_userLocationInformationNR; ie->value.choice.UserLocationInformation.present = NGAP_UserLocationInformation_PR_userLocationInformationNR;
userinfo_nr_p = &ie->value.choice.UserLocationInformation.choice.userLocationInformationNR; userinfo_nr_p = ie->value.choice.UserLocationInformation.choice.userLocationInformationNR;
/* Set nRCellIdentity. default userLocationInformationNR */ /* Set nRCellIdentity. default userLocationInformationNR */
MACRO_GNB_ID_TO_CELL_IDENTITY(instance_p->gNB_id, MACRO_GNB_ID_TO_CELL_IDENTITY(instance_p->gNB_id,
...@@ -350,7 +350,7 @@ int ngap_gNB_handle_nas_downlink(uint32_t assoc_id, ...@@ -350,7 +350,7 @@ int ngap_gNB_handle_nas_downlink(uint32_t assoc_id,
ngap_gNB_instance = amf_desc_p->ngap_gNB_instance; ngap_gNB_instance = amf_desc_p->ngap_gNB_instance;
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
container = &pdu->choice.initiatingMessage.value.choice.DownlinkNASTransport; container = &pdu->choice.initiatingMessage->value.choice.DownlinkNASTransport;
NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_DownlinkNASTransport_IEs_t, ie, container, NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_DownlinkNASTransport_IEs_t, ie, container,
NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID, true); NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID, true);
asn_INTEGER2ulong(&(ie->value.choice.AMF_UE_NGAP_ID), &amf_ue_ngap_id); asn_INTEGER2ulong(&(ie->value.choice.AMF_UE_NGAP_ID), &amf_ue_ngap_id);
...@@ -460,10 +460,10 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_ ...@@ -460,10 +460,10 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage.procedureCode = NGAP_ProcedureCode_id_UplinkNASTransport; pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_UplinkNASTransport;
pdu.choice.initiatingMessage.criticality = NGAP_Criticality_ignore; pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore;
pdu.choice.initiatingMessage.value.present = NGAP_InitiatingMessage__value_PR_UplinkNASTransport; pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_UplinkNASTransport;
out = &pdu.choice.initiatingMessage.value.choice.UplinkNASTransport; out = &pdu.choice.initiatingMessage->value.choice.UplinkNASTransport;
/* mandatory */ /* mandatory */
ie = (NGAP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(NGAP_UplinkNASTransport_IEs_t)); ie = (NGAP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(NGAP_UplinkNASTransport_IEs_t));
ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
...@@ -494,7 +494,7 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_ ...@@ -494,7 +494,7 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_
ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_UserLocationInformation; ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_UserLocationInformation;
ie->value.choice.UserLocationInformation.present = NGAP_UserLocationInformation_PR_userLocationInformationNR; ie->value.choice.UserLocationInformation.present = NGAP_UserLocationInformation_PR_userLocationInformationNR;
userinfo_nr_p = &ie->value.choice.UserLocationInformation.choice.userLocationInformationNR; userinfo_nr_p = ie->value.choice.UserLocationInformation.choice.userLocationInformationNR;
/* Set nRCellIdentity. default userLocationInformationNR */ /* Set nRCellIdentity. default userLocationInformationNR */
MACRO_GNB_ID_TO_CELL_IDENTITY(ngap_gNB_instance_p->gNB_id, MACRO_GNB_ID_TO_CELL_IDENTITY(ngap_gNB_instance_p->gNB_id,
...@@ -570,10 +570,10 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance, ...@@ -570,10 +570,10 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance,
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage.procedureCode = NGAP_ProcedureCode_id_NASNonDeliveryIndication; pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_NASNonDeliveryIndication;
pdu.choice.initiatingMessage.criticality = NGAP_Criticality_ignore; pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore;
pdu.choice.initiatingMessage.value.present = NGAP_InitiatingMessage__value_PR_NASNonDeliveryIndication; pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_NASNonDeliveryIndication;
out = &pdu.choice.initiatingMessage.value.choice.NASNonDeliveryIndication; out = &pdu.choice.initiatingMessage->value.choice.NASNonDeliveryIndication;
/* mandatory */ /* mandatory */
ie = (NGAP_NASNonDeliveryIndication_IEs_t *)calloc(1, sizeof(NGAP_NASNonDeliveryIndication_IEs_t)); ie = (NGAP_NASNonDeliveryIndication_IEs_t *)calloc(1, sizeof(NGAP_NASNonDeliveryIndication_IEs_t));
ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
...@@ -676,10 +676,10 @@ int ngap_gNB_initial_ctxt_resp( ...@@ -676,10 +676,10 @@ int ngap_gNB_initial_ctxt_resp(
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome;
pdu.choice.successfulOutcome.procedureCode = NGAP_ProcedureCode_id_InitialContextSetup; pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_InitialContextSetup;
pdu.choice.successfulOutcome.criticality = NGAP_Criticality_reject; pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject;
pdu.choice.successfulOutcome.value.present = NGAP_SuccessfulOutcome__value_PR_InitialContextSetupResponse; pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_InitialContextSetupResponse;
out = &pdu.choice.successfulOutcome.value.choice.InitialContextSetupResponse; out = &pdu.choice.successfulOutcome->value.choice.InitialContextSetupResponse;
/* mandatory */ /* mandatory */
ie = (NGAP_InitialContextSetupResponseIEs_t *)calloc(1, sizeof(NGAP_InitialContextSetupResponseIEs_t)); ie = (NGAP_InitialContextSetupResponseIEs_t *)calloc(1, sizeof(NGAP_InitialContextSetupResponseIEs_t));
ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
...@@ -716,23 +716,23 @@ int ngap_gNB_initial_ctxt_resp( ...@@ -716,23 +716,23 @@ int ngap_gNB_initial_ctxt_resp(
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.present = NGAP_UPTransportLayerInformation_PR_gTPTunnel; pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.present = NGAP_UPTransportLayerInformation_PR_gTPTunnel;
GTP_TEID_TO_ASN1(initial_ctxt_resp_p->pdusessions[i].gtp_teid, &pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.gTP_TEID); GTP_TEID_TO_ASN1(initial_ctxt_resp_p->pdusessions[i].gtp_teid, &pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->gTP_TEID);
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf = malloc(initial_ctxt_resp_p->pdusessions[i].gNB_addr.length); pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf = malloc(initial_ctxt_resp_p->pdusessions[i].gNB_addr.length);
memcpy(pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf, memcpy(pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf,
initial_ctxt_resp_p->pdusessions[i].gNB_addr.buffer, initial_ctxt_resp_p->pdusessions[i].gNB_addr.buffer,
initial_ctxt_resp_p->pdusessions[i].gNB_addr.length); initial_ctxt_resp_p->pdusessions[i].gNB_addr.length);
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.size = initial_ctxt_resp_p->pdusessions[i].gNB_addr.length; pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.size = initial_ctxt_resp_p->pdusessions[i].gNB_addr.length;
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.bits_unused = 0; pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.bits_unused = 0;
NGAP_DEBUG("initial_ctxt_resp_p: pdusession ID %ld, gnb_addr %d.%d.%d.%d, SIZE %ld \n", NGAP_DEBUG("initial_ctxt_resp_p: pdusession ID %ld, gnb_addr %d.%d.%d.%d, SIZE %ld \n",
item->pDUSessionID, item->pDUSessionID,
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf[0], pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf[0],
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf[1], pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf[1],
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf[2], pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf[2],
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf[3], pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf[3],
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.size); pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.size);
/* associatedQosFlowList. number of 1? */ /* associatedQosFlowList. number of 1? */
for(int j=0; j < initial_ctxt_resp_p->pdusessions[i].nb_of_qos_flow; j++) { for(int j=0; j < initial_ctxt_resp_p->pdusessions[i].nb_of_qos_flow; j++) {
...@@ -894,10 +894,10 @@ int ngap_gNB_ue_capabilities(instance_t instance, ...@@ -894,10 +894,10 @@ int ngap_gNB_ue_capabilities(instance_t instance,
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage.procedureCode = NGAP_ProcedureCode_id_UERadioCapabilityInfoIndication; pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_UERadioCapabilityInfoIndication;
pdu.choice.initiatingMessage.criticality = NGAP_Criticality_ignore; pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore;
pdu.choice.initiatingMessage.value.present = NGAP_InitiatingMessage__value_PR_UERadioCapabilityInfoIndication; pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_UERadioCapabilityInfoIndication;
out = &pdu.choice.initiatingMessage.value.choice.UERadioCapabilityInfoIndication; out = &pdu.choice.initiatingMessage->value.choice.UERadioCapabilityInfoIndication;
/* mandatory */ /* mandatory */
ie = (NGAP_UERadioCapabilityInfoIndicationIEs_t *)calloc(1, sizeof(NGAP_UERadioCapabilityInfoIndicationIEs_t)); ie = (NGAP_UERadioCapabilityInfoIndicationIEs_t *)calloc(1, sizeof(NGAP_UERadioCapabilityInfoIndicationIEs_t));
ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
...@@ -987,10 +987,10 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance, ...@@ -987,10 +987,10 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance,
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome;
pdu.choice.successfulOutcome.procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceSetup; pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceSetup;
pdu.choice.successfulOutcome.criticality = NGAP_Criticality_reject; pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject;
pdu.choice.successfulOutcome.value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceSetupResponse; pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceSetupResponse;
out = &pdu.choice.successfulOutcome.value.choice.PDUSessionResourceSetupResponse; out = &pdu.choice.successfulOutcome->value.choice.PDUSessionResourceSetupResponse;
/* mandatory */ /* mandatory */
ie = (NGAP_PDUSessionResourceSetupResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceSetupResponseIEs_t)); ie = (NGAP_PDUSessionResourceSetupResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceSetupResponseIEs_t));
ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
...@@ -1028,23 +1028,23 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance, ...@@ -1028,23 +1028,23 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance,
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.present = NGAP_UPTransportLayerInformation_PR_gTPTunnel; pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.present = NGAP_UPTransportLayerInformation_PR_gTPTunnel;
GTP_TEID_TO_ASN1(pdusession_setup_resp_p->pdusessions[i].gtp_teid, &pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.gTP_TEID); GTP_TEID_TO_ASN1(pdusession_setup_resp_p->pdusessions[i].gtp_teid, &pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->gTP_TEID);
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf = malloc(pdusession_setup_resp_p->pdusessions[i].gNB_addr.length); pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf = malloc(pdusession_setup_resp_p->pdusessions[i].gNB_addr.length);
memcpy(pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf, memcpy(pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf,
pdusession_setup_resp_p->pdusessions[i].gNB_addr.buffer, pdusession_setup_resp_p->pdusessions[i].gNB_addr.buffer,
pdusession_setup_resp_p->pdusessions[i].gNB_addr.length); pdusession_setup_resp_p->pdusessions[i].gNB_addr.length);
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.size = pdusession_setup_resp_p->pdusessions[i].gNB_addr.length; pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.size = pdusession_setup_resp_p->pdusessions[i].gNB_addr.length;
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.bits_unused = 0; pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.bits_unused = 0;
NGAP_DEBUG("pdusession_setup_resp_p: pdusession ID %ld, gnb_addr %d.%d.%d.%d, SIZE %ld \n", NGAP_DEBUG("pdusession_setup_resp_p: pdusession ID %ld, gnb_addr %d.%d.%d.%d, SIZE %ld \n",
item->pDUSessionID, item->pDUSessionID,
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf[0], pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf[0],
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf[1], pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf[1],
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf[2], pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf[2],
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.buf[3], pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.buf[3],
pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel.transportLayerAddress.size); pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel->transportLayerAddress.size);
/* associatedQosFlowList. number of 1? */ /* associatedQosFlowList. number of 1? */
for(int j=0; j < pdusession_setup_resp_p->pdusessions[i].nb_of_qos_flow; j++) { for(int j=0; j < pdusession_setup_resp_p->pdusessions[i].nb_of_qos_flow; j++) {
...@@ -1209,10 +1209,10 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance, ...@@ -1209,10 +1209,10 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance,
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome;
pdu.choice.successfulOutcome.procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceModify; pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceModify;
pdu.choice.successfulOutcome.criticality = NGAP_Criticality_reject; pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject;
pdu.choice.successfulOutcome.value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceModifyResponse; pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceModifyResponse;
out = &pdu.choice.successfulOutcome.value.choice.PDUSessionResourceModifyResponse; out = &pdu.choice.successfulOutcome->value.choice.PDUSessionResourceModifyResponse;
/* mandatory */ /* mandatory */
ie = (NGAP_PDUSessionResourceModifyResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyResponseIEs_t)); ie = (NGAP_PDUSessionResourceModifyResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyResponseIEs_t));
ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
...@@ -1369,10 +1369,10 @@ int ngap_gNB_pdusession_release_resp(instance_t instance, ...@@ -1369,10 +1369,10 @@ int ngap_gNB_pdusession_release_resp(instance_t instance,
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome;
pdu.choice.successfulOutcome.procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceRelease; pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceRelease;
pdu.choice.successfulOutcome.criticality = NGAP_Criticality_reject; pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject;
pdu.choice.successfulOutcome.value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceReleaseResponse; pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceReleaseResponse;
out = &pdu.choice.successfulOutcome.value.choice.PDUSessionResourceReleaseResponse; out = &pdu.choice.successfulOutcome->value.choice.PDUSessionResourceReleaseResponse;
/* mandatory */ /* mandatory */
ie = (NGAP_PDUSessionResourceReleaseResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceReleaseResponseIEs_t)); ie = (NGAP_PDUSessionResourceReleaseResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceReleaseResponseIEs_t));
ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
...@@ -1524,10 +1524,10 @@ int ngap_gNB_path_switch_req(instance_t instance, ...@@ -1524,10 +1524,10 @@ int ngap_gNB_path_switch_req(instance_t instance,
/* Prepare the NGAP message to encode */ /* Prepare the NGAP message to encode */
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage.procedureCode = NGAP_ProcedureCode_id_PathSwitchRequest; pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_PathSwitchRequest;
pdu.choice.initiatingMessage.criticality = NGAP_Criticality_reject; pdu.choice.initiatingMessage->criticality = NGAP_Criticality_reject;
pdu.choice.initiatingMessage.value.present = NGAP_InitiatingMessage__value_PR_PathSwitchRequest; pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_PathSwitchRequest;
out = &pdu.choice.initiatingMessage.value.choice.PathSwitchRequest; out = &pdu.choice.initiatingMessage->value.choice.PathSwitchRequest;
/* mandatory */ /* mandatory */
ie = (NGAP_PathSwitchRequestIEs_t *)calloc(1, sizeof(NGAP_PathSwitchRequestIEs_t)); ie = (NGAP_PathSwitchRequestIEs_t *)calloc(1, sizeof(NGAP_PathSwitchRequestIEs_t));
...@@ -1714,10 +1714,10 @@ int ngap_gNB_generate_PDUSESSION_Modification_Indication( ...@@ -1714,10 +1714,10 @@ int ngap_gNB_generate_PDUSESSION_Modification_Indication(
// Prepare the NGAP message to encode // Prepare the NGAP message to encode
memset(&pdu, 0, sizeof(pdu)); memset(&pdu, 0, sizeof(pdu));
pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage;
pdu.choice.initiatingMessage.procedureCode = NGAP_ProcedureCode_id_PDUSESSIONModificationIndication; pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_PDUSESSIONModificationIndication;
pdu.choice.initiatingMessage.criticality = NGAP_Criticality_reject; pdu.choice.initiatingMessage->criticality = NGAP_Criticality_reject;
pdu.choice.initiatingMessage.value.present = NGAP_InitiatingMessage__value_PR_PDUSESSIONModificationIndication; pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_PDUSESSIONModificationIndication;
out = &pdu.choice.initiatingMessage.value.choice.PDUSESSIONModificationIndication; out = &pdu.choice.initiatingMessage->value.choice.PDUSESSIONModificationIndication;
/* mandatory */ /* mandatory */
ie = (NGAP_PDUSESSIONModificationIndicationIEs_t *)calloc(1, sizeof(NGAP_PDUSESSIONModificationIndicationIEs_t)); ie = (NGAP_PDUSESSIONModificationIndicationIEs_t *)calloc(1, sizeof(NGAP_PDUSESSIONModificationIndicationIEs_t));
ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
......
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