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
8374ce73
Commit
8374ce73
authored
Nov 28, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
d04c26e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
src/common/utils/conversions.cpp
src/common/utils/conversions.cpp
+7
-3
src/common/utils/fqdn.cpp
src/common/utils/fqdn.cpp
+1
-5
src/smf_app/smf_pfcp_association.hpp
src/smf_app/smf_pfcp_association.hpp
+1
-1
No files found.
src/common/utils/conversions.cpp
View file @
8374ce73
...
...
@@ -181,10 +181,14 @@ void conv::plmnToMccMnc(
//------------------------------------------------------------------------------
struct
in_addr
conv
::
fromString
(
const
std
::
string
addr4
)
{
unsigned
char
buf
[
sizeof
(
struct
in6_addr
)]
=
{};
int
s
=
inet_pton
(
AF_INET
,
addr4
.
c_str
(),
buf
);
struct
in_addr
*
ia
=
(
struct
in_addr
*
)
buf
;
return
*
ia
;
struct
in_addr
ipv4_addr
;
ipv4_addr
.
s_addr
=
INADDR_ANY
;
if
(
inet_pton
(
AF_INET
,
addr4
.
c_str
(),
buf
)
==
1
)
{
memcpy
(
&
ipv4_addr
,
buf
,
sizeof
(
struct
in_addr
));
}
return
ipv4_addr
;
}
//------------------------------------------------------------------------------
std
::
string
conv
::
toString
(
const
struct
in_addr
&
inaddr
)
{
std
::
string
s
=
{};
...
...
src/common/utils/fqdn.cpp
View file @
8374ce73
...
...
@@ -97,11 +97,7 @@ bool fqdn::resolve(pfcp::node_id_t& node_id) {
}
switch
(
addr_type
)
{
case
0
:
{
if
(
inet_aton
(
util
::
trim
(
ip_addr_str
).
c_str
(),
&
ipv4_addr
)
==
0
)
{
Logger
::
smf_app
().
debug
(
"Bad IPv4 Addr format for UPF"
);
return
false
;
}
node_id
.
u1
.
ipv4_address
.
s_addr
=
ipv4_addr
.
s_addr
;
node_id
.
u1
.
ipv4_address
.
s_addr
=
conv
::
fromString
(
ip_addr_str
).
s_addr
;
Logger
::
smf_app
().
debug
(
"Resolve FQDN %s, IP Addr %s"
,
node_id
.
fqdn
.
c_str
(),
ip_addr_str
.
c_str
());
...
...
src/smf_app/smf_pfcp_association.hpp
View file @
8374ce73
...
...
@@ -331,7 +331,7 @@ struct edge {
if
(
!
snssai_dnns
.
empty
())
{
output
.
append
(
"S-NSSAI UPF info list: { "
);
for
(
const
auto
&
s
:
snssai_dnns
)
{
output
.
append
(
" "
+
s
.
to_string
()
+
", "
);
output
.
append
(
" "
).
append
(
s
.
to_string
()).
append
(
", "
);
}
output
.
append
(
"}"
);
}
...
...
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