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
d8dd47e8
Commit
d8dd47e8
authored
May 04, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix N1N2 Content msg
parent
322e3ddc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
72 deletions
+33
-72
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+33
-72
No files found.
src/smf_app/smf_context.cpp
View file @
d8dd47e8
...
...
@@ -1950,19 +1950,11 @@ bool smf_context::handle_pdu_session_modification_request(
n2_sm_info_hex_to_be_created
);
sm_context_resp
.
get
()
->
res
.
set_n2_sm_info_type
(
"PDU_RES_MOD_REQ"
);
// Fill the json part
// Fill the json part
with SmContextUpdatedData
nlohmann
::
json
json_data
=
{};
// N1SM
json_data
[
"n1MessageContainer"
][
"n1MessageClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n1MessageContainer"
][
"n1MessageContent"
][
"contentId"
]
=
N1_SM_CONTENT_ID
;
json_data
[
"n2InfoContainer"
][
"n2InformationClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapIeType"
]
=
"PDU_RES_MOD_REQ"
;
// NGAP message
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapData"
]
[
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"PduSessionId"
]
=
sm_context_resp
.
get
()
->
res
.
get_pdu_session_id
();
json_data
[
"n1SmMsg"
][
"contentId"
]
=
N1_SM_CONTENT_ID
;
json_data
[
"n2SmInfo"
][
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2SmInfoType"
]
=
"PDU_RES_MOD_REQ"
;
// NGAP message
sm_context_resp
.
get
()
->
res
.
set_json_data
(
json_data
);
// Update PDU Session status
...
...
@@ -2503,13 +2495,9 @@ bool smf_context::handle_service_request(
// fill the content of SmContextUpdatedData
nlohmann
::
json
json_data
=
{};
json_data
[
"n2InfoContainer"
][
"n2InformationClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"PduSessionId"
]
=
sm_context_resp
.
get
()
->
res
.
get_pdu_session_id
();
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapData"
]
[
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapIeType"
]
=
"PDU_RES_SETUP_REQ"
;
// NGAP message
json_data
[
"n2SmInfo"
][
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2SmInfoType"
]
=
"PDU_RES_SETUP_REQ"
;
// NGAP message
json_data
[
"upCnxState"
]
=
"ACTIVATING"
;
sm_context_resp
.
get
()
->
res
.
set_json_data
(
json_data
);
...
...
@@ -3526,11 +3514,8 @@ bool smf_context::handle_ho_preparation_request(
// Fill the content of SmContextUpdatedData
nlohmann
::
json
json_data
=
{};
json_data
[
"n2InfoContainer"
][
"n2InformationClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapData"
]
[
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapIeType"
]
=
"PDU_RES_SETUP_REQ"
;
// NGAP message
json_data
[
"n2SmInfo"
][
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2SmInfoType"
]
=
"PDU_RES_SETUP_REQ"
;
// NGAP message
json_data
[
"hoState"
]
=
"PREPARING"
;
sm_context_resp
.
get
()
->
res
.
set_json_data
(
json_data
);
sm_context_resp
.
get
()
->
res
.
set_http_code
(
...
...
@@ -5088,13 +5073,9 @@ void smf_context::send_pdu_session_update_response(
// fill the content of SmContextUpdatedData
nlohmann
::
json
json_data
=
{};
json_data
[
"n2InfoContainer"
][
"n2InformationClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"PduSessionId"
]
=
resp
->
res
.
get_pdu_session_id
();
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapData"
]
[
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapIeType"
]
=
"PDU_RES_SETUP_REQ"
;
// NGAP message
json_data
[
"n2SmInfo"
][
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2SmInfoType"
]
=
"PDU_RES_SETUP_REQ"
;
// NGAP message
json_data
[
"upCnxState"
]
=
"ACTIVATING"
;
resp
->
res
.
set_json_data
(
json_data
);
// TODO: verify whether cause is needed (as in 23.502 but not in 3GPP
...
...
@@ -5146,13 +5127,8 @@ void smf_context::send_pdu_session_update_response(
// fill the content of SmContextUpdatedData
nlohmann
::
json
json_data
=
{};
json_data
[
"n2InfoContainer"
][
"n2InformationClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"PduSessionId"
]
=
resp
->
res
.
get_pdu_session_id
();
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapData"
]
[
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapIeType"
]
=
"PATH_SWITCH_REQ_ACK"
;
json_data
[
"n2SmInfo"
][
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2SmInfoType"
]
=
"PATH_SWITCH_REQ_ACK"
;
// NGAP message
// NGAP message json_data["upCnxState"] ="ACTIVATING";
resp
->
res
.
set_json_data
(
json_data
);
...
...
@@ -5171,13 +5147,9 @@ void smf_context::send_pdu_session_update_response(
// fill the content of SmContextUpdatedData
nlohmann
::
json
json_data
=
{};
json_data
[
"n2InfoContainer"
][
"n2InformationClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"PduSessionId"
]
=
resp
->
res
.
get_pdu_session_id
();
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapData"
]
[
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
][
"ngapIeType"
]
=
"HANDOVER_CMD"
;
json_data
[
"n2SmInfo"
][
"contentId"
]
=
N2_SM_CONTENT_ID
;
json_data
[
"n2SmInfoType"
]
=
"HANDOVER_CMD"
;
// NGAP message
json_data
[
"hoState"
]
=
"PREPARED"
;
resp
->
res
.
set_json_data
(
json_data
);
...
...
@@ -5261,27 +5233,16 @@ void smf_context::send_pdu_session_release_response(
// Prepare response to send to AMF
// (PDUSession_UpdateSMContextResponse)
nlohmann
::
json
sm_context_response_data
=
{};
sm_context_response_data
[
"n1MessageContainer"
][
"n1MessageClass"
]
=
N1N2_MESSAGE_CLASS
;
sm_context_response_data
[
"n1MessageContainer"
][
"n1MessageContent"
]
[
"contentId"
]
=
N1_SM_CONTENT_ID
;
sm_context_response_data
[
"n2InfoContainer"
][
"n2InformationClass"
]
=
N1N2_MESSAGE_CLASS
;
sm_context_response_data
[
"n2InfoContainer"
][
"smInfo"
]
[
"PduSessionId"
]
=
resp
->
res
.
get_pdu_session_id
();
sm_context_response_data
[
"n2InfoContainer"
][
"smInfo"
][
"n2InfoContent"
]
[
"ngapData"
][
"contentId"
]
=
N2_SM_CONTENT_ID
;
sm_context_response_data
[
"n1SmMsg"
][
"contentId"
]
=
N1_SM_CONTENT_ID
;
sm_context_response_data
[
"n2SmInfo"
][
"contentId"
]
=
N2_SM_CONTENT_ID
;
sm_context_response_data
[
"n2SmInfoType"
]
=
"PDU_RES_REL_CMD"
;
// NGAP message
resp
->
res
.
set_json_data
(
sm_context_response_data
);
}
else
{
// fill the content of SmContextUpdatedData
nlohmann
::
json
json_data
=
{};
json_data
[
"n1MessageContainer"
][
"n1MessageClass"
]
=
N1N2_MESSAGE_CLASS
;
json_data
[
"n1MessageContainer"
][
"n1MessageContent"
][
"contentId"
]
=
N1_SM_CONTENT_ID
;
json_data
[
"n1SmMsg"
][
"contentId"
]
=
N1_SM_CONTENT_ID
;
resp
->
res
.
set_json_data
(
json_data
);
}
...
...
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