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
391fd2b7
Commit
391fd2b7
authored
Aug 20, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move amf_status_uri from smf_context_ref to smf_pdu_session
parent
868a356f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
18 deletions
+52
-18
src/smf_app/smf_app.hpp
src/smf_app/smf_app.hpp
+5
-5
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+40
-13
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+7
-0
No files found.
src/smf_app/smf_app.hpp
View file @
391fd2b7
...
...
@@ -83,17 +83,17 @@ class smf_context_ref {
// nssai = {};
// dnn = {};
pdu_session_id
=
0
;
amf_status_uri
=
{};
amf_addr
=
{};
upf_node_id
=
{};
target_amf
=
""
;
//
amf_status_uri = {};
amf_addr
=
{};
upf_node_id
=
{};
target_amf
=
""
;
}
supi_t
supi
;
// std::string dnn;
pdu_session_id_t
pdu_session_id
;
// snssai_t nssai;
std
::
string
amf_status_uri
;
//
std::string amf_status_uri;
std
::
string
amf_addr
;
std
::
string
target_amf
;
// targetServingNfId
pfcp
::
node_id_t
upf_node_id
;
...
...
src/smf_app/smf_context.cpp
View file @
391fd2b7
...
...
@@ -625,6 +625,21 @@ std::string smf_pdu_session::get_amf_addr() const {
return
amf_addr
;
}
//------------------------------------------------------------------------------
void
smf_pdu_session
::
set_amf_status_uri
(
std
::
string
&
status_uri
)
{
amf_status_uri
=
status_uri
;
}
//------------------------------------------------------------------------------
void
smf_pdu_session
::
get_amf_status_uri
(
std
::
string
&
status_uri
)
const
{
status_uri
=
amf_status_uri
;
}
//------------------------------------------------------------------------------
std
::
string
smf_pdu_session
::
get_amf_status_uri
()
const
{
return
amf_status_uri
;
}
//-----------------------------------------------------------------------------
std
::
string
smf_pdu_session
::
get_dnn
()
const
{
return
dnn
;
...
...
@@ -1524,16 +1539,19 @@ void smf_context::handle_pdu_session_create_sm_context_request(
// Store AMF callback URI and subscribe to the status notification: AMF will
// be notified when SM context changes
std
::
shared_ptr
<
smf_context_ref
>
scf
=
{};
if
(
smf_app_inst
->
is_scid_2_smf_context
(
smreq
->
scid
))
{
scf
=
smf_app_inst
->
scid_2_smf_context
(
smreq
->
scid
);
}
else
{
Logger
::
smf_app
().
warn
(
"SM Context associated with this id "
SCID_FMT
" does not exit!"
,
smreq
->
scid
);
// TODO: return;
}
scf
.
get
()
->
amf_status_uri
=
smreq
->
req
.
get_sm_context_status_uri
();
/* std::shared_ptr<smf_context_ref> scf = {};
if (smf_app_inst->is_scid_2_smf_context(smreq->scid)) {
scf = smf_app_inst->scid_2_smf_context(smreq->scid);
} else {
Logger::smf_app().warn(
"SM Context associated with this id " SCID_FMT " does not exit!",
smreq->scid);
// TODO: return;
}
scf.get()->amf_status_uri = smreq->req.get_sm_context_status_uri();
*/
std
::
string
amf_status_uri
=
smreq
->
req
.
get_sm_context_status_uri
();
sp
.
get
()
->
set_amf_status_uri
(
amf_status_uri
);
// Get and Store AMF Addr if available
std
::
vector
<
std
::
string
>
split_result
;
...
...
@@ -1543,7 +1561,8 @@ void smf_context::handle_pdu_session_create_sm_context_request(
":"
+
std
::
to_string
(
smf_cfg
.
amf_addr
.
port
);
boost
::
split
(
split_result
,
scf
.
get
()
->
amf_status_uri
,
boost
::
is_any_of
(
"/"
));
split_result
,
smreq
->
req
.
get_sm_context_status_uri
(),
boost
::
is_any_of
(
"/"
));
if
(
split_result
.
size
()
>=
3
)
{
std
::
string
addr
=
split_result
[
2
];
struct
in_addr
amf_ipv4_addr
;
...
...
@@ -1554,7 +1573,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
Logger
::
smf_api_server
().
debug
(
"AMF IP Addr %s"
,
amf_addr_str
.
c_str
());
}
}
scf
.
get
()
->
amf_addr
=
amf_addr_str
;
//
scf.get()->amf_addr = amf_addr_str;
sp
.
get
()
->
set_amf_addr
(
amf_addr_str
);
// Trigger SMF APP to send response to SMF-HTTP-API-SERVER (Step
...
...
@@ -3682,6 +3701,14 @@ void smf_context::handle_sm_context_status_change(
return
;
}
std
::
shared_ptr
<
smf_pdu_session
>
sp
=
{};
if
(
!
find_pdu_session
(
scf
.
get
()
->
pdu_session_id
,
sp
))
{
if
(
sp
.
get
()
==
nullptr
)
{
Logger
::
smf_n1
().
warn
(
"PDU session context does not exist!"
);
return
;
}
}
// Send request to N11 to trigger the notification
Logger
::
smf_app
().
debug
(
"Send ITTI msg to SMF N11 to trigger the status notification"
);
...
...
@@ -3690,7 +3717,7 @@ void smf_context::handle_sm_context_status_change(
TASK_SMF_APP
,
TASK_SMF_SBI
);
itti_msg
->
scid
=
scid
;
itti_msg
->
sm_context_status
=
status
;
itti_msg
->
amf_status_uri
=
s
cf
.
get
()
->
amf_status_uri
;
itti_msg
->
amf_status_uri
=
s
p
.
get
()
->
get_amf_status_uri
()
;
itti_msg
->
http_version
=
http_version
;
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
...
...
src/smf_app/smf_context.hpp
View file @
391fd2b7
...
...
@@ -453,6 +453,11 @@ class smf_pdu_session : public std::enable_shared_from_this<smf_pdu_session> {
*/
void
get_amf_addr
(
std
::
string
&
addr
)
const
;
std
::
string
get_amf_addr
()
const
;
void
set_amf_status_uri
(
std
::
string
&
status_uri
);
void
get_amf_status_uri
(
std
::
string
&
status_uri
)
const
;
std
::
string
get_amf_status_uri
()
const
;
std
::
string
get_dnn
()
const
;
snssai_t
get_snssai
()
const
;
void
set_dnn
(
const
std
::
string
&
d
);
...
...
@@ -473,6 +478,8 @@ class smf_pdu_session : public std::enable_shared_from_this<smf_pdu_session> {
std
::
string
amf_id
;
std
::
string
amf_addr
;
std
::
string
amf_status_uri
;
pdu_session_status_e
pdu_session_status
;
upCnx_state_e
upCnx_state
;
// N3 tunnel status (ACTIVATED, DEACTIVATED, ACTIVATING)
...
...
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