Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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-AMF
Commits
598b67f4
Commit
598b67f4
authored
Jul 02, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for NF registration to work with NRF
parent
13b8ab42
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
18 deletions
+10
-18
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+3
-7
src/amf-app/amf_profile.cpp
src/amf-app/amf_profile.cpp
+3
-5
src/common/3gpp_29.510.h
src/common/3gpp_29.510.h
+4
-6
No files found.
src/amf-app/amf_app.cpp
View file @
598b67f4
...
...
@@ -404,13 +404,9 @@ void amf_app::generate_amf_profile() {
nf_service
.
nf_service_status
=
"REGISTERED"
;
// IP Endpoint
ip_endpoint_t
endpoint
=
{};
std
::
vector
<
struct
in_addr
>
addrs
;
nf_instance_profile
.
get_nf_ipv4_addresses
(
addrs
);
for
(
auto
a
:
addrs
)
{
endpoint
.
ipv4_addresses
.
push_back
(
a
);
}
endpoint
.
transport
=
"TCP"
;
endpoint
.
port
=
amf_cfg
.
n11
.
port
;
endpoint
.
ipv4_address
=
amf_cfg
.
n11
.
addr4
;
endpoint
.
transport
=
"TCP"
;
endpoint
.
port
=
amf_cfg
.
n11
.
port
;
nf_service
.
ip_endpoints
.
push_back
(
endpoint
);
nf_instance_profile
.
add_nf_service
(
nf_service
);
...
...
src/amf-app/amf_profile.cpp
View file @
598b67f4
...
...
@@ -371,11 +371,9 @@ void amf_profile::to_json(nlohmann::json& data) const {
for
(
auto
endpoint
:
service
.
ip_endpoints
)
{
nlohmann
::
json
ep_tmp
=
{};
ep_tmp
[
"ipv4Address"
]
=
nlohmann
::
json
::
array
();
for
(
auto
address
:
endpoint
.
ipv4_addresses
)
{
ep_tmp
[
"ipv4Address"
].
push_back
(
inet_ntoa
(
address
));
}
ep_tmp
[
"transport"
]
=
endpoint
.
transport
;
ep_tmp
[
"port"
]
=
endpoint
.
port
;
ep_tmp
[
"ipv4Address"
]
=
inet_ntoa
(
endpoint
.
ipv4_address
);
ep_tmp
[
"transport"
]
=
endpoint
.
transport
;
ep_tmp
[
"port"
]
=
endpoint
.
port
;
srv_tmp
[
"ipEndPoints"
].
push_back
(
ep_tmp
);
}
...
...
src/common/3gpp_29.510.h
View file @
598b67f4
...
...
@@ -276,16 +276,14 @@ typedef struct nf_service_version_s {
}
nf_service_version_t
;
typedef
struct
ip_endpoint_s
{
st
d
::
vector
<
struct
in_addr
>
ipv4_addresse
s
;
// st
d::vector<struct in6_addr> ipv6_addresse
s;
st
ruct
in_addr
ipv4_addres
s
;
// st
ruct in6_addr ipv6_addres
s;
std
::
string
transport
;
// TCP
unsigned
int
port
;
std
::
string
to_string
()
const
{
std
::
string
s
=
{};
s
.
append
(
"Ipv4 Addresses: "
);
for
(
auto
ipv4
:
ipv4_addresses
)
{
s
.
append
(
inet_ntoa
(
ipv4
));
}
s
.
append
(
"Ipv4 Address: "
);
s
.
append
(
inet_ntoa
(
ipv4_address
));
s
.
append
(
", TransportProtocol: "
);
s
.
append
(
transport
);
s
.
append
(
", Port: "
);
...
...
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