Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
de806db8
Commit
de806db8
authored
Nov 01, 2019
by
wangyongshou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pdu_session_resource_setup_response msg
parent
d601a76b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
168 additions
and
83 deletions
+168
-83
src/NgapSmfLayer/ng_pdu_session_resource_setup_request.c
src/NgapSmfLayer/ng_pdu_session_resource_setup_request.c
+15
-19
src/NgapSmfLayer/ng_pdu_session_resource_setup_response.c
src/NgapSmfLayer/ng_pdu_session_resource_setup_response.c
+125
-64
src/common/ngap/ngap_common.h
src/common/ngap/ngap_common.h
+8
-0
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+20
-0
No files found.
src/NgapSmfLayer/ng_pdu_session_resource_setup_request.c
View file @
de806db8
...
...
@@ -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_
NG
SetupRequest
;
pdu
->
choice
.
initiatingMessage
->
value
.
present
=
Ngap_InitiatingMessage__value_PR_
PDUSessionResource
SetupRequest
;
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
);
}
...
...
src/NgapSmfLayer/ng_pdu_session_resource_setup_response.c
View file @
de806db8
#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_PDUSessionResourceSetupRe
quest
IEs_t
*
ie
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRe
quest
IEs_t
));
Ngap_PDUSessionResourceSetupRe
sponse
IEs_t
*
ie
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRe
sponse
IEs_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_PDUSessionResourceSetupRe
quest
IEs_t
*
make_PDUSessionResourceSetupListSURes
()
Ngap_PDUSessionResourceSetupRe
sponse
IEs_t
*
make_PDUSessionResourceSetupListSURes
()
{
Ngap_PDUSessionResourceSetupRe
quest
IEs_t
*
ie
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRe
quest
IEs_t
));
Ngap_PDUSessionResourceSetupRe
sponse
IEs_t
*
ie
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRe
sponse
IEs_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_PDUSessionResourceSetupRe
questIEs_t
*
make
_RAN_UE_NGAP_ID
(
uint32_t
rAN_UE_NGAP_ID
)
Ngap_PDUSessionResourceSetupRe
sponseIEs_t
*
make_resp
_RAN_UE_NGAP_ID
(
uint32_t
rAN_UE_NGAP_ID
)
{
Ngap_PDUSessionResourceSetupRe
quest
IEs_t
*
ie
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRe
quest
IEs_t
));
Ngap_PDUSessionResourceSetupRe
sponse
IEs_t
*
ie
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRe
sponse
IEs_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_PDUSessionResourceSetupRe
quest
IEs_t
*
ie
=
NULL
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRe
quest
IEs_t
));
Ngap_PDUSessionResourceSetupRe
sponse
IEs_t
*
ie
=
NULL
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRe
sponse
IEs_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 *ngapPDUSessionResourceSetupRe
quest, Ngap_PDUSessionResourceSetupRequest
IEs_t *ie) {
void
add_pdu_session_resource_setup_response_ie
(
Ngap_PDUSessionResourceSetupResponse_t
*
ngapPDUSessionResourceSetupRe
sponse
,
Ngap_PDUSessionResourceSetupResponse
IEs_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
=
0x
80
;
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
=
0x
77
;
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
=
0x
81
;
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
=
0x
78
;
ie
=
make_
resp_
RAN_UE_NGAP_ID
(
ran_ue_ngap_id
);
add_pdu_session_resource_setup_response_ie
(
ngapPDUSessionResourceSetupResponse
,
ie
);
//PDUSessionResourceSetupListSURes;
Ngap_PDUSessionResourceSetupItemSURes_t
*
i
tem
=
NULL
;
Ngap_PDUSessionResourceSetupItemSURes_t
*
setupI
tem
=
NULL
;
ie
=
make_PDUSessionResourceSetupListSURes
();
item
=
make_PDUSessionResourceSetupItemSURes
(
0x80
,
"test
_item"
);
//ASN_SEQUENCE_ADD(&ie->value.choice.PDUSessionResourceSetupListSURes.list, i
tem);
//
add_pdu_session_resource_setup_response_ie(ngapPDUSessionResourceSetupResponse, ie);
setupItem
=
make_PDUSessionResourceSetupItemSURes
(
0x79
,
"test_setup
_item"
);
ASN_SEQUENCE_ADD
(
&
ie
->
value
.
choice
.
PDUSessionResourceSetupListSURes
.
list
,
setupI
tem
);
add_pdu_session_resource_setup_response_ie
(
ngapPDUSessionResourceSetupResponse
,
ie
);
//PDUSessionResourceFailedToSetupListSURes
Ngap_PDUSessionResourceFailedToSetup
ListSURes_t
PDUSessionResourceFailedToSetupListSURes
;
Ngap_PDUSessionResourceFailedToSetup
ItemSURes_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_PDUSessionResource
FailedTo
SetupListSURes_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_PDUSessionResource
FailedTo
SetupItemSURes_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
->
pDUSessionResourceSetup
Unsuccessful
Transfer
.
buf
;
pDUSessionResourceSetupUnsuccessfulTransfer_size
=
setupResponseIes_p
->
pDUSessionResourceSetup
Unsuccessful
Transfer
.
size
;
pDUSessionResourceSetupUnsuccessfulTransfer
=
setupResponseIes_p
->
pDUSessionResourceSetup
Response
Transfer
.
buf
;
pDUSessionResourceSetupUnsuccessfulTransfer_size
=
setupResponseIes_p
->
pDUSessionResourceSetup
Response
Transfer
.
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
;
}
}
...
...
src/common/ngap/ngap_common.h
View file @
de806db8
...
...
@@ -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"
...
...
src/smf_app/smf_app.cpp
View file @
de806db8
...
...
@@ -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
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment