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
7a5b83ea
Commit
7a5b83ea
authored
Feb 06, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get AMF IP addr from PDU session establishment request instead of from conf file
parent
d1ad9a38
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
13 deletions
+25
-13
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+17
-8
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+1
-0
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+7
-5
No files found.
src/smf_app/smf_context.cpp
View file @
7a5b83ea
...
...
@@ -582,6 +582,11 @@ void smf_pdu_session::get_amf_addr(std::string& addr) const {
addr
=
amf_addr
;
}
//------------------------------------------------------------------------------
std
::
string
smf_pdu_session
::
get_amf_addr
()
const
{
return
amf_addr
;
}
//------------------------------------------------------------------------------
void
session_management_subscription
::
insert_dnn_configuration
(
const
std
::
string
&
dnn
,
...
...
@@ -769,9 +774,10 @@ void smf_context::handle_itti_msg(
get_supi_prefix
(
supi_prefix
);
std
::
string
supi_str
=
supi_prefix
+
"-"
+
smf_supi_to_string
(
supi
);
std
::
string
url
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
amf_addr
.
ipv4_addr
)))
+
":"
+
std
::
to_string
(
smf_cfg
.
amf_addr
.
port
)
+
//std::string(inet_ntoa(
// *((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
//":" + std::to_string(smf_cfg.amf_addr.port) +
sp
.
get
()
->
get_amf_addr
()
+
NAMF_COMMUNICATION_BASE
+
smf_cfg
.
amf_addr
.
api_version
+
fmt
::
format
(
NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL
,
...
...
@@ -1446,6 +1452,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
}
else
{
scf
.
get
()
->
amf_addr
=
amf_addr_str
;
sp
.
get
()
->
set_amf_addr
(
amf_addr_str
);
Logger
::
smf_api_server
().
debug
(
"AMF IP Addr %s"
,
amf_addr_str
.
c_str
());
}
}
...
...
@@ -1553,9 +1560,10 @@ void smf_context::handle_pdu_session_create_sm_context_request(
supi_str
=
sm_context_resp_pending
->
res
.
get_supi_prefix
()
+
"-"
+
smf_supi_to_string
(
supi
);
std
::
string
url
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
amf_addr
.
ipv4_addr
)))
+
":"
+
std
::
to_string
(
smf_cfg
.
amf_addr
.
port
)
+
NAMF_COMMUNICATION_BASE
+
// std::string(
// inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
// ":" + std::to_string(smf_cfg.amf_addr.port) + NAMF_COMMUNICATION_BASE +
sp
.
get
()
->
get_amf_addr
()
+
NAMF_COMMUNICATION_BASE
+
smf_cfg
.
amf_addr
.
api_version
+
fmt
::
format
(
NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL
,
supi_str
.
c_str
());
...
...
@@ -2750,8 +2758,9 @@ void smf_context::handle_pdu_session_modification_network_requested(
std
::
string
supi_str
=
itti_msg
->
msg
.
get_supi_prefix
()
+
"-"
+
smf_supi_to_string
(
supi
);
std
::
string
url
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
amf_addr
.
ipv4_addr
)))
+
":"
+
std
::
to_string
(
smf_cfg
.
amf_addr
.
port
)
+
NAMF_COMMUNICATION_BASE
+
//std::string(inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
//":" + std::to_string(smf_cfg.amf_addr.port) + NAMF_COMMUNICATION_BASE +
sp
.
get
()
->
get_amf_addr
()
+
NAMF_COMMUNICATION_BASE
+
smf_cfg
.
amf_addr
.
api_version
+
fmt
::
format
(
NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL
,
supi_str
.
c_str
());
...
...
src/smf_app/smf_context.hpp
View file @
7a5b83ea
...
...
@@ -403,6 +403,7 @@ class smf_pdu_session : public std::enable_shared_from_this<smf_pdu_session> {
* @return void
*/
void
get_amf_addr
(
std
::
string
&
addr
)
const
;
std
::
string
get_amf_addr
()
const
;
bool
ipv4
;
// IP Address(es): IPv4 address and/or IPv6 prefix
bool
ipv6
;
// IP Address(es): IPv4 address and/or IPv6 prefix
...
...
src/smf_app/smf_procedure.cpp
View file @
7a5b83ea
...
...
@@ -419,8 +419,9 @@ void session_create_sm_context_procedure::handle_itti_msg(
std
::
string
supi_str
=
n11_triggered_pending
->
res
.
get_supi_prefix
()
+
"-"
+
smf_supi_to_string
(
supi
);
std
::
string
url
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
amf_addr
.
ipv4_addr
)))
+
":"
+
std
::
to_string
(
smf_cfg
.
amf_addr
.
port
)
+
NAMF_COMMUNICATION_BASE
+
//std::string(inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
//":" + std::to_string(smf_cfg.amf_addr.port) + NAMF_COMMUNICATION_BASE +
sps
.
get
()
->
get_amf_addr
()
+
NAMF_COMMUNICATION_BASE
+
smf_cfg
.
amf_addr
.
api_version
+
fmt
::
format
(
NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL
,
supi_str
.
c_str
());
...
...
@@ -453,9 +454,10 @@ void session_create_sm_context_procedure::handle_itti_msg(
// N1N2MsgTxfrFailureNotification
std
::
string
callback_uri
=
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
amf_addr
.
ipv4_addr
)))
+
":"
+
std
::
to_string
(
smf_cfg
.
amf_addr
.
port
)
+
NSMF_PDU_SESSION_BASE
+
//std::string(
// inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
//":" + std::to_string(smf_cfg.amf_addr.port) + NSMF_PDU_SESSION_BASE +
sps
.
get
()
->
get_amf_addr
()
+
NSMF_PDU_SESSION_BASE
+
smf_cfg
.
sbi_api_version
+
fmt
::
format
(
NSMF_CALLBACK_N1N2_MESSAGE_TRANSFER_FAILURE
,
supi_str
.
c_str
());
...
...
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