Commit de806db8 authored by wangyongshou's avatar wangyongshou

add pdu_session_resource_setup_response msg

parent d601a76b
......@@ -21,7 +21,7 @@
#include "OCTET_STRING.h"
#define BUF_LEN 1024
Ngap_PDUSessionResourceSetupRequestIEs_t *make_RAN_UE_NGAP_ID(uint32_t rAN_UE_NGAP_ID)
Ngap_PDUSessionResourceSetupRequestIEs_t *make_req_RAN_UE_NGAP_ID(uint32_t rAN_UE_NGAP_ID)
{
Ngap_PDUSessionResourceSetupRequestIEs_t *ie;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupRequestIEs_t));
......@@ -35,7 +35,7 @@ Ngap_PDUSessionResourceSetupRequestIEs_t *make_RAN_UE_NGAP_ID(uint32_t rAN_UE_N
return ie;
}
Ngap_PDUSessionResourceSetupRequestIEs_t *make_AMF_UE_NGAP_ID(uint64_t amf_UE_NGAP_ID)
Ngap_PDUSessionResourceSetupRequestIEs_t *make_req_AMF_UE_NGAP_ID(uint64_t amf_UE_NGAP_ID)
{
Ngap_PDUSessionResourceSetupRequestIEs_t *ie = NULL;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupRequestIEs_t));
......@@ -153,7 +153,7 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_request()
pdu->choice.initiatingMessage = calloc(1, sizeof(Ngap_InitiatingMessage_t));
pdu->choice.initiatingMessage->procedureCode = Ngap_ProcedureCode_id_PDUSessionResourceSetup;
pdu->choice.initiatingMessage->criticality = Ngap_Criticality_reject;
pdu->choice.initiatingMessage->value.present = Ngap_InitiatingMessage__value_PR_NGSetupRequest;
pdu->choice.initiatingMessage->value.present = Ngap_InitiatingMessage__value_PR_PDUSessionResourceSetupRequest;
Ngap_PDUSessionResourceSetupRequest_t *ngapPDUSessionResourceSetupRequest = NULL;
ngapPDUSessionResourceSetupRequest = &pdu->choice.initiatingMessage->value.choice.PDUSessionResourceSetupRequest;
......@@ -161,26 +161,25 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_request()
Ngap_PDUSessionResourceSetupRequestIEs_t *ie;
//Ngap_AMF_UE_NGAP_ID_t
uint64_t amf_ue_ngap_id = 0x80;
ie = make_AMF_UE_NGAP_ID(amf_ue_ngap_id);
ie = make_req_AMF_UE_NGAP_ID(amf_ue_ngap_id);
add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
//Ngap_AMF_UE_NGAP_ID_t
uint32_t ran_ue_ngap_id = 0x81;
ie = make_RAN_UE_NGAP_ID(ran_ue_ngap_id);
//add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
ie = make_req_RAN_UE_NGAP_ID(ran_ue_ngap_id);
add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
//Ngap_RANPagingPriority_t
long ranPagingPriority = 0x82;
ie = make_RANPagingPriority(ranPagingPriority);
//add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
//Ngap_NAS_PDU_t
const char *nas_pdu = "nas_pdu";
ie = make_NAS_PDU(nas_pdu);
//add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
//Ngap_PDUSessionResourceSetupListSUReq_t
ie = make_PDUSessionResourceSetupListSUReq();
......@@ -196,17 +195,14 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_request()
slice,
pDUSessionResourceSetupRequestTransfer);
//ASN_SEQUENCE_ADD(&ie->value.choice.SupportedTAList.list, item);
ASN_SEQUENCE_ADD(&ie->value.choice.PDUSessionResourceSetupListSUReq.list, item);
add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
printf("0000000000000, make_NGAP_pdu_session_resource_setup_request\n");
return pdu;
}
int
ngap_amf_handle_ng_pdu_session_resource_setup_request(
const sctp_assoc_id_t assoc_id,
......@@ -266,8 +262,8 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_PDUSessionResourceSetupRequestIEs_t, ie, container, Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID, false);
if (ie)
{
//asn_INTEGER2ulong(&ie->value.choice.AMF_UE_NGAP_ID, &amf_ue_ngap_id);
//printf("amf_ue_ngap_id, 0x%x\n", amf_ue_ngap_id);
asn_INTEGER2ulong(&ie->value.choice.AMF_UE_NGAP_ID, &amf_ue_ngap_id);
printf("amf_ue_ngap_id, 0x%x\n", amf_ue_ngap_id);
}
//Ngap_AMF_UE_NGAP_ID_t
......@@ -275,7 +271,7 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
if (ie)
{
ran_ue_ngap_id = ie->value.choice.RAN_UE_NGAP_ID;
//printf("ran_ue_ngap_id, 0x%x\n", ran_ue_ngap_id);
printf("ran_ue_ngap_id, 0x%x\n", ran_ue_ngap_id);
}
//RANPagingPriority
......@@ -283,7 +279,7 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
if (ie)
{
ranPagingPriority = ie->value.choice.RANPagingPriority;
//printf("ranPagingPriority, 0x%x\n", ranPagingPriority);
printf("ranPagingPriority, 0x%x\n", ranPagingPriority);
}
//NAS_PDU
......@@ -293,7 +289,7 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
nas_pdu = (char *) ie->value.choice.NAS_PDU.buf;
nas_pdu_size = (int) ie->value.choice.NAS_PDU.size;
//printf("RANNodeName, nas_pdu_size:%d, nas_pdu:%s,\n", nas_pdu_size, nas_pdu);
printf("RANNodeName, nas_pdu_size:%d, nas_pdu:%s,\n", nas_pdu_size, nas_pdu);
}
......
#include "ng_pdu_session_resource_setup_response.h"
#include "Ngap_SuccessfulOutcome.h"
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
#include "Ngap_ProcedureCode.h"
#include "Ngap_Criticality.h"
#include "Ngap_PDUSessionResourceSetupRequest.h"
#include "Ngap_PDUSessionResourceSetupResponse.h"
#include "Ngap_PDUSessionResourceSetupListSURes.h"
#include "Ngap_PDUSessionResourceSetupItemSURes.h"
#include "Ngap_PDUSessionResourceFailedToSetupListSURes.h"
#include "Ngap_PDUSessionResourceFailedToSetupItemSURes.h"
#include "Ngap_CriticalityDiagnostics.h"
#include "Ngap_CriticalityDiagnostics-IE-List.h"
#include "Ngap_CriticalityDiagnostics-IE-Item.h"
#include "common_defs.h"
#include "common_types.h"
#include "../common/ngap/ngap_common.h"
#include "INTEGER.h"
#include "asn_SEQUENCE_OF.h"
#include "OCTET_STRING.h"
#define BUF_LEN 1024
Ngap_PDUSessionResourceSetupRequestIEs_t * make_CriticalityDiagnostics()
#define BUF_LEN 1024
Ngap_PDUSessionResourceSetupResponseIEs_t * make_CriticalityDiagnostics()
{
Ngap_PDUSessionResourceSetupRequestIEs_t *ie;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupRequestIEs_t));
Ngap_PDUSessionResourceSetupResponseIEs_t *ie;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupResponseIEs_t));
ie->id = Ngap_ProtocolIE_ID_id_CriticalityDiagnostics;
ie->criticality = Ngap_Criticality_reject;
ie->criticality = Ngap_Criticality_ignore;
ie->value.present = Ngap_PDUSessionResourceSetupResponseIEs__value_PR_CriticalityDiagnostics;
return ie;
}
Ngap_PDUSessionResourceSetupRequestIEs_t * make_PDUSessionResourceFailedToSetupListSURes()
Ngap_PDUSessionResourceFailedToSetupItemSURes_t *make_PDUSessionResourceFailedToSetupItemSURes(
const long pDUSessionID, const char *pDUSessionResourceSetup)
{
Ngap_PDUSessionResourceSetupRequestIEs_t *ie;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupRequestIEs_t));
Ngap_PDUSessionResourceFailedToSetupItemSURes_t *item = NULL;
item = calloc(1, sizeof(Ngap_PDUSessionResourceFailedToSetupItemSURes_t));
item->pDUSessionID = pDUSessionID;
OCTET_STRING_fromBuf(&item->pDUSessionResourceSetupUnsuccessfulTransfer,pDUSessionResourceSetup,strlen(pDUSessionResourceSetup));
return item;
}
Ngap_PDUSessionResourceSetupResponseIEs_t * make_PDUSessionResourceFailedToSetupListSURes()
{
Ngap_PDUSessionResourceSetupResponseIEs_t *ie;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupResponseIEs_t));
ie->id = Ngap_ProtocolIE_ID_id_PDUSessionResourceFailedToSetupListSURes;
ie->criticality = Ngap_Criticality_reject;
......@@ -64,13 +66,13 @@ Ngap_PDUSessionResourceSetupItemSURes_t *make_PDUSessionResourceSetupItemSURes(
item = calloc(1, sizeof(Ngap_PDUSessionResourceSetupItemSURes_t));
item->pDUSessionID = pDUSessionID;
//OCTET_STRING_fromBuf (&item->pDUSessionResourceSetupResponseTransfer, pDUSessionResourceSetupResponseTransfer, strlen(pDUSessionResourceSetupResponseTransfer));
OCTET_STRING_fromBuf (&item->pDUSessionResourceSetupResponseTransfer, pDUSessionResourceSetupResponseTransfer, strlen(pDUSessionResourceSetupResponseTransfer));
return item;
}
Ngap_PDUSessionResourceSetupRequestIEs_t * make_PDUSessionResourceSetupListSURes()
Ngap_PDUSessionResourceSetupResponseIEs_t * make_PDUSessionResourceSetupListSURes()
{
Ngap_PDUSessionResourceSetupRequestIEs_t *ie;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupRequestIEs_t));
Ngap_PDUSessionResourceSetupResponseIEs_t *ie;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupResponseIEs_t));
ie->id = Ngap_ProtocolIE_ID_id_PDUSessionResourceSetupListSURes;
ie->criticality = Ngap_Criticality_reject;
......@@ -79,10 +81,10 @@ Ngap_PDUSessionResourceSetupRequestIEs_t * make_PDUSessionResourceSetupListSURe
return ie;
}
Ngap_PDUSessionResourceSetupRequestIEs_t *make_RAN_UE_NGAP_ID(uint32_t rAN_UE_NGAP_ID)
Ngap_PDUSessionResourceSetupResponseIEs_t *make_resp_RAN_UE_NGAP_ID(uint32_t rAN_UE_NGAP_ID)
{
Ngap_PDUSessionResourceSetupRequestIEs_t *ie;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupRequestIEs_t));
Ngap_PDUSessionResourceSetupResponseIEs_t *ie;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupResponseIEs_t));
ie->id = Ngap_ProtocolIE_ID_id_RAN_UE_NGAP_ID;
ie->criticality = Ngap_Criticality_reject;
......@@ -93,16 +95,16 @@ Ngap_PDUSessionResourceSetupRequestIEs_t *make_RAN_UE_NGAP_ID(uint32_t rAN_UE_N
return ie;
}
Ngap_PDUSessionResourceSetupRequestIEs_t *make_AMF_UE_NGAP_ID(uint64_t amf_UE_NGAP_ID)
Ngap_PDUSessionResourceSetupRequestIEs_t *make_resp_AMF_UE_NGAP_ID(uint64_t amf_UE_NGAP_ID)
{
Ngap_PDUSessionResourceSetupRequestIEs_t *ie = NULL;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupRequestIEs_t));
Ngap_PDUSessionResourceSetupResponseIEs_t *ie = NULL;
ie = calloc(1, sizeof(Ngap_PDUSessionResourceSetupResponseIEs_t));
ie->id = Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID;
ie->criticality = Ngap_Criticality_reject;
ie->value.present = Ngap_PDUSessionResourceSetupResponseIEs__value_PR_AMF_UE_NGAP_ID;
//asn_ulong2INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, amf_UE_NGAP_ID & AMF_UE_NGAP_ID_MASK_);
asn_ulong2INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, amf_UE_NGAP_ID & AMF_UE_NGAP_ID_MASK_);
size_t i = 0;
for(i ; i<ie->value.choice.AMF_UE_NGAP_ID.size;i++)
......@@ -112,8 +114,8 @@ Ngap_PDUSessionResourceSetupRequestIEs_t *make_AMF_UE_NGAP_ID(uint64_t amf_UE_N
return ie;
}
#if 0
void add_pdu_session_resource_setup_response_ie(Ngap_PDUSessionResourceSetupResponse_t *ngapPDUSessionResourceSetupRequest, Ngap_PDUSessionResourceSetupRequestIEs_t *ie) {
void add_pdu_session_resource_setup_response_ie(Ngap_PDUSessionResourceSetupResponse_t *ngapPDUSessionResourceSetupResponse, Ngap_PDUSessionResourceSetupResponseIEs_t *ie) {
int ret;
ret = ASN_SEQUENCE_ADD(&ngapPDUSessionResourceSetupResponse->protocolIEs.list, ie);
if ( ret != 0 ) {
......@@ -122,8 +124,6 @@ void add_pdu_session_resource_setup_response_ie(Ngap_PDUSessionResourceSetupResp
}
return ;
}
#endif
Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_response()
{
Ngap_NGAP_PDU_t * pdu = NULL;
......@@ -141,32 +141,54 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_response()
Ngap_PDUSessionResourceSetupResponseIEs_t *ie = NULL;
//Ngap_AMF_UE_NGAP_ID_t
uint64_t amf_ue_ngap_id = 0x80;
ie = make_AMF_UE_NGAP_ID(amf_ue_ngap_id);
//add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
uint64_t amf_ue_ngap_id = 0x77;
ie = make_resp_AMF_UE_NGAP_ID(amf_ue_ngap_id);
add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
//Ngap_AMF_UE_NGAP_ID_t
uint32_t ran_ue_ngap_id = 0x81;
ie = make_RAN_UE_NGAP_ID(ran_ue_ngap_id);
//add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
uint32_t ran_ue_ngap_id = 0x78;
ie = make_resp_RAN_UE_NGAP_ID(ran_ue_ngap_id);
add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
//PDUSessionResourceSetupListSURes;
Ngap_PDUSessionResourceSetupItemSURes_t *item = NULL;
Ngap_PDUSessionResourceSetupItemSURes_t *setupItem = NULL;
ie = make_PDUSessionResourceSetupListSURes();
item = make_PDUSessionResourceSetupItemSURes(0x80, "test_item");
//ASN_SEQUENCE_ADD(&ie->value.choice.PDUSessionResourceSetupListSURes.list, item);
//add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
setupItem = make_PDUSessionResourceSetupItemSURes(0x79, "test_setup_item");
ASN_SEQUENCE_ADD(&ie->value.choice.PDUSessionResourceSetupListSURes.list, setupItem);
add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
//PDUSessionResourceFailedToSetupListSURes
Ngap_PDUSessionResourceFailedToSetupListSURes_t PDUSessionResourceFailedToSetupListSURes;
Ngap_PDUSessionResourceFailedToSetupItemSURes_t *failedItem = NULL;
ie = make_PDUSessionResourceFailedToSetupListSURes();
//add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
failedItem = make_PDUSessionResourceFailedToSetupItemSURes(0x80, "test_failed_setup");
ASN_SEQUENCE_ADD(&ie->value.choice.PDUSessionResourceFailedToSetupListSURes.list, failedItem);
add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
//CriticalityDiagnostics
Ngap_CriticalityDiagnostics_t CriticalityDiagnostics;
ie = make_CriticalityDiagnostics();
//add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
Ngap_ProcedureCode_t *procedureCode = calloc(1, sizeof(Ngap_ProcedureCode_t));
*procedureCode = 0x81;
ie ->value.choice.CriticalityDiagnostics.procedureCode = procedureCode;
Ngap_TriggeringMessage_t *triggeringMessage = calloc(1, sizeof(Ngap_TriggeringMessage_t));
*triggeringMessage = 0x82;
ie ->value.choice.CriticalityDiagnostics.triggeringMessage = triggeringMessage;
Ngap_Criticality_t *procedureCriticality = calloc(1, sizeof(Ngap_Criticality_t));
*procedureCriticality = 0x83;
ie ->value.choice.CriticalityDiagnostics.procedureCriticality = procedureCriticality;
Ngap_CriticalityDiagnostics_IE_Item_t *criticalityDiagnosticsIEsItem = calloc(1, sizeof(Ngap_CriticalityDiagnostics_IE_Item_t));
criticalityDiagnosticsIEsItem->iECriticality = 0x85;
criticalityDiagnosticsIEsItem->iE_ID = 0x86;
criticalityDiagnosticsIEsItem->typeOfError = 0x87;
ASN_SEQUENCE_ADD(&ie->value.choice.CriticalityDiagnostics.iEsCriticalityDiagnostics->list, &criticalityDiagnosticsIEsItem);
add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
printf("0000000000000, make_NGAP_pdu_session_resource_setup_response\n");
return pdu;
......@@ -208,6 +230,14 @@ ngap_amf_handle_ng_pdu_session_resource_setup_response(
int pDUSessionResourceSetupUnsuccessfulTransfer_size = 0;
long procedureCode = 0;
long triggeringMessage = 0;
long procedureCriticality = 0;
long iECriticality = 0;
long iE_ID = 0;
long typeOfError = 0;
DevAssert (pdu != NULL);
//OAILOG_INFO(LOG_NGAP,"----------------------- DECODED NG SETUP RESPONSE NGAP MSG --------------------------\n");
//asn_fprint(stdout, &asn_DEF_Ngap_NGAP_PDU, pdu);
......@@ -219,8 +249,8 @@ ngap_amf_handle_ng_pdu_session_resource_setup_response(
NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_PDUSessionResourceSetupResponseIEs_t, ie, container, Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID, false);
if (ie)
{
//asn_INTEGER2ulong(&ie->value.choice.AMF_UE_NGAP_ID, &amf_ue_ngap_id);
//printf("amf_ue_ngap_id, 0x%x\n", amf_ue_ngap_id);
asn_INTEGER2ulong(&ie->value.choice.AMF_UE_NGAP_ID, &amf_ue_ngap_id);
printf("amf_ue_ngap_id, 0x%x\n", amf_ue_ngap_id);
}
//Ngap_AMF_UE_NGAP_ID_t
......@@ -228,17 +258,17 @@ ngap_amf_handle_ng_pdu_session_resource_setup_response(
if (ie)
{
ran_ue_ngap_id = ie->value.choice.RAN_UE_NGAP_ID;
//printf("ran_ue_ngap_id, 0x%x\n", ran_ue_ngap_id);
printf("ran_ue_ngap_id, 0x%x\n", ran_ue_ngap_id);
}
//PDUSessionResourceSetupListSURes
NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_PDUSessionResourceSetupResponseIEs_t, ie, container, Ngap_ProtocolIE_ID_id_PDUSessionResourceSetupListSURes, false);
if (ie)
{
Ngap_PDUSessionResourceFailedToSetupListSURes_t *response_container = &ie->value.choice.PDUSessionResourceSetupListSURes;
Ngap_PDUSessionResourceSetupListSURes_t *response_container = &ie->value.choice.PDUSessionResourceSetupListSURes;
for (i = 0;i < response_container->list.count; i++)
{
Ngap_PDUSessionResourceFailedToSetupItemSURes_t *setupResponseIes_p = NULL;
Ngap_PDUSessionResourceSetupItemSURes_t *setupResponseIes_p = NULL;
setupResponseIes_p = response_container->list.array[i];
if(!setupResponseIes_p)
......@@ -247,8 +277,8 @@ ngap_amf_handle_ng_pdu_session_resource_setup_response(
}
pDUSessionID = setupResponseIes_p->pDUSessionID;
pDUSessionResourceSetupUnsuccessfulTransfer = setupResponseIes_p->pDUSessionResourceSetupUnsuccessfulTransfer.buf;
pDUSessionResourceSetupUnsuccessfulTransfer_size = setupResponseIes_p->pDUSessionResourceSetupUnsuccessfulTransfer.size;
pDUSessionResourceSetupUnsuccessfulTransfer = setupResponseIes_p->pDUSessionResourceSetupResponseTransfer.buf;
pDUSessionResourceSetupUnsuccessfulTransfer_size = setupResponseIes_p->pDUSessionResourceSetupResponseTransfer.size;
}
}
......@@ -257,7 +287,21 @@ ngap_amf_handle_ng_pdu_session_resource_setup_response(
NGAP_FIND_PROTOCOLIE_BY_ID(Ngap_PDUSessionResourceSetupResponseIEs_t, ie, container, Ngap_ProtocolIE_ID_id_PDUSessionResourceFailedToSetupListSURes, false);
if (ie)
{
Ngap_PDUSessionResourceFailedToSetupListSURes_t *failed_container = &ie->value.choice.PDUSessionResourceFailedToSetupListSURes;
for (i = 0;i < failed_container->list.count; i++)
{
Ngap_PDUSessionResourceFailedToSetupItemSURes_t *setupFailedIes_p = NULL;
setupFailedIes_p = failed_container->list.array[i];
if(!setupFailedIes_p)
{
continue;
}
pDUSessionID = setupFailedIes_p->pDUSessionID;
pDUSessionResourceSetupUnsuccessfulTransfer = setupFailedIes_p->pDUSessionResourceSetupUnsuccessfulTransfer.buf;
pDUSessionResourceSetupUnsuccessfulTransfer_size = setupFailedIes_p->pDUSessionResourceSetupUnsuccessfulTransfer.size;
}
}
//CriticalityDiagnostics
......@@ -265,6 +309,23 @@ ngap_amf_handle_ng_pdu_session_resource_setup_response(
if (ie)
{
procedureCode = *ie->value.choice.CriticalityDiagnostics.procedureCode;
triggeringMessage = *ie->value.choice.CriticalityDiagnostics.triggeringMessage;
procedureCriticality = *ie->value.choice.CriticalityDiagnostics.procedureCriticality;
Ngap_CriticalityDiagnostics_IE_List_t *criticality_container = ie->value.choice.CriticalityDiagnostics.iEsCriticalityDiagnostics;
for (i = 0;i < criticality_container->list.count; i++)
{
Ngap_CriticalityDiagnostics_IE_Item_t *criticalityIes_p = criticality_container->list.array[i];
if(!criticalityIes_p)
continue;
iECriticality = criticalityIes_p->iECriticality;
iE_ID = criticalityIes_p->iE_ID;
typeOfError = criticalityIes_p->typeOfError;
}
}
......
......@@ -4,6 +4,14 @@
#include "common_types.h"
#include "conversions.h"
#include "Ngap_ProcedureCode.h"
#include "Ngap_TriggeringMessage.h"
#include "Ngap_Criticality.h"
#include "Ngap_CriticalityDiagnostics-IE-Item.h"
#if 0
#include "Ngap_AdditionalQosFlowInformation.h"
#include "Ngap_AllocationAndRetentionPriority.h"
......
......@@ -46,7 +46,11 @@
extern "C"{
#include "nas_message.h"
#include "mmData.h"
//#include "Ngap_InitiatingMessage.h"
//#include "Ngap_SuccessfulOutcome.h"
#include "../NgapSmfLayer/ng_pdu_session_resource_setup_request.h"
#include "../NgapSmfLayer/ng_pdu_session_resource_setup_response.h"
}
#include <stdexcept>
......@@ -2368,7 +2372,23 @@ void smf_app::create_n2_sm_information(std::shared_ptr<itti_n11_create_sm_contex
//TODO: should work with BUPT to finish this function
Logger::smf_app().info("Create N2 SM Information, ngap message type %d, ie type %d\n", ngap_msg_type, ngap_ie_type);
#if 0
switch(ngap_ie_type)
{
case Ngap_InitiatingMessage__value_PR_PDUSessionResourceSetupRequest:
make_NGAP_pdu_session_resource_setup_request();
break;
case Ngap_InitiatingMessage__value_PR_PDUSessionResourceSetupRequest:
make_NGAP_pdu_session_resource_setup_response();
break;
default:
printf("don't know ngap_ie_type:%d\n", ngap_ie_type);
}
#endif
make_NGAP_pdu_session_resource_setup_request();
make_NGAP_pdu_session_resource_setup_response();
}
......
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